/* Layout: an old broadsheet. A newsprint top bar (month + day strip) sits above a horizontal,
   snap-scrolling carousel with one full front page per day. Front page: ears + blackletter
   masthead between double rules, a banner headline with deck, a lead story beside an
   "In Brief" rail, then ruled columns. Single committed newsprint theme: a paper does not go dark. */
:root {
  --tuck: 0;   /* 0 open → 1 gone; set from scroll, inherited by the bar and the toggles */
  --paper: #f4f1ea;
  --paper-hi: #faf8f2;
  --desk: #ddd8cc;
  --ink: #1a1a18;
  --ink-soft: #45433e;
  --faint: #868277;
  --rule-soft: #c9c2b2;
  --stamp: #9b2a1a;
  --mast: "UnifrakturMaguntia", "Old English Text MT", "Times New Roman", serif;
  --head: "Libre Bodoni", "Bodoni Moda", "Didot", "Times New Roman", Georgia, serif;
  --headline: "Zilla Slab", "Rockwell", "Courier Prime", Georgia, serif;   /* article titles: slab-serif, oldschool but clean */
  --body: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  /* golden-ratio scale: one notch is √φ (1.272), two notches is φ (1.618), so
     body → title → lead headline → banner each steps up by √φ, and spacing runs
     on a φ rhythm. One formula, harmonious sizes. */
  --phi: 1.618; --step: 1.272;
  --f-body: 23px;
  --f-title:  calc(var(--f-body) * 1.36);                 /* story titles, a touch bigger */
  --f-leadh:  calc(var(--f-body) * 1.72);                 /* lead headline, a touch bigger */
  --f-banner: calc(var(--f-body) * var(--phi) * var(--step)); /* ~41px masthead */
  --sp: 16px;
  --sp-l:  calc(var(--sp) * var(--phi));                  /* ~26px */
  --sp-xl: calc(var(--sp) * var(--phi) * var(--phi));     /* ~42px */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .18 0 0 0 0 .14 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
/* dark mode: the paper itself inverts - dark stock, light ink */
body.dark {
  --paper: #1b1a17;
  --paper-hi: #262420;
  --desk: #0d0c0a;
  --ink: #e9e6dd;
  --ink-soft: #b4b0a5;
  --faint: #716d63;
  --rule-soft: #413e38;
  --stamp: #e07a63;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .88 0 0 0 0 .8 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
/* top-right theme toggle, always reachable */
#theme {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 6px; z-index: 60;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 17px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 2px 9px rgba(0, 0, 0, .22); transition: transform .14s ease, background .2s ease, color .2s ease;
}
#theme:hover { transform: translateY(-1px) rotate(-12deg); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 18px/1.6 var(--body);
       -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
       display: flex; flex-direction: column; overflow: hidden;
       padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }
button, input { font: inherit; color: inherit; }

/* ── top bar: month + day strip, set like a newspaper index ── */
/* --tuck runs 0 (open) → 1 (gone), driven straight from scroll so the bar
   collapses gradually and linearly with the page, with no snap or threshold */
.bar { flex: none; background: var(--paper) var(--grain); overflow: hidden; will-change: max-height, opacity;
       border-bottom: 3px double var(--ink);
       max-height: calc(var(--barh, 140px) * (1 - var(--tuck)));
       padding: calc(8px * (1 - var(--tuck))) 16px calc(6px * (1 - var(--tuck)));
       border-bottom-width: calc(3px * (1 - var(--tuck)));
       opacity: calc(1 - var(--tuck)); }
