:root {
  --ink: #080b10;
  --panel: #0f141c;
  --panel-2: #141b25;
  --line: #223040;
  --line-soft: #1a2634;
  --text: #e8eef5;
  --body: #c2ced9;
  --muted: #9aa8b8;
  --fine: #8796a6;
  --accent: #5eead4;
  --accent-ink: #04211d;
  --accent-dim: #1f6f63;
  --high: #ff7b7b;
  --med: #f5c451;
  --low: #8fb4ff;
  --ok: #6ee7a8;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 420px at 82% -10%, rgba(94, 234, 212, 0.09), transparent 70%),
    radial-gradient(700px 320px at 4% 0%, rgba(143, 180, 255, 0.06), transparent 65%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { max-width: 50rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.55rem 0.9rem; border-radius: 0 0 8px 8px;
  font-weight: 650; text-decoration: none; z-index: 30;
}
.skip:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: #d3efe9;
  background: #0a1017;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.05em 0.28em;
  overflow-wrap: anywhere;
}

/* header */
.site { border-bottom: 1px solid var(--line-soft); }
.site-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.95rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); text-decoration: none;
  font-weight: 680; font-size: 1.02rem; letter-spacing: -0.01em;
}
.brand svg {
  width: 26px; height: 26px; fill: none; stroke: var(--accent);
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.2rem; font-size: 0.9rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* hero */
.hero { padding: clamp(2.75rem, 7vw, 5.5rem) 0 2.5rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 1rem;
}
h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  margin: 0 0 1.2rem; max-width: 20ch;
}
h1 span { color: #93a2b3; }
.lede { max-width: 46rem; font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--body); margin: 0 0 2rem; }

/* scan form */
.scanbar {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.45rem 0.45rem 0.45rem 0.95rem;
  max-width: 46rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.scanbar:focus-within { border-color: var(--accent-dim); }
.prefix { font-family: var(--mono); font-size: 0.9rem; color: #71808f; white-space: nowrap; }
#repo-input {
  flex: 1; min-width: 0; background: transparent; border: 0;
  color: var(--text); font-family: var(--mono); font-size: 0.95rem;
  padding: 0.55rem 0.45rem; outline: none; border-radius: 6px;
}
#repo-input::placeholder { color: #7c8b9b; opacity: 1; }
#scan-btn {
  border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-weight: 700; font-size: 0.92rem;
  padding: 0.7rem 1.15rem; cursor: pointer; white-space: nowrap;
}
#scan-btn:hover { background: #7df2df; }
#scan-btn:disabled { opacity: 0.6; cursor: progress; }
.hint { color: var(--muted); font-size: 0.86rem; margin: 0.85rem 0 0; }
.hint code { background: none; border: 0; padding: 0; color: #c4d2df; }

.progress {
  margin-top: 1.4rem; font-family: var(--mono); font-size: 0.84rem;
  color: var(--muted); display: flex; align-items: center; gap: 0.6rem;
}
.progress::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.notice {
  margin-top: 1.4rem; padding: 0.9rem 1.05rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text);
  max-width: 46rem; font-size: 0.94rem;
}
.notice.error { border-color: #6b2b2b; background: #1b0f10; }
.notice strong { display: block; margin-bottom: 0.2rem; }
.notice p { margin: 0.35rem 0 0; color: var(--body); }

/* result */
.result { padding: 0.5rem 0 3rem; }

.scorecard {
  display: grid; grid-template-columns: 210px 1fr; gap: 2.2rem; align-items: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 18px; padding: 2rem;
}
.gauge { position: relative; width: 190px; height: 190px; justify-self: center; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 9; }
.gauge .track { stroke: #1b2430; }
.gauge .fill {
  stroke: var(--accent); stroke-linecap: round;
  stroke-dasharray: 326.73; stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.3s;
}
.gauge[data-band="medium"] .fill { stroke: var(--med); }
.gauge[data-band="high"] .fill { stroke: var(--high); }
.score {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.1rem;
}
#score-value { font-size: 3.2rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.score small { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; align-self: flex-end; margin-bottom: 0.75rem; }

.repo-line { margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem; }
.repo-line a { color: var(--text); font-family: var(--mono); font-size: 0.9rem; text-decoration-color: var(--line); text-underline-offset: 3px; overflow-wrap: anywhere; }
.repo-line a:hover { color: var(--accent); }
.repo-note { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fine); }

.grade-line { margin: 0 0 0.55rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.55rem; }
.grade-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
#grade-value { font-size: clamp(1.3rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; color: var(--text); }
.summary { color: var(--body); margin: 0 0 1rem; max-width: 44rem; }

.tally {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem;
  list-style: none; padding: 0; margin: 0 0 0.7rem;
  font-family: var(--mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tally li { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.tally b { color: var(--text); font-weight: 650; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.high { background: var(--high); }
.dot.medium { background: var(--med); }
.dot.low { background: var(--low); }
.dot.ok { background: var(--ok); }

.coverage { color: var(--fine); font-family: var(--mono); font-size: 0.78rem; margin: 0; }
.score-note { color: var(--fine); font-size: 0.8rem; margin: 0.9rem 0 0; }

/* share */
.share { border-top: 1px solid var(--line-soft); margin-top: 1.6rem; padding-top: 1.4rem; }
.share label {
  display: block; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.5rem;
}
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 44rem; }
#share-link {
  flex: 1 1 16rem; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); color: var(--body);
  border-radius: 8px; padding: 0.6rem 0.7rem;
  font-family: var(--mono); font-size: 0.8rem;
}
#copy-btn {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.6rem 1rem; cursor: pointer; font: inherit; font-size: 0.9rem;
}
#copy-btn:hover { border-color: var(--accent-dim); }
.copy-status { min-height: 1.2em; margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* findings */
.findings-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.4rem 1.5rem;
  margin: 2.4rem 0 0.9rem;
}
.findings-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 0; }
.findings-head p { margin: 0; color: var(--fine); font-size: 0.82rem; max-width: 34rem; }

