/* CheckMyLaunch — app stylesheet. Inter font per MATD NZ convention, but the accent
   deliberately diverges from the portfolio's #4F46E5 indigo: CheckMyLaunch targets
   "vibe coder" audiences where indigo/purple is the most overused SaaS color,
   so this product uses a deep ocean teal (#0E7490 family) instead. Status
   colors (green/amber/red) are unchanged — the teal was picked to stay clearly
   distinct from the pass-green. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #FFFFFF;
  --surface: #F8FAFC;
  --text-primary: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --accent: #0E7490;
  --accent-light: #CFFAFE;
  --accent-dark: #155E75;
  --green: #059669;
  --green-light: #ECFDF5;
  --red: #DC2626;
  --red-light: #FEF2F2;
  --amber: #D97706;
  --amber-light: #FFFBEB;
}

html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: inherit; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
/* Anchored scroll targets stop below the sticky header instead of under it. */
#how-it-works, #what-we-check, #faq { scroll-margin-top: 76px; }
@media (max-width: 720px) {
  .topnav a { padding: 6px 7px; font-size: 12px; }
}
/* Phone widths: the nav no longer fits in one row next to the brand and the
   sign-in button — wrap it onto its own row instead of letting it push the
   page into horizontal scroll (it was clipping "What we check" off-screen). */
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; padding: 14px 16px; }
  .topbar-right { flex-wrap: wrap; justify-content: center; width: 100%; gap: 10px; }
  .topnav { flex-wrap: wrap; justify-content: center; }
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.brand-name { font-weight: 700; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); transition: color .15s ease, background .15s ease;
}
.topnav a:hover { color: var(--text-primary); background: var(--surface); }

.account-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-primary); background: var(--surface); border: 1px solid var(--border);
  padding: 5px 12px 5px 6px; border-radius: 999px;
}
.avatar { border-radius: 50%; display: block; }

.content { flex: 1; padding: 32px 28px; max-width: 880px; width: 100%; margin: 0 auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border);
  background: var(--white); color: var(--text-primary); padding: 9px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--white); box-shadow: 0 1px 2px rgba(14, 116, 144, .25); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { background: var(--white); }
.btn-primary:disabled:hover { background: var(--accent); }

/* ── Landing page ── */
.landing-hero {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 48px 0 36px; position: relative;
}
.landing-hero::before {
  content: ''; position: absolute; inset: -40px -80px auto; height: 420px; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 50% 20%, var(--accent-light), transparent 70%);
  pointer-events: none;
}
/* The glow's -80px horizontal bleed is harmless on desktop (plenty of margin
   to fade into), but on a phone it pushes the whole page into horizontal
   scroll. Shrink the bleed instead of removing the glow. Must come after the
   base rule above — same specificity, so source order decides the winner. */
@media (max-width: 480px) {
  .landing-hero::before { inset: -40px -16px auto; }
}
.landing-mark {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
}
.landing-hero h1 { font-size: 40px; font-weight: 800; max-width: 640px; line-height: 1.15; margin-bottom: 18px; }
.landing-hero p { color: var(--text-muted); font-size: 16px; font-weight: 700; max-width: 560px; margin: 0 auto; }
.landing-hero p + p { margin-top: 14px; }
.btn-lg { padding: 13px 26px; font-size: 14px; }

.landing-steps { display: flex; flex-direction: column; gap: 18px; max-width: 640px; margin: 24px auto 0; }
.landing-step { display: flex; gap: 16px; align-items: flex-start; }
.landing-step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.landing-step-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.landing-step-body { color: var(--text-muted); font-size: 13px; }

