/* ==========================================================================
   Victory IQ
   Concept: the timing screen. Cool pit-lane grey, carbon ink, and one accent:
   timing-screen purple, the colour of the fastest sector.
   One type family (Archivo): wide cuts for display, normal width for reading.
   ========================================================================== */

:root {
  /* Colour */
  --paper: #F1F3F6;
  --surface: #FFFFFF;
  --ink: #121721;
  --ink-soft: #485263;
  --rule: #CBD1DA;
  --rule-strong: #9AA3B2;
  --trace-ref: #B4BBC7;

  --carbon: #151B26;
  --carbon-raised: #1E2633;
  --on-carbon: #E9ECF1;
  --on-carbon-soft: #A3ACBA;
  --rule-dark: #313A4A;

  --purple: #6A2BD8;
  --purple-hover: #5520B5;
  --purple-tint: #F4EFFD;
  --purple-light: #B596FF;

  --error: #B42318;
  --error-tint: #FDF3F2;
  --success: #1F7A4D;

  /* Type */
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.35rem + 1.5vw, 2.625rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
  --step-display: clamp(3.25rem, 1rem + 8vw, 8.5rem);

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --section: clamp(72px, 9vw, 136px);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;
  --medium: 240ms;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

::selection { background: var(--purple); color: #fff; }

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

.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--purple-light); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

/* ---------- Type ---------- */

.display {
  font-size: var(--step-display);
  font-stretch: 125%;
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display-page {
  font-size: var(--step-4);
  line-height: 1.02;
}

.h2 {
  font-size: var(--step-3);
  font-stretch: 112%;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.h3 {
  font-size: var(--step-2);
  font-stretch: 112%;
  font-weight: 500;
  line-height: 1.2;
}

.h4 {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}
.lead-wide { max-width: 64ch; }

.muted { color: var(--ink-soft); }

.prose > * + * { margin-top: 1.1em; }
.prose p { max-width: 62ch; }
.prose .h4 { margin-top: 2.2em; }

.text-link {
  color: var(--purple);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-thickness var(--fast) ease;
}
.text-link:hover { text-decoration-thickness: 2px; }
.section-dark .text-link { color: var(--purple-light); }

.tick-list li {
  position: relative;
  padding-left: 28px;
}
.tick-list li + li { margin-top: 0.6em; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 14px;
  height: 4px;
  border-radius: 1px;
  background: var(--purple);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: 3px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
}

.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-hover); }

.btn-secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.section-dark .btn-secondary { border-color: var(--on-carbon); color: var(--on-carbon); }
.section-dark .btn-secondary:hover { background: var(--on-carbon); color: var(--carbon); }

.btn-small { min-height: 42px; padding: 8px 18px; }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn[hidden] { display: none; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand-name {
  font-size: 1.125rem;
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.mark-sector { fill: currentColor; }
.mark-best { fill: var(--purple); }
.brand-light { color: var(--on-carbon); }
.brand-light .mark-best { fill: var(--purple-light); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--medium) ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-list {
  display: flex;
  gap: 28px;
}

.nav-list a,
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--fast) ease;
}
.nav-list a:hover,
.lang-switch:hover { color: var(--ink); }

.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  height: 2px;
  background: var(--purple);
}

.lang-switch {
  padding-left: 28px;
  border-left: 1px solid var(--rule);
  min-height: 24px;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}
.menu-icon path {
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  transition: d var(--medium) var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-icon path { d: path("M4 4l12 12M4 16L16 4"); }

.nav-list a,
.lang-switch,
.site-nav .btn { white-space: nowrap; }

@media (max-width: 1060px) {
  .menu-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .site-nav:not(.is-open) { display: none; }

  .nav-list { flex-direction: column; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--rule); }
  .nav-list a {
    width: 100%;
    min-height: 56px;
    font-size: var(--step-1);
    color: var(--ink);
  }
  .nav-list a[aria-current="page"]::after { left: auto; right: 0; top: 50%; bottom: auto; width: 14px; height: 4px; }

  .lang-switch {
    border-left: 0;
    padding-left: 0;
    min-height: 56px;
    border-bottom: 1px solid var(--rule);
  }
  .site-nav .btn { margin-top: 20px; }
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(40px, 7vw, 104px); }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.hero-grid .display { grid-column: 1 / -1; }
.hero-side {
  grid-column: 7 / -1;
  margin-top: clamp(28px, 4vw, 48px);
}

