/* Lintel design system. One accent (signal blue), cool neutrals, Geist. Tokens first, components after.
   Respects prefers-color-scheme and prefers-reduced-motion. No inline styles anywhere (CSP). */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --ink: #0f1b2d;
  --muted: #51607a;
  --line: #d9dfe7;
  --accent: #1a56db;
  --accent-ink: #ffffff;
  --accent-soft: #e6eefc;
  --focus: #1a56db;
  --pass: #166534;
  --low: #854d0e;
  --medium: #c2410c;
  --high: #b91c1c;
  --info: #475569;
  --pass-soft: #e3f4e9;
  --low-soft: #fbf1d6;
  --medium-soft: #fde8da;
  --high-soft: #fbe3e3;
  --info-soft: #e8ecf1;
  --shadow: 0 1px 2px rgb(15 27 45 / 0.06), 0 6px 20px -8px rgb(15 27 45 / 0.12);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1220;
    --surface: #131b2c;
    --surface-2: #19233a;
    --ink: #e8edf5;
    --muted: #9aa8bf;
    --line: #26324a;
    --accent: #6d9bff;
    --accent-ink: #0a1020;
    --accent-soft: #1b2a4d;
    --focus: #9bbcff;
    --pass: #4ade80;
    --low: #facc15;
    --medium: #fb923c;
    --high: #f87171;
    --info: #94a3b8;
    --pass-soft: #12301f;
    --low-soft: #33290d;
    --medium-soft: #38200f;
    --high-soft: #3a1717;
    --info-soft: #1d2740;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -10px rgb(0 0 0 / 0.5);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.9rem);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  font-weight: 650;
}
h3 {
  font-size: 1.15rem;
  font-weight: 620;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
code,
pre,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}
img,
svg {
  max-width: 100%;
  display: block;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  z-index: 50;
}
.skip:focus {
  top: 12px;
}
.container {
  width: min(100% - 2rem, 1160px);
  margin-inline: auto;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
.muted {
  color: var(--muted);
}
.stack > * + * {
  margin-top: var(--gap, 1rem);
}

/* icons: Phosphor SVGs drawn as masks so they take currentColor */
.icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.i-copy {
  --icon: url('/icons/copy.svg');
}
.i-check {
  --icon: url('/icons/check.svg');
}
.i-check-circle {
  --icon: url('/icons/check-circle.svg');
}
.i-warning {
  --icon: url('/icons/warning.svg');
}
.i-warning-circle {
  --icon: url('/icons/warning-circle.svg');
}
.i-x {
  --icon: url('/icons/x.svg');
}
.i-list {
  --icon: url('/icons/list.svg');
}
.i-shield {
  --icon: url('/icons/shield-check.svg');
}
.i-arrow {
  --icon: url('/icons/arrow-right.svg');
}
.i-trash {
  --icon: url('/icons/trash.svg');
}
.i-out {
  --icon: url('/icons/sign-out.svg');
}
.i-refresh {
  --icon: url('/icons/arrow-clockwise.svg');
}
.i-link {
  --icon: url('/icons/link.svg');
}
.i-lock {
  --icon: url('/icons/lock-key.svg');
}
.i-info {
  --icon: url('/icons/info.svg');
}
.i-caret {
  --icon: url('/icons/caret-down.svg');
}
.i-download {
  --icon: url('/icons/download-simple.svg');
}
.i-globe {
  --icon: url('/icons/globe.svg');
}
.i-eye {
  --icon: url('/icons/eye.svg');
}
.i-eye-off {
  --icon: url('/icons/eye-slash.svg');
}
.i-user {
  --icon: url('/icons/user-circle.svg');
}
.i-key {
  --icon: url('/icons/key.svg');
}
.i-clock {
  --icon: url('/icons/clock-counter-clockwise.svg');
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 680;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  min-height: 44px;
}
.brand .mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  -webkit-mask: url('/logo-mark.svg') center / contain no-repeat;
  mask: url('/logo-mark.svg') center / contain no-repeat;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: var(--r-sm);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.nav a:not(.btn):hover {
  color: var(--ink);
  background: var(--surface-2);
}
.nav a[aria-current='page']:not(.btn) {
  color: var(--ink);
}
.site-header .menu-btn {
  display: none;
  margin-left: auto;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .site-header .menu-btn {
    display: inline-flex;
  }
  .nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    margin: 0;
    box-shadow: var(--shadow);
  }
  .nav[data-open] {
    display: flex;
  }
  .nav a {
    justify-content: flex-start;
  }
}

