/* ============================================================
   CRYPTO NEWSROOM — Premium Editorial Design System
   Typography: Libre Baskerville (editorial) + Inter (UI)
   Palette: High-tech Crypto (Crisp White / Near-black / Cobalt Blue)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ───────────────────────────────────── */
:root {
  /* Color Palette */
  --color-ink:         #0a0b0c;
  --color-ink-light:   #333333;
  --color-ink-muted:   #666666;
  --color-paper:       #FFFFFF;
  --color-paper-warm:  #F8F9FA;
  --color-paper-dark:  #F1F3F5;
  --color-rule:        #E9ECEF;
  --color-rule-dark:   #DEE2E6;

  --color-accent:      #0047AB;
  --color-accent-dark: #002D72;
  --color-accent-light:#0071CE;
  --color-accent-bg:   #0047AB10;

  --color-masthead:    #0a0b0c;
  --color-nav:         #0a0b0c;
  --color-ticker-bg:   #0a0b0c;

  --color-market-up:   #00C853;
  --color-market-dn:   #D50000;
  --color-market-up-bg:#00C85310;
  --color-market-dn-bg:#D5000010;

  /* Typography */
  --font-editorial:    'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-ui:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:         'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Fluid Type Scale */
  --text-xs:    clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);
  --text-sm:    clamp(0.75rem, 0.71rem + 0.18vw, 0.875rem);
  --text-base:  clamp(0.9375rem, 0.88rem + 0.25vw, 1rem);
  --text-md:    clamp(1.0625rem, 1rem + 0.31vw, 1.125rem);
  --text-lg:    clamp(1.125rem, 1.05rem + 0.38vw, 1.25rem);
  --text-xl:    clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl:   clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --text-3xl:   clamp(1.875rem, 1.6rem + 1vw, 2.25rem);
  --text-4xl:   clamp(2.25rem, 1.8rem + 1.5vw, 2.875rem);
  --text-5xl:   clamp(2.75rem, 2.1rem + 2vw, 3.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --max-width:     1320px;
  --content-width: 740px;
  --gutter:        clamp(1rem, 3vw, 2rem);

  /* Premium Transitions (Not bouncy) */
  --transition-fast:   0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base:   0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow:   0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows (Removed for crisp look) */
  --shadow-sm:  none;
  --shadow-md:  none;
  --shadow-lg:  none;

  /* Border Radius (Removed for crisp look) */
  --radius-sm:  0px;
  --radius-md:  0px;
  --radius-lg:  0px;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family:      var(--font-ui);
  font-size:        var(--text-base);
  line-height:      1.6;
  color:            var(--color-ink);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering:   optimizeLegibility;
  /* Safety net: a stray fixed-width element (a table, a hardcoded grid
     column, etc.) should never be able to force a horizontal scrollbar
     on the whole page — clip at the body level as a last resort on top
     of fixing such elements individually. */
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
.font-editorial { font-family: var(--font-editorial); }
.font-ui        { font-family: var(--font-ui); }

h1, h2, h3, h4 {
  font-family: var(--font-editorial);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.headline-xl { font-size: var(--text-5xl); line-height: 1.1; letter-spacing: -0.03em; }
.headline-lg { font-size: var(--text-3xl); line-height: 1.15; letter-spacing: -0.02em; }
.headline-md { font-size: var(--text-2xl); line-height: 1.2; }
.headline-sm { font-size: var(--text-lg); line-height: 1.25; }
.headline-xs { font-size: var(--text-md); line-height: 1.3; }

.subheadline {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-ink-light);
  font-style: italic;
}

.label-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding: 2px 0;
}
.label-tag.breaking { color: #fff; background: var(--color-accent); padding: 2px 8px; letter-spacing: 0.12em; }
.label-tag.analysis  { color: #1a5276; }
.label-tag.opinion   { color: #5b2c6f; }
.label-tag.sponsored { color: #7f6000; background: #fef9e7; padding: 2px 8px; border: 1px solid #7f6000; }
.label-tag.data      { color: #0a7a3d; }

.byline {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.byline strong { color: var(--color-ink-light); font-weight: 600; }

/* ── Layout Containers (Mobile First) ────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .grid-12 {
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-6);
  }
}

.col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
  grid-column: span 1;
}
@media (min-width: 768px) {
  .col-8  { grid-column: span 8; }
  .col-7  { grid-column: span 7; }
  .col-6  { grid-column: span 6; }
  .col-5  { grid-column: span 5; }
  .col-4  { grid-column: span 4; }
  .col-3  { grid-column: span 3; }
}

/* ── Dividers & Rules ────────────────────────────────────────── */
.rule        { border: none; border-top: 1px solid var(--color-rule); margin: var(--space-6) 0; }
.rule-thick  { border-top: 2px solid var(--color-ink); }
.rule-accent { border-top: 2px solid var(--color-accent); }

/* ── UTILITY BAR ─────────────────────────────────────────────── */
.utility-bar {
  background: var(--color-paper-dark);
  border-bottom: 1px solid var(--color-rule);
  padding: var(--space-2) 0;
}
.utility-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.utility-nav { display: flex; align-items: center; gap: var(--space-5); }
.utility-nav a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  transition: color var(--transition-fast);
}
.utility-nav a:hover { color: var(--color-ink); }
.utility-date { font-size: var(--text-xs); color: var(--color-ink-muted); font-weight: 400; }
@media (max-width: 767px) {
  .utility-bar { display: none; } /* Hide on mobile to save space */
}

/* ── MASTHEAD ────────────────────────────────────────────────── */
.masthead {
  background: var(--color-masthead);
  padding: var(--space-4) 0;
  position: relative;
}
.masthead .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.masthead-brand { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.masthead-logo {
  font-family: var(--font-editorial);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.masthead-logo span { color: var(--color-accent-light); }
/* Image logo: cap height, preserve aspect ratio, never overflow the bar */
.masthead-logo-img {
  display: block;
  height: clamp(24px, 6vw, 40px);
  width: auto;
  max-width: 100%;
}
.masthead-logo-text { align-items: center; }
.masthead-tagline {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 767px) {
  .masthead-tagline { display: none; }
}

.masthead-actions { display: flex; align-items: center; gap: var(--space-3); }
.btn-subscribe, .masthead-search-btn {
  /* 44px min touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-subscribe {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 20px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}
.btn-subscribe:hover { background: var(--color-accent-dark); transform: translateY(-1px); }
.masthead-search-btn {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  padding: 0 16px;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.masthead-search-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* ── PRIMARY NAVIGATION ──────────────────────────────────────── */
.primary-nav {
  background: var(--color-nav);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.primary-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-list { display: flex; align-items: stretch; }
@media (max-width: 767px) {
  .nav-list { display: none; }
}
.nav-item { position: relative; }
.nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 2px;
  background: var(--color-accent-light);
}
.nav-hamburger {
  display: none;
  padding: var(--space-3);
  color: rgba(255,255,255,0.7);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}
@media (max-width: 767px) {
  .nav-hamburger { display: flex; }
}

/* ── RESPONSIVE VISIBILITY UTILITIES ─────────────────────────────
   Toggle visibility only — never force a display value, so each
   element keeps its own display type (flex button, block paragraph,
   etc.) on the breakpoint where it remains visible. */
@media (max-width: 767px) {
  .desktop-only { display: none !important; }
}
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}

/* ── MOBILE SLIDE-DOWN NAV ───────────────────────────────────── */
.mobile-nav {
  display: none;
  background: var(--color-masthead);
  border-top: 1px solid rgba(255,255,255,0.06);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 900;
  padding: 0 var(--space-4) var(--space-6);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.mobile-nav.open { display: block; }
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-nav-list a {
  display: flex;
  align-items: center;
  font-size: var(--text-md);
  color: rgba(255,255,255,0.8);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 44px;
}
.mobile-nav-list a:hover { color: #fff; }
.mobile-nav-subscribe a {
  color: var(--color-accent-light);
  font-weight: 700;
  border-bottom: none;
  margin-top: var(--space-2);
}

/* ── MARKET TICKER ───────────────────────────────────────────── */
.market-ticker-bar {
  background: var(--color-ticker-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  height: 44px; /* 44px min touch target */
}
.ticker-inner { display: flex; align-items: center; height: 100%; }
.ticker-label {
  flex-shrink: 0;
  padding: 0 var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border-right: 1px solid rgba(255,255,255,0.08);
  background: var(--color-ticker-bg);
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}
@media (max-width: 767px) {
  .ticker-label { display: none; }
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 100%;
}
.ticker-track::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .ticker-track {
    overflow-x: visible;
    animation: ticker-scroll 40s linear infinite;
    will-change: transform;
  }
  .ticker-track:hover { animation-play-state: paused; }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-6);
  border-right: 1px solid rgba(255,255,255,0.06);
  height: 100%;
}
.ticker-symbol { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; color: rgba(255,255,255,0.8); }
.ticker-price { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 400; color: rgba(255,255,255,0.7); }
.ticker-change { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 600; }
.ticker-change.up  { color: #2ecc71; }
.ticker-change.dn  { color: #e74c3c; }
.ticker-change.nc  { color: rgba(255,255,255,0.4); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── BREAKING NEWS STRIP ─────────────────────────────────────── */
.breaking-strip { background: var(--color-accent); padding: var(--space-2) 0; overflow: hidden; }
.breaking-strip .container { display: flex; align-items: center; gap: var(--space-4); }
.breaking-label {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.25);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.breaking-items { display: flex; gap: var(--space-8); overflow: hidden; flex: 1; }
.breaking-item { font-size: var(--text-sm); color: rgba(255,255,255,0.9); white-space: nowrap; transition: color var(--transition-fast); }
.breaking-item:hover { color: #fff; text-decoration: underline; }

/* ── HOMEPAGE HERO SECTION ───────────────────────────────────── */
.section-hero { padding: var(--space-6) 0; border-bottom: 1px solid var(--color-rule); }
@media (min-width: 768px) {
  .section-hero { padding: var(--space-8) 0; }
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
@media (min-width: 1024px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    /* stretch (not start) so the side columns match the lead column's
       height — a lone ad-slot filler inside each side column (flex:1)
       then absorbs whatever's left over, instead of the column just
       ending early and leaving blank page underneath it. */
    align-items: stretch;
  }
}
.hero-left, .hero-right { display: flex; flex-direction: column; gap: var(--space-5); }

/* Lead article */
.lead-article { display: flex; flex-direction: column; gap: var(--space-3); }
.lead-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-paper-dark);
  aspect-ratio: 16/10;
  border: 1px solid var(--color-rule);
}
.lead-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.lead-image-wrap:hover img { transform: scale(1.02); }
.lead-caption { font-size: var(--text-xs); color: var(--color-ink-muted); font-style: italic; }

/* Secondary articles (sidebar) */
.secondary-article {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-rule);
}
.secondary-article:last-child { border-bottom: none; padding-bottom: 0; }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-ink);
}
.section-header-left { display: flex; align-items: baseline; gap: var(--space-4); }
.section-title { font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-ink); }
.section-subtitle { font-size: var(--text-xs); color: var(--color-ink-muted); font-style: italic; display: none; }
@media (min-width: 768px) {
  .section-subtitle { display: block; }
}
.section-link {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast);
}
.section-link:hover { gap: 8px; }

/* ── ARTICLE CARDS ───────────────────────────────────────────── */
.article-card {
  display: flex;
  flex-direction: column; /* Mobile: stack vertically */
  gap: var(--space-3);
  transition: opacity var(--transition-fast);
}
.article-card:hover .article-card__title { color: var(--color-accent); }
.article-card__image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-paper-dark);
  aspect-ratio: 16/9;
  border: 1px solid var(--color-rule);
  width: 100%;
  display: block;
}
.article-card__image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.article-card:hover .article-card__image-wrap img { transform: scale(1.04); }
.article-card__body { display: flex; flex-direction: column; gap: var(--space-2); }
.article-card__title {
  font-family: var(--font-editorial);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  transition: color var(--transition-fast);
}
.article-card__summary {
  font-size: var(--text-sm);
  color: var(--color-ink-light);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__meta { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-xs); color: var(--color-ink-muted); }
.article-card__meta .dot { opacity: 0.4; }

/* Horizontal card variant */
.article-card--horizontal {
  flex-direction: column;
}
@media (min-width: 768px) {
  .article-card--horizontal {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-4);
  }
  .article-card--horizontal .article-card__image-wrap {
    flex-shrink: 0;
    width: 120px;
    aspect-ratio: 4/3;
  }
}

/* List card variant (no image) */
.article-card--list { padding: var(--space-4) 0; border-bottom: 1px solid var(--color-rule); gap: var(--space-2); }
.article-card--list:first-child { padding-top: 0; }
.article-card--list:last-child  { border-bottom: none; }

/* ── LATEST FEED ─────────────────────────────────────────────── */
.section-latest { padding: var(--space-6) 0; border-bottom: 1px solid var(--color-rule); }
/* Latest-feed + Trending-sidebar layout. The 280px sidebar column was
   previously a hardcoded inline style with no responsive override — on
   phones (≤900px here; the 3-column .latest-grid inside already drops to
   1 column at 768px) that forced a fixed-width column the viewport
   couldn't actually fit, pushing the page wider than the screen and
   creating a horizontal-scroll gap on the right edge. Single column
   below 900px fixes it. */
.latest-layout { display: grid; grid-template-columns: 1fr 280px; gap: var(--space-10); align-items: start; }
@media (max-width: 900px) {
  .latest-layout { grid-template-columns: 1fr !important; gap: var(--space-8); }
}
.latest-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .section-latest { padding: var(--space-10) 0; }
  .latest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8) var(--space-6);
  }
}
@media (min-width: 1024px) {
  .latest-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── MARKETS SECTION ─────────────────────────────────────────── */
.section-markets { padding: var(--space-6) 0; border-bottom: 1px solid var(--color-rule); background: var(--color-paper-warm); }
@media (min-width: 768px) {
  .section-markets { padding: var(--space-10) 0; }
}

.markets-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.markets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 600px;
}
.markets-table th {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  padding: var(--space-3) var(--space-4);
  text-align: right;
  border-bottom: 1px solid var(--color-rule-dark);
}
.markets-table th:first-child { text-align: left; }
.markets-table td {
  padding: var(--space-4);
  text-align: right;
  border-bottom: 1px solid var(--color-rule);
  vertical-align: middle;
}
.markets-table td:first-child { text-align: left; }
.markets-table tr:hover td { background: var(--color-paper-dark); }

