/* ============================================================
   ActionEQA — Northwestern University Color Theme
   Primary: #4E2A84 (NU Purple)  Gold: #B6A369 (NU Gold)
   ============================================================ */
:root {
  --purple:       #4E2A84;
  --purple-dark:  #3a1f63;
  --purple-deep:  #1e1035;
  --purple-light: #7B5EA7;
  --purple-pale:  #F0EBF8;
  --gold:         #B6A369;
  --gold-light:   #D4C38A;
  --gold-dark:    #8F7F4E;
  --white:        #FFFFFF;
  --off-white:    #F8F7FC;
  --text-dark:    #1a1226;
  --text-mid:     #4a3f5c;
  --text-light:   #7a6b8a;
  --border:       #E2DBF0;
  --card-shadow:  0 4px 24px rgba(78,42,132,.10);
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --t:            0.3s cubic-bezier(.4,0,.2,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--purple-deep); }
::-webkit-scrollbar-thumb { background: var(--purple-light); border-radius: 3px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1500px; margin: 0 auto; padding: 0 24px; }

/* ============================================================  NAVBAR  */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background var(--t), backdrop-filter var(--t), box-shadow var(--t);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(30,16,53,.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(182,163,105,.2);
  border-bottom-color: rgba(182,163,105,.15);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; font-weight: 800; color: var(--white); text-decoration: none;
  letter-spacing: -.02em;
}
.nav-logo-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px var(--gold); flex-shrink: 0;
  animation: pulseDot 2s ease-in-out infinite;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,.75); text-decoration: none;
  font-size: .85rem; font-weight: 500; padding: 6px 10px;
  border-radius: var(--radius-sm); transition: color var(--t), background var(--t);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.nav-btn {
  background: var(--gold) !important; color: var(--purple-deep) !important;
  font-weight: 700 !important; padding: 7px 14px !important;
  border-radius: var(--radius-sm) !important;
}
.nav-btn:hover { background: var(--gold-light) !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--t); }
.nav-mobile { display: none; flex-direction: column; padding: 12px 24px 16px; background: rgba(30,16,53,.98); border-top: 1px solid rgba(182,163,105,.15); }
.nav-mobile a { color: rgba(255,255,255,.8); text-decoration: none; padding: 10px 0; font-size: .9rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.06); }
.nav-mobile.open { display: flex; }
@media (max-width: 900px) { .nav-links { display: none; } .nav-hamburger { display: flex; } }

/* ============================================================  HERO  */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; text-align: center; padding: 120px 24px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-dark) 45%, #2d1b58 70%, var(--purple-deep) 100%);
  z-index: 0;
}
.hero-bg::before {
  content: ''; position: absolute; width: 700px; height: 700px;
  top: -200px; right: -150px;
  background: radial-gradient(circle, rgba(182,163,105,.13) 0%, transparent 65%);
  border-radius: 50%;
}
.hero-bg::after {
  content: ''; position: absolute; width: 500px; height: 500px;
  bottom: -100px; left: -100px;
  background: radial-gradient(circle, rgba(123,94,167,.18) 0%, transparent 65%);
  border-radius: 50%;
}
.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.particle {
  position: absolute; border-radius: 50%; background: var(--gold); opacity: 0;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0%  { transform: translateY(0) scale(0); opacity: 0; }
  10% { opacity: .4; transform: scale(1); }
  90% { opacity: .2; }
  100% { transform: translateY(-100vh) scale(.5); opacity: 0; }
}
.hero-content { position: relative; z-index: 2; max-width: 860px; animation: heroFadeUp .9s ease both; }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

.venue-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(182,163,105,.15); border: 1px solid rgba(182,163,105,.35);
  color: var(--gold-light); font-size: .78rem; font-weight: 600;
  padding: 6px 16px; border-radius: 999px; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 28px;
}
.venue-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 6px var(--gold); }
  50%      { box-shadow: 0 0 18px var(--gold), 0 0 30px rgba(182,163,105,.4); }
}
.hero-title { font-size: clamp(4rem,12vw,8rem); font-weight: 900; line-height: 1; letter-spacing: -.04em; margin-bottom: 16px; }
.hero-action { color: var(--gold-light); }
.hero-eqa    { color: var(--white); }
.hero-subtitle { font-size: clamp(1.05rem,3vw,1.5rem); font-weight: 300; color: rgba(255,255,255,.9); margin-bottom: 10px; letter-spacing: -.01em; }
.hero-tagline { font-size: .96rem; color: rgba(255,255,255,.5); margin-bottom: 36px; }

.authors-block { margin-bottom: 36px; }
.authors-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 5px; margin-bottom: 10px; }
.author { display: inline; }
.author-link { text-decoration: none; }
.author-name { color: rgba(255,255,255,.88); font-size: .9rem; font-weight: 500; transition: color var(--t); }
.author-link:hover .author-name { color: var(--gold-light); }
.author-aff { font-size: .6rem; color: var(--gold); margin-left: 1px; }
.author-eq  { font-size: .7rem; color: var(--gold-light); }
.author-sep { color: rgba(255,255,255,.35); font-size: .9rem; margin: 0 1px; }
.affiliations { font-size: .78rem; color: rgba(255,255,255,.42); line-height: 1.8; }
.aff-sep { margin: 0 7px; }
.equal-contrib { font-size: .73rem; color: rgba(255,255,255,.3); margin-top: 6px; font-style: italic; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-md);
  font-size: .88rem; font-weight: 600; text-decoration: none;
  transition: all var(--t); cursor: pointer; border: none; font-family: 'Inter', sans-serif;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary { background: var(--purple-light); color: var(--white); box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; }
