:root {
  color-scheme: light;
  --ink: #151622;
  --muted: #6f7180;
  --paper: #f5f3ed;
  --panel: #fffefa;
  --line: #dcd9d0;
  --violet: #5f3df3;
  --violet-dark: #4325c9;
  --lime: #c7ff50;
  --red: #d33d54;
  --shadow: 0 18px 60px rgba(28, 24, 57, 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-height: 100vh; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, monospace; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .17; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100vw - 1180px)/2)); border-bottom: 1px solid var(--line); background: rgba(245, 243, 237, .9); backdrop-filter: blur(18px); position: relative; z-index: 10; }
.brand { display: flex; gap: 10px; align-items: center; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--lime); font-weight: 900; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .16em; margin-top: 4px; }
.topbar nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.topbar nav > a:not(.button):hover { color: var(--violet); }
.user-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; padding: 4px; color: var(--muted); background: transparent; cursor: pointer; }
.link-button:hover { color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 48px; padding: 0 22px; border: 1px solid var(--violet); border-radius: 11px; background: var(--violet); color: white; font-weight: 720; cursor: pointer; transition: .18s ease; }
.button:hover { background: var(--violet-dark); transform: translateY(-1px); box-shadow: 0 9px 25px rgba(95,61,243,.2); }
.button.small { min-height: 38px; padding-inline: 16px; font-size: 13px; }
.button.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.button.secondary:hover { background: white; border-color: var(--ink); box-shadow: none; }
.button.danger { background: transparent; color: var(--red); border-color: #efb8c0; }
.button.danger:hover { color: white; background: var(--red); }
.button.full { width: 100%; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.hero { min-height: 690px; position: relative; padding: 105px 0 80px; }
.eyebrow, .section-heading > span, .panel-head span, .dialog-head span { font-size: 11px; font-weight: 800; letter-spacing: .17em; color: var(--violet); }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #60ca7d; box-shadow: 0 0 0 5px rgba(96,202,125,.12); }
.hero h1 { margin: 22px 0; max-width: 790px; font-size: clamp(56px, 7vw, 96px); line-height: .96; letter-spacing: -.065em; }
.hero h1 em { color: var(--violet); font-style: normal; }
.hero-copy { max-width: 570px; color: var(--muted); font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; gap: 25px; align-items: center; margin-top: 34px; }
.text-link { border-bottom: 1px solid var(--ink); font-weight: 650; }
.signal-card { position: absolute; right: 0; top: 145px; width: 360px; padding: 22px; border: 1px solid #333344; border-radius: 20px; color: white; background: #191a27; box-shadow: 0 28px 80px rgba(20,18,44,.23); transform: rotate(2deg); }
.signal-state { display: flex; justify-content: space-between; align-items: center; }
.signal-state span { color: var(--lime); font: 11px monospace; letter-spacing: .14em; }
.bars { height: 135px; display: flex; gap: 5px; align-items: center; justify-content: center; margin: 18px 0; }
.bars i { width: 5px; height: 66px; border-radius: 5px; background: var(--lime); animation: bar 1.2s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -45ms); }
@keyframes bar { to { transform: scaleY(.35); opacity: .5; } }
.signal-caption { display: flex; justify-content: space-between; color: #b9bbc7; font-size: 10px; }
.section { padding: 95px 0; border-top: 1px solid var(--line); }
.section-heading h2 { margin: 8px 0 30px; font-size: 42px; letter-spacing: -.04em; }
.feature-grid, .app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article { min-height: 230px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.feature-grid b { color: var(--violet); font: 12px monospace; }
.feature-grid h3 { margin-top: 65px; font-size: 23px; }
.feature-grid p { color: var(--muted); line-height: 1.6; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding: 72px 0 34px; }
.page-head.compact { padding-top: 50px; }
.page-head h1 { margin: 8px 0; font-size: clamp(38px, 5vw, 58px); letter-spacing: -.055em; }
.page-head p { color: var(--muted); margin: 8px 0; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.title-row { display: flex; align-items: center; gap: 16px; }
.title-row h1 { margin-block: 4px; }
.status { display: inline-flex; align-items: center; width: max-content; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.status.active { color: #12632d; background: #dff7e6; }
.status.revoked { color: #8d3442; background: #f8e3e6; }
.app-grid { padding-bottom: 90px; }
.app-card { min-height: 230px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); transition: .2s ease; }
.app-card:hover { transform: translateY(-4px); border-color: #aaa3cd; box-shadow: var(--shadow); }
.app-card-top, .app-meta { display: flex; justify-content: space-between; align-items: center; }
.app-card h2 { margin: 45px 0 9px; font-size: 25px; letter-spacing: -.03em; }
.app-card code { color: var(--muted); font-size: 11px; }
.app-meta { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.empty-state { grid-column: 1/-1; padding: 80px 25px; text-align: center; border: 1px dashed #bab6ac; border-radius: 18px; }
.empty-icon { font-size: 45px; color: var(--violet); }
.empty-state p { color: var(--muted); }
.dialog { width: min(480px, calc(100% - 30px)); border: 0; border-radius: 20px; padding: 0; box-shadow: 0 30px 100px rgba(20,16,44,.25); }
.dialog::backdrop { background: rgba(23,21,35,.48); backdrop-filter: blur(3px); }
.dialog form { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; margin-bottom: 26px; }
.dialog-head h2 { margin: 5px 0; font-size: 30px; }
.icon-button { border: 0; background: transparent; font-size: 30px; cursor: pointer; color: var(--muted); }
label { display: grid; gap: 8px; font-weight: 680; font-size: 13px; }
label > span { color: var(--muted); font-weight: 450; font-size: 11px; }
input, select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(95,61,243,.1); }
.form-note { color: var(--muted); font-size: 12px; margin: 14px 0 22px; }
.secret-banner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 35px; align-items: center; padding: 24px 28px; border-radius: 16px; background: #1b1c28; color: white; }
.secret-banner span { color: var(--lime); font-size: 11px; letter-spacing: .12em; }
.secret-banner h2 { margin: 5px 0; }
.secret-banner p { margin: 0; color: #adafba; }
.copy-field { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.copy-field code { flex: 1; min-width: 0; padding: 13px; overflow: auto; white-space: nowrap; color: var(--ink); font-size: 12px; }
.copy-field button { border: 0; border-left: 1px solid var(--line); padding: 0 15px; background: #f0eee8; cursor: pointer; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.stat-grid article { padding: 24px; border-right: 1px solid var(--line); }
.stat-grid article:last-child { border: 0; }
.stat-grid span { display: block; color: var(--muted); font-size: 12px; }
.stat-grid strong { display: block; margin-top: 10px; font-size: 34px; letter-spacing: -.04em; }
.two-column { display: grid; grid-template-columns: 1.65fr .75fr; gap: 18px; }
.section-tight { padding-block: 22px 80px; }
.panel { padding: 27px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.panel-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 25px; }
.panel-head h2 { margin: 5px 0; font-size: 25px; letter-spacing: -.035em; }
.panel > label { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.panel h3 { margin-top: 27px; font-size: 14px; }
pre { overflow: auto; padding: 18px; border-radius: 10px; background: #1b1c28; color: #e8e8ed; line-height: 1.6; font-size: 12px; }
dl { margin: 0 0 24px; }
dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
.danger-zone form + form { margin-top: 10px; }
.console { padding: 55px 0 80px; }
.console-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.console-head h1 { margin: 5px 0; font-size: 48px; letter-spacing: -.05em; }
.console-head p { color: var(--muted); }
.connection-state { display: flex; gap: 8px; align-items: center; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.connection-state i { width: 7px; height: 7px; border-radius: 50%; background: #a0a0a8; }
.connection-state.active i { background: #48bd6a; box-shadow: 0 0 0 4px rgba(72,189,106,.12); }
.console-layout { display: grid; grid-template-columns: 1fr 1.25fr; min-height: 560px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.mic-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 45px; background: #1b1c28; color: white; text-align: center; }
.orb { --level: 0; position: relative; display: grid; place-items: center; width: 180px; height: 180px; margin-bottom: 34px; border-radius: 50%; background: #2d2e3e; transition: .2s; }
.orb::before { content:""; position:absolute; inset: calc(-8px - var(--level) * 20px); border: 1px solid rgba(199,255,80, calc(.18 + var(--level))); border-radius: 50%; transition: .08s linear; }
.orb i { position: absolute; inset: -18px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.orb i:last-child { inset: -35px; }
.orb.active { background: var(--violet); box-shadow: 0 0 80px rgba(95,61,243,.32); }
.orb.awake { background: var(--lime); color: var(--ink); box-shadow: 0 0 90px rgba(199,255,80,.3); }
.orb-core { font-size: 30px; font-weight: 800; letter-spacing: -.05em; }
.mic-state strong, .mic-state span { display: block; }
.mic-state strong { font-size: 22px; }
.mic-state span { margin-top: 7px; color: #a9abb7; font-size: 13px; }
.record-button { min-width: 170px; margin-top: 26px; }
.record-button.stop { background: var(--red); border-color: var(--red); }
.privacy-note { max-width: 380px; margin-top: 22px; color: #858894; font-size: 11px; line-height: 1.6; }
.transcript-panel { padding: 30px; min-width: 0; }
.partial-result { min-height: 70px; padding: 18px; border-left: 3px solid var(--violet); color: var(--muted); background: #f4f1ff; font-size: 18px; line-height: 1.55; }
.transcript-list { list-style: none; max-height: 295px; overflow: auto; margin: 10px 0 25px; padding: 0; }
.transcript-list li { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start; padding: 17px 4px; border-bottom: 1px solid var(--line); }
.transcript-list li > span, .transcript-list time { color: var(--muted); font: 10px monospace; }
.transcript-list p { margin: 0; line-height: 1.55; }
details summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.event-log { max-height: 150px; margin-bottom: 0; font-size: 10px; }
.provider-logo { padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; font-size: 23px; font-weight: 900; letter-spacing: -.04em; }
.provider-logo small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .15em; }
.flash { padding: 13px 17px; border: 1px solid #a9deb7; border-radius: 10px; color: #176532; background: #e6f8eb; }
.settings-form { padding-bottom: 80px; }
.form-section { display: grid; grid-template-columns: 65px 1fr; margin-top: 16px; }
.section-number { color: var(--violet); font: 12px monospace; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.span-2 { grid-column: 1/-1; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 44px; height: 24px; padding: 3px; border-radius: 999px; background: #c7c5bf; }
.switch span::before { content:""; display:block; width:18px; height:18px; border-radius:50%; background:white; transition:.18s; }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::before { transform: translateX(20px); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 20px; }
#test-result { margin-right: auto; font-size: 12px; }
#test-result.success { color: #17713a; } #test-result.failure { color: var(--red); }
.session-list > div { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.session-dot { width: 7px; height: 7px; border-radius: 50%; background: #aaa; }.session-dot.finished { background:#50bd70; }.session-dot.failed { background:var(--red); }
.muted { color: var(--muted); }
footer { display: flex; justify-content: space-between; padding: 25px max(20px, calc((100vw - 1180px)/2)); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
  .signal-card { position: relative; inset: auto; margin: 55px auto 0; transform: none; width: min(100%, 480px); }
  .hero { padding-top: 70px; }
  .feature-grid, .app-grid { grid-template-columns: 1fr 1fr; }
  .two-column, .console-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid article:nth-child(2) { border-right: 0; }
  .stat-grid article { border-bottom: 1px solid var(--line); }
  .secret-banner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { padding-inline: 12px; height: 66px; }
  .topbar nav > a:not(.button), .user-chip { display: none; }
  .hero h1 { font-size: 50px; }
  .hero-actions, .page-head, .console-head { align-items: stretch; flex-direction: column; }
  .feature-grid, .app-grid, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid article { border-right: 0; }
  .form-section { grid-template-columns: 1fr; }
  .section-number { margin-bottom: 15px; }
  .form-actions { flex-wrap: wrap; }
  #test-result { width: 100%; order: 3; }
  .console-head h1 { font-size: 39px; }
  .mic-stage, .transcript-panel { padding: 28px 20px; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
