/* ============================================================
   SENTINEL — Display type layer  [NEW]
   site/assets/sentinel-display.css
   Adds Instrument Serif (homepage display face) to the dashboard
   as DISPLAY-ONLY: section leads, board headline, and the
   composite hero figure. Dense UI text stays Inter — never set
   body, rows, badges, or metadata in the serif.
   Load AFTER sentinel-tokens.css and the Google Fonts link.
   ============================================================ */

/* Section leads + board cycle title */
.surface-region h2,
.board-cycle h2,
.domain-card h3.is-lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: var(--ink);
}

/* Composite hero — the one dominant focal figure */
.hero-composite { display:flex; align-items:flex-end; gap: var(--space-6);
  padding: var(--space-8) var(--space-6); background: var(--panel);
  border:1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); margin-bottom: var(--space-6); }
.hero-composite__figure { font-family: var(--font-display); font-weight:400;
  font-size: var(--text-hero); line-height:0.9; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.hero-composite__dir { font-size: var(--text-sm); font-weight:600;
  display:inline-flex; align-items:center; gap:4px; padding:2px 8px;
  border-radius:999px; }
.hero-composite__dir--escalating    { color: var(--signal-escalating); background: color-mix(in srgb, var(--signal-escalating) 12%, transparent); }
.hero-composite__dir--stable        { color: var(--signal-stable);     background: color-mix(in srgb, var(--signal-stable) 12%, transparent); }
.hero-composite__dir--de-escalating { color: var(--signal-de-escalating); background: color-mix(in srgb, var(--signal-de-escalating) 12%, transparent); }
.hero-composite__label { color: var(--muted); font-size: var(--text-sm);
  text-transform: uppercase; letter-spacing: 0.08em; }
.hero-composite__vectors { display:flex; flex-wrap:wrap; gap: var(--space-2); margin-top: var(--space-2); }
.hero-vector-chip { font-size: var(--text-xs); color: var(--ink);
  background: var(--panel2); border:1px solid var(--line);
  border-radius:999px; padding:3px 10px; }

/* All numeric figures align */
.feed-row__l3, .domain-card, .kpi, .hero-composite { font-variant-numeric: tabular-nums; }

@media (max-width: 640px){
  .hero-composite { flex-direction:column; align-items:flex-start; gap:var(--space-3); padding: var(--space-6) var(--space-4); }
  .hero-composite__figure { font-size: 2.75rem; }
}

/* ============================================================
   Weekly render model layer (04 spec, adopted 2026-06-11)
   Zone A changed-strip · Zone B brief column · Zone C freshness.
   Freshness is the FOURTH grammar — change-state only, never
   severity/confidence/tier. Driven by changed_this_cycle from
   the assembler; the calendar never flips a dot.
   ============================================================ */

/* -- Zone A: what changed this cycle ------------------------- */
.changed-strip { margin-bottom: var(--space-6); }
.changed-strip h3 { font-size: var(--text-base); margin-bottom: var(--space-3); }
.changed-strip .feed-row { margin-bottom: var(--space-2); }
.tag-delta { border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.05em; padding: 1px 7px; }
.tag-delta--new { background: var(--accent-bg); color: var(--accent-text); border: 1px solid var(--accent-text); }
.tag-delta--upd { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }

/* Null cycle — never blank, never fabricated (Composer rule) */
.null-cycle { background: var(--panel); border: 1px dashed var(--line);
  border-radius: var(--radius-lg); color: var(--muted); font-size: var(--text-sm);
  line-height: 1.6; margin-bottom: var(--space-6); padding: var(--space-6); }

/* -- Zone C: freshness dots ----------------------------------- */
.fresh { font-size: var(--text-xs); white-space: nowrap; }
.fresh--updated  { color: var(--fresh-updated); }
.fresh--stable   { color: var(--fresh-stable); }
.fresh--archived { color: var(--fresh-archived); }

/* Asymmetric domain grid — highest-severity domain leads */
.domain-grid .domain-card.is-lead { grid-column: span 2; box-shadow: var(--shadow-md); }
@media (max-width: 640px) { .domain-grid .domain-card.is-lead { grid-column: span 1; } }

/* -- Zone B / Brief view: editorial reading column ------------- */
.brief-col { max-width: 68ch; margin: 0 auto; }
.brief-col .brief-head { margin-bottom: var(--space-4); }
.brief-col .brief-head h2 { font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-2xl); line-height: 1.15; }
.brief-col .brief-stamp { color: var(--muted); font-size: var(--text-sm);
  letter-spacing: 0.04em; margin-top: var(--space-1); text-transform: uppercase; }
