/* ============================================================================
   THE BRIEFING — design language of the Intel Platform
   ----------------------------------------------------------------------------
   A premium-research-document aesthetic: warm paper, dark ink, seal-red
   accents, hairline rules, masthead typography. Every value flows from the
   token layers below (primitives → semantics → components). Change tokens,
   not component rules.

   1. Fonts (self-hosted: Satoshi + JetBrains Mono)
   2. Token layer I — color primitives
   3. Token layer II — semantic aliases
   4. Token layer III — type, space, layout, line, elevation
   5. Base & reset
   6. Masthead & colophon
   7. Typography components (kicker, page-head, headings, rules)
   8. Buttons & links
   9. Panels (document cards)
   10. Notices (alerts / scan results)
   11. Badges (status chips)
   12. Forms
   13. Tables
   14. Lists & meta
   15. Report body (rendered markdown document)
   16. Hero (public cover page)
   17. Utilities
   ========================================================================== */

/* 1. FONTS — self-hosted, no third-party requests ------------------------- */

@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Italic400.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* 2. TOKEN LAYER I — color primitives ------------------------------------ */
:root {
  /* paper (warm document stock) */
  --paper-0: #f6f3eb;      /* page                */
  --paper-1: #fdfbf5;      /* panels, raised      */
  --paper-2: #eee9dc;      /* wells, code, sunken */

  /* ink scale (warm near-black → faint) */
  --ink-90: #1c1712;       /* primary text        */
  --ink-70: #5c5443;       /* secondary text      */
  --ink-50: #6e6555;       /* captions, muted (AA: 4.74+ on paper-2) */
  --ink-30: #c7bfae;       /* hairlines on paper  */

  /* seal red (accent — the briefing's wax seal) */
  --red-70: #671e16;       /* hover / deep        */
  --red-50: #8e2c21;       /* standard accent     */

  /* archival green (confirmations) */
  --green-60: #2e6b45;

  /* severity semantics - each text color is AA-verified (>= 4.5:1) on
     paper-0, paper-1, paper-2, and its own badge tint */
  --sev-critical: #9a2318;     --sev-critical-bg: #f9ebe8;
  --sev-high: #92400e;         --sev-high-bg: #f8eede;
  --sev-moderate: #52606d;      --sev-moderate-bg: #e9ebee;
  --sev-low: #566068;          --sev-low-bg: #eceae6;
  --sev-observation: #615b4e;  --sev-observation-bg: #eeeae2;

  /* rules */
  --rule-10: #dad4c6;      /* hairline            */
  --rule-90: #1c1712;     /* strong (masthead)   */
}

/* 3. TOKEN LAYER II — semantic aliases ----------------------------------- */
:root {
  --bg: var(--paper-0);
  --bg-raised: var(--paper-1);
  --bg-sunken: var(--paper-2);
  --text: var(--ink-90);
  --text-muted: var(--ink-50);
  --muted: var(--ink-50);
  --primary: var(--ink-90);
  --accent: var(--red-50);
  --accent-deep: var(--red-70);
  --positive: var(--green-60);
  --negative: var(--red-50);
  --rule: var(--rule-10);
  --rule-strong: var(--rule-90);
  --focus-ring: var(--red-50);
}

/* 4. TOKEN LAYER III — type, space, layout, line, elevation -------------- */
:root {
  --font-sans: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* type scale (major-third-ish, document-tuned) */
  --text-display: 2.75rem;   /* 44 — landing cover         */
  --text-h1: 1.875rem;       /* 30 — page title            */
  --text-h2: 1.25rem;        /* 20 — section head          */
  --text-h3: 1.0625rem;      /* 17 — sub-section           */
  --text-body: 1rem;         /* 16                         */
  --text-small: 0.875rem;    /* 14                         */
  --text-micro: 0.6875rem;   /* 11 — kickers, badges       */

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-body: 1.6;
  --leading-loose: 1.75;

  --tracking-micro: 0.14em;  /* kickers & badges           */

  /* space scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* line */
  --hairline: 1px solid var(--rule);
  --line-accent: 3px solid var(--accent);

  /* layout */
  --container: 64rem;        /* 1024px measure for app pages  */
  --measure: 42rem;          /* 672px comfortable reading      */
  --narrow: 26rem;           /* 416px auth / single-input      */

  /* elevation — a document never floats; the faintest offset only */
  --shadow-panel: 0 1px 0 rgba(28, 23, 18, 0.04), 0 1px 2px rgba(28, 23, 18, 0.05);

  --radius: 0;               /* sharp corners: printed matter  */
}

