:root {
  --bg: #f7f7f4;
  --panel: #ffffff;
  --panel-soft: #fbfbf8;
  --line: #deded7;
  --line-strong: #c9c9c0;
  --text: #20221f;
  --muted: #6f746b;
  --green: #1f8a54;
  --olive: #8a9828;
  --amber: #bd7a15;
  --red: #c94438;
  --blue: #2d6cdf;
  --shadow: 0 1px 2px rgba(32, 34, 31, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 9px;
  cursor: pointer;
}

button:hover {
  border-color: #9c9f96;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

button.primary {
  background: #20221f;
  border-color: #20221f;
  color: #fff;
}

button.primary.is-loading {
  position: relative;
  padding-left: 30px;
}

button.primary.is-loading::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

button.ghost {
  background: transparent;
}

button.danger {
  color: var(--red);
}

button.compact-action {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 6px 7px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f746b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 10px 6px;
  padding-right: 30px;
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

.top-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 10px 20px 0;
  background: var(--bg);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  text-align: left;
  border-color: transparent;
  background: transparent;
  margin: 0;
  font-weight: 650;
  white-space: nowrap;
}

.nav-item.active {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.workspace {
  padding: 10px 20px 32px;
  max-width: 1280px;
  width: 100%;
}

.workspace-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 31px;
  min-width: min(320px, 42vw);
}

.tagged-search {
  position: relative;
  width: min(320px, 42vw);
}

.tagged-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  pointer-events: none;
}

.tagged-search-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.tagged-search-icon::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 6px;
  height: 1.5px;
  background: var(--muted);
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: right center;
}

.tagged-search input {
  min-height: 31px;
  font-size: 12px;
  padding-left: 28px;
}

h1 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: 0;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.toolbar .spacer {
  flex: 1;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(260px, 520px) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.search-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.search-filter-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
}

.search-filter-row select {
  min-width: 240px;
}

.search-help {
  margin-bottom: 12px;
}

.search-progress {
  max-width: 620px;
}

.search-results-section {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.search-results-section h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 680;
}

.search-results-section h2 span {
  color: var(--muted);
  font-weight: 500;
}

.search-card .saved-grid {
  align-items: start;
}

.search-subsection-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  margin-top: 8px;
  margin-bottom: 4px;
}

.field-preview-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 3px 10px;
  max-width: 760px;
  font-size: 12px;
}