.bar-row { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.home { justify-self: start; font: 400 24px/1 var(--mast); color: var(--ink); text-decoration: none; }
.home .hv { font-family: var(--head); font-weight: 700; font-size: 1.12em; letter-spacing: .01em; }   /* an elegant serif initial, not the blackletter V */
.month { display: flex; align-items: center; gap: 6px; }
.month span { min-width: 9.5em; text-align: center; font: 700 16px/1 var(--body); text-transform: uppercase; letter-spacing: .12em; }
.month button { width: 32px; height: 32px; border: 1px solid var(--ink); background: transparent; cursor: pointer;
                font: 700 20px/1 var(--head); border-radius: 50%; }
.month button:disabled { opacity: .25; cursor: default; }
.find { justify-self: end; margin-right: 42px; border: 0; background: none; cursor: pointer; font: italic 18px var(--body);
        border-bottom: 1px solid var(--ink); padding: 2px 0; }   /* clears the fixed theme toggle */
.find[aria-expanded="true"] { color: var(--stamp); border-color: var(--stamp); }

.strip { max-width: 1120px; margin: 6px auto 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
         padding-bottom: 2px; scroll-padding-inline: 40%; }
.strip::-webkit-scrollbar { display: none; }
.strip .d { flex: 1 0 32px; min-width: 32px; height: 36px; display: grid; place-items: center; border: 0; background: none;
            font: 17px/1 var(--body); font-variant-numeric: lining-nums tabular-nums; color: var(--faint); border-radius: 2px; }
/* days without an issue: clearly greyed out and not clickable */
.strip span.d { color: var(--ink); opacity: .22; cursor: default; }
.strip .d.has { color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-soft);
                text-underline-offset: 4px; }
.strip .d { transition: background .15s ease, color .15s ease, border-radius .15s ease; }
.strip .d.has:hover { background: var(--paper-hi); border-radius: 5px; }
.strip .d.on { background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 4px; }
.strip .d.today:not(.on) { box-shadow: inset 0 0 0 1px var(--ink); border-radius: 4px; }
/* a few small touches */
::selection { background: var(--stamp); color: var(--paper); }
.home { transition: color .15s ease; }
.home:hover { color: var(--stamp); }
.month button { transition: background .15s ease, color .15s ease; }
.month button:not(:disabled):hover { background: var(--ink); color: var(--paper); }
.find { transition: color .15s ease, border-color .15s ease; }
.story h3, .lead h2 { transition: color .15s ease; }

/* ── search drawer ── */
.search { flex: none; max-height: 60vh; overflow-y: auto; background: var(--paper) var(--grain); border-bottom: 3px double var(--ink);
          padding: 14px 16px 18px; }
.search form, #results { max-width: 760px; margin: 0 auto; }
.search input { width: 100%; padding: 10px 12px; background: var(--paper-hi); border: 1px solid var(--ink); border-radius: 0; font-size: 18px; }
#results { margin-top: 8px; }
.result { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule-soft);
          padding: 10px 0; cursor: pointer; }
.result .rd { font: italic 15px var(--body); color: var(--stamp); }
.result .rt { display: block; font: 700 19px/1.25 var(--headline); margin-top: 2px; }
.result .rs { display: block; color: var(--ink-soft); font-size: 17px; margin-top: 2px; }
mark { background: #dcbf7f; color: inherit; }
.none { font-style: italic; color: var(--ink-soft); padding: 10px 0; }

/* ── carousel: one page per day ── */
.pages { flex: 1; min-height: 0; display: flex; flex-direction: row-reverse; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
         scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
         direction: ltr; }   /* newest on the left: swipe direction inverted from before */
.pages::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; height: 100%; overflow-y: auto; scroll-snap-align: center; scroll-snap-stop: always;
        padding: 14px 16px 24px; direction: ltr; }   /* the page content itself stays left-to-right */
.sheet { width: 100%; max-width: 1646px; margin: 0 auto; min-height: 100%; padding: 30px calc(51px + 2vw) 34px;
         /* faint uneven inking + aged blotches + a mild halftone dot grid, so the paper
            reads like real worn newsprint, never perfectly flat */
         background:
           radial-gradient(rgba(28, 23, 15, .05) 0.6px, transparent 0.7px) 0 0 / 3.6px 3.6px,
           radial-gradient(58% 42% at 17% 11%, rgba(40, 34, 22, .018), transparent 74%),
           radial-gradient(52% 36% at 83% 58%, rgba(40, 34, 22, .015), transparent 74%),
           radial-gradient(44% 32% at 46% 90%, rgba(40, 34, 22, .013), transparent 74%),
           var(--paper) var(--grain);
         box-shadow: inset 0 0 120px rgba(78, 76, 66, .09), -14px 0 26px -10px rgba(10, 10, 8, .26), 0 18px 32px -8px rgba(10, 10, 8, .3);
         display: flex; flex-direction: column; }
