/* ==================================================================
   wire.sakhanda.co

   Mobile-first: every base rule targets a phone, and the min-width
   queries only add. Written that way round on purpose — the desktop-first
   version of this file kept shipping desktop layout costs to the majority
   of readers, who are on a phone.

   The other rule the file follows: reading comes first. Line length,
   leading and contrast in .prose are the numbers to protect; everything
   else can move.

   The look belongs to the sakhanda.co ecosystem: pale ice surfaces, ink
   text, IBM Plex Sans, and the sky-to-indigo blue of the phoenix mark.
================================================================== */

/* IBM Plex Sans, self-hosted: the site makes no third-party requests.
   Variable files, one per script — weight 100–700 in a single fetch. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/assets/fonts/plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/assets/fonts/plex-sans-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
  src: url('/assets/fonts/plex-sans-latin-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- surfaces and structure ---------------------------------- */
  --bg:         #eef4f9;                  /* pale ice, as on sakhanda.co */
  --bg-deep:    #e4edf6;
  --surface:    rgba(255, 255, 255, 0.88);  /* raised panels */
  --surface-2:  rgba(255, 255, 255, 0.62);  /* controls at rest */
  --surface-3:  rgba(16, 42, 80, 0.045);    /* recessed bands, code */
  --line:       rgba(16, 33, 60, 0.13);
  --line-strong:rgba(16, 33, 60, 0.26);

  /* ---- text, in four tiers -------------------------------------- */
  --text:       #101521;   /* ink — headings and anything primary */
  --text-2:     #1d2534;   /* long-form body, a shade softer */
  --muted:      #46566d;   /* summaries, secondary lines */
  --muted-2:    #6e7e93;   /* labels, dates, counters */

  /* ---- accent: the phoenix blues, sky into indigo ---------------- */
  --accent:        #3e8ff0;
  --accent-2:      #5566ee;
  --accent-text:   #1f66cd;   /* source names and small accent text */
  --accent-link:   #1a5cc0;   /* links inside an article */
  --accent-bright: #0f4dab;   /* hover — darker, this is a light theme */
  --on-accent:     #ffffff;   /* text on a solid accent fill */

  --accent-line:   rgba(62, 143, 240, 0.50);
  --accent-line-2: rgba(62, 143, 240, 0.90);
  --accent-fill:   rgba(62, 143, 240, 0.10);
  --accent-fill-2: rgba(62, 143, 240, 0.18);
  --accent-2-bright: #3d47c9;

  /* Chrome that is a translucent form of a colour above, not a new one:
     the sticky bar, the two glows behind the page, and the label that has
     to stay legible over an arbitrary thumbnail hue. */
  --bg-blur:  rgba(238, 244, 249, 0.86);
  --glow-1:   rgba(86, 170, 245, 0.20);
  --glow-2:   rgba(85, 102, 238, 0.12);
  --on-media: rgba(16, 21, 33, 0.66);

  /* ---- state ----------------------------------------------------- */
  --up:        #0e8a3e;
  --down:      #d02f4c;
  --warn:      #7a5200;
  --warn-line: rgba(176, 122, 10, 0.35);
  --warn-fill: rgba(251, 191, 36, 0.14);

  /* ---- the column ------------------------------------------------ */
  /* One width for every page, so the header, the ticker and the text do
     not appear to shift when you open a story. 48rem less the gutters
     leaves 720px of text: measured on a real article, a median of 71
     characters per line at --fs-body. */
  --page:      48rem;
  --page-wide: 72rem;   /* the ticker only — see .ticker */
  --gutter:    16px;

  /* ---- type: four sizes, by role, identical on every screen ------ */
  --fs-lead:    21px;   /* headlines in the list */
  --fs-body:    19px;   /* prose, the lede, reading text */
  --fs-ui:      16px;   /* summaries, buttons, controls, notes */
  --fs-meta:    13px;   /* source, date, counters, fine print */
  --fs-section: 22px;   /* page and panel titles */

  /* ---- radii ----------------------------------------------------- */
  --r-sm:   12px;   /* thumbnails, inline images, code */
  --r-md:   16px;   /* media blocks, notices */
  --r-lg:   22px;   /* panels */
  --r-pill: 999px;

  /* ---- control heights ------------------------------------------- */
  --control-sm: 36px;   /* chips */
  --control:    44px;   /* inputs, pager — the minimum tap target */
  --control-lg: 48px;   /* the primary action on a page */

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 12% -5%, var(--glow-1), transparent 60%),
    radial-gradient(900px 500px at 92% 2%, var(--glow-2), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg-deep) 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------
   HEADER
