/* ==========================================================================
   Corpus 4AR — site design system
   Colours are traced to the shipped app: the icon (design/logo-concepts/
   concept-d-pelvis-reticle.svg) and the in-app render palette
   (AnatomicalStructure.swift). Dark is canonical; light is derived.
   ========================================================================== */

:root {
  color-scheme: dark light;

  /* Brand constants — identical in both schemes */
  --brand-cyan: #7FE0E8;         /* icon mark, 19.5% of AppIcon.png */
  --brand-navy: #0B3954;         /* icon gradient top */
  --brand-teal: #1A5F7A;         /* icon gradient bottom */
  --brand-gradient: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-teal) 100%);

  /* Render palette — swatches and rules only, never text */
  --anat-bone: #F2E6D1;          /* AnatomicalStructure.swift:116 skeletonColor */
  --anat-muscle: #B83338;        /* AnatomicalStructure.swift:119 muscleColor */
  --anat-organ: #D91A1F;         /* Heart, AnatomicalStructure+Data.swift */

  /* Body-system tints — AnatomicalStructure.swift BodySystem.tintColor */
  --sys-digestive: #F2A633;
  --sys-respiratory: #66BFF2;
  --sys-cardiovascular: #E6404C;
  --sys-nervous: #B28CE6;
  --sys-urinary: #F2D94C;
  --sys-reproductive: #E68CB2;
  --sys-endocrine: #80CC80;
  --sys-lymphatic: #66B2A6;

  /* Tracking-signal tints — ConfidencePill.swift */
  --sig-strong: #30D158;
  --sig-approx: #FFD60A;
  --sig-searching: #FF453A;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-display: clamp(2.375rem, 1.55rem + 3.5vw, 3.75rem);
  --t-h1: clamp(1.875rem, 1.5rem + 1.4vw, 2.375rem);
  --t-h2: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --t-h3: 1.1875rem;
  --t-lede: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-micro: 0.8125rem;
  --t-stat: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);

  /* Space (4px base) */
  --s1: 4px;  --s2: 8px;   --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px;  --s8: 64px; --s9: 96px;

  /* Radii — the app's own scale */
  --r-xs: 4px; --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --r-pill: 999px;

  --wrap: 1120px;
  --wrap-narrow: 720px;
  --measure: 68ch;
}

/* ---------- Dark (canonical) ---------- */
:root {
  --bg: #0A0F1A;                        /* AnatomyInfoSheet.swift:139 card fill */
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);

  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, 0.74);
  --text-3: rgba(255, 255, 255, 0.55);

  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-strong: rgba(255, 255, 255, 0.26);
  --hairline-faint: rgba(255, 255, 255, 0.08);

  --link: #7FE0E8;
  --link-hover: #ADEDF2;
  --reticle: #7FE0E8;
  --stat-rule: var(--hairline-faint);
  --swatch-ring: rgba(255, 255, 255, 0.28);
  --accent-fill: #7FE0E8;
  --accent-ink: #06101B;
  --accent-wash: rgba(127, 224, 232, 0.12);
  --focus-ring: #7FE0E8;

  --callout-bg: rgba(255, 140, 128, 0.09);
  --callout-border: rgba(255, 140, 128, 0.38);
  --callout-text: #FF8C80;               /* AnatomyInfoSheet.swift:177 */
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow: 0 0 60px rgba(127, 224, 232, 0.16);
}

/* ---------- Light ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F5F7FA;                       /* concept-b gradient start */
    --surface: #FFFFFF;
    --surface-2: #EDF1F6;

    --text: #0B3954;
    --text-2: #2C5F7F;                   /* concept-b silhouette */
    --text-3: #4A6478;                   /* 5.8:1 on --bg; every consumer is 13–15px */

    --hairline: rgba(11, 57, 84, 0.16);
    --hairline-strong: rgba(11, 57, 84, 0.3);
    --hairline-faint: rgba(11, 57, 84, 0.08);

    --link: #16607E;
    --link-hover: #0B3954;
    /* Brand cyan is 2.0:1 on the light background — the reticle steps to teal. */
    --reticle: #1A5F7A;
    --stat-rule: var(--hairline);
    --swatch-ring: rgba(11, 57, 84, 0.45);
    --accent-fill: #0B3954;
    --accent-ink: #FFFFFF;
    --accent-wash: rgba(26, 95, 122, 0.08);
    --focus-ring: #1A5F7A;

    --callout-bg: rgba(184, 51, 56, 0.06);
    --callout-border: rgba(184, 51, 56, 0.34);
    --callout-text: #8E2529;
    --shadow-2: 0 16px 40px rgba(11, 57, 84, 0.13);
    --glow: none;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.018em; font-weight: 600; margin: 0; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.008em; }
