/* ============================================================================
   SHERPA Procurement Portal — design system
   Brand-aligned with ffesherpa.pro (see docs/DESIGN_SYSTEM.md). Light "reading"
   surface + dark chrome, brass accent, serif display / grotesk body / mono
   labels. Views use these shared classes; brand values live in :root only.
   ========================================================================== */

/* ---- Self-hosted brand fonts (latin subset from Google Fonts, OFL/Apache).
        Regenerate via scratchpad/parse_fonts.php. CSP: font-src falls back to
        'self', so no header change is needed. ---- */
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:400;font-display:swap;src:url('/assets/fonts/cormorant-garamond-italic.woff2') format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:500;font-display:swap;src:url('/assets/fonts/cormorant-garamond-italic.woff2') format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/cormorant-garamond.woff2') format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/cormorant-garamond.woff2') format('woff2');}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/cormorant-garamond.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/ibm-plex-mono-400.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2');}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:300;font-display:swap;src:url('/assets/fonts/space-grotesk.woff2') format('woff2');}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/space-grotesk.woff2') format('woff2');}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/space-grotesk.woff2') format('woff2');}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/space-grotesk.woff2') format('woff2');}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/space-grotesk.woff2') format('woff2');}
@font-face{font-family:'Tenor Sans';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/tenor-sans-400.woff2') format('woff2');}

/* ============================ 1. DESIGN TOKENS ============================ */
:root {
  /* Surfaces */
  --bg:        #efe9de;   /* warm cream page ground */
  --surface:   #fbfaf6;   /* cards / panels */
  --surface-2: #ffffff;   /* elevated / inputs */
  --chrome:    #0c0e10;   /* dark topbar + footer */
  --chrome-2:  #141a1f;   /* dark elevated (drawer/menus) */

  /* Ink */
  --ink:       #1b1e21;   /* primary text on cream */
  --ink-soft:  #3b4046;
  --muted:     #6c7176;   /* secondary text */
  --chrome-ink:#f4f0e7;   /* text on dark chrome */
  --chrome-dim:rgba(244,240,231,.52);

  /* Brass accent (brand) */
  --brass:     #b8916a;
  --brass-hi:  #cca97e;
  --brass-deep:#8c6743;   /* accessible brass for text/links on light */

  /* Lines */
  --line:       rgba(27,30,33,.12);
  --line-soft:  rgba(27,30,33,.07);
  --line-strong:rgba(27,30,33,.2);
  --line-dark:  rgba(244,240,231,.12);

  /* Status (NO green anywhere — warm brass/terracotta system) */
  --ok:        #7a5a30;                    /* positive → deep brass */
  --ok-bg:     rgba(184,145,106,.16);
  --ok-line:   rgba(184,145,106,.5);
  --danger:    #a3341f;                    /* terracotta */
  --danger-bg: #f6e5e0;
  --danger-line:#e6bdb2;

  /* Type */
  --font-sans:  'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-brand: 'Tenor Sans', var(--font-sans);

  /* Radii / shadow / rhythm */
  --r-pill: 999px;
  --r-card: 14px;
  --r-input: 10px;
  --r-sm: 8px;
  --shadow-card: 0 1px 2px rgba(27,30,33,.05), 0 10px 26px rgba(27,30,33,.05);
  --shadow-pop:  0 24px 60px rgba(12,14,16,.24);
  --maxw: 72rem;
}

/* ============================ 2. RESET / BASE ============================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brass-deep); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brass); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--brass); color: #0c0e10; }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 3px; border-radius: 3px; }

/* ============================ 3. TYPOGRAPHY ============================== */
h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.05;
  letter-spacing: -0.005em; color: var(--ink); margin: 0 0 .5rem;
}
h2 {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 1.12rem; letter-spacing: -0.01em; margin: 0 0 .85rem;
}
h3 {
  font-family: var(--font-mono); font-weight: 500;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 1.1rem 0 .4rem;
}
p { margin: 0 0 .3rem; }

/* Mono eyebrow / kicker — the "— PROOF" motif from the site */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brass-deep);
  margin-bottom: .7rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--brass); opacity: .8; }

/* Page header block: eyebrow + serif h1 + optional lede */
.page-head { margin: .25rem 0 1.4rem; }
.page-head .lede { color: var(--muted); font-size: 1.02rem; max-width: 46rem; }

.muted { color: var(--muted); }
.hint  { font-size: .85rem; color: var(--muted); }
em, i { font-style: italic; }
code { font-family: var(--font-mono); font-size: .88em; }

/* Layout utility: horizontal stack with wrap (no inline styles in views). */
.hstack { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ============================ 4. CHROME (dark) ========================== */
.topbar {
  background: var(--chrome); color: var(--chrome-ink);
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.5rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-dark);
}
/* The account controls travel together at the right rather than each drifting
   on its own gap, so the bar reads as two groups instead of seven items. */
