/* treadentials.com (2026-10-30). One stylesheet, system fonts, no network. Light and dark from the visitor's setting.
   Every text colour keeps 4.5:1 on the grounds it sits on: scripts/check.mjs measures the pairs listed in TOKENS there. */
:root {
  color-scheme: light dark;
  --bg: #f7f6f3; --surface: #ffffff; --sunk: #efede8; --ink: #1d1b18; --muted: #5f5a52; --line: #e5e1d9;
  --accent: #a63f17; --accent-ink: #ffffff; --link: #a63f17; --brand: #1c1f22; --brand-ink: #f3f5f7; --brand-muted: #9aa3ad;
  --focus: #a63f17; --shadow: 0 2px 4px rgba(60, 45, 20, 0.06), 0 8px 24px rgba(60, 45, 20, 0.14);
  --draft-bg: #fff1c2; --draft-ink: #4a3500;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px; --gutter: 16px;
  /* the rest of the theme, copied by value from apps/app/web/src/app.css (0142); test/site-colours.test.ts holds them together */
  --text: #2a2723; --border2: #8c867b; --accent-hover: color-mix(in srgb, var(--accent) 86%, #000000);
  --elevation-1: 0 1px 2px rgba(60, 45, 20, 0.08), 0 2px 6px rgba(60, 45, 20, 0.08);
  --elevation-3: 0 4px 10px rgba(60, 45, 20, 0.08), 0 16px 40px rgba(60, 45, 20, 0.18);
  --r-bar: 6px; --r-primary: 8px; --r-note: 0.6rem; --r-sheet: 12px; --r-popover: 12px; --r-pill: 16px; --r-chip: 17px;
  --fade: 130ms; --pop: 160ms; --slide: 280ms; --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tap-min: 40px; --tap-primary: 44px; --pill: 32px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0e; --surface: #141618; --sunk: #1c1f22; --ink: #f3f5f7; --muted: #9aa3ad; --line: #3f4347;
    --accent: #f0915f; --accent-ink: #0c0d0e; --link: #f0915f; --brand: #1c1f22; --brand-ink: #f3f5f7; --brand-muted: #9aa3ad;
    --focus: #f0915f; --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.55);
    --text: #d4d8dd; --border2: #666a6f; --accent-hover: color-mix(in srgb, var(--accent) 84%, #ffffff);
    --elevation-1: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 3px rgba(0, 0, 0, 0.5);
    --elevation-3: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 40px rgba(0, 0, 0, 0.6);
    --draft-bg: #3a2f0a; --draft-ink: #ffe9a8;
  }
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; }
p, ul, ol, dl { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 38em; }

/* header and footer */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: auto; height: 40px; }
.top nav { margin-left: auto; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: .97rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; display: inline-block; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 560px) { .top nav { order: 3; width: 100%; margin: 0; } .top .btn { margin-left: auto; } }
.foot { margin-top: 72px; background: var(--brand); color: var(--brand-ink); padding: 40px 0 32px; font-size: .95rem; }
.foot a { color: var(--brand-ink); }
.foot .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0 0 6px; }
.foot .small { color: var(--brand-muted); font-size: .88rem; margin-top: 28px; }
.foot .tag { font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 12px; margin-top: 0; }
.foot .tag img { width: auto; height: 56px; }
/* "Powered by reymaps": the engine's small mark (decision 0045), a picture made by brand/raster.mjs */
.foot .powered { margin: 28px 0 0; }
.foot .powered a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; }
.foot .powered a:hover { text-decoration: underline; }
.foot .powered img { width: 24px; height: 24px; }
.foot .powered + .small { margin-top: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap-primary); padding: 0 18px; border-radius: var(--r-primary);
  font-size: 1rem; font-weight: 750; text-decoration: none; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); line-height: 1.2;
  transition: background-color var(--fade), border-color var(--fade); -webkit-tap-highlight-color: transparent; }
