:root {
  --ink: #18222c;
  --muted: #627281;
  --paper: #f5f7f8;
  --surface: #fff;
  --line: #d9e0e5;
  --navy: #15324b;
  --navy-strong: #0d2436;
  --steel: #28688c;
  --red: #a52a2a;
  --red-soft: #f7ece9;
  --shadow: 0 12px 32px rgba(18, 36, 51, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(40, 104, 140, .32);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 64px);
  color: #fff;
  background: rgba(21, 50, 75, .97);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small {
  color: rgba(255, 255, 255, .62);
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 9px 12px;
  color: rgba(255, 255, 255, .8);
  border-radius: 6px;
  font-size: 13px;
}
.topnav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.band { padding: clamp(48px, 7vw, 92px) 0; }
.band-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.overview {
  color: #fff;
  background:
    linear-gradient(112deg, rgba(13, 36, 54, .98), rgba(21, 50, 75, .94) 62%, rgba(89, 43, 43, .88)),
    var(--navy);
}
.overview .band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 64px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.overview .eyebrow { color: #f0b7ad; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
  letter-spacing: -.5px;
}
h2 {
  margin-bottom: 12px;
  color: var(--navy-strong);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.25;
}
h3 { margin-bottom: 8px; color: var(--navy-strong); font-size: 18px; }
.lead {
  max-width: 820px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
}
.lead.compact { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--red); border-color: var(--red); }
.button-primary:hover { background: #8e2323; border-color: #8e2323; }
.button-secondary { color: var(--navy); background: #fff; border-color: #b9c8d2; }
.button-secondary:hover { border-color: var(--steel); }
.button-quiet {
  color: rgba(255, 255, 255, .88);
  background: transparent;
  border-color: rgba(255, 255, 255, .28);
}
.button-quiet:hover { background: rgba(255, 255, 255, .09); }
.button-wide { width: 100%; margin-top: 16px; }

.status-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
}
.status-panel strong, .status-panel p { display: block; margin: 0; }
.status-panel p { margin-top: 2px; color: rgba(255, 255, 255, .62); font-size: 12px; }
.status-dot {
  width: 11px;
  height: 11px;
  background: #69d3a1;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(105, 211, 161, .12);
}
.status-dot-offline {
  background: #f0b45b;
  box-shadow: 0 0 0 7px rgba(240, 180, 91, .12);
}

.metrics { padding: 34px 0; background: #fff; border-bottom: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { padding: 8px 26px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric span, .metric strong, .metric small { display: block; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { margin: 3px 0; color: var(--navy); font-size: 30px; line-height: 1.2; }
.metric small { color: var(--muted); font-size: 11px; }

.showcase-band { padding-top: clamp(38px, 5vw, 66px); background: #fff; border-bottom: 1px solid var(--line); }
.showcase-shell { display: grid; gap: 28px; }
.showcase-heading { margin-bottom: 0; }
.showcase-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.showcase-row-label span { display: grid; width: 34px; height: 26px; place-items: center; color: #fff; background: var(--navy); border-radius: 4px; font-size: 10px; font-weight: 800; }
.showcase-row-label strong, .showcase-row-label small { display: block; }
.showcase-row-label strong { margin-top: 10px; color: var(--navy-strong); }
.showcase-row-label small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.showcase-card { appearance: none; display: block; min-width: 0; overflow: hidden; padding: 0; color: inherit; background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px rgba(18, 36, 51, .05); cursor: pointer; text-align: left; }
.showcase-card:hover { border-color: #8aa8ba; box-shadow: 0 10px 24px rgba(18, 36, 51, .11); transform: translateY(-2px); }
.showcase-card:focus-visible { outline: 3px solid rgba(40, 104, 140, .3); outline-offset: 2px; }
.showcase-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px 10px; }
.case-index { color: var(--red); font-family: Consolas, monospace; font-size: 11px; font-weight: 800; }
.case-status { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; color: #1d6347; background: #ecf8f2; border: 1px solid #b9dfce; border-radius: 999px; font-size: 9px; font-weight: 800; }
.case-status.review { color: #76302d; background: var(--red-soft); border-color: #e9cec8; }
.showcase-card-body { padding: 0 15px 15px; }
.showcase-card h3 { margin-bottom: 6px; font-size: 16px; line-height: 1.4; }
.showcase-card-summary { min-height: 58px; margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.case-mini-flow { display: grid; gap: 7px; }
.case-mini-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: start; }
.case-mini-row span { color: var(--steel); font-size: 9px; font-weight: 800; }
.case-mini-row p { display: -webkit-box; margin: 0; overflow: hidden; color: #3e5261; font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.case-more { display: block; margin-top: 13px; padding-top: 10px; color: var(--red); border-top: 1px solid var(--line); font-size: 10px; font-weight: 800; }
.showcase-legend { display: flex; flex-wrap: wrap; gap: 14px 22px; padding-top: 15px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: #2e845f; border-radius: 50%; }
.legend-dot.review { background: var(--red); }

#caseDialog { width: min(980px, calc(100% - 28px)); }
.showcase-dialog { max-height: min(86vh, 860px); overflow: auto; }
.case-dialog-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.case-dialog-meta span { padding: 4px 8px; color: #4c6070; background: #eef2f4; border-radius: 4px; font-size: 10px; }
.case-dialog-summary { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.case-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 22px; }
.case-flow-step { min-width: 0; padding-top: 12px; border-top: 3px solid var(--steel); }
.case-flow-step:nth-child(2) { border-top-color: var(--red); }
.case-flow-step:nth-child(3) { border-top-color: #c58b35; }
.case-flow-step:nth-child(4) { border-top-color: #2e845f; }
.case-flow-step span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; }
.case-flow-step strong { display: block; margin: 4px 0 7px; color: var(--navy); font-size: 13px; }
.case-flow-step p, .case-flow-step ul { margin: 0; color: #3e5261; font-size: 11px; line-height: 1.55; }
.case-flow-step ul { padding-left: 17px; }
.case-evidence-box { margin-top: 20px; border-top: 1px solid var(--line); }
.case-evidence-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.case-evidence-row span { color: var(--muted); font-size: 10px; }
.case-evidence-row strong { overflow-wrap: anywhere; color: var(--navy); font-size: 11px; }
.case-verification { min-height: 46px; margin-top: 14px; padding: 11px 13px; color: var(--muted); background: #f5f8f9; border-left: 3px solid var(--steel); font-size: 11px; }
.case-verification.pass { color: #1d6347; background: #ecf8f2; border-left-color: #2e845f; }
.case-verification.fail { color: #76302d; background: var(--red-soft); border-left-color: var(--red); }
.case-dialog-actions { position: sticky; bottom: -24px; padding: 14px 0 0; background: linear-gradient(rgba(255,255,255,.8), #fff 25%); }


.evidence-band { background: #fff; border-bottom: 1px solid var(--line); }
.evidence-columns {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 38px;
}
.evidence-column { padding-top: 18px; border-top: 3px solid var(--steel); }
.audit-evidence-column { border-top-color: var(--red); }
.system-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin-top: 20px; }
.system-map > div { display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.system-map > div > span { grid-row: span 2; color: var(--red); font-weight: 800; }
.system-map strong, .system-map small { display: block; }
.system-map strong { color: var(--navy); font-size: 13px; }
.system-map small { color: var(--muted); font-size: 11px; }
.review-evidence { margin-top: 18px; }
.model-evidence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.model-evidence-head strong, .model-evidence-head small { display: block; }
.model-evidence-head small { color: var(--muted); font-size: 11px; }
.audit-compare { display: grid; grid-template-columns: 1fr 58px 1fr; align-items: center; gap: 10px; margin: 16px 0; }
.audit-score { padding: 13px; background: #f4f7f8; border-left: 4px solid #c58b35; border-radius: 4px; }
.audit-score.final { border-left-color: #2e845f; }
.audit-score span, .audit-score strong, .audit-score small { display: block; }
.audit-score span { color: var(--muted); font-size: 10px; font-weight: 800; }
.audit-score strong { color: var(--navy); font-size: 27px; line-height: 1.2; }
.audit-score small { color: var(--muted); font-size: 10px; }
.audit-arrow { color: var(--red); font-size: 22px; font-weight: 800; text-align: center; }
.score-bar { height: 7px; margin-top: 9px; overflow: hidden; background: #dfe6ea; border-radius: 4px; }
.score-bar span { height: 100%; background: #c58b35; border-radius: inherit; }
.audit-score.final .score-bar span { background: #2e845f; }
.stage-evidence { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
.stage-evidence-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.stage-evidence-heading h3 { margin-bottom: 0; }
.verified-stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.verified-stage { min-height: 116px; padding: 12px; background: #f7f9fa; border: 1px solid var(--line); border-top: 3px solid #2e845f; border-radius: 5px; }
.verified-stage.attention { border-top-color: #c58b35; }
.verified-stage.pending { border-top-color: var(--red); }
.verified-stage span, .verified-stage strong, .verified-stage small { display: block; }
.verified-stage span { color: var(--muted); font-size: 10px; }
.verified-stage strong { margin: 4px 0 5px; color: var(--navy); font-size: 12px; }
.verified-stage small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.evidence-footnote { margin: 12px 0 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }

.section-heading {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(300px, 1.2fr);
  gap: 54px;
  align-items: end;
  margin-bottom: 32px;
}
.section-heading > p { margin: 0; color: var(--muted); }
.workspace, .tool-grid {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(400px, 1.28fr);
  gap: 20px;
}
.tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
.panel, .delivery-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-heading h3 { margin: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  color: #76302d;
  background: var(--red-soft);
  border: 1px solid #e9cec8;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.tag-muted { color: var(--muted); background: #eef2f4; border-color: #dde5e9; }

label { display: block; margin: 14px 0 7px; color: #344654; font-size: 12px; font-weight: 800; }
input[type="text"], input[type="url"], input[type="password"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid #c9d3da;
  border-radius: 6px;
}
textarea { resize: vertical; }
.check-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.check-row label { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; }
.form-note, .muted { color: var(--muted); font-size: 12px; }
.form-note { margin: 10px 0 0; }
.empty-state { color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }
.task-result { min-height: 430px; }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 13px;
  width: 2px;
  content: "";
  background: #d8e1e7;
}
.timeline li { position: relative; padding: 0 0 18px 44px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  top: 1px;
  left: 0;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--steel);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.timeline strong, .timeline p { display: block; margin: 0; }
.timeline p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.plan-summary {
  margin-bottom: 18px;
  padding: 13px 15px;
  color: #294355;
  background: #eef4f7;
  border-left: 3px solid var(--steel);
  border-radius: 4px;
  font-size: 13px;
}

.drop-zone {
  display: grid;
  min-height: 120px;
  margin: 16px 0;
  place-items: center;
  color: var(--steel);
  background: #f8fafb;
  border: 1px dashed #9db4c1;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}
.drop-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.drop-zone small { color: var(--muted); }
.result-box {
  min-height: 74px;
  margin-top: 12px;
  padding: 13px 14px;
  color: #334958;
  background: #f6f8f9;
  border: 1px solid #e0e7eb;
  border-radius: 6px;
  font-size: 13px;
}
.quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.quality-item { padding: 9px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.quality-item span, .quality-item strong { display: block; }
.quality-item span { color: var(--muted); font-size: 10px; }
.quality-item strong { color: var(--navy); font-size: 17px; }
.inline-control { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.knowledge-item { padding: 9px 0; border-bottom: 1px solid #e4eaee; }
.knowledge-item:last-child { border-bottom: 0; }
.knowledge-item strong { display: block; color: var(--navy); font-size: 12px; }
.knowledge-item p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.result-meta {
  margin: 0 0 8px;
  color: var(--steel);
  font-size: 10px;
  font-weight: 800;
}
.evidence-actions { margin-top: 12px; grid-template-columns: minmax(0, 1fr) auto; }
.evidence-result { display: grid; gap: 0; }
.evidence-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e4eaee;
}
.evidence-row:last-child { border-bottom: 0; }
.evidence-row span { color: var(--muted); font-size: 11px; }
.evidence-row strong { overflow-wrap: anywhere; color: var(--navy); font-size: 12px; }
.evidence-response { white-space: pre-wrap; }
.evidence-hash { font-family: Consolas, monospace; font-size: 10px !important; }

.pipeline-layout {
  display: grid;
  grid-template-columns: minmax(320px, .68fr) minmax(460px, 1.32fr);
  gap: 20px;
  align-items: start;
}
.agent-run-panel { min-height: 560px; }
.agent-run-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.agent-run-summary > div {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.agent-run-summary span, .agent-run-summary strong { display: block; }
.agent-run-summary span { color: var(--muted); font-size: 10px; }
.agent-run-summary strong { color: var(--navy); font-size: 16px; }
.stage-list { display: grid; gap: 8px; margin: 14px 0; }
.stage-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.stage-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--steel);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}
.stage-item strong, .stage-item p { display: block; margin: 0; }
.stage-item p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.stage-item code {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.audit-check { padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.audit-check span, .audit-check strong { display: block; }
.audit-check span { color: var(--muted); font-size: 10px; }
.audit-check strong { color: var(--navy); font-size: 11px; }
.audit-check.pass { border-left: 3px solid #2e845f; }
.audit-check.fail { border-left: 3px solid var(--red); }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.proof-grid article {
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.proof-grid span, .proof-grid strong, .proof-grid small { display: block; }
.proof-grid span { color: var(--muted); font-size: 10px; font-weight: 800; }
.proof-grid strong { margin: 3px 0; color: var(--navy); font-size: 23px; }
.proof-grid small { color: var(--muted); font-size: 10px; }

.alternate { background: #edf1f3; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.site-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.site-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #dfe5e8; }
.site-card-body { padding: 21px; }
.site-card p { min-height: 66px; color: var(--muted); font-size: 13px; }
.site-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 17px; }
.site-stats span { padding: 4px 7px; color: #4c6070; background: #eef2f4; border-radius: 4px; font-size: 10px; }

.viewport-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 18px; align-items: start; }
.viewport-card { margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.viewport-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #e8edf0; }
.mobile-viewport img { aspect-ratio: 390 / 560; }
.viewport-card figcaption { padding: 14px 16px; }
.viewport-card figcaption strong, .viewport-card figcaption span { display: block; }
.viewport-card figcaption strong { color: var(--navy); font-size: 13px; }
.viewport-card figcaption span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.compatibility-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 4px; border-top: 1px solid var(--line); }
.compatibility-list > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.compatibility-list > div:last-child { border-right: 0; }
.compatibility-list strong, .compatibility-list small { display: block; }
.compatibility-list strong { margin-top: 8px; color: var(--navy); font-size: 13px; }
.compatibility-list small { color: var(--muted); font-size: 11px; }
.status-chip { display: inline-block; padding: 3px 7px; color: #7a5a18; background: #fff7e7; border: 1px solid #e9d4a7; border-radius: 999px; font-size: 9px; font-weight: 800; }
.status-chip.pass { color: #1d6347; background: #ecf8f2; border-color: #b9dfce; }

.archive-layout {
  display: grid;
  grid-template-columns: minmax(320px, .72fr) minmax(430px, 1.28fr);
  gap: 20px;
  align-items: start;
}
.audit-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: -8px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.audit-flow > div { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; padding: 14px 16px; border-right: 1px solid var(--line); }
.audit-flow > div:last-child { border-right: 0; }
.audit-flow span { grid-row: span 2; color: var(--red); font-weight: 800; }
.audit-flow strong, .audit-flow small { display: block; }
.audit-flow strong { color: var(--navy); font-size: 13px; }
.audit-flow small { color: var(--muted); font-size: 10px; }
.archive-panel { min-height: 620px; }
.archive-list { display: grid; max-height: 760px; gap: 12px; overflow-y: auto; padding-right: 4px; }
.archive-item {
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.archive-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.archive-item-header > div { min-width: 0; }
.archive-item-header strong,
.archive-item-header span { display: block; }
.archive-item-header strong { overflow-wrap: anywhere; color: var(--navy); }
.archive-item-header span { margin-top: 3px; font-size: 11px; }
.archive-item > p {
  margin: 11px 0 0;
  color: #3e5261;
  font-size: 12px;
  white-space: pre-wrap;
}
.archive-source { color: var(--muted) !important; }
.status-pending { color: #7a5a18; background: #fff7e7; border-color: #e9d4a7; }
.status-approved { color: #1d6347; background: #ecf8f2; border-color: #b9dfce; }
.status-changes_requested { color: #7d4d1f; background: #fff2e6; border-color: #ecc9a9; }
.status-rejected { color: #8b2d2d; background: #fbebeb; border-color: #e8bcbc; }
.review-history {
  margin-top: 12px;
  padding: 10px 12px;
  background: #eef3f5;
  border-radius: 5px;
}
.review-history strong { color: var(--navy); font-size: 11px; }
.review-history p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.review-box {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.review-fields { display: grid; grid-template-columns: minmax(120px, .65fr) minmax(160px, 1fr); gap: 8px; }
.review-box input, .review-box select, .review-box textarea { padding: 8px 10px; font-size: 12px; }
.review-box textarea { margin-top: 8px; }
.review-box .button { min-height: 34px; margin-top: 8px; padding: 6px 12px; font-size: 12px; }
.status-list { display: grid; gap: 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 6px; }
.status-list > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.status-list > div:last-child { border-bottom: 0; }
.status-list span { color: var(--muted); font-size: 12px; }
.status-list strong { overflow-wrap: anywhere; color: var(--navy); font-size: 12px; }

.delivery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: 52px;
  align-items: start;
}
.step-list { margin: 28px 0 0; padding: 0; list-style: none; }
.step-list li { display: grid; grid-template-columns: 38px 1fr; gap: 13px; margin-bottom: 17px; }
.step-list span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}
.step-list p { margin: 3px 0 0; color: var(--muted); }
.deployment-audit { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.deployment-audit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.deployment-audit-heading h3 { margin-bottom: 0; }
.deployment-check-list { display: grid; border-top: 1px solid var(--line); }
.deployment-check-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.deployment-check-list span { color: var(--muted); font-size: 11px; }
.deployment-check-list strong { color: var(--navy); font-size: 12px; overflow-wrap: anywhere; }
code { padding: 2px 5px; color: #773133; background: #f4e9e7; border-radius: 4px; font-family: Consolas, monospace; }
.delivery-card dl { margin: 20px 0; }
.delivery-card dl div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.delivery-card dt { color: var(--navy); font-size: 12px; font-weight: 800; }
.delivery-card dd { margin: 0; color: var(--muted); font-size: 12px; }
footer { padding: 28px 20px 38px; color: #71808c; background: #fff; border-top: 1px solid var(--line); text-align: center; font-size: 11px; }
footer p { margin: 3px 0; }

dialog { width: min(620px, calc(100% - 28px)); padding: 0; background: transparent; border: 0; }
dialog::backdrop { background: rgba(9, 24, 35, .54); backdrop-filter: blur(3px); }
.dialog-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(11, 27, 38, .24);
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions .button-quiet, .icon-button { color: var(--navy); background: #f3f6f7; border-color: var(--line); }
.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}
.qr-card { text-align: center; }
.qr-card img {
  display: block;
  width: min(280px, 86%);
  margin: 8px auto 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.qr-card p { color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .topnav { display: none; }
  .overview .band-inner, .section-heading, .workspace, .tool-grid, .delivery-layout {
    grid-template-columns: 1fr;
  }
  .evidence-columns, .viewport-grid { grid-template-columns: 1fr; }
  .verified-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compatibility-list { grid-column: auto; grid-template-columns: 1fr; border-top: 0; }
  .compatibility-list > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .pipeline-layout { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-run-panel { min-height: auto; }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-panel { min-height: auto; }
  .archive-list { max-height: none; }
  .overview .band-inner { gap: 34px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3) { padding-left: 0; }
  .site-grid { grid-template-columns: 1fr; }
  .site-card p { min-height: auto; }
  .showcase-row { grid-template-columns: 1fr; gap: 14px; }
  .showcase-row-label { display: flex; align-items: center; gap: 10px; }
  .showcase-row-label strong { margin-top: 0; }
  .showcase-row-label small { margin-left: auto; }
  .case-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .topbar { min-height: 62px; padding: 9px 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 13px; }
  .brand small { display: none; }
  .band-inner { width: min(100% - 28px, 1180px); }
  h1 { font-size: 33px; }
  .metrics { padding-top: 22px; }
  .metric { padding-right: 12px; padding-left: 12px; }
  .metric strong { font-size: 24px; }
  .panel, .delivery-card { padding: 18px; }
  .check-row, .quality-grid { grid-template-columns: 1fr; }
  .agent-run-summary, .audit-checks, .proof-grid { grid-template-columns: 1fr; }
  .system-map, .verified-stage-grid, .audit-flow { grid-template-columns: 1fr; }
  .audit-score { padding: 11px; }
  .audit-arrow { transform: rotate(90deg); }
  .audit-flow > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .audit-flow > div:last-child { border-bottom: 0; }
  .showcase-grid, .case-flow { grid-template-columns: 1fr; }
  .showcase-card-summary { min-height: auto; }
  .case-evidence-row { grid-template-columns: 1fr; gap: 3px; }
  .case-dialog-actions { bottom: -18px; }
  .deployment-check-list > div { grid-template-columns: 1fr; gap: 2px; }
  .stage-item { grid-template-columns: 30px minmax(0, 1fr); }
  .stage-item code { max-width: 100%; }
  .review-fields { grid-template-columns: 1fr; }
  .inline-control { grid-template-columns: 1fr; }
  .panel-heading { align-items: flex-start; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}
