/* ==========================================================================
   Blue Hive Digital — Editorial News Portal Design System (v1.1.0)
   Tokens grounded in /opt/stacks/styleguide/tokens/blue-hive.css
   ========================================================================== */

:root {
  --bh-primary: #0A3663;
  --bh-primary-hover: #0D447D;
  --bh-accent: #2D7DD2;
  --bh-accent-text: #1D5FA7; /* WCAG AA >6.3:1 on #FFFFFF */
  --bh-bg: #F3F4F6;
  --bh-surface: #FFFFFF;
  --bh-surface-elevated: #F8FAFC;
  --bh-surface-glass: rgba(255, 255, 255, 0.88);
  --bh-border: #E2E8F0;
  --bh-border-strong: #CBD5E1;
  --bh-text-heading: #0F172A;
  --bh-text-body: #334155;
  --bh-text-muted: #64748B;
  --bh-why-bg: #EFF6FF;
  --bh-why-border: #1D5FA7;
  --bh-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --bh-shadow-md: 0 10px 28px -8px rgba(15, 23, 42, 0.12);
  --bh-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.22);
  --bh-shimmer-a: #E2E8F0;
  --bh-shimmer-b: #F1F5F9;
  --bh-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bh-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --bh-radius-sm: 8px;
  --bh-radius-md: 14px;
  --bh-radius-lg: 18px;
  --bh-transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --bh-accent-text: #60A5FA; /* WCAG AAA on #0F172A / #162238 */
  --bh-bg: #0B111E;
  --bh-surface: #131E32;
  --bh-surface-elevated: #182640;
  --bh-surface-glass: rgba(11, 17, 30, 0.86);
  --bh-border: #1E2D45;
  --bh-border-strong: #2E4263;
  --bh-text-heading: #F8FAFC;
  --bh-text-body: #CBD5E1;
  --bh-text-muted: #94A3B8;
  --bh-why-bg: rgba(45, 125, 210, 0.11);
  --bh-why-border: #388BFD;
  --bh-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --bh-shadow-md: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
  --bh-shadow-lg: 0 28px 60px -12px rgba(0, 0, 0, 0.75);
  --bh-shimmer-a: #162238;
  --bh-shimmer-b: #1E2E4A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--bh-font-sans);
  background-color: var(--bh-bg);
  color: var(--bh-text-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--bh-transition), color var(--bh-transition);
}

.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;
}

:focus-visible {
  outline: 2px solid var(--bh-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Sticky Glassmorphic Masthead & Topic Rail
   ========================================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bh-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bh-border);
}

.masthead-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--bh-text-heading);
}
.brand-subtitle {
  font-family: var(--bh-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--bh-text-muted);
  margin-top: 2px;
}

.edition-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface);
  color: var(--bh-text-body);
  font-family: var(--bh-font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--bh-transition), background var(--bh-transition);
}
.edition-pill:hover { border-color: var(--bh-accent); color: var(--bh-text-heading); }
.edition-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Search Input */
.search-shell {
  position: relative;
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--bh-text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 36px;
  border-radius: 10px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface);
  color: var(--bh-text-heading);
  font-family: var(--bh-font-sans);
  font-size: 14px;
  transition: border-color var(--bh-transition), box-shadow var(--bh-transition);
}
.search-input::placeholder { color: var(--bh-text-muted); }
.search-input:focus {
  outline: none;
  border-color: var(--bh-accent);
  box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.2);
}
.search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--bh-text-muted);
  font-size: 18px;
  cursor: pointer;
}
.search-clear:hover { color: var(--bh-text-heading); background: var(--bh-surface-elevated); }
.search-kbd {
  position: absolute;
  right: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface-elevated);
  color: var(--bh-text-muted);
  font-family: var(--bh-font-mono);
  font-size: 11px;
  pointer-events: none;
}
.search-input:not(:placeholder-shown) ~ .search-kbd { display: none; }

/* Masthead Actions */
.masthead-actions { display: flex; align-items: center; gap: 8px; }

.date-select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface);
  color: var(--bh-text-heading);
  font-family: var(--bh-font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface);
  color: var(--bh-text-body);
  font-family: var(--bh-font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--bh-transition);
}
.icon-btn:hover { border-color: var(--bh-accent); color: var(--bh-text-heading); }
.icon-btn[aria-pressed="true"] {
  background: var(--bh-primary);
  border-color: var(--bh-primary);
  color: #FFFFFF;
}

.tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #229ED9;
  background: #229ED9;
  color: #FFFFFF;
  font-family: var(--bh-font-sans);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--bh-transition);
}
.tg-btn:hover {
  background: #1B8BC0;
  border-color: #1B8BC0;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}

.tg-banner {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: var(--bh-radius-lg);
  border: 1px solid var(--bh-border);
  background: linear-gradient(135deg, rgba(10, 54, 99, 0.14) 0%, rgba(34, 158, 217, 0.12) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  flex-wrap: wrap;
}
.tg-banner-copy h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--bh-text-heading);
}
.tg-banner-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--bh-text-muted);
}
.tg-banner-cta {
  background: #229ED9;
  border-color: #229ED9;
}
.tg-banner-cta:hover {
  background: #1B8BC0;
  border-color: #1B8BC0;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bh-accent);
  color: #FFFFFF;
  font-family: var(--bh-font-mono);
  font-size: 11px;
  font-weight: 600;
}

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

/* Topic Rail */
.topic-rail {
  border-top: 1px solid var(--bh-border);
  position: relative;
}
.topic-rail-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.topic-rail-inner::-webkit-scrollbar { display: none; }

.topic-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bh-text-muted);
  font-family: var(--bh-font-sans);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: all var(--bh-transition);
}
.topic-tab:hover { color: var(--bh-text-heading); background: var(--bh-surface-elevated); }
.topic-tab.active {
  background: var(--bh-primary);
  border-color: var(--bh-accent);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(10, 54, 99, 0.28);
}
.topic-tab-count {
  font-family: var(--bh-font-mono);
  font-size: 11px;
  opacity: 0.78;
}

/* ==========================================================================
   Main Editorial Layout
   ========================================================================== */
.main-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.edition-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bh-border);
  flex-wrap: wrap;
}
.edition-heading {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--bh-text-heading);
}
.edition-meta {
  margin: 4px 0 0;
  font-family: var(--bh-font-mono);
  font-size: 12px;
  color: var(--bh-text-muted);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface);
  color: var(--bh-text-heading);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--bh-accent); }

/* Hero Lead Story + Responsive Magazine Grid */
.feed-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.story-card {
  display: flex;
  flex-direction: column;
  background: var(--bh-surface);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius-md);
  overflow: hidden;
  box-shadow: var(--bh-shadow-sm);
  cursor: pointer;
  transition: transform var(--bh-transition), box-shadow var(--bh-transition), border-color var(--bh-transition);
}
.story-card:hover {
  transform: translateY(-3px);
  border-color: var(--bh-accent);
  box-shadow: var(--bh-shadow-md);
}
.story-card.is-read .story-title { opacity: 0.72; }

/* Hero Split Layout on Desktop */
.story-card.is-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-radius: var(--bh-radius-lg);
}
.story-card.is-hero .story-media { height: 100%; min-height: 320px; aspect-ratio: auto; }
.story-card.is-hero .story-body { padding: 28px 30px; justify-content: center; }
.story-card.is-hero .story-title { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.22; }
.story-card.is-hero .story-summary { font-size: 15px; -webkit-line-clamp: 4; }

.story-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0A3663 0%, #1E3A5F 55%, #2D7DD2 100%);
}
.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 360ms ease;
}
.story-card:hover .story-media img { transform: scale(1.03); }

.story-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: rgba(255, 255, 255, 0.85);
}

.story-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.topic-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 17, 30, 0.78);
  backdrop-filter: blur(8px);
  color: #F8FAFC;
  font-family: var(--bh-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.read-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #CBD5E1;
  font-family: var(--bh-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.story-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--bh-font-mono);
  font-size: 11px;
  color: var(--bh-accent-text);
  font-weight: 600;
}
.story-date { color: var(--bh-text-muted); font-weight: 500; }

.story-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--bh-text-heading);
}

.story-summary {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--bh-text-body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-why {
  margin: auto 0 14px;
  padding: 11px 13px;
  border-radius: 0 10px 10px 0;
  border-left: 3px solid var(--bh-why-border);
  background: var(--bh-why-bg);
}
.story-why-label {
  font-family: var(--bh-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bh-accent-text);
  margin-bottom: 4px;
}
.story-why-text {
  font-size: 13px;
  line-height: 1.48;
  color: var(--bh-text-body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--bh-border);
}
.story-read-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--bh-accent-text);
}
.story-mini-actions { display: flex; gap: 4px; }
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bh-text-muted);
  cursor: pointer;
  transition: all var(--bh-transition);
}
.mini-btn:hover { background: var(--bh-surface-elevated); color: var(--bh-text-heading); }
.mini-btn[aria-pressed="true"] { color: var(--bh-accent-text); }
.mini-btn[aria-pressed="true"] svg { fill: currentColor; }

