/* ============================================================
   Recruiting Platform — warm / human design system (direction C)
   Single source of truth: tokens, then base, then components.
   Screens compose these classes; no per-screen one-off CSS.
   ============================================================ */

:root {
  /* --- warm surfaces (Culture Engine Design System) --- */
  --bg:        #FBF8F3;   /* page: warm canvas */
  --surface:   #FFFFFF;   /* cards */
  --surface-2: #F3EEE6;   /* sunken: recessed fills, tracks, chips */
  --ink:       #2A2420;   /* warm charcoal */
  --ink-2:     #3A332D;   /* emphasis inside cards */
  --muted:     #6E655C;   /* secondary text */
  --faint:     #9C9387;   /* hints, kickers, meta */
  --faintest:  #B0A797;   /* placeholder, disabled */
  --line:      #E7E0D5;   /* hairline border */
  --line-2:    #D8CFC1;   /* stronger rule */
  --line-soft: #F0EAE0;   /* lightest internal divider */

  /* --- accents --- */
  --terra:           #C0612F;   /* terracotta: the earned accent */
  --terra-ink:       #A44E22;   /* hover / press / deep accent */
  --terra-tint:      #F6E8DD;   /* quiet accent background */
  --terra-tint-line: #EAD9CC;

  /* --- semantic: positive (advance) / watch (hold) / negative (pass) ---
     base = dots & fills; -ink = AA text on tint; -bg = tint; -line = tint border */
  --good: #1F5C3D;  --good-bg: #E4ECE6;  --good-ink: #1F5C3D;  --good-line: #CFE0D6;
  --warn: #B5832B;  --warn-bg: #F4EBD9;  --warn-ink: #8A6418;  --warn-line: #E8D9B8;
  --bad:  #A33A2B;  --bad-bg:  #F3E2DD;  --bad-ink:  #A33A2B;  --bad-line:  #E6CBC2;

  /* --- misc tokens --- */
  --on-accent: #fff;  --dot-off: #E7E0D5;  --quote-ink: #6E655C;
  --focus-ring: rgba(192, 97, 47, .18);

  /* --- elevation (two levels only) --- */
  --shadow-hairline: 0 1px 2px rgba(42, 36, 32, .04);
  --shadow-card:     0 1px 2px rgba(42, 36, 32, .04), 0 18px 40px -34px rgba(42, 36, 32, .26);

  /* --- shape --- */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* --- layout --- */
  --measure: 64ch;
  --page-max: 1180px;

  /* --- type --- */
  --font:         "Hanken Grotesk", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Schibsted Grotesk", "Hanken Grotesk", "Segoe UI", sans-serif;
  --font-number:  "Schibsted Grotesk", "Hanken Grotesk", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--terra-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.022em; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 26px 0 12px; }
h3 { font-size: 14px; font-weight: 700; color: var(--ink-2); letter-spacing: -.005em; margin: 22px 0 10px; }

/* score figures use the display face with aligned tabular figures */
.wordmark, .overall-pct, .fit, .ss-val, .tile-val, .hist-pct, .sec-pct, .cs-score {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* --- layout --- */
.topbar {
  display: flex; align-items: center; gap: 26px;
  padding: 14px 30px; background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--ink); }
.brand-mark { flex: none; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { color: var(--muted); font-size: 15px; }
.topbar nav a:hover { color: var(--terra); text-decoration: none; }

/* --- demo showcase (DEMO_MODE) --- */
/* Slim persistent label under the topbar; must stay visible in print too (see
   the print block near the end of this file), so saved panel PDFs keep the
   demo provenance. */
.demo-banner {
  background: var(--terra-tint); color: var(--ink);
  border-bottom: 1px solid var(--terra-tint-line);
  text-align: center; font-size: 13px; font-weight: 600;
  letter-spacing: .01em; padding: 7px 30px;
}
.topbar nav.nav-demo { flex: 1; align-items: center; }
.topbar nav a.nav-demo-cta { margin-left: auto; color: var(--terra-ink); font-weight: 600; }
/* Read-only company view (demo): display cards, no form chrome. */
.view-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.view-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-hairline);
  padding: 14px 18px;
}
.view-item p { margin: 4px 0 0; }

