/* dujour stylesheet.
   Two views under one shell: Brief (full-width AI synthesis) and Deck
   (News / curated Tweets / Podcasts columns, TweetDeck-style). Family dark
   tokens; cyan is dujour's accent; violet is the reserved pop, spent only on
   the Brief. Background is the dylan-os "stitched" texture: a tight 6px grid
   plus a fractal-noise stitch, lifted by two corner glows. */

:root {
  --bg: #0a0b0d;
  --card: #16171a;
  --card-2: #121316;
  --surface: rgba(255, 255, 255, 0.022);
  --fg: #fafafa;
  --mut: #a6a6a6;
  --mut-2: #8c8c8c;            /* AA-safe on the dark surfaces (>=4.5:1) */
  --bd: rgba(255, 255, 255, 0.10);
  --bd-soft: rgba(255, 255, 255, 0.06);
  --input: rgba(255, 255, 255, 0.15);

  --accent-h: 184; --accent-s: 72%; --accent-l: 56%;
  --accent: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  --accent-soft: hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.16);
  --accent-glow: hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.36);
  --accent-bd: hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.42);

  --violet: hsl(266 82% 72%);
  --violet-soft: hsl(266 82% 72% / 0.14);
  --violet-bd: hsl(266 82% 72% / 0.40);
  --violet-glow-bg: hsl(266 82% 72% / 0.06);

  --pos-fg: #6bcf77; --pos-bg: #142019; --pos-bd: rgba(107, 207, 119, 0.30);
  --warn-fg: #e8a64a; --warn-bg: #211a10; --warn-bd: rgba(232, 166, 74, 0.30);
  --neg-fg: #e58585;
  --wsj: #d7dce3; --bbg: #f0913b;

  --font-sans: "Geist", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --topbar-h: 56px;
  --col-w: 384px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.3, 0, 1, 1);
  --z-sticky: 10; --z-pill: 40; --z-overlay: 50;

  /* stitched-grid layers (ported from dylan-os, tuned to dujour) */
  --grid-size: 6px;
  --grid-line: rgba(255, 255, 255, 0.016);
  --grid-v: repeating-linear-gradient(90deg,
      transparent 0 calc(var(--grid-size) - 1px),
      var(--grid-line) calc(var(--grid-size) - 1px) var(--grid-size));
  --grid-h: repeating-linear-gradient(0deg,
      transparent 0 calc(var(--grid-size) - 1px),
      var(--grid-line) calc(var(--grid-size) - 1px) var(--grid-size));
  /* corner glow uses the theme's cyan accent (matches --accent) */
  --glow-accent: radial-gradient(ellipse 90vw 60vh at 92% 0%,
      hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.16), transparent 60%);
  --glow-bl: radial-gradient(ellipse 82vw 62vh at 3% 103%,
      rgba(255, 255, 255, 0.05), transparent 62%);
  --bg-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* base color on html too, so the iOS safe-area regions are the app's dark,
   not a bare-black seam behind the home indicator. */
html { background-color: #0a0b0d; }
body {
  margin: 0;
  color: var(--fg);
  font: 15px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  background-color: #0a0b0d;
  background-image:
    var(--bg-noise), var(--grid-v), var(--grid-h),
    var(--glow-accent), var(--glow-bl),
    linear-gradient(180deg, #0b0d11 0%, #0c0e12 55%, #070809 100%);
  background-blend-mode: soft-light, normal, normal, screen, screen, normal;
  background-attachment: fixed;
}
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.16) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-bd); outline-offset: 1px; }
.tabnum { font-variant-numeric: tabular-nums; }

/* ---------- top bar + tab switcher ---------- */
/* A 100dvh flex column is the robust iOS-standalone shell: dvh tracks the
   real visible viewport, so nothing leaves a bare-black gap at the bottom the
   way overflow:hidden + percentage/fixed heights do. */