/* a press changes colour and nothing else */
.btn:hover, .btn:active { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border2); font-size: .9375rem; font-weight: 500; padding: 0 16px; }
.btn.ghost:hover, .btn.ghost:active { background: var(--sunk); border-color: var(--border2); }
.btn.small { min-height: var(--tap-min); padding: 0 12px; font-size: .875rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.ctas + p { margin-top: 14px; }

/* sections */
section { padding: 64px 0 0; }
/* the mark beside the name, at the top of the home page */
.lockup { display: flex; align-items: center; gap: 18px; margin: 0 0 24px; font-weight: 800; font-size: 2rem; letter-spacing: -.02em; line-height: 1; }
.lockup img { width: auto; height: 104px; flex: none; }
@media (min-width: 720px) { .lockup { font-size: 2.6rem; gap: 22px; } .lockup img { height: 132px; } }
.lost-mark { display: block; width: auto; height: 96px; margin-bottom: 16px; }
.kicker { text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 10px; }

/* the hero: words, then the cards fanned out */
.hero { padding-top: 40px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 1.05fr; padding-top: 64px; } }
.fan { position: relative; aspect-ratio: 1 / 0.92; width: 100%; max-width: 620px; margin: 0 auto; }
.fan figure { position: absolute; margin: 0; }
.fan .card-open, .fan img { width: 100%; }
.fan img { border-radius: 6px; box-shadow: var(--shadow); }
/* the poster in front, the square behind it to the right, the story at the far right */
.fan figure:nth-child(1) { left: 0; top: 6%; width: 52%; transform: rotate(-3deg); z-index: 2; }
.fan figure:nth-child(2) { left: 36%; top: 0; width: 46%; transform: rotate(2.5deg); z-index: 1; }
.fan figure:nth-child(3) { right: 0; bottom: 0; width: 30%; transform: rotate(5deg); z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .fan figure { transition: transform var(--slide) var(--ease-out); }
  .fan:hover figure:nth-child(1) { transform: rotate(-4.5deg) translateX(-2%); }
  .fan:hover figure:nth-child(3) { transform: rotate(6.5deg) translateX(3%); }
}

/* how it works */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 22px 22px 8px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; margin-bottom: 12px; }

/* the looks gallery */
/* on a phone, the wide cards full width, then two columns that pack the rest as they come */
.gallery { columns: 2; column-gap: 16px; margin-top: 28px; }
.gallery .wides { column-span: all; }
.gallery .cols, .gallery .col { display: contents; }
.gallery figure { margin: 0 0 20px; break-inside: avoid; }
/* on a wide screen, the wide cards side by side, then five columns of two: a story over a square stands about as tall
   as two posters, so the columns end close together */
@media (min-width: 900px) { .gallery { columns: auto; }
  .gallery .wides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
  .gallery .cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .gallery .col { display: flex; flex-direction: column; gap: 20px; }
  .gallery figure { margin: 0; } }
.gallery img { border-radius: 6px; box-shadow: var(--shadow); }
.gallery figcaption { font-size: .92rem; color: var(--muted); margin-top: 8px; }

