:root {
  color-scheme: light dark;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #5d5a53;
  --line: #e3dfd6;
  --accent: #b5410f;
  --accent-text: #ffffff;
  --code: #f1eee7;
  --maxw: 68rem;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1b1b19;
    --text: #ecebe6;
    --muted: #a6a39b;
    --line: #2f2e2b;
    --accent: #f08a4b;
    --accent-text: #1a0d05;
    --code: #232220;
  }
}

*, *::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-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--text); color: var(--bg); padding: 0.5rem 0.75rem; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 650; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { color: inherit; }
.brand svg { width: 1.6rem; height: 1.6rem; flex: none; }
.brand svg rect { fill: var(--accent); }
.brand svg path { fill: none; stroke: var(--accent-text); stroke-width: 3.6; stroke-linecap: round; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; margin-left: 1.25rem; }
.site-header nav a:hover { color: var(--text); }

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 680; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); max-width: 34rem; margin-top: 1.25rem; }

/* Hero */
.hero { padding-top: 4rem; padding-bottom: 4.5rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 4rem; } .hero { padding-top: 6rem; padding-bottom: 6rem; } }
.status { display: flex; align-items: center; gap: 0.5rem; margin-top: 2rem; font-size: 0.95rem; color: var(--muted); }
.status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.cta { display: inline-block; margin-top: 1.75rem; background: var(--text); color: var(--bg); text-decoration: none; padding: 0.8rem 1.2rem; border-radius: 0.5rem; font-weight: 600; font-size: 1rem; }
.cta:hover { color: var(--bg); opacity: 0.88; }

/* Example card */
.example { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 0.875rem; padding: 1.5rem; font-size: 0.95rem; box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgb(0 0 0 / 0.35); }
.example-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.example-head h2 { font-size: 1.05rem; letter-spacing: -0.01em; }
.tag { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.55rem; white-space: nowrap; }
.example p { color: var(--muted); margin-bottom: 1.25rem; }
.sessions { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sessions > li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.sessions .day { font-weight: 600; }
.sessions .day span { color: var(--muted); font-weight: 400; }
.sets { list-style: none; margin: 0.4rem 0 0; padding: 0; font-family: var(--mono); font-size: 0.82rem; }
.sets li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.1rem 0; }
.sets .up { color: var(--accent); }
.synced { margin: 1rem 0 0; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

/* Sections */
section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section-head { max-width: 38rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); margin-top: 0.75rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 40rem) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; } }
.steps li { counter-increment: step; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--mono); font-size: 0.85rem; color: var(--accent); margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.steps p { color: var(--muted); margin: 0.5rem 0 0; font-size: 0.98rem; }

.data-grid { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48rem) { .data-grid { grid-template-columns: repeat(2, 1fr); } }
.data-grid h3 { margin-bottom: 0.35rem; }
.data-grid p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.more { margin-top: 2.5rem; }

.beta { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .beta { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.beta p { color: var(--muted); max-width: 36rem; }
.beta h2 + p { margin-top: 0.75rem; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: 0.875rem; padding: 1.5rem; }
.contact-box p { margin: 0 0 0.25rem; font-size: 0.9rem; }
.contact-box a { font-size: 1.1rem; font-weight: 600; word-break: break-all; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: 0.9rem; color: var(--muted); }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.fine { margin: 1.25rem 0 0; font-size: 0.8rem; }

/* Prose (privacy) */
.prose { max-width: 42rem; padding-top: 3.5rem; padding-bottom: 4rem; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.prose .updated { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; margin: 1rem 0 2rem; }
.prose h2 { font-size: 1.35rem; margin: 2.75rem 0 0.85rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.prose h3 { margin: 1.5rem 0 0.5rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--muted); }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 0.875rem; padding: 1.25rem 1.5rem; }
.summary ul { margin: 0; }
.summary li:last-child { margin-bottom: 0; }
.toc { columns: 2 12rem; font-size: 0.95rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0 0 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* 404 */
.notfound { padding-top: 7rem; padding-bottom: 8rem; max-width: 34rem; }
.notfound p { color: var(--muted); margin-top: 1rem; }

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