/* ============ RealBrand · AI Readiness, styles ============ */
:root {
  --bg: #161c29;
  --bg-2: #1a2130;
  --panel: #1e2534;
  --panel-2: #232d3f;
  --panel-3: #283040;
  --line: rgba(151, 192, 217, 0.10);
  --line-2: rgba(151, 192, 217, 0.20);
  --ink: #fcfcfd;
  --ink-dim: #aeb6c6;
  --ink-faint: #6e7891;

  --cyan: #00e5ff;
  --pink: #ff2e93;
  --orange: #ff6a00;
  --yellow: #ffd400;
  --purple: #9b5de5;
  --brand-grad: linear-gradient(100deg, #ff2e93, #ff6a00, #ffd400, #00e5ff, #9b5de5);
  --brand-grad-cool: linear-gradient(100deg, #00e5ff, #9b5de5);
  --accent: #00e5ff;

  --good: #3ddc97;
  --warn: #ffc24b;
  --bad: #ff4d6d;

  --radius: 18px;
  --max: 1080px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

.grad-text, .brand-grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* subtle constellation + grain (RealBrand network motif) */
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(151,192,217,0.6), transparent),
    radial-gradient(1.2px 1.2px at 78% 14%, rgba(0,229,255,0.5), transparent),
    radial-gradient(1.3px 1.3px at 34% 68%, rgba(151,192,217,0.45), transparent),
    radial-gradient(1.1px 1.1px at 62% 78%, rgba(155,93,229,0.5), transparent),
    radial-gradient(1.2px 1.2px at 88% 52%, rgba(151,192,217,0.4), transparent),
    radial-gradient(1.1px 1.1px at 22% 88%, rgba(0,229,255,0.35), transparent),
    radial-gradient(1.3px 1.3px at 50% 40%, rgba(151,192,217,0.35), transparent);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(22, 28, 41, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 21px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--ink-faint); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-cta {
  font-size: 14px; font-weight: 700; color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; background: var(--brand-grad);
  background-size: 160% 160%; box-shadow: 0 6px 22px rgba(255, 46, 147, 0.28);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(255, 46, 147, 0.42); }

/* ---------- HERO ---------- */
.hero { position: relative; z-index: 2; padding: clamp(56px, 11vw, 128px) 24px clamp(48px, 8vw, 96px); overflow: hidden; }
.hero-glow {
  position: absolute; top: -34%; left: 50%; transform: translateX(-50%);
  width: 960px; height: 720px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(0, 229, 255, 0.16), transparent 70%),
    radial-gradient(closest-side at 30% 40%, rgba(255, 46, 147, 0.12), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(155, 93, 229, 0.14), transparent 70%);
  filter: blur(24px);
}
.hero-inner { position: relative; max-width: 780px; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cyan);
  padding: 6px 15px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(0, 229, 255, 0.06);
}
.eyebrow.light { color: var(--cyan); }
.hero-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(46px, 8.6vw, 92px); line-height: 1.0;
  margin: 22px 0 20px;
}
.hero-lead {
  font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-dim);
  max-width: 600px; margin: 0 auto 34px;
}

.scan-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.scan-field {
  flex: 1; min-width: 240px; display: flex; align-items: center;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 0 4px 0 16px; transition: border-color 0.2s, box-shadow 0.2s;
}
.scan-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.16); }
.scan-prefix { color: var(--ink-faint); font-size: 15px; font-weight: 500; user-select: none; }
#domainInput {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font-size: 16px; font-family: inherit; font-weight: 500; padding: 16px 8px;
}
#domainInput::placeholder { color: var(--ink-faint); }
.scan-btn {
  border: none; cursor: pointer; border-radius: 14px; padding: 16px 28px;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #fff;
  background: var(--brand-grad); background-size: 160% 160%;
  box-shadow: 0 8px 30px rgba(255, 46, 147, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
}
.scan-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(0, 229, 255, 0.35); }
.scan-btn:active { transform: translateY(0); }
.scan-btn:disabled { opacity: 0.6; cursor: wait; }
.scan-hint { font-size: 13px; color: var(--ink-faint); margin-top: 14px; }

.hero-badges {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 40px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-faint); font-weight: 500; letter-spacing: 0.03em;
}
.hero-badges i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }

