/* ============================================================================
   TERUN marketing site — "the instrument, not the poster"
   A precision measuring device for your running fitness that reads you honestly.

   Type    : Saira (display, engineered) · Hanken Grotesk (body) · Geist Mono (data)
   Colour  : violet brand · teal = measured fitness · amber = goal line  (semantic)
   Signature: a dark "readout" instrument panel — a lit measurement screen
              embedded in the bright page. No build step.
   ============================================================================ */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* neutrals carry a faint violet bias — chosen, not default grey */
  --bg:        #fbfaff;
  --bg-2:      #f2effb;
  --surface:   #ffffff;
  --surface-2: #f7f5fd;
  --ink:       #16132a;
  --ink-2:     #4e496f;
  --ink-3:     #6b6590;   /* tertiary text — kept ≥4.5:1 on --bg */
  --line:      #e5e0f2;
  --line-2:    #eeeaf7;

  --brand:      #6836ee;
  --brand-2:    #4a24c0;   /* links / hover / deep */
  --brand-wash: #eee9ff;
  --on-brand:   #ffffff;   /* text/icon colour that sits on the brand fill */

  --teal:    #0d9b89;   /* data / measured fitness curve */
  --amber:   #cf7c22;   /* goal line */

  --good:    #2f9e57;
  --warn:    #c78710;
  --bad:     #d64545;

  /* the readout panel is a physical instrument screen — always dark, both themes */
  --panel:        #0c0a18;
  --panel-2:      #14112a;
  --panel-line:   #241f3f;
  --panel-grid:   #1b1733;
  --panel-ink:    #efecfb;
  --panel-ink-2:  #9d97c2;
  --panel-teal:   #34d6c0;
  --panel-amber:  #f2ad5c;
  --panel-brand:  #a98cff;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --maxw:      1160px;

  --shadow-sm: 0 1px 2px rgba(23,20,42,.05), 0 3px 10px rgba(23,20,42,.045);
  --shadow:    0 1px 2px rgba(23,20,42,.05), 0 12px 34px rgba(23,20,42,.08);
  --shadow-panel: 0 2px 8px rgba(12,10,24,.28), 0 24px 60px -18px rgba(12,10,24,.5);

  --font-display: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* semantic z-index scale */
  --z-header: 40;
  --z-menu:   60;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b0916;
    --bg-2:      #100d20;
    --surface:   #16122b;
    --surface-2: #1b1636;
    --ink:       #f0edfa;
    --ink-2:     #b3adcf;
    --ink-3:     #8f89ac;
    --line:      #29234499;
    --line-2:    #221c3c;
    --brand:     #a98cff;
    --brand-2:   #c8b8ff;
    --brand-wash:#211b3c;
    --on-brand:  #14102a;
    --teal:      #34d6c0;
    --amber:     #f0ac5a;
    --good:      #4ec27e;
    --warn:      #ecb23f;
    --bad:       #f0736f;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 5px 16px rgba(0,0,0,.4);
    --shadow:    0 1px 2px rgba(0,0,0,.5), 0 16px 44px rgba(0,0,0,.5);
    --shadow-panel: 0 2px 8px rgba(0,0,0,.5), 0 26px 60px -18px rgba(0,0,0,.7);
  }
}
/* explicit toggle wins over the media query, in both directions */
:root[data-theme="light"] {
  --bg:#fbfaff; --bg-2:#f2effb; --surface:#fff; --surface-2:#f7f5fd;
  --ink:#16132a; --ink-2:#4e496f; --ink-3:#6b6590; --line:#e5e0f2; --line-2:#eeeaf7;
  --brand:#6836ee; --brand-2:#4a24c0; --brand-wash:#eee9ff; --on-brand:#fff;
  --teal:#0d9b89; --amber:#cf7c22; --good:#2f9e57; --warn:#c78710; --bad:#d64545;
  --shadow-sm:0 1px 2px rgba(23,20,42,.05),0 3px 10px rgba(23,20,42,.045);
  --shadow:0 1px 2px rgba(23,20,42,.05),0 12px 34px rgba(23,20,42,.08);
  --shadow-panel:0 2px 8px rgba(12,10,24,.28),0 24px 60px -18px rgba(12,10,24,.5);
}
:root[data-theme="dark"] {
  --bg:#0b0916; --bg-2:#100d20; --surface:#16122b; --surface-2:#1b1636;
  --ink:#f0edfa; --ink-2:#b3adcf; --ink-3:#8f89ac; --line:#29234499; --line-2:#221c3c;
  --brand:#a98cff; --brand-2:#c8b8ff; --brand-wash:#211b3c; --on-brand:#14102a;
  --teal:#34d6c0; --amber:#f0ac5a; --good:#4ec27e; --warn:#ecb23f; --bad:#f0736f;
  --shadow-sm:0 1px 2px rgba(0,0,0,.5),0 5px 16px rgba(0,0,0,.4);
  --shadow:0 1px 2px rgba(0,0,0,.5),0 16px 44px rgba(0,0,0,.5);
  --shadow-panel:0 2px 8px rgba(0,0,0,.5),0 26px 60px -18px rgba(0,0,0,.7);
}

