:root {
  --background: #F8EBDA;
  --surface: #FDF6EC;
  --text-primary: #1C1D24;
  --text-secondary: #5A6076;
  --accent: #3F4E78;
  --separator: rgba(63, 78, 120, 0.10);
  --border: rgba(63, 78, 120, 0.12);
  --fill-quiet: rgba(63, 78, 120, 0.07);
  --border-strong: rgba(63, 78, 120, 0.18);
  --border-dashed: rgba(63, 78, 120, 0.26);
  --accent-fill: #3F4E78;
  --text-on-accent: #F8EBDA;

  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --serif-weight: 400;
  --serif-weight-strong: 500;
  --tracking-title: -0.02em;

  --radius-card: 22px;
  --measure: 48rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #16171C;
    --surface: #1F2027;
    --text-primary: #EFE6DA;
    --text-secondary: #A3A7B5;
    --accent: #9BB0E0;
    --separator: rgba(239, 230, 218, 0.10);
    --border: rgba(239, 230, 218, 0.12);
    --fill-quiet: rgba(239, 230, 218, 0.08);
    --border-strong: rgba(239, 230, 218, 0.22);
    --border-dashed: rgba(239, 230, 218, 0.30);
    --accent-fill: #4A5C8F;
    --text-on-accent: #F4EEE4;
    /* Thin serif strokes smear on ink: Lora goes to 500 and opens up. */
    --serif-weight: 500;
    --serif-weight-strong: 500;
    --tracking-title: -0.015em;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

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

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2.5rem) clamp(4rem, 10vw, 7rem);
}

header { margin-bottom: 3rem; }

.wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: var(--serif-weight-strong);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 2.5rem;
}
.wordmark:hover { text-decoration: none; color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: var(--serif-weight-strong);
  font-size: clamp(2.125rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: var(--tracking-title);
  margin: 0 0 1rem;
}

.lede {
  font-family: var(--font-display);
  font-weight: var(--serif-weight);
  font-size: 1.375rem;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.meta {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0;
}

section {
  padding: 2rem 0;
  border-top: 1px solid var(--separator);
}
section:last-of-type { padding-bottom: 0; }

h2 {
  font-family: var(--font-display);
  font-weight: var(--serif-weight-strong);
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.875rem;
}
h2 .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-inline-end: 0.75em;
  vertical-align: 0.35em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

ul {
  margin: 0 0 1rem;
  padding-inline-start: 1.25rem;
}
li { margin-bottom: 0.375rem; }
li::marker { color: var(--text-secondary); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--fill-quiet);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  margin-top: 0.5rem;
}
.card p { margin: 0; }

address {
  font-style: normal;
  line-height: 1.7;
}
address .label {
  display: inline-block;
  min-width: 9rem;
  color: var(--text-secondary);
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--separator);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
footer a { color: var(--text-secondary); }

@media (prefers-reduced-motion: no-preference) {
  a { transition: text-decoration-thickness 120ms ease, color 120ms ease; }
}

/* Shared header */
.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  vertical-align: -0.35em;
  margin-inline-end: 0.5rem;
}

/* Landing: wider than reading measure, so cards sit in a row on desktop. */
.landing { --measure: 76rem; }
.landing .hero { margin-bottom: 4rem; }
.landing section { padding: 3rem 0; }
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3.5rem;
}
.hero-mascot {
  width: min(72vw, 320px);
  height: auto;
  justify-self: start;
}
@media (min-width: 640px) {
  .hero { grid-template-columns: 1fr auto; gap: 2.5rem; }
  .hero-mascot { width: 320px; justify-self: end; }
}
@media (min-width: 960px) {
  .hero { gap: 4rem; }
  .hero-mascot { width: 480px; }
  .hero h1 { font-size: 4rem; }
  .hero .lede { font-size: 1.5rem; max-width: 36rem; }
}

.hero h1 {
  font-size: clamp(2.375rem, 7vw, 3.25rem);
  margin-bottom: 1rem;
}
.hero .lede { margin-bottom: 1.5rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border-radius: 18px;
  background: var(--accent-fill);
  color: var(--text-on-accent);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
}
.button:hover { text-decoration: none; opacity: 0.92; }
.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-strong);
}
.button-secondary:hover { background: var(--fill-quiet); }

.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}
.steps li {
  margin: 0;
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}
.steps h3 {
  font-family: var(--font-display);
  font-weight: var(--serif-weight-strong);
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: 0 0 0.375rem;
}
.steps p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

.principles {
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 960px) {
  .principles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
  }
  .principles li:nth-child(2) { border-top: 0; padding-top: 0; }
  .principles li:nth-child(n + 3) { padding-bottom: 0; }
}
.principles li {
  padding: 1rem 0;
  border-top: 1px solid var(--separator);
  margin: 0;
}
.principles li:first-child { border-top: 0; padding-top: 0; }
.principles li:last-child { padding-bottom: 0; }
.principles strong {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--serif-weight-strong);
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
.principles p { margin: 0; color: var(--text-secondary); font-size: 0.9375rem; }

.plans {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .plans { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}
.plan {
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.plan .eyebrow { margin-bottom: 0.5rem; }
.plan ul { margin: 0; padding-inline-start: 1.1rem; font-size: 0.9375rem; }
.plan li { margin-bottom: 0.25rem; }
.plan .meta { margin-top: 0.75rem; }

/* Prose inside a wide landing keeps a reading measure. */
.landing .prose > * { max-width: 44rem; }

/* Paper slip: the empty-state slip, dashed on purpose. */
.slip {
  display: block;
  width: 3.25rem;
  height: 2.25rem;
  border: 1.5px dashed var(--border-dashed);
  border-radius: 6px;
  transform: rotate(-4deg);
  margin-bottom: 1rem;
}
