/* ============================================================
   ClearFairy Website — styles.css
   ============================================================ */

/* ─── CSS Variables ─── */
:root {
  --purple: #6d5acf;
  --purple-light: #8b75e0;
  --purple-dim: #e8e0ff;
  --purple-bg: #f3f0ff;
  --dark: #1a1a2e;
  --text: #374151;
  --text-muted: #6b7280;
  --border: #D8D4C9;
  --bg: #F6F5EE;
  --bg-alt: #EDEADB;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(109,90,207,0.12), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(109,90,207,0.15), 0 4px 12px rgba(0,0,0,0.08);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

/* ─── Container ─── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--purple);
}

.cf-sm { font-size: 0.78em; letter-spacing: 0.02em; }

.nav-venue {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.nav-venue:hover { color: var(--purple); border-color: var(--purple); text-decoration: none; }

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--purple); text-decoration: none; }

.nav-btn {
  background: var(--purple) !important;
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.nav-btn:hover { background: var(--purple-light) !important; }

/* ─── Hero ─── */
.hero {
  padding: 48px 0 0;
  background: #F6F5EE;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(109,90,207,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple-dim);
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.venue-dot {
  width: 8px; height: 8px;
  background: var(--purple);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-emoji {
  font-size: 0.72em;
  margin-right: 0.06em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.0;
  margin-bottom: 24px;
  color: var(--dark);
  letter-spacing: -0.03em;
}

.brand {
  background: linear-gradient(135deg, var(--purple) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-inline {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--purple);
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-subtitle em { color: var(--text); font-style: normal; font-weight: 500; }

/* Authors */
.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}

.author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 110px;
}

.author img {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--purple-dim);
  box-shadow: var(--shadow-sm);
}

.author a, .author span {
  font-size: 13px;
  text-align: center;
  line-height: 1.3;
}

.author a { font-weight: 600; color: var(--dark); }
.author a:hover { color: var(--purple); }
.author span:last-child { font-size: 11px; color: var(--text-muted); }

/* CTA Buttons */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  border: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 14px rgba(109,90,207,0.35);
}

.btn-primary:hover { background: var(--purple-light); box-shadow: 0 6px 20px rgba(109,90,207,0.45); color: #fff; }

.btn-secondary {
  background: #fff;
  color: var(--purple);
  border: 2px solid var(--purple);
}

.btn-secondary:hover { background: var(--purple-bg); color: var(--purple); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
}

.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }

.btn-dataset {
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: #ffffff;
  border-color: var(--border);
  padding: 8px 28px;
}

.btn-dataset:hover { border-color: var(--purple); color: var(--purple); background: #ffffff; }

.btn-dataset-top {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-coming-soon {
  font-size: 10px;
  opacity: 0.55;
  font-weight: 400;
  text-align: center;
  width: 100%;
  line-height: 1;
}

/* Teaser Figure */
.teaser-outer {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.teaser-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 20px 20px 0;
}

.teaser-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
}

.teaser-figure img { width: 100%; display: block; }

.trailer-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 20px 20px 0;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.trailer-video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  width: 100%;
  max-width: 100%;
}

.trailer-figure video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Decision Step Marquee (Dataset preview) ─── */
.decision-marquee {
  margin: 32px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 2%, #000 98%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 2%, #000 98%, transparent);
}

.decision-row {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: dc-scroll-left 90s linear infinite;
}

.decision-row[data-direction="right"] {
  animation-name: dc-scroll-right;
}

@keyframes dc-scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes dc-scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.dc-card {
  flex-shrink: 0;
  width: 280px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.dc-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dc-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dc-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
}

.dc-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

/* ─── Dataset overlay (floating box on top of marquee) ─── */
.dataset-overlay-wrap {
  position: relative;
  margin: 32px 0 40px;
}

.dataset-overlay-wrap .decision-marquee {
  margin: 0;
}

.dataset-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 50% 45% at center,
    rgba(237, 234, 219, 0.95) 0%,
    rgba(237, 234, 219, 0.78) 30%,
    rgba(237, 234, 219, 0.4) 55%,
    rgba(237, 234, 219, 0) 78%
  );
}

.dataset-floating {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100%;
  max-width: 900px;
  padding: 0 24px;
  box-sizing: border-box;
}

.dataset-floating .dataset-box {
  margin: 0;
  box-shadow:
    0 24px 60px rgba(109, 90, 207, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.06);
  border: 4px solid rgba(109, 90, 207, 0.35);
}

.teaser-placeholder, .figure-placeholder, .fig-placeholder, .fig-placeholder-sm, .paper-thumb-placeholder {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  font-size: 14px;
}

.teaser-placeholder p, .figure-placeholder p, .fig-placeholder p { margin: 0; }

.caption {
  font-size: 13px;
  color: var(--text-muted);
  padding: 14px 20px;
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

/* ─── Abstract Section ─── */
.abstract-section {
  padding: 80px 0;
  background: var(--dark);
  color: #fff;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: 20px;
}

.abstract-text {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
}

.abstract-text strong { color: #a78bfa; font-weight: 600; }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.2s, background 0.2s;
}

.stat-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.09); }

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-unit { font-size: 32px; }

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.stat-sub { color: rgba(255,255,255,0.4); font-size: 11px; }

