/* ─────────────────────────────────────────────────────────────────
 * Kendres, design system (global)
 *
 * Governed by the interface spec. The spec is the authority; anything
 * here that disagrees with it is a bug.
 *
 * The short version. The product is light and the chrome is dark: Mist is
 * the page, Mist light is a card, Charcoal is the nav and the top bar.
 * Graphite is the text and the primary button, Stone is everything
 * secondary, three neutrals are also the chart scale, Coral is the one
 * accent and appears once per screen, and three muted signals live on
 * badges. Density is still the aesthetic: thirty rows on a 900px viewport,
 * 34px rows, no padding for its own sake, no cards wrapped around tables.
 *
 * Archivo for everything, machine-authored prose included, at 800 for
 * display. Geist Mono with tabular figures for money, matter IDs and
 * dates -- a figure a reader compares down a column is not prose, and
 * proportional digits in a money column do not line up.
 *
 * What this replaced: a cream page with a dusty blue identity and a
 * parchment accent. The brand forbids all three -- no cream grounds, no
 * blue anywhere -- and puts the primary action in Graphite, which frees
 * the accent to mean "this needs you" rather than "press this".
 *
 * The file is ordered quiet-to-loud and the last section wins, so the
 * spec conformance layer at the foot settles anything above it. Moving
 * it is how a redesign ships looking like the thing it replaced.
 *
 * Legacy class names (.elm-card, .btn-primary, .elm-nav, .badge-sm,
 * .text-page-title, .text-section-header, .text-body, .text-meta,
 * .text-eyebrow, .elm-link, .card-hover, .ai-badge, .ai-glow,
 * .sparkle, .elm-spinner) are preserved but remapped to these tokens,
 * so existing HTML inherits the new look without edits.
 * ───────────────────────────────────────────────────────────────── */

/* ── Reset ────────────────────────────────────────────────────────────
 * The metric-affecting half of Tailwind's Preflight, restated here.
 *
 * This is a real stylesheet in a <link>, so the browser has it before it
 * paints. The Tailwind Play CDN is a compiler that runs in the page: it
 * executes, scans the DOM and *then* injects Preflight as a <style>. Until
 * that lands the browser uses its own defaults, so all 319 headings in these
 * templates paint at 2em bold with 0.67em margins and then snap down to
 * their real size. That is the flash on every navigation, and it is worst on
 * the pages with the biggest headings.
 *
 * Duplicating Preflight's own values means nothing moves when the real one
 * arrives; the page is simply already right. Only the rules that change
 * metrics are here. Colour, borders and form styling can arrive late without
 * anything jumping.
 * ─────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; line-height: 1.5; }

/* The page grows with its content. `height: 100%` on a flex-column body caps
   the box at the viewport, so `mt-auto` parks the footer on the viewport line
   and everything taller than the screen renders *behind* it: on the matter
   page the footer band sat across the middle of the UTBMS card, cutting off
   its header and first row. It looked like a z-index fight and was a height
   declaration.
   `min-height` keeps the short-page behaviour that `h-full` was there for --
   a footer that still sits at the bottom when there is little content -- and
   drops the ceiling that caused the overlap. Stated here rather than left to
   a utility class because the Tailwind CDN is a compiler that runs in the
   page, so a class-only fix is wrong until it executes, and this is a metric
   rule: the layout would visibly jump. */
html { height: 100%; }
body { min-height: 100%; }

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre {
  margin: 0;
}

/* A heading is a heading because of where it is, not because the browser
   makes it big. Every heading in this app is sized by a class. */
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }

ol, ul, menu { list-style: none; margin: 0; padding: 0; }

/* ── The type scale, restated ─────────────────────────────────────────────
 * Tailwind sizes 3,770 elements in these templates and the CDN compiles *in
 * the page*, so until it executes every one of them inherits the body's 16px
 * and then snaps down to 10, 11, 12 or 13. That is the flash of enlarged text
 * on each navigation: not a transition, not a layout shift, just the whole
 * page briefly rendered at the browser's default size.
 *
 * These are Tailwind's own values for exactly the utilities these templates
 * use, so nothing changes when the real ones arrive; the page is already
 * right. An arbitrary size sets font-size only, which is what Tailwind does,
 * so line-height keeps inheriting.
 *
 * `body` is deliberately left at the browser default. Tailwind does not set a
 * body font-size either, so anything unclassed renders at 16px before and
 * after compilation. Giving body a smaller size here would fix the flash by
 * changing what the page finally looks like, which is a different bug.
 * ─────────────────────────────────────────────────────────────────────── */
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-\[8px\] { font-size: 8px; }
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[11\.5px\] { font-size: 11.5px; }
.text-\[12px\] { font-size: 12px; }
.text-\[12\.5px\] { font-size: 12.5px; }
.text-\[13px\] { font-size: 13px; }
.text-\[13\.5px\] { font-size: 13.5px; }
.text-\[14px\] { font-size: 14px; }
.text-\[15px\] { font-size: 15px; }
.text-\[17px\] { font-size: 17px; }
.text-\[18px\] { font-size: 18px; }
.text-\[22px\] { font-size: 22px; }
.text-\[26px\] { font-size: 26px; }


img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}
img, video { max-width: 100%; height: auto; }

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
button, [role="button"] { cursor: pointer; background-color: transparent; background-image: none; }
table { border-collapse: collapse; border-spacing: 0; text-indent: 0; }
hr { height: 0; color: inherit; border-top-width: 1px; }

/* ── Tokens ──────────────────────────────────────────────────────────
   The brand palette, entire. Eleven values, and everything the app already
   names resolves into them, which is what lets sixty templates change with
   one edit -- and what made this relight one file rather than a sweep.

   The rule that governs the whole thing: the accent means "this needs you",
   and nothing else. Not branding, not category coding, not hover. That is
   only true if there is no second colour competing for the eye, so there is
   no green, no blue, no amber in the brand layer. Status is carried by
   weight, position, and three muted signals that live on badges.
   ─────────────────────────────────────────────────────────────────── */
:root {
  /* ── Kendres, September 2026 · light ─────────────────────────────────
     The product is light and the chrome is dark. Mist is the page, Mist
     light is a card, and the top bar and nav rail are Charcoal -- so the
     one dark band frames the work rather than being the work.

     Three things this replaced, and each was a rule the brand states
     outright. The page was a cream paper (`#FAF8F3`); BRAND.md forbids
     cream and beige grounds. Identity and selection were a dusty blue;
     there is no blue in the brand at all, so Graphite carries both. And the
     accent was a parchment gold spent on the primary action, which is now
     Graphite -- freeing the accent to be the one thing on a screen that
     needs attention, which is what Coral is for. */

  /* ── Kendres, the source values ──────────────────────────────────────
     `brand/BRAND.md` is the authority and `brand/kendres-tokens.css` is the
     file it ships. These eleven are the whole palette; **everything below is
     a reference to one of them**, so no screen can render a value the brand
     does not list.

     They are declared here rather than by importing the kit's file, for the
     same reason the type scale is restated at the top of this sheet: a second
     stylesheet is a second network request before first paint, and the tokens
     have to be in force before anything is drawn. The kit's file stays as the
     handoff artifact. */
  --kendres-graphite:    #36322E;  /* primary text, logo, primary buttons */
  --kendres-charcoal:    #1C1C1F;  /* reversed surfaces: nav, dark panels */
  --kendres-coral:       #F2654A;  /* accent only */
  --kendres-mist:        #EDF0EE;  /* page background */
  --kendres-mist-light:  #FAFBFA;  /* cards, and light elements on dark */
  --kendres-stone:       #646A66;  /* secondary text, labels, captions */
  --kendres-line:        #D8DEDA;  /* general borders and row dividers */
  --kendres-line-soft:   #E5EAE7;  /* subtle fills, meter tracks */
  --kendres-line-strong: #BCC5BF;  /* borders around data areas */
  --kendres-coral-text:  #A33A22;  /* coral-family text that passes contrast */
  --kendres-coral-tint:  #FDEDE8;  /* a flagged row's ground */

  /* Two tints derived from those, each measured rather than chosen. The
     brand names two grounds and this sheet needs four: a card, a zebra
     stripe, a hover and a page. `--paper-2` is a 1.06 step off the card so a
     thirty-row table bands visibly, and `--paper-3` has to be darker than the
     zebra or hover vanishes on every other row -- the fault the relight
     found, when three states shared one colour. */
  --kendres-zebra:       #F2F5F3;  /* 1.06 off the card */

  /* One measurement recorded here rather than declared as a token, because
     nothing reads it yet and a token nothing reads is `Budget.accrued_amount`
     in miniature. BRAND.md gives a nav section label as "Mist at 45%" on
     Charcoal, which measures **4.01:1** -- and an 11px 600 label is not large
     text, so AA asks for 4.5. **49% is the fix**, at 4.52:1. The nav's own
     treatment is the restyle's to apply; the number is here so it does not
     have to be measured twice. */

  /* ── Surfaces. The chrome is the only dark band. ──────────────────── */
  --chrome:      var(--kendres-charcoal);   /* top bar, nav rail */
  /* Mist, not paper. The brand forbids cream and beige grounds, and
     `#FAF8F3` was one. */
  --canvas:      var(--kendres-mist);       /* page background */
  --surface:     var(--kendres-mist-light); /* panel: cards, table header, zebra */
  --elevated:    var(--kendres-mist-light); /* raised: menus, modals, hover */
  --paper-print: var(--kendres-mist-light); /* print and export */

  /* A dark fill on a light ground -- a filled control, a tile, a tooltip.
     This used to be `--ink`, which meant the same token was both the text
     colour and every dark box. Inverting the product broke the second
     meaning in silence; naming it separately is what stops that happening
     again in either direction. */
  --fill-strong: var(--kendres-graphite);   /* the brand's primary button */
  --fill-strong-2: var(--kendres-charcoal); /* its hover, per BRAND.md */

  /* Text. */
  --ink:         var(--kendres-graphite);  /* primary text, 12.25:1 on a card */
  --ink-2:       var(--kendres-stone);     /* secondary, 5.33:1 */
  /* **Tertiary is Stone too, and there was no other answer.** This started as
     a lighter cut, `#6F7571`, measured at 4.54:1 on a card -- and driving the
     app found it at 4.10:1 on the page ground and 4.29:1 on the zebra stripe,
     because a card is the lightest of the four grounds and a tertiary label
     appears on all of them. Working back from the darkest ground, the lightest
     value on Stone's hue that clears 4.5:1 everywhere *is* Stone (4.82:1 on
     Mist). There is no legible step below it on this palette.

     Which turns out to be what the brand says: Stone is listed for "secondary
     text, labels, captions" -- one colour for the whole of it, and no fourth
     text value anywhere in the document. So the level below secondary is
     carried by size and weight, which is how the type scale already
     distinguishes an 11px label from 13px body. A third grey would have been
     a level this palette cannot render. */
  --ink-3:       var(--kendres-stone);     /* tertiary: size and weight, not a third grey */
  --rule:        var(--kendres-line);      /* all borders and dividers, 1px */

  /* Identity and selection. **No blue anywhere in the brand layer** is a
     rule BRAND.md states outright, so the dusty blue that carried this
     meaning is gone and Graphite carries it instead.

     The names survive because eight call sites in this sheet use them, and
     renaming those is a mechanical change with no benefit: what matters is
     that nothing renders blue. `--blue-wash` becomes the soft line tint,
     which is what a selected row wants -- a ground a half-step off the card,
     not a hue. */
  --blue:        var(--kendres-graphite);   /* selection, focus-adjacent edges */
  --blue-deep:   var(--kendres-charcoal);   /* pressed */
  --blue-wash:   var(--kendres-line-soft);  /* selected row */

  /* The one accent. Coral, and BRAND.md is narrow about it: the active nav
     item, a focus ring, and the single most important highlight on a view.
     Never a large fill, and never body text -- Coral measures 3.01:1 on a
     card, which is why the brand ships `--kendres-coral-text` at 6.35:1 for
     anything that has to be read. */
  --accent:      var(--kendres-coral);       /* the accent itself */
  --accent-text: var(--kendres-coral-text);  /* when it has to be legible */
  --accent-wash: var(--kendres-coral-tint);  /* a flagged row's ground */

  /* Data scale, the three column shades from the mark. On paper the steps
     invert: the tallest column reads darkest. Charts still run low to
     high, so a bar chart echoes the logo either way round. Never reorder
     them for variety -- the order is the meaning. */
  --data-1:      var(--kendres-line-strong); /* lowest  -- lightest here */
  --data-2:      var(--kendres-stone);
  --data-3:      var(--kendres-graphite);    /* highest -- darkest here */
  --data-4:      var(--kendres-charcoal);    /* a fourth series */

  /* The mark's two fills. The Kendres mark is five bars with the fourth in
     Coral, so it is two colours rather than a three-step scale -- and the
     scale is what went wrong last time: the old mark's bars read `--data-*`,
     that scale inverts with the page ground, and the tallest bar went
     near-invisible against the near-black nav the day the product was relit.
     Nothing errored; the logo quietly lost a column.

     `--mark-ink` is Graphite, the light-ground cut, and `.brand-on-dark`
     overrides it to Mist light. **Declared by the caller, never inferred from
     the page**, which is the whole correction. */
  --mark-ink:    var(--kendres-graphite);
  --mark-accent: var(--kendres-coral);

  /* Signals. Muted, never saturated, and they appear on badges and flags
     only -- never as a surface, never as a chart series. Cut darker than
     the dark-ground set so they hold contrast as text on paper. */
  --signal-under:  #3F7D60;   /* under budget */
  /* The under signal has a **text cut**, for the same reason the accent does.
     #3F7D60 measures 4.69:1 on a card and 4.24:1 on the page, so it clears AA
     on exactly one of the four grounds a figure can land on -- fine for a dot
     or a badge fill, where 3:1 is the bar, and short for a number somebody
     reads. The other two signals clear every ground as text and need no
     second cut. Measured, not picked: this is the lightest value on the same
     hue whose worst ground is 4.54:1. */
  --signal-under-text: #3C785C;
  --signal-review: #8A6512;   /* needs review -- this is "needs you" */
  --signal-over:   #A2453A;   /* over band */
  /* Left alone, deliberately. Prompt 2 says functional status colours stay
     unless they are the old brand blue, and none of these three is. They are
     status rather than brand: they appear on badges and flags, never as a
     surface and never as a chart series. */
  --signal-under-wash:  #EDF5F0;
  --signal-review-wash: #FBF3E2;
  --signal-over-wash:   #FBEEEC;

  /* The chart's second colour (2026-10-20, at Greg's direction, chosen from
     docs/design/matter-page-v2/chart-colour-options.png). Graphite and
     Stone alone made invoiced, accrued, plan and a second staffing level
     four greys that blended; the lightest step measured 1.7:1 on a card,
     under the 3:1 a mark needs. Plum because it is none of the three
     signals, not Coral and not blue. Like the signals these are functional
     rather than brand values: they appear in charts only. `--chart-accrued`
     is the meaning the money charts use; a second staffing level borrows the
     same hue as `--chart-2`, never as a status. */
  --chart-2:          #7B5A86;   /* 5.55:1 on a card */
  --chart-2-light:    #B9A3C2;   /* a third step; Graphite text on it is 5.5:1 */
  --chart-2-wash:     #D4CBD7;   /* plum at 30% on a card: an area under a line */
  --chart-accrued:    var(--chart-2);

  /* Everything below is an alias. No new colour enters here — each name
     the templates and components already use resolves onto one of the
     eight above, so nothing renders a value the spec does not list. */

  --ink-4:       var(--ink-3);

  /* A card sits on the panel, a raised thing on elevated. `bg-white` in a
     template means "this is a card", which on a dark ground is the panel
     rather than the page. */
  --paper:       var(--surface);
  --paper-2:     var(--kendres-zebra);       /* the zebra stripe */
  --paper-3:     var(--kendres-mist);        /* hover: darker than the zebra */

  --rule-subtle: var(--rule);
  --rule-2:      var(--rule);
  --rule-strong: var(--kendres-line-strong); /* around tables and data panels */

  /* The templates use the violet family to mean "this is the primary
     thing", hundreds of times per screen. Parchment appears **once** per
     screen, so those cannot all resolve to it: a filled control is the
     elevated surface with a rule, and the one accent action is asked for
     explicitly with `.sp-action`. Pointing the whole violet family at the
     accent is exactly how a single accent stops being one. */
  --brand:        var(--fill-strong);
  --brand-2:      var(--fill-strong-2);
  --brand-bright: var(--ink);
  --brand-pale:   var(--rule);
  --brand-wash:   var(--surface);

  /* Gold is retired: a second accent halves the first. */
  --gold:         var(--ink-2);
  --gold-2:       var(--ink-2);
  --gold-wash:    var(--surface);

  /* Status resolves onto the three signals. They are muted by
     construction and appear on badges and flags only, which is what keeps
     them from competing with the accent. The three are status and the
     accent is attention: an over-budget badge states a fact about a number,
     and a needs-you flag is an errand somebody has to clear. */
  --status-healthy: var(--signal-under);
  /* Status as text takes the text cuts. `--status-healthy` stays the fill,
     because a dot and a figure want different things off the same meaning. */
  --status-healthy-text: var(--signal-under-text);
  --status-caution-text: var(--signal-review);
  --status-alert-text:   var(--signal-over);
  --status-caution: var(--signal-review);
  --status-alert:   var(--signal-over);
  --status-neutral: var(--ink-3);

  --healthy-wash:  var(--signal-under-wash);
  --healthy-rule:  var(--rule);
  --caution-wash:  var(--signal-review-wash);
  --caution-rule:  var(--rule);
  --alert-wash:    var(--signal-over-wash);
  --alert-rule:    var(--rule);

  /* Oxblood is gone. The names survive because call sites use them. */
  --oxblood:      var(--signal-over);
  --oxblood-2:    var(--signal-over);
  --oxblood-wash: var(--signal-over-wash);

  /* What "this needs you" is painted with, everywhere.

     **This is the one meaning that moves in this step, and it moves on
     purpose.** Under the old palette needs-you was the review signal rather
     than the accent, because parchment was the primary action's colour and a
     screen cannot spend its one accent twice. BRAND.md reassigns the job:
     Coral is "the one thing that needs attention", a flagged row takes the
     Coral tint, and the primary button is Graphite -- so the accent is no
     longer competing with an action and needs-you is exactly what it is for.

     The text cut, not the accent itself: Coral measures 3.01:1 on a card and
     `--kendres-coral-text` measures 6.35, and this token carries labels. */
  --needs-you:      var(--kendres-coral-text);
  --needs-you-wash: var(--kendres-coral-tint);

  /* Shape. BRAND.md says 6px, on controls and overlays; 0 stays on table
     cells and rows, which a radius on a dense grid only softens into mush. */
  --radius:       6px;
  --radius-lg:    6px;
  --radius-sm:    6px;

  /* Shadows on overlays only. The card and raise tokens exist because
     forty call sites name them; they resolve to nothing. */
  --shadow-card:  none;
  --shadow-raise: none;
  --shadow-pop:   0 4px 16px rgba(28, 28, 31, 0.18);  /* Charcoal */

  /* Base unit 4px, section rhythm 8 / 12 / 16 / 24. */
  --space-1:    4px;
  --space-2:    8px;
  --space-3:    12px;
  --space-4:    16px;
  --space-5:    24px;
  --space-6:    32px;
  --space-7:    48px;

  /* Row height, and the comfortable setting the spec allows. */
  --row-h:       34px;
  --row-h-comfy: 40px;

  /* Motion: state change only, 120ms. */
  --motion: 120ms;

  /* One name for the UI face, beside `--font-mono`. It did not exist, so a
     rule wanting the sans had to restate the whole six-deep stack -- and one
     that reached for `var(--font-sans)` got an undefined property, which does
     not error: it inherits, silently. Declared here rather than in the
     conformance layer because the fallback metrics only help if they are in
     force before the first paint. */
  --font-sans: "Archivo", "Archivo Fallback", "Archivo Fallback Arial", "Helvetica Neue", Arial, sans-serif;

  /* Text and glyphs on a dark fill -- a primary button, a filled badge, the
     lockup in the bar.

     Seventeen rules said `#FFFFFF`, which was in the palette only because
     `--surface` used to be pure white. Under Mist light it is not: white is
     brighter than every ground the brand lists, so those rules had quietly
     become the one off-palette colour on the page, a slightly harsher white
     than anything around them.

     **Mist light, not Mist.** The two documents phrase this differently and
     agree on the role: `kendres-tokens.css` declares
     `--color-inverse-text: var(--kendres-mist-light)`, and BRAND.md lists
     Mist light for "cards, and light elements on dark". The component table's
     "Mist text" on the primary button is the looser of the two. The nav is a
     real exception -- BRAND.md gives its items Mist at 72% -- and that
     belongs to the restyle. */
  --on-dark: var(--kendres-mist-light);

  /* The muted cut of it, for a label beside something in `--on-dark`. Mist at
     49% over Charcoal, **not** the 45% BRAND.md suggests: 45% measures 4.01:1
     and an 11px 600 label is not large text, so AA asks for 4.5. Prompt 2 left
     this as a measurement in a comment because nothing read it; the invoice
     review band does now. 4.52:1. */
  --on-dark-muted: #828484;

  /* Legacy aliases, unchanged in name so existing HTML inherits. */
  --elm-dark:           var(--ink);
  --elm-midnight:       var(--ink);
  --elm-brand:          var(--ink);
  --elm-brand-light:    var(--surface);
  --elm-accent:         var(--ink);
  --elm-accent-hover:   var(--ink);
  --elm-accent-light:   var(--surface);
  --elm-orange:         var(--ink);
  --elm-orange-hover:   var(--ink);
  --elm-success:        var(--signal-under);
  --elm-warning:        var(--signal-review);
  --elm-danger:         var(--signal-over);
  --elm-info:           var(--ink-2);
  --elm-bg:             var(--canvas);
  --elm-card:           var(--surface);
  --elm-surface:        var(--surface);
  --elm-border:         var(--rule);

  /* Gradients are prohibited. These resolve to flat fills rather than
     being deleted, because they are named at inline-style call sites. */
  --elm-gradient-ai:    var(--surface);
  --elm-gradient-brand: var(--ink);
  --elm-gradient-dark:  var(--ink);
}

/* ── The fallback, cut to the webfont's metrics ────────────────────────
   `display=swap` renders in the fallback and then swaps, and the two are
   rarely the same width, so the swap reflows every line and then snaps it
   back -- the "flash of the content enlarged" people were reporting, which
   is not a transition or a layout shift anyone can point at in the markup.
   `size-adjust` scales the fallback to the webfont's measure, so the swap
   changes the shapes and not the metrics. Two faces because the first
   available fallback differs by platform, and the ratio differs with it.

   **Measured, in Chrome at 13px, on a string of this app's own nav labels,
   column headers, a matter number and a money figure** -- a ratio measured
   on a pangram is a ratio for text nobody sets. Both faces through the same
   harness, so the two rows are comparable:

     Archivo         1277.33px
     Helvetica Neue  1281.50px   0.33% wider    -> 99.67%
     Arial           1271.34px   0.47% narrower -> 100.47%

   Archivo sits within half a per cent of both. The corrections are kept
   anyway: half a per cent over a 1200px line is six pixels, which is a word
   moving between lines in a table cell.

   **The values these replace were wrong in sign**, which is the reason to
   measure rather than carry them across. They claimed Helvetica Neue set
   2.54% wider than Instrument Sans and shrank the fallback to 97.52% to
   match. Measured the same way, Instrument Sans was 1324.47px and Helvetica
   Neue 1281.50 -- the fallback was 3.24% *narrower* and wanted 103.35%. So
   the declaration widened the gap it was written to close, and the flash it
   was meant to remove was roughly doubled instead. Nothing could have caught
   that: a reflow on font swap is invisible to every test here, and the
   comment asserting the measurement read exactly like one that had been
   taken. The lesson is the one the estate keeps learning -- a number in a
   comment is not evidence -- and the fix is that both faces above went
   through the same harness rather than one being trusted. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Helvetica Neue"), local("HelveticaNeue");
  size-adjust: 99.67%;
  font-weight: 400 800;
  font-style: normal;
}
@font-face {
  font-family: "Archivo Fallback Arial";
  src: local("Arial"), local("Liberation Sans"), local("Arimo");
  size-adjust: 100.47%;
  font-weight: 400 800;
  font-style: normal;
}

/* ── Base ────────────────────────────────────────────────────────── */
html, body {
  background: var(--canvas);
}
:root { color-scheme: light; }
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink);
  letter-spacing: 0;
}

/* Two weights only — collapse the bold/semibold/medium soup down to
 * regular + medium, since the brief says "two weights only." */
h1, h2, h3, h4, h5, h6,
.font-bold,
.font-semibold,
.font-medium {
  font-weight: 500 !important;
}

/* ALL-CAPS micro-labels become sentence-case + lighter weight,
 * everywhere. Adds back via the explicit .text-eyebrow class below
 * for the rare case we actually want a UI eyebrow. */
.uppercase {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
}
.tracking-widest,
.tracking-wider,
.tracking-wide {
  letter-spacing: 0 !important;
}

