/* Pillar HR Health Assessment
   World: the brand's own navy (#000047) and green (#2DCC70). Navy is the entire
   ink system, green is the single accent doing every job. Ground is cool paper,
   not cream — a warm-paper ground with an invented blue accent was reading as
   generic, and fighting the actual brand. */

:root {
  /* Tokens named for the brand, not the framework */
  --navy:        #000047;
  --navy-lift:   #101a5e;   /* one step up, for large display type on paper */
  --pillar:      #2dcc70;   /* the one accent */
  --pillar-deep: #0f7a45;   /* darkened for text/icons — raw green is 1.9:1, unusable as type */

  --ground:      #f1f3f8;   /* cool paper, leaning navy */
  --surface:     #ffffff;
  --ink:         var(--navy);
  --ink-muted:   rgba(0, 0, 71, .60);
  --ink-faint:   rgba(0, 0, 71, .58);
  --hairline:    rgba(0, 0, 71, .13);
  --hairline-2:  rgba(0, 0, 71, .26);
  --wash:        rgba(45, 204, 112, .10);

  /* Score states. Every one is legible as text on paper. */
  --risk:    #a8231a;
  --exposed: #8a5200;
  --stable:  #16794a;
  --strong:  var(--pillar-deep);

  --serif: "Source Serif 4", ui-serif, Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:     #00021f;
    --surface:    #050a33;
    --ink:        #e8ebf6;
    --ink-muted:  rgba(232, 235, 246, .62);
    --ink-faint:  rgba(232, 235, 246, .52);
    --hairline:   rgba(232, 235, 246, .16);
    --hairline-2: rgba(232, 235, 246, .30);
    --wash:       rgba(45, 204, 112, .14);
    --navy-lift:  #dfe4f5;
    --pillar-deep: #4bdd88;
    --risk:    #f08a80;
    --exposed: #e0a94e;
    --stable:  #5cc98f;
    --strong:  #4bdd88;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The second typographic voice: mono, uppercase, tracked. Every label, eyebrow,
   step counter and stat caption on both pages uses it. */
.eyebrow, .step, .sect, .stat-l, .pri-label, .alert-tag, .kind,
.internal-tag, .panel h2, .svc th, .tag {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
}

.masthead {
  border-bottom: 1px solid var(--hairline);
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface);
}
.wordmark { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.wordmark span { color: var(--ink-muted); font-weight: 400; }
.internal-tag {
  font-size: 10px; color: var(--exposed);
  border: 1px solid var(--exposed); padding: 3px 9px; border-radius: 3px; white-space: nowrap;
}

.wrap { max-width: 700px; margin: 0 auto; padding: 60px 24px 90px; }
.wrap.wide { max-width: 900px; }

.eyebrow { font-size: 11px; color: var(--pillar-deep); margin: 0 0 16px; }

h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 7.5vw, 62px);
  line-height: 1.05; letter-spacing: -.028em;
  margin: 0 0 22px; font-weight: 600; color: var(--navy-lift);
}
.lede { font-size: 19px; color: var(--ink-muted); margin: 0 0 34px; max-width: 54ch; }

.facts { list-style: none; padding: 0; margin: 0 0 36px; }
.facts li { padding: 15px 0; border-top: 1px solid var(--hairline); font-size: 16px; color: var(--ink-muted); }
.facts li:last-child { border-bottom: 1px solid var(--hairline); }
.facts strong { color: var(--ink); font-weight: 600; }

/* Buttons: green fill with navy text reads at 9.9:1 and is unmistakably the brand.
   Tonal hover and a scale-press, never a lift. */
