.testing-body {
  min-width: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 82% -12%, rgba(69, 188, 174, 0.13), transparent 34rem),
    linear-gradient(180deg, var(--night-900), var(--night-950) 42rem);
}

.testing-body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(222, 212, 193, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 212, 193, 0.026) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(180deg, #000, transparent 76%);
}

.testing-shell {
  width: min(1520px, calc(100% - 40px));
  margin-inline: auto;
  padding: 24px 0 70px;
}

.testing-admin-shell {
  width: min(1760px, calc(100% - 40px));
}

.testing-login {
  width: min(1120px, 100%);
  margin: clamp(38px, 8vh, 90px) auto 0;
  padding: 28px 0 46px;
  border-top: 1px solid var(--gold-500);
  border-bottom: 1px solid var(--line-soft);
}

.testing-login > .brand {
  margin-bottom: clamp(56px, 9vw, 110px);
}

.testing-login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: end;
}

.testing-login-copy h1 {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(3.3rem, 7.2vw, 7rem);
  line-height: 0.94;
}

.testing-login-copy > p:last-child {
  max-width: 48ch;
  margin-top: 24px;
  color: var(--bone-200);
  font-family: var(--editorial);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.5;
}

.testing-workspace {
  min-width: 0;
}

.testing-appbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) auto minmax(220px, 0.8fr);
  align-items: center;
  gap: 24px;
  min-height: 70px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 18, 19, 0.96);
  backdrop-filter: blur(14px);
}

.testing-tabs,
.testing-session,
.testing-form-actions,
.testing-toolbar,
.testing-section-head,
.testing-question-builder-head,
.testing-dialog-head,
.testing-list-row,
.testing-plan-head,
.testing-tester-head {
  display: flex;
  align-items: center;
}

