/* ============================================================
   Channel One News — modern redesign
   Brand: broadcast blue #1273b6 · gold #f5a800 · live red #e02434

   Layout uses CSS logical properties throughout so the same rules
   work in LTR (bn/en/hi) and RTL (ur/ar). Fonts are set per locale
   on <html> by js/i18n.js.
   ============================================================ */

:root {
  --brand: #1273b6;
  --brand-deep: #0b5490;
  --brand-ink: #0a3a63;
  --gold: #f5a800;
  --red: #e02434;

  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #101820;
  --ink-2: #45505c;
  --ink-3: #7a8694;
  --line: #e3e8ee;
  --shadow: 0 1px 2px rgba(16, 24, 32, .05), 0 8px 24px rgba(16, 24, 32, .06);
  --shadow-lift: 0 2px 4px rgba(16, 24, 32, .06), 0 16px 40px rgba(16, 24, 32, .12);

  /* Overridden per locale by I18n.set() — see the type-system note in i18n.js */
  --font-ui: "Noto Sans Bengali", system-ui, sans-serif;
  --font-head: "Noto Serif Bengali", Georgia, serif;
  --head-line-height: 1.5;
  --head-weight: 800;
  --head-scale: 1;
  /* Tracking scale. Arabic and Nastaliq are cursive scripts: any positive
     letter-spacing severs the joins between letters and reads as broken
     text, so RTL locales zero these out. */
  --track-xs: .01em; --track-sm: .02em; --track-md: .04em; --track-lg: .05em;

  --radius: 14px;
  --radius-sm: 10px;
  /* 1360: the English header lockup (brand + 9 nav items + 6 action items,
     the widest of the five locales) measures 1320px — only 40px of slack.
     Bangla 1209, Arabic 1113, Hindi 1104, Urdu 1100. Re-measure this whenever
     an item is added to header__nav or header__actions: the account button
     alone cost ~70px, and English is now close enough to the edge that the
     next addition should move something into the drawer or widen this. */
  --container: 1360px;
}

html[data-theme="dark"] {
  --bg: #0d1219;
  --surface: #151c26;
  --surface-2: #1c2532;
  --ink: #eef3f8;
  --ink-2: #b6c1cd;
  --ink-3: #7e8a97;
  --line: #263140;
  --brand: #3ba1e6;
  --brand-deep: #2b86c9;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* Keyboard focus. The stylesheet previously had no focus styles at all, so
   every control was invisible to keyboard users. :where() keeps specificity at
   zero so any component can override without a fight. Contrast: #1273b6 on
   white ~4.9:1, #3ba1e6 on #151c26 ~7:1 — both clear the 3:1 minimum for
   non-text. */
:where(a, button, input, textarea, select, summary,
       [tabindex], [role="tab"], [role="button"]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Directional glyphs mirror in RTL */
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }

/* Cursive scripts must not be tracked out — see the note in :root. */
[dir="rtl"] { --track-xs: 0; --track-sm: 0; --track-md: 0; --track-lg: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--brand-ink);
  color: #cfe3f4;
  font-size: .8rem;
}
html[data-theme="dark"] .topbar { background: #0a1017; border-bottom: 1px solid var(--line); }
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 36px; gap: 12px;
}
/* min-width:0 lets .wx-strip's own overflow-x:auto do the clipping — without
   it a flex item won't shrink below its content width, and the strip would
   push the topbar itself into a page-wide horizontal scroll instead. */
.topbar__left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: 12px; flex: none; }
.topbar__date { flex: none; }
.topbar__date-short { display: none; }
.topbar__sep { width: 1px; height: 14px; background: rgba(255,255,255,.25); flex: none; }

/* ---------- Weather (eight divisional capitals, inline strip) ---------- */
.wx-strip {
  display: flex; align-items: center; gap: 16px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  flex: 1; min-width: 0;
  /* Fades the trailing edge instead of hard-cutting a city name when the
     strip is wider than its container — same technique as .ticker__viewport. */
  mask-image: linear-gradient(to right, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, #000 90%, transparent);
}
.wx-strip::-webkit-scrollbar { display: none; }
.wx-item {
  display: inline-flex; align-items: center; gap: 5px;
  flex: none; white-space: nowrap; opacity: .92;
}
.wx-icon { flex: none; color: var(--gold); }
.wx-item__name { opacity: .85; }
.wx-item__temp { font-weight: 700; font-variant-numeric: tabular-nums; }

.topbar__social { display: flex; align-items: center; gap: 6px; }
/* The glyphs are 14-16px; the anchor is padded out to 24px so the tap area
   meets WCAG 2.5.8 without the icons themselves growing. The gap drops from
   14px to 6px so the visual spacing between glyphs stays where it was. */
.topbar__social a {
  opacity: .8; display: grid; place-items: center;
  min-inline-size: 24px; min-block-size: 24px;
  transition: opacity .15s, transform .15s;
}
.topbar__social a:hover { opacity: 1; transform: translateY(-1px); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 68px;
}
/* flex:none — the brand must never shrink below its text, or the wordmark
   overflows into the nav (English is the widest lockup). */
.header__brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; flex: none; }
.header__logo { width: 180px; height: 60px; object-fit: contain; }
.header__brand { overflow: hidden; border-radius: 4px; }
.topbar__contact { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.header__brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.header__brand-text strong { font-family: var(--font-head); font-size: calc(1.1rem * var(--head-scale)); font-weight: var(--head-weight); letter-spacing: var(--track-xs); white-space: nowrap; }
.header__brand-text .accent { color: var(--brand); }
.header__brand-text small { font-size: .68rem; color: var(--gold); font-weight: 600; letter-spacing: var(--track-md); white-space: nowrap; }

.header__nav { display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
/* Items fitNav() could not fit. They are removed outright rather than left to
   be sliced in half by the nav's overflow, and the hamburger is forced on so
   they stay reachable — see fitNav() in router.js. */
.header__nav a.is-clipped { display: none; }
.header--truncated .header__menu-btn { display: flex; }
.header__nav a {
  font-size: .89rem; font-weight: 600; color: var(--ink-2);
  padding: 8px 9px; border-radius: 8px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.header__nav a:hover { color: var(--brand); background: var(--surface-2); }

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

.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--brand); }

html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }
.icon-sun { display: none; }
.icon-moon { display: block; }

/* ---------- Language switcher ---------- */
.lang { position: relative; }
.lang__btn {
  width: auto; gap: 6px; padding-inline: 9px;
  display: inline-flex; align-items: center;
}
.lang__code { font-size: .78rem; font-weight: 700; line-height: 1; }
.lang__menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  z-index: 60; list-style: none;
  min-width: 210px; padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
}
.lang__item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 10px 12px; border-radius: 9px;
  text-align: start;
  transition: background .15s, color .15s;
}
.lang__item:hover { background: var(--surface-2); }
.lang__item.active { background: var(--brand); color: #fff; }
.lang__native { font-size: .98rem; font-weight: 700; }
.lang__english { font-size: .74rem; color: var(--ink-3); }
.lang__item.active .lang__english { color: rgba(255,255,255,.8); }

.live-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  font-weight: 700; font-size: .88rem;
  padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(224, 36, 52, .35);
  transition: transform .15s, box-shadow .15s;
}
.live-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(224, 36, 52, .45); }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; position: relative; flex: none;
}
.live-btn .live-dot, .live-card .live-dot { background: #fff; }
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid currentColor; opacity: .6;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(.5); opacity: .7; }
  to { transform: scale(1.4); opacity: 0; }
}

