* {
  box-sizing: border-box;
}

:root {
  --bg: #f4eddc;
  --bg-2: #fff8ea;
  --ink: #12131a;
  --ink-2: #272a36;
  --muted: #69696f;
  --muted-2: #8a877f;
  --paper: rgba(255, 252, 245, 0.86);
  --paper-strong: #fffdf8;
  --line: rgba(18, 19, 26, 0.1);
  --line-strong: rgba(18, 19, 26, 0.18);
  --accent: #c9ff4f;
  --accent-2: #ff7a59;
  --accent-3: #39d5ff;
  --accent-4: #8c6bff;
  --shadow: 0 24px 60px rgba(18, 19, 26, 0.1);
  --shadow-strong: 0 36px 90px rgba(18, 19, 26, 0.16);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

*::selection {
  background: rgba(201, 255, 79, 0.4);
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 122, 89, 0.16), transparent 20%),
    radial-gradient(circle at 88% 18%, rgba(57, 213, 255, 0.14), transparent 22%),
    radial-gradient(circle at 78% 88%, rgba(140, 107, 255, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  min-height: 100vh;
}

#app::before,
#app::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.7;
}

#app::before {
  width: 260px;
  height: 260px;
  left: -120px;
  top: 90px;
  background: radial-gradient(circle, rgba(201, 255, 79, 0.4), transparent 68%);
}

#app::after {
  width: 320px;
  height: 320px;
  right: -140px;
  bottom: 40px;
  background: radial-gradient(circle, rgba(255, 122, 89, 0.32), transparent 65%);
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 240, 0.76);
  border-bottom: 1px solid rgba(18, 19, 26, 0.08);
}

.topbar-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(18, 19, 26, 0.2);
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a,
.nav button {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav a.active,
.nav button.active,
.nav a:hover,
.nav button:hover {
  color: var(--ink);
  background: rgba(201, 255, 79, 0.34);
  border-color: rgba(18, 19, 26, 0.08);
}

.hero {
  padding: 64px 0 34px;
}

.hero-card {
  position: relative;
  padding: 24px;
}

.badge,
.small-pill,
.kind,
.status,
.stat-chip,
.filter,
.tag,
.tiny-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge {
  color: var(--ink);
  background: linear-gradient(135deg, var(--accent), #f7ff93);
  box-shadow: 0 12px 26px rgba(201, 255, 79, 0.28);
}

.hero-title,
.page-title {
  margin: 18px 0 12px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero-copy,
.section-lead,
.summary-copy,
.caption,
.muted,
.detail-subtitle,
.dataset-meta,
.meta-line,
.tiny {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 760px;
  margin: 0;
  font-size: 1.06rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.proof-grid,
.audience-grid,
.topic-grid,
.workflow-grid,
.bar-chart,
.signal-stack {
  display: grid;
  gap: 12px;
}

.proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.proof-card,
.audience-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 240, 0.8));
  border: 1px solid rgba(18, 19, 26, 0.08);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.proof-card:hover,
.audience-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18, 19, 26, 0.03);
  border-color: var(--line-strong);
  background: #fff;
}

.proof-card strong,
.audience-card h4 {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.proof-card p,
.audience-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.signal-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.signal-row:hover {
  transform: translateX(6px);
  box-shadow: 0 6px 18px rgba(18, 19, 26, 0.05);
  border-color: var(--line-strong);
}

.signal-row.schema { border-left: 5px solid #3498db !important; }
.signal-row.quality { border-left: 5px solid #ff7a59 !important; }
.signal-row.model { border-left: 5px solid #8c6bff !important; }
.signal-row.explain { border-left: 5px solid #2ecc71 !important; }

.signal-row span {
  color: var(--muted);
}

.signal-row strong {
  text-align: right;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink-2);
}

.bar-row-head span {
  color: var(--muted);
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(18, 19, 26, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.audience-grid {
  grid-template-columns: 1fr;
}

.topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 235, 0.9));
  border: 1px solid rgba(18, 19, 26, 0.08);
  box-shadow: var(--shadow);
}

.topic-card h4 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.topic-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.topic-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.distribution-visual {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 19, 26, 0.08);
}

.distribution-head,
.distribution-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.distribution-head strong {
  color: var(--ink);
}

.distribution-track {
  position: relative;
  height: 14px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 122, 89, 0.16), rgba(201, 255, 79, 0.28), rgba(57, 213, 255, 0.16));
  overflow: hidden;
}

