/* Content pages (guides, exercises, tools). Tokens mirror web/index.html. */
:root {
  --bg: #0E0E0E; --surface: #1A1A1A; --surface-2: #141414; --line: #262626; --chip: #2C2C2C;
  --text: #F4F3EF; --text-2: #B9B8B3; --text-3: #8A8A86; --muted: #6B6B6B;
  --paper: #EFEEEA; --paper-edge: #A9A8A3; --paper-line: #D6D4CE; --ink: #0E0E0E; --ink-2: #4A4A47;
  --orange: #FF6B00; --orange-edge: #A84700;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, Menlo, monospace;
  --max: 1120px; --read: 720px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.d { font-family: var(--display); font-stretch: 125%; letter-spacing: -0.02em; }
.m { font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 24px; border: 0; border-radius: 14px;
  background: var(--orange); color: var(--ink); text-decoration: none; cursor: pointer;
  font: 700 16px/1 var(--display); font-stretch: 125%; letter-spacing: -0.01em; box-shadow: 0 4px 0 var(--orange-edge);
  transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--orange-edge); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--orange-edge); }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--orange-edge); }

/* Header */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(14,14,14,.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--bg); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); font-stretch: 125%; letter-spacing: -0.03em; text-decoration: none; }
.brand i { width: 28px; height: 28px; border-radius: 8px; background: var(--orange); display: grid; place-items: center; }
.nav-r { display: flex; align-items: center; gap: 14px; }
.lang { font: 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); display: flex; gap: 10px; }
.lang a { text-decoration: none; padding: 6px 2px; }
.lang a[aria-current] { color: var(--text); }

