/* OSCAR — GitHub Pages project site (light gold theme) */
:root {
  --bg-deep: #f5f6f8;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.96);
  --border: #e2e6ec;
  --border-gold: rgba(154, 123, 44, 0.28);
  --gold: #9a7b2c;
  --gold-mid: #b8943a;
  --gold-bright: #d4b04a;
  --gold-light: #6b5520;
  --gold-dim: rgba(154, 123, 44, 0.22);
  --text: #1a1d21;
  --text-secondary: #3a4048;
  --text-muted: #5c6370;
  --accent-blue: #2f6fad;
  --accent-int2: #b8943a;
  --header-bg: rgba(255, 255, 255, 0.94);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Consolas, monospace;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(26, 32, 44, 0.08);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-max: 100%;
  --content-max: 1200px;
  --surface-muted: #eef1f5;
  --surface-panel: #ffffff;
  --figure-bg: #ffffff;
  --figure-border: #e4e8ee;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: rgba(180, 198, 220, 0.35);
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  bottom: 10%;
  left: -150px;
  background: rgba(212, 176, 74, 0.12);
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.container {
  width: min(var(--content-max), 94vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header — full viewport width */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 28px rgba(140, 110, 40, 0.08);
}

.nav-inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.nav-brand-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(201, 162, 39, 0.35));
  animation: logo-float 5s ease-in-out infinite;
}

.nav-logo-ring {
  position: absolute;
  inset: -6px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  animation: ring-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1.15rem;
  flex-wrap: wrap;
  flex: 1;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--gold); }

.nav-links a.nav-intuition {
  padding: 0.42rem 0.92rem;
  border: 1px solid rgba(154, 123, 44, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 248, 225, 0.98), rgba(255, 255, 255, 0.9));
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(90, 70, 20, 0.1);
}

.nav-links a.nav-intuition:hover {
  border-color: var(--gold-mid);
  background: linear-gradient(135deg, rgba(255, 244, 210, 1), #fff);
  color: var(--gold-light);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem !important;
  border-radius: 10px;
  border: 1px solid rgba(166, 124, 0, 0.28);
  background: #fff;
  color: var(--text) !important;
  box-shadow: 0 1px 3px rgba(90, 70, 20, 0.08);
  font-weight: 600;
}

.nav-cta:hover {
  border-color: var(--gold-mid);
  background: #fffef8;
  color: var(--gold-light) !important;
}

button.nav-cta,
button.cite-trigger {
  font-family: "Times New Roman", Times, serif;
  font-size: 0.92rem;
  cursor: pointer;
}

button.nav-cta:hover {
  color: var(--gold-light) !important;
}

.nav-cta-gold {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, #f0f2f5 0%, #ffffff 100%);
  color: var(--gold-light) !important;
}

.icon-svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  color: var(--gold);
}

.icon-img {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
}

.icon-img-hf {
  /* HF mark asset includes padding; keep crisp on light buttons */
  width: 1.5rem;
  height: 1.5rem;
}

.icon-svg-on-gold {
  color: #2a2210;
}

