/* Stride website. Colours mirror mobile/src/theme/tokens.ts; contrast pairs
   are listed in README.md. Brand orange is for graphics only, never text. */

:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --raised: #F4F5F6;
  --text: #22282E;
  --muted: #5F6B76;
  --action: #C64B22;
  --on-action: #FFFFFF;
  --teal: #1F7A6C;
  --line: #D9DDE1;
  --field: #7A848E;
  --brand: #E85D2F;
  --ph-bg: #FFE58A;
  --ph-text: #22282E;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171A;
    --raised: #1C2327;
    --text: #ECEEF0;
    --muted: #A3ADB7;
    --action: #F0703F;
    --on-action: #12171A;
    --teal: #4DB6A3;
    --line: #2E373D;
    --field: #7A848E;
    --ph-bg: #5C4A00;
    --ph-text: #FFF6CC;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font); /* 17px */
  overflow-wrap: break-word;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.375rem, 1.2rem + 1vw, 1.75rem); font-weight: 700; margin-top: 2em; }
h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.5em; }
p, ul, ol, dl, table { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 600; }

a { color: inherit; text-decoration-color: var(--action); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--action); color: var(--on-action);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 48rem) { .wrap { padding: 0 32px; } }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; padding: 4px 0; }
.brand img { display: block; height: 48px; width: auto; }
.nav, .footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav li + li, .footer-nav li + li { margin-top: 0; }
.nav a { display: inline-block; padding: 10px 0; min-height: 44px; font-weight: 600; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--action); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.site-footer { margin-top: 4rem; background: var(--raised); padding: 32px 0; }
.footer-nav { margin-bottom: 1rem; }
.footer-nav a { display: inline-block; padding: 8px 0; }
.small { font-size: 0.9375rem; color: var(--muted); margin: 0.25em 0; }

/* Shared pieces */
main { display: block; }
.eyebrow { color: var(--teal); font-weight: 600; font-size: 0.9375rem; margin: 0 0 0.5em; }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 20px; border-radius: 999px; border: 0;
  background: var(--action); color: var(--on-action);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.06); text-decoration: none; }
.button-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--field); }
.selectable { user-select: all; font-weight: 600; }

/* Placeholder: loud until filled. Remove the class when you fill a value. */
.ph { background: var(--ph-bg); color: var(--ph-text); padding: 0 0.25em; border-radius: 4px; outline: 2px dashed var(--ph-text); outline-offset: 1px; }

/* GPS route line: teal start dot, dotted path, orange finish chevron. */
.route { display: block; width: min(100%, 600px); height: auto; margin: 2rem 0; overflow: visible; }
.route-path { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; }
.route-start { fill: var(--teal); }
.route-end { fill: var(--brand); }
.route-divider { margin: 3.5rem auto; }

/* Home */
.hero { padding: 3.5rem 0 1rem; }
.hero h1 { max-width: 16ch; }
.hero .route { animation: draw 1.6s ease-out both; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.launch { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.launch p { margin: 0; }

.section { padding: 1rem 0; }
.section > h2:first-child { margin-top: 0; }

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li { counter-increment: step; margin: 0; padding-top: 3.25rem; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--teal); color: var(--teal); font-weight: 700;
}
.steps h3 { margin-top: 0; }
.steps p { color: var(--muted); margin: 0; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); padding: 0; list-style: none; }
.cards > li { margin: 0; background: var(--raised); border-radius: var(--radius); padding: 20px; }
.cards h3 { margin-top: 0; }
.cards p { margin: 0; color: var(--muted); }

.split { display: grid; gap: 24px 48px; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; } }

.attribution { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: 0.9375rem; }
.attribution strong { color: var(--text); }

/* Long-form pages */
.doc-head { padding: 3rem 0 1rem; max-width: var(--measure); }
.doc-head .muted { margin: 0.25em 0; }
.doc { display: grid; gap: 0 48px; }
.doc-body { max-width: var(--measure); min-width: 0; }
.doc-body > h2:first-child { margin-top: 0; }
.toc { background: var(--raised); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 2rem; font-size: 0.9375rem; }
.toc h2 { font-size: 1rem; margin: 0 0 0.5em; }
.toc ol { margin: 0; padding-left: 1.25em; }
.toc li + li { margin-top: 0.15em; }
.toc a { display: inline-block; padding: 3px 0; }
@media (min-width: 70rem) {
  .doc { grid-template-columns: minmax(0, var(--measure)) 16rem; }
  .doc-body { grid-column: 1; grid-row: 1; }
  .toc { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
}
.doc-body h2 { scroll-margin-top: 24px; }
.note { border-left: 4px solid var(--teal); background: var(--raised); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.callout-emergency { border-left-color: var(--action); }

.table-scroll { overflow-x: auto; margin-bottom: 1em; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

dl.faq dt { font-weight: 600; margin-top: 1.5em; }
dl.faq dd { margin: 0.25em 0 0; }

.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 1.1875rem; }
.copy-status { font-size: 0.9375rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .site-footer, .toc, .skip { display: none; }
  .ph { outline: 2px dashed #000; }
}
