/* Layout: one reading column (~62ch) under an oversized YET; the form continues the same column as a quiet worksheet. */
@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f4f5f2;
  --sheet: #ffffff;
  --ink: #181a22;
  --muted: #565a66;
  --rule: #d6d8d2;
  --yet: #84590a;
  --yet-soft: #f1e6cf;
  --focus: #2f4f8f;
  --danger: #a12d2d;
  --ok: #2c6a4a;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --serif: "Literata", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111217; --sheet: #191b22; --ink: #ebe9e3; --muted: #a3a6b0; --rule: #2e313b;
    --yet: #dcaa4c; --yet-soft: #2c2412; --focus: #8fb0ef; --danger: #ef8a8a; --ok: #7fcaa3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111217; --sheet: #191b22; --ink: #ebe9e3; --muted: #a3a6b0; --rule: #2e313b;
  --yet: #dcaa4c; --yet-soft: #2c2412; --focus: #8fb0ef; --danger: #ef8a8a; --ok: #7fcaa3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: var(--step-0); line-height: 1.65;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; text-decoration-color: var(--yet); text-underline-offset: 3px; }
a:hover { color: var(--yet); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.col { max-width: 40rem; margin: 0 auto; }
.wide { max-width: 64rem; margin: 0 auto; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0 0 1.1em; }
.label { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.y { color: var(--yet); font-style: italic; }

/* Masthead */
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 18px; font-family: var(--sans); font-size: var(--step--1); }
.top a { text-decoration: none; }
.hero { padding-block: clamp(24px, 6vw, 72px) clamp(32px, 6vw, 64px); }
.mark {
  font-family: var(--display); font-weight: 700; line-height: 0.82; letter-spacing: -0.02em;
  font-size: clamp(7.5rem, 34vw, 21rem); margin: 0; display: flex; align-items: baseline;
}
.mark .dots { color: var(--yet); font-weight: 500; font-size: 0.3em; letter-spacing: 0.06em; margin-right: 0.08em; }
.subtitle {
  font-family: var(--display); font-weight: 500; font-style: italic;
  font-size: clamp(1.35rem, 4.4vw, 2.3rem); line-height: 1.2; margin: 0.6em 0 0; max-width: 22ch;
}
.lede { font-size: var(--step-1); line-height: 1.5; }

/* Litany of yets */
.litany { list-style: none; margin: 1.6em 0 2em; padding: 0; display: grid; gap: 0.35em; }
.litany li { font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 4.2vw, 1.85rem); line-height: 1.3; text-wrap: balance; }
.litany.small { grid-template-columns: 1fr; gap: 0.9em 2.2rem; }
.litany.small li { font-family: var(--serif); font-size: var(--step-0); line-height: 1.5; padding-left: 0.9rem; border-left: 2px solid var(--rule); }
@media (min-width: 760px) { .litany.small { grid-template-columns: 1fr 1fr; } }
.costs { font-family: var(--display); font-size: var(--step-2); line-height: 1.35; font-weight: 500; margin: 1.4em 0; }
.central {
  margin: 2.2em 0; padding-block: 1.4em; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.central q { display: block; font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 5vw, 2.3rem); line-height: 1.25; quotes: none; text-wrap: balance; }

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); padding: 1.1em 1.9em; border-radius: 2px; text-decoration: none; min-height: 52px;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--yet); color: var(--paper); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); letter-spacing: 0.08em; font-size: 0.8rem; padding: 0.8em 1.2em; min-height: 44px; }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.cta { padding-block: 1.5em 3.5em; display: flex; flex-direction: column; align-items: flex-start; gap: 0.75em; }
.cta small { font-family: var(--sans); color: var(--muted); font-size: var(--step--1); }

