/* AI interview agent: a Scaylar prototype with sample data. */

:root {
  --blue: #0556f3;
  --blue-hover: #0445c2;
  --blue-deep: #033492;
  --blue-light: #e9f3ff;
  --blue-soft: #f4f8ff;
  --ink: #0b1220;
  --ink-2: #2a3446;
  --muted: #535e72;
  --line: #dbe2ec;
  --line-2: #e9edf3;
  --bg: #f5f7fb;
  --card: #ffffff;
  --amber-bg: #fff4d9;
  --amber-ink: #6b4500;
  --amber-line: #e9c46a;
  --green-bg: #e3f5eb;
  --green-ink: #0b5a34;
  --orange-bg: #fdeddc;
  --orange-ink: #873a00;
  --gray-bg: #eef1f5;
  --gray-ink: #3d4657;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 6px 20px rgba(11, 18, 32, 0.05);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Space Grotesk", Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-hover);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 780px;
}

.noscript {
  padding-top: 32px;
}

/* ---------- prototype header ---------- */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.badge-proto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.badge-proto .mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 7px #fff;
}

.proto-name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sample {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px dashed var(--amber-line);
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.sample svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.sample-sm {
  padding: 2px 9px;
  font-size: 12px;
}

.viewnav {
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.viewnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.viewnav a:hover {
  color: var(--blue);
}

.viewnav a[aria-current="page"] {
  background: var(--card);
  color: var(--blue-deep);
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.12);
}

/* ---------- shared pieces ---------- */

main {
  display: block;
  flex: 1 0 auto;
  padding-bottom: 56px;
}

main:focus {
  outline: none;
}

.view {
  padding-top: 32px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card + .card,
.card + .grid-2,
.grid-2 + .card,
.map-grid + .map-grid,
.tiles + .card {
  margin-top: 20px;
}

/* cards side by side in a grid line up at the top */
.interview-grid > .card,
.map-grid > .card,
.map-grid > .tiles,
.grid-2 > .card {
  margin-top: 0;
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.card-sub {
  color: var(--muted);
  font-size: 14px;
}

.card-top .card-sub {
  margin: 0;
}

.card-top-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.transcript-card > .card-sub {
  margin: -6px 0 14px;
}

.card-link {
  margin-top: 16px;
  font-weight: 600;
  font-size: 15px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.view-head .eyebrow {
  margin-bottom: 6px;
}

.as-of {
  color: var(--muted);
  font-size: 14px;
}

.lede {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 62ch;
}

.lede-wide {
  margin: -12px 0 20px;
}

.h-small {
  margin-top: 28px;
  font-size: 17px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.chips li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 500;
}

.fit,
.status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.fit-high,
.status-confirmed {
  background: var(--green-bg);
  color: var(--green-ink);
}

.fit-medium,
.status-awaiting {
  background: var(--orange-bg);
  color: var(--orange-ink);
}

.fit-low,
.status-invited,
.status-optedout {
  background: var(--gray-bg);
  color: var(--gray-ink);
}

.status-progress,
.status-scheduled {
  background: var(--blue-light);
  color: var(--blue-deep);
}

.status-progress::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: 1px;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

/* ---------- participant: invitation ---------- */

.start-card h1 {
  margin-top: 4px;
}

.mic-wrap {
  display: flex;
  justify-content: center;
  margin: 36px 0 12px;
}

.mic {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 4px;
  border: 0;
  border-radius: 24px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.mic-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2f74ff, var(--blue) 55%, var(--blue-deep));
  color: #fff;
  box-shadow: 0 10px 30px rgba(5, 86, 243, 0.32);
  transition: transform 0.15s ease;
}

.mic-circle svg {
  position: relative;
  width: 46px;
  height: 46px;
}

.mic .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(5, 86, 243, 0.35);
  animation: ring 2.6s ease-out infinite;
}

.mic .ring:nth-child(2) {
  animation-delay: 0.85s;
}

.mic .ring:nth-child(3) {
  animation-delay: 1.7s;
}

@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.mic:hover .mic-circle {
  transform: scale(1.04);
}

.mic-label {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.mic:hover .mic-label {
  background: var(--blue-deep);
}

.mic-note {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}

.facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- participant: interview ---------- */

.interview-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.voice-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.orb {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
}

.orb svg {
  width: 34px;
  height: 34px;
}

.orb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.orb[data-state="ai"] {
  background: var(--blue);
  color: #fff;
}

.orb[data-state="ai"]::after {
  border-color: rgba(5, 86, 243, 0.35);
  animation: pulse 1.1s ease-in-out infinite;
}

.orb[data-state="thinking"]::after,
.orb[data-state="working"]::after {
  border-color: var(--blue) transparent var(--blue) transparent;
  animation: spin 1s linear infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.12);
    opacity: 0.4;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.voice-status {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}

.clock {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.wave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  height: 64px;
  margin: 20px 0 22px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
}

.wave span {
  flex: 1 1 0;
  max-width: 5px;
  height: 44px;
  border-radius: 3px;
  background: #b9c6da;
  transform: scaleY(0.1);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.wave[data-state="ai"] span,
.wave[data-state="you"] span {
  animation: wave 0.9s ease-in-out infinite;
}

.wave[data-state="ai"] span {
  background: var(--blue);
}

.wave[data-state="you"] span {
  background: var(--ink-2);
}

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.14);
  }
  50% {
    transform: scaleY(var(--h, 0.8));
  }
}

.mini-h {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topics {
  list-style: none;
  display: grid;
  gap: 6px;
}

.topics li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 15px;
}

.topics .num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12px;
  font-weight: 700;
}

