/*
 * PC Fitness — marketing site (pcfitness.app / www.pcfitness.app).
 *
 * Deliberately the SAME design system as the planner (app/src/styles.css): the same five
 * neutrals, the same single accent, the same 4px radius, the same hairline rules, the same
 * mono-for-numbers discipline. Only the scale changes — the app is 13px because it is a dense
 * tool; this is a page you read from two feet away.
 *
 * No framework, no build step, no external font, no third-party request of any kind. That is
 * partly taste and partly the Content-Security-Policy in `_headers`, which forbids inline styles
 * and inline scripts: every rule the page needs is in this file.
 *
 * Colours that carry meaning are the app's semantic signals (--warn amber for "unverified",
 * --ok green for exits). Everything that is not information is grey.
 */

:root {
  /* Neutrals, darkest to lightest — identical values to the app. */
  --bg-0: #0c0f12;
  --bg-1: #12161a;
  --bg-2: #181d23;
  --bg-3: #1f262d;
  --bg-4: #28313a;
  --line: #262e36;
  --line-2: #333e49;

  --text: #d8dee5;
  --dim: #8c98a5;
  /*
   * --faint is the app's value and is used here ONLY for non-text things: hairlines, the neutral
   * status dot, decorative marks. As text on --bg-0 it measures 3.4:1, which is fine inside a
   * dense 11px tool where the user is leaning in, and not fine on a public page. --meta is the
   * text-safe sibling: 7.5:1 on --bg-0 and 7.2:1 on --bg-1, so every caption, footnote and
   * drawing label on this page clears WCAG AA at any size.
   */
  --faint: #5d6874;
  --meta: #98a3b0;

  /* One accent. Nothing else is blue. */
  --accent: #4c9eff;
  --accent-dim: #2c5f9c;
  --accent-wash: rgba(76, 158, 255, 0.14);
  --accent-ink: #06121f;

  /* Semantic signals, same as the app's. */
  --err: #ff5f56;
  --warn: #e2b341;
  --ok: #46b95c;

  /* Zone identity, used only in the plan diagram so it reads like the real canvas. */
  --z-cardio: #4c9eff;
  --z-selectorized: #a78bfa;
  --z-freeweight: #f0a54a;
  --z-support: #22b8cf;

  --radius: 4px;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1160px;
  --gutter: 28px;
  --band-y: clamp(72px, 9vw, 132px);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/*
 * `[hidden]` in the UA stylesheet is `display: none` at element-selector strength, so any class
 * rule that sets `display` silently defeats it. This page hides the video fallback with the
 * attribute, so make the attribute win everywhere.
 */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  /* The sticky header is 60px; keep an anchored heading clear of it. */
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font: 400 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(76, 158, 255, 0.32);
  transition: border-color 110ms linear, color 110ms linear;
}
a:hover {
  border-bottom-color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.018em;
  font-weight: 600;
  line-height: 1.14;
  color: #edf1f6;
}

p {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}
.skip:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--text);
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background 110ms linear, border-color 110ms linear, color 110ms linear;
}
.btn:hover {
  background: var(--bg-4);
  border-bottom-color: var(--line-2);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn.primary:hover {
  background: #63aaff;
  border-color: #63aaff;
}
.btn.ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--dim);
}
.btn.ghost:hover {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--line-2);
}
.btn.lg {
  height: 46px;
  padding: 0 24px;
  font-size: 15.5px;
}