.btn .icon-svg {
  width: 1.1rem;
  height: 1.1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

/* Hero */
.hero {
  padding: 3.25rem 0 4rem;
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2.5rem;
  align-items: stretch;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-family: var(--font-display);
  margin-bottom: 1rem;
}

/* Authors & affiliations */
.authors-block {
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(166, 124, 0, 0.2);
}

.authors {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  text-align: left;
}

.authors sup {
  font-size: 0.65em;
  color: var(--gold);
  margin-left: 0.05em;
  font-weight: 600;
}

.affiliations {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.affiliations sup {
  color: var(--gold);
  font-size: 0.75em;
  margin-right: 0.15em;
}

.author-notes {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.author-notes sup {
  color: var(--gold);
  font-size: 0.85em;
}

.title-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
}

.title-text {
  background: linear-gradient(135deg, #7a5f10 0%, var(--gold) 45%, #c9a227 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-logo-inline {
  height: 0.9em;
  width: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 12px rgba(154, 123, 44, 0.16));
  transform-origin: center;
  animation: title-logo-drift 4.5s ease-in-out infinite;
}

.title-sub {
  display: block;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  -webkit-text-fill-color: var(--text-secondary);
  line-height: 1.45;
}

.title-sub em {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 42em;
  margin-bottom: 1.75rem;
  line-height: 1.72;
}

.hero-lead strong { color: var(--gold-light); }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #b8921f, var(--gold));
  color: #0a0a0c;
  border-color: var(--gold-light);
}

.btn-secondary {
  background: #fff;
  color: var(--gold);
  border-color: var(--border);
  box-shadow: 0 1px 4px rgba(90, 70, 20, 0.08);
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 1px 4px rgba(90, 70, 20, 0.06);
}

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

.btn-icon { height: 1.1em; width: auto; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  width: min(640px, 100%);
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 86px;
  height: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.55rem 0.7rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.metric-value {
  display: block;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--gold-light);
  font-family: var(--font-display);
  line-height: 1;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.12;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-frame {
  position: relative;
  width: min(380px, 90%);
}

.hero-logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(201, 162, 39, 0.35));
  animation: logo-float 5s ease-in-out infinite;
}

.logo-ring {
  position: absolute;
  inset: -8%;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  animation: ring-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

.hero-pipeline-visual {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.hero-pipeline-card {
  width: min(640px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--figure-border);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.hero-pipeline-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.hero-pipeline-title h2 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(0.86rem, 1.25vw, 1rem);
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.hero-pipeline-wrap {
  padding: 1rem;
  box-shadow: none;
}

.hero-pipeline-wrap .pipeline-controls {
  margin-bottom: 0.8rem;
  flex-wrap: nowrap;
}

.hero-pipeline-wrap .pipe-btn {
  padding: 0.38rem 0.62rem;
  font-size: 0.76rem;
}

.hero-pipeline-wrap .pipeline-stage {
  min-height: 205px;
}

.hero-pipeline-wrap .pipe-visual {
  min-height: 116px;
  padding: 0.75rem;
}

.hero-pipeline-wrap .pipe-desc {
  font-size: 0.84rem;
  line-height: 1.55;
}

.hero-pipeline-wrap .step-indicator {
  font-size: 0.78rem;
}

.hero-pipeline-head {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.hero-pipeline-logo {
  width: 86px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(154, 123, 44, 0.18));
  animation: logo-float 5s ease-in-out infinite;
}

.hero-pipeline-eyebrow,
.callout-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.hero-pipeline-head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.25;
}

.hero-cache-strip {
  display: grid;
  grid-template-columns: 0.8fr 2.4fr 0.9fr;
  gap: 0.35rem;
  margin: 1rem 0;
}

.hero-cache-seg {
  min-height: 64px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-cache-bf16 {
  background: #e8f2fc;
  border: 1px solid rgba(47, 111, 173, 0.35);
  color: #1d568e;
}

.hero-cache-int2 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #f7eed1, #fff8e0);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}

.hero-cache-int2::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(154, 123, 44, 0.16) 0 8px, transparent 8px 16px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-cache-int2 {
  animation: cache-scan 4s linear infinite;
}

@keyframes cache-scan {
  0% { background-position: 0 0; }
  100% { background-position: 80px 0; }
}

.hero-mini-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  margin: 1rem 0;
}

.hero-mini-flow span {
  border: 1px solid var(--figure-border);
  border-radius: 999px;
  padding: 0.35rem 0.25rem;
  font-size: 0.68rem;
  text-align: center;
  color: var(--text-muted);
  background: #fff;
}

.hero-pipeline-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes title-logo-drift {
  0%, 100% { transform: translateY(0.02em) rotate(-2deg) scale(1); }
  50% { transform: translateY(-0.08em) rotate(3deg) scale(1.04); }
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.02); }
}

/* Sections */
.section {
  padding: 4.5rem 0;
  position: relative;
  z-index: 1;
}