.topbar-account {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
}
.topbar a { color: var(--chrome-ink); }
.topbar a:hover { color: var(--brass); }

/*
 * THE LOCKUP, STACKED.
 *
 * SHERPA and PROCUREMENT PORTAL used to sit on one line, and the nav that
 * followed shared the tag's font, size, letter-spacing and colour exactly —
 * so PROJECTS ADMIN read as more of the brand rather than as somewhere to go.
 * Stacking the two makes the mark a block with an edge, and the nav then
 * begins somewhere the eye can find.
 */
.brand {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: .12rem; line-height: 1;
}
.brand .brand-mark {
  font-family: var(--font-brand); font-size: 1.28rem; letter-spacing: .28em;
  padding-left: .28em; line-height: 1; color: var(--chrome-ink);
}
.brand .brand-mark sup { font-size: .32em; top: -.9em; position: relative; letter-spacing: 0; }
.brand .brand-tag {
  font-family: var(--font-mono); font-size: .54rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--chrome-dim);
  padding-left: .3em;              /* optically aligned under the S */
}
.brand:hover .brand-mark { color: var(--chrome-ink); }

/*
 * Separated from the brand by a rule, and given more presence than the tag it
 * used to be mistaken for: brighter, and marked when you are on it.
 */
.topnav {
  display: flex; gap: 1.3rem; align-items: center;
  padding-left: 1.3rem;
  border-left: 1px solid var(--line-dark);
  align-self: stretch;
}
.topnav a {
  display: flex; align-items: center;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(244,240,231,.72);
}
/* is-current, not is-active: the projectbar already marks the page you are on
   that way and pairs it with aria-current. This rule named .is-active and
   nothing ever emitted it, so the marking the comment above describes has been
   dead since it was written. */
.topnav a:hover, .topnav a.is-current { color: var(--chrome-ink); }
.topnav a.is-current { border-bottom: 2px solid var(--brass); }

.topbar .spacer { flex: 1; }
.topbar .user { font-size: .82rem; color: var(--chrome-dim); }
.topbar form { margin: 0; display: flex; gap: .45rem; align-items: center; }

/* switcher + search on the dark bar */
.topbar select,
.topbar input[type="search"] {
  background: rgba(244,240,231,.06); color: var(--chrome-ink);
  border: 1px solid var(--line-dark); border-radius: var(--r-pill);
  padding: .42rem .8rem; font-size: .82rem;
}
.topbar input[type="search"] { min-width: 15rem; }
.topbar select:focus, .topbar input[type="search"]:focus {
  outline: none; border-color: var(--brass); background: rgba(244,240,231,.1);
}
.topbar select option { color: #0c0e10; }
.topbar .switch-label { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--chrome-dim); }

/* ghost pill button used on the dark bar (log out) */
.topbar button.link {
  background: transparent; border: 1px solid rgba(244,240,231,.3);
  color: var(--chrome-ink); padding: .42rem .9rem; border-radius: var(--r-pill);
  cursor: pointer; font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; transition: border-color .2s, color .2s;
}
.topbar button.link:hover { border-color: var(--brass); color: var(--brass-hi); }

/* Footer */
.site-footer {
  background: var(--chrome); color: var(--chrome-dim);
  border-top: 1px solid var(--line-dark);
  padding: 1.6rem 1.5rem; margin-top: 3rem;
}
.site-footer .footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
}
.site-footer .footer-brand { font-family: var(--font-brand); font-size: .95rem; letter-spacing: .26em; color: var(--chrome-ink); }

/* ============================ 5. LAYOUT ================================= */
main { max-width: var(--maxw); margin: 2rem auto; padding: 0 1.5rem; }

/* ============================ 6. PANELS / CARDS ========================= */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 1.5rem 1.6rem; margin-bottom: 1.4rem;
  box-shadow: var(--shadow-card);
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.panel-head h2 { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem; margin-bottom: 1.4rem; }
.cards .panel { margin-bottom: 0; }

