:root {
  --bg: #f3f1ec;
  --surface: #fdfcfa;
  --ink: #201f26;
  --muted: #68646e;
  --line: #dfdcd6;
  --brand: #4f4cd6;
  --brand-soft: #efedf8;
  --brand-hover: #3f3cb8;
  --brand-line: #d9d4ee;
  --surface-soft: #f5f3ef;
  --smoke: #55515e;
  --focus: #a5a2ed;
  --radius: 12px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  accent-color: var(--brand);
}
::selection { background: var(--brand); color: #fdfcfa; }
.batch-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 21px;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  background: var(--surface);
  border-left: 3px solid var(--brand);
}
.batch-banner strong {
  font-size: 13px;
  color: var(--smoke);
}
.batch-banner p {
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.worker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.worker-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface);
  min-width: 0;
}
.worker-card.failed { border-color: #d9a6a0; background: #fff7f5; }
.worker-card.calling { border-color: var(--brand-line); background: var(--brand-soft); }
.worker-node { display: block; font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.worker-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 11px; }
.worker-top .badge { padding: 2px 6px; font-size: 10px; }
.worker-contact { display: block; font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worker-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.worker-card a { color: var(--brand); font-weight: 600; }
.worker-location { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worker-error { margin-top: 5px; font-size: 11px; color: #963e35; }
.worker-error summary { cursor: pointer; }
.worker-error p { max-height: 100px; overflow: auto; color: inherit; }
.notification-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
  padding: 18px 21px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.notification-copy { flex: 1 1 240px; }
.notification-controls h2 { margin: 0; font-size: 13px; }
.notification-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.notification-buttons a { font-size: 12px; }
.notification-controls p { font-size: 12px; margin: 5px 0 0; line-height: 1.5; }
@media (max-width: 760px) {
  .worker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}
@media (max-width: 420px) {
  .worker-grid { grid-template-columns: 1fr; }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
a {
  color: var(--brand);
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button,
select,
input,
textarea {
  border-radius: 8px;
}
.topbar {
  height: 77px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand-logo { display: block; width: 170px; height: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 740;
  font-size: 22px;
  letter-spacing: -0.8px;
  text-decoration: none;
  color: var(--ink);
}
.brand-divider {
  font-weight: 350;
  color: var(--line);
  padding: 0 12px;
}
.brand-section {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--smoke);
}
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.primary-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.primary-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.workspace {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 20px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  flex-shrink: 0;
}
main {
  max-width: 1512px;
  margin: auto;
  padding: 39px 5% 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-bottom: 9px;
}
h1 {
  font-family: "Averia Serif Libre", Georgia, serif;
  font-size: 42px;
  letter-spacing: -0.8px;
  font-weight: 300;
  margin: 0 0 10px;
}
.title-dot {
  color: var(--brand);
}
.subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  min-height: 38px;
  text-decoration: none;
  white-space: nowrap;
}
.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--smoke);
}
.button.secondary:hover {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.button.primary {
  background: var(--brand);
  color: white;
}
.button.primary:hover {
  background: var(--brand-hover);
}
.button span[aria-hidden] {
  font-size: 16px;
  line-height: 1;
}
.stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 15px;
  margin-bottom: 27px;
}
.stat {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 21px;
  position: relative;
}
.stat > span {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: var(--smoke);
}
.stat > strong {
  display: block;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-weight: 570;
  margin: 11px 0 9px;
  font-variant-numeric: tabular-nums;
}
.stat small {
  color: var(--muted);
  font-size: 11px;
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(325px, 0.78fr) minmax(0, 1.3fr);
  gap: 23px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.browser-heading {
  padding: 23px 22px 19px;
  display: flex;
  align-items: center;
  gap: 9px;
}
h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.25px;
  font-weight: 650;
}
.count {
  background: var(--surface-soft);
  color: var(--smoke);
  font-size: 11px;
  font-weight: 600;
  min-width: 23px;
  text-align: center;
  padding: 3px 7px;
  border-radius: 6px;
}
.search-wrap {
  margin: 0 20px 12px;
  position: relative;
}
.search-wrap > span {
  position: absolute;
  left: 12px;
  top: 6px;
  font-size: 23px;
  color: var(--muted);
}
.search-wrap input {
  width: 100%;
  padding: 11px 12px 11px 36px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  min-width: 0;
}
.search-wrap input::placeholder {
  color: var(--muted);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}
.filters select {
  flex: 1 1 140px;
  border: 1px solid var(--line);
  padding: 8px 23px 8px 10px;
  color: var(--smoke);
  background: var(--surface);
  font-size: 11px;
  min-width: 0;
  max-width: 100%;
}
.list-label {
  display: flex;
  justify-content: space-between;
  padding: 11px 23px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 1.1px;
  font-weight: 650;
  color: var(--muted);
}
.call-list {
  max-height: 670px;
  overflow: auto;
}
.call-row {
  width: 100%;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 19px 19px 19px 16px;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
  position: relative;
}
.call-row:hover {
  background: var(--surface-soft);
}
.call-row.selected {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}
.avatar {
  height: 38px;
  width: 38px;
  flex-shrink: 0;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.4px;
}
.avatar.sage {
  background: var(--brand-soft);
  color: var(--brand);
}
.row-body {
  flex: 1;
  min-width: 0;
}
.row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.row-name {
  font-size: 13px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-duration {
  font-size: 11px;
  color: var(--smoke);
  font-variant-numeric: tabular-nums;
}
.row-phone {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: 0.3px;
}
.row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.row-time {
  font-size: 10px;
  color: var(--muted);
}
.badge {
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 5px;
  line-height: 1.25;
  background: var(--surface-soft);
  color: var(--smoke);
  font-weight: 550;
}
.badge.green {
  background: #eaf1ea;
  color: #45664d;
}
.badge.amber {
  background: #f7efdf;
  color: #7b591f;
}
.badge.red {
  background: #f7e9e6;
  color: #8f493d;
}
.badge.dark {
  background: var(--surface-soft);
  color: var(--smoke);
}
.row-review {
  font-size: 9px;
  margin-left: 6px;
  color: var(--muted);
}
.list-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 21px;
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-soft);
}
.detail {
  min-height: 550px;
}
.detail-heading {
  padding: 26px 27px 21px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.detail-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-identity .avatar {
  height: 44px;
  width: 44px;
  font-size: 13px;
}
.detail-identity h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.detail-identity p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.detail-heading .badge {
  margin-top: 4px;
}
.detail-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
#answer-type-controls { display: flex; align-items: center; gap: 8px; }
#answer-type-controls[hidden] { display: none; }
#answer-type-controls select { max-width: 180px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; }
#analysis-panel .analysis-details { margin-top: 18px; border-top: 0; }
#analysis-panel .analysis-details > summary { padding: 0 0 16px; }
#analysis-panel .analysis-details > .disclosure-body { padding: 0 0 16px; }
.review-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b44c49; margin: 0 5px; vertical-align: middle; flex-shrink: 0; }
.review-status-dot.reviewed { background: #43845b; }
.review-status-dot.flagged { background: #b78332; }
.detail-meta {
  padding: 0 27px 21px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}
.detail-meta span + span:before {
  content: "·";
  padding-right: 15px;
  color: #b6bfb6;
}
.player-card {
  margin: 0 26px 23px;
  padding: 19px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--smoke);
  text-transform: uppercase;
}
.audio-ready {
  font-size: 10px;
  color: var(--smoke);
  display: flex;
  align-items: center;
  gap: 6px;
}
audio {
  width: 100%;
  height: 44px;
  display: block;
  border-radius: 25px;
}
.player-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}
.player-footer > span { flex: 1 1 190px; }
.player-footer > label { display: inline-flex; align-items: center; gap: 4px; }
.player-footer > label, .player-footer > a { flex-shrink: 0; white-space: nowrap; }
.player-footer select {
  border: 1px solid var(--line);
  font-size: 10px;
  background: transparent;
  padding: 3px 5px;
  color: var(--brand);
}
.text-link {
  font-size: 10px;
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
}
.text-link:hover {
  text-decoration: underline;
}
.section {
  padding: 21px 27px;
  border-top: 1px solid var(--line);
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.section-top h3 {
  font-size: 12px;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.1px;
}
.section-note {
  font-size: 10px;
  color: var(--muted);
}
.agent-bubble {
  border-left: 2px solid var(--brand-line);
  padding: 2px 0 2px 14px;
  line-height: 1.85;
  font-size: 13px;
  color: var(--smoke);
  white-space: pre-wrap;
  max-height: 260px;
  overflow: auto;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.disclosure {
  border-top: 1px solid var(--line);
}
.disclosure > summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 27px;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}
.disclosure > summary::-webkit-details-marker {
  display: none;
}
.disclosure > summary:after {
  content: "+";
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
}
.disclosure[open] > summary:after {
  content: "−";
}
.disclosure-body {
  padding: 0 27px 22px;
}
.prompt {
  margin: 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--smoke);
}
.technical {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 11px;
  font-size: 11px;
  margin: 17px 0 0;
}
.technical dt {
  color: var(--muted);
}
.technical dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  color: var(--smoke);
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 7px;
  border-left: 1px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 15px 13px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li:before {
  content: "";
  position: absolute;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: var(--brand-line);
  left: -10px;
  top: 5px;
}
.timeline time {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.timeline p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--smoke);
  margin: 0;
  overflow-wrap: anywhere;
}
.review-section {
  background: var(--surface-soft);
}
.review-options {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.review-option {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 11px;
  font-size: 11px;
  color: var(--muted);
}
.review-option.active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}
.review-option[data-status="flagged"].active {
  background: #fff3da;
  border-color: #e9d9b4;
  color: #7b591f;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--smoke);
}
textarea::placeholder {
  color: var(--muted);
}
.review-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.save-state {
  font-size: 10px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 17px 27px;
  border-top: 1px solid var(--line);
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--smoke);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.link-button:hover {
  text-decoration: underline;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 23px 0 26px;
  font-size: 10px;
  color: var(--muted);
  align-items: center;
  gap: 20px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--muted); text-decoration: none; }
