﻿/* ============================================================
   Meme Codex â€” Visual Encyclopedia
   Aesthetic: dark + yellow accent, inspired by StillsLab.
   Audience: millennials. Plain reading. No chaos.
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-1: #111111;
  --bg-2: #161616;
  --bg-3: #1c1c1c;
  --bg-hover: #222222;
  --border: #262626;
  --border-2: #2e2e2e;
  --border-strong: #3a3a3a;
  --fg: #f0f0f0;
  --fg-1: #c8c8c8;
  --fg-2: #888888;
  --fg-3: #5a5a5a;
  --accent: #E8BD2C;
  --accent-dim: #b89522;
  --accent-soft: rgba(232, 189, 44, 0.12);
  --red: #ef4444;
  --green: #22c55e;
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1400px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #000; }

.accent { color: var(--accent); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo .accent { color: var(--accent); }

.primary-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  color: var(--fg-1);
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}

.nav-link:hover { color: var(--fg); }

.header-search {
  position: relative;
  max-width: 360px;
  width: 100%;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: border-color 0.15s var(--ease);
}

.header-search:focus-within {
  border-color: var(--accent);
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--fg-2);
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  font-size: 14px;
  min-width: 0;
}

#searchInput::placeholder { color: var(--fg-3); }

@media (max-width: 768px) {
  .header-inner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 12px 16px;
  }
  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 16px;
    overflow-x: auto;
  }
  .header-search {
    grid-column: 2;
    grid-row: 1;
    max-width: 100%;
  }
  .nav-link { font-size: 13px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 80px 24px 60px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 189, 44, 0.06) 0%, transparent 60%),
    var(--bg);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 17px;
  color: var(--fg-1);
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
}

@media (max-width: 600px) {
  .hero { padding: 48px 16px 40px; }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 22px; }
}

/* ============================================================
   Section heads
   ============================================================ */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-inner.narrow {
  max-width: 760px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-sub {
  font-size: 13px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   Featured
   ============================================================ */
.featured-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

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

.featured-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
}

.featured-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}

.featured-card .gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  pointer-events: none;
}

.featured-card .info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  z-index: 1;
}

.featured-card .info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.featured-card .info p {
  font-size: 12px;
  color: var(--fg-1);
}

.featured-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}

/* ============================================================
   Filter bar
   ============================================================ */
.filter-bar {
  position: sticky;
  top: 57px;
  z-index: 50;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-row .section-title {
  font-size: 20px;
}

.result-count {
  font-size: 13px;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

.result-count span {
  color: var(--fg);
  font-weight: 600;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  font-weight: 600;
  min-width: 56px;
  flex-shrink: 0;
}

.chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-1);
  border: 1px solid var(--border);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
  font-weight: 500;
}

.chip:hover {
  background: var(--bg-3);
  border-color: var(--border-2);
  color: var(--fg);
}

.chip.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 768px) {
  .filter-bar { top: 100px; padding: 12px 0; }
  .filter-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .filter-label { display: none; }
}

/* ============================================================
   Grid
   ============================================================ */
.grid-section {
  padding: 32px 0 80px;
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.meme-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}

.meme-card:hover {
  transform: translateY(-3px);
}

.meme-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--border);
  transition: border-color 0.2s var(--ease);
}

.meme-card:hover .meme-thumb {
  border-color: var(--accent);
}

.meme-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}

.meme-thumb .year-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--fg);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.meme-thumb .type-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(232, 189, 44, 0.9);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s var(--ease);
  z-index: 2;
}

.meme-card:hover .type-tag {
  opacity: 1;
  transform: translateY(0);
}

.meme-meta {
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meme-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.meme-card:hover .meme-name { color: var(--accent); }

.meme-sub {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  padding: 80px 24px;
  text-align: center;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 14px;
  color: var(--fg-2);
}

.link-btn {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   Timeline
   ============================================================ */
.timeline-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 4px;
  height: 200px;
  padding: 30px 0 30px;
  align-items: end;
}

.timeline-bar {
  position: relative;
  background: var(--bg-3);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.timeline-bar:hover {
  background: var(--accent);
}

.timeline-bar .year-label {
  position: absolute;
  top: -22px;
  font-size: 11px;
  color: var(--fg-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timeline-bar:hover .year-label { color: var(--accent); }

.timeline-bar .count {
  position: absolute;
  bottom: -22px;
  font-size: 11px;
  color: var(--fg-2);
  font-weight: 700;
}

.timeline-bar:hover .count { color: var(--accent); }

@media (max-width: 768px) {
  .timeline {
    grid-template-columns: repeat(20, 1fr);
    overflow-x: auto;
  }
}

/* ============================================================
   About
   ============================================================ */
.about-section {
  padding: 64px 0;
}

.about-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-1);
  margin-bottom: 16px;
}

.about-section p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-credits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.credit-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  margin-bottom: 12px;
}

.credit-block ul {
  list-style: none;
}

.credit-block li {
  font-size: 14px;
  color: var(--fg-1);
  padding: 4px 0;
}

.credit-block a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  background: var(--bg-1);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .logo {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
}

.footer-cols {
  display: flex;
  gap: 48px;
}

.footer-cols h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  margin-bottom: 12px;
}