/* ---------- SCANNING ---------- */
.scanning { position: relative; z-index: 2; padding: 80px 24px 120px; text-align: center; min-height: 60vh; }
.scan-orb { position: relative; width: 140px; height: 140px; margin: 0 auto 36px; }
.scan-ring, .scan-core { position: absolute; inset: 0; border-radius: 50%; }
.scan-ring { border: 2px solid transparent; border-top-color: var(--cyan); animation: spin 1.1s linear infinite; }
.scan-ring.r2 { inset: 18px; border-top-color: var(--pink); animation-duration: 1.6s; animation-direction: reverse; }
.scan-core {
  inset: 44px; background: var(--brand-grad); background-size: 200% 200%;
  animation: pulse 1.6s ease-in-out infinite, hue 4s linear infinite; box-shadow: 0 0 40px rgba(0, 229, 255, 0.5);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(0.85); opacity: 0.85; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes hue { to { background-position: 200% 0; } }
.scan-domain { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 5vw, 38px); margin-bottom: 32px; }
.scan-steps { list-style: none; max-width: 440px; margin: 0 auto; text-align: left; }
.scan-steps li {
  padding: 13px 18px; margin-bottom: 8px; border-radius: 12px; color: var(--ink-faint);
  font-size: 15px; border: 1px solid transparent; display: flex; align-items: center; gap: 12px;
  transition: all 0.3s ease; opacity: 0.4;
}
.scan-steps li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--line-2); }
.scan-steps li.active { opacity: 1; color: var(--ink); background: var(--panel); border-color: var(--line); }
.scan-steps li.active::before { border-color: var(--cyan); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.scan-steps li.done { opacity: 1; color: var(--ink-dim); }
.scan-steps li.done::before { border-color: var(--good); background: var(--good); }

/* ---------- RESULTS ---------- */
.results { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: 40px 24px 60px; }
.result-head { padding: 20px 0 44px; border-bottom: 1px solid var(--line); }
.score-block { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.score-rings { display: flex; gap: 26px; align-items: flex-start; flex-shrink: 0; }
.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ring-label { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ring-label b { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1; }
.ring-label span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600; }
.score-ring { position: relative; flex-shrink: 0; }
.score-ring.primary { width: 184px; height: 184px; }
.score-ring.secondary { width: 138px; height: 138px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring.primary .score-num { font-size: 50px; }
.score-ring.secondary .score-num { font-size: 36px; }
.score-ring.secondary .score-of { font-size: 11px; }
.ring-track { fill: none; stroke: var(--panel-2); stroke-width: 14; }
.ring-fill {
  fill: none; stroke: url(#grad); stroke-width: 14; stroke-linecap: round;
  stroke-dasharray: 540; stroke-dashoffset: 540;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.3, 0, 0, 1), stroke 0.6s;
}
.score-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num { font-family: var(--font-display); font-size: 58px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.score-of { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.score-grade {
  margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2);
}
.score-meta { flex: 1; min-width: 280px; }
.score-label { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.score-domain { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 5vw, 42px); margin: 6px 0 8px; word-break: break-word; }
.score-sub { font-size: 12.5px; color: var(--ink-faint); font-weight: 500; letter-spacing: 0.02em; margin-bottom: 14px; }
.score-verdict { font-size: 16.5px; color: var(--ink-dim); max-width: 560px; margin-bottom: 20px; }
.score-quickstats { display: flex; gap: 10px; flex-wrap: wrap; }
.qstat { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); display: flex; align-items: center; gap: 7px; color: var(--ink-dim); }
.qstat.ok { border-color: rgba(61, 220, 151, 0.32); }
.qstat.no { border-color: rgba(255, 77, 109, 0.32); }
.qdot { width: 7px; height: 7px; border-radius: 50%; }
.qstat.ok .qdot { background: var(--good); }
.qstat.no .qdot { background: var(--bad); }

/* biggest-opportunity spotlight */
.spotlight { padding: 32px 0 4px; }
.spotlight-inner {
  position: relative; border-radius: 20px; padding: 28px 30px;
  background: linear-gradient(150deg, rgba(155,93,229,0.12), rgba(0,229,255,0.06));
  border: 1px solid var(--line-2); overflow: hidden;
}
.spotlight-inner::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand-grad); background-size: 100% 300%;
}
.spotlight-eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 10px;
}
.spotlight-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 3vw, 27px); margin-bottom: 8px; }
.spotlight-body { font-size: 15.5px; color: var(--ink-dim); max-width: 680px; margin-bottom: 16px; }
.spotlight-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spotlight-gap {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--ink);
  padding: 6px 13px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--line-2);
}
.spotlight-pkg {
  font-size: 12.5px; font-weight: 600; color: var(--cyan);
  padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(0,229,255,0.3); background: rgba(0,229,255,0.06);
}