/* Skeleton Shimmers */
.skeleton-card {
  background: var(--bh-surface);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius-md);
  overflow: hidden;
  padding-bottom: 18px;
}
.skeleton-block {
  background: linear-gradient(90deg, var(--bh-shimmer-a) 25%, var(--bh-shimmer-b) 50%, var(--bh-shimmer-a) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-media { height: 180px; margin-bottom: 16px; }
.skeleton-line { height: 14px; margin: 10px 18px; border-radius: 6px; }
.skeleton-line.short { width: 42%; }
.skeleton-line.wide { width: 88%; height: 18px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Empty State & Footer */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  background: var(--bh-surface);
  border: 1px dashed var(--bh-border-strong);
  border-radius: var(--bh-radius-lg);
}
.empty-state h2 { margin: 0 0 8px; color: var(--bh-text-heading); font-size: 20px; }
.empty-state p { margin: 0 0 18px; color: var(--bh-text-muted); font-size: 14px; }

.feed-footer { text-align: center; margin-top: 28px; }
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 10px;
  font-family: var(--bh-font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--bh-transition);
}
.btn-primary {
  background: var(--bh-primary);
  border: 1px solid var(--bh-primary);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--bh-primary-hover); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bh-surface);
  border: 1px solid var(--bh-border-strong);
  color: var(--bh-text-heading);
}
.btn-secondary:hover { border-color: var(--bh-accent); }
.stats-line { margin-top: 12px; font-family: var(--bh-font-mono); font-size: 12px; color: var(--bh-text-muted); }

/* ==========================================================================
   Reader Drawer & Bottom Sheet Overlays
   ========================================================================== */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 11, 20, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
}
.overlay-backdrop[hidden] { display: none; }

.reader-drawer {
  width: min(640px, 100vw);
  height: 100%;
  background: var(--bh-surface);
  border-left: 1px solid var(--bh-border);
  box-shadow: var(--bh-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bh-border);
  background: var(--bh-surface);
}
.reader-kicker {
  font-family: var(--bh-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--bh-accent-text);
}
.reader-header-actions { display: flex; gap: 6px; }
.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 40px;
}
.reader-hero-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--bh-radius-md);
  margin-bottom: 20px;
}
.reader-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--bh-text-heading);
}
.reader-meta {
  margin: 0 0 20px;
  font-family: var(--bh-font-mono);
  font-size: 12px;
  color: var(--bh-text-muted);
}
.reader-summary {
  font-size: 16px;
  line-height: 1.7;
  color: var(--bh-text-body);
  margin: 0 0 22px;
  max-width: 65ch;
}
.reader-why {
  padding: 18px 20px;
  border-radius: 0 12px 12px 0;
  border-left: 4px solid var(--bh-why-border);
  background: var(--bh-why-bg);
  margin-bottom: 26px;
}
.reader-why-label {
  font-family: var(--bh-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bh-accent-text);
  margin-bottom: 8px;
}
.reader-why-text { font-size: 15px; line-height: 1.65; color: var(--bh-text-heading); }

/* Bottom Sheet */
#editions-backdrop { align-items: flex-end; justify-content: center; }
.bottom-sheet {
  width: min(520px, 100vw);
  max-height: 80vh;
  background: var(--bh-surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 1px solid var(--bh-border);
  box-shadow: var(--bh-shadow-lg);
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--bh-border-strong);
  margin: 10px auto 2px;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 14px;
  border-bottom: 1px solid var(--bh-border);
}
.sheet-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--bh-text-heading); }
.sheet-body {
  overflow-y: auto;
  padding: 12px 16px 20px;
  display: grid;
  gap: 8px;
}
.edition-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--bh-border);
  background: var(--bh-surface-elevated);
  color: var(--bh-text-heading);
  font-family: var(--bh-font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.edition-option.active {
  background: var(--bh-primary);
  border-color: var(--bh-accent);
  color: #FFFFFF;
}

/* Mobile Bottom Nav */
.mobile-nav { display: none; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid #334155;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--bh-shadow-md);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1023px) {
  .feed-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-card.is-hero { grid-template-columns: 1fr; }
  .story-card.is-hero .story-media { min-height: 220px; aspect-ratio: 16 / 9; }
  .saved-label { display: none; }
}

@media (max-width: 767px) {
  .masthead-inner { padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .date-select-wrap, .saved-toggle, .search-kbd { display: none; }
  .search-shell {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    display: none;
  }
  .search-shell.mobile-open { display: flex; }
  .edition-pill { padding: 4px 10px; font-size: 10px; }
  .topic-rail-inner { padding: 6px 14px; }
  .main-shell { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .feed-container { grid-template-columns: 1fr; gap: 16px; }
  .story-card.is-hero .story-body { padding: 18px; }
  .reader-drawer { width: 100vw; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bh-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--bh-border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--bh-text-muted);
    font-family: var(--bh-font-sans);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }
  .mobile-nav-btn.active { color: var(--bh-accent-text); }
  .mobile-nav-icon-wrap { position: relative; display: inline-flex; }
  .mobile-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--bh-accent);
    color: #FFFFFF;
    font-family: var(--bh-font-mono);
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
