:root {
  --bg: #0b0b0c; --bg2: #111113; --surface: #141416; --chip: #1b1b1e; --line: #26262a; --line2: #33333a;
  --ink: #f4f4f5; --muted: #9a9aa3; --accent: #ff4400; --accent2: #ff8a3d; --accent-soft: rgba(255, 68, 0, 0.14);
  --blue: #ff4400; --orange: #ffb347; --aqua: #37d3a2; --red: #ff5c5c; --grey: #5b5b63;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(11, 11, 12, 0.78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand i { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: inline-block; }
.links { display: flex; gap: 4px; }
.links a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.links a:hover { color: var(--ink); background: var(--chip); }
.cta { font-size: 14px; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; white-space: nowrap; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%); opacity: 0.55; }
.hero::after { content: ""; position: absolute; width: 720px; height: 720px; right: -200px; top: -260px; background: radial-gradient(circle, rgba(255, 68, 0, 0.35), transparent 62%); filter: blur(10px); }
.hero .wrap { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 88px; }
.label { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent2); }
.hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: 0.98; letter-spacing: -0.045em; margin: 22px 0 22px; font-weight: 700; max-width: 900px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 680px; margin: 0; }
.lede b { color: var(--ink); font-weight: 600; }
.hero-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 0 0 6px var(--accent-soft); }
.btn.primary:hover { background: #ff5a1f; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 72px; border: 1px solid var(--line); border-radius: 16px; background: rgba(20, 20, 22, 0.7); }
.stat { padding: 20px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 32px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

/* sections */
section.block { padding: 96px 0; border-bottom: 1px solid var(--line); }
.head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin-bottom: 40px; }
.head .label { padding-top: 12px; }
h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 16px; font-weight: 700; }
h2 + p, .intro { color: var(--muted); max-width: 720px; margin: 0; font-size: 17px; }
.intro b, .prose b { color: var(--ink); font-weight: 600; }
.prose p { color: var(--muted); font-size: 18px; max-width: 760px; margin: 0 0 16px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; min-width: 0; }
.panel + .panel { margin-top: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card3 { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; position: relative; overflow: hidden; }
.card3 .num { font: 500 13px var(--mono); color: var(--accent2); }
.card3 h3 { font-size: 22px; letter-spacing: -0.02em; margin: 14px 0 10px; line-height: 1.2; }
.card3 p { color: var(--muted); margin: 0; font-size: 15px; }
.card3.hi { background: linear-gradient(160deg, rgba(255, 68, 0, 0.16), var(--surface) 55%); border-color: rgba(255, 68, 0, 0.45); }

/* controls */
.inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; margin-bottom: 18px; }
label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }
.val { color: var(--ink); font-weight: 600; text-transform: none; }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 24px; }
select { font: 500 15px var(--sans); color: var(--ink); background: var(--chip); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.toggle { display: inline-flex; align-items: center; gap: 12px; font: 500 15px var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); cursor: pointer; padding: 10px 16px; border: 1px solid var(--line2); border-radius: 999px; margin-bottom: 8px; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line2); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { left: 19px; }
.viz { width: 100%; height: auto; display: block; }
.result { background: var(--chip); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin: 16px 0 0; color: var(--ink); font-size: 15px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.card .cap { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card.good { border-color: rgba(255, 68, 0, 0.45); }
.big { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin: 6px 0 10px; }

/* tabs */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { font: 500 14px var(--sans); border: 1px solid var(--line2); background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 38px; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.figwrap { background: #fff; border-radius: 14px; padding: 14px; }
.figwrap img { display: block; width: 100%; height: auto; margin: 0 auto; }
.chart { position: relative; height: 380px; }

/* closing */
.quote { font-size: clamp(24px, 3.2vw, 38px); line-height: 1.2; letter-spacing: -0.03em; font-weight: 600; max-width: 900px; margin: 0 0 24px; }
.quote em { font-style: normal; color: var(--accent2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--chip); padding: 2px 6px; border-radius: 6px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; padding: 36px 20px 48px; }

@media (max-width: 900px) {
  .links { display: none; }
  .head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hero .wrap { padding-top: 64px; padding-bottom: 56px; }
  section.block { padding: 64px 0; }
  .panel, .card3 { padding: 20px; border-radius: 16px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .chart { height: 320px; }
  .big { font-size: 36px; }
}

.sym { text-transform: none; font-style: italic; letter-spacing: 0; }
