/* band.solutions — theme_10 Nordic Ice Decision Matrix */
:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --ink: #102a43;
  --muted: #486581;
  --accent: #0284c7;
  --accent-soft: #e0f2fe;
  --line: #dbe4ee;
  --grid: #e8eef5;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
a { color: var(--accent); }
code, pre, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Matrix layout: TOC rail + content ---------- */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }

.rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.rail .brand { font-size: 20px; font-weight: 800; color: var(--ink); text-decoration: none; display: block; margin-bottom: 4px; letter-spacing: -0.02em; }
.rail .brand em { color: var(--accent); font-style: normal; }
.rail .tagline { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.rail nav ul { list-style: none; margin: 0; padding: 0; }
.rail nav a {
  display: block; padding: 7px 10px; margin: 2px 0;
  color: var(--muted); text-decoration: none; font-size: 14px;
  border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
}
.rail nav a:hover { color: var(--ink); background: #eef4fa; }
.rail nav a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.rail .rail-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rail .rail-foot a { color: var(--muted); }
#rail-toggle { display: none; }

.content { min-width: 0; }
.wrap { max-width: 920px; margin: 0 auto; padding: 40px 32px 80px; }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 32px; border-bottom: 1px solid var(--line); }
.hero .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.hero h1 { font-size: clamp(30px, 4.5vw, 46px); margin: 0 0 14px; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 64ch; margin: 0 0 20px; }

/* ---------- Above-fold disclosure ---------- */
.notice { margin: 20px 0 8px; }
.notice .bar {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 12px 16px; font-size: 14px; border-radius: 6px;
}
.notice .bar a { color: var(--accent); }

/* ---------- Cards / sections ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px; margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04);
}
.card h3 { margin: 0 0 8px; font-size: 20px; }
section.module { scroll-margin-top: 20px; margin-bottom: 8px; }
section.module > h2 { font-size: 26px; margin: 36px 0 4px; }
section.module > .sub { color: var(--muted); margin: 0 0 18px; max-width: 72ch; }
section.domain { margin-top: 44px; }
section.domain h2 { font-size: 24px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Decision-matrix strip ---------- */
.methodology { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.methodology .m {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  border-top: 3px solid var(--accent);
}
.methodology .m .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.methodology .m h3 { margin: 6px 0 6px; font-size: 17px; }
.methodology .m p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type="text"], input[type="number"], input[type="range"], select, textarea {
  font: inherit; font-size: 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
}
input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 8px 10px;
}
input[type="range"] { width: 100%; accent-color: var(--accent); padding: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
select[multiple] { min-height: 140px; }

/* ---------- Buttons ---------- */
button, .btn {
  appearance: none; cursor: pointer; border-radius: 6px;
  border: 1px solid var(--accent); background: var(--accent);
  color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 16px;
}
button:hover, .btn:hover { background: #0369a1; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button.ghost:hover { background: var(--accent-soft); }

/* ---------- Stats / badges / matrix tables ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #eef4fa; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 700; }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); margin: 2px 4px 2px 0;
}
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
.badge.bad { color: var(--bad); border-color: var(--bad); }
.badge.info { color: var(--accent); border-color: var(--accent); }
.verdict-pass { color: var(--ok); }
.verdict-warn { color: var(--warn); }
.verdict-fail { color: var(--bad); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
tbody tr:hover { background: #f6fafd; }
tr.sev-fail td:first-child { border-left: 3px solid var(--bad); }
tr.sev-warn td:first-child { border-left: 3px solid var(--warn); }
tr.sev-info td:first-child { border-left: 3px solid var(--accent); }
tr.row-active { background: var(--accent-soft); }

.out, pre.out {
  background: #f7fafc; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; overflow-x: auto; font-size: 13px;
}
pre.out { white-space: pre-wrap; word-break: break-all; max-height: 340px; overflow-y: auto; }
#payload-view { width: 100%; min-height: 180px; }
#receipt-sha, .mono { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv span { color: var(--muted); }
.kv strong { font-family: var(--mono); font-weight: 600; text-align: right; }

/* ---------- SVG chart ---------- */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.chart svg { width: 100%; height: auto; display: block; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 28px 0; margin-top: 40px;
}
.foot .wrap { padding-top: 0; padding-bottom: 0; }
.foot p { margin: 6px 0; font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .rail {
    position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 16px 20px;
  }
  .rail nav { display: none; }
  .rail.open nav { display: block; }
  #rail-toggle {
    display: inline-block; margin-top: 10px;
    background: transparent; color: var(--accent); border: 1px solid var(--accent);
  }
  .wrap { padding: 24px 18px 60px; }
}