.btn-primary:hover { background: #9575C9; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(78,42,132,.5); }
.btn-secondary { background: var(--gold); color: var(--purple-deep); font-weight: 700; }
.btn-secondary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(182,163,105,.45); }
.btn-outline-gold { background: transparent; color: var(--gold-light); border: 2px solid rgba(182,163,105,.5); }
.btn-outline-gold:hover { border-color: var(--gold-light); background: rgba(182,163,105,.08); transform: translateY(-2px); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.3); }
.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,.08); transform: translateY(-2px); }
.btn-outline-purple { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-outline-purple:hover { background: var(--purple-pale); transform: translateY(-2px); }

.hero-scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.3); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; z-index: 2;
}
.scroll-arrow {
  width: 18px; height: 18px;
  border-right: 2px solid rgba(255,255,255,.3); border-bottom: 2px solid rgba(255,255,255,.3);
  transform: rotate(45deg); animation: bounceArrow 1.8s ease-in-out infinite;
}
@keyframes bounceArrow { 0%,100% { transform: rotate(45deg) translateY(0); } 50% { transform: rotate(45deg) translateY(5px); } }

/* ============================================================  SECTIONS  */
.section { padding: 96px 0; }
.section-light  { background: var(--white); }
.section-dark   { background: var(--purple-deep); }
.section-purple { background: linear-gradient(160deg, var(--purple-dark) 0%, var(--purple) 100%); }

.section-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--purple); margin-bottom: 10px; }
.section-title { font-size: clamp(1.8rem,4vw,2.7rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 18px; line-height: 1.15; }
.section-desc { font-size: .97rem; color: var(--text-mid); max-width: 640px; margin-bottom: 44px; line-height: 1.7; }
.subsection-title { font-size: 1.25rem; font-weight: 700; color: var(--text-dark); margin: 52px 0 18px; letter-spacing: -.02em; }

/* ============================================================  ABSTRACT  */
.abstract-card {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 44px;
  position: relative; overflow: hidden;
}
.abstract-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, var(--purple), var(--gold)); border-radius: 4px 0 0 4px;
}
.abstract-card p { font-size: 1rem; line-height: 1.8; color: var(--text-mid); margin-bottom: 16px; }
.abstract-card p:last-child { margin-bottom: 0; }
.abstract-card strong { color: var(--purple); font-weight: 700; }