.field-preview-key {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.run-config {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.run-config .toolbar {
  margin-bottom: 0;
}

.inline-results-shell {
  margin-top: 14px;
}

.inline-results-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.flow-step {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.strategy-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.strategy-control select {
  min-height: 28px;
  max-width: 190px;
}

.api-url-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.api-url-control > span,
.run-size-control > span,
.run-cohort-control > span {
  flex: 0 0 62px;
  white-space: nowrap;
}

.api-url-control select {
  width: auto;
  min-height: 28px;
  min-width: 112px;
  font-size: 11px;
}

.endpoint-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.run-size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.run-cohort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.run-size-control select {
  width: auto;
  min-height: 28px;
  min-width: 112px;
  font-size: 11px;
}

.run-cohort-control select {
  width: auto;
  min-height: 28px;
  min-width: 220px;
  font-size: 11px;
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.compare-toggle input {
  width: auto;
}

.custom-mapping-toggle {
  min-height: 28px;
}

.input-errors-toggle {
  min-height: 28px;
}

.github-version-error {
  margin: -2px 0 8px;
  max-width: 840px;
}

.reference-source-note {
  color: var(--muted);
  font-size: 11px;
}

.reference-source-note strong {
  color: var(--text);
  font-weight: 600;
}

.mapping-panel {
  --check-col: 34px;
  --component-col: 190px;
  --mapping-col: 270px;
  --corruption-col: 270px;
}

.bulk-toolbar {
  display: grid;
  grid-template-columns: var(--check-col) var(--component-col);
  align-items: stretch;
  width: max-content;
  min-width: calc(var(--check-col) + var(--component-col));
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.bulk-toolbar.has-mapping {
  grid-template-columns: var(--check-col) var(--component-col) var(--mapping-col);
  min-width: calc(var(--check-col) + var(--component-col) + var(--mapping-col));
}

.bulk-toolbar.has-corruption {
  grid-template-columns: var(--check-col) var(--component-col) var(--corruption-col);
  min-width: calc(var(--check-col) + var(--component-col) + var(--corruption-col));
}

.bulk-toolbar.has-mapping.has-corruption {
  grid-template-columns: var(--check-col) var(--component-col) var(--mapping-col) var(--corruption-col);
  min-width: calc(var(--check-col) + var(--component-col) + var(--mapping-col) + var(--corruption-col));
}

.bulk-selection-cell,
.bulk-cell {
  min-height: 44px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
}

.bulk-selection-cell {
  grid-column: 1 / span 2;
  border-right: 1px solid var(--line);
}

.bulk-cell {
  gap: 7px;
  align-items: flex-end;
}

.bulk-mapping-cell {
  grid-column: 3;
}

.bulk-corruption-cell {
  grid-column: 3;
  border-left: 1px solid var(--line-strong);
  background: #fcfcfa;
}

.bulk-toolbar.has-mapping.has-corruption .bulk-corruption-cell {
  grid-column: 4;
}

.bulk-toolbar label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
}

.bulk-toolbar select {
  width: 170px;
  min-height: 28px;
}

.error-select-label {
  flex: 1 1 auto;
  min-width: 0;
}

.error-select-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.error-select-wrap select {
  min-width: 0;
}

.error-type-tip {
  flex: 0 0 auto;
}

.error-type-column .error-type-popover {
  left: auto;
  right: 0;
  transform: none;
}

.check-column {
  width: 34px;
  text-align: center;
}

.check-column input {
  width: auto;
}

.run-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 6px;
}

.run-footer-config {
  flex-wrap: wrap;
}

.configuration-run-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.configuration-run-control em {
  color: var(--muted);
  font-style: normal;
}

.configuration-run-control input {
  width: min(280px, 42vw);
  min-height: 28px;
}

.info-tip,
.path-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: help;
}

.path-tip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.info-popover,
.path-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  left: 50%;
  width: 290px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 34, 31, 0.14);
  color: var(--text);
  padding: 9px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
}

.info-popover strong {
  font-weight: 680;
}

.info-tip:hover .info-popover,
.info-tip:focus .info-popover,
.path-tip:hover .path-popover,
.path-tip:focus .path-popover {
  opacity: 1;
}

.path-popover {
  width: min(520px, 70vw);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.endpoint-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.endpoint-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.endpoint-status-ok {
  border-color: rgba(31, 138, 84, 0.28);
  color: var(--green);
}

.endpoint-status-ok .endpoint-status-dot {
  background: var(--green);
}

.endpoint-status-warning {
  border-color: rgba(189, 122, 21, 0.3);
  color: var(--amber);
}

.endpoint-status-warning .endpoint-status-dot,
.endpoint-status-starting .endpoint-status-dot {
  background: var(--amber);
}

.endpoint-status-starting {
  border-color: rgba(189, 122, 21, 0.3);
  color: var(--amber);
}

.endpoint-status-offline {
  border-color: rgba(201, 68, 56, 0.3);
  color: var(--red);
}

.endpoint-status-offline .endpoint-status-dot {
  background: var(--red);
}

.endpoint-diagnostics {
  display: grid;
  gap: 3px;
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 7px 9px;
  font-size: 11px;
}

.endpoint-diagnostics strong {
  color: var(--text);
  font-weight: 600;
}

.endpoint-diagnostics-warning {
  border-color: rgba(189, 122, 21, 0.3);
  background: #fff9e8;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(32, 34, 31, 0.28);
  padding: 18px;
}

.modal-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(32, 34, 31, 0.2);
  padding: 16px;
}

.modal-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.endpoint-modal-card {
  display: grid;
  gap: 10px;
}

.stacked-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.stacked-field input,
.stacked-field select {
  color: var(--text);
  font-size: 12px;
}

.endpoint-url-for-path {
  display: none;
}

.endpoint-url-for-path.visible {
  display: grid;
}