/* Form */
.form-wrap { background: var(--sheet); border-top: 1px solid var(--rule); margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: clamp(40px, 7vw, 80px); }
.part { padding-block: 2.2em; border-bottom: 1px solid var(--rule); display: grid; gap: 1em; }
.part:first-of-type { padding-top: 0; }
.part h2, .form-title { font-family: var(--display); font-weight: 500; font-size: var(--step-3); line-height: 1.1; margin: 0; }
.part h3 { font-family: var(--display); font-weight: 500; font-size: var(--step-2); line-height: 1.15; margin: 0; }
.help { color: var(--muted); font-size: var(--step--1); font-family: var(--sans); line-height: 1.55; margin: 0; }
.field { display: grid; gap: 0.4em; }
.field label, .fieldset-legend { font-family: var(--sans); font-weight: 500; font-size: 0.92rem; }
input[type="text"], input[type="email"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.75em 0.9em; min-height: 48px;
}
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 30%, transparent); outline-offset: 0; }
textarea#story { min-height: 22rem; line-height: 1.75; font-family: var(--serif); font-size: 1.05rem; resize: vertical; padding: 1.1em 1.2em; }
.editor { border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
.editor textarea#story { border: 0; background: transparent; }
.editor textarea#story:focus { outline: none; }
.editor:focus-within { border-color: var(--focus); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.toolbar button { min-width: 40px; min-height: 40px; border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 2px; cursor: pointer; font-size: 1rem; }
.toolbar button:hover { border-color: var(--rule); }
.toolbar .hint { color: var(--muted); font-size: 0.8rem; margin-left: 4px; }
.meter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5em 1em; padding: 10px 12px; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter strong { color: var(--ink); font-weight: 600; }
.meter.over strong, .meter.over { color: var(--danger); }
.bar { height: 3px; background: var(--rule); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--yet); transition: width 0.2s ease; }
.reassure { font-family: var(--display); font-style: italic; font-size: var(--step-1); line-height: 1.4; margin: 0; padding-left: 1rem; border-left: 2px solid var(--yet); }

details.prompts { border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
details.prompts summary { cursor: pointer; padding: 0.9em 1.1em; font-family: var(--sans); font-weight: 500; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; gap: 1em; }
details.prompts summary::-webkit-details-marker { display: none; }
details.prompts summary::after { content: "+"; color: var(--yet); font-size: 1.2rem; line-height: 1; }
details.prompts[open] summary::after { content: "–"; }
details.prompts ol { margin: 0; padding: 0 1.1em 0.6em 2.6em; display: grid; gap: 0.7em; }
details.prompts li { padding-left: 0.3em; }
details.prompts li::marker { font-family: var(--sans); color: var(--yet); font-size: 0.85em; }
.start-anywhere { margin: 0.4em 1.1em 1.1em; }
.start-note { font-style: italic; color: var(--muted); margin: 0; }

.choices { display: grid; gap: 0.75em; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 0.9em; align-items: start; padding: 1em 1.1em; border: 1px solid var(--rule); border-radius: 2px; cursor: pointer; background: var(--paper); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--yet); }
.choice input { margin-top: 0.3em; width: 20px; height: 20px; accent-color: var(--ink); }
.choice b { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2em; }
.choice span { font-size: 0.97rem; line-height: 1.55; }
.contact-grid { display: grid; gap: 1em; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: 1fr 1fr; } .contact-grid .full { grid-column: 1 / -1; } }
.req { color: var(--yet); font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; font-size: 0.85em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0.45em 0.95em; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--sans); font-size: 0.88rem; cursor: pointer; background: var(--paper); user-select: none; }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.acks { display: grid; gap: 0.7em; }
.ack { display: grid; grid-template-columns: auto 1fr; gap: 0.8em; align-items: start; font-size: 0.97rem; line-height: 1.5; cursor: pointer; }
.ack input { width: 20px; height: 20px; margin-top: 0.2em; accent-color: var(--ink); }
.errors { border: 1px solid var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, transparent); padding: 0.9em 1.1em; font-family: var(--sans); font-size: 0.92rem; border-radius: 2px; }
.errors ul { margin: 0.4em 0 0; padding-left: 1.2em; }
.field-error { color: var(--danger); font-family: var(--sans); font-size: 0.85rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { padding-top: 2.2em; display: flex; flex-direction: column; gap: 1em; align-items: flex-start; }

/* Thank you */
.thanks { padding-block: 2em; }
.thanks h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 6vw, 3.2rem); line-height: 1.05; margin: 0 0 0.8em; letter-spacing: 0.01em; }
.ref { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.8em; margin: 0.6em 0 1.6em; padding: 0.8em 1em; border: 1px dashed var(--yet); background: var(--yet-soft); font-family: var(--sans); }
.ref code { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.08em; }
.preview-note { font-family: var(--sans); font-size: 0.9rem; padding: 0.9em 1.1em; border: 1px solid var(--yet); background: var(--yet-soft); border-radius: 2px; }

/* Footer */
footer { padding-block: 40px; font-family: var(--sans); font-size: var(--step--1); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.6em 1.6em; }

