:root {
  --ink: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.12);
  --panel: rgba(255, 255, 255, 0.86);
  --nav: #07131f;
  --blue: #1a73e8;
  --green: #0f9d58;
  --red: #d93025;
  --amber: #f9ab00;
  --cream: #f8fbff;
  --clay: #ff6d3a;
  --aqua: #24c6dc;
  --shadow: 0 28px 90px rgba(7, 19, 31, 0.17);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Aptos Display", "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(36, 198, 220, 0.34), transparent 24rem),
    radial-gradient(circle at 88% 3%, rgba(26, 115, 232, 0.22), transparent 28rem),
    radial-gradient(circle at 70% 70%, rgba(249, 171, 0, 0.16), transparent 20rem),
    linear-gradient(135deg, #f7fbff 0%, #eef5ff 46%, #fff8e1 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.08rem;
  color: white;
  background: linear-gradient(135deg, var(--blue), #185abc);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(26, 115, 232, 0.2);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost {
  color: var(--ink);
  background: #f8fbff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.danger {
  color: white;
  background: var(--red);
}

.danger.ghost {
  color: var(--red);
  background: #fff1f0;
}

.shell {
  width: min(1400px, 100%);
  min-width: 0;
  padding: 26px 30px 64px;
}

.app-frame {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
}

.app-nav {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 18px;
  min-width: 0;
  min-height: 100vh;
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.98), rgba(12, 31, 53, 0.94)),
    radial-gradient(circle at top, rgba(26, 115, 232, 0.32), transparent 20rem),
    radial-gradient(circle at bottom left, rgba(36, 198, 220, 0.18), transparent 18rem);
  color: #f8fbff;
  box-shadow: 20px 0 70px rgba(7, 19, 31, 0.2);
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 248, 234, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.brand-card small,
.nav-note span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 248, 234, 0.68);
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-card > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #07131f;
  background: linear-gradient(135deg, var(--aqua), var(--amber));
  font-weight: 950;
  letter-spacing: -0.08em;
}

.workspace-nav {
  display: grid;
  gap: 10px;
}

