/*
Theme Name: Meridian
Theme URI: https://example.com/meridian
Author: You
Description: A fast, image-led news portal theme built for high-volume aggregated feeds. Grid-based front page, strong headline hierarchy, category colour coding, graceful fallbacks when a feed supplies no image, and full Bengali typography support. Pairs with the Wire News Aggregator plugin.
Version: 1.4.3
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meridian
Tags: news, magazine, grid-layout, custom-colors, dark-mode, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --paper:   #ffffff;
  --wash:    #f6f4f0;
  --wash-2:  #efece6;
  --ink:     #17170f;
  --ink-2:   #3f3d35;
  --muted:   #736d62;
  --line:    #e4e0d8;
  --line-2:  #d5d0c5;

  --accent:     #0e6e5c;
  --accent-ink: #0a5245;
  --accent-wash:#dcede8;
  --hot:        #c4341f;

  /* The masthead, footer and attribution bars are dark in both modes. They
     used --ink, which is the text colour and therefore flips to near-white in
     dark mode — turning the footer pale with unreadable grey links. */
  --chrome:      #17170f;
  --chrome-text: #b6b1a5;
  --chrome-head: #ffffff;

  --display: "Schibsted Grotesk", "Noto Sans Bengali", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body:    "Schibsted Grotesk", "Noto Sans Bengali", -apple-system, BlinkMacSystemFont, sans-serif;
  --prose:   "Source Serif 4", "Noto Serif Bengali", Georgia, serif;

  --shell: 1240px;
  --gap:   clamp(14px, 2vw, 24px);
  --pad:   clamp(16px, 4vw, 28px);
}

