:root {
  --navy: #1a3a5c;
  --navy-2: #24557f;
  --navy-deep: #102a44;
  --gold: #b7770e;
  --gold-soft: #ffd98a;
  --green: #1e6e52;
  --red: #c0392b;
  --purple: #6b4fa1;
  --ink: #1c2733;
  --muted: #5b6b7b;
  --bg: #f6f8fa;
  --card: #ffffff;
  --line: #e3e9ef;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 42, 68, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: 0.3px; display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  display: inline-block;
  transform: rotate(45deg);
}
.tag { font-size: 13px; color: #b9c9d8; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(255, 217, 138, 0.12), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 64px 20px 76px;
  text-align: center;
}
.hero-inner { max-width: 780px; margin: 0 auto; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-soft);
  margin: 0 0 14px;
}
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.14; margin: 0 0 16px; font-weight: 800; }
.hero .accent { color: var(--gold-soft); }
.hero .sub { font-size: clamp(15px, 2.4vw, 17px); color: #d7e2ec; margin: 0 auto 30px; max-width: 640px; }

/* ---------- Form ---------- */
.score-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.field { flex: 1; min-width: 200px; max-width: 280px; }
.score-form input {
  width: 100%;
  padding: 15px 16px;
  font-size: 15px;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.score-form input:focus {
  outline: none;
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 4px rgba(255, 217, 138, 0.2);
}
.score-form button {
  padding: 15px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold-soft);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(255, 217, 138, 0.25);
}
.score-form button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 217, 138, 0.35); }
.score-form button:disabled { opacity: 0.65; cursor: wait; transform: none; }
.fine { font-size: 13px; color: #b9c9d8; }

/* ---------- Live progress ---------- */
.status { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.progress-ring { position: relative; width: 92px; height: 92px; }
.ring-svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.18); stroke-width: 7; }
.ring-fill {
  fill: none; stroke: var(--gold-soft); stroke-width: 7; stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}
.ring-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #fff;
}
.steps { list-style: none; margin: 0; padding: 0; text-align: left; max-width: 380px; width: 100%; }
.steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 4px;
  color: #9fb4c7;
  font-size: 14.5px;
  transition: color 0.2s ease;
}
.step-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #6f8aa3;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}
.steps li.active { color: #fff; }
.steps li.active .step-dot {
  border-color: var(--gold-soft);
  background: var(--gold-soft);
  box-shadow: 0 0 0 4px rgba(255, 217, 138, 0.2);
  animation: pulse 1.1s ease infinite;
}
.steps li.done { color: #cfe3f5; }
.steps li.done .step-dot {
  border-color: var(--green);
  background: var(--green);
}
.steps li.done .step-dot::after {
  content: ""; position: absolute; left: 2.5px; top: 0.5px;
  width: 3px; height: 6px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 217, 138, 0.2); }
  50% { box-shadow: 0 0 0 7px rgba(255, 217, 138, 0.08); }
}

.error {
  margin-top: 18px;
  background: #fdecea;
  color: var(--red);
  padding: 12px 16px;
  border-radius: 10px;
  display: inline-block;
}

/* ---------- CARE section ---------- */
.care { max-width: 1020px; margin: 0 auto; padding: 60px 20px; }
.care h2 { text-align: center; font-size: 28px; margin: 0 0 8px; }
.care-sub { text-align: center; color: var(--muted); margin: 0 0 30px; }
.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.care-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.care-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.care-letter {
  width: 42px; height: 42px; border-radius: 10px;
  color: #fff; font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.care-letter.c { background: var(--navy-2); }
.care-letter.a { background: var(--green); }
.care-letter.r { background: var(--gold); }
.care-letter.e { background: var(--purple); }
.care-card h3 { margin: 0 0 8px; font-size: 17px; }
.care-card p { margin: 0; font-size: 14px; color: var(--muted); }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 28px 20px;
  border-top: 1px solid var(--line);
}

/* ---------- Report page ---------- */
.report-body { background: var(--bg); }
.report { max-width: 860px; margin: 0 auto; padding: 44px 20px 70px; }
.report .eyebrow { color: var(--navy-2); }
.report-url { font-size: clamp(19px, 3vw, 25px); margin: 0 0 22px; word-break: break-all; }

