/* ============================================================
   DELTA BOOKS — "The Sheet" (Light brand theme)
   Spreadsheet landing page re-skinned to match the rest of the
   Delta Books site: white canvas, indigo→purple brand gradient,
   Inter typography. Same layout/grid metaphor as the dark draft.
   ============================================================ */

:root {
  --canvas:        #ffffff;
  --canvas-alt:    #fafbfc;
  --chrome:        #ffffff;
  --chrome-alt:    #f5f7fb;

  --line:          rgba(15, 23, 42, .06);
  --line-strong:   rgba(15, 23, 42, .10);
  --cell-border:   #e6e9f0;

  --brand-1:       #667eea;
  --brand-2:       #764ba2;
  --brand-blue:    #0d6efd;
  --brand-indigo:  #6366f1;
  --brand-soft:    #eef1ff;

  --danger:        #dc3545;
  --danger-soft:   #fdecee;
  --warn:          #b8860b;
  --warn-soft:     #fff7e0;
  --success:       #198754;

  --ink:           #1a1a2e;
  --ink-soft:      #495057;
  --ink-mute:      #6c757d;

  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --rh: 64px;
  --gutter-w: 50px;
  --topbar-h: 56px;
  --fxbar-h: 44px;
  --colhdr-h: 30px;
  --bottom-h: 38px;

  --radius:    14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow:    0 4px 20px rgba(15,23,42,.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
::selection { background: rgba(102,126,234,.25); color: var(--ink); }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============================================================
   TOP CHROME
   ============================================================ */
.chrome-top {
  position: sticky; top: 0; z-index: 60;
  background: var(--chrome);
  border-bottom: 1px solid var(--cell-border);
  box-shadow: var(--shadow-sm);
}
.menubar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 0;
  padding-inline: 18px;
  border-bottom: 1px solid var(--cell-border);
}
.mb-brand {
  display: inline-flex; align-items: center; gap: 9px;
  padding-right: 18px; margin-right: 6px;
  border-right: 1px solid var(--cell-border);
  height: 100%;
}
.mb-mark {
  font-family: Georgia, serif; font-weight: 700; font-size: 22px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.mb-word { font-family: var(--sans); font-weight: 700; font-size: 16px; letter-spacing: -.005em; color: var(--ink); }
.mb-ext  { color: var(--ink-mute); font-weight: 500; }
.mb-menu { display: flex; align-items: center; gap: 2px; }
.mb-menu a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 7px 13px; border-radius: 6px;
  transition: background .2s, color .2s;
}
.mb-menu a:hover { background: var(--brand-soft); color: var(--brand-2); }
.mb-spacer { flex: 1; }
.mb-cta {
  font-size: 13.5px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  padding: 9px 18px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 6px 16px -8px rgba(118,75,162,.55);
  transition: transform .25s, box-shadow .25s, filter .25s;
}
.mb-cta:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 22px -10px rgba(118,75,162,.6); }
.mb-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ink-mute); margin-right: 16px; white-space: nowrap;
}
.mb-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(25,135,84,.16); }