/* ── Nav (calm slate, flat) ──────────────────────────────────────── */
nav.elm-nav {
  background: var(--chrome);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Colour: brand where it is accent, status where it means something ──
   This section used to be called "collapse the Tailwind rainbow", and it did:
   every tinted chip background in the app — violet, emerald, amber, rose, sky
   alike — was forced to `--paper-2`, one light grey, with `!important`. Two
   hundred and forty-five of them. That is what made the platform look plain:
   not an absence of colour in the templates, but a rule flattening all of it
   on the way out.

   Colour is restored on a rule: brand for accent and anything AI, and the
   status palette where the colour carries meaning. Grey is left for things
   that genuinely have no state. `!important` is kept because these have to
   beat Tailwind's own generated utilities, which load in the same cascade.
*/

/* Accent families. Violet, indigo, purple, sky, cyan and blue all mean "this
   is the primary thing" in these templates.

   `--brand` is a *surface* now, so pointing text at it paints a dark glyph on
   a dark ground: the emphasised words inside the invoice filter labels went
   invisible, which looks like missing copy rather than a colour bug. Emphasis
   in text is carried by ink and weight, not by hue. */
.text-violet-600, .text-indigo-600, .text-purple-600,
.text-sky-600,    .text-cyan-600,   .text-blue-600 {
  color: var(--ink) !important;
}
.text-violet-700, .text-indigo-700, .text-purple-700,
.text-sky-700,    .text-cyan-700,   .text-blue-700 {
  color: var(--ink) !important;
  font-weight: 600;
}
.text-violet-800, .text-violet-900,
.text-indigo-800, .text-indigo-900,
.text-purple-800, .text-purple-900,
.text-blue-800,   .text-blue-900 {
  color: var(--ink) !important;
}
.hover\:text-violet-700:hover, .hover\:text-violet-800:hover,
.hover\:text-indigo-700:hover, .hover\:text-indigo-800:hover,
.hover\:text-blue-700:hover,   .hover\:text-blue-800:hover {
  color: var(--ink) !important;
}
/* Tailwind's gradient utilities. The spec prohibits gradients, and the
   inline-style rule at the foot of this file only catches `style="...
   gradient..."` -- a class-built gradient goes straight past it. The AI panel
   on the approval-rules screen was `bg-gradient-to-br from-violet-50 to-
   indigo-50`, which on the dark ground rendered a white card with its own
   heading invisible on it. */
[class*="bg-gradient-to-"] {
  background-image: none !important;
  background-color: var(--surface) !important;
}

/* Blue fills. Never the identity blue: a filled control is the strong ink
   fill. Blue on a button is how the colour stops meaning "you are here". */
.bg-blue-500, .bg-blue-600, .bg-blue-700,
.bg-sky-500,  .bg-sky-600 { background: var(--fill-strong) !important; }
.bg-blue-50,  .bg-blue-100, .bg-indigo-100 { background: var(--surface) !important; }
.border-blue-200, .border-blue-300, .border-blue-500 { border-color: var(--rule) !important; }

.bg-violet-50,  .bg-indigo-50,  .bg-purple-50,
.bg-sky-50,     .bg-cyan-50 {
  background: var(--brand-wash) !important;
}
.bg-violet-100, .bg-indigo-100, .bg-purple-100,
.bg-sky-100,    .bg-cyan-100 {
  background: var(--surface) !important;
}
.border-violet-100, .border-indigo-100, .border-purple-100 { border-color: var(--surface) !important; }
.border-violet-200, .border-indigo-200, .border-purple-200 { border-color: var(--brand-pale) !important; }
.border-violet-300, .border-violet-400, .border-violet-500,
.border-indigo-300, .border-indigo-400, .border-indigo-500 { border-color: var(--brand) !important; }
.bg-violet-500, .bg-violet-600, .bg-indigo-500, .bg-indigo-600,
.bg-purple-500, .bg-purple-600 { background: var(--brand) !important; }
.bg-violet-700, .bg-indigo-700, .bg-purple-700 { background: var(--brand-2) !important; }
.ring-violet-400, .ring-indigo-400, .ring-purple-400 { --tw-ring-color: var(--brand-pale) !important; }

/* Status families keep their meaning, and now their ground. A chip that says
   "over budget" on the same grey as one that says "approved" is a chip that
   has to be read rather than seen. */
.bg-emerald-50, .bg-green-50   { background: var(--healthy-wash) !important; }
.bg-emerald-100, .bg-green-100 { background: var(--healthy-wash) !important; }
.border-emerald-100, .border-emerald-200,
.border-green-100, .border-green-200 { border-color: var(--healthy-rule) !important; }

.bg-amber-50, .bg-orange-50, .bg-yellow-50   { background: var(--caution-wash) !important; }
.bg-amber-100, .bg-orange-100, .bg-yellow-100 { background: var(--caution-wash) !important; }
.border-amber-100, .border-amber-200,
.border-orange-100, .border-orange-200 { border-color: var(--caution-rule) !important; }

.bg-rose-50, .bg-red-50, .bg-pink-50    { background: var(--alert-wash) !important; }
.bg-rose-100, .bg-red-100, .bg-pink-100 { background: var(--alert-wash) !important; }
.border-rose-100, .border-rose-200,
.border-red-100, .border-red-200 { border-color: var(--alert-rule) !important; }

.text-emerald-700, .text-emerald-800, .text-emerald-900,
.text-green-700, .text-green-800 { color: var(--ink-2) !important; }
.text-amber-700, .text-amber-800, .text-amber-900,
.text-orange-700, .text-orange-800 { color: var(--ink-2) !important; }
.text-rose-700, .text-rose-800, .text-rose-900,
.text-red-700, .text-red-800 { color: var(--signal-over) !important; }

/* Only what genuinely has no state stays grey. */
.bg-gray-50, .bg-slate-50   { background: var(--paper-2) !important; }
.bg-gray-100, .bg-slate-100 { background: var(--paper-3) !important; }

/* Status semantic tones — keep status colors functional */
.text-emerald-600, .text-green-600 { color: var(--status-healthy) !important; }
.text-amber-600,   .text-orange-600 { color: var(--status-caution) !important; }
.text-rose-600,    .text-red-600    { color: var(--status-alert) !important; }
.bg-emerald-500 { background: var(--status-healthy) !important; }
.bg-amber-500   { background: var(--status-caution) !important; }
.bg-rose-500, .bg-red-500 { background: var(--status-alert) !important; }

/* Tailwind grey ramp → Specter ink */
.text-gray-400, .text-slate-400 { color: var(--ink-4) !important; }
.text-gray-500, .text-slate-500 { color: var(--ink-3) !important; }
.text-gray-600, .text-slate-600 { color: var(--ink-2) !important; }
.text-gray-700, .text-slate-700,
.text-gray-800, .text-slate-800,
.text-gray-900, .text-slate-900 { color: var(--ink) !important; }

.bg-gray-50,  .bg-slate-50  { background: var(--paper) !important; }
.bg-gray-100, .bg-slate-100 { background: var(--paper-2) !important; }

/* Tailwind border weights map to Specter's two-rule system:
 * gray-100 is the within-card / divider color (subtle);
 * gray-200 is the card/module outer border (default — slightly
 * darker so module grouping reads clearly);
 * gray-300 is the focus / emphasis weight. */
.border-gray-100,
.border-slate-100 { border-color: var(--rule-subtle) !important; }
.border-gray-200,
.border-slate-200 { border-color: var(--rule) !important; }
.border-gray-300,
.border-slate-300 { border-color: var(--rule-2) !important; }

/* divide-y is used for stacked rows inside a card — should read as
 * "same group", so use the subtle weight. */
.divide-gray-100 > * + *,
.divide-slate-100 > * + *,
.divide-gray-200 > * + *,
.divide-slate-200 > * + * { border-color: var(--rule-subtle) !important; }

/* Colored Tailwind borders (whatever the page declared) → calm hairline
 * at module weight. Anything wrapping a card uses this; intentional
 * status emphasis (e.g. an alert left-bar) belongs on .sp-status-* /
 * inline style and isn't touched. */
.border-violet-100, .border-violet-200, .border-violet-300, .border-violet-400, .border-violet-500,
.border-indigo-100, .border-indigo-200, .border-indigo-300,
.border-purple-100, .border-purple-200, .border-purple-300,
.border-sky-100,    .border-sky-200,
.border-cyan-100,   .border-cyan-200,
.border-emerald-100, .border-emerald-200,
.border-green-100,   .border-green-200,
.border-amber-100,   .border-amber-200,
.border-orange-100,  .border-orange-200,
.border-rose-100,    .border-rose-200,
.border-red-100,     .border-red-200 {
  border-color: var(--rule) !important;
}

/* Inline-style gradients (used by buttons / hero accents) → oxblood */
[style*="linear-gradient(135deg, #1C98E8"],
[style*="linear-gradient(135deg,#1C98E8"],
[style*="linear-gradient(135deg, #0057AE"],
[style*="linear-gradient(135deg,#0057AE"],
[style*="linear-gradient(135deg, #1C98E8"],
[style*="linear-gradient(135deg,#1C98E8"],
[style*="linear-gradient(135deg, #EC4899"],
[style*="linear-gradient(135deg,#EC4899"] {
  background: var(--oxblood) !important;
}
[style*="background-color: #0057AE"],
[style*="background-color:#0057AE"],
[style*="background-color: #1C98E8"],
[style*="background-color:#1C98E8"] {
  background-color: var(--oxblood) !important;
}

/* ── Surfaces ─────────────────────────────────────────────────────── */
.bg-white { background: var(--paper) !important; }

/* Flat — kill shadows globally. Hairline rule only. */
.shadow-sm,
.shadow,
.shadow-md,
.shadow-lg,
.shadow-xl,
.shadow-2xl,
.elm-card,
.card-hover {
  box-shadow: none !important;
}
.elm-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.elm-card:hover { border-color: var(--rule-2); }
.card-hover { transition: border-color 0.15s ease, background 0.15s ease; }
.card-hover:hover {
  border-color: var(--rule-2) !important;
  background: var(--paper-2);
  transform: none !important;
}

/* One radius. */
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl { border-radius: var(--radius) !important; }
.rounded-full { border-radius: 9999px !important; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--fill-strong);
  color: var(--on-dark);
  font-weight: 500;
  border-radius: var(--radius);
  padding: 6px 12px;
  transition: background 0.12s ease;
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--fill-strong-2);
  box-shadow: none;
  transform: none;
}
.btn-primary:active { transform: none; }

/* ── Focus rings ──────────────────────────────────────────────────── */
input, textarea, select {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
/* Autofill paints its own ground, and the browser will not let a background
   through -- an inset shadow the size of the field is the way to cover it. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
}

/* BRAND.md: "Inputs ... Focus: Coral ring." This rule is `:focus` rather
   than `:focus-visible`, so it outranks the conformance layer's ring on an
   input and has to carry the same colour -- otherwise a clicked field and a
   tabbed-to field ring differently for no reason a reader could name. */
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── Spinner ──────────────────────────────────────────────────────── */
@keyframes elm-spin { to { transform: rotate(360deg); } }
.elm-spinner {
  animation: elm-spin 0.7s linear infinite;
  border: 2px solid var(--rule);
  border-top-color: var(--oxblood);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
}

/* ── Toast ────────────────────────────────────────────────────────── */
#toast-container > div {
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-pop);
  border-radius: var(--radius);
}

/* ── AI accents (sparkle, ai-badge, ai-glow) — quieted ───────────── */
.sparkle, .ai-badge {
  background: transparent;
  color: var(--oxblood);
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
  font-weight: 500;
}
.ai-glow { box-shadow: none; border: 1px solid var(--rule); }

/* ── Typography classes (legacy + new) ───────────────────────────── */
.text-page-title {
  font-size: 1.25rem;     /* 20px — calmer than the old 24px bold */
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}
.text-section-header {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: 0;
}
.text-body {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
}
.text-meta {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-3);
}
.text-eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-3);
}

/* ── Links ────────────────────────────────────────────────────────── */
a.elm-link {
  color: var(--oxblood);
  font-weight: 500;
  transition: color 0.1s ease;
}
a.elm-link:hover { color: var(--oxblood-2); }

/* ── Table rows — quiet hover ────────────────────────────────────── */
table tbody tr { transition: background-color 0.1s ease; }
table tbody tr:hover { background-color: var(--paper-2); }

/* ── Scrollbar — thin slate ──────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rule-2);
  border-radius: var(--radius);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ── Badges — flat, monochrome by default ────────────────────────── */
.badge-sm {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
}


/* ─────────────────────────────────────────────────────────────────
 * SPECTER PRIMITIVES (sp-*)
 *
 * Promoted from the matter-detail scoped block so every template
 * can use them. Designed to be the lego pieces of the new system —
 * once these are everywhere, pages feel consistent without each
 * template re-inventing its own card / chip / button.
 * ───────────────────────────────────────────────────────────────── */

/* Eyebrow + label — sentence case, light weight, muted ink */
.sp-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: none;   /* spec: sentence case */
  letter-spacing: 0.1em;
}

/* Card — flat paper surface, module-weight outer border, single radius */
.sp-card,
.sp-card-quiet,
.sp-card--quiet {
  background: var(--paper);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-lg);
  box-shadow: none;   /* spec: shadows on overlays only */
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.sp-card-tinted {
  background: var(--paper-2);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-lg);
}

/* A card's own title. It was the same weight as the sentence under it. */
.sp-card h2, .sp-card h3 {
  letter-spacing: -0.01em;
}

/* Section header *inside* a card — subtle rule (same-group reading) */
.sp-section-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--rule-subtle);
}
.sp-section-header .sp-eyebrow { color: var(--ink-2); }
.sp-section-header h2,
.sp-section-header h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 2px;
}

/* Divider — module-weight hairline, used between sections */
.sp-divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 24px 0;
}
.sp-divider--subtle {
  background: var(--rule-subtle);
  margin: 16px 0;
}

/* Chip — uniform monochrome */
.sp-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

/* Status dot — functional palette only */
.sp-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  margin-right: 6px;
  vertical-align: middle;
}
.sp-status-healthy { background: var(--status-healthy); }
.sp-status-caution { background: var(--status-caution); }
.sp-status-alert   { background: var(--status-alert); }
.sp-status-neutral { background: var(--ink-4); }

/* Empty states, inline — a quiet value in a field that has none. For a whole
   panel with nothing in it, use .sp-empty-block below. These were both called
   .sp-empty; the block one won the cascade, so every inline "Unassigned" in
   the app was really a 28px centred box whose padding, on a <span>, overflowed
   onto whatever sat above it. */
.sp-empty {
  color: var(--ink-4);
  font-style: normal;
  font-weight: 400;
}

/* Buttons */
.sp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: white;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: none;   /* spec: shadows on overlays only */
  transition: background 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}
.sp-btn-primary:hover {
  background: var(--brand-2);
  color: white;
  box-shadow: none;   /* spec: shadows on overlays only */
}
.sp-btn-primary:active { transform: translateY(1px); box-shadow: none; }
.sp-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.sp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.sp-btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--rule-2);
}

/* Inline action link.
 * Quiet ink-2 with an underline — readable as an affordance without
 * burning oxblood, which is reserved for the page's one primary CTA.
 * On hover, the underline thickens slightly via text-decoration-thickness. */
.sp-link {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
  cursor: pointer;
}
.sp-link:hover {
  color: var(--ink);
  text-decoration-color: var(--ink-3);
}

/* AI-authored prose. It takes the app's own face -- the serif it used to be
   set in was retired on 2026-09-19 -- so this carries only the colour, and the
   measure and leading come from the conformance block at the foot of the file. */
.sp-ai-prose {
  color: var(--ink-2);
  font-weight: 400;
}

/* Subtle in-card action affordance (the "Re-run" / "Edit" pattern) */
.sp-card-action {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}
.sp-card-action:hover { color: var(--ink); }

/* Rail link — quiet left-rail action */
.sp-rail-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: var(--radius);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.sp-rail-link:hover {
  background: var(--paper-2);
  color: var(--ink);
}

/* Stat tile — used on home, my-tasks, matters list, template list */
.sp-stat-tile {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.sp-stat-tile .label {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0;
}
.sp-stat-tile .value {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
  line-height: 1.2;
}

/* Phase rail (matter detail).
 * Fill uses ink, not oxblood — oxblood is reserved for the page's one
 * primary action. The rail's job is "where am I in the sequence,"
 * which reads fine in monochrome since it's the only progress widget
 * on the page. */
.sp-phase-rail {
  height: 4px;
  background: var(--paper-3);
  border-radius: 0;
  overflow: hidden;
}
.sp-phase-rail-fill {
  height: 100%;
  background: var(--data-2);
  border-radius: 0;
  transition: width 0.3s ease;
}

/* Attention strip (matter detail) */
.sp-attention {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.sp-attention-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  align-items: center;
}
.sp-attention-item + .sp-attention-item {
  border-top: 1px solid var(--rule);
}


/* ── Gold: the highlight that is never interactive ───────────────── */
/* Blue is for things you can act on. Gold marks something worth noticing
 * that you cannot click — a pending state someone else owns, a value that
 * stands out in a table. It is fill and rule, never text: var(--ink-2) on light
 * paper is around 1.7:1, nowhere near readable. */
.highlight-rule {
  border-left: 3px solid var(--gold);
  background: var(--gold-wash);
}
.highlight-dot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 6px;
  vertical-align: middle;
}
/* Amber chips already in the markup are the same idea, so they inherit it
 * rather than staying a fourth colour. Text stays dark for contrast. */
.bg-amber-50, .bg-amber-100, .bg-yellow-50, .bg-yellow-100 {
  background: var(--gold-wash) !important;
}
.border-amber-200, .border-amber-300, .border-yellow-200, .border-yellow-300 {
  border-color: var(--gold) !important;
}
.text-amber-800, .text-amber-900, .text-yellow-800, .text-yellow-900 {
  color: var(--ink) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   HIERARCHY LAYER
   ══════════════════════════════════════════════════════════════════════
   The palette was fine; the problem was that everything carried the same
   visual weight. Five identical stat tiles, cards that are all the same
   hairline box, and — worst — an urgency signal rendered as a 6px dot at
   the far right of a 1200px row, a thousand pixels from the matter it
   describes. Nothing told the eye where to land.

   This layer adds hierarchy without reintroducing shadows, which the flat
   stance above deliberately removed. In a flat system contrast has to come
   from five other places:

     1. weight   — a real jump between levels, not 400 vs 500
     2. scale    — display numbers that behave like numbers
     3. ground   — a tinted surface marks "this one matters"
     4. rails    — a 3px left edge the eye can follow down a table
     5. rhythm   — density that groups, instead of even air that doesn't

   The governing rule: put the signal next to the thing it describes.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Numerals ──────────────────────────────────────────────────────────
   Proportional figures make columns of money ragged and uncomparable —
   a "1" occupies less space than a "8", so totals never line up. Every
   number in a spend system should be tabular. Applied broadly rather than
   opt-in, because the failure is silent: nobody reports "my column is
   slightly misaligned", they just trust the numbers less. */
table, .sp-stat-tile .value, .sp-metric, .sp-num,
td, th, [class*="tabular"] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── Type scale ────────────────────────────────────────────────────────
   The old scale ran 11px → 22px with weights 400 → 500. That is a third
   of an octave; on screen it reads as one size. These jumps are wide
   enough to establish rank at a glance. */
.sp-display {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;   /* large text needs negative tracking */
  color: var(--ink);
}
.sp-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sp-subtitle {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-3);
}
/* The eyebrow already existed but was set too close to body size to read
   as a different register. Small caps + wide tracking is what makes a
   label recede into being a label. */
.sp-eyebrow, .text-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: none;   /* spec: sentence case */
  color: var(--ink-4);
  line-height: 1;
}

/* ── Severity rails ────────────────────────────────────────────────────
   The fix for the dot-at-the-far-right problem. A rail on the leading
   edge sits beside the row's identity, and the eye can run down the left
   margin and find every urgent row without reading a word.

   Escalation is by weight as well as hue, so severity survives greyscale,
   projection, and colour-blindness — three failure modes a colour-only
   signal shares. */
[data-severity] { --rail: transparent; --rail-w: 3px; }
[data-severity="info"]     { --rail: var(--rule-2); }
[data-severity="low"]      { --rail: var(--brand-pale); }
[data-severity="medium"]   { --rail: var(--status-caution); }
[data-severity="high"]     { --rail: var(--status-alert); }
[data-severity="critical"] { --rail: var(--status-alert); --rail-w: 5px; }

tbody tr[data-severity] > td:first-child,
.sp-rail-item[data-severity] {
  box-shadow: inset var(--rail-w) 0 0 var(--rail);
}
/* A ground tint for critical rows was tried and removed. The idea was sound —
   reserve a tint for the top severity — but it assumed top severity is rare.
   In a real portfolio 6 of 14 rows came back critical, and a tint on 40% of a
   table is just a red table: it stops discriminating and costs the contrast it
   was meant to create. The rail width, the count and the deadline colour carry
   severity on their own. Left here as a note so it does not get re-added. */

/* ── Tables ────────────────────────────────────────────────────────────
   Denser rows, a header that stays put, and a hover rail. The old rows
   were ~44px of even air: comfortable in isolation, but with no grouping
   the eye drifts sideways and loses the line it was reading. */
table thead th {
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: none;   /* spec: sentence case */
  color: var(--ink-3);
  padding: 9px 12px;
  white-space: nowrap;
}
table tbody td { padding: 9px 12px; vertical-align: middle; }
table tbody tr { transition: background 0.12s ease, box-shadow 0.12s ease; }
table tbody tr:hover { background: var(--paper-2); }
/* Hover reveals a brand rail on rows that have no severity of their own,
   so the affordance is consistent: the left edge always tells you where
   you are. */
table tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 var(--rail, var(--brand)); }

/* Numeric and temporal columns align right — the only alignment that lets
   magnitudes be compared by shape rather than by reading. */
td.sp-num, th.sp-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Same reasoning as .sp-nil: a placeholder word is still an absence. */
.sp-unassigned {
  color: var(--ink-4);
  font-size: 11px;
  font-style: normal;
}

/* Absent data should recede, not compete. A column of em-dashes at body
   weight reads as content; at this weight it reads as "nothing here". */
.sp-nil { color: var(--ink-4); font-size: 11px; }

/* ── Stat tiles ────────────────────────────────────────────────────────
   Same primitive, but with a rank. Five identical tiles is five things
   of equal importance, which is the same as none. */
.sp-stat-tile {
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sp-stat-tile .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;   /* spec: sentence case */
  color: var(--ink-4);
}
.sp-stat-tile .value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 6px;
}
/* The context line is what turns a number into information. "14" is a
   digit; "14 · 3 more than last week" is a fact. */
.sp-stat-tile .context {
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.3;
}

/* The focus variant. At most one per strip — the moment there are two,
   the emphasis cancels out. */
.sp-stat-tile--focus {
  background: var(--brand-wash);
  border-color: var(--brand-pale);
  box-shadow: inset 3px 0 0 var(--brand);
}
.sp-stat-tile--focus .label { color: var(--brand-2); }
.sp-stat-tile--focus .value { color: var(--ink); }

/* An alert variant for a count that is a problem by definition — overdue,
   overrun. Zero should NOT use it: a calm zero is good news, and styling
   good news as an alarm is how people learn to ignore alarms. */
.sp-stat-tile--alert {
  background: var(--signal-over-wash);
  border-color: rgba(162, 69, 58, 0.30);
  box-shadow: inset 3px 0 0 var(--status-alert);
}
.sp-stat-tile--alert .label { color: var(--status-alert); }

/* A zero deserves to look like an absence rather than a measurement. */
.sp-stat-tile .value.is-zero { color: var(--ink-4); font-weight: 500; }

/* ── Micro bar ─────────────────────────────────────────────────────────
   Proportion at a glance, in the width of a table cell. Deliberately
   unlabelled — it is a shape for comparison, and the exact figure sits
   next to it in text. */
.sp-stat-tile:has(.sp-spark) { padding-bottom: 14px; }
.sp-spark {
  height: 4px;
  border-radius: 2px;
  background: var(--rule-subtle);
  overflow: hidden;
  margin-top: 8px;
}
.sp-spark > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--data-2);
}
.sp-spark--caution > span { background: var(--status-caution); }
.sp-spark--alert   > span { background: var(--status-alert); }

/* ── Status pills ──────────────────────────────────────────────────────
   Dot plus text. The dot carries the state for a fast scan, the text
   carries it for everyone the dot fails — small screens, greyscale,
   colour-blind readers. */
.sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 6px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.sp-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
  flex: none;
}
.sp-pill--healthy { background: var(--signal-under-wash); border-color: rgba(110,168,137,0.35); color: var(--signal-under); }
.sp-pill--healthy::before { background: var(--status-healthy); }
.sp-pill--caution { background: var(--signal-review-wash); border-color: rgba(217,169,74,0.35); color: var(--signal-review); }
.sp-pill--caution::before { background: var(--status-caution); }
.sp-pill--alert   { background: var(--signal-over-wash); border-color: rgba(199,107,95,0.35); color: var(--signal-over); }
.sp-pill--alert::before { background: var(--status-alert); }

/* ── Section headers ───────────────────────────────────────────────────
   A rule that runs to the edge, with the label sitting on it. Cheap,
   flat, and it does what a shadow would otherwise be asked to do: say
   "a new group starts here". */
.sp-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 12px;
}
.sp-section::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-subtle);
}

/* ── Focus ─────────────────────────────────────────────────────────────
   A visible keyboard focus ring. Its absence is both an accessibility
   failure and the main reason an interface feels dated the moment you
   stop using the mouse.

   The conformance layer at the foot restates this at the same specificity
   and therefore wins; it is kept in step anyway, because a reader comparing
   the two should not find two answers. */
:where(a, button, [role="button"], input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ── Empty states, whole-panel ─────────────────────────────────────────
   A sentence floating in a box reads like a rendering failure. A bounded
   block reads like an answer. Use on a block element, never a span. */
.sp-empty-block {
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.sp-empty-block strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 2px;
}

/* Page titles were 20px/500 — only a step above body text, so a page never
   announced itself. Raised here rather than per-template so every screen
   moves together. */
.text-page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* ---------------------------------------------------------------------------
   The signed-in person, in the chrome
   ---------------------------------------------------------------------------
   This was a single initial on a 12%-white circle with the name at 72%
   opacity: legible and saying nothing. On a platform where every approval,
   every override and every budget carries somebody's name, the person acting
   should be the most present thing in the bar after the brand mark.
*/
/* `.topnav-identity`, `.topnav-avatar` and `.topnav-link` are gone with the
   dark top bar they belonged to: the identity block is the foot of the
   Charcoal sidebar now and the destinations are its nav. They were kept for a
   moment "in case a template still named one", and no template did -- which
   is the shape of dead CSS that outlives what it styled and then quietly
   contradicts the brand from a rule nobody reads. */


/* ---------------------------------------------------------------------------
   Brand in the components that actually paint the pages
   ---------------------------------------------------------------------------
   Two attempts at this changed colour *classes*, and the pages barely use
   them: the dashboard delivers eleven colour-class uses and fifty-four inline
   `var(--…)` tokens. What paints this platform is the `sp-*` components and
   the tokens behind them, and they were drawn deliberately quiet — white
   cards, grey rules, grey section labels, grey chips, one flat blue button.
   Restraint is a choice, and this much of it reads as unfinished.

   Everything below is the shared layer, so it lands on every page at once.
   Loaded last, so it wins on order without needing `!important`.
*/

/* Section labels. These sit above almost every block in the app and were the
   same grey as the body text under them — the label and the content read as
   one undifferentiated column. */
.sp-eyebrow {
  color: var(--brand-2);
  font-weight: 700;
  letter-spacing: 0.09em;
}

/* Page titles carry weight now. 20px at weight 500 in navy is a paragraph
   that happens to be first. */
.text-page-title {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Cards: a real edge and a real lift, so a page of them reads as a stack of
   surfaces rather than as ruled paper. */
.sp-card,
.sp-card-quiet,
.sp-card--quiet {
  border-color: var(--rule-subtle);
  box-shadow: none;   /* spec: shadows on overlays only */
}
.sp-card:hover {
  box-shadow: none;   /* spec: shadows on overlays only */
  border-color: var(--rule);
}

/* Figures are the point of a stat tile, and they were the same size and
   colour as the label above them. A brand rule along the top ties the row
   together and gives the page somewhere to start. */
.sp-stat-tile {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule-subtle);
  box-shadow: none;   /* spec: shadows on overlays only */
  overflow: hidden;
}
.sp-stat-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--rule-strong);   /* spec: no gradients */
}
.sp-stat-tile .value {
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.sp-stat-tile .label {
  color: var(--ink-3);
  font-weight: 600;
  text-transform: none;   /* spec: sentence case */
  letter-spacing: 0.06em;
  font-size: 10px;
}

/* The primary action should look like one. */
.btn-primary {
  background: var(--fill-strong);   /* spec: no gradients */
  font-weight: 600;
  box-shadow: none;   /* spec: shadows on overlays only */
}
.btn-primary:hover {
  background: var(--fill-strong-2);   /* spec: no gradients */
  box-shadow: none;   /* spec: shadows on overlays only */
}

/* A chip is a label with a state. The default was grey on grey. */
.sp-chip {
  background: var(--brand-wash);
  color: var(--brand-2);
  border-color: var(--surface);
  font-weight: 600;
}

/* Left bar: the active item is where you are, and it read as slightly bolder
   grey. */
.leftbar-item.is-active {
  background: var(--brand-wash);
  color: var(--brand-2);
  font-weight: 650;
  box-shadow: inset 3px 0 0 var(--brand);
}
.leftbar-eyebrow {
  color: var(--brand-2);
  font-weight: 700;
}

/* Table headers, which are on almost every list in the app. */
thead th {
  color: var(--ink-2);
  background: var(--paper-2);
}

/* ---------------------------------------------------------------------------
   Home — the page people land on
   ---------------------------------------------------------------------------
   This was the plainest screen in the product: a black heading on the page's
   own background, seven white panels separated by hairline greys, and grey
   micro-labels above each. The components underneath it were already branded;
   the page simply did not use them, so three previous passes at "make it look
   less plain" landed nowhere near it.
*/
.home-hero {
  background: var(--surface);   /* spec: no gradients */
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: none;   /* spec: shadows on overlays only */
}
.home-hero-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--on-dark);
  background: var(--fill-strong);
  box-shadow: none;   /* spec: shadows on overlays only */
}
.home-hero-greeting {
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-2);
}
.home-hero-name {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 1px;
}
.home-hero-sub {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-2);
  margin-top: 3px;
}

/* Panels: a brand hairline along the top edge, so a column of them reads as a
   set of cards rather than as a ruled page. */