.btn {
  display: inline-block; font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 13px 26px; border-radius: 5px; border: 1px solid var(--pillar);
  background: var(--pillar); color: var(--navy); cursor: pointer; text-decoration: none;
  transition: background .14s ease, transform .1s ease;
}
.btn:hover { background: #3ee07f; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.wide { width: 100%; }
.btn.ghost {
  background: transparent; color: var(--ink);
  border-color: var(--hairline-2);
}
.btn.ghost:hover { background: var(--wash); border-color: var(--pillar); }

.link {
  background: none; border: 0; color: var(--ink-muted); cursor: pointer;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  padding: 8px 0; text-decoration: none; border-bottom: 1px solid var(--hairline-2);
}
.link:hover { color: var(--ink); border-color: var(--pillar); }

.resume { font-size: 15px; color: var(--ink-muted); margin-top: 22px; }
.resume a { color: var(--pillar-deep); }

/* ---------- questions ---------- */

.progress { height: 2px; background: var(--hairline); margin-bottom: 30px; }
.progress-bar { height: 100%; background: var(--pillar); transition: width .28s cubic-bezier(.16,1,.3,1); }

.step { font-size: 11px; color: var(--ink-faint); margin: 0 0 12px; }

.q {
  font-family: var(--serif); font-size: clamp(26px, 4.4vw, 34px);
  line-height: 1.2; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 600;
  color: var(--navy-lift);
}
.help { font-size: 15px; color: var(--ink-muted); margin: 0 0 26px; max-width: 52ch; }

.options { display: grid; gap: 9px; margin-top: 26px; }
.option {
  text-align: left; font-family: var(--sans); font-size: 16px; line-height: 1.45;
  padding: 17px 18px; border: 1px solid var(--hairline); border-radius: 6px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--pillar); background: var(--wash); }
.option.selected { border-color: var(--pillar); background: var(--wash); box-shadow: inset 3px 0 0 var(--pillar); }

.numrow { display: flex; gap: 10px; margin-top: 26px; }
.numrow input {
  flex: 1; font-family: var(--serif); font-size: 22px; padding: 12px 16px;
  border: 1px solid var(--hairline); border-radius: 6px; background: var(--surface); color: var(--ink);
}
.err { color: var(--risk); font-size: 15px; margin: 10px 0 0; }
.nav { margin-top: 24px; }

/* ---------- results ---------- */

.result-head { margin-bottom: 36px; }
.score-wrap { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.score {
  font-family: var(--serif); font-size: clamp(86px, 17vw, 132px); font-weight: 600;
  line-height: .86; letter-spacing: -.05em; font-variant-numeric: lining-nums tabular-nums;
}
.score.risk { color: var(--risk); } .score.exposed { color: var(--exposed); }
.score.stable { color: var(--stable); } .score.strong { color: var(--strong); }

.tier { font-family: var(--serif); font-size: 29px; font-weight: 600; margin: 0 0 5px; letter-spacing: -.02em; }
.tier-line { color: var(--ink-muted); margin: 0; font-size: 16px; max-width: 40ch; }

.sect {
  font-size: 11px; color: var(--ink-faint);
  margin: 0 0 18px; padding-top: 34px; border-top: 1px solid var(--hairline);
}
.sect-note { font-size: 15px; color: var(--ink-muted); margin: -10px 0 20px; }
.none { color: var(--ink-muted); font-size: 16px; margin: 0; }

.cats { display: grid; gap: 17px; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cat-name { font-size: 16px; font-weight: 500; }
.cat-score { font-family: var(--serif); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-score.risk { color: var(--risk); } .cat-score.exposed { color: var(--exposed); }
.cat-score.stable { color: var(--stable); } .cat-score.strong { color: var(--strong); }

.bar { height: 5px; background: var(--hairline); overflow: hidden; }
.bar-fill { height: 100%; }
.bar-fill.risk { background: var(--risk); } .bar-fill.exposed { background: var(--exposed); }
.bar-fill.stable { background: var(--stable); } .bar-fill.strong { background: var(--strong); }

/* ---------- the headcount ruler — this page's one invented device ----------
   Federal obligations attach at fixed headcounts. Nothing in a component library
   draws "where you sit on a regulatory scale and what's next," so it's built here.
   It carries the single most valuable finding, so the rest of the page stays quiet. */

.ruler { margin: 4px 0 8px; padding: 26px 0 4px; }
.ruler-track { position: relative; height: 2px; background: var(--hairline-2); margin: 44px 0 34px; }
.ruler-done { position: absolute; left: 0; top: 0; height: 100%; background: var(--ink-faint); }

.ruler-mark { position: absolute; top: 0; transform: translateX(-50%); text-align: center; }
.ruler-mark::before {
  content: ""; display: block; width: 1px; height: 11px;
  background: var(--hairline-2); margin: -5px auto 0;
}
.ruler-mark span {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--ink-faint); margin-top: 7px; white-space: nowrap;
}
.ruler-mark.passed span { color: var(--ink-muted); }
.ruler-mark.next::before { background: var(--pillar); height: 17px; margin-top: -8px; width: 2px; }
.ruler-mark.next span { color: var(--pillar-deep); font-weight: 600; }

.ruler-you { position: absolute; top: 0; transform: translateX(-50%); }
.ruler-you::after {
  content: ""; display: block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--pillar); border: 2px solid var(--surface);
  margin: -6px auto 0; box-shadow: 0 0 0 1px var(--pillar);
}
.ruler-you b {
  position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
  font-family: var(--serif); font-size: 21px; font-weight: 600; white-space: nowrap;
  color: var(--ink);
}
.ruler-you i {
  position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); font-style: normal; white-space: nowrap;
}

