/* D'NEWS — design tokens + base */
:root {
  --bg: #ffffff;
  --bg-soft: #fafaf7;
  --bg-cream: #faf6ee;
  --ink: #0b0b0c;
  --ink-2: #1f2024;
  --ink-3: #4b4f57;
  --ink-4: #7a7e88;
  --line: #e8e6e1;
  --line-2: #ececec;
  --orange: #d97706;
  --orange-bg: #fff7ea;
  --orange-bd: #f4d28a;
  --red: #d6332b;
  --red-2: #ef4444;
  --green: #1f9d55;
  --blue: #2563eb;
  --pill-bg: #f3f3f0;
  --tag-bg: #eef2ff;
  --tag-ink: #3b3f47;
  --score-track: #f1efe9;

  /* Single typeface across the entire app */
  --serif: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans:  "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "Inter", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- DEVICE FRAME SWITCH (top of preview) ---------- */
.frame-switch {
  position: fixed; top: 12px; right: 14px; z-index: 80;
  display: flex; gap: 4px; padding: 4px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
}
.frame-switch button {
  background: transparent; border: 0; padding: 6px 12px; border-radius: 999px;
  color: var(--ink-3); text-transform: uppercase;
}
.frame-switch button.on { background: var(--ink); color: #fff; }

/* =========================================================
   MARKET TICKER (top sticky bar — appears on every screen)
   ========================================================= */
.ticker {
  display: flex; align-items: center; gap: 26px;
  padding: 6px 22px; height: 30px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
  background: var(--bg);
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
}
.ticker::-webkit-scrollbar { display: none; }
.ticker-item { display: inline-flex; gap: 7px; align-items: baseline; }
.ticker-name { color: var(--ink); font-weight: 700; letter-spacing: .01em; }
.ticker-value { color: var(--ink-2); font-weight: 600; }
.ticker-change { font-size: 11.5px; font-weight: 600; }
.ticker-change.up { color: var(--green); }
.ticker-change.down { color: var(--red-2); }

/* =========================================================
   TOP NAV
   ========================================================= */
.topnav {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  position: fixed; top: 30px; left: 0; right: 0; z-index: 30;
}
.app.view-desktop { padding-top: 96px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800; font-size: 17px;
  letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-sub  { font-size: 9.5px; letter-spacing: .14em; color: var(--ink-4); margin-top: 4px; font-weight: 600; }

.topnav-center { display: flex; gap: 4px; }
.topnav-center button {
  background: transparent; border: 0; padding: 7px 13px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  border-radius: 7px;
}
.topnav-center button:hover { background: var(--bg-soft); }
.topnav-center button.active { color: var(--ink); font-weight: 700; background: var(--bg-soft); }

.topnav-right { display: flex; gap: 4px; justify-self: end; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-soft); border-color: var(--line); }
.icon-btn.active { background: var(--bg-soft); border-color: var(--line-2); }

/* =========================================================
   BREAKING BANNER
   ========================================================= */
.breaking {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 22px;
  background: var(--red); color: #fff;
  font-size: 13.5px;
}
.breaking-tag {
  font-weight: 800; letter-spacing: .12em; font-size: 11.5px;
  display: inline-flex; align-items: center; gap: 6px;
}
.breaking-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(255,255,255,.7)} 70%{box-shadow:0 0 0 8px rgba(255,255,255,0)} 100%{box-shadow:0 0 0 0 rgba(255,255,255,0)} }
.breaking-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breaking-close {
  background: transparent; border: 0; color: #fff; font-size: 18px; line-height: 1;
  width: 24px; height: 24px; border-radius: 4px;
}
.breaking-close:hover { background: rgba(255,255,255,.15); }

/* =========================================================
   PAGE LAYOUT
   ========================================================= */
