/* worlds-best-bootcamp.com: dark training floor, one volt accent. See ../../DESIGN.md */

:root {
  --bg: #0b0c0e;
  --bg-2: #111215;
  --card: #15171b;
  --card-2: #1c1f24;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --fg: #f4f5f0;
  --fg-2: #b9bdb4;
  --fg-3: #858a80;
  --volt: #d4ff3a;
  --volt-dim: rgba(212, 255, 58, .12);
  --volt-line: rgba(212, 255, 58, .32);
  --on-volt: #0b0c0e;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 45rem;
  --wide: 76rem;
  --gutter: clamp(1rem, 4vw, 2.2rem);
  --radius: 18px;
  color-scheme: dark;

  /* Names the tool pages and a few inline styles still use */
  --color-violet: var(--volt);
  --color-iron: var(--fg-3);
  --color-obsidian: var(--fg);
  --color-paper: var(--bg);
  --font-sans: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--fg-2);
  font: 400 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(54rem 26rem at 88% -10rem, rgba(212, 255, 58, .07), transparent 70%);
  background-repeat: no-repeat;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--volt); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--fg); }
::selection { background: var(--volt); color: var(--on-volt); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--volt); color: var(--on-volt); padding: .5rem .8rem; z-index: 99; }
.accent { color: var(--volt); }

/* --------------------------------------------------------------- masthead */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 12, 14, .94);
  /* No backdrop-filter: it would make the header the containing block for
     the fixed drawer panel and trap the drawer inside the bar. */
  border-bottom: 1px solid var(--line);
}
.masthead-inner { max-width: var(--wide); margin: 0 auto; padding: .8rem var(--gutter); display: flex; align-items: center; gap: 1.6rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--fg); text-decoration: none; font: 800 1rem/1 var(--display); font-stretch: 112%; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.wordmark .mark { width: 1.7rem; height: 1.7rem; flex: none; }
.wordmark:hover { color: var(--fg); }
.wordmark b { color: var(--volt); font-weight: inherit; }
.nav { display: flex; gap: .3rem; margin-left: auto; }
.nav a { font: 600 .9rem/1 var(--sans); color: var(--fg-2); text-decoration: none; padding: .6rem .8rem; border-radius: 10px; }
.nav a:hover { color: var(--fg); background: var(--card-2); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--card-2); }
.masthead .btn { padding: .7rem 1.05rem; }
@media (max-width: 900px) { .nav, .masthead .btn { display: none; } .drawer { margin-left: auto; } }
@media (max-width: 420px) { .wordmark { font-size: .82rem; } .wordmark .mark { width: 1.45rem; height: 1.45rem; } }

/* ------------------------------------------------------------------ drawer */
/* A <details>: open, close, keyboard and no-JS come free; dropdown.js adds
   Escape, the outside click and the scroll lock. */
.drawer { position: relative; }
.drawer > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .55rem;
  font: 600 .9rem/1 var(--sans); color: var(--fg); padding: .62rem .95rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2);
}
.drawer > summary:hover { box-shadow: inset 0 0 0 1px var(--volt); }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer-bars { width: 15px; height: 9px; position: relative; display: inline-block; }
.drawer-bars::before, .drawer-bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .18s ease; }
.drawer-bars::before { top: 0; }
.drawer-bars::after { bottom: 0; }
.drawer[open] .drawer-bars::before { transform: translateY(3.75px) rotate(45deg); }
.drawer[open] .drawer-bars::after { transform: translateY(-3.75px) rotate(-45deg); }
.drawer-scrim { position: fixed; inset: 0; z-index: 38; background: rgba(0, 0, 0, .6); }
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 39; width: min(420px, 88vw);
  background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; padding: 1.4rem 1.4rem 2.5rem;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1.1rem; padding-left: .6rem; }
