@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #181b20;
  --surface: #1d2127;
  --surface-raised: #20252c;
  --text: #f1f3f5;
  --muted: #9ca4ae;
  --line: rgba(255, 255, 255, 0.07);
  --accent: #80e7bd;
  --accent-2: #72a9ff;
  --shadow-dark: #0d0f12;
  --shadow-light: #292f38;
  --soft-shadow: 12px 12px 26px var(--shadow-dark), -10px -10px 24px var(--shadow-light);
  --inset-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  --radius: 24px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #e8edf1;
  --surface: #e8edf1;
  --surface-raised: #edf2f5;
  --text: #20252b;
  --muted: #66717d;
  --line: rgba(32, 37, 43, 0.08);
  --accent: #087f67;
  --accent-2: #356fc4;
  --shadow-dark: #c4c9cd;
  --shadow-light: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.65;
  transition: background-color 250ms ease, color 250ms ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  box-shadow: 7px 7px 16px var(--shadow-dark), -5px -5px 14px var(--shadow-light);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  color: var(--bg);
  border-radius: 10px;
  background: var(--accent);
  font-size: .9rem;
}
nav { display: flex; gap: clamp(18px, 3vw, 40px); color: var(--muted); font-size: .84rem; }
nav a:hover { color: var(--text); }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text);
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
  cursor: pointer;
}
.theme-toggle:active { box-shadow: var(--inset-shadow); }