.home-panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-lg);
  box-shadow: none;   /* spec: shadows on overlays only */
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
/* The accent moved from the top edge to the left, and it carries state
   rather than decorating. A stripe every card gets regardless of what is in
   it is a stripe nobody reads; a rail you can run your eye down to find the
   panel that needs you is information. `data-state` is set from what the
   panel actually rendered — see `refreshPanelStates` in home.html. */
.home-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: var(--ink-2);   /* spec: no gradients */
  transition: background 200ms ease;
}
.home-panel[data-state="attention"]::before {
  background: var(--needs-you);   /* spec: no gradients */
}
.home-panel[data-state="urgent"]::before {
  background: var(--needs-you);   /* spec: no gradients */
}
/* Nothing waiting is worth showing as calm rather than as absence. */
.home-panel[data-state="clear"]::before {
  background: var(--ink-2);   /* spec: no gradients */
  opacity: 0.55;
}

/* The identity half: a gradient tile holding the section's own icon. This is
   the part that makes a column of cards read as designed rather than ruled —
   the accent is an object with a meaning, not a line. */
.home-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: var(--radius);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  transition: background var(--motion) ease, color var(--motion) ease;
}
.home-panel-icon svg { width: 17px; height: 17px; }
.home-panel:hover .home-panel-icon {
  transform: none;   /* spec: no hover lifts */
  box-shadow: none;   /* spec: shadows on overlays only */
}
/* The tile follows the spine, so identity and state read as one object. */
.home-panel[data-state="attention"] .home-panel-icon {
  background: var(--canvas);
  border-color: var(--ink-2);
  color: var(--ink);
}
.home-panel[data-state="urgent"] .home-panel-icon {
  background: var(--needs-you);
  border-color: var(--needs-you);
  color: var(--on-dark);
}
.home-panel:hover {
  box-shadow: none;   /* spec: shadows on overlays only */
  border-color: var(--rule);
}
.home-panel-head {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--rule-subtle);
  background: var(--surface);   /* spec: no gradients */
}
.home-panel[data-state="attention"] .home-panel-head {
  background: var(--surface);   /* spec: no gradients */
}
.home-panel[data-state="urgent"] .home-panel-head {
  background: var(--needs-you-wash);   /* spec: needs-you */
}
.home-panel[data-state="attention"] .home-panel-eyebrow { color: var(--ink-2); }
.home-panel[data-state="urgent"] .home-panel-eyebrow { color: var(--needs-you); }
.home-panel-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: none;   /* spec: sentence case */
  letter-spacing: 0.12em;
  color: var(--brand-2);
}
.home-panel-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 1px;
}

/* ---------------------------------------------------------------------------
   Brand mark
   ---------------------------------------------------------------------------
   "ELM" was the category — Enterprise Legal Management — set in the same
   weight as the nav links beside it, with a book glyph that lost its two
   interior lines at 16px. The wordmark now carries its own weight and the
   glyph says what the product does: spend, read through a lens.
*/
/* ── The lockup ────────────────────────────────────────────────────────
   Mark and wordmark as one object, in the proportions of
   `brand/kendres-lockup.svg` rather than eyeballed against it. In that file
   the mark's artwork is 36 units, the wordmark is `font-size: 52` and the gap
   between them is 14 -- so both follow one size here and the ratios are
   written as the division that produced them.

   `--lockup-mark` is the one thing a placement sets. The nav takes 18px,
   which puts the wordmark at 26px and keeps the mark clear of BRAND.md's
   16px minimum; login takes 34px.

   They sit on a shared **baseline**, which is how the file draws it: the
   mark's bars stand at y42 and the wordmark's baseline is at y49 -- one unit
   apart at that scale, the mark the lower.

   `align-items: baseline`, **not** `flex-end`, and that difference is the
   whole alignment. A flex item with no baseline of its own -- which an SVG
   is -- has one synthesised from its bottom margin edge, so baseline
   alignment stands the mark's feet exactly on the wordmark's baseline.
   `flex-end` aligns the *boxes*, and a text box extends below its baseline
   by the font's descent: measured in the browser, that put the mark 3.3px
   low at nav size and 6.8px low at login size. A misalignment that grows
   with the size is the tell that something is being aligned to the wrong
   edge, and it reads as a mark that has slipped rather than as anything
   anyone would report.

   The one unit that remains is the file's own offset, written as the
   division that produced it so it holds at any size. The mark this replaced
   centred on the wordmark's **cap height** instead, because the old wordmark
   had a descender in "Spend" dragging its box down; "Kendres" has
   none, so the artwork's own alignment is available and is the honest one. */
.lockup {
  --lockup-mark: 18px;
  display: inline-flex;
  align-items: baseline;
  gap: calc(var(--lockup-mark) * 14 / 36);
  text-decoration: none;
  line-height: 1;
}
.lockup-mark {
  height: var(--lockup-mark);
  width: auto;
  display: block;
  /* One grid unit low, per the file. Negative, because it lifts the margin
     edge the baseline is synthesised from and so drops the artwork by it. */
  margin-bottom: calc(var(--lockup-mark) * -1 / 36);
}
.lockup-word {
  font-family: var(--font-sans);
  font-size: calc(var(--lockup-mark) * 52 / 36);
  font-weight: 800;              /* BRAND.md: the wordmark is always 800 */
  letter-spacing: -0.045em;      /* = the file's -2.3 at font-size 52 */
  color: var(--mark-ink);        /* the wordmark takes the mark's neutral */
}

/* The ground is declared, never inferred. Put this on whatever paints the
   dark surface; the mark and the wordmark both read `--mark-ink`, so one
   override turns the whole lockup over. */
.brand-on-dark { --mark-ink: var(--kendres-mist-light); }

/* ── The sign-in screen's brand block ──────────────────────────────────
   A larger lockup, the slogan, and the category label under it. The order is
   deliberate and it is the brand's: the name, then what the product promises,
   then what kind of thing it is -- a reader who has never seen it needs the
   third and a reader who uses it daily needs none of them, so the smallest
   type carries the one that stops mattering first. */
.login-lockup {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.login-lockup .lockup { --lockup-mark: 34px; }

.login-slogan {
  text-align: center;
  font-size: 17px;
  font-weight: 800;              /* BRAND.md sets the slogan in the wordmark's weight */
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 2px;
}
/* The final period only. BRAND.md asks for it "when set large", and this is
   the one place the slogan is set at all -- the accent lands on a single
   glyph, which is the smallest amount of Coral that can carry a meaning and
   therefore the cheapest against the once-per-screen rule. */
.login-slogan-stop { color: var(--accent); }

.login-label {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);           /* Stone, which BRAND.md gives to labels */
  margin: 0 0 24px;
}

/* The way from the sign-in card to the product tour, for somebody without an
   account. Quiet: the card's job is still signing in. */
.login-tour {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-tour:hover { color: var(--ink); }

/* The product tour page, /demo. */
.demo-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.demo-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.demo-head .lockup { --lockup-mark: 30px; }
.demo-title {
  margin: 20px 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.demo-sub { max-width: 60ch; margin: 0 0 24px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.demo-frame {
  border: 1px solid var(--rule-strong, var(--rule));
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--chrome);
}
.demo-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.demo-foot { display: flex; justify-content: center; margin-top: 24px; }

/* Clear space, per BRAND.md: the height of the tallest bar, which is 28 of
   the mark's 36 units. Asked for by name rather than applied to `.lockup`
   itself, because a lockup inside a flex bar with its own gap would then
   carry the space twice. */
.lockup-clear { padding: calc(var(--lockup-mark, 18px) * 28 / 36); }



/* ─────────────────────────────────────────────────────────────────────
 * Interface spec conformance
 *
 * Loads last, so it settles anything the sections above decided
 * differently. Everything here is a rule from the spec that cannot be
 * expressed as a token: typeface assignment, density, shape, motion, and
 * the prohibited-pattern list.
 * ───────────────────────────────────────────────────────────────────── */

/* ── Type ──────────────────────────────────────────────────────────────
   Two faces. Archivo is the UI, the body, machine-authored prose and
   display; Geist Mono is money, matter IDs, dates and SALI tags, always
   with tabular figures.

   It was three, and losing the serif is what the brand asks for: BRAND.md
   names one typeface and gives display to Archivo 800 rather than to a
   second face. The serif had already lost its job -- it used to be the
   trust signal, a reader telling what a model wrote from across the room,
   and machine prose moved to the sans on 2026-09-19 because that rule
   produced prose nobody wanted to read. What was left was a display face
   with no meaning attached, which is a face the brand does not have.

   The mono is kept, and BRAND.md does not name it. That is a deliberate
   addition rather than an oversight: a money column set in proportional
   digits does not align, and a figure a reader compares down a column is
   not prose. The distinction this codebase draws -- a figure you compare
   versus a sentence you read -- is worth more than a face count. */
body,
button, input, select, textarea, table {
  font-family: var(--font-sans);
}

/* Machine-authored prose is in the sans, like everything else. It was the
   serif, on the reasoning that the typeface is how a reader tells what a model
   wrote without being told -- a good rule that produced prose nobody wanted to
   read. The signal did not go with it: a generated block still carries its
   `Generated {date}` stamp and its panel heading, and a human edit still hides
   the stamp, so what claims to be generated still says so in words rather than
   in a face.

   The measure and the leading stay. They are what makes a paragraph readable
   and have nothing to do with which face it is set in. */
.sp-ai-prose,
.ai-prose,
[data-ai-authored] {
  font-style: normal;
  font-size: 15px;
  line-height: 1.55;
  max-width: 68ch;
  color: var(--ink);
  font-weight: 400;
}

/* Money, matter IDs, dates and SALI tags. Tabular figures are the point:
   a column of amounts that does not align is a column nobody can scan. */
.sp-mono,
.sp-money,
.sp-id,
.tabular-nums {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* One name for the money face. Three rules referenced `--font-mono` before it
   existed, and an undefined custom property does not error -- it inherits. So
   the invoice's headline figures, the rounding mark and the line total were all
   quietly set in the UI face on a screen whose brand rule says money is
   Geist Mono, and nothing said so. */
:root {
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Display. Archivo at 800 with the brand's own negative tracking, which is
   what replaced the serif: BRAND.md sets a page title at "28px, Archivo 800,
   -0.03em" and names no second face, so display is a weight here rather than
   a typeface. 30px is kept as this sheet's display step -- the brand's 28px
   is the page title, and `.sp-display` is the larger thing above it. */
.sp-display {
  font-family: var(--font-sans);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}
/* Two larger steps, for the matter page's hero (2026-10-18): display-xl is a
   title at 56px (32px on a phone), lede a reading paragraph at 30px. Both
   Archivo; display-xl is the 800 weight, lede the 400. */
.sp-display-xl { font-family: var(--font-sans); font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; }
.sp-lede { font-family: var(--font-sans); font-size: 30px; line-height: 1.3; font-weight: 400; letter-spacing: -0.015em; }
@media (max-width: 720px) {
  .sp-display-xl { font-size: 32px; line-height: 1.1; }
  .sp-lede { font-size: 22px; }
}

/* A human edit converts the block to the sans permanently and drops the
   generated stamp. The stamp is the claim; the typeface is the evidence;
   they have to move together or the typeface is lying. */
/* A human edit. It used to convert the paragraph out of the serif, which was
   the trust signal; with machine prose in the sans there is no face to change,
   so the whole of the signal is the stamp below -- which this still removes.
   The size change stays: an edited block is a person's writing and takes the
   app's own body size. */
.sp-ai-prose[data-edited="true"],
.ai-prose[data-edited="true"],
[data-ai-authored][data-edited="true"] {
  font-size: 13px;
  line-height: 1.5;
}

/* ── The primary action ────────────────────────────────────────────────
   **Graphite, not the accent**, and that is the change that frees the accent
   to mean something. BRAND.md is explicit -- "Primary button: Graphite fill,
   Mist text, 600, 38px tall, 6px radius. Hover: Charcoal. One per view."

   Under the old palette this was the parchment fill, so the accent was spent
   on "press this" and "this needs you" had to borrow the review signal to
   avoid putting the accent on screen twice. With the action in Graphite the
   accent has one job again, which is what `--needs-you` now reads.

   Still asked for by name rather than inherited from a colour family, for
   the reason that has not changed: a family resolving to the primary
   treatment would put it on every button on the page. */
.sp-action {
  background: var(--fill-strong);
  color: var(--on-dark);
  border: 1px solid var(--fill-strong);
  font-weight: 600;
}
.sp-action:hover { background: var(--fill-strong-2); border-color: var(--fill-strong-2); }
/* A button that asks for the primary treatment by `.sp-action` alone gets the
   button's shape too (2026-10-17). Twelve did, across eight screens (closing a
   matter, advice, waiting, ops), and rendered as a black box with no padding
   because the colour lived here and the 38px shape lived on `.sp-btn`. */
button.sp-action:not(.sp-btn):not(.sp-btn-primary), a.sp-action:not(.sp-btn):not(.sp-btn-primary) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: var(--radius); font-family: inherit; font-size: 14px; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: background var(--motion) ease, border-color var(--motion) ease;
}
button.sp-action:disabled { opacity: 0.5; cursor: not-allowed; }

/* The money figure, when it is the thing the screen is about. **The face is
   what sets it apart, not a colour.**

   It was the accent, under a rule that let a screen spend parchment on either
   the primary action or the headline figure but never both. That rule is gone
   with the colour: Coral measures 3.01:1 on a card, and a figure the screen is
   about is the last thing that should be the hardest text on it to read. The
   accent-family text cut would pass, and it would still be wrong -- BRAND.md
   gives the accent to the one thing needing attention, and a total is a fact
   rather than an errand.

   So the figure is Graphite at the mono's tabular width, which is the same
   distinction the line table already draws: the number and the amount are
   mono because a reader compares them down a column. */
.sp-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.sp-ai-prose[data-edited="true"] + .sp-ai-stamp,
[data-ai-authored][data-edited="true"] + .sp-ai-stamp { display: none; }

.sp-ai-stamp {
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-3);
  margin-top: var(--space-2);
}

/* The scale, entire. Six steps, each doing one job. */
.t-11 { font-size: 11px; line-height: 16px; }
.t-12 { font-size: 12px; line-height: 18px; }
.t-13 { font-size: 13px; line-height: 20px; }
.t-15 { font-size: 15px; line-height: 22px; }
.t-19 { font-size: 19px; line-height: 26px; }
.t-24 { font-size: 24px; line-height: 30px; }

/* Sentence case, **except for the brand's own small-caps label.**

   This read `.uppercase, .sp-eyebrow, .text-eyebrow, th, .sp-section` with
   `!important` on both properties, and the bare `th` in it is what kept
   every table header in sentence case after the component layer gave them
   BRAND.md's label -- 11px, 600, 0.14em, uppercase. The header took the
   size, the weight and the colour from the new rule and had the two
   properties that make it a *label* forced back off by this one.

   It survived because `test_all_caps_is_the_brands_label_and_nothing_else`
   only looks for `text-transform: uppercase` outside the allowlist. It never
   asked whether something was forcing `none` back on, so the check that
   governs all-caps could not see the rule defeating it. That check now looks
   both ways.

   `.uppercase` stays: a template reaching for the utility is styling
   arbitrary text rather than asking for the label, which is the distinction
   the whole rule is about. `.text-eyebrow` and `.sp-section` stay with it --
   they predate the label and are used on sentences. `.sp-eyebrow` leaves with
   `th`, because "Accrued" and "Forecast vs budget" are exactly the micro-label
   the brand specifies. */
.uppercase, .text-eyebrow, .sp-section {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* ── Density ───────────────────────────────────────────────────────────
   34px rows, so a 900px viewport carries thirty of them. The comfortable
   setting is a user preference and is opted into on the table element,
   never applied by a screen on its own initiative. */
table { border-collapse: collapse; width: 100%; }

/* No `position: sticky` here. A sticky header is only meaningful inside a
   scroll container; on a table that has none it sticks to the *viewport* and
   floats over the card behind it, which is how the intelligence page came to
   have its content covered by its own header rules. Twenty-five templates
   have a bare table. The stickiness belongs to `.sp-table-scroll`, which is
   the thing that scrolls, and that is where it lives. */
/* The header is a band, not a row of labels. It carried `--surface`, which
   on the light setting is the same white as the card under it, so it had no
   edge at all -- and 400 weight in --ink-2 gave it no rank either. */
table thead th {
  background: var(--paper-3);
  border-bottom: 1px solid var(--rule-strong);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 10px;
  height: var(--row-h);
  text-align: left;
  white-space: nowrap;
}

table tbody td {
  padding: 0 10px;
  height: var(--row-h);
  font-size: 12px;
  line-height: 18px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

table[data-density="comfortable"] tbody td,
table[data-density="comfortable"] thead th { height: var(--row-h-comfy); }

/* Zebra, and it has to differ from the card it sits on. It was `--surface`,
   which is the card's own white on the light setting: the stripe, the hover
   and the header were all painting the ground they sat on, so a table of
   thirty rows had no banding, no hover and no header edge. Three separate
   states, one colour, none of them visible. */
/* The odd rows need a ground of their own or the stripe steps from whatever
   the table happens to be sitting on -- which on these screens is the page,
   so the banding measured 1.05:1 and read as nothing. On white it is 1.12:1:
   visible as banding, still quiet enough not to stripe. */
table tbody { background: var(--surface); }
table tbody tr:nth-child(even) { background: var(--paper-2); }

/* Hover is a state change, not a lift: no shadow, no transform. It has to be
   darker than the zebra or it disappears on every other row. */
table tbody tr { transition: background var(--motion) ease; }
table tbody tr:hover,
table tbody tr:nth-child(even):hover { background: var(--paper-3); }
table tbody tr:hover > td:first-child { box-shadow: none; }

/* Zero radius on cells and rows, both directions. */
table, table tr, table td, table th { border-radius: 0 !important; }

/* Needs-you rows, and only those, take the wash. */
table tbody tr[data-needs-you="true"],
table tbody tr[data-needs-you="true"]:nth-child(even) { background: var(--needs-you-wash); }

/* Money and counts: tabular, right aligned, symbol in the header. */
td.sp-num, th.sp-num, td[data-num], th[data-num] {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── Status without colour ─────────────────────────────────────────────
   One pill shape, one ground, a 6px neutral dot. The state is in the word
   and the dot's position, not in a hue -- which is what keeps oxblood
   meaning one thing when it does appear. */
.sp-pill,
.sp-pill--healthy,
.sp-pill--caution,
.sp-pill--alert {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
  padding: 1px 6px 1px 5px;
}
.sp-pill::before,
.sp-pill--healthy::before,
.sp-pill--caution::before,
.sp-pill--alert::before {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
}

/* The one exception, and the reason the accent exists: a state that is
   asking the current user to act. */
.sp-pill--needs-you {
  background: var(--needs-you-wash);
  border-color: var(--needs-you);
  color: var(--needs-you);
}
.sp-pill--needs-you::before { background: var(--needs-you); }

.sp-status-dot,
.sp-status-healthy, .sp-status-caution, .sp-status-alert, .sp-status-neutral {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
}
.sp-status-needs-you { background: var(--needs-you); }

/* Financial variance: ink for normal, accent over threshold. Nothing else. */
.sp-variance { color: var(--ink); font-variant-numeric: tabular-nums; }
.sp-variance[data-over="true"] { color: var(--needs-you); }

/* ── Shape and motion ──────────────────────────────────────────────────
   Shadows on overlays only. Motion on state change only, 120ms. The
   entrance animations and hover lifts are removed rather than shortened:
   a 120ms entrance is still an entrance. */
.sp-card, .sp-card-quiet, .sp-card--quiet, .elm-card, .sp-stat-tile {
  box-shadow: none !important;
  border-radius: var(--radius);
  background: var(--canvas);
  border: 1px solid var(--rule);
}
.sp-card:hover, .elm-card:hover, .card-hover:hover, .sp-stat-tile:hover {
  transform: none !important;
  box-shadow: none !important;
}

.sp-overlay, .sp-sheet, .sp-palette, .sp-menu, [role="dialog"], [role="menu"] {
  box-shadow: var(--shadow-pop);
  border-radius: var(--radius);
  background: var(--canvas);
  border: 1px solid var(--rule);
}

*, *::before, *::after {
  animation: none !important;
}
.sp-spinner, .elm-spinner { animation: spin 700ms linear infinite !important; }

/* ── Prohibited patterns, enforced ─────────────────────────────────────
   These are in the stylesheet rather than only in the spec because the
   failure mode is a template written next month, not the ones written
   already. A gradient added tomorrow renders flat. */
[style*="gradient"], .elm-gradient, .ai-glow, .home-hero {
  background-image: none !important;
}

/* Focus is visible on everything interactive, and it is **Coral**. BRAND.md
   names the focus ring as one of the accent's three jobs, which reverses
   what this sheet did before: the ring was blue, because the accent was the
   primary action's colour and a ring on screen constantly would have spent
   it on every keystroke. Graphite is the primary action now, so the accent
   is free and this is what the brand asks for.

   Coral measures 3.01:1 against a card, which clears the 3:1 that a
   non-text indicator needs and does not clear the 4.5:1 that text needs --
   which is the whole reason `--accent-text` exists beside it. A ring is not
   text. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-radius: var(--radius);
}

/* ── Right rail collapse ───────────────────────────────────────────────
   Under 1280px the rail goes beneath the main pane rather than
   compressing, because 260px of key dates at 180px wide is unreadable. */
@media (max-width: 1279px) {
  .sp-rail { width: 100%; border-left: 0; border-top: 1px solid var(--rule); }
  .sp-with-rail { flex-direction: column; }
}

/* ── Shell: a Charcoal sidebar and a Mist main area ────────────────────
   BRAND.md's own layout. A 232px sidebar carrying the lockup, the
   destinations and who is signed in; a 60px top bar carrying where you are
   and the way to anywhere; everything else is the work.

   This inverts what it replaced, where the dark band was a 48px top bar and
   navigation sat in a light rail beneath it. Putting the dark band down the
   side is worth more than a stripe across the top: it is where the
   destinations are, so the one dark surface on the screen is the one thing
   that does not change as you move through it. */
.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
/* **One column when there is no sidebar.** The sidebar renders only for a
   signed-in user, so sign-in, the password reset and anything else served
   signed out has a single grid child -- and a single child in a two-column
   grid is placed in the *first* column, which is the 232px one. Every
   signed-out page drew its entire contents inside a 232px strip with 1208px
   of empty grid beside it.

   It rendered, it raised nothing, and every check in `test_interface_spec.py`
   passed: the colours were right, the contrast was right, the typeface was
   right and the components matched their specs -- all inside a column an
   eighth of the window wide. Nothing was measuring geometry. */
.app.is-signed-out { grid-template-columns: minmax(0, 1fr); }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 18px 14px;
  background: var(--chrome);
  color: var(--on-dark);
  /* `height: 100vh` with `position: sticky`, not `align-self: start`. Sticky
     needs a definite height to stay put, and `start` collapses the element to
     its content -- which left the Charcoal panel ending partway down a long
     page with the page ground below it, reading as a sidebar that had been
     cut off. The dark band has to be the full height of the window or it is
     not a band. Internal overflow keeps a long sub-nav reachable. */
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  /* Every neutral inside the sidebar reads from one token, so the lockup,
     the nav and the identity block all turn over together. Set here rather
     than on each rule: a dark surface whose contents each decide their own
     cut is how one of them ends up the colour of its ground. */
  --mark-ink: var(--kendres-mist-light);
}
.sidebar-toggle { display: none; }
@media (max-width: 640px) {
  .sidebar { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 12px; }
  .sidebar-brand { margin: 0; padding: 0; min-height: 0; }
  .sidebar-toggle { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; font: inherit; font-size: 14px;
    font-weight: 600; color: var(--on-dark); background: transparent; border: 1px solid rgba(250, 251, 250, 0.3);
    border-radius: var(--radius); cursor: pointer; }
  .sidebar > .navgroup, .sidebar > .sidebar-foot { display: none; width: 100%; }
  .sidebar.is-open > .navgroup, .sidebar.is-open > .sidebar-foot { display: flex; }
  .shell-main { padding: 16px 16px 32px; }
}
.sidebar-brand {
  display: block;
  padding: 4px 8px 0;
  text-decoration: none;
}

.navgroup { display: flex; flex-direction: column; gap: 2px; }

/* BRAND.md: 11px, 600, uppercase, 0.14em, Mist at 45% on dark. 45% measures
   4.01:1 against Charcoal and an 11px 600 label is not large text, so this
   is 49% -- `--on-dark-muted`, 4.52:1. The brand's intent at a contrast the
   label can actually be read at. */
.navlabel {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

/* A nav row is 36px here rather than the 28px of the rail it replaces. The
   density argument was about rows of *work*; this is eight destinations in a
   column of their own, and the icons need the height. */
.navitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: rgba(250, 251, 250, 0.72);   /* BRAND.md: Mist at 72%, 8.2:1 */
  text-decoration: none;
  transition: background var(--motion) ease, color var(--motion) ease;
}
.navitem:hover { background: rgba(250, 251, 250, 0.06); color: var(--on-dark); }
/* Ask Kristi in the sidebar is a button, not a link (2026-11-09): it opens
   the page's ask bar or Kristi's panel. Same look as every item. */
button.navitem { width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
.navitem .navkbd { margin-left: auto; font-size: 11px; color: rgba(250, 251, 250, 0.5); }
.navitem[aria-current="page"] {
  background: rgba(250, 251, 250, 0.08);
  color: var(--on-dark);
}
/* The 3px Coral bar, on the sidebar's own edge rather than the item's: the
   item is inset 14px from it, which is what the negative offset pays for.
   This is the accent's one appearance in the chrome, and it is the same
   claim it makes everywhere -- you are here. */
.navitem[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.navicon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke-width: 1.8;          /* BRAND.md's icon weight */
}

/* The count is the one thing in the sidebar that is not a destination, and
   it is there for the reason the accent exists: something is waiting. */
.navcount {
  margin-left: auto;
  min-width: 18px;
  padding: 0 5px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  /* The **text** cut of the accent as the ground, not Coral itself. Mist
     light on Coral measures 3.01:1, so the count -- the one number in the
     chrome that means something is waiting -- would have been the least
     readable thing on the sidebar. On the darker coral it is 6.35:1, and it
     still reads as the accent because it is the same family. The badge it
     replaces got away with light-on-fill because the old accent was a dark
     ochre; the fill changed and the pairing did not. */
  color: var(--on-dark);
  background: var(--needs-you);
  border-radius: 999px;
}

.navempty, .navgroup .rail-empty {
  padding: 0 10px 2px;
  font-size: 12px;
  line-height: 17px;
  color: var(--on-dark-muted);
}

/* The identity block, pinned to the foot. `margin-top: auto` inside a
   column is what puts it there without a fixed height above it. */
.sidebar-foot {
  position: relative;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(250, 251, 250, 0.10);
}
.sidebar-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 6px;
  border-radius: var(--radius);
  text-align: left;
  transition: background var(--motion) ease;
}
.sidebar-identity:hover { background: rgba(250, 251, 250, 0.06); }
.sidebar-identity .avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: var(--kendres-mist);
  color: var(--chrome);
}
.sidebar-identity-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-identity small {
  display: block;
  font-size: 12px;
  color: var(--on-dark-muted);
}
/* The menu opens upward: the block it belongs to is at the bottom of a
   full-height column, so a downward menu would open off the screen. */
.sidebar-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 220px;
  z-index: 50;
}

/* ── The top bar ───────────────────────────────────────────────────────
   Where you are, and the way to anywhere. No destinations: those are in the
   sidebar, and a second row of them would make navigation two places. */
.mainpane { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  flex: none;
  padding: 0 24px;
  background: var(--canvas);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 30;
}
.crumbs { font-size: 13px; color: var(--ink-2); margin: 0; }
.crumbs b { color: var(--ink); font-weight: 600; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
/* The matter trail (2026-10-17): Matters / ELM-2026-00062 / Spend. */
.trail { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; }
.trail a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.trail-sep { color: var(--ink-2); }
.trail-matter { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.trail [aria-current="page"] { color: var(--ink); font-weight: 600; }
.trail #trail-section { overflow: hidden; text-overflow: ellipsis; }
/* The classic matter page says it is the full editing view, and leads back. */
.md-fullview { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 14px; padding: 8px 12px;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.md-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; text-decoration: none; }
.md-back:hover { text-decoration: underline; text-underline-offset: 2px; }
.crumbs a:hover { color: var(--ink); }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  width: 320px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color var(--motion) ease;
}
.topbar-search:hover { border-color: var(--ink-2); }
.topbar-search kbd {
  margin-left: auto;
  font: inherit;
  font-size: 11px;
  padding: 0 4px;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.topbar-utils { display: flex; align-items: center; gap: 2px; }

.shell-main {
  flex: 1 1 auto;
  min-width: 0;
  /* The reference's own content padding. The right gutter stays wider than
     the left because the co-pilot tab is fixed to that edge and floats over
     whatever is under it -- on the line review screen that was the Amount
     column, so the tab sat on the money and "1,248.80" rendered as
     "1,248.8". Reserving the width is the fix; lowering the tab's z-index
     would only make it unclickable instead. */
  padding: 28px 56px 48px 32px;
  background: var(--canvas);
}

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
  }
  .navgroup { flex-direction: row; flex-wrap: wrap; }
  .navlabel { display: none; }
  .navitem[aria-current="page"]::before { left: 0; top: auto; bottom: -2px; right: 0; width: auto; height: 2px; }
  .sidebar-foot { margin-top: 0; padding-top: 0; border-top: 0; }
  .sidebar-menu { bottom: auto; top: calc(100% + 6px); }
  .shell-main { padding: 20px 20px 32px; }
  /* The sidebar keeps the full window height only beside the page; stacked
     above it, a 100vh band is a first screen with no page on it. */
  .sidebar { height: auto; }
  .topbar { padding: 0 20px; }
  .topbar-search { width: auto; min-width: 180px; }
}

/* Filter chips read as counts, not as coloured badges. The selected one is
   ink with white text, which is the only inversion in the interface. */
.fy-chip {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: background var(--motion) ease, color var(--motion) ease;
}
.fy-chip:hover { color: var(--ink); }
.fy-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--canvas); }

