:root {
  color-scheme: light;
  --bg: #f2f0e8;
  --surface: rgba(255, 255, 252, 0.84);
  --ink: #101714;
  --muted: #66706a;
  --line: rgba(16, 23, 20, 0.14);
  --green: #176c4b;
  --green-2: #2c9b6b;
  --green-soft: #dcebe2;
  --coral: #df6438;
  --coral-soft: #f7ded2;
  --shadow: 0 24px 80px rgba(34, 47, 39, 0.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, rgba(223, 100, 56, 0.14), transparent 28rem),
    radial-gradient(circle at 5% 46%, rgba(23, 108, 75, 0.10), transparent 32rem),
    var(--bg);
}
button, input, select { font: inherit; }
a { color: inherit; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 54px; }
.nav { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 850; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--ink); color: white; font: italic 700 18px Georgia, serif; }
.nav-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 13px; font-weight: 750; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.version { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; font: 11px ui-monospace, monospace; }

.hero { padding: 76px 0 54px; }
.eyebrow, .micro-label { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 930px; margin: 0; font: 500 clamp(52px, 8vw, 94px)/.94 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
h1 em { color: var(--green); font-weight: inherit; }
.hero-copy { max-width: 680px; margin: 26px 0 20px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.privacy-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 5px rgba(44, 155, 107, .12); }

.studio { display: grid; grid-template-columns: 390px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.control-panel { padding: 30px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .35); }
.dictation-panel { min-height: 650px; padding: 30px; }
.panel-heading, .dictation-topline, .output-heading, .benchmark-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading a { color: var(--green); font-size: 11px; font-weight: 800; text-decoration: none; }
h2 { margin: 0; font: 500 29px/1.1 Georgia, serif; letter-spacing: -.035em; }

label > span { display: block; margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.key-field { display: block; margin-top: 25px; }
.input-wrap { position: relative; }
input, select { width: 100%; height: 45px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .78); color: var(--ink); padding: 0 12px; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 108, 75, .09); }
.input-wrap input { padding-right: 58px; font-family: ui-monospace, monospace; }
.input-wrap button { position: absolute; inset: 5px 5px 5px auto; border: 0; border-radius: 8px; background: var(--green-soft); color: var(--green); cursor: pointer; font-size: 11px; font-weight: 850; }
.key-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.key-note code { color: var(--ink); }
.divider { height: 1px; margin: 26px 0; background: var(--line); }
.setting-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 11px; margin-top: 19px; }
.context-field { display: block; margin-top: 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 16px 0 0; border-top: 1px solid var(--line); }
.switch-row span { margin: 0; text-transform: none; letter-spacing: 0; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { color: var(--ink); font-size: 13px; }
.switch-row strong i { margin-left: 5px; padding: 3px 6px; border-radius: 999px; background: var(--coral-soft); color: #a9421d; font: normal 800 8px/1 ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.switch-row small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.switch-row input { width: 38px; height: 21px; accent-color: var(--green); }
.live-switch { margin-top: 12px; }

.dictation-topline time { font: 500 28px/1 ui-monospace, monospace; letter-spacing: -.05em; }
.state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; font-weight: 750; }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); }
.visualizer { height: 130px; display: flex; align-items: center; justify-content: center; gap: 7px; margin: 22px 0; }
.visualizer span { display: block; width: 5px; height: 16px; border-radius: 8px; background: rgba(23, 108, 75, .23); }
.visualizer.active span { background: var(--green); animation: wave .75s ease-in-out infinite alternate; }
.visualizer span:nth-child(2n) { animation-delay: -.18s; }
.visualizer span:nth-child(3n) { animation-delay: -.36s; }
.visualizer span:nth-child(4n) { animation-delay: -.54s; }
@keyframes wave { from { height: 11px; } to { height: 80px; } }

.record-button { width: 100%; height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border: 0; border-radius: 16px; background: var(--ink); color: white; cursor: pointer; font-weight: 850; }
.record-button > i { justify-self: end; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.record-button kbd { justify-self: end; margin-right: 14px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.23); border-radius: 6px; color: rgba(255,255,255,.65); font: 10px ui-monospace, monospace; }
.record-button.recording { background: var(--coral); }
.record-button.recording > i { border-radius: 2px; }
.record-button:disabled { opacity: .6; cursor: wait; }
.notice { min-height: 20px; margin: 11px 0 28px; color: var(--muted); font-size: 11px; text-align: center; }
.notice.error { color: #a9421d; }
.output-heading { align-items: end; padding-top: 25px; border-top: 1px solid var(--line); }
.text-button { border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 850; }
.text-button:disabled { opacity: .35; cursor: default; }
.output { min-height: 145px; padding: 23px 0 18px; white-space: pre-wrap; font: 400 19px/1.62 Georgia, serif; }
.output.empty { color: #949b97; }
.output.streaming { color: var(--ink); }
.output.streaming::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 5px; vertical-align: -.12em; background: var(--green); animation: live-cursor .9s steps(1) infinite; }
@keyframes live-cursor { 50% { opacity: 0; } }
details { padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); }
summary { cursor: pointer; font-size: 11px; font-weight: 800; }
pre { white-space: pre-wrap; font: 11px/1.55 ui-monospace, monospace; }

.benchmark { margin-top: 18px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.benchmark-heading { align-items: end; }
.benchmark-heading > strong { color: var(--green); font: 750 13px ui-monospace, monospace; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 27px; }
.metric { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 9px; }
.metric span { color: var(--muted); font-size: 11px; font-weight: 750; }
.metric b { font: 650 12px ui-monospace, monospace; }
.metric div { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 10px; background: rgba(16,23,20,.07); }
.metric i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.metric.accent i { background: var(--coral); }
.run-meta { margin: 20px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1.5 ui-monospace, monospace; }

.code-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: center; margin-top: 18px; padding: 36px; border-radius: 24px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.code-card p:not(.micro-label) { max-width: 400px; color: rgba(255,255,255,.6); font-size: 13px; line-height: 1.55; }
.code-card .micro-label { color: #7ad1aa; }
.code-card pre { margin: 0; padding: 22px; overflow-x: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.055); color: #d9eee5; }
.code-card code { font: 12px/1.75 ui-monospace, monospace; }
.code-card code span { color: #ef9a77; }
footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px 3px 0; color: var(--muted); font-size: 10px; }

@media (max-width: 860px) {
  .page-shell { width: min(100% - 24px, 650px); }
  .hero { padding-top: 52px; }
  .studio { grid-template-columns: 1fr; }
  .control-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .dictation-panel { min-height: 590px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .code-card { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 520px) {
  .nav-links a { display: none; }
  h1 { font-size: 48px; }
  .hero-copy { font-size: 16px; }
  .control-panel, .dictation-panel, .benchmark, .code-card { padding: 22px; }
  .setting-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .visualizer.active span, .output.streaming::after { animation: none; }
  .metric i { transition: none; }
}