/* Hamburger */
.header__menu-btn { display: none; flex-direction: column; gap: 5px; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; }
.header__menu-btn span { width: 20px; height: 2.2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.header__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.2px) rotate(45deg); }
.header__menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.2px) rotate(-45deg); }

/* ---------- Drawer ---------- */
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60;
  width: min(300px, 82vw);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  transform: translateX(-100%);
  transition: transform .25s ease;
  padding: 84px 18px 24px;
  overflow-y: auto;
}
[dir="rtl"] .drawer { transform: translateX(100%); }
.drawer.open, [dir="rtl"] .drawer.open { transform: translateX(0); }
.drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.drawer__nav a {
  padding: 12px 14px; border-radius: 10px;
  font-weight: 600; color: var(--ink-2);
}
.drawer__nav a:hover { background: var(--surface-2); color: var(--brand); }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10, 16, 23, .5);
  opacity: 0; transition: opacity .25s;
}
.drawer-backdrop.open { opacity: 1; }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; justify-content: center;
  padding: 12vh 20px 40px;
}
.search-overlay__box { width: min(640px, 100%); }
.search-overlay__bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 14px;
  box-shadow: var(--shadow-lift);
  color: var(--ink-3);
}
.search-overlay__bar input {
  flex: 1; border: none; outline: none; background: none;
  font-family: inherit; font-size: 1.05rem; color: var(--ink);
  padding: 12px 0;
}
.search-overlay__results { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.search-result {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
  transition: border-color .15s, transform .15s;
}
.search-result:hover { border-color: var(--brand); transform: translateX(3px); }
[dir="rtl"] .search-result:hover { transform: translateX(-3px); }
.search-result img { width: 74px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.search-result h4 { font-size: .92rem; font-weight: 700; line-height: 1.45; }
.search-result time { font-size: .75rem; color: var(--ink-3); }
.search-overlay__hint { color: var(--ink-3); font-size: .88rem; text-align: center; padding: 14px; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.ticker__label {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  color: var(--red); font-weight: 800; font-size: .85rem;
}
.ticker__viewport {
  overflow: hidden; flex: 1;
  mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
}
.ticker__track {
  display: inline-flex; gap: 48px; white-space: nowrap;
  animation: ticker 36s linear infinite;
  will-change: transform;
}
[dir="rtl"] .ticker__track { animation-name: ticker-rtl; }
.ticker__viewport:hover .ticker__track { animation-play-state: paused; }
.ticker__track a { color: var(--ink-2); font-weight: 500; }
.ticker__track a:hover { color: var(--brand); }
.ticker__track a::before {
  content: "●"; color: var(--gold); font-size: .55rem;
  vertical-align: 2px; margin-inline-end: 10px;
}
/* Urgency badges. Red is a dedicated alert red, not --brand blue, which does
   not read as urgent; gold is used as a *fill* because gold-as-text fails
   4.5:1 against the light surface. */
.ticker__badge {
  display: inline-block; margin-inline-end: 8px;
  font-size: .68rem; font-weight: 800; letter-spacing: var(--track-sm);
  padding: 2px 8px; border-radius: 999px; vertical-align: 1px;
}
.ticker__badge--breaking { background: #c0202a; color: #fff; }
.ticker__badge--important { background: var(--gold); color: #3a2a00; }
.ticker__track a:has(.ticker__badge--breaking) { color: var(--ink); font-weight: 700; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes ticker-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Machine-translation banner ---------- */
.mt-banner {
  display: flex; align-items: center; gap: 10px;
  margin-block: 14px 0;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  border-radius: 12px;
  font-size: .84rem; color: var(--ink-2);
  max-width: calc(var(--container) - 40px);
}
.mt-banner svg { color: var(--gold); flex: none; }
.mt-banner.is-busy svg { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mt-banner__btn {
  margin-inline-start: auto; flex: none;
  font-size: .8rem; font-weight: 700; color: var(--brand);
  padding: 4px 10px; border-radius: 999px;
  transition: background .15s;
}
.mt-banner__btn:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* ---------- Skeletons ---------- */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface) 50%, var(--surface-2) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton--hero { grid-row: span 2; min-height: 440px; }
.skeleton--card { min-height: 210px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  grid-auto-rows: 1fr;
  gap: 18px;
  padding-block: 22px;
}
.hero .story-card--lead { grid-row: span 2; }

.story-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: var(--radius); overflow: hidden;
  min-height: 210px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.story-card--lead { min-height: 460px; }
.story-card img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.story-card:hover img { transform: scale(1.045); }
.story-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(5, 12, 22, .92) 0%, rgba(5, 12, 22, .45) 45%, rgba(5, 12, 22, .05) 75%);
}
.story-card__body { padding: 18px 20px; color: #fff; }
.story-card--lead .story-card__body { padding: 26px 28px; }
.story-card .cat-chip { margin-bottom: 10px; }
.story-card h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight); font-size: calc(1.05rem * var(--head-scale)); line-height: var(--head-line-height);
  text-wrap: balance;
}
.story-card--lead h3 { font-size: calc(1.72rem * var(--head-scale)); }
.story-card time { display: block; margin-top: 8px; font-size: .78rem; color: rgba(255,255,255,.75); }
.story-card__excerpt {
  margin-top: 10px; font-size: .92rem; color: rgba(255,255,255,.85);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.cat-chip {
  display: inline-block;
  background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: var(--track-sm);
}
.cat-chip--gold { background: var(--gold); color: #3a2a00; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 328px;
  gap: 32px;
  align-items: start;
  padding-block: 10px 26px;
}
.layout__sidebar {
  position: sticky; top: 88px;
  display: flex; flex-direction: column; gap: 26px;
}

/* ---------- Sections ---------- */
.section { margin-block: 30px; }
.section:first-child { margin-top: 6px; }
.section__title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--font-head);
  font-size: calc(1.45rem * var(--head-scale)); font-weight: var(--head-weight);
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  position: relative;
  line-height: var(--head-line-height);
}
.section__title::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -1px;
  width: 64px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}
.section__title--sm { font-size: calc(1.15rem * var(--head-scale)); }
.section__title--light { color: #fff; border-color: rgba(255,255,255,.15); }
.section__more {
  font-family: var(--font-ui);
  font-size: .84rem; font-weight: 600; color: var(--brand); white-space: nowrap;
  /* A standalone link in a heading, not inline prose, so 2.5.8 applies: the
     text is 20px tall on its own. */
  display: inline-flex; align-items: center; min-block-size: 24px;
}
.section__more:hover { text-decoration: underline; }
.section__more--light { color: #8ec9f0; }

/* ---------- For You: card deck ---------- */
.foryou { padding-block: 8px 60px; }
.foryou__head { max-width: 620px; margin-inline: auto; text-align: center; padding-block: 20px 4px; }
.foryou__lede { color: var(--ink-2); font-size: .98rem; line-height: 1.65; margin-top: 10px; }

.deck {
  position: relative;
  width: min(420px, 100%);
  /* Not flush to the viewport edge: an iOS left-edge swipe is the system back
     gesture and cannot be prevented from script, so the deck keeps clear of it. */
  margin: 26px auto 0;
  aspect-ratio: 3 / 4;
  touch-action: pan-y;              /* vertical scroll still works; horizontal is ours */
  overscroll-behavior-x: contain;
}
.deck__card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  will-change: transform;
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  user-select: none; -webkit-user-select: none;
}
.deck__card.is-dragging { transition: none; cursor: grabbing; }
/* Shadow cards sit behind, slightly scaled and offset. */
.deck__card[data-depth="1"] { transform: scale(.96) translateY(10px); }
.deck__card[data-depth="2"] { transform: scale(.92) translateY(20px); }
.deck__card[data-depth="1"], .deck__card[data-depth="2"] { pointer-events: none; }

.deck__media { flex: 1; min-height: 0; background: var(--surface-2); }
.deck__media img { width: 100%; height: 100%; object-fit: cover; }
.deck__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.deck__title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: calc(1.12rem * var(--head-scale)); line-height: var(--head-line-height);
}
.deck__body time { font-size: .78rem; color: var(--ink-3); }

/* Word plus colour, never colour alone. */
.deck__stamp {
  position: absolute; top: 18px;
  font-size: .9rem; font-weight: 800; letter-spacing: var(--track-lg);
  padding: 6px 14px; border-radius: 8px; border: 3px solid;
  opacity: 0; transition: opacity .12s; pointer-events: none;
}
.deck__stamp--yes { inset-inline-start: 18px; color: #1a8f4c; border-color: #1a8f4c; transform: rotate(-12deg); }
.deck__stamp--no  { inset-inline-end: 18px; color: #c0202a; border-color: #c0202a; transform: rotate(12deg); }

.deck__empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2);
}

.deck__actions {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 22px; flex-wrap: wrap;
}
.deck__btn {
  font-family: inherit; font-size: .92rem; font-weight: 800;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line);
  min-height: 44px;                 /* comfortable touch target */
  background: var(--surface); color: var(--ink-2);
  transition: transform .15s, background .15s;
}
.deck__btn:hover { transform: translateY(-1px); }
.deck__btn--open { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; border-color: transparent; }