.modal-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.modal-status.error {
  color: var(--red);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.mapping-table {
  width: max-content;
  min-width: calc(var(--check-col) + var(--component-col));
  border-collapse: collapse;
  table-layout: auto;
}

.mapping-table.has-mapping {
  min-width: calc(var(--check-col) + var(--component-col) + var(--mapping-col));
}

.mapping-table.has-corruption {
  min-width: calc(var(--check-col) + var(--component-col) + var(--corruption-col));
}

.mapping-table.has-mapping.has-corruption {
  min-width: calc(var(--check-col) + var(--component-col) + var(--mapping-col) + var(--corruption-col));
}

.mapping-table th,
.mapping-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 3px 6px;
  vertical-align: middle;
}

.mapping-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.mapping-table .check-column {
  width: var(--check-col);
  text-align: center;
}

.mapping-table .address-component-column {
  width: var(--component-col);
}

.mapping-table .field-mapping-column {
  width: var(--mapping-col);
  min-width: var(--mapping-col);
}

.mapping-table .error-type-column {
  width: var(--corruption-col);
  min-width: var(--corruption-col);
  border-left: 1px solid var(--line-strong);
  background: #fcfcfa;
  padding-left: 12px;
}

.mapping-table thead .field-mapping-column,
.mapping-table thead .error-type-column {
  background: #f4f4ef;
}

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

.field-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.param-select {
  position: relative;
  width: 210px;
  max-width: 210px;
}

.param-select summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}

.param-select summary::-webkit-details-marker {
  display: none;
}

.param-select[open] summary {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.param-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.param-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  width: 220px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 34, 31, 0.12);
  padding: 5px;
}

.param-check {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 4px;
  color: var(--text);
  padding: 5px 6px;
  font-size: 11px;
  cursor: pointer;
}

.param-check:hover {
  background: var(--panel-soft);
}

.param-check input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: #20221f;
}

.corruption-select {
  min-height: 25px;
  padding: 3px 6px;
  font-size: 11px;
}

.progress-wrap {
  margin: 8px 0;
  display: none;
}

.progress-wrap.visible {
  display: block;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7e7df;
  border: 1px solid var(--line);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: #20221f;
  transition: width 160ms ease;
}

.progress-indeterminate .progress-track {
  position: relative;
}

.progress-indeterminate .progress-bar {
  width: 38% !important;
  animation: progressSweep 900ms ease-in-out infinite;
  transition: none;
}

.progress-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

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

@keyframes progressSweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(280%);
  }
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 8px;
}

.results-page {
  padding-bottom: 24px;
}

.results-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 10px;
  margin-bottom: 8px;
}

.results-pagination-summary {
  color: var(--muted);
  font-size: 12px;
}

.results-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-page-button {
  min-height: 32px;
  min-width: 92px;
  white-space: nowrap;
}