.section-tight {
  padding-top: 2.25rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(241, 244, 248, 0.5) 100%);
}

.section-color-transition {
  position: relative;
  z-index: 1;
  height: 54px;
  background:
    linear-gradient(180deg, rgba(241, 244, 248, 0.5) 0%, rgba(255, 255, 255, 0.96) 55%, rgba(245, 246, 248, 0.95) 100%);
}

.rotation-target-section {
  padding-top: 3.25rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(180, 198, 220, 0.22), transparent 34rem),
    linear-gradient(180deg, rgba(245, 246, 248, 0.95) 0%, rgba(255, 255, 255, 0.86) 100%);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  color: var(--gold-light);
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-lead {
  text-align: center;
  max-width: 42em;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Glass cards */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition), transform var(--transition);
}

.glass-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.glass-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--gold-light);
}

.glass-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; }

.glass-card code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--gold-light);
}

/* Recipe */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 0;
}

.recipe-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.04);
}

.recipe-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(154, 123, 44, 0.55), rgba(47, 111, 173, 0.18), transparent);
}

.recipe-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(92, 99, 112, 0.18);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.recipe-card h3 {
  color: var(--text);
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.recipe-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.recipe-card code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--gold-light);
}

/* Pipeline figure */
.pipeline-figure {
  margin: 0 0 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.25rem;
  backdrop-filter: blur(10px);
}

.pipeline-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.15);
}

.pipeline-figure figcaption {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.pipeline-figure figcaption strong { color: var(--gold-light); }

.pipeline-figure figcaption em { color: var(--gold); font-style: normal; }

.pipeline-figure code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--gold-light);
}

/* Rotation target matters */
.target-matters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  margin-top: 0.5rem;
}

.target-matters-intro {
  margin-bottom: 2rem;
}

.target-matters-intro h3 {
  color: var(--gold-light);
  margin-bottom: 1rem;
  font-size: 1.35rem;
  text-align: center;
}

.target-matters-intro > p,
.target-matters-intro .muted {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  max-width: 48em;
  margin-left: auto;
  margin-right: auto;
}

.target-matters-intro .muted {
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
}

.target-matters-intro > p:first-of-type {
  text-align: center;
}

.target-matters-intro code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--gold-light);
}

.ablation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ablation-card {
  background: var(--figure-bg);
  border: 1px solid var(--figure-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-align: center;
}

.ablation-card.ablation-best {
  border-color: var(--border-gold);
  background: var(--figure-bg);
  box-shadow: 0 2px 14px rgba(26, 32, 44, 0.06);
}

.ablation-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.ablation-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-light);
  font-family: var(--font-display);
}

.ablation-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.35;
}

.ablation-setup {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.75rem auto 1.25rem;
  max-width: 52em;
  line-height: 1.55;
  text-align: center;
}

.ablation-note {
  margin: 1rem auto 0;
  max-width: 48em;
  text-align: center;
}

.intuition-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  background: var(--surface-panel);
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.04);
}

.intuition-callout h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.intuition-callout p:not(.callout-eyebrow) {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 60em;
}

.figures-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.figure-block {
  margin: 0;
  background: var(--figure-bg);
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.04);
}

.figure-block img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--figure-border);
  background: #fff;
  display: block;
}

.figure-block figcaption {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  line-height: 1.65;
}

.figure-block figcaption p {
  margin-bottom: 0.65rem;
}

.figure-block figcaption p:last-child {
  margin-bottom: 0;
}

.fig-caption-title {
  font-weight: 600;
  color: var(--gold-light);
  font-size: 1rem;
  margin-bottom: 0.25rem !important;
}

.fig-caption-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.75rem !important;
}