.stat-def-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.stat-def-item {
  font-size: 10.5px;
  line-height: 1.45;
  padding-left: 10px;
  position: relative;
}

.stat-def-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.stat-def-strong { color: var(--text-muted); }
.stat-def-strong::before { background: var(--purple); }

.stat-def-weak { color: var(--text-muted); }
.stat-def-weak::before { background: #aaa; }

/* ─── General Section ─── */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* Thin dividers between adjacent light sections */
.section + .section,
.section + .section-alt,
.section-alt + .section,
.section-alt + .section-alt {
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ─── Rough.js sketch icons ─── */
.challenge-icon,
.property-icon,
.finding-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.rough-icon { display: block; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  background: var(--purple-dim);
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
  line-height: 1.25;
}

.section-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Challenge Grid ─── */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card-icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.card-icon img {
  width: 56px;
  height: 56px;
  filter: brightness(0) opacity(0.72);
}

.challenge-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.challenge-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.challenge-icon {
  font-size: 36px;
}

.challenge-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  text-align: center;
}

.challenge-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.challenge-card p strong { color: var(--text); }

/* ─── CLEAR Section ─── */
.concept-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.concept-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.concept-box > p {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.7;
}

.tag-exp { background: #dbeafe; color: #1d4ed8; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 14px; }
.tag-act { background: #dcfce7; color: #15803d; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 14px; }
.tag-art { background: #fef3c7; color: #b45309; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 14px; }

.example-box {
  background: rgba(0,0,0,0.03);
  border-left: 4px solid var(--purple);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}

.example-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  display: block;
  margin-bottom: 8px;
}

.example-box > p {
  font-style: italic;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 16px;
}

.step-components {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comp {
  flex: 1;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}

.comp-exp { background: #dbeafe; border: 1px solid #93c5fd; }
.comp-act { background: #dcfce7; border: 1px solid #86efac; }
.comp-art { background: #fef3c7; border: 1px solid #fcd34d; }

.comp-arrow { font-size: 20px; color: var(--text-muted); flex-shrink: 0; }

/* Properties grid */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.property-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.property-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.property-icon { font-size: 32px; }

.property-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.property-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.property-card p strong { color: var(--text); }

.figure-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #ffffff;
  padding: 20px;
}

/* Framework figures layout */
.framework-figs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.framework-fig-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--bg-alt);
}

.framework-fig-main img { width: 100%; }

.framework-fig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.fw-fig-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--bg-alt);
  transition: box-shadow 0.2s;
}

.fw-fig-item:hover { box-shadow: var(--shadow-md); }
.fw-fig-item img { width: 100%; }
.fw-fig-item .caption { font-size: 12px; padding: 8px 12px; }

.figure-wrapper img { width: 100%; }

/* ─── Pipeline ─── */
.pipeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pipeline-stage {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.stage-badge {
  position: absolute;
  top: -14px; left: 36px;
  width: 28px; height: 28px;
  background: var(--purple);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 10px rgba(109,90,207,0.4);
}

.stage-content {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  grid-template-areas: "text fig";
  gap: 32px;
  align-items: center;
}

.stage-content-reverse {
  grid-template-columns: 1.6fr 1fr;
  grid-template-areas: "fig text";
}

.stage-text { grid-area: text; }
.stage-fig  { grid-area: fig; }

.stage-text h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.stage-text > p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 16px;
}

.stage-bullets li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0 6px 22px;
  position: relative;
  line-height: 1.6;
}

.stage-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 600;
}

.stage-bullets li strong { color: var(--text); }

.stage-fig {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.stage-fig img { width: 100%; border-radius: var(--radius); }

/* ── Pan animations ── */
.pan-container {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.pan-container img {
  height: 280px;
  width: auto;
  max-width: none;
  display: block;
  border-radius: var(--radius);
  animation: pan-loop var(--pan-duration, 20s) linear infinite;
  will-change: transform;
}

.pan-container:hover img {
  animation-play-state: paused;
}

@keyframes pan-loop {
  0%   { transform: translateX(0); }
  85%  { transform: translateX(var(--pan-x, 0px)); }
  86%, 100% { transform: translateX(0); }
}

.pipeline-connector {
  display: flex;
  align-items: center;
  padding: 12px 48px;
  gap: 12px;
}

.connector-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  margin-left: 13px;
}

.connector-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-left: 4px;
}

/* ─── Results ─── */
.before-after {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.condition {
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}

.condition-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
  padding: 6px 16px;
  border-radius: 100px;
  display: inline-block;
}