.drawer-head span, .drawer-group > h2 { font: 700 .7rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.drawer-close { cursor: pointer; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; border-radius: 999px; padding: .45rem .95rem; font: 500 .82rem var(--sans); color: var(--fg); }
.drawer-close:hover { box-shadow: inset 0 0 0 1px var(--volt); }
.drawer-group { margin-bottom: 1.5rem; }
.drawer-group > h2 { margin: 0 0 .35rem; padding: 0 .6rem; }
.drawer-panel a { display: block; border-radius: 12px; padding: .55rem .6rem; color: var(--fg); font-size: .95rem; line-height: 1.35; text-decoration: none; }
.drawer-panel a:hover { background: var(--card-2); }
.drawer-panel a .sub { display: block; font-size: .8rem; color: var(--fg-3); }
.drawer-panel a[aria-current="page"] { background: var(--volt-dim); }
.drawer-panel .drawer-lead { padding: 1rem 1.1rem; background: var(--volt); color: var(--on-volt); margin-bottom: 1.6rem; }
.drawer-panel .drawer-lead .sub { color: rgba(11, 12, 14, .72); font-size: .85rem; }
.drawer-lead strong { display: block; font: 800 1.05rem/1.2 var(--display); text-transform: uppercase; margin-bottom: .2rem; }
.drawer-panel .drawer-lead:hover { background: #e2ff75; }

/* ------------------------------------------------------------------- type */
.kicker, .label { font: 700 .72rem/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin: 0; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--fg); }
.kicker .sep { color: var(--volt); padding: 0 .35rem; }
h1, h2, h3 { color: var(--fg); text-wrap: balance; }
h1 { font: 800 clamp(2.1rem, 5vw, 3.9rem)/1 var(--display); font-stretch: 108%; letter-spacing: -.01em; text-transform: uppercase; margin: 1rem 0 1.3rem; }
h2 { font: 800 clamp(1.35rem, 2.3vw, 1.75rem)/1.12 var(--display); font-stretch: 106%; text-transform: uppercase; margin: 3.4rem 0 1rem; }
h3 { font: 700 1.12rem/1.35 var(--sans); letter-spacing: -.01em; margin: 2rem 0 .55rem; }
p { margin: 0 0 1.1rem; }
.dek { font-size: clamp(1.03rem, 1.4vw, 1.17rem); line-height: 1.6; color: var(--fg-2); max-width: 38rem; margin: 0 0 1.6rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.1rem; margin: 0; font-size: .86rem; color: var(--fg-3); }
.meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--volt); margin-right: 1.1rem; vertical-align: middle; }
.meta a { color: var(--fg); }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .62rem; border-radius: 999px; background: var(--volt-dim); color: var(--volt); font: 700 .66rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- buttons */
/* .pill is the name the tools' scripts select on, so both names stay. */
.btn-row, .cta-row, .act-row { display: flex; flex-wrap: wrap; gap: .65rem; margin: 0; }
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.3rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--card-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 600 .93rem/1.1 var(--sans); text-decoration: none; white-space: nowrap;
}
.btn:hover, .pill:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--volt); }
.btn.primary, .pill-violet { background: var(--volt); color: var(--on-volt); box-shadow: none; }
.btn.primary:hover, .pill-violet:hover { background: #e2ff75; color: var(--on-volt); box-shadow: none; }
.btn.ghost, .pill-ghost-dark, .pill-outline-violet { background: transparent; }
.pill.active { background: var(--fg); color: var(--bg); box-shadow: none; }
.btn .arr { color: inherit; }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.1rem; }
.cards.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }
.card { display: flex; flex-direction: column; color: inherit; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .25s, transform .25s; }
.card:hover { color: inherit; border-color: var(--volt-line); transform: translateY(-2px); }
.card-media { position: relative; overflow: hidden; background: var(--card-2); }
.card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media .chip { position: absolute; left: .85rem; top: .85rem; background: rgba(11, 12, 14, .78); }
.card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.card-meta { margin: 0; font-size: .8rem; color: var(--fg-3); }
.card h3 { margin: 0; font: 800 1.08rem/1.2 var(--display); text-transform: uppercase; color: var(--fg); }
.card p { margin: 0; font-size: .93rem; line-height: 1.55; color: var(--fg-3); }
.card .more { margin-top: auto; padding-top: .55rem; font-size: .88rem; font-weight: 600; color: var(--fg); }
.card .more::after { content: " \2192"; color: var(--volt); }
.card:hover .more { color: var(--volt); }
/* Tool cards carry a readout instead of a photograph */
.tool-face { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; min-height: 9.5rem; padding: 3rem 1.2rem 1.1rem; background: linear-gradient(150deg, #1d2118, var(--card-2) 60%); border-bottom: 1px solid var(--line); }
.tool-face .chip { position: absolute; left: .85rem; top: .85rem; }
.tool-face .big { font: 800 clamp(2.4rem, 5vw, 3.4rem)/1 var(--display); color: var(--fg); font-variant-numeric: tabular-nums; }
.tool-face .big small { display: block; font: 600 .78rem/1.2 var(--sans); color: var(--volt); letter-spacing: .02em; margin-top: .35rem; text-transform: none; }
.tool-face .ticks { display: flex; gap: 5px; align-items: flex-end; }
.tool-face .ticks i { width: 9px; border-radius: 3px; background: var(--line-2); }
.tool-face .ticks i.on { background: var(--volt); }
.card.compact .card-body { padding-top: 1.2rem; }

/* ---------------------------------------------------------------- sections */
.section { max-width: var(--wide); margin: 0 auto; padding: clamp(2.6rem, 6vw, 4.2rem) var(--gutter); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 2.5rem; align-items: end; margin-bottom: 1.8rem; }
.section-head .kicker { color: var(--volt); }
.section-head h2 { margin: .6rem 0 0; font-size: clamp(1.6rem, 3.3vw, 2.5rem); }
.section-head p { margin: 0; color: var(--fg-3); font-size: 1rem; }
.section-head p a { color: var(--fg); white-space: nowrap; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }
.num { display: inline-block; min-width: 1.9rem; margin-right: .4rem; }
.subhead { font: 700 .78rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin: 2.2rem 0 1rem; display: flex; align-items: center; gap: .8rem; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.subhead:first-child { margin-top: 0; }

/* ------------------------------------------------------------------- home */
.home-hero { max-width: var(--wide); margin: 0 auto; padding: clamp(2.6rem, 7vw, 5.5rem) var(--gutter) clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.home-hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.9rem); margin: 1.1rem 0 1.4rem; }
.home-hero .dek { font-size: clamp(1.05rem, 1.5vw, 1.22rem); }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1.6rem 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--fg-3); }
.hero-facts li::before { content: "\2713"; color: var(--volt); font-weight: 700; margin-right: .45rem; }
@media (max-width: 880px) { .home-hero { grid-template-columns: 1fr; } }