.app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
}
.topbar {
  flex: none; position: relative; z-index: var(--z-sticky);
  /* iOS standalone PWA: content runs under the status bar / Dynamic Island,
     so grow the bar and pad by the top safe-area inset. */
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 16px;
  padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px))
           0 max(20px, env(safe-area-inset-left, 0px));
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bd-soft);
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand .zg-sub {
  font: 500 10px var(--font-mono); letter-spacing: 0.16em;
  color: var(--mut-2); text-transform: uppercase;
}
/* 2C reading-terminal wordmark (primary): violet prompt, cyan du, blinking caret */
.dj-mark {
  display: inline-flex; align-items: center;
  font: 600 18px/1 var(--font-mono); letter-spacing: -0.015em; white-space: nowrap;
}
.dj-mark .dj-prompt { color: var(--violet); font-weight: 500; margin-right: 8px; }
.dj-mark .dj-du { color: var(--accent); }
.dj-mark .dj-rest { color: var(--fg); }
.dj-mark .dj-caret {
  display: inline-block; width: 7px; height: 16px; margin-left: 5px;
  background: var(--accent); border-radius: 2px;
  animation: dj-blink 1.1s step-end infinite;
}
@keyframes dj-blink { 50% { opacity: 0; } }
/* 2A wordmark (alternate): clean "dujour." with violet full-stop */
.dj-word { font: 600 18px var(--font-mono); letter-spacing: -0.01em; color: var(--fg); }
.dj-word .dj-du { color: var(--accent); }
.dj-word .dj-dot { color: var(--violet); }
.tabs {
  display: flex; gap: 3px; padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bd-soft); border-radius: 999px;
}
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 15px; border-radius: 999px;
  font: 500 13px var(--font-sans); color: var(--mut);
  transition: color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.tab:hover { color: var(--fg); }
.tab.on { color: var(--bg); background: var(--fg); }
.tab .tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.topbar-stats {
  margin-left: auto; display: flex; align-items: center; gap: 12px;
  font: 400 11.5px var(--font-mono); color: var(--mut);
  letter-spacing: 0.02em; white-space: nowrap;
}
.topbar-stats .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pos-fg); }
.topbar-stats .dot.stale { background: var(--warn-fg); }

/* fills the remaining column height; scroll containers pad their content clear
   of the home indicator, and the dark background paints behind it. */
.view { flex: 1; min-height: 0; position: relative; }

