/* ============================================================
   STACK.EXE — Windows 95/98 grey-chrome reskin.

   Replaces the phosphor-green CRT layer with a nostalgic-but-safe
   grey-chrome application aesthetic. Every visual cue is deliberate:
     - Grey #c3c3c3 chrome + two-tone bevels (raised buttons)
     - Blue #000080 → #1084d0 title bar gradient (Win95 signature)
     - MS Sans Serif / Tahoma typography (period-correct)
     - Chunky pixel icons (SVG, drawn to a 16×16 grid)
     - Segmented blue progress bars (Win95 look)
     - Sunken status bar with padlock + "Local mode" indicator
   Zero border-radius. Zero rounded corners. Ever.

   Trust story: the brand band above the app window stays cream +
   Inter (unchanged from CRT version). The Win95 window sits on a
   teal #008080 "desktop" background — the aesthetic of a real
   offline application, not a hacker terminal.
============================================================ */

/* ---------- Reset for the audit page: kill site chrome, set desktop bg ---------- */
body.stack-exe-active {
  background: #008080 !important;        /* Win95 default desktop teal */
  color: #000 !important;
  font-family: 'Tahoma', 'MS Sans Serif', 'Microsoft Sans Serif', Geneva, sans-serif !important;
  font-size: 12px !important;
  min-height: 100vh;
  overflow-x: hidden;
  /* subtle 1-px-dot Win95 desktop pattern */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0),
    radial-gradient(circle at 3px 3px, rgba(0,0,0,0.08) 1px, transparent 0);
  background-size: 4px 4px, 4px 4px;
}
body.stack-exe-active header,
body.stack-exe-active footer,
body.stack-exe-active .abt-header,
body.stack-exe-active .cookie-banner,
body.stack-exe-active #cookieBanner {
  display: none !important;
}