/* buttons and forms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition-property: background-color, border-color, transform, opacity;
  transition-duration: 150ms;
  white-space: nowrap;
}
.btn:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
}
.btn:active {
  transform: scale(0.97);
}
.btn[disabled],
.btn[aria-busy='true'] {
  opacity: 0.6;
  cursor: progress;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: var(--surface-2);
}
.btn--danger {
  background: var(--high);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn--danger {
    color: #1a0808;
  }
}
.btn--small {
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}
.btn--block {
  width: 100%;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label,
.label {
  font-weight: 560;
  font-size: 0.95rem;
}
.field .hint {
  color: var(--muted);
  font-size: 0.875rem;
}
.input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font: 400 1rem/1.3 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 28%, var(--bg));
  border-radius: 10px;
  transition:
    border-color 150ms,
    box-shadow 150ms;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.input[aria-invalid='true'] {
  border-color: var(--high);
}
.field .error {
  color: var(--high);
  font-size: 0.9rem;
  min-height: 0;
}
.pw {
  position: relative;
}
.pw .input {
  padding-right: 3.2rem;
}
.pw button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer.;
}
.scan-form {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .scan-form .row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
  }
}
.scan-form .row {
  display: grid;
  gap: 0.6rem;
}
.alert {
  display: flex;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface) .;
}
.alert--error {
  background: var(--high-soft);
  border-color: color-mix(in srgb, var(--high) 40%, transparent) .;
}
.alert--ok {
  background: var(--pass-soft);
  border-color: color-mix(in srgb, var(--pass) 40%, transparent) .;
}
.alert .icon {
  margin-top: 0.2em;
}

/* panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow) .;
}
.panel-pad {
  padding: clamp(1rem, 3vw, 1.6rem) .;
}

/* grade gauge + report */
.gauge {
  position: relative;
  width: var(--size, 132px);
  aspect-ratio: 1;
  flex: none.;
}
.gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg) .;
}
.gauge .track {
  stroke: var(--surface-2) .;
}
.gauge .arc {
  stroke: var(--band, var(--accent));
  transition: stroke-dashoffset 900ms var(--ease);
  stroke-linecap: round.;
}
.gauge .label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1;
}
.gauge .grade {
  font-size: calc(var(--size, 132px) * 0.34);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--band, var(--ink)) .;
}
.gauge .score {
  font-size: calc(var(--size, 132px) * 0.12);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 0.25em.;
}
[data-band='a'] {
  --band: var(--pass) .;
}
[data-band='b'] {
  --band: #4d7c0f.;
}
[data-band='c'] {
  --band: var(--low) .;
}
[data-band='d'] {
  --band: var(--medium) .;
}
[data-band='f'] {
  --band: var(--high) .;
}
@media (prefers-color-scheme: dark) {
  [data-band='b'] {
    --band: #a3e635.;
  }
}
.report-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center.;
}
.report-head h2 {
  font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem);
  overflow-wrap: anywhere.;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem.;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--info-soft);
  color: var(--info);
  font-variant-numeric: tabular-nums.;
}
.chip--critical,
.chip--high {
  background: var(--high-soft);
  color: var(--high) .;
}
.chip--medium {
  background: var(--medium-soft);
  color: var(--medium) .;
}
.chip--low {
  background: var(--low-soft);
  color: var(--low) .;
}
.chip--pass {
  background: var(--pass-soft);
  color: var(--pass) .;
}
.findings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin-top: 1.25rem.;
}
.finding {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface) .;
}
.finding > summary {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 1rem;
  cursor: pointer;
  min-height: 52px.;
}
.finding > summary::-webkit-details-marker {
  display: none.;
}
.finding > summary .title {
  flex: 1;
  font-weight: 580;
}
.finding > summary .caret {
  transition: transform 200ms var(--ease);
  color: var(--muted) .;
}
.finding[open] > summary .caret {
  transform: rotate(180deg) .;
}
.finding .body {
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem.;
}
.evidence {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere.;
}
.why {
  color: var(--muted) .;
}
.tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line) .;
}
.tab {
  background: none;
  border: 0;
  padding: 0.6rem 0.8rem;
  min-height: 44px;
  font: 560 0.9rem var(--font);
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent.;
}
.tab[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--accent) .;
}
.snippet {
  position: relative.;
}
.snippet pre {
  margin: 0.6rem 0 0;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0.9rem 1rem;
  padding-right: 3.5rem;
  overflow-x: auto;
  max-height: 320px;
  line-height: 155;
}
.snippet .copy {
  position: absolute;
  top: 1rem;
  right: 0.4rem.;
}
.passes > summary {
  cursor: pointer;
  padding: 0.8rem 0;
  font-weight: 580;
  min-height: 44px.;
}