.results-page-indicator {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.results-summary-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  padding: 8px;
  margin-bottom: 8px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.results-summary-bar > * {
  pointer-events: auto;
}

.results-buckets {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 6px;
}

.result-bucket {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: baseline;
  min-height: 42px;
  text-align: left;
  background: var(--panel-soft);
}

.result-bucket strong {
  font-size: 17px;
}

.result-bucket span {
  color: var(--text);
  white-space: nowrap;
}

.result-bucket em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.result-bucket.active {
  box-shadow: inset 0 0 0 1px rgba(32, 34, 31, 0.34);
}

.result-bucket.match-result-exactFull,
.match-result-pill.match-result-exactFull {
  border-color: rgba(31, 138, 84, 0.28);
  background: #edf8ef;
  color: var(--green);
}

.result-bucket.match-result-exactFull strong,
.result-bucket.match-result-exactFull span {
  color: var(--green);
}

.result-bucket.match-result-fullInexact,
.match-result-pill.match-result-fullInexact {
  border-color: rgba(205, 132, 30, 0.62);
  background: #edf8ef;
  color: #6f741d;
}

.result-bucket.match-result-fullInexact strong,
.result-bucket.match-result-fullInexact span {
  color: #6f741d;
}

.result-bucket.match-result-suggestion,
.match-result-pill.match-result-suggestion {
  border-color: rgba(205, 132, 30, 0.32);
  background: #fff7e8;
  color: #9a6416;
}

.result-bucket.match-result-suggestion strong,
.result-bucket.match-result-suggestion span {
  color: #9a6416;
}

.result-bucket.match-result-none,
.match-result-pill.match-result-none,
.match-result-pill.match-result-error {
  border-color: rgba(201, 68, 56, 0.3);
  background: #fff1ef;
  color: #9a3027;
}

.result-bucket.match-result-none strong,
.result-bucket.match-result-none span {
  color: #9a3027;
}

.result-bucket.match-result-error {
  border-color: rgba(126, 45, 39, 0.38);
  background: #f8e9e7;
  color: #7e2d27;
}

.result-bucket.match-result-error strong,
.result-bucket.match-result-error span {
  color: #7e2d27;
}

.match-result-pill.match-result-not-tested,
.match-result-pill.match-result-stale,
.match-result-pill.match-result-unknown {
  border-color: rgba(96, 107, 125, 0.22);
  background: #f7f8fa;
  color: #5b6574;
}

.result-bucket.muted {
  opacity: 0.48;
}

.results-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.release-report-button {
  min-height: 30px;
}

.release-report-status {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.release-report-loading {
  border-color: rgba(45, 108, 223, 0.22);
  background: #f4f8ff;
  color: #245ca7;
}

.release-report-success {
  border-color: rgba(31, 138, 84, 0.28);
  background: #eef9f1;
  color: #17683a;
}

.release-report-error {
  border-color: rgba(201, 68, 56, 0.3);
  background: #fff4f1;
  color: #8f3128;
}

.harness-access-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(45, 108, 223, 0.22);
  border-radius: 7px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: #f4f8ff;
  color: #245ca7;
  font-size: 12px;
}

.harness-access-banner strong {
  color: #183e73;
  font-weight: 750;
}

.cohort-shortfall-notice {
  border: 1px solid #ead38b;
  border-radius: 7px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: #fff6d8;
  color: #6e5200;
  font-size: 12px;
  line-height: 1.4;
}

.compare-summary-bar {
  align-items: start;
}

.compare-focus-summary {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.gate-banner {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.gate-pass {
  color: #17683a;
  background: #edf8ef;
  border-color: #b9dfc2;
}

.gate-warn,
.gate-review {
  color: #7a5b00;
  background: #fff6d8;
  border-color: #ead38b;
}

.gate-fail {
  color: #a32b20;
  background: #ffe8e4;
  border-color: #efa9a0;
}

.compare-diff-filters {
  grid-template-columns: repeat(6, minmax(104px, 1fr));
}

.compare-score-details {
  color: var(--muted);
  font-size: 11px;
}

.compare-score-details summary {
  cursor: pointer;
  width: fit-content;
}

.compare-summary-grid {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.compare-summary-lane {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.compare-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 6px 9px;
}

.metric-value {
  font-size: 17px;
  font-weight: 700;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
}

.result-list,
.saved-list,
.tagged-list {
  display: grid;
  gap: 6px;
}

.tagged-filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  padding: 8px;
  margin-bottom: 8px;
  backdrop-filter: blur(8px);
}

.tagged-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: baseline;
  min-height: 38px;
  text-align: left;
  background: var(--panel-soft);
}

.tagged-filter strong {
  font-size: 16px;
}

.tagged-filter.active {
  border-color: #20221f;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.28);
}

.tagged-filter.muted {
  opacity: 0.48;
}

.tagged-search-summary {
  color: var(--muted);
  font-size: 12px;
  margin: -1px 0 8px;
}

.tagged-group {
  display: grid;
  gap: 8px;
}

.tagged-group h2 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 680;
}

.tagged-group h2 span {
  color: var(--muted);
  font-weight: 500;
}

.result-row,
.saved-row,
.tagged-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row-head {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  cursor: pointer;
}

.tagged-row-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 36px;
  padding: 0;
  cursor: pointer;
}

.tagged-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  line-height: 1.3;
}

.tagged-header-status,
.tagged-header-actions {
  justify-self: end;
  align-self: start;
}

.result-marker {
  display: inline-grid;
  justify-items: center;
  gap: 3px;
  width: 34px;
  min-height: 26px;
}

.result-marker-label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--muted);
}

.dot.green {
  background: var(--green);
}

.dot.olive {
  background: var(--olive);
}

.dot.amber {
  background: var(--amber);
}

.dot.red {
  background: var(--red);
}

.dot.blue {
  background: var(--blue);
}

.dot.muted {
  background: #8a94a3;
}

.row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  color: var(--muted);
  font-size: 11px;
}

.detail {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 10px;
  background: var(--panel-soft);
  overflow: hidden;
}

