:root {
  --accent: #7cc242;
  --ink: #141414;
  --muted: #5f665d;
  --soft: #f7f8f4;
  --mist: #eef3f1;
  --line: #e1e5dd;
  --dark: #0b0f0c;
  --white: #ffffff;
  background: var(--soft);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--soft); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

.page { min-height: 100vh; overflow: hidden; }
.wrap { width: min(1152px, calc(100% - 48px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  width: 100%;
  height: 100%;
  padding: 0 clamp(24px, 4vw, 64px);
}

.brand { justify-self: start; }
.brand img { width: 99px; height: auto; }
.nav-links { display: flex; gap: 30px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: 14px; }
.nav-label { color: var(--muted); font-size: 13px; font-weight: 600; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(124, 194, 66, .35); outline-offset: 2px; }
.button.light { border-color: #cfd5cc; background: transparent; color: var(--ink); }
.button.accent { border-color: var(--accent); background: var(--accent); color: #071006; }
.button:disabled { cursor: not-allowed; opacity: .36; transform: none; }
.nav-button { min-height: 40px; padding: 0 18px; font-size: 13px; }

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .18)),
    radial-gradient(circle at 83% 18%, rgba(124, 194, 66, .14), transparent 31%),
    var(--soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .78fr);
  gap: 64px;
  align-items: center;
  padding: 72px 0 62px;
}

.eyebrow {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  max-width: 690px;
  margin: 18px 0 0;
  font-size: clamp(50px, 5.3vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 30px; }

.transport-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}

.transport-summary div { min-height: 90px; padding: 18px; border-right: 1px solid var(--line); }
.transport-summary div:last-child { border-right: 0; }
.transport-summary strong { display: block; font-size: 15px; line-height: 1.2; }
.transport-summary span { display: block; margin-top: 8px; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 12px; }

.console {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 26px 80px rgba(20, 20, 20, .09);
}

.console-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.console h2 { margin: 10px 0 0; font-size: 25px; line-height: 1.18; }

.status {
  flex: none;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 20, 20, .07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
}

.status[data-state="connected"] { background: rgba(124, 194, 66, .15); color: #3f7219; }
.status[data-state="negotiating"], .status[data-state="fetching-credentials"] { background: rgba(204, 154, 43, .15); color: #8a6210; }

.connection-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.connection-meta span {
  padding: 7px 9px;
  border-radius: 3px;
  background: var(--soft);
  color: var(--muted);
  font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.api-key-field { margin-top: 20px; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.field-heading label { color: var(--ink); font-size: 12px; font-weight: 700; }
.field-heading span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.secret-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; }
.secret-input input {
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  outline: none;
  background: var(--soft);
  color: var(--ink);
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.secret-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 194, 66, .14); }
.secret-input button {
  min-width: 58px;
  border: 1px solid var(--line);
  border-radius: 0 4px 4px 0;
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.api-key-field p { margin: 8px 0 0; color: var(--muted); font: 11px/1.5 "DM Sans", system-ui, sans-serif; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 18px; }
.options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.options input { margin-top: 2px; accent-color: var(--accent); }
.options small { display: block; margin-top: 3px; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 10px; font-weight: 500; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.actions .button { min-height: 42px; padding: 0 16px; font-size: 12px; }

audio { width: 100%; height: 36px; margin: 20px 0; opacity: .7; }
.text-turn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.text-turn input {
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: var(--soft);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
}
.text-turn input::placeholder { color: #8d958a; }
.text-turn input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 194, 66, .14); }
.text-turn .button { min-height: 44px; padding: 0 18px; font-size: 12px; }

details { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
summary { color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; }
.connection-diagnostics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--line);
}
.connection-diagnostics div { min-width: 0; padding: 10px; background: var(--soft); }
.connection-diagnostics dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.connection-diagnostics dd {
  margin: 5px 0 0;
  color: var(--ink);
  font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.event-log { max-height: 220px; overflow: auto; margin-top: 12px; }
.event-log div { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.architecture-section { padding: 76px 0; border-bottom: 1px solid var(--line); background: var(--white); }
.section-head { display: grid; grid-template-columns: minmax(0, .82fr) minmax(320px, .62fr); gap: 54px; align-items: end; margin-bottom: 38px; }
.section-head h2 { max-width: 650px; margin: 14px 0 0; font-size: 42px; line-height: 1.12; }
.section-copy { margin: 0; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.72; }

.transport-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.transport-grid article { min-height: 230px; padding: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.card-number { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 32px; border: 1px solid rgba(124, 194, 66, .28); border-radius: 8px; background: rgba(124, 194, 66, .12); color: var(--accent); font-size: 12px; font-weight: 800; }
.transport-grid h3 { margin: 10px 0 0; font-size: 20px; line-height: 1.24; }
.transport-grid article > p:last-child { margin: 12px 0 0; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 14px; line-height: 1.62; }
code { color: #4f861f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

aside { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--mist); }
.aside-mark { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent); color: #071006; font-size: 13px; font-weight: 800; }
aside p { margin: 1px 0 0; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 13px; line-height: 1.6; }
aside strong { color: var(--ink); }

.source-section { padding: 64px 0; background: var(--dark); color: var(--white); }
.source-panel { display: grid; grid-template-columns: minmax(0, .9fr) minmax(390px, .72fr); gap: 58px; align-items: center; }
.source-panel h2 { max-width: 590px; margin: 14px 0 0; font-size: 42px; line-height: 1.12; }
.source-panel p:last-child { max-width: 620px; margin: 18px 0 0; color: rgba(255, 255, 255, .58); font-family: "DM Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.7; }
.source-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.source-actions code { display: block; width: 100%; padding: 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 4px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .72); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }

footer { padding: 40px 0; background: var(--soft); }
.footer-inner { display: grid; grid-template-columns: 92px minmax(0, 1fr) max-content; align-items: start; gap: 28px; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: 13px; }
.footer-inner img { width: 82px; }
.footer-inner p { margin: 0; }
.footer-inner > a:last-child { font-weight: 600; white-space: nowrap; }
.footer-links { display: flex; gap: 20px; font-weight: 600; white-space: nowrap; }

@media (max-width: 960px) {
  .nav-links, .nav-label { display: none; }
  .nav-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-actions { grid-column: 2; }
  .hero-grid, .section-head, .source-panel { grid-template-columns: 1fr; }
  .hero-grid { padding-top: 52px; }
  .console { max-width: 620px; }
  .transport-grid { grid-template-columns: 1fr 1fr; }
  .transport-grid article:last-child { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 92px minmax(0, 1fr); }
  .footer-links { grid-column: 2; }
}

@media (max-width: 640px) {
  .wrap { width: min(1152px, calc(100% - 32px)); }
  .nav { height: 66px; }
  .nav-inner { padding: 0 16px; }
  .brand img { width: 88px; }
  .nav-button { min-height: 38px; padding: 0 14px; }
  .hero-grid, .architecture-section { padding-top: 44px; padding-bottom: 44px; }
  h1 { font-size: 42px; }
  .transport-summary { grid-template-columns: 1fr; }
  .transport-summary div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .transport-summary div:last-child { border-bottom: 0; }
  .console { padding: 22px; }
  .console-header { align-items: center; }
  .options, .transport-grid { grid-template-columns: 1fr; }
  .transport-grid article:last-child { grid-column: auto; }
  .actions .button { flex: 1 1 auto; }
  .text-turn { grid-template-columns: 1fr; }
  .connection-diagnostics { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 30px; }
  .footer-inner { grid-template-columns: 1fr; }
  .source-panel h2 { font-size: 30px; }
  .footer-links { grid-column: auto; }
}