.asset-name-cell { display: flex; align-items: center; gap: var(--space-3); }
.asset-symbol { font-weight: 700; font-size: var(--text-base); color: var(--color-ink); }
.asset-full-name { font-size: var(--text-xs); color: var(--color-ink-muted); }
.price-cell { font-family: var(--font-mono); font-size: var(--text-base); font-weight: 600; color: var(--color-ink); }
.change-cell { font-weight: 600; padding: 2px 8px; font-size: var(--text-xs); }
.change-cell.up { color: var(--color-market-up); }
.change-cell.dn { color: var(--color-market-dn); }
.change-cell.nc { color: var(--color-ink-muted); }
.vol-cell, .cap-cell { font-size: var(--text-xs); color: var(--color-ink-muted); font-family: var(--font-mono); }

/* ── EDITORIAL SECTIONS ──────────────────────────────────────── */
.editorial-sections { padding: var(--space-8) 0; }
.editorial-section  { padding: var(--space-6) 0; border-bottom: 1px solid var(--color-rule); }
.editorial-section:last-child { border-bottom: none; }
@media (min-width: 768px) {
  .editorial-sections { padding: var(--space-12) 0; }
  .editorial-section  { padding: var(--space-10) 0; }
}

.editorial-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
@media (min-width: 1024px) {
  .editorial-grid {
    display: grid;
    grid-template-columns: 5fr 3fr;
    gap: var(--space-8);
    align-items: start;
  }
}
.editorial-featured { position: relative; }
.editorial-secondary-list { display: flex; flex-direction: column; gap: 0; }