/* ---------- Trust brand band (persistent, above the Win95 window) ---------- */
.stack-brand-band {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10001;
  background: #faf8f5; color: #0a0a0c;
  border-bottom: 1px solid #d4cdc0;
  padding: 0.55rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.82rem;
  text-shadow: none;
}
.stack-brand-band-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.stack-brand-band-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 5px;
  background: #17425D; color: #fff; font-weight: 800; font-size: 0.78rem;
  flex-shrink: 0; letter-spacing: 0.02em;
}
.stack-brand-band-name { font-weight: 700; color: #0a0a0c; white-space: nowrap; }
.stack-brand-band-name a { color: inherit; text-decoration: none; }
.stack-brand-band-name a:hover { text-decoration: underline; }
.stack-brand-band-sub {
  color: #57534e; font-size: 0.76rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stack-brand-band-right { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.stack-brand-band-help,
.stack-brand-band-escape {
  border: 1px solid #d4cdc0; background: #fff; color: #0a0a0c;
  padding: 0.28rem 0.7rem; border-radius: 4px;
  font-family: inherit; font-size: 0.76rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background 0.12s;
}
.stack-brand-band-help:hover,
.stack-brand-band-escape:hover { background: #eef6fb; border-color: #17425D; color: #17425D; }
.stack-brand-band-help { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 640px) {
  .stack-brand-band-sub { display: none; }
}

/* ---------- Help popover ---------- */
.stack-help-popover {
  position: fixed; top: 3.2rem; right: 1rem; z-index: 10002;
  width: 340px; max-width: calc(100vw - 2rem);
  background: #fff; color: #0a0a0c;
  border: 1px solid #d4cdc0; border-radius: 6px;
  padding: 1rem 1.15rem;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.85rem; line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  display: none;
}
.stack-help-popover.is-open { display: block; }
.stack-help-popover h3 {
  font-family: inherit !important; font-size: 0.95rem;
  color: #0a0a0c !important; text-shadow: none !important;
  margin: 0 0 0.4rem; font-weight: 700; letter-spacing: 0;
}
.stack-help-popover p { margin: 0 0 0.6rem; color: #57534e !important; text-shadow: none !important; }
.stack-help-popover strong { color: #0a0a0c !important; }
.stack-help-popover a { color: #17425D !important; text-shadow: none !important; text-decoration: underline; }

/* ============================================================
   WIN95 CHROME
   ============================================================ */

#abt.stack-exe {
  background: transparent !important;
  padding: 3.6rem 1rem 1.5rem !important;
  color: #000 !important;
  font-family: 'Tahoma', 'MS Sans Serif', 'Microsoft Sans Serif', Geneva, sans-serif !important;
}

/* ---------- Application window frame (JS-injected .stack95-window wraps content) ---------- */
.stack95-window {
  max-width: 1180px; margin: 0 auto 1rem;
  background: #c3c3c3;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 2px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.35);
}
.stack95-window-inner {
  background: #c3c3c3;
  border-top: 1px solid #dfdfdf;
  border-left: 1px solid #dfdfdf;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
}

/* ---------- Title bar ---------- */
.stack95-titlebar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  padding: 3px 3px 3px 5px;
  display: flex; align-items: center; gap: 6px;
  font-family: inherit !important;
  font-size: 12px;
  font-weight: 700;
  height: 22px;
  user-select: none;
}
.stack95-titlebar-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  background: #17425D; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 10px;
  border: 1px solid #fff;
}
.stack95-titlebar-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack95-titlebar-controls { display: inline-flex; gap: 2px; }
.stack95-titlebar-btn {
  width: 16px; height: 14px;
  background: #c3c3c3; color: #000;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 0;
  cursor: pointer;
}
.stack95-titlebar-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

/* ---------- Menu bar (File Edit View Help) ---------- */
.stack95-menubar {
  background: #c3c3c3;
  border-bottom: 1px solid #808080;
  padding: 2px 4px;
  display: flex; gap: 12px;
  font-size: 11px;
  color: #000;
  user-select: none;
}
.stack95-menubar-item { padding: 2px 6px; cursor: default; }
.stack95-menubar-item:hover { background: #000080; color: #fff; }
.stack95-menubar-item u { text-decoration: underline; }

/* ---------- Toolbar (below menubar) ---------- */
.stack95-toolbar {
  background: #c3c3c3;
  border-top: 1px solid #dfdfdf;
  border-bottom: 1px solid #808080;
  padding: 3px 4px;
  display: flex; gap: 3px; align-items: center;
}
.stack95-toolbar-btn {
  background: #c3c3c3;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  padding: 3px 5px;
  cursor: pointer; font-family: inherit; font-size: 11px; color: #000;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 22px;
}
.stack95-toolbar-btn:active,
.stack95-toolbar-btn.is-pressed {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 4px 4px 2px 6px;
}
.stack95-toolbar-sep {
  width: 1px; height: 20px; background: #808080;
  border-right: 1px solid #fff;
  margin: 0 4px;
}

/* ---------- Content region (the audit tool lives here) ---------- */
.stack95-content {
  background: #fff;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  margin: 4px;
  padding: 16px 20px;
  color: #000;
  font-size: 12px;
  min-height: 400px;
}

/* ---------- Status bar (bottom sunken strip) ---------- */
.stack95-statusbar {
  background: #c3c3c3;
  border-top: 1px solid #808080;
  padding: 2px 2px 3px;
  display: flex; gap: 2px;
  font-size: 11px;
  color: #000;
  user-select: none;
}
.stack95-statusbar-cell {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 2px 6px;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 16px;
}
.stack95-statusbar-cell.grow { flex: 1; }
.stack95-status-led {
  width: 6px; height: 6px; background: #0f0; border: 1px solid #060;
  display: inline-block;
  animation: stack95-led-pulse 1.6s ease-in-out infinite;
}
@keyframes stack95-led-pulse {
  0%, 100% { background: #0f0; box-shadow: 0 0 3px #0f0; }
  50%      { background: #060; box-shadow: none; }
}
.stack95-status-lock {
  width: 12px; height: 12px; display: inline-block;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><rect x='2' y='6' width='8' height='5' fill='%23c3c3c3' stroke='%23000' stroke-width='0.6'/><path d='M3.6 6V4a2.4 2.4 0 0 1 4.8 0v2' fill='none' stroke='%23000' stroke-width='0.7'/><rect x='5.4' y='8' width='1.2' height='1.6' fill='%23000'/></svg>") no-repeat center/contain;
}

/* ---------- Override the audit tool's own styles to Win95 flavor ---------- */
#abt.stack-exe .paper,
#abt.stack-exe .paper-cream,
#abt.stack-exe section.paper,
#abt.stack-exe section.paper-cream {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
#abt.stack-exe .max-w-3xl,
#abt.stack-exe .max-w-4xl,
#abt.stack-exe .max-w-5xl,
#abt.stack-exe .max-w-7xl { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }

#abt.stack-exe *,
#abt.stack-exe *::before,
#abt.stack-exe *::after {
  font-family: 'Tahoma', 'MS Sans Serif', 'Microsoft Sans Serif', Geneva, sans-serif !important;
  color: inherit;
  text-shadow: none !important;
}
#abt.stack-exe h1, #abt.stack-exe h2, #abt.stack-exe h3,
#abt.stack-exe .rr-section-title {
  color: #000 !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}
#abt.stack-exe .rr-section-title { font-size: 14px !important; padding-bottom: 4px; border-bottom: 1px solid #808080; margin-bottom: 12px; }
#abt.stack-exe p, #abt.stack-exe span, #abt.stack-exe li, #abt.stack-exe td, #abt.stack-exe th, #abt.stack-exe label {
  color: #000 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
#abt.stack-exe .muted, #abt.stack-exe .rr-mono, #abt.stack-exe .rr-cover-context, #abt.stack-exe .rr-cover-method-k {
  color: #404040 !important;
}

/* ---------- Stage cards → sunken content panels ---------- */
#abt.stack-exe .rr-flow-wrap,
#abt.stack-exe .rr-stage,
#abt.stack-exe .rr-cover,
#abt.stack-exe .rr-info,
#abt.stack-exe .rr-error {
  background: #fff !important;
  border-top: 1px solid #404040 !important;
  border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important;
  border-bottom: 1px solid #fff !important;
  padding: 14px 18px !important;
  margin-bottom: 8px !important;
  color: #000 !important;
  border-radius: 0 !important;
}
#abt.stack-exe .rr-error {
  background: #fff2f2 !important;
  color: #7a0000 !important;
}
#abt.stack-exe .rr-info {
  background: #fffbe6 !important;
  color: #7a4a0a !important;
}

/* ---------- Drop area: dashed grey, floppy-icon vibe ---------- */
#abt.stack-exe .rr-drop {
  background: #fff !important;
  border: 2px dashed #808080 !important;
  color: #000 !important;
  padding: 30px 20px !important;
  cursor: pointer;
  border-radius: 0 !important;
}
#abt.stack-exe .rr-drop:hover, #abt.stack-exe .rr-drop.is-drag {
  border-color: #000080 !important;
  background: #eef !important;
}
#abt.stack-exe .rr-drop-icon {
  color: #000080 !important;
  font-size: 24px !important;
}