/* The session card: the beginner circuit as the timer will run it */
.session { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.session-top .label { color: var(--fg); }
.session-top span:last-child { font-size: .82rem; color: var(--fg-3); }
.session-clock { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.2rem 1.1rem; background: var(--volt); color: var(--on-volt); }
.session-clock .phase { font: 800 .75rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.session-clock .move { font: 700 1.05rem/1.3 var(--sans); margin-top: .2rem; }
.session-clock .time { font: 800 3.1rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.session ol { list-style: none; margin: 0; padding: .35rem 1.2rem; counter-reset: st; }
.session li { counter-increment: st; display: grid; grid-template-columns: 1.9rem 1fr auto; align-items: center; padding: .62rem 0; border-top: 1px solid var(--line); font-size: .93rem; color: var(--fg); }
.session li:first-child { border-top: 0; }
.session li::before { content: counter(st); display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--card-2); font-size: .7rem; font-weight: 700; color: var(--fg-2); }
.session li:first-child::before { background: var(--volt); color: var(--on-volt); }
.session li span { font-size: .8rem; color: var(--fg-3); }
.session-foot { display: flex; gap: .6rem; padding: .9rem 1.2rem 1.2rem; }
.session-foot .btn { flex: 1; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 1.35rem 1.35rem 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: "0" counter(step); display: block; font: 800 2rem/1 var(--display); color: var(--volt); margin-bottom: .9rem; }
.steps h3 { margin: 0 0 .4rem; font: 800 1.08rem/1.2 var(--display); text-transform: uppercase; }
.steps p { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--fg-3); }
.steps a { color: var(--fg); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.stats div { padding: 1.6rem 1.4rem; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font: 800 clamp(2.4rem, 5vw, 3.6rem)/1 var(--display); color: var(--fg); }
.stats span { display: block; margin-top: .55rem; font-size: .95rem; color: var(--fg-3); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } .stats div { border-left: 0; border-top: 1px solid var(--line); } .stats div:first-child { border-top: 0; } }

/* ----------------------------------------------------------- page heads */
.page-head { max-width: var(--wide); margin: 0 auto; padding: clamp(2.2rem, 6vw, 4.5rem) var(--gutter) 2rem; }
.page-head .inner { max-width: 54rem; }
.page-head.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(1.8rem, 5vw, 4rem); align-items: center; }
.page-head.has-photo .inner { max-width: none; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.head-photo { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--card-2); }
.head-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 820px) {
  .page-head.has-photo { grid-template-columns: 1fr; }
  .head-photo { order: -1; }
  .head-photo img { aspect-ratio: 16 / 9; }
}