/* the ink sits on the paper: a hair of letterpress weight on the big type */
.banner, .lead h2, .story h3, .second h3 { text-shadow: 0 .4px .4px rgba(0, 0, 0, .07); }
body.dark .banner, body.dark .lead h2, body.dark .story h3, body.dark .second h3 { text-shadow: none; }
body.dark .sheet { background:
    radial-gradient(rgba(236, 231, 220, .04) 0.6px, transparent 0.7px) 0 0 / 3.6px 3.6px,
    radial-gradient(58% 42% at 17% 11%, rgba(255, 250, 235, .022), transparent 72%),
    radial-gradient(52% 36% at 83% 58%, rgba(255, 250, 235, .018), transparent 72%),
    radial-gradient(44% 32% at 46% 90%, rgba(255, 250, 235, .015), transparent 72%),
    var(--paper) var(--grain);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .35), -14px 0 26px -10px rgba(0,0,0,.6), 0 18px 32px -8px rgba(0,0,0,.65); }
.loading { font-style: italic; text-align: center; color: var(--ink-soft); margin: auto; }

/* masthead */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.ear { border: 1px solid var(--ink); padding: 8px 12px; font: 15px/1.35 var(--body); text-align: center; max-width: 190px; }
.ear b { display: block; font: 700 12.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: .12em; }
.ear.r { justify-self: end; }
.masthead { margin: 0; text-align: center; font: 400 clamp(44px, 8.5vw, 108px)/1 var(--mast); white-space: nowrap; }
.motto { text-align: center; font: italic 16px/1.3 var(--body); color: var(--ink-soft); margin: 4px 0 10px; }
.folio { display: flex; justify-content: space-between; gap: 4px 16px; border-top: 3px double var(--ink);
         border-bottom: 1px solid var(--ink); padding: 7px 2px; font: 600 16px/1.3 var(--body); text-transform: uppercase; letter-spacing: .06em; }
.folio .ed { color: var(--stamp); font-weight: 700; }

/* a little zoomed out by default: more of the front page fits on screen */
.sheet { zoom: .75; }
.bar-row, .strip { zoom: .94; }
@media (max-width: 680px) { .sheet { zoom: .9; } .bar-row, .strip { zoom: .95; } }

/* page head: a faint black-and-white trademark, the line, the date */
.head { text-align: center; }
.sheet { position: relative; }
.trademark { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; opacity: .16;
             filter: grayscale(1); transform: rotate(-12deg); pointer-events: none; }
.head .motto { font: italic 600 clamp(24px, 3.4vw, 36px)/1.2 var(--body); color: var(--ink); margin: 18px 0 14px; padding: 0 56px; letter-spacing: -.018em; }
.head .folio { justify-content: center; padding: 19px 2px; width: 63%; margin-inline: auto; }   /* the date line, 10% narrower */

/* banner */
.banner { font: 700 clamp(28px, 3.3vw, var(--f-banner))/1.32 var(--head); text-align: center; text-transform: uppercase; letter-spacing: .05em; word-spacing: .14em;
          margin: var(--sp-xl) auto calc(var(--sp-xl) * var(--step)); max-width: 72%; align-self: center; text-wrap: pretty; }   /* pretty, not balance: no odd word shoved onto its own line */
.deck { text-align: center; font: italic 20px/1.4 var(--body); color: var(--ink-soft); margin: 0 auto 14px; max-width: 52ch; text-wrap: balance; }

