:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #19353e;
  background: #f3f5f3;
  font-synthesis: none;
  --mint: #84e4c5;
  --navy: #10242b;
  --muted: #62777d;
  --border: #dce4e0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #168b73;
  outline-offset: 4px;
}
input:focus,
textarea:focus {
  outline: 2px solid #168b73;
  outline-offset: 2px;
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.site-header {
  height: 88px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #fafbf8;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--navy);
  color: var(--mint);
  display: grid;
  place-items: center;
}
.brand-divider {
  height: 20px;
  width: 1px;
  background: #cdd8d3;
  margin: 0 9px;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.test-badge {
  font-size: 12px;
  color: #56716a;
  display: flex;
  gap: 7px;
  align-items: center;
  background: #e9f0e9;
  padding: 8px 11px;
  border-radius: 30px;
}
.test-badge span {
  width: 6px;
  height: 6px;
  background: #409074;
  border-radius: 50%;
}
.workspace {
  width: min(1240px, 90%);
  margin: 0 auto;
}
.intro {
  padding: 42px 0 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 750;
  color: #457668;
  margin: 0 0 14px;
}
h1 {
  font-size: clamp(30px, 3.5vw, 43px);
  line-height: 1.15;
  letter-spacing: -1.6px;
  margin: 0 0 14px;
  font-weight: 650;
}
.intro > p:last-child {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
  margin: 0;
}
.call-layout {
  display: grid;
  grid-template-columns: 355px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d1dfd7;
  color: #548575;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 650;
}
.section-heading h2 {
  font-size: 17px;
  margin: 0 0 4px;
  font-weight: 650;
  letter-spacing: -0.3px;
}
.section-heading p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.tabs {
  display: flex;
  background: #f1f4f1;
  border-radius: 9px;
  padding: 4px;
  margin-bottom: 23px;
  gap: 3px;
}
.tabs button {
  flex: 1;
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 600;
  color: #657b7b;
  padding: 10px 4px;
  border-radius: 6px;
  white-space: nowrap;
}
.tabs button[aria-pressed='true'] {
  background: #fff;
  color: #25463c;
  box-shadow: 0 1px 4px #0b342415;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
label {
  font-size: 12px;
  font-weight: 650;
  display: block;
  margin-bottom: 9px;
}
.sub-label {
  font-size: 10px;
  font-weight: 400;
  float: right;
  color: #7c8c8f;
}
input[type='password'],
textarea {
  width: 100%;
  border: 1px solid #d4ded8;
  border-radius: 8px;
  background: #fcfdfb;
  padding: 12px;
  color: #173a3b;
  font-size: 12px;
  line-height: 1.65;
}
textarea {
  resize: vertical;
  min-height: 78px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}
input::placeholder,
textarea::placeholder {
  color: #8b9a9c;
  font-family: inherit;
}
.field-help {
  font-size: 11px;
  line-height: 1.6;
  color: #78898b;
  margin: 7px 0 12px;
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid transparent;
  padding: 10px 15px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:active:not(:disabled) {
  transform: translateY(1px);
}
.full {
  width: 100%;
}
.secondary {
  background: #f2f8f3;
  border-color: #d2e3d6;
  color: #365e4b;
}
.secondary:hover:not(:disabled) {
  background: #e4f1e7;
}
.secondary span {
  margin-left: auto;
  font-size: 17px;
}
.primary {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  min-height: 48px;
}
.primary:hover:not(:disabled) {
  background: #24434a;
}
.primary svg {
  color: var(--mint);
  width: 19px;
}
.key-details {
  margin-top: 11px;
  color: #7b8f87;
  font-size: 10px;
}
.key-details summary {
  cursor: pointer;
}
.key-details p {
  line-height: 1.7;
  margin: 9px 0 0;
}
code {
  font-size: 10px;
}
.separator {
  height: 1px;
  background: #e7ece7;
  margin: 20px 0;
}
.preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}
.preference label {
  margin: 0 0 4px;
}
.preference p {
  margin: 0;
  color: #81928d;
  font-size: 11px;
}
input[type='checkbox'] {
  accent-color: #258367;
  width: 17px;
  height: 17px;
  cursor: pointer;
}
.preference input {
  appearance: none;
  -webkit-appearance: none;
  background: #cbd8d1;
  width: 36px;
  height: 21px;
  border-radius: 20px;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}
.preference input:after {
  content: '';
  width: 15px;
  height: 15px;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  background: #fff;
  transition: transform 0.15s;
}
.preference input:checked {
  background: #3e8c70;
}
.preference input:checked:after {
  transform: translateX(15px);
}
.copy-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 16px;
  font-size: 11px;
  color: #b5c3bb;
}
.text-button {
  background: none;
  border: 0;
  padding: 3px 0;
  color: #376b58;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.notice {
  font-size: 11px;
  color: #37765a;
  line-height: 1.6;
  margin: 0 0 10px;
}
.notice:empty {
  display: none;
}
.error {
  font-size: 12px;
  line-height: 1.6;
  color: #a83c42;
  background: #fff1f0;
  border-radius: 8px;
  padding: 11px;
  margin: 0 0 14px;
}
.privacy-note {
  font-size: 10px;
  line-height: 1.6;
  color: #84918d;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 17px 0 0;
}
.privacy-note svg {
  width: 14px;
  height: 16px;
  margin-top: 2px;
}
.stage {
  height: 450px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #1e3b40, var(--navy) 70%);
  border-radius: 17px;
  color: #d7e8e4;
}
.stage-top {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  gap: 10px;
}
.status-pill {
  font-size: 10px;
  border: 1px solid #ffffff18;
  border-radius: 30px;
  padding: 8px 11px;
  background: #122a31c9;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 7px;
}
.status-pill:before {
  content: '';
  width: 5px;
  height: 5px;
  background: #80969b;
  border-radius: 50%;
}
body[data-state='connected'] .status-pill:before {
  background: var(--mint);
}
.elapsed {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: #d7e8e4;
  font-variant-numeric: tabular-nums;
  background: #122a31b3;
  padding: 7px 9px;
  border-radius: 6px;
}
.stage-placeholder {
  position: absolute;
  inset: 55px 20px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  pointer-events: none;
}
.orbit {
  height: 138px;
  width: 138px;
  border: 1px solid #d3e8df12;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 0 18px;
}
.orbit-inner {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  border: 1px solid #d3e8df16;
  background: #d3e8df05;
  border-radius: 50%;
  color: #98bfb3;
}
.orbit-inner svg {
  width: 58px;
  height: 58px;
  stroke-width: 1.3;
}
.orbit-dot {
  height: 9px;
  width: 9px;
  border: 3px solid #213b3f;
  background: var(--mint);
  border-radius: 50%;
  box-sizing: content-box;
  position: absolute;
  right: 4px;
  top: 16px;
}
.stage-placeholder h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  font-weight: 500;
  margin: 0 0 10px;
}
.stage-placeholder p {
  font-size: 12px;
  line-height: 1.8;
  color: #86a29f;
  margin: 0;
}
#remote {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#remote.audio-only {
  opacity: 0;
}
.local-preview {
  position: absolute;
  bottom: 48px;
  right: 18px;
  width: 124px;
  height: 156px;
  border: 1px solid #ffffff20;
  border-radius: 10px;
  overflow: hidden;
  background: #07171d;
}
.local-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.local-preview span {
  position: absolute;
  bottom: 8px;
  left: 9px;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 3px #000;
}
.stage-caption {
  position: absolute;
  bottom: 18px;
  left: 21px;
  right: 21px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #809c99;
  z-index: 2;
}
.stage-caption-dot {
  width: 4px;
  height: 4px;
  background: #79b19b;
  border-radius: 50%;
}
.stage-caption-right {
  margin-left: auto;
  color: #587b77;
}
.playback {
  position: absolute;
  z-index: 4;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mint);
  color: var(--navy);
  box-shadow: 0 4px 24px #0005;
  white-space: nowrap;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 17px 0 20px;
}
.control-button {
  border: 1px solid var(--border);
  background: #fcfdfa;
  border-radius: 10px;
  min-width: 92px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  color: #45635f;
  font-size: 9px;
}
.control-button svg {
  width: 19px;
  height: 19px;
}
.control-button:hover:not(:disabled) {
  background: #e8efea;
}
.control-button[aria-pressed='true'] {
  background: #e0ede4;
  border-color: #9cc3aa;
}
.control-divider {
  width: 1px;
  height: 25px;
  background: var(--border);
  margin: 0 3px;
}
.end-call {
  background: #f9e8e4;
  border-color: #efd5d0;
  color: #a5534b;
}
.end-call:hover:not(:disabled) {
  background: #f3d6ce;
}
.diagnostics {
  padding: 17px 3px;
  font-size: 11px;
  color: #526e65;
}
.diagnostics summary {
  cursor: pointer;
}
.diagnostics-hint {
  float: right;
  color: #8c9d93;
  font-size: 10px;
}
.diagnostics-content {
  padding: 19px 0 5px;
}
.relay-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  margin: 0;
}
dl {
  margin: 15px 0;
}
dl > div {
  display: flex;
  gap: 14px;
  margin: 10px 0;
  font-size: 10px;
}
dt {
  color: #82948a;
  width: 90px;
  flex-shrink: 0;
}
dd {
  margin: 0;
  color: #476357;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #93a198;
  font-size: 10px;
  padding: 25px 0 28px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.field-help {
  color: #5c706b;
}
.privacy-note {
  color: #65776c;
}
@media (min-width: 1500px) {
  .workspace {
    width: 1240px;
  }
  .intro {
    padding-top: 52px;
  }
  .stage {
    height: 500px;
  }
}
@media (max-width: 950px) {
  .call-layout {
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .stage {
    height: 430px;
  }
  .stage-caption-right {
    display: none;
  }
  .local-preview {
    width: 95px;
    height: 125px;
  }
  .control-button {
    min-width: 80px;
  }
  .workspace {
    width: 92%;
  }
}
@media (max-width: 740px) {
  .site-header {
    height: 72px;
    padding: 0 5%;
  }
  .brand {
    font-size: 21px;
  }
  .brand-divider,
  .brand-subtitle {
    display: none;
  }
  .test-badge {
    font-size: 10px;
  }
  .workspace {
    width: 90%;
    max-width: 530px;
  }
  .intro {
    padding: 28px 0 23px;
  }
  h1 {
    font-size: 31px;
    letter-spacing: -1.1px;
  }
  .intro > p:last-child {
    font-size: 12px;
  }
  .call-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .stage {
    height: 390px;
  }
  .call-panel {
    grid-row: auto;
  }
  body.in-call .call-panel {
    grid-row: 1;
  }
  .panel {
    padding: 22px;
  }
  .tabs button {
    font-size: 12px;
  }
  .control-button {
    min-width: 100px;
  }
  footer {
    flex-direction: column;
    gap: 3px;
    margin-top: 20px;
  }
  .stage-caption-right {
    display: block;
    font-size: 8px;
  }
  .local-preview {
    width: 96px;
    height: 128px;
  }
  .orbit {
    width: 125px;
    height: 125px;
  }
  .stage-placeholder h2 {
    font-size: 19px;
  }
  .stage-placeholder p {
    font-size: 12px;
  }
  input[type='password'],
  textarea {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.quality-panel {
  padding: 24px;
  border: 1px solid var(--border, #dce4e3);
  border-radius: 18px;
  background: var(--panel, #fff);
  margin-top: 16px;
}
.quality-panel h2 { font-size: 19px; margin: 0 0 8px; }
.quality-panel select { width: 100%; min-height: 44px; padding: 8px; border-radius: 8px; border: 1px solid #bdceca; background: #fff; color: #183a39; margin: 8px 0 14px; }
.quality-panel label { display: block; }
.quality-panel fieldset { min-width: 0; border: 1px solid #dce4e3; border-radius: 10px; padding: 12px; margin-top: 12px; }
.quality-measurements { font-size: 13px; overflow-wrap: anywhere; }
.quality-measurements div { margin: 10px 0; }
.quality-measurements dt { font-weight: 600; }
.quality-measurements dd { margin: 4px 0; }
.quality-panel summary { cursor: pointer; margin: 16px 0; }
.fullscreen-button { position: absolute; z-index: 5; right: 16px; bottom: 48px; padding: 8px 12px; color: #fff; background: #183a39; border-radius: 10px; border: 1px solid #718b85; }
.stage.expanded { position: fixed; inset: 0; width: 100%; height: 100dvh; z-index: 100; border-radius: 0; }
.stage:fullscreen { width: 100%; height: 100dvh; border-radius: 0; }

/* Account workflow shares the existing media stage and call controls. */
.account-panel{padding:24px;margin-bottom:24px;display:grid;gap:14px;overflow-wrap:anywhere}
.account-panel p{color:var(--muted,#a4b5c2);line-height:1.5;margin:0}
.account-stack{display:grid;gap:12px}
.account-card{display:grid;gap:10px;padding:16px;border:1px solid #354c5b;border-radius:14px}
.account-session .intro,.account-session .setup{display:none}
.in-call .account-panel{display:none}

.account-session .call-layout{grid-template-columns:minmax(0,1fr)}