.score-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 8px solid var(--navy-2);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.band-agent-ready { border-left-color: var(--green); }
.band-accessible { border-left-color: var(--navy-2); }
.band-at-risk { border-left-color: var(--gold); }
.band-invisible { border-left-color: var(--red); }

.gauge-wrap { position: relative; width: 168px; height: 168px; flex-shrink: 0; }
.gauge { width: 168px; height: 168px; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: #edf1f5; stroke-width: 13; }
.gauge-fill {
  fill: none; stroke: var(--navy-2); stroke-width: 13; stroke-linecap: round;
  transition: stroke-dashoffset 0.2s linear;
}
.band-agent-ready .gauge-fill { stroke: var(--green); }
.band-accessible .gauge-fill { stroke: var(--navy-2); }
.band-at-risk .gauge-fill { stroke: var(--gold); }
.band-invisible .gauge-fill { stroke: var(--red); }
.gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-number { font-size: 52px; font-weight: 800; line-height: 1; }
.gauge-of { color: var(--muted); font-size: 14px; margin-top: 2px; }

.score-meta { flex: 1; min-width: 220px; }
.score-band { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.score-blurb { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.score-badge-inline img { display: block; }

.gate-note {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: var(--red);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 22px;
  font-size: 14px;
}

.layers, .findings, .badge-section, .cta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.layers h2, .findings h2, .badge-section h2, .cta h2 { margin-top: 0; font-size: 20px; }
.count-pill {
  display: inline-block;
  background: var(--navy-2); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px;
  vertical-align: middle; margin-left: 4px;
}

/* CARE dials */
.care-viz {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.care-dial { text-align: center; position: relative; }
.dial { width: 110px; height: 110px; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: #edf1f5; stroke-width: 10; }
.dial-fill {
  fill: none; stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 0.2s linear;
}
.dial-center {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
}
.dial-num { font-size: 26px; font-weight: 800; }
.dial-label { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* Findings */
.finding {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: transform 0.1s ease;
}
.finding:hover { transform: translateX(3px); }
.finding-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.finding-sev {
  text-transform: uppercase;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 5px; color: #fff; background: var(--muted);
}
.sev-critical { border-left-color: var(--red); }
.sev-critical .finding-sev { background: var(--red); }
.sev-high { border-left-color: var(--gold); }
.sev-high .finding-sev { background: var(--gold); }
.sev-medium { border-left-color: var(--navy-2); }
.sev-medium .finding-sev { background: var(--navy-2); }
.sev-low { border-left-color: var(--muted); }
.finding-title { font-weight: 700; font-size: 15px; }
.finding-layer { margin-left: auto; font-size: 12px; color: var(--muted); }
.finding-summary { margin: 8px 0 0; font-size: 14px; }
.no-findings { color: var(--green); font-weight: 600; }

/* Badge */
.badge-preview { margin: 14px 0; }
.badge-code {
  background: var(--navy-deep);
  color: #cfe3f5;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* CTA */
.cta { text-align: center; background: linear-gradient(160deg, var(--navy-deep), var(--navy-2)); color: #fff; border: none; }
.cta h2 { color: #fff; }
.cta p { color: #d7e2ec; }
.cta-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 14px 30px;
  background: var(--gold-soft);
  color: var(--navy);
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(255, 217, 138, 0.25);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 217, 138, 0.35); }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .score-hero { flex-direction: column; text-align: center; gap: 18px; }
  .score-meta { text-align: center; }
  .score-badge-inline img { margin: 0 auto; }
  .field { max-width: 100%; }
  .score-form button { width: 100%; }
  .care-viz { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Full report additions ---------- */
.finding-fix { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.finding-artifact { margin: 8px 0 0; font-size: 12.5px; color: var(--navy-2); }
.finding-artifact code { background: #eef3f8; padding: 2px 6px; border-radius: 5px; }

.checks-table-wrap { overflow-x: auto; }
.checks-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.checks-table th {
  text-align: left; padding: 10px 12px;
  background: #f2f6fa; color: var(--ink);
  font-weight: 700; border-bottom: 2px solid var(--line);
}
.checks-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.checks-table code { background: #eef3f8; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.check-status {
  display: inline-block; padding: 2px 9px; border-radius: 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}
.st-pass { background: #e3f2ec; color: var(--green); }
.st-warn { background: #fbf0da; color: var(--gold); }
.st-fail { background: #fdecea; color: var(--red); }
.st-na { background: #eef1f4; color: var(--muted); }

.artifacts-intro { color: var(--muted); font-size: 14px; margin-top: -4px; }
.artifact {
  border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 16px; overflow: hidden;
}
.artifact-head {
  display: flex; align-items: center; justify-content: space-between;
  background: #f2f6fa; padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.artifact-name { font-weight: 700; font-size: 13px; color: var(--navy-2); }
.copy-btn {
  background: var(--navy-2); color: #fff; border: none;
  padding: 6px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background 0.15s ease;
}
.copy-btn:hover { background: var(--navy); }
.artifact-body {
  margin: 0; padding: 16px; background: var(--navy-deep); color: #cfe3f5;
  font-size: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow-y: auto;
}

.cta-secondary {
  background: transparent; color: var(--gold-soft);
  border: 2px solid var(--gold-soft); box-shadow: none; margin-left: 10px;
}
.cta-secondary:hover { background: rgba(255, 217, 138, 0.12); box-shadow: none; }

/* ---------- Competitor intelligence ---------- */
.comp-form { flex-direction: column; align-items: center; }
.field-wide { max-width: 480px; width: 100%; }
.comp-form button { width: 100%; max-width: 480px; }

.verdict {
  padding: 14px 18px; border-radius: 12px; font-weight: 700; font-size: 15px;
  margin-bottom: 22px; text-align: center;
}
.verdict-ahead { background: #e3f2ec; color: var(--green); border: 1px solid #bfe3d4; }
.verdict-even { background: #eef3f8; color: var(--navy-2); border: 1px solid #d3e0ec; }
.verdict-behind { background: #fdecea; color: var(--red); border: 1px solid #f5c6c0; }

.h2h-overall {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.h2h-side { text-align: center; }
.h2h-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.h2h-score { font-size: 52px; font-weight: 800; line-height: 1; }
.h2h-band { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.h2h-vs { font-size: 18px; font-weight: 800; color: var(--muted); }

.h2h-layers { margin-top: 8px; }
.h2h-row {
  display: grid; grid-template-columns: 120px 1fr 52px;
  align-items: center; gap: 14px; margin-bottom: 16px;
}
.h2h-layer-name { font-size: 14px; font-weight: 600; }
.h2h-bars { display: flex; flex-direction: column; gap: 6px; }
.h2h-bar-row { display: flex; align-items: center; gap: 8px; }
.h2h-tag { font-size: 11px; font-weight: 700; width: 38px; flex-shrink: 0; }
.h2h-tag.you { color: var(--navy-2); }
.h2h-tag.them { color: var(--gold); }
.h2h-bar { flex: 1; background: #edf1f5; border-radius: 5px; height: 12px; overflow: hidden; }
.h2h-fill { height: 100%; border-radius: 5px; }
.h2h-fill.you { background: var(--navy-2); }
.h2h-fill.them { background: var(--gold); }
.h2h-num { font-size: 12px; font-weight: 700; width: 26px; text-align: right; }
.h2h-delta { text-align: center; font-weight: 800; font-size: 15px; }
.h2h-delta.pos { color: var(--green); }
.h2h-delta.neg { color: var(--red); }

.adv-block {
  background: #fdecea; border: 1px solid #f5c6c0; border-radius: 12px;
  padding: 16px 20px; margin-top: 18px;
}
.adv-block.own { background: #e3f2ec; border-color: #bfe3d4; }
.adv-block h3 { margin: 0 0 10px; font-size: 16px; }
.adv-block ul { margin: 0; padding-left: 20px; }
.adv-block li { font-size: 14px; margin-bottom: 6px; }

@media (max-width: 600px) {
  .h2h-row { grid-template-columns: 1fr; gap: 8px; }
  .h2h-delta { text-align: left; }
}

/* ---------- Nav link ---------- */
.nav { justify-content: flex-start; }
.nav-link {
  margin-left: auto;
  color: var(--gold-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 7px 14px;
  border: 1.5px solid rgba(255, 217, 138, 0.4);
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover { background: rgba(255, 217, 138, 0.12); border-color: var(--gold-soft); }