/* transparent scan receipt */
.scan-receipt { margin-top: 18px; max-width: 620px; }
.scan-receipt summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-dim);
  letter-spacing: 0.02em; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; user-select: none;
  transition: border-color 0.2s, color 0.2s;
}
.scan-receipt summary::before { content: "▸"; font-size: 10px; transition: transform 0.2s; }
.scan-receipt[open] summary::before { transform: rotate(90deg); }
.scan-receipt summary:hover { color: var(--ink); border-color: var(--cyan); }
.scan-receipt summary::-webkit-details-marker { display: none; }
.scan-receipt #scanReceiptCount { color: var(--ink-faint); font-weight: 500; }
.rc-list { list-style: none; margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.rc-list li { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.rc-status {
  flex-shrink: 0; width: 40px; text-align: center; font-family: var(--font-display); font-weight: 700;
  font-size: 11.5px; padding: 3px 0; border-radius: 6px; color: var(--ink);
}
.rc-status.ok { background: rgba(61,220,151,0.14); color: var(--good); }
.rc-status.no { background: rgba(255,77,109,0.14); color: var(--bad); }
.rc-kind { flex-shrink: 0; width: 118px; color: var(--ink-dim); font-weight: 600; }
.rc-detail { color: var(--ink-faint); word-break: break-all; font-family: var(--font-body); }
.rc-note { margin-top: 12px; font-size: 12px; color: var(--ink-faint); font-style: italic; }

.section { padding: 44px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 700; margin-bottom: 24px; }
.section-head .section-title { margin-bottom: 0; }
.section-note { text-transform: none; letter-spacing: 0; color: var(--ink-faint); font-weight: 500; }
.health-badge {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.health-badge b { font-size: 15px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cat-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); }
.cat-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); font-size: 15px; }
.cat-score { font-size: 15px; font-weight: 700; font-family: var(--font-display); }
.cat-score span { color: var(--ink-faint); font-weight: 500; font-size: 13px; }
.cat-bar { height: 7px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 12px 0 18px; }
.cat-bar i { display: block; height: 100%; border-radius: 999px; width: 0; transition: width 1s cubic-bezier(0.3,0,0,1); }
.cat-findings { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.cat-findings li { display: flex; gap: 11px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.45; }
.fmark { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; margin-top: 1px; }
.fmark.ok { background: rgba(61, 220, 151, 0.15); color: var(--good); }
.fmark.no { background: rgba(255, 77, 109, 0.15); color: var(--bad); }
.fmark.warn { background: rgba(255, 194, 75, 0.15); color: var(--warn); }

/* recommendations */
.rec-list { display: flex; flex-direction: column; gap: 14px; }
.rec { display: flex; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; align-items: flex-start; }
.rec-pri { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 11px; border-radius: 8px; margin-top: 2px; }
.rec-pri.high { background: rgba(255, 77, 109, 0.15); color: var(--bad); }
.rec-pri.medium { background: rgba(255, 194, 75, 0.15); color: var(--warn); }
.rec-pri.low { background: rgba(0, 229, 255, 0.13); color: var(--cyan); }
.rec-body h4 { font-size: 16.5px; font-weight: 700; margin-bottom: 5px; font-family: var(--font-display); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-track { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.rec-track.ai { background: rgba(155, 93, 229, 0.16); color: var(--purple); }
.rec-track.health { background: rgba(0, 229, 255, 0.13); color: var(--cyan); }
.rec-body p { font-size: 14.5px; color: var(--ink-dim); }
.rec-missing { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.miss-chip { font-size: 12px; font-weight: 500; color: var(--ink-dim); padding: 4px 10px; border-radius: 7px; background: rgba(255,77,109,0.08); border: 1px solid rgba(255,77,109,0.22); }
.rec-foot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.rec-cat { font-size: 12px; color: var(--ink-faint); font-weight: 600; display: inline-block; }
.rec-package {
  font-size: 12px; font-weight: 600; color: var(--cyan);
  padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(0,229,255,0.28); background: rgba(0,229,255,0.06);
}
.rec-empty { color: var(--ink-dim); font-size: 16px; }

/* build CTA */
.build { margin-top: 44px; }
.build-inner {
  text-align: center; background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: 26px; padding: clamp(40px, 6vw, 64px) 28px;
  position: relative; overflow: hidden;
}
.build-inner::before {
  content: ""; position: absolute; top: -46%; left: 50%; transform: translateX(-50%);
  width: 680px; height: 460px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(0,229,255,0.14), transparent 70%),
    radial-gradient(closest-side at 35% 50%, rgba(255,46,147,0.12), transparent 70%),
    radial-gradient(closest-side at 68% 55%, rgba(155,93,229,0.12), transparent 70%);
}
.build-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 5vw, 46px); margin: 16px 0 14px; position: relative; }
.build-lead { font-size: 17px; color: var(--ink-dim); max-width: 580px; margin: 0 auto 30px; position: relative; }
.build-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
.build-btn {
  font-family: var(--font-display); font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
  padding: 15px 30px; border-radius: 13px; border: 1px solid transparent; transition: all 0.2s ease;
}
.build-btn.primary { background: var(--brand-grad); background-size: 160% 160%; color: #fff; box-shadow: 0 8px 30px rgba(255,46,147,0.32); }
.build-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(0,229,255,0.35); }
.build-btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.build-btn.ghost:hover { background: var(--panel); border-color: var(--cyan); }
.lead-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lead-input {
  background: rgba(22, 28, 41, 0.6); border: 1px solid var(--line-2); border-radius: 13px;
  padding: 14px 16px; color: var(--ink); font-family: var(--font-body); font-size: 15px;
  font-weight: 500; min-width: 190px; transition: border-color 0.2s, box-shadow 0.2s;
}
.lead-input::placeholder { color: var(--ink-faint); }
.lead-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.14); }
.lead-success {
  position: relative; max-width: 520px; margin: 22px auto 0; font-size: 16px; color: var(--ink);
  background: rgba(61, 220, 151, 0.08); border: 1px solid rgba(61, 220, 151, 0.3);
  border-radius: 14px; padding: 16px 20px;
}
.rescan-link { display: inline-block; margin-top: 20px; background: none; border: none; color: var(--ink-faint); font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; position: relative; transition: color 0.2s; }
.rescan-link:hover { color: var(--cyan); }
.build-fine { font-size: 12.5px; color: var(--ink-faint); margin-top: 18px; position: relative; }

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 100; background: var(--panel-2); border: 1px solid var(--bad);
  color: var(--ink); padding: 14px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); opacity: 0; transition: all 0.3s ease; pointer-events: none;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* footer */