.testing-tabs {
  justify-content: center;
  gap: 3px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.testing-tabs button,
.testing-text-button,
.testing-text-link {
  border: 0;
  background: transparent;
  color: var(--bone-300);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-decoration: none;
}

.testing-text-button,
.testing-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.testing-tabs button {
  min-height: 44px;
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
}

.testing-tabs button:hover,
.testing-tabs button[aria-current="page"],
.testing-text-button:hover,
.testing-text-link:hover {
  color: var(--gold-300);
}

.testing-tabs button[aria-current="page"] {
  border-bottom-color: var(--gold-300);
}

.testing-session {
  justify-content: flex-end;
  gap: 16px;
}

.testing-session > span {
  max-width: 240px;
  overflow: hidden;
  color: var(--bone-400);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.testing-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: end;
  padding: clamp(50px, 7vw, 92px) 0 38px;
  border-bottom: 1px solid var(--line-soft);
}

.testing-titlebar h1 {
  margin-top: 10px;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
}

.testing-titlebar > div:first-child > p:last-child {
  max-width: 66ch;
  margin-top: 16px;
  color: var(--bone-300);
}

.testing-summary {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(90px, auto);
  border-top: 1px solid var(--gold-500);
  border-bottom: 1px solid var(--line-soft);
}

.testing-summary-item {
  padding: 16px 20px;
}

.testing-summary-item + .testing-summary-item {
  border-left: 1px solid var(--line-soft);
}

.testing-summary-item strong {
  display: block;
  color: var(--bone-100);
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
}

.testing-summary-item span {
  display: block;
  margin-top: 7px;
  color: var(--bone-400);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.testing-page-message {
  margin-top: 18px;
}

.testing-file-field small,
.testing-attachment-uploader small {
  display: block;
  margin-top: 7px;
  color: var(--bone-400);
  font-size: 0.68rem;
  line-height: 1.5;
}

.testing-attachments,
.testing-attachment-uploader {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.testing-attachments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.testing-attachments-head h3 {
  margin: 0;
  color: var(--bone-100);
  font-family: var(--display);
  font-size: 1.15rem;
}

.testing-attachments-head span {
  color: var(--bone-400);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.testing-attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.testing-attachment {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
  color: var(--bone-200);
  text-decoration: none;
}

.testing-attachment:hover,
.testing-attachment:focus-visible {
  border-color: var(--gold-500);
}

.testing-attachment img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--night-900);
}

.testing-attachment > span {
  display: block;
  min-width: 0;
  padding: 10px 11px;
}

.testing-attachment strong,
.testing-attachment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.testing-attachment strong {
  font-size: 0.72rem;
}

.testing-attachment small {
  margin-top: 4px;
  color: var(--bone-400);
  font-size: 0.62rem;
}

.testing-attachment-uploader {
  width: 100%;
}

.testing-attachment-uploader > label {
  display: block;
  min-width: 0;
}

.testing-attachment-uploader label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--bone-300);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.testing-attachment-uploader .testing-form-actions {
  margin-top: 12px;
}

.testing-autosave-status {
  align-self: center;
  min-width: 150px;
  margin: 0 auto 0 0;
  color: var(--bone-400);
  font-size: 0.7rem;
}

.testing-managed-question-list {
  display: grid;
  gap: 8px;
  margin: 24px 0 38px;
}

.testing-managed-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.testing-managed-question-actions {
  display: flex;
  gap: 8px;
}

.testing-managed-question-editor,
.testing-managed-quality-feedback {
  grid-column: 1 / -1;
}

.testing-managed-question-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.testing-managed-question-editor[hidden] { display: none; }

.testing-managed-quality-feedback {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 16px;
  border-left: 2px solid var(--danger-300);
  background: rgba(221, 116, 98, 0.055);
}

.testing-managed-quality-feedback > strong { color: var(--danger-300); font-size: 0.72rem; }
.testing-managed-quality-feedback article { padding-top: 10px; border-top: 1px solid var(--line-soft); }
.testing-managed-quality-feedback span { color: var(--bone-200); font-size: 0.68rem; font-weight: 700; }
.testing-managed-quality-feedback p { margin-top: 5px; color: var(--bone-300); font-size: 0.74rem; white-space: pre-wrap; }

.testing-managed-question-copy {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 14px;
}

.testing-managed-question-copy strong,
.testing-managed-question-copy small {
  display: block;
}

.testing-managed-question-copy strong {
  color: var(--bone-100);
  font-size: 0.82rem;
  line-height: 1.5;
}

.testing-managed-question-copy small {
  margin-top: 5px;
  color: var(--bone-400);
  font-size: 0.64rem;
}

.testing-managed-question-form {
  padding-top: 28px;
  border-top: 1px solid var(--gold-500);
}

.testing-view {
  padding: clamp(42px, 6vw, 78px) 0;
}

.testing-section-head,
.testing-toolbar {
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.testing-section-head h2,
.testing-toolbar h2,
.testing-admin-form-panel h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.testing-section-head > p,
.testing-toolbar > p,
.testing-section-head-stacked > div + p,
.testing-admin-form-panel > p {
  max-width: 54ch;
  color: var(--bone-400);
  font-size: 0.82rem;
}

.testing-section-head-stacked {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
}

.testing-list {
  border-top: 1px solid var(--line);
}

.testing-list-row {
  width: 100%;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  text-align: left;
}

button.testing-list-row {
  cursor: pointer;
}

button.testing-list-row:hover {
  background: linear-gradient(90deg, rgba(232, 196, 106, 0.06), transparent 74%);
}

.testing-list-copy {
  min-width: 0;
}

.testing-list-copy strong {
  display: block;
  color: var(--bone-100);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.testing-list-copy span,
.testing-list-meta {
  display: block;
  margin-top: 7px;
  color: var(--bone-400);
  font-size: 0.74rem;
}

.testing-list-end {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.testing-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--bone-300);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-open,
.status-assigned,
.status-active { border-color: rgba(232, 196, 106, 0.46); color: var(--gold-300); }
.status-under-review,
.status-in-progress { border-color: rgba(123, 225, 210, 0.46); color: var(--teal-300); }
.status-complete,
.status-submitted { border-color: rgba(155, 207, 121, 0.48); color: var(--verdant-300); }
.status-cancelled,
.status-closed,
.status-inactive { color: var(--bone-400); }
.status-blocking { border-color: rgba(237, 140, 123, 0.55); color: var(--danger-300); }
.status-high { border-color: rgba(236, 154, 98, 0.5); color: var(--ember-300); }

.testing-empty {
  padding: 38px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  color: var(--bone-400);
  font-family: var(--editorial);
  font-size: 1.1rem;
}

.testing-manual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: start;
}

.testing-ticket-index {
  position: sticky;
  top: 104px;
}

.testing-form {
  display: grid;
  gap: 18px;
}

.testing-login-form {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
}

.testing-form label,
.testing-filter {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.testing-form label > span,
.testing-filter > span,
.testing-field-label {
  color: var(--bone-400);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.testing-form input,
.testing-form select,
.testing-form textarea,
.testing-filter select,
.testing-inline-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: rgba(5, 11, 12, 0.78);
  color: var(--bone-100);
}

.testing-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.testing-form input:focus,
.testing-form select:focus,
.testing-form textarea:focus,
.testing-filter select:focus,
.testing-inline-select:focus {
  border-color: var(--teal-300);
  box-shadow: 0 0 0 2px rgba(123, 225, 210, 0.15);
}

.testing-form input:disabled,
.testing-form select:disabled,
.testing-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.testing-ticket-form,
.testing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.testing-field-wide {
  grid-column: 1 / -1;
}

.testing-form-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.testing-form-note {
  color: var(--bone-400);
  font-size: 0.74rem;
}

.testing-form-note a { color: var(--bone-200); }

.testing-check {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 10px !important;
  min-height: 34px;
  color: var(--bone-300);
  cursor: pointer;
}

.testing-check input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  padding: 0;
  accent-color: var(--gold-300);
}

.testing-check span {
  color: var(--bone-300) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.testing-message {
  min-height: 1.45rem;
  margin: 0;
  color: var(--bone-400);
  font-size: 0.76rem;
}

.testing-message.ok { color: var(--verdant-300); }
.testing-message.err { color: var(--danger-300); }

.testing-history {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.testing-history li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.testing-history time {
  color: var(--bone-400);
  font-size: 0.72rem;
}

.testing-history strong { color: var(--bone-100); }
.testing-history p { margin-top: 5px; color: var(--bone-400); font-size: 0.76rem; }

.testing-dialog,
.testing-mfa-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 1px solid var(--gold-500);
  border-radius: 0;
  background: var(--night-850);
  color: var(--bone-100);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.68);
}

.testing-dialog::backdrop,
.testing-mfa-dialog::backdrop {
  background: rgba(2, 6, 6, 0.9);
  backdrop-filter: blur(4px);
}

.testing-dialog[open],
.testing-mfa-dialog[open] {
  display: flex;
  flex-direction: column;
}

.testing-dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 24, 24, 0.98);
}