.fig-caption-panels {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.fig-caption-panels li {
  padding: 0.4rem 0 0.4rem 2rem;
  position: relative;
  border-bottom: 1px solid rgba(166, 124, 0, 0.1);
}

.fig-caption-panels li:last-child {
  border-bottom: none;
}

.panel-tag {
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.9em;
}

.fig-caption-note {
  font-size: 0.85rem;
  font-style: italic;
}

/* Results table */
.table-wrap {
  margin: 2.5rem 0;
}

.table-caption {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  max-width: 48em;
  margin-left: auto;
  margin-right: auto;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  -webkit-overflow-scrolling: touch;
}

.results-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.results-table th,
.results-table td {
  padding: 0.55rem 0.65rem;
  text-align: center;
  border-bottom: 1px solid rgba(166, 124, 0, 0.12);
}

.results-table th {
  background: rgba(255, 236, 190, 0.65);
  color: var(--gold-light);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.results-table th:first-child,
.results-table td[rowspan] {
  text-align: left;
  font-weight: 500;
}

.results-table td[rowspan] {
  color: var(--gold-light);
  font-weight: 600;
  vertical-align: top;
  padding-top: 0.75rem;
}

.results-table tbody tr:hover {
  background: rgba(201, 162, 39, 0.05);
}

.results-table .highlight-row {
  background: rgba(201, 162, 39, 0.1);
}

.results-table .highlight-row td {
  color: var(--gold-light);
}

.table-footnote {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
  text-align: center;
  font-style: italic;
}

.table-notes {
  max-width: 68rem;
  margin: 0.85rem auto 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--figure-border);
  border-radius: 12px;
  background: var(--surface-panel);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.6;
}

.table-notes p {
  margin-bottom: 0.55rem;
}

.table-notes p:last-child {
  margin-bottom: 0;
}

/* Pipeline animation */
.pipeline-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.pipeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.pipe-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}

.pipe-btn:hover,
.pipe-btn.active {
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-light);
  border-color: var(--gold-dim);
}

.pipeline-stage {
  min-height: 220px;
  position: relative;
}

.pipe-panel {
  display: none;
  animation: fadeIn 0.5s ease;
}

.pipe-panel.active { display: block; }

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

.pipe-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 140px;
  padding: 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.pipe-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.pipe-desc code {
  font-family: var(--font-mono);
  color: #6b5410;
  font-size: 0.9em;
  font-weight: 500;
}

/* Calibrate viz */
.calibrate-viz { gap: 0.75rem; }

.token-stream {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  animation: token-pulse 2s ease-in-out infinite;
}

.token-q { background: rgba(106, 180, 255, 0.25); color: var(--accent-blue); border: 1px solid var(--accent-blue); }
.token-k { background: rgba(201, 162, 39, 0.25); color: var(--gold-light); border: 1px solid var(--gold); animation-delay: 0.3s; }
.token-v { background: rgba(180, 120, 255, 0.25); color: #c8a0ff; border: 1px solid #a070e0; animation-delay: 0.6s; }

@keyframes token-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 transparent; }
  50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(201, 162, 39, 0.3); }
}

.arrow-flow { font-size: 1.5rem; color: var(--gold); }

.cov-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cov-item {
  padding: 0.5rem 1rem;
  background: #fff8e6;
  border: 1px solid rgba(154, 123, 26, 0.45);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #4a3a10;
  font-weight: 500;
}

/* Rotate viz */
.rotate-viz { gap: 0.5rem; }

.rot-block {
  padding: 0.6rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  color: var(--text);
  transition: transform 0.4s;
}

.rot-result {
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.2);
}

.rot-op { color: var(--gold); font-size: 1.2rem; }

.pipe-panel.active[data-panel="1"] .rot-block {
  animation: rot-compose 1.2s ease forwards;
}

@keyframes rot-compose {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

/* Cache viz */
.cache-viz {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  height: 80px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.cache-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: flex 0.6s ease;
}

.cache-sink {
  flex: 0 0 18%;
  background: rgba(106, 180, 255, 0.2);
  color: var(--accent-blue);
  border-right: 1px solid var(--border);
}

.cache-int2 {
  flex: 1;
  background: rgba(201, 162, 39, 0.2);
  color: var(--gold-light);
}

.cache-recent {
  flex: 0 0 18%;
  background: rgba(106, 180, 255, 0.2);
  color: var(--accent-blue);
  border-left: 1px solid var(--border);
}

.cache-cursor {
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-light);
  box-shadow: 0 0 12px var(--gold);
  left: 82%;
  transition: left 1.5s ease-in-out;
  opacity: 0;
}

