/* ════════════════════════════════════════════════════════════════════════════
   LedgerAI, Sage Companion design system.
   Consolidated tokens + components for the /close customer experience.

   Source design files: design/Lederai chat design files/
     00 loading                  → close_first_run.html
     01 close queue              → close_queue.html
     02 home canonical           → close_home.html (steady state)
     03 home all-clear           → close_home.html (state == all_clear)
     04 home partial-data        → close_home.html (state == partial_data)
     05 home first-run           → close_first_run.html
     06–09 queue card variants   → close_queue.html (per-kind decision cards)
     10 accountant read-only     → close_share.html
     11 full P&L                 → close_financials.html
     12 vendor ledger            → close_vendor_ledger.html

   Every template extends close_base.html which loads this stylesheet
   with a ?v={CLOSE_ASSET_VERSION} cache-bust query string set in
   server.py.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Cream / surface */
  --cream:        #F2EDDF;
  --cream-2:      #EBE5D2;
  --cream-3:      #E2DAC2;
  --paper:        #FFFFFF;
  --rule:         #E0D9C5;
  --rule-soft:    #EAE4D3;
  /* Ink */
  --ink:          #28281E;
  --ink-soft:     #3D3D30;
  --body:         #565649;
  --muted:        #807E70;
  --muted-2:      #9A9888;
  /* Primary, forest sage */
  --clay:         #4F6B45;
  --clay-soft:    #DEE8D7;
  --clay-line:    rgba(79,107,69,0.20);
  --clay-deep:    #354A2F;
  /* Secondary, warm honey */
  --sage:         #B58940;
  --sage-soft:    #F2E5C9;
  --warning:      #B45309;
  --positive:     #4F7A4A;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--body);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 16.5px; line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(ellipse 1100px 600px at 80% -10%, rgba(79,107,69,0.07), transparent 60%),
    radial-gradient(ellipse 700px 500px at 0% 100%, rgba(181,137,64,0.05), transparent 70%),
    var(--cream);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }

/* ── TOP BAR ──────────────────────────────────────────────────────────────── */
.topbar { padding: 18px 0; }
.topbar-inner {
  max-width: 760px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 600;
  font-size: 17px; letter-spacing: -0.012em;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--clay);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cream);
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 17px; line-height: 1;
}
.switcher {
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 7px 13px;
  border-radius: 100px;
  transition: border-color 140ms, color 140ms;
}
.switcher:hover { border-color: var(--clay-line); color: var(--ink); }
.switcher .avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
}

/* ── CUSTOMER PILL DROPDOWN ─────────────────────────────────────────────────
   Click-toggled menu anchored to the customer pill. Holds the utility
   routes (Settings / Billing / Import / QuickBooks) plus Sign out so
   the top nav stays focused on Home / Monthly Review / Reports. The
   trigger reuses the .switcher pill styling; pressing it adds a quiet
   active border + caret rotation. */
