:root {
  --ink: #17211b;
  --muted: #647067;
  --paper: #f4f1e9;
  --card: #fff;
  --line: #dcd8cd;
  --green: #174f39;
  --lime: #d7f068;
  --red: #a23b32;
  --amber: #946b16;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.5 ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
}
.site-header {
  min-height: 64px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink);
  color: #fff;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.brand span {
  color: var(--lime);
  font-weight: 500;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 64px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.detail-heading {
  align-items: center;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 5px;
}
h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0;
  max-width: 850px;
}
h2 {
  font-size: 19px;
  margin: 0 0 18px;
}
h3 {
  font-size: 14px;
  margin: 20px 0 8px;
}
.back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}
.approved,
.count {
  color: var(--muted);
  font-weight: 700;
}
.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.auth-card,
.card,
.customer-hero,
.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 10px #17211b0a;
}
.card {
  padding: 22px;
}
.wide {
  margin-bottom: 18px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
td,
th {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
td a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
tbody tr:hover {
  background: #faf9f5;
}
.status {
  display: inline-flex;
  border-radius: 99px;
  padding: 4px 9px;
  background: #e7e9e5;
  color: #455047;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-answered,
.status-completed,
.status-delivered,
.status-ready {
  background: #daf0df;
  color: #1d6436;
}
.status-calling,
.status-in_progress {
  background: #dcebf1;
  color: #245c72;
}
.status-needs_clarification,
.status-needs_review,
.status-partial {
  background: #f6e7bd;
  color: #75500c;
}
.status-failed,
.status-refused,
.status-undelivered {
  background: #f3d6d2;
  color: #812d25;
}
.business-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.business-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.inline-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.inline-actions form:first-child {
  display: flex;
  gap: 5px;
}
.inline-actions input {
  max-width: 130px;
}
.stacked-form {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
label {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
input,
textarea {
  width: 100%;
  border: 1px solid #bbb8ae;
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  background: #fff;
}
textarea {
  resize: vertical;
}
form p {
  margin: 10px 0;
}
.danger,
.danger-link,
.google-button,
.link-button,
.primary,
.secondary,
.view-switch {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.primary {
  background: var(--green);
  color: #fff;
  text-decoration: none;
}
.secondary {
  background: #e7ebe7;
  color: var(--ink);
}
.danger {
  background: var(--red);
  color: #fff;
}
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #202124;
  border: 1px solid #bbb8ae;
}
.google-button span {
  font-size: 18px;
  font-weight: 900;
  color: #4285f4;
}
.auth-link {
  display: inline-block;
  text-decoration: none;
}
.danger-link,
.link-button {
  padding: 5px;
  background: 0 0;
  color: inherit;
}
.danger-link {
  color: var(--red);
}
.view-switch {
  padding: 7px 10px;
  background: var(--lime);
  color: var(--ink);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.full {
  width: 100%;
}
.attempts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.attempt {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
}
details {
  margin-top: 13px;
}
pre {
  white-space: pre-wrap;
  font: 13px/1.5 inherit;
  background: #f7f5ef;
  padding: 12px;
  border-radius: 8px;
}
.outcome,
dl {
  display: grid;
  grid-template-columns: minmax(100px, 0.5fr) 1fr;
  gap: 6px 14px;
}
.outcome dt,
dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.outcome dd,
dd {
  margin: 0;
}
.conversation {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.bubble {
  max-width: 88%;
  border-radius: 11px;
  padding: 10px 12px;
  background: #f0eee8;
}
.bubble.outbound {
  align-self: flex-end;
  background: #e1ebdf;
}
.bubble p {
  margin: 3px 0;
}
.callout,
.sent-copy {
  padding: 12px;
  background: #f7f5ef;
  border-radius: 9px;
}
.empty,
.hint {
  color: var(--muted);
}
.notice {
  padding: 10px 13px;
  border-radius: 8px;
  background: #e1ebdf;
}
.error-text,
.notice.error {
  background: #f3d6d2;
  color: #812d25;
}
.notices {
  margin-bottom: 18px;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.timeline time {
  font-size: 12px;
  color: var(--muted);
}
.timeline span {
  display: block;
  color: var(--muted);
}
.auth-card {
  max-width: 440px;
  margin: 10vh auto;
  padding: 30px;
}
.errorlist {
  color: var(--red);
}
.customer-heading {
  margin-bottom: 18px;
}
.customer-hero {
  padding: clamp(24px, 5vw, 54px);
  margin-bottom: 18px;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.customer-hero .hint {
  color: #dbe6dc;
  margin: 18px 0 0;
}
.customer-lead {
  font-size: clamp(18px, 2.3vw, 25px);
  line-height: 1.35;
  max-width: 720px;
  margin: 0 0 24px;
}
.customer-cta {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
}
.customer-steps .card {
  min-height: 188px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--lime);
  font-weight: 800;
}
.customer-steps h2 {
  margin-bottom: 8px;
}
.customer-safety p,
.customer-steps p {
  margin: 0;
  color: var(--muted);
}
.customer-safety {
  max-width: 780px;
}
@media (max-width: 760px) {
  .site-header {
    padding: 12px 14px;
    align-items: flex-start;
    flex-direction: column;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .page-shell {
    padding: 24px 14px;
  }
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .inline-actions,
  .inline-actions form:first-child {
    align-items: stretch;
    flex-direction: column;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .card {
    padding: 17px;
  }
}
@media (max-width: 760px) {
  .business-row,
  .inline-actions,
  .inline-actions form:first-child {
    align-items: stretch;
    flex-direction: column;
  }
  .inline-actions input {
    max-width: none;
  }
}
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.site-footer a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}
.site-footer span {
  margin-left: auto;
}
.legal {
  max-width: 780px;
}
.legal-header {
  margin-bottom: 30px;
}
.legal-header .effective {
  color: var(--muted);
  margin: 10px 0 0;
}
.legal section {
  margin: 30px 0;
}
.legal h2 {
  margin-bottom: 10px;
}
.legal h3 {
  margin-bottom: 6px;
}
.legal li {
  margin: 7px 0;
}
.legal a {
  color: var(--green);
  font-weight: 700;
}
.legal-callout {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
@media (max-width: 760px) {
  .site-footer {
    margin: 0 14px;
    padding: 20px 0;
    flex-wrap: wrap;
  }
  .site-footer span {
    width: 100%;
    margin-left: 0;
  }
}
.customer-hero form {
  display: inline-block;
}
.customer-hero a {
  color: var(--lime);
  font-weight: 750;
}
.customer-hero a.customer-cta {
  color: var(--ink);
}
.job-list {
  margin-bottom: 18px;
}
.job-list h2 {
  margin: 0;
}
.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.job-row:first-of-type {
  margin-top: 16px;
}
.job-row:hover strong {
  color: var(--green);
}
.job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 0.7fr);
  gap: 18px;
  margin-bottom: 18px;
}
.chat-card {
  padding: 0;
  overflow: hidden;
}
.chat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.chat-heading h2 {
  margin: 0;
}
.chat-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.chat-heading > span {
  color: #3b9d58;
}
.chat-thread {
  min-height: 420px;
  max-height: 58vh;
  overflow: auto;
  padding: 22px;
  background: #f8f7f2;
}
.chat-thread .bubble {
  max-width: min(78%, 560px);
  padding: 10px 13px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px #17211b0a;
}
.chat-thread .bubble.inbound {
  align-self: flex-end;
  border: 0;
  border-radius: 16px 16px 4px 16px;
  background: var(--green);
  color: #fff;
}
.chat-thread .bubble p {
  margin: 0;
}
.chat-thread .bubble small {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.7;
}
.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-compose textarea {
  min-height: 48px;
  max-height: 140px;
}
.chat-compose button {
  height: 48px;
}
.chat-closed {
  margin: 0;
  padding: 15px 20px;
  background: #f7f5ef;
  color: var(--muted);
}
.job-summary {
  align-self: start;
}
.job-summary dl {
  grid-template-columns: 82px 1fr;
}
.results-card h2 {
  margin: 0;
}
.results-card > .section-heading {
  margin-bottom: 18px;
}
.results-table {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0 -22px -22px;
  width: calc(100% + 44px);
}
.results-table table {
  min-width: 940px;
}
.results-empty {
  padding: 28px;
  border: 1px dashed #bbb8ae;
  border-radius: 10px;
  text-align: center;
}
.results-empty p {
  margin: 6px 0 0;
  color: var(--muted);
}
.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;
}
@media (max-width: 760px) {
  .job-layout {
    grid-template-columns: 1fr;
  }
  .chat-thread {
    min-height: 360px;
  }
  .chat-thread .bubble {
    max-width: 88%;
  }
  .chat-compose {
    grid-template-columns: 1fr;
  }
  .chat-compose button {
    width: 100%;
  }
  .job-row {
    align-items: flex-start;
  }
  .results-table {
    margin: 0 -17px -17px;
    width: calc(100% + 34px);
  }
}
.job-title {
  font-size: clamp(26px, 3vw, 38px);
  max-width: 760px;
}
.chat-thread .bubble.outbound {
  align-self: flex-start;
  border-radius: 16px 16px 16px 4px;
  background: #e9e7e3;
  color: var(--ink);
}
.chat-thread .bubble.inbound {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: #1683f8;
  color: #fff;
}
.ready-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  border-color: #b9d58a;
  background: #f7fbe9;
}
.ready-next-step h2 {
  margin-bottom: 5px;
}
.ready-next-step p:last-child {
  margin: 0;
  color: var(--muted);
}
.ready-next-step form {
  flex: none;
}
.archive-job {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 18px;
}
.archive-job span,
.unsaved-note {
  font-size: 13px;
  color: var(--muted);
}
.new-chat-card {
  max-width: 850px;
}
.new-chat-card .chat-thread {
  min-height: 220px;
}
.unsaved-note {
  max-width: 850px;
  text-align: center;
}
@media (max-width: 760px) {
  .ready-next-step {
    align-items: stretch;
    flex-direction: column;
  }
  .ready-next-step button {
    width: 100%;
  }
  .archive-job {
    align-items: flex-start;
    flex-direction: column;
  }
}
.title-status {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-job-heading {
  align-items: flex-end;
}
.job-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.workflow-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.workflow-stepper.customer-job-tabs {
  grid-template-columns: repeat(3, 1fr);
}
.workflow-stepper li {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  border-right: 1px solid var(--line);
}
.workflow-stepper li:last-child {
  border: 0;
}
.workflow-stepper span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e7e9e5;
}
.workflow-stepper .complete {
  color: var(--green);
  background: #f4f8f3;
}
.workflow-stepper .complete span {
  background: #daf0df;
}
.workflow-stepper .current {
  color: var(--ink);
  background: #f7fbe9;
}
.workflow-stepper .current span {
  background: var(--lime);
}
.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(420px, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.context-rail,
.conversation-column {
  display: grid;
  gap: 18px;
}
.conversation-card {
  padding: 0;
  overflow: hidden;
}
.conversation-card > .section-heading {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.attempts-card h2,
.compact-context h2,
.conversation-card h2 {
  margin: 0;
}
.conversation-count {
  color: var(--muted);
  font-size: 12px;
}
.admin-thread {
  min-height: 480px;
  padding: 22px;
  background: #f8f7f2;
}
.admin-thread .bubble {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  background: #eceae4;
}
.admin-thread .bubble.inbound {
  align-self: flex-end;
  border: 0;
  border-radius: 16px 16px 4px 16px;
  background: #1683f8;
  color: #fff;
}
.admin-thread .bubble.outbound {
  align-self: flex-start;
}
.admin-thread .bubble small {
  opacity: 0.72;
}
.admin-thread .bubble.inbound small {
  color: #fff;
  opacity: 0.82;
}
.response-composer textarea {
  min-height: 140px;
}
.attempts-card {
  padding: 0;
  overflow: hidden;
}
.attempts-card > .section-heading {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.attempts-card > .empty {
  margin: 0;
  padding: 18px 20px 20px;
}
.attempt-table-wrap {
  overflow: auto;
}
.attempt-table {
  min-width: 0;
  font-size: 13px;
}
.attempt-table td,
.attempt-table th {
  padding: 11px 10px;
  vertical-align: top;
}
.attempt-table td:first-child,
.attempt-table th:first-child {
  padding-left: 18px;
}
.attempt-table td:last-child,
.attempt-table th:last-child {
  padding-right: 18px;
}
.attempt-table td:first-child {
  width: 20%;
}
.attempt-table td:nth-child(2) {
  white-space: nowrap;
  width: 18%;
}
.attempt-table td:nth-child(3) {
  width: 18%;
}
.attempt-table td:nth-child(4) {
  width: 44%;
}
.attempt-table tbody tr:last-child td {
  border-bottom: 0;
}
.technical-details {
  margin-top: 5px;
}
.technical-details summary {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.technical-details p {
  margin: 7px 0 0;
  padding: 8px;
  border-radius: 7px;
  background: #f7f5ef;
  color: var(--muted);
  word-break: break-word;
}
.technical-details pre {
  max-height: 180px;
  overflow: auto;
}
.compact-context dl {
  grid-template-columns: 90px 1fr;
}
.compact-context ol {
  padding-left: 20px;
}
.approval-meta,
.muted-value {
  color: var(--muted);
}
.approval-meta {
  margin: 8px 0 12px;
  font-size: 12px;
}
.business-list {
  margin-top: 10px;
}
.call-plan-business {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.business-edit-form {
  display: grid;
  gap: 10px;
}
.business-edit-form label {
  margin: 0;
}
.business-edit-form label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.business-edit-form .secondary {
  justify-self: start;
}
.business-remove-form {
  margin-top: 4px;
}
.business-remove-form .danger-link {
  padding-left: 0;
}
.add-business-form {
  margin-top: 2px;
  padding-top: 18px;
}
.add-business-form h3 {
  margin: 0 0 12px;
}

.call-plan-intro {
  margin: 0 0 16px;
  color: var(--muted);
}

.business-roster {
  margin-bottom: 18px;
}

.prepared-call-editor {
  margin-top: 12px;
}

.prepared-call-editor summary {
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.prepared-call-editor form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
}

.prepared-call-editor label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.prepared-call-editor .ai-question-form {
  border: 1px solid #dce8b4;
  background: #f7fbe9;
}

.business-option:has(input:checked) {
  border-color: var(--green);
  background: #f2f7ed;
}

.business-option-complete {
  cursor: default;
}

.business-option-complete > input {
  opacity: 0;
}

.business-option-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.business-option-meta small {
  margin: 0;
}

.call-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.call-plan-next-action {
  align-items: center;
  background: #f5f9e8;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.call-plan-next-action p {
  color: var(--muted);
  margin: 0.2rem 0 0;
}
.activity-log {
  padding: 0;
}
.activity-log > summary {
  padding: 18px 22px;
  font-weight: 800;
  cursor: pointer;
}
.activity-log[open] > summary {
  border-bottom: 1px solid var(--line);
}
.activity-log .timeline {
  padding: 0 22px 18px;
}
@media (max-width: 980px) {
  .admin-workspace {
    grid-template-columns: 1fr;
  }
  .context-rail {
    grid-template-columns: 1fr 1fr;
  }
  .attempts-card {
    grid-column: 1/-1;
  }
}
@media (max-width: 760px) {
  .admin-job-heading,
  .job-actions {
    align-items: stretch;
  }
  .job-actions {
    width: 100%;
    flex-direction: column;
  }
  .job-actions button {
    width: 100%;
  }
  .workflow-stepper {
    grid-template-columns: 1fr;
  }
  .workflow-stepper li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  .admin-thread {
    min-height: 360px;
    padding: 15px;
  }
  .admin-thread .bubble {
    max-width: 90%;
  }
  .context-rail {
    grid-template-columns: 1fr;
  }
  .attempt-table {
    min-width: 600px;
  }
}

.workflow-stepper.workflow-tabs li:not(.selected) {
  padding: 0;
  color: var(--muted);
  background: #fff;
}
.workflow-stepper.workflow-tabs li:not(.selected) span {
  background: #e7e9e5;
}
.workflow-tabs li {
  padding: 0;
}
.workflow-tabs li a {
  display: block;
  padding: 12px 10px;
  color: inherit;
  text-decoration: none;
}
.workflow-tabs li.selected {
  position: relative;
  background: #f7fbe9;
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--lime);
}
.workflow-tabs li.selected span {
  background: var(--lime);
}
.admin-stage {
  margin-bottom: 18px;
}
.stage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin: 4px 2px 18px;
}
.stage-heading h2 {
  margin: 0;
  font-size: 24px;
}
.stage-heading > p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}
.stage-grid {
  display: grid;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.request-stage-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
}
.plan-stage-grid,
.review-stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-stage-grid > :only-child {
  grid-column: 1 / -1;
}
.request-summary-card h2 {
  margin-bottom: 18px;
}
.request-question-list {
  padding-left: 20px;
}
.request-question-list li {
  margin: 7px 0;
}
.question-display {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.question-edit-toggle {
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.question-edit-form {
  margin: 10px 0 14px;
}
.question-edit-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 750;
}
.question-edit-form textarea {
  width: 100%;
  resize: vertical;
}
.question-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.question-edit-actions button {
  padding: 8px 12px;
}
.stage-attempts-card {
  margin-bottom: 18px;
}
.stage-attempts-card .attempt-table {
  min-width: 780px;
}
.stage-attempts-card .attempt-table td:first-child {
  width: 18%;
}
.stage-attempts-card .attempt-table td:nth-child(2),
.stage-attempts-card .attempt-table td:nth-child(3) {
  width: 14%;
}
.stage-attempts-card .attempt-table td:nth-child(4) {
  width: 54%;
}
.attempt-summary {
  margin: 0;
}
.attempt-details {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.attempt-retry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.call-timing-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, #faf9f5);
}
.call-timing-options legend {
  padding: 0 5px;
  font-weight: 700;
}
.call-timing-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.call-timing-options input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}
.call-timing-options label:has(input:checked) {
  border-color: var(--green);
  background: #f2f7ed;
}
.call-timing-options span,
.call-timing-options small {
  display: block;
}
.call-timing-options small {
  color: var(--muted);
}
.listen-live-link {
  display: inline-block;
  margin-top: 12px;
}
.stage-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.stage-empty strong,
.stage-empty h2 {
  color: var(--ink);
}
.stage-empty p {
  max-width: 540px;
  margin: 6px auto 18px;
}
.review-evidence {
  margin: 0 0 18px;
}
.review-evidence > summary {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-weight: 800;
  cursor: pointer;
}
.review-evidence[open] > summary {
  margin-bottom: 18px;
}
.review-evidence .results-card {
  margin-bottom: 0;
}
.published-card {
  max-width: 780px;
  margin: 0 auto 18px;
  padding: 34px;
}
.published-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #daf0df;
  color: #1d6436;
  font-size: 24px;
  font-weight: 900;
}
.published-mark.pending {
  background: #e7e9e5;
  color: var(--muted);
  font-size: 16px;
}
.published-copy {
  margin: 20px 0;
  padding: 20px;
  border-radius: 10px;
  background: #f7f5ef;
  font-size: 16px;
  line-height: 1.6;
}
.published-copy p:first-child {
  margin-top: 0;
}
.published-copy p:last-child {
  margin-bottom: 0;
}
.published-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.published-empty {
  max-width: 680px;
  margin: 0 auto 18px;
}
.published-empty .published-mark {
  margin-right: auto;
  margin-left: auto;
}
.published-empty .primary {
  display: inline-block;
}
.review-stage-grid .question-panel,
.review-stage-grid .response-composer {
  height: 100%;
}

@media (max-width: 980px) {
  .request-stage-grid,
  .plan-stage-grid,
  .review-stage-grid {
    grid-template-columns: 1fr;
  }
  .stage-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .stage-heading > p {
    text-align: left;
  }
  .review-stage-grid .question-panel,
  .review-stage-grid .response-composer {
    height: auto;
  }
}

@media (max-width: 760px) {
  .workflow-stepper.workflow-tabs {
    grid-template-columns: repeat(5, minmax(116px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }
  .workflow-stepper.workflow-tabs::-webkit-scrollbar {
    display: none;
  }
  .workflow-stepper.workflow-tabs li {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    text-align: center;
  }
  .workflow-tabs li a {
    padding: 11px 8px;
    white-space: nowrap;
  }
  .stage-heading h2 {
    font-size: 21px;
  }
  .stage-attempts-card .attempt-table {
    min-width: 0;
  }
  .stage-attempts-card .attempt-table thead {
    display: none;
  }
  .stage-attempts-card .attempt-table,
  .stage-attempts-card .attempt-table tbody,
  .stage-attempts-card .attempt-table tr,
  .stage-attempts-card .attempt-table td {
    display: block;
    width: 100%;
  }
  .stage-attempts-card .attempt-table tr {
    padding: 15px 17px;
    border-bottom: 1px solid var(--line);
  }
  .stage-attempts-card .attempt-table td,
  .stage-attempts-card .attempt-table td:first-child,
  .stage-attempts-card .attempt-table td:last-child {
    width: 100%;
    padding: 3px 0;
    border: 0;
  }
  .stage-attempts-card .attempt-table td:nth-child(2) {
    white-space: normal;
  }
  .stage-attempts-card .attempt-table td:nth-child(4) {
    width: 100%;
    padding-top: 10px;
  }
  .attempt-retry {
    align-items: stretch;
    flex-direction: column;
  }
  .attempt-retry button {
    width: 100%;
  }
  .published-card {
    padding: 22px;
  }
}