.nav-pill {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  border-radius: 18px;
  color: rgba(255, 248, 234, 0.72);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nav-pill:hover,
.nav-pill.active {
  color: #07131f;
  background: linear-gradient(135deg, #ffffff, #e8f0fe);
  border-color: rgba(232, 240, 254, 0.8);
}

.privacy-button {
  margin-top: 8px;
  color: #07131f;
  background: linear-gradient(135deg, #f9ab00, #24c6dc);
}

.nav-note {
  align-self: end;
  min-width: 0;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 248, 234, 0.14);
}

.page-section {
  display: none;
}

.page-section:not(.active) {
  display: none !important;
}

.page-section.active {
  display: block;
  animation: page-in 260ms ease-out both;
}

.page-section.grid.active {
  display: grid;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  min-width: 0;
  border: 1px solid rgba(123, 141, 163, 0.34);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 24px;
}

.recommendation-board {
  background:
    linear-gradient(135deg, rgba(16, 27, 23, 0.96), rgba(35, 92, 79, 0.9)),
    radial-gradient(circle at 100% 0%, rgba(99, 212, 189, 0.28), transparent 24rem);
  color: #fff7e6;
}

.recommendation-board .eyebrow,
.recommendation-board h2 {
  color: #fff7e6;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recommendation-grid article {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 247, 230, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.recommendation-grid span {
  color: rgba(255, 247, 230, 0.72);
  line-height: 1.45;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
}

.hero h1 {
  min-width: 0;
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  letter-spacing: -0.07em;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.lede {
  min-width: 0;
  max-width: 760px;
  color: #314055;
  font-size: 1.18rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.health-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  padding: 18px;
  border-radius: 22px;
  background: #10151f;
  color: white;
}

.health-card small {
  display: block;
  margin-top: 4px;
  color: #b8c6d8;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 8px rgba(181, 71, 8, 0.18);
}

.dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(12, 124, 89, 0.18);
}

.dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(180, 35, 24, 0.18);
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.grid-2 {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.collapse-toggle {
  margin-left: auto;
  padding: 0.58rem 0.82rem;
  font-size: 0.82rem;
}

.panel.panel-collapsed > :not(.section-head) {
  display: none !important;
}

.hidden {
  display: none !important;
}

.section-head h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: 0.78rem 0.9rem;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.scan-form,
.criteria-panel {
  display: grid;
  gap: 14px;
}

.criteria-toolbar,
.criteria-grid {
  display: grid;
  gap: 12px;
}

.criteria-toolbar {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto auto auto;
  align-items: end;
}

.criteria-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
}

.criteria-options {
  display: grid;
  gap: 8px;
}

.field-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: end;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-width: 18px;
  height: 18px;
}

.scan-form {
  grid-template-columns: 1.4fr 0.9fr 0.8fr auto auto;
  align-items: end;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.status-grid div {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: #f4f7fb;
  border: 1px solid var(--line);
}

.status-grid dt {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-grid dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.notice,
.criteria-hint {
  margin-top: 14px;
  border-radius: 18px;
  padding: 14px;
  background: #fff8eb;
  color: #713b12;
  border: 1px solid #fedf89;
}

.quality-gate-card {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(36, 78, 105, 0.14);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(244, 248, 250, 0.92), rgba(255, 255, 255, 0.78));
  box-shadow: 0 18px 45px rgba(16, 34, 47, 0.08);
}

.quality-gate-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.quality-gate-head div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.quality-gate-head span,
.quality-gate-detail {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.quality-gate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
}

.quality-gate-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quality-gate-grid .check-row {
  align-content: center;
  display: flex;
}

.quality-gate-card input[type="number"],
.quality-gate-card input[type="text"],
.quality-gate-card input:not([type]) {
  min-width: 0;
  width: 100%;
}

.quality-gate-card.pass {
  border-color: rgba(34, 132, 93, 0.35);
}

.quality-gate-card.fail {
  border-color: rgba(186, 72, 69, 0.42);
  background: linear-gradient(135deg, rgba(255, 246, 244, 0.95), rgba(255, 255, 255, 0.84));
}

.quality-gate-card.warn {
  border-color: rgba(197, 139, 39, 0.42);
}

.table-wrap {
  max-height: var(--quasar-table-height, var(--quasar-table-h, 460px));
  min-height: 220px;
  overflow: auto;
  resize: vertical;
  scrollbar-gutter: stable both-edges;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.site-editor {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin: 16px 0 10px;
  padding: 16px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(232, 240, 254, 0.82), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(36, 198, 220, 0.16), transparent 14rem);
}

.site-editor .site-notes {
  grid-column: span 2;
}

.delete-confirmation,
.version-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.delete-confirmation {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) minmax(240px, 1fr) auto;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(217, 48, 37, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(253, 242, 242, 0.94), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(217, 48, 37, 0.12), transparent 16rem);
}

.delete-confirmation strong,
.delete-confirmation small {
  display: block;
}

.version-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.version-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.version-card span,
.version-card small {
  color: var(--muted);
  line-height: 1.35;
}

.version-card .button-row {
  justify-content: flex-start;
}

.container-recovery {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(232, 240, 254, 0.82), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(36, 198, 220, 0.16), transparent 16rem);
}

.container-recovery-head,
.container-recovery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.container-recovery-head span,
.container-recovery-row span,
.container-recovery-row small,
.container-recovery-empty {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.container-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.container-recovery-list {
  display: grid;
  gap: 10px;
}

.container-recovery-row,
.container-recovery-empty {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.container-recovery-row .button-row {
  justify-content: flex-end;
}

.version-detail {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(249, 171, 0, 0.36);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(248, 251, 255, 0.94)),
    radial-gradient(circle at 100% 0%, rgba(249, 171, 0, 0.16), transparent 18rem);
}

.version-detail textarea {
  min-height: 190px;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.86rem;
}

.warning-message {
  border: 1px solid rgba(217, 48, 37, 0.22);
  border-radius: 16px;
  background: #fff1f0;
  color: #9b1c14;
  padding: 12px 14px;
  font-weight: 800;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.import-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
}

.import-card span {
  color: var(--green);
  font-weight: 900;
}

.import-card small {
  color: var(--muted);
  line-height: 1.4;
}

.import-card code {
  border-radius: 8px;
  background: #edf4ff;
  padding: 0.1rem 0.28rem;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.coverage-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  background: white;
}

.coverage-card span {
  color: var(--muted);
  line-height: 1.45;
}

.coverage-card.ready {
  border-color: #abefc6;
  background: #f0fdf4;
}

.coverage-card.next {
  border-color: #fedf89;
  background: #fffbeb;
}

.coverage-card.reference {
  border-color: #b2ddff;
  background: #eff8ff;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.product-card,
.control-plane-card,
.metric-card,
.pipeline-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9)),
    radial-gradient(circle at top right, rgba(26, 115, 232, 0.08), transparent 12rem);
  padding: 16px;
}