.customer-menu {
  position: relative;
  display: inline-block;
}
.customer-menu-trigger {
  /* Inherits .switcher visuals; <button> resets so it reads like a link. */
  background: var(--paper);
  border: 1px solid var(--rule);
  cursor: pointer;
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 140ms, color 140ms, background 140ms;
}
.customer-menu-trigger:hover { border-color: var(--clay-line); color: var(--ink); }
.customer-menu-trigger.is-active {
  border-color: var(--clay-line);
  background: var(--cream-2);
  color: var(--clay-deep);
}
.customer-menu.is-open .customer-menu-trigger {
  border-color: var(--clay-line);
  background: var(--cream-2);
  color: var(--ink);
}
.customer-menu-name {
  /* Stops a long business name from pushing the caret off-screen. */
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-menu-caret {
  font-size: 10px;
  line-height: 1;
  margin-left: 2px;
  transition: transform 140ms;
  color: var(--muted);
}
.customer-menu.is-open .customer-menu-caret {
  transform: rotate(180deg);
}

.customer-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 4px 18px -8px rgba(20, 20, 30, 0.12),
              0 8px 28px -16px rgba(20, 20, 30, 0.10);
  padding: 6px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.customer-menu-item {
  display: block;
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.customer-menu-item:hover {
  background: var(--sage-soft);
  color: var(--ink);
}
.customer-menu-item.is-active {
  background: var(--cream-2);
  color: var(--clay-deep);
}
.customer-menu-item-signout {
  color: var(--muted);
}
.customer-menu-item-signout:hover {
  background: var(--clay-soft);
  color: var(--clay-deep);
}
.customer-menu-divider {
  height: 1px;
  background: var(--rule);
  margin: 4px 6px;
}

/* When the customer name's parent collapses (very narrow viewports),
   hide the business name and keep the avatar + caret so the trigger
   remains tappable without a row break. */
@media (max-width: 640px) {
  .customer-menu-name { display: none; }
}

/* ── PAGE FRAME ───────────────────────────────────────────────────────────── */
main {
  max-width: 760px; margin: 0 auto;
  padding: 28px 24px 96px;
}
main.queue-main { max-width: 720px; padding: 48px 24px 96px; }

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero { padding: 32px 0 36px; }
.greeting {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--clay-soft);
  border: 1px solid var(--clay-line);
  border-radius: 100px;
  padding: 6px 14px 6px 8px;
  font-size: 13px; color: var(--clay-deep);
  font-weight: 500;
  margin-bottom: 22px;
}
.greeting .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(79,107,69,0.18);
}
.greeting .serif { color: var(--clay-deep); font-size: 14px; }
.hero-headline {
  font-size: 48px; line-height: 1.04;
  letter-spacing: -0.030em;
  font-weight: 500; color: var(--ink);
  margin: 0 0 18px;
}
.hero-headline .serif { font-size: 52px; color: var(--clay); letter-spacing: -0.020em; }
.hero-deck {
  font-size: 18px; line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 540px;
}
.hero-deck .serif { color: var(--clay-deep); font-size: 19px; }
.basis-chip {
  display: inline-block;
  font-size: 13px; color: var(--muted);
  background: var(--cream-2);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 6px 14px;
  margin: 0 0 26px;
}
.basis-chip .serif { color: var(--ink-soft); font-size: 13.5px; margin-left: 4px; }