------------------------------------------------------------------ */
/* The band stretches edge to edge so its background and border do; the
   content inside it stops at the same column as the text below. */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-blur);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.bar-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-head .bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
}
.brand-mark svg { width: 20px; height: 20px; }

.brand-name {
  font-size: var(--fs-ui);
  white-space: nowrap;
  /* The ecosystem wordmark: SAKHANDA CO sets its name in bold caps, and
     the news masthead follows suit. */
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.search { margin-left: auto; flex: 1 1 auto; max-width: 220px; }

/* The EN/BG/RU/UA row, styled after the ecosystem site's switcher: the
   active language is a filled pill, the rest are quiet text. */
.langs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.lang {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
}
a.lang:hover { color: var(--accent-text); }
.lang.is-on {
  background: var(--text);
  color: #fff;
}

.search input {
  width: 100%;
  min-height: var(--control);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-ui);   /* at or above 16px, or iOS Safari zooms on focus */
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { border-color: var(--line-strong); outline-offset: 1px; }

/* ------------------------------------------------------------------
   TICKER — horizontal scroll on a phone rather than a wrapped block
   that pushes the first headline below the fold.
------------------------------------------------------------------ */
.ticker-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
}

/* All the tickers are always in the markup. On a phone they do not fit on
   one line and stacking them would push the first headline off the
   screen, so the row scrolls sideways — with a fade at the edge, because
   a cut-off pill on its own reads as a layout bug rather than as an
   invitation to swipe.

   This band gets a wider box than the reading column: six prices at full
   precision need about 990px, and inside the 720px text column they wrap
   to two rows. A ticker is chrome rather than prose, so it is allowed to
   be wider — it just has to stay centred on the same axis. */
.ticker {
  max-width: var(--page-wide);
  display: flex;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 88%, transparent);
}
.ticker::-webkit-scrollbar { display: none; }

.coin {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coin b { color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.coin i { font-style: normal; font-weight: 700; }
.coin .up { color: var(--up); }
.coin .down { color: var(--down); }
.coin .flat { color: var(--muted-2); }

/* ------------------------------------------------------------------
   LAYOUT
------------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px var(--gutter) 56px;
}

.lede { margin: 0 0 24px; }
.lede h1,
.story-title {
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.033em;
  font-weight: 700;
}

.lede h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

/* The kicker: the page's genre, set the way a newspaper sets a section
   label — small caps, tracked out, in the accent blue, with a short rule
   that ties it to the column edge. */
.lede-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.lede-kicker::before {
  content: '';
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* The wing restated at the head of the page — deliberately not the
   logo tile: reversed out, white on ink, so the page opens with its own
   mark rather than a second copy of the header's. */
.lede-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
}
.lede-mark svg { width: 26px; height: 26px; }

/* A standing description of the site, not article prose — the same
   role as a card summary, and at reading size it cost a third line
   above the first headline on a phone. */
.lede p { margin: 0; color: var(--muted); font-size: var(--fs-ui); line-height: 1.55; }

.page-title {
  margin: 4px 0 4px;
  font-size: var(--fs-section);
  letter-spacing: -0.03em;
}
.page-sub { margin: 0 0 18px; color: var(--muted-2); font-size: var(--fs-meta); }

/* ------------------------------------------------------------------
   SOURCE CHIPS
------------------------------------------------------------------ */
/* The row scrolls sideways and bleeds into the page gutter, so a chip
   that runs off the edge is visibly cut rather than stopping short of the
   margin and looking like the list simply ends there. */
.chips {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 20px;
  padding: 2px var(--gutter) 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--control-sm);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-ui);
  font-weight: 700;
  white-space: nowrap;
}
.chip.is-on {
  border-color: var(--accent-line);
  background: var(--accent-fill);
  color: var(--accent-bright);
}

