:root {
  --paper: #fbf9f4;
  --ink: #171714;
  --muted: #6c6962;
  --line: #dedbd3;
  --soft: #f2f0eb;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
.page { width: min(100%, 620px); margin: 0 auto; padding: 18px 18px 64px; }
.masthead, .preferences-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.masthead h1, .preferences-page h1, .saved-page h1, .story h2, .preference-section h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.masthead h1 { font-size: 30px; line-height: 1; margin: 2px 0 5px; }
.eyebrow, .story-meta, .section-heading, .sources, .region-transition { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { margin: 0; color: var(--muted); }
.tagline { margin: 0; color: var(--muted); font-family: Georgia, serif; font-style: italic; }
.tagline.large { font-size: 21px; color: var(--ink); }
.text-link { text-decoration: none; font-size: 14px; }
.edition-meta, .region-tabs { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.region-tabs { justify-content: flex-start; overflow-x: auto; position: sticky; top: 0; background: var(--paper); z-index: 5; }
.region-tabs a { text-decoration: none; white-space: nowrap; padding-bottom: 3px; }
.region-tabs a.active { border-bottom: 2px solid var(--ink); font-weight: 650; }
.region-section { scroll-margin-top: 48px; }
.region-transition { margin: 34px 0 0; padding: 14px 0 8px; border-top: 1px solid var(--line); color: var(--muted); }
.region-transition span { font-weight: 650; color: var(--ink); }
.section-heading { display: flex; justify-content: space-between; color: var(--muted); padding: 18px 0 8px; border-bottom: 1px solid var(--line); }
.section-heading.secondary { margin-top: 10px; }
.story { padding: 22px 0; border-bottom: 1px solid var(--line); }
.story-meta { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.bookmark-frame { display: block; margin-left: auto; }
.bookmark-frame form { margin: 0; }
.bookmark-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; }
.bookmark-button:hover, .bookmark-button:focus-visible, .bookmark-button.is-saved { color: var(--ink); background: var(--soft); }
.bookmark-button svg { width: 19px; height: 19px; display: block; }
.story h2 { font-size: 23px; line-height: 1.16; margin: 10px 0; }
.story-description { color: var(--muted); margin: 0 0 14px; }
.fact-box { background: var(--soft); border-left: 2px solid var(--ink); padding: 12px 14px; margin: 14px 0; }
.fact-box p { margin: 0 0 10px; }
.fact-box p:last-child { margin-bottom: 0; }
.fact-list { margin: 0 0 12px; padding-left: 18px; }
.fact-list:last-child { margin-bottom: 0; }
.fact-list li { margin: 0 0 7px; padding-left: 2px; }
.fact-list li:last-child { margin-bottom: 0; }
.fact-label { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.sources { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--muted); margin-top: 12px; }
.sources a { color: var(--ink); text-transform: none; letter-spacing: 0; text-underline-offset: 3px; }
.story-details summary { cursor: pointer; font-size: 13px; margin-top: 12px; }
.quick-summary { background: var(--soft); margin-top: 10px; padding: 12px; }
.edition-end { text-align: center; padding: 40px 0 10px; }
.edition-end > p { font: italic 18px/1.4 Georgia, serif; }
.button-outline, .button-primary { display: inline-block; border: 1px solid var(--ink); padding: 12px 16px; text-decoration: none; background: transparent; color: var(--ink); }
.button-primary { width: 100%; background: var(--soft); cursor: pointer; font-size: 16px; text-align: center; }
.preferences-return { margin-top: 18px; }
.empty-state { padding: 60px 0; }
.preferences-header h1 { margin: 0; font-size: 22px; font-style: italic; }
.preferences-intro { padding: 28px 0 16px; }
.preferences-intro > p:last-child { color: var(--muted); }
.preference-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.preference-section h2 { font-size: 24px; margin: 0 0 4px; }
.preference-section > p { color: var(--muted); }
.choice-row { display: flex; align-items: center; gap: 14px; padding: 14px 8px; cursor: pointer; }
.choice-row:has(input:checked) { background: var(--soft); border-radius: 10px; }
.choice-row strong, .choice-row small { display: block; }
.choice-row strong { font-size: 18px; font-weight: 500; }
.choice-row small { color: var(--muted); }
.choice-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.order-list { display: grid; gap: 8px; }
.order-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; background: var(--soft); padding: 10px 12px; border-radius: 9px; }
.order-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.order-actions { display: flex; gap: 4px; }
.order-actions form { margin: 0; }
.order-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.order-button:disabled { opacity: .3; cursor: default; }
.autosave-note { color: var(--muted); font-size: 14px; }
.saved-page > h1 { font-size: 34px; margin-bottom: 0; }
.saved-story { padding: 28px 0; border-bottom: 1px solid var(--line); }
.saved-story h2 { font: 500 25px/1.2 Georgia, serif; }
.text-button { border: 0; background: none; padding: 10px 0; text-decoration: underline; cursor: pointer; }

@media (max-width: 520px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .story h2 { font-size: 21px; }
  .edition-meta { font-size: 11px; }
  .region-transition { margin-top: 28px; }
}