/* ---------- Brief (full-width synthesis) ---------- */
.brief { height: 100%; overflow-y: auto; }
.brief-inner {
  max-width: 1500px; margin: 0 auto;
  padding: 26px max(24px, env(safe-area-inset-right, 0px))
           calc(60px + env(safe-area-inset-bottom, 0px))
           max(24px, env(safe-area-inset-left, 0px));
}
.brief-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding-bottom: 4px;
}
.brief-kicker {
  font: 500 11px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet);
}
.brief-meta { font: 400 11.5px var(--font-mono); color: var(--mut-2); }
.brief-overview {
  margin-top: 14px; max-width: 74ch;
  font-size: 17px; line-height: 1.6; color: #e7e4ec; letter-spacing: -0.005em; text-wrap: pretty;
}
.theme-grid {
  margin-top: 26px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.theme {
  display: flex; flex-direction: column; padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--violet-glow-bg), transparent 70%), var(--card);
  border: 1px solid var(--bd); position: relative; overflow: hidden;
}
.theme::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: linear-gradient(180deg, var(--violet), transparent); opacity: 0.55;
}
.theme-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.trend { padding: 2px 8px; border-radius: 999px; font: 600 9.5px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.trend.new { color: var(--violet); background: var(--violet-soft); border: 1px solid var(--violet-bd); }
.trend.rising { color: var(--pos-fg); background: var(--pos-bg); border: 1px solid var(--pos-bd); }
.trend.steady { color: var(--mut); border: 1px solid var(--bd); }
.trend.fading { color: var(--mut-2); border: 1px solid var(--bd-soft); }
.theme-head { font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.theme-take { margin-top: 6px; font-size: 13.5px; color: var(--mut); line-height: 1.5; }
.theme-body { margin-top: 11px; font-size: 13.5px; color: #d3d0d8; line-height: 1.62; }
.theme-ev-label { margin-top: 14px; margin-bottom: 7px; font: 500 9.5px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut-2); }
.theme-evidence { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ev-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; min-height: 30px;
  border: 1px solid var(--bd); color: var(--mut);
  font: 500 11.5px var(--font-mono); max-width: 100%;
  transition: all 150ms var(--ease-out);
}
.ev-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-chip:hover { text-decoration: none; color: var(--fg); border-color: var(--violet-bd); background: var(--violet-soft); }
.ev-chip svg { flex: none; opacity: 0.75; }
.brief-caveat {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--bd-soft);
  font: 400 11px var(--font-mono); color: var(--mut-2); line-height: 1.6; max-width: 80ch;
}

/* ---------- Deck (columns) ---------- */
.deck {
  height: 100%; display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  padding: 14px max(20px, env(safe-area-inset-right, 0px))
           calc(18px + env(safe-area-inset-bottom, 0px))
           max(20px, env(safe-area-inset-left, 0px));
}
.col {
  flex: 0 0 var(--col-w); width: var(--col-w);
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border: 1px solid var(--bd-soft); border-radius: var(--r-lg);
}
.col-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px 10px; border-bottom: 1px solid var(--bd-soft); }
.col-head .col-icon { display: flex; color: var(--mut); }
.col-title { font: 600 13px var(--font-sans); letter-spacing: 0.01em; }
.col-count { font: 500 11px var(--font-mono); color: var(--mut-2); }
.col-tools { margin-left: auto; display: flex; gap: 4px; }
.col-tool {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r-sm); color: var(--mut-2);
  transition: color 150ms var(--ease-out), background 150ms var(--ease-out);
}
.col-tool:hover { color: var(--fg); background: rgba(255,255,255,0.06); }
.col-tool.on { color: var(--accent); background: var(--accent-soft); }
.col-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--bd-soft); }
.col-filters input[type="search"] {
  flex: 1 1 120px; min-width: 0; padding: 8px 10px;
  background: var(--card-2); color: var(--fg);
  border: 1px solid var(--input); border-radius: var(--r-sm);
  font: 400 16px var(--font-sans);  /* 16px: no iOS focus-zoom */
}
.fpill {
  padding: 6px 10px; border-radius: 999px; min-height: 30px;
  border: 1px solid var(--bd); color: var(--mut); font: 500 11px var(--font-sans);
  transition: all 150ms var(--ease-out);
}
.fpill:hover { color: var(--fg); border-color: rgba(255,255,255,0.22); }
.fpill.on { color: var(--accent); border-color: var(--accent-bd); background: var(--accent-soft); }
.col-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