/* ── AD SLOT PLACEHOLDER ──────────────────────────────────────
   Shown wherever a layout column would otherwise render empty
   (e.g. an editorial section with only one article so far). Swap
   the inner markup for a real ad unit later — the class names are
   deliberately reused so a future <script> ad-loader can target them. */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  height: 100%;
  border: 1px dashed var(--color-rule);
  border-radius: 2px;
  background: var(--color-paper-dark);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ad-slot--secondary { min-height: 180px; }
/* Grows to soak up whatever space is left in a stretched flex column
   (see .hero-left / .hero-right) instead of a fixed height — so it
   expands or shrinks automatically with however long the lead headline
   happens to be. Capped with max-height: on a very long lead headline
   the column can be 1000px+ tall, and an ad box that size dwarfs the
   actual news around it — past the cap it just leaves quiet whitespace
   below it instead of ballooning further. */
.ad-slot--fill { flex: 1 1 auto; min-height: 140px; max-height: 320px; }
.ad-slot__label { opacity: 0.55; font-size: 10px; }

/* ── ANALYSIS SECTION ────────────────────────────────────────── */
.section-analysis {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-masthead);
  color: #fff;
}
@media (min-width: 768px) {
  .section-analysis { padding: var(--space-12) 0; }
}
.section-analysis .section-title { color: rgba(255,255,255,0.5); border-bottom-color: rgba(255,255,255,0.5); }
.section-analysis .section-header { border-bottom: 1px solid rgba(255,255,255,0.2); }
.section-analysis .section-link   { color: rgba(255,255,255,0.5); }
.section-analysis .section-link:hover { color: #fff; }

.analysis-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}
@media (min-width: 1024px) {
  .analysis-grid { grid-template-columns: repeat(3, 1fr); }
}
.analysis-card {
  padding: var(--space-6);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: background var(--transition-base), border-color var(--transition-base);
}
.analysis-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.analysis-card .label-tag { color: rgba(255,255,255,0.4); }
.analysis-card h3 { font-family: var(--font-editorial); font-size: var(--text-lg); font-weight: 700; color: #fff; line-height: 1.3; transition: color var(--transition-fast); }
.analysis-card:hover h3 { color: rgba(255,255,255,0.85); }
.analysis-card p { font-size: var(--text-sm); color: rgba(255,255,255,0.55); line-height: 1.6; }
.analysis-card .byline { color: rgba(255,255,255,0.35); }

/* ── DATA DASHBOARD ──────────────────────────────────────────── */
.section-data { padding: var(--space-8) 0; border-bottom: 1px solid var(--color-rule); }
.data-grid { display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 768px) {
  .data-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .data-grid { grid-template-columns: repeat(4, 1fr); }
}
.data-card {
  background: var(--color-paper-warm);
  border: 1px solid var(--color-rule);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.data-card__label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-muted); }