/* 5. BASE & RESET -------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* seal-red band across the very top of the page */
body::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--text);
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--accent); }

pre {
  background: var(--bg-sunken);
  border: var(--hairline);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  line-height: var(--leading-body);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 var(--space-4);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-sunken);
  border: 1px solid var(--rule);
  padding: 0.05em 0.35em;
}

pre code { border: none; background: none; padding: 0; }

hr {
  border: none;
  border-top: var(--hairline);
  margin: var(--space-5) 0;
}

::selection { background: var(--accent); color: var(--paper-1); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 6. MASTHEAD & COLOPHON ------------------------------------------------ */
.masthead {
  border-bottom: 3px solid var(--rule-strong);
  background: var(--bg);
  position: relative;
}
/* second hairline under the masthead's heavy rule — the document signature */
.masthead::after {
  content: "";
  display: block;
  border-top: var(--hairline);
  margin-top: 2px;
}

.masthead-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.masthead-brand {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
.masthead-brand .mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.masthead-brand .edition {
  font-size: var(--text-micro);
  color: var(--text-muted);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  font-weight: 500;
}

.masthead-nav { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.masthead-nav a {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  text-decoration: none;
  color: var(--ink-70);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.masthead-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* legacy alias — old templates may still emit .navbar/.brand */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-4) var(--space-5);
  border-bottom: 3px solid var(--rule-strong);
}
.navbar a { text-decoration: none; }
.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.colophon {
  border-top: 3px solid var(--rule-strong);
  background: var(--bg);
  margin-top: var(--space-8);
}
.colophon-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-5);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-6);
  font-size: var(--text-small);
}

/* 7. TYPOGRAPHY COMPONENTS ---------------------------------------------- */

/* kicker — the mono eyebrow above a heading */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--accent);
  margin: 0 0 var(--space-2);
}
.kicker--ink { color: var(--ink-70); }

.page-head { margin-bottom: var(--space-6); }
.page-head h1 { margin-bottom: 0; }
.page-head .kicker { margin-bottom: var(--space-2); }
.page-head .dek {
  color: var(--ink-70);
  max-width: var(--measure);
  margin-top: var(--space-3);
  margin-bottom: 0;
}

/* section head — heading with a hairline beneath, like a briefing column */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  border-bottom: 2px solid var(--rule-strong);
  padding-bottom: var(--space-2);
  margin: var(--space-6) 0 var(--space-4);
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .section-aside {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.container {
  max-width: var(--container);
  margin: var(--space-6) auto;
  padding: 0 var(--space-5);
}
.container--wide { max-width: 100%; }

/* 8. BUTTONS & LINKS ----------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: var(--primary);
  color: var(--paper-1);
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.4;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-deep); color: var(--paper-1); text-decoration: none; }
.btn:active { transform: scale(0.98); }

/* ghost variant — hairline outline for secondary actions */
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--ink-70);
}
.btn--ghost:hover { background: var(--bg-sunken); color: var(--text); }

/* danger variant — for destructive posts */
.btn--danger { background: var(--negative); }
.btn--danger:hover { background: var(--accent-deep); }

.btn--full { width: 100%; text-align: center; }

.actions { display: flex; gap: var(--space-2); margin: var(--space-4) 0; flex-wrap: wrap; }
.actions .btn { margin-right: var(--space-2); }