.card { display: flex; flex-direction: column; }
.card h2 {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem;
}
.card .metric {
  font-family: var(--font-sans); font-weight: 700; font-size: 2.1rem;
  line-height: 1.05; letter-spacing: -0.02em; margin: .1rem 0 .2rem;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.card .line { display: flex; justify-content: space-between; gap: 1rem; margin: .3rem 0; font-size: .92rem; }
.card .line strong { font-variant-numeric: tabular-nums; }

/* Emphasis card (dark "suggested reading" treatment) — opt-in */
.panel--dark {
  background: linear-gradient(162deg, var(--chrome-2) 0%, var(--chrome) 100%);
  color: var(--chrome-ink); border-color: var(--line-dark);
}
.panel--dark h1, .panel--dark h2 { color: var(--chrome-ink); }
.panel--dark .muted, .panel--dark .hint { color: var(--chrome-dim); }
.panel--dark a { color: var(--brass-hi); }

/* ============================ 7. BADGES / CHIPS ========================= */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .6rem; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(27,30,33,.05); color: var(--muted); border: 1px solid var(--line);
}
.badge.ok       { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.danger   { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge.brass    { background: var(--ok-bg); color: var(--brass-deep); border-color: var(--ok-line); }

/* Filter chips (pill toggles — search/insights style) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 1rem; }
.chip {
  display: inline-flex; align-items: center; padding: .4rem .9rem; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line-strong);
  cursor: pointer; transition: background .18s, color .18s, border-color .18s;
}
.chip:hover { border-color: var(--brass); color: var(--brass-deep); }
.chip.is-active { background: var(--chrome); color: var(--chrome-ink); border-color: var(--chrome); }
.chip.is-active.chip--brass { background: var(--brass); color: #0c0e10; border-color: var(--brass); }

/* ============================ 8. BUTTONS ================================ */
button.primary, a.button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--brass); color: #0c0e10; border: 1px solid var(--brass);
  padding: .62rem 1.15rem; border-radius: var(--r-pill); cursor: pointer;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; transition: background .2s, border-color .2s, transform .18s;
}
button.primary:hover, a.button:hover, .btn:hover { background: var(--brass-hi); border-color: var(--brass-hi); color: #0c0e10; }
button.primary:active, a.button:active, .btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: transparent; border-color: var(--brass); color: var(--brass-deep); }

/* ============================ 9. FORMS ================================== */
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem;
}
.field input, .field select, textarea, .searchform input {
  width: 100%; padding: .62rem .75rem; background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-input); font: inherit; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, textarea:focus, .searchform input:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(184,145,106,.16);
}
textarea { resize: vertical; }
.import-form .field input[type="file"] {
  padding: 1rem; border: 1px dashed var(--line-strong); background: var(--surface);
  border-radius: var(--r-input); cursor: pointer;
}

/* ============================ 10. ALERTS =============================== */
.alert {
  padding: .7rem .95rem; border-radius: var(--r-sm); margin-bottom: 1rem; font-size: .92rem;
  border-left: 3px solid transparent;
}
.alert.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); border-left-color: var(--danger); }
.alert.ok    { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); border-left-color: var(--brass); }

/* ============================ 11. TABLES =============================== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .62rem .7rem; border-bottom: 1px solid var(--line); }
th {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(184,145,106,.06); }
td { font-variant-numeric: tabular-nums; }
tfoot th { border-top: 2px solid var(--line-strong); border-bottom: none; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---- the items table: one row, two depths ---------------------------------
 *
 * The Stage column used to hold the whole lifecycle note, so one wrapped
 * sentence set the height of every row and pushed the money off to the right.
 * Here the row carries only what is scanned and the sentence moves into a
 * panel, which is also how this survives a phone: columns are given up from
 * the right as width runs out, and every column given up is already in the
 * panel. No second layout, and nothing unreachable at any width.
 */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* A table narrower than its content scrolls itself; the page never does. */
.table-scroll { overflow-x: auto; }

/* ---------------------------------------------------------------------------
   Charter Vendor Partners — a directory, not a table.

   Cards because a three-column table of names cannot be sliced below ~340px
   without restacking, and three pages already pushed the whole document
   sideways on a phone by trying. auto-fill + minmax means the grid reflows to
   one column on its own at the narrow end, with no breakpoint to maintain.
   --------------------------------------------------------------------------- */