/* ------------------------------------------------------ article + TOC grid */
.article-grid { max-width: var(--wide); margin: 0 auto; padding: 1.2rem var(--gutter) 4.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 4.5rem; align-items: start; }
.article-grid > * { min-width: 0; }
.article-grid > .prose { grid-column: 1; max-width: var(--measure); }
.article-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.toc { grid-column: 2; grid-row: 1; position: sticky; top: 5.4rem; padding: 1.1rem 1.1rem .7rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.toc .label { display: block; margin-bottom: .55rem; color: var(--volt); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-top: 1px solid var(--line); }
.toc ol a { display: grid; grid-template-columns: 1.8rem 1fr; padding: .52rem 0; font-size: .86rem; line-height: 1.4; color: var(--fg-2); text-decoration: none; }
.toc ol a::before { content: counter(toc, decimal-leading-zero); font: 700 .74rem/1.65 var(--display); color: var(--fg-3); }
.toc ol a:hover { color: var(--fg); }
.toc ol a:hover::before { color: var(--volt); }
.toc-cta { margin: .7rem 0 .45rem; }
.toc-cta .btn { width: 100%; }
@media (max-width: 1020px) {
  .article-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; grid-column: 1; grid-row: auto; margin: 0 0 2.4rem; max-width: var(--measure); }
  .toc ol { columns: 2; column-gap: 1.5rem; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* ------------------------------------------------------------------ prose */
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose h2 { scroll-margin-top: 5.5rem; }
.prose h2[data-n]::before { content: attr(data-n); display: block; margin-bottom: .5rem; font: 800 .8rem/1 var(--display); letter-spacing: .1em; color: var(--volt); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.3rem; }
.prose li { margin: .45rem 0; }
.prose li::marker { color: var(--volt); }
.prose .note { margin: 2rem 0; padding: 1.15rem 1.3rem 1.2rem; background: var(--volt-dim); border: 1px solid var(--volt-line); border-radius: var(--radius); font-size: 1rem; color: var(--fg); }
.prose .note::before { content: "Worth knowing"; display: block; font: 800 .7rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--volt); margin-bottom: .55rem; }
.prose .note a { color: var(--volt); }
.prose .cta-row { margin: 1.6rem 0 .6rem; }
.prose .cta-row + p[style] { font-size: .9rem !important; }

.exercise-table { margin: 1.6rem 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; counter-reset: ex; }
.exercise-row { counter-increment: ex; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: baseline; padding: .85rem 1.15rem; border-top: 1px solid var(--line); font-size: .98rem; }
.exercise-row:first-child { border-top: 0; }
.exercise-row::before { content: counter(ex, decimal-leading-zero); font: 800 .8rem/1 var(--display); color: var(--volt); }
.exercise-name { font-weight: 600; color: var(--fg); }
.exercise-name a { color: var(--fg); }
.exercise-detail { color: var(--fg-3); font-size: .92rem; text-align: right; }
@media (max-width: 600px) { .exercise-row { grid-template-columns: 2.2rem minmax(0, 1fr); } .exercise-detail { grid-column: 2; text-align: left; } }
.credits .exercise-row { grid-template-columns: 2.2rem minmax(0, 1fr); }
.credits .exercise-detail { grid-column: 2; text-align: left; }

.faq-list { margin: 1rem 0 0; }
.faq-list details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: .6rem; }
.faq-list details[open] { border-color: var(--line-2); }
.faq-list summary { cursor: pointer; list-style: none; padding: 1rem 3.2rem 1rem 1.2rem; position: relative; font: 600 1.02rem/1.4 var(--sans); color: var(--fg); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 1rem; top: .8rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--card-2); font: 500 1.1rem/1 var(--sans); color: var(--volt); }
.faq-list details[open] summary::after { content: "\2212"; background: var(--volt); color: var(--on-volt); }
.faq-list details p { margin: 0; padding: 0 1.2rem 1.15rem; color: var(--fg-2); }

