:root {
  --bg: #0b1020;
  --bg-soft: #11182e;
  --panel: #141d36;
  --panel-2: #1a2542;
  --line: #243155;
  --ink: #eef2ff;
  --muted: #9aa7c7;
  --faint: #6c7aa0;
  --accent: #5eead4;
  --accent-2: #7dd3fc;
  --resilient: #34d399;
  --watch: #fbbf24;
  --fragile: #fb923c;
  --critical: #f87171;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.8);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(94, 234, 212, 0.10), transparent 60%),
    radial-gradient(900px 520px at 4% 8%, rgba(125, 211, 252, 0.08), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 16, 32, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.head-links { display: flex; gap: 22px; font-size: 0.92rem; }
.head-links a { color: var(--muted); }

/* Hero */
.hero { padding: 72px 0 40px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 800;
}
.lede {
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  margin: 0 0 30px;
}
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { color: var(--faint); font-size: 0.86rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04221f;
}
.btn.primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn.ghost {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--accent); }

/* Audit layout */
.audit { padding: 24px 0 40px; }
.audit-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.dimension {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.dim-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.dim-index {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.dim-title { margin: 0; font-size: 1.12rem; letter-spacing: -0.01em; }
.dim-desc { margin: 2px 0 16px; color: var(--muted); font-size: 0.9rem; }

.statement { padding: 12px 0; border-top: 1px solid var(--line); }
.statement:first-of-type { border-top: none; padding-top: 4px; }
.statement-text { display: block; margin-bottom: 10px; font-size: 0.97rem; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { color: var(--ink); border-color: var(--faint); }
.choice.val-0.checked { border-color: var(--critical); color: #fff; background: rgba(248, 113, 113, 0.18); }
.choice.val-1.checked { border-color: var(--watch); color: #fff; background: rgba(251, 191, 36, 0.16); }
.choice.val-2.checked { border-color: var(--resilient); color: #fff; background: rgba(52, 211, 153, 0.16); }

/* Score panel */
.scorepanel { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 18px; }
.score-card, .radar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.score-card { text-align: center; }
.score-ring { position: relative; width: 150px; height: 150px; margin: 0 auto 12px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease;
}
.score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num span { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.score-num small { color: var(--faint); font-size: 0.8rem; }
.score-tier {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 4px;
}
.score-tagline { color: var(--muted); font-size: 0.86rem; margin: 8px 0 0; min-height: 2.4em; }

.radar-card h3 { margin: 0 0 8px; font-size: 0.95rem; }
.radar { width: 100%; height: auto; display: block; }
.radar-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.radar-legend li { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.radar-legend .lg-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.radar-legend .lg-val { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel-actions .btn { padding: 10px; font-size: 0.85rem; }
.share-hint { color: var(--accent); font-size: 0.8rem; min-height: 1.1em; margin: 2px 0 0; text-align: center; }

/* Plan */
.plan { margin-top: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.plan h2 { margin: 0 0 4px; }
.plan-sub { color: var(--muted); margin: 0 0 18px; }
.plan-list { margin: 0; padding-left: 0; list-style: none; counter-reset: fix; display: grid; gap: 12px; }
.plan-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.plan-item .pri {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  height: max-content;
  white-space: nowrap;
}
.pri.high { background: rgba(248, 113, 113, 0.18); color: var(--critical); border: 1px solid rgba(248,113,113,0.4); }
.pri.med { background: rgba(251, 191, 36, 0.16); color: var(--watch); border: 1px solid rgba(251,191,36,0.4); }
.plan-item .fix-dim { color: var(--faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.plan-item .fix-text { font-size: 0.96rem; }
.plan-empty { color: var(--resilient); font-weight: 600; }

/* Method */
.method { padding: 50px 0 30px; border-top: 1px solid var(--line); margin-top: 40px; }
.method h2 { margin: 0 0 22px; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em; }
.method-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.method-cols h3 { margin: 0 0 8px; font-size: 1.02rem; }
.method-cols p { color: var(--muted); margin: 0; }
.tiers { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.tiers li { display: flex; align-items: baseline; gap: 10px; color: var(--muted); }
.tiers b { color: var(--ink); }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; align-self: center; }
.t-resilient { background: var(--resilient); }
.t-watch { background: var(--watch); }
.t-fragile { background: var(--fragile); }
.t-critical { background: var(--critical); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 50px; padding: 28px 0 48px; }
.site-foot p { color: var(--faint); font-size: 0.86rem; margin: 0 0 6px; }
.foot-meta { color: var(--line); }
#ver { color: var(--faint); }

/* Responsive */
@media (max-width: 880px) {
  .audit-grid { grid-template-columns: 1fr; }
  .scorepanel { position: static; order: -1; }
  .method-cols { grid-template-columns: 1fr; }
  .head-links { display: none; }
  .hero { padding: 48px 0 28px; }
}
@media (max-width: 460px) {
  .choices { grid-template-columns: 1fr; }
  .panel-actions { grid-template-columns: 1fr; }
}
