/* JAMS News — soft liquid-glass chrome floating over hard-edged, neo-brutalist content.
   Palette: navy ink #213555, periwinkle #4F709C, butter #E5D283, deep teal #016A70,
   logo teal #00A79D (the offset-shadow signature), logo magenta #ED177F (used sparingly). */

@font-face {
  font-family: "Jakarta";
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jakarta";
  src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #EFEFEE;
  --surface: #F8F9FA;
  --surface-2: #E4E7EC;
  --ink: #213555;
  --ink-2: #4F709C;
  --muted: #56647A;
  --line: #213555;
  --hair: rgba(33, 53, 85, .16);
  --accent: #016A70;
  --pop: #00A79D;
  --butter: #E5D283;
  --magenta: #ED177F;
  --on-accent: #F8F9FA;
  --glass: rgba(248, 249, 250, .64);
  --glass-edge: rgba(33, 53, 85, .14);
  --glass-hi: rgba(248, 249, 250, .9);
  --glass-shadow: 0 10px 30px -14px rgba(33, 53, 85, .45);
  --logo-ink: #213555;
  --logo-gap: #EFEFEE;
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 10px;
  --bw: 2px;
  --page: 1180px;
  --font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1829;
  --surface: #172238;
  --surface-2: #22304B;
  --ink: #F0F0F0;
  --ink-2: #A9BCD8;
  --muted: #A3AEC2;
  --line: #C3CEE0;
  --hair: rgba(195, 206, 224, .16);
  --accent: #45C9C0;
  --pop: #00A79D;
  --on-accent: #0F1829;
  --glass: rgba(23, 34, 56, .6);
  --glass-edge: rgba(195, 206, 224, .16);
  --glass-hi: rgba(195, 206, 224, .12);
  --glass-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --logo-ink: #F0F0F0;
  --logo-gap: #0F1829;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 130px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  transition: background-color .2s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
svg { flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lg-ink { fill: var(--logo-ink); }
.lg-gap { fill: var(--logo-gap); }

/* ─── Liquid glass ─────────────────────────────────────────────── */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--surface); }
}