/* formula bar */
.fxbar {
  height: var(--fxbar-h);
  display: flex; align-items: stretch;
  background: var(--chrome-alt);
  border-bottom: 1px solid var(--cell-border);
}
.namebox {
  width: calc(var(--gutter-w) + 84px);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-right: 1px solid var(--cell-border);
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--brand-2);
  background: #fff;
}
.namebox .caret { color: var(--ink-mute); font-size: 10px; }
.fx-icon {
  width: 46px; display: grid; place-content: center;
  border-right: 1px solid var(--cell-border);
  font-family: Georgia, serif; font-style: italic; font-size: 15px; color: var(--ink-mute);
  background: #fff;
}
.fx-input {
  flex: 1; display: flex; align-items: center; padding-inline: 14px;
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.fx-input .tok-fn  { color: var(--brand-2); font-weight: 600; }
.fx-input .tok-str { color: var(--success); }
.fx-input .tok-num { color: var(--ink); }
.fx-input .tok-err { color: var(--danger); }
.fx-input .cursor  { display:inline-block; width:7px; height:15px; background: var(--brand-1); margin-left:2px; transform: translateY(2px); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* column header */
.colhdr {
  height: var(--colhdr-h);
  display: grid;
  grid-template-columns: var(--gutter-w) repeat(12, 1fr);
  background: var(--chrome-alt);
}
.colhdr .ch {
  display: grid; place-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-mute);
  border-right: 1px solid var(--line);
}
.colhdr .ch.corner { border-right-color: var(--cell-border); position: relative; background: #fff; }
.colhdr .ch.corner::after {
  content: ""; position: absolute; right: 5px; bottom: 5px;
  border: 5px solid transparent; border-right-color: var(--ink-mute); border-bottom-color: var(--ink-mute);
  opacity: .55;
}
.colhdr .ch.active { color: var(--brand-2); background: var(--brand-soft); }

@media (max-width: 1180px) { .mb-live { display: none; } }
@media (max-width: 720px)  {
  .mb-menu, .mb-live { display: none; }
  .colhdr { display: none; }
  :root { --gutter-w: 34px; }
}

/* ============================================================
   SHEET BODY
   ============================================================ */
.sheet { display: grid; grid-template-columns: var(--gutter-w) 1fr; }

.gutter {
  background: var(--chrome-alt);
  border-right: 1px solid var(--cell-border);
  position: relative; z-index: 2;
}
.gutter .rn {
  height: var(--rh);
  display: grid; place-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
}
.gutter .rn.active { color: var(--brand-2); background: var(--brand-soft); }

.canvas {
  position: relative;
  background-color: var(--canvas-alt);
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% var(--rh);
}
.vlines { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(12, 1fr); pointer-events: none; }
.vlines span { border-right: 1px solid var(--line); }
.vlines span:first-child { border-left: 1px solid var(--line); }

.content {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-content: start;
}

/* ============================================================
   CELL
   ============================================================ */
.cell {
  position: relative;
  padding: 28px 30px;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--cell-border);
  border-bottom: 1px solid var(--cell-border);
  min-height: var(--rh);
  cursor: cell;
  background: var(--canvas);
  transition: background .2s var(--ease, ease);
}
.cell.norb { border-right: none; }
.cell:hover { background: var(--brand-soft); }
.cell.selected {
  outline: 2px solid var(--brand-1);
  outline-offset: -2px;
  background: var(--brand-soft);
  z-index: 5;
}
.cell.selected::after {
  content: ""; position: absolute; right: -4px; bottom: -4px;
  width: 8px; height: 8px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border: 1px solid #fff;
}
.cell-ref {
  position: absolute; top: 8px; left: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .05em;
  color: var(--ink-mute); opacity: .6;
}
.cell.plain { cursor: default; background: transparent; }
.cell.plain:hover { background: transparent; }

.r-tall { min-height: calc(var(--rh) * 2); }

/* ============================================================
   Type inside cells
   ============================================================ */
.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 4px;
}
.h-display {
  font-family: var(--display); font-weight: 800; line-height: 1.05;
  letter-spacing: -.02em; text-wrap: balance; color: var(--ink);
}
.eq { font-family: var(--mono); color: var(--ink-mute); font-weight: 500; }
.gold {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.serif-i { font-family: Georgia, serif; font-style: italic; font-weight: 500; }
.lede { font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.label-row {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 14px;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; border: 1px solid transparent;
  box-shadow: 0 8px 20px -10px rgba(118,75,162,.55);
  transition: transform .3s var(--ease, ease), box-shadow .3s, filter .3s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 30px -12px rgba(118,75,162,.6); }
.btn .arrow { transition: transform .3s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.ghost {
  background: #fff; color: var(--brand-2);
  border-color: var(--cell-border); box-shadow: var(--shadow-sm);
}
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--brand-1); color: var(--brand-2); }

/* ============================================================
   "BEFORE" — broken spreadsheet cells
   ============================================================ */
.file-tab {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft);
  padding: 7px 11px; border: 1px solid var(--cell-border); border-radius: 6px;
  background: #fff; white-space: nowrap;
}
.file-tab.warn { color: var(--warn); border-color: rgba(184,134,11,.3); background: var(--warn-soft); }
.file-tab .x   { color: var(--ink-mute); }
.cell-val { font-family: var(--mono); font-size: 14px; }
.err { color: var(--danger); font-weight: 600; }
.err-flag {
  position: absolute; top: 0; right: 0;
  border: 6px solid transparent; border-top-color: var(--danger); border-right-color: var(--danger);
}
.note-flag {
  position: absolute; top: 0; right: 0;
  border: 6px solid transparent; border-top-color: var(--warn); border-right-color: var(--warn);
}
.before-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.minicell {
  position: relative;
  border: 1px solid var(--cell-border); margin: -0.5px;
  padding: 16px 16px; min-height: 80px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  font-family: var(--mono); font-size: 13px;
  background: #fff;
}
.minicell .mc-ref { font-size: 10px; color: var(--ink-mute); opacity: .55; position: absolute; top: 6px; left: 9px; }
.minicell .mc-k   { color: var(--ink-soft); font-size: 12px; }
.minicell .mc-v   { color: var(--ink); }