.product-card {
  display: grid;
  gap: 10px;
}

.product-card summary,
.control-plane-card summary {
  display: grid;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.product-card summary::-webkit-details-marker,
.control-plane-card summary::-webkit-details-marker {
  display: none;
}

.product-card summary::after,
.control-plane-card summary::after {
  content: "View details";
  width: fit-content;
  margin-top: 4px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
}

.product-card[open] summary::after,
.control-plane-card[open] summary::after {
  content: "Hide details";
}

.product-card strong,
.control-plane-card strong {
  line-height: 1.15;
}

.product-card small,
.control-plane-card small {
  color: var(--muted);
  line-height: 1.4;
}

.cap-status {
  width: fit-content;
  border-radius: 999px;
  padding: 0.34rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cap-status.live {
  color: #067647;
  background: #dcfae6;
}

.cap-status.partial {
  color: #b54708;
  background: #fef0c7;
}

.cap-status.adapter {
  color: #1849a9;
  background: #d1e9ff;
}

.cap-status.no_adapter {
  color: #5925dc;
  background: #ebe9fe;
}

.cap-status.planned {
  color: #344054;
  background: #eaecf0;
}

.cap-status.demo {
  color: #5925dc;
  background: #f4f3ff;
}

.cap-status.blocked {
  color: #912018;
  background: #fee4e2;
}

.requirement-group {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.44);
}

.requirement-group-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.requirement-group-head h3 {
  margin: 0;
}

.requirement-group-head span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: right;
}

.requirement-card-grid,
.control-plane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.requirement-detail {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.requirement-detail div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.requirement-detail dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.requirement-detail dd {
  min-width: 0;
  margin: 0;
  color: #26364d;
  line-height: 1.35;
}

.requirement-detail code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.pipeline-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.pipeline-stage {
  cursor: grab;
  position: relative;
}

.pipeline-stage::after {
  content: "->";
  position: absolute;
  right: -12px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.pipeline-stage:last-child::after {
  display: none;
}

.pipeline-stage.dragging {
  opacity: 0.55;
}

.repair-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  align-items: end;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.diagnosis-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  padding: 16px;
}

.diagnosis-card.good {
  border-color: #abefc6;
  background: #f0fdf4;
}

.diagnosis-card.warn {
  border-color: #fedf89;
  background: #fffbeb;
}

.diagnosis-card.bad {
  border-color: #fecdca;
  background: #fff1f0;
}

.diagnosis-card code,
.diagnosis-card small {
  overflow-wrap: anywhere;
}

.compact-head {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.evidence-ledger {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.evidence-ledger-list {
  display: grid;
  gap: 0.8rem;
}

.evidence-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.evidence-row.empty {
  color: var(--muted);
}

.evidence-row strong {
  color: var(--ink);
}

.evidence-row span,
.evidence-row small,
.evidence-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.evidence-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}

.evidence-meta-grid div {
  padding: 0.6rem;
  border: 1px solid rgba(31, 46, 70, 0.08);
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.86);
}

.evidence-meta-grid dt {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.evidence-meta-grid dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
  word-break: break-word;
}

.trace-viewer {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.9), rgba(255, 255, 255, 0.72));
}

.trace-timeline {
  display: grid;
  gap: 0.75rem;
  counter-reset: trace-step;
}