.related { max-width: var(--wide); margin: 0 auto; padding: 3.2rem var(--gutter) 4.5rem; border-top: 1px solid var(--line); }
.related .section-head { margin-bottom: 1.5rem; }

/* ------------------------------------------------------------ tool pages */
.tool-wrap { max-width: var(--wide); margin: 0 auto; padding: .5rem var(--gutter) 4.5rem; }

/* ----------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 1rem; }
.footer-cta { max-width: var(--wide); margin: 0 auto; padding: 2.6rem var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; border-bottom: 1px solid var(--line); }
.footer-cta p { margin: 0; font: 800 clamp(1.3rem, 2.6vw, 1.9rem)/1.1 var(--display); text-transform: uppercase; color: var(--fg); }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 2.6rem var(--gutter) 2rem; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; font-size: .92rem; }
.footer-inner > div > p { margin: 1rem 0 0; color: var(--fg-3); line-height: 1.6; max-width: 22rem; }
.footer-inner h2 { margin: 0 0 .8rem; font: 800 .72rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--volt); }
.footer-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-inner li { margin: .45rem 0; }
.footer-inner a { color: var(--fg-2); text-decoration: none; }
.footer-inner a:hover { color: var(--fg); }
.colophon { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 2rem; font-size: .8rem; color: var(--fg-3); }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-inner > div:first-child { grid-column: 1 / -1; } }

@media print {
  .masthead, .toc, .related, .site-footer { display: none; }
  body { background: #fff; color: #000; }
}

/* data tables and takeaways */
.prose .table-wrap { margin: 1.6rem 0; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.prose th { text-align: left; padding: .8rem 1rem; font: 800 .7rem/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.prose td { padding: .75rem 1rem; border-top: 1px solid var(--line); color: var(--fg-2); vertical-align: top; }
.prose td:first-child { color: var(--fg); font-weight: 600; }
.prose td a { color: var(--volt); }
.article-grid > .prose { min-width: 0; }
.prose .table-wrap { max-width: 100%; }
.prose table { min-width: 32rem; }
.prose .note.takeaways::before { content: "Key takeaways"; }
.prose .note.takeaways ul { margin: 0; }
.drawer-group > .group-title { margin: 0 0 .35rem; padding: 0 .6rem; font: 700 .7rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.footer-inner .group-title { margin: 0 0 .8rem; font: 800 .72rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--volt); }

/* ================================================================ app layer
   Phone-first touches borrowed from training apps (Ladder, Peloton, Nike TC):
   a bottom tab bar, swipe rails, a sticky action, a glass header that steps
   aside while you read, and an installable, offline-capable shell. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
.btn, .pill, .card, .tabbar a, .quick a { transition: transform .12s ease, background-color .2s, box-shadow .2s, border-color .25s; }
.btn:active, .pill:active, .quick a:active { transform: scale(.97); }
.card:active { transform: scale(.985); }

/* Glass header: the blur sits on a pseudo-element so the header itself never
   becomes the containing block of the fixed drawer panel. */
.masthead { background: rgba(11, 12, 14, .72); transition: top .28s ease; padding-top: env(safe-area-inset-top); }
.masthead::before { content: ""; position: absolute; inset: 0; z-index: -1; -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
.masthead.tucked { top: calc(-4.5rem - env(safe-area-inset-top)); }

/* Reading progress */
.progress { position: fixed; left: 0; top: 0; z-index: 30; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--volt); box-shadow: 0 0 12px rgba(212, 255, 58, .6); pointer-events: none; }

/* Quick links under the home hero, Peloton-style category chips */
.quick { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) .5rem; display: flex; gap: .55rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.quick::-webkit-scrollbar { display: none; }
.quick a { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .5rem; padding: .62rem 1rem .62rem .7rem; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); text-decoration: none; font: 600 .88rem/1 var(--sans); white-space: nowrap; }
.quick a:hover { box-shadow: inset 0 0 0 1px var(--volt); color: var(--fg); }
.quick svg { width: 1.6rem; height: 1.6rem; padding: .3rem; border-radius: 50%; background: var(--volt-dim); color: var(--volt); }

/* Bottom tab bar */
.tabbar { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom));
    background: rgba(17, 18, 21, .82); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: .22rem; padding: .35rem 0 .2rem; color: var(--fg-3); text-decoration: none; font: 600 .66rem/1 var(--sans); letter-spacing: .01em; }
  .tabbar a svg { width: 1.45rem; height: 1.45rem; }
  .tabbar a[aria-current="page"] { color: var(--fg); }
  .tabbar a[aria-current="page"] svg { color: var(--volt); }
  .tabbar a:active { transform: scale(.92); }
  .tabbar .tab-go { color: var(--fg); }
  .tabbar .tab-go span.dot { display: grid; place-items: center; width: 3.3rem; height: 3.3rem; margin-top: -1.5rem; border-radius: 50%; background: var(--volt); color: var(--on-volt); box-shadow: 0 10px 26px -8px rgba(212, 255, 58, .55), 0 0 0 5px var(--bg); }
  .tabbar .tab-go svg { width: 1.6rem; height: 1.6rem; }
  .masthead .drawer > summary { padding: .55rem .8rem; }
  .colophon { padding-bottom: 1.2rem; }
}