.brief-body { font-size: 1.0625rem; line-height: 1.75; }
.brief-body p { margin-bottom: var(--space-4); }
.brief-body h3 { font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); margin: var(--space-6) 0 var(--space-3); }
/* Lede: slightly larger Inter, brighter ink. Deliberately NOT the display
   serif — Instrument Serif is a headline face; a 100+ word paragraph set in
   it reads as a wall of italicised text (smoke-tested 2026-06-11). */
.brief-body > p:first-of-type { font-size: 1.1875rem; line-height: 1.65;
  color: var(--ink); }

/* Source links: long URLs/titles must wrap, never widen the column
   (375px smoke 2026-06-11: .srcl pushed brief view to 500px) */
.srcrow { overflow-wrap: anywhere; }
/* drawer.css sets .srcl { white-space: nowrap } — a single long source link
   then defeats overflow-wrap and pushes 375px brief view to 500px.
   Allow chip-internal wrapping; max-width caps the chip at its container. */
.srcrow a, .srcl { overflow-wrap: anywhere; word-break: break-word; white-space: normal; max-width: 100%; }

/* Brief teaser on the board (Zone B pointer) */
.brief-teaser { background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius-md);
  margin-bottom: var(--space-6); padding: var(--space-4) var(--space-6); }
.brief-teaser p { color: var(--ink); font-family: var(--font-display);
  font-size: var(--text-lg); line-height: 1.5; }
.brief-teaser .open-brief { background: none; border: 0; color: var(--accent-text);
  cursor: pointer; font: inherit; font-family: var(--font-ui);
  font-size: var(--text-sm); margin-top: var(--space-2); padding: 0; }
.brief-teaser .open-brief:hover { text-decoration: underline; }

/* Archive — previous issues, readable below the current brief */
.brief-archive { border-top: 1px solid var(--line); margin-top: var(--space-8);
  padding-top: var(--space-6); }
.brief-archive h3 { color: var(--muted); font-size: var(--text-sm);
  letter-spacing: 0.06em; margin-bottom: var(--space-3); text-transform: uppercase; }
.brief-archive .arch-row { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-md); cursor: pointer; margin-bottom: var(--space-2);
  padding: var(--space-3) var(--space-4); }
.brief-archive .arch-row:hover { border-color: var(--accent-text); }
.brief-archive .arch-row .when { color: var(--muted); font-size: var(--text-xs); }

/* ════════════════════════════════════════════════════════════
   B8.1 — Warm-light workspace layout (operator rec, 2026-06-11)
   Command bar + two-column workspace + sticky standing rail.
   Full domain grid + jurisdiction strip remain BELOW, full-width
   (North Star losslessness — no data dropped from the surface).
   ════════════════════════════════════════════════════════════ */

/* Depth: panels carry the warm shadow; nav gets a soft drop */
.app-nav { box-shadow: var(--shadow-sm); }

/* Command bar — posture cell + KPI cells on a hairline grid */
.cmd { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px); overflow: hidden;
  box-shadow: var(--shadow-md); margin-bottom: var(--space-6); }
.cmd__cell { background: var(--panel); padding: var(--space-4) var(--space-4); }
.cmd__cell--posture { background:
  linear-gradient(135deg, var(--accent-bg), transparent 70%), var(--panel); }
.cmd .k { color: var(--muted); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; }
.cmd .v { color: var(--ink); font-family: var(--font-display);
  font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cmd .v--hot { color: var(--accent-text); }
.cmd .s { color: var(--muted); font-size: var(--text-xs); margin-top: 2px; }
.cmd__cell--posture .v { font-size: var(--text-lg); line-height: 1.3; }

/* Two-column workspace: work left, standing reference right */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px; align-items: start; margin-bottom: var(--space-8); }
.work__main { min-width: 0; }

/* Lead card — the single most significant change this cycle */
.lead { background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-4); }
.lead__kicker { color: var(--accent-text); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; }
.lead h3 { color: var(--ink); font-family: var(--font-display);
  font-size: var(--text-xl); font-weight: 400; line-height: 1.3;
  margin: var(--space-2) 0; }
.lead p { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.6; }

/* Standing-reference rail */
.rail-card { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-4); position: sticky; top: 16px; }
.rail-card h3 { color: var(--muted); font-size: var(--text-xs);
  letter-spacing: 0.08em; margin-bottom: var(--space-3);
  text-transform: uppercase; }
.rail-card + .rail-card { margin-top: var(--space-4); }
.rail-card .srow { display: flex; align-items: baseline; gap: 8px;
  justify-content: space-between; padding: 5px 0;
  border-bottom: 1px solid var(--line-soft); font-size: var(--text-sm); }
.rail-card .srow:last-child { border-bottom: 0; }
.rail-card .srow .n { color: var(--ink); min-width: 0;
  overflow-wrap: anywhere; }
.rail-card .srow .m { color: var(--muted); font-size: var(--text-xs);
  white-space: nowrap; }