.data-card__value { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 700; color: var(--color-ink); line-height: 1; }
.data-card__change { font-size: var(--text-xs); font-weight: 600; }
.data-card__change.up { color: var(--color-market-up); }
.data-card__change.dn { color: var(--color-market-dn); }
.data-card__source { font-size: 10px; color: var(--color-ink-muted); margin-top: var(--space-2); border-top: 1px solid var(--color-rule); padding-top: var(--space-2); }

.fear-greed-badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: 3px 10px; font-size: var(--text-xs); font-weight: 700; border: 1px solid currentColor; }
.fear-greed-badge.extreme-fear  { color: #c0392b; }
.fear-greed-badge.fear          { color: #e67e22; }
.fear-greed-badge.neutral       { color: var(--color-ink-muted); }
.fear-greed-badge.greed         { color: #27ae60; }
.fear-greed-badge.extreme-greed { color: #1e8449; }

/* ── NEWSLETTER SECTION ──────────────────────────────────────── */
.section-newsletter {
  padding: var(--space-10) 0;
  background: var(--color-paper-warm);
  border-top: 1px solid var(--color-rule-dark);
  border-bottom: 1px solid var(--color-rule-dark);
}
@media (min-width: 768px) {
  .section-newsletter { padding: var(--space-16) 0; }
}
.newsletter-inner { max-width: 560px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.newsletter-kicker { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--color-accent); }
.newsletter-title { font-family: var(--font-editorial); font-size: var(--text-3xl); letter-spacing: -0.02em; line-height: 1.15; color: var(--color-ink); }
.newsletter-desc { font-size: var(--text-base); color: var(--color-ink-light); line-height: 1.6; max-width: 440px; }
.newsletter-form { width: 100%; display: flex; flex-direction: column; gap: var(--space-2); max-width: 440px; }
@media (min-width: 768px) {
  .newsletter-form { flex-direction: row; }
}
.newsletter-form input[type="email"] { flex: 1; padding: 12px 16px; font-size: var(--text-sm); border: 1px solid var(--color-rule-dark); background: #fff; color: var(--color-ink); outline: none; transition: border-color var(--transition-fast); min-height: 44px; }
.newsletter-form input[type="email"]:focus { border-color: var(--color-accent); }
.newsletter-form button { padding: 12px 24px; background: var(--color-ink); color: #fff; font-size: var(--text-sm); font-weight: 600; transition: background var(--transition-fast), transform var(--transition-fast); min-height: 44px; }
.newsletter-form button:hover { background: var(--color-accent); transform: translateY(-1px); }
.newsletter-privacy { font-size: var(--text-xs); color: var(--color-ink-muted); }

/* ── ARTICLE PAGE ────────────────────────────────────────────── */
.article-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-6) 0 var(--space-10);
}
@media (min-width: 1024px) {
  .article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-12);
    padding: var(--space-8) 0 var(--space-16);
    align-items: start;
  }
}
.article-main { min-width: 0; }
.article-sidebar { position: sticky; top: 60px; }

.article-header { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-8); }
.article-category-label { display: flex; align-items: center; gap: var(--space-3); }
.article-headline { font-family: var(--font-editorial); font-size: var(--text-4xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--color-ink); }
.article-subheadline { font-family: var(--font-ui); font-size: var(--text-md); color: var(--color-ink-light); line-height: 1.5; font-style: italic; border-left: 2px solid var(--color-rule-dark); padding-left: var(--space-4); }
.article-meta { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-4) 0; border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-ink-muted); }
.article-meta strong { color: var(--color-ink-light); font-weight: 600; }
.article-meta .sep { color: var(--color-rule-dark); }