.testing-dialog-head h2 {
  max-width: 760px;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.testing-icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--bone-200);
  cursor: pointer;
  font-size: 1.5rem;
}

.testing-icon-button:hover { border-color: var(--bone-200); color: var(--bone-100); }

.testing-dialog-scroll {
  min-height: 0;
  padding: 28px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.testing-assignment-intro,
.testing-ticket-facts,
.testing-result-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
}

.testing-fact {
  min-width: 0;
  padding: 16px;
}

.testing-fact + .testing-fact { border-left: 1px solid var(--line-soft); }
.testing-fact span { display: block; color: var(--bone-400); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.testing-fact strong { display: block; margin-top: 6px; color: var(--bone-100); overflow-wrap: anywhere; }

.testing-instructions,
.testing-review-note,
.testing-ticket-section {
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.testing-instructions h3,
.testing-review-note h3,
.testing-ticket-section h3,
.testing-conversation h3 {
  font-size: 1.35rem;
}

.testing-instructions p,
.testing-review-note p,
.testing-ticket-section p {
  margin-top: 10px;
  color: var(--bone-300);
  white-space: pre-wrap;
}

.testing-review-note { border-top-color: var(--gold-500); }

.testing-questionnaire {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.testing-question {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
}

.testing-question:first-child { border-top: 1px solid var(--line-soft); }

.testing-question-label {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--bone-100);
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
}

.testing-question-number { color: var(--gold-300); font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.08em; }
.testing-question-help { margin: 8px 0 14px; color: var(--bone-400); font-size: 0.76rem; }
.testing-question .testing-required { color: var(--gold-300); font-family: var(--sans); font-size: 0.68rem; }

.testing-answer-context {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 18px;
  border-left: 2px solid var(--gold-500);
  background: rgba(232, 196, 106, 0.045);
}

.testing-answer-context label {
  display: grid;
  gap: 8px;
}

.testing-answer-context label > span {
  color: var(--bone-200);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.testing-answer-context small {
  color: var(--bone-400);
  font-size: 0.66rem;
  line-height: 1.5;
}

.testing-question-quality {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 18px;
  border-left: 2px solid var(--teal-300);
  background: rgba(123, 225, 210, 0.045);
}

.testing-question-quality label {
  display: grid;
  gap: 8px;
}

.testing-question-quality label > span {
  color: var(--bone-200);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.testing-question-quality small { color: var(--bone-400); font-size: 0.66rem; line-height: 1.5; }
.testing-question-quality-comment[hidden] { display: none; }

.testing-question-evidence:empty { display: none; }

.testing-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.testing-rating label {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.testing-rating label:has(input:checked) {
  border-color: var(--gold-300);
  background: rgba(232, 196, 106, 0.12);
  color: var(--gold-300);
}

.testing-rating input {
  position: absolute;
  opacity: 0;
}

.testing-question-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
}

.testing-conversation {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--gold-500);
}

.testing-message-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.testing-conversation-entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.testing-conversation-entry header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--bone-400);
  font-size: 0.68rem;
}

.testing-conversation-entry header strong { color: var(--bone-200); }
.testing-conversation-entry.admin header strong { color: var(--gold-300); }
.testing-conversation-entry p { margin-top: 9px; color: var(--bone-300); white-space: pre-wrap; }
.testing-reply-form { margin-top: 24px; }

.testing-mfa-dialog { width: min(480px, calc(100% - 32px)); }
.testing-mfa-panel { padding: 30px; }
.testing-mfa-panel h2 { margin-top: 10px; font-size: clamp(2rem, 5vw, 3rem); }
.testing-mfa-panel > p:nth-child(3) { margin-top: 12px; color: var(--bone-300); }
.testing-mfa-panel .testing-form { margin-top: 22px; }

.testing-filter {
  grid-template-columns: auto minmax(180px, 260px);
  align-items: center;
}

.testing-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.testing-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  text-align: left;
}