.distribution-fill {
  position: absolute;
  inset: 4px 10px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(18, 19, 26, 0.2), rgba(18, 19, 26, 0.06));
  opacity: 0.45;
}

.distribution-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(18, 19, 26, 0.18);
}

.distribution-marker.mean {
  background: var(--accent-2);
}

.distribution-marker.median {
  background: var(--accent-3);
}

.distribution-scale {
  color: var(--muted-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.distribution-note {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.audience-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.audience-card li + li {
  margin-top: 4px;
}

.hero-cta,
.upload-actions,
.action-row,
.preview-row,
.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta {
  margin-top: 26px;
}

.btn,
.upload-btn,
.tab,
.filter,
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.btn {
  padding: 13px 18px;
  font-weight: 800;
}

.btn.primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--accent), #efff9e);
  box-shadow: 0 16px 34px rgba(201, 255, 79, 0.28);
}

.btn.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line);
}

.btn:hover,
.upload-btn:hover,
.tab:hover,
.nav a:hover,
.nav button:hover {
  transform: translateY(-1px);
}

.section {
  padding: 28px 0 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2,
.section-heading h3,
.panel h3,
.panel h4,
.card h4,
.detail-title {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading p {
  margin: 8px 0 0;
}

.grid-2,
.grid-3,
.grid-auto,
.dataset-list,
.dashboard-grid,
.stats-grid,
.cards-grid,
.feature-grid,
.insight-grid,
.recommendation-grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel,
.card,
.feature,
.metric,
.compare-card,
.dataset-card,
.insight-card,
.recommendation-card,
.upload-copy,
.upload-side,
.upload-zone {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.feature,
.metric,
.compare-card,
.dataset-card,
.insight-card,
.recommendation-card,
.panel {
  padding: 18px;
}

.feature {
  min-height: 214px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 248, 234, 0.84)),
    linear-gradient(135deg, rgba(255, 122, 89, 0.06), rgba(201, 255, 79, 0.08));
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.feature:hover {
  transform: translateY(-4px);
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-strong);
}

.feature-icon,
.upload-icon,
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a1b22, #343847);
  color: var(--accent);
  box-shadow: 0 14px 30px rgba(18, 19, 26, 0.2);
}

.feature h3 {
  margin: 16px 0 10px;
  font-size: 1.1rem;
}

.feature p {
  margin: 0;
}

.app-page .hero-title,
.detail-title,
.app-copy {
  text-align: left;
}

.app-page .hero-title {
  margin-top: 0;
}

.app-hero {
  display: grid;
  gap: 18px;
}

.upload-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

.upload-copy,
.upload-side {
  background:
    radial-gradient(circle at top right, rgba(57, 213, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(244, 237, 220, 0.8));
}

.upload-copy {
  padding: 28px;
}

.upload-side {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.upload-side-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.upload-side-head h3 {
  margin-top: 6px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

.stat-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 10px rgba(57, 213, 255, 0.14);
}

.upload-side-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  color: var(--muted);
}

.upload-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.upload-mini-card {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf7, #ffffff);
  border: 1px solid rgba(18, 19, 26, 0.08);
}

.upload-mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.upload-mini-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.upload-pills {
  justify-content: flex-start;
  margin-top: 18px;
}

.small-pill,
.filter,
.kind,
.status,
.stat-chip,
.tag,
.segment,
.tiny-chip {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.status.ready,
.tag.info,
.kind.info {
  background: rgba(57, 213, 255, 0.14);
  color: #005a72;
}

.status.imported,
.tag.warn,
.kind.warn {
  background: rgba(255, 122, 89, 0.14);
  color: #8f2b16;
}

.upload-zone {
  margin-top: 14px;
  min-height: 240px;
  border: 2px dashed rgba(18, 19, 26, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 233, 0.86));
  position: relative;
  overflow: hidden;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--accent-4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 249, 233, 0.98)) !important;
  box-shadow: var(--shadow-strong);
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201, 255, 79, 0.2), rgba(57, 213, 255, 0.25));
  border: 1px solid rgba(18, 19, 26, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 8px;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 16px rgba(18, 19, 26, 0.04);
}

.upload-zone:hover .upload-icon {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(135deg, rgba(201, 255, 79, 0.35), rgba(57, 213, 255, 0.4));
  box-shadow: 0 12px 24px rgba(201, 255, 79, 0.15);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1px solid rgba(18, 19, 26, 0.08);
  pointer-events: none;
}