@media (max-width: 900px) {
  .hero-side { grid-column: 1 / -1; }
}

/* Telemetry trace */
.trace { margin-top: clamp(48px, 7vw, 88px); }

.trace-plot {
  position: relative;
  height: clamp(220px, 28vw, 380px);
}

.trace-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.trace-grid line {
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.trace-ref,
.trace-best {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
/* The reference lap is a wide grey band under the trained lap, so it stays
   visible where the two laps overlap and opens up where they differ. */
.trace-ref { stroke: var(--trace-ref); stroke-width: 7; }
.trace-best { stroke: var(--purple); stroke-width: 3; }

.trace-note {
  position: absolute;
  left: var(--x);
  top: var(--y);
  bottom: 0;
  width: 0;
  pointer-events: none;
}
.note-dot {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 3px var(--paper);
}
.trace-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 30px;
  border-left: 1px dashed var(--rule-strong);
}
.note-text {
  position: absolute;
  left: -1px;
  bottom: 0;
  padding-left: 10px;
  border-left: 2px solid var(--purple);
  white-space: nowrap;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
}

.trace-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.trace-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--ink); font-weight: 500; }
.legend-item { display: inline-flex; align-items: center; gap: 10px; }
.legend-key { width: 28px; height: 3px; border-radius: 2px; }
.legend-ref { height: 7px; border-radius: 4px; background: var(--trace-ref); }
.legend-best { background: var(--purple); }
.trace-caption-text { flex: 1 1 260px; }
.trace-delta { display: inline-flex; align-items: baseline; gap: 14px; }
.delta-value {
  font-size: var(--step-3);
  font-stretch: 112%;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--purple);
}

/* Live playback (trace.js). Without JavaScript the static trace shows instead. */
.trace-hud,
.trace-cursor { display: none; }

.trace.is-live .trace-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.hud-readouts {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px 0;
}

.hud-cell,
.hud-sectors {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding-inline: 0 28px;
  margin-right: 28px;
  border-right: 1px solid var(--rule);
}

.hud-label {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.hud-value {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--step-2);
  font-stretch: 112%;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hud-value [data-speed] { display: inline-block; min-width: 3ch; text-align: right; }
.hud-unit { font-size: 0.8125rem; font-stretch: 100%; font-weight: 400; color: var(--ink-soft); }

.hud-pedals { gap: 6px; }
.pedal {
  display: grid;
  grid-template-columns: 4.5rem 96px;
  align-items: center;
  gap: 10px;
}
.pedal-track {
  height: 6px;
  border-radius: 1px;
  background: var(--rule);
  overflow: hidden;
}
.pedal-fill {
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.hud-sectors {
  flex-direction: row;
  gap: 6px;
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}
.hud-sectors li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 4.75rem;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface);
  transition: background-color var(--medium) ease, border-color var(--medium) ease;
}
.sector-value {
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hud-sectors .hud-label,
.hud-sectors .sector-value { transition: color var(--medium) ease; }
.hud-sectors li.is-best { background: var(--purple); border-color: var(--purple); }
.hud-sectors li.is-best .hud-label,
.hud-sectors li.is-best .sector-value { color: #fff; }

.hud-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--fast) ease, background-color var(--fast) ease;
}
.hud-toggle:hover { border-color: var(--ink); background: var(--surface); }
.toggle-icon { fill: currentColor; }
.toggle-icon .icon-play,
.hud-toggle.is-paused .icon-pause { display: none; }
.hud-toggle.is-paused .icon-play { display: inline; }
.trace.is-static .hud-toggle { display: none; }

.trace.is-live .trace-cursor {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x, 0%);
  width: 0;
  border-left: 1px solid var(--ink);
  pointer-events: none;
}
.trace.is-static .trace-cursor { display: none; }
.cursor-dot {
  position: absolute;
  left: -7px;
  top: var(--y, 50%);
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--purple);
}