/* ============================================================  HIGHLIGHTS  */
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.highlight-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md); padding: 26px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease, background var(--t), border-color var(--t), box-shadow var(--t);
}
.highlight-card.visible { opacity: 1; transform: translateY(0); }
.highlight-card:hover { background: rgba(255,255,255,.07); border-color: rgba(182,163,105,.25); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.highlight-icon { width: 46px; height: 46px; border-radius: var(--radius-sm); background: rgba(182,163,105,.12); border: 1px solid rgba(182,163,105,.2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.highlight-icon svg { width: 21px; height: 21px; stroke: var(--gold-light); }
.highlight-card h3 { font-size: .97rem; font-weight: 700; color: var(--white); margin-bottom: 9px; }
.highlight-card p { font-size: .85rem; color: rgba(255,255,255,.6); line-height: 1.7; }
.highlight-card em { color: var(--gold-light); font-style: normal; font-weight: 600; }
.highlight-card strong { color: rgba(255,255,255,.85); }

/* ============================================================  DATASET  */
.dataset-tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 44px; }
@media (max-width: 768px) { .dataset-tasks { grid-template-columns: 1fr; } }
.task-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; background: var(--off-white); transition: box-shadow var(--t), transform var(--t); }
.task-card:hover { box-shadow: var(--card-shadow); transform: translateY(-3px); }
.task-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.task-tag { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; }
.task-forward .task-tag { background: rgba(78,42,132,.12); color: var(--purple); }
.task-inverse .task-tag { background: rgba(182,163,105,.15); color: var(--gold-dark); }
.task-suffix { font-family: 'JetBrains Mono', monospace; font-size: .75rem; color: var(--text-light); background: var(--white); border: 1px solid var(--border); padding: 3px 9px; border-radius: var(--radius-sm); }
.task-diagram { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; flex-wrap: wrap; }
.task-frame { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.frame-label { font-size: .68rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .05em; }
.frame-box { width: 54px; height: 42px; border-radius: 6px; border: 2px solid var(--border); }
.frame-start { background: linear-gradient(135deg, #e8e0f5, #d4c9ee); border-color: var(--purple-light); }
.frame-end   { background: linear-gradient(135deg, #f5f0e0, #eed9a0); border-color: var(--gold); }
.action-badge { font-size: .68rem; font-weight: 600; color: var(--purple); background: rgba(78,42,132,.08); border: 1px dashed rgba(78,42,132,.3); padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.task-arrow { font-size: 1.1rem; color: var(--text-light); }
.task-plus { display: flex; align-items: center; }
.choice-label { font-size: .68rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.choice-box { width: 28px; height: 22px; border-radius: 4px; border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700; color: var(--text-light); }
.choice-correct { background: linear-gradient(135deg, var(--purple), var(--purple-light)); border-color: var(--purple); color: var(--white) !important; }
.choice-list { display: flex; flex-direction: column; gap: 3px; }
.choice-text { font-size: .68rem; color: var(--text-light); padding: 2px 6px; border-radius: 4px; border: 1px solid transparent; }
.choice-correct-text { color: var(--gold-dark); background: rgba(182,163,105,.12); border-color: rgba(182,163,105,.3); font-weight: 600; }
.task-desc { font-size: .84rem; color: var(--text-mid); line-height: 1.6; }
.task-desc sub { font-size: .7em; }

/* ============================================================  LEVELS TABLE  */
.levels-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(78,42,132,.06); }
.levels-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.levels-table thead th { background: var(--purple); color: rgba(255,255,255,.9); padding: 13px 18px; text-align: left; font-weight: 600; font-size: .79rem; text-transform: uppercase; letter-spacing: .06em; }
.levels-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
.levels-table tbody tr:last-child { border-bottom: none; }
.levels-table tbody tr:hover { background: var(--off-white); }
.levels-table td { padding: 15px 18px; color: var(--text-mid); }
.level-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.level-high { background: rgba(78,42,132,.12); color: var(--purple); }
.level-mid  { background: rgba(182,163,105,.15); color: var(--gold-dark); }
.level-low  { background: rgba(78,42,132,.06); color: var(--purple-light); }
.example-text { font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--text-light); }
code { font-family: 'JetBrains Mono', monospace; font-size: .84em; background: rgba(78,42,132,.07); color: var(--purple); padding: 2px 6px; border-radius: 4px; }

/* ============================================================  SOURCES  */
.sources-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media (max-width: 600px) { .sources-grid { grid-template-columns: 1fr; } }
.source-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--off-white); transition: all var(--t); }
.source-card:hover { border-color: var(--purple-light); box-shadow: 0 4px 16px rgba(78,42,132,.1); transform: translateY(-2px); }
.source-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; font-weight: 900; flex-shrink: 0; }
.source-bridge { background: linear-gradient(135deg, var(--purple), var(--purple-light)); color: var(--white); }
.source-droid  { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: var(--white); }
.source-rt1    { background: linear-gradient(135deg, #2d3a6e, #4a5fa8); color: var(--white); }
.source-name   { font-size: .87rem; font-weight: 700; color: var(--text-dark); }
.source-detail { font-size: .75rem; color: var(--text-light); margin-top: 2px; line-height: 1.4; }

/* ============================================================  STATS STRIP  */
.stats-strip { display: flex; align-items: center; justify-content: center; gap: 0; margin-top: 44px; background: linear-gradient(135deg, var(--purple-dark), var(--purple)); border-radius: var(--radius-lg); padding: 30px 32px; flex-wrap: wrap; }
.stat-item { text-align: center; padding: 0 32px; }
.stat-num { font-size: 2rem; font-weight: 900; color: var(--gold-light); letter-spacing: -.03em; line-height: 1; }
.stat-label { font-size: .75rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.stat-divider { width: 1px; height: 44px; background: rgba(255,255,255,.12); }
@media (max-width: 600px) { .stats-strip { gap: 20px; } .stat-divider { display: none; } .stat-item { padding: 0 16px; } }

/* ============================================================  RESULTS  */
.findings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.finding-item { display: flex; gap: 12px; padding: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-md); }
.finding-icon { font-size: 1.3rem; flex-shrink: 0; }
.finding-text { font-size: .83rem; color: rgba(255,255,255,.68); line-height: 1.6; }
.finding-text strong { color: var(--gold-light); }

/* ============================================================  LEADERBOARD  */
.leaderboard-wrap {
  margin-top: 48px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 18px 22px;
  background: rgba(0,0,0,.2);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.lb-dataset-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.lb-tab {
  padding: 7px 16px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.55); cursor: pointer; transition: all var(--t);
  font-family: 'Inter', sans-serif;
}
.lb-tab:hover:not(.lb-tab-active) { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.lb-tab-active { background: var(--gold); border-color: var(--gold); color: var(--purple-deep); }

.lb-type-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-chip {
  padding: 6px 14px; border-radius: 999px;
  font-size: .76rem; font-weight: 600;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5); cursor: pointer; transition: all var(--t);
  font-family: 'Inter', sans-serif;
}
.lb-chip:hover:not(.lb-chip-active) { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.lb-chip-active { background: rgba(123,94,167,.4); border-color: var(--purple-light); color: #fff; }

.lb-table-scroll { overflow: visible; }

.lb-table { width: 100%; border-collapse: collapse; font-size: .76rem; }

/* Header */
.lb-table thead { z-index: 10; }
.lb-table th {
  background: rgba(30,16,53,.97);
  color: rgba(255,255,255,.55);
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 6px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.1);
  user-select: none;
  cursor: pointer;
  transition: color var(--t), background var(--t);
}
.lb-table th:first-child { text-align: center; cursor: default; width: 36px; min-width: 36px; }
.lb-table th:nth-child(2) { text-align: left; cursor: default; min-width: 160px; }
.lb-table th.sortable:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.05); }
.lb-table th.sort-asc,
.lb-table th.sort-desc { color: var(--gold-light); background: rgba(182,163,105,.1); }

.lb-sort-icon { display: inline-block; margin-left: 4px; opacity: .4; font-size: .7rem; transition: opacity var(--t), transform var(--t); }
.lb-table th.sort-asc .lb-sort-icon,
.lb-table th.sort-desc .lb-sort-icon { opacity: 1; }

.lb-group-header td {
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.35);
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 6px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Rows */
.lb-table tbody tr.lb-row {
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background var(--t);
}
.lb-table tbody tr.lb-row:hover { background: rgba(255,255,255,.04); }
.lb-table tbody tr.lb-row-human {
  background: rgba(110,231,183,.07);
  border-top: 2px solid rgba(110,231,183,.4);
  border-bottom: 2px solid rgba(110,231,183,.4);
}
.lb-table tbody tr.lb-row-human:hover { background: rgba(110,231,183,.12); }

.lb-table td { padding: 7px 6px; color: rgba(255,255,255,.78); text-align: center; white-space: nowrap; }
.lb-table td:first-child { text-align: center; width: 36px; min-width: 36px; }
.lb-table td:nth-child(2) { text-align: left; min-width: 160px; }

/* Rank cell */
.lb-rank { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.3); }
.lb-rank-medal { font-size: 1rem; line-height: 1; }

/* Model name cell */
.lb-model-name { display: flex; align-items: center; gap: 8px; }
.lb-type-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.lb-dot-open, .lb-type-dot-open { background: #a78bfa; box-shadow: 0 0 6px rgba(167,139,250,.7); }
.lb-dot-prop, .lb-type-dot-prop { background: var(--gold); box-shadow: 0 0 6px rgba(182,163,105,.6); }
.lb-model-label { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.88); line-height: 1.3; }
.lb-row-human .lb-model-label { color: #6ee7b7; }
.lb-model-label small { display: block; font-size: .7rem; font-weight: 400; color: rgba(255,255,255,.38); }

/* Value cells */
.lb-val { font-family: 'JetBrains Mono', monospace; font-size: .74rem; }
.lb-val-highlight-open  { color: #a78bfa; font-weight: 700; }
.lb-val-highlight-prop  { color: var(--gold-light); font-weight: 700; }
.lb-val-human { color: #6ee7b7; font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: .74rem; }
.lb-val-dash { color: rgba(255,255,255,.2); font-size: .7rem; }

/* Overall perf bar */
.lb-perf-cell { min-width: 80px; }
.lb-perf-wrap { display: flex; align-items: center; gap: 7px; }
.lb-perf-bar-bg {
  flex: 1; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.lb-perf-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--purple-light), var(--gold));
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.lb-perf-bar-fill-prop {
  background: linear-gradient(90deg, #7B5EA7, var(--gold-light));
}
.lb-perf-bar-fill-human {
  background: linear-gradient(90deg, #16a34a, #6ee7b7);
}
.lb-perf-num { font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.88); min-width: 32px; }

/* Dataset section divider in header */
.lb-th-group { border-left: 1px solid rgba(255,255,255,.12); }
.lb-th-first { border-left: none; }

/* Legend */
.lb-legend {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 22px;
  background: rgba(0,0,0,.15);
  border-top: 1px solid rgba(255,255,255,.06);
}
.lb-legend-item { display: flex; align-items: center; gap: 6px; font-size: .73rem; color: rgba(255,255,255,.72); }
.lb-dot { width: 8px; height: 8px; border-radius: 50%; }
.lb-medal { font-size: .9rem; }
.lb-legend-note { margin-left: auto; font-style: italic; color: rgba(255,255,255,.3); }
@media (max-width: 600px) { .lb-legend-note { margin-left: 0; } }



/* ============================================================  VIEWER  */
.viewer-controls {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 24px;
}
.viewer-control-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.control-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.ctrl-label { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-light); }
.ctrl-select {
  appearance: none; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: .88rem; color: var(--text-dark);
  font-family: 'Inter', sans-serif; cursor: pointer; transition: border-color var(--t);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a6b8a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.ctrl-select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(78,42,132,.1); }
.btn-load { flex-shrink: 0; }
.viewer-status { margin-top: 14px; font-size: .83rem; color: var(--text-light); padding: 10px 14px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); }

.viewer-card { background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.viewer-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--white); border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.viewer-nav { display: flex; align-items: center; gap: 12px; }
.viewer-nav-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--border);
  color: var(--text-mid); font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: all var(--t); font-family: 'Inter', sans-serif;
}
.viewer-nav-btn svg { width: 14px; height: 14px; }
.viewer-nav-btn:hover:not(:disabled) { background: var(--purple); color: var(--white); border-color: var(--purple); }
.viewer-nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.viewer-counter { font-size: .82rem; font-weight: 700; color: var(--text-dark); min-width: 60px; text-align: center; }
.viewer-meta-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.badge-sp { background: rgba(78,42,132,.12); color: var(--purple); }
.badge-ai { background: rgba(182,163,105,.15); color: var(--gold-dark); }
.badge-high { background: rgba(78,42,132,.12); color: var(--purple); }
.badge-mid  { background: rgba(182,163,105,.15); color: var(--gold-dark); }
.badge-low  { background: rgba(78,42,132,.06); color: var(--purple-light); }
.badge-source { background: rgba(0,0,0,.06); color: var(--text-mid); }

.viewer-body { padding: 24px; }

/* ── Forward viewer layout (State Prediction) ── */
.vf-layout { display: grid; gap: 24px; }

/* 2×2 grid: [frame-label][spacer] / [frame-image][action-box]
   The image and action box share row 2 and are perfectly top-aligned. */
.vf-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 20px;
  row-gap: 8px;   /* tight gap between the label row and the content row */
  align-items: start;
}
.vf-top-spacer { /* occupies col 2 row 1 — keeps grid symmetry, no visual output */ }
.vf-frame-wrap { /* col 1 row 2 — contains the img-zoomable */ }
.vf-frame-label { font-size: .7rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; }
/* Frame wrappers get the border/radius; choice wrappers rely on the card border */
.vf-frame-wrap .img-zoomable,
.vi-frame-wrap .img-zoomable {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/*
 * Zoom-wrapper — wraps every dataset image.
 * Clicking the card (not the zoom button) selects a choice;
 * clicking the zoom button (bottom-right) opens the lightbox.
 */
.img-zoomable {
  position: relative; display: block;
  overflow: hidden; background: #f0edf8;
}
/* Subtle purple tint on hover */
.img-zoomable::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(78,42,132,0);
  transition: background .18s ease;
  pointer-events: none; z-index: 1;
}
.img-zoomable:hover::after { background: rgba(78,42,132,.1); }

/* Magnifying-glass zoom button (bottom-right, visible on hover) */
.img-zoom-btn {
  position: absolute; bottom: 7px; right: 7px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s ease;
  cursor: zoom-in;
  pointer-events: auto; /* must be auto so click fires before parent card */
  z-index: 3;
}
.img-zoomable:hover .img-zoom-btn { opacity: 1; }
.img-zoom-btn svg { width: 14px; height: 14px; pointer-events: none; }
.img-load-failed::after,
.img-load-failed .img-zoom-btn { display: none; }

/*
 * Frame image: fills its column at the image's natural aspect ratio.
 * No forced height → no letterboxing regardless of 1–4 views.
 */
.vf-frame-img {
  display: block; width: 100%; height: auto;
  min-height: 60px;
}

.vf-action-box {
  background: rgba(78,42,132,.06); border: 1px solid rgba(78,42,132,.15);
  border-radius: var(--radius-md); padding: 16px 20px;
  min-height: 80px;
  align-self: center;  /* vertically centres within the image row */
}
.vf-action-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--purple); margin-bottom: 8px; }
.vf-action-text { font-size: .92rem; color: var(--text-dark); line-height: 1.6; font-weight: 500; }