.trace-step {
  position: relative;
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem 0.85rem 3rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.trace-step::before {
  counter-increment: trace-step;
  content: counter(trace-step);
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.trace-step.empty::before {
  content: "i";
  background: var(--muted);
}

.trace-step strong {
  color: var(--ink);
}

.trace-step span,
.trace-step code,
.trace-step small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.regression-lab {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
}

.regression-results {
  display: grid;
  gap: 0.75rem;
}

.canary-results {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.regression-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.regression-row.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.regression-row.fail {
  border-color: #fecdca;
  background: #fff1f0;
}

.regression-row.empty {
  color: var(--muted);
}

.regression-row span,
.regression-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.canary-row {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.canary-row.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.canary-row.fail {
  border-color: #fecdca;
  background: #fff1f0;
}

.canary-row.empty {
  color: var(--muted);
}

.canary-row strong,
.canary-row span,
.canary-row code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lineage-panel,
.accuracy-scorecard-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.82));
}

.lineage-results,
.accuracy-scorecard-results {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.lineage-row,
.accuracy-scorecard-row {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.lineage-row.pass,
.accuracy-scorecard-row.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.lineage-row.warn,
.accuracy-scorecard-row.warn {
  border-color: #fedf89;
  background: #fffbeb;
}

.accuracy-scorecard-row.fail {
  border-color: #fecdca;
  background: #fff1f0;
}

.lineage-row.empty,
.accuracy-scorecard-row.empty {
  color: var(--muted);
}

.lineage-row strong,
.lineage-row span,
.lineage-row code,
.accuracy-scorecard-row strong,
.accuracy-scorecard-row span,
.accuracy-scorecard-row code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.accuracy-scorecard-row b {
  width: max-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 46, 70, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
}

.drift-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.78));
}

.drift-results {
  display: grid;
  gap: 0.75rem;
}

.drift-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.drift-row.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.drift-row.warn {
  border-color: #fedf89;
  background: #fffbeb;
}

.drift-row.empty {
  color: var(--muted);
}

.drift-row span,
.drift-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.visual-drift-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.78));
}

.visual-drift-results {
  display: grid;
  gap: 0.75rem;
}

.visual-drift-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.visual-drift-row.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.visual-drift-row.warn {
  border-color: #fedf89;
  background: #fffbeb;
}

.visual-drift-row.empty {
  color: var(--muted);
}

.visual-drift-row span,
.visual-drift-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.volume-anomaly-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.94), rgba(255, 255, 255, 0.78));
}

.volume-anomaly-results {
  display: grid;
  gap: 0.75rem;
}

.volume-anomaly-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.volume-anomaly-row.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.volume-anomaly-row.warn {
  border-color: #fedf89;
  background: #fffbeb;
}

.volume-anomaly-row.empty {
  color: var(--muted);
}

.volume-anomaly-row span,
.volume-anomaly-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.human-review-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.78));
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.human-review-panel .section-head {
  flex-wrap: wrap;
}

.human-review-panel .section-head > div {
  min-width: 0;
}

.human-review-panel .button-row {
  justify-content: flex-start;
}

.human-review-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.human-review-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.human-review-row.open {
  border-color: #fedf89;
  background: #fffbeb;
}

.human-review-row.resolved {
  border-color: #abefc6;
  background: #f0fdf4;
}

.human-review-row.empty {
  color: var(--muted);
}

.human-review-row span,
.human-review-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.audit-log-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.audit-log-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.audit-log-row.empty {
  color: var(--muted);
}

.audit-log-row span,
.audit-log-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #fff;
}

.privacy-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.privacy-return-zone {
  width: 100%;
  border-radius: 0;
  padding: 16px;
  color: #07131f;
  background: linear-gradient(135deg, #f8fbff, #e8f0fe);
  box-shadow: 0 -18px 46px rgba(7, 19, 31, 0.16);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip-list span {
  border-radius: 999px;
  background: #edf4ff;
  color: #1849a9;
  padding: 0.45rem 0.65rem;
  font-weight: 850;
}

.chip-list .schema-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 18px;
  padding: 0.45rem 0.5rem 0.45rem 0.7rem;
}

.schema-chip strong {
  font-size: 0.9rem;
}

.mini-action {
  padding: 0.36rem 0.54rem;
  font-size: 0.72rem;
  box-shadow: none;
}

.action-grid,
.metric-grid,
.slo-budget-grid,
.audit-log-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.action-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric-card {
  display: grid;
  gap: 6px;
}

.metric-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* ── P6 BI interactive SVG charts ────────────────────────────────────────
   Native SVG chart grid rendered by renderBI().  No external library.
   Four charts: scan history bars, source donut, score histogram, freshness.
─────────────────────────────────────────────────────────────────────────── */
.bi-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.bi-chart {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 8px;
}

.bi-chart-label {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.bi-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: center;
  margin-top: 5px;
}

.bi-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--muted);
}

.bi-legend span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Resilient-fetch staleness banner — surfaces cache-fallback state when an
   API loader (sites, history, generated reports) cannot reach the live
   endpoint. Hidden by default; the loader sets `hidden=false` and writes
   text content like "Stale cache shown — fetched 12m ago; live API: …". */