.article-hero { margin: var(--space-6) 0; border: 1px solid var(--color-rule); overflow: hidden; background: var(--color-paper-dark); aspect-ratio: 16/9; }
.article-hero img { width: 100%; height: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
@media (max-width: 480px) {
  /* Slightly taller ratio on very small phones so the hero doesn't
     compress into a sliver above the headline. */
  .article-hero, .article-hero img { aspect-ratio: 4/3; }
}
.article-hero-caption { font-size: var(--text-xs); color: var(--color-ink-muted); font-style: italic; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-rule); }

/* Article Body */
.article-body { font-family: var(--font-editorial); font-size: var(--text-md); line-height: 1.75; color: var(--color-ink-light); max-width: var(--content-width); }
.article-body p  { margin-bottom: var(--space-5); }
.article-body h2 { font-size: var(--text-xl); margin: var(--space-8) 0 var(--space-4); color: var(--color-ink); }
.article-body h3 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-3); color: var(--color-ink); }
.article-body blockquote { border-left: 2px solid var(--color-accent); padding-left: var(--space-5); margin: var(--space-6) 0; font-style: italic; color: var(--color-ink); }
.article-body ul, .article-body ol { list-style: disc; padding-left: var(--space-6); margin-bottom: var(--space-5); }
.article-body ul li, .article-body ol li { margin-bottom: var(--space-2); }
.article-body a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--color-accent-dark); }
.article-body strong { font-weight: 700; color: var(--color-ink); }

/* Source attribution & Others */
.source-attribution { margin-top: var(--space-8); padding: var(--space-4) var(--space-5); background: var(--color-paper-warm); border-left: 2px solid var(--color-rule-dark); font-family: var(--font-ui); font-size: var(--text-sm); color: var(--color-ink-muted); }
.source-attribution a { color: var(--color-accent); text-decoration: underline; }
.correction-note { margin: var(--space-6) 0; padding: var(--space-4) var(--space-5); background: #fef9e7; border-left: 2px solid #f39c12; font-size: var(--text-sm); }
.financial-disclaimer { margin-top: var(--space-8); padding: var(--space-4) var(--space-5); background: var(--color-paper-dark); font-family: var(--font-ui); font-size: var(--text-xs); color: var(--color-ink-muted); font-style: italic; border: 1px solid var(--color-rule); }
.author-box { margin-top: var(--space-10); padding: var(--space-6); background: var(--color-paper-warm); border: 1px solid var(--color-rule); display: flex; flex-direction: column; gap: var(--space-5); }
@media (min-width: 768px) {
  .author-box { flex-direction: row; }
}
.author-avatar { flex-shrink: 0; width: 64px; height: 64px; overflow: hidden; background: var(--color-paper-dark); border: 1px solid var(--color-rule); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info { flex: 1; }
.author-name { font-family: var(--font-ui); font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-1); }
.author-bio { font-size: var(--text-sm); color: var(--color-ink-muted); line-height: 1.6; }

/* Social share */
.article-share { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-8) 0; padding: var(--space-4) 0; border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); flex-wrap: wrap; }
.share-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-muted); }
.share-btn { padding: 7px 16px; border: 1px solid var(--color-rule-dark); font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-light); transition: all var(--transition-fast); min-height: 44px; display: flex; align-items: center; }
.share-btn:hover { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }

/* Related articles */
.related-articles { margin-top: var(--space-10); }
.related-grid { display: flex; flex-direction: column; gap: var(--space-6); margin-top: var(--space-4); }
@media (min-width: 768px) {
  .related-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar-widget { margin-bottom: var(--space-8); padding-bottom: var(--space-8); border-bottom: 1px solid var(--color-rule); }
.sidebar-widget:last-child { border-bottom: none; }
.sidebar-widget-title { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-ink-muted); margin-bottom: var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-ink); }

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-rule); margin-bottom: var(--space-4); }
.breadcrumb ol { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.breadcrumb li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-ink-muted); }
.breadcrumb li:not(:last-child)::after { content: '›'; opacity: 0.5; }
.breadcrumb a { color: var(--color-ink-muted); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb li:last-child { color: var(--color-ink-light); font-weight: 500; }

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-top: var(--space-10); padding-top: var(--space-8); border-top: 1px solid var(--color-rule); flex-wrap: wrap; }
.page-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: var(--text-sm); font-weight: 500; border: 1px solid var(--color-rule); color: var(--color-ink-light); transition: all var(--transition-fast); }
.page-link:hover, .page-link.active { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }
.page-link.disabled { opacity: 0.3; pointer-events: none; }

/* ── SEARCH ──────────────────────────────────────────────────── */
.search-bar { position: relative; max-width: 600px; margin: 0 auto; }
.search-bar input { width: 100%; padding: 14px 50px 14px 18px; font-size: var(--text-base); border: 1px solid var(--color-rule-dark); background: #fff; color: var(--color-ink); outline: none; transition: border-color var(--transition-fast); min-height: 44px; }
.search-bar input:focus { border-color: var(--color-ink); }
.search-bar button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--color-ink-muted); padding: var(--space-2); transition: color var(--transition-fast); min-height: 44px; min-width: 44px; }
.search-bar button:hover { color: var(--color-ink); }

