/* ===========================================================================
   EPOCH — the publication.

   One ink, one sheet. There is no palette in this file: every tone is the ink
   at some coverage, and every "shade" a reader perceives is either a mix
   (`--quiet`, `--faint`) or an actual field of dots.

   The halftone is the system. `.screen` paints a dot grid whose coverage sets
   its darkness, and masking that grid with a linear-gradient gives a true
   printed ramp — dots thinning out — rather than a CSS gradient pretending to
   be one. It is the only visual device here, and it does all the work that
   colour would do somewhere else.

   Tokens are generated from core/brand.py. Do not add a colour to this file.
   =========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/news-static/fonts/fraunces.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/news-static/fonts/inter.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #14130F;
  --paper: #F2F0E9;
  --font-display: 'Fraunces', 'Noto Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  --cell: 5px;
  --screen-light: 16%;
  --screen-mid: 24%;
  --screen-heavy: 34%;
  --flat: color-mix(in srgb, var(--ink) 100%, var(--paper));
  --read: color-mix(in srgb, var(--ink) 88%, var(--paper));
  --quiet: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --faint: color-mix(in srgb, var(--ink) 42%, var(--paper));
  --ghost: color-mix(in srgb, var(--ink) 22%, var(--paper));
  --trace: color-mix(in srgb, var(--ink) 11%, var(--paper));
}
:root {
  --wrap: 1180px;
  --rule: 1px solid var(--trace);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--read);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}

/* No screen behind the text. The sheet's tooth looked right on a poster and
   made paragraphs harder to read on a news page, which is the wrong trade.
   The halftone now appears only where nobody is reading a sentence: plates,
   the masthead edge, the foot. */

a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 30px 24px 72px; }

/* --- the screen ----------------------------------------------------------
   Three coverages and a ramp. Everything tonal on this site is one of these. */

.screen {
  background-image: radial-gradient(circle at center, var(--ink) var(--screen-mid), transparent calc(var(--screen-mid) + 1%));
  background-size: var(--cell) var(--cell);
}
.screen-light { --screen-mid: var(--screen-light); }
.screen-heavy { --screen-mid: var(--screen-heavy); }

/* A printed gradient: the dots thin out, they do not fade to grey. */
.screen-ramp {
  -webkit-mask-image: linear-gradient(var(--ramp-dir, to right), transparent, #000 70%);
  mask-image: linear-gradient(var(--ramp-dir, to right), transparent, #000 70%);
}

/* --- masthead ------------------------------------------------------------ */

.masthead {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
/* The banner's right edge: the sheet darkening into a dot field. */
.masthead::after {
  content: "";
  position: absolute;
  inset: 0 0 0 46%;
  pointer-events: none;
  background-image: radial-gradient(circle at center, var(--ink) var(--screen-heavy), transparent calc(var(--screen-heavy) + 1%));
  background-size: var(--cell) var(--cell);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 115%);
  mask-image: linear-gradient(to right, transparent, #000 115%);
  opacity: .42;
}
.masthead-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 36px 24px 20px;
  display: flex;
  align-items: baseline;
  gap: 26px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* The wordmark is the one place the typeface itself is the content. */
.wordmark {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-weight: 600;
  font-size: clamp(40px, 7vw, 76px);
  line-height: .9;
  letter-spacing: .12em;
  text-indent: .12em;   /* tracking adds a trailing gap; balance the left */
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.wordmark:hover { opacity: .72; }

.tagline {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--faint);
}

.beats {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  gap: 26px;
  overflow-x: auto;
  position: relative;
  z-index: 1;
}
.nav-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--faint);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-on { color: var(--ink); border-bottom-color: var(--ink); }

/* --- the grid ------------------------------------------------------------ */

.top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.top-solo { grid-template-columns: minmax(0, 1fr); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px; }

.card { min-width: 0; }
.card-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--ghost);
}
.card-lead .card-media { aspect-ratio: 3 / 2; }
.top-solo .card-lead .card-media { aspect-ratio: 21 / 9; }
.card-media .shot { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); }

/* The plate: the reference banner's composition, per card. Light sheet on the
   left, the screen thickening rightward, the sphere large and cropped by the
   edge. A centred globe on a flat field read as a diagram; this reads as a
   printed page. */
.plate {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image: radial-gradient(circle at center, var(--ink) var(--screen-light), transparent calc(var(--screen-light) + 1%));
  background-size: var(--cell) var(--cell);
}
.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, var(--ink) var(--screen-heavy), transparent calc(var(--screen-heavy) + 1%));
  background-size: var(--cell) var(--cell);
  -webkit-mask-image: linear-gradient(to right, transparent 18%, #000 125%);
  mask-image: linear-gradient(to right, transparent 18%, #000 125%);
  opacity: .62;
}
.globe {
  position: absolute;
  top: 50%;
  right: -6%;
  width: 52%;
  transform: translateY(-50%) rotate(var(--turn, 0deg));
  color: var(--ink);
  opacity: .55;
}
.plate-lg .globe { width: 38%; right: 4%; }
.globe svg { width: 100%; height: auto; display: block; }
.card-media:hover .globe { opacity: .74; }

.card-body { padding-top: 14px; }

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--faint);
}
.eyebrow:hover { color: var(--ink); }
.eyebrow-lg { font-size: 12px; }

.card-head {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-weight: 600;
  line-height: 1.2;
  margin: 8px 0 0;
  font-size: 24px;
  color: var(--ink);
  text-wrap: balance;
}
.card-lead .card-head {
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 600;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
}
.card-head a { text-decoration: none; }
.card-head a:hover { text-decoration: underline; text-underline-offset: 4px; }