.deck__status { text-align: center; margin-top: 12px; font-size: .86rem; color: var(--ink-2); min-height: 1.4em; }
.deck__hint { text-align: center; font-size: .78rem; color: var(--ink-3); margin-top: 4px; }

.foryou__privacy { max-width: 620px; margin: 30px auto 0; font-size: .86rem; color: var(--ink-2); }
/* A disclosure control at 23px. list-item keeps the marker; the min height
   brings the target up to 24px without moving the triangle. */
.foryou__privacy summary {
  cursor: pointer; font-weight: 700; color: var(--ink);
  min-block-size: 24px; padding-block: 1px;
}
.foryou__privacy p { margin: 10px 0 14px; line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
  .deck__card { transition: opacity .15s; }
}

/* ---------- For You: homepage widget ----------
   The full-page deck is a tall centred column; embedded on the homepage it
   would leave a lot of dead space, so here the deck sits beside its controls. */
.foryou-widget__inner {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) minmax(0, 330px);
  gap: 28px; align-items: center;
}
.foryou-widget__next { align-self: stretch; border-inline-start: 1px solid var(--line); padding-inline-start: 24px; }
.foryou-widget__nexthead {
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 12px;
}
.upnext { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.upnext__item { display: flex; gap: 10px; align-items: baseline; }
.upnext__n {
  flex: none; width: 1.5em; font-variant-numeric: tabular-nums;
  font-size: .78rem; color: var(--brand); font-weight: 700;
}
.upnext__title {
  font-size: .88rem; line-height: 1.45; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.upnext__more { font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.foryou-widget .deck { margin: 0; width: 100%; max-width: 300px; }
.foryou-widget__side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foryou-widget__lede { color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.foryou-widget .deck__actions { margin-top: 4px; justify-content: flex-start; }
.foryou-widget .deck__status, .foryou-widget .deck__hint { text-align: start; margin-top: 0; }

/* Below this the third column would squeeze the deck, so the queue preview
   is dropped rather than crushed — it is a nicety, not the feature. */
@media (max-width: 1080px) {
  .foryou-widget__inner { grid-template-columns: minmax(0, 300px) 1fr; }
  .foryou-widget__next { display: none; }
}
@media (max-width: 760px) {
  .foryou-widget__inner { grid-template-columns: 1fr; gap: 18px; }
  .foryou-widget .deck { max-width: none; margin-inline: auto; }
  .foryou-widget__side { align-items: stretch; }
  .foryou-widget .deck__actions { justify-content: center; }
  .foryou-widget .deck__status, .foryou-widget .deck__hint { text-align: center; }
}

/* ---------- Live TV + tip line, at the foot of the page ----------
   These used to sit in the sidebar, interrupting the flow between sections.
   As a band they read as a closing call-to-action instead. */
.foot-cards { padding-block: 6px 40px; }
.foot-cards__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  align-items: stretch;
}
.foot-cards__grid > * { margin: 0; }
@media (max-width: 760px) {
  .foot-cards__grid { grid-template-columns: 1fr; }
}

/* ---------- Advertising slots ----------
   Every slot reserves its height up front via min-height. That is the whole
   point: an ad that loads late and pushes the article down is the single
   worst layout-shift offender on a news site, and Core Web Vitals (CLS) is a
   ranking signal. The placeholder occupies the same box the creative will.

   Slots are labelled in the reader's language. Disclosure is not optional —
   Google's own policies and most advertising codes require paid placements to
   be distinguishable from editorial. */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-block: 22px;
}
.ad-slot__label {
  font-size: .62rem; font-weight: 700; letter-spacing: var(--track-md);
  text-transform: uppercase; color: var(--ink-3);
  align-self: center;
}
.ad-slot__frame {
  width: 100%;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-3); font-size: .78rem;
  overflow: hidden;
}
/* IAB standard sizes. min-height reserves the box before any creative loads. */
.ad-slot--leaderboard .ad-slot__frame { min-height: 90px; max-width: 728px; }
.ad-slot--mpu .ad-slot__frame { min-height: 250px; max-width: 300px; }
.ad-slot--inline .ad-slot__frame { min-height: 250px; max-width: 336px; }
.ad-slot--card .ad-slot__frame { min-height: 200px; }

/* A filled slot drops the placeholder chrome so a real creative sits clean. */
.ad-carousel__frame:has(> *) { border-style: solid; border-color: transparent; padding: 0; }
.ad-slot.is-filled .ad-slot__frame {
  background: none; border: none; min-height: 0;
}

@media (max-width: 760px) {
  /* Mobile leaderboards are 320x50, not 728x90 — reserving 90px would leave a
     40px gap under every mobile banner. */
  .ad-slot--leaderboard .ad-slot__frame { min-height: 50px; }
  .ad-slot { margin-block: 16px; }
}

/* ---------- Section tabs (World / Sports / Entertainment) ----------
   Pill shapes echoing .cat-chip, which is already the site's vocabulary for a
   category label. Logical properties throughout so RTL needs no overrides. */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.tabs__tab {
  font-family: inherit; font-size: .88rem; font-weight: 700;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.tabs__tab:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.tabs__tab.active {
  background: var(--brand); color: #fff;
  border-color: var(--brand);
}
/* The panel is revealed by removing [hidden]; no animation, because these
   swap instantly and a transition would only delay the content. */
.tabs__panel[hidden] { display: none; }

/* Row list (Bangladesh / Politics / Business) */
.row-card {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 18px; align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.row-card + .row-card { margin-top: 14px; }
.row-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.row-card__img { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/10; background: var(--surface-2); }
.row-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.row-card:hover .row-card__img img { transform: scale(1.05); }
.row-card h3 { font-family: var(--font-head); font-size: calc(1.08rem * var(--head-scale)); font-weight: var(--head-weight); line-height: var(--head-line-height); }
.row-card h3 a:hover { color: var(--brand); }
.row-card p {
  margin-top: 6px; font-size: .9rem; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-card .meta { margin-top: 8px; }

.meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--ink-3); flex-wrap: wrap; }
.meta .cat-chip { font-size: .68rem; padding: 2px 9px; }

/* Grid cards (World / Sports / Entertainment) */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.grid-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.grid-card__img { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.grid-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.grid-card:hover .grid-card__img img { transform: scale(1.05); }
.grid-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.grid-card h3 { font-family: var(--font-head); font-size: calc(1.02rem * var(--head-scale)); font-weight: var(--head-weight); line-height: var(--head-line-height); }
.grid-card h3 a:hover { color: var(--brand); }
.grid-card p {
  font-size: .88rem; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.grid-card .meta { margin-top: auto; padding-top: 4px; }

/* Opinion */
.opinion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.opinion-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  padding-block: 22px 18px;
  padding-inline: 24px 22px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.opinion-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.opinion-card::before {
  content: "\201C";
  position: absolute; top: 2px; inset-inline-end: 16px;
  font-family: Georgia, serif; font-size: 4.2rem; line-height: 1;
  color: var(--gold); opacity: .3;
}
.opinion-card h3 {
  font-family: var(--font-head); font-size: calc(1.08rem * var(--head-scale)); font-weight: var(--head-weight);
  line-height: var(--head-line-height); padding-inline-end: 30px;
}
.opinion-card h3 a:hover { color: var(--brand); }
.opinion-card p {
  margin-top: 8px; font-size: .88rem; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.opinion-card .meta { margin-top: 12px; }

/* ---------- Sidebar ---------- */
.live-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(245, 168, 0, .25), transparent 45%),
    linear-gradient(145deg, #0e5da0, var(--brand-ink));
  color: #fff;
  padding: 24px;
  box-shadow: var(--shadow-lift);
}
.live-card::after {
  content: ""; position: absolute; inset-inline-end: -46px; bottom: -58px;
  width: 190px; height: 190px; border-radius: 24px;
  background: rgba(255, 255, 255, .07);
  transform: rotate(18deg);
}
.live-card__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); font-size: .74rem; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; letter-spacing: var(--track-lg);
}
.live-card__title { font-family: var(--font-head); font-size: calc(1.42rem * var(--head-scale)); font-weight: var(--head-weight); line-height: var(--head-line-height); margin-top: 14px; }
.live-card__sub { font-size: .85rem; color: rgba(255,255,255,.78); margin-top: 6px; }
.live-card__cta {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  background: #fff; color: var(--brand-ink);
  font-weight: 800; font-size: .9rem;
  padding: 10px 18px; border-radius: 999px;
  transition: transform .15s;
}
.live-card__cta:hover { transform: translateY(-2px); }

/* Gold-tinted rather than the Live card's blue — a different kind of CTA
   (confidential contact, not "watch now"), so it should read differently. */
.tip-card {
  display: block; position: relative;
  border-radius: var(--radius); padding: 22px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 45%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line));
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.tip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tip-card__badge {
  display: inline-block; background: var(--gold); color: #3a2a00;
  font-size: .7rem; font-weight: 800; letter-spacing: var(--track-lg);
  padding: 3px 11px; border-radius: 999px;
}
.tip-card__title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: calc(1.12rem * var(--head-scale)); line-height: var(--head-line-height);
  color: var(--ink); margin-top: 12px;
}
.tip-card__sub { font-size: .86rem; color: var(--ink-2); margin-top: 6px; }
.tip-card__cta {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; font-weight: 800; font-size: .87rem; color: var(--brand);
}

