/* Pactwyn by Braivex. One stylesheet, no inline styles (CSP style-src 'self').
   House theme: Braivex tokens (braivex-theme/Braivex-theme/assets/braivex.css, CiteSieve public/app.css), Assistant,
   black and cyan, pill buttons, 4px/16px radii, hairline borders. Light and dark sets below; dark is the house default.
   public/theme.js sets html[data-theme] before first paint (house mechanism, Housieve). The contract itself is still set in
   a book serif, with green insertions and red deletions. Every text pair is checked in tests/unit/contrast.test.ts. */

@font-face { font-family: "Assistant"; src: url("/brand/Assistant-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Assistant"; src: url("/brand/Assistant-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Arial scaled to Assistant's measured advance width (92.24%) and vertical metrics (ascent 1021, descent 287 per 1000),
   so the swap to the web font moves nothing (the guide page measured CLS 0.281 on mobile from this swap before).
   shortcut: one fallback face for both weights and Arial only; add a Roboto face if Android field CLS shows a shift. */
@font-face { font-family: "Assistant Fallback"; src: local("Arial"), local("ArialMT"); size-adjust: 92.24%; ascent-override: 110.69%; descent-override: 31.11%; line-gap-override: 0%; }

/* dark (house default) */
:root {
  color-scheme: dark;
  --canvas: #000000;       /* bvx-black */
  --surface: #0a0a0a;      /* bvx-panel */
  --raised: #12151a;       /* toasts, dialogs: one step above surface */
  --sunken: #14171c;
  --tint: #0d1014;
  --ink: #ffffff;          /* bvx-ink */
  --ink-2: #b0b0b0;        /* bvx-ink-70 */
  --ink-3: #999999;        /* bvx-ink-55 */
  --line: rgba(255, 255, 255, .1);         /* bvx-line */
  --line-strong: rgba(255, 255, 255, .22);
  --field: rgba(255, 255, 255, .45);       /* control edges, CiteSieve --line-field */
  --accent: #00f0ff;       /* bvx-accent: fills (primary buttons, selected segments) */
  --accent-hover: #7ff7ff;
  --accent-ink: #00f0ff;   /* accent as text, focus ring and active marks */
  --accent-edge: #00f0ff;
  --on-accent: #04070a;
  --accent-soft: #062a2e;
  --accent-2: #0055ff;     /* bvx-accent-2: the deep end of the reading charge */
  --ink-body: rgba(255, 255, 255, .75);  /* braivex.com body text (Dawn: foreground at 75%) */
  --ink-4: #888888;        /* bvx-ink-38: dates, column titles */
  --line-soft: rgba(255, 255, 255, .06);  /* bvx-line-soft: row seams */
  --ins: #6ee7a8;  --ins-soft: #0b2419;    /* insertions, accepted */
  --del: #ff8f8f;  --del-soft: #2b1313;    /* deletions, red severity */
  --amber: #ffd27a; --amber-soft: #2a2110;
  --info: #8fb8ff; --info-soft: #0f1a2c;
  --missing: #c9b1ff; --missing-soft: #1d1630;
  --scrim: rgba(0, 0, 0, .7);
  --shadow-paper: inset 0 1px 0 rgba(255, 255, 255, .06);
  --shadow-pop: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 40px -12px rgba(0, 0, 0, .9);
  --shadow-bar: 0 -1px 0 rgba(255, 255, 255, .1);
  --shadow-raise: inset 0 1px 0 rgba(255, 255, 255, .06);
}
/* light */
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f4f5f7;
  --surface: #ffffff;
  --raised: #ffffff;
  --sunken: #eceef2;
  --tint: #f8f9fb;
  --ink: #0a0d12;          /* bvx-panel-2 as ink */
  --ink-2: #474d59;
  --ink-3: #5d6470;
  --line: #e1e4ea;
  --line-strong: #c6cbd4;
  --field: #7c8391;
  --accent: #00f0ff;
  --accent-hover: #5cf6ff;
  --accent-ink: #006a75;   /* cyan darkened until it reads as text on white */
  --accent-edge: #00909b;  /* keeps the cyan pill's edge at 3:1 on white */
  --on-accent: #04070a;
  --accent-soft: #e0f9fb;
  --accent-2: #2f5fb3;
  --ink-body: #2b313b;
  --ink-4: #5d6470;
  --line-soft: #e8ebf0;
  --ins: #0b6b4e;  --ins-soft: #e3f3ec;
  --del: #b42318;  --del-soft: #fdecea;
  --amber: #8a4b00; --amber-soft: #fff2dc;
  --info: #2f4f7a; --info-soft: #e8eef7;
  --missing: #5b3f99; --missing-soft: #efeafa;
  --scrim: rgba(10, 13, 18, .45);
  --shadow-paper: 0 1px 3px rgba(10, 13, 18, .06), 0 16px 40px -20px rgba(10, 13, 18, .07);
  --shadow-pop: 0 0 0 1px rgba(10, 13, 18, .06), 0 16px 40px -12px rgba(10, 13, 18, .07);
  --shadow-bar: 0 -8px 24px -16px rgba(10, 13, 18, .07);
  --shadow-raise: 0 1px 2px rgba(10, 13, 18, .06);
}
/* mode-independent */
:root {
  /* the Braivex band (trust section): dark in both modes */
  --night: #0a0a0a;
  --night-2: #0a0d12;
  --night-ink: #ffffff;
  --night-ink-2: #b0b0b0;

  --sans: "Assistant", "Assistant Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--sans);
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;

  --r-s: 4px;    /* bvx-radius */
  --r-m: 8px;
  --r-l: 16px;   /* CiteSieve --radius-lg */
  --m-150: 150ms;
  --m-200: 200ms;
  --m-300: 300ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);   /* bvx-ease */
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --wrap: 1200px;  /* bvx-max */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-padding-bottom: 104px; } /* bottom: clears the sticky .decision-bar */
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1.1rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 3px; }
ins { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .16em; color: var(--ins); background: var(--ins-soft); }
del { color: var(--del); text-decoration-color: var(--del); text-decoration-thickness: 1.5px; }
mark { background: var(--amber-soft); color: inherit; }
img, svg { max-width: 100%; }
.icon { flex: none; vertical-align: -.15em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-3); }
.fine { font-size: .875rem; color: var(--ink-3); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--accent); color: var(--on-accent); font-weight: 700; padding: .6rem 1rem; border-radius: var(--r-s); }
.skip:focus { top: 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.narrow { max-width: 820px; }
.plain { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain li { padding: .35rem 0; }

/* ---------------------------------------------------------------- buttons and controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid transparent; font: 700 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background-color var(--m-150) var(--ease-out), border-color var(--m-150) var(--ease-out); white-space: nowrap; }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn[aria-busy="true"] { cursor: progress; opacity: .7; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--sunken); }
.btn-danger { background: transparent; color: var(--del); border-color: color-mix(in srgb, var(--del) 55%, transparent); }
.btn-danger:hover:not(:disabled) { background: var(--del-soft); }
.btn-sm { min-height: 36px; padding: .4rem .85rem; font-size: .875rem; }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1.02rem; }
.btn[aria-pressed="true"].btn-secondary { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; transition: border-color var(--m-150) var(--ease-out); }
.icon-btn:hover { border-color: var(--ink-3); }

input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: var(--r-s); padding: .6rem .75rem; min-height: 44px; width: 100%; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent-ink); flex: none; margin: .15rem 0 0; }
input[readonly] { background: var(--canvas); }
textarea { resize: vertical; line-height: 1.5; }
input[aria-invalid="true"], .has-error input, .has-error select, .has-error textarea { border-color: var(--del); }
.field { margin: 0 0 1.1rem; }
.field > label, .field-label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .35rem; }
.field-optional { font-weight: 400; color: var(--ink-3); }
.field-hint { font-size: .875rem; color: var(--ink-3); margin: .35rem 0 0; }
.field-error, .form-error { color: var(--del); font-size: .9rem; margin: .35rem 0 0; font-weight: 500; }
.form-error { margin: .75rem 0; }
.field-static { margin: 0; padding: .55rem 0; color: var(--ink-2); }
.field.check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .7rem; align-items: start; }
.field.check > label { font-weight: 400; margin: 0; }
.field.check .field-hint, .field.check .field-error { grid-column: 2; }
.inline-check { display: inline-flex; gap: .5rem; align-items: center; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; border: 0; padding: 0; margin: 0 0 1.1rem; }
.checks legend { font-weight: 700; font-size: .95rem; margin-bottom: .45rem; padding: 0; width: 100%; }
.checks label { display: inline-flex; gap: .5rem; align-items: center; }
.input-group { display: flex; gap: .5rem; }
.input-group select { width: 6.5rem; flex: none; }
.grid-2 { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }

.segmented { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: 999px; gap: 2px; }
.segmented button { border: 0; background: transparent; font: 500 .95rem/1 var(--sans); color: var(--ink-2); padding: .65rem 1.05rem; min-height: 40px; border-radius: 999px; cursor: pointer; transition: background-color var(--m-150) var(--ease-out); }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.segmented button:disabled { cursor: not-allowed; }
.segmented-sm button { padding: .45rem .8rem; min-height: 34px; font-size: .875rem; }

/* ---------------------------------------------------------------- badges, severity, status */
.side-badge { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: .2rem .7rem .2rem .55rem; background: var(--surface); }
.sev { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .8rem; line-height: 1; padding: .3rem .55rem; border-radius: 4px; }
.sev-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.sev-red { color: var(--del); background: var(--del-soft); }
.sev-amber { color: var(--amber); background: var(--amber-soft); }
.sev-info { color: var(--info); background: var(--info-soft); }
.sev-missing { color: var(--missing); background: var(--missing-soft); }
.sev-counts { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.sev-count { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; }
.status { display: inline-block; font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .4rem; background: var(--line-strong); vertical-align: .08em; }
.status-in_review::before, .status-intake::before { background: var(--info); }
.status-needs_decision::before { background: var(--amber); }
.status-exported::before, .status-waiting_counterparty::before, .status-response_received::before { background: var(--missing); }
.status-signed::before { background: var(--ins); }
.status-dropped::before { background: var(--ink-3); }

/* ---------------------------------------------------------------- marketing chrome */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--canvas); border-bottom: 1px solid var(--line); } /* opaque: headings must never show through */
main [id], section[id] { scroll-margin-top: 80px; }
.footer-cookies { margin-left: .75rem; color: var(--ink-2); min-height: 44px; }
.site-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; font: 700 1.25rem/1 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none; margin: 0; }
.wordmark span { font-weight: 400; color: var(--ink-3); letter-spacing: 0; font-size: .7em; }
.wordmark .mark { flex: none; margin-right: .2rem; }
.mark-accent { stroke: var(--accent-ink); }
.site-nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); }
.site-nav > a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: .95rem; padding: .6rem 0; }
.site-nav > a:not(.btn):hover { color: var(--ink); }

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-tight { padding: 2rem 0 3rem; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-lede, .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.page-head { padding-bottom: 1rem; }

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 3.2vw, 4rem); max-width: 12ch; }
.hero .lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }
.hero-fine { font-size: .9rem; color: var(--ink-3); }
@media (min-width: 1080px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

.steps { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line-strong); padding-top: 1.1rem; }
.steps li::before { content: counter(step); display: block; font: 700 .95rem/1 var(--display); color: var(--accent-ink); margin-bottom: 1.4rem; }
.steps p { color: var(--ink-2); }

