/* ============================================
   ZIPNEWS — Apple News-Inspired Homepage CSS

   Design pillars:
   1. Typography-first — big bold headlines, tight tracking
   2. Single continuous scroll — sections, not pages
   3. Content density with breathing room
   4. Source headlines = the product
   5. Minimal chrome — content is the UI
   ============================================ */

html { scroll-behavior: smooth; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

:root {
  --bg: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --surface: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --accent: #D63031;
  --accent-light: rgba(214,48,49,0.06);
  --border: #D2D2D7;
  --border-light: #E8E8ED;
  --border-lighter: #F2F2F7;
  --blue: #0066CC;
  --blue-light: rgba(0,102,204,0.06);
  --purple: #6E4AFF;
  --video-red: #FF3B30;
  --gold: #FF9F0A;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

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

html { overflow-x: hidden; width: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

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

/* ── STICKY HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0,0,0,0.09);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 32px;
  overflow: hidden;
}
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo svg { height: 28px; width: auto; }

/* Nav — scroll-to anchor links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s;
  white-space: nowrap;
  position: relative;
}
.header-nav a:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
.header-nav a.active {
  color: var(--text-primary);
  font-weight: 600;
}
.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background 0.15s;
}
.header-search:hover { background: rgba(0,0,0,0.07); }

/* ── MAIN ── */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: hidden;
}

/* ── SECTION SYSTEM ── */
.section {
  padding-top: 20px;
  scroll-margin-top: 56px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-label {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}
.section-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: opacity 0.15s;
}
.section-see-all:hover { opacity: 0.7; }
.section-rule {
  height: 0.5px;
  background: var(--border-light);
  margin-top: 20px;
}

/* ── BADGES / META ── */
.cat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
}
.source-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.source-count svg { width: 12px; height: 12px; }
.time-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}
.ai-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple);
  background: rgba(110,74,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── TOP STORIES HERO ── */
.hero {
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6px;
  min-height: 520px;
}

/* Left: big image + overlay */
.hero-feature {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  cursor: pointer;
}
.hero-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  opacity: 0.88;
  transition: opacity 0.3s;
}
.hero-feature:hover img { opacity: 0.78; }
.hero-feature-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 36px;
  background: linear-gradient(transparent 0%, rgba(0,0,0,0.85) 100%);
  color: #fff;
}
.hero-feature-content .cat-label { color: #FF6B6B; letter-spacing: 1px; }
.hero-feature-content h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin: 10px 0 12px;
}
.hero-feature-content p {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.75);
  max-width: 540px;
}
.hero-feature-content .meta-row { margin-top: 14px; }
.hero-feature-content .source-count { color: rgba(255,255,255,0.7); }
.hero-feature-content .source-count svg { stroke: rgba(255,255,255,0.7); }
.hero-feature-content .time-label { color: rgba(255,255,255,0.5); }
.tap-hint { font-size: 11px; color: rgba(255,255,255,0.45); margin-left: auto; }

/* Right: stacked mini-hero cards */
.hero-stories {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.story-card {
  flex: 1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
  display: block;
}
.story-card:hover .story-card-thumb img { transform: scale(1.06); opacity: 0.7; }
.story-card-thumb {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.story-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  opacity: 0.8;
  transition: transform 0.4s, opacity 0.3s;
}
.story-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 14px 18px;
  background: linear-gradient(to bottom, transparent 15%, rgba(0,0,0,0.75) 100%);
  color: #fff;
}
.story-card-content .cat-label {
  color: #FF6B6B;
  letter-spacing: 1px;
}
.story-card-content h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
  margin: 5px 0 0;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-content .meta-row { margin-top: 6px; }
.story-card-content .source-count { color: rgba(255,255,255,0.7); font-size: 12px; }
.story-card-content .source-count svg { stroke: rgba(255,255,255,0.7); }
.story-card-content .time-label { color: rgba(255,255,255,0.5); font-size: 12px; }
.story-card .source-list { display: none; }

/* Source pub/title styles */
.source-pub {
  font-weight: 600;
  color: var(--blue);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  width: 90px;
  flex-shrink: 0;
  padding-top: 1px;
}
.source-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── DECODED SPOTLIGHT ── */
.decoded-section {
  padding-top: 20px;
  scroll-margin-top: 56px;
}
.decoded-card {
  display: block;
  background: #1D1D1F;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.decoded-card:hover { transform: translateY(-2px); }
.decoded-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.decoded-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.decoded-body h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.decoded-body p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
}
.decoded-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.decoded-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── VIDEO SECTION ── */
.video-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.vid-card {
  transition: transform 0.2s;
}
.vid-card:hover { transform: translateY(-2px); }

.vid-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111;
}
.vid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.vid-card:hover .vid-thumb img { opacity: 0.85; }