/* --- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 5px; }
::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.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-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; transition: top .15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* mono data label — the "instrument readout" motif, used sparingly */
.tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  /* darken toward ink in light mode, lighten in dark — keeps the teal legible either way */
  color: color-mix(in srgb, var(--teal) 68%, var(--ink));
  font-weight: 500;
}

/* --- Headings ----------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -.02em; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3.8vw, 2.6rem); line-height: 1.08; }
h3 { font-size: 1.16rem; letter-spacing: -.01em; line-height: 1.28; font-weight: 700; }
p.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2);
  max-width: 56ch; line-height: 1.55; text-wrap: pretty; margin: 0;
}

/* --- Header / nav ------------------------------------------------------- */
header.site {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.24rem;
  letter-spacing: .01em; color: var(--ink); display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 20%, transparent);
}
.brand b { color: var(--brand); font-weight: 800; }
.nav .links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav .links a.navlink {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em;
  text-transform: lowercase; color: var(--ink-2);
  padding: 8px 11px; border-radius: 8px;
}
.nav .links a.navlink:hover { color: var(--ink); text-decoration: none; background: var(--bg-2); }
.nav .links a.navlink[aria-current="page"] { color: var(--brand); }

.icon-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  display: inline-grid; place-items: center; transition: color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .nav .links a.navlink { display: none; }
  .menu-btn { display: inline-grid; }
}

/* mobile disclosure menu */
.mobile-menu { display: none; }
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu {
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 64px; z-index: var(--z-menu);
}
.mobile-menu .wrap { padding-top: 8px; padding-bottom: 14px; display: grid; gap: 2px; }
.mobile-menu a {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .02em;
  text-transform: lowercase; color: var(--ink-2); padding: 12px 8px;
  border-radius: 8px; min-height: 44px; display: flex; align-items: center;
}
.mobile-menu a:hover { background: var(--bg-2); color: var(--ink); text-decoration: none; }
.mobile-menu a[aria-current="page"] { color: var(--brand); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; min-height: 46px;
  transition: transform .12s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-2); color: var(--on-brand); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--bg-2); }
.btn-sm { padding: 9px 15px; font-size: .88rem; min-height: 38px; }

/* --- Sections ----------------------------------------------------------- */
section { padding: clamp(56px, 8vw, 88px) 0; }
section.tight { padding: clamp(44px, 6vw, 60px) 0; }
section.soft {
  background: var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-head { max-width: 60ch; margin-bottom: clamp(32px, 5vw, 48px); }
.section-head h2 { margin: 0 0 12px; }
.section-head p { color: var(--ink-2); margin: 0; font-size: 1.06rem; text-wrap: pretty; }
.section-head .tag { display: block; margin-bottom: 14px; }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: clamp(56px, 8vw, 92px) 0 clamp(52px, 7vw, 76px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(36px, 5vw, 58px); align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { margin: 18px 0 20px; }
.hero .status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  padding: 6px 12px 6px 10px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero .status .live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent); }
  70%,100% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--teal) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .hero .status .live { animation: none; } }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.cta-note { font-family: var(--font-mono); color: var(--ink-3); font-size: .76rem; margin: 15px 0 0; letter-spacing: .01em; }

/* faint plotting grid + tick baseline behind the hero */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(115% 80% at 72% 22%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(115% 80% at 72% 22%, #000 0%, transparent 70%);
  opacity: .6;
}
.hero .wrap { position: relative; z-index: 1; }

/* --- Readout panel (the signature) -------------------------------------- */
/* a physical instrument screen — always dark, in both page themes.
   the hero canvas reads these scoped custom-props for its colours. */
.readout {
  --teal:  var(--panel-teal);
  --amber: var(--panel-amber);
  --line:  var(--panel-line);
  --ink-3: var(--panel-ink-2);
  --surface: var(--panel);
  background:
    radial-gradient(120% 120% at 85% 0%, #171233 0%, transparent 55%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  padding: 16px 16px 14px; position: relative; overflow: hidden;
  color: var(--panel-ink);
}
/* tick grid inside the screen */
.readout::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--panel-grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--panel-grid) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .5;
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}
.readout > * { position: relative; z-index: 1; }
.readout .r-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.readout .r-title {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--panel-ink-2);
}
.readout .r-sample {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--panel-ink-2);
  border: 1px solid var(--panel-line); border-radius: 5px; padding: 2px 6px;
}
.readout canvas { display: block; width: 100%; height: auto; }