.intake-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-top: 2.5rem; }
.intake-card { border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(1.25rem, 3vw, 2rem); background: var(--canvas); }
.intake-card h3 { display: flex; gap: .5rem; align-items: center; }
.intake-card > p { color: var(--ink-2); }
.mock-slack, .mock-upload { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.1rem; margin: 1.25rem 0; font-size: .95rem; }
.mock-cmd { font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: .45rem .7rem; }
.mock-msg { border-left: 3px solid var(--accent-ink); padding-left: .9rem; }
.mock-from { font-weight: 700; margin-bottom: .2rem; }
.mock-counts { display: flex; gap: .4rem; flex-wrap: wrap; }
.mock-btn { display: inline-block; border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: .35rem .8rem; font-weight: 700; margin: 0; }
.mock-btn-dark { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); border-radius: 999px; padding: .45rem 1.1rem; }
.mock-drop { border: 1px dashed var(--field); border-radius: var(--r-s); padding: .8rem; color: var(--ink-2); }
.mock-label { font-weight: 700; margin: 0 0 .35rem; }
.mock-seg { display: inline-flex; background: var(--sunken); border-radius: 999px; padding: 3px; }
.mock-seg span { padding: .35rem .8rem; border-radius: 999px; color: var(--ink-2); }
.mock-seg .on { background: var(--accent); color: var(--on-accent); font-weight: 700; }

.section-dark { background: var(--night); color: var(--night-ink); }
.section-dark h2, .section-dark h3 { color: var(--night-ink); }
.trust-list { list-style: none; padding: 0; margin: 2.5rem 0; display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.trust-list li { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.25rem 0 1.5rem; }
.trust-list p { color: var(--night-ink-2); margin: 0; }
.link-light { color: var(--night-ink); }
.section-dark :focus-visible { outline-color: var(--night-ink); }

.closer { text-align: center; }
.closer h2 { max-width: 20ch; margin: 0 auto 1.5rem; font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem); }

.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 1.1rem 2rem 1.1rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; font-weight: 400; font-size: 1.3rem; color: var(--ink-3); transition: transform var(--m-200) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); max-width: 68ch; padding-bottom: .6rem; }