/* lead + in brief */
.front { display: grid; grid-template-columns: minmax(0, 1.618fr) minmax(0, 1.13fr); border-top: 1px solid var(--ink); padding-top: var(--sp-xl); }   /* In Brief a bit wider */
.main { border-right: 1px solid var(--ink); padding-right: calc(var(--sp-xl) - 6px); display: flex; flex-direction: column; }
.lead { padding: calc(var(--sp) * 0.25) 0 var(--sp-l); }   /* tighter gap from the rule above to the location */
.lead h2 { font: 600 clamp(calc(var(--f-title) + 2px), 2.7vw, var(--f-leadh))/1.12 var(--headline); margin: 6px 0 14px; text-wrap: balance; }   /* never smaller than the lead body + 2 */
.lead p { margin: 0; font-size: var(--f-title); line-height: 1.6; hyphens: none; overflow-wrap: normal; text-align: justify; }   /* lead reads one golden notch above body */
/* no drop cap: it enlarged the first letter of abbreviations like "U.S." */
.brief { padding: 22px 0 52px 46px; }
.brief h4 { margin: 0 auto 15px; width: 100%; font: 700 14px/1 var(--body); text-transform: uppercase; letter-spacing: .16em; text-align: center;
            border-bottom: 1px solid var(--ink); padding-bottom: 11px; }   /* the rule under IN BRIEF runs to 85% */
.brief ul { list-style: none; margin: 0; padding: 0; }
.brief li { padding: 20px 0; border-bottom: 1px solid var(--rule-soft); font-size: var(--f-body); line-height: 1.5; text-align: justify; }
.brief li:last-child { border-bottom: 0; }
.brief li b { font: 600 var(--f-title)/1.2 var(--headline); display: block; margin: 4px 0 9px; }   /* a bit more air under the In Brief heading */

.label { font: 700 13px/1.3 var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--stamp); }
.lead .label, .second .label { font-size: 15px; }   /* the location line, a touch bigger on the top stories */
.places { font-style: italic; text-transform: none; letter-spacing: 0; color: var(--ink-soft); font-weight: 400; }
.dash { font-size: .68em; letter-spacing: -.02em; }   /* the separator dash, a bit smaller and narrower */

/* second tier: two stories side by side, a size down from the lead */
.second { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); position: relative; flex: 1; }
/* the divider between the two articles, always centred top-to-bottom of the pair */
.second::before { content: ""; position: absolute; top: 10%; bottom: 10%; left: 50%; width: 1px;
  transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--rule-soft) 6%, var(--rule-soft) 94%, transparent); }
.second .story { padding: calc(var(--sp-l) * 0.25) calc(var(--sp-xl) - 6px) var(--sp-l) 0; border-bottom: 0; margin: 0; }
.second .story + .story { padding: calc(var(--sp-l) * 0.25) 0 var(--sp-l) calc(var(--sp-xl) - 6px); }
.second h3 { font-size: var(--f-title); line-height: 1.14; }
.second p { font-size: var(--f-body); }

/* the rest: ruled newspaper columns */
.columns { column-count: 3; column-gap: var(--sp-xl); column-rule: 1px solid var(--rule-soft); border-top: 1px solid var(--ink); padding-top: calc(var(--sp-l) * 0.25); }
.story { break-inside: avoid; padding-bottom: var(--sp-xl); margin-bottom: calc(var(--sp-l) * 0.42); border-bottom: 1px solid var(--rule-soft); }   /* small gap from the rule down to the next location */
.story h3 { font: 600 var(--f-title)/1.15 var(--headline); margin: 6px 0 15px; text-wrap: balance; }   /* a bit more air between heading and body */
.story p { margin: 0; hyphens: none; overflow-wrap: normal; font-size: var(--f-body); line-height: 1.58; text-align: justify; }

/* desktop only: let the spacing wander a little so the page reads hand-set and
   zine-ish rather than mechanically even. Mobile keeps its tidy rhythm. */
@media (min-width: 961px) {
  .columns .story { padding-bottom: var(--sp-xl); margin-bottom: calc(var(--sp-l) * 0.42); }   /* small gap from the rule to the next location */
  .second .story:nth-child(odd)  { padding-top: 7px; padding-bottom: 30px; }
  .second .story:nth-child(even) { padding-top: 7px; padding-bottom: 30px; }
  .lead { padding: 16px 0 20px; }
}