/* ---------- Buttons → chunky raised grey ---------- */
#abt.stack-exe .rr-cta,
#abt.stack-exe button.rr-cta,
#abt.stack-exe .rr-btn-ghost,
#abt.stack-exe .btn {
  background: #c3c3c3 !important;
  color: #000 !important;
  border-top: 1px solid #fff !important;
  border-left: 1px solid #fff !important;
  border-right: 1px solid #404040 !important;
  border-bottom: 1px solid #404040 !important;
  outline: 1px solid #000;
  outline-offset: 0;
  border-radius: 0 !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  padding: 4px 16px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  min-width: 70px;
  text-shadow: none;
}
#abt.stack-exe .rr-cta:hover, #abt.stack-exe .btn:hover {
  background: #c3c3c3 !important;
}
#abt.stack-exe .rr-cta:active, #abt.stack-exe .btn:active {
  border-top: 1px solid #404040 !important;
  border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important;
  border-bottom: 1px solid #fff !important;
  padding: 5px 15px 3px 17px !important;
}
#abt.stack-exe .rr-cta:disabled {
  color: #808080 !important;
  text-shadow: 1px 1px 0 #fff;
}
/* Default action buttons get a subtle blue "OK button" feel */
#abt.stack-exe #rr-stage-1-next,
#abt.stack-exe #rr-stage-3-run,
#abt.stack-exe #rr-stage-2-next {
  font-weight: 700 !important;
}