/* pricing */
.pricing { margin-top: 2rem; }
.period { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: 999px; margin-bottom: 1.5rem; }
.period button { border: 0; background: transparent; font: 500 .95rem/1 var(--sans); color: var(--ink-2); padding: .7rem 1.1rem; min-height: 42px; border-radius: 999px; cursor: pointer; }
.period button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.period-note { color: var(--accent-ink); font-weight: 700; margin-left: .3rem; }
@media (max-width: 380px) { .period button { padding: .6rem .75rem; font-size: .88rem; } }
.plans { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow-x: auto; }
.plan { padding: 1.6rem 1.4rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.plan:first-child { border-left: 0; }
.plan h2, .plan h3 { font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.plan-flag { font: 700 .78rem/1 var(--sans); color: var(--accent-ink); }
.plan-featured { box-shadow: inset 0 2px 0 var(--accent); }
.plan-for { color: var(--ink-2); font-size: .95rem; min-height: 3em; }
.plan-price { margin: .5rem 0 .2rem; display: flex; align-items: baseline; gap: .4rem; }
.plan-amount { font: 700 2.4rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-per { color: var(--ink-3); }
.plan-sub { font-size: .875rem; color: var(--ink-3); min-height: 2.8em; }
.plan-save { color: var(--accent-ink); font-weight: 700; }
.plan-cta { margin: .5rem 0 1.25rem; width: 100%; }
.plan-features { list-style: none; padding: 0; margin: 0; font-size: .93rem; color: var(--ink-2); }
.plan-features li { display: flex; gap: .5rem; align-items: baseline; padding: .3rem 0; }
.plan-features .icon { color: var(--accent-ink); }
.plan-minus { color: var(--ink-3); padding-left: 1.4rem !important; }
.pricing-note { font-size: .9rem; color: var(--ink-3); margin-top: 1rem; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; } .plan:nth-child(3) { border-left: 0; } .plan:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } .plan { border-left: 0; border-top: 1px solid var(--line); } .plan:first-child { border-top: 0; } }
.split { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
.credit-table, .table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; }
.credit-table th, .credit-table td, .table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.credit-table th, .table th { font-weight: 700; font-size: .85rem; color: var(--ink-2); background: var(--canvas); }
.topup { border-top: 1px solid var(--line); padding-top: 2rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.prose p, .prose li { color: var(--ink-2); max-width: 70ch; }
.callout { border-left: 3px solid var(--accent-ink); padding: .4rem 0 .4rem 1rem; color: var(--ink) !important; font-weight: 500; }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; font-size: .93rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr repeat(3, 1fr); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.site-footer h2 { font-size: .95rem; letter-spacing: 0; margin-bottom: .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-block; padding: .3rem 0; color: var(--ink-2); text-decoration: none; }
.site-footer li a:hover { color: var(--ink); text-decoration: underline; }
.footer-brand .wordmark { margin-bottom: .75rem; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-disclaimer { color: var(--ink-2); max-width: 90ch; font-size: .875rem; }
@media (max-width: 720px) { .hide-sm { display: none !important; } }
@media (min-width: 721px) { .show-sm { display: none !important; } }

/* ---------------------------------------------------------------- hero demo */
.demo { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); box-shadow: var(--shadow-paper); overflow: hidden; }
.demo-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--canvas); }
.demo-file { display: flex; gap: .6rem; align-items: center; min-width: 0; font-size: .9rem; }
.demo-file strong { display: block; font-weight: 700; }
.demo-playbook { display: block; color: var(--ink-3); font-size: .82rem; }
.demo-controls { display: flex; gap: .5rem; align-items: center; }
.demo-side-label { font-size: .85rem; color: var(--ink-2); font-weight: 500; }
.demo-paper { position: relative; padding: .5rem 0; max-height: 560px; overflow-y: auto; }
.demo-row { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; padding: .55rem 1.25rem; }
@media (min-width: 640px) { .demo-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; } }
.demo-row::before { content: ""; position: absolute; inset: 0; background: var(--accent-soft); opacity: 0; transition: opacity var(--m-300) var(--ease-out); pointer-events: none; }
.demo-row::after { content: ""; position: absolute; left: 0; top: .4rem; bottom: .4rem; width: 3px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform var(--m-300) var(--ease-out); }
.demo-row.is-scan::before { opacity: .7; }
.demo-row.is-scan::after { transform: scaleY(1); }
.demo-row.is-selected::before { opacity: .45; }
.dc { position: relative; font: 400 1rem/1.6 var(--serif); color: var(--ink); margin: 0; }
.dc strong { font-weight: 700; }
.dc-inserted { color: var(--ins); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .16em; animation: enter var(--m-300) var(--ease-out); }
.dc-inserted strong { color: var(--ins); }
.dc-removed { color: var(--ink-3); text-decoration: line-through; }
.tc-del { position: relative; text-decoration: none; color: var(--del); }
.tc-del::after { content: ""; position: absolute; left: 0; right: 0; top: 54%; height: 1.5px; background: var(--del); transform: scaleX(0); transform-origin: left; animation: strike var(--m-300) var(--ease-out) forwards; }
.tc-ins { display: inline; margin-left: .2em; animation: enter var(--m-300) var(--ease-out) 150ms both; }
.tc-accepted { color: var(--ink); background: var(--ins-soft); }
.demo-margin { position: relative; font-family: var(--sans); }
.demo-flag { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--r-s); background: var(--surface); padding: .7rem .8rem; font-size: .85rem; animation: enter var(--m-300) var(--ease-out); margin-top: .5rem; }
@media (min-width: 640px) { .demo-flag { margin-top: 0; } }
.sev-edge-red { border-left-color: var(--del) !important; }
.sev-edge-amber { border-left-color: var(--amber) !important; }
.sev-edge-info { border-left-color: var(--info) !important; }
.sev-edge-missing { border-left-color: var(--missing) !important; }
.demo-flag header { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .45rem; }
.demo-flag-pos { font-weight: 700; color: var(--ink); }
.demo-rule { margin: 0 0 .4rem; }
.demo-rule div { display: grid; grid-template-columns: 5.2rem 1fr; gap: .4rem; padding: .1rem 0; }
.demo-rule dt { color: var(--ink-3); font-weight: 500; }
.demo-rule dd { margin: 0; color: var(--ink-2); }
.demo-why { color: var(--ink); margin: 0 0 .55rem; }
.demo-decide { display: flex; gap: .4rem; align-items: center; }
.demo-decide .btn { min-height: 32px; padding: .3rem .8rem; font-size: .82rem; }
.demo-decided { display: inline-flex; gap: .3rem; align-items: center; font-weight: 700; }
.demo-accepted { color: var(--ins); }
.demo-rejected { color: var(--ink-2); }
.demo-match { display: flex; gap: .35rem; align-items: center; color: var(--ins); font-size: .85rem; font-weight: 500; margin: .25rem 0 0; animation: enter var(--m-300) var(--ease-out); }
.demo-summary { border-top: 1px solid var(--line); padding: .8rem 1.25rem; font-size: .9rem; min-height: 3.2rem; }
.demo-summary p { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin: 0; }
.demo-summary-note { color: var(--ink-2); margin-left: auto; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; min-height: 60px; padding: 0 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; }
.topbar-ws { color: var(--ink-2); font-size: .93rem; }
.topbar-ws select { min-height: 36px; padding: .3rem .6rem; width: auto; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar-user { color: var(--ink-3); font-size: .9rem; }
.credits { font-weight: 700; font-size: .88rem; color: var(--ink); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: .35rem .8rem; font-variant-numeric: tabular-nums; }
.credits-low { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); background: var(--amber-soft); }
.credits-zero { color: var(--del); border-color: color-mix(in srgb, var(--del) 55%, transparent); background: var(--del-soft); }
.credits-loading { color: var(--ink-3); }
.sidenav { border-right: 1px solid var(--line); padding: 1.25rem .75rem; background: var(--canvas); }
.sidenav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 80px; }
.sidenav a { display: block; padding: .65rem .8rem; min-height: 44px; border-radius: var(--r-s); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.sidenav a:hover { background: var(--sunken); color: var(--ink); }
.sidenav a.is-active { background: var(--sunken); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent-ink); }
.app-main { min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidenav { border-right: 0; border-bottom: 1px solid var(--line); padding: .5rem; overflow-x: auto; }
  .sidenav ul { display: flex; gap: .25rem; position: static; }
  .sidenav a { white-space: nowrap; }
}
.page { padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2.5rem) 3rem; max-width: 1180px; width: 100%; flex: 1; }
.page-wide { max-width: 1480px; }
.page-narrow { max-width: 860px; }
.page h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); }
.page h2 { font-size: 1.2rem; letter-spacing: -.01em; }
.page-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-title h1 { margin: 0; }
.title-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.save-state { font-size: .9rem; color: var(--ink-3); }
.crumbs { font-size: .9rem; color: var(--ink-3); margin-bottom: .5rem; }
.crumbs a { color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-raise); border-radius: var(--r-l); padding: clamp(1.1rem, 2.5vw, 1.75rem); margin: 0 0 1.25rem; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.panel-title h2 { margin: 0; }
.row-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.app-footer { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); max-width: 1180px; }
.app-footer p { max-width: 110ch; }
.app-footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: 0; margin: 0; }
.app-footer a { color: var(--ink-2); }
.centered { min-height: 100vh; display: flex; flex-direction: column; }
.centered > main { flex: 1; display: grid; place-items: center; padding: 2rem 1rem; }
.signin, .onboard { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(1.5rem, 4vw, 2.5rem); }
.signin h1, .onboard h1 { font-size: 1.8rem; }
.onboard .btn-primary, .signin .btn-primary { width: 100%; margin-top: .5rem; }