.testing-table th {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--bone-400);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.testing-table td {
  padding: 17px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--bone-300);
  font-size: 0.78rem;
  vertical-align: middle;
}

.testing-table td:first-child { color: var(--bone-100); font-weight: 700; }
.testing-table td:last-child { text-align: right; }
.testing-table .button { min-height: 38px; padding: 8px 13px; font-size: 0.66rem; }

.testing-plan-list,
.testing-tester-list {
  display: grid;
  gap: 18px;
}

.testing-plan,
.testing-tester-card,
.testing-admin-form-panel {
  padding: 24px;
  border-top: 1px solid var(--gold-500);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 24, 24, 0.58);
}

.testing-plan-head,
.testing-tester-head {
  justify-content: space-between;
  gap: 20px;
}

.testing-plan-head h3,
.testing-tester-head h3 { font-size: 1.5rem; }
.testing-plan-meta,
.testing-tester-meta {
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--bone-400);
  font-size: 0.72rem;
}

.testing-plan-description {
  max-width: 80ch;
  margin-top: 18px;
  overflow-wrap: anywhere;
  color: var(--bone-300);
}

.testing-plan-actions {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.testing-plan-actions label,
.testing-tester-edit label {
  display: grid;
  gap: 7px;
}

.testing-plan-actions label span,
.testing-tester-edit label span {
  color: var(--bone-400);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.testing-plan-actions .button { min-height: 48px; }

.testing-tester-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(38px, 6vw, 80px);
  align-items: start;
}

.testing-admin-form-panel {
  position: sticky;
  top: 104px;
}

.testing-admin-form-panel > p { margin: 16px 0 24px; }

.testing-tester-edit {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr);
  gap: 14px;
  margin-top: 20px;
}

.testing-tester-edit .testing-field-wide { grid-column: 1 / -1; }
.testing-tester-edit textarea { min-height: 82px; }