.sp-page { max-width: 1400px; }

/* ── Saved views in the sidebar ────────────────────────────────────── */
.navitem--view { font-size: 12px; padding-top: 7px; padding-bottom: 7px; }

/* ── The list table ────────────────────────────────────────────────────
   The scroll container is the table's own, not the page's, so the header can
   be sticky against something and the row cursor has a viewport to be
   measured against. */
.sp-table-scroll {
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--canvas);
}
.sp-table-scroll > table { border-collapse: separate; border-spacing: 0; }

.sp-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  user-select: none;
}
.sp-table-scroll th.is-sortable { cursor: pointer; }
.sp-table-scroll th.is-sortable:hover .sp-th-label { color: var(--ink); }

/* The sort marker is a caret drawn in text, so it costs no icon and cannot
   drift out of alignment with the label. */
.sp-table-scroll th.is-asc .sp-th-label::after  { content: " ^"; color: var(--ink); }
.sp-table-scroll th.is-desc .sp-th-label::after { content: " v"; color: var(--ink); }

/* The resize grip is the last 6px of the header cell. Invisible until the
   pointer is over the header, because a column of visible handles is a column
   of things to read. */
.sp-th-grip {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 6px;
  cursor: col-resize;
}
.sp-table-scroll th { position: relative; }
.sp-table-scroll thead:hover .sp-th-grip { background: var(--rule); }

/* The row cursor. A left spine plus the surface fill: position and weight,
   which is what the spec leaves for state now that colour means one thing. */
.sp-table-scroll tbody tr.is-cursor > td { background: var(--surface); }
.sp-table-scroll tbody tr.is-cursor > td:first-child {
  box-shadow: inset 2px 0 0 var(--ink);
}
.sp-table-scroll tbody tr[data-needs-you="true"].is-cursor > td:first-child {
  box-shadow: inset 2px 0 0 var(--needs-you);
}

/* Padding rows stand in for everything not rendered. They must never take a
   border or a zebra stripe: a 100,000px striped row is a grey page. */
.sp-table-scroll tbody tr.sp-pad,
.sp-table-scroll tbody tr.sp-pad > td {
  background: var(--canvas) !important;
  border: 0 !important;
  padding: 0 !important;
}

/* ── The hint bar ──────────────────────────────────────────────────────
   The keyboard map, visible. A shortcut nobody is told about is a shortcut
   nobody uses, and this is 28px. */
.sp-hints {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0 0 3px 3px;
  background: var(--surface);
}
.sp-hints kbd {
  font: inherit;
  padding: 0 3px;
  color: var(--ink-2);
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* ── Column and density menu ───────────────────────────────────────── */
.sp-tablebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sp-tablebar input[type="search"],
.sp-tablebar input[type="text"] {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  min-width: 220px;
}
.sp-colmenu {
  position: absolute;
  z-index: 30;
  min-width: 200px;
  padding: 6px 0;
  max-height: 320px;
  overflow: auto;
}
.sp-colmenu label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink);
  cursor: pointer;
}
.sp-colmenu label:hover { background: var(--surface); }
.sp-colmenu-head {
  padding: 4px 10px 6px;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}

/* ── Figures, not cards ────────────────────────────────────────────────
   A row of KPI cards is prohibited. The reason is worth writing down: four
   cards cost about 120px of viewport, which is four rows of the table under
   them, and they dress four counts as four decisions when usually one is a
   queue and the rest are context. So the numbers stay and the cards go.

   `.sp-figure` is the new form. `.sp-stat-tile` is the old one, kept as a
   name because four templates use it, and restyled into the same figure
   rather than hunted down: one edit, and a template written tomorrow with a
   stat tile in it comes out inline. */
.sp-figures {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.sp-figure {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.sp-figure .n {
  font-size: 19px;
  line-height: 26px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sp-figure .l {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
}
a.sp-figure:hover .l { color: var(--ink); }

/* The one figure that is asking for the reader takes the accent, and only
   while its count is non-zero. A calm zero dressed as an alarm is how people
   learn to ignore alarms. */
.sp-figure[data-needs-you] .n { color: var(--needs-you); }
.sp-figure .n.is-zero { color: var(--ink-3); font-weight: 400; }

/* The old tile becomes the same thing. */
.sp-stat-tile {
  display: inline-flex !important;
  align-items: baseline;
  gap: 6px;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.sp-stat-tile::before { display: none !important; }
.sp-stat-tile .label {
  order: 2;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
}
.sp-stat-tile .value {
  order: 1;
  font-size: 19px;
  line-height: 26px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sp-stat-tile .context {
  order: 3;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-3);
}
.sp-stat-tile .sp-spark { display: none; }

/* ── Invoice line review ───────────────────────────────────────────────
   The screen a reviewer spends the day in. Everything here follows from
   that: the running total is in a header that does not scroll away, the
   verdict on a line renders under the line, and nothing needs the mouse. */
.lr-head { min-width: 0; padding-top: 4px; }
.lr-eyebrow { display: inline-flex; align-items: baseline; gap: 8px; margin: 0 0 4px; font-size: 12px; }
.lr-eyebrow-label { color: var(--ink-3); }
.lr-eyebrow-no { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lr-matter-no { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.lr-title-link { color: inherit; text-decoration: none; }
.lr-title-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.lr-head-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lr-figures { margin-top: 4px; gap: 18px; }
.lr-status {
  margin-left: auto;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
}
.lr-filters { display: flex; gap: 6px; margin-bottom: 6px; }

.lr-tick { color: var(--ink); text-align: center; }
.lr-narr { white-space: normal; }

/* Two lines, then it expands. Never one line with an ellipsis: the narrative
   is the thing being reviewed.
   The clamp lives on an inner element, never on the `td`. `display:
   -webkit-box` on a cell takes it out of table layout, so the `max-width: 0`
   that used to sit beside it stopped being the shrink-to-fit hint it was
   meant as and became literal: the column collapsed to a few pixels and every
   narrative wrapped one character to a line. */
#lr-table td.lr-narr { line-height: 17px; }
#lr-table .lr-narr-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* A reading measure, not the column width. The narrative column takes the
     table's slack, so on a wide screen a 150-character LEDES narrative -- an
     ordinary length -- rendered as a single 940px line, which is roughly twice
     the measure anybody reads comfortably. Capped, it wraps into the two-line
     clamp that already exists, which is what the clamp was for. */
  max-width: 68ch;
}
/* The codes in their own column, one per line so the column reads down and
   a task code sits above its activity. */
.lr-codes { display: flex; flex-direction: column; gap: 1px; font-size: 11px; line-height: 15px; }
.lr-code { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; cursor: help; }
.lr-code[data-kind="activity"] { color: var(--ink-3); font-weight: 500; }
.lr-code[data-kind="expense"] { color: var(--ink-2); }
.ir-dec-back { color: var(--ink-3); }
.ir-dec-back:hover { color: var(--ink); }
.lr-ai-busy { color: var(--ink-2); }
#lr-table tbody tr.is-cursor .lr-narr-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* What names a line, and what it costs. A row has to read as one thing
   before it reads as eight columns: the number says which line a reviewer is
   talking about, the timekeeper says whose work it is, and the amount is the
   decision. Those three are set apart; everything else on the row supports
   them.

   The number and the amount are Geist Mono with tabular figures, per the
   brand: money, IDs and dates are always set that way, and a column of
   amounts that does not align is a column nobody can scan. */
#lr-table td.lr-n {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-2);
  text-align: right;
  padding-right: 12px;
}
#lr-table tbody tr.is-cursor td.lr-n,
#lr-table tbody tr[data-needs-you="true"] td.lr-n { color: var(--ink); }

/* The LEDES designation. Small, monospaced and quiet: it is a key the
   reviewer reads across, not a status. A reduced line (AF/AE) is ours rather
   than the firm's, so it is the one that carries the review signal. */
#lr-table .lr-ledes {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--paper-3);
  color: var(--ink-2);
}
#lr-table .lr-ledes[data-k="E"]  { background: var(--blue-wash); color: var(--blue-deep); }
#lr-table .lr-ledes[data-k="AF"],
#lr-table .lr-ledes[data-k="AE"] { background: var(--signal-review-wash); color: var(--signal-review); }
#lr-table .lr-ledes[data-k="IF"],
#lr-table .lr-ledes[data-k="IE"] { background: var(--signal-under-wash); color: #3D7A5E; }

#lr-table td.lr-tk { font-weight: 600; color: var(--ink); }
#lr-table .lr-tk-level { font-weight: 400; color: var(--ink-3); }

#lr-table td.lr-amt {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

#lr-table tbody tr.is-selected > td:first-child { box-shadow: inset 2px 0 0 var(--ink); }
#lr-table tbody tr.is-cursor > td { background: var(--paper-3); }

/* The flag line. Accent, because it is the reviewer's business, and it
   carries its citation or it does not render. */
#lr-table tr.lr-flag > td {
  color: var(--needs-you);
  background: var(--needs-you-wash);
  border-bottom: 0;
  height: 22px;
  padding-top: 0;
  padding-bottom: 2px;
}
/* What legal ops found, carried to whoever has it next. The review signal,
   because it is the reviewer's business and it changes no number on its own --
   without this nothing downstream would show a flag at all. */
.lr-handover {
  margin-top: 8px;
  padding: 8px 11px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal-review);
  border-radius: var(--radius);
  background: var(--signal-review-wash);
}
.lr-handover-head { font-size: 11px; font-weight: 600; color: var(--signal-review); }
.lr-handover-note { font-size: 12px; color: var(--ink); margin-top: 3px; }
.lr-handover-list { margin: 5px 0 0 16px; font-size: 11.5px; color: var(--ink-2); list-style: disc; }
.lr-handover-list li { line-height: 17px; }

/* The invoice number is the page's title and reads at page-title rank, the
   way every other screen heads itself. The strip this replaced gave the
   number, the firm, the matter, the period and the status one weight. */
.lr-back { display: inline-block; margin-bottom: 6px; }
.lr-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lr-title {
  font-size: 26px;
  line-height: 32px;
  margin: 2px 0 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.lr-meta {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--ink-2);
  margin-top: 1px;
}
.lr-meta-sep { color: var(--ink-3); margin: 0 5px; }
.lr-figures { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; margin-top: 10px; }

.lr-ai-panel { border-left: 3px solid var(--data-4); }
.lr-ai-head { align-items: flex-start; }
.lr-ai-body { padding: 10px 14px 12px; }
.lr-ai-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.lr-ai-stale { font-size: 11px; color: var(--signal-review); }
.lr-ai-stamp { flex: none; font-size: 11px; color: var(--ink-3); display: flex; align-items: center; }
/* The summary runs the width of the panel. A reading measure is right for a
   page of prose and wrong for three lines in a card that is otherwise full
   width: capped, the paragraph stopped two thirds of the way across and the
   panel read as a hole. A short read makes a short panel, never an empty
   one. */
.lr-ai-panel .sp-ai-prose { font-size: 13px; margin-top: 0; max-width: none; }
/* The model's findings are the model's own sentences, so they carry the same
   signal its summary does. They were the one piece of AI output on this screen
   rendering in the sans, which is the reader's cue for something a person
   wrote -- the distinction the typeface exists to make, running the wrong way.
   The italic is inherited from the AI-prose rule; only size and rhythm are set
   here. */
.lr-ai-flags { margin: 4px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); list-style: none; }
/* One line of text per finding with the offer at the end of the sentence,
   never pinned to the far edge: on a wide panel that left a hole between a
   short sentence and its button. */
.lr-ai-flags li {
  display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 8px;
  align-items: baseline; padding: 5px 0; border-top: 1px solid var(--rule);
}
.lr-ai-text { min-width: 0; }
.lr-ai-offer { display: inline-flex; margin-left: 6px; vertical-align: baseline; }
.lr-ai-sev {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3); position: relative; top: -1px;
}
li[data-sev="high"] .lr-ai-sev { background: var(--signal-over); }
li[data-sev="medium"] .lr-ai-sev { background: var(--signal-review); }
.lr-ai-body { min-width: 0; }
.lr-ai-ref {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--rule-strong); margin-right: 2px;
}
a.lr-ai-ref:hover { color: var(--blue-deep); border-color: var(--blue); }
.lr-ai-offer { flex: none; white-space: nowrap; }
.lr-ai-apply, .lr-ai-run {
  font-size: 11px; line-height: 18px; padding: 1px 8px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background var(--motion) ease;
}
.lr-ai-apply:hover, .lr-ai-run:hover { background: var(--paper-3); }
.lr-ai-run { margin-left: 8px; }
.lr-ai-suggest { font-size: 11px; color: var(--ink-3); }
.lr-ai-what { max-width: none; }
.lr-ai-count { margin-top: 4px; }
@media (max-width: 1100px) {
  .lr-ai-grid { grid-template-columns: minmax(0, 1fr); }
}
.lr-ai-count { margin: 8px 0 0; font-size: 11px; font-weight: 600; color: var(--ink-2); }
/* A row a finding pointed at, for a moment. */
#lr-table tbody tr.is-pointed > td { background: var(--blue-wash); transition: background var(--motion) ease; }

/* What is wrong with the record. A blocking finding takes the over band,
   because something the reader is about to do will fail; anything else is
   the review signal, which is what "worth a look" means everywhere else. */
.lr-integ { border-left: 3px solid var(--signal-review); }
.lr-integ[data-blocking] { border-left-color: var(--signal-over); }
.lr-integ-list { margin: 0; padding: 4px 14px 12px; list-style: none; }
.lr-integ-list li { padding: 8px 0; }
.lr-integ-list li + li { border-top: 1px solid var(--rule); }
.lr-integ-what { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.lr-integ-list li[data-sev="blocking"] .lr-integ-what { color: var(--signal-over); }
.lr-integ-lines { font-size: 11px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lr-integ-why { margin: 2px 0 0; font-size: 12px; line-height: 17px; color: var(--ink-2); }
.lr-integ-fix { margin: 3px 0 0; font-size: 12px; line-height: 17px; color: var(--ink); }
.lr-integ-fix b { font-weight: 600; }

/* What this invoice needs from the reader. One sentence in ink when it is
   theirs, quiet when it is not. */
.lr-part {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface);
}
.lr-part.is-mine { border-left: 3px solid var(--needs-you); }
.lr-part.is-override { border-left: 3px solid var(--rule-strong); }
.lr-part-tag { flex: none; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.lr-part.is-mine .lr-part-tag { color: var(--needs-you); }
.lr-part-say { font-size: 13px; font-weight: 600; color: var(--ink); }
.lr-part.is-quiet .lr-part-say { font-weight: 500; color: var(--ink-2); }
.lr-part-why { font-size: 12px; color: var(--ink-2); }
.lr-part-go { font-size: 12px; white-space: nowrap; }
/* The same rhythm as the summary above it: at 13px the prose resolves to
   20.15px, and two blocks of the same prose set to different leading read as
   two different things. */
.lr-ai-flags li { line-height: 1.55; }

/* The AI read beside the matter panel, under the lines. Both are analysis of
   the same bill; the scenarios on the right are built from the read on the
   left. Stacked on a narrower pane. */
.lr-analysis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 44%);
  gap: 14px;
  align-items: start;
}
.lr-analysis > * { min-width: 0; }
@media (max-width: 1279px) {
  .lr-analysis { grid-template-columns: minmax(0, 1fr); }
}

/* The matter card. Its figures are the matter page's, read through
   `matter_spend_summary_service`, and the bar is the home band's: shares of
   the budget, the gap being the headroom. Reference for the decision, not a
   control. */
.lr-matter { margin: 0; }
.lr-matter-headline { margin: 0 0 6px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.lr-matter-n { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-matter-n[data-needs-you] { color: var(--needs-you); }
.lr-matter-l { font-size: 11px; line-height: 16px; color: var(--ink-2); }
.lr-matter .hs-stack { margin-top: 2px; }
.lr-matter-list { margin-top: 8px; }
.lr-matter-this { margin: 6px 0 0; color: var(--ink-2); }
.lr-matter-sub {
  margin: 10px 0 2px; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--ink-2);
  padding-top: 8px; border-top: 1px solid var(--rule);
}
.lr-matter-acc {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px;
  align-items: baseline; font-size: 12px; line-height: 18px; color: var(--ink-2);
}
.lr-matter-acc-firm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-matter-acc-when { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lr-matter-acc-amt { color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-matter-empty { color: var(--ink-3); margin: 2px 0 0; }
.lr-mp-body { padding: 4px 14px 12px; }
.lr-mp-sec { padding: 10px 0; }
.lr-mp-sec + .lr-mp-sec { border-top: 1px solid var(--rule); }
/* One sentence in ink, then the bar, then the figures as a list so the
   numbers form a column. */
.lr-mp-h { margin: 0 0 8px; font-size: 14px; line-height: 20px; color: var(--ink); }
.lr-mp-h b { font-weight: 700; font-variant-numeric: tabular-nums; }
.lr-mp-h b[data-needs-you] { color: var(--needs-you); }
.lr-mp-list { margin: 8px 0 0; }
.lr-mp-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  font-size: 12px; line-height: 20px; color: var(--ink-2);
}
.lr-mp-row dt { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lr-mp-row dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-mp-row.is-total { border-top: 1px solid var(--rule); margin-top: 2px; padding-top: 2px; font-weight: 600; color: var(--ink); }
.lr-mp-sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.lr-mp-sw[data-seg="0"] { background: var(--data-3); }
.lr-mp-sw[data-seg="1"] { background: var(--data-2); }
.lr-mp-sw[data-seg="2"] { background: var(--data-1); }
.lr-mp-note { margin: 6px 0 0; color: var(--ink-3); }
.lr-mp-sub { margin: 0 0 6px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
/* Two series in one column: the billed part is the darker step of the same
   bar, the in-review part the lighter, so a month reads as one amount. */
.lr-mp-trend { height: 84px; }
.lr-mp-col { position: relative; background: var(--data-1); overflow: hidden; }
.lr-mp-col > i { position: absolute; left: 0; right: 0; bottom: 0; display: block; background: var(--data-3); }
.lr-mp-firmgrid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-bottom: 8px;
}
.lr-mp-stat { display: flex; flex-direction: column; gap: 1px; }
.lr-mp-stat-l { font-size: 11px; color: var(--ink-3); }
.lr-mp-stat-v { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-mp-stat-v[data-needs-you] { color: var(--needs-you); }
.lr-mp-stars { display: inline-flex; gap: 2px; margin-right: 4px; vertical-align: middle; }
.lr-mp-stars i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--data-1); }
.lr-mp-stars i[data-on] { background: var(--data-3); }
.lr-mp-firmtrend { height: 60px; }
.lr-mp-firmtrend .hs-col-bar[data-hot="1"] { background: var(--signal-review); }
/* Three ways to answer, each a bar against what was submitted, and what the
   matter looks like after. The AI row carries the mark. */
/* The three rows share one grid: the same label column, the same bar
   column, the same value column, so the bars line up and the figures form
   a column. The note sits on its own line under the row. */
.lr-mp-scen { display: grid; grid-template-columns: minmax(200px, 38%) minmax(0, 1fr) 96px; gap: 2px 12px; }
.lr-mp-scen-row { display: contents; font-size: 12px; }
.lr-mp-scen-row > * { align-self: center; }
.lr-mp-scen-k { color: var(--ink); font-weight: 600; }
.lr-mp-scen-row[data-ai] .lr-mp-scen-k::before {
  content: "AI"; display: inline-block; margin-right: 6px; padding: 0 4px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .04em;
  background: var(--fill-strong); color: var(--surface); vertical-align: 1px;
}
.lr-mp-scen-bar { display: block; height: 10px; background: var(--rule); border-radius: var(--radius); overflow: hidden; }
.lr-mp-scen-bar > i { display: block; height: 100%; background: var(--data-2); }
.lr-mp-scen-row[data-ai] .lr-mp-scen-bar > i { background: var(--data-3); }
.lr-mp-scen-v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lr-mp-scen-n { grid-column: 1 / -1; font-size: 11px; line-height: 15px; color: var(--ink-2); margin: -2px 0 6px; }
.lr-mp-scen-n b[data-needs-you] { color: var(--needs-you); }
.lr-mp-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; color: var(--ink-3); }

/* The one dialog anything asks through. It replaced three `prompt()` calls,
   which cannot offer a list, cannot validate before firing, and put the
   rating scale in a sentence instead of in front of the reader. */
.lr-ask { position: fixed; inset: 0; z-index: 70; display: flex;
          align-items: center; justify-content: center; }
/* The dialog's backdrop. It was `rgba(16, 18, 21, …)` -- the previous
   palette's ink, written as a triple, which is why neither the hex sweep nor
   the token layer could see it: a retired colour in an rgba() is invisible to
   a check that reads `#`. Charcoal now, the ground the chrome is. */
.lr-ask-backdrop { position: absolute; inset: 0; background: rgba(28, 28, 31, 0.45); }
.lr-ask-panel {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  padding: 16px 18px 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}
.lr-ask-title { font-size: 14px; font-weight: 600; color: var(--ink); }
/* `pre-line`, so a note that lists things reads as a list. Every existing
   single-line note is unchanged by it; without it a dialog explaining a
   column mapping runs the whole mapping into one paragraph. */
.lr-ask-note { font-size: 11.5px; color: var(--ink-3); margin-top: 2px;
               white-space: pre-line; }
/* A value the reader has to copy exactly: a signing secret, a hash. Mono with
   the whole thing selectable, per the brand's rule for identifiers. */
/* An extra field in the dialog. `[hidden]` is honoured globally, so a field
   that does not apply to the chosen answer is simply not there. */
/* A controls verdict. Three states, not two: `not_evidenced` is neither a pass
   nor a failure, and giving it the pass colour is the single most misleading
   thing this page could do -- so it takes the paper ground with a rule around
   it, which reads as "answered, but not by evidence". In the token layer rather
   than the page because the white glyph on the signal needs the same
   justification `.navcount` carries: near-black on the light setting's ochre
   measured 3.5:1. */
/* Sentence case and untracked, per the conformance layer: the estate turns
   all-caps micro-labels into sentence case everywhere, so writing one here would
   be overridden and silently do nothing. */
.ops-verdict {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.ops-verdict[data-v="holds"] { color: var(--ink-2); background: var(--paper-3); }
.ops-verdict[data-v="exceptions"] { color: var(--on-dark); background: var(--needs-you); }
.ops-verdict[data-v="not_evidenced"] {
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
}

/* A count on a contextual leftbar item, for the ops console's exceptions.
   Borrows `.navcount`'s reasoning: the accent in the chrome means something is
   waiting, and it is white on the signal because near-black measured 3.5:1. */
.leftbar-count {
  margin-left: auto;
  min-width: 18px;
  padding: 0 4px;
  text-align: center;
  font-size: 10.5px;
  line-height: 16px;
  color: var(--on-dark);
  font-weight: 600;
  background: var(--needs-you);
  border-radius: var(--radius);
}

/* ── What AP reported, on the invoice page ──────────────────────────────── */
.lr-ap { margin-top: 12px; }
.lr-ap-facts { display: flex; flex-wrap: wrap; gap: 6px 20px;
               padding: 10px 14px; border-top: 1px solid var(--rule);
               font-size: 12px; }
/* The value is mono (it is a reference or a figure) and the label is not, so
   the mono sits on the value rather than on the row: there is no token for
   getting back to the sans, and naming the face here would be a second
   typeface declaration outside the conformance layer. */
.lr-ap-fact { display: inline-flex; gap: 7px; align-items: baseline;
              font-size: 11px; }
.lr-ap-fact b { font-weight: 600; color: var(--ink-2); }
.lr-ap-fact span { font-family: var(--font-mono); font-size: 11px; }
.lr-ap-rev { color: var(--ink-3); text-decoration: line-through; }
/* Overpaid points the other way from every other figure on this page, so it says
   so in a sentence rather than as one more number in the row. */
.lr-ap-over { padding: 8px 14px; margin: 0; font-size: 11.5px;
              border-top: 1px solid var(--rule); max-width: 68ch;
              color: var(--ink-2); }
.lr-ap-gh { padding: 7px 14px; font-size: 11px; font-weight: 700;
            background: var(--paper-2); }
.lr-ap-events { border-top: 1px solid var(--rule); }
.lr-ap-ev { display: grid; grid-template-columns: 130px 80px 1fr 200px;
            gap: 10px; align-items: baseline; padding: 6px 14px;
            font-size: 11px; border-bottom: 1px solid var(--rule); }
.lr-ap-ev:last-child { border-bottom: 0; }
.lr-ap-ev-t { font-family: var(--font-mono); font-size: 10.5px; }
.lr-ap-ev-r { font-size: 10px; font-weight: 700; letter-spacing: .04em;
              color: var(--ink-3); }
.lr-ap-ev[data-result="applied"] .lr-ap-ev-r { color: var(--signal-review); }
.lr-ap-ev-w { color: var(--ink-3); text-align: right; }
@media (max-width: 900px) {
  .lr-ap-ev { grid-template-columns: 1fr; gap: 2px; }
  .lr-ap-ev-w { text-align: left; }
}
.lr-ask-field { margin-top: 2px; }
.lr-ask-mono { font-family: var(--font-mono); font-size: 12px; margin-top: 8px;
               padding: 8px 10px; background: var(--paper-2);
               border: 1px solid var(--rule); border-radius: var(--radius);
               word-break: break-all; user-select: all; }
.lr-ask-label { display: block; font-size: 11px; color: var(--ink-2);
                margin: 11px 0 3px; font-weight: 600; }
.lr-ask-input {
  width: 100%;
  font-size: 12.5px;
  padding: 6px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}
.lr-ask-rating { display: flex; align-items: center; gap: 6px; }
.lr-ask-star {
  width: 30px; height: 30px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lr-ask-star.is-on { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--on-dark); }
.lr-ask-scale { font-size: 10.5px; color: var(--ink-3); margin-left: 4px; }
.lr-ask-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.lr-ask-err { font-size: 11px; color: var(--signal-over); }

/* ── Pre-review ────────────────────────────────────────────────────────
   Legal ops check every invoice before it reaches the people who decide
   whether to pay it. The screen has to show the coding they are checking,
   and give them the three answers they can give, in one place. */
.pr-coding {
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
}
/* Under the matter: the coding table across the width, then the figures on
   the line beneath. */
.ir-top #lr-coding { margin-bottom: 10px; }
/* The coding as a table: fixed layout so every field gets the same cell,
   a header band over it, borders on every cell, everything left-aligned.
   The row head names the table and carries the control. */
.pr-code-table {
  width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0;
  padding: 0; background: var(--surface); overflow: hidden;
}
.pr-code-table th, .pr-code-table td {
  text-align: left; vertical-align: middle; padding: 5px 10px;
  border-right: 1px solid var(--rule); font-size: 12px; line-height: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-code-table th:last-child, .pr-code-table td:last-child { border-right: 0; }
.pr-code-table th {
  background: var(--paper-3); color: var(--ink); font-weight: 600; font-size: 11px;
  border-bottom: 1px solid var(--rule);
}
.pr-code-table td { color: var(--ink); font-weight: 600; }
.pr-code-table td.is-missing {
  background: var(--signal-review-wash); color: var(--signal-review); font-style: italic;
}
.pr-code-table .pr-code-rowhead { width: 74px; background: var(--paper-3); color: var(--ink-2); font-weight: 600; }
.pr-code-table tbody .pr-code-rowhead { font-weight: 400; }
.pr-code-edit {
  font-size: 11px; line-height: 16px; padding: 0 7px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.pr-code-edit:hover { background: var(--paper-2); }
.pr-code-editor .pr-code-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pr-code-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.pr-code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px 16px;
}
.pr-code-value { min-width: 0; overflow-wrap: anywhere; }
.pr-code-field { display: flex; gap: 6px; font-size: 11.5px; line-height: 17px; }
.pr-code-label { color: var(--ink-3); min-width: 82px; flex: none; }
.pr-code-value { color: var(--ink); font-weight: 600; }
/* An unrecorded field is the finding, not an absence to be tidied away. */
.pr-code-value.is-missing {
  color: var(--signal-review);
  font-weight: 600;
  font-style: italic;
}
.pr-code-warn {
  margin-top: 5px;
  font-size: 11px;
  color: var(--signal-review);
}

.pr-coding.is-editing { border-color: var(--blue); background: var(--blue-wash); }
.pr-code-input {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  padding: 3px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.pr-code-actions { display: flex; gap: 8px; margin-top: 9px; }

.pr-note { margin-bottom: 12px; }
.pr-note-label {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.pr-note-field {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 12px;
  resize: none;
}

.pr-decide-title { font-size: 12px; font-weight: 600; color: var(--ink); }
.pr-decide-note { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.pr-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: background var(--motion) ease;
}
.pr-btn:hover { background: var(--paper-3); }
.pr-btn:disabled { opacity: .5; }
/* The release is the one action this screen exists to produce, so it takes
   the fill. Parchment stays for the money and the primary action elsewhere. */
.pr-btn--go {
  background: var(--fill-strong);
  border-color: var(--fill-strong);
  color: var(--on-dark);
}
.pr-btn--go:hover { background: var(--fill-strong-2); border-color: var(--fill-strong-2); }
.pr-btn--reject { border-color: var(--signal-over); color: var(--signal-over); }
.pr-btn--reject:hover { background: var(--signal-over-wash); }

/* Answering the invoice, after the lines. The keyboard row above answers the
   *lines*; these answer the bill, and they read as a decision rather than as
   more shortcuts. */
.lr-decide {
  align-self: stretch;
  width: 100%;
  padding: 10px 12px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}
.lr-decide-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lr-decide-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
/* The step actions are generated into a wrapper, so it has to disappear
   from the box tree or its buttons sit outside the row's gap. */
#lr-step-actions { display: contents; }
/* The release is what this screen exists to produce when the intake check is
   outstanding, so it takes the fill. */
.lr-decide-go {
  background: var(--fill-strong);
  border-color: var(--fill-strong);
  color: var(--on-dark);
}
.lr-decide-go:hover { background: var(--fill-strong-2); border-color: var(--fill-strong-2); }
.lr-decide-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-right: 2px;
}
.lr-decide-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: background var(--motion) ease;
}
.lr-decide-btn:hover { background: var(--paper-3); }
.lr-decide-btn:disabled { opacity: .5; }
/* Refusing the bill is the heavier of the two, and it is the only one of them
   that ends the invoice, so it carries the over-band signal on its rule. */
.lr-decide-reject { border-color: var(--signal-over); color: var(--signal-over); }
.lr-decide-reject:hover { background: var(--signal-over-wash); }
.lr-decide-why { font-size: 11px; color: var(--ink-3); }

/* The verdict: what was decided about the line above it. Quiet, because it
   is a record rather than an errand -- the flag above it is the thing asking
   for attention and must stay louder. */
#lr-table tr.lr-verdict > td {
  color: var(--ink-2);
  background: var(--surface);
  border-bottom: 0;
  height: 22px;
}
#lr-table .lr-verdict-mark { color: var(--signal-under); font-weight: 700; }
#lr-table .lr-verdict-verb { font-weight: 600; color: var(--ink-2); }
.lr-cut { color: var(--needs-you); }

#lr-table tr.lr-editor > td {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 6px 10px;
  height: auto;
}
#lr-table tr.lr-editor input,
#lr-table tr.lr-editor select {
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
#lr-table tr.lr-editor input[type="number"] { width: 96px; text-align: right; }
#lr-table tr.lr-editor input[type="text"] { min-width: 220px; flex: 1; }

.lr-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 18px;
  color: var(--on-dark);
  background: var(--fill-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}
.lr-undo {
  color: var(--on-dark);
  text-decoration: underline;
  font-size: 12px;
}

/* ── Matter spine ──────────────────────────────────────────────────────
   Four lines that never scroll away. The matter page degraded because
   everything competed for the top of it: a summary, a phase tracker, a
   budget card and a title all claiming the first screen. A fixed identity
   band ends that argument permanently, and it is 96px because that is what
   four lines of the type scale cost. */
.matter-spine {
  position: sticky;
  top: 48px;
  z-index: 11;
  /* No negative margins. They bled the band to the shell's edges, which is
     right on a page whose content column *is* the pane and wrong on the
     matter page, where the tab rail sits inside it: the band hung off both
     sides and clipped the matter number and the title. */
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 8px 12px 10px;
  margin-bottom: 12px;
  max-width: 100%;
  /* Visible, never hidden: the Actions menu opens out of this band, and
     clipped it showed one half-line of its first item and nothing else
     (2026-10-14). A long title wraps instead of overflowing. */
  overflow: visible;
}
.spine-l1, .spine-l2, .spine-l3, .spine-l4 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.spine-l2 { align-items: flex-start; }
.spine-l4 { align-items: center; margin-top: 5px; gap: 10px; }

.spine-number {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.spine-phase { font-size: 12px; line-height: 18px; color: var(--ink-2); }

.spine-title {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 1px 0 0;
  /* A long matter name wraps to a second line rather than widening the pane.
     Truncating it would hide the half that distinguishes two matters with the
     same first six words, which is most of them. */
  min-width: 0;
  overflow-wrap: anywhere;
}
.spine-actions { margin-left: auto; flex: none; }

.spine-l3 { font-size: 12px; line-height: 18px; color: var(--ink-2); }
.spine-l3 > span:not(:empty) ~ span:not(:empty)::before {
  content: "· ";
  color: var(--ink-3);
}

/* One bullet bar. Ink under the threshold, accent at or over ninety per
   cent, and nothing in between: a bar that reddens gradually is a bar
   nobody reads as a threshold. */
.spine-budget-label { font-size: 12px; line-height: 18px; color: var(--ink-2); }
.spine-bar {
  display: inline-block;
  width: 200px;
  height: 6px;
  background: var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.spine-bar-fill {
  display: block;
  height: 100%;
  background: var(--data-2);
  transition: width var(--motion) ease;
}
.spine-bar-fill[data-over="true"] { background: var(--needs-you); }
.spine-budget-figs {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.spine-next { margin-left: auto; font-size: 12px; line-height: 18px; color: var(--ink-2); }

/* ── Matter facts ──────────────────────────────────────────────────────
   Two columns, a fixed 110px label gutter, and only the fields this type
   has. `Full record` discloses the rest inline, never in a modal. */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 2px;
}
.facts-row { display: flex; gap: 8px; align-items: baseline; }
.facts-label {
  flex: 0 0 110px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
}
.facts-value {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink);
  /* Both are needed. `min-width: 0` lets the grid track shrink; the wrap is
     what stops a single long unbroken value from setting the track's width
     and pushing the whole pane sideways. */
  min-width: 0;
  overflow-wrap: anywhere;
}
.facts-value[data-empty="true"] { color: var(--ink-3); }
.facts-more {
  margin-top: 6px;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-3);
}
@media (max-width: 1023px) { .facts-grid { grid-template-columns: 1fr; } }

/* ── The firm portal: the opposite density ─────────────────────────────
   Two audiences, two design problems. Legal ops are here daily and want
   maximum density; a firm's billing clerk is here a few times a month,
   under time pressure, and is a novice every visit. So the internal app's
   density and shortcuts must never be applied here, and this hand-holding
   must never be applied there.

   44px minimum targets, 15px body, comfortable rows only. */
.portal-verbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 899px) {
  .portal-verbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.portal-verb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 64px;
  padding: 12px 14px;
  text-align: left;
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color var(--motion) ease, background var(--motion) ease;
}
.portal-verb:hover { border-color: var(--ink-2); }
.portal-verb.is-active { border-color: var(--ink); background: var(--surface); }
.portal-verb-title { font-size: 15px; line-height: 22px; font-weight: 700; color: var(--ink); }
.portal-verb-sub { font-size: 13px; line-height: 20px; color: var(--ink-2); }

