:root {
  --paper: #E6ECE0;
  --sheet: #F5F7F1;
  --ink: #121B33;
  --ink2: #333E5A;
  --muted: #5C6682;
  --line: #C3CDBB;
  --seal: #B3261E;
  --teal: #00897B;
  --tealink: #0A5E54;
  --indigo: #3B4FA0;
  --brass: #B07A12;
  --radius: 6px;
  --display: "Familjen Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --read: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--read); font-size: 1.0625rem; line-height: 1.65; }
img, svg { max-width: 100%; }
a { color: var(--tealink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3, h4, .ui { font-family: var(--display); }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: 1.02; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 20px; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.015em; font-weight: 600; margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink2); max-width: 56ch; }
.small { font-size: 0.9rem; color: var(--muted); }
.ui-text { font-family: var(--display); }

/* header */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; transform: rotate(-12deg); color: #fff; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { font-family: var(--display); color: #D8DEEE; text-decoration: none; padding: 8px 12px; border-radius: 4px; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: #24304F; color: #fff; }
.nav a.cta { background: var(--seal); color: #fff; font-weight: 600; margin-left: 8px; }
.nav a.cta:hover { background: #8F1D17; }
@media (max-width: 860px) { .top .wrap { flex-wrap: wrap; padding: 8px 0; } .nav { margin-left: 0; width: 100%; } .nav a { padding: 6px 9px; font-size: 0.92rem; } }

/* buttons */
.btn { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.02rem; padding: 12px 22px; border-radius: 4px; border: 2px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: #24304F; color: #fff; }
.btn.alt { background: transparent; color: var(--ink); }
.btn.alt:hover { background: var(--ink); color: #fff; }
.btn.seal { background: var(--seal); border-color: var(--seal); }
.btn.seal:hover { background: #8F1D17; border-color: #8F1D17; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* sections */
.section { padding: clamp(40px, 6vw, 84px) 0; }
.section.sheet { background: var(--sheet); border-block: 1px solid var(--line); }
.section.dark { background: var(--ink); color: #E9EDF7; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark a { color: #9FE0D6; }
.section-head { margin-bottom: 28px; max-width: 760px; }

/* hero */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 44px; } }
.hero h1 { max-width: 14ch; }

/* ledger frame: perforated stub edge, the one memorable surface */
.ledger { position: relative; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 28px clamp(16px, 3vw, 30px) 22px; }
.ledger::before { content: ""; position: absolute; left: 12px; right: 12px; top: 10px; height: 8px; background: radial-gradient(circle at 5px 4px, var(--paper) 0 3px, transparent 3.6px) 0 0 / 14px 8px repeat-x; }
.ledger h3 { margin-top: 6px; }
.ledger-note { font-family: var(--display); font-size: 0.88rem; color: var(--muted); margin-top: 10px; }
.ledger + .ledger { margin-top: 22px; }

/* receipts */
.rc { font-family: var(--display); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; color: var(--seal); background: transparent; border: 1.5px solid var(--seal); border-radius: 3px; padding: 1px 6px; margin-left: 6px; cursor: pointer; vertical-align: middle; line-height: 1.4; }
.rc:hover, .rc[aria-expanded="true"] { background: var(--seal); color: #fff; }
.rc-pop { position: absolute; z-index: 60; width: min(360px, 92vw); background: #fff; border: 1.5px solid var(--seal); border-radius: 4px; padding: 12px 14px; box-shadow: 0 6px 0 rgba(179, 38, 30, 0.12); font-family: var(--display); font-size: 0.9rem; line-height: 1.4; }
.rc-pop b { display: block; color: var(--ink); }
.rc-pop span { color: var(--muted); display: block; margin: 2px 0 6px; }
.rc-pop hr { border: 0; border-top: 1px dashed var(--line); margin: 8px 0; }
.rc-pop a { word-break: break-all; }

/* charts */
.chart { width: 100%; position: relative; font-family: var(--display); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--display); fill: var(--ink2); }
.chart .axis text { fill: var(--muted); font-size: 12px; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .mark { cursor: pointer; }
.chart .mark:focus-visible { outline: none; }
.chart .mark:focus-visible .ring, .chart .mark:hover .ring { stroke: var(--ink); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; z-index: 40; background: var(--ink); color: #fff; font-family: var(--display); font-size: 0.86rem; line-height: 1.35; padding: 8px 10px; border-radius: 4px; max-width: 260px; opacity: 0; transition: opacity 0.12s; }
.tip.on { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--display); font-size: 0.88rem; color: var(--ink2); margin: 8px 0 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
details.tbl { margin-top: 12px; font-family: var(--display); font-size: 0.9rem; }
details.tbl summary { cursor: pointer; color: var(--tealink); font-weight: 600; }
details.tbl table { border-collapse: collapse; width: 100%; margin-top: 8px; font-variant-numeric: tabular-nums; }
details.tbl th, details.tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* big readout */
.readout { font-family: var(--display); font-variant-numeric: tabular-nums; }
.readout .big { font-size: clamp(1.35rem, 2.2vw, 1.8rem); overflow-wrap: anywhere; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.readout .cap { font-size: 0.92rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--sheet); }
.stats > div { padding: 20px 22px; border-right: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.stats .big { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats p { font-size: 0.95rem; margin: 6px 0 0; color: var(--ink2); }

/* calculators */
.calc { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .calc { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
.fields { display: grid; gap: 12px; align-content: start; }
label { font-family: var(--display); font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 4px; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=number], input[type=email], input[type=tel], select, textarea { width: 100%; font: inherit; font-family: var(--display); font-size: 1rem; padding: 10px 12px; border: 1.5px solid var(--ink2); border-radius: 4px; background: #fff; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--seal); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--display); font-weight: 400; font-size: 0.95rem; }
.check input { margin-top: 5px; }

/* cards in a list, not a grid of identical tiles */
.pledges { counter-reset: p; list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--ink); }
.pledges li { counter-increment: p; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.pledges li::before { content: counter(p); font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--seal); }
.pledges b { font-family: var(--display); font-size: 1.1rem; display: block; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 700; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; }
.steps b { font-family: var(--display); }

.two { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } }

.notice { border-left: 5px solid var(--seal); background: #fff; padding: 14px 18px; font-family: var(--display); font-size: 1rem; margin: 20px 0; max-width: 760px; }
.notice.good { border-left-color: var(--teal); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-family: var(--display); font-size: 0.98rem; margin: 0 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-family: var(--display); font-size: 0.82rem; font-weight: 600; border: 1.5px solid var(--ink2); border-radius: 3px; padding: 1px 8px; margin: 0 6px 6px 0; }
.tag.seal { border-color: var(--seal); color: var(--seal); }
.tag.teal { border-color: var(--tealink); color: var(--tealink); }

/* project timeline */
.tl { position: relative; margin: 18px 0 4px; padding-left: 26px; border-left: 2px solid var(--ink); }
.tl > div { position: relative; padding: 0 0 18px 8px; }
.tl > div::before { content: ""; position: absolute; left: -35px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--sheet); border: 3px solid var(--ink); }
.tl > div.now::before { border-color: var(--seal); background: var(--seal); }
.tl > div.end::before { border-color: var(--teal); }
.tl b { font-family: var(--display); }
.tl span { display: block; font-family: var(--display); font-size: 0.88rem; color: var(--muted); }

/* footer */
.foot { background: var(--ink); color: #C9D1E6; padding: 44px 0 30px; font-family: var(--display); font-size: 0.95rem; }
.foot a { color: #fff; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot h4 { margin: 0 0 8px; color: #fff; font-size: 1rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 4px 0; }
.legal { border-top: 1px solid #2C3857; margin-top: 28px; padding-top: 16px; font-size: 0.85rem; color: #9AA5C2; max-width: 80ch; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tip { transition: none; } }
@media print { .top, .foot, .nav { display: none; } body { background: #fff; } }

/* grid children may shrink below their content width */
.split > *, .two > *, .calc > *, .hero-grid > * { min-width: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 10px; } .kv dt { font-size: 0.85rem; } }

/* comparison table */
table.cmp { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px dashed var(--line); }
table.cmp thead th { border-bottom: 1.5px solid var(--ink); font-family: var(--display); }
table.cmp tbody th { font-family: var(--display); width: 22%; }
@media (max-width: 600px) { table.cmp { font-size: 0.9rem; } table.cmp th, table.cmp td { padding: 8px 6px; } }