.testing-study-dialog { width: min(1040px, calc(100% - 32px)); }
.testing-study-form { gap: 28px; }
.testing-question-builder-head { justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid var(--gold-500); }
.testing-question-builder-head h3 { margin-top: 6px; font-size: 1.8rem; }
.testing-question-builder { display: grid; gap: 16px; }

.testing-question-editor {
  padding: 20px;
  border: 1px solid var(--line-soft);
  background: rgba(5, 11, 12, 0.45);
}

.testing-question-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.testing-question-editor-head strong { font-family: var(--display); }
.testing-question-editor-head button { border: 0; background: transparent; color: var(--danger-300); cursor: pointer; font-size: 0.7rem; font-weight: 700; }
.testing-question-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 14px; }
.testing-choice-options { grid-column: 1 / -1; }

.testing-study-access {
  margin-top: 38px;
  padding-top: 10px;
  border-top: 1px solid var(--gold-500);
}

.testing-study-access > .testing-form-note { margin-top: 14px; }

.testing-study-access-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 22px;
}

.testing-study-access-form .button { min-height: 48px; }

.testing-study-access-list {
  display: grid;
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.testing-study-access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.testing-study-access-row strong,
.testing-study-access-row span,
.testing-study-access-row small { display: block; }
.testing-study-access-row span { margin-top: 4px; color: var(--bone-300); font-size: 0.72rem; overflow-wrap: anywhere; }
.testing-study-access-row small { margin-top: 5px; color: var(--bone-400); font-size: 0.64rem; }

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

.testing-result-answer {
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}

.testing-result-answer:first-child { border-top: 1px solid var(--line-soft); }
.testing-result-answer h3 { font-size: 1.08rem; line-height: 1.35; }
.testing-result-answer p { margin-top: 10px; color: var(--bone-300); white-space: pre-wrap; }
.testing-result-answer .testing-unanswered { color: var(--bone-400); font-style: italic; }
.testing-quality-review {
  margin-top: 14px;
  padding: 14px;
  border-left: 2px solid var(--teal-300);
  background: rgba(123, 225, 210, 0.045);
}
.testing-quality-review.needs-improvement {
  border-left-color: var(--danger-300);
  background: rgba(221, 116, 98, 0.055);
}
.testing-quality-review strong { color: var(--teal-300); font-size: 0.72rem; }
.testing-quality-review.needs-improvement strong { color: var(--danger-300); }
.testing-review-form,
.testing-ticket-status-form { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--gold-500); }
.testing-ticket-status-form { grid-template-columns: minmax(200px, 1fr) auto; align-items: end; }

@media (max-width: 1100px) {
  .testing-appbar {
    grid-template-columns: 1fr auto;
    padding: 13px 0;
  }

  .testing-tabs {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
  }

  .testing-titlebar {
    grid-template-columns: 1fr;
  }

  .testing-summary {
    width: fit-content;
  }
}