.sidebar-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

.popular { list-style: none; counter-reset: pop; }
.popular li { counter-increment: pop; }
.popular li + li { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.popular a {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px;
  padding: 9px 6px; border-radius: 10px; align-items: start;
  transition: background .15s;
}
.popular a:hover { background: var(--surface-2); }
.popular a::before {
  content: counter(pop);
  font-family: var(--font-head); font-size: calc(1.5rem * var(--head-scale)); font-weight: var(--head-weight); line-height: 1.1;
  color: transparent;
  -webkit-text-stroke: 1.3px var(--brand);
}
/* Counter numerals follow each locale's CLDR default so they match the digits
   Intl produces for dates and numbers. Bengali and Arabic use native digits;
   Hindi (hi-IN) and Urdu (ur-PK) default to Latin, as their press does. */
html[lang="bn"] .popular a::before { content: counter(pop, bengali); }
html[lang="ar"] .popular a::before { content: counter(pop, arabic-indic); }
.popular h4 { font-size: .9rem; font-weight: 700; line-height: 1.5; }
.popular time { font-size: .74rem; color: var(--ink-3); }

.bulletins { display: flex; flex-direction: column; gap: 12px; }
.bulletin {
  display: grid; grid-template-columns: 108px 1fr; gap: 12px; align-items: center;
  border-radius: var(--radius-sm);
  transition: transform .15s;
}
.bulletin:hover { transform: translateX(3px); }
[dir="rtl"] .bulletin:hover { transform: translateX(-3px); }
.bulletin__thumb { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/9; background: var(--surface-2); }
.bulletin__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bulletin__dur {
  position: absolute; inset-inline-end: 5px; bottom: 5px;
  background: rgba(5, 12, 22, .82); color: #fff;
  font-size: .66rem; font-weight: 700; padding: 1px 6px; border-radius: 5px;
}
.bulletin h4 {
  font-size: .84rem; font-weight: 700; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bulletin:hover h4 { color: var(--brand); }

/* ---------- Video band ---------- */
.videos {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(18, 115, 182, .28), transparent 55%),
    #0a1017;
  color: #fff;
  padding-block: 44px 52px;
  margin-top: 14px;
}
.videos__grid {
  display: grid; grid-template-columns: 1.75fr 1fr; gap: 22px;
  align-items: start;
}
.videos__player {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.videos__player iframe { width: 100%; height: 100%; border: 0; display: block; }
.videos__player .video-cover { position: absolute; inset: 0; width: 100%; padding: 0; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent 55%);
}
.video-cover__play {
  position: absolute; top: 50%; inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: color-mix(in srgb, var(--red) 92%, #fff);
  display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(224, 36, 52, .55);
  transition: transform .18s; z-index: 1;
}
[dir="rtl"] .video-cover__play { transform: translate(50%, -50%); }
.video-cover:hover .video-cover__play { transform: translate(-50%, -50%) scale(1.08); }
[dir="rtl"] .video-cover:hover .video-cover__play { transform: translate(50%, -50%) scale(1.08); }
.video-cover__play svg { margin-inline-start: 4px; }
[dir="rtl"] .video-cover__play svg { transform: scaleX(-1); }
.video-cover__title {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 1;
  padding: 18px 22px; text-align: start;
  font-family: var(--font-head); font-weight: var(--head-weight); font-size: calc(1.15rem * var(--head-scale));
  line-height: var(--head-line-height);
  color: #fff;
}
.videos__rail {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 480px; overflow-y: auto;
  padding-inline-end: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.video-item {
  display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center;
  padding: 8px; border-radius: 12px;
  text-align: start; width: 100%;
  transition: background .15s;
}
.video-item:hover, .video-item.active { background: rgba(255, 255, 255, .09); }
.video-item.active { outline: 1px solid rgba(255,255,255,.2); }
.video-item__thumb { position: relative; border-radius: 9px; overflow: hidden; aspect-ratio: 16/9; background: #1a222d; }
.video-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-item h4 {
  font-size: .84rem; font-weight: 600; line-height: 1.5; color: #dbe5ee;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-item .bulletin__dur { font-size: .64rem; }

/* ---------- Footer ---------- */
.footer { background: #0a1017; color: #aeb9c5; }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px; padding-block: 46px 36px;
}
.footer__brand img { width: 180px; height: 60px; object-fit: contain; }
.footer__tagline { color: var(--gold); font-weight: 700; margin-top: 12px; }
.footer__desc { font-size: .88rem; margin-top: 8px; line-height: 1.7; }
.footer__col h3 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer__col a { display: block; padding: 5px 0; font-size: .88rem; transition: color .15s; }
.footer__col a:hover { color: #fff; }
.live-btn--footer { margin-top: 4px; }
.footer__bottom { border-top: 1px solid #1d2733; padding-block: 18px; font-size: .82rem; }

/* ---------- Article page ---------- */
.crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .82rem; color: var(--ink-3);
  padding-block: 22px 0;
}
/* 22px tall on their own. A breadcrumb is a standalone navigation control,
   not a link inside a sentence, so the WCAG 2.5.8 inline exception does not
   cover it. */
.crumbs a {
  color: var(--brand); font-weight: 600;
  display: inline-flex; align-items: center; min-block-size: 24px;
}
.crumbs a:hover { text-decoration: underline; }
.crumbs__sep { color: var(--ink-3); }

.page-title {
  font-family: var(--font-head);
  font-size: calc(clamp(1.7rem, 3.4vw, 2.4rem) * var(--head-scale)); font-weight: var(--head-weight);
  line-height: var(--head-line-height);
  margin-block: 12px 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-title::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -1px;
  width: 72px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.article { max-width: 760px; margin-inline: auto; padding-block: 8px 30px; }
/* Keep the breadcrumb on the same measure as the article column. */
#view-article .crumbs, #view-article .section { max-width: 760px; margin-inline: auto; }
.article__head { padding-block: 14px 6px; }
.article__title {
  font-family: var(--font-head);
  font-size: calc(clamp(1.6rem, 3.6vw, 2.5rem) * var(--head-scale)); font-weight: var(--head-weight);
  line-height: var(--head-line-height);
  margin-block: 14px 0; text-wrap: balance;
}
.article__meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; font-size: .86rem; color: var(--ink-3);
}
.article__meta strong { color: var(--ink-2); font-weight: 700; }
.article__meta .dot { opacity: .5; }

.article__figure { margin-block: 26px; }
.article__figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.article__figure figcaption {
  margin-top: 10px; font-size: .82rem; color: var(--ink-3);
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--line);
}

.article__body { font-size: 1.06rem; line-height: 1.95; color: var(--ink-2); }
.article__body > * + * { margin-top: 1.15em; }
.article__body p { text-wrap: pretty; }
.article__body h2, .article__body h3, .article__body h4 {
  font-family: var(--font-head); color: var(--ink);
  font-weight: var(--head-weight); line-height: var(--head-line-height);
  margin-top: 1.7em;
}
.article__body h2 { font-size: calc(1.4rem * var(--head-scale)); }
.article__body h3 { font-size: calc(1.18rem * var(--head-scale)); }
.article__body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.article__body img { border-radius: var(--radius-sm); margin-block: 1.2em; }
.article__body ul, .article__body ol { padding-inline-start: 1.4em; }
.article__body li + li { margin-top: .5em; }
.article__body blockquote {
  border-inline-start: 4px solid var(--gold);
  padding: 4px 0 4px 18px; padding-inline-start: 18px;
  color: var(--ink); font-style: italic;
}
.article__body iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius-sm); }

.article__foot {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid var(--line);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: 700; color: var(--brand);
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: var(--surface);
  transition: background .15s, transform .15s;
}
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); transform: translateY(-1px); }
.btn-ghost:disabled { opacity: .6; cursor: default; transform: none; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .92rem; font-weight: 800; color: #fff;
  padding: 13px 24px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

.article-skeleton { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 30px auto; }

/* ---------- Tip line ---------- */
.tipline { padding-block: 8px 60px; }
.tipline__head { max-width: 760px; padding-block: 22px 6px; }
.tipline__lede { margin-top: 12px; font-size: 1.02rem; color: var(--ink-2); line-height: 1.7; max-width: 62ch; }

.tipline__grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  align-items: start; margin-top: 28px;
}

.tipline__form {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow);
}
.tipline__label { font-size: .88rem; font-weight: 700; color: var(--ink); margin-top: 14px; }
.tipline__form > .tipline__label:first-child { margin-top: 0; }
.tipline__textarea, .tipline__input {
  font-family: inherit; font-size: .96rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  resize: vertical; transition: border-color .15s;
}
/* Mouse focus loses the ring; keyboard focus keeps it (see the global
   :focus-visible rule). Written as :focus:not(:focus-visible) because a bare
   `outline: none` here outranks the global rule on exactly the controls that
   need it most. */