.footer-brand img { display: block; width: 118px; height: auto; }
.empty-state {
  padding: 45px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.empty-state.large {
  padding: 110px 30px;
}
.error {
  border: 1px solid #ead0c7;
  background: #fff1ec;
  padding: 13px 17px;
  border-radius: 9px;
  color: #995844;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  color: white;
  background: var(--ink);
  box-shadow: 0 4px 24px #10101420;
  border-radius: 8px;
  font-size: 12px;
  z-index: 20;
}
.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;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  main {
    padding-left: 35px;
    padding-right: 35px;
  }
}
@media (max-width: 1050px) {
  main {
    padding: 30px 3% 0;
  }
  .review-layout {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.2fr);
    gap: 16px;
  }
  .topbar {
    padding: 0 3%;
  }
  .detail-heading {
    padding: 22px 20px 18px;
  }
  .detail-meta {
    padding-left: 20px;
    padding-right: 20px;
  }
  .player-card {
    margin-left: 19px;
    margin-right: 19px;
  }
  .section,
  .disclosure > summary,
  .footer-links {
    padding-left: 20px;
    padding-right: 20px;
  }
  .disclosure-body {
    padding-left: 20px;
    padding-right: 20px;
  }
  .section-note {
    max-width: 135px;
    text-align: right;
    line-height: 1.5;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 63px;
    padding: 0 20px;
  }
  .brand-logo { width: 140px; }
  .primary-nav a { padding: 8px 10px; }
  .brand {
    font-size: 20px;
  }
  .brand-divider {
    padding: 0 5px;
  }
  .workspace {
    font-size: 0;
    padding: 8px;
  }
  .workspace .status-dot {
    height: 7px;
    width: 7px;
  }
  main {
    padding: 27px 16px 0;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 22px;
    gap: 15px;
  }
  h1 {
    font-size: 34px;
  }
  .subtitle {
    font-size: 12px;
    max-width: 235px;
  }
  .page-heading .button {
    padding: 8px 10px;
    font-size: 10px;
    min-height: 34px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.3px;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .stat {
    padding: 15px 17px;
  }
  .stat > strong {
    font-size: 27px;
    margin: 8px 0;
  }
  .stat small {
    font-size: 10px;
  }
  .review-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .call-list {
    max-height: 342px;
  }
  .browser-heading {
    padding: 18px 20px;
  }
  .call-row {
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .detail {
    min-height: 300px;
  }
  .detail-heading {
    padding-top: 22px;
  }
  .detail-heading .badge {
    max-width: 115px;
  }
  .detail-meta {
    gap: 10px;
  }
  .detail-meta span + span:before {
    padding-right: 10px;
  }
  .detail-identity h2 {
    font-size: 19px;
  }
  .player-card {
    padding: 15px;
  }
  .page-footer {
    font-size: 9px;
    gap: 15px;
    flex-wrap: wrap;
  }
  .section-note {
    max-width: none;
  }
  .review-actions {
    gap: 10px;
  }
  .save-state {
    max-width: 180px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .call-row,
  .button,
  .review-option {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
}

.analysis-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 8px 20px; margin: 10px 0 0; color: var(--smoke); font-size: 12px; }
.analysis-counts > div, .analysis-counts > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px; text-align: left; }
.analysis-counts strong { color: var(--ink); font-size: 12px; line-height: inherit; letter-spacing: normal; margin: 0; white-space: nowrap; }
.analysis-counts small { font-weight: 400; font-variant-numeric: tabular-nums; }
.recording-filter { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.recording-filter[aria-pressed="true"] { color: var(--brand); font-weight: 600; }
.call-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; margin-bottom: 18px; overflow: visible; position: relative; z-index: 21; }
.call-filters .search-wrap { flex: 1 1 240px; margin: 0; }
.call-filters .filters { display: contents; }
.call-filters select { width: auto; flex: 1 1 160px; max-width: 100%; }
.call-filters .filters[hidden] { display: none; }
.ai-review-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.classifier-preview-controls { display: contents; }
.classifier-improvement { display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem; width: 100%; }
.classifier-improvement-details { width: 100%; }
.classifier-improvement-details pre { white-space: pre-wrap; font: inherit; font-size: .85rem; color: var(--muted); }
.queue-filters #review-filter, .queue-filters #outcome-filter { display: none; }
.queue-filters .filters:has(#analysis-filter), .queue-filters .filters:has(#call-outcome-filter), .queue-filters #subcategory-filter-row { display: none; }
.ai-review-modes label { display: flex; align-items: center; gap: 8px; color: var(--smoke); font-size: 12px; min-width: 0; }
.ai-review-modes select { max-width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.classifier-preview-controls p { flex-basis: 100%; margin: 0; }
.label-review .section-top { margin-bottom: 10px; }
.label-review .outcome-assignment { display: block; width: 100%; max-width: 360px; margin: 0; }
.label-review .outcome-assignment select { width: 100%; max-width: 360px; }
.classifier-proposal { margin-top: 14px; }
.proposal-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.proposal-line h3 { margin: 0; font-size: 12px; line-height: 1.5; font-weight: 600; }
.proposal-line .button { padding: 6px 10px; min-height: 30px; font-size: 11px; white-space: nowrap; }
.proposal-inline-label { font-weight: 500; color: var(--smoke); }
.proposal-overridden { text-decoration: line-through; color: var(--muted); }
.proposal-evidence { margin-top: 14px; font-size: 12px; color: var(--smoke); }
.proposal-evidence summary { cursor: pointer; }
.proposal-evidence ul { padding-left: 20px; }
.proposal-evidence li { margin: 8px 0; }
@media (max-width: 480px) {
  .topbar { padding: 0 12px; }
  .brand-logo { width: 112px; }
  .primary-nav { gap: 2px; }
  .primary-nav a { padding: 8px 7px; font-size: 11px; }
  .heading-actions { width: 100%; }
}
#experiment-tag-filter { flex: 1 1 180px; min-width: 0; }
#experiment-tag-filter .cohort-field > span { display: none; }
#experiment-tag-filter .multi-select { position: relative; min-width: 0; }
#experiment-tag-filter summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); list-style: none; cursor: pointer; }
#experiment-tag-filter summary::-webkit-details-marker { display: none; }
#experiment-tag-filter summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#experiment-tag-filter summary::after { content: "⌄"; flex-shrink: 0; }
#experiment-tag-filter summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#experiment-tag-filter .multi-select-menu { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; min-width: 220px; z-index: 20; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #201f261a; }
#experiment-tag-filter .multi-select-menu > .link-button { margin-bottom: 8px; text-align: left; }
#experiment-tag-filter .multi-select-options { max-height: min(260px, 50vh); overflow-y: auto; overscroll-behavior-y: contain; }
#experiment-tag-filter .multi-select-options label { display: flex; align-items: flex-start; gap: 8px; padding: 8px 4px; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
#experiment-tag-filter .multi-select-options label:hover { background: var(--surface-soft); }
#experiment-tag-filter .multi-select-options input { flex-shrink: 0; margin: 1px 0 0; }
.analysis-explanation { font-size: 13px; line-height: 1.7; color: var(--smoke); }
.analysis-error { color: #995844; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.analysis-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 24px; font-size: 12px; color: var(--smoke); }
.analysis-controls select { padding: 7px; border: 1px solid var(--line); background: var(--surface); margin-left: 5px; }
.analysis-controls .button { font-size: 11px; min-height: 32px; padding: 7px 10px; }
.evidence { display: grid; gap: 7px; }
.evidence-link { text-align: left; color: var(--brand); border: 0; border-left: 2px solid var(--brand-line); background: var(--surface-soft); padding: 9px 12px; font-size: 12px; line-height: 1.6; }
.transcript { max-height: 470px; overflow: auto; padding-right: 8px; }
.transcript-turn { display: grid; grid-template-columns: 42px 1fr; gap: 8px; border-top: 1px solid var(--line); padding: 12px 0; }
.turn-time { align-self: start; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--brand); border: 0; padding: 4px 0; background: none; }
.transcript-turn p { font-size: 13px; line-height: 1.7; margin: 0 0 7px; color: var(--smoke); }
.transcript-turn strong { display: block; font-size: 10px; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.transcript-turn .callee { color: var(--smoke); }
.filters select { min-width: 0; }
#worker-summary { margin: 0 0 10px; }

.real-outcomes { margin-bottom: 23px; padding: 22px 26px; }
.outcomes-heading, .category-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.category-dialog-heading > :first-child { flex: 1; min-width: 0; }
.category-dialog-heading > .button { flex-shrink: 0; }
.outcomes-heading h2, .category-dialog-heading h2 { font-size: 17px; margin: 0 0 7px; }
.outcomes-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.outcome-heading-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.outcome-display { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.outcome-display button { border: 0; background: transparent; padding: 8px 10px; color: var(--muted); font-size: 11px; cursor: pointer; }
.outcome-display button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.outcome-bar { display: block; height: 6px; margin: 4px 0; background: var(--line); border-radius: 3px; overflow: hidden; }
.outcome-bar > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.outcome-fit:hover { background: var(--surface-soft); border-color: var(--line); }
.fit-note { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.classifier-label { display: inline-flex; align-items: baseline; gap: 5px; }
.classifier-agreement { font-variant-numeric: tabular-nums; color: var(--smoke); cursor: help; white-space: nowrap; }
.classifier-separator { color: var(--muted); }
.real-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 22px 0; }
.real-totals span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.real-totals strong { font-size: 30px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; color: var(--ink); }
#real-call-count { color: var(--brand); }
.outcome-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.outcome-metric { text-align: left; border: 1px solid var(--line); background: var(--surface-soft); padding: 13px 15px; color: var(--smoke); display: grid; gap: 8px; min-width: 0; }
.outcome-metric:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.outcome-metric[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.outcome-metric > span { font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.outcome-metric strong { font-size: 20px; color: var(--ink); }
.outcome-metric small { font-size: 11px; font-weight: 400; }
.outcome-badge { background: var(--brand-soft); color: var(--brand); }
.outcome-assignment { color: var(--smoke); font-size: 12px; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
.outcome-assignment select { max-width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); background: var(--surface); }
#category-dialog { border: 1px solid var(--line); border-radius: 14px; width: min(600px, calc(100vw - 32px)); padding: 25px; max-height: 85vh; overflow: auto; color: var(--smoke); background: var(--surface); }
#category-dialog::backdrop { background: #10101460; }
.add-category-form { margin: 20px 0; }
.add-category-form > label { display: block; font-size: 12px; margin-bottom: 8px; }
.add-category-form > div { display: flex; gap: 10px; }
#category-dialog input { width: 100%; min-width: 0; border: 1px solid var(--line); padding: 10px; font-size: 13px; border-radius: 6px; }
.category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); }
.category-row .button { padding: 7px 10px; font-size: 11px; }
.delete-category { color: #995844; }
@media (max-width: 760px) {
  .real-outcomes { padding: 20px; }
  .outcomes-heading { flex-wrap: wrap; }
  .real-totals { gap: 12px; }
  .real-totals strong { font-size: 26px; }
  .outcome-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #category-dialog { padding: 20px; }
  .category-dialog-heading { flex-wrap: wrap; }
  .category-row { grid-template-columns: 1fr 1fr; }
  .category-row label { grid-column: 1 / -1; }
}

.call-view-controls { margin: 0 0 25px; }
.call-view-switches, .results-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.call-view-switches { justify-content: space-between; }
.segmented-control { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.segmented-control button { padding: 10px 20px; border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 600; }
.segmented-control button[aria-pressed="true"] { color: var(--brand); border-color: var(--brand-line); background: var(--surface); box-shadow: 0 1px 3px #201f260a; }
.call-view-controls p { font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
.imported-notes { white-space: pre-wrap; line-height: 1.7; }
@media (max-width: 760px) { .call-view-switches { align-items: flex-start; flex-direction: column; } .segmented-control button { padding: 10px 17px; } }

.history-pages { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border, #ddd); }
.history-pages .button { padding: 7px 12px; }
#page-label { font-size: 12px; color: var(--muted, #62616d); }

.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.heading-actions a { text-decoration: none; }

/* Cohort controls and conversation review share the established dashboard palette. */
.cohort-panel, .import-panel { padding: 20px 24px; margin-bottom: 20px; }
.cohort-panel h2 { font-size: 18px; margin: 0; }
.followup-settings { padding: 24px; margin-bottom: 24px; }
.compute-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.compute-heading h2 { margin: 0; }
.compute-summary { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.compute-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.compute-target { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.compute-target input { width: 72px; height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--surface, white); color: inherit; }
.compute-controls .button { min-height: 34px; padding: 6px 14px; }
.compute-hint { margin: 12px 0 0; font-size: 12px; }
.compute-error { margin-top: 10px; font-size: 12px; color: var(--muted); }
.compute-error p { max-width: 70ch; overflow-wrap: anywhere; }
.sequence-compute { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; font-size: 12px; }
.followup-settings-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.followup-settings-fields input { min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; }
.followup-settings-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.followup-settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; font-size: 13px; }
.cohort-controls { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.cohort-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 12px; color: var(--muted); }
.cohort-field select, #new-category-parent, .conversation-group-form input, .conversation-group-form select, .conversation-group-form textarea {
  width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; background: var(--surface); color: var(--ink); font: inherit; text-overflow: ellipsis;
}
.cohort-field select { height: 40px; }
.conversation-panel { padding: 24px; border-top: 1px solid var(--line); }
details.conversation-panel { padding: 0; }
.conversation-panel .cohort-field { margin-top: 18px; }
.conversation-quote { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--bg); font-size: 13px; line-height: 1.7; }
.conversation-quote .link-button { display: block; margin-top: 8px; }
.group-summary { font-size: 12px; color: var(--muted); margin: 8px 0; }
.conversation-dialog { width: min(900px,calc(100vw - 32px)); max-height: 85vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); color: var(--ink); }
.conversation-dialog::backdrop { background: #18172866; }
.conversation-group-form { display: grid; grid-template-columns: 95px minmax(100px,1fr) minmax(120px,2fr) auto; gap: 10px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.conversation-group-form .link-button { grid-column: 4; }
.category-parent { color: var(--muted); font-size: 11px; }
.technical dd { overflow-wrap: anywhere; }
#new-category-parent { margin-bottom: 10px; }
@media (max-width: 760px) {
  .cohort-controls { grid-template-columns: 1fr; }
  .cohort-panel, .import-panel, .conversation-panel { padding: 18px; }
  .conversation-group-form { grid-template-columns: 1fr; }
  .conversation-group-form .link-button { grid-column: 1; }
}
.import-steps { list-style: none; padding: 0; margin: 14px 0 0; width: 100%; display: grid; gap: 14px; }
.import-step { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; }
.import-step-mark { width: 20px; flex: 0 0 20px; text-align: center; color: var(--muted); font-size: 18px; line-height: 1.2; }
.import-step[data-state="complete"] .import-step-mark { color: #4f4cd6; }
.import-step[data-state="attention"] .import-step-mark { color: #a33c39; }
.import-step-label { display: block; margin-bottom: 3px; font-weight: 600; }
.import-step-state { color: var(--muted); font-size: 11px; }
.import-step-detail { color: var(--muted); font-size: 12px; margin: 4px 0 0; line-height: 1.5; }
#voicemail-sequence { padding: 16px 20px; overflow-x: auto; }
.sequence-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; font-size: 11px; color: var(--muted); }
.sequence-tags .pill { background: #f1f2ef; border-radius: 12px; padding: 3px 8px; }
.sequence-table { width: 100%; font-size: 12px; text-align: left; border-collapse: collapse; }
.sequence-table th, .sequence-table td { padding: 6px 8px; }
.sequence-table th { font-weight: 500; }
.sequence-contact { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12px; }
.sequence-contact span { color: var(--muted); }
.sequence-contacts:empty, .sequence-history:empty { display: none; }
.sequence-contacts { border-top: 1px solid #e5e7e2; padding-top: 12px; max-height: 260px; overflow: auto; }
.sequence-history { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; line-height: 1.6; margin: 0 27px 18px; padding: 10px 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.sequence-history .link-button { font-size: inherit; }
.sequences-page main { max-width: 1080px; margin: 0 auto; }
#sequence-scope { padding: 20px; }
.sequence-pool { display: flex; gap: 48px; margin: 24px 0; }
.sequence-pool div { display: grid; gap: 5px; }
.sequence-pool strong { font-size: 30px; font-weight: 600; }
.sequence-pool span { font-size: 12px; color: var(--muted); }
.followup-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.traffic-light { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.traffic-light.green { background: #298454; }
.traffic-light.amber { background: #c38b20; }
.traffic-light.red { background: #b94f48; }
.followup-criteria { color: var(--muted); font-size: 12px; margin-top: 14px; line-height: 1.6; }
.followup-criteria summary { cursor: pointer; }
.followup-criteria p { max-width: 760px; }
#sequence-scope + #voicemail-sequence { margin-top: 12px; }
#batch:has(+ .prospect-banner:not([hidden])) { margin-bottom: 10px; }
#voicemail-sequence.prospect-banner { padding: 14px 21px; margin-bottom: 22px; }