/* ---------- Form controls: sunken beveled ---------- */
#abt.stack-exe select,
#abt.stack-exe input[type=text],
#abt.stack-exe input[type=email] {
  background: #fff !important;
  color: #000 !important;
  border-top: 1px solid #404040 !important;
  border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important;
  border-bottom: 1px solid #fff !important;
  outline: 1px solid #808080;
  outline-offset: 0;
  border-radius: 0 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  padding: 3px 6px !important;
}
#abt.stack-exe select:focus, #abt.stack-exe input:focus {
  outline: 1px dotted #000 !important;
  outline-offset: -3px !important;
}

/* ---------- Stage pips → tab-like buttons ---------- */
#abt.stack-exe .rr-step-dots {
  border-bottom: 1px solid #808080;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  gap: 2px;
}
#abt.stack-exe .rr-step-dot {
  width: auto !important; height: auto !important;
  background: #c3c3c3 !important;
  color: #000 !important;
  border-top: 1px solid #fff !important;
  border-left: 1px solid #fff !important;
  border-right: 1px solid #404040 !important;
  border-bottom: none !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  display: inline-block;
  position: relative; top: 1px;
}
#abt.stack-exe .rr-step-dot.is-active {
  background: #fff !important;
  font-weight: 700 !important;
  z-index: 2;
}

/* ---------- Tables (results grid) → MS Access flavour ---------- */
#abt.stack-exe table,
#abt.stack-exe .rr-preview-table,
#abt.stack-exe .rr-result-table {
  background: #fff !important;
  border: 1px solid #808080 !important;
  border-collapse: collapse !important;
  font-size: 11px !important;
}
#abt.stack-exe table th, #abt.stack-exe .rr-preview-table th {
  background: #c3c3c3 !important;
  color: #000 !important;
  border-top: 1px solid #fff !important;
  border-left: 1px solid #fff !important;
  border-right: 1px solid #808080 !important;
  border-bottom: 1px solid #808080 !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-size: 11px !important;
}
#abt.stack-exe table td, #abt.stack-exe .rr-preview-table td {
  background: #fff !important;
  color: #000 !important;
  border-right: 1px solid #e0e0e0 !important;
  border-bottom: 1px solid #e0e0e0 !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
}

/* ---------- Segmented Win95 progress bars ---------- */
#abt.stack-exe .rr-loader-bar {
  background: #fff !important;
  border-top: 1px solid #404040 !important;
  border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important;
  border-bottom: 1px solid #fff !important;
  outline: 1px solid #808080;
  height: 20px !important;
  border-radius: 0 !important;
  padding: 2px;
  overflow: hidden;
}
#abt.stack-exe .rr-loader-bar-fill {
  background:
    repeating-linear-gradient(90deg,
      #000080 0, #000080 10px,
      transparent 10px, transparent 12px) !important;
  height: 100% !important;
  border-radius: 0 !important;
}

/* ---------- Cover page: big number as classic "About" dialog ---------- */
#abt.stack-exe .rr-cover {
  background: #fff !important;
  padding: 20px 24px !important;
}
#abt.stack-exe .rr-cover-figure-num {
  color: #000 !important;
  font-family: 'Tahoma', sans-serif !important;
  font-weight: 700 !important;
  font-size: 3.2rem !important;
  letter-spacing: -1px;
}
#abt.stack-exe .rr-cover-figure-sub {
  color: #404040 !important;
  font-family: 'Tahoma', sans-serif !important;
  font-style: normal !important;
  font-size: 12px !important;
}
#abt.stack-exe .rr-cover-eyebrow, #abt.stack-exe .rr-cover-section-num {
  background: #c3c3c3 !important;
  color: #000 !important;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  padding: 2px 6px;
  font-size: 10px !important;
  text-transform: uppercase;
}

