:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --surface: #fffaf2;
  --ink: #211b16;
  --muted: #695f55;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --border: #e2d7c8;
  --shadow: 0 24px 70px rgb(55 37 20 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgb(124 58 237 / 16%), transparent 32rem),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 84px 0 48px;
  text-align: center;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 940px;
  margin-right: auto;
  margin-bottom: 18px;
  margin-left: auto;
  font-size: clamp(2rem, 4.1vw, 3.15rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.content-section {
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgb(255 250 242 / 80%);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 52px);
}

.content-section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.content-section h3 {
  margin: 8px 0 12px;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.prompt-block {
  margin: 0 0 20px;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #211b16;
  color: #f4efe6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prompt-block code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.token-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgb(124 58 237 / 5%);
}

.token-example-label {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.token-example code {
  font-size: 0.82rem;
  word-break: break-all;
}

.token-example-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.token-group {
  margin-bottom: 18px;
}

.token-group-label {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.token-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.token-grid code {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}


audio {
  width: 100%;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* Drug tabs */
.drug-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.drug-tab {
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.drug-tab:hover {
  background: var(--surface);
}

.drug-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Drug panel */
.drug-sentence {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.5;
}

.drug-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: capitalize;
  vertical-align: middle;
}

.drug-sentence q {
  quotes: "\201C" "\201D";
  font-style: italic;
  color: var(--muted);
}

/* Reference */
.reference-block {
  margin-bottom: 28px;
  padding: 16px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: rgb(124 58 237 / 4%);
}

.ref-label {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.reference-block audio {
  width: 100%;
  max-width: 480px;
}

/* Group labels */
.group-label {
  margin: 24px 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Model cards */
.model-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf8;
}

.model-card.model-ours {
  border-color: rgb(124 58 237 / 30%);
  background: rgb(124 58 237 / 5%);
}

.model-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.model-name {
  font-size: 1rem;
  font-weight: 650;
}

.model-badge {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.model-avg {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.player-row {
  margin-bottom: 10px;
}

.player-row audio {
  width: 100%;
}

/* Sample buttons */
.sample-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.sample-btn {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}

.sample-btn:hover {
  background: var(--surface);
}

.sample-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.sample-btn.score-good { color: #16a34a; }
.sample-btn.score-ok   { color: #ca8a04; }
.sample-btn.score-bad  { color: #dc2626; }
.sample-btn.active.score-good { background: #16a34a; border-color: #16a34a; color: #fff; }
.sample-btn.active.score-ok   { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.sample-btn.active.score-bad  { background: #dc2626; border-color: #dc2626; color: #fff; }

/* Score + annotation */
.sample-annotation {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.score-badge {
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.score-badge.score-good { background: #dcfce7; color: #15803d; }
.score-badge.score-ok   { background: #fef9c3; color: #a16207; }
.score-badge.score-bad  { background: #fee2e2; color: #b91c1c; }

.heard-as {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

@media (max-width: 780px) {
  .hero {
    padding-top: 64px;
  }

  .drug-tabs {
    flex-wrap: wrap;
  }
}