/* Sticky action above the tab bar (Run this session, Download the PDF) */
.dock { position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(5.2rem + env(safe-area-inset-bottom)); z-index: 24; display: none; }
.dock .btn { width: 100%; padding: 1rem 1.3rem; font-size: 1rem; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .9); }
@media (max-width: 900px) { .dock.on { display: block; animation: dock-in .25s ease; } }
@keyframes dock-in { from { transform: translateY(1rem); opacity: 0; } }

/* Swipe rails: card rows scroll sideways on a phone instead of stacking */
@media (max-width: 700px) {
  .cards.rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: .2rem var(--gutter) .6rem; scroll-padding-inline: var(--gutter);
  }
  .cards.rail::-webkit-scrollbar { display: none; }
  .cards.rail > * { scroll-snap-align: start; }
  .card-media img { aspect-ratio: 16 / 10; }
}

/* Phone hero and headings */
@media (max-width: 600px) {
  .home-hero .btn-row .btn { flex: 1 1 100%; padding: 1rem 1.3rem; font-size: 1rem; }
  .hero-facts { gap: .45rem; }
  .hero-facts li { padding: .4rem .7rem; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; }
  .page-head { padding-top: 1.2rem; }
  .head-photo { border-radius: 18px; }
  .page-head h1, .home-hero h1 { font-size: clamp(1.85rem, 8.6vw, 2.4rem); }
  h2 { margin-top: 2.6rem; }
  .steps li { padding: 1.1rem 1.15rem; }
  .steps li::before { font-size: 1.5rem; margin-bottom: .6rem; }
  .footer-cta .btn-row { width: 100%; }
  .footer-cta .btn { flex: 1; }
}

/* Table of contents folds into one tappable row below 1020px */
@media (max-width: 1020px) {
  .toc .label { display: flex; justify-content: space-between; align-items: center; cursor: pointer; margin: 0; padding: .25rem 0 .45rem; }
  .toc .label::after { content: "+"; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--card-2); font: 500 1.1rem/1 var(--sans); color: var(--volt); }
  .toc.folded ol, .toc.folded .toc-cta { display: none; }
  .toc:not(.folded) .label::after { content: "\2212"; background: var(--volt); color: var(--on-volt); }
}