/* numeric strip under the plot */
.readout .r-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--panel-line);
}
.readout .r-stat { display: flex; flex-direction: column; gap: 3px; }
.readout .r-stat .k { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--panel-ink-2); }
.readout .r-stat .v { font-family: var(--font-mono); font-size: 1.06rem; font-weight: 500; color: var(--panel-ink); letter-spacing: -.01em; }
.readout .r-stat .v.teal { color: var(--panel-teal); }
.readout .r-stat .v.amber { color: var(--panel-amber); }

.readout .r-legend {
  display: flex; gap: 16px; margin-top: 12px;
  font-family: var(--font-mono); font-size: .66rem; color: var(--panel-ink-2);
}
.readout .r-legend span { display: inline-flex; align-items: center; gap: 7px; }
.readout .r-legend i { width: 15px; height: 0; border-top-width: 2px; border-top-style: solid; display: inline-block; }
.readout .leg-fit i { border-color: var(--panel-teal); }
.readout .leg-goal i { border-color: var(--panel-amber); border-top-style: dashed; }

/* --- Feature bento ------------------------------------------------------ */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); }
.cell h3 { margin: 0 0 7px; }
.cell p { color: var(--ink-2); margin: 0; font-size: .96rem; text-wrap: pretty; }
.cell .code {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em;
  color: var(--ink-3); margin-bottom: 12px; display: block;
}
.cell .ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-wash); color: var(--brand); margin-bottom: 14px;
}
.cell .ic svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; }
/* lead cells span wider and carry a mini instrument visual */
.cell.lead { grid-column: span 7; }
.cell.lead-2 { grid-column: span 5; }
.cell.small { grid-column: span 3; }
.cell .mini { margin-top: 18px; }
@media (max-width: 1000px) {
  .cell.lead, .cell.lead-2 { grid-column: span 12; }
  .cell.small { grid-column: span 6; }
}
@media (max-width: 560px) {
  .bento { gap: 12px; }
  .cell.small { grid-column: span 12; }
}

/* mini pace–HR fit visual (SVG) */
.mini-fit { width: 100%; height: auto; display: block; }
.mini-fit .grid-l { stroke: var(--line); stroke-width: 1; }
.mini-fit .pt { fill: var(--teal); opacity: .85; }
.mini-fit .fit { stroke: var(--teal); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.mini-fit .lbl { font-family: var(--font-mono); font-size: 9px; fill: var(--ink-3); letter-spacing: .05em; }

/* mini goal-delta readout */
.delta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--line-2);
}
.delta .row { display: flex; flex-direction: column; gap: 2px; }
.delta .k { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.delta .v { font-family: var(--font-mono); font-size: 1.02rem; color: var(--ink); font-weight: 500; }
.delta .v.short { color: color-mix(in srgb, var(--warn) 66%, var(--ink)); }
.delta .v.ok { color: color-mix(in srgb, var(--good) 66%, var(--ink)); }

/* --- Steps (a real, ordered process) ------------------------------------ */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); position: relative; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  color: var(--brand); background: var(--brand-wash);
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 30px; border-radius: 8px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: .96rem; text-wrap: pretty; }

