:root {
  --bg: #f6f0df;
  --bg-soft: rgba(255, 251, 242, 0.72);
  --surface: rgba(255, 249, 239, 0.92);
  --surface-strong: #fffdf6;
  --line: rgba(46, 72, 58, 0.16);
  --line-strong: rgba(46, 72, 58, 0.28);
  --ink: #14281d;
  --muted: #56685d;
  --accent: #24553a;
  --accent-2: #ac5c2c;
  --chip: #e2eadf;
  --shadow: 0 24px 60px rgba(24, 34, 28, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1360px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(172, 92, 44, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(36, 85, 58, 0.14), transparent 28%),
    linear-gradient(180deg, #f3ead2 0%, #f6f0df 48%, #efe8d6 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 40, 29, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 40, 29, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero,
.table-wrap {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 6px);
  background:
    linear-gradient(145deg, rgba(255, 252, 245, 0.93), rgba(248, 241, 228, 0.88)),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  padding: 32px;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(36, 85, 58, 0.22), transparent 70%);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 700;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

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

.hero h1,
.section-header h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  max-width: none;
  white-space: nowrap;
}

.lede {
  margin: 24px 0 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.18vw, 1.18rem);
  line-height: 1.78;
  color: var(--muted);
}

.hero-note {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  padding: 20px;
}

.hero-note h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
}

.method-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 10px;
  line-height: 1.55;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.dataset-description {
  margin: 10px 0 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.55;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dataset-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.dataset-tab {
  padding: 8px 14px;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

.dataset-tab[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent), #2f6c4a);
  color: #fffef8;
  box-shadow: 0 8px 18px rgba(36, 85, 58, 0.18);
}

select,
input,
button {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #2f6c4a);
  color: #fffef8;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 10px 24px rgba(36, 85, 58, 0.24);
}

button:hover {
  transform: translateY(-1px);
}

.demo-section {
  margin-top: 28px;
}

.section-hint {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  margin-top: 18px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(254, 249, 239, 0.92)),
    var(--surface-strong);
  box-shadow: 0 14px 30px rgba(24, 34, 28, 0.08);
}

.comparison-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid rgba(46, 72, 58, 0.14);
  border-right: 1px solid rgba(46, 72, 58, 0.12);
  padding: 12px 10px;
  vertical-align: top;
}

.comparison-table th:last-child,
.comparison-table td:last-child {
  border-right: 0;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 140px;
}

.comparison-table thead th {
  background: rgba(239, 233, 219, 0.72);
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: normal;
}

.sample-cell {
  width: 140px;
}

.sample-title {
  margin: 0;
  font-size: 1rem;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.sample-meta {
  margin: 6px 0 0;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.3;
}

.player-cell {
  min-width: 0;
}

.play-button {
  min-width: 66px;
  padding: 8px 12px;
}

.play-button.is-playing {
  background: linear-gradient(135deg, #ac5c2c, #d07c43);
  box-shadow: 0 10px 24px rgba(172, 92, 44, 0.28);
}

.hidden-audio {
  display: none;
}

.preview-row[hidden] {
  display: none;
}

.preview-label {
  background: rgba(36, 85, 58, 0.04);
}

.preview-caption {
  font-weight: 800;
}

.preview-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.preview-image {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(36, 85, 58, 0.14);
  background: #f2f2f2;
}

.sample-row.is-active td {
  background: rgba(36, 85, 58, 0.05);
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 18px;
  }

  .hero {
    padding: 18px;
  }

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

  .control-header,
  .section-header {
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.4rem, 14vw, 3.5rem);
  }
}
