/* /voices/: the public voice playground.

   Tokens, type, header, buttons and footer are lifted from index.html and blog.css so the page
   reads as the same site. It is a file rather than an inline <style> because the /voices CSP in
   _headers says style-src 'self' with no 'unsafe-inline'; the page has no style attribute either,
   and voices.js only ever toggles classes and ARIA states.

   Committed light palette, no dark variant, for the reason index.html gives: a buyer should see
   the same page on every screen they open it on. */
/* biome-ignore-all lint/style/noDescendingSpecificity: the `span` rules (.chip span, .seg-o span and their :checked and :hover forms) style the labels of two separate radio groups that never nest, so their order cannot make one override another. */
:root {
  --paper: #fbfbf9;
  --paper-deep: #f2f1ec;
  --panel: #ffffff;
  --ink: #17181c;
  --ink-70: #43454d;
  --muted: #797c85;
  --line: #17181c29;
  --line-soft: #17181c17;
  --blue: #0068f9;
  --blue-ink: #0165ff;
  --blue-wash: #eff4ff;
  --orange: #ff661f;
  --live: #009ba4;
  --ink-on-blue: #ffffff;
  --err: #d64545;
  --surface: var(--paper-deep);
  --shadow-sm: 0 1px 2px rgba(23, 24, 28, 0.04);
  --shadow: 0 1px 3px rgba(23, 24, 28, 0.05), 0 10px 30px -14px rgba(23, 24, 28, 0.16);
  --display: "Host Grotesk", "Segoe UI", Arial, sans-serif;
  --body: "Inter", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
/* `clip`, not the homepage's `hidden`: hidden on both html and body turns body into a scroll
   container, and a sticky header inside one never sticks, because body itself never scrolls. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: anywhere;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.06;
}
h1 {
  font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.032em;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}
.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;
}
.dot-accent {
  color: var(--orange);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header and buttons (as index.html) ---------- */
header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.hdr {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand svg {
  width: 30px;
  height: 30px;
  display: block;
}
.brand b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -0.035em;
}
nav {
  display: flex;
  gap: 24px;
}
nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
nav a:hover {
  color: var(--ink);
}
.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--ink-on-blue);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
  padding: 10px 18px;
  border-radius: 7px;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn-ghost {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
}
.hdr .btn {
  white-space: nowrap;
}

/* ---------- hero ---------- */
/* The homepage's hero wash, cut down to two of its four layers: this hero is a third the height. */
.bg-hero {
  position: relative;
  isolation: isolate;
}
.bg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(at 82% 30%, #0165ff1f 0, #0165ff08 28%, #0000 56%),
    radial-gradient(at 14% 90%, #ecff6770 0, #ecff671a 24%, #0000 50%),
    linear-gradient(#fff6, #0000 40%);
  /* Faded out at the bottom, so the wash does not end in a hard edge above the pickers. */
  mask-image: linear-gradient(#000 55%, #0000);
  -webkit-mask-image: linear-gradient(#000 55%, #0000);
}
.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 56px 36px;
  max-width: 1180px;
}
.lede {
  font-size: 1.08rem;
  color: var(--ink-70);
  max-width: 34rem;
}
.note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 40rem;
}

/* ---------- playground layout ---------- */
.pg {
  padding-block: 8px 72px;
}
.pg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.pg-pick,
.pg-play {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.pg-play {
  gap: 14px;
}
/* With scripting off, the pickers and the player can never fill in: the <noscript> notice says
   why, and this keeps an empty frame from sitting under it. Browsers that do not know the
   `scripting` feature show the frame as well, which is untidy but still honest. */
@media (scripting: none) {
  .pg-grid {
    display: none;
  }
}
.pg-grid[hidden] {
  display: none;
}

.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-70);
  margin-bottom: 24px;
}
.notice[hidden] {
  display: none;
}
.notice-t {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.notice a {
  color: var(--blue-ink);
}

/* ---------- pickers ---------- */
.group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.group-l {
  padding: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Every picker option is a real radio input. It is visually hidden but stays in the tab order, so
   a keyboard gets the browser's own radio-group behaviour (Tab in, arrows to move) for free. */
.opt {
  position: relative;
  display: inline-flex;
}
.opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.opt input:disabled {
  cursor: default;
}

/* Industry: chips. Reserved height so the row does not jump when the manifest arrives. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-70);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.chip input:hover + span {
  border-color: var(--ink-70);
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--panel);
}
.chip input:focus-visible + span,
.seg-o input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Situation: the homepage's billing toggle, as a radio group. Wraps rather than scrolls at 320px. */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  min-height: 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  align-self: flex-start;
  max-width: 100%;
}
.seg-o span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.seg-o input:hover + span {
  color: var(--ink);
}
.seg-o input:checked + span {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Voices: cards. The radio covers the card's text; the play button sits beside it, not inside it,
   because a button nested in a label is two controls that a screen reader announces as one. */
.voices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 10px;
  min-height: 84px;
}
.vc {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 14px 14px 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.vc:hover {
  border-color: var(--ink-70);
}
.vc.is-selected {
  border-color: var(--blue);
  background: var(--blue-wash);
}
.vc.is-missing {
  opacity: 0.55;
}
.vc-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.vc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.vc-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
/* Always in the layout, shown only when selected, so choosing a voice never reflows the card. */
.vc-sel {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--blue);
  color: var(--ink-on-blue);
  visibility: hidden;
}
.vc.is-selected .vc-sel {
  visibility: visible;
}
.vc-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.vc-main:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
  border-radius: 6px;
}
.vc-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--blue-ink);
  cursor: pointer;
  flex: none;
}
.vc-play:hover {
  border-color: var(--blue);
}
.vc-play:disabled {
  cursor: default;
  color: var(--muted);
}
.vc-play svg,
.play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.i-pause {
  display: none;
}
.is-playing > .i-play {
  display: none;
}
.is-playing > .i-pause {
  display: block;
}