/* --------------------------------------------------------------- site head */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  background: rgba(12, 15, 18, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 140ms linear, background 140ms linear;
}
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .site-head {
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
  }
}
.site-head.is-stuck {
  background: rgba(12, 15, 18, 0.94);
  border-bottom-color: var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  border: 0;
  color: var(--text);
  user-select: none;
}
.brand b {
  font-size: 15px;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.brand span {
  font-size: 10px;
  color: var(--meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-1px);
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.head-nav a {
  border: 0;
  font-size: 13.5px;
  color: var(--dim);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.head-nav a:hover {
  color: var(--text);
}
.head-nav a[aria-current='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.head-cta {
  height: 32px;
  padding: 0 13px;
  font-size: 13.5px;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px);
  isolation: isolate;
  overflow: hidden;
}

/*
 * The planner's canvas draws a metric grid behind the plan. Echoing it here — faintly, and
 * faded out toward the bottom — makes the landing page and the tool read as one surface.
 */
.grid-field {
  position: absolute;
  inset: -60px 0 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(76, 158, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 158, 255, 0.055) 1px, transparent 1px),
    radial-gradient(120% 68% at 50% 0%, rgba(76, 158, 255, 0.1), transparent 62%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 34%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 34%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 10px;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  background: var(--accent-wash);
  margin-bottom: 24px;
}

/*
 * The <br> in the markup owns the line break at desktop width, so the measure only has to be
 * wide enough not to fight it — the longer of the two lines is 31 characters. Below ~700px the
 * clamp has shrunk the type enough that natural wrapping takes over and looks intentional.
 */
h1 {
  font-size: clamp(34px, 4.9vw, 57px);
  letter-spacing: -0.03em;
  max-width: 32ch;
}

.lede {
  margin-top: 22px;
  max-width: 66ch;
  font-size: clamp(17px, 1.45vw, 19.5px);
  line-height: 1.62;
  color: var(--dim);
}
.lede.narrow {
  max-width: 62ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.cta-row .btn {
  border-bottom-width: 1px;
}

.cta-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--meta);
}

/* ------------------------------------------------------------- hero media */

.media {
  width: 100%;
  margin: clamp(40px, 5vw, 64px) 0 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-1);
  overflow: hidden;
  box-shadow: 0 24px 70px -34px rgba(0, 0, 0, 0.95);
}

/* Deliberately the planner's own viewport header: segmented control left, mono note right. */
.media-head {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  overflow: hidden;
}
.segmented {
  display: inline-flex;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.segmented span {
  padding: 3px 9px;
  font-size: 11.5px;
  color: var(--dim);
  border-right: 1px solid var(--line-2);
}
.segmented span:last-child {
  border-right: 0;
}
.segmented span.on {
  background: var(--accent-wash);
  color: #cfe3ff;
}
.media-head-right {
  margin-left: auto;
}
.meta {
  font-size: 11.5px;
  color: var(--dim);
}

.media-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-0);
}
.media-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-0);
}
.media.is-missing .media-video {
  display: none;
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-size: 14.5px;
  background-image: linear-gradient(rgba(76, 158, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 158, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px;
}
.media-fallback p:first-child {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--meta);
}

.media-toggle {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 13px 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(18, 22, 26, 0.86);
  color: var(--text);
  font: 500 12.5px/1 var(--sans);
  cursor: pointer;
  transition: background 110ms linear, border-color 110ms linear, opacity 160ms linear;
}
.media-toggle:hover {
  background: var(--bg-3);
  border-color: var(--accent-dim);
}
.media-toggle-icon {
  width: 9px;
  height: 11px;
  background: var(--accent);
  /* Triangle = paused/press-to-play. */
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.media-toggle[aria-pressed='true'] .media-toggle-icon {
  /* Two bars = playing/press-to-pause. */
  clip-path: polygon(0 0, 33% 0, 33% 100%, 0 100%, 0 0, 67% 0, 100% 0, 100% 100%, 67% 100%, 67% 0);
}

.media figcaption {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--dim);
  background: var(--bg-1);
}

/* ------------------------------------------------------------------ stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  margin: clamp(32px, 4vw, 52px) 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.stat {
  padding: 18px 18px 20px;
  background: var(--bg-1);
}
.stat dt {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--dim);
}
.stat dd {
  margin: 8px 0 8px;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--meta);
}

/* ------------------------------------------------------------------ bands */

.band {
  padding: var(--band-y) 0;
  border-top: 1px solid var(--line);
}
.band.alt {
  background: var(--bg-1);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.section-label span {
  color: var(--accent);
}
.section-label::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.band h2 {
  font-size: clamp(27px, 3.3vw, 39px);
  max-width: 22ch;
}
.band h2 + .lede {
  margin-top: 18px;
}

/* ------------------------------------------------------------------ split */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.split.wide-left {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}
.split-main > * + * {
  margin-top: 18px;
}
.split-main p {
  color: var(--dim);
  max-width: 60ch;
}
.split-main p.big {
  font-size: clamp(17px, 1.4vw, 19.5px);
  color: var(--text);
}
p.caveat {
  padding: 14px 16px;
  border-left: 2px solid var(--warn);
  background: rgba(226, 179, 65, 0.055);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  color: var(--dim);
}

.card-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--meta);
  margin-bottom: 10px;
}

