/* Life List Print — the site's own palette is Field Notebook; dark mode takes the Museum values (DESIGN.md section 10).
   Flat colours only. EB Garamond for headings and running text; the system font for controls and status lines. */

@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: #F3EDE0;
  --ink: #1F1B17;
  --muted: #6F665B;
  --rule: #B9AE9C;
  --accent: #7A2E24;
  --gutter: 16px;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --ink: #ECE4D3;
    --muted: #9A9183;
    --rule: #3B3631;
    --accent: #C9A15F;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.5;
  font-synthesis: none;
  font-kerning: normal;
  overflow-wrap: break-word;
}
strong, b, th, h1, h2, h3 { font-weight: 500; }
a { color: var(--accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: 0.82em; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; font-family: var(--ui); font-size: 1rem; }
.skip:focus { left: 0; }

/* ---- header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .bar { max-width: 72rem; margin: 0 auto; padding: 12px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: 500; letter-spacing: 0.01em; }
.mark img { display: block; width: 28px; height: 28px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-family: var(--ui); font-size: 0.95rem; }
.site-header nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover { border-bottom-color: var(--accent); }

.site-footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 1.5rem 0 3rem; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.site-footer .wrap { max-width: 44rem; }
.site-footer p { margin: 0 0 0.75rem; }
.site-footer a { color: var(--muted); }

/* ---- the text column: 68 to 72 characters a line */
.wrap { width: 100%; max-width: 29.5em; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.prose h2 { font-size: 1.55rem; line-height: 1.2; margin: 2.2rem 0 0.5rem; }
.prose h3 { font-size: 1.25rem; font-style: italic; font-weight: 400; margin: 1.5rem 0 0.25rem; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.4rem; }
.prose .lede { font-size: 1.3rem; }
.prose > h1, .hero h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 3.3rem); line-height: 1.08; letter-spacing: -0.005em; margin: 2.5rem 0 1rem; }
.prose .terms dt { font-weight: 500; margin-top: 0.8rem; }
.prose .terms dd { margin: 0 0 0.4rem; }
.sources { font-size: 1rem; color: var(--muted); }
.sources a { color: var(--muted); }
.note { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 1rem; margin: 1.2rem 0; font-size: 1.05rem; }
.note p { margin: 0.4rem 0; }
.steps li { padding-left: 0.2em; }
pre.code { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px solid var(--rule); font-family: var(--mono); font-size: 0.82rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.code code { font-size: inherit; }

table.data { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-family: var(--ui); font-size: 0.92rem; }
table.data caption { text-align: left; color: var(--muted); padding-bottom: 0.4rem; font-family: "EB Garamond", Georgia, serif; font-size: 1rem; font-style: italic; }
table.data th, table.data td { text-align: left; padding: 0.35rem 0.5rem 0.35rem 0; border-bottom: 1px solid var(--rule); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- hero, drop zone, status */
.hero { padding-top: 0.5rem; }
.dek { font-size: 1.3rem; margin: 0 0 0.75rem; }
.pricing { font-family: var(--ui); font-size: 1rem; color: var(--muted); margin: 0 0 1.5rem; }

.app { margin-bottom: 1rem; }
.drop { display: block; position: relative; border: 2px dashed var(--rule); padding: 2.2rem 1rem; text-align: center; cursor: pointer; font-family: var(--ui); }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-label { display: block; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.drop-small { display: block; margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.drop-small code { font-size: 0.95em; }
.sr-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.help-link { font-family: var(--ui); font-size: 0.95rem; margin: 0.75rem 0 0; }
.status { font-family: var(--ui); font-size: 1rem; margin: 1rem 0 0; min-height: 1.5em; }
.status.ok { font-weight: 600; }
.status.error { color: var(--accent); font-weight: 600; }
.notes p { font-family: var(--ui); font-size: 0.95rem; color: var(--muted); margin: 0.5rem 0 0; }
.region { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0.75rem 0 0; font-family: var(--ui); font-size: 0.95rem; }
.region[hidden] { display: none; }
.region label { color: var(--muted); }
.region select, .region input[type="text"] { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 0.5rem 0.6rem; min-height: 44px; }
.region input[type="text"] { width: 11rem; }
.region input[hidden] { display: none; }
.region-msg { color: var(--muted); font-size: 0.9rem; }
.region-msg.error { color: var(--accent); font-weight: 600; }

/* ---- controls, preview, actions */
.stage { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 12px 16px; margin: 1.25rem 0 0.5rem; font-family: var(--ui); }
.controls[hidden], .fitnote[hidden], .preview-wrap[hidden], .actions[hidden], .demo[hidden], .pages[hidden], .u-downloads[hidden], .u-drop[hidden], .help-link[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 4px; font-family: var(--ui); }
.field-title { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; color: var(--muted); }
.field select, .field input[type="text"] { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 0.55rem 0.6rem; min-height: 44px; width: 100%; }
.field select:hover, .field input[type="text"]:hover { border-color: var(--ink); }

.fitnote { font-family: var(--ui); font-size: 0.95rem; color: var(--ink); margin: 0.5rem 0; }

.demo { margin: 1.5rem auto 0; max-width: 36rem; }
.demo img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.demo figcaption { font-size: 1rem; font-style: italic; color: var(--muted); margin-top: 0.5rem; }
.demo figcaption a { color: var(--muted); }
.demo-link { display: block; cursor: zoom-in; }
.demo-pending { border: 1px solid var(--rule); padding: 3rem 1rem; text-align: center; color: var(--muted); font-family: var(--ui); }

.preview-wrap { margin: 1rem 0 0; }
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 0.5rem; }
.preview-help { margin: 0; font-family: var(--ui); font-size: 0.9rem; color: var(--muted); }
.preview { border: 1px solid var(--rule); cursor: zoom-in; line-height: 0; }
.preview svg { display: block; width: 100%; height: auto; }
.preview.zoom { cursor: zoom-out; overflow: auto; max-height: 85vh; }
.preview.zoom svg { width: var(--sheet-w, 1296px); max-width: none; height: auto; }
.pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; font-family: var(--ui); font-size: 0.9rem; color: var(--muted); margin: 0.75rem 0 0; }
.pages[hidden] { display: none; }
.sheets-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 0.5rem 0 0; font-family: var(--ui); font-size: 0.95rem; }
.sheets-choice[hidden] { display: none; }
.sheets-label { color: var(--muted); font-size: 0.85rem; }
.sheets-choice .radio { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.sheets-choice input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); margin: 0; }
.sheets-choice input[disabled] + span { color: var(--muted); }