.stale-banner {
  margin: 6px 0 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 196, 96, 0.15);
  border: 1px solid rgba(255, 196, 96, 0.45);
  color: var(--text, #1a1f2c);
  font-size: 0.86rem;
  line-height: 1.4;
}

.slo-budget-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.slo-budget-card {
  display: grid;
  min-width: 0;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.slo-budget-card.pass {
  border-color: #abefc6;
  background: #f0fdf4;
}

.slo-budget-card.warn {
  border-color: #fedf89;
  background: #fffbeb;
}

.slo-budget-card.bad {
  border-color: #fecdca;
  background: #fff1f0;
}

.slo-budget-card strong {
  color: var(--ink);
  font-size: 1.22rem;
}

.slo-budget-card span,
.slo-budget-card small,
.slo-budget-card code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.audit-log-list {
  margin-top: 1rem;
  grid-template-columns: 1fr;
}

.audit-log-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.audit-log-row.empty {
  color: var(--muted);
}

.audit-log-row div {
  display: grid;
  gap: 0.25rem;
}

.audit-log-row span,
.audit-log-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.audit-log-list {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.audit-log-row {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.audit-log-row.empty {
  border-style: dashed;
  color: var(--muted);
}

.audit-log-row strong,
.audit-log-row span,
.audit-log-row code {
  min-width: 0;
  overflow-wrap: anywhere;
}

table {
  min-width: 760px;
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248, 251, 255, 0.96);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  overflow-wrap: anywhere;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pill,
.reasons span,
.meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.42rem 0.62rem;
  background: #edf4ff;
  color: #1849a9;
  font-size: 0.78rem;
  font-weight: 850;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.profile-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  padding: 18px;
}

.profile-media {
  min-height: 168px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(26, 115, 232, 0.18), transparent 36%),
    linear-gradient(135deg, #f8fbff, #eef4ff);
  border: 1px solid var(--line);
}

.profile-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.media-placeholder {
  min-height: 168px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-top h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.score {
  flex: 0 0 auto;
  border-radius: 16px;
  padding: 0.55rem 0.7rem;
  background: #eafaf3;
  color: var(--green);
}

.description {
  margin: 0;
  color: #475467;
  overflow-wrap: anywhere;
}

.meta,
.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-card a {
  color: var(--blue);
  font-weight: 850;
}

.profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.diagnosis-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.diagnosis-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .app-frame {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-nav {
    position: static;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .shell {
    width: 100%;
    max-width: 100%;
    padding: 32px 18px 48px;
  }

  .workspace-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .grid-2,
  .repair-grid,
  .scan-form,
  .status-grid,
  .site-editor,
  .delete-confirmation,
  .version-list,
  .container-recovery-head,
  .container-recovery-row,
  .criteria-toolbar,
  .criteria-grid,
  .import-grid,
  .coverage-grid,
  .recommendation-grid,
  .product-grid,
  .requirement-card-grid,
  .control-plane-grid,
  .pipeline-stages,
  .action-grid,
  .metric-grid,
  .bi-chart-grid {
    grid-template-columns: 1fr;
  }

  .requirement-group-head,
  .requirement-detail div {
    grid-template-columns: 1fr;
  }

  .requirement-group-head {
    display: grid;
  }

  .requirement-group-head span {
    text-align: left;
  }

  .pipeline-stage::after {
    content: "down";
    right: 16px;
    top: auto;
    bottom: -13px;
  }

  .section-head {
    flex-direction: column;
  }

  .health-card {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  body,
  .app-frame,
  .app-nav,
  .shell {
    width: 100%;
    max-width: 100%;
  }

  .app-nav {
    padding: 24px 32px 24px 18px;
  }

  .workspace-nav {
    grid-template-columns: 1fr;
  }

  .brand-card,
  .nav-note,
  .nav-pill {
    border-radius: 16px;
  }

  .shell {
    padding: 32px 32px 48px 18px;
  }

  .panel {
    border-radius: 20px;
    padding: 20px;
  }

  .hero h1 {
    font-size: 2.35rem;
    letter-spacing: 0;
    line-height: 1;
  }
}

/* ── Accessibility: skip-to-main-content link ─────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 20px;
  background: var(--nav);
  color: #fff;
  border: 2px solid var(--blue);
  border-radius: 8px;
  z-index: 9999;
  outline: none;
}
