:root {
  --paper: #F7F4EE;
  --paper-2: #EFEADF;
  --white: #FFFFFF;
  --ink: #141210;
  --ink-2: #2E2A25;
  --muted: #5F5A52;
  --rule: #DDD6CA;
  --marker: #FFD84D;
  --ok: #1E7A4C;
  --error: #B3261E;
  --focus: #1F56C9;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
main { overflow-x: clip; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 720px; margin: 0 auto; padding-inline: 20px; }
.eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hl { background: linear-gradient(transparent 60%, var(--marker) 60%); padding: 0 2px; }
.muted { color: var(--muted); }
.press { transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.press:active { transform: scale(0.98); }

.masthead { border-bottom: 1px solid var(--ink); background: var(--paper); padding-top: env(safe-area-inset-top, 0px); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; background: none; border: none; padding: 0; cursor: pointer; color: var(--ink); }
.logo small { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 420px) { .logo small { display: none; } }
.nav { display: flex; align-items: center; gap: 8px; }
.link-btn { background: none; border: none; padding: 10px 4px; min-height: 44px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.link-btn:hover { text-decoration-color: currentColor; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 4px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { box-shadow: 4px 4px 0 var(--marker); }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 16.5px; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--white); box-shadow: none; }
.btn:disabled { background: var(--paper-2); color: #8E877C; border-color: var(--rule); box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; }

.hero { padding-block: 44px 56px; display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 7vw, 64px); line-height: 1.02; }
.hero .lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.hero-note { font-size: 14px; color: var(--muted); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.08fr 0.92fr; gap: 56px; padding-block: 72px 80px; } }

.sample { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: var(--white); border: 1px solid var(--rule); box-shadow: 10px 10px 0 var(--paper-2); padding: 22px 22px 8px; transform: rotate(1.2deg); transition: transform 200ms ease; }
.sample:hover { transform: rotate(0deg); }
.sample-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.sample-head strong { font-family: var(--serif); font-size: 22px; }
.sample-item { padding-block: 14px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.sample-item:last-child { border-bottom: none; }
.sample-title { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.2; }
.sample-text { font-size: 14px; color: var(--ink-2); }

.section { padding-block: 56px; border-top: 1px solid var(--ink); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 38px); }
.steps { display: grid; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding-block: 20px; border-top: 1px solid var(--rule); }
.step:first-child { border-top: none; }
.step-num { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 500; }
.step h3 { font-size: 22px; margin-bottom: 4px; }
.step p { color: var(--ink-2); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .step, .step:first-child { grid-template-columns: 1fr; border-top: 2px solid var(--ink); padding-top: 18px; }
}
.anatomy { display: grid; gap: 28px; }
@media (min-width: 900px) { .anatomy { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.features { display: flex; flex-direction: column; }
.feature { padding-block: 16px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.feature:first-child { border-top: none; padding-top: 0; }
.feature strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.feature span { color: var(--ink-2); }
.rubrics { display: flex; flex-wrap: wrap; gap: 8px; }
.rubric-tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--rule); background: var(--white); font-weight: 600; font-size: 14px; }
.sq { width: 10px; height: 10px; background: var(--c); flex-shrink: 0; }
.closing { background: var(--ink); color: var(--paper); padding-block: 56px; }
.closing .wrap { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.closing h2 { font-size: clamp(30px, 5vw, 44px); color: var(--paper); }
.closing .btn { background: var(--marker); color: var(--ink); border-color: var(--marker); }
.closing .btn:hover { box-shadow: 4px 4px 0 var(--paper); }
.foot { padding-block: 28px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--rule); }
.foot .wrap { display: flex; flex-direction: column; gap: 6px; }
.foot a { color: var(--muted); }

.flow { padding-block: 28px 56px; display: flex; flex-direction: column; gap: 26px; }
.flow-step { display: flex; flex-direction: column; gap: 22px; }
.stepper { display: flex; flex-direction: column; gap: 10px; }
.stepper-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stepper-bar span { height: 4px; background: var(--rule); transition: background-color 250ms ease; }
.stepper-bar span.on { background: var(--ink); }
.flow h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.05; }
.flow .lead { font-size: 17px; color: var(--ink-2); }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.topic { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 14px 14px; min-height: 118px; background: var(--white); border: 1.5px solid var(--rule); border-top: 5px solid var(--c); text-align: left; cursor: pointer; }
.topic .t-name { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.15; padding-right: 26px; }
.topic .t-desc { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.topic .t-check { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--rule); display: grid; place-items: center; color: var(--white); background: var(--white); }
.topic[aria-pressed="true"] { border-color: var(--ink); border-top-color: var(--c); background: var(--tint); box-shadow: 4px 4px 0 var(--c); }
.topic[aria-pressed="true"] .t-check { background: var(--ink); border-color: var(--ink); }
.topic.is-full { opacity: 0.45; }
.count-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.count-line strong { font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--rule); background: var(--white); font-weight: 600; font-size: 15px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field-title { font-weight: 600; font-size: 15px; }
.help { font-size: 14px; color: var(--muted); }
.input { width: 100%; min-height: 52px; padding: 0 14px; border: 1.5px solid var(--rule); background: var(--white); font: inherit; font-size: 17px; color: var(--ink); border-radius: 0; -webkit-appearance: none; appearance: none; }
.input:focus { border-color: var(--ink); }
.input[aria-invalid="true"] { border-color: var(--error); }
.error { color: var(--error); font-size: 14px; font-weight: 600; }
.flow-nav { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--rule); }
.flow-nav .btn { min-width: 200px; }
.times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.times .chip { padding: 0; }
.fineprint { font-size: 13.5px; color: var(--muted); }
.fineprint a { color: var(--muted); }