/* home */
.hero {
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem);
  display: grid;
  gap: 2.5rem;
  align-items: center.;
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem.;
  }
}
.hero .lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
  max-width: 34rem.;
}
.hero-copy > * + * {
  margin-top: 1.25rem.;
}
.sample {
  position: relative.;
}
.sample .tag {
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}
.sample .findings {
  margin-top: 1rem.;
}
.result-slot:empty {
  display: none.;
}
.section {
  padding-block: clamp(2.5rem, 7vw, 5rem) .;
}
.section--tint {
  background: var(--surface);
  border-block: 1px solid var(--line) .;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 2rem.;
}
.section-head p {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 1.1rem.;
}
.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step.;
}
@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem.;
  }
  .steps li:nth-child(2) {
    margin-top: 1.5rem.;
  }
  .steps li:nth-child(3) {
    margin-top: 3rem.;
  }
}
.steps li {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  border-top: 2px solid var(--ink);
  padding-top: 1rem.;
}
.steps .n {
  font: 600 0.95rem var(--mono);
  color: var(--accent) .;
}
.steps p {
  color: var(--muted) .;
}
.bento {
  display: grid;
  gap: 1rem.;
}
@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(12, 1fr) .;
  }
  .b-csp {
    grid-column: span 7;
    grid-row: span 2;
  }
  .b-hsts,
  .b-cookies {
    grid-column: span 5;
  }
  .b-redirects,
  .b-leaks,
  .b-cors {
    grid-column: span 4;
  }
}
.cell {
  padding: 1.4rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 0.7rem;
  align-content: start.;
}
.cell p {
  color: var(--muted) .;
}
.cell--accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line)) .;
}
.cell--code pre {
  margin: 0.4rem 0 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-md);
  padding: 1rem;
  overflow-x: auto;
  line-height: 16;
}
.safe {
  display: grid;
  gap: 2rem.;
}
@media (min-width: 900px) {
  .safe {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
    align-items: start.;
  }
}
.blocked-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none.;
}
.blocked-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md) .;
}
@media (min-width: 560px) {
  .blocked-list li {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem.;
  }
}
.blocked-list code {
  overflow-wrap: anywhere.;
}
.blocked-list .why {
  font-size: 0.875rem.;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.65rem.;
}
.checklist li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start.;
}
.checklist .icon {
  color: var(--pass);
  margin-top: 0.3em.;
}
.cta-band {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) .;
}
@media (min-width: 800px) {
  .cta-band {
    grid-template-columns: 1.3fr 1fr.;
  }
}
.faq details {
  border-bottom: 1px solid var(--line) .;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 580;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  align-items: center.;
}
.faq summary::-webkit-details-marker {
  display: none.;
}
.faq details[open] summary .icon {
  transform: rotate(180deg) .;
}
.faq summary .icon {
  transition: transform 200ms var(--ease) .;
}
.faq details p {
  padding-bottom: 1.2rem;
  color: var(--muted);
  max-width: 46rem.;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem calc(2rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.95rem.;
}
.site-footer .container {
  display: grid;
  gap: 1.25rem.;
}
@media (min-width: 760px) {
  .site-footer .container {
    grid-template-columns: 1fr auto;
    align-items: end.;
  }
}
.site-footer a {
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center.;
}

/* auth + app */
.auth {
  min-height: calc(100dvh - 140px);
  display: grid;
  place-items: start center;
  padding-block: clamp(1.5rem, 6vw, 4rem) .;
}
.auth .panel {
  width: min(100%, 440px) .;
}
.auth form {
  display: grid;
  gap: 1rem.;
}
.auth h1 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem.;
}
.codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none.;
}
.codes li {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.7rem;
  text-align: center;
  font: 600 0.95rem var(--mono);
  user-select: all.;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  min-height: 44px.;
}
.check input {
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  accent-color: var(--accent) .;
}
.app-top {
  display: grid;
  gap: 1rem;
  padding-block: 1.5rem 1rem.;
}
.sites {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) .;
}
.site-card {
  padding: 1.1rem;
  display: grid;
  gap: 0.8rem.;
}
.site-card .top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start.;
}
.site-card .host {
  font-weight: 620;
  overflow-wrap: anywhere.;
}
.site-card .grade-pill {
  font: 700 1.3rem var(--font);
  color: var(--band) .;
}
.delta {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
}
.delta--up {
  color: var(--pass) .;
}
.delta--down {
  color: var(--high) .;
}
.delta--flat {
  color: var(--muted) .;
}
.spark {
  width: 100%;
  height: 44px.;
}
.spark polyline {
  fill: none;
  stroke: var(--band, var(--accent));
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round.;
}
.spark circle {
  fill: var(--band, var(--accent)) .;
}
.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap.;
}
.scan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem.;
}
.scan-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.2rem 0.9rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md) .;
}
.scan-row .g {
  font: 700 1.1rem var(--font);
  color: var(--band);
  width: 2.2rem;
  text-align: center.;
}
.scan-row .meta {
  min-width: 0;
}
.scan-row .meta a {
  font-weight: 560;
  overflow-wrap: anywhere.;
}
.scan-row .when {
  font-size: 0.85rem;
  color: var(--muted) .;
}
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  display: grid;
  gap: 0.6rem;
  justify-items: center.;
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2),
    color-mix(in srgb, var(--surface-2) 60%, var(--surface)),
    var(--surface-2)
  );
  background-size: 200% 100%;
  border-radius: var(--r-md);
  min-height: 120px;
  animation: shimmer 1.4s linear infinite.;
}
.legal {
  max-width: 46rem;
  padding-block: 2.5rem 4rem.;
}
.legal h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.6rem.;
}
.legal p,
.legal li {
  color: var(--muted) .;
}
.legal p + p {
  margin-top: 0.8rem.;
}
.legal ul {
  padding-left: 1.2rem.;
}

