/* styles.css — theme_10 "Nordic Ice Decision Matrix" */
:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --ink: #102a43;
  --accent: #0284c7;
  --muted: #486581;
  --line: #d9e2ec;
  --good: #0e7490;
  --warn: #b45309;
  --bad: #be123c;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
code { background: #e4eef7; padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.muted { color: var(--muted); font-size: 0.9em; }
.sub { display: block; color: var(--muted); font-size: 0.82em; font-weight: 400; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 0.95rem; }
nav a:hover, nav a:focus-visible { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* disclosure banner — above the fold */
.disclosure-banner { background: #e0f2fe; border-bottom: 1px solid #bae6fd; color: #0c4a6e; font-size: 0.88rem; }
.disclosure-banner .wrap { padding-top: 8px; padding-bottom: 8px; }
.disclosure-banner a { color: #0369a1; }

/* hero */
.hero { padding: 56px 20px 32px; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 14px; letter-spacing: -0.03em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.hero-facts li strong { color: var(--accent); }

/* sections */
.section { padding: 36px 20px; }
.section h2 { font-size: 1.5rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.section-sub { color: var(--muted); max-width: 70ch; margin: 0 0 20px; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(16,42,67,0.06); }
.panel h3 { margin: 0 0 14px; font-size: 1.05rem; }
.workbench-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; }
@media (max-width: 860px) { .workbench-grid { grid-template-columns: 1fr; } }

/* form */
.field-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field-row.two label { grid-column: 1 / -1; }
input[type="number"], select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); width: 100%;
}
.field-row.two input, .field-row.two select { width: 100%; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 0.9rem; }
.weights { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.weights legend { font-size: 0.85rem; font-weight: 700; color: var(--muted); padding: 0 6px; }
.weight-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; margin: 8px 0; font-size: 0.88rem; }
.weight-row output { min-width: 1.6em; text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }

/* eval result */
.eval-ok { background: #ecfeff; border: 1px solid #a5f3fc; color: #155e75; border-radius: 8px; padding: 10px 12px; font-size: 0.88rem; margin-bottom: 10px; }
.eval-bad { background: #fff1f2; border: 1px solid #fecdd3; color: var(--bad); border-radius: 8px; padding: 10px 12px; font-size: 0.88rem; margin-bottom: 10px; }
.eval-warn { background: #fffbeb; border: 1px solid #fde68a; color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; margin-bottom: 10px; }

/* tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
td.rank { color: var(--muted); font-variant-numeric: tabular-nums; width: 2.2em; }
td.score { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
td.cost { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.over-budget td { background: #fff7ed; }
.scores { display: flex; gap: 4px; }
.scores .crit { display: inline-block; min-width: 1.6em; text-align: center; background: #e4eef7; border-radius: 4px; font-size: 0.78rem; padding: 1px 4px; font-variant-numeric: tabular-nums; }
#catalogue-head .scores span { display: inline-block; min-width: 2.2em; text-align: center; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #ecfeff; border: 1px solid #a5f3fc; color: #155e75; border-radius: 999px; padding: 5px 12px; font-size: 0.85rem; }

/* SVG chart */
#tradeoff-svg { width: 100%; height: auto; display: block; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); }
#tradeoff-svg .plot-bg { fill: var(--surface); }
#tradeoff-svg .grid { stroke: var(--line); stroke-width: 1; }
#tradeoff-svg .tick { fill: var(--muted); font-size: 11px; font-family: system-ui, sans-serif; }
#tradeoff-svg .axis-label { fill: var(--ink); font-size: 12px; font-weight: 600; }
#tradeoff-svg .legend { font-size: 12px; font-weight: 700; }
#tradeoff-svg .legend.lat { fill: var(--accent); }
#tradeoff-svg .legend.cost { fill: var(--warn); }
#tradeoff-svg .line-lat { stroke: var(--accent); stroke-width: 2.5; }
#tradeoff-svg .line-cost { stroke: var(--warn); stroke-width: 2; stroke-dasharray: 6 4; }
#tradeoff-svg .ceiling { stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 4 4; }

/* checklist */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
#checklist-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.25s ease; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; }
.checklist input { margin-top: 3px; accent-color: var(--accent); }

/* export */
.export-panel { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
@media (max-width: 700px) { .export-panel { grid-template-columns: 1fr; } }
.export-actions { display: flex; flex-direction: column; gap: 10px; }
button {
  font: inherit; font-weight: 700; cursor: pointer; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; padding: 10px 18px;
}
button:hover { background: #0369a1; }
.receipt { background: var(--ink); color: #dbeafe; border-radius: 8px; padding: 14px; font-size: 0.82rem; overflow-x: auto; margin: 0; min-height: 4em; }

/* guides */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.guide-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--accent); }
.guide-card p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* footer */
.site-footer { background: var(--ink); color: #dbeafe; margin-top: 40px; padding: 32px 0; }
.site-footer a { color: #7dd3fc; }
.site-footer nav { margin: 12px 0; }
.site-footer nav a { margin-right: 18px; }
.site-footer .muted { color: #93c5fd; }