.rulecard {
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--bg-2);
  padding: 16px 18px 18px;
}
.rulecard-key {
  font-size: 13px;
  color: var(--dim);
  word-break: break-word;
}
.rulecard-val {
  margin-top: 4px;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.rulecard-src {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--dim);
}
.rulecard-flag {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--warn);
}
.rulecard-flag .mono {
  color: var(--warn);
}

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--faint);
  display: inline-block;
}
.dot.warn {
  background: var(--warn);
}
.dot.ok {
  background: var(--ok);
}

.side-note {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--meta);
}

/* ----------------------------------------------------------------- egress */

.egress-figure {
  margin-top: clamp(30px, 4vw, 46px);
}
.egress-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(28px, 3.5vw, 42px);
}
.egress-notes p {
  color: var(--dim);
}
.egress-notes > div > p + p {
  margin-top: 16px;
}

/* ---------------------------------------------------------------- diagram */

.diagram {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-0);
  padding: 14px 14px 0;
}
/*
 * Three panels side by side while there is room, stacked once there is not. Stacking rather than
 * scaling is the whole reason the drawing is three <svg>s: shrunk to a third of a phone screen
 * the mono labels would be sub-pixel.
 */
.diagram-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.diagram-svg {
  display: block;
  width: 100%;
  height: auto;
}
.diagram-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.diagram-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.diagram-key i {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  border: 1px solid currentColor;
  display: inline-block;
}
.k-cardio {
  color: var(--z-cardio);
}
.k-select {
  color: var(--z-selectorized);
}
.k-free {
  color: var(--z-freeweight);
}
.k-support {
  color: var(--z-support);
}
.diagram-key i.k-egress {
  color: var(--accent);
  border-style: dashed;
  background: var(--accent-wash);
}

.diagram figcaption {
  margin-top: 4px;
  padding: 12px 2px 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--meta);
}

/* SVG text classes — CSP forbids inline style attributes, so the diagram is styled here. */
.dg-cap {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  fill: var(--meta);
}
.dg-cap.dg-hot {
  fill: var(--accent);
}
.dg-lab {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  fill: var(--meta);
}
.dg-mid {
  text-anchor: middle;
}
/* Exit labels are anchored to the plate corners, not to the exits, so they never sit on the
   hatched spine that runs up to them. */
.dg-start {
  text-anchor: start;
}
.dg-end {
  text-anchor: end;
}
.dg-ok {
  fill: var(--ok);
}
.dg-acc {
  fill: var(--accent);
}

/* ------------------------------------------------------------------ steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(34px, 4vw, 50px) 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  counter-reset: none;
}
.step {
  padding: 22px 22px 26px;
  background: var(--bg-0);
}
.band.alt .step {
  background: var(--bg-1);
}
.step-n {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.step h3 {
  margin-top: 10px;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.step p:last-child {
  margin-top: 9px;
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--dim);
}

/* ------------------------------------------------------------------ cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(34px, 4vw, 50px);
}
.card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-0);
}
.card-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.card h3 {
  margin-top: 10px;
  font-size: 20px;
}
.card > p:nth-of-type(2) {
  margin-top: 11px;
  font-size: 15px;
  color: var(--dim);
}
.card-foot {
  margin-top: auto; /* pins the caveat to the bottom so a row of cards lines up */
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--meta);
}
.stamp {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--warn);
}