/* ============================================================
   FEATURE / DATA cells
   ============================================================ */
.feat-ic {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-content: center;
  background: var(--brand-soft); color: var(--brand-2); margin-bottom: 16px;
}
.feat-ic svg { width: 22px; height: 22px; }
.feat-t { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 9px; color: var(--ink); }
.feat-d { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }

/* stat cells */
.stat-n {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 3.4vw, 46px); line-height: 1; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-l { font-size: 12.5px; color: var(--ink-soft); margin-top: 11px; line-height: 1.4; }
.sum-badge {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  margin-bottom: 6px; letter-spacing: .04em;
}

/* consolidated result cell */
.result-cell {
  background: linear-gradient(160deg, rgba(102,126,234,.08), rgba(118,75,162,.03));
  border-color: rgba(102,126,234,.25);
}
.seal {
  position: absolute; top: 14px; right: 14px;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 24px -10px rgba(118,75,162,.55), inset 0 1px 3px rgba(255,255,255,.35);
  transform: rotate(-8deg); border: 2px solid rgba(255,255,255,.45); z-index: 6;
}
.seal-d { font-family: Georgia, serif; font-weight: 700; font-size: 18px; color: #fff; line-height: 1; }
.seal-t { font-size: 6.5px; font-weight: 800; letter-spacing: .12em; color: #fff; margin-top: 1px; opacity: .9; }
.tick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); padding: 5px 0; }
.tick svg { width: 16px; height: 16px; color: var(--brand-2); flex: none; }

/* ============================================================
   BOTTOM CHROME
   ============================================================ */
.chrome-bottom {
  position: sticky; bottom: 0; z-index: 60;
  background: var(--chrome);
  border-top: 1px solid var(--cell-border);
  box-shadow: 0 -1px 3px rgba(15,23,42,.04);
}
.sheet-tabs {
  display: flex; align-items: stretch; height: 34px;
  border-bottom: 1px solid var(--cell-border);
  padding-left: 8px; overflow-x: auto; scrollbar-width: none;
  background: var(--chrome-alt);
}
.sheet-tabs::-webkit-scrollbar { display: none; }
.st-nav { display: grid; place-content: center; width: 26px; color: var(--ink-mute); font-size: 11px; border-right: 1px solid var(--cell-border); }
.stab {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 16px;
  font-size: 12.5px; color: var(--ink-mute); white-space: nowrap;
  border-right: 1px solid var(--cell-border); cursor: pointer;
  transition: color .2s, background .2s;
}
.stab:hover { color: var(--brand-2); background: #fff; }
.stab.active {
  color: var(--brand-2); background: #fff;
  border-top: 2px solid var(--brand-1); margin-top: -1px; font-weight: 600;
}
.stab .stab-dot { width: 7px; height: 7px; border-radius: 2px; background: currentColor; opacity: .6; }
.stab.active .stab-dot { background: var(--brand-1); opacity: 1; }
.st-add { display: grid; place-content: center; width: 30px; color: var(--ink-mute); font-size: 15px; }

.statusbar {
  height: var(--bottom-h);
  display: flex; align-items: center; gap: 20px;
  padding-inline: 16px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute);
  background: var(--chrome);
}
.statusbar .sb-ready { color: var(--success); }
.statusbar .sb-spacer { flex: 1; }
.statusbar .sb-agg { display: flex; gap: 18px; }
.statusbar .sb-agg b { color: var(--ink-soft); font-weight: 600; }
.statusbar .sb-zoom { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 720px) { .statusbar .sb-agg { display: none; } }