p { margin: 0 0 var(--s4); }
strong { font-weight: 600; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

main a:not(.btn):not(.badge-link):not(.card-link):not(.chip) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}
main a:not(.btn):not(.badge-link):not(.card-link):not(.chip):hover {
  text-decoration-color: currentColor;
}

img, svg { max-width: 100%; height: auto; display: block; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border-radius: var(--r-xs);
  padding: 0.12em 0.4em;
  line-height: 1.4;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--accent-fill); color: var(--accent-ink);
  padding: var(--s3) var(--s5); border-radius: var(--r-sm); font-weight: 600;
}
.skip:focus { top: var(--s4); color: var(--accent-ink); }

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}
.wrap-narrow { max-width: var(--wrap-narrow); }

section { padding-block: clamp(var(--s7), 7vw, var(--s9)); }
section + section { border-top: 1px solid var(--hairline-faint); }
section h2 { margin-bottom: var(--s4); }
.grid + p, .grid + .measure { margin-top: var(--s6); }

.eyebrow {
  font-size: var(--t-micro);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--link);
  margin: 0 0 var(--s3);
}
.lede { font-size: var(--t-lede); color: var(--text-2); max-width: var(--measure); }
.small { font-size: var(--t-small); color: var(--text-3); }
.measure { max-width: var(--measure); }

/* ==========================================================================
   Header / footer
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);  /* fallback where color-mix is unsupported */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--hairline-faint);
}
.site-header > .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); min-height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s3);
  font-weight: 600; letter-spacing: -0.02em; color: var(--text);
  padding-block: var(--s2);
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; flex: none; }

.site-nav { display: flex; align-items: center; gap: var(--s2); }
.site-nav a {
  color: var(--text-2); font-size: var(--t-small); font-weight: 500;
  padding: var(--s3) var(--s3); border-radius: var(--r-sm);
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav .btn { color: var(--accent-ink); }
.nav-hide { display: none; }
@media (min-width: 760px) { .nav-hide { display: inline-flex; } }

.site-footer {
  border-top: 1px solid var(--hairline-faint);
  padding-block: var(--s8) var(--s7);
  color: var(--text-3);
  font-size: var(--t-small);
}
.footer-cols {
  display: grid; gap: var(--s6);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: var(--s7);
}
.footer-cols h2 {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-3); margin-bottom: var(--s3); font-weight: 600;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: var(--s1); }
.footer-cols a { color: var(--text-2); display: inline-block; padding-block: var(--s2); }
.footer-cols a:hover { color: var(--link); }
.fine { max-width: 74ch; }
.fine p { margin-bottom: var(--s3); }
/* Inline links inside prose need more than colour to be identifiable. */
.fine a { text-decoration: underline; text-underline-offset: 0.18em; }

/* ==========================================================================
   Buttons and the App Store badge
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: var(--s3) var(--s5);
  background: var(--accent-fill); color: var(--accent-ink);
  border-radius: var(--r-pill); font-weight: 600; font-size: var(--t-small);
  border: 1px solid transparent; text-align: center;
  transition: opacity 120ms ease-out, background-color 120ms ease-out;
}
.btn:hover { opacity: 0.88; color: var(--accent-ink); }
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--hairline-strong);
}
.btn--ghost:hover { background: var(--surface); color: var(--text); opacity: 1; }

/* Apple's badge artwork is used unmodified — no plate, padding, recolour or
   distortion. Only the wrapper is styled. The scheme-appropriate variant is
   picked in the markup with <picture>: black lozenge on light, white on dark. */
.badge-link {
  display: inline-block; border-radius: var(--r-sm); line-height: 0;
  transition: opacity 120ms ease-out;
}
.badge-link:hover { opacity: 0.85; }
.badge-link img { height: 52px; width: auto; }

.cta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4);
  margin-block: var(--s6) var(--s4);
}
.meta-line { font-size: var(--t-small); color: var(--text-3); margin: 0 0 var(--s2); }
.trust-line {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); margin: 0;
}
.trust-line b { color: var(--text-2); font-weight: 500; }
.trust-line span { color: var(--link); padding-inline: var(--s1); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding-block: clamp(var(--s7), 6vw, var(--s9)); }
.hero-grid { display: grid; gap: clamp(var(--s7), 6vw, var(--s9)); align-items: center; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero h1 { font-size: var(--t-display); letter-spacing: -0.025em; line-height: 1.03; }
.hero .lede { margin-top: var(--s5); }

/* Reticle frame — the app icon's corner brackets at page scale */
.reticle { position: relative; padding: clamp(18px, 3vw, 30px); }
.reticle::before, .reticle::after,
.reticle > .reticle-b::before, .reticle > .reticle-b::after {
  content: ""; position: absolute; width: 34px; height: 34px;
  border: 2.5px solid var(--reticle); border-radius: 3px;
  opacity: 0.75;
}
.reticle::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle::after { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle > .reticle-b::before { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle > .reticle-b::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .reticle::before, .reticle::after,
  .reticle > .reticle-b::before, .reticle > .reticle-b::after {
    animation: breathe 4.5s ease-in-out infinite;
  }
}
@keyframes breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.85; } }