.portal-more {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.portal-more-link {
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-2);
  border-radius: var(--radius);
}
.portal-more-link:hover { color: var(--ink); background: var(--surface); }
.portal-more-link.is-active { color: var(--ink); background: var(--surface); font-weight: 700; }

/* A count on a secondary destination, because "requests" with nothing in it
   and "requests" with four things in it are different errands. */
.portal-more-count {
  margin-left: 4px;
  padding: 0 5px;
  font-size: 12px;
  line-height: 18px;
  color: var(--on-dark);
  background: var(--needs-you);
  border-radius: var(--radius);
}

/* Everything a firm touches is at least 44px, and the body is 15px. A
   12px row is right for a reviewer working a hundred lines and wrong for
   somebody who does this once a month. */
body.portal-body { font-size: 15px; }
body.portal-body table tbody td,
body.portal-body table thead th { height: 40px; font-size: 14px; }
body.portal-body button,
body.portal-body .btn,
body.portal-body input,
body.portal-body select,
body.portal-body a.btn { min-height: 44px; }
body.portal-body input[type="checkbox"],
body.portal-body input[type="radio"] { min-height: 0; }

/* A rejection the firm reads has to say which rule, in words. "See
   comments" is not something a firm can act on. */
.portal-citation {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  font-size: 12px;
  line-height: 18px;
  color: var(--needs-you);
  background: var(--needs-you-wash);
  border: 1px solid var(--needs-you);
  border-radius: var(--radius);
}


/* ── Nothing widens the page ───────────────────────────────────────────
   The spec asks that wide content scroll inside its own container. A pane
   that widens the document takes the sticky chrome off the side of the
   screen with it, which is how the matter spine came to be clipped at both
   edges by one long classification value in a facts row. */
/* The pane never hides anything. `overflow-x: clip` lived here to stop a
   wide table dragging the sticky chrome off the screen, and it did -- by
   cutting the table off instead, with no way to reach the rest of it. The
   spec's rule is the right one: wide content scrolls inside its own
   container and the page body never scrolls sideways. So the pane is capped
   and the wide things scroll themselves. */
.shell-main { max-width: 100%; }
.shell-main table { table-layout: auto; }
.sp-table-scroll { max-width: 100%; }

/* Every table is inside one of these, whether its template wrapped it or
   not: `base.html` puts one around any that is not. A header cell refuses to
   wrap, which is right for a dense list and is what makes a many-column
   table exceed the pane, so the table has to be able to scroll or the
   columns past the edge are simply gone. */
.sp-table-auto {
  overflow-x: auto;
  max-width: 100%;
}
/* The automatic wrapper adds no chrome of its own. Most of these tables are
   already inside a card, and a second border around them would read as a
   nested panel that means something. */
.sp-table-auto > table { min-width: 100%; }

/* ── Matter tabs ───────────────────────────────────────────────────────
   Horizontal, under the spine. They were a second 200px vertical rail
   beside the global one, which is two nav bars on one screen: the reader
   has to work out which of them answers "where am I" before they can use
   either, and it cost 224px of the pane on every matter.

   Underline indicator in ink, not a pill. A pill is a chip, and this page
   already uses chips to mean status. */
.matter-tabs { margin-bottom: 12px; border-bottom: 1px solid var(--rule); }
.matter-tabs-row { display: flex; align-items: stretch; gap: 2px; flex-wrap: wrap; }

.matter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-2);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color var(--motion) ease;
}
.matter-tab:hover { color: var(--ink); }
.matter-tab.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}
.matter-tab .sp-nav-badge {
  font-size: 11px;
  line-height: 16px;
  padding: 0 4px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* ── The front page spend band ─────────────────────────────────────────
   Above everything else, because this is a spend management platform and
   the front page opened on reminders. It states its own scope in words on
   every render: two people see different numbers here, and a figure whose
   scope is not on screen is the one that gets quoted as somebody else's.

   The visuals are CSS bars, not a charting library. Every one carries its
   own figure, because a chart that does not change a decision should be a
   number: these are numbers that also have a shape. */
.hs-band {
  padding: 10px 12px 12px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.hs-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
/* The label names why these matters are visible, so it is a sentence rather
   than a word and has to be allowed to wrap. */
.hs-scope {
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}
.hs-head { flex-wrap: wrap; }
.hs-sub { font-size: 12px; line-height: 18px; color: var(--ink-2); }
.hs-head-link { margin-left: auto; }

/* Two columns: the figures, then what they look like. The left column is
   fixed so the headline and the labels line up down the page instead of
   moving with the width of whatever is beside them. */
/* The band is four pieces, not two columns.
   It was `260px minmax(0, 1fr)`, so everything on the right -- the budget
   bar, six months of billing, the firm list -- was stretched across whatever
   was left of a 1600px screen. At that width the stacked bar's three segments
   are slivers against an empty remainder, and the trend is six squat blocks
   too wide to compare. Each piece now has a readable width of its own and
   wraps when there is not room, which is what makes it legible on a laptop
   and on a monitor. */
.hs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px 24px;
  align-items: start;
}
/* Nothing in the band grows past the width at which it stops being readable. */
.hs-grid > * { min-width: 0; max-width: 460px; }
.hs-left { max-width: 300px; }

.hs-headline { display: block; margin-bottom: 8px; }
.hs-headline-n {
  display: block;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hs-headline-l { font-size: 12px; line-height: 18px; color: var(--ink-2); }
a.hs-headline:hover .hs-headline-l { color: var(--ink); }

/* A label/value list on a fixed grid, so the numbers form a column instead
   of ragging against labels of different lengths. */
.hs-list { margin: 0; }
.hs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 1px 0;
}
.hs-row dt {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
  min-width: 0;
}
.hs-row dd {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hs-row[data-needs-you] dd { color: var(--needs-you); font-weight: 700; }

/* The right column is gone: its two blocks are siblings in the grid now, so
   each is sized by the grid rather than by whatever is left over. */
.hs-right { display: contents; }
.hs-block-head {
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-2);
  margin-bottom: 4px;
}

/* One bar against one ceiling. The segments are shares of the budget, and
   the gap at the end is the headroom, which is the part a reader is
   actually looking for. */
.hs-stack {
  display: flex;
  height: 10px;
  background: var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.hs-seg { display: block; height: 100%; }
/* Three inks rather than three hues: the palette has one accent and it is
   not for category coding. Depth separates the segments; the legend names
   them; the tooltip carries the money. */
.hs-seg[data-seg="0"], .hs-key i[data-seg="0"] { background: var(--data-3); }
.hs-seg[data-seg="1"], .hs-key i[data-seg="1"] { background: var(--data-2); }
.hs-seg[data-seg="2"], .hs-key i[data-seg="2"] { background: var(--data-1); }
/* At or over ninety per cent the whole bar takes the accent, not a segment
   of it. The threshold is about the total, so colouring one part would say
   the wrong thing. */
.hs-seg[data-over] { background: var(--needs-you) !important; }
.hs-seg[data-over][data-seg="1"] { opacity: 0.72; }
.hs-seg[data-over][data-seg="2"] { opacity: 0.48; }

.hs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-2);
}
.hs-key { display: inline-flex; align-items: center; gap: 5px; }
.hs-key i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.hs-key i[data-over] { background: var(--needs-you) !important; }

/* Monthly columns. Sixty pixels of height is enough to read a shape and
   short enough that the band stays a band. */
.hs-trend {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 76px;
}
.hs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  gap: 2px;
}
.hs-col-n {
  font-size: 10px;
  line-height: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hs-col-bar {
  display: block;
  width: 100%;
  background: var(--data-2);
  border-radius: 2px 2px 0 0;
  transition: height var(--motion) ease;
}
.hs-col-l {
  font-size: 10px;
  line-height: 14px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Firms, ranked. The bar is relative to the largest, so the comparison is
   between firms rather than against a ceiling nobody set. */
.hs-firms {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.hs-firm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 78px;
  gap: 10px;
  align-items: center;
  padding: 1px 0;
}
.hs-firm-name {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-firm-bar { height: 6px; background: var(--rule); border-radius: var(--radius); overflow: hidden; }
.hs-firm-bar > span { display: block; height: 100%; background: var(--data-2); }
.hs-firm-n {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
a.hs-firm:hover .hs-firm-name { color: var(--ink); }
a.hs-firm:hover .hs-firm-bar > span { background: var(--data-3); }

.hs-empty { margin-top: 4px; color: var(--ink-2); }

@media (max-width: 1023px) {
  .hs-grid { grid-template-columns: 1fr; gap: 12px; }
  .hs-firm { grid-template-columns: 130px minmax(0, 1fr) 74px; }
}
/* ── Where the invoice is ─────────────────────────────────────────────────
 * Triage, the AI read, the lines, then each level of the chain, one row per
 * step in order with the current one marked. Not a wizard: the reviewer is
 * not being led through it, they are being told where the invoice has got
 * to and who has it next. A signed level carries the name on it and the
 * withdrawal control, which is why each row has a right-hand side.
 *
 * Only the current step takes ink. A list where every step is emphasised is
 * a list nobody reads, and the accent stays reserved for "this needs you". */
.lr-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 0;
}
.lr-step {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 20px;
  color: var(--ink-3);
  min-width: 0;
}
.lr-step-label { flex: none; }
.lr-step-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-step-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 6px; }
.lr-step-mark { font-size: 10px; flex: none; width: 10px; text-align: center; }
.lr-step-detail { font-size: 11px; color: var(--ink-3); }
.lr-step.is-done { color: var(--ink-2); }
.lr-step.is-done .lr-step-mark { color: var(--ink-2); }
/* The one place the reader has to look. */
.lr-step.is-current { color: var(--ink); font-weight: 500; }
.lr-step.is-current .lr-step-mark { color: var(--needs-you); }
.lr-step.is-current .lr-step-detail { color: var(--ink-2); }
.lr-step.is-skipped { color: var(--ink-3); font-style: normal; }

/* A refusal the caller can read on hover, rather than a dead control. */
.lr-step-why {
  font-size: 11px;
  color: var(--ink-3);
  border-bottom: 1px dotted var(--rule);
  cursor: help;
}



/* Whole-bill line actions on the review screen. They came off the queue's
   slide-over when it was retired, and they sit in the hint bar with the lines
   they act on rather than at the foot with the invoice decision. Quiet by
   default: selecting every line is a convenience, not a verdict. */
.lr-bulk-btn {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  transition: background 120ms ease, color 120ms ease;
}
.lr-bulk-btn:hover { background: var(--paper-3); color: var(--ink); }

/* The AI read has three states and they must not share an appearance: an
   invoice nobody has read, one read and clean, one read with findings. An
   empty panel used to mean the first and was read as the second. */
.lr-ai-empty { color: var(--ink-3); }
.lr-ai-clean { color: var(--ink-2); margin-top: 6px; }

/* The status chip carries a tone, or it is an unnamed grey and every status
   reads like every other: rejected, paid and pre-approved were identical.
   Signals live on badges, which is what this is. An unknown status is left
   untoned on purpose rather than guessed at. */
.lr-status[data-tone="review"] { color: var(--signal-review); }
.lr-status[data-tone="over"]   { color: var(--signal-over); }
.lr-status[data-tone="under"]  { color: var(--signal-under); }

/* The timeline: one column per step, a node on a line, the label under it,
   the detail under that. Reached steps draw their connector in ink; the
   current node takes the review signal; a signed level carries the name. */
.lr-timeline {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 0; padding: 12px 10px 10px;
}
.lr-tl-step {
  position: relative; display: flex; flex-direction: column; align-items: center;
  text-align: center; min-width: 0; padding: 0 6px;
}
.lr-tl-line {
  position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--rule);
}
.lr-tl-step[data-first] .lr-tl-line { left: 50%; }
.lr-tl-step[data-last] .lr-tl-line { right: 50%; }
/* Each step paints its own two halves of the line: the left half in ink when
   this step is reached, the right half in ink when the next one is. The
   renderer marks both, because CSS cannot look ahead. */
.lr-tl-line::before, .lr-tl-line::after { content: ""; position: absolute; top: 0; height: 2px; width: 50%; }
.lr-tl-line::before { left: 0; }
.lr-tl-line::after { right: 0; }
.lr-tl-step[data-reached]:not([data-first]) .lr-tl-line::before { background: var(--fill-strong); }
.lr-tl-step[data-next-reached]:not([data-last]) .lr-tl-line::after { background: var(--fill-strong); }
.lr-tl-step[data-first] .lr-tl-line::before, .lr-tl-step[data-last] .lr-tl-line::after { display: none; }
.lr-tl-node {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: var(--radius); font-size: 11px; font-weight: 700;
  background: var(--surface); border: 2px solid var(--rule); color: var(--ink-2);
}
.lr-tl-step.is-done .lr-tl-node { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--surface); }
.lr-tl-step.is-skipped .lr-tl-node { background: var(--paper-3); border-color: var(--paper-3); color: var(--ink-2); }
.lr-tl-step.is-current .lr-tl-node { border-color: var(--needs-you); background: var(--needs-you-wash); }
.lr-tl-step.is-current .lr-tl-node::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--needs-you);
}
/* A refusal ends the line in the over signal. */
.lr-tl-step[data-tone="over"] .lr-tl-node { background: var(--signal-over); border-color: var(--signal-over); color: var(--surface); }
.lr-tl-step[data-tone="over"] .lr-tl-label { color: var(--signal-over); }
.lr-tl-label { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 16px; }
.lr-tl-step.is-done .lr-tl-label, .lr-tl-step.is-current .lr-tl-label { color: var(--ink); }
.lr-tl-detail {
  margin-top: 2px; font-size: 11px; line-height: 15px; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lr-tl-step.is-current .lr-tl-detail { color: var(--ink-2); }
.lr-tl-right { margin-top: 4px; display: inline-flex; gap: 6px; align-items: center; }

/* Who signed a level, and whether this reader may withdraw it. Drawn on the
   step itself; the chain is rendered once. */
.lr-lock-by    { color: var(--ink-2); }
.lr-lock-shut  { font-size: 10px; color: var(--ink-3); cursor: help; }

/* Part of the page did not render. A quiet line, never a replacement for the
   content: a reviewer who can read the lines can still do the job. */
.lr-notice {
  font-size: 12px; color: var(--signal-review);
  padding: 4px 10px; margin: 0 0 6px;
}

/* ── The merged invoice review ──────────────────────────────────────────
   Pre-review and standard review are one screen. They were never two review
   models: pre-review differs by clearing the triage and correcting the
   coding, and everything else was always identical. */

.ir-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
/* The band does not scroll: "never make a reviewer scroll to see what they
   have taken off". It paints the page ground so the work passes under it. */
.ir-top {
  grid-column: 1;
  position: sticky; top: 48px; z-index: 12;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  background: var(--canvas);
}
.ir-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* The rail stays in view while the lines are worked. It is reference: the
   invoice's own figures, where it is, the matter, the coding. */
@media (max-width: 1439px) {
  .ir-figs { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}

/* Which job this is. A screen shared by two decisions has to say which one
   the reader is making, and only when it is actually theirs -- a band on
   every invoice is a band nobody reads. */
.ir-band {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px;
  border-left: 3px solid var(--signal-review);
  background: var(--signal-review-wash);
  border-radius: var(--radius);
}
.ir-band-tag { font-size: 12px; font-weight: 700; color: var(--signal-review); }
.ir-band-say { font-size: 12px; color: var(--ink-2); }

/* Submitted, what review took off, what is left. Three tiles under the
   matter, each tinted for what it means: asked for on paper, taken off on
   the review wash, left on the under wash. The house radius throughout. */
/* Three equal tiles across the same width as the coding table above and
   the line table below, so the band reads as one column of edges. */
.ir-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ir-fig {
  min-width: 0; padding: 8px 14px 9px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--paper-2);
}
.ir-fig[data-k="submitted"] { border-color: var(--fill-strong); }
.ir-fig[data-k="adjusted"] { background: var(--signal-review-wash); border-color: var(--signal-review); }
.ir-fig[data-k="net"] { background: var(--signal-under-wash); border-color: var(--signal-under); }
.ir-fig-label { font-size: 11px; font-weight: 700; color: var(--ink); margin: 0 0 2px; }
.ir-fig-value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 700; color: var(--ink); margin: 0;
}
.ir-fig[data-needs-you] .ir-fig-value { color: var(--signal-review); }

.ir-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.ir-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 14px; border-bottom: 1px solid var(--rule);
}
.ir-card-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 8px; }
.ir-card-sub { margin: 2px 0 0; font-size: 12px; line-height: 17px; color: var(--ink-2); }
/* The three steps of the work, numbered, so a reader who has not done this
   before can see the order without being marched through it. A dark tile,
   because the number is a control's kind of mark rather than text. */
.ir-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: var(--radius); flex: none;
  background: var(--fill-strong); color: var(--surface);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}
/* The headline's currency breakdown. Shown only when the scope spans more
   than one, because a single-currency band needs no explanation and a note on
   every screen is a note nobody reads. */
.hs-fx { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.hs-fx-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 11px; color: var(--ink-2); max-width: 220px;
}
.hs-fx-row b { color: var(--ink-3); font-weight: 600; }

/* The currency breakdown is reference rather than news, so it folds away.
   The headline above it still refuses to print a figure across currencies --
   that is not a preference, it is euros added to dollars. */
/* The other currencies, on one line under the headline. Secondary to the
   figure above it and still legible: these are real totals, not a footnote.
   Styled here because an element whose class exists only in a template's
   JavaScript inherits the body's 16px and renders larger than the figures it
   sits under -- which is what it did until somebody looked at the page. */
.hs-fx-also {
  margin: 4px 0 6px; font-size: 12px; line-height: 17px; color: var(--ink-2);
}
.hs-fx-one { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.hs-fx-toggle {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 600; color: var(--ink-3);
  text-decoration: underline; text-underline-offset: 2px;
}
.hs-fx-toggle:hover { color: var(--ink); }
.hs-fx-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }

