/* styles.css — theme_10 "Nordic Ice Decision Matrix" for whydahs.com
   Tokens: bg #f0f4f8 · surface #ffffff · ink #102a43 · accent #0284c7 · muted #486581 */

:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --ink: #102a43;
  --accent: #0284c7;
  --accent-ink: #0369a1;
  --muted: #486581;
  --hairline: #d9e2ec;
  --hairline-soft: #e8eef5;
  --pass: #15803d;
  --warn: #a16207;
  --fail: #b91c1c;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.masthead-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 40px;
  text-align: center;
}

.disclosure-strip {
  margin: 0;
  padding: 10px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-align: center;
}
.disclosure-strip a { color: var(--accent-ink); }

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 36px 0 14px;
}

h1 {
  font-size: clamp(44px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 800;
}
h1 .dot { color: var(--accent); }

.lede {
  max-width: 60ch;
  margin: 0 auto 20px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Shell ---------- */

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.module {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.module-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 22px;
  text-align: center;
}
.module-head > div { text-align: left; }

.mod-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
  text-align: center;
}

.module h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hint { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 68ch; }

/* ---------- Form grid ---------- */

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
@media (max-width: 720px) {
  .col-4, .col-6, .col-8 { grid-column: span 12; }
}

.field {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="text"], .field input[type="number"], .field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.field input[type="range"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  accent-color: var(--accent);
}
.field output {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.field-check { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.field-check input { accent-color: var(--accent); }
.field-inline { max-width: 320px; }
.field-inline select { margin-top: 6px; }

.field input:focus, .field select:focus { border-color: var(--accent); }

.weights {
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 14px 18px 16px;
  background: var(--surface);
}
.weights legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
}
.weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 24px;
}

.features {
  margin-top: 4px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px 16px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  background: var(--surface);
}
.features legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
}
.features label { display: flex; align-items: center; gap: 7px; }
.features input[type="checkbox"] { accent-color: var(--accent); }

/* ---------- Verdict + tables ---------- */

.verdict {
  margin: 22px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--hairline);
  border-left: 5px solid var(--pass);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.verdict.warn { border-left-color: var(--warn); }
.verdict.fail { border-left-color: var(--fail); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  margin-top: 18px;
}

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}
table.ledger th, table.ledger td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
table.ledger thead th {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
table.ledger tbody tr:last-child td { border-bottom: 0; }

.st-pass { color: var(--pass); font-weight: 700; }
.st-warn { color: var(--warn); font-weight: 700; }
.st-fail { color: var(--fail); font-weight: 700; }

.catalog-note {
  margin: 14px 2px 0;
  font-size: 13px;
  color: var(--muted);
}
.catalog-note code, .ref-p code, .hint code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- KPI strip ---------- */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kpi-box {
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
}
.kpi-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi-num {
  font-size: 21px;
  font-weight: 800;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.kpi-box.warn .kpi-num { color: var(--warn); }

/* ---------- Chart + split ---------- */

.split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.chart-panel { margin: 0; padding: 14px; }
.col-side { margin-top: 0; border: 0; border-radius: 0; }
.chart-caption {
  padding: 0 14px 14px;
  font-size: 12px;
  color: var(--muted);
}
.empty-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--hairline);
  border-radius: 8px;
}

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Checklist ---------- */

.checklist-score {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--hairline);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  columns: 2;
  column-gap: 0;
}
@media (max-width: 640px) { .checklist { columns: 1; } }
.checklist li {
  padding: 10px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  break-inside: avoid;
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
}
.checklist li .cid { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 30px; }
.checklist li .mk { font-weight: 700; min-width: 36px; }

/* ---------- Actions / code ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.status-line { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.code-box {
  margin: 0;
  padding: 18px;
  background: var(--ink);
  color: #e8eef5;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  border-radius: 12px;
  overflow: auto;
  white-space: pre;
  max-height: 420px;
}

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  padding: 0;
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
}
.faq-item summary::before { content: "+ "; color: var(--accent); font-family: var(--mono); }
.faq-item[open] summary::before { content: "− "; }
.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--muted);
  max-width: 68ch;
}

/* ---------- Reference ---------- */

.ref-h {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ref-p { font-size: 14.5px; color: var(--ink); margin: 0 0 12px; max-width: 62ch; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding: 32px 24px 48px;
  max-width: 960px;
  margin: 0 auto;
  font-size: 13.5px;
  text-align: center;
}
.site-footer p { margin: 0 0 8px; }
.legal-links a { margin: 0 10px; }
.fine { color: var(--muted); font-size: 12px; margin-top: 12px !important; }
