/* ═══════════════════════════════════════════════════════════════
   IP Journal Club — main.css
   Design: Editorial luxury medical journal
   Fonts: Cormorant Garamond (display) + Libre Baskerville (body) + JetBrains Mono
═══════════════════════════════════════════════════════════════ */

/* Fonts are loaded with a <link> in views/partials/header.ejs (an @import here delays the first paint) */

/* ── MOBILE WIDTH SAFETY NET ───────────────────────────── */
/* Ensure nothing can exceed viewport width */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Force text and links to break instead of blowing out layouts */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

a, p, h1, h2, h3, h4, h5, h6, span, div, article, section {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Full-bleed sections: force exact viewport width */
.nav, .hero, .ticker-bar, .practice-section, .main-footer {
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Container: ensure padding doesn't cause overflow */
.container, .container--narrow {
  width: 100%;
  max-width: var(--max-w);
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
  margin: 0 auto;
}

.container--narrow {
  max-width: var(--max-w-md);
}

/* Editorial briefing: hard containment for AI-generated HTML */
.editorial-briefing {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.briefing-html-content,
.briefing-html-content * {
  max-width: 100%;
}

/* Images/tables/pre: never overflow */
img, video, iframe, table, pre, code {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Grid items: allow shrinking */
.articles-grid, .sidebar, .hero-inner, .footer-top {
  min-width: 0; /* Critical for flex/grid children */
}

/* ── VARIABLES ────────────────────────────────────────────── */
:root {
  /* Core palette */
  --ink:          #0a0f1a;
  --ink-mid:      #1c2636;
  --ink-soft:     #2d3a50;
  --navy:         #0b1d3a;
  --navy-mid:     #102348;
  --navy-light:   #1a3566;
  --gold:         #c9974a;
  --gold-light:   #e8b96a;
  --gold-pale:    #fdf4e7;
  --gold-line:    #d4a853;
  --cream:        #faf7f2;
  --paper:        #f5f0e8;
  --white:        #ffffff;

  /* Text */
  --text-primary:   #0a0f1a;
  --text-body:      #1e2d42;
  --text-muted:     #5a6a7e;
  --text-faint:     #8a9ab0;

  /* UI */
  --border:         #ddd5c4;
  --border-light:   #e8e2d8;
  --border-navy:    #1e3560;
  --surface:        #ffffff;
  --surface-warm:   #faf7f2;

  /* Accent colors for categories */
  --cat-bronch:    #1464a0;
  --cat-pleural:   #0b6e4f;
  --cat-airway:    #92400e;
  --cat-vascular:  #6d28d9;
  --cat-ild:       #1d4ed8;
  --cat-cancer:    #991b1b;
  --cat-copd:      #166534;
  --cat-general:   #374151;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Libre Baskerville', Georgia, serif;
  --font-sans:    'Source Sans 3', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --max-w:    1240px;
  --max-w-md: 880px;
  --radius:   6px;
  --radius-lg: 10px;
}

/* ── RESET ────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

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

/* ══════════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════════ */
.nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid var(--border-navy);
}

/* Top strip — journal name */
.nav-strip {
  background: var(--ink);
  border-bottom: 1px solid rgba(201,151,74,0.3);
  padding: 0.35rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-strip-brand {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.85;
}

.nav-strip-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  display: flex;
  gap: 1.5rem;
}

.nav-strip-meta span { display: flex; align-items: center; gap: 5px; }

/* Main nav bar */
.nav-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  /* background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%); */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.nav-brand-text { display: flex; flex-direction: column; }

.nav-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1;
}

.nav-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.72);
  padding: 0.45rem 0.9rem;
  border-radius: 5px;
  transition: all 0.18s;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-link--active {
  color: var(--gold-light);
}

.nav-search-icon {
  font-size: 1rem;
  padding: 0.45rem 0.7rem;
  color: rgba(255,255,255,0.6);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s;
}
.nav-search-icon:hover { background: rgba(255,255,255,0.08); color: white; }

.nav-admin-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,151,74,0.4);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition: all 0.18s;
  margin-left: 0.5rem;
}
.nav-admin-btn:hover {
  background: rgba(201,151,74,0.12);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* Live indicator */
.nav-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4ade80;
  margin-left: 0.5rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: livepulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livepulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 5px rgba(74,222,128,0); }
}

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  padding: 0;
}

/* Editorial newspaper-style diagonal accent */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 100% 50%, rgba(201,151,74,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(10,50,120,0.4) 0%, transparent 50%);
  pointer-events: none;
}

/* Fine grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 4rem;
  align-items: center;
  min-height: 520px;
}

.hero-left { padding: 4rem 0; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(201,151,74,0.35);
  border-radius: 3px;
}

.hero-kicker::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-title .hero-title-sub {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  font-style: normal;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
  margin-top: 0.4rem;
  font-family: var(--font-sans);
}

.hero-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.65);
  max-width: min(560px, 100%);
  margin-bottom: 2.5rem;
}

.hero-desc strong {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}

/* Search bar */
.hero-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: min(520px, 100%);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.hero-search:focus-within {
  border-color: rgba(201,151,74,0.6);
  box-shadow: 0 0 0 3px rgba(201,151,74,0.12);
}

.hero-search-icon {
  padding: 0 1rem;
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--white);
}

.hero-search input::placeholder { color: rgba(255,255,255,0.35); }

.hero-search-btn {
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 0 1.5rem;
  height: 100%;
  min-height: 52px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s;
  flex-shrink: 0;
}

.hero-search-btn:hover { background: var(--gold-light); }

/* Hero stats column */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid rgba(255,255,255,0.1);
  padding-left: 3rem;
  align-self: stretch;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero-stat {
  padding: 1.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hero-stat:last-child { border-bottom: none; }

.hero-stat-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.hero-stat-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.03em;
}

/* Gold bottom rule on hero */
.hero-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, transparent 100%);
}

/* ══════════════════════════════════════════════════════════
   JOURNAL TICKER (scrolling journals list)
══════════════════════════════════════════════════════════ */
.ticker-bar {
  background: var(--ink);
  border-bottom: 1px solid rgba(201,151,74,0.2);
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.6rem 1.5rem;
  border-right: 1px solid rgba(201,151,74,0.25);
  background: rgba(201,151,74,0.06);
  white-space: nowrap;
}

.ticker-track {
  overflow: hidden;
  flex: 1;
}

.ticker-inner {
  display: flex;
  gap: 3rem;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  padding: 0.6rem 2rem;
}

.ticker-inner:hover { animation-play-state: paused; }

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-item::before {
  content: '◆';
  color: var(--gold);
  opacity: 0.5;
  font-size: 0.4rem;
}

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

/* ══════════════════════════════════════════════════════════
   PRACTICE-CHANGING SECTION
══════════════════════════════════════════════════════════ */
.practice-section {
  background: var(--ink-mid);
  border-bottom: 1px solid rgba(201,151,74,0.2);
  padding: 2rem 0;
}

.practice-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.practice-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.practice-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 7px;
}

.practice-pulse {
  width: 8px;
  height: 8px;
  background: #f87171;
  border-radius: 50%;
  flex-shrink: 0;
  animation: livepulse 1.5s ease-in-out infinite;
}

@keyframes practicepulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(248,113,113,0); }
}

.practice-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.practice-card {
  background: rgba(255,255,255,0.03);
  padding: 1.4rem 1.5rem;
  transition: background 0.2s;
  cursor: pointer;
}

.practice-card:hover { background: rgba(255,255,255,0.06); }

