/* ======================================
   VeridAPI — Design System & Global Styles
   ====================================== */

/* --- Design Tokens --- */
:root {
  --bg: #0a0e14;
  --bg2: #0d1117;
  --panel: #131a24;
  --panel2: #101720;
  --panel-border: #1e2a36;
  --line: #1e2a36;
  --line-light: #273341;
  --text: #e7eef5;
  --text-dim: #d0d8e0;
  --muted: #7e8d9e;
  --green: #22d69e;
  --green2: #1abc8a;
  --green-glow: rgba(34, 214, 158, 0.15);
  --green-border: rgba(34, 214, 158, 0.3);
  --red: #ff6678;
  --amber: #f0b03a;
  --amber-border: rgba(240, 176, 58, 0.3);
  --amber-bg: rgba(240, 176, 58, 0.06);
  --blue: #6b9cff;
  --blue-border: rgba(107, 156, 255, 0.3);
  --blue-bg: rgba(107, 156, 255, 0.06);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 7px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

html[data-theme="light"] {
  --bg: #f7f9fc;
  --bg2: #f1f5f9;
  --panel: #ffffff;
  --panel2: #f7f9fc;
  --panel-border: #d9e1ea;
  --line: #d9e1ea;
  --line-light: #c5d0dc;
  --text: #17212b;
  --text-dim: #344454;
  --muted: #657587;
  --green: #087f5b;
  --green2: #0a8f66;
  --green-glow: rgba(8, 127, 91, 0.12);
  --green-border: rgba(8, 127, 91, 0.28);
  --red: #c92a3d;
  --amber: #a66300;
  --amber-border: rgba(166, 99, 0, 0.28);
  --amber-bg: rgba(240, 176, 58, 0.1);
  --blue: #3268c7;
  --blue-border: rgba(50, 104, 199, 0.25);
  --blue-bg: rgba(50, 104, 199, 0.08);
  --shadow: 0 20px 52px rgba(45, 63, 82, 0.13);
  --shadow-sm: 0 4px 16px rgba(45, 63, 82, 0.1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: #2ef0b4; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
code {
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c9d4de;
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* --- Site Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-header-inner {
  max-width: 1280px;
  height: 62px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.brand svg { color: var(--green); }
.brand-logo {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
}
.brand-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  background: rgba(34, 214, 158, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* --- Navigation --- */
.site-nav {
  display: flex;
  gap: 28px;
  margin: 0 auto;
}
.site-nav a {
  color: #96a3b0;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--green); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.theme-toggle {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--green); border-color: var(--green-border); }
.theme-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.theme-toggle .theme-icon { flex-shrink: 0; }
html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun { display: none; }
.nav-chip, .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  color: #b8c3cd;
  font-size: 12px;
  font-weight: 500;
  background: var(--panel);
  transition: border-color 0.2s;
  white-space: nowrap;
}
.nav-chip:hover { border-color: var(--muted); color: var(--text); }
.status-chip > span {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}
.status-chip strong { color: var(--green); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 3px 0;
}

/* --- Container --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

/* ======================================
   HOME PAGE — Hero + Detection Form
   ====================================== */
.home-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
  min-height: 680px;
}

/* --- Hero / Intro --- */
.home-intro { padding: 40px 0; }
.eyebrow {
  color: var(--green);
  letter-spacing: 0.2em;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.home-intro h1 {
  font-size: 38px;
  line-height: 1.28;
  margin: 16px 0 18px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.home-intro h1 span { color: var(--text-dim); }
.lead {
  max-width: 500px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Trust Pills */
.trust-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 48px;
}
.trust-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #254139;
  background: rgba(34, 214, 158, 0.04);
  border-radius: 6px;
  padding: 8px 14px;
  color: #a5c4ba;
  font-size: 12px;
  font-weight: 500;
}
.trust-pills span::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Security Card */
.security-card {
  display: flex;
  gap: 14px;
  max-width: 480px;
  border: 1px solid rgba(34, 214, 158, 0.22);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: rgba(7, 36, 28, 0.35);
}
.security-card svg { flex-shrink: 0; color: var(--green); }
.security-card strong {
  font-size: 13px;
  color: var(--green);
  display: block;
  margin-bottom: 3px;
}
.security-card p {
  color: #8faa9f;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

/* ======================================
   DETECTION FORM PANEL
   ====================================== */
.detect-panel {
  background: linear-gradient(155deg, #141c26 0%, #111820 100%);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: var(--shadow);
}

.form-section { margin-bottom: 16px; }
.form-section > label,
.form-section h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.form-section h2 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--green);
  border: 1px solid #2a5246;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
}
.form-section b {
  color: var(--green);
  font-weight: 700;
}

/* --- Form Inputs --- */
.form-section input[type="url"],
.form-section input[type="password"],
.form-section input[type="text"] {
  width: 100%;
  height: 40px;
  background: var(--panel2);
  border: 1px solid #2b3744;
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-section input::placeholder { color: #556070; }
.form-section input:focus {
  border-color: #3a8bc8;
  box-shadow: 0 0 0 3px rgba(58, 139, 200, 0.12);
}

/* Password toggle */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 56px !important; }
.password-wrap button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}
.password-wrap button:hover { color: var(--text); }
/* Lock icon prefix */
.password-wrap::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23556070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
}
.password-wrap input { padding-left: 34px !important; }

/* --- Protocol Segmented Control --- */
.segmented {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.segmented label { cursor: pointer; }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  color: #9aa7b4;
  background: var(--panel2);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.segmented label > span:hover { border-color: #3a4a5a; color: var(--text-dim); }
.segmented label > span .proto-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
}
.segmented label > span .proto-icon svg,
.segmented label > span .proto-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.segmented input:checked + span {
  border-color: var(--green);
  color: var(--green);
  background: rgba(34, 214, 158, 0.07);
  box-shadow: 0 0 0 1px rgba(34, 214, 158, 0.15);
}

/* --- Model Row --- */
.model-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.combo { position: relative; }
.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  list-style: none;
  background: #151e28;
  border: 1px solid #364453;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.combo-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px 8px 26px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.combo-item::before {
  content: "•";
  position: absolute;
  left: 10px;
  top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.combo-item:hover {
  background: rgba(34, 214, 158, 0.08);
}
.combo-item:hover::before { color: var(--green); }
.combo-item .combo-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.combo-item .combo-sublabel {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
}
.combo-item:hover .combo-label { color: var(--green); }

/* Custom radio at bottom of model list */
.combo-custom-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.combo-custom-radio::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
}

.hint {
  color: #667580;
  font-size: 11px;
  margin: 5px 0 0;
}

/* --- Buttons --- */
.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary { background: var(--panel2); }
.btn-secondary svg { width: 14px; height: 14px; }

.btn-primary {
  background: linear-gradient(100deg, #22d69e, #1bc98a);
  border-color: transparent;
  color: #052015;
  font-weight: 700;
  min-width: 140px;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(34, 214, 158, 0.2);
  transition: all 0.25s;
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(34, 214, 158, 0.3);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* --- Mode Cards (Detection Depth) --- */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mode-cards label { cursor: pointer; }
.mode-cards label input { position: absolute; opacity: 0; pointer-events: none; }
.mode-cards label > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 80px;
  background: var(--panel2);
  transition: all 0.2s;
  position: relative;
}
.mode-cards label > span:hover { border-color: #3a4a5a; }
.mode-cards input:checked + span {
  border-color: var(--green);
  background: rgba(34, 214, 158, 0.05);
  box-shadow: 0 0 0 1px rgba(34, 214, 158, 0.12);
}
.mode-cards .mode-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mode-cards .mode-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.mode-cards input:checked ~ span .mode-icon,
.mode-cards input:checked + span .mode-icon { color: var(--green); }
.mode-cards strong {
  font-size: 13px;
  font-weight: 600;
}
.mode-cards em {
  color: var(--green);
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  background: rgba(34, 214, 158, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}
.mode-cards small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
  font-size: 11px;
}
/* Radio circle on right */
.mode-radio {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s;
}
.mode-cards input:checked + span .mode-radio {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 3px var(--panel2);
}

/* --- Long Context Toggle --- */
.long-context { border-top: 1px solid var(--line); padding-top: 14px; }
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.switch-row h2 { margin-bottom: 0 !important; }
.switch-row p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.switch input { position: absolute; opacity: 0; }
.switch span {
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 20px;
  background: #4a5568;
  position: relative;
  cursor: pointer;
  transition: background 0.25s;
  flex-shrink: 0;
}
.switch span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  transition: transform 0.25s;
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }

.long-levels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.long-levels label input { position: absolute; opacity: 0; }
.long-levels label span {
  display: block;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.long-levels input:checked + span {
  border-color: var(--green);
  color: var(--green);
  background: rgba(34, 214, 158, 0.05);
}
.long-levels .long-cost-warn {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 4px;
}
.long-cost-warn .warn-icon {
  color: var(--amber);
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}
.long-cost-warn p {
  margin: 0;
  color: #c4a04d;
  font-size: 11px;
  line-height: 1.5;
}

/* --- Submit Row --- */
.submit-row {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.submit-row > span { color: var(--muted); font-size: 11px; }
.submit-row > span svg { vertical-align: -2px; margin-right: 4px; }

/* --- Probe Pill --- */
.probe-pill {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
}
.probe-ok { color: #8df0d0; background: rgba(34, 214, 158, 0.08); border: 1px solid #285c4c; }
.probe-warn { color: #ffd27b; background: rgba(247, 184, 75, 0.07); border: 1px solid #5c4828; }
.probe-fail { color: #ff96a3; }
.probe-neutral { color: #aab7c3; background: var(--panel2); border: 1px solid var(--line); }
.form-error { color: #ff96a3; font-size: 13px; margin-top: 8px; }

/* ======================================
   CONTENT SECTIONS (below hero)
   ====================================== */
.content-section { padding-top: 40px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 28px;
}
.section-title h2 { font-size: 22px; margin: 0; font-weight: 700; }
.section-title > span {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green));
}
.section-title > span:last-child { transform: scaleX(-1); }

/* --- Mechanism Grid (What We Detect) --- */
.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mechanism-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s;
}
.mechanism-grid article:hover { border-color: #2a3a48; }
.mechanism-grid .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mechanism-grid .card-icon svg { width: 20px; height: 20px; }
.mechanism-grid .card-icon.icon-green {
  background: rgba(34, 214, 158, 0.08);
  border: 1px solid rgba(34, 214, 158, 0.2);
  color: var(--green);
}
.mechanism-grid .card-icon.icon-amber {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}
.mechanism-grid .card-icon.icon-blue {
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
  color: var(--blue);
}
.mechanism-grid h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
.mechanism-grid p { color: var(--muted); font-size: 12px; margin: 0 0 12px; line-height: 1.6; }
.mechanism-grid small { color: var(--green); font-size: 11px; font-weight: 500; }

/* --- Proof Grid (Protocol Strength) --- */
.proof-section { padding-top: 48px; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.proof-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
/* Colored top line */
.proof-claude { border-top: 2px solid var(--green); }
.proof-openai { border-top: 2px solid var(--green); }
.proof-gemini { border-top: 2px solid var(--blue); }
.proof-seedance { border-top: 2px solid #8b5cf6; }

.proof-grid h3 {
  font-size: 15px;
  margin: 0 0 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.proof-grid h3 .proof-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}
.proof-claude .proof-tag {
  color: var(--green);
  background: rgba(34, 214, 158, 0.1);
  border: 1px solid rgba(34, 214, 158, 0.25);
}
.proof-openai .proof-tag {
  color: var(--green);
  background: rgba(34, 214, 158, 0.1);
  border: 1px solid rgba(34, 214, 158, 0.25);
}
.proof-gemini .proof-tag {
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
}
.proof-seedance .proof-tag {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.proof-grid p { color: var(--muted); font-size: 12px; margin: 0 0 12px; line-height: 1.6; }
.proof-grid small { color: var(--muted); font-size: 11px; }
.proof-grid small strong { color: var(--text-dim); font-weight: 500; }

/* --- Boundary / Disclaimer Note --- */
.boundary-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--amber-border);
  background: var(--amber-bg);
  color: #c4a04d;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  margin-top: 24px;
}
.boundary-note .warn-icon {
  color: var(--amber);
  flex-shrink: 0;
  font-size: 18px;
}

/* ======================================
   RUNNING PAGE
   ====================================== */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.running-card {
  text-align: center;
  max-width: 760px;
  margin: 70px auto;
  padding: 48px;
}
.spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 20px;
  border: 3px solid #283440;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.progress-track {
  height: 6px;
  background: #26313c;
  border-radius: 20px;
  overflow: hidden;
  margin: 24px 0;
}
.progress-track span {
  display: block;
  width: 62%;
  height: 100%;
  background: linear-gradient(90deg, var(--green2), var(--green));
  animation: pulse 1.8s ease-in-out infinite;
}
.running-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.running-meta div {
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: var(--radius-sm);
}
.running-meta small { display: block; color: var(--muted); margin-bottom: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.55; transform: translateX(20%); } }

/* ======================================
   RESULT PAGE
   ====================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb-sep { color: #4a5568; }
.breadcrumb-current { color: var(--text-dim); }

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin: 24px 0;
}
.result-head h1 { margin: 0; font-size: 24px; }
.result-actions { display: flex; gap: 8px; }

.result-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.result-left { text-align: center; }
.score-ring {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 10px;
  background: var(--green);
}
.score-warn { background: var(--amber); }
.score-fail { background: var(--red); }
.score-inner {
  height: 100%;
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num { font-size: 42px; font-weight: 800; }
.score-caption { color: var(--muted); font-size: 13px; }
.attribution { margin-top: 12px; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border: 0; }
.check-status { font-size: 12px; font-weight: 500; }
.check-ok .check-status { color: var(--green); }
.check-warn .check-status { color: var(--amber); }
.check-fail .check-status { color: var(--red); }
.check-muted .check-status { color: var(--muted); }

/* --- Metrics Row --- */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.metric {
  text-align: center;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.metric-warn { border-color: var(--amber-border); }
.metric-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.metric-value { font-size: 18px; font-weight: 700; margin-top: 4px; }

/* --- Notes & Alerts --- */
.notes-card, .alert-card, .details-card { margin: 18px 0; }
.notes-card { background: #1b1b15; border: 1px solid #4a4128; border-radius: var(--radius); padding: 18px; }
.notes-card h2 { margin: 0 0 12px; font-size: 16px; }
.note-item + .note-item { border-top: 1px solid #4a4128; padding-top: 12px; margin-top: 12px; }
.note-item strong { font-size: 13px; }
.note-item p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }

.alert-card {
  background: rgba(255, 102, 120, 0.06);
  border: 1px solid rgba(255, 102, 120, 0.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13px;
}

.details-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 18px;
}
.details-card summary {
  padding: 14px 0;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
}
.def-list {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px 16px;
  padding-bottom: 16px;
}
.def-list dd { margin: 0; color: var(--muted); font-size: 13px; }
.def-list dt { font-size: 13px; font-weight: 600; }

/* ======================================
   FAQ PAGE
   ====================================== */
.faq-hero h1 { font-size: 28px; margin-bottom: 8px; }
.faq-hero-sub { color: var(--muted); max-width: 700px; font-size: 14px; }
.faq-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  margin-top: 24px;
}
.faq-toc {
  position: sticky;
  top: 86px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.faq-toc-title { font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.faq-toc-list { list-style: none; padding: 0; margin: 0; }
.faq-toc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-toc-list a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s;
}
.faq-toc-list a:hover { color: var(--green); }
.faq-toc-count { color: var(--muted); font-size: 11px; }

.faq-category { margin-bottom: 30px; }
.faq-category h2 { font-size: 18px; margin-bottom: 6px; }
.faq-category-intro { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.faq-entry {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
}
.faq-q:hover { color: var(--green); }
.faq-permalink {
  float: right;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s;
}
.faq-q:hover .faq-permalink { opacity: 1; }
.faq-a { padding: 0 16px 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.faq-no-answer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.faq-table { width: 100%; border-collapse: collapse; }
.faq-table td, .faq-table th { border: 1px solid var(--line); padding: 8px; font-size: 13px; }
.faq-table th { background: var(--panel2); }

/* ======================================
   FOOTER
   ====================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  color: var(--muted);
  font-size: 12px;
}
.site-footer > div,
.site-footer > p {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-footer > p { margin-top: 6px; }
.site-footer .brand { font-size: 15px; }
.site-footer .footer-desc { color: var(--muted); font-size: 12px; }
.footer-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--green); }

/* --- Utility --- */
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* --- Light theme hard-coded color adjustments --- */
html[data-theme="light"] a:hover { color: #066a4c; }
html[data-theme="light"] code { color: var(--text-dim); }
html[data-theme="light"] .site-header { background: rgba(247, 249, 252, 0.9); }
html[data-theme="light"] .site-nav a,
html[data-theme="light"] .nav-chip,
html[data-theme="light"] .status-chip { color: #526477; }
html[data-theme="light"] .brand-tag,
html[data-theme="light"] .mode-cards em,
html[data-theme="light"] .proof-claude .proof-tag,
html[data-theme="light"] .proof-openai .proof-tag { background: rgba(8, 127, 91, 0.09); }
html[data-theme="light"] .trust-pills span {
  border-color: rgba(8, 127, 91, 0.25);
  background: rgba(8, 127, 91, 0.04);
  color: #376d5c;
}
html[data-theme="light"] .security-card {
  border-color: rgba(8, 127, 91, 0.22);
  background: rgba(8, 127, 91, 0.06);
}
html[data-theme="light"] .security-card p { color: #55766b; }
html[data-theme="light"] .detect-panel { background: linear-gradient(155deg, #ffffff 0%, #f7f9fc 100%); }
html[data-theme="light"] .form-section h2 span { border-color: rgba(8, 127, 91, 0.35); }
html[data-theme="light"] .form-section input[type="url"],
html[data-theme="light"] .form-section input[type="password"],
html[data-theme="light"] .form-section input[type="text"] { border-color: #c8d3de; }
html[data-theme="light"] .form-section input::placeholder { color: #8290a0; }
html[data-theme="light"] .segmented label > span { color: #586a7c; }
html[data-theme="light"] .segmented label > span:hover,
html[data-theme="light"] .mode-cards label > span:hover,
html[data-theme="light"] .mechanism-grid article:hover { border-color: #9eacba; }
html[data-theme="light"] .combo-list { background: #ffffff; border-color: #c2ceda; }
html[data-theme="light"] .hint { color: var(--muted); }
html[data-theme="light"] .switch span { background: #9aa8b7; }
html[data-theme="light"] .long-cost-warn p,
html[data-theme="light"] .boundary-note { color: #865900; }
html[data-theme="light"] .probe-ok { color: #066a4c; border-color: rgba(8, 127, 91, 0.3); }
html[data-theme="light"] .probe-warn { color: #865900; border-color: var(--amber-border); }
html[data-theme="light"] .probe-fail,
html[data-theme="light"] .form-error { color: var(--red); }
html[data-theme="light"] .probe-neutral { color: var(--text-dim); }
html[data-theme="light"] .spinner { border-color: #d7e0e9; border-top-color: var(--green); }
html[data-theme="light"] .progress-track { background: #dce4ec; }
html[data-theme="light"] .breadcrumb-sep { color: #8a98a7; }
html[data-theme="light"] .notes-card { background: #fffaf0; border-color: #e3cc9c; }
html[data-theme="light"] .note-item + .note-item { border-color: #e3cc9c; }

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; min-height: 0; }
  .home-intro { padding-bottom: 0; }
  .trust-pills { margin-bottom: 24px; }
  .mechanism-grid, .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-actions { display: none; }
  .site-nav { margin-left: auto; margin-right: 0; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-toc { position: static; }
  .result-card { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header-inner { height: 56px; padding: 0 14px; }
  .brand-tag { display: none; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 14px;
    flex-direction: column;
    gap: 0;
  }
  .nav-toggle[aria-expanded="true"] ~ .site-nav { display: flex; }
  .site-nav a { padding: 12px 0; }
  .container { padding: 18px 14px 50px; }
  .home-intro h1 { font-size: 28px; }
  .detect-panel { padding: 16px 14px; }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  .model-row { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: 1fr; }
  .mode-cards label > span { min-height: 0; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .btn-primary { width: 100%; }
  .mechanism-grid, .proof-grid { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 18px; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .result-head { flex-direction: column; }
  .result-actions { flex-wrap: wrap; }
  .def-list { grid-template-columns: 1fr; }
  .running-meta { grid-template-columns: 1fr; }
  .site-footer > div { flex-wrap: wrap; }
  .footer-links { width: 100%; margin: 0; }
  .site-footer > p { display: block; }
  .long-levels { grid-template-columns: 1fr; }
  .long-levels .long-cost-warn { grid-column: auto; }
}

@media (max-width: 390px) {
  .home-intro h1 { font-size: 24px; }
  .lead { font-size: 13px; }
  .trust-pills { gap: 6px; }
  .trust-pills span { padding: 6px 10px; font-size: 11px; }
  .detect-panel { margin-left: -3px; margin-right: -3px; }
  .form-section { margin-bottom: 12px; }
  .result-card { padding: 16px; }
  .score-ring { width: 160px; height: 160px; }
  .faq-a { overflow-wrap: anywhere; }
}

.proto-fallback{font-weight:800;color:var(--green)}
.seedance-options select,.seedance-options textarea,.seedance-options input[type="number"]{width:100%;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:8px;padding:10px}
.seedance-options textarea{min-height:86px;resize:vertical}.video-param-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:10px 0}.audio-check{display:block;margin:10px 0}.progress-track span{width:0;transition:width .35s ease;animation:none}.seedance-summary{display:flex;gap:24px;align-items:center;margin:18px 0}.seedance-preview{width:100%;max-height:420px;background:#000;border-radius:10px}.media-placeholder{min-height:220px;display:grid;place-items:center;background:var(--panel2);color:var(--muted);border-radius:10px}.parameter-compare{display:grid;grid-template-columns:1fr 1fr;gap:24px}.parameter-compare dl{display:grid;grid-template-columns:1fr 1fr;gap:8px}.parameter-compare dd{margin:0;text-align:right}.keyframe-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.keyframe-grid img{width:100%;border-radius:8px}@media(max-width:600px){.video-param-grid,.parameter-compare,.keyframe-grid{grid-template-columns:1fr}}
