/* Interview out loud: Sam's orb, a live voice wave and the words as they are spoken. */
#interview .interview-card {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0 40px;
  padding: 40px 44px 32px 32px; min-height: 540px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#interview .interview-sam {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding-bottom: 40px; position: relative;
}
#interview .interview-orb-box { position: relative; }
#interview .interview-orb { width: 176px; height: 176px; display: block; }
#interview .interview-who { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; }
#interview .interview-who b { font-family: var(--display); font-size: 20px; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
#interview .interview-who span { font-size: 13px; color: var(--text-3); }
#interview .interview-pill { margin-top: 14px; height: 28px; padding: 0 12px; font-size: 13px; }
/* Sam's backchannel while the candidate talks: a quiet bubble by the orb */
#interview .interview-bc {
  position: absolute; top: 4px; left: 128px; white-space: nowrap; padding: 6px 12px; border-radius: 14px 14px 14px 4px;
  font-size: 14px; font-weight: 600; color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  opacity: 0; transform: translateY(6px) scale(.92); transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1.2);
}
#interview .interview-bc.on { opacity: 1; transform: none; }

#interview .interview-main { display: flex; flex-direction: column; min-width: 0; }
#interview .interview-wave-box {
  position: relative; height: 168px; border-radius: 18px; overflow: hidden;
  background: color-mix(in srgb, var(--panel) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line);
}
/* the "now" edge: the newest sound arrives here */
#interview .interview-wave-box::after {
  content: ""; position: absolute; top: 22px; bottom: 22px; right: 26px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--rim), transparent);
}
#interview .interview-wave { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#interview .interview-words {
  flex: 1; height: 262px; margin-top: 26px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 46px); mask-image: linear-gradient(180deg, transparent 0, #000 46px);
}
#interview .interview-line { margin: 0; transition: opacity .6s; }
#interview .interview-line.old { opacity: .16; }
#interview .interview-line.prev { opacity: .42; }
#interview .interview-spk { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
#interview .interview-spk time { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text-3); }
#interview .interview-line.sam .interview-spk { color: var(--accent-text); }
#interview .interview-tx {
  display: block; font-family: var(--display); font-size: 25px; line-height: 1.32; letter-spacing: -.018em; font-weight: 500;
  color: var(--text); text-wrap: pretty; max-width: 30em;
}
#interview .interview-tx .w { transition: opacity .28s, filter .28s; }
#interview .interview-tx .w.q { opacity: 0; }

#interview .interview-ctl {
  margin-top: 22px; padding-top: 18px; display: flex; align-items: center; gap: 18px;
  box-shadow: inset 0 1px 0 var(--line);
}
#interview .interview-mic {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-2); background: var(--raised); box-shadow: inset 0 0 0 1px var(--rim);
}
#interview .interview-mic svg { width: 22px; height: 22px; position: relative; }
#interview .interview-mic-ring {
  position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cyan) 70%, transparent); opacity: 0; transform: scale(.9);
}
#interview .interview-mic.you { color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--cyan) 92%, #fff), color-mix(in srgb, var(--cyan) 70%, var(--accent-deep))); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--cyan) 70%, transparent); }
#interview .interview-mic.you .interview-mic-ring { opacity: 1; }
#interview .interview-mic.wait { color: var(--cyan); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cyan) 55%, transparent); }
#interview .interview-mic.wait .interview-mic-ring { animation: interview-invite 1.8s ease-out infinite; }
@keyframes interview-invite { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
#interview .interview-clock { display: flex; align-items: baseline; gap: 10px; margin-left: 4px; }
#interview .interview-clock b { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--text); }
#interview .interview-clock span { font-size: 13px; color: var(--text-3); }
#interview .interview-clock-top { display: none; }
#interview .interview-end {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px; color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 25%, transparent);
}
#interview .interview-end svg { width: 15px; height: 15px; }

/* phone: orb small at the top with the pill and the clock, the wave full width, the words under it */
@container piece (max-width: 600px) {
  #interview .interview-card { display: block; padding: 18px 18px 18px; min-height: 0; }
  #interview .interview-sam {
    display: grid; grid-template-columns: 70px 1fr auto; grid-template-areas: "orb who clock" "orb pill clock";
    align-items: center; justify-items: start; text-align: left; gap: 2px 12px; padding: 0 0 16px;
  }
  #interview .interview-orb-box { grid-area: orb; }
  #interview .interview-orb { width: 70px; height: 70px; }
  #interview .interview-who { grid-area: who; margin: 0; align-self: end; }
  #interview .interview-who b { font-size: 18px; }
  #interview .interview-who span { display: none; }
  #interview .interview-pill { grid-area: pill; margin: 2px 0 0; align-self: start; }
  #interview .interview-bc { top: -6px; left: 52px; font-size: 13px; padding: 5px 10px; }
  #interview .interview-ctl .interview-clock { display: none; }
  #interview .interview-sam .interview-clock { display: flex; grid-area: clock; flex-direction: column; align-items: flex-end; gap: 0; margin: 0; }
  #interview .interview-sam .interview-clock b { font-size: 22px; }
  #interview .interview-sam .interview-clock span { font-size: 12px; }
  #interview .interview-wave-box { height: 112px; border-radius: 16px; }
  #interview .interview-wave-box::after { right: 18px; top: 14px; bottom: 14px; }
  #interview .interview-words { height: 272px; flex: none; margin-top: 18px; gap: 14px; }
  #interview .interview-tx { font-size: 21px; line-height: 1.3; }
  #interview .interview-spk { margin-bottom: 3px; }
  #interview .interview-ctl { margin-top: 16px; padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #interview .interview-mic.wait .interview-mic-ring { animation: none; }
  #interview .interview-bc, #interview .interview-line, #interview .interview-tx .w { transition: none; }
}