.wrap { max-width: 880px; margin: 0 auto; padding: 36px 30px 72px; }
.foot {
  max-width: 880px; margin: 0 auto; padding: 0 30px 44px;
  color: var(--faint); font-size: 13px; font-style: italic;
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* --- buttons --- */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  background: var(--ink); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 11px 20px; border-radius: var(--r-pill);
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--ink-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
/* the earned accent: at most one per view */
.btn-accent { background: var(--terra); }
.btn-accent:hover { background: var(--terra-ink); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-sm { padding: 8px 15px; font-size: 14px; }

/* --- forms --- */
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 660px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 14px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input, select, textarea {
  font: inherit; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--terra);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
textarea { resize: vertical; }

/* --- company list cards (whole card clickable) --- */
.cards { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 22px;
  color: var(--ink); box-shadow: var(--shadow-hairline);
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
a.card:hover { border-color: var(--terra-tint-line); box-shadow: var(--shadow-card); text-decoration: none; }
a.card:active { transform: scale(.995); }
.card-title { font-weight: 700; font-size: 17px; color: var(--ink); }

/* --- pills / badges --- */
.pill {
  display: inline-block; padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.pill.small { font-size: 11px; padding: 2px 9px; }
.pill-ok   { background: var(--good-bg); color: var(--good-ink); }
.pill-warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill-bad  { background: var(--bad-bg);  color: var(--bad-ink); }

/* --- value list + authenticity --- */
.values { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.values .vname { font-weight: 700; margin-right: 9px; }
.plain { padding-left: 20px; }

.callout {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-md); padding: 16px 20px;
}
.callout h2 { margin-top: 4px; border: 0; }
.flag-item { margin-top: 10px; }
.advice { color: var(--terra-ink); font-size: 14px; }

.error { background: var(--bad-bg); color: var(--bad-ink); border-left: 3px solid var(--bad); padding: 13px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 18px; }
.notice { background: var(--terra-tint); color: var(--ink); border-left: 3px solid var(--terra); padding: 13px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 18px; }

/* sections */
section { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }

/* actions + the de-emphasized raw-config editor (recedes) */
.actions { display: flex; flex-direction: column; gap: 20px; }
.raw-edit { margin-top: 6px; }
.raw-edit summary {
  cursor: pointer; color: var(--faint); font-size: 13px;
  list-style: none; padding: 4px 0;
}
.raw-edit summary:hover { color: var(--muted); }
.raw-edit textarea { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; color: var(--muted); }

/* ============================================================
   Fit report (the showpiece)
   ============================================================ */
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.rec {
  padding: 8px 18px; border-radius: var(--r-pill);
  font-weight: 700; letter-spacing: .06em; font-size: 12px; white-space: nowrap;
}
.rec-advance { background: var(--good-bg); color: var(--good-ink); }
.rec-hold    { background: var(--warn-bg); color: var(--warn-ink); }
.rec-pass    { background: var(--bad-bg);  color: var(--bad-ink); }
.rec-label { font-size: 18px; font-weight: 600; margin: 10px 0 14px; }
.lead { font-size: 16px; line-height: 1.65; }
.scorecard-note {
  color: var(--muted); font-size: 13px; font-style: italic;
  border-left: 3px solid var(--line-2); padding-left: 13px; margin: 14px 0 0;
}

/* --- summary band: overall % + verdict (head row), then per-section tiles ---
   Color is never the only signal: the % number, the band word, and the tile
   labels carry the meaning too, for colorblind triage. */
.head-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.overall {
  display: flex; flex-direction: column; align-items: center; line-height: 1.02;
  padding: 0 4px;
}
.head-right .overall { background: transparent; }
.overall-pct { font-size: 36px; font-weight: 800; letter-spacing: -.03em; color: var(--terra); }
.overall-word { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }

/* band fill for the overall block + the section-% chip */
.band-strong     { background: var(--good-bg); color: var(--good-ink); }
.band-moderate   { background: var(--warn-bg); color: var(--warn-ink); }
.band-developing { background: var(--bad-bg);  color: var(--bad-ink); }

.band-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.tile { flex: 1 1 130px; min-width: 118px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 11px 13px; }
.tile-label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
/* sentiment lives on the leading dot only: the bar fill stays terracotta, the number stays ink */
.tile-label::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle; background: var(--dot-off);
}
.tb-strong     .tile-label::before { background: var(--good); }
.tb-moderate   .tile-label::before { background: var(--warn); }
.tb-developing .tile-label::before { background: var(--bad); }
.tile-clean    .tile-label::before { background: var(--good); }
.tile-verify   .tile-label::before { background: var(--warn); }
.tile-val { display: block; font-size: 19px; font-weight: 800; margin-top: 3px; color: var(--ink); }
.tile-bar { display: block; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; margin-top: 7px; }
.tile-bar-fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--terra); }
.tile-na .tile-val { color: var(--faint); font-size: 15px; }
.tile-clean  .tile-val { color: var(--good-ink); font-size: 15px; }
.tile-verify .tile-val { color: var(--warn-ink); font-size: 15px; }
.band-note { margin: 12px 0 2px; }

/* per-section % chip in report section headers (h2) */
.sec-pct { font-size: 14px; font-weight: 800; margin-left: 9px; padding: 2px 11px; border-radius: var(--r-pill); vertical-align: middle; }
.sec-na { color: var(--faint); background: var(--surface-2); }

@media (max-width: 560px) {
  .head-right { width: 100%; justify-content: flex-start; }
  .band-tiles .tile { flex-basis: 100%; }
}

/* ============================================================
   Re-composition: scorecard hero card + two-column report shell
   + sticky recommendation rail. Composes the tokens above; the
   report page opts into `report-layout` via base.html's main_class.
   ============================================================ */
.report-layout {
  max-width: var(--page-max); margin: 0 auto; padding: 32px 30px 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start;
}
.report-main { min-width: 0; }
.report-breadcrumb { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; }
.crumb-trail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumb { color: var(--muted); }
.crumb-current { color: var(--ink); font-weight: 600; }
.crumb-sep { color: var(--line-2); }
.crumb-nav { margin-left: auto; display: flex; gap: 16px; }
.crumb-nav a { font-weight: 600; color: var(--terra-ink); }
.crumb-trail a.crumb { text-decoration: none; }
.crumb-trail a.crumb:hover { color: var(--ink); text-decoration: underline; }
[id^="lens-"] { scroll-margin-top: 74px; }   /* clear the sticky header on anchor jumps */

/* hero scorecard card (shared _report_head.html) */
.scorecard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-card); padding: 34px 36px;
}
.scorecard-kicker {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft);
}
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.kicker-meta { font-size: 13px; color: var(--faint); }
.scorecard .report-head { margin-top: 26px; }
.scorecard .head-right { align-items: flex-end; }
.overall-cap { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); text-align: right; }
.scorecard .overall { align-items: flex-end; }
.scorecard .overall-pct { font-size: 58px; line-height: .9; letter-spacing: -.04em; }