/* ---------- Hide legacy inline CRT titlebar (replaced by JS-injected Win95 chrome)
     and the audit tool's boot overlay (replaced by Win95 "Loading..." dialog) ---------- */
#abt.stack-exe .rr-boot,
#abt.stack-exe .stack-titlebar { display: none !important; }

/* ============================================================
   BOOT DIALOG (Win95 "Loading..." modal)
   ============================================================ */
.stack95-boot-scrim {
  position: fixed; top: 3.2rem; left: 0; right: 0; bottom: 0; z-index: 10000;
  background: #008080;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0),
    radial-gradient(circle at 3px 3px, rgba(0,0,0,0.08) 1px, transparent 0);
  background-size: 4px 4px, 4px 4px;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  font-family: 'Tahoma', 'MS Sans Serif', sans-serif;
  transition: opacity 0.4s ease;
}
.stack95-boot-dialog {
  width: 420px; max-width: 100%;
  background: #c3c3c3;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.35);
}
.stack95-boot-body {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
}
.stack95-boot-icon {
  width: 48px; height: 48px;
  /* Floppy disk icon, pixel-art SVG */
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><rect x='4' y='4' width='40' height='40' fill='%23000080' stroke='%23000' stroke-width='1'/><rect x='4' y='4' width='40' height='40' fill='none' stroke='%231084d0' stroke-width='1' stroke-dasharray='0.5,0.5'/><rect x='10' y='4' width='24' height='16' fill='%23c3c3c3' stroke='%23000' stroke-width='1'/><rect x='28' y='6' width='4' height='12' fill='%23000'/><rect x='10' y='26' width='28' height='18' fill='%23dfdfdf' stroke='%23000' stroke-width='1'/><rect x='12' y='28' width='24' height='2' fill='%23808080'/><rect x='12' y='31' width='24' height='2' fill='%23808080'/><rect x='12' y='34' width='24' height='2' fill='%23808080'/></svg>") no-repeat center/contain;
}
.stack95-boot-text { min-width: 0; }
.stack95-boot-title {
  font-size: 12px; font-weight: 700; color: #000;
  margin-bottom: 6px;
}
.stack95-boot-status {
  font-size: 11px; color: #000; margin-bottom: 10px; min-height: 14px;
}
.stack95-boot-progress {
  background: #fff;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  outline: 1px solid #808080;
  height: 18px;
  padding: 2px;
  overflow: hidden;
}
.stack95-boot-progress-fill {
  height: 100%;
  background:
    repeating-linear-gradient(90deg,
      #000080 0, #000080 10px,
      transparent 10px, transparent 12px);
  width: 0%;
  transition: width 0.28s linear;
}
.stack95-boot-footnote {
  padding: 6px 16px 12px;
  font-size: 10px; color: #404040;
  border-top: 1px solid #dfdfdf;
  background: #c3c3c3;
}

/* ============================================================
   PRE-ROLL WIZARD (Win95 "Sample Data Wizard")
   ============================================================ */