.partner-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
}
.partner-card {
  display: flex; flex-direction: column; gap: .45rem;
  padding: 1rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color .18s;
}
.partner-card:hover { border-color: var(--brass); }
.partner-name {
  font-family: var(--font-serif); font-size: 1.18rem; line-height: 1.2;
  margin: 0; color: var(--ink);
}
.partner-cats { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem .45rem; align-items: baseline; }
.partner-cat {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.partner-cat:hover { color: var(--brass-deep); text-decoration: underline; }
.partner-cat-sep { color: var(--line-strong); font-size: .62rem; }
/* Pushed to the bottom so every card in a row lines its link up, however many
   categories the one beside it carries. */
.partner-link {
  margin-top: auto; padding-top: .35rem;
  font-size: .85rem; color: var(--brass-deep);
  overflow-wrap: anywhere;
}
.partner-ext { font-size: .7rem; opacity: .7; }

/* A row of controls that must sit on one line — a form is block-level, so an
   inline button inside a table cell needs telling. */
.inline-actions { display: inline; margin: 0; }
.row-actions {
  display: flex; flex-wrap: wrap; gap: .1rem .8rem; align-items: baseline;
  white-space: nowrap; font-size: .85rem;
}
.danger-link { color: var(--danger); }
.mono-sm { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; }



.items-table { min-width: 34rem; }
.items-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.items-table td { vertical-align: top; }
.items-table .num { text-align: right; }
.items-table .col-toggle { width: 2.2rem; padding-right: 0; }
.items-table .col-id { white-space: nowrap; font-family: var(--font-mono); font-size: .82rem; }
.items-table .col-qty { width: 3.5rem; }

.row-title { display: block; font-weight: 600; }
.row-sub   { display: block; font-size: .82rem; color: var(--muted); }

/* Shown only once the stage and money columns have been given up. */
.row-meta { display: none; }
.meta-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.meta-cost, .meta-qty { font-weight: 400; color: var(--muted); }

/* Ordered, then pulled off the order. It stays in the record and out of the
   totals, and the row should read that way before anyone reads the panel. */
.item-row.is-withdrawn .row-title { text-decoration: line-through; }
.item-row.is-withdrawn td { color: var(--muted); }

/* ---- the disclosure ---- */
.disclose {
  display: grid; place-items: center;
  width: 1.75rem; height: 1.75rem; padding: 0;
  background: none; border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--muted); cursor: pointer;
}
.disclose:hover { border-color: var(--line); color: var(--ink); }
.disclose:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 1px; }
.chev {
  width: .48rem; height: .48rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translate(-1px, -1px);
  transition: transform .18s ease;
}
.disclose[aria-expanded="true"] { color: var(--brass-deep); }
.disclose[aria-expanded="true"] .chev { transform: rotate(45deg) translate(-1px, -1px); }

/* ---- the stage, as a shape rather than a sentence ---- */
.stage {
  display: inline-block; white-space: nowrap;
  padding: .12rem .5rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg);
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
/* Four steps of the same brass rather than four unrelated colours: the ladder
   is a progression, and the palette should say so. Only the ends leave it. */