.topics .is-done {
  color: var(--ink-2);
}

.topics .is-done .num {
  border-color: var(--green-bg);
  background: var(--green-bg);
  color: var(--green-ink);
}

.topics .is-current {
  background: var(--blue-light);
  color: var(--blue-deep);
  font-weight: 600;
}

.topics .is-current .num {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.voice-actions {
  margin-top: 20px;
}

.mic-off {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.mic-off svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.transcript {
  height: 500px;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
  border-radius: var(--radius-sm);
  scroll-behavior: smooth;
}

.turns {
  list-style: none;
  display: grid;
  gap: 16px;
}

.turn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: rise 0.25s ease-out both;
}

.turn-you {
  flex-direction: row-reverse;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.turn-ai .avatar {
  background: var(--blue);
  color: #fff;
}

.turn-you .avatar {
  background: var(--ink);
  color: #fff;
}

.avatar svg {
  width: 18px;
  height: 18px;
}

.turn-body {
  max-width: min(560px, 82%);
}

.turn-you .turn-body {
  text-align: right;
}

.who {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.bubble {
  display: inline-block;
  padding: 11px 15px;
  border-radius: 4px 16px 16px 16px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  text-align: left;
}

.turn-you .bubble {
  border-radius: 16px 4px 16px 16px;
  background: var(--blue-light);
  border-color: #cfe0fb;
  color: var(--ink);
}

.turn.is-speaking .bubble::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -2px;
  animation: blink 0.8s steps(2) infinite;
}

.dots {
  display: inline-flex;
  gap: 4px;
  padding: 6px 2px;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  animation: dot 0.9s ease-in-out infinite;
}

.dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.turn-note {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- participant: read-back and confirmed ---------- */

.readback {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

.rb-section {
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  animation: rise 0.35s ease-out both;
}

.rb-section h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.rb-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.rb-list li {
  position: relative;
  padding-left: 22px;
}

.rb-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.change {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  border: 1px solid var(--line);
}

.change label {
  font-weight: 600;
}

.change textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #8d99ad;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

.change textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

.hint {
  color: var(--muted);
  font-size: 14px;
}

.change .btn {
  justify-self: start;
  margin-top: 6px;
}

.done-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 8px 0 18px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green-ink);
}

.done-icon svg {
  width: 32px;
  height: 32px;
}

.steps {
  margin-top: 12px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
}

/* ---------- admin ---------- */

.admin-bar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.admin-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
}

.campaign-name {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.campaign-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  color: var(--muted);
  font-size: 14px;
}

.subnav {
  display: flex;
  gap: 4px;
  margin-top: 12px;
}

.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.subnav a:hover {
  color: var(--blue);
}

.subnav a[aria-current="page"] {
  border-bottom-color: var(--blue);
  color: var(--blue-deep);
}

.tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tiles-stack {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
}

.tile {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.tile-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.tile-value {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tiles-stack .tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tiles-stack .tile-value {
  font-size: 32px;
}

.tile-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table th:first-child,
.table td:first-child {
  padding-left: 4px;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table .muted {
  color: var(--muted);
}

.pid {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.role {
  display: block;
  font-weight: 600;
}

.row-link {
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.row-link:hover {
  text-decoration: underline;
}

@media (min-width: 1100px) {
  .table-interviews .role,
  .table-interviews td:nth-child(2) {
    white-space: nowrap;
  }
}

.coverage {
  list-style: none;
  display: grid;
  gap: 12px;
}

.cov-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.cov-row .count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar {
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.top-list {
  list-style: none;
  display: grid;
  gap: 4px;
  counter-reset: top;
}

.top-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  counter-increment: top;
}

.top-list li::before {
  content: counter(top);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 700;
}

.top-list .t-name {
  font-weight: 600;
}

.top-list .t-teams {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.top-list .t-hours {
  font-family: var(--display);
  font-weight: 600;
  white-space: nowrap;
}

/* record */

.pick {
  display: grid;
  gap: 4px;
  min-width: 260px;
}

.pick label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pick select {
  min-height: 44px;
  padding: 0 40px 0 12px;
  border: 1px solid #8d99ad;
  border-radius: 10px;
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230b1220' stroke-width='1.6'/%3E%3C/svg%3E")
    no-repeat right 14px center / 12px 8px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
}

.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 20px;
  align-items: start;
}

.record-main > * + * {
  margin-top: 20px;
}

.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
}

.meta dt,
.task-grid dt,
.ev-stats dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.meta dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  color: var(--ink-2);
}

.tasks {
  list-style: none;
  display: grid;
  gap: 16px;
}

.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-head h3 {
  font-size: 18px;
}

.hours {
  flex: none;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.task-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 18px 0 0;
}

.task-grid dd {
  margin: 6px 0 0;
}

.task-grid .full {
  grid-column: 1 / -1;
}

.handoffs {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.handoffs .arrow {
  margin: 0 6px;
  color: var(--blue);
  font-weight: 700;
}

.handoffs strong {
  font-weight: 600;
}

.handoffs .via {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.fit-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 15px;
}

.quote {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: var(--blue-soft);
  color: var(--ink-2);
  font-style: italic;
}

.task-link {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.task-link a {
  font-weight: 600;
}

.side > * + * {
  margin-top: 20px;
}

.side h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.glance {
  list-style: none;
  display: grid;
  gap: 10px;
}

.glance li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.glance strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.side details summary {
  cursor: pointer;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  list-style-position: outside;
}

.mini-transcript {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
}

.mini-transcript .who {
  margin: 0;
}

.side-note {
  color: var(--muted);
  font-size: 14px;
}

/* map */

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: stretch;
}

.map-grid-lower {
  align-items: start;
}

@media (min-width: 1025px) {
  .map-grid-lower .evidence {
    position: sticky;
    top: 16px;
  }
}

#h-evidence {
  scroll-margin-top: 24px;
}

.chart {
  width: 100%;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart text {
  font-family: var(--font);
}

.evidence h2 {
  font-size: 22px;
  margin-top: 6px;
}

.evidence .does {
  margin-top: 10px;
  color: var(--ink-2);
}

.ev-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 12px 20px;
  margin: 18px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.ev-stats dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}

.evidence h3 {
  margin: 20px 0 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.evidence .fit-line {
  margin-top: 16px;
}

.quotes {
  list-style: none;
  display: grid;
  gap: 12px;
}

.quotes blockquote {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: var(--blue-soft);
  font-style: italic;
  color: var(--ink-2);
}

.quotes .cite {
  margin-top: 4px;
  padding-left: 17px;
  color: var(--muted);
  font-size: 13px;
}

.table-map .rank {
  width: 44px;
  font-family: var(--display);
  font-weight: 600;
}

.cand-name {
  font-weight: 600;
  text-decoration: none;
}

.cand-name:hover {
  text-decoration: underline;
}

.cand-name[aria-current="true"] {
  color: var(--blue-deep);
}

.table-map .unit {
  display: none;
}

.table-map th {
  white-space: normal;
  vertical-align: bottom;
}

.table-map th:first-child,
.table-map td:first-child {
  padding-left: 14px;
}

/* Beside the evidence panel (from 1200px) the table gets about 630px: the numeric headers wrap and
   the agent names keep 150px, so the Fit column stays inside the card. From 1025 to 1199px that is
   still too narrow, so the panel goes under the table there, as it does below 1025px. */
.table-map td.cell-lead {
  min-width: 150px;
}

.table-map th.num {
  white-space: normal;
}

@media (min-width: 1025px) and (max-width: 1199px) {
  .map-grid-lower {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-grid-lower .evidence {
    position: static;
  }
}

.table-map tr.is-selected td {
  background: var(--blue-soft);
}

.table-map tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

.method {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}

.foot .wrap {
  padding-top: 20px;
  padding-bottom: 24px;
}

.foot p {
  max-width: 90ch;
}

/* ---------- smaller screens ---------- */

@media (max-width: 1024px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tiles-stack {
    order: -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .record-grid,
  .map-grid,
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .interview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .orb {
    width: 60px;
    height: 60px;
  }

  .orb svg {
    width: 28px;
    height: 28px;
  }

  .voice-actions {
    margin-top: 16px;
  }

  .wave {
    height: 48px;
    margin: 16px 0;
  }

  .wave span {
    height: 34px;
  }

  .topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .topics li {
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-size: 13px;
    gap: 6px;
  }

  .topics .num {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .mic-off {
    margin-top: 12px;
  }

  .transcript {
    height: 420px;
  }
}

/* tables become stacked rows: the latest-interviews table needs about 820px (819px with Inter),
   and its card's content box is narrower than that below about 917px, so the rows stack up to 940px */
@media (max-width: 940px) {
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .table tr + tr {
    margin-top: 10px;
  }

  .table td,
  .table td:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border: 0;
    text-align: right;
  }

  .table td[data-label]::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
  }

  .table td.cell-lead {
    display: block;
    padding-bottom: 8px;
    text-align: left;
  }

  .table td.is-empty {
    display: none;
  }

  .table td.cell-action {
    justify-content: flex-start;
    padding-top: 8px;
    text-align: left;
  }

  .table .num {
    white-space: normal;
  }

  .table-map .rank {
    width: auto;
  }

  .table-map .unit {
    display: inline;
  }

  .table-map tr.is-selected {
    border-color: var(--blue);
    background: var(--blue-soft);
  }

  .table-map tr.is-selected td,
  .table-map tr.is-selected td:first-child {
    background: none;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  h1 {
    font-size: 27px;
  }

  .topbar-inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .proto-name {
    font-size: 17px;
  }

  .viewnav {
    width: 100%;
  }

  .viewnav a {
    flex: 1 1 0;
    min-height: 36px;
    padding: 0 10px;
  }

  /* the header's Sample data label is in view at the top of every screen; skip the repeats */
  .admin-bar .sample,
  .view-head > .sample {
    display: none;
  }

  .admin-bar-inner {
    padding-top: 14px;
  }

  .campaign-meta {
    font-size: 13px;
  }

  .subnav {
    margin-top: 6px;
  }

  .view {
    padding-top: 24px;
  }

  .view-head {
    margin-bottom: 18px;
  }

  .card {
    padding: 20px 18px;
  }

  .lede {
    font-size: 16px;
  }

  .mic-wrap {
    margin-top: 28px;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiles {
    gap: 12px;
  }

  .tile {
    padding: 14px 16px;
  }

  .tile-value {
    font-size: 28px;
  }

  .tiles-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiles-stack .tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    align-items: baseline;
  }

  .tiles-stack .tile-value {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 26px;
  }

  .tiles-stack .tile-note {
    grid-column: 1;
    margin-top: 2px;
  }

  .subnav {
    gap: 0;
  }

  .subnav a {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 6px;
    font-size: 14px;
    text-align: center;
  }

  .pick {
    min-width: 0;
    width: 100%;
  }

  /* the menu fits its column; a long participant label is cut off inside it instead of
     widening the page */
  .pick select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta > div:last-child {
    grid-column: 1 / -1;
  }

  .task-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-head h3 {
    font-size: 17px;
  }

  .ev-stats dd {
    font-size: 18px;
  }

  .turn-body {
    max-width: 86%;
  }

  .actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .wave[data-state="ai"] span,
  .wave[data-state="you"] span {
    transform: scaleY(var(--h, 0.6));
  }
}