.practice-card-journal {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.practice-card-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.practice-card-hook {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

.practice-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 1rem;
  transition: gap 0.18s;
}
.practice-card-link:hover { gap: 8px; }

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════════════════════════ */
.page-main {
  flex: 1;
  padding: 3.5rem 0 5rem;
}

/* ── Section headers ────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.section-label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-label-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.section-label-left {
  flex-direction: row-reverse;
}
.section-label-left .section-label-line { flex: none; width: 3rem; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.section-head-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-head-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.18s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.section-head-link:hover { gap: 8px; border-color: var(--gold); }

/* ── CATEGORY PILLS ──────────────────────────────── */
.cat-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.cat-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.cat-pill:hover, .cat-pill--active {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold-pale);
}

/* ── ARTICLE CARDS ────────────────────────────────── */
.articles-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: start;
}

/* Main article grid */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 0;
  padding: 2rem;
  transition: all 0.2s;
  position: relative;
  display: block;
  border-bottom: none;
}

.article-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.article-card:last-child  { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 1px solid var(--border-light); }
.article-card:only-child  { border-radius: var(--radius); border-bottom: 1px solid var(--border-light); }

/* Gold left accent on hover */
.article-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: var(--radius) 0 0 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}

.article-card:hover {
  background: var(--surface-warm);
  box-shadow: 4px 0 0 0 var(--gold) inset;
}

.article-card:hover::before { transform: scaleY(1); }

.article-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.article-journal-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--gold-light);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
}

.article-cat-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
  border: 1px solid;
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-faint);
  margin-left: auto;
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.article-card-title:hover { color: var(--navy-mid); }

/* AI Takeaway box */
.article-takeaway {
  background: linear-gradient(135deg, var(--gold-pale) 0%, #fef9ef 100%);
  border-left: 3px solid var(--gold);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.1rem;
}

.article-takeaway-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.article-takeaway-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-body);
  font-style: italic;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.article-authors {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.article-footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.score-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 3px;
  border: 1px solid;
}

.score-10, .score-9 { background: #f0fdf4; border-color: #86efac; color: #166534; }
.score-8,  .score-7 { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.score-6,  .score-5 { background: var(--gold-pale); border-color: #fcd34d; color: #92400e; }

.article-read-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-light);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.18s, color 0.18s;
}
.article-read-link:hover { color: var(--gold); gap: 7px; }

/* Empty state */
.empty-state {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.empty-state-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── SIDEBAR ──────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-card-header {
  background: var(--ink);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-card-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.sidebar-card-body { padding: 1rem; }

/* Category list */
.sidebar-cat-list { display: flex; flex-direction: column; }

.sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.15s;
  cursor: pointer;
}
.sidebar-cat-item:last-child { border-bottom: none; }
.sidebar-cat-item:hover { padding-left: 0.5rem; }

.sidebar-cat-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--text-body);
  font-weight: 500;
}

.sidebar-cat-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-cat-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  background: var(--surface-warm);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

/* Scanner status */
.scanner-status { padding: 1rem 1.2rem; }

.scanner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
}
.scanner-row:last-child { border-bottom: none; }

.scanner-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.scanner-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-body);
  font-weight: 500;
}

.scanner-val--green { color: #16a34a; }
.scanner-val--warn  { color: #d97706; }

/* Featured small */
.sidebar-featured-item {
  padding: 0.9rem 0.2rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s;
}
.sidebar-featured-item:last-child { border-bottom: none; }
.sidebar-featured-item:hover { padding-left: 0.4rem; }

.sfi-journal {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.sfi-title {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.sfi-score {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
}

/* ══════════════════════════════════════════════════════════
   ARTICLE PAGE
══════════════════════════════════════════════════════════ */
.article-hero-strip {
  background: var(--navy);
  padding: 3rem 0 0;
  border-bottom: 3px solid var(--gold);
}

.article-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: rgba(255,255,255,0.55); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { opacity: 0.4; }

.article-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.article-cat-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

.article-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  max-width: min(860px, 100%);
}

.article-byline-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.byline-authors {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
}
.byline-sep { color: rgba(255,255,255,0.2); }
.byline-journal {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--gold-light);
  font-weight: 600;
}
.byline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

.article-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,151,74,0.35);
  padding: 0.45rem 1rem;
  border-radius: 4px;
  margin-top: 1.5rem;
  transition: all 0.18s;
  width: fit-content;
}
.article-source-link:hover {
  background: rgba(201,151,74,0.1);
  border-color: var(--gold);
}

/* Article content body */
.article-content {
  max-width: var(--max-w-md);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

/* Key takeaway banner */
.takeaway-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.takeaway-banner::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: var(--gold);
}

.takeaway-banner-kicker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.takeaway-banner-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--white);
}

/* AI summary */
.ai-summary-box {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.ai-summary-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ai-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--gold);
  padding: 0.18rem 0.55rem;
  border-radius: 3px;
}

.ai-summary-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-body);
}

/* Full review */
.review-wrapper {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.review-header {
  background: var(--ink);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-header-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}

.review-ai-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,151,74,0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
}

.review-body {
  padding: 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-body);
}

.review-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  letter-spacing: -0.01em;
}
.review-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.review-body h3 {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}

.review-body p { margin-bottom: 1rem; }

.review-body ul, .review-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.review-body li { margin-bottom: 0.4rem; }

.review-body strong { color: var(--ink); font-weight: 700; }

/* Abstract disclosure */
.abstract-disclosure {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.abstract-disclosure summary {
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  background: var(--surface-warm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.abstract-disclosure summary:hover { color: var(--ink); }

.abstract-disclosure[open] summary::after { content: '▲'; }
.abstract-disclosure summary::after { content: '▼'; font-size: 0.5rem; }

.abstract-disclosure-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-body);
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.main-footer {
  background: var(--ink);
  color: #94a3b8;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: auto;
}

.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand-col {}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.footer-logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.footer-brand-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.25rem;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 1rem;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.15s;
}
.footer-col-links a:hover { color: rgba(255,255,255,0.85); }

/* Status section */
.footer-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.55rem;
}

.footer-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.footer-status-dot--green {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
}
.footer-status-dot--yellow { background: #fbbf24; }
.footer-status-dot--red    { background: #f87171; }

/* Footer bottom bar */
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
}

.footer-bottom-legal {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  max-width: 500px;
  text-align: right;
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS — page load stagger
══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.55s ease both;
}

.fade-up--1 { animation-delay: 0.05s; }
.fade-up--2 { animation-delay: 0.12s; }
.fade-up--3 { animation-delay: 0.2s;  }
.fade-up--4 { animation-delay: 0.28s; }
.fade-up--5 { animation-delay: 0.36s; }

/* ══════════════════════════════════════════════════════════
   ADMIN CSS (shared)
══════════════════════════════════════════════════════════ */
.admin-body {
  font-family: var(--font-sans);
  background: #f1f5f9;
}

.admin-topbar {
  background: var(--ink);
  color: white;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-topbar-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-topbar-nav {
  display: flex;
  gap: 0.25rem;
}

.admin-topbar-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition: all 0.15s;
}

.admin-topbar-link:hover { background: rgba(255,255,255,0.08); color: white; }
.admin-topbar-link--gold { color: var(--gold); }

.admin-content {
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}

.admin-page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.admin-page-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.admin-msg {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 4px solid #16a34a;
  color: #166534;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.admin-stat {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.admin-stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.admin-stat-num--warn { color: #d97706; }
.admin-stat-num--green { color: #16a34a; }

.admin-stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-section {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.admin-section-header {
  background: var(--ink);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.admin-section-body { padding: 1.5rem; }

.admin-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-btn--primary { background: var(--navy); color: white; }
.admin-btn--primary:hover { background: var(--navy-light); }
.admin-btn--warn { background: #d97706; color: white; }
.admin-btn--warn:hover { background: #b45309; }
.admin-btn--danger { background: #dc2626; color: white; }
.admin-btn--danger:hover { background: #b91c1c; }
.admin-btn--ghost { background: var(--surface-warm); color: var(--text-body); border: 1px solid var(--border); }
.admin-btn--ghost:hover { border-color: var(--ink); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--border);
}
.admin-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-warm); }

.admin-table .mono { font-family: var(--font-mono); font-size: 0.78rem; }
.admin-table .green { color: #16a34a; font-weight: 600; }
.admin-table .warn  { color: #d97706; font-weight: 600; }
.admin-table .error { color: #dc2626; font-size: 0.78rem; }

.pending-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
}
.pending-card:last-child { border-bottom: none; }

.pending-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.pending-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.pending-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--navy-light);
  letter-spacing: 0.06em;
}

.admin-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  background: var(--surface-warm);
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}
.admin-upload-area:hover { border-color: var(--gold); }

.admin-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.55;
}

.admin-form-field { margin-bottom: 1.25rem; }
.admin-form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.admin-form-input,
.admin-form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-body);
  background: var(--white);
  transition: border-color 0.18s;
}
.admin-form-input:focus,
.admin-form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,74,0.12);
}
.admin-form-textarea { resize: vertical; min-height: 200px; font-family: var(--font-mono); font-size: 0.82rem; }

