:root {
  --bg: #0e1114;
  --bg-soft: #151a1e;
  --surface: #171d21;
  --surface-strong: #1d2429;
  --text: #edf2f3;
  --muted: #9aa6aa;
  --line: #30383c;
  --green: #127a6b;
  --green-hover: #188674;
  --green-dark: #4dc4b0;
  --green-soft: #12332e;
  --red: #f07178;
  --amber: #e6b85c;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

* { letter-spacing: 0 !important; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  /* Keep the verification station on the same substrate as the homepage:
     a quiet 64px teal grid over the diagonal midnight base. */
  background-color: #020617;
  background-image:
    linear-gradient(rgba(20,184,166,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,184,166,.03) 1px, transparent 1px),
    linear-gradient(to bottom right, #020617 0%, #0f172a 50%, #020617 100%);
  background-size: 64px 64px, 64px 64px, 100% 100%;
  background-repeat: repeat, repeat, no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Avenir Next", Avenir, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100dvh;
}

a { color: var(--green-dark); }
code {
  background: #111619;
  border-color: var(--line);
  color: #d9e3e5;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  background: rgba(14, 17, 20, .94);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
}
html.is-embedded .site-header { display: none; }
html.is-embedded .container { padding-top: 28px; }
.site-header-inner {
  max-width: 1180px;
  min-height: 64px;
  padding: 10px 24px;
  justify-content: space-between;
}
.brand { gap: 10px; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 4px; }
.brand-copy { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand-copy strong { font-size: 16px; font-weight: 700; }
.brand-copy small { color: var(--muted); font-size: 12px; font-weight: 600; }
.site-nav { gap: 20px; }
.site-nav a { color: var(--muted); font-weight: 600; }
.site-nav a:hover { color: var(--text); }

.container {
  max-width: 1180px;
  padding: 46px 24px 72px;
}

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.workspace-head h1 {
  margin: 5px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  text-wrap: balance;
}
.workspace-head > div:first-child > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  text-wrap: pretty;
}
.workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: none;
}
.section-label,
.panel-kicker {
  margin: 0;
  color: var(--green-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}
.engine-status {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: #b8c3c6;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43d17c;
  box-shadow: 0 0 0 4px rgba(67, 209, 124, .12);
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.protocol-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(520px, 100%);
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.protocol-tabs a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--muted);
  background: #111619;
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 650;
  transition: color .18s ease, background .18s ease;
}
.protocol-tabs a:last-child { border-right: 0; }
.protocol-tabs a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.protocol-tabs a[aria-current="page"] { color: #fff; background: var(--green); }
.protocol-tabs a:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible { outline: 2px solid #53c9b6; outline-offset: 2px; }

.verify-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: start;
}
.verify-panel,
.evidence-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(23, 29, 33, .96);
  box-shadow: var(--shadow);
}
.verify-panel { padding: 28px; }
.evidence-panel { padding: 24px; }
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2,
.evidence-head h2 {
  margin: 5px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.target-lock {
  flex: none;
  color: #b9c4c6;
  font-size: 12px;
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  color: #dfe6e8;
  font-size: 13px;
  font-weight: 650;
}
.field input,
.field select,
input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #394348;
  border-radius: 5px;
  background: #101518;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.field input:hover,
.field select:hover { border-color: #4c595e; }
.field input:focus,
.field select:focus {
  border-color: var(--green);
  background: #0d1214;
  box-shadow: 0 0 0 3px rgba(18, 122, 107, .18);
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(190px, .75fr);
  gap: 16px;
}
.hint,
.checkbox-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.hint { margin: 8px 0 0; }
.combo-list {
  border-color: var(--line);
  background: #171d21;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}
.combo-item:hover,
.combo-item.active { background: var(--surface-strong); }

.field-checkbox {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  margin: 2px 0 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #12171a;
}
.field-checkbox input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}
.field-checkbox label { display: grid; gap: 4px; cursor: pointer; }
.field-checkbox strong { font-size: 13px; }

.btn {
  min-height: 46px;
  border-radius: 5px;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  width: 100%;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(18, 122, 107, .22);
}
.btn-primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.btn:disabled { opacity: .55; transform: none; cursor: not-allowed; }
.btn-ghost { background: #151a1e; border-color: var(--line); color: var(--text); }
.btn-share {
  min-width: 112px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #3c484c;
  background: #151a1e;
  color: #dce4e6;
  font-size: 13px;
  white-space: nowrap;
}
.btn-share:hover {
  border-color: var(--green-hover);
  background: var(--green-soft);
  color: #fff;
}
.btn-share[data-state="success"] {
  border-color: rgba(77, 196, 176, .7);
  color: var(--green-dark);
}
.btn-share[data-state="error"] {
  border-color: rgba(240, 113, 120, .55);
  color: #ffb2b7;
}
.form-error {
  padding: 12px 14px;
  border-radius: 5px;
  border: 1px solid rgba(240, 113, 120, .4);
  background: rgba(240, 113, 120, .08);
  color: #ffb2b7;
}

.evidence-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.evidence-list { margin: 10px 0 0; }
.evidence-list > div {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(48, 56, 60, .72);
}
.evidence-list dt { color: var(--muted); font-size: 12px; }
.evidence-list dd { margin: 0; color: #dbe3e5; font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.cost-note {
  margin-top: 20px;
  padding: 16px;
  border-left: 3px solid var(--amber);
  background: rgba(230, 184, 92, .08);
}
.cost-note strong { color: #f2d493; font-size: 13px; }
.cost-note p,
.method-note { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.method-note { margin-top: 18px; }

.probe-pill {
  margin-top: 10px;
  border-radius: 5px;
  background: #111619;
  color: var(--muted);
}
.probe-ok { border-color: rgba(67, 209, 124, .4); }
.probe-warn { border-color: rgba(230, 184, 92, .4); }
.probe-fail { border-color: rgba(240, 113, 120, .4); }

.result-head,
.result-card,
.card,
.metric,
.check-card,
.running-card,
.alert-card {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.result-head h1 { color: var(--text); }
.result-card { box-shadow: var(--shadow); }
.breadcrumb { color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.score-inner { background: var(--surface); }

.site-footer {
  border-top-color: var(--line);
  background: #0b0e10;
  padding: 0;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 9px;
  text-align: left;
}
.footer-inner p { max-width: none; margin: 0; padding: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-note { color: #778287; }

@media (max-width: 820px) {
  .site-header-inner { min-height: 58px; padding: 9px 16px; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 14px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav a { padding: 6px 0; border: 0; font-size: 12px; }
  .site-nav a:nth-child(2) { display: none; }
  .container { padding: 30px 16px 56px; }
  .workspace-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .workspace-actions { justify-content: flex-start; gap: 14px; }
  .workspace-head h1 { font-size: 32px; }
  .verify-grid { grid-template-columns: 1fr; }
  .evidence-panel { box-shadow: none; }
}

@media (max-width: 520px) {
  .brand-copy small { display: none; }
  .site-nav a:first-child { display: none; }
  .protocol-tabs { width: 100%; }
  .protocol-tabs a { min-height: 44px; padding: 0 8px; font-size: 13px; }
  .verify-panel,
  .evidence-panel { padding: 18px; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .evidence-list > div { grid-template-columns: 1fr; gap: 4px; }
  .evidence-list dd { text-align: left; }
  .footer-inner { padding: 22px 16px; }
}

@media (max-width: 340px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .workspace-head h1 { font-size: 28px; }
  .verify-panel,
  .evidence-panel { padding: 14px; }
  .protocol-tabs a { font-size: 12px; }
  .workspace-actions { width: 100%; justify-content: space-between; gap: 10px; }
  .btn-share { min-width: 104px; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
