/* ═══════════════════════════════════════════════════════════════
   The Clinical Lighthouse — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #666666;
  --card: #f8f9fa;
  --border: #e5e7eb;
  --accent: #1B2A4A;
  --accent-hover: #142038;
  --gold: #C5A55A;
  --gold-hover: #b8963f;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --maxw: 720px;
  --header-bg: rgba(255, 255, 255, 0.92);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --card: #18181b;
  --border: #27272a;
  --accent: #3d5a8a;
  --accent-hover: #5a7ab5;
  --gold: #d4b76a;
  --gold-hover: #e0c87a;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --header-bg: rgba(10, 10, 10, 0.92);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Accessibility ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* ── Animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 0;
}
.header-inner .header-nav {
  margin-left: auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.logo img {
  height: 54px;
  width: auto;
}
.logo-motto {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  font-style: italic;
  opacity: 0.9;
}

/* Topics dropdown */
.topics-dropdown {
  position: relative;
  margin-left: 12px;
}
.topics-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
}
.topics-toggle:hover,
.topics-toggle[aria-expanded="true"] {
  color: var(--fg);
  border-color: var(--accent);
}
.topics-toggle svg {
  transition: transform .2s ease;
}
.topics-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.topics-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 100;
  padding: 4px 0;
}
.topics-menu--open {
  display: block;
}
.topics-menu__item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  transition: background .1s ease;
}
.topics-menu__item:hover {
  background: var(--border);
}
.topics-menu__item--active {
  color: var(--accent);
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-link {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--fg); }
.nav-user { font-weight: 600; color: var(--fg); }
.btn-primary-sm {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s;
}
.btn-primary-sm:hover { background: var(--accent-hover); }

.nav-badge-pro {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--gold), var(--gold-hover));
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-badge-free {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #6b7280;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Hamburger button ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
  z-index: 201;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger--open span:nth-child(2) {
  opacity: 0;
}
.hamburger--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile slide-out menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  z-index: 200;
  padding: 72px 20px 24px;
  overflow-y: auto;
  transition: right .3s cubic-bezier(.4,0,.2,1);
}
.mobile-menu--open {
  right: 0;
}
.mobile-menu__section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding: 4px 12px;
  margin-bottom: 4px;
}
.mobile-menu__link {
  display: block;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s ease;
}
.mobile-menu__link:hover {
  background: var(--border);
}
.mobile-menu__cta {
  font-weight: 600;
  color: var(--gold);
}
.mobile-menu__user {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.mobile-menu__divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}
.mobile-menu .theme-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
}
.mobile-menu .theme-toggle:hover {
  background: var(--border);
}

body.menu-open {
  overflow: hidden;
}
/* Overlay element behind mobile menu */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}
.mobile-overlay--visible {
  display: block;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--fg); background: var(--card); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.page-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Axis Header ── */
.axis-header {
  padding: 36px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.axis-header__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.axis-header__desc {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.6;
  max-width: 600px;
}
.axis-header__back {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.axis-header__back:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── Topbar / Branding ── */
.topbar {
  text-align: center;
  padding: 24px 24px 0;
}
.brand-tagline {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.article-counter {
  font-size: 13px;
  color: var(--muted);
}
.counter-number {
  font-weight: 700;
  color: var(--accent);
}

/* ── Hero subbar ── */
.hero-subbar {
  background: var(--accent);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 8px 24px;
  text-align: center;
}
.hero-subbar__text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13.5px;
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.01em;
  line-height: 1.4;
  margin: 0;
  max-width: 1120px;
  margin: 0 auto;
}
[data-theme="dark"] .hero-subbar {
  background: var(--card);
  border-bottom-color: var(--border);
}
[data-theme="dark"] .hero-subbar__text {
  color: rgba(61,90,138,0.9);
}

/* ── Section headers ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   HERO CARD
   ═══════════════════════════════════════════════════════════════ */
/* Free article tag */
.free-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  background: rgba(34,197,94,.85);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.free-tag--sm {
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  font-size: 10px;
}
.med-card__img-wrap,
.std-card__img-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-card {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 480px;
  text-decoration: none;
  color: #fff;
  margin-bottom: 8px;
}
.hero-card__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 40%, #1a0533 100%);
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.hero-card--has-img .hero-card__bg {
  background-size: cover;
  background-position: center;
}
.hero-card:hover .hero-card__bg { transform: scale(1.03); }
.hero-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.2) 100%);
}
.hero-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  padding: 48px 48px 44px;
}
.hero-card__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-card__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  max-width: 700px;
}
.hero-card__dek {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin-bottom: 16px;
}
.hero-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}
.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.hero-card__cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 10px 24px;
  border-radius: 8px;
  width: fit-content;
  transition: background 0.2s, transform 0.2s;
}
.hero-card:hover .hero-card__cta {
  background: var(--accent-hover);
  transform: translateX(4px);
}
/* Hero badges always on dark bg */
.hero-card__badges .badge {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════════════════════
   FULL-WIDTH HERO
   ═══════════════════════════════════════════════════════════════ */
.hero-full {
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  text-decoration: none;
  color: #fff;
}
.hero-full__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 40%, #1a0533 100%);
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.hero-full--has-img .hero-full__bg {
  background-size: cover;
  background-position: center;
}
.hero-full:hover .hero-full__bg { transform: scale(1.03); }
.hero-full__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.15) 100%);
}
.hero-full__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
  padding: 56px 0 52px;
}
.hero-full__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}
.hero-full__inner .hero-card__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-full__inner .hero-card__badges .badge {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  backdrop-filter: blur(4px);
}
.hero-full__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  max-width: 740px;
}
.hero-full__dek {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-width: 580px;
  margin-bottom: 18px;
}
.hero-full__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 22px;
}
.hero-full__cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 10px 24px;
  border-radius: 8px;
  width: fit-content;
  transition: background 0.2s, transform 0.2s;
}
.hero-full:hover .hero-full__cta {
  background: var(--accent-hover);
  transform: translateX(4px);
}
.hero-full .free-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}
@media (max-width: 768px) {
  .hero-full { min-height: 400px; }
  .hero-full__content { min-height: 400px; padding: 36px 0 36px; }
  .hero-full__inner { padding: 0 20px; }
  .hero-full__title { font-size: 28px; }
  .hero-full__dek { font-size: 15px; }
}