[data-theme="dark"] {
  --paper:   #101211;
  --wash:    #171a19;
  --wash-2:  #1e2220;
  --ink:     #edebe5;
  --ink-2:   #cbc7bd;
  --muted:   #948d80;
  --line:    #262a28;
  --line-2:  #333835;

  --accent:     #4bb99f;
  --accent-ink: #8fd8c6;
  --accent-wash:#16302a;
  --hot:        #e26a55;

  --chrome:      #0a0c0b;
  --chrome-text: #9a958a;
  --chrome-head: #ffffff;
}

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

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

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  background: #ffffff;
  background: var(--paper, #ffffff);
  color: #17170f;
  color: var(--ink, #17170f);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; }

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

.shell {
  width: 100%;
  max-width: 1240px;
  max-width: var(--shell, 1240px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-left: var(--pad, 20px);
  padding-right: 20px;
  padding-right: var(--pad, 20px);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--chrome); color: var(--chrome-head);
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ==========================================================================
   Header
   ========================================================================== */

.topbar {
  width: 100%;
  background: #17170f;
  background: var(--chrome, #17170f);
  color: #ffffff;
  color: var(--chrome-head, #ffffff);
  font-size: 12px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 32px;
  flex-wrap: wrap;
}

.topbar__meta { color: #b6b1a5; letter-spacing: 0.02em; }

.topbar__tools { display: flex; align-items: center; gap: 8px; }

.iconbtn {
  background: none;
  border: 1px solid rgba(255,255,255,0.22);
  color: inherit;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.6;
}
.iconbtn:hover { background: rgba(255,255,255,0.12); }

.masthead {
  width: 100%;
  border-bottom: 1px solid var(--line, #e4e0d8);
  background: #ffffff;
  background: var(--paper, #ffffff);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.035em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.wordmark__dot { color: var(--accent); }

.wordmark img { max-height: 46px; width: auto; }

.tagline { font-size: 12px; color: var(--muted); margin-top: 3px; }

.masthead__search { display: flex; gap: 0; }

.search-field {
  border: 1px solid var(--line-2);
  border-right: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  width: 190px;
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus { outline: none; border-color: var(--accent); }

.search-submit {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  cursor: pointer;
}
.search-submit:hover { background: var(--accent-ink); }

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav.is-stuck { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0,0,0,0.05); }

.nav__inner { display: flex; align-items: center; gap: 12px; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.nav__list::-webkit-scrollbar { display: none; }

.nav__list a {
  display: block;
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  color: var(--ink-2);
}

.nav__list a:hover { color: var(--ink); }

.nav__list .current-menu-item > a,
.nav__list .is-current > a { color: var(--ink); border-bottom-color: var(--accent); }

.nav__toggle { display: none; }

/* ---------------------------------------------------------------- ticker */

.ticker {
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }

.ticker__label {
  flex: 0 0 auto;
  background: var(--hot);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
}

.ticker__track { flex: 1; overflow: hidden; position: relative; height: 22px; }

.ticker__rail {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 42s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker__rail { animation-play-state: paused; }

.ticker__rail a { font-size: 14px; color: var(--ink-2); }
.ticker__rail a:hover { color: var(--accent); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  padding: 2px 9px;
  border-radius: 12px;
  background: var(--wash-2);
  color: var(--ink-2);
}

.card { display: block; }

.card__media {
  position: relative;
  display: block;
  background: var(--wash-2);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
}

.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__media img { transform: scale(1.03); }

/* Feeds don't always carry a photo. Rather than an empty grey box, the tile
   becomes a typographic plate in the section's own colour. */
.plate {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px;
  background: var(--plate-bg, var(--wash-2));
  color: var(--plate-ink, var(--ink-2));
  position: relative;
  overflow: hidden;
}

.plate__source {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 2.2vw, 21px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.plate__kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}

.plate::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  border: 14px solid currentColor;
  border-radius: 50%;
  opacity: 0.09;
}

.card__title {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin: 6px 0;
  text-wrap: pretty;
}

.card:hover .card__title { color: var(--accent); }

.card__excerpt {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.card__source { font-weight: 500; color: var(--ink-2); }

/* sizes */
.card--hero .card__title   { font-size: clamp(24px, 3.4vw, 38px); line-height: 1.1; }
.card--hero .card__excerpt { font-size: 16px; }
.card--hero .card__media   { aspect-ratio: 3 / 2; }

.card--large .card__title  { font-size: clamp(18px, 2.2vw, 22px); }
.card--grid .card__title   { font-size: 17px; }
.card--small .card__title  { font-size: 15px; }

.card--row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.card--row .card__media { margin-bottom: 0; aspect-ratio: 4 / 3; border-radius: 6px; }
.card--row .card__title { font-size: 15px; margin-top: 0; }

.card--text .card__media { display: none; }

/* ==========================================================================
   Front page
   ========================================================================== */

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: var(--gap);
  padding-block: clamp(18px, 3vw, 30px);
  align-items: start;
}

.lead__side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.lead__side .card + .card { border-top: 1px solid var(--line); padding-top: 16px; }

.section {
  padding-block: clamp(20px, 3vw, 34px);
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section__title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.section__title::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 2px;
  background: var(--section-color, var(--accent));
}

.section__more { font-size: 13px; color: var(--accent); font-weight: 500; }
.section__more:hover { text-decoration: underline; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--gap) 20px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
}

/* ---------------------------------------------------------------- rails */

.rail { position: sticky; top: 62px; }

.rail__block { margin-bottom: 28px; }

.rail__title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.mostread { list-style: none; margin: 0; padding: 0; counter-reset: mr; }

.mostread li {
  counter-increment: mr;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.mostread li::before {
  content: counter(mr);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--line-2);
}

.mostread a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
}
.mostread a:hover { color: var(--accent); }

.adslot {
  background: var(--wash);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-block: 20px;
}

.adslot:empty::after { content: "Advertisement"; }

/* ==========================================================================
   Single story
   ========================================================================== */

.single { padding-block: clamp(20px, 3vw, 34px); }

.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--accent); }

.entry__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  text-wrap: balance;
  max-width: 22ch;
}

.entry__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.entry__content { font-family: var(--prose); font-size: 18px; line-height: 1.65; color: var(--ink); }
.entry__content p { margin: 0 0 18px; }
.entry__content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.wire-image { margin: 0 0 20px; }
.wire-image img { width: 100%; border-radius: 8px; }
.wire-image figcaption {
  font-family: var(--body);
  font-size: 12px;
  color: var(--muted);
  padding-top: 7px;
}

.wire-readmore {
  font-family: var(--body);
  font-size: 15px;
  background: var(--wash);
  border-left: 4px solid var(--accent);
  border-radius: 0;
  padding: 16px 18px;
  margin: 24px 0;
}

.wire-readmore a { color: var(--accent-ink); font-weight: 500; }

.sourcebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--chrome);
  color: var(--chrome-head);
  border-radius: 8px;
  padding: 18px 20px;
  margin-block: 26px;
}

.sourcebar__text { font-size: 14px; margin: 0; max-width: 44ch; color: #cfcabd; }
.sourcebar__text strong { color: #fff; }

.sourcebar__btn {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 6px;
  white-space: nowrap;
}
.sourcebar__btn:hover { background: var(--accent-ink); }

/* ==========================================================================
   Archive, search, 404
   ========================================================================== */

.page-head { padding-block: clamp(20px, 3vw, 32px) 6px; }

.page-head__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.page-head__count { font-size: 13px; color: var(--muted); }

.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-block: 28px 44px;
  font-size: 14px;
}

.pagination .page-numbers {
  display: block;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
}

.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }

.notfound { padding-block: clamp(40px, 8vw, 90px); max-width: 56ch; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--chrome);
  color: var(--chrome-text);
  margin-top: 30px;
  padding-block: 34px 28px;
  font-size: 14px;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer h2, .footer .widget-title, .sectionmap__head a, .footernav__row--main a {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 12px;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 4px 0; }
.footer a:hover { color: #fff; }

.footer__note { padding-top: 20px; font-size: 13px; line-height: 1.6; max-width: 74ch; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
}

@media (max-width: 780px) {
  .lead { grid-template-columns: minmax(0, 1fr); }
  .masthead__search { display: none; }

  .nav__toggle {
    display: block;
    background: none;
    border: 1px solid var(--line-2);
    border-radius: 5px;
    padding: 7px 11px;
    font-size: 13px;
    cursor: pointer;
    color: var(--ink);
  }

  .nav__list {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav__list.is-open { max-height: 70vh; overflow-y: auto; }
  .nav__list a { padding: 13px var(--pad); border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
  .nav__inner { position: relative; justify-content: space-between; padding-block: 8px; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
  .card--grid .card__title { font-size: 15px; }
  .card--grid .card__excerpt { display: none; }
  .sourcebar__btn { width: 100%; text-align: center; }
}

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

@media print {
  .nav, .ticker, .topbar, .footer, .adslot, .rail { display: none; }
}

/* WordPress emits this as a list whatever wrapper is asked for, so the list
   behaviour is removed explicitly rather than assumed away. */
.footer__links,
.footer__links ul {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links li {
  display: inline-block;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__links li::marker { content: ""; }

.footer__links li::after {
  content: "·";
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.32);
}

.footer__links li:last-child::after { content: ""; }

.footer__links a { color: var(--chrome-head); }
.footer__links a:hover { color: var(--accent); }

/* ==========================================================================
   1.1 — dropdown sections, language switcher, video, footer section map
   ========================================================================== */

/* ---------------------------------------------------------------- submenus */

.nav__list li { position: relative; }

.nav__list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 6px 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}

.nav__list li:hover > .sub-menu,
.nav__list li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__list .sub-menu a {
  padding: 9px 16px;
  border-bottom: 0;
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
}

.nav__list .sub-menu a:hover { background: var(--wash); color: var(--accent); }

.nav__list .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: 6px;
  vertical-align: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
}

/* --------------------------------------------------------- language switch */

.langswitch { display: inline-block; margin: 0; }

.langswitch__select,
.langswitch select {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.langswitch__select option { color: #17170f; background: #ffffff; }

/* ------------------------------------------------------------------- video */

.wire-video {
  position: relative;
  margin: 0 0 22px;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.wire-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.entry__content iframe,
.entry__content embed,
.entry__content object { max-width: 100%; }

.entry__content figure { margin: 0 0 22px; }
.entry__content img { border-radius: 8px; height: auto; }

.wire-licence {
  font-family: var(--body);
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 24px;
}

.wire-licence a { color: var(--accent); }

/* A card whose story carries video gets a play badge. */
.card__media .card__play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  padding-left: 2px;
}

/* ------------------------------------------------------------- sub nav bar */

.subnav {
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}

.subnav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 38px;
}

.subnav__parent {
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding-right: 16px;
  border-right: 1px solid var(--line-2);
}

.subnav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav__list::-webkit-scrollbar { display: none; }

.subnav__list a {
  display: block;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}

.subnav__list a:hover { color: var(--accent); }

.subnav__list a.is-current {
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* --------------------------------------------------------- footer nav rows */

.footernav {
  padding-bottom: 22px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footernav__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footernav__row--main {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}

.footernav__row--main a {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  padding: 4px 0;
  display: block;
}

.footernav__row--main a:hover { color: var(--accent); }

.footernav__row--sub {
  gap: 0 18px;
}

.footernav__row--sub a {
  font-size: 13px;
  color: #9c968a;
  padding: 3px 0;
  display: block;
}

.footernav__row--sub a:hover { color: #ffffff; }

@media (max-width: 780px) {
  .nav__list .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    border-radius: 0;
    background: var(--wash);
    padding: 0;
  }

  .nav__list .sub-menu a { padding-left: calc(var(--pad) + 16px); border-bottom: 1px solid var(--line); }
  .subnav__parent { font-size: 11px; padding-right: 12px; }
  .footernav__row--main { gap: 0 16px; }
  .footernav__row--sub { gap: 0 14px; }
}

/* ==========================================================================
   Width guard — the page is sized by .shell and nothing else
   ========================================================================== */

html, body {
  max-width: none;
  width: auto;
  float: none;
}

.topbar, .masthead, .nav, .subnav, .ticker, .footer, #main {
  max-width: none;
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

/* ==========================================================================
   Front-page blocks
   ========================================================================== */

.section__title a { text-decoration: none; }
.section__title a:hover { color: var(--accent); }

/* ------------------------------------------------------- section block */

.block__grid {
  display: grid;
  grid-template-columns: 1fr 1.65fr 1fr;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: start;
}

.block__col { min-width: 0; }

.block__col--text .card__title { font-size: clamp(19px, 2.1vw, 23px); }

.block__col--list { display: grid; gap: 14px; align-content: start; }

.block__col--list .card + .card {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.card--feature .card__title {
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.16;
}

.card--feature .card__media { aspect-ratio: 3 / 2; }

.card--text .card__media { display: none; }
.card--text .card__title { margin-top: 0; }

.block__rest {
  margin-top: clamp(20px, 2.5vw, 30px);
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------- numbered strips */

.numbered__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: num;
}

.numbered__item {
  counter-increment: num;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.numbered__item::before {
  content: counter(num);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--line-2);
}

.numbered__item a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.28;
}

.numbered__item a:hover { color: var(--accent); }

.numbered__play { color: var(--accent); font-size: 11px; margin-right: 4px; }

@media (max-width: 1000px) {
  .block__grid { grid-template-columns: 1fr 1fr; }
  .block__col--list { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .block__col--list .card + .card { border-top: 0; padding-top: 0; }
  .numbered__list { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .block__grid { grid-template-columns: 1fr; }
  .block__col--list { grid-template-columns: 1fr; }
  .numbered__list { grid-template-columns: 1fr; }
  .card--feature .card__title { font-size: 19px; }
}

/* --------------------------------------------------- original reporting */

.entry__author {
  color: var(--ink);
  font-weight: 500;
}

.entry__author::after {
  content: "·";
  margin-left: 10px;
  color: var(--muted);
  font-weight: 400;
}

.wire-sources {
  margin: 30px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--body);
}

.wire-sources h2 {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.wire-sources ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.wire-sources a {
  font-size: 14px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ------------------------------------------------------- coverage box */

.wire-coverage {
  margin: 28px 0 10px;
  padding: 18px 20px;
  background: var(--wash);
  border-radius: 8px;
  font-family: var(--body);
}

.wire-coverage h2 {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.wire-coverage ul { list-style: none; margin: 0; padding: 0; }

.wire-coverage li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.35;
}

.wire-coverage li:last-child { border-bottom: 0; }

.wire-coverage strong {
  color: var(--accent);
  margin-right: 6px;
}

.wire-coverage a:hover { color: var(--accent); }

/* ==========================================================================
   Phones — a news site is read on a phone first
   ========================================================================== */

@media (max-width: 700px) {

  /* --- chrome: give the page back its vertical space --- */

  .topbar__inner { min-height: 30px; }
  .topbar__meta { font-size: 11px; }

  .masthead__inner { padding-block: 10px; }

  .wordmark { font-size: 26px; }
  .wordmark img { max-height: 30px; width: auto; }

  /* The tagline is masthead furniture. On a phone it costs a line of screen
     and tells the reader nothing they cannot see for themselves. */
  .tagline { display: none; }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 14px;
    border-radius: 6px;
    border-color: var(--line);
    background: var(--wash);
  }

  .nav__toggle::before {
    content: "";
    width: 15px;
    height: 11px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    box-shadow: inset 0 0 0 2px transparent, 0 4.5px 0 -0.5px currentColor;
  }

  .nav__inner { padding-block: 7px; }

  /* Section bar reads as a scrollable strip, not a wrapped block */
  .subnav__parent { display: none; }
  .subnav__inner { min-height: 34px; }
  .subnav__list a { padding: 8px 12px; font-size: 13px; }

  .ticker__inner { min-height: 34px; gap: 10px; }
  .ticker__label { font-size: 10px; padding: 3px 7px; }
  .ticker__rail a { font-size: 13px; }

  /* --- the feed --- */

  /* The lead photograph runs edge to edge. Margins around a hero image on a
     360px screen waste the one thing a phone has least of. */
  .card--hero .card__media {
    margin-left: calc(var(--pad, 20px) * -1);
    margin-right: calc(var(--pad, 20px) * -1);
    width: calc(100% + var(--pad, 20px) * 2);
    border-radius: 0;
    aspect-ratio: 3 / 2;
  }

  .card--hero .card__title { font-size: 26px; line-height: 1.14; }
  .card--hero .card__excerpt { font-size: 15px; }

  .lead { padding-block: 14px 20px; gap: 20px; }
  .lead__side { gap: 0; }

  /* Below the lead, stories are rows: thumbnail left, headline right. Twice as
     many stories per screen as stacked cards, and it is how every major news
     app presents a feed. */
  .lead__side .card,
  .grid .card,
  .block__col--list .card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 14px;
    align-items: start;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    margin: 0;
  }

  .lead__side .card + .card,
  .block__col--list .card + .card { padding-top: 14px; }

  .grid { display: block; }

  .lead__side .card .card__media,
  .grid .card .card__media,
  .block__col--list .card .card__media {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin: 0;
    width: 108px;
    height: 78px;
    aspect-ratio: auto;
    border-radius: 6px;
  }

  .lead__side .card__title,
  .grid .card__title,
  .block__col--list .card__title {
    grid-column: 1;
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 5px;
  }

  .grid .card__excerpt,
  .lead__side .card__excerpt { display: none; }

  .grid .pill,
  .lead__side .pill,
  .block__col--list .pill { grid-column: 1; justify-self: start; margin-bottom: 5px; }

  .card__meta { grid-column: 1; font-size: 11px; }

  /* The section anchor keeps its picture — it is the section's headline act */
  .block__col--feature .card__media { aspect-ratio: 16 / 9; }
  .block__col--feature .card__title { font-size: 20px; }
  .block__col--text .card__title { font-size: 19px; }

  .section { padding-block: 18px; }
  .section__title { font-size: 17px; }
  .section__head { margin-bottom: 6px; }

  /* --- reading --- */

  .entry__title { font-size: 27px; max-width: none; }
  .entry__content { font-size: 17px; }
  .single { padding-block: 16px; }

  .footernav__row--main { gap: 0 14px; }
  .footernav__row--main a { font-size: 14px; }
  .footernav__row--sub a { font-size: 12px; }
  .footer { padding-block: 24px 22px; }

  /* Tap targets: 44px is the size of a fingertip, not a design preference */
  .nav__list a,
  .subnav__list a,
  .footernav__row a { min-height: 40px; display: flex; align-items: center; }
}

@media (max-width: 420px) {
  .lead__side .card,
  .grid .card,
  .block__col--list .card { grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; }

  .lead__side .card .card__media,
  .grid .card .card__media,
  .block__col--list .card .card__media { width: 92px; height: 68px; }

  .card--hero .card__title { font-size: 23px; }
}