/* ---------- alerts, exposures, priorities ---------- */

.alert {
  background: var(--wash); border: 1px solid var(--pillar);
  border-radius: 7px; padding: 24px 26px; margin: 0 0 34px;
}
.alert-tag { font-size: 11px; color: var(--pillar-deep); margin: 0 0 10px; }
.alert h3 { font-family: var(--serif); font-size: 23px; line-height: 1.25; margin: 0 0 12px; font-weight: 600; letter-spacing: -.015em; }
.alert p { margin: 0 0 9px; font-size: 16px; }
.alert p:last-child { margin-bottom: 0; }
.alert-note { color: var(--ink-muted); font-size: 15px; }

.exposure { padding: 19px 0; border-bottom: 1px solid var(--hairline); }
.exposure:last-child { border-bottom: 0; }
.exposure h4 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 8px; color: var(--risk); letter-spacing: -.015em; }
.exposure p { margin: 0; font-size: 16px; color: var(--ink-muted); }

.priority { display: flex; gap: 17px; padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.priority:last-child { border-bottom: 0; }
.pri-num {
  flex: 0 0 28px; height: 28px; background: var(--pillar); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600; border-radius: 3px;
}
.priority h4 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 1px 0 9px; letter-spacing: -.015em; }
.priority p { margin: 0 0 9px; font-size: 16px; color: var(--ink-muted); }
.done { font-size: 15px !important; }
.done strong { color: var(--ink); font-weight: 600; }
.self { font-size: 15px !important; color: var(--stable) !important; }

.applies { padding-left: 20px; margin: 0; }
.applies li { margin-bottom: 11px; font-size: 16px; color: var(--ink-muted); }
.applies strong { color: var(--ink); font-weight: 600; }
.reclaim p { font-size: 16px; margin: 0 0 11px; }

.gate { background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: 30px 28px; margin-top: 36px; }
.gate h3 { font-family: var(--serif); font-size: 25px; margin: 0 0 9px; font-weight: 600; letter-spacing: -.02em; }
.gate > p { color: var(--ink-muted); font-size: 16px; margin: 0 0 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-muted); margin-bottom: 6px; }
.field input {
  width: 100%; font-family: var(--sans); font-size: 16px; padding: 12px 14px;
  border: 1px solid var(--hairline); border-radius: 5px; background: var(--ground); color: var(--ink);
}
.fineprint { font-size: 14px; color: var(--ink-muted); margin: 13px 0 0; text-align: center; }