/* ------------------------------------------------------------------
   FEED

   A compact row per story: thumbnail, headline, one line of context.
   Scanning a list beats scanning a grid of equal-weight cards on a
   phone, because the eye only has one column to track.
------------------------------------------------------------------ */
.feed { display: flex; flex-direction: column; gap: 4px; }

.card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.card-media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: hsl(var(--hue, 210) 52% 88%);
  border: 1px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  text-align: center;
  font-size: 11px;   /* bounded by the 92px thumbnail, not by the scale */
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  overflow-wrap: anywhere;   /* MARKTECHPOST is wider than the tile */
  /* The branded stand-in: phoenix blues and the wing mark instead of a
     bare colour block. The source name reads in white on the calm upper
     half of the artwork; the faint shadow keeps it legible where a crop
     lands on a feather. */
  background: url('/assets/brand-tile.svg') center / cover no-repeat;
  color: #fff;
  text-shadow: 0 1px 6px rgba(16, 33, 96, 0.35);
}

.card-body { min-width: 0; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.card-meta .src { color: var(--accent-text); }

.card-title {
  margin: 0 0 6px;
  font-size: var(--fs-lead);
  line-height: 1.26;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.card-title a {
  color: var(--text);
  text-decoration: none;
}
.card-title a:hover { color: var(--accent-bright); }

/* The whole row is the target: on a phone a 17px headline is a small
   thing to hit accurately. */
.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.card { position: relative; }
.card-media { z-index: 1; }

.card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-ui);
  line-height: 1.55;
}

/* The newest story gets the full-width treatment — it is the one thing on
   the page a returning reader is looking for. */
.card.featured {
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 22px;
}
.card.featured .card-media { aspect-ratio: 16 / 9; border-radius: var(--r-md); }
.card.featured .card-title { font-size: 23px; line-height: 1.2; }
.card.featured .card-summary { -webkit-line-clamp: 3; }

/* ------------------------------------------------------------------
   PAGINATION
------------------------------------------------------------------ */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
}

.pager-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-ui);
  font-weight: 700;
}
.pager-link:hover { border-color: var(--line-strong); }
.pager-link.is-off { opacity: 0.32; }
.pager-now { color: var(--muted-2); font-size: var(--fs-meta); text-align: center; }

/* ------------------------------------------------------------------
   STORY
------------------------------------------------------------------ */
/* No width of its own any more: a story occupies the same column as the
   headline list, so nothing appears to jump when you open one. */
.story { margin: 0 auto; }

.story-back {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  margin-bottom: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-ui);
  font-weight: 700;
}
.story-back:hover { color: var(--accent); }

.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.story-title { margin: 0 0 14px; }

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: var(--fs-meta);
}
.story-meta .src {
  color: var(--accent-text);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-hero {
  margin: 0 0 26px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
}
.story-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ------------------------------------------------------------------
   PROSE — the part that matters
------------------------------------------------------------------ */
.prose {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-2);
  overflow-wrap: break-word;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1.25em; }

.prose h2, .prose h3, .prose h4 {
  margin: 1.9em 0 0.6em;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.prose h2 { font-size: 1.26em; }
.prose h3 { font-size: 1.12em; }
.prose h4 { font-size: 1em; }

.prose a {
  color: var(--accent-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--accent-bright); }

.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.35em; }
.prose li { margin-bottom: 0.5em; }

.prose blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent-line);
  color: var(--muted);
  font-style: italic;
}

.prose img {
  display: block;
  margin: 1.6em auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.prose figure { margin: 1.6em 0; }
.prose figcaption {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: var(--fs-meta);
  text-align: center;
}

.prose pre {
  margin: 1.4em 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  overflow-x: auto;
}
.prose code, .prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

/* A wide table must scroll inside its own box; the page body never does. */
.prose table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: var(--fs-ui);
}
.prose th, .prose td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }

.note {
  margin: 26px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
  background: var(--warn-fill);
  color: var(--warn);
  font-size: var(--fs-ui);
  line-height: 1.6;
}