/* ── ADMIN PANEL ─────────────────────────────────────────────── */
.admin-body { background: #f0f0f0; }
.admin-topbar { background: var(--color-masthead); padding: 0 var(--space-4); height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 200; }
.admin-topbar-logo { font-family: var(--font-editorial); font-size: var(--text-md); font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.admin-topbar-logo span { color: var(--color-accent-light); font-size: var(--text-xs); font-family: var(--font-ui); font-weight: 400; letter-spacing: 0.05em; margin-left: var(--space-3); }
.admin-topbar-actions { display: flex; align-items: center; gap: var(--space-4); }
.admin-topbar a { color: rgba(255,255,255,0.6); font-size: var(--text-sm); transition: color var(--transition-fast); min-height: 44px; display: flex; align-items: center; }
.admin-topbar a:hover { color: #fff; }

.admin-layout { display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
@media (min-width: 768px) {
  .admin-layout { flex-direction: row; }
}
.admin-sidebar { width: 100%; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--color-rule); padding: var(--space-4) 0; }
@media (min-width: 768px) {
  .admin-sidebar { width: 240px; border-right: 1px solid var(--color-rule); border-bottom: none; padding: var(--space-6) 0; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
}
.admin-nav-group { margin-bottom: var(--space-2); }
.admin-nav-group-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-ink-muted); padding: var(--space-2) var(--space-5) var(--space-1); }
.admin-nav-link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-5); font-size: var(--text-sm); color: var(--color-ink-light); transition: all var(--transition-fast); border-left: 2px solid transparent; min-height: 44px; }
.admin-nav-link:hover { color: var(--color-ink); background: var(--color-paper-warm); }
.admin-nav-link.active { color: var(--color-accent); background: var(--color-accent-bg); border-left-color: var(--color-accent); font-weight: 600; }

.admin-content { flex: 1; padding: var(--space-4); max-width: 1200px; width: 100%; }
@media (min-width: 768px) {
  .admin-content { padding: var(--space-8); }
}
.admin-page-header { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-rule); }
@media (min-width: 768px) {
  .admin-page-header { flex-direction: row; align-items: center; justify-content: space-between; }
}
.admin-page-title { font-size: var(--text-xl); font-weight: 700; color: var(--color-ink); }

.admin-card { background: #fff; border: 1px solid var(--color-rule); margin-bottom: var(--space-6); }
.admin-card-header { padding: var(--space-4) var(--space-4); border-bottom: 1px solid var(--color-rule); font-size: var(--text-sm); font-weight: 700; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }
@media (min-width: 768px) {
  .admin-card-header { padding: var(--space-4) var(--space-6); }
}
.admin-card-body { padding: var(--space-4); }
@media (min-width: 768px) {
  .admin-card-body { padding: var(--space-6); }
}

.stat-grid { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); }
@media (min-width: 768px) {
  .stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card { background: #fff; border: 1px solid var(--color-rule); padding: var(--space-5); }
.stat-label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-muted); margin-bottom: var(--space-2); }
.stat-value { font-size: var(--text-2xl); font-weight: 700; color: var(--color-ink); }
.stat-change { font-size: var(--text-xs); color: var(--color-ink-muted); margin-top: var(--space-1); }

.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 600px; }
.admin-table th { padding: var(--space-3) var(--space-4); text-align: left; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-ink-muted); border-bottom: 1px solid var(--color-rule-dark); background: var(--color-paper-warm); }
.admin-table td { padding: var(--space-4); border-bottom: 1px solid var(--color-rule); vertical-align: middle; }
.admin-table tr:hover td { background: var(--color-paper-warm); }
.admin-table tr:last-child td { border-bottom: none; }