.cta { margin-top: 36px; padding: 30px 28px; background: var(--navy); border-radius: 8px; color: #eef0fa; }
.cta h3 { font-family: var(--serif); font-size: 25px; margin: 0 0 11px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.cta > p { font-size: 16px; margin: 0 0 22px; color: rgba(238,240,250,.78); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta .btn.ghost { color: #eef0fa; border-color: rgba(238,240,250,.34); }
.cta .btn.ghost:hover { background: rgba(255,255,255,.08); border-color: var(--pillar); }
.cta .fineprint { text-align: left; color: rgba(238,240,250,.5); }

.disclaimer { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--ink-faint); line-height: 1.5; }

.foot { border-top: 1px solid var(--hairline); padding: 22px 24px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.foot p { margin: 0; }

/* ---------- accessibility and motion ---------- */

:focus-visible { outline: 2px solid var(--pillar-deep); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (pointer: coarse) {
  .option { padding: 19px 18px; }
  .btn { padding: 15px 26px; }
}

/* ---------- internal advisor brief ---------- */

.demo-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 30px; }

.paste { border-top: 1px solid var(--hairline); padding-top: 20px; }
.paste summary { cursor: pointer; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--pillar-deep); }
.paste textarea {
  width: 100%; margin: 14px 0; padding: 12px 14px; font-family: var(--mono);
  font-size: 13px; line-height: 1.5; border: 1px solid var(--hairline); border-radius: 6px;
  background: var(--surface); color: var(--ink); resize: vertical;
}

.brief-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.brief-head h1 { font-size: clamp(28px, 4.6vw, 40px); margin: 0 0 8px; }
.brief-meta { color: var(--ink-muted); font-size: 15px; margin: 0; }
.brief-meta .note { font-style: italic; color: var(--ink-faint); }

.pri { text-align: center; border-radius: 7px; padding: 15px 22px; min-width: 112px; border: 1px solid var(--hairline-2); }
.pri-band { display: block; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.05; }
.pri-label { display: block; font-size: 10px; color: var(--ink-faint); margin-top: 3px; }
.pri-high { border-color: var(--risk); } .pri-high .pri-band { color: var(--risk); }
.pri-medium { border-color: var(--exposed); } .pri-medium .pri-band { color: var(--exposed); }
.pri-low .pri-band { color: var(--ink-faint); }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline); border-radius: 7px;
  overflow: hidden; margin-bottom: 30px;
}
.stat { background: var(--surface); padding: 17px 12px; text-align: center; }
.stat-n { display: block; font-family: var(--serif); font-size: 29px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-n.risk { color: var(--risk); } .stat-n.exposed { color: var(--exposed); }
.stat-n.stable { color: var(--stable); } .stat-n.strong { color: var(--strong); }
.stat-l { display: block; font-size: 10px; color: var(--ink-faint); margin-top: 5px; }

.peo-line { margin: -18px 0 26px; }
.peo-line span {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .09em; color: var(--ink-muted);
  border: 1px solid var(--hairline-2); border-radius: 3px; padding: 4px 10px;
}

.panel { border: 1px solid var(--hairline); border-radius: 7px; padding: 23px 25px; margin-bottom: 17px; background: var(--surface); }
.panel h2 { font-size: 11px; color: var(--ink-faint); margin: 0 0 15px; }
.panel h2 .count { background: var(--wash); color: var(--pillar-deep); border-radius: 3px; padding: 1px 7px; margin-left: 6px; letter-spacing: 0; }
.panel p { font-size: 16px; margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }
.panel.accent { border-color: var(--pillar); background: var(--wash); }
.panel.warn { border-color: var(--exposed); }
.panel code { font-family: var(--mono); font-size: 14px; background: var(--ground); padding: 1px 5px; border-radius: 3px; }

.kind { font-size: 11px !important; color: var(--pillar-deep); }
.lead-line { font-family: var(--serif); font-size: 21px !important; line-height: 1.35; letter-spacing: -.015em; }
.why { color: var(--ink-muted); font-size: 15px !important; }

.drivers { margin: 0; padding-left: 20px; }
.drivers li { font-size: 16px; margin-bottom: 8px; }
.drivers li:last-child { margin-bottom: 0; }

.sizing { font-family: var(--serif); font-size: 29px !important; font-weight: 600; letter-spacing: -.02em; }
.sizing .stat-l { display: inline; margin-left: 8px; }

.svc { width: 100%; border-collapse: collapse; font-size: 15px; }
.svc th { text-align: left; font-size: 10px; color: var(--ink-faint); padding: 0 10px 9px 0; border-bottom: 1px solid var(--hairline); }
.svc td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.svc tr:last-child td { border-bottom: 0; }
.svc-line { font-weight: 500; }
.svc td.risk { color: var(--risk); font-weight: 600; } .svc td.exposed { color: var(--exposed); font-weight: 600; }
.svc td.stable { color: var(--stable); font-weight: 600; } .svc td.strong { color: var(--strong); font-weight: 600; }
.svc-hits { color: var(--ink-muted); font-size: 14px; }
.muted { color: var(--ink-faint); }

.obj { padding: 13px 0; border-bottom: 1px solid var(--hairline); }
.obj:last-child { border-bottom: 0; }
.obj-says { font-family: var(--serif); font-size: 18px !important; font-weight: 600; margin-bottom: 6px !important; }
.obj-counter { color: var(--ink-muted); font-size: 15px !important; }

.gaps { margin: 0; padding-left: 22px; }
.gaps li { margin-bottom: 15px; font-size: 15px; }
.gaps li:last-child { margin-bottom: 0; }
.gap-action { font-weight: 600; font-size: 16px; }
.gap-why { display: block; color: var(--ink-muted); margin-top: 4px; }
.tag { display: inline-block; font-size: 9px; padding: 2px 7px; border-radius: 3px; margin-left: 7px; vertical-align: middle; white-space: nowrap; }
.tag-pillar { background: var(--pillar); color: var(--navy); }
.tag-self { background: var(--hairline); color: var(--ink-muted); }

.brief-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

@media (max-width: 560px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .svc thead { display: none; }
  .svc td { display: block; padding: 4px 0; border-bottom: 0; }
  .svc tr { display: block; padding: 13px 0; border-bottom: 1px solid var(--hairline); }
  .score-wrap { gap: 14px; }
}

/* ---------- print: the saved report ---------- */

@media print {
  @page { margin: 15mm; }

  :root {
    --ground: #fff; --surface: #fff;
    --ink: #000047; --ink-muted: #333; --ink-faint: #555;
    --hairline: #ccc; --hairline-2: #999; --wash: #fff; --navy-lift: #000047;
    --risk: #8c1d16; --exposed: #7a4708; --stable: #14603c; --strong: #0f6b3a;
  }

  body { background: #fff; font-size: 10.5pt; line-height: 1.42; }
  .masthead { border-bottom: 2pt solid var(--navy); padding: 0 0 8pt; margin-bottom: 15pt; background: none; }
  .wrap { max-width: none; padding: 0; }
  .foot { display: none; }

  .gate, .cta-row, .btn, .link, .nav, .progress, .resume, #intro,
  #loader, .brief-actions, .demo-row, .paste { display: none !important; }

  .cta { background: none; color: #000047; border: 1pt solid var(--navy); padding: 10pt 12pt; }
  .cta h3, .cta > p, .cta .fineprint { color: #000047; }
  .alert { background: none; border: 1.5pt solid var(--navy); padding: 10pt 12pt; }

  .score { font-size: 44pt; }
  .tier { font-size: 17pt; }
  h1, .q { font-size: 19pt; }
  .sect { padding-top: 13pt; }

  .bar { border: .5pt solid #777; height: 7pt; }
  .bar-fill { background: #444 !important; }
  .ruler-you::after { background: #000 !important; box-shadow: none; }
  .ruler-mark.next::before { background: #000 !important; }

  .panel { border: .5pt solid #999; padding: 8pt 10pt; margin-bottom: 8pt; background: none; }
  .panel.accent { border: 1.5pt solid #000; }
  .stat-row { border: .5pt solid #999; }
  .stat { border-right: .5pt solid #999; }
  .pri { border: 1pt solid #000; }
  .internal-tag { border: .5pt solid #000; color: #000; }
  .tag { border: .5pt solid #666; background: none !important; color: #000 !important; }

  section, .priority, .exposure, .panel, .ruler { break-inside: avoid; page-break-inside: avoid; }
}