.stack95-preroll-scrim {
  position: fixed; inset: 0; z-index: 10005;
  background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  cursor: default;
  font-family: 'Tahoma', 'MS Sans Serif', sans-serif;
}
.stack95-preroll-dialog {
  width: 460px; max-width: 100%;
  background: #c3c3c3;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.35);
}
.stack95-preroll-titlebar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff; padding: 3px 3px 3px 6px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; height: 22px;
}
.stack95-preroll-body {
  padding: 16px 20px 12px;
  display: grid; grid-template-columns: 48px 1fr; gap: 14px;
}
.stack95-preroll-icon {
  width: 48px; height: 48px;
  /* Question/info icon: blue circle with 'i' */
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><circle cx='24' cy='24' r='20' fill='%23000080' stroke='%23000' stroke-width='1.2'/><circle cx='24' cy='24' r='18' fill='none' stroke='%231084d0' stroke-width='1'/><text x='24' y='34' text-anchor='middle' font-family='Georgia,serif' font-size='28' font-style='italic' fill='%23fff' font-weight='700'>i</text></svg>") no-repeat center/contain;
}
.stack95-preroll-text { font-size: 12px; color: #000; }
.stack95-preroll-title { font-weight: 700; margin-bottom: 6px; font-size: 13px; }
.stack95-preroll-count { display: inline-block; font-weight: 700; color: #000080; }
.stack95-preroll-footer {
  border-top: 1px solid #dfdfdf;
  padding: 10px 16px 12px;
  background: #c3c3c3;
  display: flex; justify-content: flex-end; gap: 6px;
}
.stack95-btn {
  background: #c3c3c3; color: #000;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  outline: 1px solid #000;
  font-family: inherit; font-size: 11px;
  padding: 4px 16px; min-width: 78px; min-height: 22px;
  cursor: pointer;
}
.stack95-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 5px 15px 3px 17px;
}
.stack95-btn.is-default { font-weight: 700; }

/* ============================================================
   SHARED-SHELL (at-*) AUDIT TOOLS — Win95 treatment for the 5
   audits that use audit-tool.js (finance-close, ops-procurement,
   commercial-pipeline, legal, saas-spend). Mirrors the rr-* rules.
   ============================================================ */
#abt.stack-exe .at-wrap,
#abt.stack-exe .at-stage,
#abt.stack-exe .at-card,
#abt.stack-exe .at-cover,
#abt.stack-exe .at-status,
#abt.stack-exe .at-crossfile-section {
  background: #fff !important;
  border-top: 1px solid #404040 !important;
  border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important;
  border-bottom: 1px solid #fff !important;
  padding: 14px 18px !important;
  margin-bottom: 8px !important;
  color: #000 !important;
  border-radius: 0 !important;
}
#abt.stack-exe .at-h1,
#abt.stack-exe .at-card-title,
#abt.stack-exe .at-cover-figure-num {
  color: #000 !important;
  font-family: 'Tahoma', 'MS Sans Serif', sans-serif !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}
