:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-soft: #55504a;
  --ink-faint: #8a837a;
  --rule: #e5e0d7;
  --accent: #b4541f;
  --accent-soft: #f4e6dc;
  --focus: #2b6cb0;
  --radius: 10px;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --surface: #201d17;
    --ink: #f2ede4;
    --ink-soft: #c0b8ab;
    --ink-faint: #8d8579;
    --rule: #332e26;
    --accent: #e8935c;
    --accent-soft: #2e2319;
    --focus: #7cb3e8;
  }
}

:root[data-theme='dark'] {
  --bg: #16140f;
  --surface: #201d17;
  --ink: #f2ede4;
  --ink-soft: #c0b8ab;
  --ink-faint: #8d8579;
  --rule: #332e26;
  --accent: #e8935c;
  --accent-soft: #2e2319;
  --focus: #7cb3e8;
}

:root[data-theme='light'] {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-soft: #55504a;
  --ink-faint: #8a837a;
  --rule: #e5e0d7;
  --accent: #b4541f;
  --accent-soft: #f4e6dc;
  --focus: #2b6cb0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-serif, Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.wrap--wide { max-width: 44rem; }

h1, h2, h3 {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 3.5rem 0 1.25rem;
}

h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1.15rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

.brand {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 3rem;
}

.brand:hover { color: var(--accent); }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.75rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.steps strong { display: block; margin-bottom: 0.15rem; }
.steps span { color: var(--ink-soft); }

/* Definition-style list for the paths and guarantees */
.facts { margin: 0; }
.facts dt {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 1.5rem;
}
.facts dd {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
}

/* Signup */
.signup {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2.5rem 0;
}

.field { margin-bottom: 1rem; }

label {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hint {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-faint);
}

input[type='tel'],
input[type='email'] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 7px;
}

.consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1.25rem 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.consent input { margin-top: 0.25rem; flex-shrink: 0; width: 1rem; height: 1rem; }

button {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--ink);
  border: none;
  border-radius: 7px;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }

.status {
  margin: 0.9rem 0 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
}
.status:empty { margin: 0; }
.status[data-state='error'] { color: #c0392b; }
@media (prefers-color-scheme: dark) {
  .status[data-state='error'] { color: #f08b7d; }
}
.status[data-state='ok'] { color: var(--accent); }

/* Legal pages */
.legal { font-size: 16px; }
.legal h2 { text-transform: none; letter-spacing: -0.01em; font-size: 1.3rem; color: var(--ink); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.5rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }
.legal th, .legal td { text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.legal th { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }

.updated {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
}

.callout {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}
.callout p:last-child { margin-bottom: 0; }

footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.75rem; }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--accent); text-decoration: underline; }
