:root {
  --bg: #0E1113;
  --surface: #151A1D;
  --surface-2: #1B2125;
  --border: #2A3136;
  --text: #E8E6E1;
  --muted: #9AA09F;
  --faint: #5F6669;
  --heat: #F2A33A;
  --heat-dim: #B9771F;
  --cool: #4FB3BF;
  --stamp: #D9463B;
  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1180px;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(242,163,58,0.10), transparent 60%);
}
a { color: var(--cool); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 800; }
h1 em { font-style: normal; color: var(--heat); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

/* marking */
.marking {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 8px 24px; background: #15090A; border-bottom: 1px solid rgba(217,70,59,0.35);
  font-family: var(--font-mono); font-size: 0.74rem; color: #E9B3AE; letter-spacing: 0.06em; text-transform: uppercase;
}
.marking-stamp {
  display: inline-block; padding: 2px 8px; border: 2px solid var(--stamp); color: var(--stamp);
  font-weight: 700; letter-spacing: 0.14em; transform: rotate(-1.5deg); border-radius: 3px;
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: rgba(14,17,19,0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; color: var(--heat); flex: 0 0 auto; }
.logo-footer { width: 56px; height: 56px; display: block; margin-bottom: 14px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); font-size: 0.95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta { color: var(--heat) !important; border: 1px solid var(--heat-dim); padding: 6px 12px; border-radius: 999px; }

/* layout */
.hero, .section, .kpis, .site-footer { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 48px; }
.eyebrow { color: var(--heat); margin-bottom: 14px; text-transform: uppercase; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.byline { color: var(--faint); }
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; font-family: var(--font-body); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--heat); color: #1A1206; }
.btn-primary:hover { background: #F7B45A; }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }

.hero-art { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.plan-svg { width: 100%; max-width: 520px; height: auto; }
.svg-label { font-family: var(--font-mono); font-size: 11px; fill: var(--text); letter-spacing: 0.08em; }
.svg-label-sm { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted); }
.legend { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding: 0; margin: 0; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.sw-rack { background: #3B4650; } .sw-coil { background: var(--cool); } .sw-intake { background: #2A3136; border: 1px solid var(--muted); } .sw-flue { background: var(--heat); }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 12px; padding-bottom: 56px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.kpi-value { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.1; }
.kpi-unit { font-size: 1rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.kpi-label { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

/* sections */
.section { padding-top: 72px; padding-bottom: 72px; }
.section-alt { position: relative; }
.section-alt::before { content: ""; position: absolute; inset: 0 -100vw; background: var(--surface); z-index: -1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-lede { color: var(--muted); font-size: 1.08rem; }
.design-grid, .adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.section-alt .card { background: var(--surface-2); }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card-accent { border-color: var(--heat-dim); background: linear-gradient(180deg, rgba(242,163,58,0.08), transparent 70%), var(--surface); }
.card-accent h3 { color: var(--heat); }
.section-figure { margin: 48px 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.section-svg { width: 100%; height: auto; display: block; }
figcaption { color: var(--muted); margin-top: 10px; }

.adv { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.adv-num { position: absolute; top: 18px; right: 20px; color: var(--heat); font-size: 0.9rem; }
.adv p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* numbers */
.numbers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 6px; overflow-x: auto; }
.num-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.num-table caption { text-align: left; color: var(--heat); padding: 8px 6px 12px; text-transform: uppercase; }
.num-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.num-table td { padding: 11px 6px; border-bottom: 1px solid rgba(42,49,54,0.6); color: var(--text); }
.num-table tr:last-child td { border-bottom: none; }
.num-table td.num { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--heat); white-space: nowrap; }
.num-table tr.ref td { color: var(--muted); }
.num-table tr.ref td.num { color: var(--muted); font-weight: 700; }
.wue { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.wue-card { background: var(--surface); border: 1px solid var(--cool); border-radius: var(--radius); padding: 24px; }
.wue-card .eyebrow { color: var(--cool); }
.wue-card p:last-child { margin: 0; color: var(--muted); font-size: 0.98rem; }
.wue-big { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--text); margin: 0 0 10px; }
.wue-big span { color: var(--cool); }
.wue-card-muted { border-color: var(--border); }
.footnote { color: var(--faint); margin-top: 22px; max-width: 90ch; }

/* open items */
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 18px; display: flex; flex-direction: column; }
.item-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.item-id { color: var(--heat); font-size: 0.8rem; }
.item h3 { margin: 0; font-size: 1.1rem; }
.item-body { color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; flex: 1; }
.item form { display: grid; gap: 10px; }
.item label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text); letter-spacing: 0.03em; }
.item textarea, .item input, .admin-form input {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-family: var(--font-body); font-size: 0.95rem;
}
.item textarea { min-height: 96px; resize: vertical; }
.item textarea:focus, .item input:focus, .admin-form input:focus { outline: 2px solid var(--cool); outline-offset: 1px; border-color: var(--cool); }
.item .row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.item .btn { padding: 9px 16px; font-size: 0.9rem; }
.item .status { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cool); min-height: 1.2em; }
.item .status.err { color: var(--stamp); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; }
.site-footer .mono:first-child { color: var(--stamp); }
.footer-small { color: var(--faint); max-width: 36ch; text-align: right; }
.footer-small a { color: var(--faint); }

/* admin */
.admin { position: fixed; inset: 0; background: var(--bg); z-index: 50; overflow: auto; padding: 48px 24px; }
.admin[hidden] { display: none; }
.admin-inner { max-width: 900px; margin: 0 auto; }
.admin-form { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; margin-bottom: 20px; }
.admin-form label { font-family: var(--font-mono); font-size: 0.8rem; }
.admin-out .entry { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.admin-out .entry .meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); margin-bottom: 8px; }
.admin-out .entry p { margin: 0; white-space: pre-wrap; }
.admin-out .toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .design-grid, .adv-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 1.9rem; }
  .design-grid, .adv-grid, .numbers-grid, .wue, .items { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .footer-small { text-align: left; }
  .admin-form { grid-template-columns: 1fr; }
}
.footnote-joke { color: var(--muted); border-left: 2px solid var(--heat-dim); padding-left: 12px; margin-top: 14px; }

/* goal */
.goal { max-width: var(--max); margin: 0 auto; padding: 0 24px 64px; }
.goal-line { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; border-top: 1px solid var(--border); padding-top: 28px; }
.goal-word { color: var(--stamp); text-transform: uppercase; letter-spacing: 0.14em; }
.goal-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 4rem); color: var(--text); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.goal-sep { color: var(--heat); font-size: 2rem; }
.goal-note { color: var(--muted); max-width: 78ch; margin: 0; }
.footer-left { text-align: left; max-width: none; margin-top: 6px; }
.site-footer > div { flex: 1 1 560px; }
.site-footer > .footer-small { flex: 0 1 36ch; }