/* ============================================================
   reveal
   ============================================================ */
.reveal { transition: opacity .8s var(--ease, cubic-bezier(.22,1,.36,1)), transform .8s var(--ease, cubic-bezier(.22,1,.36,1)); }
.js-anim .reveal { opacity: 0; transform: translateY(16px); }
.js-anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-anim .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .content { grid-template-columns: repeat(2, 1fr); }
  .content .cell[style*="grid-column"] { grid-column: 1 / -1 !important; }
  .before-grid { grid-template-columns: 1fr; }
  .vlines { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   DEMO SECTIONS — interactive previews of product modules
   ============================================================ */

/* --- Tab switcher --- */
.demo-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--cell-border); margin-bottom: 1.2rem; flex-wrap: wrap; }
.demo-tab {
  padding: 0.55rem 1.2rem; font-size: 0.85rem; font-weight: 500;
  color: var(--ink-mute); cursor: pointer; border: none; background: transparent;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.demo-tab:hover { color: var(--ink); }
.demo-tab.active { color: var(--brand-2); border-bottom-color: var(--brand-1); }
.demo-tab .demo-tab-count {
  background: var(--cell-border); color: var(--ink-soft); padding: 1px 7px;
  border-radius: 10px; font-size: 0.72rem; font-weight: 600; margin-left: 0.35rem;
}
.demo-tab.active .demo-tab-count { background: var(--brand-1); color: #fff; }

/* --- Panel show/hide --- */
.demo-panel { display: none; }
.demo-panel.active { display: block; }

/* --- Module preview cards (voucher-type style) --- */
.demo-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.demo-card {
  padding: 1rem; border-radius: 10px; border: 2px solid var(--cell-border);
  background: var(--canvas); text-align: center; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.demo-card:hover { border-color: var(--brand-1); box-shadow: var(--shadow); }
.demo-card-icon { font-size: 1.75rem; color: var(--brand-2); margin-bottom: 0.5rem; }
.demo-card-title { font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.demo-card-desc { font-size: 0.7rem; color: var(--ink-mute); margin-top: 0.25rem; }

/* --- Stats cards grid --- */
.demo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.demo-stat-card {
  background: var(--canvas); border: 1px solid var(--cell-border); border-radius: 10px;
  padding: 1rem 1.25rem;
}
.demo-stat-label {
  font-size: 0.7rem; color: var(--ink-mute); text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 500; margin-bottom: 0.4rem;
}
.demo-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.demo-stat-value.success { color: var(--success); }
.demo-stat-value.warn { color: var(--warn); }
.demo-stat-value.danger { color: var(--danger); }
.demo-stat-value.brand { color: var(--brand-2); }

/* --- Compact stats strip (horizontal summary bar) --- */
.demo-stats-strip {
  display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center;
  background: var(--canvas); border: 1px solid var(--cell-border); border-radius: 8px;
  padding: 0.5rem 1.2rem; margin-bottom: 1rem; font-size: 0.82rem; color: var(--ink-mute);
}
.demo-stats-strip b { color: var(--ink); }

/* --- Mock table --- */
.demo-table-wrap {
  background: var(--canvas); border: 1px solid var(--cell-border);
  border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem;
}
.demo-table {
  width: 100%; border-collapse: collapse; font-size: 0.82rem; color: var(--ink);
}
.demo-table th, .demo-table td {
  padding: 0.55rem 0.75rem; border: 1px solid var(--cell-border);
  vertical-align: middle; white-space: nowrap;
}
.demo-table thead th {
  background: var(--brand-1); color: #fff; font-weight: 600; font-size: 0.75rem;
  border-color: var(--brand-2); text-align: center;
}
.demo-table tbody tr:nth-child(even) { background: var(--canvas-alt); }
.demo-table tbody tr:hover { background: var(--brand-soft); }
.demo-table td.amt { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.demo-table td.ctr { text-align: center; }
.demo-table tfoot td {
  font-weight: 700; background: #fef9c3 !important;
  border-top: 2px solid var(--brand-1);
}

/* Color-coded rows (reconciliation style) */
.demo-table tr.demo-row-matched td    { background: #f0fdf4 !important; }
.demo-table tr.demo-row-mismatch td   { background: #fffbeb !important; }
.demo-table tr.demo-row-books-only td { background: #fff7ed !important; }
.demo-table tr.demo-row-gst-only td   { background: #faf5ff !important; }
.demo-table tr.demo-row-pending td    { background: #eff6ff !important; }
.demo-table tr.demo-row-error td      { background: #fef2f2 !important; }

/* Hover states for color-coded rows */
.demo-table tr.demo-row-matched:hover td    { background: #dcfce7 !important; }
.demo-table tr.demo-row-mismatch:hover td   { background: #fef3c7 !important; }
.demo-table tr.demo-row-books-only:hover td { background: #ffedd5 !important; }
.demo-table tr.demo-row-gst-only:hover td   { background: #f3e8ff !important; }
.demo-table tr.demo-row-pending:hover td    { background: #dbeafe !important; }
.demo-table tr.demo-row-error:hover td      { background: #fecaca !important; }

/* --- Status pills --- */
.demo-pill {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 99px;
  font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}
.demo-pill-matched     { background: #dcfce7; color: #166534; }
.demo-pill-mismatch    { background: #fef3c7; color: #92400e; }
.demo-pill-pending     { background: #f1f5f9; color: #475569; }
.demo-pill-uploaded    { background: #dbeafe; color: #1e40af; }
.demo-pill-completed   { background: #d1fae5; color: #065f46; }
.demo-pill-error       { background: #fee2e2; color: #991b1b; }
.demo-pill-books-only  { background: #ffedd5; color: #9a3412; }
.demo-pill-gst-only    { background: #f3e8ff; color: #6b21a8; }
.demo-pill-processing  { background: #fef3c7; color: #92400e; }
.demo-pill-reconciled  { background: #fef3c7; color: #92400e; }
.demo-pill-archived    { background: #e5e7eb; color: #374151; }
.demo-pill-draft       { background: #f1f5f9; color: #475569; }

/* --- Ageing-style numeric table --- */
.demo-table td.demo-num {
  text-align: right; font-variant-numeric: tabular-nums;
  font-family: var(--mono); font-weight: 600;
}
.demo-table .demo-row-sub td { font-weight: 700; background: var(--chrome-alt) !important; border-top: 2px solid var(--cell-border); }
.demo-table td.demo-zero { text-align: center; color: var(--ink-mute); }

/* --- Caption strip above each demo panel --- */
.demo-cap {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: var(--brand-soft); border: 1px solid var(--cell-border);
  border-left: 3px solid var(--brand-1); border-radius: 8px;
  padding: 0.7rem 0.95rem; margin-bottom: 1.1rem;
  font-size: 0.82rem; line-height: 1.45; color: var(--ink-soft);
}
.demo-cap i { color: var(--brand-2); font-size: 1.15rem; line-height: 1.2; flex-shrink: 0; }
.demo-cap b { color: var(--ink); }
.demo-tab i { font-size: 0.95rem; vertical-align: -1px; }