/* Interval timer behaves like a stopwatch app on a phone */
@media (max-width: 900px) {
  .timer-controls { position: sticky; bottom: calc(4.9rem + env(safe-area-inset-bottom)); z-index: 5; padding: .7rem 0; background: linear-gradient(transparent, var(--bg) 35%); }
  .timer-controls .pill { flex: 1; padding: 1.05rem 1rem; font-size: 1.05rem; }
}
@media print { .tabbar, .dock, .progress, .quick { display: none; } body { padding: 0; } }
@media (max-width: 900px) { .tabbar .tab-go[aria-current="page"] svg { color: var(--on-volt); } }

/* ------------------------------------------------------- full-bleed hero */
/* Photo hero in the Barry's / Ladder manner: the picture runs under the glass
   header, the copy sits on a dark gradient, the session card moves below. */
.hero-bleed { position: relative; display: flex; align-items: flex-end; min-height: min(88vh, 56rem); margin-top: calc(-4.15rem - env(safe-area-inset-top)); overflow: hidden; isolation: isolate; }
.hero-bleed picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 72% 55%; animation: hero-in 1.6s ease-out both; }
.hero-bleed::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(11, 12, 14, .94) 0%, rgba(11, 12, 14, .78) 34%, rgba(11, 12, 14, .2) 64%, rgba(11, 12, 14, 0) 100%),
  linear-gradient(0deg, var(--bg) 0%, rgba(11, 12, 14, 0) 32%),
  linear-gradient(180deg, rgba(11, 12, 14, .55) 0%, rgba(11, 12, 14, 0) 22%); }
.hero-inner { width: 100%; max-width: var(--wide); margin: 0 auto; padding: calc(8rem + env(safe-area-inset-top)) var(--gutter) clamp(2.6rem, 7vh, 4.5rem); }
.hero-copy { max-width: 37rem; }
.hero-copy h1 { font-size: clamp(2.6rem, 5.8vw, 5.2rem); line-height: .95; margin: 1.1rem 0 1.4rem; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero-copy .dek { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #d6d9d0; }
.hero-copy .kicker { color: var(--fg-2); }
.hero-copy .btn { padding: 1rem 1.5rem; font-size: 1rem; }
.hero-copy .btn.ghost { background: rgba(244, 245, 240, .06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-bleed + .quick { position: relative; margin-top: -.4rem; }
@keyframes hero-in { from { transform: scale(1.06); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .hero-bleed picture img { animation: none; } }

.today { padding-top: 2.6rem; }
.today-grid { display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3.5rem); align-items: start; }
.today-kicker { color: var(--volt); }
.today-h { margin: .6rem 0 1.4rem; font-size: clamp(1.6rem, 3.3vw, 2.5rem); }
.today .steps { grid-template-columns: 1fr; gap: .8rem; }
.today .steps li { display: grid; grid-template-columns: 3.2rem 1fr; column-gap: .4rem; }
.today .steps li::before { grid-row: span 2; margin: 0; }
@media (max-width: 880px) { .today-grid { grid-template-columns: 1fr; } }

@media (max-width: 700px) {
  .hero-bleed { min-height: 92svh; }
  .hero-bleed picture img { object-position: 50% 40%; }
  .hero-bleed::after { background:
    linear-gradient(0deg, var(--bg) 4%, rgba(11, 12, 14, .82) 42%, rgba(11, 12, 14, .15) 75%, rgba(11, 12, 14, .5) 100%); }
  .hero-inner { padding-bottom: 1.6rem; }
  .hero-copy h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  .hero-copy .btn-row .btn { flex: 1 1 100%; }
  .hero-copy .hero-facts li { padding: .4rem .7rem; border-radius: 999px; background: rgba(21, 23, 27, .7); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; }
}
@media (max-width: 700px) {
  .hero-bleed { min-height: 0; }
  .hero-bleed picture img { bottom: auto; height: 62%; object-position: 50% 50%; }
  .hero-bleed::after { background: linear-gradient(180deg, rgba(11, 12, 14, .55) 0%, rgba(11, 12, 14, 0) 18%, rgba(11, 12, 14, 0) 34%, rgba(11, 12, 14, .85) 54%, var(--bg) 64%); }
  .hero-inner { padding-top: calc(19rem + env(safe-area-inset-top)); }
}