/* Device frame */
.device {
  position: relative; margin-inline: auto; max-width: 300px;
  border-radius: 34px; padding: 8px;
  background: linear-gradient(160deg, #2A3644, #0F1621);
  box-shadow: var(--shadow-2), var(--glow);
}
.device img { border-radius: 27px; width: 100%; }
.device--sm { max-width: 250px; }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--stat-rule);
  border: 1px solid var(--stat-rule); border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 780px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg); padding: var(--s5) var(--s4); text-align: center; }
.stat b {
  display: block; font-size: var(--t-stat); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat span {
  display: block; margin-top: var(--s2);
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3);
}

/* ==========================================================================
   Panels, cards, grids
   ========================================================================== */

.panel {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--s5);
}
.panel > :last-child { margin-bottom: 0; }
.panel h3 { margin-bottom: var(--s3); }
.panel--caution {
  background: var(--callout-bg); border-color: var(--callout-border);
}
.panel--caution h2, .panel--caution h3 { color: var(--callout-text); }

.grid { display: grid; gap: var(--s5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.split { display: grid; gap: clamp(var(--s6), 5vw, var(--s8)); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 0.85fr 1.15fr; }
  .split--rev { grid-template-columns: 1.15fr 0.85fr; }
}

/* Layer cards carry the structure's real render colour as a left rule */
.layer {
  border-left: 3px solid var(--rule, var(--hairline-strong));
  padding: var(--s1) 0 var(--s1) var(--s5);
}
.layer h3 { margin-bottom: var(--s2); }
.layer p { color: var(--text-2); margin-bottom: 0; }
.layer--bone { --rule: var(--anat-bone); }
.layer--organ { --rule: var(--anat-organ); }
.layer--muscle { --rule: var(--anat-muscle); }

/* Numbered steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 var(--s5) var(--s7);
  border-left: 1px solid var(--hairline);
  margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: -16px; top: -2px;
  width: 31px; height: 31px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--brand-cyan);
  color: var(--link); font-size: var(--t-micro); font-weight: 700;
}
.steps h3 { margin-bottom: var(--s1); }
.steps p { color: var(--text-2); margin-bottom: 0; }

/* Checklist */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li {
  position: relative; padding-left: var(--s6); margin-bottom: var(--s4);
  color: var(--text-2);
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--link);
}
.checks strong { color: var(--text); }

/* Plain bullet list */
.bullets { margin: 0; padding-left: 1.15em; color: var(--text-2); }
.bullets li { margin-bottom: var(--s2); }
.bullets strong { color: var(--text); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s4); min-height: 36px;
  border: 1px solid var(--chip-tint, var(--hairline));
  background: color-mix(in srgb, var(--chip-tint, var(--text)) 10%, transparent);
  border-radius: var(--r-pill);
  font-size: var(--t-small); font-weight: 500; color: var(--text);
}
.chip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--chip-tint, var(--text-3)); flex: none;
  /* Several render tints are under 3:1 on the light background — the ring
     gives the dot a boundary that clears WCAG 1.4.11 either way. */
  box-shadow: 0 0 0 1px var(--swatch-ring);
}
.sys-digestive { --chip-tint: var(--sys-digestive); }
.sys-respiratory { --chip-tint: var(--sys-respiratory); }
.sys-cardiovascular { --chip-tint: var(--sys-cardiovascular); }
.sys-nervous { --chip-tint: var(--sys-nervous); }
.sys-urinary { --chip-tint: var(--sys-urinary); }
.sys-reproductive { --chip-tint: var(--sys-reproductive); }
.sys-endocrine { --chip-tint: var(--sys-endocrine); }
.sys-lymphatic { --chip-tint: var(--sys-lymphatic); }
.sig-strong { --chip-tint: var(--sig-strong); }
.sig-approx { --chip-tint: var(--sig-approx); }
.sig-searching { --chip-tint: var(--sig-searching); }

/* Card that is entirely a link */
.card-link {
  display: block; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--s5); color: var(--text);
  transition: border-color 120ms ease-out, background-color 120ms ease-out;
}
.card-link:hover {
  border-color: var(--brand-cyan); background: var(--accent-wash); color: var(--text);
}
.card-link h3 { margin-bottom: var(--s2); }
.card-link p { color: var(--text-2); margin-bottom: 0; font-size: var(--t-small); }