/* tables, filters, lists */
.table-wrap { position: relative; overflow-x: auto; /* relative: absolutely placed hidden text stays inside the scroller */ border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.table-wrap .table tr:last-child td { border-bottom: 0; }
.row-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.row-sub { display: block; font-size: .85rem; color: var(--ink-3); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.filters label:first-child { flex: 1 1 260px; }
.filters select { width: auto; }
.filter-inline { display: inline-flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filter-inline select { width: auto; }
.subnav { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.subnav a { padding: .7rem .9rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.subnav a.is-active { color: var(--ink); border-bottom-color: var(--accent-ink); }
.pb-list { list-style: none; padding: 0; margin: 0 0 2rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.pb-list li { display: grid; grid-template-columns: 2fr 2fr 1fr 1.4fr 1.2fr; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); align-items: baseline; font-size: .93rem; }
.pb-list li:last-child { border-bottom: 0; }
@media (max-width: 820px) { .pb-list li { grid-template-columns: 1fr; gap: .2rem; } }
.pb-published { color: var(--ins); font-weight: 500; }
.samples { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.samples li { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); padding: 1.1rem; display: flex; flex-direction: column; }
.samples li .btn { margin-top: auto; align-self: start; }
.sample-label { font-size: .9rem; color: var(--ink-2); border-left: 3px solid var(--line-strong); padding-left: .8rem; }
.first-run { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); text-align: left; }
.first-run li { border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.1rem; background: var(--canvas); }
.first-run p { color: var(--ink-2); font-size: .93rem; }
.stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 0 0 1rem; }
.stats dt { font-size: .85rem; color: var(--ink-3); }
.stats dd { margin: 0; font: 700 1.6rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.stats dd.stat-sub { font: 400 .85rem/1.4 var(--sans); color: var(--ink-2); text-transform: none; margin-top: .25rem; }
.panel-title .period { margin-bottom: 0; }
details.panel > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.plan-pick { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.plan-pick li { border: 1px solid var(--line); border-radius: var(--r-m); padding: 1rem; }
.plan-pick li.is-wanted { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.fixed-note { font-weight: 500; }
.intake-rules { list-style: none; padding: 0; margin: 0 0 1rem; }
.intake-rules li { display: grid; grid-template-columns: 2fr 1fr 1.4fr auto auto; gap: .75rem; align-items: end; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.intake-rules .field { margin: 0; }
@media (max-width: 820px) { .intake-rules li { grid-template-columns: 1fr; } }
.slack-preview { margin-top: 1.25rem; border-left: 3px solid var(--accent-ink); padding: .5rem 0 .5rem 1rem; background: var(--canvas); }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.activity time { color: var(--ink-3); }

/* states */
.skeleton { display: grid; gap: .6rem; padding: .5rem 0; }
.skeleton-row { height: 44px; border-radius: var(--r-s); background: linear-gradient(90deg, var(--sunken), var(--tint), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 3rem 1.25rem; border: 1px dashed var(--line-strong); border-radius: var(--r-l); background: var(--surface); }
.empty h2 { font-size: 1.3rem; }
.empty-body { color: var(--ink-2); max-width: 760px; margin: 0 auto; }
.empty-action { margin-top: 1rem; }
.error-card { border: 1px solid color-mix(in srgb, var(--del) 40%, transparent); background: var(--del-soft); border-radius: var(--r-m); padding: 1.25rem; }
.error-card h2 { font-size: 1.1rem; color: var(--del); }
.error-summary { border: 1px solid color-mix(in srgb, var(--del) 40%, transparent); border-left: 4px solid var(--del); background: var(--surface); border-radius: var(--r-s); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.error-summary h2 { font-size: 1rem; color: var(--del); }
.banner { border-radius: var(--r-s); padding: .8rem 1rem; margin: 0 0 1.25rem; font-size: .95rem; border: 1px solid var(--line); background: var(--info-soft); color: var(--ink); }
.banner-warning { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.banner-error { background: var(--del-soft); border-color: color-mix(in srgb, var(--del) 40%, transparent); }
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 60; max-width: min(420px, calc(100vw - 2rem)); }
.toast { background: var(--raised); color: var(--ink); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent-ink); padding: .8rem 1rem; border-radius: var(--r-m); box-shadow: var(--shadow-pop); animation: enter var(--m-200) var(--ease-out); font-size: .93rem; }
.toast-error { border-left-color: var(--del); }

/* modal (native dialog) */
.modal { border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: 0; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: var(--shadow-pop); color: var(--ink); background: var(--raised); }
.modal-wide { width: min(720px, calc(100vw - 2rem)); }
.modal[open] { animation: enter var(--m-200) var(--ease-out); }
.modal::backdrop { background: var(--scrim); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1.25rem 1.5rem .5rem; }
.modal-head h2 { font-size: 1.25rem; margin: 0; }
.modal-body { padding: .5rem 1.5rem 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.credit-compare { display: flex; gap: 2rem; margin: 0 0 1rem; }
.credit-compare dt { font-size: .85rem; color: var(--ink-3); }
.credit-compare dd { margin: 0; font: 700 1.5rem/1.2 var(--display); }
.gate { border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.25rem; background: var(--canvas); }

/* ---------------------------------------------------------------- new review */
.dropzone { display: grid; justify-items: center; gap: .3rem; text-align: center; border: 1.5px dashed var(--field); border-radius: var(--r-l); padding: 2.75rem 1.25rem; background: var(--surface); transition: background-color var(--m-150) var(--ease-out), border-color var(--m-150) var(--ease-out); }
.dropzone p { margin: 0; }
.dropzone-over { border-color: var(--accent-ink); background: var(--accent-soft); }
.dropzone-parsing { border-style: solid; }
.dropzone-error { border-color: var(--del); }
.warning-note { margin-top: 1rem; font-size: .93rem; color: var(--ink-2); border-left: 3px solid var(--amber); padding-left: .9rem; }
.intake { display: grid; gap: .5rem; }
.file-card { display: flex; gap: .85rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1rem; margin-bottom: 1rem; }
.file-card p { margin: 0; }
.file-card .link-btn { margin-left: auto; }
.side-lock { border: 0; padding: 0; margin: 0 0 1.25rem; }
.side-lock legend { font-weight: 700; font-size: 1.05rem; margin-bottom: .5rem; padding: 0; }
.run-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: .8rem 1rem; margin-top: 1rem; box-shadow: var(--shadow-bar); }
.run-bar p { margin: 0; }

/* ---------------------------------------------------------------- review detail */
.review-head h1 { margin-bottom: .5rem; }
.review-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; color: var(--ink-2); font-size: .93rem; margin-bottom: 1.25rem; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs [role="tab"] { border: 0; background: none; font: 500 .98rem/1 var(--sans); color: var(--ink-2); padding: .85rem 1rem; min-height: 44px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent-ink); }
.tab-count { font-variant-numeric: tabular-nums; color: var(--ink-3); margin-left: .2rem; }
.output-label { font-size: .88rem; color: var(--ink-2); font-weight: 500; border-left: 3px solid var(--accent-ink); padding-left: .75rem; margin: .25rem 0 1.25rem; }
.review-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .review-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.flag-group { font-size: 1rem !important; margin: 1.25rem 0 .6rem; display: flex; gap: .5rem; }
.flag-group:first-child { margin-top: 0; }
.flag { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--r-m); padding: 1.1rem 1.2rem; margin-bottom: .9rem; transition: border-color var(--m-150) var(--ease-out); }
.flag.is-selected { border-color: var(--ink-3); box-shadow: 0 0 0 1px var(--ink-3); }
.flag.is-clash { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber); background: var(--amber-soft); }
.flag-clash { margin: .5rem 0; color: var(--amber); font-weight: 700; }
.flag-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.flag-head h3 { margin: 0; font-size: 1.05rem; }
.flag-title { border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; text-align: left; }
.flag-title:hover { text-decoration: underline; }
.flag-pos { font-size: .85rem; color: var(--ink-2); margin-left: auto; }
.quote { margin: 0 0 .85rem; }
.quote figcaption { font-size: .8rem; color: var(--ink-3); margin-bottom: .25rem; }
.quote blockquote { margin: 0; font: 400 .98rem/1.55 var(--serif); color: var(--ink); background: var(--canvas); border-radius: var(--r-s); padding: .65rem .8rem; }
.quote-missing { font-style: italic; color: var(--ink-3); }
.rule-cite { margin: 0 0 .3rem; font-size: .9rem; border: 1px solid var(--line); border-radius: var(--r-s); }
.rule-cite div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .6rem; padding: .45rem .7rem; border-bottom: 1px solid var(--line); }
.rule-cite div:last-child { border-bottom: 0; }
.rule-cite dt { color: var(--ink-3); font-weight: 500; }
.rule-cite dd { margin: 0; color: var(--ink-2); }
.rule-cite .is-hit { background: var(--canvas); }
.rule-cite .is-hit dt, .rule-cite .is-hit dd { color: var(--ink); font-weight: 700; }
.rule-id { font-size: .78rem; color: var(--ink-3); margin: 0 0 .7rem; }
.flag-why { color: var(--ink); }
.diff { border: 1px solid var(--line); border-radius: var(--r-s); padding: .65rem .8rem; font: 400 .98rem/1.6 var(--serif); margin-bottom: .75rem; }
.diff p { margin: 0; }
.diff-comment { font: 400 .85rem/1.5 var(--sans); color: var(--ink-2); margin-top: .4rem !important; }
.flag-foot { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--ink-3); margin: 0 0 .6rem; }
.decision { font-weight: 700; color: var(--ink-2); }
.decision-accepted, .decision-edited, .decision-exception_approved { color: var(--ins); }
.decision-rejected, .decision-exception_rejected { color: var(--ink-2); }
.decision-escalated { color: var(--missing); }
.flag-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.flag-actions .btn { min-height: 38px; padding: .4rem .85rem; font-size: .88rem; }
.doc-pane { position: sticky; top: 76px; max-height: calc(100vh - 170px); overflow-y: auto; border-radius: var(--r-m); }
.doc-pane-empty { background: var(--surface); border: 1px solid var(--line); padding: 1.25rem; color: var(--ink-2); }
.doc-paper { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-paper); padding: clamp(1.25rem, 3vw, 2.5rem); font: 400 .98rem/1.65 var(--serif); color: var(--ink); }
.doc-p { position: relative; padding: .15rem .5rem; margin: 0 -.5rem .5rem; border-radius: 4px; }
.doc-p p { margin: 0; }
.doc-p.has-flag { background: var(--tint); box-shadow: inset 2px 0 0 var(--line-strong); }
.doc-p.is-selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.doc-p del + ins, .diff del + ins, .tc-accepted { margin-left: .2em; }
.doc-insert { margin-top: .4rem !important; }
.doc-flag-btn { font: 500 .78rem/1.2 var(--sans); color: var(--ink-2); background: none; border: 0; padding: .2rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
.decision-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: .75rem 1rem; box-shadow: var(--shadow-bar); }
.decision-bar p { margin: 0; display: flex; gap: 1.25rem; font-variant-numeric: tabular-nums; }
.progress h2 { margin-bottom: 1rem; }
.stepper { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.stepper li { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: .6rem 0; color: var(--ink-3); }
.stepper-mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; background: var(--surface); }
.stepper .is-done { color: var(--ink-2); }
.stepper .is-done .stepper-mark { background: var(--ins); border-color: var(--ins); color: var(--surface); }
.stepper .is-current { color: var(--ink); font-weight: 700; }
.stepper .is-current .stepper-mark { border-color: var(--accent-ink); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 11px var(--accent-ink); }
.stepper li .btn { margin-left: auto; }
.blocked { border-left: 4px solid var(--del); }
.failed { border-left: 4px solid var(--amber); }
.matches h2 { color: var(--ins); }
.rules-checked { list-style: none; padding: 0; columns: 2 240px; }
.rules-checked li { display: flex; gap: .45rem; align-items: baseline; padding: .25rem 0; break-inside: avoid; }
.rules-checked .icon { color: var(--ins); }
.memo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(1.25rem, 3vw, 2.25rem); max-width: 820px; }
.memo-header { font-weight: 700; border-left: 3px solid var(--accent-ink); padding-left: .8rem; }
.memo-meta { font-size: .88rem; color: var(--ink-3); }
.memo h2 { font-size: 1.05rem; margin-top: 1.5rem; }
.export-counts { font-weight: 500; }
.kinds { border: 0; padding: 0; margin: 0 0 1rem; }
.kinds legend { font-weight: 700; margin-bottom: .4rem; padding: 0; }
.kind { display: flex; gap: .7rem; align-items: start; padding: .55rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.kind span { display: grid; }
.kind .muted { font-size: .88rem; }
.export-warning { background: var(--canvas); border-radius: var(--r-s); padding: .8rem 1rem; font-size: .93rem; color: var(--ink-2); }
.downloads { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }

/* deal + playbook editor */
.next-move { font-weight: 700; color: var(--missing); }
.deal-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.rounds { list-style: none; padding: 0; margin: 0; }
.rounds li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.rounds p { margin: 0 0 .2rem; }
.rule-group { margin-bottom: .5rem; }
.rule { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: .5rem; }
.rule-head { display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; padding: .85rem 1rem; min-height: 52px; cursor: pointer; }
.rule-pref { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; font-size: .9rem; }
.rule-form { padding: 0 1rem 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---------------------------------------------------------------- theme toggle, plain pages */
.theme-toggle:hover { border-color: var(--accent-ink); }
.plain-page { max-width: 560px; margin: 15vh auto; padding: 0 24px; display: grid; gap: 16px; }
::selection { background: var(--accent); color: var(--on-accent); }
/* narrow screens: room for the 44px theme toggle in both headers */
@media (max-width: 420px) { .site-header .wordmark span { display: none; } .site-nav { gap: .6rem; } }
@media (max-width: 560px) { .topbar { flex-wrap: wrap; gap: .25rem .6rem; padding: .5rem .75rem; } .topbar-right { gap: .4rem; } }

/* ---------------------------------------------------------------- motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .skeleton-row { animation: none; }
}
@media (forced-colors: active) {
  .sev, .side-badge, .btn, .flag { border: 1px solid CanvasText; }
  .tc-del::after { background: CanvasText; }
}

/* See how it works (DemoVideo.tsx): silent loop over a lazy poster; full demo in the house modal. Fixed 16:9 box, no CLS. */
.demo-frame { position: relative; aspect-ratio: 16 / 9; max-width: 1120px; margin: 2rem auto 0; border-radius: var(--r-l); overflow: hidden; background: #000; border: 1px solid var(--line-strong); box-shadow: 0 0 0 1px var(--accent-soft), 0 24px 80px -24px rgba(0, 240, 255, .28); }
.demo-poster, .demo-poster img, .demo-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-loop { opacity: 0; transition: opacity var(--m-200) var(--ease-out); }
.demo-frame.is-playing .demo-loop { opacity: 1; }
.demo-toggle { position: absolute; right: .9rem; bottom: .9rem; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .72); color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.demo-toggle:hover { background: rgba(0, 0, 0, .88); }
.demo-toggle:focus-visible { outline: 2px solid #00f0ff; outline-offset: 2px; }
.demo-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; margin-top: 1.75rem; }
.demo h2, .demo .section-lede { text-align: center; margin-inline: auto; }
.modal:has(.demo-full) { width: min(1100px, calc(100vw - 2rem)); }
.demo-full { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-m); }
@media (prefers-reduced-motion: reduce) {
  .demo-loop { transition: none; }
  .demo-toggle { right: 50%; bottom: 50%; transform: translate(50%, 50%); padding: .8rem 1.4rem; font-size: 1rem; }
  .demo-frame.is-playing .demo-toggle { right: .9rem; bottom: .9rem; transform: none; padding: .5rem 1rem; font-size: .9rem; }
}
/* Key dates, Ask, Compare rounds (src/client/Insights.tsx) */
.insight { max-width: 72ch; }
.insight h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.kd-list, .answers, .cmp-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .9rem; }
.kd-list > li, .answers > li, .cmp-list > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: .9rem 1rem; }
.kd-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; margin: 0 0 .25rem; }
.kd-kind, .cmp-tag { font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.cmp-tag { margin: 0 0 .3rem; }
.cite { margin: .5rem 0 0; padding: .45rem .75rem; border-left: 3px solid var(--line-strong); color: var(--ink-2); font: 400 .93rem/1.55 var(--serif); }
.cite-ref { font: 600 .8rem/1 var(--sans); color: var(--ink-2); }
.answer-q { margin: 0 0 .35rem; }
.cmp-pick { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: .75rem 0; }
.cmp-pick .field { min-width: 10rem; margin: 0; }
.cmp-out p { overflow-wrap: anywhere; }
.cmp-list > li p:last-child { margin: 0; font: 400 .95rem/1.6 var(--serif); }
.cmp-list > .cmp-added { border-left: 3px solid var(--ins); }
.cmp-list > .cmp-removed { border-left: 3px solid var(--del); }
.steps-plain li::before { content: none; }

/* ================================================================ braivex.com parity: marketing pages (.mk)
   Values from braivex-theme/Braivex-theme/assets/braivex.css and layout/theme.liquid (Dawn base: html 62.5%, body
   1.5rem under 750px and 1.6rem above, line height 1.8, letter spacing .06rem, foreground at 75%), checked with
   getComputedStyle on braivex.com (23 Nov 2026). braivex.com rem values are x10 px; here they are written in px. */
.mk { font-size: 15px; line-height: 1.8; letter-spacing: .6px; color: var(--ink-body); }
@media (min-width: 750px) { .mk { font-size: 16px; } }
.mk h1, .mk h2, .mk h3 { color: var(--ink); }
.mk h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -.022em; }
.mk h3 { font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.mk .section { padding: 120px 0; }
@media (max-width: 989px) { .mk .section { padding: 88px 0; } }
@media (max-width: 749px) { .mk .section { padding: 72px 0; } }
.mk .section-lede, .mk .lede { font-size: 17px; line-height: 1.65; color: var(--ink-3); max-width: 60ch; }
.eyebrow { margin: 0 0 18px; font-size: 11px; font-weight: 600; line-height: 1.8; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.section-dark .eyebrow { color: #00f0ff; }

/* header and buttons (bvx-header, bvx-btn) */
.mk .site-header-row { min-height: 72px; }
.mk .site-nav > a:not(.btn) { font-size: 14.5px; font-weight: 500; letter-spacing: 0; }
.mk .btn { font-weight: 600; letter-spacing: .6px; }
.mk .btn-lg { min-height: 50px; padding: 0 30px; font-size: 15px; }
.mk .btn-primary { box-shadow: 0 8px 30px rgba(0, 240, 255, .2); transition: transform var(--m-300) var(--ease-out), box-shadow var(--m-300) var(--ease-out), background-color var(--m-150) var(--ease-out); }
.mk .btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0, 240, 255, .34); }
.mk .btn-secondary { transition: transform var(--m-300) var(--ease-out), border-color var(--m-300) var(--ease-out), background-color var(--m-300) var(--ease-out); }
.mk .btn-secondary:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--ink-3); }