.pipe-panel.active[data-panel="2"] .cache-cursor {
  opacity: 1;
  animation: cursor-slide 3s ease-in-out infinite;
}

@keyframes cursor-slide {
  0% { left: 75%; }
  50% { left: 88%; }
  100% { left: 75%; }
}

/* Quant viz */
.quant-viz {
  flex-direction: column;
  gap: 0.75rem;
}

.vec-bar {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 64px;
}

.vec-val {
  width: 12px;
  height: var(--h, 50%);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-radius: 3px 3px 0 0;
  transition: height 0.4s ease;
}

.pipe-panel.active[data-panel="3"] .vec-val {
  animation: vec-quant 2s ease-in-out infinite;
}

@keyframes vec-quant {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(0.6); height: calc(var(--h) * 0.35); }
}

.quant-arrow {
  font-family: var(--font-mono);
  color: #6b5410;
  font-size: 0.9rem;
  font-weight: 600;
}

.byte-grid {
  display: flex;
  gap: 4px;
}

.bit-cell {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: background 0.3s;
}

.bit-cell[data-level="0"] { background: #e8e0d0; }
.bit-cell[data-level="1"] { background: #d4c4a0; }
.bit-cell[data-level="2"] { background: #c9a227; }
.bit-cell[data-level="3"] { background: #9a7b1a; }

.pack-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.step-indicator {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #6b5410;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Decode viz */
.decode-viz {
  flex-direction: column;
  gap: 0.75rem;
}

.decode-kernel-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}

.decode-path {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  min-width: 140px;
  flex: 1 1 0;
  max-width: 230px;
}

.decode-bf16 {
  background: rgba(106, 180, 255, 0.15);
  border: 1px solid rgba(106, 180, 255, 0.4);
}

.decode-int2 {
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid var(--gold-dim);
}

.decode-path span { display: block; font-weight: 600; color: var(--gold-light); }
.decode-path small { color: var(--text-secondary); font-size: 0.8rem; }

.decode-merge {
  font-size: 1.5rem;
  color: var(--gold);
  align-self: center;
  line-height: 1;
}

.decode-out {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), transparent);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold-light);
  font-weight: 600;
  animation: out-glow 2s ease-in-out infinite;
  min-width: min(320px, 100%);
  text-align: center;
}

@keyframes out-glow {
  0%, 100% { box-shadow: 0 0 0 transparent; }
  50% { box-shadow: 0 0 24px rgba(201, 162, 39, 0.35); }
}

/* System */
.system-diagram {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(166, 124, 0, 0.28);
  box-shadow: 0 4px 20px rgba(90, 70, 20, 0.06);
}

.system-svg { width: 100%; height: auto; display: block; }

.system-list {
  list-style: none;
  max-width: 36em;
  margin: 0 auto;
}

.system-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
}

.system-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.6rem;
  top: 0.85rem;
}

/* Results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.result-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: transform var(--transition);
}

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

.result-card.highlight {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.12), transparent);
}

.result-card h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.result-big {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  font-family: var(--font-display);
  line-height: 1.2;
}

.result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.throughput-figure {
  width: min(940px, 100%);
  margin: 2rem auto 0;
}

.throughput-figure figcaption {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Compare table */
.compare-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.4fr;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.compare-row:last-child { border-bottom: none; }

.compare-header {
  background: rgba(201, 162, 39, 0.1);
  font-weight: 600;
  color: var(--gold-light);
}

.compare-row span:first-child { color: var(--text-muted); }

.highlight-text { color: var(--gold-light); font-weight: 500; }