.trace-gap { display: none; }
.trace.is-live .trace-gap {
  display: block;
  position: relative;
  height: clamp(56px, 6vw, 80px);
  margin-top: 12px;
}
.gap-label {
  position: absolute;
  left: 0;
  bottom: 4px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.gap-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gap-zero {
  stroke: var(--rule-strong);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
.gap-line {
  fill: none;
  stroke: var(--purple);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.gap-area { fill: var(--purple); opacity: 0.1; }

.trace.is-live .trace-note { opacity: 0; transition: opacity 0.4s ease; }
.trace.is-live .trace-note.is-visible { opacity: 1; }

@media (max-width: 720px) {
  .trace.is-live .trace-hud {
    position: relative;
    display: block;
  }
  .hud-readouts { gap: 14px 0; }
  .hud-cell { padding-right: 18px; margin-right: 18px; }
  .hud-pedals {
    flex-direction: row;
    gap: 16px;
    width: 100%;
    padding: 0;
    margin: 0;
    border-right: 0;
  }
  .pedal { flex: 1; grid-template-columns: auto 1fr; gap: 8px; }
  .hud-sectors { width: 100%; }
  .hud-sectors li { flex: 1; min-width: 0; }
  .hud-toggle { position: absolute; top: 0; right: 0; }
}

@media (max-width: 680px) {
  .trace-note::before, .note-text { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section-tight { padding-top: clamp(24px, 4vw, 48px); }

.section-dark {
  background: var(--carbon);
  color: var(--on-carbon);
}
.section-dark .lead,
.section-dark p { color: var(--on-carbon-soft); }
.section-dark .h2,
.section-dark .h4 { color: var(--on-carbon); }

.section-head {
  max-width: 820px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head .lead { margin-top: 20px; }

.after-list { margin-top: 40px; }

.split {
  display: grid;
  gap: 32px clamp(32px, 6vw, 96px);
}
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; }
}

.premise { padding-top: clamp(96px, 12vw, 176px); }

/* ---------- Module list (home) ---------- */

.module-list { border-top: 1px solid var(--ink); }
.module-list li { border-bottom: 1px solid var(--rule); }

.module-row {
  position: relative;
  display: grid;
  gap: 6px 40px;
  padding: 26px 0 26px 24px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--fast) ease;
}
.module-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  bottom: 26px;
  width: 4px;
  border-radius: 1px;
  background: var(--purple);
  transform: scaleY(0.25);
  transform-origin: top;
  transition: transform var(--medium) var(--ease-out);
}
.module-row:hover { background: var(--surface); }
.module-row:hover::before,
.module-row:focus-visible::before { transform: scaleY(1); }

.module-name {
  font-size: var(--step-1);
  font-stretch: 112%;
  font-weight: 600;
  line-height: 1.3;
}
.module-short { color: var(--ink-soft); max-width: 60ch; }
.module-format { font-size: var(--step--1); color: var(--ink-soft); }

@media (min-width: 960px) {
  .module-row {
    grid-template-columns: minmax(16rem, 1.1fr) 2fr minmax(11rem, 0.8fr);
    align-items: baseline;
    padding-right: 16px;
  }
  .module-format { text-align: right; }
}

/* ---------- Sectors (method) ---------- */

.sectors {
  display: grid;
  gap: 40px 24px;
  counter-reset: sector;
}
@media (min-width: 640px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .sectors { grid-template-columns: repeat(4, 1fr); } }

.sector-bar {
  display: block;
  height: 6px;
  border-radius: 1px;
  background: var(--purple-light);
}
.sector-finish .sector-bar {
  background: repeating-conic-gradient(var(--on-carbon) 0 25%, transparent 0 50%) 0 0 / 6px 6px;
}

.sector-label {
  display: block;
  margin-top: 20px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--on-carbon-soft);
}
.sector-name {
  margin: 4px 0 10px;
  font-size: var(--step-2);
  font-stretch: 112%;
  font-weight: 500;
  color: var(--on-carbon);
}

/* Light variant on the method page */
.sector-rows { border-top: 1px solid var(--ink); }
.sector-row {
  display: grid;
  gap: 16px clamp(32px, 6vw, 96px);
  padding-block: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--rule);
}
.sector-row p { max-width: 62ch; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
.sector-row .sector-bar { width: 72px; background: var(--purple); }
.sector-row.sector-finish .sector-bar {
  background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 6px 6px;
}
.sector-row .sector-label { color: var(--ink-soft); margin-top: 16px; }
.sector-row .h3 { margin-top: 4px; }
@media (min-width: 900px) {
  .sector-row { grid-template-columns: 5fr 7fr; }
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  gap: 40px clamp(24px, 4vw, 56px);
}
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.feature-grid li {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.feature-grid .h4 { margin-bottom: 10px; }
.feature-grid p { color: var(--ink-soft); max-width: 52ch; }
.section-dark .feature-grid li { border-top-color: var(--rule-dark); }
.section-dark .feature-grid p { color: var(--on-carbon-soft); }

.feature-grid .price {
  margin: -4px 0 12px;
  font-size: var(--step--1);
}
.price-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.section-dark .price-value { color: var(--on-carbon); }

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

.page-hero { padding-block: clamp(48px, 8vw, 112px) clamp(40px, 5vw, 64px); }
.page-hero .lead { margin-top: 28px; }

.jump-nav { margin-top: 40px; }
.jump-nav ul { display: flex; flex-wrap: wrap; gap: 10px; }
.jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--fast) ease, background-color var(--fast) ease;
}
.jump-nav a:hover { border-color: var(--ink); background: var(--surface); }