/* inline destructive link rendered as a button */
.link-button {
  background: none;
  border: none;
  color: var(--negative);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding: 0;
  font: inherit;
  font-size: inherit;
}
.link-button:hover { color: var(--accent-deep); }

/* 9. PANELS -------------------------------------------------------------- */
.card {
  background: var(--bg-raised);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-panel);
}
.card > :first-child { margin-top: 0; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }

.panel {
  background: var(--bg-raised);
  border: var(--hairline);
  border-radius: var(--radius);
  margin: var(--space-4) 0;
  box-shadow: var(--shadow-panel);
}
.panel-head {
  border-bottom: var(--hairline);
  padding: var(--space-3) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.panel-head h2, .panel-head h3 { margin: 0; font-size: var(--text-h3); }
.panel-body { padding: var(--space-5); }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }

.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }

/* 10. NOTICES ------------------------------------------------------------ */
.notice {
  background: var(--bg-raised);
  border: var(--hairline);
  border-left: var(--line-accent);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
  font-size: var(--text-small);
}
.notice--error { border-left-color: var(--negative); }
.notice--success {
  border-left-color: var(--positive);
  color: var(--positive);
}
.notice p { margin: 0 0 var(--space-2); }
.notice p:last-child { margin-bottom: 0; }
.notice .notice-title {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--negative);
  margin-bottom: var(--space-2);
}
.notice--success .notice-title { color: var(--positive); }

.error { color: var(--negative); font-size: var(--text-small); }

/* 11. BADGES ------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  padding: 0.1em 0.45em;
  vertical-align: middle;
  white-space: nowrap;
}
.badge--accent { color: var(--accent); }
.badge--positive { color: var(--positive); }
.badge--quiet { color: var(--ink-50); border-color: var(--rule); }
.badge--sev-critical { color: var(--sev-critical); background: var(--sev-critical-bg); }
.badge--sev-high { color: var(--sev-high); background: var(--sev-high-bg); }
.badge--sev-moderate { color: var(--sev-moderate); background: var(--sev-moderate-bg); }
.badge--sev-low { color: var(--sev-low); background: var(--sev-low-bg); }
.badge--sev-observation { color: var(--sev-observation); background: var(--sev-observation-bg); }
.badge--solid {
  background: var(--ink-90);
  color: var(--paper-1);
  border-color: var(--ink-90);
}

/* 12. FORMS -------------------------------------------------------------- */
.form label { display: block; margin: 0 0 var(--space-4); }

.form label > input,
.form label > select,
.form label > textarea,
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="url"],
.form input[type="number"],
.form input[type="time"],
.form input[type="date"],
.form input[type="color"],
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-2);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--ink-30);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form input[type="color"] { padding: 0.2rem; height: 2.5rem; cursor: pointer; }

.form .checkbox,
.form label.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  font-size: var(--text-small);
}
.form .checkbox input,
.form label.checkbox input { width: auto; margin-top: 0; accent-color: var(--accent); }

.form select[multiple] { min-height: 7rem; }

.form button[type="submit"] { margin-top: var(--space-4); }

/* form sections read as numbered briefing divisions */
.form h2 {
  font-size: var(--text-small);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--ink-70);
  border-bottom: var(--hairline);
  padding-bottom: var(--space-2);
  margin: var(--space-6) 0 var(--space-4);
}
.form h2:first-child { margin-top: 0; }

.hint {
  color: var(--text-muted);
  font-size: var(--text-small);
  margin: var(--space-2) 0 var(--space-4);
}

/* 13. TABLES ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { margin-bottom: 0; }

.table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--rule-strong);
  font-size: var(--text-small);
}
.table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--text-muted);
  padding: 0 0 var(--space-2);
}
.table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-70);
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: var(--hairline);
}
.table td {
  padding: var(--space-3);
  border-bottom: var(--hairline);
  vertical-align: top;
}
.table tr:last-child td { border-bottom: none; }
.table .mono { font-family: var(--font-mono); font-size: 0.8125rem; }

/* 14. LISTS & META -------------------------------------------------------- */
.plain-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.plain-list li {
  padding: var(--space-3) 0;
  border-bottom: var(--hairline);
}
.plain-list li:last-child { border-bottom: none; }
.plain-list small { color: var(--ink-70); display: block; margin-top: var(--space-1); }
.plain-list .row-actions { font-size: var(--text-small); margin-top: var(--space-1); }