.status-badge { display: inline-block; padding: 2px 10px; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; border: 1px solid currentColor; }
.status-badge.published  { color: var(--color-market-up); }
.status-badge.review     { color: #e67e22; }
.status-badge.queued     { color: #2980b9; }
.status-badge.rejected   { color: var(--color-market-dn); }
.status-badge.failed     { color: #922b21; }
.status-badge.raw        { color: var(--color-ink-muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 16px; min-height: 44px; font-size: var(--text-sm); font-weight: 600; transition: all var(--transition-fast); }
.btn-primary   { background: var(--color-ink);    color: #fff; }
.btn-primary:hover  { background: var(--color-accent); }
.btn-accent    { background: var(--color-accent);  color: #fff; }
.btn-accent:hover   { background: var(--color-accent-dark); }
.btn-outline   { border: 1px solid var(--color-rule-dark); color: var(--color-ink-light); }
.btn-outline:hover  { border-color: var(--color-ink); background: var(--color-ink); color: #fff; }
.btn-danger    { background: var(--color-market-dn); color: #fff; }
.btn-danger:hover   { background: #a93226; }
.btn-sm { padding: 0 12px; min-height: 36px; font-size: var(--text-xs); }
.btn-xs { padding: 0 9px; min-height: 28px; font-size: 11px; }

.form-group { margin-bottom: var(--space-5); }
.form-label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.form-control { width: 100%; padding: 10px 14px; min-height: 44px; font-size: var(--text-sm); border: 1px solid var(--color-rule-dark); background: #fff; color: var(--color-ink); outline: none; transition: border-color var(--transition-fast); }
.form-control:focus { border-color: var(--color-accent); }
.form-hint { font-size: var(--text-xs); color: var(--color-ink-muted); margin-top: var(--space-1); }

.health-indicator { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 600; }
.health-dot { width: 8px; height: 8px; flex-shrink: 0; }
.health-dot.ok      { background: var(--color-market-up); }
.health-dot.warn    { background: #e67e22; }
.health-dot.error   { background: var(--color-market-dn); }
.health-dot.unknown { background: var(--color-ink-muted); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: var(--color-masthead); color: rgba(255,255,255,0.55); padding: var(--space-10) 0 var(--space-8); margin-top: var(--space-16); }
@media (min-width: 768px) {
  .site-footer { padding: var(--space-16) 0 var(--space-8); }
}
.footer-grid { display: flex; flex-direction: column; gap: var(--space-8); margin-bottom: var(--space-10); }
@media (min-width: 768px) {
  .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-12); }
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-logo { font-family: var(--font-editorial); font-size: var(--text-xl); font-weight: 700; color: #fff; letter-spacing: -0.03em; }
.footer-tagline { font-size: var(--text-sm); line-height: 1.6; max-width: 280px; }
.footer-nav-title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: var(--space-4); }
.footer-nav-list { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-nav-list a { font-size: var(--text-sm); color: rgba(255,255,255,0.55); transition: color var(--transition-fast); display: inline-flex; align-items: center; min-height: 44px; }
.footer-nav-list a:hover { color: #fff; }
.footer-bottom { padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-disclaimer { font-size: 11px; color: rgba(255,255,255,0.3); max-width: 680px; line-height: 1.6; }
.footer-copyright { font-size: var(--text-xs); color: rgba(255,255,255,0.35); }

/* ── UTILITIES ───────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-muted  { color: var(--color-ink-muted); }
.mt-auto     { margin-top: auto; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-2       { gap: var(--space-2); }
.gap-4       { gap: var(--space-4); }

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, var(--color-paper-dark) 25%, var(--color-rule) 50%, var(--color-paper-dark) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; }
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Scroll to top */
.scroll-top { position: fixed; bottom: var(--space-6); right: var(--space-6); width: 44px; height: 44px; background: var(--color-ink); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity var(--transition-base), transform var(--transition-base); z-index: 50; }
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover   { transform: translateY(-3px); }

/* ── MOBILE UI OVERLAYS ──────────────────────────────────────── */

/* Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-masthead);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 800;
}
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  text-decoration: none;
  width: 25%;
}
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
  color: var(--color-accent-light);
}
@media (min-width: 768px) {
  .mobile-bottom-nav { display: none; }
}

/* ── FIRST-VISIT SUBSCRIBE MODAL (cn-modal) ──────────────────────
   Built as its own self-contained component — deliberately not sharing
   styling with .newsletter-form's other instances beyond the input/button
   element types, so this can evolve independently. Visibility + entrance/
   exit are both driven by the single --visible modifier class (opacity +
   transform transitions, not a one-shot @keyframes) so closing animates
   just as smoothly as opening. */
.cn-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  visibility: hidden;
  pointer-events: none;
}
.cn-modal--visible { visibility: visible; pointer-events: auto; }

.cn-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 12, 0.55);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  opacity: 0;
  transition: opacity .35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cn-modal--visible .cn-modal__backdrop { opacity: 1; }

.cn-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  overflow-y: auto;
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(10, 11, 12, 0.4), 0 8px 24px -8px rgba(10, 11, 12, 0.15);
  padding: 44px 40px 34px;
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .4s cubic-bezier(0.16, 1, 0.3, 1), transform .4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cn-modal--visible .cn-modal__dialog { opacity: 1; transform: translateY(0) scale(1); }

.cn-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-ink-muted);
  transition: background-color .2s ease, color .2s ease;
}
.cn-modal__close:hover,
.cn-modal__close:focus-visible { background: var(--color-paper-dark); color: var(--color-ink); }

.cn-modal__eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}
.cn-modal__title {
  font-family: var(--font-editorial);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  line-height: 1.18;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.cn-modal__desc {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-ink-light);
  line-height: 1.65;
  margin: 0 auto 26px;
  max-width: 340px;
}
.cn-modal__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.cn-modal__input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-rule-dark);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cn-modal__input::placeholder { color: var(--color-ink-muted); }
.cn-modal__input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-bg); }
.cn-modal__submit {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  background: var(--color-ink);
  border-radius: 10px;
  transition: background-color .2s ease, transform .2s ease;
}
.cn-modal__submit:hover { background: var(--color-accent); }
.cn-modal__submit:active { transform: scale(.98); }
.cn-modal__submit:disabled { opacity: .6; }
.cn-modal__footnote {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--color-ink-muted);
  text-transform: uppercase;
}
.cn-modal .newsletter-msg { font-family: var(--font-ui); }

@media (max-width: 480px) {
  .cn-modal { padding: 14px; }
  .cn-modal__dialog { padding: 34px 24px 26px; border-radius: 16px; }
  .cn-modal__desc { max-width: none; }
}

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  /* Sits above the fixed mobile bottom nav (60px) + that nav's own
     safe-area padding, so it never overlaps or gets clipped by the
     iOS home-indicator area. */
  bottom: calc(60px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  background: var(--color-masthead);
  color: rgba(255,255,255,0.85);
  padding: 10px 14px;
  padding-left: calc(14px + env(safe-area-inset-left));
  padding-right: calc(14px + env(safe-area-inset-right));
  font-size: 12px;
  line-height: 1.45;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  z-index: 850;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
  max-height: 40vh;
  overflow-y: auto;
}
.cookie-notice p { flex: 1; min-width: 0; margin: 0; }
.cookie-notice a {
  color: #fff;
  text-decoration: underline;
}
.cookie-btn {
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  min-height: 36px;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 400px) {
  /* Very narrow phones: stack text above a full-width button rather
     than compressing both onto one cramped row. */
  .cookie-notice { flex-direction: column; align-items: stretch; gap: 8px; }
  .cookie-btn { width: 100%; min-height: 40px; }
}
@media (min-width: 768px) {
  .cookie-notice {
    bottom: 0; /* No mobile bottom-nav to clear on desktop */
    justify-content: space-between;
    padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
    font-size: 14px;
    max-height: none;
  }
  .cookie-btn {
    min-height: 44px;
  }
  .scroll-top { bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); }
}

/* 404 page */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: var(--space-8); gap: var(--space-5); }
@media (min-width: 768px) {
  .error-page { padding: var(--space-16); }
}
.error-code { font-family: var(--font-editorial); font-size: clamp(5rem, 15vw, 10rem); font-weight: 700; color: var(--color-paper-dark); line-height: 1; letter-spacing: -0.05em; }
.error-title { font-size: var(--text-2xl); color: var(--color-ink); }
.error-links { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; }

/* ── CONTACT PAGE ──────────────────────────────────────────────
   Rebuilt from a raw 2fr/1fr inline-style grid (no mobile breakpoint —
   it just kept squishing the sidebar down to an unreadable sliver on
   phones) into a proper two-column-desktop / stacked-mobile layout that
   matches the rest of the site's editorial system. */
.contact-page { padding: var(--space-10) 0 var(--space-16); max-width: 900px; }
.contact-eyebrow { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-3); }
.contact-title { font-family: var(--font-editorial); font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl)); line-height: 1.1; margin-bottom: var(--space-3); }
.contact-lede { color: var(--color-ink-light); font-size: var(--text-md); line-height: 1.6; max-width: 560px; margin-bottom: var(--space-8); }
.contact-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-8); align-items: start; }
@media (min-width: 800px) {
  .contact-layout { grid-template-columns: 3fr 2fr; gap: var(--space-10); }
}
.contact-form-card { background: var(--color-paper-warm); border: 1px solid var(--color-rule); border-radius: var(--radius-md); padding: var(--space-6); }
@media (min-width: 640px) {
  .contact-form-card { padding: var(--space-8); }
}
.contact-notice { padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); margin-bottom: var(--space-6); font-size: var(--text-sm); line-height: 1.5; }
.contact-notice--success { background: #e8f5ee; color: #0a7a3d; }
.contact-notice--error { background: #fdecea; color: #c0392b; }
/* --color-paper-dark is a near-white grey (#F1F3F5), not a dark surface —
   using it here with white text (as the old inline-style version of this
   page did) made "Editorial Desk" and the paragraph below it nearly
   invisible, low-contrast white-on-off-white. --color-masthead is this
   site's actual dark surface color, used for the header/nav. */
.contact-sidebar { background: var(--color-masthead); color: var(--color-paper); padding: var(--space-6); border-radius: var(--radius-md); }
.contact-sidebar h3 { font-family: var(--font-editorial); font-size: var(--text-lg); margin-bottom: var(--space-5); }
.contact-channel { margin-bottom: var(--space-5); }
.contact-channel:last-of-type { margin-bottom: 0; }
.contact-channel strong { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: var(--space-1); }
.contact-channel a { color: var(--color-accent-light); font-size: var(--text-base); word-break: break-word; }
.contact-sidebar hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: var(--space-5) 0; }
.contact-sidebar p { font-size: var(--text-sm); color: rgba(255,255,255,0.68); line-height: 1.6; }

/* ── NEWSLETTER LANDING PAGE ──────────────────────────────────── */
.newsletter-page { padding: var(--space-12) 0 var(--space-16); }
.newsletter-page-inner { max-width: 680px; margin: 0 auto; }
.newsletter-status { max-width: 520px; margin: 0 auto var(--space-8); padding: var(--space-5); border-radius: var(--radius-md); text-align: center; }
.newsletter-status--success { background: #e8f5ee; }
.newsletter-status--success p { color: #0a7a3d; }
.newsletter-status--error { background: #fdecea; }
.newsletter-status--error p { color: #c0392b; }
.newsletter-status p { font-weight: 600; margin: 0; }
.newsletter-hero { text-align: center; margin-bottom: var(--space-10); }
.newsletter-hero .contact-eyebrow { margin-bottom: var(--space-3); }
.newsletter-hero h1 { font-family: var(--font-editorial); font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl)); margin: var(--space-2) 0 var(--space-4); line-height: 1.12; }
.newsletter-hero p { font-size: var(--text-md); color: var(--color-ink-light); line-height: 1.65; max-width: 520px; margin: 0 auto; }
.newsletter-benefits { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin-bottom: var(--space-10); }
@media (min-width: 640px) {
  .newsletter-benefits { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}
.newsletter-benefit { padding: var(--space-5); border: 1px solid var(--color-rule); border-radius: var(--radius-md); text-align: center; }
.newsletter-benefit-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-paper-warm); border: 1px solid var(--color-rule); font-family: var(--font-editorial); font-weight: 700; font-size: var(--text-sm); color: var(--color-accent); margin-bottom: var(--space-3); }
.newsletter-benefit h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-2); }
.newsletter-benefit p { font-size: var(--text-sm); color: var(--color-ink-muted); line-height: 1.5; }
.newsletter-signup-card { background: var(--color-paper-warm); border: 1px solid var(--color-rule); border-radius: var(--radius-md); padding: var(--space-6); text-align: center; }
@media (min-width: 640px) {
  .newsletter-signup-card { padding: var(--space-8); }
}
.newsletter-signup-card h2 { font-family: var(--font-editorial); font-size: var(--text-xl); margin-bottom: var(--space-4); }
.newsletter-form--page { max-width: 420px; margin: 0 auto; flex-direction: column !important; gap: var(--space-3) !important; }
.newsletter-form--page input[type="text"],
.newsletter-form--page input[type="email"] { width: 100%; padding: 12px 16px; min-height: 44px; font-size: var(--text-sm); border: 1px solid var(--color-rule-dark); background: #fff; color: var(--color-ink); outline: none; transition: border-color var(--transition-fast); }
.newsletter-form--page input[type="text"]:focus,
.newsletter-form--page input[type="email"]:focus { border-color: var(--color-accent); }
.newsletter-form--page button { width: 100%; padding: 14px; }
.newsletter-form--page .newsletter-privacy { margin-top: var(--space-1); }

/* Focus visible */
:focus-visible { outline: 1px solid var(--color-accent); outline-offset: 3px; }
