/* ============================================================================
   Highline UI — shared design system
   Version: 1.20.0  (2026-10-20)

   1.20.0 (2026-10-20) — The back office fits a phone (iPhone review, October 20). Measured at
   390 px: the section tab bar wrapped to four rows (190 px, pinned under the 55 px chrome bar,
   29% of the screen); four pages were wider than the phone; every field under 16 px made
   Safari zoom on a tap; and a defined term's definition existed only as a hover title. At the
   640 px phone breakpoint:
     · the section tab bar is one row that scrolls sideways, 48 px;
     · every field is 16 px (the old 14 px rule, commented "prevent iOS zoom", did not: Safari
       zooms on anything under 16);
     · `.deal-hero-act` (the admin deal hero's button) and `.promote-state` (the promote status)
       move out of inline styles, so a phone can drop the button under the deal name and wrap
       the status;
     · a stacked table inside a `.table-wrap` keeps its side padding.
   `.tap-tip` is the bubble layout.ts shows on a device without hover when a defined term is
   tapped. Nothing changes above 640 px except where a class replaces an inline style with the
   same values.

   1.19.0 (2026-10-05) — The LP pages fit a phone. Measured at 390 px on 10/5, the LP
   portfolio was 734 px wide and the position statement 651: `tbody td` never wraps, so a
   five-column money table needs ~690 px, and the quarterly statement's 904 px table scrolled
   inside its box with the closing balance off-screen (design check #1). Four pieces, all at
   the existing 640 px phone breakpoint:
     · 16 px gutters (were 12), as the phone mockup and DESIGN.md §12 ask.
     · `kpiStrip` tiles are `.kpi-tile` (their flex sizing moved here from inline styles, so
       a breakpoint can reach them): the hero tile goes full width, the rest two by two.
     · `.card-actions` holds a card header's buttons; on a phone they stack, full width, 44 px.
     · `table.stack-sm` turns a money table into one block per row: the first cell is the
       block's heading and every other cell a label/value line, labelled by its `data-label`.
       The distribution history becomes a ledger list (deal, date under it, amount right).
   Nothing changes above 640 px.

   1.18.0 (2026-09-29) — Module rhythm. `.card` had no margin at all, so every page
   stacked its cards flush unless a call site typed a margin inline (0, 12, 14, 16 and
   18px were all in use). Davis, on the LP portfolio: the modules are "kind of jammed
   together and looks less professional without some margin between them". Four
   tokens now own the space between modules (--gap-module, --gap-chrome, --gap-note,
   --card-pad), and ONE stack rule under "Module rhythm" applies them to the children
   of <main>, so a page gets the rhythm without asking for it. Side-by-side grids use
   `gap: var(--gap-module)`. `.card-foot` holds a caption that belongs to a card, and
   `.card-join` marks a card that continues the one above (the /debt loan book).

   1.17.0 (2026-09-02) — `.page-title` gets a rule. Eight screens across five route
   files rendered their opening heading as a bare `<h1>`, which put a SECOND h1 in the
   document outline — layout.ts already emits the page title as an `.sr-only` h1 so the
   document has an outline without a visible duplicate. The tag carried no CSS at all:
   26px/700 is the user-agent default for `<h1>` (2em of the 13px body) with margins
   zeroed by the `*` reset, so these values reproduce exactly what was already on screen
   and make the size a decision. The markup becomes `<h2 class="page-title">`,
   subordinate to the outline's h1 the same way `.section-head` is, and
   `tests/navAndDealMark.test.ts` pins the count per page.

   1.16.0 (2026-08-25) — input.money-field gets its CSS half. DESIGN.md has named
   `money-field` a shared piece since the intake-form work (§10 "Editable money field",
   §12's reuse list), and six call sites emit the class — but the stylesheet never
   carried a rule for it, so every site ALSO bolted on `text-right` and the promote
   calculator re-implemented the look in page CSS. The class now owns the typographic
   identity of an editable dollar amount (right-aligned, tabular digits); width stays
   at the call site because it is layout, and border/padding/font come from the base
   input rule like every other field.

   1.15.0 (2026-08-24) — Two repairs, both site-wide.
   (a) The base `a:not(.btn)` link rules move inside `:where()`. They were
   asserting at (0,1,1)/(0,2,1) and beating components' own selected states at
   (0,2,0), so a SELECTED tab turned invisible the moment its link was visited —
   var(--brand) text on a var(--brand) background. Reported on `.oi-tab.on`;
   `.lb-lens.on` had it too. At zero specificity the rules still colour ordinary
   links and lose to anything that states its own colour.
   (b) `.crumbbar` crumbs render as buttons matching the subnav, current page
   filled. The trail read as body copy next to a row of chips.

   1.14.0 (2026-08-24) — `.section-head .section-actions`. `.section-head` is
   `display:flex`, so a `float:right` on one of its children is silently ignored —
   which is why /debt's three sibling-view links ran on after the note instead of
   sitting at the right end, and why they inherited the head's uppercase and
   letter-spacing and read as more heading rather than as controls. This is the
   sibling of `.section-note`: it parks a group at the right end and resets the
   head's type treatment, so a `.btn` placed there looks like a button.

   1.13.0 (2026-08-04) — RESTORE. Commit 9805b44 (2026-07-21, the Guide adoption)
   overwrote this app's 1.12.0 file with the upstream TEMPLATE's 1.7.0 — a 325-line
   deletion that took the version BACKWARDS and removed every app-body rule this
   project had added: the `a:not(.btn)` base link style, all 16 `.subnav` rules and
   all 3 `.crumbbar` rules. For two weeks every page rendered its section nav and
   breadcrumbs as raw browser-default links (#0000EE, underlined) — the exact symptom
   DESIGN.md section 10 names as the tell that the base rule did not load.
   Restored to 1.12.0 and carried forward the only two things 1.7.0 improved:
   the WCAG-AA --text-secondary value and the tbody row-hover affordance.
   1.7.0's own header says "no app-body styles change here", so nothing else was lost
   by reverting it.

   ** DO NOT BLIND-SYNC THIS FILE FROM THE TEMPLATE. ** It carries app-specific rules
   the template does not have. /highline-update overwrites it wholesale, so a sync must
   be a MERGE and the version must never decrease. tests/designSystem.test.ts guards
   the load-bearing selectors so this cannot ship silently again.
   Bump this version on any change. /highline-update compares it against a
   project's copy to detect drift. Format: MAJOR.MINOR.PATCH (date).
   Derived from the Industrial Sale Comp Tracker (hrep-industrial-sale-comps).

   Drop-in stylesheet for any Highline web tool. Link it in the <head>:
     <link rel="stylesheet" href="highline-ui.css">
   ...then use the documented classes (.btn, .card, .stat-card, table, etc.).

   THEMING: every color lives in :root below. To re-skin a project, override
   --brand and the accent vars in your own <style> AFTER this file. The "feel"
   (type scale, density, radii, shadows, component shapes) stays constant.
   See DESIGN.md for the full spec.
   ========================================================================== */