.meta-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; font-size: var(--text-small); }
.meta-list li { padding: var(--space-2) 0; border-bottom: var(--hairline); display: flex; gap: var(--space-3); }
.meta-list li:last-child { border-bottom: none; }
.meta-list .meta-key {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  min-width: 9rem;
  flex-shrink: 0;
  padding-top: 0.15em;
}
.meta-list .meta-val { flex: 1; overflow-wrap: anywhere; }

.disclaimer {
  font-size: var(--text-small);
  color: var(--ink-70);
  border-top: var(--hairline);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }

/* 15. REPORT BODY — the briefing itself ----------------------------------- */
.report-body {
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: var(--leading-loose);
}
.report-body h1, .report-body h2, .report-body h3 {
  border-top: var(--hairline);
  padding-top: var(--space-4);
  margin-top: var(--space-6);
}
.report-body h1:first-child, .report-body h2:first-child, .report-body h3:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.report-body h1 { font-size: 1.5rem; }
.report-body h2 { font-size: 1.25rem; }
.report-body h3 { font-size: 1.0625rem; border-top: none; padding-top: 0; }
.report-body p { margin: 0 0 var(--space-4); }
.report-body ul, .report-body ol { padding-left: 1.4rem; margin: 0 0 var(--space-4); }
.report-body li { margin-bottom: var(--space-2); }
.report-body blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--accent);
  color: var(--ink-70);
}
.report-body code { font-size: 0.85em; }
.report-body table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; font-size: var(--text-small); }
.report-body th, .report-body td { border: var(--hairline); padding: var(--space-2) var(--space-3); text-align: left; }

.report-meta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: var(--space-2) 0 var(--space-4);
}

/* 16. HERO — the public cover -------------------------------------------- */
.hero {
  padding: var(--space-8) var(--space-5);
  max-width: var(--container);
  margin: 0 auto;
}
.hero .kicker { font-size: 0.75rem; }
.hero h1 {
  font-size: var(--text-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
}
.hero .dek {
  font-size: 1.25rem;
  line-height: var(--leading-snug);
  color: var(--ink-70);
  max-width: var(--measure);
  margin: 0 0 var(--space-6);
}
.hero .cta { display: flex; gap: var(--space-3); }

/* 17. UTILITIES ----------------------------------------------------------- */
.mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.inline-delete { display: inline; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: var(--space-4); }

/* 18. LANDING — public vertical x market pages (Wave E2) ------------------- */

.landing {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}
.landing .hero { max-width: none; padding: 0; }
.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}
.landing-market-card {
  background: var(--bg-raised);
  border: var(--hairline);
  padding: var(--space-5);
}
.landing-market-name {
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.landing-market-metro,
.landing-stat-caption,
.landing-market-price {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: var(--space-2) 0 0;
}
.landing-stat { border-top: var(--hairline); margin-top: var(--space-4); padding-top: var(--space-4); }
.landing-stat-value { margin: 0; font-size: 1.0625rem; line-height: 1.5; }
.landing-stat-caption { margin-top: var(--space-1); }
.landing-market-price { border-top: var(--hairline); margin-top: var(--space-4); padding-top: var(--space-4); }

.landing-section { margin-top: var(--space-8); }
.landing-note { color: var(--ink-70); max-width: var(--measure); }
.landing-prices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin: 0 0 var(--space-4);
}
.landing-price-value {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}
.landing-price-term {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: var(--space-1) 0 0;
}
.landing-section .cta { margin-top: var(--space-4); display: flex; gap: var(--space-3); }