main { overflow: hidden; }
.hero, .content-section, .motivation { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.hero {
  position: relative;
  min-height: 690px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 100px 0 120px;
}
.eyebrow, .section-number, .card-index, .criteria-top, .architecture-number, .coming-soon {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: .75rem; }
.eyebrow span { width: 26px; height: 1px; background: var(--accent); }
h1 {
  max-width: 980px;
  margin: 24px 0;
  font-size: clamp(2.65rem, 6vw, 5.7rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.hero-copy { max-width: 710px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.primary-action {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  margin-top: 42px;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 7px 7px 16px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  font-size: .9rem;
  font-weight: 700;
}
.primary-action:hover { color: var(--accent); transform: translateY(-2px); }
.signal { position: absolute; right: 0; bottom: 90px; display: flex; align-items: center; gap: 5px; opacity: .32; }
.signal i { display: block; width: 3px; height: calc(15px + var(--n, 1) * 5px); border-radius: 4px; background: var(--accent); }
.signal i:nth-child(3n) { height: 70px; } .signal i:nth-child(4n) { height: 36px; }
.signal i:nth-child(5n) { height: 92px; } .signal i:nth-child(7n) { height: 54px; }

.motivation { padding: 140px 0 115px; scroll-margin-top: 100px; }
.motivation-heading { max-width: 760px; margin-bottom: 42px; }
.motivation-heading .section-number { margin-bottom: 17px; }
.motivation-heading h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); }
.motivation-heading > p:last-child { max-width: 620px; color: var(--muted); }
.example-prompt { position: relative; z-index: 1; width: min(680px, calc(100% - 40px)); margin: 0 auto -24px; padding: 20px 28px; border-radius: 17px; background: var(--surface); box-shadow: var(--soft-shadow); text-align: center; }
.example-prompt span, .example-state, .example-note { font-family: "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.example-prompt span { color: var(--accent); font-size: .62rem; }
.example-prompt p { margin: 5px 0 0; font-size: clamp(.95rem, 2vw, 1.15rem); font-weight: 700; }
.example-comparison { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 24px; }
.example-card { min-width: 0; min-height: 390px; display: flex; flex-direction: column; padding: 60px 34px 32px; }
.example-state { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; color: var(--muted); font-size: .62rem; }
.example-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.negative-example .example-dot { background: #f18b8b; box-shadow: 0 0 12px #f18b8b; }
.example-audio { align-self: flex-start; margin-top: 18px; padding: 10px 13px; border: 0; border-radius: 11px; background: var(--surface); color: var(--text); box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light); cursor: pointer; font-size: .72rem; }
.example-audio:hover, .example-audio.playing { color: var(--accent); }
.example-audio.playing { box-shadow: var(--inset-shadow); }
.negative-example .example-audio:hover,
.negative-example .example-audio.playing { color: #f18b8b; }
.mini-signal { height: 55px; display: flex; align-items: center; gap: 4px; margin: 20px 0; }
.mini-signal i { width: 3px; height: 18px; border-radius: 4px; background: var(--accent); }
.mini-signal i:nth-child(2n) { height: 38px; }
.mini-signal i:nth-child(3n) { height: 26px; }
.mini-signal.irregular i { background: #f18b8b; }
.mini-signal.irregular i:nth-child(2n) { height: 50px; }
.mini-signal.irregular i:nth-child(3n) { height: 12px; }
.example-response { min-height: 78px; max-height: 145px; margin-bottom: 0; padding-right: 8px; overflow-y: auto; overflow-wrap: anywhere; color: var(--muted); font-size: .88rem; scrollbar-width: thin; }
.example-verdict { display: inline-block; margin-top: 12px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 99px; color: var(--accent); font-size: .68rem; }
.negative-example .example-verdict { border-color: color-mix(in srgb, #f18b8b 38%, transparent); color: #f18b8b; }
.comparison-mark { color: var(--muted); font-family: "DM Mono", monospace; font-size: 1.6rem; }
.example-note { margin-top: 24px; color: var(--muted); text-align: center; font-size: .57rem; }

.content-section { padding: 115px 0; scroll-margin-top: 100px; }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; column-gap: 60px; margin-bottom: 62px; }
.section-number { grid-row: span 2; margin: 10px 0 0; color: var(--accent); font-size: .72rem; }
h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.1; letter-spacing: -.04em; }
.section-heading > p:last-child { max-width: 650px; margin: 20px 0 0; color: var(--muted); }
.card-grid { display: grid; gap: 28px; }
.three-up { grid-template-columns: repeat(3, 1fr); }
.soft-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}
.cue-card { position: relative; min-height: 390px; padding: 34px; }
.card-index { position: absolute; top: 28px; right: 30px; color: var(--muted); font-size: .7rem; }
.card-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 58px;
  border-radius: 20px;
  color: var(--accent);
  box-shadow: var(--inset-shadow);
  font-family: "DM Mono", monospace;
  font-size: 1.15rem;
}
.waveform-icon { font-size: 2.2rem; }
h3 { margin: 0 0 4px; font-size: 1.35rem; line-height: 1.3; }
.cue-card p, .criteria-card p, .architecture-card p, .demo-placeholder > p { color: var(--muted); }
.cue-card .card-kicker { margin: 4px 0 20px; color: var(--accent); font-size: .82rem; font-weight: 700; }
.section-callout { margin: 64px auto 0; text-align: center; color: var(--muted); font-size: clamp(1rem, 2vw, 1.3rem); }
.section-callout span { padding: 0 12px; color: var(--accent); }

.criteria-card { padding: 34px; }
.criteria-top { display: flex; align-items: center; gap: 10px; margin-bottom: 50px; color: var(--muted); font-size: .67rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.criteria-card h3 { font-size: 2rem; }
.criterion { margin-top: 28px; padding: 18px; border-radius: 14px; box-shadow: var(--inset-shadow); color: var(--text); font-size: .82rem; }

.architecture-list { display: grid; gap: 30px; }
.architecture-card { display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; gap: 55px; padding: 38px 42px; }
.architecture-copy { position: relative; padding-left: 56px; }
.architecture-number { position: absolute; left: 0; top: 3px; color: var(--accent); font-size: .7rem; }
.architecture-copy p { margin-bottom: 0; }
.pipeline { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pipeline span { padding: 12px 15px; border-radius: 12px; box-shadow: var(--inset-shadow); text-align: center; font-family: "DM Mono", monospace; font-size: .71rem; }
.pipeline b { color: var(--accent); font-weight: 400; }

.demo-section { padding-bottom: 150px; }
.content-warning { display: flex; align-items: center; gap: 16px; margin: -18px 0 34px; padding: 17px 20px; border: 1px solid color-mix(in srgb, #f1ad75 32%, transparent); border-radius: 16px; background: var(--surface); box-shadow: 6px 6px 14px var(--shadow-dark), -5px -5px 12px var(--shadow-light); }
.warning-icon { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #f1ad75; box-shadow: var(--inset-shadow); font-family: "DM Mono", monospace; font-weight: 700; }
.content-warning p { margin: 0; color: var(--muted); font-size: .78rem; }
.content-warning strong { color: #f1ad75; }
.demo-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.demo-tab { padding: 18px; border: 0; border-radius: 15px; background: var(--surface); color: var(--muted); box-shadow: 6px 6px 14px var(--shadow-dark), -5px -5px 12px var(--shadow-light); cursor: pointer; font-weight: 700; }
.demo-tab:hover { color: var(--text); }
.demo-tab.active { color: var(--accent); box-shadow: var(--inset-shadow); }
.demo-panel { min-height: 560px; overflow: hidden; }
.demo-panel[hidden] { display: none !important; }
#safety-panel { display: grid; grid-template-columns: 1.15fr .85fr; }
.task-panel { display: grid; grid-template-columns: 1.15fr .85fr; }
.demo-workspace { padding: 44px; }
.demo-step { position: relative; padding: 0 0 38px 52px; }
.demo-step + .demo-step { padding-top: 38px; border-top: 1px solid var(--line); }
.step-number { position: absolute; left: 0; top: 3px; color: var(--accent); font-family: "DM Mono", monospace; font-size: .72rem; }
.step-label { margin: 0 0 4px; color: var(--accent); font-family: "DM Mono", monospace; font-size: .67rem; letter-spacing: .1em; text-transform: uppercase; }
.demo-step h3 { font-size: 1.55rem; }
.demo-step p { margin-top: 8px; color: var(--muted); font-size: .85rem; }
.fixed-audio { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 22px; }
.control-select { width: 100%; padding: 14px 42px 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--inset-shadow); font: inherit; font-size: .78rem; }
.control-select:disabled { color: var(--muted); cursor: not-allowed; opacity: .58; }
.play-fixed-audio { padding: 13px 16px; border: 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light); cursor: pointer; }
.play-fixed-audio:disabled { opacity: .35; cursor: not-allowed; }
.play-task-audio { width: 100%; margin-top: 18px; padding: 14px 16px; border: 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light); cursor: pointer; }
.play-task-audio:disabled { opacity: .35; cursor: not-allowed; }
.task-settings { margin-top: 22px; }
#robustness-audio { margin-top: 22px; }
.model-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-top: 22px; }
.model-grid input { position: absolute; opacity: 0; }
.model-grid label span { display: block; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .78rem; }
.model-grid label span small { display: block; color: var(--muted); font-family: "DM Mono", monospace; font-size: .58rem; text-transform: uppercase; }
.model-grid input:checked + span { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--inset-shadow); }
.model-grid input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.run-demo { display: flex; justify-content: space-between; width: 100%; padding: 16px 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--bg); cursor: pointer; font-weight: 800; }
.run-demo:disabled { opacity: .35; cursor: not-allowed; }
.form-message { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: .75rem; }
.model-output { min-width: 0; display: grid; place-items: center; padding: 44px; border-left: 1px solid var(--line); background: var(--surface-raised); }
.output-idle, .processing { text-align: center; color: var(--muted); }
.output-symbol { display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 24px; color: var(--accent); box-shadow: var(--inset-shadow); font-size: 2rem; }
.processing-route { display: flex; align-items: center; gap: 10px; }
.processing-route span { padding: 11px; border-radius: 11px; box-shadow: var(--inset-shadow); font-family: "DM Mono", monospace; font-size: .65rem; }
.processing-route i { width: 28px; height: 2px; background: var(--accent); animation: pulse 700ms ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .2; transform: scaleX(.6); } }
.response-card { width: 100%; min-width: 0; }
.response-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .66rem; text-transform: uppercase; }
.response-status { margin-top: 42px; color: var(--accent); font-size: .78rem; font-weight: 700; }
.response-status span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.response-text { max-height: 340px; margin: 20px 0; padding: 22px; overflow-x: hidden; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; border-radius: 16px; box-shadow: var(--inset-shadow); font-size: .9rem; line-height: 1.65; scrollbar-width: thin; }
.simulation-note { color: var(--muted); font-size: .68rem; }
.reset-demo { margin-top: 20px; padding: 11px 14px; border: 0; border-radius: 11px; background: var(--surface); color: var(--text); box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light); cursor: pointer; }
.cue-interface { display: grid; grid-template-columns: 1.15fr .85fr; padding: 0; }
.cue-interface > :not(.task-output) { grid-column: 1; margin-inline: 44px; }
.cue-intro { max-width: 700px; margin-top: 44px; margin-bottom: 30px; padding-left: 52px; position: relative; }
.cue-intro::before { content: "01"; position: absolute; left: 0; top: 5px; color: var(--accent); font-family: "DM Mono", monospace; font-size: .72rem; }
.cue-intro h3 { margin-top: 22px; font-size: clamp(1.8rem, 3vw, 3rem); }
.cue-intro p { color: var(--muted); }
.control-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.control-grid label, .wide-control { color: var(--muted); font-size: .72rem; }
.control-grid select, .wide-control select { display: block; margin-top: 8px; }
.wide-control { display: block; max-width: 600px; margin-bottom: 30px; }
.secondary-action { margin-top: 26px; }
.cue-summary { margin-top: 28px; padding: 20px; border-radius: 15px; box-shadow: var(--inset-shadow); color: var(--muted); font-size: .78rem; }
.compact-runner { position: relative; display: grid; grid-template-columns: 1fr; align-items: end; gap: 16px; margin-top: 32px; padding: 38px 0 0 52px; border-top: 1px solid var(--line); }
.compact-runner::before { content: "02"; position: absolute; left: 0; top: 42px; color: var(--accent); font-family: "DM Mono", monospace; font-size: .72rem; }
.compact-runner label { color: var(--muted); font-size: .72rem; }
.compact-runner select { display: block; margin-top: 8px; }
.run-task { width: 100%; display: flex; justify-content: space-between; padding: 15px 18px; border: 0; border-radius: 12px; background: var(--accent); color: var(--bg); cursor: pointer; font-weight: 800; }
.run-task:disabled { opacity: .35; cursor: not-allowed; }
.task-output { grid-column: 2; grid-row: 1 / span 8; min-height: 100%; display: grid; align-items: center; margin: 0; padding: 44px; border-left: 1px solid var(--line); background: var(--surface-raised); }
.task-output-idle, .task-processing { color: var(--muted); text-align: center; font-size: .8rem; }
.task-processing i { display: block; width: 90px; height: 2px; margin: 16px auto 0; background: var(--accent); animation: pulse 700ms ease-in-out infinite alternate; }
.task-result .response-status { margin-top: 24px; }
.task-response-text { min-height: 50px; margin: 15px 0; font-size: .95rem; }
.typing-caret::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -.15em; background: var(--accent); animation: blink .65s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.perturbation-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; border: 0; }
.perturbation-groups legend { margin-bottom: 14px; color: var(--muted); font-size: .72rem; padding-top: 20px;}
.perturbation-groups input { position: absolute; opacity: 0; }
.perturbation-groups span { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .75rem; }
.perturbation-groups small { display: block; color: var(--muted); font-family: "DM Mono", monospace; font-size: .6rem; }
.perturbation-groups input:checked + span { color: var(--accent); border-color: var(--accent); box-shadow: var(--inset-shadow); }
.coming-soon { margin-top: 16px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 99px; color: var(--accent); font-size: .62rem; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 32px max(30px, calc((100% - 1120px) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
footer .brand { color: var(--text); }

@media (max-width: 850px) {
  nav { display: none; }
  .hero { min-height: 620px; }
  .signal { right: -40px; opacity: .15; }
  .section-heading { display: block; }
  .section-number { margin-bottom: 18px; }
  .three-up { grid-template-columns: 1fr; }
  .example-comparison { grid-template-columns: 1fr; }
  .comparison-mark { text-align: center; }
  .example-card { min-height: 310px; }
  .cue-card { min-height: 330px; }
  .architecture-card { grid-template-columns: 1fr; }
  .pipeline { justify-content: flex-start; flex-wrap: wrap; }
  #safety-panel { grid-template-columns: 1fr; }
  .task-panel { grid-template-columns: 1fr; }
  .cue-interface { grid-template-columns: 1fr; }
  .cue-interface > :not(.task-output) { margin-inline: 28px; }
  .task-output { grid-column: 1; grid-row: auto; min-height: 380px; margin-top: 38px; border-left: 0; border-top: 1px solid var(--line); }
  .model-output { min-height: 380px; border-left: 0; border-top: 1px solid var(--line); }
  .perturbation-groups { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .site-header { width: calc(100% - 24px); }
  .theme-label { display: none; }
  .hero, .content-section, .motivation { width: calc(100% - 32px); }
  .hero { padding-top: 80px; }
  h1 { font-size: 2.55rem; }
  .content-section { padding: 85px 0; }
  .cue-card, .criteria-card, .architecture-card, .demo-workspace, .model-output { padding: 28px; }
  .demo-tabs { gap: 8px; }
  .demo-tab { padding: 13px 8px; font-size: .8rem; }
  .demo-step { padding-left: 0; }
  .step-number { position: static; display: block; margin-bottom: 8px; }
  .model-grid { grid-template-columns: 1fr; }
  .fixed-audio, .control-grid { grid-template-columns: 1fr; }
  .compact-runner { grid-template-columns: 1fr; }
  .run-task { width: 100%; }
  .cue-interface { padding: 0; }
  .cue-intro { padding-left: 0; }
  .cue-intro::before, .compact-runner::before { position: static; display: block; margin-bottom: 8px; }
  .compact-runner { padding-left: 0; }
  .perturbation-groups { grid-template-columns: 1fr; }
  .architecture-copy { padding-left: 0; padding-top: 30px; }
  .architecture-number { top: 0; }
  .pipeline { gap: 7px; }
  .pipeline span { padding: 10px; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