.vid-card-wrap { position: relative; cursor: pointer; }
.vid-live {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: var(--video-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: livePulse 2s infinite;
  pointer-events: none;
}
.vid-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:.65} }

/* Video accordion expand */
.vid-card.expanded {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
}
.vid-card.expanded .vid-card-wrap { display: none; }
.vid-card.expanded .vid-info { display: none; }
.vid-expand { display: none; }
.vid-card.expanded .vid-expand { display: block; }

.video-row:has(.vid-card.expanded) .vid-card:not(.expanded) { display: none; }
.video-row:has(.vid-card.expanded) { grid-template-columns: 1fr; }

/* Expand layout: player+info left, sidebar right */
.vid-expand-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.vid-expand-main { min-width: 0; }

.vid-expand-player {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background: #000;
}
.vid-expand-player iframe { width: 100%; height: 100%; border: none; }

/* Player control bar */
.vid-ctrl-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 10px 0 14px;
}
.vid-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 0.5px solid var(--border-light);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.vid-ctrl-btn:hover { color: var(--text-primary); border-color: var(--border); }
.vid-ctrl-btn.active { color: var(--blue); border-color: rgba(0,102,204,0.3); background: var(--blue-light); }
.vid-ctrl-btn svg { width: 14px; height: 14px; }
.vid-ctrl-close {
  margin-left: auto;
  color: var(--text-tertiary);
  background: none;
  border: 0.5px solid transparent;
}
.vid-ctrl-close:hover { color: var(--accent); background: var(--accent-light); }

.vid-expand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.vid-expand-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.vid-expand-channel { font-size: 14px; font-weight: 600; color: var(--blue); }
.vid-expand-sources { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.vid-expand-sources svg { width: 13px; height: 13px; }

.vid-expand-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.vid-expand-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vid-expand-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 0.5px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.vid-expand-actions button:hover { color: var(--text-primary); border-color: var(--border); }
.vid-expand-actions button svg { width: 14px; height: 14px; }
.vid-expand-actions .read-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Sidebar: Up Next thumbnails */
.vid-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  align-self: stretch;
  border-left: 0.5px solid var(--border-lighter);
  padding-left: 20px;
}
.vid-sidebar::-webkit-scrollbar { width: 4px; }
.vid-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.vid-sidebar::-webkit-scrollbar-track { background: transparent; }
.vid-sidebar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vid-sidebar-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.vid-sidebar-item:hover { background: rgba(0,0,0,0.04); }
.vid-sidebar-item.now-playing { background: rgba(0,102,204,0.06); border: 0.5px solid rgba(0,102,204,0.15); }
.vid-sidebar-thumb {
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  position: relative;
}
.vid-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-sidebar-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
}
.vid-sidebar-badge.vid-sidebar-live {
  background: #e63946;
}
.vid-sidebar-info h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vid-sidebar-info .vid-channel {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Theater mode */
.vid-card.theater .vid-expand-layout {
  grid-template-columns: 1fr;
}
.vid-card.theater .vid-sidebar { display: none; }

/* In-page fullscreen overlay */
.vid-fullpage-overlay {
  display: none;
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}
.vid-fullpage-overlay.active { display: flex; align-items: flex-start; justify-content: center; padding-top: 20px; }
.vid-fullpage-container {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  width: 92vw;
  max-width: 1280px;
  height: calc(100vh - 100px);
  resize: both;
  min-width: 500px;
  min-height: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}
.vid-fullpage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #1D1D1F;
  color: #fff;
  cursor: move;
  user-select: none;
}
.vid-fullpage-header h4 {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 12px;
}
.vid-fullpage-header-btns { display: flex; gap: 6px; flex-shrink: 0; }
.vid-fullpage-header-btns button {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vid-fullpage-header-btns button:hover { background: rgba(255,255,255,0.2); }
.vid-fullpage-header-btns button svg { width: 14px; height: 14px; }
.vid-fullpage-player {
  flex: 1;
  background: #000;
  min-height: 200px;
}
.vid-fullpage-player iframe { width: 100%; height: 100%; border: none; display: block; }

/* Auto-next countdown toast */
.vid-autonext-toast {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  animation: fadeInUp 0.3s ease;
}
.vid-autonext-toast strong { color: var(--gold); font-size: 15px; }
.vid-autonext-cancel {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.vid-autonext-cancel:hover { background: rgba(255,255,255,0.25); }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.vid-info { padding: 12px 2px 0; cursor: pointer; }
.vid-info h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.1px;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vid-channel {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── SOURCE PICKER BOTTOM SHEET ── */
.source-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}
.story-card-content .source-badge {
  margin-top: 6px;
  font-size: 11px;
  padding: 3px 10px;
}

.source-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: spOverlayIn 0.2s ease;
}
@keyframes spOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.source-picker-sheet {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 24px 24px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
}
.source-picker-sheet.active {
  transform: translateY(0);
}
.source-picker-sheet::-webkit-scrollbar { width: 4px; }
.source-picker-sheet::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.source-picker-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.source-picker-header h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  flex: 1;
}
.source-picker-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.source-picker-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.source-picker-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.source-picker-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.source-picker-sources .source-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.source-picker-sources .source-card:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}
.source-picker-sources .source-card-pub {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.source-picker-sources .source-card-title {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source-picker-zipnews {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-light);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
.source-picker-zipnews:hover {
  background: rgba(0,102,204,0.12);
}
.source-picker-zipnews svg {
  flex-shrink: 0;
}

/* Desktop: center the sheet as a card */
@media (min-width: 769px) {
  .source-picker-overlay {
    align-items: center;
  }
  .source-picker-sheet {
    border-radius: 16px;
    max-height: 60vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
  }
  .source-picker-sheet.active {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── CATEGORY STORY LIST (Apple News style) ── */
.story-list {
  display: flex;
  flex-direction: column;
}
.story-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 20px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--border-lighter);
  cursor: pointer;
  position: relative;
}
.story-list-item:first-child { padding-top: 0; }
.story-list-item:last-child { border-bottom: none; }
.story-list-item h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.2px;
  margin: 4px 0 6px;
  transition: color 0.15s;
  overflow-wrap: break-word;
  word-break: break-word;
}
.story-list-item h3 a { color: inherit; text-decoration: none; }
.story-list-item h3 a:hover { color: var(--accent); }
.story-list-item:hover h3 { color: var(--accent); }
.story-list-item .source-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}
.story-list-item .source-list li {
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-secondary);
}
.story-list-item .source-list li .source-pub {
  display: block;
  margin-bottom: 1px;
}
.story-list-item .source-list li .source-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-tertiary);
  font-size: 12.5px;
}
.story-list-item .source-list li:hover { color: var(--text-primary); }
.story-list-thumb {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.story-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.story-list-item:hover .story-list-thumb img { transform: scale(1.05); }

/* Expand chevron indicator */
.story-list-item .expand-hint {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  transition: transform 0.3s, color 0.2s;
  opacity: 0;
}
.story-list-item:hover .expand-hint { opacity: 1; }
.story-list-item.expanded .expand-hint { transform: translateY(-50%) rotate(180deg); color: var(--accent); opacity: 1; }

/* ── EXPANDABLE PANEL ── */
.story-expand {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}
.story-list-item.expanded .story-expand {
  max-height: 600px;
  opacity: 1;
}
.story-list-item.expanded {
  background: var(--bg-secondary);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: var(--radius);
  border-bottom-color: transparent;
}
.story-list-item.expanded + .story-list-item { padding-top: 16px; }

.expand-inner {
  padding: 4px 0 16px;
}

/* AI Summary */
.ai-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.ai-summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--purple);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Source cards grid */
.source-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.source-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.source-card:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(0,102,204,0.08);
}
.source-card-pub {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.source-card-title {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.source-card-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--blue);
  margin-left: auto;
}