/* Login */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
}

.admin-login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-login-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.admin-login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.admin-login-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-login-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════════════════════
   EDITORIAL BRIEFING  ("The IP Wire")
   Wrapper for Gemini-generated HTML editorial content
══════════════════════════════════════════════════════════ */

.editorial-briefing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--ink);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.briefing-header {
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;            /* wraps on small screens without breaking */
}

.briefing-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);   /* fluid — never too big */
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1;
}

.briefing-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

/* ── Styles applied to Gemini's generated HTML ─────────── */
.briefing-html-content {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: 1.75;
  max-width: 100%;
  overflow: hidden;
  font-size: 1rem;
}

.briefing-html-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.briefing-html-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--ink);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.briefing-html-content p {
  margin-bottom: 1.2rem;
}

.briefing-html-content a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dotted var(--gold);
  font-weight: 700;
}

.briefing-html-content a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  border-bottom-style: solid;
}

.briefing-html-content ul,
.briefing-html-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.briefing-html-content li {
  margin-bottom: 0.4rem;
}

.briefing-html-content strong {
  color: var(--ink);
  font-weight: 700;
}

.briefing-html-content em {
  font-style: italic;
  color: var(--text-muted);
}

/* 2-column newspaper layout — desktop only */
.briefing-html-content .news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  margin: 1.5rem 0;
}

/* Highlight / pull-quote box */
.briefing-html-content .highlight-box {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  font-style: italic;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Score badge inside briefing */
.briefing-html-content .score-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  border: 1px solid;
  vertical-align: middle;
  margin-left: 0.4rem;
}

/* Divider rule */
.briefing-html-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE  —  mobile-first corrections
   All breakpoints in one place, no duplicates
══════════════════════════════════════════════════════════ */

/* ── 1024px: tablet landscape ───────────────────────────── */
@media (max-width: 1024px) {
  /* Drop sidebar — single col article layout */
  .articles-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }

  /* Hero: single col, hide stats panel */
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }
  .hero-stats { display: none; }

  /* Practice: single column */
  .practice-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* Footer: 2 columns */
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }

  /* Admin stat grid: 2 columns */
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── 1200px: Laptop/desktop refinement ─────────────────── */
@media (min-width: 1025px) and (max-width: 1400px) {
  /* Tighten article layout spacing on laptops */
  .articles-layout {
    gap: 2rem; /* Reduce from 3rem to prevent horizontal squeeze */
  }
  
  /* Ensure main content column respects container bounds */
  .articles-grid {
    min-width: 0; /* Prevents grid item overflow */
  }
  
  /* Sidebar: prevent it from forcing extra width */
  .sidebar {
    min-width: 0;
    max-width: 340px;
  }
  
  /* Article cards: ensure they don't exceed container */
  .article-card {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ── 768px: tablet portrait / large phone ───────────────── */
@media (max-width: 768px) {
  /* ── Nav ── */
  /* ── Nav (Mobile Dropdown) ── */
  .nav-strip { display: none; }
  
  .nav-inner { 
    height: 60px; 
    padding: 0 1rem; 
    position: relative; /* Crucial: allows dropdown to attach right below it */
  }
  
  /* Show hamburger icon and push it to the right */
  .mobile-menu-toggle {
    display: block;
    margin-left: auto;
  }

  /* Transform the links container into a hidden dropdown */
  .nav-links {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Attaches exactly to the bottom of the nav bar */
    left: 0;
    width: 100%;
    background: var(--navy);
    flex-direction: column; /* Stack buttons vertically */
    padding: 1rem;
    box-sizing: border-box;
    border-top: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    z-index: 400;
  }

  /* This class is added by the javascript to show the menu */
  .nav-links.nav-links--open {
    display: flex;
  }

  /* Override the old mobile hiding rules */
  .nav-link:not(.nav-admin-btn):not(.nav-search-icon) { 
    display: block; 
  }

  /* Style the buttons for the dropdown */
  .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
  }
  
  .nav-admin-btn {
    margin: 1rem 0 0 0;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  /* ── Container padding ── */
  .container,
  .container--narrow { padding: 0 1.1rem; }

  /* ── Hero ── */
  .hero-left { padding: 2.5rem 0 2rem; }
  .hero-inner { padding: 0 1.1rem; }
  .hero-title { font-size: clamp(2rem, 7vw, 2.8rem); }
  .hero-desc  { font-size: 0.95rem; }
  .hero-search { max-width: 100%; }

  /* ── Ticker: hide on small screens (layout breaks) ── */
  .ticker-bar { display: none; }

  /* ── Practice cards ── */
  .practice-inner { padding: 0 1.1rem; }
  .practice-grid  { grid-template-columns: minmax(0, 1fr); }
  .practice-card  { border-bottom: 1px solid rgba(255,255,255,0.06); }

  /* ── Article cards ── */
  .article-card { padding: 1.25rem; }
  .article-card-title { font-size: 1.15rem; }
  .article-authors { max-width: 55%; font-size: 0.72rem; }

  /* ── Section head ── */
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* ── Cat filter pills: allow scroll ── */
  .cat-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .cat-filter::-webkit-scrollbar { display: none; }
  .cat-pill { white-space: nowrap; flex-shrink: 0; }

  /* ── Editorial Briefing ── */
  .editorial-briefing { padding: 1.25rem; }

  .briefing-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }

  /* news-grid: single col on mobile */
  .briefing-html-content .news-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .briefing-html-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .briefing-html-content h2 { margin-top: 1.5rem; }
  .briefing-html-content h3 { margin-top: 1.25rem; }

  /* ── Article page hero ── */
  .article-hero-inner { padding: 0 1.1rem 1.75rem; }
  .article-content    { padding: 2rem 1.1rem 3rem; }
  .takeaway-banner    { padding: 1.1rem 1.25rem; }

  /* ── Footer ── */
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 2rem 1.1rem 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 1rem 1.1rem;
    gap: 0.5rem;
  }
  .footer-bottom-legal { text-align: center; max-width: 100%; }

  /* ── Admin ── */
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-content   { padding: 0 1rem; }
  .admin-topbar    { padding: 0 1rem; }
}

/* ── 480px: small phones ────────────────────────────────── */
@media (max-width: 480px) {
  .nav-inner { height: 50px; }
  .nav-name  { font-size: 1rem; }
  .nav-logo-mark { width: 30px; height: 30px; font-size: 15px; }

  .hero-left { padding: 2rem 0 1.5rem; }
  .hero-kicker { font-size: 0.6rem; }

  .hero-search { flex-direction: column; border-radius: var(--radius); overflow: visible; }
  .hero-search input {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    padding: 0.85rem 1rem;
  }
  .hero-search-btn {
    width: 100%;
    min-height: 44px;
    border-radius: var(--radius);
    margin-top: 0.5rem;
  }
  .hero-search-icon { display: none; }

  .article-card { padding: 1rem; }
  .article-card-title { font-size: 1.05rem; }
  .article-takeaway { padding: 0.7rem 0.85rem; }

  .editorial-briefing { padding: 1rem; }
  .briefing-html-content { font-size: 0.9rem; }

  .review-body { padding: 1.25rem; font-size: 0.9rem; }

  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .admin-stat { padding: 0.9rem 1rem; }
  .admin-stat-num { font-size: 1.8rem; }

  .footer-top { padding: 1.5rem 1rem 1rem; }
}