.tipline__textarea:focus:not(:focus-visible),
.tipline__input:focus:not(:focus-visible) { outline: none; }
.tipline__textarea:focus, .tipline__input:focus { border-color: var(--brand); }
.tipline__textarea::placeholder, .tipline__input::placeholder { color: var(--ink-3); }

.tipline__voice {
  margin-top: 16px; padding: 16px;
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}
.tipline__voice-state { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tipline__voice-hint { font-size: .8rem; color: var(--ink-3); }
.tipline__voice-recording { color: var(--red); font-weight: 700; }
.tipline__timer { font-variant-numeric: tabular-nums; min-width: 2.6em; }
.tipline__voice-review { flex-direction: column; align-items: stretch; }
.tipline__voice-review audio { width: 100%; }
.tipline__voice-review-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tipline__voice-notice { font-size: .86rem; color: var(--ink-2); }

.tipline__form .btn-primary { margin-top: 20px; align-self: flex-start; }
.tipline__status { margin-top: 6px; font-size: .86rem; min-height: 1.4em; color: var(--ink-2); }
.tipline__status.is-success { color: #1a8f4c; }
html[data-theme="dark"] .tipline__status.is-success { color: #4ade80; }
.tipline__status.is-error { color: var(--red); }

.tipline__notes {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
  position: sticky; top: 88px;
}
.tipline__notes h2 { font-family: var(--font-head); font-weight: var(--head-weight); font-size: calc(1.05rem * var(--head-scale)); line-height: var(--head-line-height); }
.tipline__notes p { margin-top: 10px; font-size: .88rem; color: var(--ink-2); line-height: 1.65; }
.tipline__notes ul { margin-top: 14px; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.tipline__notes li { font-size: .84rem; color: var(--ink-2); line-height: 1.6; }

/* ---------- Category page ---------- */
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.load-more-wrap { display: flex; justify-content: center; padding-block: 34px 10px; }
#view-category main, #view-article main { padding-bottom: 20px; }

/* ---------- Empty / error ---------- */
.load-error {
  grid-column: 1 / -1;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 40px; text-align: center; color: var(--ink-2);
}
.load-error a { color: var(--brand); font-weight: 700; }

/* ---------- Responsive ---------- */
/* 1360px: matches --container — the English header lockup is the widest of
   the five locales, so the nav must collapse to the hamburger before it
   would overflow. */
@media (max-width: 1360px) {
  .header__nav { display: none; }
  .header__menu-btn { display: flex; }
  .videos__grid { grid-template-columns: 1fr; }
  .videos__rail { max-height: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; }
  .video-item { grid-template-columns: none; grid-template-rows: auto auto; width: 220px; flex: none; align-items: start; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .tipline__grid { grid-template-columns: 1fr; }
  .tipline__notes { position: static; }
}

/* The sidebar collapses when the two columns genuinely stop fitting — not when
   the header nav does. These were bundled in the same 1360px query, which is
   also the value of --container, so the rail only ever appeared on viewports
   WIDER than the container: every 1280 and 1366 laptop stacked "Most read" and
   the bulletins into the middle column. The rail is 328px plus a 32px gap, so
   about 1100px of viewport is the real threshold. */
@media (max-width: 1099px) {
  .layout { grid-template-columns: 1fr; }
  .layout__sidebar { position: static; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .story-card--lead { min-height: 380px; }
  .story-card--lead h3 { font-size: calc(1.35rem * var(--head-scale)); }
  .row-card { grid-template-columns: 128px 1fr; gap: 14px; }
  .row-card p { display: none; }
  .row-card h3 { font-size: calc(.95rem * var(--head-scale)); }
  .card-grid, .opinion-grid, .card-grid--3 { grid-template-columns: 1fr; }
  .article__body { font-size: 1rem; line-height: 1.85; }
  .article__foot { flex-direction: column; align-items: stretch; }
  .btn-ghost { justify-content: center; }
  .tipline__form { padding: 20px; }
  .tipline__form .btn-primary { align-self: stretch; }
  /* The top bar cannot hold the long date, the weather and the social links at
     375px — the weather was being crushed to ~67px. The social links are the
     one item repeated verbatim in the footer, so they go first, and the date
     drops to day + month. */
  .wx-strip { gap: 12px; }
  .topbar__social { display: none; }
  .topbar__date-full { display: none; }
  .topbar__date-short { display: inline; }
  .header__brand-text { display: none; }
  .header__inner { gap: 10px; min-height: 60px; }
  .lang__code { display: none; }
  .lang__btn { width: 38px; padding-inline: 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .mt-banner { font-size: .78rem; padding: 9px 12px; }
}

/* ---------- Reader accounts ----------
   The header entry point is icon-only: the English lockup already needs
   ~1250px of the 1360px container, so a labelled button would not fit. */
.account-btn { position: relative; }
.account-btn__dot {
  position: absolute; inset-block-start: 6px; inset-inline-end: 6px;
  inline-size: 8px; block-size: 8px; border-radius: 50%;
  background: var(--brand); border: 2px solid var(--surface);
}

.auth { max-inline-size: 460px; padding-block: 32px 64px; }
.auth__head { margin-bottom: 20px; }
.auth__lede { color: var(--ink-2); font-size: .94rem; line-height: 1.65; margin-top: 8px; }
.auth__tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 999px;
}
.auth__tab {
  flex: 1; padding: 10px 14px; border-radius: 999px; border: 0; background: transparent;
  font-size: .88rem; font-weight: 700; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.auth__tab[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.auth__form { display: flex; flex-direction: column; gap: 6px; }
.auth__form .btn-primary { margin-top: 16px; justify-content: center; }
.auth__hint { font-size: .82rem; color: var(--ink-2); line-height: 1.55; margin-top: 2px; }
.auth__alt { margin-top: 18px; }
/* A real button styled as a link still has to be reachable as a button. */
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .86rem; color: var(--brand); text-decoration: underline;
  display: inline-flex; align-items: center; min-block-size: 24px;
}

.auth__codes {
  margin-top: 24px; padding: 22px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}
.auth__codes h2 { font-size: 1.05rem; margin-bottom: 8px; }
.auth__codes p { font-size: .88rem; color: var(--ink-2); line-height: 1.6; }
.auth__codelist {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin: 16px 0;
}
.auth__codelist code {
  display: block; padding: 8px 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem; letter-spacing: .04em;
}
.auth__codeactions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Profile ---------- */
.profile { padding-block: 32px 64px; }
.profile__head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.profile__avatar {
  inline-size: 56px; block-size: 56px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
  color: #fff; background: var(--brand);
}
.profile__since { color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.profile__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}
.profile__card {
  padding: 22px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface);
}
.profile__card h2 { font-size: 1rem; margin-bottom: 10px; }
.profile__note { font-size: .84rem; color: var(--ink-2); line-height: 1.6; margin-bottom: 14px; }
.profile__stat { font-size: .88rem; color: var(--ink-2); margin: 12px 0; }

.profile__bars { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.profile__bar { display: grid; grid-template-columns: minmax(0, 90px) 1fr; gap: 12px; align-items: center; }
.profile__bar-name { font-size: .85rem; font-weight: 600; }
.profile__bar-track { block-size: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.profile__bar-fill { display: block; block-size: 100%; border-radius: 999px; background: var(--brand); }

.profile__saved { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.profile__saved li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.profile__saved a { font-size: .9rem; line-height: 1.45; }
.profile__unsave { flex: none; font-size: .78rem; color: var(--ink-2); }

.profile__pwform { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.profile__pwform .btn-ghost { align-self: flex-start; margin-top: 12px; }
.profile__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.profile__danger { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile__danger summary { cursor: pointer; font-size: .88rem; font-weight: 700; color: #d33; }
.profile__danger p { font-size: .84rem; color: var(--ink-2); line-height: 1.6; margin: 10px 0; }
.btn-danger {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: .88rem; font-weight: 700; color: #fff; background: #d33;
  padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
}
.btn-danger:hover { background: #b92626; }

.article__save { margin-inline-start: auto; }
.article__save[aria-pressed="true"] { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }

@media (max-width: 760px) {
  .auth__codelist { grid-template-columns: 1fr; }
  .profile__head { flex-direction: column; align-items: flex-start; }
  .profile__actions .btn-ghost { flex: 1 1 auto; justify-content: center; }
  .article__save { margin-inline-start: 0; }
}

/* The account control carries a label: an unlabelled person glyph among five
   other icons left readers unable to tell the site had accounts at all. */
.account-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 8px 14px; border-radius: 999px;
  font-size: .84rem; font-weight: 700; color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line));
  background: var(--surface);
  transition: background .15s, transform .15s;
}
.account-btn:hover { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); transform: translateY(-1px); }
.account-btn--in { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }

/* Drawer account block — the primary route in on a phone. */
.drawer__account {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.drawer__who { font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.drawer__acct {
  display: block; text-align: center; padding: 11px 16px; border-radius: 999px;
  font-size: .9rem; font-weight: 700; cursor: pointer;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
}
.drawer__acct--ghost { background: transparent; color: var(--brand); }

@media (max-width: 900px) {
  /* Narrow headers keep the icon but drop the word; the drawer carries the
     labelled version, so nothing becomes unfindable. */
  .account-btn__label { display: none; }
  .account-btn { padding: 9px; }
}

/* ---------- Federated sign-in ---------- */
.auth__providers { margin-bottom: 4px; }
.auth__provider-buttons { display: flex; flex-direction: column; gap: 10px; }
.provider-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  inline-size: 100%; padding: 12px 16px; border-radius: 999px; cursor: pointer;
  font-size: .92rem; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  transition: background .15s, transform .15s;
}
.provider-btn:hover { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); transform: translateY(-1px); }
.provider-btn svg { flex: none; }
.auth__divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 4px; color: var(--ink-2); font-size: .8rem;
}
.auth__divider::before, .auth__divider::after {
  content: ""; flex: 1; block-size: 1px; background: var(--line);
}
.profile__subhead {
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); margin: 22px 0 10px;
}
.profile__identities { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.profile__identities li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: .88rem; }
.profile__idemail { color: var(--ink-2); font-size: .8rem; overflow-wrap: anywhere; }

/* ---------- Interstitial advert ----------
   A native <dialog>, so the page behind it is inert and Escape closes it
   without any JavaScript of ours. */
.ad-modal {
  /* The reset zeroes margins globally, which also removes the UA stylesheet's
     `margin: auto` on dialog — without this the modal pins to the top-left
     corner instead of centring. */
  margin: auto;
  border: 0; padding: 0; border-radius: 16px;
  background: var(--surface); color: var(--ink);
  max-inline-size: min(92vw, 360px); inline-size: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.ad-modal::backdrop { background: rgba(0,0,0,.62); }
.ad-modal__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 8px; border-bottom: 1px solid var(--line);
}
.ad-modal__label {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
/* 44px: a close control smaller than a fingertip is the definition of an
   advert that is hard to dismiss, which is itself a Better Ads violation. */
.ad-modal__close {
  inline-size: 44px; block-size: 44px; margin: -6px -6px -6px 0;
  display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; color: var(--ink-2); border-radius: 50%;
}
.ad-modal__close:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.ad-modal__frame {
  min-block-size: 250px; display: grid; place-items: center;
  padding: 16px; font-size: .8rem; color: var(--ink-2);
}
@media (prefers-reduced-motion: no-preference) {
  .ad-modal[open] { animation: ad-modal-in .18s ease-out; }
  @keyframes ad-modal-in { from { opacity: 0; transform: translateY(8px); } }
}

/* ---------- Legal pages ----------
   A single measured column. A privacy notice is read, not scanned, and a
   60-70 character line is what makes that bearable — the content column is
   wide enough here to run to 100 without it. */
.legal { max-width: 68ch; padding-block: 8px 48px; }
.legal__head { margin-bottom: 30px; }
.legal__updated {
  font-size: .82rem; color: var(--ink-3); margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.legal__lede {
  margin-top: 14px; font-size: 1.06rem; line-height: 1.75; color: var(--ink-2);
}
.legal__section { margin-block: 26px; }
.legal__section h2 {
  font-family: var(--font-head);
  font-size: calc(1.16rem * var(--head-scale));
  font-weight: var(--head-weight); line-height: var(--head-line-height);
  margin-bottom: 8px;
}
.legal__section p { line-height: 1.8; color: var(--ink-2); }
.legal__section p + p { margin-top: 10px; }
.legal__list {
  margin: 10px 0 0; padding-inline-start: 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.legal__list li { line-height: 1.75; color: var(--ink-2); }

/* ---------- Left skyscraper ----------
   Fixed in the margin beside the centred container — never an in-flow column,
   which would have to be repeated in every view (home, category, article) and
   would fight the existing two-column grid.

   The first attempt required 1740px of viewport, because the container is
   1360px and a rail needs margin either side of it. On a 1123px window there
   is no margin at all, so the rail never appeared — correct by the rule, and
   useless in practice.

   The second attempt offset the whole BODY by a rail's width. That seated the
   rail, but it dragged the chrome along with the content: the header lost
   150px and collapsed to a hamburger on windows wide enough to show the full
   nav, and the top bar, nav and ticker no longer began where the leaderboard
   below them did. A rail is an advertising slot; it has no business moving the
   navigation.

   So the offset now applies to the CONTENT container only. The top bar, header
   and ticker keep the full viewport width and their own alignment, and the
   rail takes the space the content gives up beside the leaderboard. */
:root {
  --rail-w: 120px; --rail-gap: 16px; --rail-edge: 14px;
  /* Where the rail begins, in document coordinates: set from the leaderboard's
     real position by syncRail() so the two line up whatever the chrome is
     doing (ticker hidden, translation banner shown, a taller locale). The
     value here is only the pre-script fallback. */
  --rail-top: 160px;
  /* Where it comes to rest once the sticky header would overlap it. */
  --rail-stick: 84px;
}
/* The horizontal space one rail consumes. */
:root { --rail-space: calc(var(--rail-w) + var(--rail-gap) + var(--rail-edge)); }

.ad-skyscraper { display: none; }
.ad-skyscraper[hidden] { display: none !important; }

@media (min-width: 1024px) {
  /* Content yields the space; the chrome does not. */
  .container { padding-inline-start: calc(20px + var(--rail-space)); }
  .topbar .container,
  .header .container,
  .ticker .container,
  .search-overlay .container { padding-inline-start: 20px; }

  /* The containing block for the rail column. Absolute, not fixed, so the
     column starts level with the leaderboard instead of floating at a viewport
     offset that sat beside the nav bar. */
  body { position: relative; }

  .ad-skyscraper {
    display: block;
    position: absolute;
    inset-block-start: var(--rail-top);
    inset-inline-start: var(--rail-edge);
    inline-size: var(--rail-w);
    /* Runs to the foot of the page so the sticky child has somewhere to
       travel; the column itself is inert so it cannot swallow clicks over the
       whole left margin. */
    block-size: calc(100% - var(--rail-top));
    z-index: 5;                       /* under the drawer, modals and header */
    pointer-events: none;
  }
  /* Starts in line with the leaderboard, then rides down under the header. */
  .ad-skyscraper > * {
    position: sticky;
    inset-block-start: var(--rail-stick);
    pointer-events: auto;
  }
  .ad-skyscraper .ad-slot { margin-block: 0; }
  .ad-slot--skyscraper .ad-slot__frame {
    min-height: 600px;
    max-width: var(--rail-w);
  }
}

/* Wide desktops get the full 160px unit rather than the narrow one. */
@media (min-width: 1700px) {
  :root { --rail-w: 160px; }
}

/* A 600px unit resting at 84px needs 692px of window. Below that it would be
   clipped, and a clipped advert is worse than none because the advertiser is
   still charged for the impression — so the rail goes and the content takes
   its space back. */
@media (max-height: 691px) {
  .ad-skyscraper { display: none; }
  .container { padding-inline-start: 20px; }
}

/* ---------- Rotating slot ---------- */
/* .ad-slot is a column flexbox with align-items:center, so the viewport shrank
   to its content and the frames rendered 101px wide — far too narrow for the
   300x250 creative the slot is meant to hold. The MPU sizing also did not
   reach them: those rules target .ad-slot__frame, and a carousel frame is a
   .ad-carousel__frame. Both are fixed here rather than by renaming, so a
   filled frame and an empty one keep identical dimensions. */
.ad-carousel { inline-size: 100%; }
.ad-carousel__viewport {
  position: relative;
  inline-size: 100%;
  max-inline-size: 300px;            /* IAB medium rectangle */
  margin-inline: auto;
}
.ad-carousel__frame {
  display: grid; place-items: center;
  inline-size: 100%;
  min-height: 250px; padding: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: .78rem; color: var(--ink-2); text-align: center;
  overflow: hidden;
}
.ad-carousel__controls { inline-size: 100%; max-inline-size: 300px; margin-inline: auto; }
.ad-carousel__frame[hidden] { display: none; }

.ad-carousel__controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 8px;
}
.ad-carousel__dots { display: flex; gap: 6px; }
.ad-carousel__dot {
  inline-size: 7px; block-size: 7px; padding: 0; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 25%, transparent);
  cursor: pointer; transition: background .15s, transform .15s;
}
.ad-carousel__dot.is-current { background: var(--brand); transform: scale(1.25); }

/* 28px is small for a touch target, but this is an advertising control beside
   real content — a 44px button here would compete with the story links. It sits
   in a row of its own with generous spacing instead. */
.ad-carousel__toggle {
  inline-size: 28px; block-size: 28px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2);
}
.ad-carousel__toggle:hover { background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink); }
.ad-carousel__toggle.is-paused { color: var(--brand); }

/* ---------- Touch target sizes ----------
   WCAG 2.5.8 (AA) sets a 24x24 CSS-pixel minimum, with an exception only when
   the spacing around a smaller control keeps 24px circles from overlapping.
   Two controls failed that on a phone: the hamburger was 20px wide, and the
   carousel dots were 9px with 6px between them — too close to qualify. */

/* Size only. This rule used to set `display: grid` as well, which overrode the
   base `display: none` from further up the sheet and left the hamburger
   sitting next to a complete nav bar at every desktop width. Whether the
   button is shown belongs to the breakpoint and to .header--truncated; this
   rule has no business deciding it. */
.header__menu-btn {
  min-inline-size: 40px;
  min-block-size: 40px;
  gap: 4px;
}

/* The dot stays visually small; the hit area is expanded around it so the
   control is reachable without making the row look like buttons. */
.ad-carousel__dot { position: relative; }
.ad-carousel__dot::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 50%;
}
.ad-carousel__dots { gap: 10px; }          /* keeps the 24px areas from touching */

@media (max-width: 767px) {
  /* Phones get the full 44px recommendation on the controls people actually
     reach for one-handed. */
  .header__menu-btn,
  .icon-btn,
  #search-btn,
  #theme-btn,
  #lang-btn { min-inline-size: 44px; min-block-size: 44px; }
  .account-btn { min-block-size: 44px; }

  /* The LIVE pill keeps its dot and loses its word. At 390px the header row
     needed 442px; the label alone is 36 of the 52px that had to go. The link
     still reads as "live" to a screen reader through the visually-hidden
     label, so nothing is lost but the pixels. */
  .header__actions .live-btn { padding-inline: 12px; gap: 0; position: relative; }
  .header__actions .live-btn span:not(.live-dot) {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

/* ---------- Drawer tools (phone-only home of language + theme) ---------- */
.drawer__tools {
  display: flex; align-items: center; gap: 10px;
  margin-block: 4px 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.drawer__tools:empty { display: none; }
/* The menu is anchored to the button in the header, where there is room below
   it. In a 300px drawer that overflows, so inside the drawer it opens as a
   block beneath the control instead of a floating card. */
.drawer__tools .lang { position: static; flex: 1; }
.drawer__tools .lang__menu {
  position: absolute; inset-inline: 18px; inset-block-start: auto;
  top: auto; min-width: 0;
}
.drawer__tools .lang__btn { inline-size: 100%; justify-content: center; }