.stage-work { color: var(--ink-soft); border-color: var(--line-strong); }
.stage-ok   { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.stage-live { background: var(--ok-bg); border-color: var(--brass); color: var(--brass-deep); font-weight: 600; }
.stage-done { background: var(--brass-deep); border-color: var(--brass-deep); color: var(--chrome-ink); }
.stage-out  { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
/* Acknowledged: light brass fill. The ladder reads as increasing weight —
   Ordered is an outline, Acknowledged a light fill, Billed a dark one, Paid
   chrome — so progress is legible without reading the words. */
.stage-ack  { background: var(--brass-hi); border-color: var(--brass-hi); color: var(--chrome); }
/* Paid is the end of the money story and reads as closed rather than as a
   brighter Billed: chrome ground, brass text. Billed keeps .stage-done. */
.stage-paid { background: var(--chrome); border-color: var(--chrome); color: var(--brass-hi); }

/* ---- the panel ---- */
.row-detail > td { background: rgba(184,145,106,.05); padding: .9rem .7rem 1.1rem 2.9rem; }
.row-detail[hidden] { display: none; }

.detail-body { display: flex; gap: 1.1rem; align-items: flex-start; }
.detail-main { flex: 1 1 auto; min-width: 0; }

.detail-body > .row-thumb {
  flex: 0 0 auto; width: 5.5rem; height: 5.5rem;
  object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface);
}
/* The placeholder is a <span>, so it needs the box the <img> gets for free. */
.detail-body > span.row-thumb {
  display: grid; place-items: center; padding: .3rem; text-align: center;
  font-size: .62rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}

.detail-grid {
  display: grid; gap: .55rem 1.4rem; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.detail-grid dt {
  font-family: var(--font-mono); font-size: .6rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.detail-grid dd { margin: .1rem 0 0; font-size: .9rem; }
.detail-more { margin: .9rem 0 0; font-size: .85rem; }

/* ---- giving up columns, rightmost and least-scanned first ---- */
@media (max-width: 1100px) { .items-table .col-margin { display: none; } }
@media (max-width: 900px)  { .items-table .col-qbo    { display: none; } }
@media (max-width: 760px) {
  .items-table .col-vendor { display: none; }
  .items-table { min-width: 0; }
}
@media (max-width: 560px) {
  .items-table .col-qty,
  .items-table .col-stage,
  .items-table .col-money { display: none; }
  .items-table th, .items-table td { padding: .55rem .4rem; }
  .row-meta {
    display: flex; flex-wrap: wrap; gap: .1rem .6rem;
    margin-top: .3rem; font-size: .82rem;
  }
  .row-meta .stage { font-size: .58rem; }
  .row-detail > td { padding-left: 1rem; }
  .detail-body { flex-direction: column; }
  .detail-body > .row-thumb { width: 100%; height: 8.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .chev { transition: none; }
}

@media print {
  .disclose, .col-toggle { display: none; }
  .row-detail[hidden] { display: table-row; }
  .items-table th { position: static; }
}

table.kv th { text-transform: none; font-family: var(--font-sans); color: var(--muted); width: 12rem; font-weight: 600; vertical-align: top; letter-spacing: 0; font-size: .9rem; }
table.kv td { font-variant-numeric: tabular-nums; }

/* ---- the project list on a phone -------------------------------------
 *
 * Six columns need about 486px and a phone panel is 343px, so this table
 * used to push the whole PAGE sideways — the dark topbar and the project
 * nav slid off with it, which is why it read as a broken layout rather
 * than a wide table.
 *
 * Below 620px each row becomes a card. Not a horizontal scroll: a project
 * list is short and card-shaped already, and a row nobody can see all of
 * is not a row. The labels come from data-label attributes in the view.
 */
@media (max-width: 620px) {
  .projects-table,
  .projects-table tbody,
  .projects-table tr,
  .projects-table td { display: block; width: auto; }

  /* The header row still names the columns for a screen reader. */
  .projects-table thead {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }

  .projects-table tr {
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--r-sm); padding: .9rem 1rem 1rem; margin-bottom: .8rem;
  }
  .projects-table td { border: 0; padding: .2rem 0; }

  /* Code and name are the card's heading, so they carry no label. */
  .projects-table .pt-code {
    font-family: var(--font-mono); font-size: .6rem;
    letter-spacing: .14em; color: var(--brass-deep);
  }
  .projects-table .pt-name {
    font-size: 1.05rem; font-weight: 600; line-height: 1.25;
    margin-bottom: .55rem; padding-bottom: .55rem;
    border-bottom: 1px solid var(--line-soft);
  }

  /* Everything else is a label/value pair, label left, value right. */
  .projects-table td[data-label] {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  }
  .projects-table td[data-label]::before {
    content: attr(data-label);
    font-family: var(--font-mono); font-size: .58rem; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
    flex: 0 0 auto;
  }
  .projects-table td[data-label] { text-align: right; }

  .projects-table .pt-open { margin-top: .7rem; }
  .projects-table .pt-open a {
    display: block; text-align: center; padding: .55rem .9rem;
    border: 1px solid var(--line); border-radius: var(--r-pill); font-size: .88rem;
  }
}

/* ============================ 12. LOGIN / FRONT DOOR =================== */
.login-wrap { max-width: 24rem; margin: 4.5rem auto; }
.login-wrap .brand-lockup {
  text-align: center; margin-bottom: 1.6rem;
  font-family: var(--font-brand); font-size: 1.5rem; letter-spacing: .3em; padding-left: .3em; color: var(--ink);
}
.login-wrap .brand-lockup sup { font-size: .32em; top: -.9em; position: relative; letter-spacing: 0; }
.login-wrap .brand-lockup small {
  display: block; margin-top: .5rem; font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-left: 0;
}
.login-wrap button.primary { width: 100%; margin-top: .4rem; }

/* ============================ 13. PROJECT META ========================= */
.projmeta { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.2rem; margin: .9rem 0 0; align-items: baseline; }
.projmeta dt { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.projmeta dd { margin: 0; font-size: .92rem; }

/* ---- the delivery address --------------------------------------------
 *
 * A delivery location is a shipping label, so it is set like one rather than
 * run together as a sentence: the receiver carries the weight, the routing
 * prefix and the dock instruction sit back out of the way, and the phone is
 * dialable from a phone. Line breaks come from app/helpers.php, which only
 * splits when it can do so without losing a word.
 */
.addr { font-style: normal; display: flex; flex-direction: column; gap: .15rem; }
.addr span { display: block; }
.addr .addr-company { font-weight: 600; }
.addr .addr-city { font-variant-numeric: tabular-nums; }
.addr .addr-attn,
.addr .addr-note { font-size: .82rem; color: var(--muted); }
/* attn and note are the supporting lines: routing above, an instruction to the
   driver below. Muted type carries that on its own — an earlier version marked
   the note with a rule, which then ran parallel to the column divider a few
   pixels away and read as a rendering fault. */
.addr-tel {
  font-family: var(--font-mono); font-size: .8rem;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  margin-top: .5rem; align-self: flex-start;
}

/* The address sits beside the label/value pairs, not among them. Six lines
   inline pushed Designer and PM most of a screen down; in its own column it
   costs no vertical space at all. Below 860px it drops underneath, where the
   dividing rule moves from the left edge to the top. */
.projmeta-row {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 1.2rem 2.5rem; margin: 2rem 0 0;
}
.projstate {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .4rem 1.8rem; margin: 1.2rem 0 0;
}
.projstate > span { display: inline-flex; align-items: center; gap: .5rem; }
.projstate-v { color: var(--ink-soft); }
.projmeta-row .projmeta { margin: 0; flex: 1 1 18rem; min-width: 0; }
.projship {
  flex: 0 1 21rem; min-width: 0;
  padding: .85rem 1.1rem 1rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
/* A rule under the label makes it a heading rather than one more muted line
   stacked on the muted line beneath it. */
.projship-label {
  margin: 0 0 .65rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

@media (max-width: 860px) {
  .projship { flex-basis: 100%; }
}

@media (max-width: 560px) {
  /* Less padding at phone widths, where it is mostly dead weight. The routing
     line still wraps here — measured, it needs about 266px and there are 277
     to give — but the rest of the block gains the room. */
  .projship { padding: .75rem .85rem .9rem; }
  .projmeta { grid-template-columns: 1fr; gap: .1rem; }
  .projmeta dt { margin-top: .6rem; }
  .projmeta dd + dt { margin-top: .7rem; }
}
.projnotes {
  margin: 1.3rem 0 0; padding: .7rem .9rem; background: var(--ok-bg);
  border: 1px solid var(--ok-line); border-left: 3px solid var(--brass);
  border-radius: var(--r-sm); font-size: .9rem;
}

/* ============================ 14. SEARCH / RESULTS ===================== */
.searchform { display: flex; gap: .6rem; margin: 1rem 0 0; }
.searchform input { flex: 1; padding: .7rem .9rem; border-radius: var(--r-input); }
.report-links { font-size: .9rem; margin-top: .8rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.report-actions { display: flex; gap: .6rem; align-items: center; }

ul.results { list-style: none; margin: .6rem 0 0; }
ul.results li {
  padding: .7rem .2rem; border-bottom: 1px solid var(--line);
  display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap;
}

/* ============================ 15. ITEM DETAIL ========================== */
.product-detail { display: flex; gap: 1.6rem; align-items: flex-start; flex-wrap: wrap; }
.product-image {
  max-width: 300px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface-2); filter: saturate(.95); box-shadow: var(--shadow-card);
}
.product-desc { flex: 1; min-width: 16rem; margin: 0; white-space: pre-wrap; color: var(--ink-soft); }

/* The image belongs beside the specification it illustrates, not in a panel
   below it: someone checking a finish is checking it against the picture.
   min-width:0 on the table because a flex child defaults to min-content width,
   and one long fabric name would otherwise push the image out of the panel
   rather than wrapping. */
.spec-layout { display: flex; gap: 1.6rem; align-items: flex-start; }
.spec-layout > table { flex: 1; min-width: 0; }
.spec-figure { flex: 0 0 auto; width: 280px; margin: 0; }
/* The frame is held whether or not the image arrives. These URLs point at
   vendor CDNs we do not control; one that 404s or blocks hotlinking collapses
   an unsized <img> to nothing, which looks exactly like no image at all — the
   same silent failure the empty state below exists to prevent. */
.spec-figure .product-image {
  width: 100%; max-width: none; display: block;
  aspect-ratio: 4 / 3; object-fit: contain;
}
.spec-figure figcaption { margin-top: .5rem; }

/* A missing image says so. Omitting it silently reads as "this portal does not
   show images", which is a different and wrong conclusion. */
.product-image.is-empty {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; color: var(--muted); font-size: .85rem;
  border-style: dashed; box-shadow: none;
}

/* ======================= 15b. ITEM GRID (IMAGES VIEW) ================== */

.view-toggle { display: flex; gap: .1rem; margin: 0; }
.view-toggle a {
  padding: .3rem .8rem; font-size: .85rem; text-decoration: none;
  border: 1px solid var(--line); color: var(--muted); background: var(--surface);
}
.view-toggle a:first-child { border-radius: var(--r-card) 0 0 var(--r-card); }
.view-toggle a:last-child { border-radius: 0 var(--r-card) var(--r-card) 0; border-left: none; }
.view-toggle a.is-current { color: var(--ink); background: var(--surface-2); font-weight: 600; }

.item-grid {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.tile {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface-2); text-decoration: none; color: inherit;
}
.tile-image {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
  background: var(--surface-2);
}
/* An item with no captured image still occupies a tile and still carries its
   name — dropping it would make the grid a picture of the project that omits
   exactly the custom pieces. */
.tile-image.is-empty {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; text-align: center; font-size: .82rem; color: var(--muted);
}

.tile-flag {
  position: absolute; top: .5rem; left: .5rem; z-index: 1;
  padding: .15rem .45rem; border-radius: 999px;
  font-size: .7rem; letter-spacing: .04em; text-transform: uppercase;
  background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line);
}

/*
 * The overlay carries room, vendor and name.
 *
 * Hover ALONE would hide this from two groups who are not edge cases here: a
 * keyboard user, and anyone on a tablet — which is what a designer walks a site
 * with. So it is revealed by :hover and :focus-within, and on a device with no
 * hover at all it is simply always visible. Information behind an interaction
 * the device cannot perform is information that does not exist.
 */
.tile-info {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: .1rem;
  padding: .6rem .7rem; font-size: .8rem; line-height: 1.35;
  color: #fff; background: linear-gradient(to top, rgba(20,18,16,.92), rgba(20,18,16,.75));
  transform: translateY(100%); opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.tile-info strong { font-size: .86rem; font-weight: 600; }
.tile-info span { color: rgba(255,255,255,.82); }
.tile:hover .tile-info,
.tile:focus-visible .tile-info,
.tile:focus-within .tile-info { transform: translateY(0); opacity: 1; }
.tile:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

@media (hover: none) {
  .tile-info { position: static; transform: none; opacity: 1;
    color: var(--ink); background: var(--surface); border-top: 1px solid var(--line); }
  .tile-info span { color: var(--muted); }
}
/* A single column on a phone is a list with pictures, which is what the other
   view already is. Two narrower tiles keep it a gallery. */
@media (max-width: 560px) {
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-info { transition: none; }
}

/* ============================ 16. COMMENTS ============================= */
.thread { margin: .4rem 0 1rem; }
.comment { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment-meta { display: flex; gap: .6rem; align-items: baseline; font-size: .82rem; margin-bottom: .3rem; color: var(--muted); }
.comment-meta .who { color: var(--ink); font-weight: 600; }
.comment-body { white-space: pre-wrap; }
.comment-form textarea { margin-bottom: .5rem; }
.comment-actions { display: flex; gap: .6rem; align-items: center; margin-top: .3rem; }
.comment-actions select { width: auto; }

/* ============================ 17. RESPONSIVE =========================== */
@media (max-width: 860px) {
  .topbar { gap: .7rem .9rem; padding: .7rem 1rem; }
  .topbar input[type="search"] { min-width: 10rem; }
  .brand .brand-tag { display: none; }
  main { margin: 1.4rem auto; padding: 0 1rem; }
  .panel { padding: 1.2rem 1.15rem; }
  .product-detail { flex-direction: column; }
  /* Stacked, the image is decoration above a table nobody has read yet, so it
     goes second — and stops being a fixed 280px in a 320px viewport. */
  .spec-layout { flex-direction: column-reverse; }
  .spec-figure { width: 100%; max-width: 320px; }
}

/* ============================ 18. MOTION / PRINT ======================= */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .site-footer, .noprint, form, .report-links { display: none !important; }
  body { background: #fff; color: #000; }
  main { margin: 0; max-width: none; }
  .panel { border: none; box-shadow: none; padding: 0; margin: 0 0 1rem; background: #fff; }
  a { color: inherit; }
  tbody tr:hover { background: none; }
}

/* An order-level charge: real money on the document, belonging to no item. */
.order-level > td { background: rgba(184,145,106,.06); }

/* ---- the project bar --------------------------------------------------
 *
 * A second row under the topbar, present on every page that belongs to a
 * project. Before it, each of those pages was reachable only from a single
 * paragraph on the dashboard and led back only to the dashboard — so moving
 * between two of them meant passing through a third you did not want.
 *
 * Elevated chrome rather than the page ground: it belongs to the frame, not
 * to the content, and reading as part of the header is what makes it feel
 * like a place you are in rather than a widget on the page.
 */
.projectbar {
  background: var(--chrome-2); color: var(--chrome-ink);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line-dark);
  overflow-x: auto;                 /* narrow screens scroll the row, not the page */
  scrollbar-width: thin;
}
.projectbar-code {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass-hi);
}
.projectbar-links { display: flex; align-items: stretch; gap: .2rem; }
.projectbar a {
  flex: 0 0 auto;
  padding: .68rem .7rem;
  color: var(--chrome-dim); text-decoration: none; white-space: nowrap;
  font-size: .85rem;
  border-bottom: 2px solid transparent;
}
.projectbar a:hover { color: var(--chrome-ink); }
/* The current page is stated twice — colour and a rule — so it survives being
   read without colour, and aria-current says it a third time for a reader. */
.projectbar a.is-current {
  color: var(--chrome-ink);
  border-bottom-color: var(--brass);
}
.projectbar a:focus-visible {
  outline: 2px solid var(--brass-hi); outline-offset: -3px;
}

/* ---- breadcrumbs ---- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem;
  font-size: .85rem; margin: 0 0 .9rem;
}
.crumbs a { color: var(--brass-deep); }
.crumbs [aria-current="page"] { color: var(--muted); }
.crumb-sep { color: var(--line-strong); }

@media (max-width: 560px) {
  .projectbar { padding: 0 1rem; gap: .6rem; }
  .projectbar a { padding: .6rem .5rem; font-size: .8rem; }
}

@media print {
  .projectbar { display: none; }
}

/* ---- the breadcrumb bar ----------------------------------------------
 *
 * Between the project bar and the page: where you are, and every step back
 * as a link. Drawn by the chrome for every page rather than by each view,
 * because a view that renders its own trail is a view that can be added
 * without one.
 */
.crumbbar {
  padding: .55rem 1.5rem .1rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.crumbbar .crumbs { margin: 0; }

@media (max-width: 560px) {
  .crumbbar { padding: .5rem 1rem .1rem; }
}

@media print {
  .crumbbar { display: none; }
}

/* ---- the daily briefing ----------------------------------------------
 *
 * Directly under the project header: has anything moved, what is it worth,
 * what is waiting on somebody. Read in the first ten seconds or not at all,
 * so it is a scan — counts large, prose small, and the one thing that needs
 * a person marked in a colour nothing else on the page uses.
 */
.summary { border-left: 3px solid var(--brass); }
.summary-stages {
  list-style: none; margin: .2rem 0 1rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .3rem 1.4rem;
}
.summary-stages li {
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.summary-n {
  font-size: 1.15rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; margin-right: .18rem;
  letter-spacing: 0;
}
.summary-moved p { margin: .15rem 0; font-size: .92rem; }
.summary-money {
  display: flex; flex-wrap: wrap; gap: .2rem 2rem;
  margin: .9rem 0 .2rem; font-variant-numeric: tabular-nums;
}
.summary-money .line { margin: 0; }

.summary-attention {
  list-style: none; margin: 1rem 0 0; padding: .8rem 0 0;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .45rem;
}
.summary-attention li {
  display: flex; align-items: baseline; gap: .55rem;
  font-size: .92rem;
}
.summary-attention .badge {
  flex: 0 0 auto;
  background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line);
  font-variant-numeric: tabular-nums;
}
/* Stated rather than left blank: "nothing is waiting" is the answer people
   come here for, and a block that disappears when all is well reads as broken. */
.summary-clear {
  margin: 1rem 0 0; padding-top: .8rem;
  border-top: 1px solid var(--line);
  color: var(--ok); font-size: .92rem;
}

/* ============================ 20. THE SCHEDULE ========================= */
/*
 * Five questions with five different KINDS of answer, so the type has to
 * separate them. A QuickBooks date and a date projected from a scraped lead
 * time are not the same claim; a question nothing in the system can answer is
 * a third thing again. The chip carries that distinction and the left edge
 * repeats it, so the state survives a glance down the column.
 */
.schedule .sched-alerts {
  list-style: none; margin: .9rem 0 0; padding: .75rem .95rem;
  background: var(--danger-bg); border: 1px solid var(--danger-line);
  border-radius: var(--r-sm); font-size: .9rem;
}
.schedule .sched-alerts li + li { margin-top: .3rem; }

.sched-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.sched-item {
  padding: .8rem 1rem .85rem; border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--surface-2);
}
.sched-item.is-done     { border-left-color: var(--ok); }
.sched-item.is-partial  { border-left-color: var(--brass); }
.sched-item.is-estimated{ border-left-color: var(--brass-hi); }
.sched-item.is-planned  { border-left-color: var(--brass-hi); }
.sched-item.is-overdue  { border-left-color: var(--danger); }
/* Untracked is deliberately the quietest: it is a gap in the record, not an
   emergency, and it should not shout down the row above it that is overdue. */
.sched-item.is-untracked { background: transparent; border-left-color: var(--line); }

.sched-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sched-q { margin: 0; font-weight: 600; font-size: .95rem; }
.sched-chip {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--muted);
}
.sched-chip.chip-done     { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.sched-chip.chip-overdue  { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }

.sched-a { margin: .35rem 0 0; font-size: .95rem; }
.sched-item.is-untracked .sched-a { color: var(--muted); }
.sched-window {
  margin: .2rem 0 0; font-family: var(--font-mono); font-size: .8rem;
  font-variant-numeric: tabular-nums; color: var(--ink-soft);
}
.sched-breakdown { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .15rem; }
.sched-breakdown li { font-size: .85rem; color: var(--ink-soft); }
.sched-breakdown strong { font-variant-numeric: tabular-nums; }
.sched-note { margin: .4rem 0 0; font-size: .82rem; color: var(--muted); }
.sched-evidence {
  margin: .9rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line-soft);
  font-size: .82rem; color: var(--muted);
}

@media (max-width: 560px) {
  .sched-head { flex-direction: column-reverse; align-items: flex-start; gap: .35rem; }
}