/* Long-form text pages */
.doc h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1; margin: 0.4em 0 0.6em; }
.doc h2 { font-family: var(--display); font-weight: 500; font-size: var(--step-2); margin: 1.8em 0 0.5em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.4em; }

@media (prefers-reduced-motion: no-preference) {
  .mark, .subtitle { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both; }
  .subtitle { animation-delay: 0.12s; }
  @keyframes rise { from { transform: translateY(10px); } to { transform: none; } }
}
@media print {
  .top, footer, .cta, .form-wrap { display: none; }
}

.consent { border: 1px solid var(--yet); background: var(--yet-soft); padding: 1em 1.1em; border-radius: 2px; display: grid; gap: 0.8em; font-size: 0.97rem; line-height: 1.55; }
.consent p { margin: 0; }
.help-line { flex-basis: 100%; }

/* Hero additions */
.subtitle { font-style: normal; max-width: none; margin-top: 0.35em; letter-spacing: 0.01em; }
.tagline { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.25rem, 3.6vw, 1.75rem); line-height: 1.35; margin: 1.6em 0 0.9em; max-width: 30ch; text-wrap: balance; }
.hero .lede { max-width: 38rem; }
.hero .cta { padding-block: 0.6em 0; }

/* Section titles */
.sec-title { font-family: var(--display); font-weight: 500; font-size: var(--step-3); line-height: 1.1; margin: 0.15em 0 0.5em; }
.sec-intro { max-width: 40rem; font-size: var(--step-1); line-height: 1.5; }

/* Recognition */
.recognition { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: clamp(40px, 7vw, 80px); }
.rgrid { display: grid; gap: 0; margin-top: 2em; border-top: 1px solid var(--rule); }
@media (min-width: 760px) { .rgrid { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.rcat { padding-block: 1.3em 1.1em; border-bottom: 1px solid var(--rule); min-width: 0; }
.rcat h3 { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 0.7em; }
.rcat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55em; }
.rcat li { font-family: var(--display); font-weight: 500; font-size: clamp(1.15rem, 3.4vw, 1.35rem); line-height: 1.32; text-wrap: balance; }
.rcat:not(.open) li.extra { display: none; }
.more { appearance: none; background: none; border: 0; padding: 0.7em 0 0; min-height: 44px; cursor: pointer; font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--yet); }
.more::before { content: "+ "; }
.rcat.open .more::before { content: "– "; }
.more:hover { color: var(--ink); }

/* Purpose and invitation */
.purpose { padding-block: clamp(40px, 7vw, 72px) 0; }
.purpose-list { list-style: none; padding: 0; margin: 0.4em 0 1.4em; display: grid; gap: 0.3em; }
.purpose-list li { font-family: var(--display); font-weight: 500; font-size: var(--step-2); line-height: 1.25; }
.invitation { padding-top: clamp(40px, 7vw, 72px); }
.inv-title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 5.5vw, 2.6rem); line-height: 1.08; letter-spacing: 0.01em; margin: 0 0 1em; text-wrap: balance; }
.welcome { list-style: none; padding: 1.1em 0; margin: 1.6em 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: 0.75em; }
.welcome li { padding-left: 1.4rem; position: relative; }
.welcome li::before { content: "…"; position: absolute; left: 0; color: var(--yet); font-weight: 600; }
.message { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 5vw, 2.3rem); line-height: 1.22; margin: 1.6em 0 0.4em; text-wrap: balance; }
.btn-big { font-size: 1.05rem; padding: 1.25em 2.2em; min-height: 60px; }

/* Credit choice and keys */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0.45em 1.1em; border: 1px solid var(--rule); border-radius: 2px; font-family: var(--sans); font-size: 0.92rem; cursor: pointer; background: var(--paper); }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.keys { display: flex; flex-wrap: wrap; align-items: end; gap: 1em 1.6em; margin: 1.6em 0 0.8em; padding: 1em 1.1em; border: 1px dashed var(--yet); background: var(--yet-soft); font-family: var(--sans); }
.keys .label { margin: 0 0 0.2em; }
.keys code { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.08em; }

.rcat.feature { background: var(--yet-soft); border-bottom: 0; margin-block: 0.4em; padding-inline: 1.2rem; border-radius: 2px; }
.rcat.feature h3 { color: var(--yet); }
@media (min-width: 760px) { .rcat.feature { grid-column: 1 / -1; padding: 1.6em 2rem; } .rcat.feature ul { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