/* dimension bars: borderless columns inside the card (the comp's ScoreBar) */
.scorecard .band-tiles { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-soft); gap: 28px; }
.scorecard .tile { border: 0; background: transparent; padding: 0; }
.scorecard .tile-label { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--faint); }
.scorecard .tile-val { font-size: 30px; margin-top: 6px; }
.scorecard .tile-clean .tile-val, .scorecard .tile-verify .tile-val, .scorecard .tile-na .tile-val { font-size: 17px; }
.rec-blurb { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-soft); }

/* sticky recommendation rail (report page only) */
.rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.rail-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-hairline); padding: 22px;
}
.rail-rec { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot-off); flex: none; }
.rec-dot.band-strong { background: var(--good); }
.rec-dot.band-moderate { background: var(--warn); }
.rec-dot.band-developing { background: var(--bad); }
.rail-word { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.rail-word.tone-advance { color: var(--good-ink); }
.rail-word.tone-hold { color: var(--warn-ink); }
.rail-word.tone-pass { color: var(--bad-ink); }
.rail-overall { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.rail-rationale { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 12px 0 0; }

/* rail: what to verify next */
.rail-verify { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.verify-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 11px; }
.verify-list li { display: flex; gap: 9px; align-items: flex-start; }
.verify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-top: 6px; flex: none; }
.verify-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.verify-src { display: block; font-size: 11px; color: var(--faint); margin-top: 1px; }
.verify-more { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--terra-ink); }