.compare-note {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  max-width: 40em;
  margin: 0 auto 2rem;
}

/* Compatibility discussion */
.compat-panel {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.compat-panel h3 {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-align: center;
  margin-bottom: 1rem;
}

.compat-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 44em;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.compat-lead strong { color: var(--text); }

.compat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.compat-card {
  background: var(--surface-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.compat-card h4 {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.compat-card-oscar {
  border-color: var(--gold-dim);
  background: linear-gradient(145deg, rgba(255, 248, 230, 0.95), rgba(255, 255, 255, 0.9));
}

.compat-card-oscar h4 { color: var(--gold-light); }

.compat-card ul {
  list-style: none;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.compat-card li {
  padding: 0.35rem 0 0.35rem 1.1rem;
  position: relative;
}

.compat-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.compat-card code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--gold-light);
}

.compat-takeaways {
  border-top: 1px solid rgba(201, 162, 39, 0.15);
  padding-top: 1.5rem;
}

.compat-takeaways p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  line-height: 1.65;
  max-width: 52em;
  margin-left: auto;
  margin-right: auto;
}

.compat-takeaways strong { color: var(--gold-light); }

.compat-bottom {
  margin-top: 1rem !important;
  padding: 1rem 1.25rem;
  background: rgba(201, 162, 39, 0.08);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  font-style: normal;
  color: var(--text) !important;
}

/* Citation */
.citation-lead {
  text-align: center;
  max-width: none;
  margin: 0 auto 1.25rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.5;
  white-space: nowrap;
}

.citation-lead a {
  color: var(--accent-blue);
  font-weight: 600;
}

.bibtex {
  background: var(--surface-muted);
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-x: auto;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.citation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Intuition page */
.intuition-page .section {
  padding: 4rem 0;
}

.intuition-hero {
  padding-top: 5rem;
  text-align: center;
}

.intuition-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  color: var(--gold-light);
  line-height: 1.05;
  margin: 0.35rem 0 1rem;
}

.intuition-lead {
  max-width: 58em;
  margin: 0 auto 1.25rem;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.75;
}

.intuition-equation {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  background: var(--surface-panel);
  overflow-x: auto;
}

.intuition-formula-note {
  max-width: 58em;
  margin: 0.9rem auto 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.intuition-logic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 880px;
  margin: 0 auto;
}

.intuition-factor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.intuition-factor {
  background: var(--surface-panel);
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.04);
}

.factor-tag {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(184, 148, 58, 0.15);
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.intuition-factor h3 {
  font-size: 1.02rem;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.intuition-factor p,
.intuition-copy {
  color: var(--text-secondary);
  line-height: 1.7;
}

.intuition-two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
}

.section-title-left {
  text-align: left;
}

.intuition-table td:last-child,
.intuition-table th:last-child {
  min-width: 16rem;
}

.intuition-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.intuition-detail-list p {
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 1rem;
  border: 1px solid var(--figure-border);
  border-radius: 12px;
  background: var(--surface-panel);
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.04);
}

.matrix-gallery {
  margin-top: 2rem;
}

.matrix-gallery > h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.35rem;
}

.matrix-gallery > p {
  max-width: 58em;
  margin: 0 auto 1.25rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.65;
}

.matrix-card {
  background: var(--surface-panel);
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.04);
}

.matrix-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.matrix-head h4 {
  color: var(--text);
  font-size: 1rem;
}

.matrix-head span {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.math-matrix {
  overflow-x: auto;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--figure-border);
  border-radius: 10px;
  background: #fff;
}

.math-matrix mjx-container {
  min-width: max-content;
  margin: 0 !important;
}

.intuition-page mjx-container {
  color: var(--text);
}

.intuition-equation mjx-container {
  margin: 0 !important;
}

.intuition-summary {
  max-width: 62em;
  margin: 1.25rem auto 0;
  text-align: center;
}