/* ─── Header ───────────────────────────────────────────────────── */
.masthead {
  position: sticky; top: 0; z-index: 40;
  padding: calc(8px + env(safe-area-inset-top)) 10px 6px;
  display: grid; gap: 8px;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.masthead.is-tucked { transform: translateY(calc(-58px - env(safe-area-inset-top))); }
.bar {
  display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 6px 0 16px;
  border-radius: 999px; max-width: var(--page); width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; height: 100%; margin-right: auto; }
.brand svg { height: 26px; width: auto; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  transition: background-color .15s;
}
.icon-btn:hover { background: var(--hair); }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.desk-nav { display: none; }

.sections {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px;
  border-radius: 999px; max-width: var(--page); width: 100%; margin: 0 auto;
  scroll-snap-type: x proximity;
}
.sections::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 15px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  font-size: .875rem; font-weight: 600; white-space: nowrap; color: var(--ink); scroll-snap-align: start;
  transition: background-color .15s, color .15s;
}
.chip:hover { background: var(--hair); }
.chip[aria-current="page"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ─── Bottom tab bar (phones) ──────────────────────────────────── */
.tabbar {
  position: fixed; z-index: 40; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 999px;
}
.tab {
  display: grid; justify-items: center; gap: 1px; min-width: 76px; padding: 7px 12px 6px; border-radius: 999px;
  font-size: .6875rem; font-weight: 700; color: var(--muted);
}
.tab[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ─── Page layout ──────────────────────────────────────────────── */
.page { max-width: var(--page); margin: 0 auto; padding: 8px 14px 24px; }
.rail { display: grid; gap: 14px; align-content: start; }
.main { min-width: 0; }

/* Briefing: the date is the headline of the page */
.briefing { display: grid; gap: 14px; margin: 10px 2px 18px; }
.dateline { margin: 0; font-size: clamp(1.9rem, 7.2vw, 2.9rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.dateline small { display: block; font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-bottom: 6px; }
.view-title { margin: 14px 2px 16px; font-size: clamp(1.75rem, 6vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.view-title small { display: block; font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 6px; }

.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 14px; padding: 2px 14px 4px; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; height: 34px; padding: 0 13px; border-radius: 999px; font-size: .8125rem; font-weight: 650;
  border: 1.5px solid var(--hair); background: var(--surface); display: inline-flex; align-items: center; gap: 7px;
}
.filter[aria-pressed="true"] { background: var(--butter); border-color: var(--line); color: #213555; }
.filter .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.filter[aria-pressed="true"] .dot { background: var(--magenta); }

.notice {
  display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap;
  font-size: .8125rem; color: var(--muted); margin: -4px 2px 14px;
}
.link-btn { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Lead story: the loud one ─────────────────────────────────── */
.lead {
  position: relative; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius-l);
  box-shadow: 6px 6px 0 var(--pop); overflow: hidden; margin: 0 6px 26px 0;
}
.lead-media { aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: var(--bw) solid var(--line); overflow: hidden; }
.lead-media img { width: 100%; height: 100%; object-fit: cover; }
.lead-body { padding: 16px 18px 18px; }
.lead h2 { margin: 6px 0 8px; font-size: clamp(1.4rem, 5.4vw, 1.9rem); line-height: 1.14; letter-spacing: -.022em; font-weight: 780; }
.lead p.sum { margin: 0 0 14px; color: var(--muted); font-size: .98rem; line-height: 1.55; max-width: 64ch; }
.coverage { list-style: none; margin: 0 0 12px; padding: 12px 0 0; border-top: 1.5px solid var(--hair); display: grid; gap: 10px; }
.coverage a { display: grid; gap: 1px; }
.coverage .src { font-size: .75rem; font-weight: 750; color: var(--accent); }
.coverage .ttl { font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.coverage a:hover .ttl { text-decoration: underline; text-underline-offset: 3px; }

/* ─── Story list ───────────────────────────────────────────────── */
.stack { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.stack + .stack, .stack + .world, .world + .stack, .tip + .stack, .stack + .tip { margin-top: 18px; }
.stack-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 4px; }
.stack-head h3 { margin: 0; font-size: 1.05rem; font-weight: 780; letter-spacing: -.01em; }
.story { position: relative; padding: 14px 16px; border-top: 1px solid var(--hair); }
.stack-head + .story, .stack > .story:first-child { border-top: 0; }
.story-grid { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.story h3 { margin: 4px 0 0; font-size: 1.0625rem; line-height: 1.3; font-weight: 680; letter-spacing: -.008em; }
.story a.hl:hover h3, .lead a.hl:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.story.is-read h3, .lead.is-read h2 { color: var(--muted); }
.thumb { width: 88px; height: 88px; border-radius: var(--radius-s); overflow: hidden; background: var(--surface-2); border: 1.5px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); min-width: 0; }
.meta .src { font-weight: 750; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta time { white-space: nowrap; }
.is-new::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--magenta);
}
.lead.is-new::before { left: auto; right: 16px; top: 16px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.actions { display: flex; align-items: center; gap: 2px; margin: 4px -8px -8px; }
.act {
  height: 32px; min-width: 32px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.act:hover { background: var(--hair); color: var(--ink); }
.act .icon { width: 18px; height: 18px; }
.act[aria-pressed="true"] { color: var(--accent); }
.act[aria-pressed="true"] .icon { fill: currentColor; }
.act.more { color: var(--accent); }
.story .coverage { margin: 10px 0 2px; }
.lead .actions { margin-top: 0; }

/* Around the world: one story per region */
.world { margin-top: 18px; }
.world-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.world-head h3 { margin: 0; font-size: 1.05rem; font-weight: 780; }
.world-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 78%); gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 10px; scroll-snap-type: x mandatory; }
.world-row::-webkit-scrollbar { display: none; }
.region-card {
  scroll-snap-align: start; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-m);
  padding: 14px; display: grid; gap: 8px; align-content: start; box-shadow: 3px 3px 0 var(--ink-2);
}
.region-card .rg { justify-self: start; font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--butter); color: #213555; }
.region-card h4 { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 680; }
.region-card:hover h4 { text-decoration: underline; text-underline-offset: 3px; }

.tip {
  display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-m); border: 1.5px dashed var(--ink-2); background: color-mix(in srgb, var(--butter) 22%, var(--surface));
}
.tip p { margin: 0; font-size: .9375rem; font-weight: 600; }
.tip .row { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 750; font-size: .875rem; display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--surface);
  transition: transform .12s, box-shadow .12s;
}
.btn.primary { background: var(--ink); color: var(--bg); box-shadow: 3px 3px 0 var(--pop); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pop); }
.btn.ghost { border-color: transparent; background: transparent; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 1.2rem; }
.more-wrap { display: flex; justify-content: center; margin: 22px 0 6px; }

/* Skeletons while a section loads */
.skel { background: linear-gradient(90deg, var(--surface-2) 0, var(--hair) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── Weather ──────────────────────────────────────────────────── */
.wx { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.wx-now { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; }
.wx-now .icon { width: 36px; height: 36px; stroke-width: 1.6; color: var(--ink-2); }
.wx-temp { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.wx-place { display: grid; min-width: 0; margin-right: auto; }
.wx-place b { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-place span { font-size: .78rem; color: var(--muted); }
.wx-caret { transition: transform .2s; color: var(--muted); }
.wx[data-open="true"] .wx-caret { transform: rotate(180deg); }
.wx-more { display: none; border-top: 1.5px solid var(--hair); padding: 12px 14px 14px; }
.wx[data-open="true"] .wx-more { display: block; }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.wx-day { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--radius-s); background: var(--bg); }
.wx-day b { font-size: .78rem; }
.wx-day .icon { width: 26px; height: 26px; color: var(--ink-2); }
.wx-day span { font-size: .8125rem; font-weight: 700; }
.wx-day span i { font-style: normal; color: var(--muted); font-weight: 600; }
.wx-day small { font-size: .7rem; color: var(--accent); font-weight: 700; min-height: 1em; }
.wx-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .75rem; color: var(--muted); }
.wx-foot a { text-decoration: underline; }
.wx-search { display: flex; gap: 6px; margin-top: 10px; }
.wx-search input { flex: 1; min-width: 0; }
.wx-results { list-style: none; padding: 0; margin: 6px 0 0; }
.wx-results button { width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: .875rem; }
.wx-results button:hover { background: var(--hair); }
.wx-setup { display: flex; align-items: center; gap: 10px; padding: 12px 14px; width: 100%; text-align: left; font-weight: 700; font-size: .9rem; }
.wx-setup .icon { color: var(--accent); }

input[type="text"], input[type="search"] {
  height: 42px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
input::placeholder { color: var(--muted); }

/* ─── Rail extras (desktop) ────────────────────────────────────── */
.panel { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 14px; }
.panel h3 { margin: 0 0 10px; font-size: .95rem; font-weight: 780; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; }
.topic { height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--hair); font-size: .8125rem; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; background: var(--bg); }
.topic:hover { border-color: var(--line); }
.topic[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ─── Sheets (settings, search) ────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15, 24, 41, .38); opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); max-height: 86vh; overflow: auto;
  border-radius: 28px; padding: 8px 18px 22px; transform: translateY(110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  overscroll-behavior: contain;
}
.sheet.open { transform: none; }
.sheet .glass-solid { background: var(--surface); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--hair); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.group { padding: 16px 0; border-top: 1px solid var(--hair); }
.group:first-of-type { border-top: 0; }
.group h3 { margin: 0 0 4px; font-size: .95rem; font-weight: 780; }
.group p { margin: 0 0 10px; font-size: .8125rem; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line); transition: background-color .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: var(--ink); transition: transform .18s; }
.switch input:checked + span { background: var(--pop); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--surface); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; padding: 4px; border-radius: 999px; background: var(--surface-2); gap: 4px; }
.seg button { flex: 1; height: 36px; border-radius: 999px; font-size: .8125rem; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 0 var(--hair), 0 0 0 1.5px var(--line); }
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips-edit button { height: 30px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--surface-2); font-size: .8125rem; font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }
.chips-edit .icon { width: 16px; height: 16px; }
.src-list { display: grid; gap: 2px; max-height: 280px; overflow: auto; margin-top: 8px; }
.src-list label { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px; font-size: .875rem; font-weight: 600; gap: 10px; }
.src-list small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.src-list input { width: 20px; height: 20px; accent-color: var(--accent); }
.search-form { display: flex; gap: 8px; margin: 6px 0 4px; }
.search-form input { flex: 1; min-width: 0; }

/* ─── Toasts & new-stories pill ────────────────────────────────── */
.pill-new {
  position: fixed; z-index: 45; left: 50%; top: calc(122px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  height: 40px; padding: 0 18px; border-radius: 999px; background: var(--magenta); color: #F8F9FA; font-weight: 750; font-size: .875rem;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: 3px 3px 0 var(--ink); transition: transform .25s, opacity .25s;
}
.pill-new.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 999px; font-size: .875rem; font-weight: 650; transition: .2s; pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.offline-bar { grid-column: 1 / -1; text-align: center; font-size: .8125rem; font-weight: 650; padding: 8px; margin: 0 0 12px; border-radius: 999px; background: var(--butter); color: #213555; }

.footer { max-width: var(--page); margin: 30px auto 0; padding: 20px 16px 10px; font-size: .8125rem; color: var(--muted); display: grid; gap: 10px; }
.footer svg { height: 20px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }

/* ─── Tablet ───────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .page { padding: 10px 24px 30px; }
  .briefing { grid-template-columns: 1fr minmax(300px, 360px); align-items: end; }
  .world-row { grid-auto-columns: minmax(240px, 1fr); }
  .lead-grid { display: grid; grid-template-columns: 1.15fr 1fr; }
  .lead-grid .lead-media { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: var(--bw) solid var(--line); }
  .thumb { width: 112px; height: 84px; }
}

/* ─── Desktop ──────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .masthead { padding-top: 12px; }
  .masthead.is-tucked { transform: none; }
  .bar { height: 60px; padding-left: 22px; gap: 10px; }
  .brand svg { height: 30px; }
  .desk-nav { display: flex; gap: 2px; margin-right: 8px; }
  .desk-nav .chip { height: 38px; }
  .page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; padding-top: 18px; }
  .rail { position: sticky; top: 150px; }
  .briefing { grid-template-columns: 1fr; }
  .briefing .wx-slot { display: none; }
  .filters { flex-wrap: wrap; overflow: visible; margin: 0 0 16px; padding: 0; }
  .pill-new { top: 146px; }
  .sheet { left: auto; right: 16px; top: 16px; bottom: 16px; width: 420px; max-height: none; transform: translateX(calc(100% + 30px)); }
  .sheet.open { transform: none; }
  .sheet-grip { display: none; }
  .toast { bottom: 24px; }
}
@media (max-width: 1023px) { .rail .wx-rail { display: none; } }
@media (max-width: 1023px) { .rail { margin-top: 26px; } }

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

/* Sheets carry dense controls, so they get a denser pane of glass. */
.sheet.glass { background: color-mix(in srgb, var(--surface) 90%, transparent); }
