:root {
  color-scheme: light;
  --ink: #16211c;
  --muted: #607068;
  --paper: #f5f3ec;
  --surface: #fffefa;
  --surface-muted: #ebece5;
  --line: #d7dbd3;
  --accent: #d7ff70;
  --accent-strong: #263f32;
  --danger: #a5362c;
  --danger-soft: #f9e6e2;
  --warning: #8a5b00;
  --warning-soft: #fff1c9;
  --success: #256342;
  --success-soft: #dcf2e4;
  --focus: #145c3c;
  --shadow: 0 16px 48px rgba(31, 43, 36, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 94% 0, rgba(215, 255, 112, 0.28), transparent 29rem),
    var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--ink);
  color: white;
}

.skip-link:focus-visible {
  transform: none;
}

.admin-header,
.admin-main,
.admin-footer {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(245px, 1fr) auto minmax(245px, 1fr);
  gap: 28px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  width: fit-content;
  text-decoration: none;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.brand small,
.session-user,
.admin-footer,
.eyebrow,
.meta-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.admin-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.admin-nav a {
  min-width: 96px;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.admin-nav a[aria-current="page"] {
  background: var(--ink);
  color: white;
}

.session-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
}

.text-button {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-main {
  min-height: calc(100vh - 160px);
  padding-block: 52px 90px;
}

.admin-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px 34px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.state-panel,
.auth-panel {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 760px;
  margin: 68px auto;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel {
  display: block;
  max-width: 560px;
}

.state-panel[hidden],
.auth-panel[hidden],
[hidden] {
  display: none !important;
}

.state-panel h1,
.auth-panel h1,
.page-heading h1,
.detail-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.state-panel p,
.page-intro {
  color: var(--muted);
  line-height: 1.65;
}

.error-panel {
  border-color: #e6bbb5;
}

.spinner {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.eyebrow {
  margin: 0 0 14px;
}

.stacked-form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.field,
.field-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label,
.field-label,
legend {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.025em;
}

.field-help,
.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.5;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bdc5bd;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

input,
select {
  min-height: 44px;
  padding: 9px 12px;
}

textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.79rem;
  line-height: 1.55;
  tab-size: 2;
}

textarea.tall-editor {
  min-height: 280px;
}

input[readonly] {
  background: var(--surface-muted);
  color: var(--muted);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent-strong);
}

.field label:has(input[type="checkbox"]) {
  display: flex;
  gap: 9px;
  align-items: center;
  width: fit-content;
}

.button-row,
.toolbar,
.header-actions,
.card-actions,
.inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 760;
  text-decoration: none;
}

.button.primary {
  background: var(--accent-strong);
  color: white;
}

.button.secondary {
  border-color: #aeb8b0;
  background: white;
  color: var(--ink);
}

.button.accent {
  border-color: #b1da44;
  background: var(--accent);
  color: var(--ink);
}

.button.danger {
  border-color: #d9a49d;
  background: white;
  color: var(--danger);
}

.button.compact {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 0.72rem;
}

.button:hover:not(:disabled) {
  filter: brightness(0.96);
}

.page-heading,
.detail-heading {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 42px;
}

.page-heading-copy,
.detail-heading-copy {
  max-width: 760px;
}

.page-heading h1,
.detail-heading h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.page-intro {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 0.98rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.35fr) minmax(150px, 0.3fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.results-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

td {
  font-size: 0.8rem;
  line-height: 1.45;
}

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

tbody tr:hover {
  background: rgba(215, 255, 112, 0.1);
}

.metric-link {
  display: grid;
  gap: 5px;
  width: fit-content;
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.technical-key,
.mono,
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.technical-key {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.active,
.badge.configured,
.badge.enabled {
  border-color: #a6d1b6;
  background: var(--success-soft);
  color: var(--success);
}

.badge.draft,
.badge.missing,
.badge.warning {
  border-color: #e1c47c;
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.archived,
.badge.disabled {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.config-cell {
  display: grid;
  gap: 6px;
  max-width: 230px;
}

.warning-copy {
  color: var(--warning);
  font-size: 0.7rem;
  line-height: 1.4;
}

.empty-state {
  padding: 50px 30px;
  border: 1px dashed #b9c0b9;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.detail-heading {
  align-items: flex-start;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.editor-stack,
.sidebar-stack,
.model-stack {
  display: grid;
  gap: 20px;
}

.panel,
.model-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(31, 43, 36, 0.04);
}

.panel-header,
.model-card-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.model-card-header h2,
.panel h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.panel-header p,
.model-card-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.panel-body,
.model-card-body {
  display: grid;
  gap: 20px;
  padding: 22px;
}

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

.field.full,
.full {
  grid-column: 1 / -1;
}

.editor-actions {
  position: sticky;
  z-index: 5;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #bfc8bf;
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.unsaved-indicator {
  margin-left: auto;
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 750;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.token-list code {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-muted);
  font-size: 0.7rem;
}

.effective-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.effective-settings div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.effective-settings dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.effective-settings dd {
  margin: 6px 0 0;
  font-size: 0.8rem;
  font-weight: 720;
}

.scope-callout {
  padding: 14px 16px;
  border-left: 4px solid var(--accent-strong);
  border-radius: 4px 8px 8px 4px;
  background: var(--success-soft);
  font-size: 0.8rem;
  line-height: 1.5;
}

.preview-output,
.compare-value {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  border-radius: 8px;
  background: #1d2822;
  color: #eaf4ed;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-output {
  max-height: 620px;
  padding: 18px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compare-column {
  min-width: 0;
}

.compare-column h3 {
  margin-bottom: 10px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 760;
}

.compare-section {
  display: grid;
  gap: 12px;
}

.compare-row {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compare-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.compare-value {
  padding: 12px;
  background: #edf0e9;
  color: var(--ink);
}

.version-list,
.history-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.version-item,
.history-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.version-item:last-child,
.history-item:last-child {
  border-bottom: 0;
}

.version-item-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.version-title {
  font-size: 0.8rem;
  font-weight: 760;
}

.history-item strong {
  font-size: 0.76rem;
}

.history-item span,
.version-item small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

details.disclosure {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

details.disclosure > summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 760;
}

details.disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
}

.model-card-header {
  align-items: center;
}

.model-title {
  display: grid;
  gap: 7px;
}

.model-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.model-subtitle {
  color: var(--muted);
  font-size: 0.75rem;
}

.provider-parameters {
  min-height: 100px;
}

.test-result {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.test-result.success {
  background: var(--success-soft);
  color: var(--success);
}

.test-result.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100% - 44px));
}

.toast {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  line-height: 1.5;
}

.toast.error {
  border-color: #e1a8a0;
  background: var(--danger);
}

.badge.succeeded,
.badge.pass,
.badge.success {
  border-color: #a6d1b6;
  background: var(--success-soft);
  color: var(--success);
}

.badge.failed,
.badge.fail {
  border-color: #dfaca6;
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.queued,
.badge.running,
.badge.uncertain,
.badge.not_scored,
.badge.not_applicable {
  border-color: #e1c47c;
  background: var(--warning-soft);
  color: var(--warning);
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-actions,
.run-actions,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.scope-warning {
  flex: 1 1 420px;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.lab-secondary-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.recent-run-list,
.metric-result-list,
.note-list,
.audit-list,
.contradiction-list {
  display: grid;
  gap: 12px;
}

.recent-run {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
}

.recent-run:hover {
  border-color: var(--accent-strong);
}

.recent-run > div,
.recent-run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.recent-run .mono,
.recent-run-meta {
  color: var(--muted);
  font-size: 0.7rem;
}

.json-output,
.transcript-output {
  overflow: auto;
  max-height: 360px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f5ef;
  color: #23372d;
  font: 0.72rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comparison-output,
.run-comparison-output {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.comparison-summary {
  margin: 0;
  color: var(--muted);
}

.run-status-banner {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent-strong);
  border-radius: 12px;
  background: var(--surface);
}

.run-status-banner.failed {
  border-left-color: var(--danger);
}

.run-status-banner h2,
.run-status-banner p {
  margin: 4px 0;
}

.progress-wrap {
  display: grid;
  gap: 7px;
  min-width: min(330px, 40vw);
  color: var(--muted);
  font-size: 0.74rem;
}

.progress-wrap progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent-strong);
}

.input-snapshot,
.audit-panel {
  margin-bottom: 20px;
}

.input-snapshot > summary,
.audit-panel > summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 760;
}

.metric-result-list {
  gap: 18px;
}

.metric-result-card,
.deterministic-card,
.contradiction-card,
.review-note {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.metric-result-card.failed {
  border-left: 5px solid var(--danger);
}

.metric-result-card.succeeded {
  border-left: 5px solid var(--success);
}

.metric-result-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.metric-result-header h3,
.metric-result-header p,
.deterministic-card h4,
.evidence-section h4,
.override-summary h4 {
  margin: 0 0 6px;
}

.metric-result-header p {
  color: var(--muted);
  font-size: 0.72rem;
}

.metric-selection {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

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

.result-field {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.result-field dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-field dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.result-field .json-output {
  max-height: 220px;
  padding: 0;
  border: 0;
  background: transparent;
}

.evidence-section,
.override-summary,
.execution-snapshot,
.override-editor {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.execution-snapshot > summary,
.override-editor > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 760;
}

.evidence-list {
  display: grid;
  gap: 10px;
}

.evidence-item {
  margin: 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent-strong);
  background: var(--surface-muted);
}

.evidence-item p {
  margin: 0;
  white-space: pre-wrap;
}

.evidence-item footer {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.68rem;
}

.sanitized-error {
  padding: 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  white-space: pre-wrap;
}

.override-fields,
.note-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.3fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.override-fields textarea,
.note-form textarea {
  min-height: 86px;
  resize: vertical;
}

.override-fields .field-error {
  grid-column: 1 / -1;
}

.run-actions {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.ruleset-label,
.text-link {
  color: var(--muted);
  font-size: 0.72rem;
}

.review-note p {
  white-space: pre-wrap;
}

.review-note small,
.audit-list span {
  color: var(--muted);
}

.comparison-cell {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.comparison-cell p {
  margin: 0;
}

.comparison-cell .json-output {
  max-height: 150px;
}

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

@media (max-width: 1050px) {
  .admin-header {
    grid-template-columns: 1fr auto;
  }

  .admin-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
    margin-bottom: 14px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .lab-secondary-grid,
  .deterministic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-header,
  .admin-main,
  .admin-footer {
    width: min(100% - 28px, 1440px);
  }

  .admin-header {
    gap: 12px;
  }

  .brand small,
  .session-user {
    display: none;
  }

  .admin-nav {
    width: 100%;
  }

  .admin-nav a {
    flex: 1;
  }

  .admin-main {
    padding-top: 34px;
  }

  .page-heading,
  .detail-heading,
  .admin-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar,
  .form-grid,
  .form-grid.three,
  .compare-grid,
  .sidebar-stack {
    grid-template-columns: 1fr;
  }

  .run-status-banner,
  .metric-result-header,
  .recent-run {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-wrap {
    width: 100%;
    min-width: 0;
  }

  .result-grid,
  .override-fields,
  .note-form {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }

  td {
    display: grid;
    grid-template-columns: minmax(95px, 0.35fr) 1fr;
    gap: 12px;
    padding: 8px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  td:first-child {
    display: block;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
  }

  td:first-child::before {
    content: none;
  }

  .editor-actions {
    position: static;
  }

  .unsaved-indicator {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

/* Unified Lead Analysis */
.lead-page-actions,
.lead-filter-actions,
.lead-switchers,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.lead-page-actions {
  justify-content: flex-end;
  margin: -48px 0 24px;
}

.lead-detail-run-actions {
  margin: -8px 0 24px;
}

.lead-summary-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.lead-summary-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-summary-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-summary-card strong {
  overflow-wrap: anywhere;
  font: 500 1.65rem/1.05 Georgia, "Times New Roman", serif;
}

.lead-manual-panel {
  margin-bottom: 18px;
}

.lead-manual-panel > summary,
.column-controls > summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 760;
}

.lead-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.lead-filter-actions {
  grid-column: 1 / -1;
}

.column-controls {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.column-control-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0 20px 16px;
}

.leads-table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.leads-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.leads-table th,
.leads-table td {
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.leads-table [data-column="transcript"] {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.leads-table thead th {
  position: sticky;
  z-index: 6;
  top: 32px;
  background: #f4f4ed;
  box-shadow: 0 1px 0 var(--line);
}

.leads-table thead .lead-group-row th {
  z-index: 7;
  top: 0;
  width: auto;
  min-width: 0;
  max-width: none;
  padding-block: 8px;
  background: #e5e9df;
  color: var(--ink);
  text-align: center;
}

.leads-table .sticky-lead-id {
  position: sticky;
  z-index: 5;
  left: 0;
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  background: #fffefa;
}

.leads-table .sticky-homeowner {
  position: sticky;
  z-index: 5;
  left: 168px;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  background: #fffefa;
  box-shadow: 4px 0 8px rgba(31, 43, 36, 0.07);
}

.leads-table thead .sticky-lead-id,
.leads-table thead .sticky-homeowner {
  z-index: 9;
  background: #edf0e7;
}

.transcript-preview {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.metric-cell-button {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.metric-extracted {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-marker {
  color: var(--warning);
  font-size: 0.64rem;
  font-weight: 780;
  text-transform: uppercase;
}

.badge.error {
  border-color: #dfaca6;
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.neutral,
.badge.pending,
.badge.partially_completed {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.lead-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.lead-drawer-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(18, 28, 23, 0.46);
}

.lead-drawer {
  width: min(620px, 94vw);
  height: 100%;
  overflow: auto;
  background: var(--surface);
  box-shadow: -18px 0 60px rgba(18, 28, 23, 0.2);
}

.lead-drawer-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.96);
}

.lead-drawer-header h2,
.lead-result-group h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.lead-drawer-body {
  padding: 24px;
}

.lead-detail-list,
.lead-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.lead-detail-list > div,
.lead-info-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.lead-detail-list dt,
.lead-info-grid dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-detail-list dd,
.lead-info-grid dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.safe-value {
  max-height: 280px;
  margin: 0;
  overflow: auto;
  color: inherit;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lead-switchers {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.lead-switchers label {
  display: grid;
  gap: 6px;
  min-width: 230px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
}

.lead-detail-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.lead-detail-tab {
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 760;
  background: transparent;
}

.lead-detail-tab.is-active {
  border-bottom-color: var(--accent-strong);
  color: var(--ink);
}

.lead-detail-view[hidden] {
  display: none;
}

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

.overview-summary-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.needs-attention-section {
  margin: 24px 0 30px;
  padding: 22px;
  border: 1px solid #e1c47c;
  border-radius: 12px;
  background: var(--warning-soft);
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading h2,
.technical-view-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.section-heading p,
.technical-view-heading p,
.section-intro {
  margin: 0;
  color: var(--muted);
}

.needs-attention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.attention-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(138, 91, 0, 0.3);
  border-radius: 9px;
  background: var(--surface);
}

.attention-card header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.attention-card h3,
.attention-card p,
.attention-empty {
  margin: 0;
}

.attention-card p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.attention-empty {
  grid-column: 1 / -1;
  font-weight: 700;
}

.technical-view-heading {
  margin-bottom: 18px;
}

.lead-result-group {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.lead-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lead-metric-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-metric-card > header {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lead-metric-card h3,
.lead-metric-card h4 {
  margin: 0 0 10px;
}

.overview-metric-card {
  display: grid;
  gap: 16px;
}

.overview-metric-card > header,
.overview-deterministic-card > header {
  margin-bottom: 0;
}

.metric-extracted-result {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-left: 3px solid var(--accent-strong);
  border-radius: 6px;
  background: var(--surface-muted);
}

.metric-extracted-result span,
.human-review-state strong {
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-extracted-result strong {
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.metric-reason p,
.metric-evidence-list > p {
  margin: 0;
  white-space: pre-wrap;
}

.metric-evidence-list {
  display: grid;
  gap: 10px;
}

.metric-evidence {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.metric-evidence blockquote {
  margin: 0;
  white-space: pre-wrap;
}

.metric-evidence figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.7rem;
}

.no-evidence {
  color: var(--muted);
  font-style: italic;
}

.human-review-state {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.human-review-state.required {
  color: var(--warning);
  font-weight: 760;
}

.overview-deterministic-card p {
  margin: 6px 0 0;
}

.transcript-highlight {
  padding: 2px 0;
  background: var(--accent);
  color: var(--ink);
}

.transcript-match-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.lead-history-list {
  display: grid;
  gap: 12px;
}

.lead-call-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.lead-call-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.lead-call-card h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.lead-transcript {
  max-height: 560px;
}

@media (max-width: 1100px) {
  .lead-filter-form {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .lead-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .lead-page-actions {
    justify-content: flex-start;
    margin: 0 0 20px;
  }

  .lead-filter-form,
  .lead-summary-cards,
  .lead-metric-grid,
  .needs-attention-grid,
  .lead-detail-list,
  .lead-info-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .leads-table-wrap {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .leads-table {
    display: table;
  }

  .leads-table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .leads-table tbody {
    display: table-row-group;
  }

  .leads-table tr {
    display: table-row;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .leads-table th,
  .leads-table td {
    display: table-cell;
  }
}

.panel-stack {
  display: grid;
  gap: 20px;
}

.csv-status-message {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: var(--surface-muted);
  font-weight: 740;
}

.csv-count-sections {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.csv-count-section h3 {
  margin-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.summary-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-subtle, var(--surface));
}

/* Provider Reports */
.report-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 26px 0 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.report-filter-form > .field {
  min-width: 170px;
}

.report-custom-dates {
  display: flex;
  gap: 12px;
}

.report-period,
.neutral-copy {
  color: var(--muted);
}

.report-period {
  margin: 10px 0 20px;
  font-size: 0.76rem;
  font-weight: 700;
}

.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.report-summary-card,
.report-status-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.report-summary-card.informational {
  border-left: 4px solid var(--accent-strong);
}

.report-summary-card span,
.report-status-card span,
.report-compliance-rate > span,
.report-review-summary span,
.report-feature-rate > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.report-summary-card strong,
.report-status-card strong {
  font: 500 1.6rem/1.05 Georgia, "Times New Roman", serif;
}

.report-section {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 254, 250, 0.72);
  box-shadow: 0 8px 30px rgba(31, 43, 36, 0.035);
}

.report-section-heading {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.report-section-heading h2 {
  margin: 3px 0 0;
  font: 500 1.75rem/1.1 Georgia, "Times New Roman", serif;
}

.report-section-heading p:not(.eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.report-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.report-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.provider-comparison-table {
  min-width: 1280px;
}

.report-table th,
.report-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.report-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #edf0e9;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.report-table tbody tr:last-child > * {
  border-bottom: 0;
}

.report-provider-link,
.report-drilldown-link {
  color: var(--accent-strong);
  font-weight: 780;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.report-sort-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.report-rate-cell {
  display: grid;
  gap: 3px;
  min-width: 110px;
}

.report-rate-cell strong {
  font-size: 0.92rem;
}

.report-rate-cell small {
  color: var(--muted);
  font-size: 0.66rem;
}

.neutral-cell,
.report-status-card.neutral {
  background: var(--surface-muted);
  color: var(--muted);
}

.report-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.report-status-card.pass {
  border-left: 4px solid var(--success);
}

.report-status-card.fail {
  border-left: 4px solid var(--danger);
}

.report-feature-rate {
  display: flex;
  gap: 18px;
  align-items: center;
  width: fit-content;
  padding: 14px 16px;
  border-radius: 9px;
  background: var(--surface-muted);
}

.report-problem-grid,
.report-deterministic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.report-problem-column,
.report-deterministic-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.report-problem-column h3,
.report-deterministic-card h3 {
  margin: 0 0 14px;
  font: 500 1.2rem/1.2 Georgia, "Times New Roman", serif;
}

.report-ranked-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-ranked-list li,
.report-conflict-card {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.report-ranked-list li:last-child,
.report-conflict-card:last-child {
  border-bottom: 0;
}

.report-ranked-list li > div,
.report-conflict-card > div,
.report-compliance-rate {
  display: grid;
  gap: 4px;
}

.report-ranked-list span,
.report-conflict-card span,
.report-empty-inline {
  color: var(--muted);
  font-size: 0.7rem;
}

.report-wide-ranked-list li {
  padding-inline: 12px;
  background: var(--surface);
}

.report-conflict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 18px;
}

.report-compliance-rate {
  margin-bottom: 15px;
  padding: 14px;
  border-radius: 9px;
  background: var(--surface-muted);
}

.report-compliance-rate strong {
  font: 500 1.55rem/1 Georgia, "Times New Roman", serif;
}

.report-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-muted);
}

.report-review-summary > div {
  display: grid;
  gap: 5px;
}

.report-review-summary strong {
  font-size: 1.1rem;
}

.report-grain-controls,
.report-trend-legend,
.report-trend-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.report-grain-controls .button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}

.report-trend-chart {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.report-trend-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.report-trend-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.report-trend-svg {
  display: block;
  width: 100%;
  min-height: 220px;
  margin-top: 12px;
  overflow: visible;
}

.trend-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.trend-axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.trend-line,
.trend-point {
  vector-effect: non-scaling-stroke;
}

.report-trend-dates {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.68rem;
}

.active-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
  padding: 13px 16px;
  border-left: 4px solid var(--accent-strong);
  background: var(--surface);
}

.active-filter-panel strong {
  margin-right: 3px;
  font-size: 0.74rem;
}

.active-filter-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .admin-nav {
    max-width: 100%;
    overflow-x: auto;
  }

  .admin-nav a {
    min-width: 88px;
    padding-inline: 13px;
  }

  .report-problem-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-nav a {
    flex: 0 0 auto;
  }

  .report-filter-form,
  .report-custom-dates,
  .report-section-heading,
  .report-feature-rate {
    align-items: stretch;
    flex-direction: column;
  }

  .report-custom-dates > .field,
  .report-filter-form > .field {
    width: 100%;
  }

  .report-section {
    padding: 17px;
  }

  .report-deterministic-grid {
    grid-template-columns: 1fr;
  }

  .report-table,
  .report-table thead,
  .report-table tbody {
    display: table;
    width: 100%;
  }

  .report-table tr {
    display: table-row;
    padding: 0;
    border: 0;
  }

  .report-table th,
  .report-table td {
    display: table-cell;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .report-table td::before {
    content: none;
  }
}

.summary-item dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-item dd {
  margin: 5px 0 0;
  font-size: 1.15rem;
  font-weight: 760;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 620px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
