@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --midnight: #0B1630;
  --paper: #FAFAF9;
  --honey: #F0B04A;
  --ink: #0B1630;
  --ink-2: rgba(11, 22, 48, 0.72);
  --ink-3: rgba(11, 22, 48, 0.52);
  --line: rgba(11, 22, 48, 0.12);
  --line-strong: rgba(11, 22, 48, 0.24);
  --surface: #FFFFFF;
  --tint: rgba(11, 22, 48, 0.045);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; }

/* Header */
.brand { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.brand-sep { color: var(--ink-3); padding: 0 4px; }
h1 { margin: 0; font: 500 clamp(32px, 7vw, 56px)/1.05 var(--serif); letter-spacing: -0.015em; }
h1 em { font-style: italic; font-weight: 400; }
.lede { margin: 14px 0 0; max-width: 560px; font-size: 17px; color: var(--ink-2); }

/* Edition tabs */
.editions { margin: 28px 0 14px; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: 15px; cursor: pointer; color: var(--ink-2); }
.tab-short { display: none; }
.tab:hover { color: var(--ink); background: var(--tint); }
.tab[aria-selected="true"] { background: var(--midnight); color: var(--paper); }
.tab:focus-visible, .call-btn:focus-visible, .btn:focus-visible { outline: 2px solid var(--midnight); outline-offset: 2px; }

/* Call picker */
.calls { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.call-btn { width: 100%; height: 100%; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.call-btn:hover { border-color: var(--line-strong); }
.call-btn[aria-pressed="true"] { border-color: var(--midnight); box-shadow: inset 0 0 0 1px var(--midnight); }
.call-btn-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.call-btn-sub { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.tag { align-self: flex-start; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--midnight); }

/* Stage */
.stage { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .stage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }

.call { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px 16px; display: flex; flex-direction: column; min-height: 420px; }
.call-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.call-kicker { margin: 0; font-size: 13px; color: var(--ink-3); }
.call-title { margin: 2px 0 0; font: 500 22px/1.2 var(--serif); }
.call-clock { margin: 2px 0 0; font: 500 14px/1 var(--mono); color: var(--ink-2); padding: 6px 9px; border-radius: 8px; background: var(--tint); }

.transcript { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; max-height: 520px; overflow-y: auto; scroll-behavior: smooth; }
.turn { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.42; animation: rise 220ms ease-out; }
.turn-who { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; margin-bottom: 2px; }
.turn-caller { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 5px; }
.turn-agent { align-self: flex-end; background: var(--midnight); color: var(--paper); border-bottom-right-radius: 5px; }
.turn-event { align-self: center; max-width: 100%; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); padding: 4px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; }
.turn-typing { align-self: flex-end; background: var(--midnight); color: var(--paper); border-bottom-right-radius: 5px; padding: 11px 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--paper); opacity: 0.35; animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
.empty { margin: auto 0; text-align: center; color: var(--ink-3); font-size: 15px; padding: 30px 10px; }

.controls { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn { cursor: pointer; border-radius: 999px; padding: 11px 18px; font-weight: 600; font-size: 15px; border: 1px solid transparent; }
.btn-primary { background: var(--honey); color: var(--midnight); }
.btn-primary:hover { filter: brightness(0.96); }
.btn-quiet { background: transparent; border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--tint); }
.btn:disabled { opacity: 0.45; cursor: default; }

/* Phone */
.result { display: flex; flex-direction: column; gap: 12px; }
.phone { background: var(--midnight); color: var(--paper); border-radius: 34px; padding: 14px 12px 18px; min-height: 420px; border: 6px solid #1A2644; }
.phone-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 10px 8px; font: 600 13px/1 var(--sans); }
.phone-notch { width: 74px; height: 20px; border-radius: 999px; background: #000; }
.phone-caption { margin: 6px 6px 12px; text-align: center; font-size: 13px; color: rgba(250, 250, 249, 0.62); }
.notes { display: flex; flex-direction: column; gap: 10px; }
.note { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 11px 13px 13px; animation: drop 320ms cubic-bezier(.2, .8, .2, 1); }
.note-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.note-app { font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); }
.note-heading { margin: 0 0 6px; font: 500 13px/1.35 var(--mono); letter-spacing: 0.01em; }
.note-body { margin: 0; font: 400 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.note-also { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); }
.note-logged { background: rgba(250, 250, 249, 0.14); color: var(--paper); }
.note-logged .note-head, .note-logged .note-app { color: rgba(250, 250, 249, 0.7); }

.voicemail { margin: 0; font-size: 14.5px; color: var(--ink-2); padding: 12px 14px; border-left: 3px solid var(--line-strong); background: var(--surface); border-radius: 0 10px 10px 0; }
.voicemail-label { font-weight: 600; color: var(--ink); margin-right: 4px; }

.foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); max-width: 760px; }
.noscript { text-align: center; padding: 20px; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }

@media (prefers-reduced-motion: reduce) {
  .turn, .note { animation: none; }
  .dots i { animation: none; opacity: 0.6; }
  .transcript { scroll-behavior: auto; }
}

@media (max-width: 520px) {
  .wrap { padding-top: 20px; }
  .lede { font-size: 16px; }
  .tabs { display: flex; flex-wrap: nowrap; width: 100%; }
  .tab { flex: 1 1 0; padding: 9px 6px; font-size: 14px; white-space: nowrap; }
  .tab-long { display: none; }
  .tab-short { display: inline; }
  .calls { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .calls li { scroll-snap-align: start; }
  .call { min-height: 360px; }
  .turn { max-width: 92%; }
  .phone { border-radius: 28px; min-height: 0; }
}

/* Undo Labs mark */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; flex: none; border-radius: 6px; }

/* Sound toggle and volume */
.controls { flex-wrap: wrap; align-items: center; }
.sound-group { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.btn-sound[aria-pressed="false"] { color: var(--ink-3); }
.btn-sound[hidden] { display: none; }
.volume { width: 92px; max-width: 30vw; margin: 0; accent-color: var(--midnight); cursor: pointer; }
.volume:focus-visible { outline: 2px solid var(--midnight); outline-offset: 3px; border-radius: 4px; }
.btn-sound[aria-pressed="false"] + .volume { opacity: 0.55; }

/* Link to the live founder-line call */
.live-link { margin: 14px 0 0; font-size: 15px; }
.live-link a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--honey); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.live-link a:hover { text-decoration-color: var(--midnight); }
.live-link-note { margin-left: 8px; font-size: 13px; color: var(--ink-3); }