:root {
  /* ── D4 · SPACING SCALE ────────────────────────────────────────────────
     Before this, spacing was written inline at whatever value looked right:
     a survey of the route templates found 2, 4, 5, 6, 8, 9, 12 and 14px all in
     use, with 6px and 12px dominant and 5/9/14 pure noise. A scale does not stop
     anyone typing a number, but it gives the common ones a name so new work has
     something to reach for and the odd values become visibly odd.
     Steps are 4px-based with a 2px half-step for tight vertical rhythm. */
  --space-0: 2px;   /* hairline gap — badge/dot offsets */
  --space-1: 4px;
  --space-2: 6px;   /* the most common inline value in the codebase */
  --space-3: 8px;
  --space-4: 12px;  /* the second most common — card-internal gaps */
  --space-5: 16px;
  --space-6: 24px;
  --space-7: 32px;

  /* ── D4b · MODULE RHYTHM ──────────────────────────────────────────────
     The space BETWEEN modules, named so that no page picks its own. The
     stack rule under "Module rhythm" below is the only consumer that most
     pages need; a grid of side-by-side modules uses --gap-module as its gap. */
  --gap-module: var(--space-6);   /* 24px — between two modules, stacked or side by side */
  --gap-chrome: var(--space-5);   /* 16px — under a banner, a toolbar or the breadcrumb */
  --gap-note:   var(--space-3);   /*  8px — a caption to the module it explains; a section head to its module */
  --card-pad:   18px;             /* inner padding of .card-body, and the x-padding of .card-header / .card-foot */

  /* ── D5 · CATEGORICAL SERIES PALETTE ───────────────────────────────────
     VALIDATED, NOT CHOSEN BY EYE. Run against the dataviz validator
     (scripts/validate_palette.js, light surface): lightness band, chroma floor,
     CVD separation, normal-vision floor and contrast all PASS.

     What it replaced, and why it had to change:
       · The platform set was #211C18 / #9A8C78 / #64748B — three near-neutrals.
         It failed FOUR checks, the damning one being the normal-vision floor:
         #9A8C78 (Industrial) vs #64748B (Hospitality) sat at deltaE 11.9, under
         the 15 threshold. Full-colour readers could not reliably tell those two
         platforms apart, before considering colour blindness at all.
       · The espresso brand colour was doing duty as a SERIES colour. At L 0.231
         with chroma 0.011 it is outside the categorical band and reads as grey —
         it is an ink/surface colour, and it goes back to being one.

     Assign in FIXED ORDER and let colour follow the ENTITY, never its rank, so a
     filter that changes the series count never repaints the survivors. */
  --series-1: #B8860B;   /* goldenrod — Called · Industrial */
  --series-2: #0F6F96;   /* deep blue-teal — Distributed · Storage */
  --series-3: #93414A;   /* muted burgundy — Hospitality */
  --series-1-tint: rgba(184, 134, 11, .18);
  --series-2-tint: rgba(15, 111, 150, .16);

  /* ── Brand ────────────────────────────────────────────────────────────
     The logo mark is Highline teal; the wordmark is black serif. The app
     chrome (nav, tables, primary buttons) uses an institutional navy with a
     gold accent. Per-project you MAY swap --brand / --accent for a different
     hue — keep them dark+metallic to preserve the feel. */
  --brand:        #1C2B4A;   /* primary chrome (nav, table head, primary btn) */
  --brand-light:  #253660;
  --brand-hover:  #2e4175;
  --accent:       #C9A96E;   /* gold — focus rings, active underlines, highlights */
  --accent-light: #d4ba88;
  --accent-muted: rgba(201,169,110,0.15);
  --teal:         #3E8077;   /* official Highline logo teal — use sparingly */

  /* ── Surfaces ─────────────────────────────────────────────────────────── */
  --bg:           #F5F6F8;
  --white:        #ffffff;
  --text:         #1C2B4A;
  --text-secondary: #656D7A;
  /* Alias. Three rules (.section-note, .cell-sub, .badge-forfeited) referenced
     --text-muted, which was never declared — so they silently fell back to
     inherited color and lost their de-emphasis. Declared as an alias rather than
     rewritten at each site: "muted" is a real semantic the system uses, and an
     alias keeps future uses working instead of failing the same way again. */
  --text-muted: var(--text-secondary);   /* WCAG AA >=4.5:1 on every light surface incl. --bg + --gray-100 */
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-300:     #d1d5db;
  --gray-400:     #9ca3af;

  /* ── Status ──────────────────────────────────────────────────────────── */
  --green:        #16a34a;
  --green-bg:     #f0fdf4;
  --red:          #dc2626;
  --red-bg:       #fef2f2;
  --amber-bg:     #fff7e6;
  --amber-text:   #92580c;

  /* ── Shape + depth ───────────────────────────────────────────────────── */
  --radius:       4px;
  --shadow-sm:    0 1px 2px rgba(28,43,74,0.05);
  --shadow:       0 1px 3px rgba(28,43,74,0.07), 0 1px 2px rgba(28,43,74,0.04);
  --shadow-md:    0 2px 8px rgba(28,43,74,0.08), 0 1px 3px rgba(28,43,74,0.05);

  /* ── Type ────────────────────────────────────────────────────────────── */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Brand wordmark is a serif; use this for marketing / cover / document titles */
  --font-serif: Georgia, 'Times New Roman', serif;
}

/* ── Per-vertical chrome ─────────────────────────────────────────────────────
   Identity is carried by the per-vertical LOGO (DESIGN.md §9), not by recoloring
   everything. Navy is the DEFAULT chrome — Real Estate, Core, Hospitality, and
   the intelligence layer all keep navy + gold. STORAGE is the one platform that
   re-skins its chrome: navy → deep teal, throughout (nav, table heads, primary
   buttons, panels), with the GOLD accent kept. Set data-vertical="hsp" on <body>.
   Deep-teal ramp derived from the Storage mark (#3E97B5):
     --brand 900 #10262E · 800 #163641 · 700 #1F4C5B   (replaces the navy ramp) */
body[data-vertical="hsp"] {
  --brand:        #10262E;   /* deep teal chrome (was navy #1C2B4A) */
  --brand-light:  #163641;
  --brand-hover:  #1F4C5B;
  /* --accent stays gold; the Storage identity comes from the logo + teal chrome */
}

/* CORE / Meridian re-skins navy → graphite-espresso, matching the #211C18 chrome bar so the
   in-content surfaces (nav, table heads, primary buttons) read graphite. Set data-vertical="core"
   on <body>. Gold accent kept. (DESIGN.md §9.2) */