.detail:focus-within {
  outline: 2px solid rgba(45, 108, 223, 0.45);
  outline-offset: -2px;
  background: #eef6ff;
}

.detail:focus-within .case-io-grid input[data-param]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(45, 108, 223, 0.14);
}

.case-io-grid {
  display: grid;
  grid-template-columns: 126px minmax(170px, 260px) minmax(170px, 260px);
  gap: 5px 10px;
  align-items: start;
}

.case-io-grid.compare-case-grid {
  grid-template-columns: 126px minmax(170px, 260px) minmax(170px, 260px) minmax(170px, 260px);
}

.case-io-grid.public-local-debug-grid {
  grid-template-columns: 126px minmax(170px, 260px) minmax(170px, 260px) minmax(170px, 260px) minmax(170px, 260px);
  margin-top: 10px;
}

.debug-field-title {
  min-height: 25px;
}

.debug-output-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.debug-output-chips {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.debug-output-title.debug-output-stale span:first-child::after {
  content: " stale";
  margin-left: 4px;
  color: var(--orange);
  font-weight: 700;
}

.column-match-chip {
  justify-self: end;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

.match-result-pill {
  font-weight: 700;
  white-space: nowrap;
}

.response-not-tested {
  border-style: dashed;
  color: var(--muted);
  background: #fafbfc;
  font-style: italic;
}

.debug-column-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 32px;
  margin-top: 4px;
}

.debug-column-footer .copy-input-button,
.debug-column-footer .test-public-button,
.debug-column-footer .test-local-button,
.debug-column-footer .test-repo-button,
.debug-column-footer .raw-request-button,
.debug-column-footer .raw-response-button {
  flex: 0 0 auto;
  min-height: 32px;
  min-width: 112px;
  padding: 6px 9px;
  font-size: 13px;
  white-space: nowrap;
}

.debug-column-footer .row-meta {
  flex: 0 0 auto;
  white-space: nowrap;
}

.raw-response-footer-spacer {
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.raw-response-footer-spacer-field {
  grid-column: 1;
}

.raw-request-footer-input {
  grid-column: 2;
}

.raw-response-footer {
  align-items: stretch;
}

.raw-response-footer-public {
  grid-column: 3;
}

.raw-response-footer-local {
  grid-column: 4;
}

.raw-response-footer-repo {
  grid-column: 5;
}

.raw-request-panel,
.raw-response-panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  overflow: auto;
}

.raw-request-panel pre,
.raw-response-panel pre {
  margin: 0;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.debug-retest-needed {
  border-color: rgba(205, 132, 30, 0.38);
  background: #fff7e8;
  color: #9a6416;
}

.debug-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}

.tagged-footer-status {
  margin-left: auto;
}

.debug-card-footer .tag-tools {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.comment-chip-list {
  display: flex;
  gap: 5px;
  flex: 1 1 260px;
  min-width: 0;
  flex-wrap: wrap;
}

.compare-evidence-line {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  margin-bottom: 10px;
  max-width: 900px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  color: #3f4652;
  background: #f8f9fb;
}

.compare-evidence-regression {
  border-color: rgba(201, 68, 56, 0.28);
  background: #fff4f1;
  color: #8f3128;
}

.compare-evidence-progress {
  border-color: rgba(36, 142, 84, 0.28);
  background: #f0faf2;
  color: #1f6d40;
}

.compare-evidence-evidence {
  border-color: rgba(45, 108, 223, 0.24);
  background: #f2f7ff;
  color: #245ca7;
}

.compare-evidence-changed,
.compare-evidence-unchanged {
  border-color: rgba(96, 107, 125, 0.22);
  background: #f7f8fa;
  color: #4d5665;
}

.compare-field-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
}

.compare-field-toolbar span {
  color: var(--ink);
  font-weight: 650;
}

.compare-field-toolbar em {
  font-style: normal;
}

.compare-field-toggle-button {
  min-height: 25px;
  padding: 3px 8px;
  font-size: 11px;
}

.compare-empty-fields {
  grid-column: 1 / -1;
  border: 1px dashed rgba(96, 107, 125, 0.28);
  border-radius: 7px;
  padding: 12px;
  color: var(--muted);
  background: #fafbfc;
  font-size: 12px;
}

.result-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid rgba(32, 34, 31, 0.04);
  background: var(--panel);
}