/* ---------------------------------------------------------------------------
   The book of work
   ---------------------------------------------------------------------------
   Declared priority against schedule health, and the ranked drill-down under
   it. The one accent on this band is spent on the contradiction -- a matter
   somebody called high priority that has stopped moving -- because that is
   the single thing here that needs a person, which is what the accent means
   everywhere else in this product. Nothing else in the grid is coloured: a
   heat map over every cell would spend the accent forty-five times and say
   nothing. */
.bw-band {
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
}
.bw-head {
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.bw-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.bw-sub { font-size: 12px; color: var(--ink-2); }
.bw-head-link { margin-left: auto; }
.bw-empty { color: var(--ink-2); margin: 0; }

.bw-grid-wrap {
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
@media (max-width: 1100px) { .bw-grid-wrap { grid-template-columns: minmax(0, 1fr); } }

/* `min-width: 0` on both, and it is load-bearing rather than tidying. A grid
   child refuses to shrink below its content's min-content width by default,
   and the left one holds a six-column table while the right one holds matter
   titles that do not wrap -- so without it either can push the other out of
   the band instead of scrolling inside itself, which is the rule that says
   nothing may hide content to stop it overflowing. The `minmax(0, …)` on the
   columns above says the same thing from the other side; both are cheap and
   the failure is a layout that only breaks on somebody else's long title. */
.bw-matrix-block, .bw-ranked-block { min-width: 0; }

.bw-block-head {
  margin: 0 0 8px; font-size: 11px; line-height: 16px; color: var(--ink-2);
}

/* The matrix. A table because it is one: two labelled axes and a count in
   each cell, which is what a screen reader needs to be able to say. */
.bw-matrix { width: 100%; border-collapse: collapse; }
.bw-matrix th, .bw-matrix td {
  padding: 6px 8px; text-align: center; font-size: 12px;
  border-bottom: 1px solid var(--rule);
}
.bw-matrix thead th {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink-3); white-space: nowrap; border-bottom: 1px solid var(--rule-strong);
}
.bw-matrix tbody th {
  text-align: left; font-weight: 600; color: var(--ink);
  text-transform: capitalize; white-space: nowrap;
}
.bw-matrix .bw-corner { border-bottom: 1px solid var(--rule-strong); }
.bw-matrix .bw-total { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bw-n {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.bw-n:hover { text-decoration: underline; text-underline-offset: 2px; }
.bw-nil { color: var(--ink-3); }
.bw-matrix td[data-empty] { background: transparent; }

/* The finding, and the only accent on the band. */
.bw-matrix td[data-at-odds] { background: var(--needs-you-wash); }
.bw-matrix td[data-at-odds] .bw-n { color: var(--needs-you); }
.bw-finding {
  margin: 10px 0 0; font-size: 12px; font-weight: 600; color: var(--needs-you);
}
.bw-counts { margin: 6px 0 0; font-size: 11px; color: var(--ink-2); }
.bw-legend {
  margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--rule);
  display: grid; gap: 2px 14px; grid-template-columns: max-content minmax(0, 1fr);
}
.bw-legend-row { display: contents; }
.bw-legend dt { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.bw-legend dd { margin: 0; font-size: 11px; color: var(--ink-3); }

/* The drill-down. */
.bw-ranked { list-style: none; margin: 0; padding: 0; }
.bw-item { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.bw-item:last-child { border-bottom: 0; }
.bw-item-head {
  display: flex; align-items: baseline; gap: 8px;
  text-decoration: none; color: inherit;
}
.bw-item-head:hover .bw-mtitle { text-decoration: underline; text-underline-offset: 2px; }
.bw-mno { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.bw-mtitle {
  font-size: 13px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
}
.bw-mpri {
  font-size: 11px; font-weight: 600; text-transform: capitalize;
  color: var(--ink-3); white-space: nowrap;
}
.bw-mpri[data-p="high"] { color: var(--needs-you); }
.bw-mmoney {
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bw-why { margin: 2px 0 0; font-size: 11px; color: var(--ink-2); }
.bw-none { font-size: 12px; color: var(--ink-2); padding: 8px 0; }

/* Ways the approval chain is weaker than the matrix says. A note under the
   timeline rather than a badge on a step: the concern is about the shape of
   the ladder, not about any one rung of it. */
.lr-concerns {
  padding: 8px 14px 10px; border-top: 1px solid var(--rule);
  background: var(--signal-review-wash);
}
.lr-concern-head {
  margin: 0 0 4px; font-size: 11px; font-weight: 700; color: var(--signal-review);
}
.lr-concern-list { margin: 0; padding-left: 18px; }
.lr-concern-list li {
  font-size: 11px; line-height: 17px; color: var(--ink-2);
}

/* ── What the rules found, grouped by rule ──────────────────────────────
   One question per group with its lines under it. The two severities are
   told apart by a left edge and a word, never by colour alone: "must be
   fixed" and "for you to judge" are different kinds of thing, and a
   reviewer should not have to learn which shade means which. */
.lr-rule-groups { display: flex; flex-direction: column; }
.lr-rule {
  padding: 10px 14px; border-bottom: 1px solid var(--rule);
  border-left: 3px solid var(--rule);
}
.lr-rule:last-child { border-bottom: none; }
.lr-rule.is-blocking { border-left-color: var(--signal-over); background: var(--signal-over-wash); }
.lr-rule.is-flag { border-left-color: var(--signal-review); }
.lr-rule-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.lr-rule-sev { font-size: 11px; font-weight: 700; color: var(--signal-review); }
.lr-rule.is-blocking .lr-rule-sev { color: var(--signal-over); }
.lr-rule-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.lr-rule-code { font-size: 10px; color: var(--ink-3); }
.lr-rule-ref { font-size: 11px; color: var(--ink-3); }
.lr-rule-count { font-size: 11px; color: var(--ink-2); margin-left: auto; }
.lr-rule-lines { list-style: none; margin: 6px 0 0; padding: 0; }
.lr-rule-lines li {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; line-height: 18px; color: var(--ink-2);
}
/* The line number is how a reviewer gets from the group back to the row it
   is about, so it is the control rather than a label beside one. */
.lr-rule-jump {
  flex: none; background: none; border: none; padding: 0; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--blue-deep);
  text-decoration: underline; text-underline-offset: 2px;
}
/* A line already answered stays listed -- the finding is what the firm
   billed, and hiding it would make the count unverifiable -- but it is not
   what is left to do. */
.lr-rule-lines li.is-answered { color: var(--ink-3); }
.lr-rule-lines li.is-answered .lr-rule-jump { color: var(--ink-3); }
.lr-rule-acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lr-rule-note { margin: 6px 0 0; font-size: 11px; line-height: 17px; color: var(--ink-2); }

/* The lines are the work. The card says so with a heavier head and a top
   rule in ink; everything else on the page is a plain card. */
.ir-card.is-hero { border-top: 3px solid var(--fill-strong); }
.ir-card.is-hero > .ir-card-head { padding: 12px 14px; background: var(--paper-2); align-items: flex-start; }
.ir-card.is-hero .ir-card-title { font-size: 15px; }
/* The second title bar of the hero: the invoice itself, on ink. The one
   place on the page its number is large; the eyebrow above the matter
   keeps it small beside the status. A dark band on a light ground is what
   `--fill-strong` is for. */
.ir-inv-bar {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 14px; background: var(--fill-strong); color: var(--surface);
  border-bottom: 1px solid var(--fill-strong);
}
/* These read `--mark-bar-2` and `--mark-bar-1` -- the mark's own steps, used
   as text on a dark band, which is a token borrowed for something that is not
   the mark. It was also unreadable: `--mark-bar-2` had become Line strong, a
   border weight, at 2.3:1 on `--fill-strong`. On the dark band the right
   answer is the dark band's own muted cut. */
.ir-inv-label { font-size: 11px; font-weight: 600; color: var(--on-dark-muted); }
.ir-inv-no { font-size: 19px; font-weight: 700; color: var(--on-dark); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ir-inv-meta { margin-left: auto; font-size: 12px; color: var(--on-dark-muted); }
.ir-inv-sep { color: var(--on-dark-muted); margin: 0 6px; }
.ir-open-chip {
  flex: none; margin-top: 2px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius);
  background: var(--signal-review-wash); color: var(--signal-review);
}
.ir-open-chip.is-done { background: var(--paper-3); color: var(--ink-2); }
.ir-count { color: var(--ink-3); font-weight: 400; }
/* Wide content scrolls inside its own container; it never clips and the page
   body never scrolls sideways. */
.sp-table-scroll { overflow-x: auto; max-height: 60vh; overflow-y: auto; }

.ir-col-n { width: 34px; }
.ir-col-flag { width: 48px; text-align: center; }
.ir-col-dec { width: 150px; text-align: right; }

.ir-flag {
  display: inline-block; min-width: 18px; padding: 0 5px;
  border-radius: var(--radius); font-size: 11px; font-weight: 700;
  background: var(--signal-review-wash); color: var(--signal-review);
}

/* OK, Adjust, Reject on one line, always. The row never wraps; below the
   table's floor the table scrolls inside its box instead of squeezing the
   column, and the buttons keep to three short words at a fixed size. */
.ir-dec-row { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.ir-dec {
  padding: 1px 6px; border-radius: var(--radius); font-size: 11px; font-weight: 600;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2);
  transition: background 120ms ease, color 120ms ease;
}
/* Hover darkens the ground and the border says which verdict it is. The
   signal colours are chosen to be read on paper and none of the three clears
   4.5:1 on a tinted ground, so colouring the label on hover would make the
   control less readable at the moment somebody is pointing at it. The colour
   lives on the recorded verdict below, which sits on white. */
.ir-dec:hover     { background: var(--paper-3); color: var(--ink); }
.ir-dec-ok:hover  { border-color: var(--signal-under); }
.ir-dec-adj:hover { border-color: var(--signal-review); }
.ir-dec-no:hover  { border-color: var(--signal-over); }

.ir-verdict { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.ir-verdict[data-a="accept"] { color: var(--signal-under); }
.ir-verdict[data-a="adjust"] { color: var(--signal-review); }
.ir-verdict[data-a="reject"] { color: var(--signal-over); }

/* Findings under the line they are about. A count in a summary block cannot
   say which line it is about, and that is what the reviewer is acting on. */
.ir-finding-row td { padding: 0 10px 6px 44px; border-top: 0; }
.ir-findings { margin: 0; padding: 0; list-style: none; }
.ir-findings li {
  font-size: 11px; color: var(--signal-review); padding: 1px 0;
}
.ir-cite { color: var(--ink-3); margin-left: 6px; }
/* The model's suggested cut, on the line. A tag rather than a colour, so a
   reader can tell a suggestion from a finding without a key. */
.ir-ai-rec {
  display: flex; align-items: center; gap: 5px; margin-top: 3px;
  font-size: 11px; color: var(--ink-2); white-space: nowrap;
}
.ir-ai-rec-tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .04em;
  padding: 0 4px; border-radius: var(--radius); background: var(--fill-strong); color: var(--surface);
}
.ir-ai-rec-go {
  font-size: 10px; line-height: 16px; padding: 0 6px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.ir-ai-rec-go:hover { background: var(--paper-3); }

.ir-bulk { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ir-bulk-label { font-size: 11px; color: var(--ink-3); }
.ir-bulk-row { display: flex; gap: 6px; align-items: center; }
.ir-bulk-select {
  font-size: 12px; padding: 3px 8px; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--surface); color: var(--ink);
}

/* Money changed to reach a cent, and money the firm's own header does not
   agree with. Quiet, and absent entirely when there is nothing to say: a note
   on every invoice is a note nobody reads. */
.ir-money-note {
  font-size: 12px; color: var(--signal-review);
  margin: 0; padding: 2px 12px;
}
/* The mark on a rounded line. It sits with the amount it changed, because
   that is the figure being reconciled against the firm's copy. */
.ir-rounded {
  margin-left: 4px; color: var(--signal-review); cursor: help;
  font-family: var(--font-mono);
}

/* ── Line table columns ─────────────────────────────────────────────────
   Every column but the narrative is given a width, and the narrative takes
   whatever is left. Without this the table distributed its slack evenly and
   pushed a 400px gap between the timekeeper and the rate, so a reviewer read
   each row by travelling across dead space. The narrative is the one column
   that genuinely wants room, and it is the last thing on the row, so giving
   it the remainder tightens everything else without truncating it.

   The widths are set on the header cells only. A width on both the th and the
   td is two declarations that can disagree, and the browser resolves the
   disagreement per column rather than per table. */
/* Read left to right: who, what, how much, what is wrong with it, what to do.
   Every column left-aligned by request. The figures keep their tabular mono
   face, so digits still share a width -- but note that left-aligned money does
   not line up its decimal points, so $5.15 and $1,052.27 no longer compare
   down the column the way right-aligned money does. That is a deliberate
   choice here rather than an oversight. */
/* `fixed` is the point. With auto layout the browser hands every spare pixel
   to whichever column has no width, which was the narrative -- so on a wide
   screen it stretched and opened a gap between it and the rates that grew with
   the window. Fixed with percentages that sum to 100 means each column keeps
   its share at every width, and the table stops being elastic in one place. */
#lr-table { table-layout: fixed; width: 100%; min-width: 1120px; }

/* Every width is on a **named class**, including the narrative's. It used to
   be `th:nth-child(6)`, which is a width pinned to a column's position -- so
   splitting the fees and the expenses into two tables moved Hours into sixth
   place, gave it 23% of the table, and squeezed the narrative to a word and
   an ellipsis on the screen whose whole job is reading narratives. A
   positional selector in a table is a rule that breaks the next time a column
   is added, and says nothing when it does. */
#lr-table .ir-c-n     { width:  3%; text-align: left; }
#lr-table .ir-c-date  { width:  6%; text-align: left; }
#lr-table .ir-c-tk    { width: 12%; text-align: left; }
#lr-table .ir-c-codes { width:  9%; text-align: left; }
#lr-table .ir-c-narr  { width: 23%; }
#lr-table .ir-c-hrs   { width:  5%; }
/* Rate and Amount are both money in the mono face, so both have to hold
   `$1,052.27` at that width. At 7% they overlapped and the two figures ran
   together into one unreadable string -- a fixed-layout table will not grow a
   cell, so a column too narrow for its content does not wrap, it collides. */
#lr-table .ir-c-rate  { width: 10%; }
#lr-table .ir-c-amt   { width: 10%; }
#lr-table .ir-c-find  { width: 11%; text-align: left; }
#lr-table .ir-col-dec { width: 11%; }

/* The expense table's seven, summing to the same 100. */
#lr-exp-table { table-layout: fixed; width: 100%; min-width: 820px; }
#lr-exp-table .ir-c-n     { width:  3%; text-align: left; }
#lr-exp-table .ir-c-date  { width:  6%; text-align: left; }
#lr-exp-table .ir-c-codes { width:  9%; text-align: left; }
#lr-exp-table .ir-c-narr  { width: 47%; }
#lr-exp-table .ir-c-amt   { width:  9%; }
#lr-exp-table .ir-c-find  { width: 15%; text-align: left; }
#lr-exp-table .ir-col-dec { width: 11%; }
#lr-exp-table .lr-narr-text { display: block; max-width: 68ch; }

/* Fixed layout will not grow a cell to fit, so anything that can be long has
   to say how it ends. The narrative already clamps to two lines. */
/* The timekeeper cell carries the level as a second line, so it wraps rather
   than ellipsing: a name and a level on one clipped line loses the level,
   which is the half rate review is about. */
#lr-table td.ir-c-tk { overflow: hidden; }
#lr-table td.ir-c-class {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* The total, as the last line of the line items. Against the amount column it
   totals, and heavier than the rows so the eye stops on it. */
.ir-total-row td {
  border-top: 2px solid var(--rule);
  padding-top: 8px;
  background: var(--surface);
}
.ir-total-label {
  text-align: right;
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 600;
}
.ir-total-value {
  /* Left, to match the amounts it totals. They were left-aligned by request,
     so a right-aligned total would end where none of them end. The padding has
     to match too: at 1px against the rows' 10px the total started nine pixels
     left of every figure above it. */
  text-align: left;
  padding-left: 10px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

/* The number is still set apart by weight and face rather than by edge. */
#lr-table td.lr-n    { text-align: left; }
#lr-table td.lr-amt  { text-align: left; }

/* The findings, in the line's own cell. One line, the first finding, a count
   when there are more, and the whole of it on hover -- a finding truncated
   with no way to read it is a finding a reviewer cannot act on. */
/* `min-width: 0` on the flex box and its text is what lets the ellipsis
   happen: a flex item will not shrink below its content, so without it the
   finding ran out of its cell and under the Decision buttons (2026-11-18). */
#lr-table td.ir-c-find, #lr-exp-table td.ir-c-find { vertical-align: middle; overflow: hidden; }
.ir-findings { display: flex; align-items: baseline; gap: 6px; cursor: help; min-width: 0; }
.ir-findings-count {
  flex: none;
  min-width: 16px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--signal-review);
  background: var(--signal-review-wash);
  border-radius: var(--radius);
  padding: 0 4px;
}
.ir-findings-text {
  min-width: 0;
  font-size: 11px;
  color: var(--signal-review);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The findings under a line. These are what the guideline engine found, and
   they are deliberately not called flags: `flag` is one of the four reviewer
   verdicts, so a line can read "Flagged" in its Decision meaning the reviewer
   flagged it, and one word meaning two things on one row is worse than a
   longer word.

   The count used to be a column of its own, showing a number beside the row
   that spelled the same thing out. It was empty on 96% of lines and took width
   from the narrative to say less than the row below it. */
.ir-findings-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--signal-review);
  margin-right: 8px;
  vertical-align: top;
  padding-top: 1px;
}
.ir-findings { display: inline-block; vertical-align: top; }

/* Everything that has happened to this invoice, at the foot of the screen.
   It replaced a banner at the top that reported only what legal ops did,
   attributed every adjustment to legal ops whoever actually made it, and
   repeated figures the lines already carry. What a log adds is who, when, and
   what the figure was before somebody changed it -- the last of which is the
   one thing a line cannot show, because a line shows what it is now. */
.ir-history { margin-top: 4px; }
.ir-history-list { list-style: none; margin: 0; padding: 0; }
.ir-history-row {
  display: grid;
  grid-template-columns: 150px 180px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 6px 12px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
}
.ir-history-row:first-child { border-top: 0; }
.ir-history-when {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-3);
}
.ir-history-who { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.ir-history-what { color: var(--ink); }
.ir-history-move {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
  color: var(--signal-review);
}
/* The reason somebody gave, on its own line under what they did. It is the
   part a firm reads and the part an approver most needs. */
.ir-history-why {
  display: block;
  color: var(--ink-2);
  font-size: 11px;
  margin-top: 1px;
}
.ir-history-empty { color: var(--ink-3); padding: 10px 12px; margin: 0; }


/* ─────────────────────────────────────────────────────────────────────
 * Kendres components
 *
 * BRAND.md's "UI components" table, and `brand/ui-reference/` is the
 * drawing of it. Appended, so it settles what the sections above decided
 * differently -- the same reason the conformance layer sits where it does,
 * and the trap the last two restyles of this platform fell into.
 *
 * Every value here is the brand's, and where a number is derived rather
 * than quoted the derivation is written beside it.
 * ───────────────────────────────────────────────────────────────────── */

/* ── The small-caps label ──────────────────────────────────────────────
   11px, 600, uppercase, 0.14em, Stone. It is the one place this interface
   sets all-caps, and it is a **micro-label** -- a column header, a stat
   tile's name, a nav section -- never a sentence or a heading.

   That distinction is what the blanket ban above was reaching for and
   could not express: it killed every `text-transform: uppercase` in the
   sheet, which is right for a heading and wrong for the brand's own label.
   The Tailwind `.uppercase` utility stays neutralised, because a template
   reaching for it is still styling arbitrary text. */
.sp-label,
.sp-eyebrow,
.navlabel,
.leftbar-eyebrow,
.sp-stat-tile-label,
table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 16px;
  color: var(--ink-2);          /* BRAND.md: Stone */
}

/* **The two labels on the dark sidebar keep their own cut.** The rule above
   loads after the shell and gave every label Stone, which on Charcoal is
   3.07:1 -- so "Workspace", "Saved views" and "Admin" were below AA on every
   internal screen, put there by the rule that was meant to make labels
   consistent.

   Exactly the failure `.sidebar` sets `--mark-ink` once to avoid: a dark
   surface whose contents each decide their own cut is one where a later,
   well-meant rule flattens them all onto the light answer. */
.navlabel, .leftbar-eyebrow { color: var(--on-dark-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────
   Three, and the brand is specific about each. 38px tall, 6px radius, 600.
   One primary per view -- which is a rule about screens rather than about
   CSS, so `tests/test_interface_spec.py` counts them per template. */
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--motion) ease, border-color var(--motion) ease;
}
.sp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Graphite fill, Mist text, Charcoal on hover. */
.sp-btn--primary, .sp-btn-primary {
  background: var(--fill-strong);
  border-color: var(--fill-strong);
  color: var(--on-dark);
}
.sp-btn--primary:hover, .sp-btn-primary:hover {
  background: var(--fill-strong-2);
  border-color: var(--fill-strong-2);
  color: var(--on-dark);
}

/* Mist light fill, Line border, Graphite text. Stone border on hover -- the
   brand moves the *border* rather than the fill, which is what keeps a row
   of secondaries from flickering as the pointer crosses them. */
.sp-btn--secondary {
  background: var(--surface);
  border-color: var(--rule);
  color: var(--ink);
}
.sp-btn--secondary:hover { border-color: var(--ink-2); }

/* No fill. For destructive-but-common actions -- Reject -- which is why it
   is the quietest of the three and still always carries a confirm step. */
.sp-btn--ghost, .sp-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}
.sp-btn--ghost:hover, .sp-btn-ghost:hover {
  background: var(--blue-wash);       /* the soft line tint */
  border-color: transparent;
}

/* The two legacy spellings keep the box the new ones have, so a template
   written against either comes out the same height and radius. */
.sp-btn-primary, .sp-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.sp-btn-primary:active { transform: none; }   /* spec: no hover or press lifts */

/* A small cut, for a control inside a table row or a card head, where a
   38px button would set the row height. */
.sp-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }

/* ── Inputs ────────────────────────────────────────────────────────────
   36 to 40px, Mist light fill, Line border, 6px radius; labels above at
   13px 600. The focus ring is the accent and is declared once, in the
   conformance layer, for every interactive element at once. */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"],
input[type="tel"], input[type="url"], select, textarea {
  min-height: 38px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color var(--motion) ease;
}
textarea { min-height: 76px; line-height: 1.45; }
select { padding-right: 30px; }
/* An input that sets its own side padding keeps it. The rule above is
   `input[type="text"]`, which outranks a Tailwind utility like `pl-6`, so every
   amount field with a `$` drawn inside it lost the room left for the sign and
   the typed figure ran into it, and a search box's text ran under its icon
   (found on the budget request, 2026-10-12). Same specificity as the rule
   above and later in the sheet, so these win. Only the values templates use. */
input.pl-3 { padding-left: 0.75rem; }  input.pl-5 { padding-left: 1.25rem; }
input.pl-6 { padding-left: 1.5rem; }   input.pl-7 { padding-left: 1.75rem; }
input.pl-9 { padding-left: 2.25rem; }
input.pr-2 { padding-right: 0.5rem; }  input.pr-3 { padding-right: 0.75rem; }
input.pr-7 { padding-right: 1.75rem; } input.pr-8 { padding-right: 2rem; }
input.pr-2\.5 { padding-right: 0.625rem; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.sp-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ── Cards and panels ──────────────────────────────────────────────────
   Mist light fill, 1px Line, 6px radius, no shadow -- and **Line strong
   when the card holds data**, which is the brand drawing the distinction
   this sheet already makes between a panel of prose and a panel of
   figures. `.sp-card--data` asks for the heavier edge by name. */
.sp-card, .sp-card-quiet, .sp-card--quiet, .sp-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: none;
}
.sp-card--data, .sp-panel--data { border-color: var(--rule-strong); }
.sp-card-tinted { background: var(--paper-2); border-color: var(--rule); }

/* ── Stat tiles ────────────────────────────────────────────────────────
   Line strong border, small-caps Stone label, 24px 800 value with tabular
   figures, one quiet sub-note. No coloured washes: the three tiles this
   replaces were painted amber and green, which spends a signal on a figure
   that is not a status. */
.sp-stat {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.sp-stat-label { color: var(--ink-2); }
.sp-stat-value {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.sp-stat-sub { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.sp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

/* A meter is Graphite on a light Line track. Never the accent: a budget at
   80% is a fact about a number, not something asking to be dealt with. */
.sp-meter {
  margin-top: 10px;
  height: 6px;
  /* Fully round rather than the 3px the reference writes: at 6px tall those
     are the same shape, and saying `999px` says it is a pill on purpose
     rather than a rounded rectangle that happens to close. */
  border-radius: 999px;
  background: var(--blue-wash);
  overflow: hidden;
}
.sp-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--fill-strong); }

/* ── Badges ────────────────────────────────────────────────────────────
   Pill, 24px, 12px 600, light Line fill, with a small status dot. The pill
   is the one place a full radius is allowed, and it is allowed because the
   shape is the component: a 6px badge reads as a small button. */
.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: var(--blue-wash);
  color: var(--ink);
}
.sp-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-2);
  flex: none;
}
.sp-badge--attention { background: var(--needs-you-wash); color: var(--needs-you); }
.sp-badge--attention .dot { background: var(--accent); }

/* ── The status banner ─────────────────────────────────────────────────
   Mist light panel, a Coral dot, the finding in one sentence, and the
   review time on the right. The dot is the accent and the sentence is not:
   Coral is 3.01:1 and this is a line somebody has to read. */
.sp-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink);
}
.sp-banner-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}
.sp-banner-time { margin-left: auto; font-size: 13px; color: var(--ink-2); }

/* ── Tables ────────────────────────────────────────────────────────────
   Line strong around the container and under the header, Line between
   rows, small-caps Stone headers, numbers right with tabular figures.

   The header band this replaces was `--paper-3` at 600 in `--ink`. The
   brand's is the card's own ground with a heavier rule under it, which is
   quieter and relies on the small-caps label to give the row its rank. */
table thead th {
  background: var(--surface);
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink-2);
  padding: 10px 12px;
  height: auto;
}
table tbody td {
  padding: 12px;
  height: auto;
  font-size: 14px;
  line-height: 1.45;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
/* Density is still a setting, and the compact rows are what a queue of
   thirty invoices wants. The brand's padding is the comfortable end. */
table[data-density="compact"] tbody td,
table[data-density="compact"] thead th {
  height: var(--row-h);
  padding: 0 10px;
  font-size: 12px;
  vertical-align: middle;
}
.sp-num, td.sp-num, th.sp-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
/* Secondary information -- a role, a code -- as a second line rather than a
   column of its own. Twelve columns is what happens when every fact gets
   one, and the reference puts the timekeeper's level under their name. */
.sp-sub { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* ── A flagged row ─────────────────────────────────────────────────────
   Coral tint ground, a Coral dot and a short reason in the review column,
   and the adjustment under the amount. The reason and the adjustment take
   the accent's **text** cut: they are words, and Coral proper is 3.01:1. */
tr.is-flagged > td { background: var(--needs-you-wash); }
.sp-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--needs-you);
}
.sp-flag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.sp-adj { display: block; margin-top: 2px; font-weight: 600; color: var(--needs-you); }

/* ── Tabs ──────────────────────────────────────────────────────────────
   Underlined, not pilled: chips already mean status on these screens, and
   a second pill shape would make the reader decide which kind they are
   looking at before reading either. */
.sp-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--rule);
}
.sp-tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  transition: color var(--motion) ease, border-color var(--motion) ease;
}
.sp-tab:hover { color: var(--ink); }
.sp-tab.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ── Overlays ──────────────────────────────────────────────────────────
   The one place a shadow is allowed, because an overlay has to read as
   being in front of the page rather than part of it. */