/* Hero */
.crumbs { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font: 12px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.hero { padding: 36px 0 12px; display: grid; gap: 18px; }
.eyebrow { font: 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.hero h1 { margin: 0; font: 760 clamp(36px, 3.6vw + 18px, 76px)/0.98 var(--display); font-stretch: 125%; letter-spacing: -0.04em; text-wrap: balance; max-width: 18ch; }
.lede { margin: 0; max-width: 62ch; color: var(--text-2); font-size: clamp(18px, .4vw + 15px, 21px); line-height: 1.5; }
.lede b, .lede strong { color: var(--text); font-weight: 600; }
.meta { font: 12px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }

.hero-t { display: grid; gap: 18px; align-content: start; min-width: 0; }
.hero-fig { position: relative; overflow: hidden; margin: 0; justify-self: center; width: min(100%, 420px); aspect-ratio: 1;
  border-radius: 28px; background: radial-gradient(circle at 50% 58%, #262626 0, #161616 55%, var(--bg) 75%); }
.hero-fig img { position: absolute; inset: 8%; width: 84%; height: 84%; max-width: none; object-fit: contain; }
@media (min-width: 900px) {
  .hero.has-fig { grid-template-columns: minmax(0, 1fr) 380px; align-items: center; gap: 40px; }
  .hero-fig { width: 100%; }
}

/* Exercise cards (library visuals) */
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ex { position: relative; display: grid; gap: 4px; align-content: start; padding: 12px 12px 14px; border-radius: 16px; background: var(--surface);
  text-decoration: none; color: var(--text); transition: background .15s; }
a.ex:hover { background: var(--chip); }
.ex .fig { position: relative; aspect-ratio: 1; overflow: hidden; margin-bottom: 6px; border-radius: 12px;
  background: radial-gradient(circle at 50% 60%, #242424 0, var(--surface) 70%); }
.ex img { position: absolute; inset: 7%; width: 86%; height: 86%; max-width: none; object-fit: contain; }
.ex b { font: 700 15px/1.25 var(--display); font-stretch: 105%; letter-spacing: -0.005em; color: var(--text); }
.ex .m { font-size: 10.5px; line-height: 1.35; color: var(--text-3); text-transform: none; letter-spacing: .02em; }
.ex i.m { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 6px; border-radius: 6px; background: var(--orange); color: var(--ink); }
article .ex-grid a { text-decoration: none; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 32px 0 40px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, var(--read)) 260px; justify-content: space-between; } }
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: 96px; align-self: start; font-size: 14px; }
  .toc b { display: block; font: 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border-left: 1px solid var(--line); }
  .toc a { display: block; padding-left: 14px; color: var(--text-2); text-decoration: none; line-height: 1.35; }
  .toc a:hover { color: var(--text); }
}

/* Article */
article { min-width: 0; display: grid; gap: 52px; }
article section { display: grid; gap: 18px; min-width: 0; scroll-margin-top: 90px; }
article h2 { margin: 0; font: 700 clamp(26px, 1.2vw + 20px, 38px)/1.08 var(--display); font-stretch: 125%; letter-spacing: -0.03em; text-wrap: balance; }
article h3 { margin: 8px 0 0; font: 700 20px/1.2 var(--display); font-stretch: 112%; letter-spacing: -0.01em; }
article p, article li { color: var(--text-2); }
article p { margin: 0; }
article b, article strong { color: var(--text); font-weight: 600; }
article a { color: var(--text); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
article a:hover { color: var(--orange); }
article ul, article ol { margin: 0; padding-left: 1.25em; display: grid; gap: 8px; }
article li::marker { color: var(--orange); }
.callout { padding: 20px 22px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.callout b { color: var(--orange); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 10px; background: var(--orange); color: var(--ink); display: grid; place-items: center; font: 700 15px/1 var(--display); font-stretch: 125%; }
.steps b { display: block; color: var(--text); margin-bottom: 2px; }
.tbl { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 11px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 400; background: var(--surface-2); white-space: nowrap; }
td { color: var(--text-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--text); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--surface); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative; font-weight: 600; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font: 400 24px/1 var(--display); color: var(--orange); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--text-2); }

/* Gripp card (paper) */
.gripp { padding: 26px; border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 5px 0 var(--paper-edge); display: grid; gap: 12px; }
.gripp .m { font-size: 11px; color: var(--ink-2); }
.gripp h2, .gripp h3 { color: var(--ink); margin: 0; }
.gripp p { color: var(--ink-2); margin: 0; }
.gripp b { color: var(--ink); }
.gripp .btn { justify-self: start; }

/* Tool */
.tool { padding: 24px; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 5px 0 var(--paper-edge); display: grid; gap: 20px; }
.tool .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tool label { display: grid; gap: 6px; font: 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.tool input, .tool select { height: 54px; width: 100%; padding: 0 14px; border: 0; border-radius: 14px; background: #fff; color: var(--ink);
  font: 600 20px/1 var(--body); box-shadow: inset 0 0 0 1.5px var(--paper-line); font-variant-numeric: tabular-nums; }
.tool input:focus, .tool select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--orange); }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--paper-line); height: 54px; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 0 16px; font: 600 15px/1 var(--body); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 4px; border-top: 1px solid var(--paper-line); }
.result .big { font: 800 clamp(52px, 5vw + 24px, 92px)/1 var(--display); font-stretch: 125%; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.result .unit { font: 700 24px/1 var(--display); font-stretch: 125%; color: var(--ink-2); }
.result .note { flex-basis: 100%; font-size: 14px; color: var(--ink-2); }
.tool table { font-size: 14px; }
.tool th { background: #E4E3DE; color: var(--ink-2); }
.tool td { color: var(--ink); border-color: var(--paper-line); }
.tool .tbl { box-shadow: inset 0 0 0 1px var(--paper-line); background: #fff; }
.tool .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tool .cols b { display: block; margin-bottom: 8px; font: 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); font-weight: 400; }

/* Related */
.related { padding: 24px 0 8px; display: grid; gap: 18px; }
.related h2 { margin: 0; font: 700 26px/1.1 var(--display); font-stretch: 125%; letter-spacing: -0.03em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cards a { display: grid; gap: 6px; padding: 18px 20px; border-radius: 16px; background: var(--surface); text-decoration: none; transition: background .15s; }
.cards a:hover { background: var(--chip); }
.cards span { font: 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.cards b { font: 700 18px/1.2 var(--display); font-stretch: 112%; }

/* Waitlist */
.closing { padding: 90px 0 100px; text-align: center; }
.closing h2 { margin: 0 auto; font: 760 clamp(34px, 2.4vw + 22px, 60px)/1 var(--display); font-stretch: 125%; letter-spacing: -0.04em; text-wrap: balance; max-width: 16ch; }
.closing p { margin: 18px auto 0; color: var(--text-2); max-width: 48ch; text-wrap: balance; }
.signup { margin: 36px auto 0; display: flex; gap: 10px; width: min(520px, 100%); }
.signup input { flex: 1; min-width: 0; height: 56px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: 17px var(--body); box-shadow: inset 0 0 0 1.5px var(--line); }
.signup input::placeholder { color: var(--muted); }
.signup input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--orange); }
.signup .btn { height: 56px; }
.wl-msg { min-height: 1.4em; margin: 14px auto 0; font-size: 14px; color: var(--text-3); }
.wl-msg.err { color: #FF8A3D; }
.done { display: none; margin: 36px auto 0; width: min(520px, 100%); padding: 20px; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--paper-edge); text-align: left; gap: 14px; align-items: center; }
.done i { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--orange); display: grid; place-items: center; }
.done b { display: block; font: 700 18px/1.2 var(--display); font-stretch: 125%; }
.done span { font-size: 14px; color: var(--ink-2); }
.signed .signup, .signed .wl-msg { display: none; }
.signed .done { display: flex; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--text-3); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav .lang { display: none; }
  .signup { flex-direction: column; }
  .signup input { flex: none; width: 100%; }
  .tool { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
