/* ==========================================================================
   LIFE ON EARTH — public site styles
   Editorial design language: white canvas, heavy grotesk headlines,
   electric-blue hero, pill buttons, soft-grey topic sections.
   ========================================================================== */

:root {
  --blue: #0057ff;
  --blue-hover: #0046d1;
  --blue-deep: #0b1fb3;
  --blue-ink: #001a8c;
  --link: #0a58d0;
  --red: #f32a2a;

  --ink: #141414;
  --ink-strong: #000000;
  --text: #333333;
  --muted: #666666;
  --muted-2: #8a8a8a;

  --bg: #ffffff;
  --bg-grey: #f5f5f5;
  --card: #ffffff;
  --line: rgba(128, 128, 128, 0.18);
  --line-strong: rgba(0, 0, 0, 0.12);

  --radius-card: 12px;
  --radius-img: 8px;
  --radius-pill: 999px;

  --container: 1280px;
  --gutter: 36px;
  --header-h: 72px;

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--ink-strong); }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.view-section { display: none; }
.view-section.active { display: block; }

/* ---------- Reading progress ---------- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--blue);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1.6px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.pill-btn svg { transition: transform 0.15s ease; }
.pill-btn:hover svg { transform: translateX(2px); }

.pill-primary { background: var(--blue); color: #fff; }
.pill-primary:hover { background: var(--blue-hover); }

.pill-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.pill-outline:hover { background: rgba(0, 87, 255, 0.06); }

.pill-outline-soft { background: #fff; color: var(--text); border-color: var(--line); }
.pill-outline-soft:hover { border-color: var(--line-strong); background: #fafafa; }

.pill-soft { background: #efefef; color: var(--text); }
.pill-soft:hover { background: #e6e6e6; }

.pill-glass { background: rgba(255, 255, 255, 0.8); color: var(--text); }
.pill-glass:hover { background: #fff; }

.badge-live {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 24px;
}

.menu-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-strong);
}
.menu-search-btn:hover { background: #f2f2f2; }

.brand-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--blue-ink);
  line-height: 1;
}
.brand-line {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.05;
}
.brand-swoosh { width: 46px; height: 8px; margin-top: 1px; color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .pill-btn { height: 36px; padding: 0 16px; }

/* Menu drawer */
.menu-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #ececec;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
  display: none;
}
.menu-drawer.open { display: block; }
.drawer-inner { max-width: var(--container); margin: 0 auto; padding: 28px var(--gutter) 36px; }

.drawer-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1.6px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-grey);
  color: var(--muted);
  font-size: 15px;
  text-align: left;
}
.drawer-search span { flex: 1; }
.drawer-search kbd {
  font-family: inherit;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
}
.drawer-search:hover { border-color: var(--line-strong); }

.drawer-cols {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-top: 28px;
}
.drawer-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.drawer-list { list-style: none; margin: 0; padding: 0; }
#drawer-topics { columns: 2; column-gap: 32px; }
.drawer-list li { break-inside: avoid; }
.drawer-list a {
  display: inline-block;
  padding: 7px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-strong);
}
.drawer-list a:hover { color: var(--blue); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 90% at 85% 10%, #2f6bff 0%, rgba(47, 107, 255, 0) 60%),
    linear-gradient(115deg, #0a1aa8 0%, #0c2fe0 45%, #1b4dff 75%, #0b2bd0 100%);
}

/* Faceted geometric light planes */
.hero-facets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, transparent 0 12%, rgba(255, 255, 255, 0.06) 12% 26%, transparent 26%),
    linear-gradient(80deg, transparent 0 54%, rgba(255, 255, 255, 0.05) 54% 66%, transparent 66%),
    linear-gradient(170deg, transparent 0 62%, rgba(0, 0, 60, 0.18) 62% 100%),
    linear-gradient(60deg, transparent 0 78%, rgba(255, 255, 255, 0.07) 78% 88%, transparent 88%);
}

.hero-inner { position: relative; padding-top: 64px; padding-bottom: 40px; }

.hero-feature { max-width: 880px; min-height: 340px; animation: fadeUp 0.45s ease both; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  cursor: pointer;
  margin-bottom: 18px;
}
.hero-title:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }

.hero-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 22px;
  opacity: 0.95;
}
.hero-topic svg { width: 16px; height: 16px; }

.hero-excerpt {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  max-width: 760px;
  margin-bottom: 28px;
}

.top-stories { margin-top: 36px; }
.top-stories-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.top-stories-head h2 { color: #fff; font-size: 18px; font-weight: 700; }

.rail-arrows { display: flex; gap: 6px; }
.rail-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}
.rail-arrow:hover { background: rgba(255, 255, 255, 0.14); }

.story-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 16px) / 4);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* The scroll area clips anything outside it, so leave room for the card ring
     (2px outline + 2px offset) and cancel it with a negative margin to keep alignment */
  padding: 6px;
  margin: -6px;
  scroll-padding: 0 6px;
}
.story-rail::-webkit-scrollbar { display: none; }