.day-div {
  position: sticky; top: 0; z-index: 2; padding: 5px 14px;
  background: rgba(14, 15, 18, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bd-soft);
  font: 500 10.5px var(--font-mono); color: var(--mut-2);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.unseen-div { display: flex; align-items: center; gap: 8px; padding: 6px 14px; font: 500 10px var(--font-mono); color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; }
.unseen-div::before, .unseen-div::after { content: ""; flex: 1; height: 1px; background: var(--accent-bd); }
.col-sentinel { min-height: 56px; }

/* ---------- tweet card ---------- */
.tw {
  display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--bd-soft); transition: background 150ms var(--ease-out);
  content-visibility: auto; contain-intrinsic-size: auto 150px;
}
.tw:hover { background: rgba(255, 255, 255, 0.025); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--card); border: 1px solid var(--bd-soft); }
.avatar-fallback { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--bd); font: 600 15px var(--font-mono); color: var(--mut); }
.tw-main { min-width: 0; }
.tw-head { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 13.5px; line-height: 1.3; }
.tw-name { font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-name:hover { color: var(--fg); text-decoration: none; }
.tw-check { color: var(--accent); flex: none; transform: translateY(1px); }
.tw-handle { color: var(--mut-2); flex: none; font-size: 12.5px; }
.tw-handle:hover { color: var(--mut); text-decoration: none; }
.tw-time { margin-left: auto; flex: none; font: 400 11.5px var(--font-mono); color: var(--mut-2); }
.tw-time:hover { color: var(--mut); text-decoration: none; }
.tw-ctx { font-size: 12px; color: var(--mut-2); margin-top: 1px; }
.tw-body { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: #e9e9e9; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.tw-body a { color: var(--accent); }
.tw-body .cashtag { color: var(--accent); font-weight: 500; }
.tw-score { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 999px; font: 600 10.5px var(--font-mono); border: 1px solid var(--bd); color: var(--mut-2); }
.tw-score.hi { color: var(--accent); border-color: var(--accent-bd); background: var(--accent-soft); }
.tw-score.mid { color: var(--mut); }

.tw-media { margin-top: 8px; display: grid; gap: 2px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--bd-soft); }
.tw-media.n1 { grid-template-columns: 1fr; }
.tw-media.n2 { grid-template-columns: 1fr 1fr; }
.tw-media.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tw-media.n3 .m:first-child { grid-row: span 2; }
.tw-media.n4 { grid-template-columns: 1fr 1fr; }
.tw-media .m { position: relative; display: block; overflow: hidden; min-height: 0; background: var(--card-2); }
.tw-media .m img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-media.n1 .m img { max-height: 320px; }
.tw-media.n2 .m, .tw-media.n4 .m { aspect-ratio: 8 / 5; }
.tw-media.n3 .m { aspect-ratio: 8 / 5; }
.tw-media.n3 .m:first-child { aspect-ratio: auto; height: 100%; }
.m-play { position: absolute; inset: 0; display: grid; place-items: center; }
.m-play span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(10,10,10,0.7); border: 1px solid rgba(255,255,255,0.25); color: #fff; }
.m-dur { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px; background: rgba(10,10,10,0.8); font: 500 10.5px var(--font-mono); color: #eee; }

.tw-quote { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--bd); border-radius: var(--r-md); display: block; color: inherit; transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out); }
.tw-quote:hover { text-decoration: none; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.02); }
.tw-quote-head { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; }
.tw-quote-head img { width: 18px; height: 18px; border-radius: 50%; }
.tw-quote-head .qn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-quote-head .qh { color: var(--mut-2); flex: none; }
.tw-quote-body { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }

