:root {
  color-scheme: dark;
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #111c22;
  color: #f2efe7;
  font-size: 17px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: calc(28px + env(safe-area-inset-top)) 20px
    calc(24px + env(safe-area-inset-bottom));
}
main {
  max-width: 680px;
  margin: auto;
}
header {
  padding: 26px 0 18px;
}
.eyebrow {
  color: #b9c4bd;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
}
h1 {
  font-size: 2.1rem;
  font-weight: 550;
  margin: 15px 0;
}
h2 {
  font-size: 1rem;
  font-weight: 500;
}
.intro {
  color: #aebcbf;
  line-height: 1.65;
}
form,
section {
  margin-top: 22px;
  border: 1px solid #34464a;
  border-radius: 18px;
  padding: 20px;
}
label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.login-row {
  display: flex;
  gap: 10px;
}
input {
  min-width: 0;
  width: 100%;
  font: inherit;
  background: #0d171d;
  color: inherit;
  border: 1px solid #56666a;
  border-radius: 10px;
  padding: 12px;
}
button {
  font: inherit;
  font-size: 0.91rem;
  min-height: 48px;
  border-radius: 11px;
  padding: 12px 17px;
  border: 1px solid #607473;
  background: #223338;
  color: #eee;
  cursor: pointer;
}
button.primary {
  background: #d2e3b3;
  color: #17231f;
  border-color: #d2e3b3;
  font-weight: 600;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #c9ddb8;
  outline-offset: 3px;
}
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hint {
  color: #9eafb2;
  font-size: 0.77rem;
  line-height: 1.6;
  margin-bottom: 0;
}
#status {
  margin: 0 0 18px;
  min-height: 24px;
}
#resume,
#recover {
  margin-top: 14px;
  width: 100%;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiet {
  border: 0;
  background: transparent;
  color: #aebdbb;
  font-size: 0.78rem;
}
#transcript {
  height: 32dvh;
  min-height: 180px;
  overflow: auto;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#transcript p {
  margin: 12px 0;
}
.partial {
  color: #9eafb2;
}
#audio {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 400px) {
  body {
    padding-left: 14px;
    padding-right: 14px;
  }
  section,
  form {
    padding: 16px;
  }
  .controls button {
    padding: 12px 13px;
  }
}
.login-row input {
  min-width: 0;
  flex: 1;
}
.login-row button {
  flex-shrink: 0;
  white-space: nowrap;
}

select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.7rem;
  margin: 0.5rem 0;
  font: inherit;
}
#sources a {
  display: block;
  overflow-wrap: anywhere;
}
#sources iframe {
  width: 100%;
  min-height: 100px;
  border: 0;
  background: white;
}

body.call,
#home {
  --phone-glyph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20aria-hidden%3D%22true%22%20data-slot%3D%22icon%22%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M1.5%204.5a3%203%200%200%201%203-3h1.372c.86%200%201.61.586%201.819%201.42l1.105%204.423a1.875%201.875%200%200%201-.694%201.955l-1.293.97c-.135.101-.164.249-.126.352a11.285%2011.285%200%200%200%206.697%206.697c.103.038.25.009.352-.126l.97-1.293a1.875%201.875%200%200%201%201.955-.694l4.423%201.105c.834.209%201.42.959%201.42%201.82V19.5a3%203%200%200%201-3%203h-2.25C8.552%2022.5%201.5%2015.448%201.5%206.75V4.5Z%22%20clip-rule%3D%22evenodd%22%2F%3E%0A%3C%2Fsvg%3E");
  --call-font: ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --t-title: 600 22px/1.2 var(--call-font);
  --t-body: 400 16px/1.55 var(--call-font);
  --t-meta: 500 13px/1.35 var(--call-font);
  --t-label: 500 11px/1.3 var(--call-font);
  font: var(--t-meta);
  color: rgb(255 255 255 / .96);
}