#abt.stack-exe .at-h1 { font-size: 15px !important; padding-bottom: 4px; border-bottom: 1px solid #808080; margin-bottom: 10px; }
#abt.stack-exe .at-cover-figure-num { font-size: 3.2rem !important; letter-spacing: -1px; }
#abt.stack-exe .at-lede,
#abt.stack-exe .at-mono,
#abt.stack-exe .at-card-num { color: #404040 !important; font-size: 12px !important; }
#abt.stack-exe .at-eyebrow {
  background: #c3c3c3 !important; color: #000 !important;
  border-top: 1px solid #fff; border-left: 1px solid #fff;
  border-right: 1px solid #404040; border-bottom: 1px solid #404040;
  padding: 2px 6px; font-size: 10px !important; text-transform: uppercase;
  display: inline-block;
}
/* Drop zone */
#abt.stack-exe .at-drop {
  background: #fff !important;
  border: 2px dashed #808080 !important;
  color: #000 !important;
  padding: 30px 20px !important;
  cursor: pointer; border-radius: 0 !important;
}
#abt.stack-exe .at-drop:hover, #abt.stack-exe .at-drop.is-drag {
  border-color: #000080 !important; background: #eef !important;
}
#abt.stack-exe .at-drop-icon { color: #000080 !important; font-size: 24px !important; }
#abt.stack-exe .at-drop-hint, #abt.stack-exe .at-drop-fmt { color: #404040 !important; }
/* Buttons (at-cta + at-run) */
#abt.stack-exe .at-cta,
#abt.stack-exe #at-run,
#abt.stack-exe .at-export,
#abt.stack-exe .at-leave-link {
  background: #c3c3c3 !important; color: #000 !important;
  border-top: 1px solid #fff !important; border-left: 1px solid #fff !important;
  border-right: 1px solid #404040 !important; border-bottom: 1px solid #404040 !important;
  outline: 1px solid #000; border-radius: 0 !important;
  font-family: inherit !important; font-weight: 400 !important;
  font-size: 12px !important; padding: 4px 16px !important;
  letter-spacing: 0 !important; text-transform: none !important;
  cursor: pointer; min-width: 70px; text-shadow: none;
}
#abt.stack-exe #at-run { font-weight: 700 !important; }
#abt.stack-exe .at-cta:active,
#abt.stack-exe #at-run:active {
  border-top: 1px solid #404040 !important; border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important; border-bottom: 1px solid #fff !important;
  padding: 5px 15px 3px 17px !important;
}
/* Mapping selects */
#abt.stack-exe .at-mapping select,
#abt.stack-exe #at-map-customer,
#abt.stack-exe #at-map-date,
#abt.stack-exe #at-map-amount,
#abt.stack-exe #at-map-status {
  background: #fff !important; color: #000 !important;
  border-top: 1px solid #404040 !important; border-left: 1px solid #404040 !important;
  border-right: 1px solid #fff !important; border-bottom: 1px solid #fff !important;
  outline: 1px solid #808080; border-radius: 0 !important;
  font-family: inherit !important; font-size: 12px !important; padding: 3px 6px !important;
}
/* Trust pill → statusbar-style cell */
#abt.stack-exe .at-trust-pill {
  background: #c3c3c3 !important; color: #000 !important;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #fff; border-bottom: 1px solid #fff;
  border-radius: 0 !important; padding: 2px 8px !important; font-size: 11px !important;
}
/* Detector result rows */
#abt.stack-exe .at-detector-list > * {
  border-bottom: 1px solid #e0e0e0 !important;
}

/* ============================================================
   DESKTOP LAUNCHER — the route opens as a Win95 "desktop" with a
   launch icon; clicking it opens the tool in its own popup window.
   ============================================================ */