@media (max-width: 700px) {
  .landing-hero-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .landing-prices { gap: var(--space-4); }
  .landing-price-value { font-size: 1.75rem; }
}

/* RESPONSIVE ------------------------------------------------------------- */
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
  .masthead-inner { flex-direction: column; align-items: flex-start; }
  .meta-list li { flex-direction: column; gap: var(--space-1); }
  .meta-list .meta-key { min-width: 0; }
  .hero h1 { font-size: 2.125rem; }
  .container { margin: var(--space-4) auto; }
  /* wide markdown tables scroll within the report measure instead of
     breaking the page layout */
  .report-body table { display: block; max-width: 100%; overflow-x: auto; }
}

/* REDUCED MOTION --------------------------------------------------------- */
@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;
  }
}

/* 18. WAVE B - CLIENT BRIEFING ROOM (luxury customer tier) ----------------
   Everything in this section is scoped under .client-portal, the body class
   set only by templates/customer/* via the base.html body_class block.
   Admin surfaces inherit nothing from this layer and stay pixel-identical
   until Wave C.

   Porsche: strict grid, disciplined mono details, no decoration without
            function.
   Apple:   calm hierarchy, confident display type, generous whitespace.
   Rolls-Royce: fine hairlines, fit-and-finish, layered micro-elevation on
            the briefing hero ONLY. */

/* portal tokens: a larger, unhurried space scale for the customer tier */
.client-portal {
  --space-portal-top: 4rem;        /* 64px above the page                  */
  --space-portal-section: 3rem;    /* 48px between movements               */
  --text-portal-display: clamp(34px, 4.5vw, 46px);
  --shadow-hero: 0 1px 2px rgba(28, 23, 18, 0.05), 0 12px 32px rgba(28, 23, 18, 0.06);
}

/* pacing: the page opens low and slow */
.client-portal .container { margin-top: var(--space-portal-top); }
.client-portal .page-head { margin-bottom: var(--space-portal-section); }
.client-portal .section-head { margin-top: var(--space-portal-section); }
.client-portal .disclaimer { margin-top: var(--space-portal-section); }

/* the briefing hero: the report is the product; the one elevated surface */
.client-portal .briefing-hero {
  background: var(--bg-raised);
  border: var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hero);
  padding: var(--space-7) var(--space-6);
  margin: 0 0 var(--space-portal-section);
}
.client-portal .briefing-hero .kicker { margin-bottom: var(--space-4); }
.client-portal .briefing-hero__title {
  font-size: var(--text-portal-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
  overflow-wrap: anywhere;
}
.client-portal .briefing-hero__scope {
  color: var(--ink-70);
  font-size: var(--text-small);
  margin: 0 0 var(--space-5);
}
.client-portal .briefing-hero__actions {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.client-portal .briefing-hero__actions a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.15s ease;
}
.client-portal .briefing-hero__actions a:hover { color: var(--accent-deep); }

/* typeset date: the kicker's ISO stamp set in its own mono element */
.client-portal .briefing-hero__date { margin-left: var(--space-2); }

/* composed interior: content left, quiet document stamp right at >= 900px;
   below that the stamp reads as a closing line under the actions */
.client-portal .briefing-hero__main { min-width: 0; }
.client-portal .briefing-hero__stamp { margin-top: var(--space-5); text-align: left; }
.client-portal .briefing-hero__stamp-jurisdiction {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--ink-70);
  margin: 0 0 var(--space-2);
}
.client-portal .briefing-hero__stamp-for {
  font-size: var(--text-small);
  color: var(--text-muted);
  margin: 0;
}
@media (min-width: 900px) {
  .client-portal .briefing-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-7);
    align-items: end;
  }
  .client-portal .briefing-hero__stamp {
    margin-top: 0;
    padding-left: var(--space-6);
    border-left: var(--hairline);
    text-align: right;
  }
}