/* rail: "how is the overall computed" breakdown */
.pct-breakdown { padding: 0; }
.pct-breakdown summary {
  cursor: pointer; list-style: none; padding: 16px 22px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.pct-breakdown summary::-webkit-details-marker { display: none; }
.pct-breakdown summary::before { content: "\203A"; color: var(--faint); margin-right: 8px; display: inline-block; transition: transform .18s ease; }
.pct-breakdown[open] summary::before { transform: rotate(90deg); }
.pct-breakdown .breakdown { width: 100%; border-collapse: collapse; margin: 0 22px; width: calc(100% - 44px); }
.breakdown td { padding: 5px 0; border: 0; font-size: 13px; }
.breakdown .bd-calc { text-align: right; }
.breakdown .bd-contrib { text-align: right; font-family: var(--font-number); font-variant-numeric: tabular-nums; font-weight: 700; width: 34px; }
.breakdown .breakdown-total td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; color: var(--ink); }
.pct-breakdown p { margin: 8px 22px 18px; }

@media (max-width: 900px) {
  .report-layout { grid-template-columns: 1fr; }
  .rail { position: static; }
}

/* landing: flatten the shared scorecard so the sample is a compact echo, not a
   card-within-a-card (the .hero-sample box already provides the card frame). */
.hero-sample .scorecard { border: 0; box-shadow: none; padding: 0; background: transparent; border-radius: 0; }
.hero-sample .scorecard-kicker { padding-bottom: 12px; }
.hero-sample .scorecard .report-head { margin-top: 16px; }
.hero-sample .scorecard .overall-pct { font-size: 40px; }
.hero-sample .scorecard .band-tiles { margin-top: 18px; padding-top: 16px; gap: 16px; }
.hero-sample .scorecard .tile-val { font-size: 20px; }
.hero-sample .rec-blurb { margin-top: 16px; padding-top: 14px; }

/* ============================================================
   Dimension cards + collapsible driver rows (progressive disclosure).
   The report reads as a scannable scorecard: each dimension is a card,
   each driver a <details> collapsed to dot + label + one-line takeaway.
   ============================================================ */
.report-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 30px 0 14px; flex-wrap: wrap;
}
.control-links { display: flex; align-items: center; gap: 8px; }
.linkbtn { background: 0; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--terra-ink); }
.linkbtn:hover { text-decoration: underline; }

.dim-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-hairline);
  padding: 24px 28px; margin: 16px 0 0;
}
.dim-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.dim-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dim-title h2 { margin: 0; border: 0; padding: 0; font-family: var(--font-display); font-size: 22px; letter-spacing: -.02em; }
.dim-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot-off); flex: none; }
.dim-dot.dim-strong { background: var(--good); }
.dim-dot.dim-moderate { background: var(--warn); }
.dim-dot.dim-developing { background: var(--bad); }
.dim-tag { text-transform: uppercase; letter-spacing: .08em; }
.dim-score { display: flex; align-items: baseline; gap: 3px; flex: none; }
.dim-pct { font-family: var(--font-number); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.dgroup-head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 16px 0 2px; }
.dim-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.dim-empty { margin: 12px 0 0; }

.driver { border-bottom: 1px solid var(--line-soft); }
.driver:last-of-type { border-bottom: 0; }
/* a subtle left accent marks a flagged driver (warn = probe live, bad = a real
   weakness) at a glance, without tinting the whole row; sentiment still lives
   on the score dots. */