/* How to print it (a draft): its pictures one under another on a phone, two side by side on a wide screen */
.figs { display: grid; gap: 24px; margin: 28px 0; }
@media (min-width: 700px) { .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.figs figure { margin: 0; }
.figs img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.figs figcaption { font-size: .92rem; color: var(--muted); margin-top: 8px; }

/* a card opens full size in a popover: the card is the button, the page dims behind it, and Previous and Next (or the
   arrow keys and a swipe, src/lightbox.js) go round the others */
.card-open { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 6px; cursor: zoom-in; }
.gallery .card-open img { transition: transform var(--pop) var(--ease-out), box-shadow var(--pop) var(--ease-out); }
.gallery .card-open:hover img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), var(--elevation-3); }
@media (prefers-reduced-motion: reduce) { .gallery .card-open img { transition: none; transform: none !important; } }
.lightbox { border: 0; padding: 0; background: none; overflow: visible; max-width: none; max-height: none; }
.lightbox:popover-open { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox::backdrop { background: rgb(12 13 14 / .82); }
.lightbox img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  border-radius: 6px; box-shadow: var(--elevation-3); background: #fff; }
.lightbox-bar { display: flex; gap: 8px; justify-content: center; }
.lightbox-bar button { font: inherit; font-weight: 500; padding: 0 16px; min-height: var(--tap-primary); border-radius: var(--r-primary); border: 0;
  background: var(--brand-ink); color: var(--brand); cursor: pointer; }
.lightbox-bar .prev, .lightbox-bar .next { background: rgb(243 245 247 / .16); color: var(--brand-ink); }
.lightbox-bar button:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

/* plans */
.plans { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 24px; display: flex; flex-direction: column; }
.plan.pick { border: 2px solid var(--accent); }
.plans .plan h2, .plans .plan h3 { font-size: 1.35rem; margin: 0; letter-spacing: -.02em; }
.plan .price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan ul { padding-left: 1.1em; margin: 16px 0 20px; flex: 1; }
.plan li { margin-bottom: 6px; }
/* the credit packs: one row of four, bought once (decision 0155); the shared pack's border marks it apart */
.packs { display: grid; gap: 16px; margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.pack { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pack.shared { border-style: dashed; }
.packs .pack h3, .packs .pack h4 { font-size: 1.1rem; margin: 0; letter-spacing: -.01em; }
.pack .price { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; }
.pack ul { padding-left: 1.1em; margin: 10px 0 0; }
.pack li { margin-bottom: 4px; }
/* events sit under the three plans as one wide band: what we make on one side, a way to ask on the other */
.events-plan { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 24px;
  display: grid; gap: 8px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.events-plan h2, .events-plan h3 { font-size: 1.35rem; margin: 0 0 8px; letter-spacing: -.02em; }
.events-plan p { margin: 0 0 16px; color: var(--muted); }
.events-plan ul { padding-left: 1.1em; margin: 4px 0 0; }
.events-plan li { margin-bottom: 6px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink); vertical-align: middle; margin-left: 6px; }
.table-wrap { overflow-x: auto; margin-top: 32px; border: 1px solid var(--line); border-radius: var(--r-sheet); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .97rem; }
caption { text-align: left; padding: 16px 16px 0; font-weight: 700; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 1.05rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
/* on a phone the comparison stacks: each row is a block, its plans one under another, each named (data-plan) */
@media (max-width: 640px) {
  table.stacks { min-width: 0; }
  table.stacks thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.stacks tbody, table.stacks tr, table.stacks th, table.stacks td { display: block; }
  table.stacks tbody tr { border-bottom: 1px solid var(--line); padding: 4px 0 8px; }
  table.stacks tbody tr:last-child { border-bottom: 0; }
  table.stacks tbody th, table.stacks td { border-bottom: 0; padding: 4px 16px; }
  table.stacks tbody th { padding-top: 10px; }
  table.stacks td { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 8px; }
  table.stacks td::before { content: attr(data-plan); font-weight: 600; color: var(--muted); }
}

/* the privacy promise */
.promise { background: var(--brand); color: var(--brand-ink); border-radius: var(--r-sheet); padding: 36px 24px; margin-top: 64px; }
@media (min-width: 720px) { .promise { padding: 48px; } }
.promise h2 { color: var(--brand-ink); }
.promise p, .promise li { color: var(--brand-ink); }
.promise .kicker { color: var(--brand-muted); }
/* the seal on the promise: beside the heading, smaller on a phone */
.promise .seal { float: right; width: auto; height: 76px; margin: 0 0 12px 16px; }
@media (min-width: 720px) { .promise .seal { height: 112px; margin-left: 28px; } }
.promise a { color: var(--brand-ink); }
.promise ul { clear: both; display: grid; gap: 14px 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0; list-style: none; margin: 24px 0; }
.promise li { padding-left: 28px; position: relative; }
.promise li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 3px solid #e8743b; border-bottom: 3px solid #e8743b; transform: rotate(-45deg); }

/* FAQ */
.faq { margin-top: 24px; max-width: 46em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 1.07rem; list-style-position: outside; }
.faq details > div { padding: 0 0 12px; }

/* text pages: privacy, terms, credits */
.doc { max-width: 46em; padding-top: 40px; }
.doc h1 { font-size: clamp(2rem, 6vw, 3rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc h3 { margin-top: 1.5em; }
.doc li { margin-bottom: 6px; }
.draft { background: var(--draft-bg); color: var(--draft-ink); border-radius: var(--r-note); padding: 14px 18px; font-weight: 700; margin: 0 0 24px; border: 2px dashed currentColor; }
.draft span { display: block; font-weight: 400; margin-top: 4px; }
.note { background: var(--sunk); border-radius: var(--r-note); padding: 14px 18px; }
.in-short { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-note); padding: 4px 20px 6px; margin: 24px 0 8px; }
.in-short h2 { margin-top: 0.8em; font-size: 1.25rem; }
.in-short p { color: var(--muted); }
.credit { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; background: var(--sunk); padding: 12px 14px; border-radius: var(--r-primary); }

/* 404 */
.lost { padding-top: 64px; text-align: left; }
.foot .btn.invert { background: var(--brand-ink); color: var(--brand); border-color: var(--brand-ink); }
.foot .btn.invert:hover, .foot .btn.invert:active { background: var(--brand-muted); border-color: var(--brand-muted); }
.doc.full { max-width: none; }
/* The soft launch: the header says the app is coming, in place of a link to it. */
.soon { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 12px; border-radius: var(--r-pill); background: var(--sunk); color: var(--text); font-size: .875rem; font-weight: 600; }
@media (max-width: 560px) { .top .soon { margin-left: auto; } }
