@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); }

:root {
  --bg: #141619;
  --surface: #1c1f23;
  --surface-2: #24282d;
  --line: #343940;
  --text: #ece9e4;
  --muted: #aaa69f;
  --orange: #ff7a1a;
  --orange-soft: #ff9d55;
  --orange-wash: rgba(255, 122, 26, 0.12);
  --ok: #7fd18b;
  --warn: #ffcf5c;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 72rem;
  --read: 42rem;
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--orange-soft); text-underline-offset: 0.18em; }
a:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: 0.005em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 4.2vw, 2.1rem); margin-top: 1.6em; }
h3 { font-size: 1.3rem; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
code, .mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.92em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--orange); color: var(--bg); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.read { max-width: var(--read); }

/* masthead */
.masthead { border-bottom: 1px solid var(--line); background: #101214; }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 1.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; font: 700 1.55rem/1 var(--display); letter-spacing: 0.01em; }
.brand svg { width: 2rem; height: 2rem; }
.brand b { color: var(--orange); font-weight: 700; }
.nav { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.nav a { display: block; padding: 0.45rem 0.6rem; border-radius: 6px; color: var(--muted); text-decoration: none; font: 600 1.02rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current] { color: var(--bg); background: var(--orange); }
@media (max-width: 40rem) {
  .masthead .wrap { padding-bottom: 0.35rem; }
  .nav { width: calc(100% + 1rem); margin-left: -0.5rem; }
  .nav a { padding: 0.5rem; font-size: 0.98rem; }
}

main { padding-bottom: 3rem; }

/* page heads */
.kicker { display: inline-block; margin-bottom: 0.7rem; color: var(--orange); font: 600 0.95rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.12em; }
.dek { color: var(--muted); font-size: 1.15rem; max-width: 40rem; }
.meta { color: var(--muted); font-size: 0.92rem; }
.page-head { padding: 2.2rem 0 0.6rem; }

/* home hero */
.hero { padding: 2rem 0 1.2rem; }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--orange); }