/* footer (bvx-footer) */
.mk .site-footer { background: var(--canvas); border-top: 1px solid var(--line-soft); padding: 96px 0 40px; font-size: 15px; }
.mk .site-footer h2 { font-size: 11px; font-weight: 600; line-height: 1.8; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-4); margin: 0 0 20px; }
.mk .site-footer li a { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 0; color: var(--ink-2); }
.mk .site-footer li a:hover { color: var(--accent-ink); text-decoration: none; }
.footer-statement { margin: 0 0 14px; font-size: clamp(24px, 2.8vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); max-width: 22ch; text-wrap: balance; }
@media (max-width: 749px) { .mk .site-footer { padding: 64px 0 36px; } }

/* page hero (bvx-pagehero): guides index and each guide */
.pagehero { position: relative; padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line-soft); overflow: clip; }
.pagehero::before { content: ""; position: absolute; inset: -40% 30% auto; height: 420px; background: radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, .14), transparent 70%); pointer-events: none; }
.pagehero .wrap { position: relative; }
.pagehero-h1 { margin: 0; font-size: clamp(36px, 5.4vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; max-width: 22ch; }
.pagehero-lede { margin: 22px 0 0; max-width: 60ch; font-size: 18px; line-height: 1.65; color: var(--ink-3); }
.mk .crumbs { font-size: 13px; color: var(--ink-3); margin: 0 0 22px; }

/* home hero: copy, the 3D desk, then four facts */
.mk .hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 0; overflow: clip; }
.mk .hero::before { content: ""; position: absolute; inset: -30% 10% auto 40%; height: 520px; background: radial-gradient(ellipse at 50% 30%, rgba(0, 240, 255, .12), transparent 70%); pointer-events: none; }
.mk .hero .wrap { position: relative; }
.mk .hero h1 { font-size: clamp(40px, 5.4vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; max-width: 13ch; }
.mk .hero .lede { font-size: 18px; max-width: 44ch; }
.mk .hero-fine { font-size: 14px; color: var(--ink-3); }
.scene-stage { position: relative; aspect-ratio: 10 / 7; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 50% 44%, rgba(0, 240, 255, .09), transparent 62%), var(--night); }
.scene-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline: none; }
.scene-canvas:focus-visible { box-shadow: inset 0 0 0 2px #00f0ff; }
.scene-readout { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; margin: 14px 0 12px; font-size: 13px; line-height: 1.6; color: var(--ink-3); text-align: center; }
.scene-readout span { flex: 1 0 100%; }
.scene-readout b { font-weight: 600; color: var(--ink); }
.scene-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.scene-tab, .scene-pause { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 600 14px/1 var(--sans); letter-spacing: .14px; cursor: pointer; transition: color var(--m-200) var(--ease-out), border-color var(--m-200) var(--ease-out), background-color var(--m-200) var(--ease-out); }
.scene-tab:hover, .scene-pause:hover { color: var(--ink); border-color: var(--line-strong); }
.scene-tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.scene-pause[aria-pressed="true"] { color: var(--ink); border-color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .scene-pause { display: none; } }
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 32px; margin-top: clamp(56px, 7vw, 96px); margin-bottom: 0; }
.proof > div { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.proof dt { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-4); }
.proof dd { margin: 6px 0 0; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }

