/* Wayfinder Reframe Scoring -- Helmwise brand tokens, same three colours as
   the collection app (#1b76bc, #101820, #e2e2e2); every other value is a
   neutral step off those. No red on anything that is merely low or missing --
   a Reactive score is a finding, not an error. */
:root {
  --bg: #f2f3f4; --surface: #fff; --surface-2: #fafafa; --sunken: #e2e2e2;
  --line: #d8d8d8; --line-strong: #c2c2c2;
  --ink: #101820; --ink-2: #4b5560; --ink-3: #7a828b;
  --accent: #1b76bc; --accent-ink: #fff; --accent-soft: #e9f2f9; --accent-line: #b5d5ed;
  --danger: #a33228; --danger-soft: #fbeceb;
  --radius: 10px; --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16,24,32,.07), 0 1px 1px rgba(16,24,32,.04);
  --shadow-md: 0 4px 16px rgba(16,24,32,.09), 0 1px 3px rgba(16,24,32,.05);
  --sans: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101820; --surface: #17212c; --surface-2: #1c2733; --sunken: #0c131a;
    --line: #26333f; --line-strong: #374756;
    --ink: #e2e2e2; --ink-2: #a8b2bc; --ink-3: #7a848e;
    --accent: #4da3e0; --accent-ink: #08131c; --accent-soft: #16293a; --accent-line: #2b4a66;
    --danger: #e08a80; --danger-soft: #33201e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.45); --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-size: .9em; background: var(--sunken); padding: 1px 5px; border-radius: 4px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 22px; height: 58px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 15px; white-space: nowrap; }
.brand b { font-weight: 600; }
.brand .mark { width: 26px; height: 26px; color: var(--accent); }
.brand.big { font-size: 22px; font-family: var(--serif); justify-content: center; margin: 32px 0 6px; }
.brand.big .mark { width: 40px; height: 40px; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { padding: 6px 11px; border-radius: 20px; color: var(--ink-2); font-size: 13.5px; }
.top nav a:hover { background: var(--accent-soft); text-decoration: none; }
.top nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.quiet { color: var(--ink-3); }
.small { font-size: 13px; }
.ribbon { background: var(--ink); color: var(--sunken); text-align: center; font-size: 12px; letter-spacing: .02em; padding: 5px 12px; }

/* layout */
main { padding: 26px 20px 60px; margin: 0 auto; }
main.narrow { max-width: 860px; }
main.wide { max-width: 1240px; }
.title { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 4px 0 8px; line-height: 1.3; }
.title.h2 { font-size: 20px; margin-top: 34px; }
.lede { color: var(--ink-2); font-size: 14.5px; margin: 0 0 18px; max-width: 74ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 26px 30px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin: 0 0 12px; }
.pager { display: flex; justify-content: space-between; margin-top: 18px; font-size: 14px; }
.foot { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 26px 20px 40px; }

/* auth */
.auth { max-width: 440px; }
.auth .card { margin-top: 14px; }
.auth label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 14px; }
.auth input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); }
.auth input:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
.err { color: var(--danger); background: var(--danger-soft); padding: 8px 12px; border-radius: var(--radius); font-size: 13.5px; }
.btn { font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }

/* disclosure + acknowledgment */
.disclosure { border-left: 4px solid var(--accent); margin-bottom: 18px; }
.disclosure h1 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 10px; }
.disclosure ul { margin: 0; padding-left: 20px; }
.disclosure li { margin: 0 0 9px; }
.ack { margin: 22px 0 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { margin-top: 4px; }
.doc-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 4px; }

/* documents rendered from markdown */
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.3; margin: 0 0 14px; }
.doc h2 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin: 30px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 15.5px; font-weight: 600; margin: 24px 0 8px; }
.doc h4 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; color: var(--ink-2); }
.doc p, .doc li { font-size: 14.5px; }
.doc blockquote { margin: 6px 0 10px 0; padding: 6px 14px; border-left: 3px solid var(--accent-line); background: var(--surface-2); font-family: var(--serif); font-size: 13.5px; color: var(--ink-2); }
.doc blockquote p { margin: 4px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 10px 0 16px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 9px; vertical-align: top; text-align: left; }
.doc th { background: var(--surface-2); font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.doc strong { font-weight: 600; }
.record > h1:first-child { font-size: 21px; }

/* score badges */
.scorebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.lv { display: inline-block; padding: 2px 9px; border-radius: 14px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-strong); background: var(--surface); white-space: nowrap; }
.lv small { font-weight: 400; color: var(--ink-2); }
.lv-m3, .lv-m4, .lv-er3, .lv-er4 { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.lv-m3 small, .lv-m4 small, .lv-er3 small, .lv-er4 small { color: var(--accent); }
.lv-m0, .lv-m1, .lv-er0, .lv-er1 { background: var(--sunken); }
.lv-na { color: var(--ink-3); }
.conf { font-size: 13px; }
.conf.confirmed { color: var(--accent); font-weight: 600; }
.conf.provisional { color: var(--ink-2); }
.conf.undetermined { color: var(--ink-3); font-style: italic; }
.cr { display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--danger); border: 1px solid var(--danger); vertical-align: middle; }

/* overview grid */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 900px; }
.grid th, .grid td { padding: 9px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid thead th { background: var(--surface-2); font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.grid thead tr:first-child th:nth-child(2) { border-left: 2px solid var(--line-strong); }
.grid thead tr:first-child th:nth-child(3), .grid tbody td:nth-child(5) { border-left: 2px solid var(--line-strong); }
.grid tbody td:nth-child(2) { border-left: 2px solid var(--line-strong); }
.grid tr.area th { background: var(--sunken); font-family: var(--serif); font-weight: 400; font-size: 14px; padding: 7px 11px; }
.grid td.crit { max-width: 360px; }
.grid .links { font-size: 12.5px; margin-top: 3px; }
.dist-row { display: flex; gap: 18px; flex-wrap: wrap; }
.dist { border-collapse: collapse; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dist caption { text-align: left; font-weight: 600; font-size: 13px; padding: 0 0 6px; color: var(--ink-2); }
.dist th, .dist td { padding: 5px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.dist th:first-child, .dist td:first-child { text-align: left; }
.dist th { background: var(--surface-2); font-weight: 600; font-size: 12.5px; }

/* full report */
.report .doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 30px; margin: 0 0 18px; }
.cover h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 30px 0 8px; }

@media (max-width: 720px) {
  .top { height: auto; flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
  .top nav a { padding: 5px 9px; }
  .card { padding: 18px; }
}

/* print: this is the PDF */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .top, .ribbon, .foot, .noprint, .pager, .crumbs, .top-right, nav { display: none !important; }
  main { padding: 0; max-width: none; }
  .card, .report .doc { border: 0; box-shadow: none; padding: 0; margin: 0 0 14pt; }
  .doc h2 { border-top: 0; page-break-after: avoid; }
  .doc h3, .doc h4 { page-break-after: avoid; }
  .doc table, .doc blockquote { page-break-inside: avoid; }
  .pb { page-break-before: always; }
  .cover { text-align: center; padding-top: 30vh; }
  a { color: inherit; text-decoration: none; }
  .lv, .conf, .cr { border-color: #999; color: #000; background: #fff; }
  .table-scroll { border: 0; overflow: visible; }
  .grid { min-width: 0; font-size: 9.5pt; }
  .disclosure { border-left: 3pt solid #000; padding-left: 12pt; }
  /* no fixed running footer: Chrome's PDF output lets fixed elements overlap
     body text. The cover page and the disclosure carry the restriction. */
}