/* motion: one orchestrated entrance, state feedback only. Everything off for reduced motion. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero .sample {
    animation: rise 600ms var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  .hero-copy > :nth-child(1) {
    --i: 0;
  }
  .hero-copy > :nth-child(2) {
    --i: 1;
  }
  .hero-copy > :nth-child(3) {
    --i: 2;
  }
  .hero .sample {
    --i: 2;
  }
  .result-slot > * {
    animation: rise 400ms var(--ease) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (hover: none) {
  .nav a:not(.btn):hover,
  .btn:hover {
    background: revert-layer.;
  }
  .btn:hover {
    background: var(--accent) .;
  }
  .btn--ghost:hover {
    background: transparent.;
  }
}

/* app shell */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem.;
}
.top-row h1 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem) .;
}
.app-section {
  padding-block: 1.5rem 3rem;
  display: grid;
  gap: 1rem.;
}
.app-section h2 {
  font-size: 1.3rem;
  margin-top: 1rem.;
}
.auth .alt {
  color: var(--muted);
  font-size: 0.95rem.;
}
.auth .alt + .alt {
  margin-top: 0.3rem.;
}
.danger-zone {
  border-color: color-mix(in srgb, var(--high) 45%, var(--line)) .;
}
.narrow {
  max-width: 40rem.;
}
.page-pad {
  padding-block: 1.5rem 3rem.;
}