.page {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px; max-width: 1240px; margin: 0 auto;
  padding: 22px 28px 60px;
}
.section-h {
  display: flex; align-items: baseline; gap: 10px; margin: 4px 0 14px;
}
.section-h h2 {
  font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 0; letter-spacing: -.01em;
}
.section-h .pill {
  font-size: 11px; padding: 2px 8px; background: var(--bg-soft); color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600;
}
.section-h .sub { color: var(--ink-4); font-size: 12.5px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.page-eyebrow { font-size: 10.5px; letter-spacing: .16em; color: var(--orange); font-weight: 700; text-transform: uppercase; }
.page-title { font-family: var(--serif); font-size: 21px; margin: 4px 0 0; font-weight: 600; }
.page-title .ai { display: inline-flex; align-items: center; gap: 6px; }
.page-title .ai svg { color: var(--orange); }
.page-meta { color: var(--ink-4); font-size: 12px; margin-left: 8px; font-weight: 500; }

.briefing-toggle {
  display: inline-flex; gap: 4px; padding: 3px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  font-size: 12px;
}
.briefing-toggle button {
  background: transparent; border: 0; padding: 5px 10px; border-radius: 6px;
  color: var(--ink-3); display: inline-flex; gap: 5px; align-items: center; font-weight: 600;
}
.briefing-toggle button.on { background: var(--ink); color: #fff; }

/* ---------- HERO CARD ---------- */
.hero {
  background: #0b1220; color: #f5f5f0; border-radius: var(--radius-lg);
  padding: 22px 24px 18px; margin-bottom: 26px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 200px at 90% -10%, rgba(217,119,6,.18), transparent 60%),
    radial-gradient(500px 220px at 0% 110%, rgba(214,51,43,.18), transparent 60%);
  pointer-events: none;
}
.hero-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; position: relative; z-index: 1; }
.hero-tag { background: rgba(255,255,255,.08); padding: 3px 9px; border-radius: 999px; color: #fff; font-weight: 600; }
.hero-date { color: #b3b8c4; }
.hero-title {
  font-family: var(--serif); font-size: 30px; line-height: 1.18; font-weight: 700;
  margin: 14px 0 10px; letter-spacing: -.015em; max-width: 720px;
  position: relative; z-index: 1;
}
.hero-summary { color: #cfd3dc; font-size: 14.5px; max-width: 640px; line-height: 1.55; position: relative; z-index: 1; }
.hero-why {
  margin-top: 18px;
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px; color: #d8dce4;
  position: relative; z-index: 1;
}
.hero-why .lbl { color: var(--orange); font-weight: 700; margin-right: 6px; }
.hero-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 12px; color: #aab0bd; position: relative; z-index: 1; }
.hero-foot button {
  background: transparent; border: 0; color: #aab0bd; display: inline-flex; gap: 6px; align-items: center; font-size: 12px;
}
.hero-foot .saved { color: #fff; }
.hero-foot .saved svg { color: var(--orange); }

/* ---------- STORY CARD (list) ---------- */
.story {
  padding: 18px 0 18px;
  border-bottom: 1px solid var(--line);
}
.story:last-child { border-bottom: 0; }
.story-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 5px; font-weight: 600;
  background: var(--tag-bg); color: var(--tag-ink); letter-spacing: .01em;
}
.tag.urgent { background: #fef2f2; color: var(--red); }
.tag.breaking {
  background: var(--red); color: #fff; padding-left: 18px; position: relative;
  text-transform: uppercase; letter-spacing: .08em;
}
.tag.breaking::before {
  content: ""; position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
}
.tag.world    { background: #eff6ff; color: #1d4ed8; }
.tag.markets  { background: #ecfdf5; color: #047857; }
.tag.economy  { background: #fef3c7; color: #92400e; }
.tag.politics { background: #fdf4ff; color: #86198f; }
.tag.chile    { background: #fff1f2; color: #be123c; }
.tag.geopolitics { background: #f1f5f9; color: #334155; }
.tag.guerra   { background: #fee2e2; color: #991b1b; }
.tag.mining   { background: #f0fdfa; color: #0f766e; }

.story-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.story-headline { font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0 0 6px; letter-spacing: -.005em; cursor: pointer; }
.story-headline:hover { color: var(--ink-3); }
.story-summary { color: var(--ink-3); font-size: 13.5px; line-height: 1.55; margin: 0; }

.story-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.story-side .icon-btn { width: 28px; height: 28px; }
.story-side .expand { color: var(--ink-4); border: 0; background: transparent; padding: 4px; }

.why-box {
  margin-top: 12px;
  background: var(--orange-bg);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  padding: 10px 13px;
  font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
  display: flex; gap: 8px;
}
.why-box .icon { color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.why-box .lbl { color: var(--orange); font-weight: 700; margin-right: 4px; }

.story-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
  font-size: 12px; color: var(--ink-4);
}
.story-foot .src { font-weight: 600; color: var(--ink-3); }
.story-foot .sep { color: var(--line); }
.story-foot .country { color: var(--ink-3); }

.score-bar {
  width: 80px; height: 3px; background: var(--score-track); border-radius: 99px; overflow: hidden;
  display: inline-block; margin-left: auto;
}
.score-bar > span { display: block; height: 100%; background: var(--red); border-radius: 99px; }
.score-num { font-size: 11px; color: var(--ink-4); margin-left: 8px; font-weight: 600; font-feature-settings: "tnum"; }

/* expanded story detail */
.story-detail {
  margin-top: 14px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--line-2);
}
.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-h { font-family: var(--serif); font-size: 13px; font-weight: 700; margin: 0 0 8px; color: var(--ink); letter-spacing: .04em; text-transform: uppercase; }
.detail-bullets { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.s-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  padding: 16px;
}
.s-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.s-card-h h3 { margin: 0; font-family: var(--serif); font-size: 15px; font-weight: 700; }
.s-card-h .ai { color: var(--orange); }

.s-briefing-line { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }

.markets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.markets-cell { font-size: 11.5px; }
.markets-cell .name { color: var(--ink-4); font-weight: 600; }
.markets-cell .row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.markets-cell .val { font-size: 14px; font-weight: 700; color: var(--ink); font-feature-settings: "tnum"; }
.markets-cell .chg { font-size: 11px; font-weight: 600; }
.markets-cell .chg.up { color: var(--green); }
.markets-cell .chg.down { color: var(--red-2); }

.trending-list { display: flex; flex-direction: column; gap: 4px; }
.trending-row {
  display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center;
  padding: 7px 4px; border-radius: 6px; cursor: pointer;
}
.trending-row:hover { background: var(--bg-soft); }
.trending-rank { color: var(--ink-4); font-size: 11px; font-weight: 700; font-feature-settings: "tnum"; }
.trending-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.trending-count { color: var(--ink-4); font-size: 11px; font-weight: 600; font-feature-settings: "tnum"; }

/* =========================================================
   DAILY BRIEF VIEW
   ========================================================= */
.brief-page { max-width: 800px; margin: 0 auto; padding: 36px 28px 80px; }
.brief-eyebrow { display: inline-flex; gap: 6px; padding: 5px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); align-items: center; }
.brief-title { font-family: var(--serif); font-size: 38px; font-weight: 700; letter-spacing: -.02em; text-align: center; margin: 12px 0 6px; }
.brief-sub { text-align: center; color: var(--ink-4); font-size: 13px; }
.brief-section-h { font-family: var(--serif); font-weight: 700; font-size: 16px; margin: 32px 0 4px; display: inline-flex; gap: 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); width: 100%; }
.brief-section-h .icon { color: var(--ink-3); }

.brief-item { display: grid; grid-template-columns: 24px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.brief-item:last-child { border-bottom: 0; }
.brief-num { font-family: var(--serif); font-size: 16px; color: var(--ink-3); font-weight: 600; padding-top: 1px; }
.brief-h { font-family: var(--serif); font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.brief-sum { font-size: 13px; color: var(--ink-3); margin: 0 0 10px; line-height: 1.55; }
.brief-meta { font-size: 11px; color: var(--ink-4); margin-top: 8px; }

/* =========================================================
   SAVED VIEW
   ========================================================= */
.saved-page { max-width: 800px; margin: 0 auto; padding: 26px 28px 80px; }
.saved-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.saved-title { display: flex; align-items: baseline; gap: 10px; }
.saved-title h1 { font-family: var(--serif); font-size: 24px; margin: 0; font-weight: 700; }
.saved-title .count { font-size: 11.5px; padding: 2px 8px; background: var(--bg-soft); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600; }
.saved-sub { color: var(--orange); font-size: 12px; font-weight: 500; margin-top: 2px; }

.saved-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px;
  margin: 6px 0 16px; background: var(--bg-soft);
}
.saved-tabs button {
  background: transparent; border: 0; padding: 7px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); display: inline-flex; gap: 7px; align-items: center;
}
.saved-tabs button.on { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }

/* clusters */
.cluster-info {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  background: var(--bg-soft); margin-bottom: 14px;
}
.cluster-info-h { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13.5px; }
.cluster-info-h .ico { color: var(--ink-3); }
.cluster-info-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.cluster-regroup {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.cluster-count-h { font-size: 11px; letter-spacing: .14em; color: var(--ink-4); font-weight: 700; margin: 14px 0 8px; }

.cluster {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.cluster.open { box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.cluster-head {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px; cursor: pointer;
}
.cluster-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.cluster.hot .cluster-dot { background: var(--red); }
.cluster-title { display: flex; flex-direction: column; min-width: 0; }
.cluster-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cluster-title-row strong { font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: -.005em; }
.cluster-title-row .badge { font-size: 11px; padding: 2px 8px; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-3); font-weight: 600; }
.cluster-lead { font-size: 12px; color: var(--blue); margin-top: 3px; line-height: 1.4; }
.cluster-stats { display: inline-flex; gap: 10px; align-items: center; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.cluster-stats .stat { display: inline-flex; gap: 4px; align-items: center; }
.cluster-chev { transition: transform .2s; color: var(--ink-4); }
.cluster.open .cluster-chev { transform: rotate(180deg); }

.cluster-body {
  border-top: 1px solid var(--line-2);
  padding: 14px 18px 16px;
  background: var(--bg);
}
.cluster-body-h { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-4); font-weight: 700; margin-bottom: 10px; }
.cluster-item {
  position: relative; padding: 7px 0 7px 18px;
  font-size: 12.5px; line-height: 1.4;
}
.cluster-item::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px; border-radius: 1px; background: var(--ink-4); opacity: .6;
}
.cluster-item .item-title { color: var(--ink); font-weight: 500; display: block; }
.cluster-item .item-meta { color: var(--ink-4); font-size: 11px; margin-top: 2px; }
.cluster-analyze {
  margin-top: 14px; width: 100%;
  padding: 11px; background: transparent; border: 1px dashed var(--line); border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; gap: 7px; align-items: center; justify-content: center;
}
.cluster-analyze:hover { background: var(--bg-soft); border-style: solid; }

/* footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 16px 28px;
  display: flex; justify-content: space-between; max-width: 1240px; margin: 0 auto;
  font-size: 11.5px; color: var(--ink-4);
}
.foot a { color: var(--ink-3); margin-left: 18px; font-weight: 500; }

/* =========================================================
   MOBILE FRAME
   ========================================================= */
.app.view-mobile { background: #f1efe9; min-height: 100vh; padding: 24px 0 60px; }
.mobile-frame {
  width: 390px; height: 844px;
  margin: 28px auto 0;
  border-radius: 44px; padding: 12px;
  background: #1a1a1a;
  box-shadow: 0 30px 80px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.1);
  position: relative;
}
.mobile-frame::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 30px; background: #000; border-radius: 999px; z-index: 5;
}
.mobile-screen {
  width: 100%; height: 100%; border-radius: 34px; overflow: hidden;
  background: var(--bg);
  display: flex; flex-direction: column;
  position: relative;
}
.m-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px 6px; font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.m-status-r { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }

/* mobile header (sticky inside scroll) */
.m-shell { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.m-shell::-webkit-scrollbar { width: 0; }
.m-ticker {
  display: flex; gap: 16px; padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 600;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.m-ticker::-webkit-scrollbar { display: none; }
.m-ticker .ticker-item { gap: 5px; }
.m-ticker .ticker-name { font-size: 10.5px; }
.m-ticker .ticker-value { font-size: 11px; }
.m-ticker .ticker-change { font-size: 10px; }

.m-topnav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  z-index: 5;
}
.m-cats {
  display: flex; gap: 0; padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  position: sticky; top: 51px; z-index: 4;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.m-cats::-webkit-scrollbar { display: none; }
.m-cats button {
  background: transparent; border: 0;
  padding: 11px 12px 10px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-4);
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  letter-spacing: .005em;
  transition: color .15s;
}
.m-cats button:hover { color: var(--ink-2); }
.m-cats button.on {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--orange);
}
.m-topnav .brand { gap: 8px; }
.m-topnav .brand-mark { width: 30px; height: 30px; border-radius: 7px; font-size: 14px; }
.m-topnav .brand-name { font-size: 14px; }
.m-topnav .brand-sub { font-size: 8px; }
.m-topnav .icons { display: flex; gap: 2px; }
.m-topnav .icons .icon-btn { width: 30px; height: 30px; }

.m-breaking {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 14px;
  background: var(--red); color: #fff;
  font-size: 11.5px;
}
.m-breaking .breaking-tag { font-size: 10px; }
.m-breaking .breaking-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.m-page-head {
  padding: 14px 16px 6px;
}
.m-page-head .page-eyebrow { font-size: 9.5px; }
.m-page-head .page-title { font-size: 16px; }

.m-content { padding: 0 16px 80px; }

.m-hero { padding: 18px 16px 14px; border-radius: 12px; }
.m-hero .hero-title { font-size: 21px; margin: 10px 0 8px; }
.m-hero .hero-summary { font-size: 13px; }
.m-hero .hero-why { font-size: 12px; padding: 10px 12px; }

.m-story-side { display: none; }
.m-story-foot { flex-wrap: wrap; gap: 8px; }
.m-story-foot .score-bar { margin-left: 0; }
.m-story-foot .country { font-size: 11px; }

/* bottom nav */
.m-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 6px 8px 22px;
}
.m-nav button {
  background: transparent; border: 0; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 7px 0; color: var(--ink-4); font-size: 10px; font-weight: 600;
  border-radius: 8px;
}
.m-nav button.on { color: var(--ink); }

/* ---------- DRAWER (mobile filter) ---------- */
.drawer-bd {
  position: absolute; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: flex-end; z-index: 30;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: 100%; background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px 28px;
  animation: slideUp .26s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.drawer-handle { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }
.drawer h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 17px; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-cat {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.drawer-cat.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.drawer-close { width: 100%; margin-top: 14px; padding: 12px; border-radius: 10px; border: 0; background: var(--bg-soft); font-weight: 600; }

/* pull-to-refresh */
.m-pull { display: flex; align-items: flex-end; justify-content: center; overflow: hidden; transition: height .2s; }
.m-pull-inner { display: inline-flex; gap: 8px; padding: 10px; color: var(--ink-3); font-size: 12px; font-weight: 600; }

/* spin */
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   MOBILE — LIVE (teléfono real, auto-detectado)
   Llena la pantalla: sin marco de teléfono, sin notch, sin
   barra "9:41" falsa. La maqueta de iPhone solo se usa cuando
   se elige "Mobile" a mano para previsualizar.
   ========================================================= */
.app.view-mobile-live { background: var(--bg); min-height: 100vh; padding: 0; }
.app.view-mobile-live .mobile-frame {
  width: 100%; max-width: 520px; height: auto; min-height: 100vh;
  margin: 0 auto; padding: 0; border-radius: 0;
  background: var(--bg); box-shadow: none;
}
.app.view-mobile-live .mobile-frame::before { display: none; } /* notch */
.app.view-mobile-live .mobile-screen {
  height: auto; min-height: 100vh; border-radius: 0; overflow: visible;
}
.app.view-mobile-live .m-status { display: none; } /* el teléfono real ya trae su barra */
.app.view-mobile-live .m-shell { flex: none; overflow: visible; }
.app.view-mobile-live .m-ticker { position: static; } /* el ticker base es fixed; en móvil va en flujo */
.app.view-mobile-live .m-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%; max-width: 520px; margin: 0 auto;
  z-index: 60;
}
.app.view-mobile-live .m-content { padding-bottom: 96px; } /* deja aire para la barra fija */

/* responsive desktop → tablet */
@media (max-width: 980px) {
  .page { grid-template-columns: 1fr; }
  .topnav-center { display: none; }
}