/* ---------- Module details ---------- */

.module-detail {
  display: grid;
  gap: 32px clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--ink);
}
@media (min-width: 900px) {
  .module-detail { grid-template-columns: 7fr 5fr; }
}
.module-detail-format {
  margin: 12px 0 20px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--purple);
}
.module-detail-intro {
  margin-bottom: 28px;
  max-width: 58ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}
.module-detail-side .h4 { margin-bottom: 14px; font-size: var(--step-0); }
.module-detail-side .tick-list + .h4 { margin-top: 32px; }
.module-detail-side p,
.module-detail-side li { color: var(--ink-soft); }
@media (min-width: 900px) {
  .module-detail-side { padding-top: 10px; }
}

/* ---------- Facilities ---------- */

.facility {
  display: grid;
  gap: 32px clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--ink);
}
@media (min-width: 900px) {
  .facility { grid-template-columns: 7fr 5fr; }
}
.facility .sector-bar { width: 72px; background: var(--purple); }
.facility .sector-bar-open {
  background: repeating-linear-gradient(90deg, var(--purple) 0 8px, transparent 8px 14px);
}
.facility-title { margin-top: 24px; }
.facility-place {
  margin: 10px 0 20px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--purple);
}
.facility-desc {
  max-width: 58ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}
.facility-note {
  margin-top: 16px;
  max-width: 58ch;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.facility-main .text-link { display: inline-block; margin-top: 24px; }
.facility-side .h4 { margin-bottom: 14px; font-size: var(--step-0); }
.facility-side a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--fast) ease;
}
.facility-side a:hover { text-decoration-color: var(--purple); }
@media (min-width: 900px) {
  .facility-side { padding-top: 40px; }
}

/* ---------- About ---------- */

.founder {
  display: grid;
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: center;
}
@media (min-width: 820px) {
  .founder { grid-template-columns: 5fr 7fr; }
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  aspect-ratio: 4 / 5;
  background: var(--carbon);
  color: var(--on-carbon-soft);
  font-size: var(--step--1);
}
.photo-placeholder .brand-mark { width: 60px; height: auto; color: var(--on-carbon); }
.photo-placeholder .mark-best { fill: var(--purple-light); }
.founder-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  background: var(--purple);
}

.founder-text .sector-label { margin: 0; font-weight: 600; color: var(--purple); }
.founder-name { margin: 8px 0 24px; }
.founder-text p:last-child { max-width: 60ch; color: var(--ink-soft); }

/* ---------- Closing CTA ---------- */

.closing {
  padding-block: clamp(64px, 8vw, 112px);
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
}
.closing-title {
  font-size: var(--step-4);
  font-stretch: 125%;
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.closing-lead { margin-top: 20px; max-width: 52ch; color: var(--ink-soft); }
.closing .button-row { margin-top: 0; }

/* ---------- Contact & form ---------- */

.contact-grid {
  display: grid;
  gap: 56px clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (min-width: 980px) {
  .contact-grid { grid-template-columns: 7fr 4fr; }
}

.request-form {
  display: grid;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}

.field-row { display: grid; gap: 28px 20px; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 2fr 1fr; }
  .field-row-even { grid-template-columns: 1fr 1fr; }
}

.field label:not(.choice) {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.req, .opt { font-weight: 400; color: var(--ink-soft); }

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--fast) ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  border-color: var(--purple);
  outline-offset: 0;
}
.field [aria-invalid="true"] { border-color: var(--error) !important; }