.rail-card {
  position: relative;
  aspect-ratio: 16 / 9.4;
  border-radius: var(--radius-img);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  background: #0a1a8a;
  border: 1px solid rgba(255, 255, 255, 0.25);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.2s ease;
}
.rail-card:hover { outline-color: rgba(255, 255, 255, 0.55); }
.rail-card.active { outline-color: rgba(255, 255, 255, 0.9); }
.rail-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.rail-card:hover img { transform: scale(1.04); }
.rail-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 15%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.9) 100%);
}
.rail-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 14px;
}
.rail-card-body .badge-live { margin-bottom: 8px; font-size: 12px; height: 20px; }
.rail-card-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   Generic sections
   ========================================================================== */
.section { padding: 72px 0; }
.section-grey { background: var(--bg-grey); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-title {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-sub { margin-top: 8px; font-size: 15px; color: var(--text); }

/* ---------- Explore by topic ---------- */
.impact-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.impact-title { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: #e9e9e9;
}
.seg-btn {
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.seg-btn:hover { background: rgba(0, 0, 0, 0.05); }
.seg-btn.active { background: var(--ink-strong); color: #fff; }

.topics-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: stretch;
}
.topics-intro-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--card);
}
.topics-intro-card h3 { font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; }
.topics-intro-card p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.topics-intro-card .pill-btn { margin-top: auto; align-self: flex-start; }

.topic-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 6px;
}
.topic-card {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-img);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  color: #fff;
  background: linear-gradient(160deg, #1d3fe0, #071466);
  border: 0;
  padding: 0;
  text-align: left;
}
.topic-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.topic-card:hover img { transform: scale(1.05); }
.topic-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.8) 100%);
}
.topic-card.active { outline: 3px solid var(--blue); outline-offset: -3px; }
.topic-card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16px; }
.topic-card-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 10px;
}
.topic-card-icon svg { width: 18px; height: 18px; }
.topic-card-title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.topic-card-count { display: block; margin-top: 6px; font-size: 13px; font-weight: 500; opacity: 0.85; }

/* ---------- Latest stories ---------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filter-pill {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1.6px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.filter-pill:hover { border-color: var(--line-strong); }
.filter-pill.active { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 28px;
}

.story-card { cursor: pointer; display: flex; flex-direction: column; }
.story-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: #e8e8e8;
  margin-bottom: 16px;
}
.story-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.story-card:hover .story-card-img img { transform: scale(1.04); }
.story-card-img .badge-live { position: absolute; left: 12px; top: 12px; }

.story-card .eyebrow { margin-bottom: 8px; }
.story-card-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.story-card:hover .story-card-title { text-decoration: underline; text-underline-offset: 3px; }
.story-card-excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.story-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border-radius: var(--radius-card);
  background: var(--bg-grey);
}
.empty-state h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

/* ---------- Discover ---------- */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.discover-card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--card);
}
.discover-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.discover-card-head h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.discover-card-head .pill-btn { height: 34px; padding: 0 14px; font-size: 13px; }

.discover-lead { cursor: pointer; }
.discover-lead-img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-img);
  overflow: hidden;
  margin-bottom: 16px;
  background: #e8e8e8;
}
.discover-lead-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.discover-lead:hover img { transform: scale(1.03); }
.discover-lead .eyebrow { margin-bottom: 6px; }
.discover-lead h4 { font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; }
.discover-lead:hover h4 { text-decoration: underline; text-underline-offset: 3px; }

