:root {
  --paper: #f7f4ee;
  --paper-2: #efeae0;
  --ink: #16150f;
  --ink-2: #4a4740;
  --ink-3: #7d786e;
  --line: #d9d3c6;
  --red: #c8102e;
  --red-2: #a30c25;
  --amber: #b45f06;
  --green: #2f6b3a;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  --narrow: 760px;
  --gutter: 16px;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14130f;
    --paper-2: #1d1b16;
    --ink: #f1ede4;
    --ink-2: #c9c3b6;
    --ink-3: #8f897c;
    --line: #2e2b24;
    --red: #ff4d63;
    --red-2: #e0334b;
    --amber: #e3a04a;
    --green: #74b97f;
  }
}
:root[data-theme="dark"] {
  --paper: #14130f; --paper-2: #1d1b16; --ink: #f1ede4; --ink-2: #c9c3b6; --ink-3: #8f897c; --line: #2e2b24; --red: #ff4d63; --red-2: #e0334b; --amber: #e3a04a; --green: #74b97f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
small { font-size: .8em; color: var(--ink-3); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: var(--narrow); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; }
.skip:focus { left: var(--gutter); z-index: 100; }
section { padding: 2.5rem 0; }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: .6em; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; background: var(--red); color: #fff; font-family: var(--serif); font-size: 1.25rem; border-radius: 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small { color: var(--ink-3); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.site-nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; padding: .45rem .7rem; border-radius: var(--radius); font-weight: 500; font-size: .95rem; color: var(--ink-2); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); background: var(--paper-2); }
.theme { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.theme button { font: inherit; font-size: .72rem; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; background: none; border: 0; color: var(--ink-3); padding: .25rem .6rem; border-radius: 999px; cursor: pointer; }
.theme button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"]:hover { color: var(--paper); }
@media (max-width: 640px) { .site-header .wrap { padding-top: .5rem; padding-bottom: .5rem; } .theme { order: 3; } }

/* hero */
.hero { padding: 4rem 0 2.5rem; background: linear-gradient(180deg, var(--paper-2), var(--paper)); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.hero h1 { max-width: 14ch; }
.hero-art { margin: 0; max-width: 420px; justify-self: center; width: 100%; }
.hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; } .hero-art { max-width: 520px; justify-self: end; } }
/* hero art palette — a physical paper object, fixed colors in both themes */
.hero-art { --ap: #f4efe3; --ap2: #e6dfcf; --ai: #1a1813; --ai2: #5a5548; --ai3: #8c8677; --al: #d3cbb9; --ar: #c8102e; }
.art-stack rect { fill: var(--ap2); stroke: #c9c0ad; stroke-width: 1.5; }
.art-stack rect:nth-child(2) { fill: #ede6d6; }
.art-stack rect:nth-child(3) { fill: #f0eadb; }
.art-page { fill: var(--ap); stroke: #b9b09c; stroke-width: 1.5; filter: drop-shadow(0 18px 30px rgba(0,0,0,.28)); }
.art-page-grain { fill: var(--ai); opacity: .18; }
.art-band { fill: var(--ai); }
.art-band-text { fill: var(--ap); font-family: var(--mono); font-weight: 600; font-size: 20px; letter-spacing: .28em; }
.art-holes circle { fill: var(--ap2); stroke: var(--ai3); stroke-width: 1.5; }
.art-dow text { fill: var(--ai3); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; }
.art-grid path { stroke: var(--al); stroke-width: 1.5; fill: none; }
.art-days text { fill: var(--ai2); font-family: var(--serif); font-size: 15px; }
.art-x path { stroke: var(--ar); stroke-width: 4.5; stroke-linecap: round; fill: none; opacity: .9; }
.art-circle path { stroke: var(--ar); stroke-width: 4; stroke-linecap: round; fill: none; }
.art-note { fill: var(--ar); font-family: var(--serif); font-style: italic; font-size: 22px; }
.art-stamp rect { fill: none; stroke: var(--ar); stroke-width: 5; opacity: .78; mix-blend-mode: multiply; }
.art-stamp rect + rect { stroke-width: 2; }
.art-stamp text { fill: var(--ar); font-family: var(--mono); font-weight: 600; font-size: 46px; letter-spacing: .18em; opacity: .82; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art-page { filter: drop-shadow(0 22px 36px rgba(0,0,0,.7)); } }
:root[data-theme="dark"] .art-page { filter: drop-shadow(0 22px 36px rgba(0,0,0,.7)); }
.hero h1 em { font-style: italic; color: var(--red); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.btn { display: inline-block; padding: .7rem 1.1rem; border: 1px solid var(--ink); border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: .95rem; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-2); color: #fff; }

/* stats */
.stats { padding: 0; }
.stats .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2rem; }
.stat { background: var(--paper); padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .25rem; }
.stat .n { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; }
.stat .l { color: var(--ink-2); font-size: .9rem; max-width: 24ch; }
.stat.accent .n { color: var(--red); }

.feature { border-bottom: 1px solid var(--line); }
.feature h2 a { text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section-head p { color: var(--ink-2); margin: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1rem; display: flex; flex-direction: column; gap: .5rem; position: relative; }
.card.is-two-weeks { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.card[hidden] { display: none; }
.card-head { display: flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.card-head .status { margin-left: auto; }
.card-title { margin: 0; font-size: 1.4rem; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.quote { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; color: var(--ink); border-left: 3px solid var(--red); padding-left: .8rem; }
.quote.big { font-size: clamp(1.4rem, 3vw, 2rem); border-left-width: 4px; padding-left: 1.1rem; margin: 1rem 0 1.5rem; }
.meta { font-size: .85rem; color: var(--ink-3); margin: 0; }
.repeat { font-family: var(--mono); color: var(--amber); font-weight: 600; }
.overdue { margin: 0; font-size: .85rem; color: var(--red); font-family: var(--mono); }
.overdue-label { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; opacity: .85; }
.outcome { margin: 0; color: var(--ink-2); font-size: .95rem; }
.outcome.big { font-size: 1.1rem; color: var(--ink); }
.card-foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: auto; padding-top: .5rem; font-size: .78rem; }
.tag { text-decoration: none; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--paper); }
.tag:hover { border-color: var(--ink); }
.sources { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.sources a { color: var(--ink-3); }

.stamp {
  display: inline-block; font-family: var(--mono); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); border: 2px solid var(--red); border-radius: 3px; padding: .1rem .45rem; font-size: .68rem; transform: rotate(-2deg);
}
.stamp.big { font-size: 1rem; padding: .3rem .8rem; transform: rotate(-3deg); margin-bottom: 1rem; }
.status-never-delivered .status { color: var(--red); }
.status-broken .status { color: var(--red-2); }
.status-partial .status, .status-late .status { color: var(--amber); }
.status-still-waiting .status { color: var(--amber); }

/* eras & topics */
.era-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.era { display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--paper-2); }
.era:hover { border-color: var(--red); color: inherit; }
.era-years { font-family: var(--mono); font-size: .75rem; color: var(--red); letter-spacing: .08em; }
.era-label { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.era-count { font-size: .85rem; color: var(--ink-3); }
.era-blurb { font-size: .9rem; color: var(--ink-2); margin-top: .4rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--paper-2); }
.chips a:hover { border-color: var(--red); }

/* page head */
.page-head { padding: 3rem 0 1.5rem; border-bottom: 1px solid var(--line); background: var(--paper-2); }

/* filters */
.filters { display: grid; gap: .9rem 1.5rem; grid-template-columns: 1fr; margin-bottom: 1.5rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; }
.filters legend { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); float: left; margin-right: .6rem; padding: 0; }
.filters label { font-size: .9rem; display: inline-flex; gap: .3rem; align-items: center; }
.filters input[type="search"], .filters select { font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; max-width: 100%; }
.filters .search { display: block; }
.filters .count { margin: 0; font-size: .85rem; color: var(--ink-3); }
.filters button { font: inherit; font-size: .85rem; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem .6rem; color: var(--ink-2); cursor: pointer; }
.empty { color: var(--ink-3); text-align: center; padding: 3rem 0; }
@media (min-width: 900px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search, .filters .count { grid-column: 1 / -1; }
}

/* promise page */
.promise { padding: 2.5rem 0 4rem; }
.crumbs { font-size: .85rem; color: var(--ink-3); }
.promise-head { margin-bottom: 1rem; }
.promise-head .status { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.2rem; margin: 0 0 2rem; font-size: .95rem; }
.facts dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-top: .2rem; }
.facts dd { margin: 0; }
.source-list { padding-left: 1.2rem; }
.source-list li { margin-bottom: .5rem; }
.src-meta { color: var(--ink-3); font-size: .85rem; }
.pager { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: .1rem; } .facts dd { margin-bottom: .6rem; } }

/* timeline */
.year-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; position: sticky; top: 60px; background: var(--paper); padding: .6rem 0; border-bottom: 1px solid var(--line); z-index: 5; }
.year-bar a { font-family: var(--mono); font-size: .8rem; text-decoration: none; padding: .2rem .5rem; border: 1px solid var(--line); border-radius: 999px; }
.tl { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.tl-year { padding: 1.5rem 0 .5rem 1.2rem; }
.tl-year h2 { font-size: 2.6rem; margin: 0; }
.tl-item { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .9rem 0 .9rem 1.2rem; position: relative; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 1.25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.tl-item.is-two-weeks::before { background: var(--red); }
.tl-item time { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); padding-top: .15rem; }
.tl-item a { text-decoration: none; }
.tl-item a:hover { text-decoration: underline; }
.tl-item .status { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; margin-left: .5rem; }
.tl-item .stamp { margin-left: .5rem; }
.tl-quote { margin: .3rem 0 0; font-family: var(--serif); color: var(--ink-2); font-size: 1.02rem; }
@media (max-width: 560px) { .tl-item { grid-template-columns: 1fr; gap: .2rem; } }

/* sources */
.outlet { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; margin-bottom: .6rem; background: var(--paper-2); }
.outlet summary { cursor: pointer; font-size: 1.05rem; }
.outlet ul { padding-left: 1.2rem; margin: .6rem 0 .2rem; }
.outlet li { margin-bottom: .4rem; font-size: .92rem; }

/* prose */
.prose { padding-top: 2rem; }
.prose h2 { font-size: 1.7rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
pre { background: var(--paper-2); border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius); overflow: auto; font-family: var(--mono); font-size: .82rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--ink-2); font-size: .9rem; margin-top: 3rem; }
.site-footer .fine { color: var(--ink-3); font-size: .8rem; }