.upload-zone.dragover {
  border-color: var(--accent-4);
  box-shadow: var(--shadow-strong), 0 0 0 6px rgba(140, 107, 255, 0.12);
  transform: translateY(-1px);
}

.upload-zone:focus-visible,
.upload-btn:focus-visible,
.btn:focus-visible,
.nav a:focus-visible,
.tab:focus-visible {
  outline: 3px solid rgba(18, 19, 26, 0.24);
  outline-offset: 3px;
}

.upload-zone-inner {
  position: relative;
  min-height: 270px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
}

.upload-title {
  margin: 18px 0 8px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.helper {
  color: var(--muted);
}

.upload-actions {
  justify-content: center;
  margin-top: 16px;
}

.upload-btn {
  padding: 13px 18px;
  background: linear-gradient(180deg, #fff, #f7f4eb);
  border-color: rgba(18, 19, 26, 0.1);
  font-weight: 800;
  color: var(--ink);
}

.upload-btn:hover {
  box-shadow: 0 10px 20px rgba(18, 19, 26, 0.08);
}

.dataset-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dataset-card,
.compare-card,
.metric,
.panel,
.insight-card,
.recommendation-card {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(255, 249, 235, 0.9));
}

.dataset-card,
.compare-card,
.metric,
.insight-card,
.recommendation-card {
  display: grid;
  gap: 14px;
}

.dataset-head,
.compare-top,
.metric-head,
.panel-head,
.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dataset-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dataset-meta,
.meta-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dataset-link,
.back-link {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(201, 255, 79, 0.9);
  text-underline-offset: 4px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 4px 12px rgba(18, 19, 26, 0.16);
}

.summary-banner {
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(201, 255, 79, 0.15), rgba(57, 213, 255, 0.08));
  border: 1px solid rgba(18, 19, 26, 0.06);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(18, 19, 26, 0.02);
  position: relative;
  overflow: hidden;
}

.summary-banner::before {
  content: '📊';
  font-size: 3rem;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.12;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.metric-grid,
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-box,
.flow-stat {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(18, 19, 26, 0.08);
}

.metric-box .metric-label,
.flow-stat span,
.tiny,
.unique-count {
  display: block;
  color: var(--muted-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value,
.flow-stat strong,
.value {
  display: block;
  margin-top: 6px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
}

.spark-bars,
.stat-bar {
  height: 96px;
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}

.hist-bar,
.sparkline span,
.stat-bar span {
  flex: 1;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, var(--ink), #3d4152);
}

.spark-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.categorical-list,
.insight-list,
.suggestion-list,
.recommendation-grid {
  display: grid;
  gap: 12px;
}

.categorical-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.categorical-track,
.radar-bar,
.dataset-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(18, 19, 26, 0.08);
  overflow: hidden;
}

.categorical-fill,
.radar-fill,
.dataset-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-4));
}

.preview-table {
  margin-top: 14px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(255, 255, 255, 0.85);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(18, 19, 26, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: rgba(255, 253, 248, 0.96);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.input,
.select {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 12px 14px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.68);
  border: 1px dashed rgba(18, 19, 26, 0.14);
}

.flow-card {
  position: relative;
  padding: 24px;
  width: min(100%, 420px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 18%, rgba(201, 255, 79, 0.22), transparent 28%),
    radial-gradient(circle at 80% 72%, rgba(57, 213, 255, 0.18), transparent 26%),
    rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-strong);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.flow-stat strong {
  font-size: 1.22rem;
}

.topbar,
.panel,
.card,
.feature,
.dataset-card,
.compare-card,
.metric,
.insight-card,
.recommendation-card,
.upload-copy,
.upload-side,
.upload-zone {
  backdrop-filter: blur(12px);
}

.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.detail-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .upload-hero,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner,
  .section-heading,
  .detail-top,
  .dataset-head,
  .compare-top,
  .metric-head,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 40px;
  }
}

@media (max-width: 640px) {
  .shell,
  .topbar-inner {
    width: min(100% - 20px, 1240px);
  }

  .proof-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .upload-copy,
  .upload-side,
  .upload-zone,
  .feature,
  .panel,
  .metric,
  .dataset-card,
  .compare-card,
  .insight-card,
  .recommendation-card {
    padding: 16px;
    border-radius: 22px;
  }

  .upload-side-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 12px 10px;
  }
}