.result-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.result-card-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  line-height: 1.3;
}

.api-field-name {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  padding-top: 6px;
  word-break: break-word;
}

.case-io-grid input {
  min-height: 25px;
  padding: 4px 7px;
}

.readonly-field,
.response-field {
  position: relative;
  min-height: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  font-size: 12px;
}

.response-field::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
}

.readonly-field {
  background: #fff;
}

.output-only-field {
  background: transparent;
  border-color: transparent;
}

.known-subpremises-field {
  display: grid;
  gap: 6px;
}

.known-subpremise-select {
  max-width: 320px;
}

.result-card-associated-records {
  display: flex;
  align-items: center;
  min-width: 0;
}

.result-card-associated-records .known-subpremise-select {
  width: min(220px, 26vw);
  min-height: 27px;
  font-size: 11px;
}

.result-card-associated-records .known-subpremise-detail {
  position: absolute;
  z-index: 2;
  width: min(360px, 70vw);
  margin-top: 34px;
}

.associated-records-exact-warning {
  flex: 0 0 auto;
  border: 1px solid #b96f00;
  border-radius: 999px;
  padding: 2px 6px;
  color: #754500;
  background: #fff3d6;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.known-subpremise-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  font-size: 12px;
}

.known-subpremise-overrides {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  white-space: normal;
}

.response-empty {
  background: #fff;
}

.response-null {
  background: #f1f3f5;
  border-color: #d9dee4;
  color: #7b828c;
  font-style: italic;
}

.response-exact {
  background: #fff;
  border-color: var(--line);
}

.response-exact::before {
  background: #5ab879;
  opacity: 0.68;
}

.response-output-only {
  background: #fff;
  border-color: var(--line);
}

.response-inexact {
  background: #fff;
  border-color: var(--line);
}

.response-inexact::before {
  background: #d3922f;
  opacity: 0.72;
}

.response-different {
  background: #fff;
  border-color: var(--line);
}

.response-different::before {
  background: #d45c50;
  opacity: 0.72;
}

.compare-value-diff {
  box-shadow: inset 3px 0 0 rgba(200, 60, 50, 0.42);
}

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

.column-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 6px;
}

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

.input-grid label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.tag-tools,
.row-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.result-tag-tools {
  margin-left: auto;
  border-top: 0;
  padding-top: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.result-tag-tools .comment-input {
  width: min(260px, 42vw);
}

.tagged-comment-tools {
  margin-left: 0;
}

.tagged-comment-tools .comment-input {
  width: min(220px, 32vw);
}

.issue-type-control {
  gap: 10px;
  min-width: 180px;
  white-space: nowrap;
}

.issue-type-select,
.issue-type-input {
  min-width: 160px;
  width: min(180px, 24vw);
}

.issue-type-input-hidden {
  display: none;
}

.issue-type-save-button {
  min-height: 32px;
  white-space: nowrap;
}

.tag-toggle-button {
  width: 42px;
  min-width: 42px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-color: rgba(45, 108, 223, 0.28);
  background: #f4f8ff;
  color: #1f4f9a;
}

.tag-toggle-button[aria-pressed="true"] {
  border-color: rgba(45, 108, 223, 0.58);
  background: #dbeafe;
  color: #174299;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.16);
}

.tag-toggle-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.tag-toggle-button svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tweak-action-buttons {
  display: none;
  gap: 8px;
  align-items: center;
}

.tweak-action-buttons.visible {
  display: inline-flex;
}

.tweak-button[hidden],
.reset-tweak-button[hidden] {
  display: none;
}

.tweak-signal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  z-index: 2;
}

.tweak-signal span {
  position: absolute;
  top: -10%;
  width: 28%;
  height: 120%;
  background: linear-gradient(90deg, transparent, rgba(45, 108, 223, 0.22), transparent);
  transform: skewX(-18deg) translateX(-140%);
}

.detail > :not(.tweak-signal),
.tagged-row > :not(.tweak-signal) {
  position: relative;
  z-index: 1;
}

.tweak-enter {
  animation: tweakSurfaceEnter 640ms ease-out;
}

.tweak-enter .tweak-signal {
  animation: tweakSignalFlash 640ms ease-out;
}