.colophon { margin-top: auto; padding-top: 62px; padding-bottom: 32px; }   /* more room above the footer line, and below the footer */
.colophon div { border-top: 3px double var(--ink); padding-top: 30px; padding-bottom: 16px; display: flex; justify-content: space-between; gap: 12px;
                font: italic 15px var(--body); color: var(--ink-soft); }   /* more air above and below "Older stories" */
.empty { text-align: center; margin: auto; padding: 40px 0; }
.empty h2 { font: 900 34px/1.1 var(--head); margin: 0 0 8px; text-transform: uppercase; }

@media (max-width: 960px) { .columns { column-count: 2; } .ear { display: none; } .top { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .bar { padding: calc(6px * (1 - var(--tuck))) 10px calc(4px * (1 - var(--tuck))); }
  /* the fixed toggles sit on the bar at the top, over the headline; once the main
     heading has scrolled up past them they lift away and fade out, and they come
     straight back when the headline (and the navbar) return at the top. */
  #theme, #tw { transition: transform .26s ease, opacity .26s ease; }
  body.heading-passed #theme, body.heading-passed #tw { transform: translateY(-66px); opacity: 0; pointer-events: none; }
  .home { font-size: 20px; }
  .month span { min-width: 7.5em; font-size: 13px; letter-spacing: .1em; }
  .page { padding: 0; }
  .sheet { padding: 22px 4vw 24px; box-shadow: none; overflow: clip; }   /* 4% gutter; clip so the big watermark can't push the page sideways */
  /* mobile: the corner mark goes big, tilted and fainter, free to spill off the top-right */
  .trademark { top: -22px; right: -18px; width: 152px; height: 152px; opacity: .035; transform: rotate(-14deg); }
  /* and a second, enormous, barely-there mark tilted behind the whole page */
  .sheet::before {
    content: ""; position: absolute; inset: 0;        /* box stays page-sized - clipped to it, no overflow */
    background: url("mark.png") center / 150vmax no-repeat;   /* the image is huge, the box is not */
    opacity: .05; transform: rotate(20deg); pointer-events: none; z-index: 5;   /* in front of the page, like the corner mark */
  }
  body.dark .sheet::before { opacity: .06; }
  .head .motto { padding: 0 24px; }
  .masthead { font-size: clamp(40px, 13vw, 60px); }
  .folio { flex-wrap: wrap; justify-content: center; font-size: 12.5px; column-gap: 12px; }
  /* the headline runs the full width of the page (minus the 4% gutter) */
  .banner, body.typewriter .banner { max-width: 100%; font-size: clamp(26px, 8vw, 40px); margin: 14px 0; }
  .deck { font-size: 16px; }
  /* everything stacks into one column, so every article shares one look */
  .front { grid-template-columns: 1fr; padding-top: 14px; }
  .main { border-right: 0; padding-right: 0; }
  .second { grid-template-columns: 1fr; }
  .second::before { display: none; }
  .columns { column-count: 1; padding-top: 14px; }
  /* unified fonts: one body size, one heading size (headings stay the larger) */
  .lead p, .story p, .second p, .brief li { font-size: 19px; line-height: 1.55; }
  .lead h2, .story h3, .second h3, .columns .story h3, .brief li b { font-size: 22px; line-height: 1.2; }
  /* unified spacing: same gap from every divider down to the next location */
  .label { margin-top: 2px; margin-bottom: 8px; }
  .lead { padding: 14px 0; }
  .story { padding-bottom: 20px; margin-bottom: 14px; }
  .columns .story { padding-bottom: 20px; margin-bottom: 14px; }
  .second .story, .second .story + .story { padding: 14px 0 20px; border-left: 0; }
  .second .story + .story { border-top: 1px solid var(--rule-soft); }
  .brief li { padding: 14px 0; }
  .brief { padding: 14px 0 6px; border-top: 1px solid var(--ink); }   /* small gap below the last In Brief line to the next location */
}

/* ── polish pass ── */
/* rules fade out at their ends, like aged newsprint */
.folio, .colophon div, .columns, .front, .second, .head .folio, .main, .second .story + .story {
  border-image: linear-gradient(90deg, transparent, var(--ink) 11%, var(--ink) 89%, transparent) 1;   /* fade ~20% longer */
}
.front {   /* the first rule below the main heading, 5% narrower */
  border-image: linear-gradient(90deg, transparent, var(--ink) 13.5%, var(--ink) 86.5%, transparent) 1;
}
.second .story + .story {   /* divider between the two tier-2 articles: solid band centred top-to-bottom */
  border-image: linear-gradient(180deg, transparent, var(--ink) 16%, var(--ink) 84%, transparent) 1;
}
.main {   /* the main column's right rule spans lead+second, so bias its solid band a little lower */
  border-image: linear-gradient(180deg, transparent, var(--ink) 34%, var(--ink) 86%, transparent) 1;
}
/* the divider between the upper articles and the columns below: a plain thin
   solid line, not faded */
.columns {
  border-image: none;
}
/* the two rules around the date fade over a longer run */
.head .folio {
  border-image: linear-gradient(90deg, transparent, var(--ink) 26%, var(--ink) 74%, transparent) 1;   /* longer fade on the date rule */
}
/* a soft humanist-sans touch on the small labels, for warmth */
.label, .brief h4, .folio, .month span, .ear b, .eyebrow { font-family: "Mulish", var(--body); }
/* breathing room */
                       /* under the main title */
.label { margin-top: 2px; margin-bottom: 12px; }         /* a little air above the location, then location → headline */
.story h3, .second h3 { margin-bottom: 12px; }          /* sub-title → paragraph */
.story { margin-bottom: 40px; }                         /* below each article (below the line) */
.brief li { padding: 30px 0; }                          /* more room around each brief divider and its location */

/* ── typewriter mode ── */
#tw { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 40px; z-index: 60;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 15px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 2px 9px rgba(0, 0, 0, .22); transition: transform .14s ease, background .2s ease, color .2s ease; }
#tw:hover { transform: translateY(-1px); }
#tw.on { background: var(--ink); color: var(--paper); }
.find { margin-right: 84px; }   /* clear both toggles */
/* the whole paper reads as struck on a typewriter: a single mono face, a soft
   gray imprint behind the words, and a slightly uneven ink strike */
body.typewriter { --body: "Courier Prime", "Courier New", monospace; --head: "Courier Prime", "Courier New", monospace; letter-spacing: -.02em; }
body.typewriter .banner, body.typewriter .masthead { letter-spacing: .01em; }
body.typewriter .lead p, body.typewriter .story p, body.typewriter .second p, body.typewriter .brief li,
body.typewriter .lead h2, body.typewriter .story h3, body.typewriter .second h3, body.typewriter .banner,
body.typewriter .deck {
  background: rgba(118, 112, 104, .12);
  text-shadow: .4px .4px 0 rgba(0, 0, 0, .16);
  padding: 3px 13px; margin-inline: -13px; margin-block: 2px;   /* no box-shadow: clean equal-width rectangles, no vertical bleed */
  overflow-wrap: break-word;                                     /* a long heading wraps instead of sticking out past its paragraph */
}
body.dark.typewriter .lead p, body.dark.typewriter .story p, body.dark.typewriter .second p, body.dark.typewriter .brief li,
body.dark.typewriter .lead h2, body.dark.typewriter .story h3, body.dark.typewriter .second h3, body.dark.typewriter .banner,
body.dark.typewriter .deck {
  background: rgba(210, 204, 194, .08);
  text-shadow: none;
  padding: 3px 13px; margin-inline: -13px; margin-block: 2px;
  overflow-wrap: break-word;
}
/* typewriter headings: a slightly taller shade and a touch more gap to the body */
body.typewriter .lead h2, body.typewriter .story h3, body.typewriter .second h3 {
  padding-top: 7px; padding-bottom: 7px; margin-bottom: 9px;
}
/* In Brief sits in a narrow column, so its shade must not overshoot the edges */
body.typewriter .brief li { margin-inline: -4px; }   /* shade a touch wider than the column text, but not sticking out */

/* main heading: more air between it and the rules above/below */
.banner { margin: 40px 0 40px; }   /* a bit less gap from the date rule down to the headline */
/* faint print specks on the article areas, so the paper reads like real newsprint */
.front, .columns, .brief { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23000' opacity='0.05'%3E%3Ccircle cx='14' cy='22' r='.8'/%3E%3Ccircle cx='70' cy='12' r='.6'/%3E%3Ccircle cx='96' cy='54' r='.9'/%3E%3Ccircle cx='38' cy='70' r='.7'/%3E%3Ccircle cx='60' cy='96' r='.6'/%3E%3Ccircle cx='108' cy='104' r='.7'/%3E%3Ccircle cx='24' cy='110' r='.55'/%3E%3C/g%3E%3C/svg%3E"); }
body.dark .front, body.dark .columns, body.dark .brief { background-image: none; }

/* smaller (column) articles read calmer with smaller type - desktop only; on a
   phone everything is unified by the mobile block */
@media (min-width: 681px) {
  .columns .story p { font-size: 22px; line-height: 1.55; }
  .columns .story h3 { font-size: max(calc(var(--f-body) + 4px), 21px); }   /* always bigger than the column body text */
}

/* typewriter: looser vertical rhythm, especially between articles */
body.typewriter .story { margin-bottom: 60px; }
body.typewriter .lead { padding: 20px 0 36px; }
body.typewriter .brief li { padding: 13px 14px; margin-block: 16px; }   /* horizontal padding so the shade breathes past the text like the other paragraphs */
body.typewriter .second .story { padding-block: 32px; }
body.typewriter .lead p, body.typewriter .story p, body.typewriter .second p, body.typewriter .brief li { line-height: 1.8; }
body.typewriter .banner { margin: 38px auto 36px; max-width: 72%; text-wrap: pretty; }   /* match the non-typewriter headline width and wrapping */
body.typewriter .columns { padding-top: 46px; }
body.typewriter .label { margin-bottom: 16px; }

/* "Dig deeper with AI" — an expandable briefing under a story */
.dig { margin-top: 34px; margin-bottom: 18px; }   /* more gap above Dig deeper; the extra also lengthens the article box */
/* full-width hit area: the whole row is clickable, while the underline stays
   only under the label */
.dig-btn { display: flex; width: 100%; align-items: center; gap: 7px; cursor: pointer; text-align: left;
  font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .14em;
  color: var(--stamp); background: none; border: 0; padding: 13px 0; font-size: 13px; transition: color .15s ease; }
.dig-btn > span:first-child { border-bottom: 1.5px solid var(--rule-soft); padding-bottom: 5px; transition: border-color .15s ease; }
.dig-btn:hover { color: var(--ink); }
.dig-btn:hover > span:first-child { border-color: var(--ink); }
.dig-btn .dig-arr { transition: transform .2s ease; }
.dig-btn.on .dig-arr { transform: rotate(90deg); }
.dig-box { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--stamp); background: rgba(0,0,0,.025);
  animation: digIn .28s ease; }
body.dark .dig-box { background: rgba(255,255,255,.04); }
.dig-box[hidden] { display: none; }
@keyframes digIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.dig-body p { margin: 0 0 10px; padding: 0; font: 400 17px/1.58 var(--body); max-width: none; text-align: justify; }
.dig-body p:last-child { margin-bottom: 0; }
.dig-src { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dig-src-k { font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--stamp); }
.dig-src a { font: 600 14px/1 var(--body); color: var(--ink); border-bottom: 1px solid var(--rule-soft); text-decoration: none; }
.dig-src a:hover { border-color: var(--ink); }
.dig-note { margin-top: 10px; font: italic 12.5px/1.4 var(--body); color: var(--ink-soft); }
.dig-load, .dig-wait { font: italic 15px/1.5 var(--body); color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.dig-dots { display: inline-flex; gap: 4px; }
.dig-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--stamp); display: block; animation: digDot 1s infinite ease-in-out; }
.dig-dots i:nth-child(2) { animation-delay: .15s; }
.dig-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes digDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