.stack95-desktop {
  position: fixed; top: 3.2rem; left: 0; right: 0; bottom: 30px; z-index: 9000;
  overflow: hidden;
}
/* Desktop icon (top-left, double-clickable) */
.stack95-desktop-icon {
  position: absolute; top: 18px; left: 18px; width: 84px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; user-select: none; padding: 4px; border: 1px dotted transparent;
}
.stack95-desktop-icon:hover { border-color: rgba(255,255,255,0.4); }
.stack95-desktop-icon .ico { width: 42px; height: 42px; }
.stack95-desktop-icon .lbl {
  color: #fff; font-size: 11px; text-align: center; line-height: 1.25;
  padding: 1px 3px; text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.stack95-desktop-icon.sel .lbl { background: #000080; outline: 1px dotted #fff; }

/* Centered launch dialog (primary CTA) */
.stack95-launch {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%);
  width: 460px; max-width: calc(100vw - 2rem);
  background: #c3c3c3;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.35);
}
.stack95-launch-body { padding: 20px 22px 8px; display: grid; grid-template-columns: 56px 1fr; gap: 16px; }
.stack95-launch-icon {
  width: 56px; height: 56px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'><rect x='5' y='5' width='46' height='46' fill='%23000080' stroke='%23000' stroke-width='1.2'/><rect x='5' y='5' width='46' height='46' fill='none' stroke='%231084d0' stroke-width='1'/><rect x='12' y='5' width='28' height='18' fill='%23c3c3c3' stroke='%23000' stroke-width='1'/><rect x='33' y='7' width='4' height='14' fill='%23000'/><rect x='12' y='30' width='32' height='21' fill='%23dfdfdf' stroke='%23000' stroke-width='1'/><text x='28' y='45' text-anchor='middle' font-family='Tahoma,sans-serif' font-size='9' font-weight='700' fill='%23000'>.EXE</text></svg>") no-repeat center/contain;
}
.stack95-launch h2 { font-size: 15px !important; font-weight: 700 !important; color: #000 !important; margin: 0 0 2px !important; letter-spacing: 0 !important; }
.stack95-launch-sub { font-size: 12px; color: #404040; margin-bottom: 10px; }
.stack95-launch-why { font-size: 12px; color: #000080; font-weight: 700; line-height: 1.45; margin: 0 0 9px; }
.stack95-launch-why em { font-style: italic; }
.stack95-launch-desc { font-size: 12px; color: #000; line-height: 1.5; margin: 0 0 4px; }
.stack95-launch-trust { font-size: 11px; color: #006000; margin: 6px 0 0; display: flex; align-items: center; gap: 5px; }
.stack95-launch-footer {
  border-top: 1px solid #dfdfdf; margin-top: 12px;
  padding: 12px 22px 16px; background: #c3c3c3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.stack95-launch-btn {
  background: #c3c3c3; color: #000;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #404040; border-bottom: 2px solid #404040;
  outline: 1px solid #000;
  font-family: 'Tahoma', 'MS Sans Serif', sans-serif; font-size: 13px; font-weight: 700;
  padding: 8px 26px; min-width: 200px; cursor: pointer;
}
.stack95-launch-btn:active {
  border-top: 2px solid #404040; border-left: 2px solid #404040;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  padding: 9px 25px 7px 27px;
}
.stack95-launch-note { font-size: 10px; color: #404040; text-align: center; }

/* Taskbar (bottom of the desktop) */
.stack95-taskbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 30px; z-index: 10004;
  background: #c3c3c3; border-top: 2px solid #fff;
  display: flex; align-items: center; gap: 5px; padding: 3px 4px;
  font-family: 'Tahoma', 'MS Sans Serif', sans-serif; font-size: 11px;
}
.stack95-start-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #c3c3c3; color: #000; font-weight: 700; font-size: 12px;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #404040; border-bottom: 2px solid #404040;
  padding: 2px 8px 2px 5px; cursor: default; height: 22px;
}
.stack95-start-flag {
  width: 15px; height: 13px; display: inline-block; flex-shrink: 0;
  background:
    linear-gradient(135deg, #ff3b30 0 50%, transparent 50%) 0 0/8px 7px no-repeat,
    linear-gradient(135deg, #34c759 0 50%, transparent 50%) 8px 0/8px 7px no-repeat,
    linear-gradient(135deg, #007aff 0 50%, transparent 50%) 0 7px/8px 7px no-repeat,
    linear-gradient(135deg, #ffcc00 0 50%, transparent 50%) 8px 7px/8px 7px no-repeat,
    #808080;
  transform: skewX(-8deg);
}
.stack95-task-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #c3c3c3; color: #000; font-size: 11px;
  border-top: 2px solid #404040; border-left: 2px solid #404040;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  padding: 3px 10px 1px; height: 22px; cursor: default;
  max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.stack95-clock {
  margin-left: auto;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #fff; border-bottom: 1px solid #fff;
  padding: 3px 10px; height: 22px; display: inline-flex; align-items: center;
  font-size: 11px; color: #000;
}

/* ---------- Booth mode: bump type on 55" TV ---------- */
@media (min-width: 1600px) {
  body.stack-exe-active { font-size: 16px !important; }
  #abt.stack-exe p, #abt.stack-exe span, #abt.stack-exe li, #abt.stack-exe td, #abt.stack-exe th, #abt.stack-exe label { font-size: 15px !important; }
  #abt.stack-exe .rr-section-title { font-size: 20px !important; }
  #abt.stack-exe .rr-cover-figure-num { font-size: 5.2rem !important; }
  .stack95-titlebar { font-size: 15px; height: 28px; }
}

/* ---------- Print: revert to plain white paper ---------- */
@media print {
  body.stack-exe-active { background: #fff !important; }
  .stack95-window { box-shadow: none; border: 1px solid #000; }
  .stack95-titlebar { display: none; }
  .stack95-menubar, .stack95-toolbar, .stack95-statusbar { display: none; }
}