/* --- Periodization figure (signature echo) ------------------------------ */
.periodization {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: clamp(18px, 3vw, 28px); margin-top: 8px;
}
.periodization figure { margin: 0; }
.perio-svg { width: 100%; height: auto; display: block; }
.perio-svg .axis { stroke: var(--line); stroke-width: 1; }
.perio-svg .goal { stroke: var(--amber); stroke-width: 1.6; stroke-dasharray: 5 5; fill: none; }
.perio-svg .curve { stroke: var(--teal); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.perio-svg .area { fill: url(#perioFill); }
.perio-svg .band { fill: var(--brand); opacity: 0; }
.perio-svg .band.b1 { opacity: .04; }
.perio-svg .band.b2 { opacity: .07; }
.perio-svg .band.b3 { opacity: .11; }
.perio-svg .band.b4 { opacity: .05; }
.perio-svg .divider { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.perio-svg .dot-race { fill: var(--amber); stroke: var(--surface); stroke-width: 2.5; }
.perio-svg .phase-k { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.perio-svg .phase-n { font-family: var(--font-display); font-weight: 800; font-size: 17px; fill: var(--ink); }
.perio-svg .phase-d { font-family: var(--font-body); font-size: 12.5px; fill: var(--ink-2); }
.perio-svg .goal-lbl { font-family: var(--font-mono); font-size: 11px; fill: var(--amber); letter-spacing: .05em; }
/* draw-on animation: the fitness curve draws; goal + labels fade in after.
   The whole .periodization block is also a .reveal, so nothing shows before
   it enters the viewport — no pre-reveal flicker to guard against. */
.perio-svg .curve { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.periodization.in .curve { animation: draw 1.5s cubic-bezier(.4,0,.1,1) forwards; }
.periodization.in .area,  .periodization.in .goal,    .periodization.in .goal-lbl,
.periodization.in .dot-race, .periodization.in .today,
.periodization.in .phase-k, .periodization.in .phase-n, .periodization.in .phase-d {
  animation: fadeIn .7s ease .85s both;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
/* visible by default without JS */
html:not(.js) .perio-svg .curve { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .perio-svg .curve { stroke-dashoffset: 0 !important; animation: none !important; }
  .periodization.in .area,  .periodization.in .goal,    .periodization.in .goal-lbl,
  .periodization.in .dot-race, .periodization.in .today,
  .periodization.in .phase-k, .periodization.in .phase-n, .periodization.in .phase-d {
    animation: none;
  }
}

/* --- Callout (honesty note) --------------------------------------------- */
.callout {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--amber) 7%, var(--surface)), var(--surface));
  padding: 24px 26px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  position: relative;
}
.callout .k {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--amber); display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.callout .k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.callout p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.callout strong { color: var(--ink); }

/* --- FAQ ---------------------------------------------------------------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 2px 20px; margin-bottom: 10px; background: var(--surface);
  transition: border-color .18s ease, background .18s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 32%, var(--line)); background: var(--surface-2); }
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.04rem;
  padding: 16px 0; list-style: none; display: flex; justify-content: space-between;
  gap: 16px; align-items: center; min-height: 30px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  background: var(--brand);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details > p { margin: 0 0 18px; color: var(--ink-2); }

/* --- CTA band ----------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .inner {
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--brand) 12%, var(--surface)) 0%, var(--surface) 60%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(40px, 6vw, 60px) 28px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.cta-band .inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 40px 100%;
  mask-image: radial-gradient(80% 120% at 50% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(80% 120% at 50% 0%, #000, transparent 70%);
  opacity: .6;
}
.cta-band .inner > * { position: relative; }
.cta-band h2 { margin: 0 0 12px; }
.cta-band p { color: var(--ink-2); margin: 0 auto 26px; max-width: 48ch; }

/* --- Prose (article pages) --------------------------------------------- */
.prose { max-width: 720px; }
.prose > .muted { color: var(--ink-2); font-size: 1.16rem; line-height: 1.5; text-wrap: pretty; }
.prose h1 { margin-bottom: 14px; }
.prose h2 { margin: 44px 0 12px; }
.prose h3 { margin: 28px 0 8px; font-size: 1.18rem; }
.prose p, .prose li { color: var(--ink); text-wrap: pretty; }
.prose p { line-height: 1.62; }
.prose ul { padding-left: 20px; }
.prose li { margin: 9px 0; }
.prose li::marker { color: var(--brand); }
.prose .muted { color: var(--ink-2); }
.prose .callout { margin: 30px 0; }
.prose .steps { margin: 24px 0; }

/* --- Footer ------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--line); padding: 44px 0; color: var(--ink-2);
  font-size: .9rem; margin-top: 24px; background: var(--bg-2);
}
footer.site .cols { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer.site a.foot { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-2); text-transform: lowercase; }
footer.site a.foot:hover { color: var(--ink); }
footer.site .spacer { margin-left: auto; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-3); }
@media (max-width: 560px) { footer.site .spacer { margin-left: 0; width: 100%; } }

/* --- Breadcrumb --------------------------------------------------------- */
.crumb { font-family: var(--font-mono); color: var(--ink-3); font-size: .76rem; padding-top: 28px; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--brand); }

/* --- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
/* never hide content when JS is unavailable or motion is reduced */
html:not(.js) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
</content>
