:root {
  color-scheme: light;
  --ink: #17243a;
  --muted: #607087;
  --line: #d5dce5;
  --line-strong: #aeb9c7;
  --surface: #ffffff;
  --surface-alt: #f5f7fa;
  --navy: #1d3c67;
  --teal: #0f766e;
  --teal-soft: #e7f5f1;
  --orange: #c75b12;
  --red: #b42318;
  --red-soft: #fdf0ee;
  --amber: #9a6700;
  --amber-soft: #fff6db;
  --shadow: 0 12px 34px rgba(28, 48, 78, 0.08);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-alt);
  color: var(--ink);
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  min-height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 4px;
  font-weight: 800;
}

.brand-block div {
  display: grid;
  gap: 2px;
}

.brand-block strong {
  font-size: 17px;
}

.brand-block span:last-child {
  font-size: 12px;
  color: var(--muted);
}

.runtime-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

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

.status-dot.ok {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.status-separator {
  width: 1px;
  height: 14px;
  background: var(--line);
  margin: 0 4px;
}

.view-tabs {
  height: 48px;
  display: flex;
  align-items: stretch;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tab-button,
.api-link {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}

.tab-button:hover,
.api-link:hover {
  color: var(--navy);
  background: #f8fafc;
}

.tab-button.active {
  color: var(--navy);
  border-bottom-color: var(--orange);
  font-weight: 700;
}

.api-link {
  margin-left: auto;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 32px 40px;
}

.app-view {
  display: none;
  animation: view-in 180ms ease-out;
}

.app-view.active {
  display: block;
}

.app-view[hidden] {
  display: none !important;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scope-line {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 40px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #eef3f8;
  border-left: 3px solid var(--navy);
  color: #46566d;
  font-size: 13px;
}

.scope-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scope-copy p {
  margin: 0;
}

.scope-copy span {
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.official-source-link {
  margin-left: auto;
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.official-source-link:hover,
.official-source-link:focus-visible {
  text-decoration: underline;
}

.governance-workflow {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
}

.governance-workflow li {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.governance-workflow li:first-child {
  border-left: 0;
}

.governance-workflow li > span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.governance-workflow li div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.governance-workflow strong {
  color: #405069;
  font-size: 13px;
}

.governance-workflow small {
  font-size: 11px;
}

.governance-workflow li.active {
  background: #f7fafc;
}

.governance-workflow li.active > span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.governance-workflow li.complete > span {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.governance-workflow li.complete strong {
  color: var(--teal);
}

.query-grid {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.query-workspace,
.evidence-inspector {
  padding: 28px;
}

.evidence-inspector {
  border-left: 1px solid var(--line);
  background: #fbfcfd;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading.wide {
  margin-bottom: 20px;
}

.section-heading h1,
.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h1 {
  font-size: 25px;
  line-height: 1.25;
}

.section-heading h2 {
  font-size: 20px;
}

.section-heading.wide p:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin-bottom: 5px !important;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.count-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

form label {
  display: block;
  margin-bottom: 8px;
  color: #34455c;
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  outline: none;
  line-height: 1.6;
}

textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.form-actions {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

#character-count {
  color: var(--muted);
  font-size: 12px;
}

.button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.button.primary {
  background: var(--teal);
  color: #fff;
}

.button.primary:hover {
  background: #0b635c;
}

.button.secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--navy);
}

.button.secondary:hover {
  background: #f4f7fa;
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.suggestions button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-alt);
  color: #45566e;
  cursor: pointer;
  font-size: 12px;
}

.suggestions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.answer-region {
  min-height: 190px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.answer-placeholder {
  min-height: 145px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.answer-placeholder strong {
  color: #405069;
}

.answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.decision-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--line-strong);
}

.decision-banner > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.decision-banner > div:first-child > span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.decision-banner > div:first-child > strong {
  color: var(--navy);
  font-size: 16px;
}

.decision-review {
  background: var(--teal-soft);
  border-left-color: var(--teal);
}

.decision-warning {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}

.decision-blocked {
  background: var(--red-soft);
  border-left-color: var(--red);
}

.governance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.governance-summary > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 12px 14px;
  border-left: 1px solid var(--line);
}

.governance-summary > div:first-child {
  border-left: 0;
}

.governance-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.governance-summary strong {
  color: #33465f;
  font-size: 13px;
  line-height: 1.55;
}

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

.result-section + .result-section {
  margin-top: 18px;
}

.result-section h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 14px;
}

.action-list {
  margin: 0;
  padding-left: 22px;
  color: #344960;
  font-size: 14px;
  line-height: 1.7;
}

.action-list li + li {
  margin-top: 6px;
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.status-answered {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-insufficient_evidence {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-clinical_boundary,
.status-privacy_block,
.status-approval_boundary {
  background: var(--red-soft);
  color: var(--red);
}

.evidence-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.answer-copy {
  color: #28394f;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
}

.answer-scope {
  margin-top: 16px;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
}

.rag-trace {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.rag-trace summary {
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.trace-grid > div {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 11px 13px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.trace-grid > div:nth-child(-n + 3) {
  border-top: 0;
}

.trace-grid > div:nth-child(3n + 1) {
  border-left: 0;
}

.trace-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.trace-grid strong {
  color: #344960;
  font-size: 12px;
  line-height: 1.45;
}

.trace-warning {
  margin: 10px 0 0;
  color: var(--amber);
  font-size: 11px;
}

.trace-expansion {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.evidence-list.empty {
  display: grid;
  place-content: center;
  min-height: 360px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.evidence-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.evidence-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.evidence-label {
  color: var(--orange);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.evidence-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.evidence-score {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
}

.evidence-item p {
  margin: 0;
  color: #4c5e75;
  font-size: 13px;
  line-height: 1.65;
}

.evidence-source {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-source a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.evidence-source a:hover {
  text-decoration: underline;
}

#audit-view,
#evaluation-view,
#architecture-view {
  min-height: 650px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.architecture-source {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.architecture-source:hover,
.architecture-source:focus-visible {
  text-decoration: underline;
}

.architecture-pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 4px 0 34px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.architecture-pipeline > div {
  position: relative;
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 17px;
  border-left: 1px solid var(--line);
}

.architecture-pipeline > div:first-child {
  border-left: 0;
}

.architecture-pipeline > div::after {
  content: "";
  position: absolute;
  right: -5px;
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  background: var(--orange);
  transform: rotate(45deg);
  z-index: 1;
}

.architecture-pipeline > div:last-child::after {
  display: none;
}

.architecture-pipeline span {
  color: var(--orange);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.architecture-pipeline strong {
  color: var(--navy);
  font-size: 15px;
}

.architecture-pipeline small {
  color: var(--muted);
  font-size: 11px;
}

.architecture-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
}

.architecture-section h2 {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 20px;
}

.operation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.operation-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.operation-list li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--teal);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.operation-list strong {
  color: #344960;
  font-size: 13px;
}

.operation-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.deployment-table {
  border-top: 1px solid var(--line-strong);
}

.deployment-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(210px, 1.45fr) minmax(120px, 0.7fr);
  border-bottom: 1px solid var(--line);
}

.deployment-row > * {
  padding: 13px 11px;
  border-left: 1px solid var(--line);
  color: #455970;
  font-size: 12px;
  line-height: 1.5;
}

.deployment-row > *:first-child {
  border-left: 0;
}

.deployment-row.header > * {
  color: var(--muted);
  background: #f7f9fb;
  font-size: 10px;
  font-weight: 800;
}

.deployment-row.future > * {
  color: #7b6a45;
  background: #fffaf0;
}

.architecture-proof {
  margin-top: 22px;
  padding: 14px 0 0 13px;
  border-top: 1px solid var(--line-strong);
  border-left: 3px solid var(--teal);
}

.architecture-proof strong {
  color: var(--navy);
  font-size: 13px;
}

.architecture-proof p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.muted-proof {
  border-left-color: var(--amber);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  background: #f7f9fb;
  font-size: 11px;
  font-weight: 800;
}

td code {
  font-size: 11px;
}

.table-empty {
  padding: 48px;
  color: var(--muted);
  text-align: center;
}

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

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 26px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.metric-strip div {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px 20px;
  border-left: 1px solid var(--line);
}

.metric-strip div:first-child {
  border-left: 0;
}

.metric-strip span {
  color: var(--muted);
  font-size: 12px;
}

.metric-strip strong {
  color: var(--navy);
  font-size: 24px;
}

.evaluation-cases.empty {
  display: grid;
  place-content: center;
  min-height: 280px;
  color: var(--muted);
}

.evaluation-case {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(160px, 0.8fr);
  gap: 16px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.evaluation-case .case-index {
  color: var(--muted);
  font-family: Consolas, monospace;
}

.pass {
  color: var(--teal);
  font-weight: 800;
}

.fail {
  color: var(--red);
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 18px 24px 28px;
  color: #7a8798;
  font-size: 11px;
}

@media (max-width: 900px) {
  .topbar,
  .view-tabs,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .runtime-status #engine-status,
  .runtime-status .status-separator {
    display: none;
  }

  .governance-workflow {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .query-grid {
    grid-template-columns: 1fr;
  }

  .evidence-inspector {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-strip div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metric-strip div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .evaluation-case {
    grid-template-columns: 32px 1fr;
    gap: 8px 12px;
    padding: 12px 0;
  }

  .evaluation-case > :nth-child(n + 3) {
    grid-column: 2;
  }

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

  .architecture-pipeline > div:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .architecture-pipeline > div:nth-child(5),
  .architecture-pipeline > div:nth-child(6) {
    border-top: 1px solid var(--line);
  }

  .architecture-detail-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 62px;
  }

  .brand-block span:last-child {
    display: none;
  }

  .runtime-status {
    font-size: 11px;
  }

  .view-tabs {
    height: 46px;
    padding: 0 8px;
    overflow-x: auto;
  }

  .tab-button,
  .api-link {
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 12px;
  }

  main {
    padding: 14px 10px 28px;
  }

  .scope-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .scope-copy {
    align-items: flex-start;
  }

  .official-source-link {
    margin-left: 0;
    white-space: normal;
  }

  .governance-workflow li {
    min-height: 64px;
    padding: 10px 12px;
  }

  .query-grid {
    min-height: 0;
  }

  .query-workspace,
  .evidence-inspector,
  #audit-view,
  #evaluation-view,
  #architecture-view {
    padding: 20px 16px;
  }

  .section-heading h1 {
    font-size: 22px;
  }

  .form-actions {
    align-items: flex-end;
  }

  .form-actions > div {
    display: flex;
    gap: 6px;
  }

  .suggestions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .suggestions button {
    width: 100%;
  }

  .answer-header,
  .decision-banner,
  .evidence-title,
  .evidence-source {
    align-items: flex-start;
    flex-direction: column;
  }

  .decision-banner > div:first-child {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .governance-summary {
    grid-template-columns: 1fr;
  }

  .trace-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trace-grid > div:nth-child(n) {
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .trace-grid > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .trace-grid > div:nth-child(2n + 1) {
    border-left: 0;
  }

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

  .architecture-pipeline > div:nth-child(n) {
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .architecture-pipeline > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .architecture-pipeline > div:nth-child(2n + 1) {
    border-left: 0;
  }

  .architecture-pipeline > div::after {
    display: none;
  }

  .deployment-row {
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .deployment-row.header {
    display: none;
  }

  .deployment-row > * {
    padding: 3px 10px;
    border-left: 0;
  }

  .governance-summary > div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .governance-summary > div:first-child {
    border-top: 0;
  }

  .evidence-list.empty {
    min-height: 120px;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip div {
    padding: 12px;
  }

  .metric-strip strong {
    font-size: 19px;
  }

  .table-wrap {
    overflow: visible;
  }

  .audit-table,
  .audit-table tbody,
  .audit-table tr,
  .audit-table td {
    display: block;
    width: 100%;
  }

  .audit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .audit-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .audit-table td {
    min-width: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .audit-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .audit-table td:nth-child(2),
  .audit-table td:nth-child(4) {
    grid-column: 1 / -1;
  }

  .audit-table .table-empty {
    grid-column: 1 / -1;
    padding: 32px 0;
  }

  footer {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