/* 2 × 2 choice grid — each card gets ~half the container width,
   making even 4-view panoramics comfortable to view */
.vf-choices-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-light); margin-bottom: 12px; }
.vf-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Choice card */
.vf-choice {
  display: flex; flex-direction: column;
  cursor: pointer; border-radius: var(--radius-md);
  border: 2px solid var(--border); overflow: hidden;
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
}
.vf-choice-label {
  font-size: .78rem; font-weight: 700; color: var(--text-light);
  padding: 6px 12px; text-align: center;
  background: var(--off-white); border-bottom: 1px solid var(--border);
  width: 100%; box-sizing: border-box;
  transition: background var(--t), color var(--t);
}
/*
 * Choice image: natural aspect ratio, no forced height.
 * Wide composites (2–4 views) fill the card width and render short;
 * single-view portraits render taller — both without letterboxing.
 */
.vf-choice-img {
  display: block; width: 100%; height: auto;
  min-height: 50px;
  transition: opacity var(--t);
}

/* Hover / reveal states target the card, not just the image */
.vf-choice:hover { border-color: var(--purple-light); box-shadow: 0 4px 14px rgba(78,42,132,.18); }
.vf-choice.revealed-correct { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.22); }
.vf-choice.revealed-correct .vf-choice-label { background: #16a34a; color: #fff; border-bottom-color: #16a34a; }
.vf-choice.revealed-wrong { border-color: transparent; opacity: .42; }

/* ── Inverse viewer layout (Action Inference) ── */
.vi-layout { display: flex; flex-direction: column; gap: 20px; }

/* Before / After frames fill equal columns with the arrow centred */
.vi-frames {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px;
}
.vi-frame-wrap { display: flex; flex-direction: column; gap: 8px; }
.vi-frame-img {
  display: block; width: 100%; height: auto;
  min-height: 60px;
}
.vi-arrow { font-size: 1.8rem; color: var(--text-light); text-align: center; flex-shrink: 0; }
.vi-choices-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-light); margin-bottom: 10px; }
.vi-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .vi-choices { grid-template-columns: 1fr; } }
.vi-choice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--white); border: 2px solid var(--border);
  cursor: pointer; transition: all var(--t);
}
.vi-choice:hover { border-color: var(--purple-light); background: var(--off-white); }
.vi-choice-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--purple-pale); color: var(--purple); font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--t), color var(--t); }
.vi-choice-text { font-size: .85rem; color: var(--text-dark); line-height: 1.5; font-family: 'JetBrains Mono', monospace; }
.vi-choice.revealed-correct { border-color: #16a34a; background: rgba(22,163,74,.06); }
.vi-choice.revealed-correct .vi-choice-letter { background: #16a34a; color: var(--white); }
.vi-choice.revealed-wrong { opacity: .4; }

.viewer-answer-row { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--white); border-top: 1px solid var(--border); flex-wrap: wrap; }
.viewer-answer-label { font-size: .8rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .05em; }
.viewer-answer-val { font-size: .9rem; font-weight: 800; color: var(--purple); opacity: 0; transition: opacity .4s; font-family: 'JetBrains Mono', monospace; }
.viewer-answer-val.shown { opacity: 1; }
.viewer-reveal-btn { margin-left: auto; padding: 7px 16px; border-radius: var(--radius-sm); background: var(--purple); color: var(--white); border: none; font-size: .8rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; transition: all var(--t); }
.viewer-reveal-btn:hover { background: var(--purple-light); }
.viewer-reveal-btn:disabled { background: var(--border); color: var(--text-light); cursor: not-allowed; }

.viewer-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px; color: var(--text-light); font-size: .9rem; }
.loading-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-error { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px; text-align: center; }
.error-icon { font-size: 2.5rem; }
.error-hint { font-size: .82rem; color: var(--text-light); max-width: 400px; }
.hf-embed-link { margin-top: 20px; text-align: center; }