.sp-modal, .sp-menu, .sp-toast {
  background: var(--elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}
.sp-modal { max-width: 560px; width: 100%; }
.sp-modal-head { padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.sp-modal-body { padding: 20px; }
.sp-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
}
.sp-toast { padding: 12px 16px; font-size: 13px; color: var(--ink); }

/* ── Empty states ──────────────────────────────────────────────────────
   A sentence in Stone, not a placeholder graphic. An empty table says what
   would be here and how it gets here; the one thing it must not do is read
   as a page that failed to load. */
.sp-empty, .sp-empty-block {
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  font-style: normal;
  font-weight: 400;
}

/* ── Icons ─────────────────────────────────────────────────────────────
   One weight, everywhere: 1.8px, round caps and joins, `currentColor`, no
   fills. The templates carry 138 inline icons at stroke-width 2 and a
   scatter at 1, 1.5, 1.7, 2.2, 2.5 and 3, which is five icon sets sharing
   one interface. Normalised here rather than edited in place: they are
   inline SVG in sixty templates, and a sweep would have to be repeated for
   every icon added afterwards.

   Scoped to stroked icons -- `fill="none"` -- so an SVG that is genuinely
   artwork, like the mark, is left alone. */
svg[fill="none"] {
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── The invoice review's own spine ────────────────────────────────────
   The reference's shape: a page head, a status banner, four tiles, then the
   invoice as a document -- its header fields, fees, expenses, totals. The
   panels this product has and the reference does not (where the invoice is,
   the AI read, the matter's position, the record check, the history) sit
   below it, restyled but unmoved: the invoice reads as an invoice first. */
/* `align-items: stretch` is stated, not inherited. The `.ir-page` rule above
   sets `align-items: start`, which was right for the grid it belonged to and
   is wrong here: in a column flex it shrinks every child to its own content
   width, so the banner and the tiles came out as narrow as their text while
   the table below them spanned the page. */
.ir-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  max-width: 1400px;
}

.ir-head { display: flex; align-items: flex-start; gap: 24px; }
.ir-head-main { min-width: 0; }
.ir-title {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.ir-title-sep { color: var(--ink-3); font-weight: 400; margin: 0 2px; }
.ir-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.ir-head-matter { color: var(--ink-2); text-decoration: none; }
.ir-head-matter:hover { color: var(--ink); text-decoration: underline; }
.ir-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.lr-back { display: inline-block; margin-bottom: -8px; }

/* The document. `--rule-strong` because it holds data, which is the
   distinction BRAND.md draws between a panel of prose and a panel of
   figures. */
.ir-doc { overflow: hidden; }
.ir-doc-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule-strong);
}
.ir-doc-v { margin: 4px 0 0; font-weight: 600; color: var(--ink); }
.ir-doc-caption {
  caption-side: top;
  text-align: left;
  padding: 16px 20px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.ir-doc .sp-table-scroll { border: 0; border-radius: 0; }
.ir-doc table th:first-child, .ir-doc table td:first-child { padding-left: 20px; }
.ir-doc table th:last-child, .ir-doc table td:last-child { padding-right: 20px; }
/* The last row of a section has the section's own edge under it already. */
.ir-doc table tbody tr:last-child > td { border-bottom: 0; }

.ir-c-date { white-space: nowrap; color: var(--ink-2); }
.ir-c-hrs { width: 70px; }
.ir-c-rate { width: 90px; }

/* The totals block: a note on the left, the figures on the right, the net
   under a heavier rule. */
/* The bulk line tool, last in the invoice document: under the totals, inset
   like them, and divided by the lighter rule because it is a control rather
   than a figure. */
.ir-doc-bulk {
  margin: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--rule);
}

.ir-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--rule-strong);
}
.ir-totals-note { margin: 0; font-size: 13px; color: var(--ink-2); max-width: 46ch; }
.ir-totals-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.ir-totals-list dt { color: var(--ink-2); }
.ir-totals-list dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.ir-totals-list dd.sp-adj { display: block; margin: 0; }
.ir-totals-list .grand {
  padding-top: 10px;
  border-top: 1px solid var(--rule-strong);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 899px) {
  .ir-head { flex-direction: column; }
  .ir-actions { margin-left: 0; }
  .ir-totals { grid-template-columns: minmax(0, 1fr); }
}

/* ── A flagged line's review cell ──────────────────────────────────────
   BRAND.md draws it as "a Coral dot plus a short reason in Coral text",
   with the adjustment under the amount. These carried the review signal --
   the ochre -- which was right while the accent was a parchment gold and
   needs-you had to borrow a signal to avoid spending it twice. The accent
   is free now and this is exactly what it is for: the one thing on the row
   that needs attention.

   The dot is Coral and the words are the accent's **text** cut. Coral
   measures 3.01:1 on a card, which clears the 3:1 a dot has to and not the
   4.5:1 a sentence does, and a reviewer acts on the sentence. */
.ir-findings-count {
  min-width: 0;
  padding: 0;
  width: 6px;
  height: 6px;
  align-self: center;
  border-radius: 50%;
  background: var(--accent);
  color: transparent;            /* the count is in the tooltip and the text */
  font-size: 0;
  overflow: hidden;
}
.ir-findings-text { color: var(--needs-you); font-weight: 600; }
.ir-findings li { color: var(--needs-you); }

/* Money keeps the money face across the whole row. Rate was proportional
   while Amount beside it was mono, which on a column of figures reads as two
   different kinds of number. Hours stay in the UI face with tabular figures:
   they are a quantity rather than money, and the brand's rule is about
   alignment, which tabular gives either way. */
#lr-table td.ir-c-rate, #lr-table td.ir-c-amt,
#lr-exp-table td.ir-c-amt {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
#lr-table td.ir-c-hrs {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* The open count, and the adjustments tile when something has come off.
   Both are needs-you states, so both take the accent rather than a colour of
   their own: what is left to answer is an errand, and a bill that has been
   cut is something the approver has to be told before they decide. */
.ir-open-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--needs-you);
}
.ir-open-chip.is-done { color: var(--ink-2); font-weight: 400; }
.sp-stat[data-needs-you] { border-color: var(--accent); }
.sp-stat[data-needs-you] .sp-stat-value { color: var(--needs-you); }

/* ── The outside counsel portal's own bar ──────────────────────────────
   BRAND.md allows the portal a lighter shell than the internal app, and it
   is worth taking. The dark band is how the workspace says "this is where
   the work happens"; a firm is a guest here, and a light bar carrying the
   same lockup says the same brand without borrowing the same furniture.

   It is the same distinction the portal already makes everywhere else --
   three verbs lead, targets are 44px, the body is 15px -- and the reason
   never to apply the internal app's density here, or this hand-holding
   there. */
.portal-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.portal-bar .lockup { --lockup-mark: 20px; }
/* "Portal" beside the wordmark rather than inside it: the lockup is the
   brand and this says which of its surfaces you are on. Set at the
   wordmark's own size in Stone so it reads as a qualifier. */
.portal-bar-suffix {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  margin-left: 2px;
}
.portal-bar-sep { width: 1px; height: 24px; background: var(--rule); flex: none; }
.portal-bar-firm {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.portal-bar-parent {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.portal-bar-user { font-size: 13px; color: var(--ink-2); }
.portal-bar-util {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;            /* the portal's 44px-ish target */
  color: var(--ink-2);
  border-radius: var(--radius);
  transition: color var(--motion) ease, background var(--motion) ease;
}
.portal-bar-util:hover { color: var(--ink); background: var(--blue-wash); }
.portal-bar-link {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 12px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color var(--motion) ease, background var(--motion) ease;
}
.portal-bar-link:hover { color: var(--ink); background: var(--blue-wash); }

/* The unread count. It was `bg-red-500` with white text -- an alert colour
   for "you have mail", which on the one surface a firm is told things is
   exactly the adversarial read the portal is supposed to avoid. It is the
   accent, the same as the internal app's count, and on the accent's darker
   text cut because Mist light on Coral is 3.01:1. */
.portal-notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  color: var(--on-dark);
  background: var(--needs-you);
  border-radius: 999px;
}

/* ── The focus ring wins ───────────────────────────────────────────────
   Two ways it was being lost, both invisible until somebody tabbed.

   **`focus:outline-none`**, which 149 places across 28 templates ask for.
   Tailwind renders it as `outline: 2px solid transparent` -- a real outline
   the same colour as nothing -- and at class+pseudo specificity it beats the
   conformance layer's `:where(...)` ring, which carries the pseudo-class
   alone. So those fields focused with no visible ring at all. The utility is
   neutralised here for the same reason `.uppercase` is: a template asking for
   no focus ring is asking for something the brand forbids, and the usual
   reason it is written is to replace the ring with a coloured border, which
   is not the same affordance.

   **A scrolling container is focusable**, whether or not anyone gave it a
   tabindex: Chrome puts keyboard focus on any element with overflow so it can
   be scrolled by keyboard, and with no rule of its own it drew the browser's
   default ring -- `1px auto rgb(0, 95, 204)`, which is a **blue**, in a brand
   that has none. It was reachable by tab on every list screen and by nothing
   else, which is why three passes of colour work never saw it. */
.focus\:outline-none:focus,
.focus\:outline-none:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px;
}
.sp-table-scroll:focus,
.sp-table-scroll:focus-visible,
[class*="overflow-"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;   /* inside the container, which has no room outside */
}

/* ---------------------------------------------------------------------------
   Where this invoice is, at the top right of the page it is about.
   ---------------------------------------------------------------------------
   It was a small grey pill in the meta line under the title, beside the matter
   link and the billing period, rendering the raw column. That is the single
   most important fact on the screen -- it decides which of the controls next
   to it mean anything -- and it was the quietest thing in the header.

   The tone is the status's own, and Coral stays reserved: a rejected or
   errored invoice is a functional status rather than something that needs the
   reader's attention in the sense the accent means. */
.ir-head-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  min-width: 0;
}
.ir-status {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 8px; border-radius: var(--radius);
  border: 1px solid var(--rule-strong); background: var(--surface);
  max-width: 100%;
}
.ir-status-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ink-3);
}
.ir-status-words { display: flex; flex-direction: column; min-width: 0; }
.ir-status-label {
  font-size: 14px; font-weight: 600; color: var(--ink); line-height: 18px;
  white-space: nowrap;
}
.ir-status-sub {
  font-size: 11px; color: var(--ink-2); line-height: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 280px;
}
/* The brand's own three signal names, which is what the lifecycle serves.
   These selectors read `ok` / `warn` / `bad` while the script set
   `under` / `review` / `over`, so no rule here had ever matched -- the dot
   would have stayed colourless even once the tone resolved. Two maps, two
   vocabularies, one invisible status. */
/* A status chip in the brand's three signals, for a list row. The queue
   painted these from a Tailwind map keyed on retired statuses, so every chip
   drew the grey default. Named for the tone the lifecycle serves, so the map
   in the page is a lookup of three rather than a copy of the vocabulary. */
.tone-chip-under  { background: var(--signal-under-wash);  color: var(--signal-under-text); }
.tone-chip-review { background: var(--signal-review-wash); color: var(--signal-review); }
.tone-chip-over   { background: var(--signal-over-wash);   color: var(--signal-over); }

.ir-status[data-tone="under"] .ir-status-dot { background: var(--signal-under); }
.ir-status[data-tone="review"] .ir-status-dot { background: var(--signal-review); }
.ir-status[data-tone="over"] .ir-status-dot { background: var(--signal-over); }
.ir-status[data-tone="over"] { border-color: var(--signal-over); }

@media (max-width: 900px) {
  .ir-head-right { align-items: flex-start; }
  .ir-status-sub { max-width: 100%; }
}

/* An accrual booked at the Kendres estimate, because the firm reported nothing
   for the month (2026-10-12). One treatment on every screen: the review
   colour, dashed, on its wash, so an estimate is never read as a figure a firm
   gave us, and never confused with aging, which is the same colour solid. */
.sp-est {
  display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 16px;
  color: var(--signal-review); background: var(--signal-review-wash);
  border: 1px dashed var(--signal-review); border-radius: var(--radius); padding: 0 5px;
}
.lv-seg--est, .lv-key--est { background: var(--signal-review-wash); border: 1px dashed var(--signal-review); }


/* Kristi on a matter (2026-10-15): the ask bar above the matter's tabs, and
   the conversation under it. A card, not a chat window: questions and answers
   read like the rest of the page, newest first. */
.kq { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px; }
.kq-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kq-label { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.kq-input { flex: 1 1 260px; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--canvas); color: var(--ink); font: inherit; font-size: 14px; }
.kq-suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.kq-suggest:empty { display: none; }
.kq-chip { border: 1px solid var(--rule); background: var(--canvas); color: var(--ink-2); border-radius: var(--radius);
  padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.kq-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.kq-thread:empty { display: none; }
.kq-turn { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 10px; }
.kq-q { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.kq-answer p { font-size: 14px; line-height: 1.55; color: var(--ink); max-width: 80ch; margin: 0 0 8px; }
.kq-answer ul { margin: 0 0 8px; padding-left: 18px; max-width: 80ch; }
.kq-answer li { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 0 0 4px; }
.kq-fig { font-family: var(--font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.kq-cite { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; margin: 0 1px;
  border-radius: var(--radius); background: var(--paper-3); color: var(--ink-2); font-size: 10px; font-weight: 600;
  text-align: center; text-decoration: none; vertical-align: 2px; }
a.kq-cite:hover { background: var(--rule); color: var(--ink); }
.kq-sources { list-style: none; padding: 0; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.kq-sources li { font-size: 12px; color: var(--ink-2); }
.kq-sources a { color: var(--ink-2); }
.kq-meta { font-size: 12px; color: var(--ink-2); margin: 0; }

.kq-link { border: 0; background: none; padding: 0; margin-left: 8px; font: inherit; font-size: 12px;
  color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* Since you last looked, and Needs you: two cards side by side, stacked on a
   phone. */
.ms-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.ms-card { padding: 14px 18px; min-width: 0; }
.ms-list { list-style: none; margin: 6px 0 0; padding: 0; }
.ms-list li { font-size: 13px; line-height: 1.45; padding: 6px 0; border-top: 1px solid var(--rule); }
.ms-list li:first-child { border-top: 0; }
.ms-list li a { color: var(--ink); }
.ms-list li[data-needs-you] a { color: var(--accent-text); }

/* A change Kristi proposed: what will happen, and one press to apply it. */
.kq-prop { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--canvas);
  padding: 10px 12px; margin: 8px 0; max-width: 80ch; }
.kq-prop p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.kq-prop-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.kq-prop.is-done { border-color: var(--rule); background: var(--surface); }

/* A change proposal card (2026-10-16, _partials/proposal_card.html): the
   tier badge, the rows with their before and after, the source quoted, and
   Apply. Its own surface, so it reads the same on the matter page and in the
   palette's dark overlay. The Decision badge is Graphite fill, the others a
   line; Coral is not spent here, because a proposal is not a finding. */
.kp-card { border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); padding: 12px 14px; margin: 10px 0; max-width: 80ch; text-align: left; }
.kp-head { display: flex; gap: 10px; align-items: baseline; }
.kp-head p { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.kp-badge { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 2px 8px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius); color: var(--ink-2); }
.kp-badge[data-tier="3"] { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--surface); }
.kp-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.kp-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--rule); }
.kp-row:first-child { border-top: 0; }
.kp-row input[type="checkbox"] { margin-top: 3px; flex: none; }
.kp-row p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.kp-where { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kp-src { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.kp-src q { display: block; margin-top: 2px; padding-left: 8px; border-left: 2px solid var(--rule-strong);
  color: var(--ink); quotes: "\201C" "\201D"; }
.kp-needs { border: 0; margin: 8px 0 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.kp-needs legend { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; width: 100%; }
.kp-meta { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.kp-dropped { margin: 2px 0 0 18px; padding: 0; font-size: 12px; color: var(--ink-2); }
.kp-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.kp-result { margin-top: 6px; }
.kp-result .sp-btn { margin-top: 8px; }
.kp-msg { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.kp-msg.is-refused { color: var(--signal-over); }
.kp-hint { font-size: 12px; color: var(--ink-2); }
.kp-hint[hidden] { display: none; }
.kp-keys kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--rule-strong);
  border-radius: var(--radius); background: var(--canvas); color: var(--ink); }
.kp-receipt { list-style: none; margin: 6px 0 0; padding: 0; }
.kp-receipt li { padding: 6px 0; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.45; color: var(--ink);
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.kp-receipt li:first-child { border-top: 0; }
.kp-receipt .kp-src { width: 100%; margin-top: 2px; }
.kp-tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: var(--radius); background: var(--signal-over-wash);
  color: var(--signal-over); }
.kp-fix { height: 32px; font-size: 13px; text-decoration: none; }
.kp-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.kp-options { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.kp-option { justify-content: space-between; height: auto; min-height: 38px; padding: 8px 12px; white-space: normal; text-align: left; }
.kp-toast { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -2px 0 10px; padding: 8px 10px;
  border-radius: var(--radius); background: var(--paper-2); font-size: 13px; color: var(--ink); }
.kp-toast .sp-btn { height: 30px; font-size: 13px; }
.mp-auto { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.mp-auto input { margin-top: 2px; }
@media (max-width: 640px) { .kp-actions .sp-btn { min-height: 44px; } }

/* ---------------------------------------------------------------------------
   The redesigned matter page (2026-10-16, templates/matter_page.html and
   _partials/matter/). A header card, then a work column beside Kristi docked
   at 392px. One column at 1100px and below, where Kristi is a bar at the foot
   that opens a full-height sheet. Brand tokens only; the one Coral on the
   page is the "need you" badge and the focus ring.
   --------------------------------------------------------------------------- */
.mp { max-width: 1600px; margin: 0 auto; padding: 0 0 72px; }
.mp-head { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 16px; min-width: 0; }
.mp-head-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.mp-head-id { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-number { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); }
.mp-needs-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius);
  background: var(--needs-you-wash); color: var(--accent-text); font-size: 12px; font-weight: 600; text-decoration: none; }
.mp-needs-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.mp-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-ghost { background: transparent; border-color: transparent; color: var(--ink); }
.mp-ghost:hover { background: var(--paper-2); }
.mp-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.mp-title { font-weight: 800; font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; margin: 10px 0 2px; color: var(--ink); }
.mp-typeline { margin: 0; font-size: 14px; color: var(--ink-2); }
.mp-facts { --mp-facts: 4; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--rule); }
.mp-fact { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: var(--ink); text-decoration: none; }
.mp-label { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mp-fact-value { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.mp-fact-detail { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.mp-meter { grid-column: span 2; }
@media (min-width: 1280px) {
  /* The facts and the meter share one row on a wide screen. */
  .mp-facts { grid-template-columns: repeat(var(--mp-facts, 4), minmax(0, 1fr)) minmax(260px, 1.5fr); }
  .mp-meter { grid-column: auto; }
}
.mp-bar { display: block; height: 6px; background: var(--paper-3); border-radius: var(--radius); overflow: hidden; margin: 4px 0 2px; }
.mp-bar > span { display: block; height: 100%; background: var(--data-3); }
.mp-bar--sm { width: 80px; display: inline-block; vertical-align: middle; margin: 0 0 0 8px; }
.mp-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mp-menu-wrap { position: relative; }
.mp-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 220px; background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 4px; display: flex; flex-direction: column; }
.mp-menu[hidden] { display: none; }
.mp-menu > a, .mp-menu > button { display: block; text-align: left; padding: 8px 10px; font-size: 14px; color: var(--ink);
  background: none; border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none; font-family: inherit; }
.mp-menu > a:hover, .mp-menu > button:hover { background: var(--paper-2); }

.mp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 16px; align-items: start; }
.mp-grid.is-rail { grid-template-columns: minmax(0, 1fr) 48px; }
.mp-work { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.mp-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mp-panel[hidden] { display: none; }
.mp-tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--rule-strong); overflow-x: auto; scrollbar-width: none; }
.mp-tabs::-webkit-scrollbar { display: none; }
.mp-tabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.mp-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.mp-tabs button.is-empty { color: var(--ink-2); font-weight: 400; }
.mp-tab-count { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 2px; }
.mp-unset { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.mp-unset[hidden] { display: none; }
.mp-empty-line { margin: 2px 0 4px; }
.mp-empty-line[hidden], .mp-table-wrap[hidden] { display: none; }
.mp-strip-more { margin-top: 8px; }
.mp-strip-more[hidden] { display: none; }
.mp-gate { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: -4px 0 16px;
  padding: 12px 16px; border: 1px solid var(--rule-strong); border-left: 3px solid var(--fill-strong); border-radius: var(--radius);
  background: var(--surface); }
.mp-gate[hidden] { display: none; }
.mp-gate-head { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.mp-gate .mp-quiet { margin: 2px 0 0; }
.mp-gate-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-gate-back { display: flex; gap: 8px; width: 100%; }
.mp-gate-back[hidden] { display: none; }
.mp-gate-back input { flex: 1; min-width: 0; height: 38px; }

.mp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mp-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.mp-card-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
.mp-card-head h2, .mp-card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.mp-count { font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); font-weight: 600; }
.mp-quiet { color: var(--ink-2); font-size: 13px; }
.mp-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--ink); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; }
.mp-list { list-style: none; margin: 0; padding: 0; }
.mp-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.mp-list li:first-child { border-top: 0; }
.mp-list a { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.mp-list a:hover { text-decoration: underline; }
.mp-need { border-left: 3px solid var(--accent); padding-left: 10px !important; }

.mp-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mp-stages li { font-size: 12px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink-2); }
.mp-stages li.is-done { color: var(--ink); border-color: var(--rule-strong); }
.mp-stages li.is-current { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--surface); font-weight: 600; }
.mp-strip { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.mp-strip li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0 0; border-top: 3px solid var(--paper-3); font-size: 13px; color: var(--ink-2); }
.mp-strip li.is-done { border-top-color: var(--data-3); color: var(--ink); }
.mp-strip li.is-current { border-top-color: var(--fill-strong); color: var(--ink); font-weight: 600; }
.mp-strip .mp-mono { font-size: 12px; font-weight: 400; }

.mp-table-wrap { overflow-x: auto; }
.mp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mp-table th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.mp-table td { padding: 0 8px; height: 34px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.mp-table td.mp-mono, .mp-table td .mp-mono { white-space: nowrap; }
.mp-num { text-align: right; }
.mp-banner { margin: 0 0 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--signal-review-wash); font-size: 14px; color: var(--ink); }
.mp-dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.mp-dl dt { font-size: 12px; color: var(--ink-2); }
.mp-dl dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.mp-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; }
.mp-people li { display: flex; flex-direction: column; font-size: 14px; }
.mp-people a { color: var(--ink); }
.mp-quiet-blocks { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.mp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--rule); }
.mp-form[hidden] { display: none; }
.mp-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.mp-form input, .mp-form select { height: 34px; }
.mp-form .mp-wide { grid-column: 1 / -1; }
.mp-row-actions { white-space: nowrap; text-align: right; }
.mp-row-actions .mp-link + .mp-link { margin-left: 10px; }
.mp-form label[hidden] { display: none; }
.mp-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.mp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Details: a drawer over the page, reference rather than work. */
.mp-scrim { position: fixed; inset: 0; background: rgba(28, 28, 31, 0.45); z-index: 60; }
.mp-scrim[hidden], .mp-drawer[hidden] { display: none; }
.mp-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61;
  border-left: 1px solid var(--rule-strong); display: flex; flex-direction: column; }
.mp-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.mp-drawer-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.mp-drawer-body { overflow-y: auto; padding: 8px 18px 24px; }
.mp-dsec { padding: 12px 0; border-bottom: 1px solid var(--rule); }

