:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #dbe3ee;
  --brand: #3566dc;
  --brand-soft: #edf3ff;
  --teal: #147d70;
  --danger: #c43d4f;
  --danger-soft: #fff0f2;
  --safe: #17785d;
  --safe-soft: #eaf9f2;
  --panel: rgba(255, 255, 255, 0.94);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #f5f8fc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(135deg, rgba(53,102,220,.055) 1px, transparent 1px), linear-gradient(rgba(53,102,220,.04) 1px, transparent 1px);
  background-size: 72px 72px, 100% 132px;
}
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
.page-shell { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: white; font-weight: 800; background: var(--brand); box-shadow: 0 8px 20px rgba(53,102,220,.25); }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.console-link { padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.8); color: #3153a5; font-size: 14px; font-weight: 650; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 74px 0 58px; }
.eyebrow { margin: 0 0 16px; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .13em; }
.hero h1 { margin: 0; font-size: clamp(50px, 7vw, 82px); line-height: 1.04; letter-spacing: -.05em; }
.hero h1 span { color: var(--brand); }
.hero-copy { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.hero-badges { display: grid; gap: 10px; min-width: 220px; }
.hero-badges span { padding: 12px 16px; border: 1px solid #cad8f7; border-radius: 999px; background: rgba(255,255,255,.76); color: #365497; font-size: 14px; text-align: center; }
.workspace { display: grid; grid-template-columns: 1.08fr .92fr; gap: 22px; }
.panel, .fix-section, .cta { border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: 0 18px 50px rgba(26,45,90,.07); }
.panel { padding: 24px; }
.panel-head, .panel-head > div, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head > div { justify-content: flex-start; }
.panel h2, .fix-section h2, .cta h2 { margin: 0; font-size: 22px; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.meta { color: var(--muted); font-size: 13px; }
textarea { width: 100%; min-height: 410px; margin-top: 20px; padding: 21px; resize: vertical; border: 1px solid #cbd6e8; border-radius: 17px; outline: none; color: #dce7ff; background: #121c37; font: 14px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
textarea:focus { border-color: #668ce8; box-shadow: 0 0 0 4px rgba(53,102,220,.1); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
button { cursor: pointer; border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; }
.primary { color: white; background: var(--brand); }
.secondary { color: #425273; background: #edf1f7; }
.status-card { display: flex; align-items: center; gap: 15px; min-height: 112px; margin-top: 20px; padding: 19px; border-radius: 17px; border: 1px solid var(--line); }
.status-card.idle { background: #f7f9fc; }
.status-card.danger { border-color: #f0bdc5; background: var(--danger-soft); }
.status-card.safe { border-color: #b7e2d1; background: var(--safe-soft); }
.status-icon { display: grid; flex: 0 0 auto; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: white; background: #98a2b3; font-size: 22px; font-weight: 900; }
.danger .status-icon { background: var(--danger); }
.safe .status-icon { background: var(--safe); }
.status-card strong { font-size: 18px; }
.status-card p { margin: 5px 0 0; color: var(--muted); line-height: 1.55; }
.finding-list { display: grid; gap: 11px; margin-top: 15px; }
.finding { padding: 15px; border-radius: 14px; background: #f8fafc; border: 1px solid #e3e8f0; }
.finding header { display: flex; justify-content: space-between; gap: 12px; color: var(--danger); font-size: 13px; font-weight: 800; }
.finding code { display: block; margin-top: 9px; color: #344054; font-size: 13px; word-break: break-all; }
.scope-note { margin: 18px 2px 0; color: #8a94a6; font-size: 12px; line-height: 1.6; }
.fix-section { margin-top: 22px; padding: 28px; }
.section-heading { margin-bottom: 20px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.copy-button { color: #3153a5; background: var(--brand-soft); }
.code-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.code-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #121c37; }
.code-card header { padding: 12px 16px; color: #a9c4ff; border-bottom: 1px solid #2d3c62; font: 700 13px ui-monospace, monospace; }
.code-card pre { margin: 0; padding: 17px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #e7edff; font: 13px/1.7 ui-monospace, monospace; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 22px 0; padding: 32px; color: white; background: #17264e; }
.cta .eyebrow { color: #79ded0; margin-bottom: 9px; }
.cta p:last-child { margin: 10px 0 0; color: #bcc9e8; }
.cta a { flex: 0 0 auto; padding: 17px 20px; border-radius: 15px; color: #17264e; background: #ffd06a; font-size: 18px; font-weight: 850; }
footer { display: flex; justify-content: space-between; padding: 24px 0 38px; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .page-shell { width: min(100% - 24px, 680px); }
  .topbar { padding: 18px 0; }
  .console-link { flex: 0 0 auto; padding: 9px 11px; font-size: 12px; white-space: nowrap; }
  .brand { gap: 9px; }
  .brand-mark { width: 40px; height: 40px; }
  .hero { display: block; padding: 44px 0 34px; }
  .hero h1 { font-size: 48px; }
  .hero-copy { font-size: 16px; }
  .hero-badges { display: flex; flex-wrap: wrap; margin-top: 24px; }
  .hero-badges span { min-width: 0; padding: 9px 12px; font-size: 12px; }
  .workspace, .code-grid { grid-template-columns: 1fr; }
  textarea { min-height: 330px; }
  .panel, .fix-section { padding: 18px; border-radius: 18px; }
  .section-heading, .cta { align-items: flex-start; flex-direction: column; }
  .cta { padding: 24px; }
  .cta a { width: 100%; text-align: center; }
}