.footer-cols ul {
  list-style: none;
}

.footer-cols li {
  font-size: 13px;
  padding: 3px 0;
}

.footer-cols a {
  color: var(--fg-1);
}

.footer-cols a:hover { color: var(--accent); }

.footer-base {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-2);
  text-align: center;
}

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s var(--ease);
}

/* HTML `hidden` attribute must beat `display: flex` above, otherwise the modal
   never actually closes when JS sets element.hidden = true. */
.modal-backdrop[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  position: relative;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s var(--ease);
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), border-color 0.15s var(--ease);
  cursor: pointer;
  pointer-events: auto;
}

.modal-close:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  transform: scale(1.05);
}

.close-x {
  font-size: 22px;
  line-height: 1;
  margin-top: -2px;
}

.close-hint {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: -1px;
  opacity: 0.75;
}

.modal-media {
  position: relative;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.modal-meta .pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--fg-1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-meta .pill.year {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

.modal-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--fg-1);
  font-style: italic;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-section p {
  font-size: 14px;
  color: var(--fg-1);
  line-height: 1.6;
}

.empty-msg {
  color: var(--fg-3);
  font-style: italic;
  font-size: 13px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.modal-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-2);
}

.modal-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-source {
  font-size: 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-foot-close {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.modal-foot-close:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .modal {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }
  .modal-media {
    aspect-ratio: 16/9;
    min-height: 0;
  }
  .modal-body { padding: 20px; }
}

/* ============================================================
   Loading state
   ============================================================ */
.skeleton-card {
  background: var(--bg-1);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.loading-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
  color: var(--fg-2);
  font-size: 14px;
}

/* ============================================================
   SEO Intro Section (TL;DR + definition + tables)
   ============================================================ */
.seo-intro {
  padding: 64px 0;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}

.tldr-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.tldr-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.tldr-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tldr-list li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-1);
  padding: 6px 0 6px 20px;
  position: relative;
}

.tldr-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.tldr-list strong {
  color: var(--fg);
  font-weight: 700;
}

.seo-h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 40px;
}

.editorial-disclaimer {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(255, 200, 90, 0.08);
  border-left: 3px solid rgba(255, 200, 90, 0.5);
  border-radius: 6px;
  font-size: 0.95em;
  line-height: 1.55;
  color: var(--muted, #a4a4b0);
}
  margin-bottom: 14px;
  color: var(--fg);
}

.seo-intro p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-1);
  margin-bottom: 14px;
}

.seo-intro p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.era-table-wrap,
.year-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.era-table,
.year-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 540px;
}

.era-table thead,
.year-table thead {
  background: var(--bg-2);
}

.era-table th,
.year-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.era-table td,
.year-table td {
  padding: 12px 16px;
  color: var(--fg-1);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.era-table tr:last-child td,
.year-table tr:last-child td {
  border-bottom: 0;
}

.era-table strong,
.year-table strong {
  color: var(--fg);
  font-weight: 700;
}

.year-table td:first-child {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 600;
}

.year-table td:nth-child(2) {
  color: var(--fg);
  font-weight: 600;
}

/* ============================================================
   FAQ Section
   ============================================================ */
.faq-section {
  padding: 64px 0;
  background: var(--bg);
}

.faq-intro {
  font-size: 15px;
  color: var(--fg-2);
  margin-bottom: 24px;
  line-height: 1.6;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--bg-1);
  transition: border-color 0.15s var(--ease);
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-item[open] {
  border-color: var(--accent);
  background: var(--bg-2);
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
  transition: color 0.15s var(--ease);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--fg-2);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease), color 0.15s var(--ease);
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item p {
  padding: 0 20px 18px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-1);
}

.faq-item p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-item p strong {
  color: var(--fg);
  font-weight: 700;
}

@media (max-width: 600px) {
  .tldr-box { padding: 18px 20px; }
  .faq-item summary { font-size: 15px; padding: 14px 16px; }
  .faq-item p { padding: 0 16px 16px 16px; }
}

/* ============================================================
   Page hero (used on about.html)
   ============================================================ */
.page-hero {
  padding: 80px 24px 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 189, 44, 0.06) 0%, transparent 60%),
    var(--bg);
  text-align: center;
}

.page-hero .section-inner {
  text-align: center;
}

.page-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-1);
  max-width: 640px;
  margin: 0 auto 32px;
}

.page-cta {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 22px;
  border-radius: 999px;
  transition: all 0.15s var(--ease);
}

.page-cta:hover {
  background: var(--accent);
  color: #000;
}

@media (max-width: 600px) {
  .page-hero { padding: 48px 16px 40px; }
  .page-sub { font-size: 15px; }
}