.condition-baseline { background: #f3f4f6; color: var(--text); }
.condition-clearfairy { background: var(--purple-dim); color: var(--purple); }

.donut-chart-wrapper { width: 160px; margin: 0 auto 16px; }
.donut-chart { transform: rotate(-90deg); }

.donut-pct {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  fill: var(--dark);
  transform: rotate(90deg);
  transform-origin: 60px 60px;
}

.donut-sub {
  font-size: 10px;
  fill: var(--text-muted);
  transform: rotate(90deg);
  transform-origin: 60px 60px;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  display: inline-flex;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-empty { background: #e8e0ff; }
.dot-weak { background: #c9b8ff; }
.dot-strong { background: var(--purple); }

.arrow-between {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.arrow-line { width: 40px; height: 2px; background: var(--purple); }
.arrow-head { font-size: 24px; color: var(--purple); }
.arrow-text { font-size: 12px; font-weight: 600; color: var(--purple); white-space: nowrap; }

/* Findings grid */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.finding-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.finding-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.finding-icon { font-size: 28px; }

.finding-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  text-align: center;
}

.finding-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.finding-card p strong { color: var(--text); }

/* ─── Applications ─── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.app-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.app-number {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--purple-dim);
  line-height: 1;
  margin-bottom: 12px;
}

.app-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.app-card > p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }

.result-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.result-bar-label { font-size: 13px; color: var(--text-muted); width: 130px; flex-shrink: 0; }

.result-bar {
  flex: 1;
  height: 28px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.result-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border-radius: 6px;
  transition: width 1s ease;
}

.result-fill-high { background: var(--purple); }
.result-fill-low { background: #c9b8ff; color: var(--purple); }

.app-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 12px;
}

.app-figure img { width: 100%; }

/* ─── Dataset ─── */
.dataset-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
}

.dataset-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--border);
  padding-right: 48px;
}

.dataset-stat { text-align: center; }

.ds-num {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--purple);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.ds-label { font-size: 13px; color: var(--text-muted); }

.dataset-desc p { font-size: 15px; color: var(--text); margin-bottom: 12px; }

.dataset-desc ul { display: flex; flex-direction: column; gap: 8px; }

.dataset-desc li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.dataset-desc li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
}

.dataset-desc li strong { color: var(--text); }

/* ─── Paper / BibTeX ─── */
.paper-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.paper-thumb {
  width: 180px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.paper-thumb:hover { box-shadow: var(--shadow-md); }
.paper-thumb img { width: 100%; }
.paper-thumb-placeholder { min-height: 220px; width: 180px; }

.paper-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.paper-authors { font-size: 15px; color: var(--text-muted); margin-bottom: 6px; }
.paper-venue { font-size: 14px; color: var(--purple); font-weight: 600; }

.bibtex-block {
  background: var(--dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bibtex-header span { font-size: 13px; color: rgba(255,255,255,0.6); font-weight: 600; }

.copy-btn {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

pre#bibtex-content {
  padding: 20px;
  font-size: 13px;
  color: #a78bfa;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
}

/* ─── Footer ─── */
.footer {
  background: var(--dark);
  padding: 48px 0;
  text-align: center;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-logos a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-logos a:hover { color: #fff; }

.footer-logos img { height: 28px; width: auto; filter: brightness(0) invert(1) opacity(0.7); }

.footer-ack {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  max-width: 600px;
  margin: 0 auto 12px;
  line-height: 1.6;
}

.footer-ack strong { color: rgba(255,255,255,0.75); }

.footer-credit {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.footer-credit a { color: rgba(255,255,255,0.45); }

/* ─── TL;DR ─── */
.tldr-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--purple-bg);
  border: 1px solid rgba(109,90,207,0.2);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 0 0 20px;
  text-align: left;
}

.tldr-label {
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 3px;
  white-space: nowrap;
}

.tldr-box p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

.tldr-box p strong { color: var(--purple); font-weight: 600; }
.tldr-box p em { color: var(--text); font-style: italic; }

.tldr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tldr-list li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}

.tldr-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-size: 12px;
  top: 3px;
}

.tldr-list li strong { color: var(--purple); font-weight: 600; }
.tldr-list li em { font-style: italic; }

/* ─── Rationale definitions ─── */
.rationale-defs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.rationale-def {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}

.rationale-def .def-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.def-badge-strong { background: var(--purple-dim); color: var(--purple); }
.def-badge-weak   { background: #fff0e0; color: #c2610a; }
.def-badge-empty  { background: #f3f4f6; color: var(--text-muted); }

.rationale-def h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.rationale-def p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .challenge-grid { grid-template-columns: 1fr; }
  .properties-grid { grid-template-columns: 1fr; }
  .stage-content,
  .stage-content-reverse {
    grid-template-columns: 1fr;
    grid-template-areas: "fig" "text";
  }
  .rationale-defs { grid-template-columns: 1fr; }
  .findings-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .dataset-box { grid-template-columns: 1fr; }
  .dataset-info { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 24px; flex-direction: row; justify-content: space-around; }
  .paper-row { flex-direction: column; }
  .paper-thumb { width: 100%; max-width: 300px; }
  .before-after { flex-direction: column; }
  .arrow-between { flex-direction: row; }
  .step-components { flex-direction: column; }
  .comp-arrow { transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .hero { padding: 24px 0 60px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-number { font-size: 36px; }
  .authors { gap: 12px; }
  .author { width: 80px; }
  .author img { width: 60px; height: 60px; }
}