.tw-link { margin-top: 8px; display: flex; gap: 10px; align-items: center; border: 1px solid var(--bd); border-radius: var(--r-md); padding: 8px 10px; color: inherit; transition: border-color 150ms var(--ease-out); }
.tw-link:hover { text-decoration: none; border-color: rgba(255,255,255,0.2); }
.tw-link img { width: 52px; height: 52px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.tw-link-t { font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.tw-link-d { font-size: 11.5px; color: var(--mut-2); line-height: 1.35; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tw-foot { margin-top: 8px; display: flex; gap: 15px; align-items: center; font: 400 11px var(--font-mono); color: var(--mut-2); }
.tw-foot .mt { display: inline-flex; align-items: center; gap: 4px; }
.tw-foot svg { opacity: 0.7; }
.tw-foot .open { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--mut-2); }
.tw-foot .open:hover { color: var(--accent); text-decoration: none; }
.tw-reason { margin-top: 6px; font-size: 11.5px; color: var(--mut-2); font-style: italic; line-height: 1.4; }

/* ---------- news card ---------- */
.news { padding: 12px 14px; border-bottom: 1px solid var(--bd-soft); transition: background 150ms var(--ease-out); content-visibility: auto; contain-intrinsic-size: auto 92px; }
.news:hover { background: rgba(255,255,255,0.025); }
.news-top { display: flex; align-items: center; gap: 7px; font: 500 11px var(--font-mono); }
.news-src { display: inline-flex; align-items: center; gap: 5px; letter-spacing: 0.02em; }
.news-src .sd { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.news-src.wsj .sd { background: var(--wsj); }
.news-src.bbg .sd { background: var(--bbg); }
.news-feed { color: var(--mut-2); }
.news-time { margin-left: auto; color: var(--mut-2); }
.news-title { display: block; margin-top: 6px; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--fg); letter-spacing: -0.005em; }
.news-title:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent-bd); text-underline-offset: 2px; }
.news-sum { margin-top: 4px; font-size: 12px; color: var(--mut); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- podcast card ---------- */
.pod { padding: 12px 14px; border-bottom: 1px solid var(--bd-soft); transition: background 150ms var(--ease-out); content-visibility: auto; contain-intrinsic-size: auto 130px; }
.pod:hover { background: rgba(255, 255, 255, 0.025); }
.pod-top { display: flex; gap: 10px; }
.pod-art { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; flex: none; background: var(--card-2); border: 1px solid var(--bd-soft); }
.pod-main { min-width: 0; flex: 1; }
.pod-channel { display: flex; align-items: center; gap: 6px; font: 500 11px var(--font-mono); letter-spacing: 0.04em; }
.pod-channel .ch-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pod-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--mut-2); font: 400 11px var(--font-mono); }
.pod-title { margin-top: 3px; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.pod-title a { color: var(--fg); }
.pod-title a:hover { text-decoration: underline; text-decoration-color: var(--accent-bd); text-underline-offset: 2px; }
.pod-reason { margin-top: 3px; font-size: 12px; color: var(--mut); line-height: 1.4; }
.score-chip { flex: none; padding: 2px 7px; border-radius: 999px; font: 600 11px var(--font-mono); border: 1px solid var(--bd); color: var(--mut); }
.score-chip.hi { color: var(--pos-fg); background: var(--pos-bg); border-color: var(--pos-bd); }
.score-chip.md { color: var(--warn-fg); background: var(--warn-bg); border-color: var(--warn-bd); }
.pod-bullets { margin: 8px 0 0; padding: 0 0 0 16px; font-size: 12.5px; color: var(--mut); line-height: 1.5; }
.pod-bullets li { margin-bottom: 4px; }
.pod-bullets li::marker { color: var(--mut-2); }
.pod-expand { margin-top: 6px; font: 500 11px var(--font-sans); color: var(--accent); padding: 6px 0; min-height: 30px; }
.pod-expand:hover { text-decoration: underline; }

/* ---------- pill, skeleton, empty, error ---------- */
.update-pill {
  position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 12px); left: 50%;
  transform: translateX(-50%); z-index: var(--z-pill);
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; min-height: 40px;
  border-radius: 999px; color: var(--accent); background: rgba(16, 20, 21, 0.9);
  border: 1px solid var(--accent-bd); backdrop-filter: blur(10px);
  font: 500 12.5px var(--font-sans); box-shadow: 0 6px 24px -8px rgba(0,0,0,0.8);
  animation: pill-in 220ms var(--ease-out);
}
.update-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pill-in { from { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes pulse { 50% { opacity: 0.4; } }

.skel { padding: 12px 14px; border-bottom: 1px solid var(--bd-soft); display: grid; grid-template-columns: 40px 1fr; gap: 10px; }
.skel.news-skel { grid-template-columns: 1fr; }
.skel .c { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.skel .b { background: rgba(255,255,255,0.05); border-radius: 6px; }
.skel .l1 { height: 12px; width: 55%; margin-bottom: 8px; }
.skel .l2 { height: 11px; width: 92%; margin-bottom: 6px; }
.skel .l3 { height: 11px; width: 74%; }
.theme-skel { height: 210px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--bd); opacity: 0.5; }

.empty { padding: 36px 18px; text-align: center; font: 400 12px var(--font-mono); color: var(--mut-2); line-height: 1.7; }
.load-error { position: fixed; inset: var(--topbar-h) 0 0 0; display: grid; place-items: center; font: 400 13px var(--font-mono); color: var(--neg-fg); text-align: center; padding: 20px; }

.fade-in { animation: item-in 220ms var(--ease-out) both; }
@keyframes item-in { from { opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  :root { --col-w: min(88vw, 384px); }
  .deck { gap: 10px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px)); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: center; }
  .topbar { padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); gap: 10px; }
  .brand .zg-sub { display: none; }
  .tab { padding: 7px 13px; }
  .topbar-stats .hide-sm { display: none; }
  .brief-inner { padding: 20px 16px calc(60px + env(safe-area-inset-bottom, 0px)); }
  .brief-overview { font-size: 16px; }
  .theme-grid { grid-template-columns: 1fr; }
  .col-tool, .fpill, .ev-chip, .pod-expand { min-height: 44px; }
  .col-tool { width: 44px; }
  .tab { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .update-pill-dot, .dj-caret { animation: none; }  /* caret freezes visible */
}