/* Closing band — the one place the icon's full gradient appears */
.band {
  background: var(--brand-gradient); color: #FFFFFF;
  text-align: center; border-radius: var(--r-xl);
  padding: clamp(var(--s7), 6vw, var(--s8)) var(--s5);
}
.band h2 { color: #FFFFFF; max-width: 22ch; margin-inline: auto; }
.band p { color: rgba(255, 255, 255, 0.78); }
.band .cta-row { justify-content: center; margin-bottom: 0; }
/* The band keeps the brand gradient in both schemes, so the light-mode teal
   focus ring would be invisible on it. */
.band { --focus-ring: #FFFFFF; }

/* ==========================================================================
   Document pages (privacy, terms, support, faq, guide)
   ========================================================================== */

.doc { padding-block: var(--s7) var(--s8); }
.doc h1 { margin-bottom: var(--s2); }
.doc h2 {
  font-size: 1.5rem; margin: var(--s8) 0 var(--s4);
  scroll-margin-top: 80px;
}
.doc h3 { margin: var(--s5) 0 var(--s2); scroll-margin-top: 80px; }
.doc p, .doc li { color: var(--text-2); }
.doc h1 + .meta { margin-bottom: var(--s6); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 1.15em; }
.doc li { margin-block: var(--s2); }
.doc .wrap > :first-child { margin-top: 0; }

.meta {
  font-size: var(--t-small); color: var(--text-3);
  padding-bottom: var(--s4); border-bottom: 1px solid var(--hairline-faint);
}

.toc {
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: var(--s4) var(--s5); margin-bottom: var(--s6);
  background: var(--surface);
}
.toc summary {
  cursor: pointer; font-weight: 600; font-size: var(--t-small);
  padding-block: var(--s2);
}
.toc ol { margin: var(--s3) 0 0; padding-left: 1.4em; font-size: var(--t-small); }
.toc li { margin-block: var(--s1); }
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--link); }

/* FAQ */
.qa { border-top: 1px solid var(--hairline-faint); padding-block: var(--s5); }
.qa h3 { margin: 0 0 var(--s2); }
.qa p:last-child { margin-bottom: 0; }
.qa p { color: var(--text-2); }

/* ==========================================================================
   Anatomy index
   ========================================================================== */

/* Deliberately not sticky: the chip row wraps to three lines on a phone, and a
   second sticky bar of unpredictable height makes scroll-margin-top for the
   in-page anchors unsolvable. It sits at the top of the page and scrolls away. */
.index-nav {
  border-block: 1px solid var(--hairline-faint);
  padding-block: var(--s4);
  margin-bottom: var(--s6);
}
.index-nav .chips { gap: var(--s2); }
.index-nav .chip::before { display: none; }
.index-nav a.chip:hover { border-color: var(--brand-cyan); color: var(--text); }

.region { margin-bottom: var(--s7); }
.region h3 {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-3); font-weight: 600;
  padding-bottom: var(--s2); margin-bottom: var(--s4);
  border-bottom: 1px solid var(--hairline-faint);
}
.st-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s3) var(--s5);
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.st {
  display: flex; align-items: baseline; gap: var(--s3);
  font-size: var(--t-small); line-height: 1.4;
}
.st::before {
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 2px;
  background: var(--st-tint, var(--chip-tint, var(--text-3)));
  box-shadow: 0 0 0 1px var(--swatch-ring);
  position: relative; top: 1px;
}
.st i { font-style: italic; color: var(--text-3); }
.st-name { color: var(--text); }
.cat-bone { --st-tint: var(--anat-bone); }
.cat-muscle { --st-tint: var(--anat-muscle); }

/* Count badge beside a heading */
.rc {
  font-size: 0.68em; font-weight: 500; color: var(--text-3);
  font-variant-numeric: tabular-nums; letter-spacing: 0;
  padding-left: var(--s2);
}

.glossary {
  columns: 250px; column-gap: var(--s7);
  font-size: var(--t-small); margin: 0; padding: 0;
}
.glossary--wide { columns: 420px; }
.glossary div { break-inside: avoid; margin-bottom: var(--s2); }
.glossary dt { display: inline; color: var(--text); font-weight: 500; }
.glossary dd {
  display: inline; margin: 0; color: var(--text-3);
}
.glossary dd::before { content: " → "; color: var(--link); }

/* ==========================================================================
   Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Print — the legal pages get printed; inverted-on-background pairs would
   otherwise come out white-on-white.
   ========================================================================== */

@media print {
  .site-header, .index-nav, .skip { position: static; }
  .site-header, .band, .device, .reticle { break-inside: avoid; }
  .band {
    background: none; color: var(--text);
    border: 1px solid var(--hairline);
  }
  .band h2, .band p { color: inherit; }
  .btn {
    background: none; color: var(--text); border-color: currentColor;
  }
  .site-nav, .badge-link { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