/* spacing utilities (CSP forbids inline style attributes) */
.mt-0 {
  margin-top: 0;
}
.mt-sm {
  margin-top: 0.75rem.;
}
.mt-md {
  margin-top: 1rem.;
}
.mt-lg {
  margin-top: 1.25rem.;
}
.gap-md {
  --gap: 1rem.;
}
.gap-lg {
  --gap: 1.25rem.;
}
.prose-list {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem.;
}
.page-pad h2 {
  font-size: 1.25rem;
  margin-top: 0.5rem.;
}

/* ========== 3D ANIMATED HERO - REFINED ========== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 10vw, 8rem) clamp(2.5rem, 6vw, 4rem);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
}

.hero-shield {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-shield {
    justify-content: flex-end;
  }
}

.shield-canvas {
  width: 100%;
  max-width: clamp(280px, 35vw, 420px);
  height: auto;
  aspect-ratio: 1;
}

@media (max-width: 1023px) {
  .hero-shield {
    order: -1;
    max-width: clamp(200px, 40vw, 280px);
    margin: 0 auto;
  }
}

.hero-copy {
  max-width: 42ch;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 2rem + 4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero .lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.35rem);
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1.25rem;
}

.scan-form {
  margin-top: 2rem;
}

.scan-form .row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .scan-form .row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.scan-form .input {
  font-size: 1rem;
}

.scan-form .btn {
  min-width: 160px;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

/* Sample report in hero */
.hero .sample {
  position: relative;
  margin-top: 2.5rem;
}