/* how it works: a numbered stepper whose spine charges as it scrolls into view, beside the live redline demo */
.how-grid { display: grid; gap: clamp(40px, 5vw, 72px); }
@media (min-width: 1080px) { .how-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } .how-copy { position: sticky; top: 104px; } }
.how-try { margin: 0 0 10px; font-size: 13px; color: var(--ink-3); }
.how-steps { list-style: none; margin: 40px 0 0; padding: 0; position: relative; display: grid; gap: 28px; }
.how-steps::before, .how-steps::after { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.how-steps::after { background: linear-gradient(180deg, var(--accent-2), var(--accent)); transform-origin: top; }
.step { position: relative; padding-left: 56px; }
.step-no { position: absolute; left: 0; top: -4px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--accent-edge); background: var(--canvas); color: var(--accent-ink); font: 700 14px/1 var(--sans); }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--ink-3); font-size: 15px; line-height: 1.65; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .how-steps::after { animation: pw-charge linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
    .step-no { animation: pw-light linear both; animation-timeline: view(); animation-range: entry 60% entry 100%; }
  }
}
@keyframes pw-charge { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pw-light { from { background: var(--canvas); color: var(--accent-ink); } to { background: var(--accent); color: var(--on-accent); } }

/* after the review: a bento of hairline seams (bvx-grid), each cell carrying a sample of what it produces */
.bento { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.cell { display: flex; flex-direction: column; gap: 12px; padding: 34px 30px 30px; background: var(--canvas); }
.cell-tall { grid-row: span 2; }
.cell h3 { margin: 0; }
.cell > p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-3); }
.peek { margin: auto 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); font: 400 15px/1.6 var(--serif); letter-spacing: 0; color: var(--ink); }
.peek-dates > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.peek-dates > div:first-child { border-top: 0; }
.peek dt { font: 600 12px/1.6 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.peek dd { margin: 0; }
.peek-qa b { display: block; font: 600 15px/1.5 var(--sans); margin-bottom: 4px; }
.peek-qa span { display: block; margin-top: 6px; font: 600 12px/1.5 var(--sans); color: var(--accent-ink); }
.mk .cell > .peek-note { margin: 0; font-size: 12px; }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr; } .cell-tall { grid-row: auto; } .cell { padding: 28px 22px; } }
.mk .intake-grid { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mk .intake-card { border: 0; border-radius: 0; }

/* pricing: the credit calculator above the plans; the recommended plan carries a cyan edge (CXL highlight study) */
.calc { display: grid; gap: 20px 48px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); align-items: end; margin: 32px 0; padding: 24px 0 28px; border-block: 1px solid var(--line); }
.calc-inputs { display: grid; gap: 14px; }
.calc-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.calc-field output { font: 700 18px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-field input { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent-edge); }
.calc-result { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.calc-result strong { color: var(--ink); }
.calc-big { display: block; margin-bottom: 6px; font: 800 48px/1 var(--sans); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mk .plan-featured { box-shadow: inset 0 2px 0 var(--accent), inset 0 0 0 1px var(--accent-edge); }

/* guides index: topic chips and hairline rows (bvx-topics, bvx-row) */
.mk .list-section { padding-top: clamp(48px, 6vw, 80px); }
.topics { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 48px; }
.topic { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font: 600 14px/1 var(--sans); letter-spacing: .14px; color: var(--ink-2); cursor: pointer; transition: color var(--m-200) var(--ease-out), border-color var(--m-200) var(--ease-out), background-color var(--m-200) var(--ease-out); }
.topic:hover { color: var(--ink); border-color: var(--line-strong); }
.topic[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.topics-count { margin: 0 0 18px; font-size: 15px; color: var(--ink-3); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 24px; align-items: baseline; padding: 28px 4px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; transition: background-color var(--m-300) var(--ease-out); }
.row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); text-decoration: none; }
.row-date { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); white-space: nowrap; }
.row-topic { display: block; margin-top: 8px; font-weight: 600; letter-spacing: .01em; text-transform: none; color: var(--ink-3); }
.row-title { font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; line-height: 1.4; letter-spacing: -.01em; transition: color var(--m-200) var(--ease-out); }
.row:hover .row-title, .row:focus-visible .row-title { color: var(--accent-ink); }
.row-arrow { justify-self: end; color: var(--ink-4); transition: transform var(--m-300) var(--ease-out), color var(--m-300) var(--ease-out); }
.row:hover .row-arrow, .row:focus-visible .row-arrow { transform: translateX(6px); color: var(--accent-ink); }
.insights-all { margin-top: 40px; }
@media (max-width: 749px) {
  .row { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px 16px; padding: 22px 2px; }
  .row-date { grid-column: 1 / -1; white-space: normal; }
  .row-topic { display: inline-block; margin: 0 0 0 12px; }
}