.intuition-cta {
  text-align: center;
  background: var(--surface-panel);
  border: 1px solid var(--figure-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.intuition-cta h2 {
  font-family: var(--font-display);
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.intuition-cta p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Cite modal */
body.cite-modal-open {
  overflow: hidden;
}

.cite-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cite-modal[hidden] {
  display: none !important;
}

.cite-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 32, 16, 0.45);
  backdrop-filter: blur(4px);
}

.cite-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-panel);
  border: 1px solid var(--figure-border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 80px rgba(26, 32, 44, 0.14);
}

.cite-modal-dialog h3 {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  padding-right: 2rem;
}

.cite-modal-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.bibtex-modal {
  margin-bottom: 1.25rem;
  max-height: 40vh;
}

.cite-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cite-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}

.cite-modal-close:hover {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold);
}

.footer-cite {
  background: none;
  border: none;
  font: inherit;
  color: var(--gold-light);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.footer-cite:hover {
  color: var(--gold);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  text-align: center;
}

.visitor-panel {
  width: min(680px, 100%);
  margin: 0 auto 2.25rem;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--figure-border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 16px 42px rgba(40, 45, 55, 0.08);
}

.visitor-kicker {
  margin: 0 0 0.8rem !important;
  color: var(--gold-light) !important;
  font-family: var(--font-display);
  font-size: 1rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.visitor-map-embed {
  display: flex;
  justify-content: center;
  min-height: 120px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(154, 123, 44, 0.18);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.visitor-map-embed a,
.visitor-map-embed img,
.visitor-map-embed canvas,
.visitor-map-embed iframe {
  display: block;
  max-width: 100%;
}

.visitor-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.visitor-count img {
  display: block;
  max-width: 100%;
}

.footer-logo {
  height: 48px;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.footer-links a {
  color: var(--gold-light);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.footer-copy { font-size: 0.8rem !important; opacity: 0.7; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.15s; }

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

  html { scroll-behavior: auto; }

  .reveal { opacity: 1; transform: none; }

  #particles { display: none; }

  .hero-logo, .logo-ring, .nav-logo, .nav-logo-ring { animation: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .authors-block {
    text-align: center;
  }

  .authors {
    text-align: center;
    font-size: 0.95rem;
  }

  .affiliations {
    font-size: 0.82rem;
  }

  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { order: 0; }
  .logo-frame { max-width: 260px; margin: 0 auto; }
  .hero-pipeline-head { grid-template-columns: 64px 1fr; text-align: left; }
  .hero-pipeline-logo { width: 64px; }
  .hero-mini-flow { grid-template-columns: repeat(3, 1fr); }
  .intuition-callout { flex-direction: column; align-items: flex-start; }
  .intuition-logic-grid,
  .intuition-factor-grid,
  .intuition-detail-list,
  .intuition-two-col {
    grid-template-columns: 1fr;
  }
  .matrix-head {
    flex-direction: column;
    gap: 0.25rem;
  }
  .matrix-head span {
    white-space: normal;
  }
  .section-title-left { text-align: center; }

  .pillars,
  .recipe-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .ablation-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .target-matters-intro > p,
  .target-matters-intro .muted,
  .ablation-setup,
  .ablation-note,
  .citation-lead {
    text-align: left;
    white-space: normal;
  }

  .pipeline-figure figcaption {
    font-size: 0.85rem;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 252, 245, 0.98);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .hero-pipeline-wrap .pipeline-controls { flex-wrap: wrap; }

  .decode-kernel-row { flex-direction: column; align-items: center; }
  .decode-path { width: min(260px, 100%); }

  .compare-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .compare-header { display: none; }

  .compare-row span:first-child {
    font-weight: 600;
    color: var(--gold-light);
  }

  .compat-grid {
    grid-template-columns: 1fr;
  }

  .compat-panel {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-cache-strip { grid-template-columns: 1fr; }
  .hero-mini-flow { grid-template-columns: repeat(2, 1fr); }
  .metric-card { text-align: center; }
  .metric-value { font-size: 1.25rem; }
  .ablation-grid { grid-template-columns: 1fr; }
}