/* ── Image zoom lightbox ── */
.img-zoom-modal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8, 4, 18, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px; box-sizing: border-box;
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  cursor: zoom-out;
}
.img-zoom-modal.open { opacity: 1; visibility: visible; }

.img-zoom-img {
  display: block;
  max-width: min(100%, 1440px);
  max-height: 88vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 32px 80px rgba(0,0,0,.65);
  cursor: default;
  animation: zoomIn .2s ease both;
}
@keyframes zoomIn {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.img-zoom-close {
  position: fixed; top: 18px; right: 22px;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  z-index: 9001;
}
.img-zoom-close:hover { background: rgba(255,255,255,.26); transform: scale(1.08); }
.img-zoom-close svg { width: 18px; height: 18px; pointer-events: none; }

.img-zoom-hint {
  margin-top: 14px;
  font-size: .7rem; color: rgba(255,255,255,.32);
  font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: .09em;
  pointer-events: none;
}
.img-zoom-hint kbd {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255,255,255,.1); border-radius: 3px;
  padding: 1px 5px; font-size: .68rem;
  border: 1px solid rgba(255,255,255,.18);
}

@media (max-width: 680px) {
  /* Collapse to 1 column; the spacer becomes invisible, label + image + action stack */
  .vf-top { grid-template-columns: 1fr; }
  .vf-top-spacer { display: none; }   /* remove the empty spacer row on mobile */
  /* Keep 2-col choice grid even on mobile */
  .vf-choices { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* Stack before/after frames vertically */
  .vi-frames { grid-template-columns: 1fr; }
  .vi-arrow { font-size: 1.4rem; }
}

/* ============================================================  CITATION  */
.citation-block {
  position: relative; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md); padding: 30px 32px; overflow: hidden;
}
.citation-block::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--purple-light), var(--gold));
}
.copy-btn {
  position: absolute; top: 14px; right: 14px;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7); font-size: .76rem; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--t); font-family: 'Inter', sans-serif;
}
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn:hover { background: var(--purple-light); color: var(--white); border-color: var(--purple-light); }
.copy-btn.copied { background: #16a34a; color: var(--white); border-color: #16a34a; }
pre { font-family: 'JetBrains Mono', monospace; font-size: .82rem; color: rgba(255,255,255,.75); line-height: 1.7; overflow-x: auto; white-space: pre; margin: 0; }

/* ============================================================  DOWNLOAD  */
.code-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ctab { padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--off-white); color: var(--text-mid); font-size: .83rem; font-weight: 600; cursor: pointer; transition: all var(--t); font-family: 'Inter', sans-serif; }
.ctab-active { background: var(--purple); border-color: var(--purple); color: var(--white); }
.ctab:not(.ctab-active):hover { background: var(--purple-pale); border-color: var(--purple-light); }