@media (max-width: 860px) {
  .testing-login-grid,
  .testing-manual-grid,
  .testing-tester-layout {
    grid-template-columns: 1fr;
  }

  .testing-login-grid { gap: 50px; }
  .testing-login-copy h1 { font-size: clamp(3rem, 12vw, 5.5rem); }
  .testing-ticket-index,
  .testing-admin-form-panel { position: static; }
  .testing-plan-actions { grid-template-columns: 1fr auto; }

  .testing-table-wrap {
    overflow: visible;
    border-top: 0;
  }

  .testing-table {
    display: block;
    min-width: 0;
  }

  .testing-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .testing-table tbody {
    display: grid;
    gap: 16px;
  }

  .testing-table tr {
    display: block;
    padding: 8px 16px;
    border-top: 1px solid var(--gold-500);
    border-bottom: 1px solid var(--line-soft);
    background: rgba(11, 24, 24, 0.58);
  }

  .testing-table td {
    display: grid;
    grid-template-columns: minmax(104px, 0.38fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
    text-align: right;
  }

  .testing-table td + td {
    border-top: 1px solid var(--line-soft);
  }

  .testing-table td::before {
    color: var(--bone-400);
    content: attr(data-label);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-align: left;
    text-transform: uppercase;
  }

  .testing-table td .testing-status {
    justify-self: end;
  }

  .testing-table td:last-child {
    display: block;
    padding-top: 16px;
    text-align: left;
  }

  .testing-table td:last-child::before {
    display: none;
  }

  .testing-table td:last-child .button {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .testing-shell,
  .testing-admin-shell {
    width: min(100% - 24px, 1760px);
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(36px, env(safe-area-inset-bottom));
  }

  .testing-login { margin-top: 30px; }
  .testing-login > .brand { margin-bottom: 50px; }
  .testing-login-copy h1 { font-size: clamp(2.8rem, 15vw, 4.4rem); }
  .testing-admin-body .testing-login-copy h1 {
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 10vw, 3rem);
    hyphens: none;
  }

  .testing-appbar .brand-name,
  .testing-session > span,
  .testing-text-link { display: none; }

  .testing-session { gap: 10px; }
  .testing-text-button { padding-inline: 8px; }
  .testing-tabs { gap: 0; }
  .testing-tabs button { padding-inline: 11px; }

  .testing-titlebar { gap: 28px; padding-top: 45px; }
  .testing-titlebar h1 { font-size: clamp(2.6rem, 13vw, 4.2rem); }
  .testing-summary { width: 100%; grid-auto-columns: 1fr; }
  .testing-summary-item { padding: 14px 12px; }

  .testing-section-head,
  .testing-toolbar,
  .testing-plan-head,
  .testing-tester-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .testing-filter { width: 100%; grid-template-columns: 1fr; }
  .testing-list-row { align-items: flex-start; flex-direction: column; }
  .testing-list-end { width: 100%; justify-content: space-between; }
  .testing-ticket-form,
  .testing-form-grid,
  .testing-tester-edit,
  .testing-question-editor-grid,
  .testing-plan-actions,
  .testing-study-access-form,
  .testing-ticket-status-form {
    grid-template-columns: 1fr;
  }

  .testing-field-wide,
  .testing-tester-edit .testing-field-wide,
  .testing-choice-options,
  .testing-plan-actions .button { grid-column: 1; }

  .testing-form-actions { align-items: stretch; flex-direction: column; }
  .testing-form-actions .button { width: 100%; }

  .testing-check { min-height: 44px; }
  .testing-form input[type="file"],
  .testing-attachment-uploader input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 8px;
  }

  .testing-plan,
  .testing-tester-card,
  .testing-admin-form-panel { padding: 20px 16px; }

  .testing-history li { grid-template-columns: 1fr; gap: 8px; }
  .testing-history li .testing-status { width: fit-content; }

  .testing-dialog,
  .testing-mfa-dialog,
  .testing-study-dialog,
  .testing-question-manager-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    margin: 0;
    border-inline: 0;
  }

  .testing-dialog-head {
    padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
  }
  .testing-dialog-scroll,
  .testing-mfa-panel {
    padding: 22px max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .testing-mfa-panel { overflow-y: auto; }

  .testing-assignment-intro,
  .testing-ticket-facts,
  .testing-result-facts { grid-template-columns: 1fr; }
  .testing-fact + .testing-fact { border-top: 1px solid var(--line-soft); border-left: 0; }
  .testing-question-actions { align-items: stretch; flex-direction: column; }
  .testing-question-actions .button { width: 100%; }
  .testing-autosave-status { width: 100%; margin: 0; }
  .testing-question-label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .testing-question-label .testing-required { grid-column: 2; }
  .testing-managed-question { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .testing-managed-question-copy { width: 100%; }
  .testing-managed-question-actions { width: 100%; }
  .testing-managed-question-actions .button { min-height: 48px; flex: 1; }
  .testing-study-access-row { align-items: stretch; flex-direction: column; }
  .testing-study-access-row .button { width: 100%; min-height: 48px; }
  .testing-attachments-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .testing-conversation-entry header { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .testing-summary {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testing-summary-item + .testing-summary-item { border-left: 0; }
  .testing-summary-item:nth-child(even) { border-left: 1px solid var(--line-soft); }
  .testing-summary-item:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .testing-summary-item:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .testing-table td {
    grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .testing-list-row { transition: none; }
}