.tweak-enter .tweak-signal span {
  left: -32%;
  animation: tweakSweepEnter 640ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tweak-reset {
  animation: tweakSurfaceReset 560ms ease-out;
}

.tweak-reset .tweak-signal {
  animation: tweakSignalFlash 560ms ease-out;
}

.tweak-reset .tweak-signal span {
  right: -32%;
  background: linear-gradient(90deg, transparent, rgba(111, 116, 107, 0.2), transparent);
  animation: tweakSweepReset 560ms cubic-bezier(0.35, 0, 0.2, 1);
}

@keyframes tweakSurfaceEnter {
  0% {
    box-shadow: inset 0 0 0 0 rgba(45, 108, 223, 0);
  }
  34% {
    box-shadow: inset 0 0 0 2px rgba(45, 108, 223, 0.5), 0 0 0 3px rgba(45, 108, 223, 0.1);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(45, 108, 223, 0);
  }
}

@keyframes tweakSurfaceReset {
  0% {
    box-shadow: inset 0 0 0 2px rgba(111, 116, 107, 0.28), 0 0 0 3px rgba(111, 116, 107, 0.08);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(111, 116, 107, 0);
  }
}

@keyframes tweakSignalFlash {
  0% {
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes tweakSweepEnter {
  from {
    transform: skewX(-18deg) translateX(-140%);
  }
  to {
    transform: skewX(-18deg) translateX(540%);
  }
}

@keyframes tweakSweepReset {
  from {
    transform: skewX(-18deg) translateX(140%);
  }
  to {
    transform: skewX(-18deg) translateX(-540%);
  }
}

.tag-tools input {
  max-width: 220px;
}

.tag-tools select {
  max-width: 190px;
}

.tagged-status-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}

.status-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 650;
}

.status-control select {
  min-width: 156px;
  min-height: 32px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 650;
}

.status-control-open {
  border-color: rgba(45, 108, 223, 0.34);
  background: #eef6ff;
  color: #245bb8;
}

.status-control-resolved {
  border-color: rgba(31, 138, 84, 0.34);
  background: #edf8ef;
  color: var(--green);
}

.status-control-investigating {
  border-color: rgba(189, 122, 21, 0.38);
  background: #fff5dc;
  color: var(--amber);
}

.status-control-dismissed {
  border-color: rgba(96, 107, 125, 0.28);
  background: #f2f3f4;
  color: #5f6875;
}

.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.compare-summary-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.compare-summary-grid {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.compare-summary-lane {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.compare-summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.compare-diff-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 12px;
}

.tag-chip {
  border-color: rgba(45, 108, 223, 0.28);
  background: #f4f8ff;
  color: #1f4f9a;
}

.postal-code-flag-chip {
  border-color: rgba(205, 132, 30, 0.34);
  background: #fff7e8;
  color: #9a6416;
}

.tagged-chip {
  border-color: rgba(45, 108, 223, 0.28);
  background: #f4f8ff;
  color: #1f4f9a;
}

.comment-chip {
  border-color: rgba(96, 107, 125, 0.28);
  background: #f7f8fa;
  color: #414b5c;
}

.chip-label {
  margin-right: 5px;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tagged-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.source-data-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 10px;
}

.source-data-button,
.copy-input-button,
.investigate-button {
  font-size: 12px;
}

.copy-input-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copy-input-button.copied {
  border-color: rgba(31, 138, 84, 0.42);
  color: var(--green);
  background: #edf8ef;
}

.copy-input-button.copy-failed {
  border-color: rgba(200, 60, 50, 0.42);
  color: var(--red);
  background: #fff1ef;
}

.investigate-button {
  border-color: rgba(45, 108, 223, 0.36);
  color: #245bb8;
}

.source-data-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.contract-panel {
  display: none;
}

.source-data-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 680;
}

.source-data-title span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
}

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

.source-record-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  min-width: 0;
  box-shadow: var(--shadow);
}

.source-record-missing {
  background: #f8f8f4;
}

.source-record-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.source-record-head span,
.source-record-path {
  color: var(--muted);
  font-size: 11px;
}

.source-record-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.source-field-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.source-field-table tr {
  border-bottom: 1px solid var(--line);
}

.source-field-table tr:last-child {
  border-bottom: 0;
}

.source-field-table tr:nth-child(odd) {
  background: var(--panel-soft);
}