.actions { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 44rem; margin: 1.75rem auto 0; padding: 0 var(--gutter); }
@media (min-width: 640px) { .actions { grid-template-columns: 1fr 1fr; } .action-msg { grid-column: 1 / -1; } }
.action .small, .small { font-family: var(--ui); font-size: 0.88rem; color: var(--muted); margin: 0.5rem 0 0; }
.action-msg { font-family: var(--ui); font-size: 0.95rem; margin: 0; min-height: 1.4em; }
.action-msg.error { color: var(--accent); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--ui); font-size: 1rem; font-weight: 600; line-height: 1.2; min-height: 48px; padding: 0.7rem 1.25rem; border: 1px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; text-align: center; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); width: 100%; }
.btn.primary:hover { filter: none; background: var(--ink); border-color: var(--ink); }
.btn.secondary { width: 100%; }
.btn.quiet { min-height: 36px; padding: 0.3rem 0.8rem; font-weight: 400; font-size: 0.9rem; border-color: var(--rule); }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* ---- unlock page */
.unlock { padding-top: 0.5rem; }
.unlock h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 3.3rem); line-height: 1.08; margin: 2.5rem 0 1rem; }
.u-msg { font-family: var(--ui); font-size: 1rem; }
.u-msg.error { color: var(--accent); font-weight: 600; }
.u-downloads, .u-drop { margin-top: 1.5rem; }
.u-list { font-family: var(--ui); font-size: 0.95rem; color: var(--muted); margin: 1rem 0; }
.u-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; margin: 0 0 1.5rem; }
.u-shop { display: grid; gap: 12px; margin: 0 0 1rem; }

/* ---- small screens */
@media (max-width: 480px) {
  body { font-size: 1.15rem; }
  .prose .lede, .dek { font-size: 1.2rem; }
  .drop { padding: 1.6rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