/* ═══════════════════════════════════════════════════════════════
   DIGEST AS EDITOR'S PICK CARD
   ═══════════════════════════════════════════════════════════════ */
/* Digest pick: stack vertically so image is on top, body below, podcast at bottom */
.med-card--digest {
  flex-direction: column;
  position: relative;
}
.med-card--digest .med-card__img-wrap {
  width: 100%;
  height: 160px;
  flex-shrink: 0;
}
.med-card--digest .med-card__body {
  padding: 16px 20px 12px;
}
.med-card--digest .med-card__title {
  font-size: 15px;
  line-height: 1.3;
}
.med-card--digest .med-card__dek {
  font-size: 13px;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.med-card--digest-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 60%, #1a0533 100%);
  color: #fff;
  min-height: 100%;
}
.med-card--digest-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.8);
}
.badge--digest {
  background: rgba(30,58,95,0.15) !important;
  color: #1e3a5f !important;
}
[data-theme="dark"] .badge--digest {
  background: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.8) !important;
}
.med-card__podcast {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.med-card__podcast-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.med-card__podcast audio {
  width: 100%;
  height: 32px;
}
.med-card--digest-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}
.med-card--digest-overlay-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  background: rgba(30,58,95,0.9);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 4px;
}
.med-card--digest-overlay-seg {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 4px;
}
.med-card__img-wrap { position: relative; }

/* ═══════════════════════════════════════════════════════════════
   DAILY DIGEST CARD
   ═══════════════════════════════════════════════════════════════ */