/* ---------- player ---------- */
.player {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.player-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  min-height: 48px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.player.is-playing .dot {
  background: var(--live);
}
.player-tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-voice {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  flex: none;
}
.player-body {
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.clip-title {
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
}
.clip-summary {
  font-size: 0.92rem;
  color: var(--ink-70);
  min-height: 1.5em;
}

.transport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.play {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: var(--blue);
  color: var(--ink-on-blue);
  cursor: pointer;
  box-shadow: 0 6px 18px -8px #0068f9aa;
}
.play svg {
  width: 26px;
  height: 26px;
}
.play:hover {
  filter: brightness(1.08);
}
.play:disabled {
  background: var(--line);
  box-shadow: none;
  cursor: default;
}
.seek {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.seek-bar {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.seek-bar:disabled {
  cursor: default;
}
.seek-bar:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.times {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

/* Phone-line switch. */
.phone {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 4px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
}
.switch:disabled {
  cursor: default;
  color: var(--muted);
}
.switch-track {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.15s ease;
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
.switch[aria-checked="true"] .switch-track {
  background: var(--blue);
}
.switch[aria-checked="true"] .switch-thumb {
  transform: translateX(16px);
}
.phone-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.player-status {
  font-size: 0.82rem;
  color: var(--err);
  min-height: 1.2em;
}
.player-status:empty {
  display: none;
}

/* Transcript. Fixed height and its own scroll, so a longer call never pushes the page about and
   the highlighted line can be kept in view without scrolling the whole window. */
.transcript {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  height: 19rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  background: var(--panel);
  scroll-behavior: smooth;
}
.ln {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 2px 12px;
  width: 100%;
  padding: 9px 18px;
  border: 0;
  border-left: 3px solid transparent;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ln:hover {
  background: var(--paper);
}
.ln:focus-visible {
  outline-offset: -3px;
}
.ln-who {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  padding-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ln-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-70);
}
.ln.is-agent .ln-who {
  color: var(--blue-ink);
}
.ln.is-prospect .ln-who {
  color: var(--muted);
}
.ln.is-prospect .ln-text {
  color: var(--muted);
}
.ln.is-current {
  background: var(--blue-wash);
  border-left-color: var(--blue);
}
.ln.is-current .ln-text {
  color: var(--ink);
}
.ln.is-prospect.is-current {
  background: var(--surface);
  border-left-color: var(--muted);
}

/* ---------- calls to action and small print ---------- */
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ctas .btn {
  flex: 1 1 auto;
  padding-block: 12px;
}
.picked {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-70);
  min-height: 1.2em;
}
.fine {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- footer (as index.html) ---------- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 44px;
  color: var(--muted);
  font-size: 0.82rem;
}
.foot {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.foot a {
  color: var(--muted);
}
.abn,
.where {
  font-family: var(--mono);
  font-size: 0.74rem;
}
.where {
  margin-left: auto;
}

/* ---------- wider screens: pickers left, player right and pinned ---------- */
@media (min-width: 960px) {
  .hero {
    padding-block: 72px 44px;
  }
  .pg-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 40px;
  }
  .pg-play {
    position: sticky;
    top: 84px;
  }
  .transcript {
    height: 22rem;
  }
}

/* ---------- phones ---------- */
@media (max-width: 700px) {
  nav {
    display: none;
  }
}
@media (max-width: 600px) {
  .wrap {
    padding-inline: 16px;
  }
  .hdr {
    gap: 14px;
  }
  .hdr .btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .hero {
    padding-block: 36px 24px;
    gap: 12px;
  }
  .player-body {
    padding: 18px 14px 14px;
  }
  .player-hd {
    padding-inline: 14px;
  }
  .ln {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 14px;
  }
  .transcript {
    height: 17rem;
  }
  .ctas .btn {
    flex-basis: 100%;
  }
}
@media (max-width: 380px) {
  .transport {
    gap: 12px;
  }
  .play {
    width: 52px;
    height: 52px;
  }
  .seg-o span {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .transcript {
    scroll-behavior: auto;
  }
  .chip span,
  .seg-o span,
  .vc,
  .ln,
  .switch-track,
  .switch-thumb {
    transition: none;
  }
}