.ready-card { background: var(--white); border: 1px solid var(--rule); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ready-card h2 { font-size: 24px; }
.recap { display: flex; flex-wrap: wrap; gap: 8px; }
.howto { list-style: none; margin: 0; padding: 0; }
.howto li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding-block: 12px; border-top: 1px solid var(--rule); }
.howto li:first-child { border-top: none; }
.howto .ico { width: 40px; height: 40px; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.notice { padding: 14px 16px; border: 1.5px solid var(--rule); background: var(--white); }

.edition-head { padding-block: 28px 18px; border-bottom: 2px solid var(--ink); display: flex; flex-direction: column; gap: 6px; }
.edition-head h1 { font-size: clamp(34px, 6.4vw, 52px); line-height: 1; }
.demo-flag { align-self: flex-start; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--marker); padding: 3px 8px; }
.feed-grid { display: grid; gap: 28px; padding-block: 24px 64px; }
@media (min-width: 960px) { .feed-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } .rail { order: 2; } .feed-main { order: 1; } .rail-inner { position: sticky; top: 24px; } }
.rail-inner { display: flex; flex-direction: column; gap: 18px; background: var(--white); border: 1px solid var(--rule); padding: 18px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.progress-top strong { font-family: var(--serif); font-size: 24px; font-variant-numeric: tabular-nums; }
.segments { display: flex; gap: 4px; }
.seg { flex: 1; height: 8px; background: var(--rule); transition: background-color 250ms ease; }
.rail .rubric-tag { padding: 6px 10px; font-size: 13px; }
.rail-meta { font-size: 14px; color: var(--ink-2); padding-top: 14px; border-top: 1px solid var(--rule); }
.thread { padding-bottom: 22px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.thread p { font-family: var(--serif); font-size: 21px; line-height: 1.45; font-style: italic; color: var(--ink-2); }
.story { padding-block: 24px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.kicker .rub { color: var(--c); }
.kicker .src { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-weight: 600; font-size: 13px; }
.kicker .no { margin-left: auto; font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: 0; line-height: 1; color: var(--ink); }
.story h3 { font-size: clamp(24px, 4.2vw, 30px); line-height: 1.12; }
.story .stand { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 38em; }
.story .why { font-size: 16px; line-height: 1.55; max-width: 38em; }
.story .why strong { background: linear-gradient(transparent 60%, var(--marker) 60%); }
.terms { background: var(--white); border: 1px solid var(--rule); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; max-width: 38em; }
.terms dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.terms dt { font-weight: 700; }
.terms dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 4px; }
.act { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--rule); background: var(--white); font-weight: 600; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.act-read[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.story.is-read h3 { color: var(--muted); }
.orig { font-weight: 600; font-size: 14.5px; }
.end { padding-block: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.stamp { font-weight: 700; font-size: 22px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ok); border: 3px double var(--ok); padding: 8px 16px; transform: rotate(-5deg); }
.end p { font-size: 16px; color: var(--ink-2); }

.doc { padding-block: 32px 64px; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.05; }
.doc h2 { font-size: 24px; margin-top: 18px; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); max-width: 40em; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

@media (prefers-reduced-motion: reduce) {
  .press, .seg, .stepper-bar span, .sample { transition: none; }
  .press:active { transform: none; }
  .sample { transform: none; }
}