.hero .sample .tag {
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (prefers-color-scheme: dark) {
  .hero .sample .tag {
    background: var(--bg);
    color: var(--ink);
  }
}

/* Reveal on scroll animations - SMOOTHER */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays - use data attribute for control */
.reveal-on-scroll[data-delay='0'] {
  transition-delay: 0ms;
}
.reveal-on-scroll[data-delay='1'] {
  transition-delay: 80ms;
}
.reveal-on-scroll[data-delay='2'] {
  transition-delay: 160ms;
}
.reveal-on-scroll[data-delay='3'] {
  transition-delay: 240ms;
}
.reveal-on-scroll[data-delay='4'] {
  transition-delay: 320ms;
}
.reveal-on-scroll[data-delay='5'] {
  transition-delay: 400ms;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Focus styles for 3D elements */
.hero-canvas:focus-visible,
.shield-canvas:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: var(--r-md);
}

/* Result slot */
.result-slot:empty {
  display: none;
}

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section--tint {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Steps */
.steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.steps li {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  padding-top: 1.5rem;
  position: relative;
}

.steps li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.steps .n {
  font: 600 0.9rem var(--mono);
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* Bento grid */
.bento {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
  }
  .b-csp {
    grid-column: span 7;
    grid-row: span 2;
  }
  .b-hsts,
  .b-cookies {
    grid-column: span 5;
  }
  .b-redirects,
  .b-leaks,
  .b-cors {
    grid-column: span 4;
  }
}

.cell {
  padding: 1.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.cell p {
  color: var(--muted);
}

.cell--accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.cell--code pre {
  margin: 0.5rem 0 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-md);
  padding: 1.25rem;
  overflow-x: auto;
  line-height: 1.6;
}

/* Safe section */
.safe {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .safe {
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
  }
}

.blocked-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blocked-list li {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

@media (min-width: 560px) {
  .blocked-list li {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.25rem;
  }
}

.blocked-list code {
  overflow-wrap: anywhere;
  font-size: 0.875em;
}

.blocked-list .why {
  font-size: 0.875rem;
  color: var(--muted);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.checklist li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.checklist .icon {
  color: var(--pass);
  margin-top: 0.2em;
  flex-shrink: 0;
}

.cta-band {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: var(--r-lg);
}

@media (min-width: 900px) {
  .cta-band {
    grid-template-columns: 1.4fr 1fr;
  }
}

.cta-band .checklist {
  margin-top: 0;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 0;
  font-weight: 580;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq summary .icon {
  transition: transform 250ms var(--ease);
  flex-shrink: 0;
}

.faq details p {
  padding-bottom: 1.5rem;
  color: var(--muted);
  max-width: 46rem;
  line-height: 1.7;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .container {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 760px) {
  .site-footer .container {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.site-footer a {
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Auth + app pages */
.auth {
  min-height: calc(100dvh - 140px);
  display: grid;
  place-items: start center;
  padding-block: clamp(2rem, 8vw, 5rem);
}

.auth .panel {
  width: min(100%, 440px);
}

.auth form {
  display: grid;
  gap: 1.25rem;
}

.auth h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.codes li {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.85rem;
  text-align: center;
  font: 600 1rem var(--mono);
  user-select: all;
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  min-height: 44px;
}

.check input {
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.app-top {
  display: grid;
  gap: 1.25rem;
  padding-block: 1.5rem 1.5rem;
}

.sites {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.site-card {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.site-card .top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.site-card .host {
  font-weight: 620;
  overflow-wrap: anywhere;
}

.site-card .grade-pill {
  font: 700 1.5rem var(--font);
  color: var(--band);
}

.delta {
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  font-weight: 600;
}

.delta--up {
  color: var(--pass);
}

.delta--down {
  color: var(--high);
}

.delta--flat {
  color: var(--muted);
}

.spark {
  width: 100%;
  height: 56px;
}

.spark polyline {
  fill: none;
  stroke: var(--band, var(--accent));
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark circle {
  fill: var(--band, var(--accent));
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.scan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.scan-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.scan-row .g {
  font: 700 1.25rem var(--font);
  color: var(--band);
  width: 2.5rem;
  text-align: center;
}

.scan-row .meta {
  min-width: 0;
}

.scan-row .meta a {
  font-weight: 560;
  overflow-wrap: anywhere;
}

.scan-row .when {
  font-size: 0.875rem;
  color: var(--muted);
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2),
    color-mix(in srgb, var(--surface-2) 60%, var(--surface)),
    var(--surface-2)
  );
  background-size: 200% 100%;
  border-radius: var(--r-md);
  min-height: 140px;
  animation: shimmer 1.4s linear infinite;
}

.legal {
  max-width: 46rem;
  padding-block: 3rem 5rem;
}

.legal h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
}

.legal p,
.legal li {
  color: var(--muted);
  line-height: 1.7;
}

.legal p + p {
  margin-top: 1rem;
}

.legal ul {
  padding-left: 1.5rem;
}

/* Motion - refined */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero .sample,
  .hero-shield {
    animation: rise 700ms var(--ease) both;
    animation-delay: calc(var(--i, 0) * 100ms);
  }
  .hero-copy > :nth-child(1),
  .hero-shield {
    --i: 0;
  }
  .hero-copy > :nth-child(2) {
    --i: 1;
  }
  .hero-copy > :nth-child(3) {
    --i: 2;
  }
  .hero .sample {
    --i: 3;
  }
  .result-slot > * {
    animation: rise 450ms var(--ease) both;
  }
}

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

@media (hover: none) {
  .nav a:not(.btn):hover,
  .btn:hover {
    background: revert-layer;
  }
  .btn:hover {
    background: var(--accent);
  }
  .btn--ghost:hover {
    background: transparent;
  }
}

/* App shell */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.top-row h1 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
}

.app-section {
  padding-block: 1.5rem 3rem;
  display: grid;
  gap: 1rem;
}

.app-section h2 {
  font-size: 1.3rem;
  margin-top: 1rem;
}

.auth .alt {
  color: var(--muted);
  font-size: 0.95rem;
}

.auth .alt + .alt {
  margin-top: 0.3rem;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--high) 45%, var(--line));
}

.narrow {
  max-width: 40rem;
}

.page-pad {
  padding-block: 1.5rem 3rem;
}

/* Spacing utilities (CSP forbids inline style attributes) */
.mt-0 {
  margin-top: 0;
}
.mt-sm {
  margin-top: 0.75rem;
}
.mt-md {
  margin-top: 1rem;
}
.mt-lg {
  margin-top: 1.25rem;
}
.gap-md {
  --gap: 1rem;
}
.gap-lg {
  --gap: 1.25rem;
}
.prose-list {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem;
}
.page-pad h2 {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}