/* graceful absence: the hero holds its place with no elevation at all */
.client-portal .briefing-hero--empty {
  background: transparent;
  border: none;
  border-top: 3px solid var(--rule-strong);
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

/* quiet actions: mono micro links with a seal-red underline */
.client-portal .row-actions a,
.client-portal .section-aside a,
.client-portal .document-archive__actions a {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.15s ease;
}
.client-portal .row-actions a:hover,
.client-portal .section-aside a:hover,
.client-portal .document-archive__actions a:hover { color: var(--accent-deep); }

/* refined verticals: hairline-divided rows with generous padding */
.client-portal .plain-list { border-top: 2px solid var(--rule-strong); }
.client-portal .plain-list li { padding: var(--space-5) 0; }
.client-portal .plain-list strong { font-size: var(--text-h3); }
.client-portal .plain-list small { margin-top: var(--space-2); max-width: var(--measure); }
.client-portal .row-actions { display: block; margin-top: var(--space-2); }

/* premium archive: document rows on hairlines, one column each */
.client-portal .document-archive {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  border-top: 2px solid var(--rule-strong);
}
.client-portal .document-archive__row {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--rule-10);
}
.client-portal .document-archive__date { color: var(--ink-70); white-space: nowrap; }
.client-portal .document-archive__title {
  font-weight: 700;
  font-size: var(--text-h3);
  overflow-wrap: anywhere;
}
.client-portal .document-archive__row--empty { display: block; color: var(--ink-70); }

/* settings: the form reads as one calm document, hairline-divided */
.client-portal .card {
  background: transparent;
  border: none;
  border-top: 3px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: none;
  padding: var(--space-6) 0 0;
}
.client-portal .form h2 { margin: var(--space-portal-section) 0 var(--space-4); }
.client-portal .form input:focus,
.client-portal .form select:focus,
.client-portal .form textarea:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* wizard: room to write, mono discipline for the prompt text */
.client-portal .narrow { max-width: var(--measure); }
.client-portal .form textarea[name="prompt_text"],
.client-portal .form textarea[name="vertical_request"] {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: var(--leading-body);
}

/* portal responsive: explicit single column below 768px */
@media (max-width: 767px) {
  .client-portal .container { margin-top: var(--space-6); }
  .client-portal .page-head { margin-bottom: var(--space-5); }
  .client-portal .section-head { margin-top: var(--space-5); }
  .client-portal .disclaimer { margin-top: var(--space-5); }
  .client-portal .briefing-hero { padding: var(--space-5) var(--space-4); }
  .client-portal .briefing-hero--empty { padding-left: 0; padding-right: 0; }
  .client-portal .document-archive__row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .client-portal .document-archive__date { order: 2; color: var(--ink-70); }
  .client-portal .document-archive__actions { order: 3; }
}

/* portal motion: the only motion added is the 0.15s link color fade */
@media (prefers-reduced-motion: reduce) {
  .client-portal a { transition: none; }
}

/* 19. WAVE C - SETTINGS SIMPLIFICATION + MOBILE TAP TARGETS ---------------
   Everything here stays scoped under .client-portal. The collapsed
   Advanced delivery options block is a native <details> element (no JS). */
.client-portal .form details.advanced-options {
  margin-top: var(--space-portal-section);
}
.client-portal .form details.advanced-options summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}
.client-portal .form details.advanced-options summary:hover {
  color: var(--accent-deep);
}
.client-portal .form details.advanced-options[open] summary {
  margin-bottom: var(--space-4);
}
.client-portal .form details.advanced-options h3 {
  margin: var(--space-portal-section) 0 var(--space-4);
}

/* mobile tap targets: quiet-action links and the settings save button get
   at least 44px of tap height below 768px; desktop appearance unchanged */
@media (max-width: 767px) {
  .client-portal .briefing-hero__actions a,
  .client-portal .row-actions a,
  .client-portal .section-aside a,
  .client-portal .document-archive__actions a {
    display: inline-block;
    min-height: 44px;
    padding: 12px 0;
    box-sizing: border-box;
  }
  .client-portal .form button[type="submit"] {
    min-height: 44px;
  }
}