.callout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 24px;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background: var(--accent-wash);
}
.callout-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding-top: 4px;
}
.callout-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  max-width: 78ch;
}

/* ----------------------------------------------------------------- limits */

.limits {
  margin: clamp(34px, 4vw, 50px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.limit {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.limit-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 500;
  color: #edf1f6;
}
.limit-head .dot {
  margin-top: 8px;
}
.limit > p:last-child {
  font-size: 15px;
  line-height: 1.62;
  color: var(--dim);
}

/* ---------------------------------------------------------------- closing */

.closing {
  text-align: center;
  background: var(--bg-1);
}
.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.closing h2 {
  /* 32 characters; keep the measure wide enough to hold it on one line at desktop widths. */
  max-width: 34ch;
  font-size: clamp(27px, 3.4vw, 41px);
}
.closing .lede {
  text-align: center;
}
.closing .cta-row {
  justify-content: center;
}

/* ------------------------------------------------------------------- foot */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-0);
  padding: 46px 0 54px;
}
.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.foot-brand .brand {
  margin-bottom: 14px;
}
.foot-legal {
  font-size: 13px;
  line-height: 1.6;
  color: var(--meta);
  max-width: 62ch;
}
.foot-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
}
.foot-nav a {
  border: 0;
  font-size: 14px;
  color: var(--dim);
}
.foot-nav a:hover {
  color: var(--text);
}
.foot-meta {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--meta);
}

/* ----------------------------------------------------------- reveal / motion */

/*
 * Content must NEVER be able to get stuck invisible. The hidden start state is therefore scoped
 * to `@media (scripting: enabled)`: with JS off — or in any engine that does not know the
 * `scripting` feature — the whole block is skipped and every section renders opaque. main.js
 * also carries a belt-and-braces timeout that reveals everything if IntersectionObserver is
 * missing or a script error lands before the observer is wired up.
 */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 520ms cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .head-nav {
    gap: 15px;
  }
  .head-nav a {
    font-size: 13px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: 20px;
  }
  .head-nav {
    display: none;
  }
  .head-cta {
    margin-left: auto;
  }
  .split,
  .split.wide-left,
  .egress-notes {
    grid-template-columns: minmax(0, 1fr);
  }
  .limit {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .callout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .foot-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-nav {
    flex-flow: row wrap;
    gap: 8px 18px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }
  h1 {
    max-width: none;
  }
  .band h2 {
    max-width: none;
  }
  .stats,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .cta-row .btn {
    width: 100%;
  }
  .media figcaption,
  .stat {
    font-size: 13px;
  }
  /* The dimension read-out is chrome, not content — drop it before it wraps the header. */
  .media-head-right {
    display: none;
  }
  .rulecard-val {
    font-size: 32px;
  }
  .diagram-panels {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .diagram {
    padding: 14px 14px 0;
  }
}

/* Respect the user's stated preference: no reveal animation, no autoplay (see main.js). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Someone will print this page for a client meeting. Make that not embarrassing. */
@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }
  .site-head,
  .grid-field,
  .media-toggle,
  .cta-row,
  .foot-nav {
    display: none !important;
  }
  .band,
  .band.alt,
  .closing,
  .site-foot {
    background: #fff;
    border-color: #ccc;
  }
  h1,
  h2,
  h3,
  .limit-head {
    color: #000;
  }
  p,
  .lede,
  .stat p,
  .split-main p {
    color: #333;
  }
  a {
    color: #000;
    border: 0;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