.discover-subs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ededed;
}
.discover-sub { cursor: pointer; }
.discover-sub .eyebrow { margin-bottom: 6px; }
.discover-sub h5 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 700; color: var(--ink-strong); }
.discover-sub:hover h5 { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Article view
   ========================================================================== */
.article-view { padding-bottom: 0; }

.article-top-nav { padding-top: 24px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.back-link:hover { color: var(--ink-strong); }

.article-header { padding: 28px 0 36px; max-width: 1040px; }
.article-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.article-eyebrow:hover { color: var(--blue); }
.article-headline {
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.article-dates { font-size: 13px; color: var(--muted); }

.article-hero-figure { margin: 0; position: relative; background: #111; }
.article-hero-figure:empty { display: none; }
.article-hero-figure img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}
.article-hero-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px var(--gutter) 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 680px) 260px;
  justify-content: space-between;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.article-aside-left { display: flex; flex-direction: column; gap: 22px; font-size: 13px; }
.author-block { display: flex; flex-direction: column; gap: 2px; }
.author-name { color: var(--link); font-size: 15px; font-weight: 700; }
.author-role { color: var(--muted); line-height: 1.45; }
.aside-label { font-weight: 700; color: var(--ink-strong); font-size: 14px; margin-bottom: 4px; }
.share-block { display: flex; flex-direction: column; gap: 8px; }
.share-icons { display: flex; gap: 8px; }
.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.6px solid var(--line);
  background: #fff;
  color: var(--ink-strong);
}
.share-icon:hover { border-color: var(--ink-strong); }

.key-points {
  margin: 0 0 32px;
  padding: 0 0 28px 20px;
  border-bottom: 1px solid #e6e6e6;
}
.key-points li {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 14px;
}
.key-points li:last-child { margin-bottom: 0; }
.kp-label { color: var(--blue); }

.article-rich-body { font-size: 17px; line-height: 1.7; color: var(--ink); }
.article-rich-body p { margin: 0 0 20px; }
.article-rich-body h2 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 44px 0 16px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article-rich-body h3 { font-size: 20px; font-weight: 800; margin: 32px 0 12px; }
.article-rich-body ul,
.article-rich-body ol { margin: 0 0 24px; padding-left: 22px; }
.article-rich-body li { margin-bottom: 10px; }
.article-rich-body strong { font-weight: 700; color: var(--ink-strong); }
.article-rich-body a { color: var(--link); text-decoration: underline; }
.article-rich-body em { font-style: italic; }

.article-rich-body .article-lead-story { font-size: 19px; line-height: 1.6; font-weight: 500; }

.article-image-box { margin: 32px 0; }
.article-image-box img { width: 100%; border-radius: var(--radius-img); }
.img-caption { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }

.closing-callout {
  margin-top: 36px !important;
  padding: 22px 24px;
  border-left: 4px solid var(--blue);
  background: #f2f6ff;
  border-radius: 0 var(--radius-img) var(--radius-img) 0;
  font-weight: 700;
  color: var(--blue-ink);
}

/* Tables (body + specs) */
.specs-table-scroll { overflow-x: auto; }
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.specs-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 2px solid var(--ink-strong);
}
.specs-table td {
  padding: 14px;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: top;
}

.article-specs-card {
  margin-top: 44px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--bg-grey);
}
.specs-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.article-specs-card .specs-table td:first-child { font-weight: 700; color: var(--ink-strong); width: 42%; }

/* Contents */
.article-aside-right { position: relative; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc h4 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid #ececec; }
.toc li a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--link);
  font-size: 14px;
  line-height: 1.4;
}
.toc li a:hover { text-decoration: underline; }
.toc li a.active { border-left-color: var(--blue); font-weight: 700; }

/* ==========================================================================
   Search modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(10, 16, 40, 0.5);
  backdrop-filter: blur(4px);
}
.modal-backdrop.active { display: flex; }
.search-modal-box {
  width: 100%;
  max-width: 640px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.2s ease both;
}
.search-input-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #ececec;
  color: var(--muted);
}
.search-input-header input {
  flex: 1;
  border: 0;
  outline: 0;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
}
.search-close {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-grey);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.search-results-list { max-height: 60vh; overflow-y: auto; padding: 8px; }
.search-hit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.search-hit-item:hover { background: var(--bg-grey); }
.hit-title { font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--ink-strong); }
.hit-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hit-cat {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-empty { padding: 32px; text-align: center; color: var(--muted); }

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink-strong);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: fadeUp 0.25s ease both;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #000; color: #fff; padding: 64px 0 28px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-logo { position: static; transform: none; align-items: flex-start; color: #fff; margin-bottom: 20px; }
.footer-logo .brand-swoosh { color: #fff; margin-left: 2px; }
.footer-tagline { color: rgba(255, 255, 255, 0.7); font-size: 15px; line-height: 1.6; max-width: 360px; margin-bottom: 24px; }
.footer-links-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.6;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #fff; font-size: 15px; font-weight: 500; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .article-aside-right { display: none; }
  .story-rail { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
}

@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .stories-grid { grid-template-columns: repeat(2, 1fr); }
  .topics-row { grid-template-columns: 1fr; }
  .discover-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .article-layout { grid-template-columns: 1fr; gap: 28px; }
  .article-aside-left { flex-direction: row; flex-wrap: wrap; gap: 24px 40px; order: 2; padding-top: 24px; border-top: 1px solid #ececec; }
  .article-main { order: 1; }
  .story-rail { grid-auto-columns: calc((100% - 16px) / 2.2); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .header-inner { padding: 0 12px; }
  .header-actions .pill-outline { display: none; }
  .header-actions .pill-btn { height: 34px; padding: 0 14px; font-size: 13px; }
  .hero-inner { padding-top: 40px; }
  .hero-feature { min-height: 0; }
  .hero-excerpt { font-size: 16px; }
  .story-rail { grid-auto-columns: 78%; }
  .section { padding: 52px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .stories-grid { grid-template-columns: 1fr; gap: 32px; }
  .topic-cards { grid-auto-columns: 70%; }
  .topic-card { min-height: 240px; }
  .discover-subs { grid-template-columns: 1fr; }
  .drawer-cols { grid-template-columns: 1fr; gap: 24px; }
  #drawer-topics { columns: 1; }
  .footer-links-group { grid-template-columns: 1fr 1fr; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-pill { flex-shrink: 0; }
  .article-rich-body { font-size: 16px; }
  .article-rich-body h2 { font-size: 22px; }
}