.landing-checks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.landing-check-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.landing-check-card:hover {
  border-color: var(--accent); box-shadow: 0 6px 20px rgba(14, 116, 144, .08);
  transform: translateY(-2px);
}
.landing-check-icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 10px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.landing-check-icon svg { display: block; }
.landing-check-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.landing-check-body { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.pricing-pitch { max-width: 640px; margin: 40px auto 40px; text-align: center; }
.pricing-pitch h1 { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.pricing-pitch p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.pricing-pitch p + p { margin-top: 14px; }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
  margin-top: 18px; color: var(--text-muted); font-size: 14px; font-weight: 400;
}

.hero-disclaimer {
  margin-top: 12px; color: var(--text-muted); font-size: 11px; font-style: italic; text-align: center;
}

.selfcheck { max-width: 640px; margin: 24px auto 0; }
.selfcheck-item {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 16px; font-size: 13px; font-weight: 500;
}
.selfcheck-item + .selfcheck-item { margin-top: 8px; }
.selfcheck-mark {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--amber-light); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.selfcheck-footer {
  color: var(--text-muted); font-size: 13px; text-align: center;
  margin-top: 16px; max-width: 520px; margin-left: auto; margin-right: auto;
}

.landing-strips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.landing-strip-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
}
.landing-strip-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.landing-strip-card p { color: var(--text-muted); font-size: 13px; line-height: 1.6; }

.faq-list { max-width: 640px; margin: 20px auto 0; }
.faq-item {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 0 16px;
}
.faq-item + .faq-item { margin-top: 8px; }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 13px; padding: 14px 0;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--accent); font-weight: 800; font-size: 16px; flex-shrink: 0;
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); font-size: 13px; line-height: 1.6; padding-bottom: 14px; }

.landing-final-cta {
  text-align: center; margin: 56px auto 40px; padding: 36px 24px;
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  max-width: 640px;
}
.landing-final-title { font-weight: 800; font-size: 20px; margin-bottom: 8px; }
.landing-final-cta p { color: var(--text-muted); font-size: 14px; }

@media (max-width: 720px) {
  .landing-checks-grid { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 30px; }
  .landing-strips { grid-template-columns: 1fr; }
}

/* ── Connect screen ── */
.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.hero p { color: var(--text-muted); font-size: 15px; max-width: 480px; margin: 0 auto; }
.connect-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

.dev-panel {
  margin-top: 48px; border: 1px dashed var(--border); border-radius: 10px; padding: 18px;
  background: var(--white);
}
.dev-panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 10px; }
.dev-panel .row { display: flex; gap: 8px; }
.dev-panel input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; }

/* ── Dashboard ── */
.score-hero { display: flex; align-items: center; gap: 28px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 24px 28px; margin-bottom: 24px; }
.score-summary h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; word-break: break-word; }
.score-summary p { color: var(--text-muted); font-size: 13px; }

/* Score ring: the arc carries the score band, the track is a lighter step of
   the same color, and the number stays in ink. Bands match the Project Brain
   report: >=80 good, >=50 warn, else bad. */