/* Action bar (bookmark, share) */
.expand-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.expand-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 0.5px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.expand-actions button:hover { color: var(--text-primary); border-color: var(--border); }
.expand-actions button.bookmarked { color: var(--gold); border-color: rgba(255,159,10,0.3); }
.expand-actions button svg { width: 14px; height: 14px; }
.expand-actions .read-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.expand-actions .read-count svg { width: 13px; height: 13px; }

/* ── FOOTER ── */
.footer {
  margin-top: 40px;
  border-top: 0.5px solid var(--border-light);
  padding: 24px 24px 32px;
  background: var(--bg-secondary);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-apps { display: flex; gap: 10px; align-items: center; }
.footer-apps a { display: block; opacity: 0.7; transition: opacity 0.15s; }
.footer-apps a:hover { opacity: 1; }
.footer-apps img { height: 36px; width: auto; display: block; border-radius: 6px; }
.footer-copy { font-size: 12px; color: var(--text-tertiary); }

/* ── SKELETON LOADING ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, #EAEAEF 37%, var(--bg-secondary) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.skeleton-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6px;
  min-height: 520px;
  padding-top: 16px;
}
.skeleton-hero-feature {
  border-radius: var(--radius);
}
.skeleton-hero-stories {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skeleton-hero-stories .skeleton {
  flex: 1;
  border-radius: var(--radius);
}

.skeleton-decoded {
  height: 280px;
  border-radius: var(--radius);
  margin-top: 20px;
}

.skeleton-video-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 14px;
}
.skeleton-video-card {
  border-radius: var(--radius-sm);
  aspect-ratio: 16/9;
}
.skeleton-video-title {
  height: 16px;
  margin-top: 12px;
  width: 80%;
  border-radius: 4px;
}
.skeleton-video-meta {
  height: 12px;
  margin-top: 8px;
  width: 50%;
  border-radius: 4px;
}

.skeleton-story-list {
  margin-top: 14px;
}
.skeleton-story-item {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--border-lighter);
}
.skeleton-story-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-story-cat {
  height: 12px;
  width: 60px;
  border-radius: 4px;
}
.skeleton-story-headline {
  height: 20px;
  width: 90%;
  border-radius: 4px;
}
.skeleton-story-source {
  height: 14px;
  width: 70%;
  border-radius: 4px;
}
.skeleton-story-meta {
  height: 12px;
  width: 40%;
  border-radius: 4px;
}
.skeleton-story-thumb {
  aspect-ratio: 4/3;
  border-radius: 10px;
}

/* ── ERROR STATES ── */
.section-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}
.section-error svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.section-error p {
  font-size: 14px;
  margin-bottom: 12px;
}
.section-error button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-light);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.section-error button:hover {
  background: rgba(0,102,204,0.12);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 6px; }
  .hero-feature { min-height: 360px; }
  .hero-stories { flex-direction: row; gap: 6px; }
  .story-card { min-height: 180px; }
  .decoded-card { grid-template-columns: 1fr; }
  .decoded-img { display: none; }
  .video-row { grid-template-columns: 1fr 1fr; }
  .vid-thumb { max-height: 220px; }
  .vid-expand-layout { grid-template-columns: 1fr 260px; }
  .vid-sidebar-item { grid-template-columns: 110px 1fr; }
  .story-list-item { grid-template-columns: minmax(0, 1fr) 140px; }
  .skeleton-hero { grid-template-columns: 1fr; min-height: auto; }
  .skeleton-hero-stories { flex-direction: row; }
  .skeleton-video-row { grid-template-columns: 1fr 1fr; }
  .skeleton-story-item { grid-template-columns: 1fr 140px; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hero-feature-content h1 { font-size: 24px; }
  .hero-feature-content { padding: 24px; }
  .hero-stories { flex-direction: column; gap: 6px; }
  .story-card { min-height: 150px; }
  .story-card-content h3 { font-size: 14px; }
  .video-row { grid-template-columns: 1fr; }
  .vid-thumb { max-height: 260px; }
  .vid-expand-layout { grid-template-columns: 1fr; }
  .vid-sidebar { flex-direction: row; overflow-x: auto; }
  .vid-sidebar-item { grid-template-columns: 120px 1fr; min-width: 260px; flex-shrink: 0; }
  .story-list-item { grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; }
  .story-list-item h3 { font-size: 15px; }
  .story-list-item.expanded { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .story-list-item .source-list { margin-top: 4px; gap: 2px; }
  .story-list-item .source-list li { display: flex; align-items: baseline; overflow: hidden; }
  .story-list-item .source-list li .source-pub { display: inline; font-size: 12px; flex-shrink: 0; }
  .story-list-item .source-list li .source-pub::after { content: ': '; }
  .story-list-item .source-list li .source-title { display: inline; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .story-list-item .source-list li:nth-child(n+2) { display: none; }
  .source-cards { grid-template-columns: 1fr; }
  .section-label { font-size: 18px; }
  .decoded-body h2 { font-size: 22px; }
  .decoded-body { padding: 24px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .footer-apps { justify-content: center; }
  .section { padding-top: 16px; }
  .skeleton-hero-stories { flex-direction: column; }
  .skeleton-video-row { grid-template-columns: 1fr; }
  .skeleton-story-item { grid-template-columns: 1fr 120px; }
}

/* ── HAMBURGER MENU (mobile only) ── */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 101;
}
.hamburger-menu span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger-menu span + span { margin-top: 5px; }
.hamburger-menu.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.mobile-nav-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; max-width: 80vw;
  background: var(--bg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav-drawer.active { transform: translateX(0); }

.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--border-light);
}
.mobile-nav-logo { height: 24px; width: auto; }
.mobile-nav-close {
  background: none; border: none; font-size: 28px; line-height: 1;
  color: var(--text-tertiary); cursor: pointer; padding: 4px 8px;
}

.mobile-nav-links {
  display: flex; flex-direction: column;
  padding: 12px 0;
}
.mobile-nav-links a {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary);
  padding: 14px 24px;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-links a:active,
.mobile-nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

@media (max-width: 768px) {
  .hamburger-menu { display: flex; flex-direction: column; justify-content: center; }
  .header-actions { flex: 1; min-width: 0; }
  .header-search { flex: 1; padding: 10px 14px; font-size: 14px; }
  .header-search svg { width: 16px; height: 16px; }
}

/* Scroll spy active indicator (desktop only) */
@media (min-width: 769px) {
  .header-nav a { transition: color 0.15s, font-weight 0.15s; }
}