.field-help { margin: -2px 0 10px; font-size: var(--step--1); color: var(--ink-soft); }
.field-error {
  margin-top: 8px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--error);
}

.field-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.field-group legend { padding: 0; margin-bottom: 14px; font-size: var(--step-0); }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: 1fr 1fr; } }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 50px;
  padding: 13px 16px;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
  font-size: 0.9375rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color var(--fast) ease, background-color var(--fast) ease;
}
.choice:hover { border-color: var(--rule-strong); }
.choice:has(input:checked) { border-color: var(--purple); background: var(--purple-tint); }
.choice input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--purple);
  cursor: pointer;
}
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.choice-meta {
  display: block;
  margin-top: 2px;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.choice-consent {
  padding: 0;
  border: 0;
  background: none;
  min-height: 0;
  color: var(--ink-soft);
}
.choice-consent:has(input:checked) { background: none; }

.error-summary {
  padding: 18px 20px;
  border: 2px solid var(--error);
  border-radius: 3px;
  background: var(--error-tint);
}
.error-summary-title { font-weight: 600; color: var(--ink); }
.error-summary ul { margin-top: 8px; padding-left: 20px; list-style: disc; }
.error-summary a { color: var(--error); font-weight: 600; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-status { font-size: var(--step--1); font-weight: 600; max-width: 48ch; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

.contact-aside .aside-block {
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.contact-aside .aside-block + .aside-block { margin-top: 48px; }
.contact-aside .h4 { margin-bottom: 12px; }
.contact-aside p + p { margin-top: 10px; }
.contact-aside .muted { font-size: var(--step--1); }

.steps { counter-reset: step; }
.steps li {
  position: relative;
  padding-left: 40px;
  color: var(--ink-soft);
  counter-increment: step;
}
.steps li + li { margin-top: 16px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--purple);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--purple);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--carbon);
  color: var(--on-carbon);
}
.footer-grid {
  display: grid;
  gap: 48px;
  padding-block: clamp(56px, 7vw, 88px) 48px;
}
@media (min-width: 820px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1.2fr; }
}
.footer-tagline {
  margin-top: 24px;
  font-size: var(--step-2);
  font-stretch: 125%;
  font-weight: 300;
  line-height: 1.2;
}
.footer-about { margin-top: 12px; max-width: 40ch; color: var(--on-carbon-soft); }
.footer-heading {
  margin-bottom: 16px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--on-carbon-soft);
}
.footer-col li + li { margin-top: 6px; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--on-carbon);
  text-decoration: none;
  transition: color var(--fast) ease;
}
.footer-col a:hover { color: var(--purple-light); }
.footer-muted { color: var(--on-carbon-soft); font-size: var(--step--1); }
@media (min-width: 820px) {
  .footer-muted { white-space: nowrap; }
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--rule-dark);
  font-size: var(--step--1);
  color: var(--on-carbon-soft);
}

.footer-legal {
  margin-left: 16px;
  color: var(--on-carbon-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule-dark);
  text-underline-offset: 4px;
  transition: color var(--fast) ease;
}
.footer-legal:hover { color: var(--on-carbon); }

/* ---------- Terms ---------- */

.terms-updated { margin-top: 20px; font-size: var(--step--1); color: var(--ink-soft); }
.terms {
  max-width: 68ch;
  border-top: 1px solid var(--ink);
  counter-reset: terms;
}
.terms-section {
  padding-block: 28px;
  border-bottom: 1px solid var(--rule);
  counter-increment: terms;
}
.terms-section .h4 { margin-bottom: 10px; font-size: var(--step-0); }
.terms-section .h4::before {
  content: counter(terms) ".";
  display: inline-block;
  min-width: 1.75em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.terms-section p { color: var(--ink-soft); padding-left: 1.75em; }
.terms-section p + p { margin-top: 0.8em; }
.terms-contact { margin-top: 28px; color: var(--ink-soft); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