body.call {
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: #2e3040;
  color: rgb(255 255 255 / .96);
  font: var(--t-meta);
  -webkit-font-smoothing: antialiased;
}
body.call button {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
body.call button.primary {
  background: transparent;
  color: inherit;
}
body.call button:focus-visible,
body.call input:focus-visible {
  outline: 2px solid #5494fa;
  outline-offset: 4px;
}
body.call.inside { background: #101218; }
body.call #stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  overflow: hidden;
  background: #101218;
}
body.call .backdrop { display: none; }
body.call .topbar {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  gap: 8px;
  padding: 0 max(24px, env(safe-area-inset-left));
}
body.call #back {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
body.call #back::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
body.call .mark { display: flex; align-items: center; }
body.call .brand-logo { display: block; width: 100px; height: 20px; }
body.call .topbar { gap: 16px; }
body.call .identity {
  display: grid;
  flex: none;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-content: center;
  padding: 0 max(24px, env(safe-area-inset-left));
}
body.call .avatar {
  grid-row: 1 / 3;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
body.call h1 {
  font: var(--t-title);
  align-self: end;
  margin: 0;
  letter-spacing: -.02em;
}
body.call .role {
  font: var(--t-meta);
  margin: 8px 0 0;
  color: rgb(255 255 255 / .56);
}
body.call .line {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0 24px;
  color: rgb(255 255 255 / .56);
}
body.call #clock { font-variant-numeric: tabular-nums; }
body.call .bars { display: flex; align-items: center; gap: 2px; height: 16px; }
body.call .bars i { width: 2px; height: 3px; border-radius: 2px; background: #36deb8; opacity: .42; }
body.call.live .bars i { opacity: .78; }
body.call.live .bars i:nth-child(2n) { height: 8px; }
body.call.live .bars i:nth-child(3) { height: 16px; }
body.call.speak .bars i { background: #5494fa; }
body.call #status { min-height: 0; margin: 0; }
body.call.live #status { color: #36deb8; }
body.call.speak #status { color: #5494fa; }
body.call.down #status { color: rgb(255 255 255 / .56); }
body.call.bad #status { color: #ee5964; }
body.call .transcript-box {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  margin: 24px 0;
  padding: 0 max(24px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.call .label {
  font: var(--t-label);
  text-transform: uppercase;
  flex: none;
  margin: 0 0 8px;
  color: rgb(255 255 255 / .42);
  letter-spacing: .08em;
}
body.call #transcript {
  font: var(--t-body);
  color: rgb(255 255 255 / .78);
  padding: 32px 0 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 32px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 32px);
  flex: 1;
  height: auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2e3040 transparent;
}
body.call #transcript p { margin: 0 0 16px; }
body.call #transcript p.live,
body.call #transcript .partial { color: rgb(255 255 255 / .56); }
body.call #transcript:empty::before { content: "Waiting for the conversation…"; color: rgb(255 255 255 / .34); }
body.call .footer {
  flex: none;
  padding: 16px max(24px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border-top: 1px solid rgb(255 255 255 / .065);
  background: #15171f;
}
body.call #login { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.call #login:not([hidden]) ~ .dock { display: none; }
body.call label { font: var(--t-meta); margin: 0 0 8px; color: rgb(255 255 255 / .56); }
body.call .login-row { gap: 8px; }
body.call input {
  font: var(--t-meta);
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgb(255 255 255 / .13);
  border-radius: 8px;
  background: #101218;
}
body.call #login button { font: var(--t-meta); padding: 8px 16px; border-radius: 8px; background: #2e3040; color: rgb(255 255 255 / .96); }
body.call .dock { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
body.call .tools,
body.call .actions { display: contents; }
body.call .dock button {
  font: var(--t-label);
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
body.call .dock button span { color: rgb(255 255 255 / .56); letter-spacing: .08em; text-transform: uppercase; }
body.call .dock button:disabled { opacity: .42; }
body.call .dock button i {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2e3040;
  border: 1px solid rgb(255 255 255 / .065);
}
body.call .dock button i::before {
  content: "";
  position: absolute;
  inset: 18px;
  background: currentColor;
}
body.call #mute i::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.call #mute[aria-pressed="true"] { color: #36deb8; }
body.call #mute[aria-pressed="true"] i {
  background: rgba(54, 222, 184, 0.22);
  border-color: rgba(54, 222, 184, 0.5);
}
body.call #mute[aria-pressed="true"] i::before { background: #36deb8; }
body.call #speaker i::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 5V4L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12zM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 5V4L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12zM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.call #speaker[aria-pressed="true"] { color: #5494fa; }
body.call #speaker[aria-pressed="true"] i {
  background: rgba(84, 148, 250, 0.22);
  border-color: rgba(84, 148, 250, 0.5);
}
body.call #speaker[aria-pressed="true"] i::before { background: #5494fa; }
body.call #beside i::before {
  inset: 18px 16px;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: transparent;
}
body.call #beside i::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 18px;
  height: 16px;
  border-left: 2px solid currentColor;
}
body.call #beside[aria-pressed="true"] { color: #36deb8; }
body.call #beside[aria-pressed="true"] i { background: #1d3935; border-color: #36deb8; }
body.call .actions #beside[hidden] { display: none; }
body.call .actions #connect,
body.call .actions #hangup { background: transparent; color: inherit; }
body.call #connect i { background: #36deb8; color: #101218; border-color: transparent; }
body.call #hangup i { background: #ee5964; color: #fff; border-color: transparent; }
body.call #hangup i::before { transform: rotate(135deg); }
body.call .actions #connect:disabled,
body.call .actions #hangup:disabled { display: none; }
body.call #recover {
  width: 100%;
  min-height: 40px;
  margin: 0 0 16px;
  padding: 8px;
  border-radius: 8px;
  color: #ee5964;
}
body.call:not(.callable) .footer,
body.call.away .footer { display: none; }

#home {
  min-height: 100dvh;
  margin: 0 auto;
  max-width: 680px;
  padding: calc(24px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #101218;
}
#home .home-head { display: flex; align-items: center; gap: 16px; min-height: 40px; padding: 0; margin-bottom: 24px; }
#home .hairline { height: 1px; margin: 0; background: rgb(255 255 255 / .065); }
#home .row { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; height: 72px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; text-align: left; }
#home .row:not(:last-child)::after { content: ""; position: absolute; left: 60px; right: 0; bottom: 0; height: 1px; background: rgb(255 255 255 / .065); }
#home .row:not(.human):hover { background: #1c1e28; }
#home .row img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
#home .row .who { display: flex; flex: 1; min-width: 0; flex-direction: column; }
#home .row b { font: var(--t-body); font-weight: 600; }
#home .row em { font: var(--t-meta); font-style: normal; color: rgb(255 255 255 / .56); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#home .row .phone { display: none; }
#home .row.callable .phone {
  display: block;
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  margin-right: 24px;
  border-radius: 50%;
  border: 0;
  background: rgb(54 222 184 / .09);
  color: #d5f5eb;
  transition: background-color 140ms ease, transform 140ms ease;
}
#home .row.callable .phone::before { content: ""; position: absolute; inset: -5px; }
#home .row.callable .phone::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
  -webkit-mask: var(--phone-glyph) center / contain no-repeat;
  mask: var(--phone-glyph) center / contain no-repeat;
}
@media (hover: hover) {
  #home .row.callable:hover .phone { background: rgb(54 222 184 / .16); }
}
#home .row.callable:active .phone { background: rgb(54 222 184 / .24); transform: scale(.94); }
@media (prefers-reduced-motion: reduce) {
  #home .row.callable .phone { transition: none; }
}
#home .row.human { cursor: default; }

body.call #connect i::before,
body.call #hangup i::before {
  -webkit-mask: var(--phone-glyph) center / contain no-repeat;
  mask: var(--phone-glyph) center / contain no-repeat;
}

body.call:not(.live) #clock,
body.call:not(.live) .bars { display: none; }
body.call:not(.live) #status { color: rgb(255 255 255 / .56); }