/* Quality Scan & Warnings Badge/Panel */
.warnings-panel {
  border-left: 5px solid var(--accent-2) !important;
  background: linear-gradient(180deg, rgba(255, 122, 89, 0.05), rgba(255, 255, 255, 0.8));
}
.success-panel {
  border-left: 5px solid #2ecc71 !important;
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.05), rgba(255, 255, 255, 0.8));
}
.warning-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(18, 19, 26, 0.05);
}
.warning-alert-item.danger {
  border-left: 3px solid #e74c3c;
}
.warning-alert-item.warning {
  border-left: 3px solid #f39c12;
}
.warning-alert-item.info {
  border-left: 3px solid #3498db;
}
.warning-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}
.warning-badge.danger { background: #e74c3c; }
.warning-badge.warning { background: #f39c12; }
.warning-badge.info { background: #3498db; }

/* SVG Box Plot Visualization */
.boxplot-container {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(18, 19, 26, 0.06);
}
.boxplot-title {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.boxplot-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 4px;
}
.outlier-dot {
  cursor: pointer;
  transition: r 120ms ease, fill 120ms ease;
}
.outlier-dot:hover {
  r: 5.5;
  fill: #ff3333;
}

/* SVG Histogram Visualization */
.histogram-container {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(18, 19, 26, 0.06);
}
.hist-rect {
  transition: opacity 120ms ease, fill 120ms ease;
  cursor: pointer;
}
.hist-rect:hover {
  opacity: 1;
  fill: var(--accent-4);
}
.histogram-scale {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 4px;
}

/* Correlations Heatmap Styling */
.heatmap-table {
  border-collapse: separate;
  border-spacing: 3px;
  margin: 0 auto;
}
.heatmap-table th, .heatmap-table td {
  border: none !important;
  text-align: center !important;
  padding: 0 !important;
}
.heatmap-header-cell {
  height: 90px;
  vertical-align: bottom;
  padding-bottom: 8px !important;
  min-width: 65px;
}
.rotate-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  margin: 0 auto;
}
.heatmap-label-cell {
  text-align: right !important;
  padding-right: 15px !important;
  font-size: 11px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heatmap-cell {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.heatmap-cell:hover {
  transform: scale(1.12);
  z-index: 10;
  filter: brightness(0.95);
}
.legend-gradient {
  flex-grow: 1;
  height: 12px;
  border-radius: 999px;
  margin: 0 15px;
  background: linear-gradient(90deg, hsl(215, 80%, 55%), #efefef, hsl(16, 85%, 55%));
  border: 1px solid rgba(18, 19, 26, 0.08);
}

/* Bivariate Scatter Plot Layout */
.scatterplot-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 15px;
}
.scatterplot-svg-wrap {
  background: #fff;
  background-color: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.scatter-point {
  transition: r 120ms ease, fill 120ms ease, opacity 120ms ease;
  cursor: pointer;
}
.scatter-point:hover {
  r: 7.5;
  fill: var(--accent-4);
  opacity: 1;
}
.select-input {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

/* Column tabs container */
.column-tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px;
  margin: 15px 0 20px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.column-tabs-container::-webkit-scrollbar {
  height: 4px;
}
.column-tabs-container::-webkit-scrollbar-thumb {
  background: var(--muted-2);
  border-radius: 2px;
}

/* Individual column tab button */
.column-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 160ms ease;
}
.column-tab:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}
.column-tab.active {
  background: var(--accent);
  color: var(--ink);
  border-color: rgba(18, 19, 26, 0.15);
  box-shadow: 0 4px 12px rgba(201, 255, 79, 0.25);
}

/* Col type dot indicator */
.col-type-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.col-type-dot.numeric {
  background: #3498db;
}
.col-type-dot.categorical {
  background: #e67e22;
}

/* Split card layout for full-width metrics */
.single-metric-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .single-metric-layout {
    grid-template-columns: 1fr;
  }
}

/* Print/Export Styling */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .hide-on-print {
    display: none !important;
  }
  .panel {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .stats-grid {
    display: block !important;
  }
  .metric {
    page-break-inside: avoid !important;
    border: 1px solid #ddd !important;
    margin-bottom: 20px !important;
    background: #fff !important;
  }
  .detail-panel {
    box-shadow: none !important;
  }
}

/* Spinner Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