.foot {
  position: relative; z-index: 2; max-width: var(--max); margin: 0 auto;
  padding: 30px 24px 50px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: var(--ink-faint); border-top: 1px solid var(--line);
}

/* PDF export button + print-only report chrome */
.results-actions { display: flex; justify-content: flex-end; padding: 4px 0 0; }
.pdf-btn {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; cursor: pointer;
  color: var(--ink-dim); background: var(--panel); border: 1px solid var(--line-2);
  padding: 9px 16px; border-radius: 10px; transition: color 0.2s, border-color 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.pdf-btn::before { content: "\2913"; font-size: 15px; }
.pdf-btn:hover { color: var(--ink); border-color: var(--cyan); }
.print-only { display: none; }

@media print {
  @page { margin: 14mm; }
  :root {
    --bg: #ffffff; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #f4f6fa; --panel-3: #eef1f6;
    --line: rgba(0,0,0,0.14); --line-2: rgba(0,0,0,0.22);
    --ink: #10151f; --ink-dim: #39434f; --ink-faint: #6f7a89;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff !important; color: var(--ink); }
  .stars, .grain, .nav, .hero, .scanning, .toast, .foot,
  #buildActions, .rescan-link, .results-actions, .build-fine, .scan-receipt {
    display: none !important;
  }
  .print-only { display: flex !important; }
  .print-header {
    justify-content: space-between; align-items: baseline;
    border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 22px;
  }
  .ph-brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
  .ph-meta { font-size: 12px; color: var(--ink-dim); }
  .print-footer {
    justify-content: center; margin-top: 22px; padding-top: 12px;
    border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-faint);
  }
  .results { max-width: none; padding: 0; }
  .section, .result-head, .build { break-inside: auto; padding: 20px 0; border-color: var(--line); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-card, .rec, .spotlight-inner, .build-inner { break-inside: avoid; box-shadow: none; }
  .build { margin-top: 18px; border-top: 1px solid var(--line-2); }
  .build-inner { background: #fff !important; border: 1px solid var(--line-2); border-radius: 12px; }
  .build-inner::before { display: none; }
  .build-title { font-size: 22px; }
  .build-lead { font-size: 13.5px; margin-bottom: 4px; }
  a { color: var(--ink); text-decoration: none; }
}

@media (max-width: 640px) {
  .score-block { gap: 28px; }
  .score-ring { width: 160px; height: 160px; }
  .score-num { font-size: 46px; }
  .rec { flex-direction: column; gap: 10px; }
  .foot { flex-direction: column; }
}