/* ══════════════════════════════════════════════════════════
   ARTICLE PAGE (SINGLE VIEW)
══════════════════════════════════════════════════════════ */
.article-container {
  width: 100%;
  max-width: 800px;
  margin: 4rem auto 6rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box; /* CRITICAL: Prevents horizontal overflow */
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--gold); }

.article-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.article-journal-badge {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.article-date-text {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem); /* Fluid typography */
  line-height: 1.15;
  color: var(--ink);
  margin: 0.5rem 0 1rem 0;
  letter-spacing: -0.01em;
}

.article-authors {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--gold);
}

.abstract-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-body);
}

.journal-club-box {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-top: 3.5rem;
  position: relative;
  width: 100%;
  box-sizing: border-box; /* CRITICAL: Prevents horizontal overflow */
}

.jc-badge {
  position: absolute;
  top: -14px;
  left: 2.5rem;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-mono);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.markdown-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
}
.markdown-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 1.5rem 0 0.75rem 0;
}
.markdown-body p { margin-bottom: 1rem; }
.markdown-body ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.markdown-body li { margin-bottom: 0.5rem; }
.markdown-body strong { color: var(--gold); font-weight: 700; }

.article-action-row {
  margin-top: 4rem;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.article-read-btn {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  text-align: center;
  width: 100%;
  max-width: fit-content;
}

/* ══════════════════════════════════════════════════════════
   HAMBURGER BUTTON OVERRIDES (FORCE VISIBILITY)
══════════════════════════════════════════════════════════ */

/* 1. Hide it on desktop screens */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--white, #ffffff); /* Force icon to be white */
    cursor: pointer;
    padding: 0.5rem;
    z-index: 500; /* Ensure it stays on top of other elements */
}

/* 2. Show it ONLY on phones and tablets */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important; /* !important forces it to override any hidden rules */
        align-items: center;
        justify-content: center;
        margin-left: auto; /* Pushes it to the far right side of the nav bar */
    }
    
    /* Ensure the logo and hamburger sit perfectly on the same line */
    .nav-inner {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }
}

/* ══════════════════════════════════════════════════════════
   FEATURED SECTION
══════════════════════════════════════════════════════════ */
.featured-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.featured-section .section-head {
    border-bottom: 2px solid var(--gold);
    margin-bottom: 1.5rem;
}