/* flagged-driver left bars removed per feedback; the dots and Watch pill carry the signal */
.driver > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 11px 2px; }
.driver > summary::-webkit-details-marker { display: none; }
.driver > summary:hover { background: var(--bg); border-radius: var(--r-sm); }
.driver .dots { flex: none; padding-top: 0; }
.driver-label { font-weight: 600; font-size: 15px; flex: none; width: 200px; }
.driver-take { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver[open] .driver-take { display: none; }
.driver-caret { flex: none; width: 12px; text-align: center; color: var(--faintest); font-size: 15px; transition: transform .18s ease; }
.driver-caret::before { content: "\203A"; }
.driver[open] .driver-caret { transform: rotate(90deg); }
.driver-body { padding: 2px 2px 16px 68px; }
.driver-sub { margin-bottom: 5px; font-style: italic; }
.driver-body p { margin: 0 0 6px; }

@media (max-width: 560px) {
  .driver-label { width: auto; }
  .driver-take { display: none; }
  .driver-body { padding-left: 6px; }
}

/* Rockstar / Watch signals grid (near the top) + Probe-next-round section */
.signals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.sig-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-hairline); padding: 22px 24px; }
.sig-rock { border-top: 3px solid var(--good); }
.sig-watch { border-top: 3px solid var(--warn); }
.sig-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sig-rock .sig-head { color: var(--good-ink); }
.sig-watch .sig-head { color: var(--warn-ink); }
.sig-icon { font-weight: 800; font-size: 13px; }
.sig-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.sig-label { font-weight: 600; font-size: 15px; }
.sig-detail { margin-top: 2px; }
.sig-src { color: var(--faint); }
@media (max-width: 640px) { .signals { grid-template-columns: 1fr; } }