.findings { display: grid; gap: 0.8rem; }
.finding {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--line); border-radius: 12px;
  padding: 1.15rem 1.25rem 1.2rem;
}
.finding.high { border-left-color: var(--high); }
.finding.medium { border-left-color: var(--med); }
.finding.low { border-left-color: var(--low); }

.finding-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem; margin-bottom: 0.8rem; }
.finding-head h3 { margin: 0; font-size: 1.03rem; letter-spacing: -0.01em; flex: 1 1 14rem; overflow-wrap: anywhere; }
.sev {
  display: inline-flex; align-items: center; gap: 0.38rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 0.16rem 0.5rem;
  border-radius: 999px; border: 1px solid var(--line); color: var(--body);
  flex: none;
}
.sev.high { border-color: #7a3333; color: var(--high); }
.sev.medium { border-color: #6e5622; color: var(--med); }
.sev.low { border-color: #2f466f; color: var(--low); }

.finding dl { margin: 0; display: grid; gap: 0.65rem; }
.finding .row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.2rem 1rem; }
.finding dt {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); padding-top: 0.22rem;
}
.finding dd { margin: 0; color: var(--body); font-size: 0.93rem; }
.finding .evidence-list {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: 0.35rem; margin: 0; padding: 0;
}
.finding .evidence-list a {
  display: inline-block; max-width: 100%; overflow-wrap: anywhere;
  font-family: var(--mono); font-size: 0.77rem; color: #d6e2ec;
  background: #0a1017; border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 0.14rem 0.45rem; text-decoration: none;
}
.finding .evidence-list a:hover { border-color: var(--accent-dim); color: var(--accent); }
.finding .evidence-empty { color: var(--fine); font-size: 0.9rem; }
.finding .points { color: var(--fine); font-family: var(--mono); font-size: 0.7rem; }

.clean {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 1.4rem; color: var(--body); background: var(--panel);
}
.clean strong { display: block; margin-bottom: 0.25rem; color: var(--text); }
.clean p { margin: 0; font-size: 0.93rem; }

.sample-note { color: var(--fine); font-size: 0.82rem; margin: 1rem 0 0; max-width: 46rem; }

.result-cta {
  margin-top: 2.2rem; padding: 1.2rem 1.4rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(160deg, #101821, #0b1017);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.9rem 1.5rem;
}
.result-cta p { margin: 0; color: var(--body); font-size: 0.94rem; max-width: 36rem; }

/* static blocks */
.block { padding: 3.2rem 0; border-top: 1px solid var(--line-soft); }
.block h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.7rem; }
.section-lede { color: var(--body); max-width: 48rem; margin: 0 0 1.9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.15rem 1.2rem; }
.grid h3 { margin: 0 0 0.4rem; font-size: 0.98rem; }
.grid p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.method-note { color: var(--fine); font-size: 0.84rem; margin: 1.4rem 0 0; max-width: 46rem; }
.narrow p, .narrow li { color: var(--body); }
.limits-list { margin: 0 0 1.6rem; padding-left: 1.15rem; display: grid; gap: 0.55rem; }
.limits-list li { padding-left: 0.2rem; }
.muted { color: var(--fine); font-size: 0.86rem; }

/* offers */
.offers { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.2rem; align-items: start; }
.offer {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px;
  padding: 1.6rem; background: var(--panel);
}
.offer.primary { border-color: #2a6159; background: linear-gradient(165deg, #112029, #0c131b); }
.offer-top { margin-bottom: 1.1rem; }
.offer h3 { margin: 0.55rem 0 0.5rem; font-size: 1.25rem; }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 0.2rem 0.6rem; font-weight: 700;
}
.badge.quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.price { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.price small { font-size: 0.8rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.offer ul { margin: 0 0 1.4rem; padding-left: 1.1rem; display: grid; gap: 0.4rem; color: var(--body); font-size: 0.9rem; }
.btn {
  display: inline-block; align-self: flex-start;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 700; font-size: 0.92rem;
  padding: 0.7rem 1.15rem; border-radius: 8px;
}
.btn:hover { background: #7df2df; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent-dim); background: var(--panel-2); }
.fine { font-size: 0.78rem; color: var(--fine); margin: 0.7rem 0 0; }

/* footer */
footer.site { border-top: 1px solid var(--line-soft); padding: 1.8rem 0 2.4rem; font-size: 0.85rem; color: var(--muted); }
footer .site-inner { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
footer p { margin: 0; }
footer a { color: var(--body); }

@media (max-width: 820px) {
  .scorecard { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 1.6rem; gap: 1.4rem; }
  .verdict { text-align: center; }
  .repo-line, .grade-line, .tally { justify-content: center; }
  .offers { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  nav { display: none; }
  .scanbar { flex-wrap: wrap; padding: 0.5rem; }
  .prefix { display: none; }
  #repo-input { flex-basis: 100%; padding: 0.7rem 0.6rem; }
  #scan-btn { width: 100%; }
  .finding .row { grid-template-columns: 1fr; }
  .finding dt { padding-top: 0.35rem; }
  .result-cta { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .progress::before { opacity: 1; }
}

/* print: the result is often forwarded as a PDF */
@media print {
  :root {
    --ink: #ffffff;
    --panel: #ffffff;
    --panel-2: #ffffff;
    --line: #b9b9b9;
    --line-soft: #cccccc;
    --text: #111111;
    --body: #222222;
    --muted: #333333;
    --fine: #444444;
    --accent: #0b5f55;
    --accent-ink: #ffffff;
  }
  body { background: #ffffff; color: #111111; font-size: 11pt; }
  .skip, header.site, #how, #report, .share, .result-cta, .hero .scanbar,
  .hero .hint, .hero .eyebrow, .progress, .notice, footer .muted { display: none !important; }
  .hero { padding: 0 0 0.5rem; }
  .hero h1 { font-size: 20pt; color: #111111; }
  .hero h1 span, .lede { color: #222222; }
  .hero .lede { font-size: 10pt; margin-bottom: 0.5rem; }
  .result { padding: 0; }
  .scorecard, .finding, .clean {
    background: #ffffff !important;
    border: 1px solid #999999;
    break-inside: avoid;
  }
  .scorecard { grid-template-columns: 120px 1fr; padding: 0.8rem; gap: 1rem; }
  .gauge { width: 104px; height: 104px; }
  .gauge .track { stroke: #dddddd; }
  #score-value { color: #111111; font-size: 1.8rem; }
  .score small, .grade-label, .coverage, .score-note, .repo-note,
  .sample-note, .findings-head p, .finding dt, .finding dd { color: #222222; }
  .finding { border-left-width: 4px; }
  .finding .evidence-list a {
    background: #ffffff; border: 0; padding: 0; color: #111111;
    text-decoration: underline;
  }
  .findings-head { margin-top: 1rem; }
  .block { border-top: 1px solid #cccccc; padding: 0.8rem 0; }
  a { color: #111111; }
  .evidence-list a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #444444; word-break: break-all; }
  .report, .offers, .btn { display: none !important; }
}