.source-field-table th,
.source-field-table td {
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  font-size: 12px;
}

.source-field-table th {
  width: 220px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  background: rgba(239, 239, 234, 0.62);
}

.source-field-table td.empty {
  color: #9a9e95;
  font-style: italic;
}

.source-data-loading,
.source-data-error {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  color: var(--muted);
}

.source-data-error {
  color: var(--red);
}

.empty {
  color: var(--muted);
  padding: 18px 0;
}

.startup-state {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.startup-state.startup-error {
  align-items: flex-start;
  flex-direction: column;
  color: var(--red);
}

.startup-state.startup-error span {
  color: var(--muted);
}

.startup-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.saved-row,
.tagged-row {
  padding: 12px;
}

.tagged-row {
  position: relative;
}

.tagged-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.remove-tagged-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(96, 107, 125, 0.22);
  background: #fff;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.remove-tagged-button:hover {
  border-color: rgba(201, 68, 56, 0.32);
  background: #fff1ef;
  color: var(--red);
}

.close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.saved-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.run-name-line {
  margin-right: 24px;
}

.run-edit-tools,
.run-comment-tools {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.run-edit-tools label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.run-edit-tools input {
  width: min(280px, 48vw);
}

.run-comment-tools input {
  width: min(360px, 58vw);
}

.run-comments {
  margin-top: 8px;
}

.compact-line {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

@media (max-width: 820px) {
  .top-tabs {
    padding: 10px 12px 0;
  }

  .workspace {
    padding: 12px;
  }

  .io-grid,
  .case-io-grid,
  .case-io-grid.compare-case-grid,
  .case-io-grid.public-local-debug-grid,
  .summary-strip,
  .input-grid,
  .search-form,
  .workspace-top,
  .results-summary-bar,
  .compare-summary-bar,
  .compare-summary-lane,
  .results-buckets,
  .compare-diff-filters,
  .field-preview-grid,
  .saved-grid {
    grid-template-columns: 1fr;
  }

  .results-summary-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace-top {
    align-items: stretch;
  }

  .page-actions,
  .tagged-search {
    min-width: 0;
    width: 100%;
  }

  .source-records-grid {
    grid-template-columns: 1fr;
  }

  .source-field-table th {
    width: 42%;
  }

  .endpoint-inline-meta {
    flex-basis: 100%;
    justify-content: flex-start;
    margin-left: 68px;
  }

}

.dataset-picker {
  width: min(28rem, 100%);
  max-width: 100%;
  min-width: 0;
  font-size: 0.875rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.dataset-picker > summary { cursor: pointer; padding: 0.75rem 1rem; font-weight: 600; }
.dataset-picker[open] > summary { border-bottom: 1px solid var(--line); }
.dataset-options { padding: 0.75rem; }
.dataset-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-bottom: 0.75rem; }
.dataset-actions button { min-height: 32px; padding: 0.35rem 0.75rem; font-size: inherit; }
.dataset-groups { display: grid; gap: 0.75rem; max-height: 24rem; overflow-y: auto; scrollbar-gutter: stable; }
.dataset-country { min-width: 0; margin: 0; padding: 0; border: 0; }
.dataset-country legend { width: 100%; padding: 0; }
.dataset-options label { display: flex; align-items: center; gap: 0.625rem; width: 100%; min-width: 0; cursor: pointer; }
.dataset-options input[type="checkbox"] { flex: 0 0 1rem; width: 1rem; min-width: 1rem; height: 1rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--blue); }
.dataset-options label > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dataset-options label > small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.dataset-country-label { padding: 0.5rem 0.625rem; border-radius: 5px; background: var(--panel-soft); font-weight: 600; }
.dataset-country-items { padding: 0.25rem 0 0.25rem 1.25rem; }
.dataset-item { padding: 0.45rem 0.625rem; border-radius: 4px; }
.dataset-item:hover { background: var(--panel-soft); }
.dataset-options .dataset-note { margin: 0; padding: 0.5rem 0.25rem 0; color: var(--muted); font-size: 0.875rem; }
.dataset-options input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (hover: none) and (pointer: coarse) {
  .endpoint-inline-meta {
    flex-basis: 100%;
    justify-content: flex-start;
    margin-left: 68px;
  }

  .path-tip {
    display: none;
  }
}