.featured-badge {
    background: var(--gold);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.featured-card {
    border-top: 4px solid var(--gold);
    background: var(--gold-pale);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border-bottom: 1px solid var(--border-light);
}

.featured-card .article-takeaway {
    flex-grow: 1;
    background: var(--white);
}

.featured-star {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-left: auto;
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── Contact Page Styles ── */
.contact-hero {
  background: var(--ink, #0a0f1a);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--gold, #c9974a);
}
.contact-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.contact-hero p {
  color: var(--muted, #94a3b8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-wrapper {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
}

/* Form Styling */
.contact-form-card {
  background: var(--surface, #ffffff);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border, #dde3ea);
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-mid, #1c2636);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border, #dde3ea);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface-2, #f6f8fb);
  transition: all 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold, #c9974a);
  background: var(--surface, #ffffff);
  box-shadow: 0 0 0 3px rgba(201, 151, 74, 0.15);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Conditional CV Field */
#cvField {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(-5px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.btn-submit {
  background: var(--gold, #c9974a);
  color: white;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}
.btn-submit:hover { background: #b5853f; }
.btn-submit:active { transform: scale(0.98); }

/* Info Card Styling */
.info-card {
  background: var(--surface-2, #f6f8fb);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border, #dde3ea);
  border-top: 4px solid var(--gold, #c9974a);
  height: fit-content;
}
.info-card h3 {
  color: var(--ink, #0a0f1a);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card p {
  color: var(--text, #1a2535);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.info-list {
  list-style: none;
  margin-bottom: 1.5rem;
}
.info-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text, #1a2535);
  font-size: 0.9rem;
}
.info-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green, #10b981);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 850px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
/* ══════════════════════════════════════════════════════════
   MOBILE POLISH — readability, tap targets, small layout fixes
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* iOS Safari zooms the page into any field smaller than 16px */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
  select, textarea { font-size: 16px !important; }

  /* Small mono labels were ~9–10px on phones */
  .nav-tagline { font-size: 0.66rem; }
  .article-journal-tag, .article-date, .article-takeaway-label,
  .section-head-link, .article-read-link,
  .footer-col-title, .footer-bottom-copy { font-size: max(0.72rem, 11.5px) !important; }

  /* Comfortable tap targets (≥ ~40px) */
  .bookmark-btn {
    min-width: 40px; min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .article-read-link, .section-head-link {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.25rem;
  }
  .article-card-title a { display: inline; padding: 0.15rem 0; }
  .footer-col-links a { display: inline-flex; align-items: center; min-height: 36px; }
  .back-link { display: inline-flex; align-items: center; min-height: 40px; }
  /* Featured-card links on the home page (inline-styled in index.ejs) */
  .card-cta-link { min-height: 40px; font-size: 11.5px !important; padding-left: 0.5rem; }
  .hero-kicker { font-size: max(0.66rem, 10.5px) !important; }

  /* Category strip: snap + a fade on the right shows it scrolls */
  .cat-filter {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
            mask-image: linear-gradient(90deg, #000 82%, transparent);
    padding-right: 2rem;
  }
  .cat-pill { scroll-snap-align: start; min-height: 40px; display: inline-flex; align-items: center; }

  /* Article cards: authors get their own line instead of being squeezed to "A…" */
  .article-card-footer { flex-wrap: wrap; gap: 0.25rem 0.75rem; }
  .article-card-footer .article-authors { flex: 1 1 100%; min-width: 0; }
  .article-card-footer .article-footer-right { margin-left: auto; }

  /* Footer: two short columns instead of one long list */
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.75rem 1.25rem !important; }
  .footer-brand-col { grid-column: 1 / -1; }

  /* Article admin tools: label above the buttons */
  .admin-toolbar { flex-direction: column !important; align-items: flex-start !important; gap: 0.6rem !important; }
  .admin-tool-btn { min-height: 36px; }
}

@media (max-width: 360px) {
  /* Very narrow phones: one footer column again */
  .footer-top { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ══════════════════════════════════════════════════════════
   ADMIN PAGES ON PHONES
   Wide tables and button rows used to stretch columns past the screen edge
   (and body overflow-x:hidden then cut them off). On phones, list tables become
   stacked cards; each cell is labelled from its column header (data-label is
   filled in by the small script in partials/header.ejs).
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .admin-content, .admin-grid, .admin-grid > *, .sl-wrap, .sl-wrap > *,
  .studio-panel, .admin-card { min-width: 0 !important; max-width: 100%; box-sizing: border-box; }

  .studio-panel-header, .filter-bar, .filter-group, .pending-row { flex-wrap: wrap !important; }
  .filter-group { width: 100%; }
  .filter-select { min-width: 0 !important; width: 100% !important; max-width: 100%; box-sizing: border-box; }

  /* Dashboard "pending review": actions under the text, not squeezing it to one letter per line */
  .pending-row { padding: 1rem !important; }
  .pending-row > div:first-child { flex: 1 1 100% !important; }
  .pending-row > div:last-child { justify-content: flex-start !important; flex-shrink: 1 !important; }

  /* Tables → cards */
  :is(.admin-body, .admin-page, .admin-card, .sl-card, .qa) table { display: block; width: 100% !important; border: 0 !important; }
  :is(.admin-body, .admin-page, .admin-card, .sl-card, .qa) table thead { display: none; }
  :is(.admin-body, .admin-page, .admin-card, .sl-card, .qa) table tbody { display: block; }
  :is(.admin-body, .admin-page, .admin-card, .sl-card, .qa) table tr {
    display: block; margin: 0 0 0.75rem; padding: 0.65rem 0.85rem;
    border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--surface, #fff);
  }
  :is(.admin-body, .admin-page, .admin-card, .sl-card, .qa) table td {
    display: block; width: auto !important; max-width: 100%;
    border: 0 !important; padding: 0.3rem 0 !important; text-align: left !important; white-space: normal !important;
  }
  :is(.admin-body, .admin-page, .admin-card, .sl-card, .qa) table td[data-label]:not([data-label=""])::before {
    content: attr(data-label); display: block; margin-bottom: 0.15rem;
    font: 600 0.66rem/1.3 'JetBrains Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted, #64748b);
  }

  /* Tap targets */
  .admin-body button, .admin-page button, .sl-card .btn, .admin-card button, .qa-btn { min-height: 36px; }
}

/* ══════════════════════════════════════════════════════════
   SHIMMER — a quiet "premium" sheen. CSS only; disabled for reduced motion.
══════════════════════════════════════════════════════════ */
@keyframes ipb-text-shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
@keyframes ipb-nav-line { from { background-position: -40% 0; opacity: 1; } to { background-position: 140% 0; opacity: 0.35; } }

@media (prefers-reduced-motion: no-preference) {
  /* Gold accent text: a slow light passing through it */
  .hero-title em, .nav-tagline {
    background-image: linear-gradient(100deg, var(--gold) 0%, var(--gold-light) 38%, #fff4d6 50%, var(--gold-light) 62%, var(--gold) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: ipb-text-shimmer 7s ease-in-out infinite;
  }

  /* A thin gold light that runs along the bottom of the nav once per page */
  .nav::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent) no-repeat;
    background-size: 35% 100%;
    animation: ipb-nav-line 2.6s ease-out 0.2s both;
  }

  /* Cards and gold buttons: a light sweep on hover / keyboard focus */
  .article-card, .featured-card, .sidebar-card, .qbh-card, .hero-search-btn, .nav-admin-btn {
    background-image: linear-gradient(110deg, transparent 38%, var(--sheen, rgba(201,151,74,0.13)) 50%, transparent 62%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    background-position: 160% 0;
    transition: background-position 0.9s ease, transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.18s;
  }
  .hero-search-btn { --sheen: rgba(255,255,255,0.55); }
  .nav-admin-btn  { --sheen: rgba(232,185,106,0.25); }
  .article-card:hover, .featured-card:hover, .sidebar-card:hover, .qbh-card:hover, .hero-search-btn:hover, .nav-admin-btn:hover,
  .article-card:focus-within, .featured-card:focus-within, .qbh-card:focus-visible, .hero-search-btn:focus-visible {
    /* their :hover rules use the background shorthand, which would wipe the sheen — restate it */
    background-image: linear-gradient(110deg, transparent 38%, var(--sheen, rgba(201,151,74,0.13)) 50%, transparent 62%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    background-position: -60% 0;
  }
}

/* ══════════════════════════════════════════════════════════
   READER EXPERIENCE — home bands, reading state, streak,
   article tools, account pages. Plain colours, no gradients.
══════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

.flash { background: #ecfdf5; color: #065f46; border-bottom: 1px solid #a7f3d0; padding: 0.7rem 1rem; text-align: center; font-family: var(--font-sans); font-size: 0.92rem; }

/* ── Hero, quieter ─────────────────────────────── */
.hero--plain::after { display: none; }
.hero--plain .hero-inner { min-height: 0; grid-template-columns: minmax(0, 1fr) 260px; gap: 3rem; }
.hero--plain .hero-left { padding: 3.5rem 0 3.25rem; }
.hero--plain .hero-title { font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.1; max-width: 17em; }
.hero--plain .hero-desc { margin-bottom: 1.75rem; color: rgba(255,255,255,0.72); }
.hero--plain .hero-search input { padding-left: 1.1rem; }
.hero--plain .hero-stats { padding: 0 0 0 2.5rem; }
.hero--plain .hero-stat { display: block; padding: 1.3rem 0; text-decoration: none; }
.hero--plain .hero-stat:hover .hero-stat-label { color: var(--gold-light); }
.hero--plain .hero-stat-number { font-size: 2.4rem; }
.hero--plain .hero-stat-label { font-size: 0.86rem; color: rgba(255,255,255,0.6); transition: color .15s; }

.sources-line { background: var(--ink); color: rgba(255,255,255,0.55); font-family: var(--font-sans); font-size: 0.84rem; line-height: 1.6; padding: 0.7rem 1.25rem; text-align: center; }
.sources-line span { color: var(--gold-light); margin-right: 0.5rem; }
.sources-line a { color: rgba(255,255,255,0.75); text-decoration: underline; }

/* ── Your week ─────────────────────────────────── */
.week-strip { background: var(--white); border-bottom: 1px solid var(--border-light); font-family: var(--font-sans); }
.week-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.week-main { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.week-dots { display: flex; gap: 0.45rem; flex-shrink: 0; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.66rem; color: var(--text-faint); width: 18px; }
.week-day i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border); background: transparent; }
.week-day--done i { background: var(--gold); border-color: var(--gold); }
.week-day--today { color: var(--ink); font-weight: 600; }
.week-day--today i { border-color: var(--ink); }
.week-day--today.week-day--done i { border-color: var(--gold); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--gold); }
.week-day--future i { border-style: dashed; }
.week-line { font-size: 0.95rem; color: var(--text-body); }
.week-signin { font-size: 0.82rem; color: var(--navy-light); text-decoration: underline; }
.week-side { display: flex; align-items: center; gap: 0.5rem 1.25rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--text-muted); min-width: 0; }
.week-side b { color: var(--ink); }
.week-since { background: var(--gold-pale); border: 1px solid #f0dcb8; color: #7a4f12; padding: 0.15rem 0.6rem; border-radius: 99px; }
.week-since b { color: #7a4f12; }
.week-next { color: var(--navy-light); max-width: 30ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-underline-offset: 2px; }
.week-next:hover { color: var(--gold); }
.week-strip--inline { border: 0; background: none; margin: 0.25rem 0 0.5rem; }

/* ── Band headings (picks, just in) ────────────── */
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); }
.band-head h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.band-head span { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-muted); }
.band-head--dark { border-bottom-color: rgba(255,255,255,0.14); }
.band-head--dark h2 { color: #fff; font-size: 1.5rem; }
.band-head--dark span { color: rgba(255,255,255,0.45); }

/* ── Picks ─────────────────────────────────────── */
.picks { background: var(--cream); padding: 3rem 0; }
.picks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.pick-card { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: 6px; padding: 1.2rem 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.8rem; transition: box-shadow .18s, transform .18s; }
.pick-card:hover { box-shadow: 0 10px 26px rgba(10,15,26,0.09); transform: translateY(-2px); }
.pick-top { display: flex; align-items: center; gap: 0.6rem; }
.pick-journal { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; color: var(--navy-light); }
.pick-title { font-family: var(--font-display); font-size: 1.28rem; font-weight: 700; line-height: 1.3; margin: 0; }
.pick-title a { color: var(--ink); }
.pick-title a:hover { color: var(--navy-light); }
.pick-take { font-family: var(--font-body); font-size: 0.9rem; line-height: 1.65; color: var(--text-body); margin: 0; flex: 1; }
.pick-foot { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border-light); font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-muted); }
.pick-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-foot a { color: var(--navy-light); font-weight: 600; white-space: nowrap; }
.pick-foot a:hover { color: var(--gold); }

/* ── Just in ───────────────────────────────────── */
.wire { background: var(--ink); padding: 2.5rem 0 2.75rem; }
.wire-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 2rem; }
.wire-item { padding: 0.9rem 0; border-top: 1px solid rgba(255,255,255,0.09); display: flex; flex-direction: column; gap: 0.45rem; }
.wire-meta, .wire-foot { display: flex; justify-content: space-between; gap: 0.75rem; font-family: var(--font-sans); font-size: 0.78rem; color: rgba(255,255,255,0.42); }
.wire-journal { color: var(--gold-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wire-item h3 { font-family: var(--font-body); font-size: 0.98rem; font-weight: 700; line-height: 1.45; margin: 0; }
.wire-item h3 a { color: #fff; }
.wire-item h3 a:hover { color: var(--gold-light); }
.wire-foot { margin-top: auto; }

/* ── Home main ─────────────────────────────────── */
.home-main { background: var(--paper); padding-top: 3rem; }
.editorial-briefing.is-collapsed { max-height: 560px; overflow: hidden; position: relative; margin-bottom: 0; }
.editorial-briefing.is-collapsed::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 130px; background: linear-gradient(rgba(255,255,255,0), #fff 85%); pointer-events: none; }
.editorial-briefing:not(.is-collapsed) { margin-bottom: 0; }
.briefing-title span { color: var(--gold); font-style: italic; }
.briefing-toggle, .more-btn { display: block; width: 100%; margin: 0 0 3rem; padding: 0.8rem 1rem; background: #fff; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 6px 6px; font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600; color: var(--navy-light); cursor: pointer; text-align: center; transition: background .15s, color .15s; }
.briefing-toggle:hover, .more-btn:hover { background: var(--gold-pale); color: var(--ink); }
.more-btn { margin: 1rem 0 0; border-top: 1px solid var(--border); border-radius: 6px; }

.cat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.side-wire { background: var(--navy); border-radius: 8px; padding: 1.4rem 1.4rem 1.5rem; color: #fff; }
.side-wire-kicker { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; color: var(--gold-light); margin-bottom: 0.4rem; }
.side-wire h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0 0 0.5rem; color: #fff; }
.side-wire p { font-family: var(--font-sans); font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,0.62); margin: 0; }
.side-wire p a { color: var(--gold-light); text-decoration: underline; }
.side-wire-btn { display: block; margin-top: 1rem; padding: 0.65rem 1rem; text-align: center; background: var(--gold); color: var(--ink); border-radius: 5px; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; transition: background .15s; }
.side-wire-btn:hover { background: var(--gold-light); }
.side-keys { font-family: var(--font-sans); font-size: 0.84rem; color: var(--text-muted); line-height: 2; padding: 0 0.25rem; }
.side-keys-title { font-weight: 600; color: var(--text-body); }
kbd { font-family: var(--font-mono); font-size: 0.72rem; background: #fff; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0.05rem 0.4rem; color: var(--ink); }
@media (hover: none) { .side-keys, .kr-head span { display: none; } }

/* ── Cards: tags, save button, read state ──────── */
.article-card[hidden] { display: none; }
.article-card-top .article-date { margin-left: 0; }
.card-save { margin-left: auto; display: flex; }
.bookmark-btn, .bookmark-guest { background: transparent; border: 0; padding: 4px; cursor: pointer; color: var(--gold); display: flex; align-items: center; border-radius: 4px; transition: transform .15s; }
.bookmark-guest { color: #c9bfa9; }
.bookmark-btn:hover, .bookmark-guest:hover { transform: scale(1.12); color: var(--gold); }
.tag-new, .tag-read { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; padding: 0.08rem 0.5rem; border-radius: 99px; line-height: 1.5; }
.tag-new { background: #e7f6ee; color: #136c43; }
.tag-read { display: none; background: #eef0f3; color: #5a6a7e; }
.is-read .tag-read { display: inline-block; }
.is-read .tag-new { display: none; }
.is-read .article-card-title a, .is-read .pick-title a, .is-read .kr-title { color: var(--text-muted); }
.is-read .article-takeaway { opacity: 0.72; }
.wire .tag-read { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
.wire .is-read h3 a { color: rgba(255,255,255,0.5); }
.article-card.is-new-for-you:not(.is-read) { box-shadow: inset 3px 0 0 var(--gold); }
.wire .is-new-for-you:not(.is-read) .wire-journal::before, .pick-card.is-new-for-you:not(.is-read) .pick-journal::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: middle; }

/* ── Nav: search, streak ───────────────────────── */
.nav-strip-meta a { color: var(--text-faint); }
.nav-strip-meta a:hover { color: var(--gold-light); }
.nav-search-btn { display: inline-flex; align-items: center; gap: 0.45rem; background: none; border: 0; cursor: pointer; color: rgba(255,255,255,0.72); padding: 0.45rem 0.7rem; border-radius: 5px; font-family: var(--font-sans); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; }
.nav-search-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-search-btn span { display: none; }
.nav-search { display: none; gap: 0.5rem; max-width: var(--max-w); margin: 0 auto; padding: 0.7rem 2rem 0.9rem; }
.nav-search.is-open { display: flex; }
.nav-search input { flex: 1; min-width: 0; padding: 0.65rem 0.9rem; font: inherit; font-family: var(--font-sans); font-size: 1rem; color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; }
.nav-search input::placeholder { color: rgba(255,255,255,0.4); }
.nav-search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.nav-search button { padding: 0.65rem 1.1rem; border: 0; border-radius: 6px; background: var(--gold); color: var(--ink); font-family: var(--font-sans); font-weight: 600; cursor: pointer; }
.nav-streak { display: inline-block; margin-left: 0.45rem; padding: 0.05rem 0.5rem; border-radius: 99px; background: rgba(201,151,74,0.18); color: var(--gold-light); font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; letter-spacing: 0; text-transform: none; vertical-align: 1px; }
.nav-streak--due { background: none; box-shadow: inset 0 0 0 1px rgba(201,151,74,0.55); }
.nav-streak--solo { margin: 0 0.25rem; }
@media (max-width: 1024px) {
  .nav-search-btn { width: 100%; justify-content: flex-start; padding: 0.85rem 1rem; font-size: 0.9rem; }
  .nav-search-btn span { display: inline; }
  .nav-search { padding: 0.7rem 1rem 0.9rem; }
}

/* ── Article page ──────────────────────────────── */
.read-bar { position: fixed; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; z-index: 600; pointer-events: none; }
.article-action-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.article-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tool-btn { font-family: var(--font-sans); font-size: 0.86rem; font-weight: 500; color: var(--text-body); background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 0.5rem 0.85rem; cursor: pointer; min-height: 40px; transition: border-color .15s, color .15s; }
.tool-btn:hover { border-color: var(--gold); color: var(--ink); }
.keep-reading { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.kr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.kr-head h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 0; color: var(--ink); }
.kr-head span { font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-muted); }
.kr-item { padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.kr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.kr-next-label { display: none; font-weight: 700; color: #7a4f12; background: var(--gold-pale); border-radius: 99px; padding: 0.05rem 0.55rem; }
.kr-item--next:not(.is-read) .kr-next-label { display: inline-block; }
.kr-title { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.kr-item--next .kr-title { font-size: 1.4rem; }
.kr-title:hover { color: var(--navy-light); }
.kr-take { font-family: var(--font-body); font-size: 0.88rem; line-height: 1.6; color: var(--text-body); margin: 0.4rem 0 0; display: none; }
.kr-item--next .kr-take { display: block; }

/* ── Toast ─────────────────────────────────────── */
#ipbToast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; font-family: var(--font-sans); font-size: 0.9rem; padding: 0.65rem 1.1rem; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10000; max-width: calc(100vw - 32px); }
#ipbToast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Account, forgot, reset ────────────────────── */
.acct { font-family: var(--font-sans); }
.acct--narrow { max-width: 480px; }
.acct-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; margin-bottom: 1.25rem; }
.acct-card h1, .acct-card h2 { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin: 0 0 1rem; }
.acct-card h1 { font-size: 1.7rem; }
.acct-card h2 { font-size: 1.35rem; }
.acct-card h3 { font-size: 0.86rem; font-weight: 600; color: var(--text-muted); margin: 1.25rem 0 0.5rem; }
.acct-card p { line-height: 1.6; color: var(--text-body); margin: 0 0 1rem; }
.acct-card--danger { border-color: #f3c7c7; }
.acct-stats { display: flex; gap: 2.25rem; flex-wrap: wrap; }
.acct-stats b { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--ink); }
.acct-stats span { font-size: 0.85rem; color: var(--text-muted); }
.acct-stats a { color: inherit; text-decoration: underline; }
.acct-recent { list-style: none; margin: 0 0 1rem; padding: 0; }
.acct-recent li { padding: 0.6rem 0; border-bottom: 1px solid var(--border-light); }
.acct-recent a { display: block; color: var(--ink); font-weight: 500; line-height: 1.4; }
.acct-recent a:hover { color: var(--navy-light); }
.acct-recent span { font-size: 0.8rem; color: var(--text-muted); }
.acct-form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 420px; }
.acct-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.88rem; font-weight: 600; color: var(--text-body); }
.acct-form input[type=text], .acct-form input[type=email], .acct-form input[type=password] { padding: 0.65rem 0.8rem; font: inherit; font-size: 1rem; font-weight: 400; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--ink); }
.acct-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.acct-form input:disabled { background: var(--cream); color: var(--text-muted); }
.acct-check { flex-direction: row !important; align-items: flex-start; gap: 0.6rem !important; font-weight: 400 !important; }
.acct-check input { margin-top: 0.25rem; width: 18px; height: 18px; }
.acct-btn { align-self: flex-start; display: inline-block; padding: 0.65rem 1.2rem; min-height: 42px; background: var(--navy); color: #fff; border: 0; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s; }
.acct-btn:hover { background: var(--navy-light); }
.acct-btn--danger { background: #b42323; }
.acct-btn--danger:hover { background: #8f1a1a; }
.acct-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.86rem; color: var(--text-muted); text-decoration: underline; cursor: pointer; }
.acct-hint { font-size: 0.86rem; color: var(--text-muted) !important; margin: 0 !important; }
.acct-hint a { color: var(--navy-light); text-decoration: underline; }
.acct-msg { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 0.7rem 0.9rem; border-radius: 6px; margin-bottom: 1.25rem; font-size: 0.92rem; }
.acct-msg--err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

@media (max-width: 1024px) {
  .hero--plain .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero--plain .hero-left { padding: 2.5rem 0 1.5rem; }
  .hero--plain .hero-stats { flex-direction: row; gap: 2.5rem; padding: 0 0 2rem; border-left: 0; }
  .hero--plain .hero-stat { padding: 0; border: 0; }
  .hero--plain .hero-stat-number { font-size: 1.8rem; }
}
@media (max-width: 768px) {
  .picks { padding: 2rem 0; }
  .band-head h2 { font-size: 1.5rem; }
  .week-inner { flex-direction: column; align-items: flex-start; }
  .week-main { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .week-next { max-width: 100%; }
  .acct-card { padding: 1.15rem; }
  .acct-stats { gap: 1.5rem; }
  .article-action-row { flex-direction: column; align-items: stretch; }
  .article-tools .tool-btn { flex: 1; }
  .editorial-briefing.is-collapsed { max-height: 460px; }
}

/* list cards: the article-page author style (large serif) must not leak into card footers */
.article-card .article-authors { font-family: var(--font-sans); font-size: 0.8rem; font-style: normal; color: var(--text-muted); margin: 0; }
.acct-stats b, .hero-stat-number, .week-side b { font-variant-numeric: lining-nums; }
.acct-stats b { font-family: var(--font-sans); font-weight: 600; font-size: 1.8rem; }
.acct .week-strip--inline { margin: 1.1rem 0 0.25rem; }

/* small-screen fixes for the week strip and the narrow account pages */
.acct.container { padding-top: 2.5rem; padding-bottom: 4rem; }
@media (max-width: 768px) {
  .week-side { width: 100%; }
  .week-next { display: block; width: 100%; }
  .nav-streak--solo { align-self: center; margin: 0.5rem 0 0; }
}
.acct-btn--quiet { background: #fff; color: var(--text-body); border: 1px solid var(--border); }
.acct-btn--quiet:hover { background: var(--cream); border-color: var(--text-muted); }

/* ── Specialties: tags, the index page and the switcher, in the house style (navy, gold, mono labels) ── */
.spec-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold-pale);
  border: 1px solid var(--gold-line);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.spec-tag:hover { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }
.spec-tag--soft { background: transparent; }
.spec-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.9rem; }

.spec-intro { font-family: var(--font-body); font-size: 0.95rem; line-height: 1.7; color: var(--text-muted); max-width: 62ch; margin: -0.4rem 0 1.8rem; }
.spec-intro a { color: var(--gold); }
.spec-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; border-top: 2px solid var(--ink); }
.spec-row {
  display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 0 1rem; align-items: baseline;
  padding: 1.15rem 0.25rem; border-bottom: 1px solid var(--border-light); color: inherit; text-decoration: none;
  transition: background 0.15s;
}
.spec-row:hover { background: var(--surface-warm); }
.spec-row-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--gold); letter-spacing: 0.08em; }
.spec-row-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.spec-row:hover .spec-row-name { color: var(--navy-light); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.spec-row-blurb { grid-column: 2; font-family: var(--font-sans); font-size: 0.88rem; line-height: 1.5; color: var(--text-muted); margin-top: 0.3rem; }
.spec-row-count { grid-row: 1; grid-column: 3; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }
.spec-row-count b { color: var(--navy); font-weight: 600; }
@media (max-width: 760px) { .spec-index { grid-template-columns: 1fr; } .spec-row-name { font-size: 1.25rem; } }

/* ══ The magazine on the home page: a cover, then one front page per specialty ══ */
.mag-tabs { background: var(--ink); border-bottom: 1px solid rgba(201,151,74,0.35); }
.mag-tabs-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; gap: 0.15rem; overflow-x: auto; padding: 0.35rem 1rem; scrollbar-width: none; }
.mag-tabs-inner::-webkit-scrollbar { display: none; }
.mag-tabs-label { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-right: 0.7rem; white-space: nowrap; }
.mag-tab { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.62); background: none; border: 0;
           border-bottom: 2px solid transparent; padding: 0.5rem 0.65rem; cursor: pointer; white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.mag-tab:hover { color: #fff; }
.mag-tab.is-active { color: var(--gold-light); border-bottom-color: var(--gold); }
.mag-tab:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

.mag { position: relative; perspective: 2400px; perspective-origin: 0% 30%; }
.mag-page { background: var(--cream); transform-origin: left center; backface-visibility: hidden; }
.mag-page.is-turning-out, .mag-page.is-turning-in { position: absolute; top: 0; left: 0; right: 0; z-index: 30; box-shadow: 24px 0 60px rgba(10,15,26,0.28); }
.mag-page.is-turning-out { animation: magOut 0.75s cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.mag-page.is-turning-in { animation: magIn 0.75s cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.mag-page.is-turning-out::after, .mag-page.is-turning-in::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(10,15,26,0) 40%, rgba(10,15,26,0.22)); animation: magShade 0.75s ease forwards; }
@keyframes magOut { from { transform: rotateY(0deg); } to { transform: rotateY(-100deg); opacity: 0.4; } }
@keyframes magIn { from { transform: rotateY(-100deg); opacity: 0.4; } to { transform: rotateY(0deg); opacity: 1; } }
@keyframes magShade { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0.2; } }

.mag-sheet { padding: 2.6rem 1rem 5rem; max-width: var(--max-w); margin: 0 auto; }
.mag-mast { text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 1.3rem; margin-bottom: 0.4rem; }
.mag-kicker { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.16em;
              text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--ink); padding-bottom: 0.55rem; margin-bottom: 1.4rem; }
.mag-kicker span:first-child { color: var(--gold); font-weight: 600; }
.mag-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.8rem, 7.5vw, 5.8rem); line-height: 0.95; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.mag-dek { font-family: var(--font-body); font-style: italic; font-size: 1rem; line-height: 1.6; color: var(--text-muted); max-width: 58ch; margin: 0.9rem auto 0; }
.mag-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 1rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
            text-transform: uppercase; color: var(--text-faint); }
.mag-meta b { color: var(--navy); font-weight: 600; }
.mag-meta a { color: var(--gold); text-decoration: none; }
.mag-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); border-top: 2px solid var(--ink);
             padding-top: 0.55rem; margin: 2.2rem 0 1.2rem; }
.mag-src { display: block; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.mag-picks-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 2.2rem; }
.mag-lead { display: block; color: inherit; text-decoration: none; padding-right: 2.2rem; border-right: 1px solid var(--border); }
.mag-lead h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.08; color: var(--ink); margin: 0.5rem 0 0.9rem; }
.mag-lead p { font-family: var(--font-body); font-size: 1rem; line-height: 1.75; color: var(--text-body); margin: 0 0 1rem; }
.mag-read { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.mag-side-item { display: block; color: inherit; text-decoration: none; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border-light); }
.mag-side-item:last-child { border-bottom: 0; margin-bottom: 0; }
.mag-side-item h4, .mag-just-item h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.2; color: var(--ink); margin: 0.35rem 0 0.4rem; }
.mag-side-item p { font-family: var(--font-sans); font-size: 0.86rem; line-height: 1.5; color: var(--text-muted); margin: 0; }
.mag-lead:hover h3, .mag-side-item:hover h4, .mag-just-item:hover h4 { color: var(--navy-light); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.mag-just-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.mag-just-item { display: block; color: inherit; text-decoration: none; padding-left: 1rem; border-left: 2px solid var(--gold-line); }
.mag-more { display: block; max-width: 22rem; margin: 2.8rem auto 0; padding: 0.85rem 1rem; text-align: center; border: 1px solid var(--gold); color: var(--navy); text-decoration: none;
            font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; transition: background 0.15s, color 0.15s; }
.mag-more:hover { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }

/* turning the page: side arrows, the folded corner, the folio */
.mag-arrow { position: fixed; top: 50%; z-index: 45; width: 40px; height: 66px; transform: translateY(-50%); border: 1px solid var(--gold-line); background: rgba(250,247,242,0.94);
             color: var(--navy); font-size: 1.1rem; cursor: pointer; transition: background 0.15s, color 0.15s; }
.mag-arrow--prev { left: 0; border-left: 0; border-radius: 0 6px 6px 0; }
.mag-arrow--next { right: 0; border-right: 0; border-radius: 6px 0 0 6px; }
.mag-arrow:hover, .mag-arrow:focus-visible { background: var(--navy); color: var(--gold-light); outline: none; }
.mag-corner { position: fixed; right: 0; bottom: 0; z-index: 46; width: 96px; height: 96px; text-decoration: none; }
.mag-corner-fold { position: absolute; right: 0; bottom: 0; width: 58px; height: 58px; border-top-left-radius: 6px;
                   background: linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 49%, #d9cfbd 50%, #fffdf8 64%, #e6dcc9 100%);
                   filter: drop-shadow(-3px -3px 6px rgba(10,15,26,0.22)); transition: width 0.25s ease, height 0.25s ease; animation: magNudge 3.2s ease-in-out 1.8s 3; }
.mag-corner:hover .mag-corner-fold, .mag-corner:focus-visible .mag-corner-fold { width: 88px; height: 88px; }
.mag-corner-text { position: absolute; right: 66px; bottom: 16px; white-space: nowrap; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase;
                   background: var(--ink); color: rgba(255,255,255,0.8); padding: 0.42rem 0.7rem; border-radius: 3px; box-shadow: 0 6px 18px rgba(10,15,26,0.25); }
.mag-corner-text b { color: var(--gold-light); font-weight: 600; }
@keyframes magNudge { 0%, 78%, 100% { width: 58px; height: 58px; } 86% { width: 80px; height: 80px; } 92% { width: 64px; height: 64px; } }
.mag-folio { margin-left: auto; padding-left: 1rem; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.5); white-space: nowrap; }
.mag-corner, .mag-arrow { transition: opacity 0.25s ease; }
.mag-controls-off .mag-corner, .mag-controls-off .mag-arrow { opacity: 0; pointer-events: none; }
.mag-hint { position: fixed; right: 18px; bottom: 108px; z-index: 46; max-width: 270px; background: var(--ink); color: rgba(255,255,255,0.88); padding: 0.75rem 0.9rem;
            border-radius: 6px; border: 1px solid rgba(201,151,74,0.45); font-family: var(--font-sans); font-size: 0.82rem; line-height: 1.45; box-shadow: 0 12px 30px rgba(10,15,26,0.35); }
.mag-hint::after { content: ''; position: absolute; right: 26px; bottom: -7px; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg);
                   border-right: 1px solid rgba(201,151,74,0.45); border-bottom: 1px solid rgba(201,151,74,0.45); }
@media (max-width: 860px) {
  .mag-picks-grid, .mag-just-grid { grid-template-columns: 1fr; }
  .mag-lead { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 1.4rem; }
  .mag-arrow { width: 30px; height: 52px; font-size: 0.95rem; }
  .mag-corner-text { display: none; }
  .mag-kicker { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mag-page.is-turning-out, .mag-page.is-turning-in, .mag-corner-fold { animation: none !important; }
}

/* ── A reader's specialties: the sign-up and account picker, the "your edition" strip, their tabs ── */
.pick-specs { border: 0; padding: 0; margin: 0 0 1.5rem; }
.pick-specs legend { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.13em; text-transform: uppercase; color: #5a6a7e; margin-bottom: 0.45rem; padding: 0; }
.pick-specs p { font-size: 0.84rem; color: #5a6a7e; margin: 0 0 0.7rem; line-height: 1.5; }
.pick-specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.4rem; margin-bottom: 0.9rem; }
.pick-spec { display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.7rem; border: 1px solid #ddd5c4; border-radius: 6px; background: #faf7f2; cursor: pointer; font-size: 0.86rem; color: #1e2d42; line-height: 1.25; transition: border-color 0.15s, background 0.15s; }
.pick-spec input { accent-color: #c9974a; width: 15px; height: 15px; flex-shrink: 0; margin: 0; }
.pick-spec:hover { border-color: #c9974a; }
.pick-spec:has(input:checked) { border-color: #c9974a; background: #fdf4e7; color: #0a0f1a; font-weight: 600; }
.mine-strip { background: #f5f0e8; border-bottom: 1px solid #ddd5c4; }
.mine-strip-inner { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; padding-top: 0.55rem; padding-bottom: 0.55rem; font-size: 0.84rem; color: #1e2d42; }
.mine-label { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: #a8782f; }
.mine-names { font-family: var(--font-serif, Georgia, serif); font-style: italic; }
.mine-strip a { margin-left: auto; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #0b1d3a; border-bottom: 1px solid #c9974a; text-decoration: none; }
.mag-tab.is-mine::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold, #c9974a); margin-right: 0.45em; vertical-align: middle; }
@media (max-width: 640px) { .mine-strip a { margin-left: 0; } .pick-specs-grid { grid-template-columns: 1fr 1fr; } }