/* Kristi, docked. */
.mp-kristi { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--radius); min-width: 0; }
.mp-kristi-inner { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.mp-kristi-inner[hidden] { display: none; }
.mp-kristi-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mp-kristi-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.mp-kristi-head p { margin: 0; }
.mp-rail { width: 100%; min-height: 160px; background: none; border: 0; writing-mode: vertical-rl; font: inherit; font-weight: 600;
  font-size: 14px; color: var(--ink); cursor: pointer; padding: 14px 0; }
.mp-rail[hidden] { display: none; }
.mp-sheet-close { display: none; }
.mp-ask { display: flex; gap: 8px; }
.mp-ask input { flex: 1; min-width: 0; height: 38px; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-chip { font: inherit; font-size: 12px; text-align: left; padding: 5px 9px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--canvas); color: var(--ink); cursor: pointer; }
.mp-thread { display: flex; flex-direction: column; gap: 4px; }
.mp-turn { border-top: 1px solid var(--rule); padding-top: 10px; }
.mp-q { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.mp-answer p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.mp-kristi .kp-card { max-width: none; }
.mp-askbar { display: none; }

@media (max-width: 1100px) {
  .mp-grid, .mp-grid.is-rail { grid-template-columns: minmax(0, 1fr); }
  .mp-rail, .mp-collapse { display: none !important; }
  .mp-kristi { display: none; position: fixed; inset: 0; top: 0; max-height: none; border-radius: 0; z-index: 70; border: 0; }
  .mp-kristi.is-open { display: block; }
  .mp-kristi .mp-kristi-inner { display: flex !important; padding-bottom: 96px; }
  .mp-sheet-close { display: inline-flex; }
  .mp-kristi.is-open .kp-actions { position: sticky; bottom: 0; background: var(--surface); padding: 8px 0; }
  .mp-askbar { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; height: 48px; text-align: left;
    padding: 0 16px; font: inherit; font-size: 15px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule-strong);
    border-radius: var(--radius); cursor: text; }
  body.mp-sheet-open .mp-askbar { display: none; }
}
@media (max-width: 900px) {
  .mp-two, .mp-quiet-blocks { grid-template-columns: minmax(0, 1fr); }
  .mp-meter { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .mp-head { padding: 14px 16px; }
  .mp-title { font-size: 21px; }
  .mp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-head-actions { width: 100%; }
  .mp-head-actions .sp-btn { height: 44px; }
  .mp-ask input, .mp-ask .sp-btn { height: 44px; }
}

/* ---------------------------------------------------------------------------
   Matter page v2 (2026-10-18, docs/design/matter-page-v2/). The hero on Mist
   with a Graphite title (decision D4), Kristi asked from the hero and
   answering on the Overview, Ready for you, the quiet facts at the foot, and
   the sidebar as a 72px rail on this page. One work column: no docked panel.
   --------------------------------------------------------------------------- */
.mp-v2 { max-width: 1240px; }
.mp-v2 .mp-grid { grid-template-columns: minmax(0, 1fr); }
.mp-hero { padding: 8px 0 0; margin-bottom: 24px; min-width: 0; }
.mp-hero-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mp-hero-line { margin: 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.mp-hero-line .mp-number { margin-right: 2px; }
.mp-hero-pills { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.mp-hero-title { margin: 12px 0 0; color: var(--ink); overflow-wrap: anywhere; max-width: 22ch; }
.mp-desc { margin-top: 12px; max-width: 68ch; }
.mp-desc-text { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mp-desc-text.is-open { display: block; -webkit-line-clamp: unset; }
.mp-desc-text[hidden], .mp-desc-form[hidden], .mp-next[hidden] { display: none; }
.mp-desc-more, .mp-desc-edit { margin-right: 12px; font-size: 14px; }
.mp-desc-add { font: inherit; font-size: 18px; color: var(--ink-2); background: none; border: 1px dashed var(--rule-strong);
  border-radius: var(--radius); padding: 10px 14px; cursor: pointer; text-align: left; }
.mp-desc-add:hover { color: var(--ink); border-color: var(--ink-2); }
.mp-desc-form textarea { width: 100%; font: inherit; font-size: 16px; line-height: 1.5; padding: 10px 12px; }
.mp-desc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.mp-next { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0 0; font-size: 15px; }
.mp-next-name { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.mp-hero-ask { display: flex; align-items: center; gap: 12px; margin-top: 24px; height: 72px; padding: 0 12px 0 20px;
  background: var(--surface); border: 1.5px solid var(--rule-strong); border-radius: var(--radius); max-width: 920px; }
.mp-hero-ask:focus-within { border-color: var(--ink-2); outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-hero-ask-mark { display: inline-flex; width: 20px; height: 20px; flex: none; }
.mp-hero-ask-mark svg { width: 20px; height: 20px; }
.mp-hero-ask input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; font: inherit; font-size: 17px; padding: 0; }
.mp-hero-ask input:focus { outline: none; }
.mp-kbd { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: 2px 6px; }
.mp-hero-send { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  background: var(--fill-strong); color: var(--on-dark); border: 0; border-radius: var(--radius); cursor: pointer; }
.mp-hero-send svg { width: 18px; height: 18px; }
.mp-hero-chips { margin-top: 12px; max-width: 920px; }
.mp-hero-chips .mp-chip { font-size: 13px; padding: 7px 11px; background: var(--surface); }
.mp-hero-tabs { margin-top: 28px; }

.mp-brief { margin: 0 0 32px; }
.mp-brief-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mp-brief-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.mp-brief .mp-q { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.mp-brief .mp-turn:first-child { border-top: 0; padding-top: 0; }
.mp-brief .kp-card { max-width: 720px; }
.mp-v2 .mp-section-title { margin: 0 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.mp-ready { margin: 0 0 32px; }
.mp-ready-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mp-rcard { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; min-width: 0;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.mp-rcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mp-tier { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; border: 1px solid var(--rule-strong); color: var(--ink); background: var(--surface); }
.mp-tier--decision { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--on-dark); }
.mp-rcard-title { margin: 4px 0 0; font-size: 18px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.mp-rcard-why { margin: 0; font-size: 14px; color: var(--ink-2); }
.mp-rcard-words { margin: 0; padding: 8px 12px; border-left: 2px solid var(--rule-strong); font-size: 14px; color: var(--ink); }
.mp-rcard-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.mp-rcard-proposal[hidden] { display: none; }
.mp-rcard.is-open { grid-column: 1 / -1; }
.mp-rcard.is-open .mp-rcard-actions { display: none; }
.mp-rcard-proposal .kp-card { max-width: none; }
.mp-brief-meta { margin: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.mp-brief-text { margin: 4px 0 0; color: var(--ink); max-width: 64ch; }
.mp-brief-text[hidden], .mp-thread[hidden], .mp-earlier[hidden] { display: none; }
.mp-tok { color: var(--ink); text-decoration: underline dotted var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.mp-tok:hover { text-decoration-style: solid; }
.mp-tok--money, .mp-tok--date, .mp-tok--code, .mp-tok--count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.86em; letter-spacing: -0.02em; }
.mp-earlier { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: baseline; margin-top: 14px; font-size: 13px; }
.mp-asked { margin: 0 0 6px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.mp-ans-head { margin: 0; color: var(--ink); max-width: 64ch; }
.mp-ans-rest { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 68ch; }
.mp-ablock { margin-top: 16px; max-width: 760px; }
.mp-ablock .sp-label { margin: 0 0 6px; }
.mp-astrip { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.mp-astrip li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-width: 140px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); font-size: 13px; }
.mp-aholders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mp-aholders li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; font-size: 14px; }
.mp-aon { font-weight: 600; }
.mp-ans-foot { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.mp-built summary { cursor: pointer; color: var(--ink-2); }
.mp-ask-next { margin-top: 12px; align-items: center; }
.mp-quiet-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; margin-top: 32px;
  padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.mp-v2 .mp-quiet-facts .mp-section-title { font-size: 17px; }
.mp-quiet-facts .mp-people { grid-template-columns: minmax(0, 1fr); }
.mp-where { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-where div { display: flex; flex-direction: column; }
.mp-where dt { font-size: 12px; color: var(--ink-2); }
.mp-where dd { margin: 0; font-size: 14px; color: var(--ink); }
.mp-v2-askbar[hidden] { display: none; }
.mp-v2-hide { display: none !important; }
/* The path to done, chart 1 (Phase 3). Series in Graphite and Stone only. */
.mp-path { margin: 0 0 32px; }
.mp-path-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.mp-path-head .mp-section-title { margin-bottom: 10px; }
.mp-path-card { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 28px 32px 24px; min-width: 0; }
.mp-chart-q { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); }
.mp-chart-q[hidden] { display: none; }
.mp-chart-answer { margin: 0 0 16px; font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 70ch; }
.mp-legend { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.mp-legend[hidden] { display: none; }
.mp-lg { display: inline-block; width: 14px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--ink); }
.mp-lg--plan { border-top-color: var(--data-2); }
.mp-lg--fc { border-top-style: dashed; }
.mp-lg--budget { border-top: 2px dotted var(--ink-2); }
.mp-lg--done { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--ink); }
.mp-chart { width: 100%; min-width: 0; overflow: hidden; }
.mp-svg { display: block; }
.mp-svg text { font-family: var(--font-sans); font-size: 13px; fill: var(--ink-2); }
.mp-svg .mp-c-tick { font-family: var(--font-mono); font-size: 12px; }
.mp-svg .mp-c-ms-date { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-2); }
/* Labels on the milestone band sit on a halo of the card's own ground, so a
   line joining a lower label to its dot passes behind the label above it. */
.mp-svg .mp-c-ms-label, .mp-svg .mp-c-ms-date { paint-order: stroke; stroke: var(--surface); stroke-width: 6px; stroke-linejoin: round; }
.mp-svg .mp-c-label { font-size: 13px; fill: var(--ink-2); }
.mp-svg .mp-c-strong { font-weight: 600; fill: var(--ink); }
.mp-svg .mp-c-ms-label { font-size: 14px; font-weight: 500; fill: var(--ink); }
.mp-c-grid { stroke: var(--rule); stroke-width: 1; }
.mp-c-budget { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 2 4; }
.mp-c-plan { fill: none; stroke: var(--data-2); stroke-width: 2; }
.mp-c-spent { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.mp-c-fc { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; }
.mp-c-dot { fill: var(--ink); }
.mp-c-hit { fill: transparent; cursor: pointer; }
.mp-c-today { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.mp-c-track { stroke: var(--rule-strong); stroke-width: 2; }
.mp-c-leader { stroke: var(--rule-strong); stroke-width: 1; }
.mp-c-track-done { stroke: var(--ink); stroke-width: 3; }
.mp-c-ms { fill: var(--surface); stroke: var(--ink); stroke-width: 2; cursor: pointer; }
.mp-c-ms.is-done { fill: var(--ink); }
.mp-c-ms.is-next { stroke-width: 3; }
.mp-path-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-path-list[hidden] { display: none; }
.mp-path-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-left: 18px; position: relative; font-size: 14px; }
.mp-path-list li::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--surface); }
.mp-path-list li.is-done::before { background: var(--ink); }
.mp-path-list a { color: var(--ink); font-weight: 600; }
/* The Spend tab's money charts (Phase 4). Graphite and Stone; signals only as
   pills beside a chart. */
.mp-money { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.mp-money-head .mp-section-title { font-size: 30px; margin-bottom: 4px; }
.mp-money-head p { margin: 0; }
.mp-chart-card { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 20px 24px; min-width: 0; }
.mp-chart-card[hidden] { display: none; }
.mp-chart-card-head { display: flex; gap: 10px 14px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.mp-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mp-chart-actions { display: flex; gap: 16px; margin-top: 8px; font-size: 14px; }
#mp-inv tr.is-muted td { color: var(--ink-2); }
.mp-lg--sq { width: 10px; height: 10px; border: 0; background: var(--ink); }
.mp-lg--acc { background: var(--chart-accrued); }
.mp-lg--accband { background: var(--chart-2-wash); border: 1px solid var(--chart-accrued); }
.mp-lg--inv-band { background: var(--rule-strong); border: 1px solid var(--ink); }
.mp-lg--est { background: var(--signal-review-wash); border: 1px dashed var(--signal-review); }
.mp-lg--exp { background: transparent; border: 1.5px dashed var(--chart-accrued); }
.mp-lg--track { background: var(--rule-strong); }
.mp-lg--tick { width: 0; height: 12px; border-top: 0; border-left: 2px dashed var(--ink); }
.mp-c-bar-acc { fill: var(--chart-accrued); }
/* The Kendres estimate inside an accrual: the one treatment every screen uses (.sp-est). */
.mp-c-bar-est { fill: var(--signal-review-wash); stroke: var(--signal-review); stroke-width: 1.5; stroke-dasharray: 3 2; }
.mp-c-area-inv { fill: var(--rule-strong); fill-opacity: .45; }
.mp-c-area-acc { fill: var(--chart-2-wash); }
.mp-c-acc-edge { fill: none; stroke: var(--chart-accrued); stroke-width: 1.5; }
.mp-c-bar-inv { fill: var(--ink); }
.mp-c-bar-exp { fill: none; stroke: var(--chart-accrued); stroke-width: 2; stroke-dasharray: 4 3; }
.mp-mix-wrap { margin: 6px 0 12px; }
.mp-mix-guide { margin: 0 0 6px; font-size: 12px; }
.mp-mix { position: relative; display: flex; height: 34px; border-radius: var(--radius); overflow: visible; }
.mp-mix-seg { display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.mp-mix-0 { background: var(--ink); color: var(--on-dark); }
.mp-mix-1 { background: var(--chart-2); color: var(--on-dark); }
.mp-mix-2 { background: var(--chart-2-light); color: var(--ink); }
.mp-mix-tick { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px solid var(--ink); }
.mp-mix-wrap .mp-mono { margin: 8px 0 0; font-size: 12px; }
.mp-staff { list-style: none; margin: 0; padding: 0; }
.mp-staff li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) auto auto auto; gap: 10px; align-items: center;
  padding: 7px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.mp-staff a { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.mp-strip-label { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.mp-dots { position: relative; height: 34px; margin: 0 8px; }
.mp-dots::before { content: ""; position: absolute; left: 0; right: 0; top: 20px; height: 8px; border-radius: var(--radius); background: var(--paper-3); }
.mp-dot { position: absolute; top: 20px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--data-3); }
.mp-dot { opacity: .85; }
.mp-dot.is-this { top: 15px; width: 14px; height: 14px; margin-left: -9px; background: var(--accent); opacity: 1; border: 2px solid var(--surface); box-sizing: content-box; }
.mp-dot-label { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.mp-dots-axis { display: flex; justify-content: space-between; margin: 2px 8px 0; font-size: 11px; }
.mp-phases { list-style: none; margin: 8px 0 0; padding: 0; }
.mp-phases a { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.mp-ph-name { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; }
.mp-ph-bar { position: relative; height: 12px; }
.mp-ph-budget { position: absolute; left: 0; top: 0; bottom: 0; background: var(--paper-3); border-radius: var(--radius); }
.mp-ph-billed { position: absolute; left: 0; top: 2px; bottom: 2px; background: var(--ink); border-radius: var(--radius) 0 0 var(--radius); }
.mp-ph-acc { position: absolute; top: 2px; bottom: 2px; background: var(--chart-accrued); }
.mp-ph-fc { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--ink); }
.mp-ph-fig { font-size: 13px; white-space: nowrap; }
/* The portfolio view (Phase 6). */
.pf { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.pf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pf-title { margin: 0; color: var(--ink); }
.pf-head p { margin: 4px 0 0; }
.pf-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-select { height: 32px; font: inherit; font-size: 13px; }
.pf-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; align-items: end;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 14px 16px; }
.pf-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-f select, .pf-f input { height: 34px; font: inherit; font-size: 13px; min-width: 0; }
.pf-clear { justify-self: start; align-self: center; }
.pf-count { margin: -8px 0 0; }
.pf-ask { margin-top: 0; max-width: none; height: 60px; }
.pf-answer { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 16px 20px; }
.pf-answer[hidden] { display: none; }
.pf-brief { margin: 0; }
.pf-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pf-list { list-style: none; margin: 8px 0 0; padding: 0; }
.pf-list li { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.pf-list a { display: flex; gap: 10px; align-items: baseline; color: var(--ink); text-decoration: none; min-width: 0; flex: 1 1 260px; }
.pf-list a:hover .pf-name { text-decoration: underline; text-underline-offset: 2px; }
.pf-name { font-weight: 600; overflow-wrap: anywhere; }
.pf-reasons { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-days button { font: inherit; font-size: 12px; background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 3px 8px; margin-left: 4px; cursor: pointer; color: var(--ink-2); }
.pf-days button.is-on, .pf-ccy .mp-chip.is-on { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--on-dark); }
.pf-ccy { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.pf-ccy[hidden] { display: none; }
.pf-firms { list-style: none; margin: 8px 0 0; padding: 0; }
.pf-firms li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 7px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.pf-bar { position: relative; height: 12px; background: var(--paper-3); border-radius: var(--radius); }
.pf-bar > span:first-child { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: var(--radius); }
.pf-note { margin: 8px 0 0; font-size: 12px; }
.pf-dot { cursor: pointer; }
@media (max-width: 900px) { .pf-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .pf-firms li { grid-template-columns: minmax(0, 1fr) auto; } .pf-firms .pf-bar { grid-column: 1 / -1; } }
/* What's at stake, exposure (Phase 5). The range is a band, never a signal. */
.mp-stake { margin: 0 0 32px; display: flex; flex-direction: column; gap: 20px; }
.mp-stake[hidden] { display: none; }
.mp-stake-update { margin-left: auto; }
.mp-stake-head { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 24px; align-items: center; }
.mp-stake-pct { margin: 0; font-size: 56px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--ink); }
.mp-stake-pct:empty { display: none; }
.mp-stake-dl { margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mp-stake-dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); padding-top: 4px; }
.mp-stake-dl dt { color: var(--ink-2); }
.mp-stake-dl dd { margin: 0; color: var(--ink); }
.mp-stake-key { margin: 6px 0 0; font-size: 12px; }
.mp-c-band { fill: var(--paper-3); stroke: var(--rule-strong); }
.mp-c-likely { stroke: var(--ink); stroke-width: 3; }
.mp-c-def { fill: var(--ink); }
.mp-c-def-fc { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.mp-c-pos { fill: var(--ink-2); }
.mp-c-track-bg { fill: var(--paper-3); }
@media (max-width: 720px) { .mp-stake-head { grid-template-columns: minmax(0, 1fr); } .mp-stake-pct { font-size: 40px; } }
/* The lead's exposure screen. */
.ex { max-width: 1240px; margin: 0 auto; }
.ex-title { margin: 12px 0 2px; font-size: 32px; font-weight: 800 !important; letter-spacing: -0.03em; color: var(--ink); }
.ex-readonly { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); }
.ex-readonly[hidden] { display: none; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.ex-card { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 20px; min-width: 0; }
.ex-card[hidden] { display: none; }
.ex-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ex-form { display: flex; flex-direction: column; gap: 18px; }
.ex-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ex-form legend { margin-bottom: 8px; }
.ex-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink); }
.ex-range, .ex-pos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ex-pos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ex-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ex-form input, .ex-form select, .ex-form textarea { font: inherit; font-size: 15px; height: 38px; padding: 0 10px; }
.ex-form textarea { height: auto; padding: 8px 10px; line-height: 1.5; }
.ex-range input, .ex-pos input[inputmode] { font-family: var(--font-mono); }
.ex-basis span { display: flex; gap: 18px; flex-wrap: wrap; }
.ex-form .ex-radio, .ex-form .ex-check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; }
.ex-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ex-h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--ink); }
.ex-preview { margin: 0; font-size: 15px; line-height: 1.5; }
.ex-sugg, .ex-versions, .ex-dels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ex-sugg li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14px; }
.ex-sugg q { color: var(--ink); }
.ex-versions li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; padding-top: 8px; border-top: 1px solid var(--rule); }
.ex-versions li.is-current { font-weight: 600; }
.ex-why { font-weight: 400; color: var(--ink-2); }
.ex-del-form { display: flex; gap: 8px; margin-top: 12px; }
.ex-del-form input { flex: 1; min-width: 0; height: 32px; }
@media (max-width: 900px) { .ex-grid, .ex-range, .ex-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) { .mp-chart-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .mp-chart-card { padding: 16px; }
  .mp-staff li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mp-staff li > :nth-child(2), .mp-staff li > :nth-child(4) { display: none; }
  .mp-phases a { grid-template-columns: minmax(0, 1fr) auto; }
  .mp-ph-bar { grid-column: 1 / -1; order: 3; }
}
/* On a phone the top bar's search shrinks to its icon rather than pushing
   the bar past the screen: a matter trail and a 180px search did not fit in
   390px, so every matter page scrolled sideways. */
@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .crumbs { min-width: 0; flex: 1; }
  .topbar-search { min-width: 0; width: 44px; flex: none; padding: 0; justify-content: center; }
  .topbar-search > :not(svg) { display: none; }
}
/* An early rule holds every heading at 500 with !important ("two weights
   only"); the brand's display is the 800 weight, so these two say so. */
.mp-v2 .mp-hero-title, .mp-v2 .mp-section-title { font-weight: 800 !important; }

/* The sidebar as a 72px rail on a page that asks for it (rail_nav). A label
   appears beside its icon on hover or focus. Below 1024px the sidebar stacks
   as everywhere else. */
@media (min-width: 1024px) {
  .app.is-rail { grid-template-columns: 72px minmax(0, 1fr); }
  .app.is-rail .sidebar { padding: 18px 14px; gap: 18px; overflow: visible; }
  .app.is-rail .lockup-word, .app.is-rail .navlabel, .app.is-rail #rail-views,
  .app.is-rail .sidebar-identity-name, .app.is-rail .sidebar-identity small { display: none; }
  .app.is-rail .sidebar-brand { padding: 4px 6px 0; }
  .app.is-rail .navitem { justify-content: center; padding: 10px 0; }
  .app.is-rail .navitem > span:not(.navcount) { display: none; position: absolute; left: calc(100% + 10px); top: 6px;
    white-space: nowrap; padding: 5px 9px; border-radius: var(--radius);
    background: var(--fill-strong); color: var(--on-dark); font-size: 13px; z-index: 80; }
  .app.is-rail .navitem:hover > span:not(.navcount), .app.is-rail .navitem:focus-visible > span:not(.navcount) { display: block; }
  .app.is-rail .navcount { position: absolute; top: 2px; right: 4px; }
  .app.is-rail .sidebar-identity { justify-content: center; padding-left: 0; padding-right: 0; }
}
@media (max-width: 900px) { .mp-quiet-facts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .mp-hero-ask { height: 60px; padding: 0 8px 0 14px; }
  .mp-hero-ask input { font-size: 16px; }
  .mp-kbd { display: none; }
  .mp-desc-text, .mp-desc-add { font-size: 16px; }
  .mp-v2-askbar { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; height: 48px; text-align: left;
    padding: 0 16px; font: inherit; font-size: 15px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule-strong);
    border-radius: var(--radius); cursor: text; }
}
@media (min-width: 721px) { .mp-v2-askbar { display: none !important; } }

/* The timekeeper panel's billing rate (2026-10-20): one rate, its dates and
   its approval, with the history below it. */
.tk-billing { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.tk-billing-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tk-rate { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--ink); margin: 0; }
.tk-rate-ccy { font-size: 14px; color: var(--ink-2); }
.tk-rate-unit { font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: var(--ink-2); }
.tk-billing-facts { display: grid; grid-template-columns: repeat(5, minmax(0, auto)); gap: 10px 16px; margin: 12px 0 0; }
.tk-billing-facts dt { font-size: 11px; color: var(--ink-2); margin: 0; }
.tk-billing-facts dd { font-size: 14px; color: var(--ink); margin: 2px 0 0; }
.tk-billing-note { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.tk-set { margin-top: 10px; font-size: 13px; }
.tk-set summary { cursor: pointer; color: var(--ink); text-decoration: underline; }
/* The panel's rate tables: tight rows, one fact a column, no wrapping
   except the approval, which carries a name. */
.tk-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tk-table th { text-align: left; font-size: 10px; padding: 4px 6px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.tk-table td { padding: 4px 6px; border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: top; line-height: 1.35; }
.tk-table .tk-n { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tk-table .tk-wrap { white-space: normal; }
.tk-sub { display: block; font-size: 10px; color: var(--ink-2); }
.tk-link { text-decoration: underline; color: var(--ink-2); font-size: 11px; background: none; border: 0; padding: 0; cursor: pointer; }
@media (max-width: 640px) { .tk-billing-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The current rate is the panel's hero (2026-10-20). */
.tk-hero { padding: 4px 0 14px; border-bottom: 1px solid var(--rule-strong); }
.tk-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tk-hero-label { margin: 0; }
.tk-hero-rate { margin: 6px 0 0; font-family: var(--font-mono); font-size: 46px; line-height: 1.05; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tk-hero-ccy { margin-left: 10px; font-size: 18px; font-weight: 500; color: var(--ink); }
.tk-hero-unit { margin-left: 8px; font-family: var(--font-sans); font-size: 15px; font-weight: 400; color: var(--ink-2); }
.tk-hero-window { margin: 10px 0 0; font-size: 16px; color: var(--ink); }
.tk-hero-open { color: var(--ink-2); }
.tk-hero-meta { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.tk-hero-next { margin: 10px 0 0; font-size: 13px; color: var(--ink); }
.tk-hero-none { margin: 6px 0 0; font-size: 16px; color: var(--ink-2); }
@media (max-width: 640px) { .tk-hero-rate { font-size: 34px; } }

/* Add an email or notes, under the hero's ask bar (2026-10-21). */
.mp-capture-open { margin: 8px 0 0; font-size: 13px; }
.mp-capture-open .mp-quiet { margin-left: 6px; }
.mp-capture { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); }
.mp-capture textarea { display: block; width: 100%; margin-top: 6px; min-height: 120px; font-size: 14px; }
.mp-capture textarea.is-drop { outline: 2px dashed var(--ink-2); outline-offset: 2px; }
.mp-capture-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.mp-capture-file { font-size: 13px; color: var(--ink-2); }
.mp-capture-file input { margin-left: 6px; font-size: 12px; }
.mp-capture-actions { margin-left: auto; display: flex; gap: 8px; }


/* A person's own profile (2026-10-23). */
.sidebar-identity .avatar--photo, .avatar--photo { object-fit: cover; padding: 0; background: var(--surface); }
.up-page { max-width: 980px; }
.up-title { margin: 0; color: var(--ink); font-size: 26px; font-weight: 600 !important; }
.up-sub { margin: 4px 0 18px; color: var(--ink-2); font-size: 14px; }
.up-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.up-card { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 16px 18px; }
.up-photo-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.up-photo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--fill-strong); color: var(--on-dark); font-size: 44px; font-weight: 600; }
.up-photo img { width: 100%; height: 100%; object-fit: cover; }
.up-upload { cursor: pointer; }
.up-link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-size: 12px; cursor: pointer; }
.up-hint { margin: 0; font-size: 12px; color: var(--ink-2); }
.up-form { display: flex; flex-direction: column; gap: 12px; }
.up-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.up-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.up-form input, .up-form select, .up-form textarea { font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 7px 10px; min-height: 36px; }
.up-form textarea { min-height: 96px; }
.up-count { float: right; }
.up-actions { display: flex; align-items: center; gap: 12px; }
.up-admin { grid-column: 2; }
.up-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 16px; margin: 8px 0 0; }
.up-facts dt { font-size: 11px; color: var(--ink-2); margin: 0; }
.up-facts dd { font-size: 14px; color: var(--ink); margin: 2px 0 0; }
.up-nil { color: var(--ink-2); }
@media (max-width: 760px) { .up-grid { grid-template-columns: minmax(0, 1fr); } .up-admin { grid-column: auto; } .up-row { grid-template-columns: minmax(0, 1fr); } }


/* Explore (2026-10-23): spend and matter activity together, to the line. */
.xp-page { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.xp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.xp-title { margin: 0; font-size: 26px; font-weight: 600 !important; color: var(--ink); }
.xp-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.xp-actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.xp-ctl { display: flex; flex-direction: column; gap: 4px; }
.xp-select { height: 32px; font: inherit; font-size: 13px; padding: 0 8px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.xp-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); height: 32px; }
.xp-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; min-height: 20px; }
.xp-trail a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.xp-sep { color: var(--ink-3); }
.xp-crumb { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); }
.xp-trail a.xp-x { text-decoration: none; color: var(--ink-2); padding: 0 4px; font-size: 15px; line-height: 1; }
.xp-quiet { color: var(--ink-2); font-size: 12px; margin: 0; }
.xp-nil { color: var(--ink-3); }
.xp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.xp-tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.xp-tile .sp-label { margin: 0; }
.xp-tile-v { margin: 4px 0 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.xp-card { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.xp-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.xp-h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600 !important; color: var(--ink); }
.xp-card-head .xp-h2 { margin: 0; }
.xp-lede { margin: 2px 0 4px; font-size: 22px; font-weight: 600 !important; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xp-matter-head { display: flex; flex-direction: column; gap: 2px; }
.xp-matter-head .sp-label { margin: 0; }
.xp-link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.xp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.xp-table { width: 100%; font-size: 13px; }
.xp-table th { text-align: left; white-space: nowrap; }
.xp-table th, .xp-table td { padding-left: 10px; padding-right: 10px; vertical-align: top; }
.xp-num { text-align: right !important; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-strong { font-weight: 600; color: var(--ink); }
.xp-name { font-weight: 600; color: var(--ink); min-width: 180px; }
.xp-row { cursor: pointer; }
.xp-cut td { background: var(--needs-you-wash); }
.xp-narr { min-width: 280px; max-width: 520px; }
.xp-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.xp-flag { margin-top: 4px; font-size: 12px; color: var(--accent-text); }
.xp-hist { margin-top: 4px; font-size: 12px; }
.xp-hist summary { cursor: pointer; color: var(--ink-2); }
.xp-hist ul { margin: 4px 0 0; padding-left: 16px; }
.xp-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }
.xp-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.xp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.xp-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.xp-key--spend { background: var(--data-3); }
.xp-key--act { background: var(--chart-accrued); }
.xp-chart { width: 100%; height: 240px; display: block; }
.xp-bar-spend { fill: var(--data-3); }
.xp-bar-act { fill: var(--chart-accrued); }
.xp-hit { fill: transparent; }
.xp-month { cursor: pointer; }
.xp-month:hover .xp-hit, .xp-month:focus .xp-hit { fill: var(--paper-3); }
.xp-month:focus { outline: none; }
.xp-tick { font-size: 10px; fill: var(--ink-2); }
.xp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.xp-chip { font: inherit; font-size: 12px; padding: 3px 10px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.xp-chip[aria-pressed="true"] { background: var(--fill-strong); border-color: var(--fill-strong); color: var(--surface); }
.xp-feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.xp-event { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.xp-ev-cat { color: var(--ink-2); font-size: 12px; }
.xp-ev-what { overflow-wrap: anywhere; }
.xp-ev-what a { color: var(--ink); }
.xp-ev-when { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) {
  .xp-two { grid-template-columns: minmax(0, 1fr); }
  .xp-event { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .xp-chart { height: 180px; }
}

/* Closing a matter, as a walkthrough (2026-10-30). */
.mc-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; flex-wrap: wrap; }
.mc-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font-size: 13px; }
.mc-step--now { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.mc-step--done { color: var(--ink); }
.mc-dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-3); color: var(--ink); font-size: 12px; font-weight: 600; }
.mc-step--now .mc-dot { background: var(--fill-strong); color: var(--surface); }
.mc-step--done .mc-dot { background: var(--signal-under-wash); color: var(--ink); }
.mc-card { margin-bottom: 16px; }
.mc-card--later { opacity: 0.62; }
.mc-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mc-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--paper-3); font-size: 12px; }
.mc-now { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.mc-item { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 12px; }
.mc-item--settled .mc-recs { opacity: 0.7; }
.mc-item-title { margin: 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.mc-recs { list-style: none; margin: 8px 0; padding: 0; }
.mc-rec { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.mc-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.mc-why { margin-top: 4px; }
.mc-final { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.mc-final .lv-muted { margin: 4px 0 0; }