/* YTD trio */
.ytd-trio {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.ytd-pill {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 18px 20px;
  transition: border-color 140ms, transform 140ms;
}
.ytd-pill:hover { border-color: var(--clay-line); transform: translateY(-1px); }
.ytd-pill .l {
  font-size: 12.5px; color: var(--muted);
  margin-bottom: 6px;
  display: inline-flex; align-items: center; gap: 6px;
}
.ytd-pill .l .ic {
  width: 16px; height: 16px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
}
.ytd-pill .l .ic.in   { background: var(--clay-soft); color: var(--clay-deep); }
.ytd-pill .l .ic.out  { background: var(--sage-soft); color: var(--sage); }
.ytd-pill .l .ic.net  { background: var(--clay); color: var(--cream); }
.ytd-pill .v {
  font-size: 26px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.020em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ytd-pill .yoy {
  margin-top: 8px;
  font-size: 12.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 4px;
}
.ytd-pill .yoy .delta { color: var(--positive); font-weight: 600; font-variant-numeric: tabular-nums; }
.ytd-pill .yoy.basis-yoy { color: var(--ink-soft); font-style: italic; font-family: 'Instrument Serif', serif; font-size: 13px; }
.ytd-pill.net { background: linear-gradient(180deg, #ECF0E2, #F4F0DF); border-color: var(--clay-line); }
.ytd-pill.net .v { color: var(--clay-deep); }
.ytd-pill.ghost .v { color: var(--muted-2); letter-spacing: 0.04em; }
.ytd-pill.ghost .yoy { color: var(--muted-2); font-style: italic; font-family: 'Instrument Serif', serif; }

/* Year trend strip */
.trend {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 18px 20px 16px;
}
.trend-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; font-size: 12.5px;
}
.trend-head-l {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 11px; font-weight: 500;
}
.trend-head-r { color: var(--muted); }
.trend-head-r .v { color: var(--ink); font-weight: 600; }
.trend-bars {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 4px; height: 80px; align-items: flex-end;
}
.bar { width: 100%; transition: background 140ms; }
.bar.past    { background: var(--clay-soft); border-radius: 4px 4px 2px 2px; }
.bar.current { background: var(--clay); border-radius: 4px 4px 2px 2px; box-shadow: 0 0 0 2px rgba(79,107,69,0.10); }
.bar.future  { background: transparent; border: 1px dashed var(--rule); border-radius: 4px; }
.trend-labels {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 4px; margin-top: 10px;
  font-size: 10.5px; color: var(--muted-2);
  text-align: center;
}
.trend-labels span.current { color: var(--clay-deep); font-weight: 600; }

/* Honest "coming next" inline tile (replaces YTD/trend/PL when no data) */
.coming-next {
  background: var(--paper);
  border: 1px dashed var(--rule);
  border-radius: 18px;
  padding: 26px 28px;
  font-size: 14.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.coming-next .serif {
  display: block; color: var(--clay-deep);
  font-size: 17px; margin-bottom: 4px;
}
.coming-next .ink { color: var(--ink-soft); }

/* ── PROCESSING STAGES (first-run) ────────────────────────────────────────── */
.processing {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 18px 22px;
}
.processing-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.processing-head-l {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.10em;
  font-weight: 500;
}
.processing-head-r {
  font-size: 12px; color: var(--clay-deep); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(79,107,69,0.18);
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.processing-stages { display: flex; flex-direction: column; gap: 10px; }
.proc-stage {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--muted);
}
.proc-stage-mark {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted-2);
  flex-shrink: 0;
}
.proc-stage.done .proc-stage-mark { background: var(--clay); border-color: var(--clay); color: var(--cream); }
.proc-stage.done .proc-stage-name { color: var(--ink-soft); }
.proc-stage.active .proc-stage-mark { background: var(--clay-soft); border-color: var(--clay-line); position: relative; }
.proc-stage.active .proc-stage-mark::after {
  content: ''; position: absolute;
  width: 8px; height: 8px;
  background: var(--clay); border-radius: 50%;
  animation: pulseDot 1.6s ease-in-out infinite;
}
.proc-stage.active .proc-stage-name { color: var(--ink); font-weight: 500; }

/* ── SECTION ──────────────────────────────────────────────────────────────── */
section { margin-top: 56px; }
.section-head {
  margin-bottom: 18px;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.section-title {
  font-size: 14.5px; font-weight: 500;
  color: var(--clay-deep);
  margin: 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; width: 6px; height: 6px;
  background: var(--clay); border-radius: 50%;
}
.section-title .serif { color: var(--clay-deep); font-size: 17px; margin-left: -1px; }
.section-meta { font-size: 13.5px; color: var(--muted); }
.section-meta a { color: var(--clay-deep); font-weight: 500; border-bottom: 1px solid var(--clay-line); }

/* ── MONTH CARD ───────────────────────────────────────────────────────────── */
.month-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 26px 28px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 28px; align-items: center;
}
.month-card-closed   { background: linear-gradient(180deg, #ECF0E2, #F4F0DF); border-color: var(--clay-line); }
.month-card-preparing { background: var(--cream-2); }
.month-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500;
  color: var(--positive);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 10px;
}
.month-status::before {
  content: ''; width: 7px; height: 7px;
  background: var(--positive); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(79,122,74,0.18);
}
.month-status.closed-status { color: var(--clay-deep); }
.month-status.closed-status::before { background: var(--clay-deep); box-shadow: 0 0 0 3px rgba(53,74,47,0.18); }
.month-status.processing-status { color: var(--clay-deep); }
.month-status.processing-status::before { display: none; }
.month-headline {
  font-size: 24px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.018em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.month-headline .serif { color: var(--clay-deep); font-size: 26px; }
.month-money {
  font-size: 14.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.month-money .v   { color: var(--ink); font-weight: 600; }
.month-money .sep { color: var(--muted-2); margin: 0 6px; }
.month-decisions { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.month-decisions .num   { font-weight: 600; color: var(--ink); }
.month-decisions .serif { color: var(--clay-deep); font-size: 15px; margin-right: 2px; }
.month-card-r { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--clay); color: var(--cream);
  border: none;
  padding: 13px 22px;
  border-radius: 100px;
  font-family: 'Onest', sans-serif;
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 8px 24px -10px rgba(79,107,69,0.55),
    0 2px 8px -2px rgba(79,107,69,0.20);
  transition: transform 140ms, filter 140ms, box-shadow 140ms;
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary[disabled],
.btn-primary.btn-disabled {
  background: var(--cream-2); color: var(--muted);
  box-shadow: none; cursor: wait; transform: none; filter: none;
}
.btn-quiet {
  color: var(--ink); font-size: 14px; font-weight: 500;
  padding: 8px 4px; cursor: pointer;
  text-align: center; text-decoration: none;
  transition: color 140ms;
}
.btn-quiet:hover { color: var(--clay); }
.btn-secondary {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule);
  padding: 11px 18px;
  border-radius: 100px;
  font-family: 'Onest', sans-serif;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color 140ms, color 140ms, transform 140ms;
}
.btn-secondary:hover { border-color: var(--clay); color: var(--clay-deep); transform: translateY(-1px); }
.btn-secondary[disabled],
.btn-secondary.btn-disabled {
  opacity: 0.55; cursor: not-allowed; transform: none;
}
.btn-secondary .ic { color: var(--clay); font-size: 12px; }
.btn-tertiary {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule);
  padding: 13px 22px;
  border-radius: 100px;
  font-family: 'Onest', sans-serif;
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  transition: border-color 140ms, color 140ms, transform 140ms;
}
.btn-tertiary:hover { border-color: var(--warning); color: var(--warning); transform: translateY(-1px); }

/* ── P&L TABLE ────────────────────────────────────────────────────────────── */
.pl-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}
.pl-table { width: 100%; border-collapse: collapse; }
.pl-table thead th {
  text-align: right;
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.10em;
  font-weight: 500;
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--rule);
}
.pl-table thead th:first-child {
  text-align: left;
  color: var(--clay-deep);
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-weight: 400; font-size: 14px;
  text-transform: none; letter-spacing: 0;
}
.pl-table tbody tr td {
  padding: 11px 20px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--rule-soft);
}
.pl-table tbody tr:last-child td { border-bottom: none; }
.pl-table tbody tr td:first-child { color: var(--ink-soft); }
.pl-table tbody tr td.num   { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.pl-table tbody tr td.delta { text-align: right; color: var(--positive); font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-table tbody tr td.delta.neg { color: var(--warning); }
.pl-table tbody tr.subtotal td {
  background: var(--cream-2);
  font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.pl-table tbody tr.total td {
  background: linear-gradient(180deg, #ECF0E2, #F4F0DF);
  font-weight: 600; color: var(--clay-deep);
  border-top: 1px solid var(--clay-line);
  padding-top: 14px; padding-bottom: 14px;
}
.pl-table tbody tr.total td:first-child { font-size: 15.5px; }
.pl-table tbody tr.total td.num,
.pl-table tbody tr.total td.delta { color: var(--clay-deep); font-size: 15px; }
/* P&L "preparing / coming next" overlay */
.pl-card.pl-empty { padding: 48px 32px; text-align: center; border-style: dashed; }
.pl-card.pl-empty .pl-empty-text {
  max-width: 440px; margin: 0 auto;
  font-size: 14.5px; color: var(--muted); line-height: 1.6;
}
.pl-card.pl-empty .pl-empty-text .serif {
  display: block; color: var(--clay-deep);
  font-size: 18px; margin-bottom: 6px;
}
.pl-card.pl-empty .pl-empty-text .ink { color: var(--ink-soft); }

/* ── REPORTS LIST ─────────────────────────────────────────────────────────── */
.reports { display: flex; flex-direction: column; gap: 8px; }
.report {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 16px 20px;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 16px; align-items: center;
  transition: border-color 140ms, transform 140ms;
}
.report:hover { border-color: var(--clay-line); transform: translateY(-1px); }
.report.report-coming-later { background: var(--cream-2); }
.report.report-coming-later:hover { transform: none; border-color: var(--rule); }
.report-tag {
  background: var(--cream-2);
  border: 1px solid var(--rule);
  color: var(--clay-deep);
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.report-body { min-width: 0; }
.report-name {
  font-size: 15.5px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.008em;
  margin: 0;
}
.report.report-coming-later .report-name { color: var(--ink-soft); }
.report-meta {
  font-size: 13px; color: var(--muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.report-actions {
  display: flex; align-items: center; gap: 4px;
  color: var(--muted-2);
}
.report-action {
  color: var(--clay-deep);
  font-size: 13.5px; font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.report-action:hover { background: var(--cream-2); color: var(--ink); }
.report-action.report-coming,
.report-action.report-preparing {
  color: var(--muted); cursor: default;
  font-style: italic; font-family: 'Instrument Serif', serif;
}
.report-action.report-coming:hover,
.report-action.report-preparing:hover { background: transparent; color: var(--muted); }
.report-actions .sep { color: var(--rule); font-size: 14px; }

/* ── BRIEFING CARD ────────────────────────────────────────────────────────── */
.briefing-card {
  background: linear-gradient(180deg, var(--cream-2), var(--paper));
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 30px 34px;
  position: relative;
}
.briefing-quote {
  position: absolute;
  top: 14px; left: 24px;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 60px; color: var(--clay);
  line-height: 1; opacity: 0.35;
}
.briefing-card p {
  margin: 0; padding-left: 30px;
  font-size: 18px; line-height: 1.6; color: var(--ink-soft);
}
.briefing-card p .num { font-weight: 600; color: var(--ink); }
.briefing-card p .muted { color: var(--muted); }
.briefing-sig {
  margin-top: 18px; padding-left: 30px;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 15px; color: var(--clay-deep);
}

/* What moved (briefing observations) */
.observations-list { display: flex; flex-direction: column; gap: 8px; }
.observation-row {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 14px 18px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 14px; align-items: baseline;
}
.observation-name { font-size: 14.5px; color: var(--ink); font-weight: 500; }
.observation-detail { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.observation-amount {
  font-size: 13.5px; color: var(--ink-soft); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.observation-amount.up   { color: var(--warning); }
.observation-amount.down { color: var(--positive); }

/* ── KEPT OFF ─────────────────────────────────────────────────────────────── */
.kept-card {
  background: var(--cream-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.kept-text { font-size: 14.5px; color: var(--ink-soft); }
.kept-text .num   { font-weight: 600; color: var(--ink); }
.kept-text .muted { color: var(--muted); }
.kept-link {
  color: var(--clay-deep); font-weight: 500; font-size: 13.5px;
  border-bottom: 1px solid var(--clay-line);
  padding-bottom: 1px;
}

/* ── HANDOFF ──────────────────────────────────────────────────────────────── */
.handoff-card {
  background: linear-gradient(135deg, #ECF0E2 0%, #DDE8D7 100%);
  border: 1px solid var(--clay-line);
  border-radius: 24px;
  padding: 30px 32px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 12px 32px -16px rgba(79,107,69,0.20);
}
.handoff-text h3 {
  margin: 0 0 6px;
  font-size: 22px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.015em;
}
.handoff-text h3 .serif { font-weight: 400; color: var(--clay-deep); font-size: 24px; }
.handoff-text p {
  margin: 0; font-size: 14.5px;
  color: var(--ink-soft); line-height: 1.5;
  max-width: 420px;
}
.package-list {
  margin: 22px 0 24px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(79,107,69,0.18);
  border-radius: 14px;
}
.package-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.package-list ul {
  margin: 0; padding: 0;
  list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
}
.package-list li {
  font-size: 13.5px; color: var(--ink-soft);
  padding: 4px 0 4px 18px;
  position: relative;
  display: flex; align-items: baseline; gap: 6px;
}
.package-list li::before {
  content: '✓';
  position: absolute; left: 0; top: 4px;
  color: var(--clay); font-weight: 600; font-size: 11px;
}
.package-list li.coming-later { color: var(--muted); }
.package-list li.coming-later::before { content: '·'; color: var(--muted-2); font-size: 16px; top: 3px; }
.package-list li .tag-coming {
  font-style: italic; font-family: 'Instrument Serif', serif;
  color: var(--muted-2); font-size: 12.5px;
}
.handoff-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.footer-meta { font-size: 13px; color: var(--muted); line-height: 1.6; font-variant-numeric: tabular-nums; }
.footer-meta .ok::before {
  content: '●'; color: var(--positive);
  font-size: 8px; margin-right: 6px; vertical-align: 2px;
}
.footer-sig {
  margin-top: 14px;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 14px; color: var(--muted);
}

/* ════════════════════════════════════════════════════════════════════════════
   QUEUE, sticky 3-row header + decision card + receipt
   ════════════════════════════════════════════════════════════════════════════ */

.queue-header {
  background: rgba(242,237,223,0.86);
  backdrop-filter: blur(10px) saturate(140%);
  position: sticky; top: 0; z-index: 5;
}
.queue-header-inner { max-width: 720px; margin: 0 auto; padding: 14px 24px 0; }
.qh-row-1 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-bottom: 12px;
}
.qh-id {
  color: var(--ink); font-weight: 500;
  font-size: 16px; letter-spacing: -0.012em;
  display: inline-flex; align-items: baseline; gap: 8px;
}
.qh-id .dot   { color: var(--muted-2); }
.qh-id .serif { color: var(--clay-deep); font-size: 16px; }
.qh-progress-text { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qh-exit { font-size: 13.5px; color: var(--muted); transition: color 140ms; text-decoration: none; }
.qh-exit:hover { color: var(--ink); }
.qh-divider { height: 1px; background: var(--rule-soft); }
.qh-row-2 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 11px 0;
}
.stat-chips { display: flex; gap: 8px; flex-wrap: nowrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 5px 12px 5px 10px;
  transition: border-color 140ms, background 140ms;
}
.chip:hover { border-color: var(--clay-line); background: rgba(255,255,255,0.45); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.chip-dot.confirmed    { background: var(--positive); }
.chip-dot.reclassified { background: var(--sage); }
.chip-dot.flagged      { background: var(--warning); }
.chip-label {
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.10em;
}
.chip-count { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.briefing-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500;
  color: var(--clay-deep);
  text-decoration: none;
  transition: color 140ms;
  white-space: nowrap;
}
.briefing-link:hover { color: var(--ink); }
.briefing-link .chev { font-size: 14px; line-height: 1; transform: translateY(-1px); }
.qh-row-3 {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 9px 0 13px;
  border-top: 1px solid var(--rule-soft);
  font-size: 12.5px; margin-top: -1px;
}
.ytd-crumb {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.ytd-crumb .ytd-num   { color: var(--ink); font-weight: 600; margin: 0 1px; }
.ytd-crumb .ytd-delta { color: var(--positive); font-weight: 600; }
.ytd-crumb .ytd-sep   { color: var(--muted-2); margin: 0 6px; }
.ytd-home {
  color: var(--clay-deep); font-weight: 500;
  text-decoration: none;
  transition: color 140ms;
}
.ytd-home:hover { color: var(--ink); }
.progress-track { height: 2px; background: var(--rule-soft); position: relative; }
.progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0; background: var(--clay);
  transition: width 240ms ease;
}

/* Decision card */
.decision-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 12px 32px -16px rgba(79,107,69,0.10);
}
.vendor-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.vendor-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--cream-2);
  color: var(--ink-soft);
}
.vendor-mark.warn  { background: var(--clay-soft); color: var(--clay-deep); }
.vendor-mark.watch { background: var(--sage-soft); color: var(--sage); }
.vendor-mark.muted { background: var(--cream-2); color: var(--muted); }
.type-label { font-size: 13px; color: var(--muted); line-height: 1.3; }
.type-label .strong { color: var(--ink-soft); font-weight: 500; }
.question {
  font-family: 'Onest', sans-serif;
  font-size: 28px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.018em; line-height: 1.22;
  margin: 0 0 18px;
}
.question .serif { color: var(--clay-deep); font-size: 30px; margin: 0 1px; }
.context {
  font-size: 14.5px; color: var(--muted);
  line-height: 1.5; font-variant-numeric: tabular-nums;
}
.context .v   { color: var(--ink); font-weight: 500; }
.context .sep { color: var(--muted-2); margin: 0 4px; }
.our-read {
  margin-top: 26px;
  background: var(--cream-2);
  border-radius: 14px;
  border-left: 3px solid var(--clay-line);
  padding: 18px 22px;
}
.our-read-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--clay-deep);
  margin-bottom: 8px;
}
.our-read-body {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 17.5px; line-height: 1.5;
  color: var(--ink-soft); margin: 0;
}
.our-read-body .v { font-style: normal; font-family: 'Onest', sans-serif; color: var(--ink); font-weight: 600; }
.actions {
  margin-top: 32px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.actions button.btn,
.actions a.btn {
  padding: 13px 22px;
  border-radius: 100px;
  font-family: 'Onest', sans-serif;
  font-size: 14.5px; font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 140ms;
}
.actions .btn-primary { background: var(--clay); color: var(--cream); border-color: var(--clay); }
.actions .btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.actions .btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--rule); padding: 13px 22px; font-size: 14.5px; }
.actions .btn-tertiary  { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.skip-link {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  display: inline-block;
  transition: color 140ms;
  background: none; border: none;
  padding: 6px 0;
  font-family: 'Onest', sans-serif;
}
.skip-link:hover { color: var(--ink-soft); }

/* End-of-close receipt */
.receipt-wrap { display: flex; justify-content: center; margin-top: 36px; }
.receipt {
  max-width: 600px; width: 100%;
  background: linear-gradient(180deg, #ECF0E2, #F4F0DF);
  border: 1px solid var(--clay-line);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 24px 48px -24px rgba(79,107,69,0.20);
}
.receipt-mark {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 14px; color: var(--clay);
  letter-spacing: 0.10em;
  margin-bottom: 14px;
  text-transform: lowercase;
}
.receipt-headline {
  font-family: 'Onest', sans-serif;
  font-size: 44px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.022em; line-height: 1.1;
  margin: 0;
}
.receipt-headline .serif {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-weight: 400; font-size: 46px;
  color: var(--clay-deep);
}
.receipt-rule { width: 64px; height: 1px; background: var(--clay-line); margin: 28px auto 24px; border: none; }
.receipt-stat {
  font-size: 19px; font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 0 0 6px;
}
.receipt-substats { font-size: 14.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.receipt-substats .v { color: var(--ink); font-weight: 500; }
.receipt-timestamp {
  margin-top: 24px;
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 13px; color: var(--muted-2);
}
.receipt-actions {
  margin-top: 28px;
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
}
.receipt-quiet {
  color: var(--muted); font-size: 14px; font-weight: 500;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: color 140ms, border-color 140ms;
}
.receipt-quiet:hover { color: var(--ink); border-color: var(--clay-line); }

/* ════════════════════════════════════════════════════════════════════════════
   ACCOUNTANT READ-ONLY (share view)
   ════════════════════════════════════════════════════════════════════════════ */

.ro-banner {
  position: sticky; top: 0; z-index: 20;
  background: rgba(242,237,223,0.92);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.ro-banner-inner {
  max-width: 760px; margin: 0 auto;
  padding: 13px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; font-size: 13px;
}
.ro-banner-l { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.ro-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--clay-soft);
  border: 1px solid var(--clay-line);
  border-radius: 100px;
  padding: 4px 11px 4px 9px;
  font-size: 11.5px; font-weight: 500;
  color: var(--clay-deep);
  letter-spacing: 0.02em;
}
.ro-pill .lock {
  width: 12px; height: 12px;
  border: 1.5px solid var(--clay-deep);
  border-radius: 3px;
  position: relative;
}
.ro-pill .lock::before {
  content: ''; position: absolute;
  width: 6px; height: 4px;
  border: 1.5px solid var(--clay-deep);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  left: 1.5px; top: -4px;
}
.ro-banner-shared { color: var(--muted); font-size: 12.5px; }
.ro-banner-shared .v { color: var(--ink-soft); font-weight: 500; }
.ro-banner-r { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ro-banner-r .v { color: var(--ink); font-weight: 500; }

/* Cover letter */
.cover {
  background: linear-gradient(180deg, var(--cream-2), var(--paper));
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 36px 38px;
  margin-bottom: 24px;
}
.cover-eyebrow {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 500; margin-bottom: 12px;
}
.cover-headline {
  font-family: 'Onest', sans-serif;
  font-size: 36px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.025em; line-height: 1.08;
  margin: 0 0 20px;
}
.cover-headline .serif { color: var(--clay-deep); font-size: 38px; }
.cover-from {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.cover-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--sage-soft); color: var(--sage);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 18px; line-height: 1;
  flex-shrink: 0;
}
.cover-from-text { font-size: 14px; color: var(--ink-soft); line-height: 1.4; }
.cover-from-text .name { color: var(--ink); font-weight: 600; }
.cover-from-text .meta { color: var(--muted); font-size: 12.5px; }
.cover-note {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 17px; color: var(--ink-soft);
  line-height: 1.55;
  padding: 18px 0 4px;
  border-top: 1px solid var(--rule-soft);
}

/* Package files (accountant) */
.files { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 16px 20px;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 16px; align-items: center;
  transition: border-color 140ms, transform 140ms;
}
.file-row:hover { border-color: var(--clay-line); transform: translateY(-1px); }
.file-row.coming-later { background: var(--cream-2); }
.file-row.coming-later:hover { transform: none; border-color: var(--rule); }
.file-tag {
  background: var(--cream-2);
  border: 1px solid var(--rule);
  color: var(--clay-deep);
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.file-body { min-width: 0; }
.file-name {
  font-size: 15.5px; font-weight: 500;
  color: var(--ink);
  margin: 0; letter-spacing: -0.008em;
}
.file-row.coming-later .file-name { color: var(--ink-soft); }
.file-meta {
  font-size: 12.5px; color: var(--muted);
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.file-actions { display: flex; align-items: center; gap: 4px; }
.file-action {
  color: var(--clay-deep);
  font-size: 13.5px; font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.file-action:hover { background: var(--cream-2); color: var(--ink); }
.file-action.coming {
  color: var(--muted); cursor: default;
  font-style: italic; font-family: 'Instrument Serif', serif;
}
.file-action.coming:hover { background: transparent; color: var(--muted); }
.file-actions .sep { color: var(--rule); font-size: 14px; }

/* Decisions log (accountant) */
.decisions-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
}
.decision-row {
  display: grid; grid-template-columns: 70px 1fr auto auto;
  gap: 14px; align-items: baseline;
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}
.decision-row:last-child { border-bottom: none; }
.decision-row .date { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.decision-row .what { color: var(--ink-soft); }
.decision-row .what .v { color: var(--ink); font-weight: 500; }
.decision-row .outcome {
  font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.10em;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
}
.decision-row .outcome.confirmed    { background: var(--clay-soft); color: var(--clay-deep); }
.decision-row .outcome.reclassified { background: var(--sage-soft); color: var(--sage); }
.decision-row .outcome.flagged      { background: rgba(180,83,9,0.10); color: var(--warning); }
.decision-row .amt {
  font-size: 13.5px; color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  main           { padding: 16px 18px 64px; }
  main.queue-main{ padding: 32px 18px 64px; }
  .hero { padding: 18px 0 26px; }
  .hero-headline { font-size: 36px; }
  .hero-headline .serif { font-size: 38px; }
  .hero-deck { font-size: 16.5px; }
  .ytd-trio { grid-template-columns: 1fr; gap: 8px; }
  .ytd-pill .v { font-size: 22px; }
  .trend { padding: 16px 16px 14px; }
  .trend-bars { height: 64px; }
  .trend-labels { font-size: 9.5px; }
  .month-card { grid-template-columns: 1fr; gap: 18px; padding: 22px 22px; }
  .month-headline { font-size: 22px; }
  .pl-table thead th { font-size: 10px; padding: 14px 12px 8px; }
  .pl-table tbody tr td { font-size: 13.5px; padding: 9px 12px; }
  .report { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
  .report-actions { justify-content: flex-start; }
  .briefing-card { padding: 24px 22px; }
  .briefing-card p { font-size: 16.5px; padding-left: 24px; }
  .briefing-quote { font-size: 50px; left: 16px; top: 12px; }
  .briefing-sig { padding-left: 24px; }
  .handoff-card { padding: 24px 22px; }
  .package-list ul { grid-template-columns: 1fr; }
  .queue-header-inner { padding: 12px 18px 0; }
  .qh-id { font-size: 14.5px; }
  .qh-id .serif { font-size: 14.5px; }
  .qh-progress-text { display: none; }
  .qh-row-2 { flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px 0; }
  .qh-row-3 { flex-direction: column; align-items: flex-start; gap: 6px; padding: 9px 0 11px; font-size: 12px; }
  .stat-chips { width: 100%; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .stat-chips::-webkit-scrollbar { display: none; }
  .decision-card { padding: 26px 22px; border-radius: 20px; }
  .vendor-row { margin-bottom: 18px; }
  .vendor-mark { width: 40px; height: 40px; font-size: 20px; }
  .question { font-size: 22px; }
  .question .serif { font-size: 24px; }
  .our-read { padding: 16px 18px; }
  .our-read-body { font-size: 16px; }
  .receipt { padding: 40px 26px; border-radius: 20px; }
  .receipt-headline { font-size: 32px; }
  .receipt-headline .serif { font-size: 34px; }
  .ro-banner-inner { padding: 11px 18px; flex-wrap: wrap; gap: 8px; }
  .ro-banner-shared { display: none; }
  .cover { padding: 26px 22px; }
  .cover-headline { font-size: 26px; }
  .cover-headline .serif { font-size: 28px; }
  .file-row { grid-template-columns: 1fr; gap: 8px; }
  .decision-row { grid-template-columns: 60px 1fr auto; gap: 10px; padding: 12px 16px; }
  .decision-row .amt { display: none; }
}
