/* Thummer public site. Served under a strict CSP: no inline styles anywhere. Colours follow the
   admin console's tokens: each is a light-dark() pair; color-scheme picks the half, and theme.js
   sets data-theme on <html> for an explicit Light/Dark choice. */
:root {
  color-scheme: light dark;
  --page: light-dark(#f9f9f7, #0d0d0d);
  --surface: light-dark(#ffffff, #1a1a19);
  --surface-2: light-dark(#f3f2ef, #232321);
  --ink: light-dark(#0b0b0b, #ffffff);
  --ink-2: light-dark(#52514e, #c3c2b7);
  --muted: light-dark(#6f6d68, #9d9b93);
  --border: light-dark(rgba(11, 11, 11, 0.12), rgba(255, 255, 255, 0.12));
  --accent: light-dark(#2a78d6, #3987e5);
  --accent-strong: light-dark(#1f5fae, #6aa6ef);
  --accent-ink: #ffffff;
  --accent-wash: light-dark(rgba(42, 120, 214, 0.10), rgba(57, 135, 229, 0.16));
  --good-ink: light-dark(#006300, #3cc23c);
  --good-wash: light-dark(rgba(12, 163, 12, 0.10), rgba(12, 163, 12, 0.16));
  --danger: light-dark(#c23434, #e66767);
  --danger-wash: light-dark(rgba(208, 59, 59, 0.10), rgba(230, 103, 103, 0.14));
  --warn-ink: light-dark(#8a5a00, #fab219);
  --warn-wash: light-dark(rgba(250, 178, 25, 0.18), rgba(250, 178, 25, 0.14));
  --rider: light-dark(#2a78d6, #3987e5);
  --driver: light-dark(#1b8f63, #2fbf87);
  --consumer: light-dark(#c4561f, #e9814d);
  --shadow: 0 1px 2px light-dark(rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.4)), 0 6px 24px light-dark(rgba(0, 0, 0, 0.06), transparent);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 750; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46rem; }
.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: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: var(--accent-ink); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 34px; height: 34px; flex: none; }
.logo-for-dark { display: none; }
:root[data-theme="dark"] .logo-for-light { display: none; }
:root[data-theme="dark"] .logo-for-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-for-light { display: none; }
  :root:not([data-theme="light"]) .logo-for-dark { display: block; }
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 8px;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-wash); }
.nav-cta { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.menu-btn {
  display: none; margin-left: auto; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--ink);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .bar { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2;
  background: var(--surface); color: var(--ink); border-color: var(--border);
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn.small { padding: 7px 13px; font-size: 0.92rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---- sections ---- */
main { flex: 1; }
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; }
.hero h1 { margin-bottom: 18px; }
.hero-text { max-width: 50rem; }
.hero-art { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); margin-top: 40px; }
.page-head { padding: 56px 0 24px; }
.section { padding: 48px 0; }
.section.alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { max-width: 46rem; margin-bottom: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); min-width: 0;
}
.card h3 { display: flex; align-items: center; gap: 10px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .more { font-weight: 600; text-decoration: none; }
.role-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.role-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rider .role-icon { background: color-mix(in srgb, var(--rider) 14%, transparent); color: var(--rider); }
.driver .role-icon { background: color-mix(in srgb, var(--driver) 14%, transparent); color: var(--driver); }
.consumer .role-icon { background: color-mix(in srgb, var(--consumer) 14%, transparent); color: var(--consumer); }
.card.rider { border-top: 4px solid var(--rider); }
.card.driver { border-top: 4px solid var(--driver); }
.card.consumer { border-top: 4px solid var(--consumer); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--good-ink); border-bottom: 2.5px solid var(--good-ink); transform: rotate(-45deg);
}
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px;
}
.tag.coming { background: var(--warn-wash); color: var(--warn-ink); }
.tag.today { background: var(--good-wash); color: var(--good-ink); }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat strong { display: block; font-size: 1.05rem; }
.stat span { color: var(--muted); font-size: 0.92rem; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-wash); padding: 16px 20px; border-radius: 0 12px 12px 0; }
.callout.warn { border-color: var(--warn-ink); background: var(--warn-wash); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 64px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); }
table.classes { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table.classes th, table.classes td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.classes th { font-size: 0.85rem; color: var(--muted); font-weight: 650; }
table.classes td.num, table.classes th.num { text-align: right; }

/* ---- the journey diagram (inline SVG; colours from classes) ---- */
.journey { width: 100%; height: auto; display: block; }
.journey .node { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.journey .node.rider { stroke: var(--rider); }
.journey .node.driver { stroke: var(--driver); }
.journey .node.cloud { stroke: var(--accent); }
.journey .node.consumer { stroke: var(--consumer); }
.journey .label { fill: var(--ink); font: 700 15px var(--font); }
.journey .sub { fill: var(--muted); font: 500 12px var(--font); }
.journey .flow { stroke: var(--ink-2); stroke-width: 2; fill: none; }
.journey .flow.back { stroke: var(--good-ink); stroke-dasharray: 5 5; }
.journey .arrow { fill: var(--ink-2); }
.journey .arrow.back { fill: var(--good-ink); }
.journey .edge { fill: var(--ink-2); font: 600 12px var(--font); }
.journey .edge.back { fill: var(--good-ink); }
.journey .dot.rider { fill: var(--rider); }
.journey .dot.driver { fill: var(--driver); }
.journey .dot.cloud { fill: var(--accent); }
.journey .dot.consumer { fill: var(--consumer); }

/* ---- forms ---- */
.form-card { max-width: 520px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.88rem; color: var(--muted); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 10px; padding: 11px 13px;
}
input:focus-visible { outline: 3px solid var(--accent-wash); border-color: var(--accent); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--danger); }
.pw-wrap { display: flex; gap: 8px; }
.pw-wrap input { flex: 1; min-width: 0; }
.reveal { flex: none; }
.form-error { color: var(--danger); background: var(--danger-wash); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-weight: 550; }
.form-error:empty { display: none; }
.success { border: 1px solid var(--good-ink); background: var(--good-wash); border-radius: var(--radius); padding: 24px; }
.success h2 { color: var(--good-ink); }
.success.note { padding: 16px 20px; margin-bottom: 18px; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; padding: 32px 0; font-size: 0.92rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.theme-switch { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.theme-switch select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; }
.notfound { text-align: center; padding: 96px 0; }

/* ---- narrow screens ---- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 20px 18px;
    background: var(--page); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { flex: 1; }
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .page-head { padding: 36px 0 12px; }
  .section { padding: 36px 0; }
  .card { padding: 20px; }
  .steps li { padding-left: 58px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a { transition: background-color 0.15s, color 0.15s; }
}

/* ---- small helpers used across pages ---- */
.small { font-size: 0.88rem; }
.section-foot { margin-top: 28px; }
h2 .role-icon { display: inline-grid; vertical-align: middle; margin-right: 8px; }
h2:has(.role-icon) { display: flex; align-items: center; gap: 4px; }
.rider-icon { background: color-mix(in srgb, var(--rider) 14%, transparent); color: var(--rider); }
.driver-icon { background: color-mix(in srgb, var(--driver) 14%, transparent); color: var(--driver); }
.consumer-icon { background: color-mix(in srgb, var(--consumer) 14%, transparent); color: var(--consumer); }
.card ol { padding-left: 1.2em; }
.card ol li { margin-bottom: 6px; }
.callout { margin: 0; }
caption { text-align: left; }

/* Phones: the wide journey diagram becomes a stacked list. */
.journey-mini { display: none; list-style: none; margin: 0; padding: 0; gap: 8px; flex-direction: column; }
.journey-mini li { position: relative; padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--border); }
.journey-mini li.rider { border-left-color: var(--rider); }
.journey-mini li.driver { border-left-color: var(--driver); }
.journey-mini li.cloud { border-left-color: var(--accent); }
.journey-mini li.consumer { border-left-color: var(--consumer); }
.journey-mini li.back { border-left-color: var(--good-ink); color: var(--good-ink); font-weight: 600; background: var(--good-wash); }
.journey-mini li:not(.back):not(.consumer)::after {
  content: "↓"; position: absolute; left: 50%; bottom: -15px; color: var(--muted); font-size: 0.85rem; line-height: 1;
}
.card + .steps { margin-top: 20px; }
@media (max-width: 640px) {
  .journey { display: none; }
  .journey-mini { display: flex; }
  .hero-art { padding: 14px; margin-top: 28px; }
}