.probe-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.probe-list li { display: flex; gap: 10px; align-items: flex-start; }
.probe-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-top: 6px; flex: none; }
.probe-label { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* jump-to-lens anchor strip */
.lens-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.lens-strip a {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 6px 13px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.lens-strip a:hover { border-color: var(--terra-tint-line); color: var(--ink); text-decoration: none; }
.lens-pct { font-family: var(--font-number); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }

/* future-fit forecast treatment: mark predictive vs evidenced */
.dim-forecast { border-left: 3px solid var(--warn-line); }
.forecast-tag {
  text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 700;
  color: var(--warn-ink); background: var(--warn-bg); padding: 2px 8px; border-radius: var(--r-pill);
}
.forecast-note { margin: 0 0 14px; font-style: italic; }

/* collapsed run-details (model + timing moved out of the candidate-facing read) */
.run-details { margin-top: 2px; }
.run-details p { margin: 6px 0 0; }
.run-prov { margin-top: 18px; }

/* driver score dots (1-5, sentiment on the dot); rendered inside each driver summary */
.dots { display: inline-flex; gap: 5px; padding-top: 7px; }
.d { width: 10px; height: 10px; border-radius: 50%; background: var(--dot-off); }
.dots.s1 .d.on, .dots.s2 .d.on { background: var(--bad); }
.dots.s3 .d.on                 { background: var(--warn); }
.dots.s4 .d.on, .dots.s5 .d.on { background: var(--good); }
.quote {
  font-size: 13px; color: var(--quote-ink);
  background: var(--surface-2); border-left: 3px solid var(--line-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 8px 13px; margin-top: 7px;
}

.criteria { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tag { padding: 2px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.tag-strong   { background: var(--good-bg); color: var(--good-ink); }
.tag-emerging { background: var(--warn-bg); color: var(--warn-ink); }
.tag-risk     { background: var(--bad-bg);  color: var(--bad-ink); }

.redflag { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.probation { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.probation li { display: flex; gap: 16px; align-items: flex-start; }
.probation .day { font-weight: 700; min-width: 66px; color: var(--terra); }
.probation li.decision { background: var(--good-bg); border-radius: var(--r-md); padding: 12px 14px; }
.probation li.decision .day { color: var(--good-ink); }

/* --- analyze: upload affordances + autofill + thinking indicator --- */
.upload-area {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 9px;
}
.uploader { display: flex; align-items: center; gap: 10px; }
.upload-link { color: var(--terra); cursor: pointer; font-size: 0.86rem; font-weight: 600; }
.upload-link:hover { color: var(--terra-ink); text-decoration: underline; }
.autofill-row { display: flex; align-items: center; gap: 12px; margin: -4px 0 2px; }

.thinking { display: none; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.htmx-request .thinking, .htmx-request.thinking { display: flex; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--terra);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- history rows: card link + delete control side by side --- */
.filters { margin-bottom: 16px; }
.filter-fields { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-row { display: flex; align-items: stretch; gap: 10px; }
.hist-row .card { flex: 1; }
.hist-row form { display: flex; align-items: center; }
.hist-right { display: flex; align-items: center; gap: 10px; flex: none; }
.rec-mini { padding: 5px 11px; font-size: 10px; }
.hist-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.hist-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hist-pct { font-size: 16px; font-weight: 800; padding: 4px 13px; border-radius: var(--r-pill); white-space: nowrap; }
.hist-na { color: var(--faint); background: var(--surface-2); font-size: 13px; font-weight: 700; }

/* --- company setup: completeness meter, sectioned form, authenticity --- */
.thinking.on { display: flex; }
.meter { background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; }
.meter .bar { height: 8px; background: var(--dot-off); border-radius: var(--r-pill); margin-top: 8px; overflow: hidden; }
.meter .bar-fill { display: block; height: 100%; background: var(--terra); border-radius: var(--r-pill); }
.thin-hints { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 5px; font-size: 0.86rem; }

.review-head-actions { display: flex; align-items: center; gap: 12px; }
.inline-form { display: inline; }
.draft-restore { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* monitoring: portfolio distribution + rate bars */
.monitoring-page { max-width: 960px; margin: 0 auto; padding: 36px 30px 72px; }
.dist-row { display: grid; grid-template-columns: 180px 1fr 96px; gap: 14px; align-items: center; padding: 9px 0; }
.dist-label { font-size: 14px; font-weight: 600; }
.dist-track { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.dist-fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--terra); }
.band-fill-strong { background: var(--good); }
.band-fill-moderate { background: var(--warn); }
.band-fill-developing { background: var(--bad); }
.rate-fill-advance { background: var(--good); }
.rate-fill-hold { background: var(--warn); }
.rate-fill-pass { background: var(--bad); }
.dist-n { text-align: right; font-family: var(--font-number); font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 560px) { .dist-row { grid-template-columns: 1fr auto; } .dist-track { grid-column: 1 / -1; order: 3; } }
.repeat-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; margin-bottom: 10px; }
.rm-row { margin-top: 6px; }
/* AI-owned authenticity verdict signal (green = fits, yellow = watch, red = misfit).
   Minimal color off the semantic palette; fuller chip styling is a later pass. */
.verdict-signal { margin-top: 8px; padding: 8px 12px; border-radius: var(--r-sm); border-left: 3px solid var(--line-2); }
.verdict-signal.verdict-green  { border-left-color: var(--good); background: var(--good-bg); }
.verdict-signal.verdict-yellow { border-left-color: var(--warn); background: var(--warn-bg); }
.verdict-signal.verdict-red    { border-left-color: var(--bad);  background: var(--bad-bg); }
.verdict-chip {
  display: inline-block; font-weight: 700; font-size: 12px;
  padding: 3px 11px; border-radius: var(--r-pill); letter-spacing: .02em;
}
.verdict-green  .verdict-chip { background: var(--good-bg); color: var(--good-ink); }
.verdict-yellow .verdict-chip { background: var(--warn-bg); color: var(--warn-ink); }
.verdict-red    .verdict-chip { background: var(--bad-bg);  color: var(--bad-ink); }
.reasoning { margin-top: 8px; }
.reasoning .advice { color: var(--terra-ink); }
section.err { border-left: 3px solid var(--bad); padding-left: 12px; }

/* ============================================================
   Landing: proof hero (left: identity + CTA + stats; right: sample
   scorecard) over the company hub. Composes existing tokens only.
   ============================================================ */
.hero {
  border-top: 0; margin-top: 0; padding-top: 0;   /* override default section border */
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
  padding-bottom: 10px;
}
.hero-intro { display: flex; flex-direction: column; gap: 13px; }
.wordmark { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.tagline { font-size: 17px; color: var(--ink); margin: 0; }
.hook { color: var(--muted); margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.hero-stats { color: var(--faint); font-size: 13px; margin: 8px 0 0; }
.hero-stats strong { color: var(--muted); }

.hero-sample {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px 24px 20px;
}
.sample-badge {
  position: absolute; top: -11px; left: 20px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: 3px 13px; font-size: 12px; font-weight: 700; letter-spacing: .03em;
}
/* Deliberate density variant: the embedded report head is a compact echo of the
   full report page. Scoped, accepted exception to the no-per-screen-CSS rule. */
.hero-sample h1 { font-size: 20px; }
.hero-sample .rec-label { font-size: 15px; margin: 8px 0 10px; }
.hero-sample .lead { font-size: 14px; }
.hero-sample .scorecard-note { margin-top: 12px; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   CV screening: the ranked-list run view + the screen form.
   Composes the warm tokens; scoped like the report block.
   ============================================================ */
.screen-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 18px 0 8px;
}
.screen-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-hairline); }
.ss-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 5px; }
.ss-val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.ss-val.good { color: var(--good-ink); }
.ss-sub { margin-top: 6px; }
.screen-stat.ss-accent { border-top: 3px solid var(--terra); }

.screen-toolbar { align-items: flex-start; gap: 18px; margin: 4px 0 10px; flex-wrap: wrap; }
.screen-filter { display: flex; align-items: center; gap: 6px; flex: none; }
.filter-pill { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 12px; white-space: nowrap; }
.filter-pill:hover { border-color: var(--terra-tint-line); text-decoration: none; }
.filter-pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.screen-empty { margin-top: 12px; }

.screen-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-top: 6px; }
.screen-table th {
  text-align: left; font-size: 12px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--faint); font-weight: 700; padding: 0 14px 2px;
}
.screen-table th.c { text-align: center; }
.screen-row td {
  background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 14px; vertical-align: top;
}
.screen-row td.c { text-align: center; vertical-align: middle; }
.screen-row td:first-child { border-left: 4px solid var(--line-2); border-top-left-radius: var(--r-md); border-bottom-left-radius: var(--r-md); }
.screen-row td:last-child { border-right: 1px solid var(--line); border-top-right-radius: var(--r-md); border-bottom-right-radius: var(--r-md); }
.screen-row.sb-shortlist td:first-child { border-left-color: var(--good); }
.screen-row.sb-maybe td:first-child { border-left-color: var(--warn); }
.screen-row.sb-pass td:first-child { border-left-color: var(--line-2); }
.screen-row.sb-unscored td:first-child { border-left-color: var(--line-2); }
.screen-row.screen-err td { background: var(--surface-2); }
.screen-row.screen-err td:first-child { border-left-color: var(--bad); }

.screen-table .rank { color: var(--faint); font-size: 14px; width: 34px; }
.cand-name { font-weight: 700; }
.fit { font-size: 21px; font-weight: 800; }
.fit-shortlist { color: var(--good); }
.fit-maybe { color: var(--warn); }
.fit-pass { color: var(--bad); }
.fit-unscored { color: var(--faint); font-size: 15px; }

.pill-pass { background: var(--surface-2); color: var(--muted); }
.pill-na { background: var(--surface-2); color: var(--faint); }

.screen-table .read > div:first-child { color: var(--ink); }
.verify {
  display: inline-block; margin-top: 5px; font-size: 12.5px; color: var(--bad-ink);
  background: var(--bad-bg); border-radius: var(--r-sm); padding: 2px 9px;
}
.cand-head { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fit-bar { display: block; width: 56px; height: 4px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; margin: 6px auto 0; }
.fit-bar-fill { display: block; height: 100%; background: var(--terra); border-radius: var(--r-pill); }
.verify-chip { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); margin-right: 8px; }
.detail-toggle { color: var(--terra-ink); font-size: 13px; font-weight: 600; }
.cand-detail { margin-top: 8px; }
.cand-detail summary { cursor: pointer; color: var(--terra-ink); font-size: 13px; font-weight: 600; list-style: none; }
.cand-detail summary::-webkit-details-marker { display: none; }
.cand-detail summary:hover .detail-toggle { text-decoration: underline; }
.cand-scores { list-style: none; padding: 8px 0 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.cand-scores li { display: grid; grid-template-columns: 180px 52px 1fr; gap: 10px; align-items: baseline; font-size: 13px; }
.cs-cat { font-weight: 600; }
.cs-score { font-weight: 800; text-align: center; border-radius: var(--r-pill); padding: 1px 0; }
.cs-score.s1, .cs-score.s2 { color: var(--bad); }
.cs-score.s3 { color: var(--warn); }
.cs-score.s4, .cs-score.s5 { color: var(--good-ink); }
.cs-score.s0 { color: var(--faint); }
.screen-foot { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }

@media (max-width: 560px) {
  .cand-scores li { grid-template-columns: 1fr auto; }
  .cand-scores li .muted { grid-column: 1 / -1; }
}

/* ============================================================
   Panel mode: print-optimized one-pager (handoff). Reuses the hero
   scorecard head; strips the report's depth for the room / PDF.
   ============================================================ */
.panel { max-width: 800px; margin: 0 auto; padding: 24px 30px 60px; }
.panel-actions { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 16px; }
.report-share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-signals { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.panel-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-hairline); padding: 20px 22px; }
.panel-col h3 { margin: 0 0 4px; }
.panel-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.panel-list li { display: flex; gap: 9px; align-items: flex-start; }
.panel-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.dot-good { background: var(--good); }
.dot-warn { background: var(--warn); }
.panel-probation { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-hairline); padding: 20px 22px; }
.panel-probation h3 { margin-top: 0; }
.panel-foot { margin-top: 22px; font-style: italic; }
@media (max-width: 560px) { .panel-signals { grid-template-columns: 1fr; } }

@media print {
  .topbar, .foot, .no-print { display: none !important; }
  /* Saved PDFs stay labeled (R32): the demo banner survives print. */
  .demo-banner { display: block !important; background: #fff; border-bottom: 1px solid #000; padding: 4px 0; }
  body { background: #fff; }
  .panel { max-width: 100%; padding: 0; }
  .scorecard, .panel-col, .panel-probation { box-shadow: none; border-color: var(--line-2); break-inside: avoid; }
  .panel-signals { break-inside: avoid; }
}

/* ============================================================
   Candidate compare: side-by-side matrix (selected from History).
   ============================================================ */
.compare-page { max-width: var(--page-max); margin: 0 auto; padding: 32px 30px 72px; }
.compare-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 4px; flex-wrap: wrap; }
.hist-check { display: flex; align-items: center; padding: 0 4px; flex: none; }
.hist-check input { width: auto; }

.cmp-grid { display: grid; gap: 0 22px; align-items: center; margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); padding: 8px 26px 22px; }
.cmp-grid.cols-2 { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); }
.cmp-grid.cols-3 { grid-template-columns: 170px repeat(3, minmax(0, 1fr)); }
.cmp-head { padding: 20px 0 16px; border-bottom: 1px solid var(--line); }
.cmp-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.cmp-open { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--terra-ink); }
.cmp-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cmp-cell { padding: 16px 0; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-val { font-family: var(--font-number); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.cmp-best { color: var(--terra); }
.cmp-best-tag { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); }
.cmp-text { font-size: 15px; color: var(--ink-2); }
.cmp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* Bullet cells: keep the dot on the first line of wrapping text. flex-start +
   min-width:0 lets the text wrap internally instead of the whole span dropping
   below the dot; the dot gets a small top offset to sit on the first line. */
.cmp-cell-text { align-items: flex-start; flex-wrap: nowrap; }
.cmp-cell-text .cmp-text { min-width: 0; }
.cmp-cell-text .cmp-dot { margin-top: 6px; }
@media (max-width: 640px) { .cmp-grid { padding: 8px 16px 18px; } .cmp-val { font-size: 20px; } .cmp-name { font-size: 15px; } }

/* ============================================================
   Demo landing (prospect showcase, U5): stacked hero + step and
   role cards. Composes the warm tokens; scoped like the report
   block. Single-column by default; steps go 3-up on wide screens.
   ============================================================ */
.demo-hero { border-top: 0; margin-top: 0; padding-top: 6px; }
.demo-hero h1 { max-width: 24ch; }
.demo-prose { max-width: var(--measure); }
.card-col { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; }
.card-col p { margin: 0; }
.card-col .pill { background: var(--surface-2); color: var(--muted); flex: none; }
@media (min-width: 760px) {
  .step-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}