/* tools */
.tools { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .tools { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.tool { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.tool h2 { margin-top: 0; font-size: 1.6rem; }
.tool h2 span { color: var(--orange); }
.tool-note { color: var(--muted); font-size: 0.92rem; margin: 0.2rem 0 0.9rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span, .field legend { color: var(--muted); font: 600 0.85rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.08em; padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.field input, .field select {
  width: 100%; min-height: 2.9rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: 600 1.35rem/1 var(--display); font-variant-numeric: tabular-nums;
}
.field select { font-size: 1.1rem; }
.field input:focus, .field select:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px var(--orange-wash); }
.seg { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: 600 1.05rem/1 var(--display); cursor: pointer; font-variant-numeric: tabular-nums; }
.seg input:checked + span { border-color: var(--orange); background: var(--orange-wash); color: var(--orange-soft); }
.seg input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.readout { margin: 1rem 0 0.4rem; padding: 0.9rem 1rem; border-radius: 8px; background: var(--bg); border-left: 4px solid var(--orange); }
.readout .big { display: block; font: 700 clamp(2.4rem, 10vw, 3.2rem)/1 var(--display); color: var(--text); }
.readout .big small { font-size: 0.5em; color: var(--muted); margin-left: 0.2em; }
.readout p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.95rem; }
.readout.warn { border-left-color: var(--warn); }

.pct { width: 100%; border-collapse: collapse; margin-top: 0.7rem; font-size: 0.94rem; }
.pct caption { text-align: left; color: var(--muted); font-size: 0.88rem; padding-bottom: 0.3rem; }
.pct th, .pct td { padding: 0.25rem 0.45rem; border-bottom: 1px solid var(--line); text-align: right; }
.pct th:first-child, .pct td:first-child { text-align: left; }
.pct thead th { color: var(--muted); font: 600 0.82rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.08em; }
.pct tbody th { font-weight: 600; color: var(--orange-soft); }
.pct-grid { columns: 2; column-gap: 1rem; }

.barbell { margin: 0.8rem 0 0.3rem; background: var(--bg); border-radius: 8px; padding: 0.6rem; }
.barbell svg { display: block; width: 100%; }
.perside { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0 0; padding: 0; list-style: none; }
.perside li { padding: 0.3rem 0.55rem; border-radius: 6px; background: var(--surface-2); font: 600 1.05rem/1 var(--display); }

.tool-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; padding: 1rem 1.1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.tool-link p { margin: 0; }
.btn { display: inline-block; padding: 0.65rem 1rem; border-radius: 8px; background: var(--orange); color: var(--bg); text-decoration: none; font: 700 1.05rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; border: 0; cursor: pointer; }
.btn:hover { background: var(--orange-soft); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--orange-soft); border: 1px solid var(--orange); }

/* home sections */
.band { padding: 1.5rem 0 0.5rem; }
.split { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .split { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.worked { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.worked h3 { margin-top: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.3rem; margin-bottom: 0.8rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--orange-wash); color: var(--orange-soft); font: 700 1rem/1.6rem var(--display); text-align: center; }
.cards { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); padding: 0; list-style: none; }
.cards a { display: block; height: 100%; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.cards a:hover { border-color: var(--orange); }
.cards strong { display: block; font: 700 1.25rem/1.15 var(--display); margin-bottom: 0.35rem; }
.cards span { color: var(--muted); font-size: 0.95rem; }

/* articles */
.prose { max-width: var(--read); }
.prose li { margin-bottom: 0.4rem; }
.prose table, table.data { width: 100%; border-collapse: collapse; margin: 0.4rem 0 1.4rem; font-size: 0.98rem; }
.table-scroll { overflow-x: auto; margin: 0 0 1.4rem; }
.table-scroll table { margin-bottom: 0; }
table.data th, table.data td { padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data thead th { color: var(--muted); font: 600 0.82rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.08em; border-bottom-color: var(--muted); }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data caption { text-align: left; color: var(--muted); font-size: 0.92rem; padding-bottom: 0.5rem; }
.formula { display: block; margin: 0.6rem 0 1.2rem; padding: 0.9rem 1rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font: 600 1.5rem/1.3 var(--display); color: var(--text); overflow-x: auto; }
.formula var { font-style: normal; color: var(--orange-soft); }
.callout { margin: 1.2rem 0; padding: 0.9rem 1.1rem; border-radius: 8px; background: var(--orange-wash); border-left: 4px solid var(--orange); }
.callout p:last-child { margin-bottom: 0; }
.limits { margin: 1.6rem 0; padding: 0.9rem 1.1rem; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.limits strong { color: var(--text); }
.keypoints { margin: 1rem 0 1.4rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.keypoints h2 { margin-top: 0; font-size: 1.3rem; color: var(--orange-soft); }
.keypoints ul { margin: 0; padding-left: 1.1rem; }
.sources { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.93rem; color: var(--muted); }
.sources h2 { font-size: 1.35rem; color: var(--text); margin-top: 0.4rem; }
.sources li { margin-bottom: 0.55rem; }
.sources cite { font-style: normal; color: var(--text); }
.related { margin-top: 1.8rem; }
.related ul { padding-left: 1.1rem; }
.layout-aside { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .layout-aside { grid-template-columns: minmax(0, 1fr) 18rem; } .layout-aside aside { position: sticky; top: 1rem; align-self: start; } }

/* simulator */
.sim-out { margin-top: 1rem; }
.sim-out td.hit { color: var(--ok); }
.sim-out td.load { color: var(--orange-soft); font-weight: 600; }

/* app page */
.shots { display: grid; gap: 0.8rem; grid-template-columns: repeat(2, 1fr); padding: 0; list-style: none; }
@media (min-width: 56rem) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.shots figcaption { margin-top: 0.4rem; color: var(--muted); font-size: 0.9rem; }
.faq dt { font: 700 1.2rem/1.25 var(--display); margin-top: 1.1rem; }
.faq dd { margin: 0.3rem 0 0; color: var(--text); }
.pending { padding: 0.9rem 1.1rem; border-radius: 8px; border: 1px dashed var(--line); color: var(--muted); }

/* footer */
.footer { margin-top: 2rem; border-top: 1px solid var(--line); background: #101214; color: var(--muted); font-size: 0.93rem; }
.footer .wrap { display: grid; gap: 1rem; padding-top: 1.6rem; padding-bottom: 2rem; }
@media (min-width: 48rem) { .footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h2 { font-size: 1.05rem; color: var(--text); margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.35rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--orange-soft); }

.notfound { padding: 3rem 0; }
.notfound .code { font: 700 5rem/1 var(--display); color: var(--orange); }
.gpt-1x1 { width: 1px; height: 1px; overflow: hidden; }
table.data tr.outside th, table.data tr.outside td { color: var(--muted); }
table.data tr.current th { color: var(--orange-soft); }
.chart { margin-top: 1.6rem; }
.chart-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.35rem; margin: 0.6rem 0 0; padding: 0; list-style: none; }
.chart-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-size: 0.95rem; }
.chart-list b { font: 700 1.05rem/1.2 var(--display); color: var(--orange-soft); white-space: nowrap; }
.chart-list span { text-align: right; }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: 0.45rem; }
.pair { display: grid; gap: 0.2rem; }
.pair span { color: var(--muted); font: 600 0.95rem/1 var(--display); }
.pair input { width: 100%; min-height: 2.6rem; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: 600 1.2rem/1 var(--display); }
.pair input:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px var(--orange-wash); }
.pct td.exact { color: var(--muted); font-size: 0.88rem; }
.mono { overflow-x: auto; }
.figures { display: grid; gap: 1rem; margin: 0.5rem 0 1rem; }
@media (min-width: 48rem) { .figures { grid-template-columns: 1fr 1fr; } }
.figures .barbell { margin: 0; }
.split > .prose > h2:first-child, .split > .prose > .callout:first-child { margin-top: 0; }
table.data th.group { padding-top: 0.9rem; color: var(--orange-soft); font: 700 1rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.sources a { overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  table.data th, table.data td { padding: 0.4rem 0.3rem; font-size: 0.93rem; }
}
table.data td small { display: block; color: var(--muted); font-size: 0.85em; }
.app-showcase { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center; padding: 1.5rem; border: 1px solid #2c3138; border-radius: 14px; background: linear-gradient(135deg, #1b1e23 0%, #24211e 100%); }
.app-showcase ul { margin: 0 0 1.2rem; padding-left: 1.2rem; }
.app-showcase li { margin-bottom: 0.4rem; }
.app-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 0; }
.app-screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; align-items: end; }
.app-screens a { display: block; }
.app-screens img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid #353b44; box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.75); }
@media (min-width: 56rem) {
  .app-showcase { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); padding: 2rem; }
}