.digest-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  animation: fadeSlideUp 0.5s ease both;
}
.digest-card__header {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 60%, #1a0533 100%);
  padding: 32px 36px 24px;
  color: #fff;
}
[data-theme="dark"] .digest-card__header {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}
.digest-card__title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.digest-card__meta {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.digest-card__highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.digest-hl {
  padding: 24px 28px;
  text-decoration: none;
  color: var(--fg);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}
.digest-hl:last-child { border-right: none; }
.digest-hl:hover { background: var(--bg); }
.digest-hl__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--fg);
}
.digest-hl__summary {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.digest-card__briefs {
  border-top: 1px solid var(--border);
  padding: 20px 28px;
}
.digest-card__briefs-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.digest-card__briefs-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}
.digest-card__briefs-list li {
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 0;
}
.digest-card__briefs-list a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.15s;
}
.digest-card__briefs-list a:hover {
  color: var(--accent);
}
.digest-card__podcast {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.digest-card__podcast-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.3px;
}
@media (max-width: 768px) {
  .digest-card__highlights {
    grid-template-columns: 1fr;
  }
  .digest-hl {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .digest-hl:last-child { border-bottom: none; }
  .digest-card__briefs-list {
    grid-template-columns: 1fr;
  }
  .digest-card__podcast {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MEDIUM CARDS
   ═══════════════════════════════════════════════════════════════ */
.medium-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 8px;
}
.med-card {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  animation: fadeSlideUp 0.5s ease both;
}
.med-card:hover {
  box-shadow: 0 12px 32px var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.med-card__img-wrap {
  width: 220px;
  flex-shrink: 0;
  align-self: stretch;
}
.med-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.med-card__img--placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1e3a5f, #4338ca);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3);
}
.med-card__img--placeholder svg { width: 48px; height: 48px; }
.med-card__body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; }
.med-card__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.med-card__title { font-size: 17px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.med-card__dek { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.med-card__meta { font-size: 12px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   STANDARD CARDS GRID
   ═══════════════════════════════════════════════════════════════ */
/* ── Latest carousel wrapper ── */
.latest-carousel {
  position: relative;
  margin-bottom: 64px;
}
.latest-carousel__track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.latest-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.latest-carousel__btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  font-size: 16px;
}
.latest-carousel__btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg);
}
.latest-carousel__btn:disabled {
  opacity: .3;
  cursor: default;
}
.latest-carousel__dots {
  display: flex;
  gap: 6px;
}
.latest-carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.latest-carousel__dot--active {
  background: var(--accent);
  transform: scale(1.3);
}
.latest-carousel__counter {
  font-size: 12px;
  color: var(--muted);
}

.standard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}
.std-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  animation: fadeSlideUp 0.5s ease both;
}
.std-card:hover {
  box-shadow: 0 12px 32px var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.std-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.std-card__img--placeholder {
  width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a, #312e81);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.2);
}
.std-card__img--placeholder svg { width: 40px; height: 40px; }
.std-card__body { padding: 18px 20px 20px; }
.std-card__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.std-card__title { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.std-card__dek { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.std-card__meta { font-size: 11px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.4;
}
/* Light theme (default) */
.badge--journal { background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.4); color: #7c3aed; }
.badge--specialty { background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.4); color: #2563eb; }
.badge--study-design { background: rgba(22, 163, 74, 0.1); border: 1px solid rgba(22, 163, 74, 0.4); color: #16a34a; }
/* Dark theme */
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .gate-box input:focus { box-shadow: 0 0 0 3px rgba(90, 122, 181, 0.15); }
[data-theme="dark"] .badge--journal { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.3); color: #a78bfa; }
[data-theme="dark"] .badge--specialty { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.3); color: #60a5fa; }
[data-theme="dark"] .badge--study-design { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.3); color: #4ade80; }

a.badge--clickable {
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.badge--clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* ═══════════════════════════════════════════════════════════════
   SUBSCRIBE GATE
   ═══════════════════════════════════════════════════════════════ */
.subscribe-gate {
  position: relative;
  margin-top: -60px;
  padding-top: 0;
}
.gate-preview {
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.gate-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  gap: 32px;
}
.gate-login, .gate-signup { flex: 1; }
.pro-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}
.gate-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.gate-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  margin-bottom: 10px;
}
.gate-box input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.08);
}
.upgrade-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.upgrade-btn:hover { background: var(--accent-hover); }
.gate-divider {
  display: flex;
  align-items: center;
  width: 1px;
  background: var(--border);
  position: relative;
}
.gate-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  padding: 8px 0;
}
.gate-signup p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.paywall-features {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}
.paywall-features li {
  font-size: 14px;
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--fg);
}
.paywall-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.gate-error { color: #ef4444; font-size: 13px; margin-top: 8px; }

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════════════════════════ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 24px;
}
.auth-box {
  max-width: 420px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
.auth-box h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.auth-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
}
.form-group input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.08);
}
.form-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.auth-next-step {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  font-weight: 500;
}
.btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-hover); }
.auth-link { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
.auth-link a { color: var(--accent); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   ARTICLE PAGE
   ═══════════════════════════════════════════════════════════════ */
.article-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.article-header { margin-bottom: 32px; }
.article-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.article-meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.article-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.article-dek {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.5;
}
.article-hero {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
}
.hero-img { width: 100%; height: auto; display: block; }
.article-content { font-size: 17px; line-height: 1.8; }
.article-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; }
.article-content h3 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--card);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ── Static pages ── */
.static-page {
  max-width: var(--maxw);
  padding: 60px 24px;
}
.static-page h1 { font-size: 32px; font-weight: 800; margin-bottom: 24px; }
.static-page p { font-size: 16px; line-height: 1.8; color: var(--muted); margin-bottom: 16px; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 120px 24px;
}
.empty-state h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   AXIS NAVIGATION & HEADER
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hero-card__content { padding: 32px 24px 28px; min-height: 360px; }
  .hero-card__title { font-size: 24px; }
  .hero-card__dek { font-size: 14px; }
  .hero-subbar { padding: 7px 20px; }
  .hero-subbar__text { font-size: 12.5px; text-wrap: balance; }
  .medium-grid { grid-template-columns: 1fr; }
  .med-card { flex-direction: column; }
  .med-card__img-wrap { width: 100%; height: 200px; }
  .latest-carousel__track { grid-template-columns: 1fr 1fr; }
  .standard-grid { grid-template-columns: 1fr 1fr; }
  .gate-box { flex-direction: column; padding: 24px; }
  .gate-divider { width: 100%; height: 1px; }
  .gate-divider span { padding: 0 8px; }
  .article-title { font-size: 26px; }
  .topics-menu { min-width: 180px; }
  .axis-header__title { font-size: 24px; }
  .desktop-only { display: none !important; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
  .logo-motto { display: none; }
  .logo img { height: 40px; }
  .logo { flex: 1; min-width: 0; }
}

@media (max-width: 480px) {
  .standard-grid { grid-template-columns: 1fr; }
  .latest-carousel__track { grid-template-columns: 1fr; }
  .logo img { height: 36px; }
  .auth-box { padding: 28px 20px; }
}