.card-stand { margin: 12px 0 0; color: var(--quiet); font-size: 17px; max-width: 54ch; }

.card-meta {
  margin: 10px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}
.card-meta span { margin: 0 6px; }

/* --- latest --------------------------------------------------------------- */

.section-head {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  margin: 56px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
}

.row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: var(--rule);
  align-items: start;
}
.row-media {
  display: block; position: relative; aspect-ratio: 16 / 10;
  overflow: hidden; border: 1px solid var(--ghost);
}
.row-media .shot { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.row-head {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 36, "SOFT" 0, "WONK" 0;
  font-size: 22px; font-weight: 600; line-height: 1.22;
  margin: 8px 0 0; color: var(--ink);
}
.row-head a { text-decoration: none; }
.row-head a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --- beat page ------------------------------------------------------------ */

.beat-title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 8px 0 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
}

/* --- article -------------------------------------------------------------- */

.article { max-width: 720px; margin: 0 auto; }

.article .headline {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 120, "SOFT" 0, "WONK" 0;
  font-size: clamp(36px, 5.6vw, 62px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.005em;
  margin: 14px 0 18px;
  color: var(--ink);
  text-wrap: balance;
}
.standfirst {
  font-size: 21px;
  line-height: 1.5;
  color: var(--quiet);
  margin: 0 0 24px;
  max-width: 60ch;
}

.byline {
  display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--ink);
  border-bottom: var(--rule);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint);
}
.byline .by { color: var(--ink); }
/* Provenance sits in the byline, not a footnote: a page written by a pipeline
   earns its reader once, and only by showing its work. */
.byline .prov { margin-left: auto; color: var(--quiet); }

.lead-media {
  margin: 26px 0;
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid var(--ghost);
}
.lead-media .shot { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.lead-media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 14px;
  background: var(--ink); color: var(--paper);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
}

.keys {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 20px 0;
  margin: 32px 0;
}
.keys h2 {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase;
  margin: 0 0 12px; color: var(--faint);
}
.keys ul { margin: 0; padding-left: 20px; }
.keys li { margin-bottom: 8px; color: var(--read); }
.keys li::marker { color: var(--ink); }

.prose p { font-size: 18px; line-height: 1.72; margin: 0 0 22px; color: var(--read); }
/* The opening paragraph is set larger — a printed convention, and it tells the
   reader where the article actually starts. */
.prose p:first-child { font-size: 20px; line-height: 1.6; }

.sources { margin-top: 44px; border-top: 2px solid var(--ink); padding-top: 20px; }
.sources h2 {
  font-family: var(--font-display);
  font-size: 13px; letter-spacing: .32em; text-transform: uppercase;
  margin: 0 0 6px; color: var(--ink);
}
.sources-note { margin: 0 0 16px; font-size: 14px; color: var(--faint); }
.sources ol { margin: 0; padding-left: 22px; }
.sources li { margin-bottom: 12px; font-size: 15px; }
.sources a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.src-tier {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 2px 7px; border: 1px solid var(--ghost);
  margin-right: 10px; color: var(--faint);
}
.src-tier.tier-primary { color: var(--ink); border-color: var(--ink); }
.src-host { font-size: 12px; color: var(--faint); margin-left: 10px; }

.disclosure { margin-top: 32px; font-size: 14px; color: var(--faint); font-style: italic; }

.preview-bar {
  background: var(--ink); color: var(--paper);
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  text-align: center; padding: 10px 16px;
}

.empty { padding: 72px 0; }
.empty h1 { font-family: var(--font-display); font-weight: 600; font-size: 42px; margin: 0 0 12px; color: var(--ink); }
.empty p { color: var(--faint); margin: 0; }

/* --- footer --------------------------------------------------------------- */

.foot {
  border-top: 2px solid var(--ink);
  padding: 44px 24px 60px;
  text-align: center;
  font-size: 14px;
  color: var(--quiet);
  position: relative;
  overflow: hidden;
}
/* The sheet darkens again at the foot, closing the page the way the masthead
   opened it. */
.foot::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at center, var(--ink) var(--screen-mid), transparent calc(var(--screen-mid) + 1%));
  background-size: var(--cell) var(--cell);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 160%);
  mask-image: linear-gradient(to bottom, transparent, #000 160%);
  opacity: .22;
}
.foot > * { position: relative; }
.foot p { margin: 0 auto 10px; max-width: 60ch; }
/* The drawn mark, not the display face setting "E." — the foot is where the
   page signs itself, and a signature is a drawing. It inherits `color`, so the
   one path serves the sheet and the board without a second file. */
.foot-mark {
  color: var(--ink);
  margin: 0 auto 18px;
  line-height: 0;
}
.foot-mark svg { height: 46px; width: auto; display: block; margin: 0 auto; }
.foot-contact {
  list-style: none; margin: 22px auto; padding: 0;
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.foot-contact li { display: flex; flex-direction: column; gap: 4px; }
.foot-contact span {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}
.foot-contact a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.foot-thin { color: var(--faint); font-size: 13px; }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  .top { grid-template-columns: 1fr; gap: 28px; }
  .row { grid-template-columns: 132px minmax(0, 1fr); gap: 16px; }
  .row-head { font-size: 18px; }
  .masthead::after { inset: 0 0 0 40%; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card-head { font-size: 22px; }
  .prose p { font-size: 17px; }
  .byline .prov { margin-left: 0; width: 100%; }
  .foot-contact { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) { * { transition-duration: .001ms !important; } }