/* ------------------------------------------------------------------
   ATTRIBUTION — on every story, below the text, next to the date
------------------------------------------------------------------ */
.attribution {
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.attribution-line {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: var(--fs-ui);
  line-height: 1.55;
}
.attribution-line strong { color: var(--text); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--control-lg);
  padding: 0 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  background: var(--accent-fill);
  color: var(--accent-bright);
  text-decoration: none;
  font-size: var(--fs-ui);
  font-weight: 700;
  text-align: center;
}
.button:hover {
  border-color: var(--accent-line-2);
  background: var(--accent-fill-2);
}
.button.ghost {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.fine {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: var(--fs-meta);
  line-height: 1.55;
}

/* ------------------------------------------------------------------
   PREV / NEXT

   One column on a phone (two headlines stacked), two side by side once
   there is room. The "older" card right-aligns so the pair reads as a
   left/right axis, matching the ← / → the labels carry.
------------------------------------------------------------------ */
.story-nav {
  display: grid;
  gap: 12px;
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.story-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
}
.story-nav-link:hover { border-color: var(--line-strong); }
.story-nav-link.is-off { display: none; }

.story-nav-dir {
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.story-nav-title {
  /* Two lines maximum: the longest headline in the feed runs to ~117
     characters, which would tower over a one-line neighbour and leave the
     pair lopsided. Two lines keeps the two cards close in height. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-ui);
  line-height: 1.35;
  font-weight: 600;
}
.story-nav-link.older { text-align: right; }

/* ------------------------------------------------------------------
   MORE STORIES
------------------------------------------------------------------ */
.more {
  margin: 44px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.more h2 {
  margin: 0 0 4px;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.more-list { display: flex; flex-direction: column; }

.more-item {
  display: grid;
  gap: 3px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.more-src {
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.more-title { font-size: var(--fs-lead); line-height: 1.35; font-weight: 600; }
.more-item time { font-size: var(--fs-meta); color: var(--muted-2); }
.more-item:hover .more-title { color: var(--accent-bright); }

.more .button { margin-top: 22px; }

/* ------------------------------------------------------------------
   EMPTY / 404
------------------------------------------------------------------ */
.empty {
  margin: 40px auto;
  padding: 32px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}
.empty h1, .empty h2 { margin: 0 0 10px; font-size: var(--fs-section); letter-spacing: -0.02em; }
.empty p { margin: 0 0 16px; color: var(--muted); }
.empty .button { max-width: 320px; margin: 0 auto; }

/* ------------------------------------------------------------------
   FOOTER
------------------------------------------------------------------ */
.site-foot {
  max-width: var(--page);
  margin: 0 auto;
  padding: 26px var(--gutter) calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: var(--fs-ui);
}
.site-foot p { margin: 0 0 8px; }
.site-foot strong { color: var(--muted); }
.site-foot a { color: var(--muted); }

/* ==================================================================
   ENHANCEMENTS FOR WIDER SCREENS
================================================================== */
@media (min-width: 600px) {
  :root { --gutter: 24px; }

  .site-head .bar-inner { padding-top: 12px; padding-bottom: 12px; }
  .search { max-width: 280px; }

  /* Enough room to stop swiping: centre the row and drop the fade that
     was hinting at content off to the right. No wrapping — a second row
     of prices costs more vertical space than it is worth.

     `safe center` matters: plain center on an overflowing flex row pushes
     both ends outside the box and the left one cannot be scrolled to —
     the first ticker was clipped to a bare "%" on mid-width screens. With
     `safe`, centring applies only when the row fits and falls back to
     flex-start (scrollable from the first pill) when it does not. */
  .ticker {
    justify-content: safe center;
    overflow-x: auto;
    mask-image: none;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .wrap { padding: 28px var(--gutter) 72px; }

  .lede h1,
  .story-title { font-size: 34px; }

  .card { grid-template-columns: 148px 1fr; gap: 20px; padding: 20px 0; }
  .card-media { aspect-ratio: 4 / 3; }
  .card.featured .card-title { font-size: 30px; }


  .attribution { padding: 24px; }
  .button { width: auto; min-width: 260px; }

  /* Two columns once there is room. A missing neighbour (the newest or the
     oldest story) becomes an invisible placeholder rather than vanishing,
     so the surviving card keeps its left/right side instead of sliding to
     the middle. */
  .story-nav { grid-template-columns: 1fr 1fr; }
  .story-nav-link.is-off { display: flex; visibility: hidden; }

  .site-foot { padding: 32px var(--gutter) 40px; }
}

@media (min-width: 900px) {
  .lede h1,
  .story-title { font-size: 40px; }
}