.code-block-wrap {
  position: relative; background: var(--purple-deep);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-md);
  padding: 28px 32px; margin-bottom: 28px; overflow: hidden;
}
.code-block-wrap.hidden { display: none; }
.code-block-wrap::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, var(--purple-light), var(--gold)); }
.code-block-wrap pre { color: rgba(255,255,255,.82); font-size: .82rem; }
.code-block-wrap .copy-btn { background: rgba(255,255,255,.06); }
.copy-code { position: absolute; top: 12px; right: 12px; }
.cm { color: #C792EA; }
.cc { color: #546E7A; }
.cs { color: #C3E88D; }
.cn { color: #F78C6C; }

/* ============================================================  FOOTER  */
.footer { background: var(--purple-deep); border-top: 1px solid rgba(182,163,105,.12); padding: 34px 0 18px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 26px; }
.footer-logo { font-size: 1.2rem; font-weight: 800; color: var(--white); letter-spacing: -.02em; }
.footer-meta { font-size: .76rem; color: rgba(255,255,255,.38); margin-top: 3px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.45); text-decoration: none; font-size: .83rem; transition: color var(--t); }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { text-align: center; font-size: .75rem; color: rgba(255,255,255,.22); padding-top: 18px; border-top: 1px solid rgba(255,255,255,.05); }

/* ============================================================  UTILS  */
.hidden { display: none !important; }
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 768px) { .section { padding: 64px 0; } .abstract-card { padding: 26px 22px; } .stats-strip { padding: 22px; } .citation-block { padding: 22px 22px 22px; } .code-block-wrap { padding: 20px 18px; } }

/* ============================================================  EMPIRICAL FINDINGS  */

/* Block containers */
.ef-block { padding: 48px 0; }
.ef-block-alt { background: var(--off-white); margin: 0 -24px; padding: 48px 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* The ef-block-alt's bottom border is the visual close of the findings section.
   Remove the section's own bottom padding so the only gap to #viewer is its 96px top padding. */
#findings { padding-bottom: 0; }

/* The first ef-block already has the section-desc's 44px margin above it;
   drop its own top padding so the gap matches other section → content rhythms. */
#findings .section-desc + .ef-block { padding-top: 0; }

/* Badge + header row */
.ef-badge-row { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 28px; }
.ef-badge {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--purple); color: var(--white);
  font-size: 1.1rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; letter-spacing: -.02em;
}
.ef-badge-gold, .ef-badge-indigo, .ef-badge-teal { background: var(--purple); }
.ef-title    { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 700; color: var(--purple); margin: 0 0 4px; letter-spacing: -.02em; }
.ef-subtitle { font-size: .92rem; color: var(--text-mid); margin: 0; font-style: italic; line-height: 1.5; }

/* Two-column split layout */
.ef-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.ef-split-reverse .ef-visual-col { order: -1; }
@media (max-width: 800px) {
  .ef-split { grid-template-columns: 1fr; }
  .ef-split-reverse .ef-visual-col { order: 0; }
}
.ef-text-col p { font-size: .96rem; line-height: 1.75; color: var(--text-mid); margin-bottom: 14px; }
.ef-text-col p:last-of-type { margin-bottom: 0; }
.ef-text-col-inline { font-size: .96rem; line-height: 1.75; color: var(--text-mid); margin-bottom: 20px; display: block; }

/* Subheadings within findings */
.ef-sub-heading {
  font-size: 1rem; font-weight: 700; color: var(--text-dark); letter-spacing: -.01em;
  margin: 28px 0 16px; padding-left: 12px;
  border-left: 3px solid var(--purple);
}

/* Stat callout boxes */
.ef-callouts { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 4px; }
.ef-callout { flex: 1; min-width: 108px; padding: 14px 14px 12px; border-radius: var(--radius-md); text-align: center; border: 1.5px solid; }
.ef-callout-val { display: block; font-size: 1.5rem; font-weight: 900; font-family: 'JetBrains Mono', monospace; line-height: 1.1; }
.ef-callout-lbl { display: block; font-size: .7rem; font-weight: 600; margin-top: 4px; line-height: 1.35; text-transform: uppercase; letter-spacing: .04em; }
.ef-callout-alert  { background: #fff5f5; border-color: #fc8181; }
.ef-callout-alert  .ef-callout-val, .ef-callout-alert  .ef-callout-lbl { color: #c53030; }
.ef-callout-ok     { background: #f0fff4; border-color: #68d391; }
.ef-callout-ok     .ef-callout-val, .ef-callout-ok     .ef-callout-lbl { color: #276749; }
.ef-callout-blue   { background: #ebf8ff; border-color: #63b3ed; }
.ef-callout-blue   .ef-callout-val, .ef-callout-blue   .ef-callout-lbl { color: #2b6cb0; }
.ef-callout-gold   { background: rgba(182,163,105,.1); border-color: var(--gold); }
.ef-callout-gold   .ef-callout-val, .ef-callout-gold   .ef-callout-lbl { color: var(--gold-dark); }
.ef-callout-purple { background: var(--purple-pale); border-color: var(--purple-light); }
.ef-callout-purple .ef-callout-val, .ef-callout-purple .ef-callout-lbl { color: var(--purple); }

/* Note / aside text */
.ef-note { font-size: .82rem; color: var(--text-light); font-style: italic; border-left: 3px solid var(--border); padding-left: 12px; margin-top: 14px; line-height: 1.55; }

/* Figures */
.ef-figure { margin: 0; }
.ef-figure + .ef-figure { margin-top: 16px; }
.ef-figure img { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(78,42,132,.09); cursor: zoom-in; display: block; }
.ef-figure figcaption { font-size: .8rem; color: var(--text-light); margin-top: 8px; text-align: center; font-style: italic; line-height: 1.5; }
.ef-figure-full { margin-top: 32px; }
.ef-figure-full img { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(78,42,132,.09); cursor: zoom-in; }
.ef-figure-full figcaption { font-size: .8rem; color: var(--text-light); margin-top: 8px; text-align: center; font-style: italic; line-height: 1.5; }

/* ─── Finding 01 Multi-model Bar Chart ─── */
.ef-chart-wrap { margin-top: 32px; padding: 24px 28px 20px; background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ef-chart-title { text-align: center; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); margin-bottom: 20px; }

/* Each model row */
.f01-chart { display: flex; flex-direction: column; gap: 6px; }
.f01-row {
  display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  transition: filter var(--t);
}
.f01-row:hover { filter: brightness(0.97); }
.f01-row-human { }
.f01-row-head  { display: flex; flex-direction: column; gap: 4px; }
.f01-row-name  { font-size: .86rem; font-weight: 700; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f01-row-human .f01-row-name { color: #92400e; }
.f01-type-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; width: fit-content; }
.f01-type-human { background: rgba(182,163,105,.2); color: #92400e; }
.f01-type-prop  { background: var(--purple-pale); color: var(--purple); }
.f01-type-open  { background: #e6fffa; color: #2c7a7b; }

/* Bar tracks */
.f01-row-bars { display: flex; flex-direction: column; gap: 4px; }
.f01-bar-wrap {
  height: 18px; background: rgba(0,0,0,.05); border-radius: 4px; overflow: visible; position: relative;
}
.f01-bar {
  height: 100%; border-radius: 4px; position: relative; display: flex; align-items: center;
  transition: width .8s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}
.f01-bar-label {
  position: absolute; right: -34px; font-size: .69rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; white-space: nowrap; color: var(--text-dark);
}
.f01-bar-mid-pulse { animation: midPulse 3s ease-in-out infinite; }
@keyframes midPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(229,62,62,.3); }
  50%      { box-shadow: 0 0 0 5px rgba(229,62,62,0); }
}

/* Axis ticks below chart */
.f01-axis {
  display: flex; justify-content: space-between; padding: 6px 14px 0 248px;
  font-size: .72rem; color: var(--text-light); font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 680px) { .f01-axis { padding-left: 14px; } }

/* Legend */
.f01-legend { display: flex; gap: 20px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.f01-leg-item { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-mid); }
.f01-leg-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.f01-high { background: #6b46c1; }
.f01-mid  { background: #e53e3e; }
.f01-low  { background: #3182ce; }

/* Row label tags within bar track */
.f01-bar-wrap-high::before,
.f01-bar-wrap-mid::before,
.f01-bar-wrap-low::before {
  content: attr(data-lbl); position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  font-size: .6rem; font-weight: 600; color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: .05em; pointer-events: none; z-index: 1;
}

/* Responsive: collapse name column on small screens */
@media (max-width: 680px) {
  .f01-row { grid-template-columns: 1fr; }
  .f01-row-head { flex-direction: row; align-items: center; justify-content: space-between; }
}


/* ─── Finding 03A: Multi-view line charts ─── */
.f03a-card {
  margin-top: 28px; padding: 22px 24px 18px;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.f03a-card-label {
  text-align: center; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-light); margin-bottom: 14px;
}
.f03a-svg-host { width: 100%; }
.f03a-svg-host svg { display: block; width: 100%; overflow: visible; }

.f03a-legend {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px 22px; margin-top: 10px;
}
.f03a-leg-item { display: flex; align-items: center; gap: 8px; }
.f03a-leg-line {
  display: inline-block; width: 24px; height: 3px;
  border-radius: 2px; flex-shrink: 0;
}

.f03a-two-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 16px;
}
@media (max-width: 640px) { .f03a-two-panel { grid-template-columns: 1fr; } }

.f03a-panel {
  padding: 16px 18px 14px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.f03a-panel-header {
  display: flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 700; color: var(--text-dark);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em;
}
.f03a-ph-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.f03a-ph-sp  { background: var(--purple); }
.f03a-ph-ai  { background: #3182ce; }

/* ─── Rotation Sub-finding ─── */
.ef-rot-finding { margin-top: 32px; padding: 24px 26px; background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ef-rot-finding > p { font-size: .93rem; line-height: 1.7; color: var(--text-mid); margin-bottom: 16px; }
.ef-rot-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.ef-rot-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ef-rot-table thead th { background: var(--purple); color: rgba(255,255,255,.9); padding: 10px 14px; text-align: center; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.ef-rot-table thead th:first-child { text-align: left; }
.ef-rot-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
.ef-rot-table tbody tr:last-child { border-bottom: none; }
.ef-rot-table tbody tr:hover { background: var(--white); }
.ef-rot-table td { padding: 10px 14px; color: var(--text-mid); text-align: center; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.ef-rot-table td:first-child { text-align: left; font-family: 'Inter', sans-serif; font-weight: 600; color: var(--text-dark); }
.ef-worst    { color: #c53030; font-weight: 700; }
.ef-best-rot { color: #276749; font-weight: 700; }

/* Status tags inside tables */
.ef-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ef-tag-danger { background: #fff5f5; color: #c53030; border: 1px solid #fc8181; }
.ef-tag-warn   { background: #fffaf0; color: #b7791f; border: 1px solid #f6ad55; }
.ef-tag-ok     { background: #f0fff4; color: #276749; border: 1px solid #68d391; }

/* ─── SP vs AI Table ─── */
.ef-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(78,42,132,.06); }
.ef-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ef-table thead th { background: var(--purple); color: rgba(255,255,255,.9); padding: 11px 14px; text-align: left; font-weight: 600; font-size: .77rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.ef-table thead th:not(:first-child):not(:nth-child(2)) { text-align: center; }
.ef-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
.ef-table tbody tr:last-child { border-bottom: none; }
.ef-table tbody tr:hover { background: var(--off-white); }
.ef-table td { padding: 11px 14px; color: var(--text-mid); white-space: nowrap; }
.ef-table td:not(:first-child):not(:nth-child(2)) { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: .85rem; }
.ef-td-model { font-weight: 600; color: var(--text-dark); }
.ef-type-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ef-type-prop  { background: var(--purple-pale); color: var(--purple); }
.ef-type-open  { background: #e6fffa; color: #2c7a7b; }
.ef-diff-pos   { color: #276749; font-weight: 700; }
.ef-diff-neg   { color: #c53030; font-weight: 700; }
.ef-diff-human { color: #744210; font-weight: 600; }
.ef-row-human  { background: rgba(182,163,105,.07); border-top: 1.5px solid rgba(182,163,105,.35) !important; }
.ef-human-label { color: var(--gold-dark) !important; font-weight: 700; }

/* ─── Ego/Exo Table ─── */
.ef-egoexo-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(78,42,132,.06); }
.ef-egoexo-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ef-egoexo-table thead th { background: var(--purple); color: rgba(255,255,255,.9); padding: 10px 12px; text-align: center; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.ef-egoexo-table thead th:first-child, .ef-egoexo-table thead th:nth-child(2) { text-align: left; }
.ef-egoexo-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
.ef-egoexo-table tbody tr:last-child { border-bottom: none; }
.ef-egoexo-table tbody tr:hover { background: var(--white); }
.ef-egoexo-table td { padding: 9px 12px; color: var(--text-mid); text-align: center; font-family: 'JetBrains Mono', monospace; font-size: .84rem; white-space: nowrap; }
.ef-egoexo-table td:first-child, .ef-egoexo-table td:nth-child(2) { text-align: left; font-family: 'Inter', sans-serif; font-size: .84rem; }
.ef-egoexo-group-sp td { background: rgba(78,42,132,.03); }
.ef-egoexo-group-ai td { background: rgba(182,163,105,.05); }
.ef-best { color: #276749 !important; font-weight: 700 !important; text-align: center !important; }
.ef-deg  { color: #c53030 !important; font-weight: 600 !important; }
.ef-gain { color: #276749 !important; font-weight: 600 !important; }

/* ─── Custom Donut Charts ─── */
.ef-donut-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0; }
@media (max-width: 680px) { .ef-donut-row { grid-template-columns: 1fr; } }
.ef-donut-card {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 18px;
  display: flex; flex-direction: column; align-items: center;
}
.ef-donut-level { margin-bottom: 14px; }
.ef-donut-level .level-badge { color: var(--text-dark) !important; background: rgba(0,0,0,.06); }
.ef-donut-legend { margin-top: 16px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.ef-donut-leg-group { display: flex; flex-direction: column; gap: 4px; }
.ef-donut-leg-main {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--text-dark);
}
.ef-donut-leg-main strong { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: .8rem; }
.ef-donut-leg-sub {
  display: flex; align-items: center; gap: 7px; padding-left: 18px;
  font-size: .76rem; color: var(--text-mid);
}
.ef-donut-sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }

/* ─── Error Shift Bar Chart ─── */
.ef-error-shift { margin-top: 24px; padding: 24px 28px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ef-error-shift-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); margin-bottom: 18px; }
.ef-shift-rows { display: flex; flex-direction: column; gap: 12px; }
.ef-shift-row { display: flex; align-items: center; gap: 14px; }
.ef-shift-label { width: 44px; font-size: .85rem; font-weight: 700; color: var(--text-dark); flex-shrink: 0; text-align: right; }
.ef-shift-bar { flex: 1; height: 36px; border-radius: var(--radius-sm); overflow: hidden; display: flex; }
.ef-shift-perceptual { background: linear-gradient(to right, #8F7F4E, #B6A369); display: flex; align-items: center; justify-content: center; font-size: .77rem; font-weight: 700; color: #fff; padding: 0 10px; white-space: nowrap; min-width: 0; }
.ef-shift-reasoning  { background: linear-gradient(to right, #3a1f63, #4E2A84); display: flex; align-items: center; justify-content: center; font-size: .77rem; font-weight: 700; color: #fff; padding: 0 10px; white-space: nowrap; min-width: 0; flex: 1; }
.ef-shift-legend { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.ef-shift-leg-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-mid); }
.ef-shift-leg-dot  { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.ef-shift-leg-perc { background: #B6A369; }
.ef-shift-leg-reas { background: #4E2A84; }

/* ─── Error Taxonomy Grid ─── */
.etax-grid { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }

/* Group card */
.etax-group { border-radius: var(--radius-lg); border: 1.5px solid; overflow: hidden; }
.etax-group-perc { border-color: var(--gold); background: #fdfcf6; }
.etax-group-reas { border-color: var(--purple-light); background: #f9f7fd; }

/* Group header bar */
.etax-group-header {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px;
  border-bottom: 1.5px solid;
}
.etax-group-perc .etax-group-header { background: #f9f6ea; border-color: var(--gold); }
.etax-group-reas .etax-group-header { background: var(--purple-pale); border-color: var(--purple-light); }
.etax-group-header > div { flex: 1; }
.etax-group-title { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.etax-group-perc .etax-group-title { color: var(--gold-dark); }
.etax-group-reas .etax-group-title { color: var(--purple); }
.etax-group-desc { font-size: .83rem; color: var(--text-mid); margin-top: 3px; line-height: 1.5; }

/* Subcategory panels in a row */
.etax-subcats { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 680px) { .etax-subcats { grid-template-columns: 1fr; } }

.etax-subcat { padding: 16px 18px; }
.etax-subcat + .etax-subcat { border-left: 1px solid var(--border); }
@media (max-width: 680px) { .etax-subcat + .etax-subcat { border-left: none; border-top: 1px solid var(--border); } }

.etax-subcat-label {
  display: flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 700; color: var(--text-dark);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 12px;
}
.etax-subcat-hint { font-size: .72rem; color: var(--text-light); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Individual error type chips */
.etax-items { display: flex; flex-direction: column; gap: 8px; }
.etax-item {
  padding: 9px 11px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.7); border: 1px solid var(--border);
  transition: border-color var(--t), background var(--t);
}
.etax-item:hover { border-color: var(--purple-light); background: #fff; }
.etax-item-name {
  display: block; font-size: .8rem; font-weight: 700; color: var(--text-dark);
  margin-bottom: 3px;
}
.etax-item-def { display: block; font-size: .78rem; color: var(--text-mid); line-height: 1.5; }