/* Collapse: rail drops below work at tablet, single column at phone */
@media (max-width: 880px) {
  .work { grid-template-columns: 1fr; }
  .rail-card { position: static; }
  .cmd { grid-template-columns: 1fr 1fr; }
  .cmd__cell--posture { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .cmd .v { font-size: 1.5rem; }
  .cmd__cell { padding: var(--space-3) var(--space-4); }
}

/* ============================================================
   Item A — Composite qualitative posture band (BRIEF-2026-06-12)
   Headline roll-up: most-severe-wins across D1–D5.
   Qualitative only — no numeric score, advisory altitude.
   ============================================================ */
.posture-band {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sev-high);       /* default; overridden by badge colour */
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3, 12px) var(--space-6, 24px);
  margin-bottom: var(--space-4, 16px);
  flex-wrap: wrap;
}
.posture-band__label {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.posture-band__level {
  font-size: var(--text-sm);  /* badge, not hero figure — badge grammar preserved */
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.posture-band__dir {
  font-size: var(--text-sm);
}
.posture-band__meta {
  color: var(--muted);
  font-size: var(--text-xs);
  margin-left: auto;
}
@media (max-width: 640px) {
  .posture-band { flex-direction: column; align-items: flex-start; gap: var(--space-2, 8px); }
  .posture-band__meta { margin-left: 0; }
}

/* ============================================================
   Item B — Brief-pack export: @media print stylesheet
   Produces a clean browser-native PDF of the Brief tab.
   No server-side toolchain. "Export advisory brief" framing only —
   NO compliance-attestation, NO regulated inspection-readiness language.
   BRIEF-2026-06-12 §2 acceptance: clean one-piece pack, source footer
   intact, date/issue parity, no overflow text.
   ============================================================ */
@media print {
  /* 1. Reset page */
  @page {
    margin: 20mm 18mm 24mm 18mm;
    size: A4 portrait;
  }

  /* 2. Hide everything except the brief region */
  body { background: #fff !important; color: #000 !important; }
  .app-nav,
  .persona-switch,
  .view-switch,
  .theme-toggle,
  .boundary-strip,
  .ack-overlay,
  .drawer,
  .scrim,
  .posture-band,
  #region-dashboard,
  #region-triage,
  #region-alerts,
  .brief-archive,
  .brief-teaser,
  .open-brief,
  button.open-brief,
  [data-drawer],
  .arch-row { display: none !important; }

  /* 3. Make the brief region fully visible and unsuppressed */
  .surface-region { display: block !important; }
  #region-brief { display: block !important; }
  .brief-col { max-width: 100% !important; margin: 0 !important; }

  /* 4. Print header — issue/date parity label */
  #region-brief::before {
    content: "Sentinel Financial Integrity Monitor — Advisory Brief";
    display: block;
    font-family: var(--font-display, serif);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 4mm;
    color: #000;
  }

  /* 5. Typography resets for clean print */
  .brief-body { font-size: 10.5pt !important; line-height: 1.6 !important; color: #000 !important; }
  .brief-body p { margin-bottom: 4mm !important; }
  .brief-body h3 { font-size: 13pt !important; margin: 6mm 0 3mm !important; color: #000 !important; }
  .brief-body > p:first-of-type { font-size: 11pt !important; }
  .brief-head h2 { font-size: 18pt !important; line-height: 1.15 !important; }
  .brief-stamp { font-size: 9pt !important; margin-top: 1mm !important; }
  .brief-head { margin-bottom: 6mm !important; }

  /* 6. Source footer */
  .srcrow { font-size: 8pt !important; margin-top: 6mm !important; border-top: 0.5pt solid #ccc; padding-top: 3mm; color: #333 !important; }
  .srcrow a, .srcl { color: #000 !important; text-decoration: none !important; }
  .srcrow a::after { content: " (" attr(href) ")"; font-size: 7pt; color: #555; }

  /* 7. Prevent mid-content page breaks */
  .brief-body h3 { page-break-after: avoid; }
  .brief-body p { orphans: 3; widows: 3; }

  /* 8. Remove shadows and borders that look bad on print */
  * { box-shadow: none !important; text-shadow: none !important; }
  .brief-current { border: none !important; }
}

/* Print affordance: visible "Export / Print brief" button on the Brief tab.
   Print-only content is hidden from screen using aria-hidden + display:none on
   the print stylesheet above — this button is screen-only. */
.brief-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  padding: 6px 14px;
  margin-top: var(--space-3, 12px);
  transition: var(--transition);
}
.brief-export-btn:hover { border-color: var(--accent-text); color: var(--ink); }
.brief-export-btn:focus-visible { outline: 2px solid var(--sev-monitored-text); outline-offset: 2px; }
@media print { .brief-export-btn { display: none !important; } }