/* a guide: answer box first (GEO), 72ch prose, sticky rail with progress and outline, related guides (bvx-article) */
.guide-meta { margin: 22px 0 0; font-size: 14px; color: var(--ink-3); max-width: 72ch; }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: start; padding-block: clamp(48px, 6vw, 80px); }
@media (min-width: 1080px) { .guide-grid { grid-template-columns: minmax(0, 1fr) 248px; gap: 72px; } .guide-toc { display: none; } }
.guide-main { max-width: 72ch; min-width: 0; }
.answer-box { margin: 0 0 32px; padding: 20px 24px; border-left: 2px solid var(--accent-edge); background: var(--surface); font-size: 18px; line-height: 1.6; color: var(--ink); }
.keypoints, .guide-toc { margin: 0 0 32px; padding: 20px 0 8px; border-top: 1px solid var(--line); }
.mk .keypoints h2 { font-size: 11px; font-weight: 600; line-height: 1.8; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); margin: 0 0 10px; }
.keypoints ul { margin: 0; padding-left: 1.1em; }
.keypoints li { color: var(--ink-2); margin: 6px 0; }
.mk .prose { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.mk .prose h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.02em; margin: 56px 0 18px; }
.mk .prose h3 { font-size: 20px; margin: 40px 0 14px; }
.mk .prose p, .mk .prose li { color: var(--ink-2); max-width: none; }
.mk .prose p { margin: 0 0 20px; }
.mk .prose strong { color: var(--ink); font-weight: 600; }
.mk .prose ul { margin: 0 0 24px; padding: 0; list-style: none; }
.mk .prose ul > li { position: relative; padding-left: 22px; margin-bottom: 12px; }
.mk .prose ul > li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-edge); }
.inline-cta { margin: 48px 0; padding: 28px 30px; border: 1px solid var(--line); border-left: 2px solid var(--accent-edge); background: var(--surface); }
.mk .inline-cta h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.01em; }
.inline-cta p { margin: 0 0 18px; color: var(--ink-2); }
.guide .faq { margin-top: 56px; }
.mk .faq h2 { font-size: clamp(24px, 2.6vw, 32px); }
.rail { display: none; height: 100%; }
@media (min-width: 1080px) { .rail { display: block; } }
.rail-inner { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; padding: 22px 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); }
.rail-meter { display: flex; align-items: center; gap: 12px; }
.rail-ring { width: 44px; height: 44px; flex: none; transform: rotate(-90deg); }
.rail-track, .rail-fill { fill: none; stroke-width: 2.5; }
.rail-track { stroke: var(--line); }
.rail-fill { stroke: var(--accent-edge); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: calc(119.4 - 119.4 * var(--read, 0)); transition: stroke-dashoffset var(--m-200) linear; }
.rail-meta { margin: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.rail-pct { font-size: 15px; font-weight: 700; color: var(--ink); }
.rail-time { font-size: 12px; color: var(--ink-3); }
.rail-label { margin: 20px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); }
.guide-toc .rail-label { margin-top: 0; }
.rail-nav ol, .guide-toc ol { list-style: none; margin: 0; padding: 0; }
.rail-node { display: flex; align-items: flex-start; gap: 12px; min-height: 36px; padding: 6px 0; font-size: 13px; line-height: 1.4; letter-spacing: .2px; color: var(--ink-3); text-decoration: none; transition: color var(--m-200) var(--ease-out); }
.guide-toc .rail-node { font-size: 15px; }
.rail-dot { flex: none; width: 9px; height: 9px; margin-top: .4em; border-radius: 50%; border: 1px solid var(--ink-4); background: var(--surface); transition: background-color var(--m-200) var(--ease-out), border-color var(--m-200) var(--ease-out); }
.rail-node:hover { color: var(--ink-2); text-decoration: none; }
.rail-node:hover .rail-dot { border-color: var(--accent-ink); }
.rail-node.is-read .rail-dot { background: var(--accent-2); border-color: var(--accent-2); }
.rail-node.is-active { color: var(--ink); }
.rail-node.is-active .rail-dot { background: var(--accent); border-color: var(--accent-edge); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.rail-cta { width: 100%; margin-top: 18px; }
.read-bar { position: fixed; left: 0; top: 73px; z-index: 39; width: 100%; height: 2px; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--accent-2), var(--accent)); pointer-events: none; }
@media (min-width: 1080px) { .read-bar { display: none; } }
.mk .more { padding-top: 0; }
.more-h { margin: 0 0 32px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.mk h2.more-h { font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.related-item { position: relative; padding: 30px 32px 36px 0; }
.related-item + .related-item { padding-left: 32px; border-left: 1px solid var(--line-soft); }
.related-item::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform var(--m-300) var(--ease-out); }
.related-item:hover::before, .related-item:focus-within::before { transform: scaleX(1); }
.related-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.related-topic { color: var(--accent-ink); font-weight: 600; letter-spacing: .01em; text-transform: none; }
.mk .related-title { margin: 0 0 12px; font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; line-height: 1.35; }
.related-link { color: var(--ink); text-decoration: none; transition: color var(--m-200) var(--ease-out); }
.related-link::after { content: ""; position: absolute; inset: 0; }
.related-item:hover .related-link { color: var(--accent-ink); }
.related-link:focus-visible { outline: none; }
.related-item:has(.related-link:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
.related-excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more-all { margin: 28px 0 0; }
@media (max-width: 989px) {
  .related { grid-template-columns: 1fr; }
  .related-item, .related-item + .related-item { padding: 26px 0 28px; border-left: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .mk .btn-primary:hover:not(:disabled), .mk .btn-secondary:hover:not(:disabled), .row:hover .row-arrow, .row:focus-visible .row-arrow { transform: none; }
  .related-item::before { transition: none; }
}
/* guide pages hydrate only the header, so it sits in a wrapper div; display: contents lets it stick to the page */
#site-header { display: contents; }