.score-ring-wrap { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.score-ring-wrap svg { display: block; }
.ring-track { stroke: var(--border); }
.ring-fill { transition: stroke-dasharray .6s ease; }
.score-good .ring-track { stroke: var(--green-light); }
.score-good .ring-fill { stroke: var(--green); }
.score-warn .ring-track { stroke: var(--amber-light); }
.score-warn .ring-fill { stroke: var(--amber); }
.score-bad .ring-track { stroke: var(--red-light); }
.score-bad .ring-fill { stroke: var(--red); }
.score-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.score-number { font-size: 34px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.score-pct { font-size: 17px; font-weight: 700; color: var(--text-muted); }
.score-label { color: var(--text-muted); font-size: 12px; margin-top: 3px; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.category-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  border-top: 3px solid var(--border);
}
.category-card.status-ok { border-top-color: var(--green); }
.category-card.status-minor, .category-card.status-warning { border-top-color: var(--amber); }
.category-card.status-critical { border-top-color: var(--red); }
.category-card .cat-name { font-size: 12px; font-weight: 700; text-transform: capitalize; margin-bottom: 6px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-ok .status-dot { background: var(--green); }
.status-minor .status-dot { background: var(--amber); }
.status-warning .status-dot { background: var(--amber); }
.status-critical .status-dot { background: var(--red); }
.cat-status { font-size: 12px; color: var(--text-muted); }
.status-critical .cat-status { color: var(--red); font-weight: 600; }

@media (max-width: 720px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .score-hero { flex-direction: column; text-align: center; }
}

/* ── Verdict line (under the score) ── */
.verdict {
  border-radius: 10px; padding: 14px 18px; margin-bottom: 20px;
  font-size: 15px; font-weight: 600; line-height: 1.5; border: 1px solid transparent;
}
.verdict-bad { background: var(--red-light); color: var(--red); border-color: #FCA5A5; }
.verdict-warn { background: var(--amber-light); color: var(--amber); border-color: #FCD9A5; }
.verdict-good { background: var(--green-light); color: var(--green); border-color: #A7F3D0; }

/* ── "Fix these first" priority block ── */
.fixfirst { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; box-shadow: 0 4px 14px rgba(15,23,42,.05); }
.fixfirst-head { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.fixfirst-list { display: flex; flex-direction: column; gap: 8px; }
.fixfirst-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.fixfirst-item:hover { border-color: var(--accent); background: var(--surface); }
.fixfirst-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--red); color: var(--white); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.fixfirst-body { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.fixfirst-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Severity-grouped findings ── */
.finding-group { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--white); }
.finding-group-head {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 12px 16px; font-size: 13px; user-select: none;
}
.finding-group-head::-webkit-details-marker { display: none; }
.finding-group-head::before { content: '▸'; color: var(--text-muted); font-size: 11px; transition: transform .15s ease; }
.finding-group[open] .finding-group-head::before { transform: rotate(90deg); }
.finding-group-name { font-weight: 700; text-transform: uppercase; font-size: 11px; padding: 3px 8px; border-radius: 999px; }
.finding-group-count { color: var(--text-muted); font-weight: 500; }
.finding-group .findings-list { padding: 0 12px 12px; }
.finding-card { scroll-margin-top: 76px; }
.finding-card.flash { animation: findingFlash 1.4s ease; }
@keyframes findingFlash { 0%, 40% { background: var(--accent-light); } 100% { background: var(--white); } }

.findings-list { display: flex; flex-direction: column; gap: 10px; }
.finding-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
  border-left: 3px solid var(--border);
}
.finding-card:has(.severity-critical), .finding-card:has(.severity-high) { border-left-color: var(--red); }
.finding-card:has(.severity-medium) { border-left-color: var(--amber); }
.finding-card:has(.severity-low) { border-left-color: var(--accent); }
.finding-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.severity-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.test-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.live-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; background: var(--red); color: #fff; white-space: nowrap; }
.severity-critical { background: var(--red-light); color: var(--red); }
.severity-high { background: var(--red-light); color: var(--red); }
.severity-medium { background: var(--amber-light); color: var(--amber); }
.severity-low { background: var(--accent-light); color: var(--accent); }
.severity-info { background: var(--surface); color: var(--text-muted); }
.finding-title { font-weight: 700; font-size: 14px; }
.finding-message { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.finding-plain { font-size: 13px; margin-top: 8px; line-height: 1.55; }
.finding-tech {
  color: var(--text-muted); font-size: 12px; margin-top: 8px; line-height: 1.5;
  padding: 8px 10px; background: var(--surface); border-radius: 6px;
}
.finding-tech-label {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; margin-right: 7px; vertical-align: 1px;
}
.finding-file { font-size: 12px; color: var(--text-muted); font-family: 'SF Mono', Consolas, monospace; margin-top: 4px; }
.finding-actions { margin-top: 10px; display: flex; gap: 8px; }
.prompt-wrap { display: none; margin-top: 10px; }
.prompt-wrap.visible { display: block; }
.prompt-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.prompt-box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 12px; font-family: 'SF Mono', Consolas, monospace; white-space: pre-wrap; line-height: 1.55; }
.prompt-actions { margin-top: 8px; }

/* ── Launch-ready celebration ── */
.celebrate-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .5);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.celebrate-card {
  background: var(--white); border-radius: 16px; padding: 40px 44px; text-align: center;
  max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); position: relative; z-index: 1;
}
.celebrate-emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.celebrate-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.celebrate-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.confetti {
  position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; opacity: .9;
  animation: confettiFall 2.6s linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(680deg); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }

/* ── Full checklist ── */
.checklist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.checklist-item {
  display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px; font-size: 13px;
}
.checklist-icon { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--white); }
.checklist-pass .checklist-icon { background: var(--green); }
.checklist-fail .checklist-icon { background: var(--red); }
.checklist-skip .checklist-icon { background: var(--text-muted); }
.checklist-label { flex: 1; }
.checklist-status { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.checklist-fail .checklist-status { color: var(--red); }
.checklist-pass .checklist-status { color: var(--green); }

/* ── Pricing ── */
.pricing-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 8px; }
.pricing-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 10px; width: 320px; max-width: 100%; }
.pricing-card-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pricing-name { font-weight: 700; font-size: 15px; }
.pricing-price { font-size: 24px; font-weight: 800; color: var(--accent); }
.pricing-period { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.pricing-blurb { color: var(--text-muted); font-size: 13px; }
.pricing-features { list-style: none; padding: 0; margin: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pricing-features li { font-size: 13px; padding-left: 22px; position: relative; }
.pricing-features li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.subscription-box {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 22px; margin: 20px auto 0; max-width: 560px; text-align: center;
}

/* ── Launch Check credit banner (scan page) ── */
.credit-banner {
  background: var(--green-light); border: 1px solid var(--green); color: var(--text-primary);
  border-radius: 12px; padding: 14px 18px; font-size: 13px; margin-bottom: 20px;
}

/* ── Recent scans (scan page) ── */
.recent-scan-list { display: flex; flex-direction: column; gap: 6px; }
.recent-scan-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; cursor: pointer; font: inherit; font-size: 13px;
  transition: background .15s ease, border-color .15s ease;
}
.recent-scan-row:hover { background: var(--surface); border-color: var(--accent); }
.recent-scan-target { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-scan-meta { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.recent-scan-score { font-weight: 800; white-space: nowrap; }
.recent-scan-score.score-good { color: var(--green); }
.recent-scan-score.score-warn { color: var(--amber); }
.recent-scan-score.score-bad { color: var(--red); }

/* ── Member dashboard (Unlimited Checks subscribers) ── */
.member-dashboard-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.plan-chip {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  background: var(--accent-light); border: 1px solid var(--accent); border-radius: 10px;
  padding: 10px 16px;
}
.plan-chip-name { font-weight: 700; font-size: 13px; color: var(--accent-dark); }
.plan-chip-note { font-size: 11px; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; text-align: center;
}
.stat-tile-icon {
  width: 34px; height: 34px; border-radius: 9px; margin: 0 auto 10px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.stat-tile-icon svg { width: 18px; height: 18px; }
.stat-tile.score-good .stat-tile-icon { background: var(--green-light); color: var(--green); }
.stat-tile.score-warn .stat-tile-icon { background: var(--amber-light); color: var(--amber); }
.stat-tile.score-bad .stat-tile-icon { background: var(--red-light); color: var(--red); }
.stat-tile-value { font-size: 24px; font-weight: 800; }
.stat-tile.score-good .stat-tile-value { color: var(--green); }
.stat-tile.score-warn .stat-tile-value { color: var(--amber); }
.stat-tile.score-bad .stat-tile-value { color: var(--red); }
.stat-tile-label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.stat-tile-delta { font-weight: 700; }

.dashboard-charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .dashboard-charts-grid { grid-template-columns: 1fr; } }
.chart-caption { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }

.trend-chart-wrap { margin-bottom: 28px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.trend-chart { width: 100%; height: auto; display: block; }
.trend-guide { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; }
.trend-line { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { stroke: var(--white); stroke-width: 2; }
.trend-dot.score-good { fill: var(--green); }
.trend-dot.score-warn { fill: var(--amber); }
.trend-dot.score-bad { fill: var(--red); }
.trend-point-label { font-size: 11px; font-weight: 700; fill: var(--text-primary); }
.dist-bar-count { font-size: 13px; font-weight: 800; fill: var(--text-primary); }
.dist-bar-label { font-size: 11px; font-weight: 600; fill: var(--text-muted); }

/* ── Account page ── */
.account-chip { cursor: pointer; font: inherit; }
.account-chip:hover { border-color: var(--accent); }
.account-identity { display: flex; align-items: center; gap: 12px; }
.account-identity-name { font-weight: 700; font-size: 14px; }
.account-identity-meta { color: var(--text-muted); font-size: 12px; }
.account-form { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.account-form input {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 13px;
}
.account-form input:focus { outline: none; border-color: var(--accent); }

/* ── Upgrade banner ── */
.upgrade-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent-light); border: 1px solid var(--accent); color: var(--accent-dark);
  border-radius: 10px; padding: 12px 16px; font-size: 13px; font-weight: 600; margin-bottom: 24px;
}

/* Before-and-after banner (score vs the previous scan of the same project) */
.delta-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  border-radius: 10px; padding: 12px 16px; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.delta-banner.delta-up { background: var(--green-light); border: 1px solid var(--green); color: #065F46; }
.delta-banner.delta-down { background: var(--red-light); border: 1px solid var(--red); color: #991B1B; }
.delta-banner.delta-flat { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.delta-scores { font-size: 17px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; }
.delta-arrow { font-weight: 400; }

/* Share panel (public link + README badge) */
.share-panel {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; margin-top: 28px;
}
.share-panel-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.share-panel-sub { color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.share-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.share-row:last-child { margin-bottom: 0; }
.share-row input {
  flex: 1; min-width: 220px; border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 12px; color: var(--text-muted); background: var(--surface);
}
.share-badge-preview { display: block; }

.section-title { font-size: 14px; font-weight: 700; margin: 28px 0 12px; }

.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px 28px; border-top: 1px solid var(--border); background: var(--white);
  color: var(--text-muted); font-size: 12px;
}
.footer-links a { color: var(--text-muted); font-weight: 600; }
.footer-links a:hover { color: var(--accent); }

/* ── "See it in action" screenshots ── */
.shots-intro { text-align: center; color: var(--text-muted); font-size: 14px; max-width: 560px; margin: 10px auto 0; }
.shots { display: flex; flex-direction: column; gap: 28px; max-width: 760px; margin: 24px auto 0; }
.shot-card { margin: 0; }
.shot-card img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.shot-card figcaption { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 10px; }

/* ── Sign-in screen ── */
.auth-box {
  max-width: 360px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 24px;
}
.auth-provider-btn { width: 100%; justify-content: center; text-align: center; }
.auth-divider {
  display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px;
  margin: 6px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-box input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
}
.auth-actions { display: flex; gap: 8px; }
.auth-actions .btn { flex: 1; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.github-connected-note { color: var(--green, #059669); font-weight: 600; font-size: 14px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--text-primary); color: var(--white); padding: 10px 18px; border-radius: 8px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Scan progress modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: none; align-items: center; justify-content: center; z-index: 200;
}
.modal-overlay.visible { display: flex; }
.modal-box {
  background: var(--white); border-radius: 14px; padding: 28px; width: 420px; max-width: calc(100vw - 40px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}
.modal-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.modal-box .modal-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; word-break: break-all; }
.modal-steps { display: flex; flex-direction: column; gap: 9px; max-height: 260px; overflow-y: auto; }
.modal-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.modal-step.done { color: var(--text-primary); }
.modal-step.active { color: var(--accent); font-weight: 600; }
.modal-step-icon {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 10px;
  border: 2px solid var(--border);
}
.modal-step.done .modal-step-icon { border-color: var(--green); background: var(--green); color: var(--white); }
.modal-step.active .modal-step-icon { border-color: var(--accent); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-error { margin-top: 14px; padding: 10px 12px; background: var(--red-light); color: var(--red); border-radius: 8px; font-size: 13px; }