body[data-vertical="core"] {
  --brand:        #211C18;   /* graphite espresso chrome (was navy #1C2B4A) */
  --brand-light:  #342B22;
  --brand-hover:  #463A2E;
  /* --accent stays gold; the CORE identity comes from the graphite chrome */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Visually hidden, still in the accessibility tree. Used by layout.ts for the
   per-page <h1>: these pages render their titles as designed .section-head
   blocks, so the h1 exists to give the document an outline, not to be seen.
   Clip-path + 1px box rather than display:none or visibility:hidden, which
   would remove it from the a11y tree and defeat the point. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Links ────────────────────────────────────────────────────────────────
   Base state for any plain <a> that ISN'T a .btn (nav.topbar / thead th have
   their own, more specific treatment below and win over this too). Previously
   unset entirely, so every table/body link rendered as the literal unstyled
   browser default (#0000EE, underlined) — clashing with the navy+gold palette.
   The :not(.btn) exclusion is load-bearing, not decoration: `a:visited` has
   higher specificity than `.btn-primary`'s `color: var(--white)`, so without
   it, any solid dark button rendered as an <a> (e.g. the active filter chip)
   goes invisible — same-color text on background — the instant a user visits
   that URL once. Buttons manage their own color regardless of tag; never let
   generic link rules compete with them. */
/* WRAPPED IN :where() ON PURPOSE — this is a DEFAULT, not an assertion.
   `:where()` contributes ZERO specificity, so these three rules still colour every
   ordinary link while losing to any component that states its own colour.

   Before 2026-08-24 they did not lose. `a:not(.btn):visited` is (0,2,1), which
   outranks a component's own selected state at (0,2,0) — so the instant a person
   CLICKED a selected tab, its label reverted to var(--brand) on a var(--brand)
   background and vanished. It rendered correctly for anyone who had not visited the
   link yet, which is why it survived review: a fresh browser profile cannot reproduce
   it. Live instances: `.oi-tab.on` (the open-items person tabs, where JW found it) and
   `.lb-lens.on` (the /debt lens tabs). `.subnav a.active` escaped only by tying at
   (0,2,1) and being declared later in this file — an accident of source order, not a
   design. `.lb-pchip.on` escaped only by being a <button>, which :visited cannot match.

   The same class of bug hit the app-chrome Home/Contact links in v1.9.1, where this
   rule clobbered `.hic-link` (0,1,0) and painted them invisible dark-on-dark. That was
   patched by re-asserting the bar's colours. This fixes the cause instead. */
:where(a:not(.btn)) { color: var(--brand); text-decoration: none; }
:where(a:not(.btn):visited) { color: var(--brand); }
:where(a:not(.btn):hover) { color: var(--brand-hover); text-decoration: underline; }

/* Shared app-chrome bar (.hic-top, rendered by app-chrome.js) styles its own
   links via .hic-link (specificity 0,1,0). The base `a:not(.btn)` rule above is
   0,1,1 — HIGHER — so it silently repaints the bar's Home/Contact links in
   --brand, which on a dark vertical chrome (CORE #211C18 / HSP #10262E) is
   invisible dark-on-dark (the version is a <button>, so only IT showed). Same
   specificity trap the :visited note above calls out. Re-assert the engine's
   bar-link colors at 0,2,1 so they win, without editing the canonical
   app-chrome.js. (Belongs here: this base rule is what reaches into the bar.) */
.hic-top a.hic-link, .hic-top a.hic-link:visited { color: rgba(255,255,255,.62); }
.hic-top a.hic-link:hover { color: #fff; text-decoration: none; }
.hic-top a.hic-contact, .hic-top a.hic-contact:visited { color: #C4975A; }
.hic-top .hic-menu a, .hic-top .hic-menu a:visited { color: rgba(255,255,255,.75); }
.hic-top .hic-menu a.current { color: #C4975A; }

/* ── Top nav ─────────────────────────────────────────────────────────────── */
nav.topbar {
  background: var(--brand);
  color: var(--white);
  padding: 0 28px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav.topbar .brand-group { display: flex; align-items: center; gap: 16px; }
nav.topbar a.brand-link { transition: opacity 0.12s ease; text-decoration: none; color: inherit; }
nav.topbar a.brand-link:hover { opacity: 0.78; }
nav.topbar a.brand-link:hover .brand-title { color: var(--accent); }
nav.topbar .brand-logo { height: 30px; width: auto; display: block; }
nav.topbar .brand-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.18); }
nav.topbar .brand-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--white);
}
nav.topbar .nav-links { display: flex; gap: 2px; }
nav.topbar .nav-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.12s ease;
  position: relative;
}
nav.topbar .nav-links a:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.07); }
nav.topbar .nav-links a.active { color: var(--white); background: rgba(255,255,255,0.12); }
nav.topbar .nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ── Flash / alert messages ──────────────────────────────────────────────── */
.flash-container { padding: 10px 28px 0; }
.flash { padding: 8px 14px; border-radius: var(--radius); font-size: 12.5px; font-weight: 500; }
.flash.success { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }
.flash.error   { background: var(--red-bg);   color: var(--red);   border: 1px solid #fecaca; }
.flash.warning { background: var(--amber-bg); color: var(--amber-text); border: 1px solid #fcd9a0; }

/* ── Main container ──────────────────────────────────────────────────────── */
/* Aligns to the app-chrome bar bounds (max-width 1680 / 32px gutters) — see DESIGN.md §9. */
.container { padding: 18px 32px 40px; max-width: 1680px; margin: 0 auto; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.card-header {
  padding: var(--space-4) var(--card-pad);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Card titles are headings: 14px/600/brand whether marked up as <h2>, <strong>,
     or bare text (most headers use bare text or <span><strong>), so they no longer
     fall back to 13px/400/--text. Meta/count spans opt back out via .text-muted;
     buttons/badges keep their own weight (explicit weight beats inheritance). */
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.card-header h2, .card-header strong { font-size: 14px; font-weight: 600; color: var(--brand); }
.card-header .text-muted { font-weight: 400; }
.card-body { padding: var(--card-pad); }
/* A caption or footnote that BELONGS to a card sits inside it, under a hairline, rather
   than floating in the space between two cards where it reads as belonging to neither. */
.card-foot { padding: var(--space-4) var(--card-pad); border-top: 1px solid var(--gray-100); }

/* ── Module rhythm ───────────────────────────────────────────────────────────
   THE STACK. Every visible child of <main> after the first is one module-gap below the
   one before it. Zero specificity (:where), so any class that states its own margin
   (.section-head, .crumbbar, .card-join) still wins, and vertical margins still COLLAPSE:
   an old inline margin-bottom:12px under a card gives 24px, not 36px.
   Only BLOCK-FLOW parents are listed. A grid or flex parent must space its children with
   `gap`, because a margin on a grid item would push it out of line with its neighbours.
   `.stack` opts any other wrapper in. */
:where(main.container, .stack, .deal-panel)
  > :where(:not(style, script, link, template, noscript, .sr-only))
  ~ :where(:not(style, script, link, template, noscript, .sr-only)) {
  margin-block-start: var(--gap-module);
}
/* Under the page chrome — the view-as banner, the show/hide-amounts bar, the breadcrumb,
   a second-level tab bar — the first module gets clear space, but less than a module gap:
   the chrome labels the page, it is not one of its modules. The .sr-only h1 that layout()
   puts after the breadcrumb is skipped. */
:where(.view-as-banner, .pv-bar, .ops-link-row, .crumbbar, .subnav.dealtabs)
  + :where(:not(style, script, .sr-only, .crumbbar, .pv-bar)),
:where(.view-as-banner, .pv-bar, .ops-link-row, .crumbbar, .subnav.dealtabs)
  + :where(.sr-only) + :where(:not(style, script)) {
  margin-block-start: var(--gap-chrome);
}
/* The chrome rows state their own under-space too, because the next row may be another
   chrome row whose class margin (.pv-bar, .crumbbar) outranks the rule above. */
.view-as-banner { margin-bottom: var(--gap-chrome); }
/* A section head labels the module under it, so the two stay close. */
:where(main.container, .stack, .deal-panel) > :where(.section-head, .sect) + :where(*) {
  margin-block-start: var(--gap-note);
}
/* A .band is a rule and its own 22px of padding (layout.ts), so it takes no margin too. */
:where(main.container, .stack, .deal-panel) > :where(.band) { margin-block-start: 0; }
/* A card NESTED in a card body (a chart inside a valuation card) sits a small step below the
   copy above it: it is part of that card, not a module of the page. */
:where(.card-body, .ov-panel) > :where(:not(style, script, .sr-only)) ~ :where(.card) {
  margin-block-start: var(--space-4);
}
/* The KPI band (kpiStrip in src/modules/ui.ts). Its 12px under-margin collapses into the
   module gap on a page; inside a card it keeps its step, except where it is the card's last
   row or sits on the card's footer, where the margin was an empty strip of card. */
.kpi-strip { margin-bottom: var(--space-4); }
/* The tiles' sizing lives here, not inline, so the phone breakpoint can re-flow them (1.19.0). */
.kpi-strip .kpi-tile { flex: 1 1 0; min-width: 128px; padding: 13px 20px; background: var(--white); }
.kpi-strip .kpi-tile.kpi-hero { flex: 1.4 1 0; background: linear-gradient(150deg, #2A231D, #1C1713); }
/* A card header's buttons (1.19.0): beside the title on a wide screen, stacked under it on a phone. */
.card-actions { display: inline-flex; align-items: center; gap: 8px; }
/* The statement's quarter select is for a phone; a wider screen keeps the buttons (1.19.0). */
.q-select { display: none; }
/* Distribution history's two fixed columns (views/components.ts); a ledger list on a phone (1.19.0). */
table.dist-history col.dh-date { width: 150px; }
table.dist-history col.dh-amt { width: 160px; }
/* The LP deal page's hero (routes/portal.ts), out of inline styles so a phone can re-flow it (1.19.0). */
.lp-hero-in { position: relative; padding: 24px 28px 22px; }
.lp-hero-figs { display: grid; gap: 18px 30px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); max-width: 980px; }
/* The admin deal hero's action (routes/deals.ts): top right on a wide screen, under the deal name on a
   phone, where it sat on top of the name (1.20.0). Values moved unchanged from the inline style. */
.deal-hero-act { position: absolute; top: 20px; right: 22px; display: flex; align-items: center; gap: 9px; flex: none; }
/* The promote status, dot and words (views/components.ts promoteCell). One line in a table cell; on a
   phone's deal page it wraps rather than widening the page (1.20.0). */
.promote-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
/* A defined term's definition, shown under the term when it is tapped on a device without hover
   (layout.ts). The title attribute was the only place it lived, and a phone has no hover (1.20.0). */
.tap-tip { position: absolute; z-index: 3000; max-width: min(320px, calc(100vw - 24px)); padding: 9px 12px;
  background: var(--brand); color: #fff; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.22);
  font-size: 13px; line-height: 1.45; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: normal; }
/* The caret points at the term the bubble defines (layout.ts sets --caret), and the term is marked
   while its bubble is open: two terms side by side left it unclear which one was meant. */
.tap-tip::before { content: ""; position: absolute; top: -6px; left: calc(var(--caret, 16px) - 6px);
  border: 6px solid transparent; border-top: 0; border-bottom-color: var(--brand); }
.tap-on { background: var(--accent-muted); border-radius: 2px; }
.card > .kpi-strip:last-child, .kpi-strip:has(+ .card-foot) { margin-bottom: 0; }
.kpi-strip + .card-foot { border-top: 0; }
/* A caption for the module ABOVE it, when it cannot go inside that module. */
.module-note { margin-block-start: var(--gap-note); }
/* A card that CONTINUES the card above — a toolbar, a note strip and a table drawn as one
   unit with square inner corners (the /debt loan book). It must not be pulled apart. */
.card-join { margin-block-start: 0; }

/* ── Stat / KPI cards ────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow);
  min-width: 0;
  position: relative;
}
.stat-card .stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card .stat-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Numeric display scale (DESIGN.md §11) ──────────────────────────────────
   THREE display sizes for big numbers, so size dependably maps to importance:
     .num-hero — 27px · ONE per page: the answer (the KPI band's primary tile)
     .num-lg   — 22px · KPI-tile values (the standard kpiStrip size)
     .num-md   — 15px · card-level headline figures (counts, in-card money)
   Anything smaller is body/table type (tabular-nums via .num). Never introduce
   a fourth ad-hoc display size for a number. */
.num-hero { font-size: 27px; font-weight: 700; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.num-lg   { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.num-md   { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Search wrap (a bordered box holding an unstyled <input type=search>) ──
   The inner input carries no border of its own, so the WRAPPER shows the gold
   focus ring the bare inputs get — searches read as focusable, like every
   other field. */
.search-wrap { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 5px 10px; background: var(--white);
  box-shadow: inset 0 1px 2px rgba(17,24,39,.04); }
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted); }
.search-wrap input { border: none; outline: none; background: none; font: inherit; font-size: 12.5px; color: var(--text); }
.stat-card .stat-sub {
  font-size: 10px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  letter-spacing: 0.1px;
}
.stat-card .stat-sub .stat-sub-label {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 9px;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.filter-group { display: flex; flex-direction: column; gap: 3px; }
.filter-group label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.filter-group select,
.filter-group input {
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  height: 32px;
}
.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.filter-sep { width: 1px; height: 36px; background: var(--gray-200); align-self: flex-end; flex-shrink: 0; }
.filter-actions { display: flex; gap: 6px; align-items: flex-end; margin-left: auto; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s ease;
  height: 32px;
  white-space: nowrap;
}
.btn-primary   { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--white); color: var(--brand); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--brand); }
.btn-success   { background: var(--green); color: var(--white); }
.btn-success:hover { opacity: 0.9; }
.btn-export    { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
.btn-export:hover { background: var(--brand); color: var(--white); }
.btn-danger    { background: var(--white); color: #b91c1c; border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fef2f2; border-color: #b91c1c; color: #991b1b; }
.btn-outline   { background: transparent; border: 1px solid var(--gray-300); color: var(--text-secondary); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--text); }
.btn-sm { padding: 3px 9px; font-size: 11.5px; height: 26px; }
/* Disabled / in-flight buttons & links (export, download, sync). A click sets
   aria-busy so the marquee actions show a spinner instead of looking dead. */
.btn:disabled, .btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; width: 11px; height: 11px; margin-left: 2px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  display: inline-block; animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::after { animation: none; } }

/* Reduced motion, for real. The rule above covered the busy spinner and nothing
   else, while 13 transitions and the toast/panel animations kept running for
   users who have asked the OS to stop them.

   Near-zero durations rather than `animation: none` / `transition: none`: those
   suppress transitionend/animationend, and any script waiting on those events
   silently never fires. 0.01ms ends effectively instantly AND still dispatches.
   The `!important` is load-bearing — this has to beat every component rule. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Gold accent action button (e.g. topbar Upload) */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent);
  color: var(--brand);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font: 600 12px var(--font-ui);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.btn-accent:hover { background: var(--accent-light); border-color: var(--accent-light); }

/* Preset chips (e.g. date-range presets) */
.preset-chip {
  padding: 0 8px;
  height: 26px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--text-secondary);
  font: 600 11px var(--font-ui);
  letter-spacing: 0.3px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s ease;
}
.preset-chip:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--text); }
.preset-chip.active { background: var(--brand); color: var(--white); border-color: var(--brand); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
/* ── Money / data table standard (v1.10.1) — use for EVERY tabular money view ──
   `class="num"` on every numeric <th>/<td>: right-aligned + tabular figures so
   digits line up on one rail. `.data-table` on the <table>: the first (identity)
   column absorbs the slack, so numeric columns stay content-width and cluster on
   the right instead of sprawling across a wide screen. See DESIGN.md §11. */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table td:first-child, table.data-table th:first-child { width: 100%; white-space: normal; }
/* A LEADING CONTROL COLUMN IS NOT THE IDENTITY COLUMN. A tick box in column 1 has
   almost no content, so the rule above hands it the table's entire slack: measured at
   1132px of a 1781px table on /ops/approvals, which pushed the deal name out to x=1167
   and read as two tables with a void between them. Mark that column `pick-col` on the
   <th> AND on every <td> — a width on the <th> alone does nothing, because under
   table-layout:auto a column takes the widest request among its cells and the <td>s
   were still asking for 100%. The next column then absorbs the slack, exactly as the
   identity column normally does. See DESIGN.md 11. */
table.data-table th.pick-col:first-child,
table.data-table td.pick-col:first-child { width: 28px; white-space: nowrap; text-align: center; }
table.data-table th.pick-col + th,
table.data-table td.pick-col + td { width: 100%; white-space: normal; }
table.data-table tfoot td { font-weight: 600; border-top: 2px solid var(--gray-200); }

/* ── Grouped table (v1.10.2) — ONE table with per-group <tbody>s so every numeric
   column shares ONE rail down the whole section (no per-card drift). `table-layout:
   fixed` + a shared <colgroup> lock every group to the same geometry; the identity
   column (no <col> width) absorbs the slack. Use when a section has repeating
   same-shaped sub-tables (e.g. one block per deal). See DESIGN.md §11. */
table.grouped { table-layout: fixed; }
table.grouped td:first-child, table.grouped th:first-child { width: auto; }
table.grouped td, table.grouped th { overflow: hidden; text-overflow: ellipsis; }
table.grouped tr.tgroup-head td {
  background: var(--gray-50); border-top: 2px solid var(--gray-200);
  padding-top: 11px; padding-bottom: 9px; font-weight: 600; white-space: normal;
}
table.grouped tbody.tgroup:first-of-type tr.tgroup-head td { border-top: none; }
table.grouped tr.tgroup-foot td { font-weight: 700; border-top: 1px solid var(--gray-200); }

/* PAGE TITLE — the large heading a screen opens with. Eight screens rendered this as a
   bare <h1>, which put a SECOND h1 in the document outline: layout() already emits the
   page title as an .sr-only h1 for the outline, so a body <h1> duplicated it. The tag
   carried no CSS at all — 26px/700 is the user-agent default for <h1> (2em of the 13px
   body) with margins zeroed by the `*` reset — so these values reproduce exactly what
   was already on screen and make the size a decision rather than a browser default.
   Mark it up as <h2>, subordinate to the outline's h1, the same way .section-head is. */
.page-title { font-size: 26px; font-weight: 700; }

/* One section-heading treatment for every top-level section label (§12: reuse the
   shared piece, don't inline a one-off). Subordinate to card headers on purpose. */
.section-head { margin: var(--gap-module) 0 var(--gap-note); font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text-secondary); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-head .section-note { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
/* Controls parked at the right end of a section head. margin-left:auto, NOT float:right —
   the head is a flex container and a float on a flex item does nothing at all. Resets the
   head's uppercase + letter-spacing the same way .section-note does; align-self:center
   because the head aligns on the baseline and a 26px button does not sit on one. */
.section-head .section-actions { margin-left: auto; align-self: center; display: inline-flex;
  gap: 6px; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* Muted sub-line inside a table cell — inherits the cell's text-align (so it sits
   right under a right-aligned .num rail, keeping the number itself on the rail). */
.cell-sub { display: block; font-size: 10.5px; font-weight: 400; color: var(--text-muted); line-height: 1.3; }

/* Forfeited status badge (§12: a real class, not an inline one-off). */
.badge-forfeited { background: var(--gray-100); color: var(--text-muted); text-decoration: line-through; }

/* Grouped table keeps a floor width so a narrow screen SCROLLS (via .table-wrap)
   rather than compressing the numeric rails to an ellipsis. */
table.grouped { min-width: 620px; }

/* In-table/body links keep a standing dotted underline so clickability isn't
   signalled by color alone (WCAG use-of-color); solid on hover/focus. */
.card a:not(.btn):not(.hic-link), table a:not(.btn) { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.card a:not(.btn):not(.hic-link):hover, table a:not(.btn):hover { text-decoration-style: solid; }

/* Keyboard focus — an explicit ring for expandable rows + sortable headers (none
   existed). Applies to anything the sort/expand scripts make role="button". */
tr.mbr-row:focus-visible, th[role="button"]:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}

/* ...and for everything else focusable, which had NO ring at all. Buttons, links
   and .btn-classed anchors were relying on the UA default, which several browsers
   render as a thin dark outline that is invisible against the graphite chrome and
   the navy table heads — so a keyboard user could not tell where they were on the
   densest, most keyboard-driven screens in the app.

   :focus-visible, not :focus, so a mouse click never paints a ring. outline-offset
   is positive here (the ring sits OUTSIDE the control) but negative on table rows
   above, where an outside ring would be clipped by the row boundary. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
/* The chrome bar is dark and gold-on-graphite has too little separation there;
   its own controls already ring themselves in app-chrome.js. Don't double up. */
.hic-top a:focus-visible, .hic-top button:focus-visible { outline: none; }

/* Print / PDF — a CFO prints this. Browsers drop background graphics, so restate
   dark-on-navy headers and the gold-on-graphite hero as ink-on-paper, reveal the
   expandable member detail, and let wide tables shrink to the page. */
@media print {
  /* Paper is dearer than screen: the same rhythm, one step tighter. */
  :root { --gap-module: var(--space-5); --gap-chrome: var(--space-3); }
  thead th { background: #fff !important; color: #000 !important; border-bottom: 1.5px solid #000 !important; }
  .kpi-hero, .kpi-hero * { background: #fff !important; color: #000 !important; }
  tr.mbr-detail[hidden] { display: table-row !important; }
  .table-wrap { overflow: visible !important; }
  table.grouped { min-width: 0 !important; table-layout: auto !important; }
  a:not(.btn) { text-decoration: none !important; color: #000 !important; }
  /* .hic-top is the real app-chrome bar (.app-chrome kept for safety); .subnav is a <nav>. */
  .btn, form, .hic-top, .app-chrome, nav { display: none !important; }
  /* Repeat table headers on every printed page and never tear a row or a deal
     group across a page break — a 65-row table used to header page 1 only and
     split rows mid-cell in a board deck. */
  thead { display: table-header-group; }
  tr, tbody.tgroup { break-inside: avoid; }
}
thead th {
  background: var(--brand);
  border-bottom: 2px solid var(--brand);
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
thead th:first-child { border-radius: var(--radius) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
thead th a { color: rgba(255,255,255,0.85); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
thead th a:hover { color: var(--accent-light); }
thead th .sort-arrow { font-size: 9px; opacity: 0.35; color: rgba(255,255,255,0.6); }
thead th .sort-arrow.active { opacity: 1; color: var(--accent); }
/* Body AND footer cells share the same horizontal padding so a tfoot total sits
   on the SAME rail as the column above it. (The tfoot had no padding rule and fell
   back to the `* { padding:0 }` reset — every footer total drifted 10px right.) */
tbody td, tfoot td {
  padding: 5px 10px;
  font-variant-numeric: tabular-nums;
}
tbody td {
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
tbody tr { background: var(--white); }
tbody tr:hover { background: var(--gray-50); }
/* Row affordance is HONEST: the hand cursor + hover tint appear only on rows
   that actually contain a link (whole-row drill-down navigates to the row's
   first link — see the delegated handler in the app layout). A row with no
   destination gets no pointer. (Roadmap ⬜11 — affordance dishonesty.) */
tbody tr:has(a[href]) { cursor: pointer; }
tbody tr:has(a[href]):hover { background: var(--gray-50); }
tbody tr.row-active { background: rgba(28,43,74,0.07); }
tbody tr.row-selected { background: var(--accent-muted); box-shadow: inset 3px 0 0 var(--accent); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; }
.badge-review { background: #fef3cd; color: #92400e; }
.badge-ok     { background: #d1fae5; color: #065f46; }
.badge-accent { background: var(--accent-muted); color: #7c6a3c; }
/* Neutral tag — a classification label with no status/urgency meaning (e.g. GP/LP investor type). */
.badge-neutral { background: var(--gray-100); color: var(--text-secondary); }
/* Dev/UAT status — an app shows this until its hi-portfolio stage is `live`
   (see UAT-CHECKLIST.md). Typically rendered with the text "DEV". */
.badge-dev    { background: #fde3c0; color: #8a4b13; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 3px; }
.form-group label { font-size: 11.5px; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 7px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.form-group textarea { resize: vertical; min-height: 72px; }
.form-group .hint { font-size: 10.5px; color: var(--text-secondary); }

/* ── Bare form controls ──────────────────────────────────────────────────
   Back-office admin pages (deal editor, capital calls, opening-balance
   certification) use compact inline <input>/<select>/<textarea> without a
   .form-group wrapper. Give every such control this same institutional
   treatment by default — no page should ever render a raw browser input.
   Deliberately does NOT set height (unlike .filter-group), so it never
   fights a more specific component's own sizing (e.g. a dense custom field). */
input[type="text"], input[type="date"], input[type="number"], input[type="email"],
input[type="search"], input[type="tel"], input:not([type]), textarea, select {
  padding: 6px 9px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus,
input[type="email"]:focus, input[type="search"]:focus, input[type="tel"]:focus,
input:not([type]):focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--gray-400); }
/* Table-embedded inputs (e.g. per-investor certification amounts) sit flush in their cell. */
td input[type="text"], td input[type="number"] { padding: 4px 7px; font-size: 12.5px; }

/* Editable money field (DESIGN.md §10) — any hand-entered dollar amount outside the promote
   calculator's own .pc-field. The class is also the MONEY_SCRIPT blur-formatter hook, so one
   attribute buys the whole pattern: right-aligned tabular digits here, comma grouping on blur
   from the script, $-prefix and width at the call site. */
input.money-field { text-align: right; font-variant-numeric: tabular-nums; }

details > summary { cursor: pointer; color: var(--text); }
details > summary:hover { color: var(--brand-hover); }

.form-section-title {
  grid-column: 1 / -1;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--brand);
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: 5px;
  margin-top: 6px;
}
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-200);
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(28,43,74,0.45); z-index: 2000; backdrop-filter: blur(2px); }
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 480px);
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  z-index: 2010;
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.modal-header h2 { font-size: 15px; font-weight: 700; color: var(--brand); letter-spacing: -0.2px; margin: 0; }
.modal-body { padding: 18px 22px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* ── Slide-over detail panel ─────────────────────────────────────────────── */
.panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2000;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.panel-backdrop.open { opacity: 1; visibility: visible; }
.panel {
  position: fixed; top: 0; right: 0;
  width: 420px; height: 100vh;
  background: var(--white);
  z-index: 2010;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.panel.open { transform: translateX(0); }
.panel-header { background: var(--brand); padding: 18px 20px 14px; flex-shrink: 0; position: relative; }
.panel-header .panel-deal-name { font-size: 16px; font-weight: 700; color: var(--white); line-height: 1.3; }
.panel-body { flex: 1; overflow-y: auto; }
.panel-section { padding: 14px 20px; border-bottom: 1px solid var(--gray-200); }
.panel-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-secondary); margin-bottom: 10px;
}
.panel-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12.5px; line-height: 1.5; }
.panel-row .panel-label { color: var(--text-secondary); }
.panel-row .panel-val { font-weight: 500; color: var(--text); text-align: right; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--brand); color: var(--white);
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 12.5px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  z-index: 9999;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.app-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 14px 32px;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.footer-inner { display: flex; align-items: flex-start; gap: 24px; max-width: 1680px; margin: 0 auto; } /* align footer text to the bar/content width */
.footer-left { flex-shrink: 0; color: var(--text); line-height: 1.5; }
.footer-left strong { color: var(--brand); font-weight: 700; }
.footer-disclaimer { flex: 1; line-height: 1.55; max-width: 880px; font-size: 11px; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); font-size: 12px; }
.text-dim { color: var(--text-secondary); }
.text-truncate { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Section sub-nav + breadcrumb (v1.9.0, wayfinding) ──────────────────────
   A LIGHT persistent section nav under the 54px app-chrome bar — per the
   estate standard this is never a second dark bar. Tabs use the gold accent
   underline (same motif as nav.topbar's active link). The crumb bar is the
   ONE back-navigation convention: "Dashboard / <entity> / <page>" — pages
   render it instead of ad-hoc "← Back" links. */
/* Section tabs render as defined "tab cards": larger, bordered, rounded; the
   active tab is a filled graphite card with a gold underline accent so the
   current section is unmistakable. */
.subnav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 8px 32px;  /* 32px gutters — the sub-nav tabs align to the bar bounds (DESIGN.md §9.3) */
  position: sticky;
  top: 54px;                 /* sits directly under the app-chrome bar */
  z-index: 30;
}
.subnav-inner { max-width: 1680px; width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Ops utilities (e.g. Integration outbox) sit apart from the product sections:
   pushed right with a hairline divider, so the primary nav reads as four tabs. */
.subnav .subnav-util { margin-left: auto; align-self: stretch; border-left: 1px solid var(--gray-200); }
.subnav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.subnav a:hover {
  color: var(--text);
  background: var(--white);
  border-color: var(--gray-300);
  box-shadow: 0 1px 3px rgba(17, 24, 39, .08);
  text-decoration: none;
}
.subnav a.active,
.subnav a.active:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--accent), 0 1px 4px rgba(17, 24, 39, .14);
}
.subnav .subnav-badge {
  display: inline-block;
  margin-left: 8px;
  min-width: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--gray-100);
  color: var(--text-secondary);
  border: 1px solid var(--gray-200);
}
.subnav .subnav-badge.pending { background: var(--amber-bg, #FEF3C7); color: var(--amber-text, #92400E); border-color: #FDE68A; }
/* On the active (dark) card, a plain count reads as a light chip; a pending
   count keeps its amber alarm colour. */
.subnav a.active .subnav-badge { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; }
.subnav a.active .subnav-badge.pending { background: var(--amber-bg, #FEF3C7); color: var(--amber-text, #92400E); border-color: #FDE68A; }
.crumbbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
}
/* Breadcrumb crumbs are BUTTONS, matching the subnav directly above them (JW,
   2026-08-24: "apply similar design standards ... this should apply to entire site").
   The trail was plain text links separated by slashes, which read as body copy on a
   page whose every other navigation control is a chip. Same geometry as .btn-sm so the
   two rows agree: 26px tall, 4px radius, 11.5px label.

   The separators are hidden rather than removed — they are already aria-hidden and
   carry no meaning a screen reader needs, and the chips make the hierarchy visible on
   their own. The current page keeps .here and renders filled, exactly as .subnav
   a.active does, so "where I am" reads the same everywhere in the app. */
.crumbbar .sep { display: none; }
.crumbbar a,
.crumbbar .here {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}
.crumbbar a { background: var(--white); color: var(--text-secondary); text-decoration: none; }
.crumbbar a:hover { border-color: var(--brand); color: var(--text); text-decoration: none; }
.crumbbar .here { background: var(--brand); border-color: var(--brand); color: var(--white); font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  nav.topbar { padding: 0 16px; height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
  nav.topbar .nav-links { order: 3; width: 100%; flex-wrap: wrap; gap: 4px 14px; }
  .subnav { padding: 8px 16px; overflow-x: auto; }
  .container { padding: 14px 16px 32px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .table-wrap, .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 640px) {
  nav.topbar .brand-logo { height: 22px; }
  nav.topbar .brand-title, nav.topbar .brand-divider { display: none; }
  .container { padding: 16px 16px 28px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .btn, button.btn { min-height: 44px; padding: 8px 14px; font-size: 13px; }
  .footer-inner { flex-direction: column; gap: 8px; }
  .panel { width: 100vw; }
}

/* ── Phone layout (1.19.0) ─────────────────────────────────────────────────
   Every page must fit 390 px with no sideways scroll (DESIGN.md §12). Screen only: a statement
   printed from a phone is still a sheet of paper, never the stacked layout. */
@media screen and (max-width: 640px) {
  /* The answer full width, the other tiles two by two. A label that wraps to two lines must not
     drop its value below its neighbour's, so every label keeps room for two. */
  .kpi-strip .kpi-tile { flex: 1 1 calc(50% - 1px); min-width: 0; padding: 12px 14px; }
  .kpi-strip .kpi-tile.kpi-hero { flex-basis: 100%; }
  .kpi-strip .kpi-tile:not(.kpi-hero) > div:first-child { min-height: 26px; }

  /* A card header's title and caption wrap rather than squeeze. */
  .card-header { flex-wrap: wrap; row-gap: 4px; }

  /* A card whose header carries actions: the title, then the card's own content (the answer),
     then the buttons. Three full-width buttons above the figures pushed the answer 350 px down
     (Fable review). The header dissolves into the card's column so its parts can be ordered. */
  .card:has(> .card-header > .card-actions) { display: flex; flex-direction: column; }
  .card:has(> .card-header > .card-actions) > .card-header { display: contents; }
  .card:has(> .card-header > .card-actions) > .card-header > :not(.card-actions) {
    order: 0; padding: var(--space-4) var(--card-pad); border-bottom: 1px solid var(--gray-200); }
  .card:has(> .card-header > .card-actions) > :not(.card-header) { order: 1; }
  .card-actions { order: 2; width: 100%; flex-wrap: wrap; padding: 12px var(--card-pad) var(--card-pad); }
  .card-actions > .btn { flex: 1 1 100%; justify-content: center; height: auto; min-height: 44px; }
  .card-actions > :not(.btn) { order: -1; flex: 1 1 100%; margin-left: 0 !important; }   /* a caption reads before the buttons */

  /* Every control a thumb has to hit is 44 px: the show/hide toggle, the breadcrumb chips. A
     long deal name wraps the trail rather than running off the edge. */
  .pv-toggle { min-height: 44px; }
  .crumbbar { flex-wrap: wrap; }
  .crumbbar a, .crumbbar .here { min-height: 44px; display: inline-flex; align-items: center; }

  /* STACK: one block per row. The first cell heads the block; every other cell is a
     label/value line, the label from its data-label. The header row stays for screen
     readers only. A cell with an empty data-label is a spacer and is dropped. */
  :is(table.stack-sm, table.stmt-table), :is(table.stack-sm, table.stmt-table) > tbody,
  :is(table.stack-sm, table.stmt-table) > tfoot, :is(table.stack-sm, table.stmt-table) tr { display: block; width: 100%; }
  :is(table.stack-sm, table.stmt-table) > thead { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
  table.stack-sm tr { padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
  .card > table.stack-sm tr, .card > .table-wrap > table.stack-sm tr {
    padding-left: var(--card-pad); padding-right: var(--card-pad); }   /* inside a padded box, none */
  table.stmt-table tr { padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
  :is(table.stack-sm, table.stmt-table) > tfoot > tr { border-top: 2px solid var(--gray-200); border-bottom: 0; }
  :is(table.stack-sm, table.stmt-table) > tfoot td { border-top: 0; }   /* the tfoot td rules would rule every line */
  :is(table.stack-sm, table.stmt-table) td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 4px 0; border: 0; white-space: normal; text-align: right; }
  :is(table.stack-sm, table.stmt-table) td::before { content: attr(data-label); flex: none; max-width: 55%; text-align: left;
    color: var(--text-secondary); font-weight: 400; }
  :is(table.stack-sm, table.stmt-table) td:first-child { display: block; text-align: left; font-weight: 600; padding-bottom: 6px; }
  :is(table.stack-sm, table.stmt-table) td:first-child::before { content: none; }
  table.stack-sm td[data-label=""] { display: none; }
  /* The member-loan split (portal.ts LP_SPLIT_CSS) rules its column family; stacked, those are stray lines. */
  table.stack-sm.lp-split td.num { border: 0; }
  table.stack-sm.lp-split td.num.lp-sum { border-top: 1px solid var(--gray-200); margin-top: 2px; padding-top: 6px; font-weight: 600; }

  /* The quarterly statement's nine columns are fixed (routes/statements.ts), so its labels are
     named here rather than in markup. Closing is the line the roll-forward ends on. */
  table.stmt-table td:nth-child(2)::before { content: "Opening"; }
  table.stmt-table td:nth-child(3)::before { content: "Contributed"; }
  table.stmt-table td:nth-child(4)::before { content: "Return of capital"; }
  table.stmt-table td:nth-child(5)::before { content: "Preferred return"; }
  table.stmt-table td:nth-child(6)::before { content: "Promote"; }
  table.stmt-table td:nth-child(7)::before { content: "Residual"; }
  table.stmt-table td:nth-child(8)::before { content: "Net paid"; }
  table.stmt-table td:nth-child(9)::before { content: "Closing unreturned"; }
  table.stmt-table td:nth-child(9) { font-weight: 700; border-top: 1px solid var(--gray-100); margin-top: 2px; padding-top: 6px; }
  .stmt-head > div:last-child { text-align: left !important; }

  /* The statement's quarter: one select instead of eight buttons. */
  .q-chips { display: none !important; }
  .q-select { display: block; flex: 1 1 100%; order: 3; }
  .q-select select { width: 100%; min-height: 44px; font-size: 16px; }   /* 16 px: iOS does not zoom */

  /* The distribution history is a ledger LIST: the deal, the date under it, the amount on the
     right; the year is the group's heading. As three table columns the date was cut to
     "Jun 30, 20…" and each name wrapped to three lines (Fable review). */
  table.dist-history, table.dist-history > tbody, table.dist-history tr { display: block; width: 100%; min-width: 0; }
  table.dist-history > colgroup, table.dist-history > thead { display: none; }
  table.dist-history tr:not(.tgroup-head):not(.tgroup-foot) { display: grid; grid-template-columns: 1fr auto;
    column-gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--gray-200); }
  table.dist-history tr:not(.tgroup-head):not(.tgroup-foot) > td { display: block; padding: 0; border: 0; overflow: visible; }
  table.dist-history tr:not(.tgroup-head):not(.tgroup-foot) > td:nth-child(1) { grid-column: 1 / -1; white-space: normal; }
  table.dist-history tr:not(.tgroup-head):not(.tgroup-foot) > td:nth-child(2) { grid-column: 1; color: var(--text-secondary); font-size: 12px; }
  table.dist-history tr:not(.tgroup-head):not(.tgroup-foot) > td:nth-child(3) { grid-column: 2; grid-row: 2; }
  table.dist-history tr.tgroup-head > td { display: block; }
  table.dist-history tr.tgroup-foot { display: flex; justify-content: space-between; padding: 8px 10px; }
  table.dist-history tr.tgroup-foot > td { display: block; padding: 0; border: 0; }

  /* The LP deal page's hero: two figures to a row, a size that holds an eight-figure amount. */
  .lp-hero-in { padding: 20px 18px 18px; }
  .lp-hero-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
  .lp-hero-figs .fig-lg { font-size: 19px; }

  /* Capital pacing: only the first and last dates; the ones between overprinted (Fable review). */
  .cp-x-mid { display: none; }

  /* The quarterly statement's trail already leads back; its own Back button is a second one. */
  .stmt-wrap > .stmt-noprint > a.btn:first-child { display: none; }

  /* ── 1.20.0: the back office on a phone ── */

  /* THE SECTION TAB BAR IS ONE ROW. Wrapping freely it was four rows, 190 px, pinned under the
     55 px chrome bar: 29% of the screen on every page. One row that scrolls sideways is 48 px. It
     stays pinned, so the sections are one tap away at the foot of a long page; layout.ts scrolls
     the current tab into view. The in-page deal tabs (.dealtabs) are not this bar. */
  .subnav:not(.dealtabs) { min-height: 0; padding: 4px 0; }
  .subnav:not(.dealtabs) .subnav-inner { flex-wrap: nowrap; gap: 6px; padding: 0 24px 0 16px; overflow-x: auto;
    overscroll-behavior-x: contain; scrollbar-width: none; }
  /* The right edge fades, so the tab it cuts reads as "more this way". As wide as the row's end
     padding, so once the row is scrolled to its end the fade covers nothing. */
  .subnav:not(.dealtabs)::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 24px;
    background: linear-gradient(to right, transparent, var(--white)); pointer-events: none; }
  .subnav:not(.dealtabs) .subnav-inner::-webkit-scrollbar { display: none; }
  .subnav:not(.dealtabs) .subnav-inner > * { flex: none; }
  .subnav:not(.dealtabs) a { height: 40px; padding: 0 14px; font-size: 13px; }

  /* 16 PX IN EVERY FIELD. Safari zooms the page into any field whose text is under 16 px, and the
     page stays zoomed (the calculator's fields were 11.5 to 13 px, the searches 12.5). !important
     because several fields carry their size inline. */
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"],
    [type="hidden"], [type="submit"], [type="button"], [type="reset"], [type="image"]),
  select, textarea { font-size: 16px !important; }

  /* The admin deal hero: the calculator button under the deal name and its line, not on top of the name. */
  .deal-hero-act { position: static; margin-top: 14px; }
  /* The promote status wraps inside a deal-page fact rather than widening the page (413 px measured). */
  .fact-v .promote-state { white-space: normal; align-items: flex-start; }
  .fact-v .promote-state > span:first-child { margin-top: 3px; }
}

/* ── In-page deal tabs + cap-table decimal rail (v1.10.0, deal-page redesign) ──
   The deal detail page splits into Overview / Ownership / Capital Calls /
   Distributions. Tabs reuse the .subnav tab-card look but as a NON-sticky,
   in-page strip under the deal header (never a second sticky bar). */
.subnav.dealtabs { position: static; top: auto; z-index: auto; background: transparent;
  border-bottom: none; min-height: auto; padding: 2px 0 16px; }
.subnav.dealtabs .subnav-inner { padding: 0; }
.deal-panel[hidden] { display: none; }

/* Cap table: every money column shares ONE decimal rail. The expand affordance
   (dated line items behind a number) lives in a reserved right gutter as a
   chevron, so it never rides the left of a right-aligned number. */
.cap-table td.num, .cap-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cap-table td.num { padding-right: 22px; position: relative; }
.cap-table th.num { padding-right: 22px; }
.cap-exp { display: inline; }
.cap-exp > summary { list-style: none; cursor: pointer; display: inline; }
.cap-exp > summary::-webkit-details-marker { display: none; }
.cap-exp > summary .cap-amt { border-bottom: 1px dotted var(--gray-400, #b8bcc4); }
.cap-exp > summary:hover .cap-amt { border-bottom-color: var(--brand); }
.cap-table .cap-chev { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--text-secondary); font-size: 9px; transition: transform .15s; pointer-events: none; }
.cap-exp[open] .cap-chev { transform: translateY(-50%) rotate(90deg); }
.cap-exp > summary > .cap-detail, .cap-exp[open] .cap-detail { }
.cap-exp .cap-detail { text-align: right; }
/* Share cell: a muted-gold magnitude hairline under the exact % (LP dominance
   vs GP slivers), never displacing the number that foots to 100.00%. */
.cap-share { position: relative; }
.cap-share .cap-bar { position: absolute; left: 0; bottom: 2px; height: 2px;
  background: var(--accent); opacity: .5; border-radius: 1px; }

/* ── Debt warehouse (/debt) ─────────────────────────────────────────────────
   Expandable loan rows → per-loan terms + a scrollable amortization schedule.
   Amortization phase is color-coded; the "to finalize" note flags doc gaps. */
tr.loan-row td:first-child { font-weight: 600; }
tr.loan-row:hover td { background: var(--gray-50); }
tr.loan-detail > td { padding: 0; }
.debt-detail { padding: 16px 18px 20px; display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.debt-detail .full { grid-column: 1 / -1; }
.sched-scroll { max-height: 300px; overflow: auto; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.sched-scroll thead th { position: sticky; top: 0; background: var(--brand); z-index: 1; }
.phase-IO { color: var(--text-secondary); }
.phase-AMORT { color: var(--brand); font-weight: 600; }
.phase-MATURITY { color: #7c6a3c; font-weight: 700; }
.to-finalize { font-size: 11.5px; color: var(--amber-text); background: var(--amber-bg);
  border: 1px solid #fcd9a0; border-radius: var(--radius); padding: 8px 12px; margin-top: 12px; }
.to-finalize ul { margin: 4px 0 0 16px; }
/* Findings and modeling notes. Amber says "somebody owes this"; these are established facts
   and engine backlog, so they carry the page's neutral treatment instead. They sit on the loan
   page because that is where they read correctly — next to the terms they qualify — but they
   are not anybody's queue, and rendering them in the same amber as the asks was the whole
   reason a loan with five open questions looked like it had eight. */
.on-record { font-size: 11.5px; color: var(--text-secondary); background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 8px 12px; margin-top: 8px; }
.on-record ul { margin: 4px 0 0 16px; }
.on-record strong { color: var(--text); font-weight: 600; }
/* The loan-page Source card — the provenance for every abstracted term. It is a <details>
   because the citations run to 2,168 characters at the top end and it is reference, consulted
   when a figure is challenged, not read on the way past. Two columns so a 26-clause cite is a
   short list rather than a long one, collapsing to one column when there is no room. */
.src-card > summary { cursor: pointer; list-style: none; padding: 10px 14px; font-size: 12px;
  font-weight: 600; color: var(--text); }
.src-card > summary::-webkit-details-marker { display: none; }
.src-card > summary::before { content: "\25B8"; display: inline-block; width: 1em;
  color: var(--text-secondary); font-weight: 400; }
.src-card[open] > summary::before { content: "\25BE"; }
.src-card[open] > summary { border-bottom: 1px solid var(--gray-200); }
.src-card ul { margin: 0; padding: 10px 14px 12px 30px; font-size: 12px; line-height: 1.6;
  color: var(--text-secondary); columns: 2; column-gap: 28px; }
.src-card li { margin: 0 0 6px; break-inside: avoid; }
@media (max-width: 900px) { .src-card ul { columns: 1; } }
@media print { .src-card ul { columns: 1; } .src-card > summary::before { content: ""; } }
@media (max-width: 720px) { .debt-detail { grid-template-columns: 1fr; } }

/* ── D10 · Portfolio overview panels ──────────────────────────────────────
   Capital pacing, Portfolio by platform and Promote pipeline used to be three
   sibling cards answering one question between them. They are now panels inside
   one card: no card chrome of their own, a lighter head than a card-header, and
   a rule between them instead of a gap. The components keep their card wrappers
   by default (the trajectory is reused on the deal page) — `bare` swaps them for
   these classes only where an outer card already provides the frame. */
.ov-panel { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.ov-panel > .card-body { padding-left: 0; padding-right: 0; }
.ov-panel-head {
  display: flex; align-items: baseline; gap: var(--space-4);
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-secondary); padding: var(--space-4) 0 var(--space-2);
}
.ov-split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 var(--space-6); align-items: stretch;
  border-top: 1px solid var(--gray-100); margin-top: var(--space-3);
}
@media (min-width: 760px) { .ov-split > .ov-panel + .ov-panel { border-left: 1px solid var(--gray-100); padding-left: var(--space-6); } }
