/* Pixel Check, shared styles (DESIGN.md, revision 2: "instrument, not brochure").
   Navy ink, solid surfaces, hairline rules, 6px corners. Blue only means "you can click this".
   Red / amber / green only mean fix now / worth a look / working. No glass, glow or gradient text. */
@font-face { font-family: "Plex"; src: url("/assets/fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/assets/fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/assets/fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/assets/fonts/plex-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0a0f1e;
  --bg-2: #0d1326;
  --surface: #111934;
  --surface-2: #0d1429;
  --rule: rgba(160, 180, 230, 0.14);
  --rule-strong: rgba(160, 180, 230, 0.26);
  --ink: #e8ecf6;
  --ink-2: #aab3cb;
  --ink-3: #7f8aa6;
  --accent: #5b8cff;
  --accent-hover: #7aa2ff;
  --accent-ink: #061235;
  --good: #3ddc97;
  --warn: #f5b14c;
  --bad: #ff6b6b;
  --info: #aab3cb;
  --good-bg: rgba(61, 220, 151, 0.1);
  --warn-bg: rgba(245, 177, 76, 0.1);
  --bad-bg: rgba(255, 107, 107, 0.11);
  --info-bg: rgba(170, 179, 203, 0.08);
  --r: 6px;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --t-label: 12px;
  --t-small: 15px;
  --t-body: 17px;
  --t-h2: clamp(30px, 3.4vw, 42px);
  --t-display: clamp(52px, 8.2vw, 112px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--t-body)/1.6 "Plex", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-hover); text-decoration: underline; text-decoration-color: rgba(122, 162, 255, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 48px); margin-inline: auto; }
@media (max-width: 520px) { .wrap, .narrow { width: calc(100% - 32px); } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: var(--r); z-index: 100; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); font-size: 0.9em; }

/* Labels: the small mono voice used for every caption, kicker and table head */
.label, .eyebrow { font-family: var(--mono); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.eyebrow { margin-bottom: 20px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--rule); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 22px; height: 22px; color: var(--ink); }
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; font-size: var(--t-small); }
.nav-links a { position: relative; z-index: 1; color: var(--ink-2); padding: 6px 12px; text-decoration: none; transition: color 160ms var(--ease); }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.pill { position: absolute; z-index: 0; inset: 0; border-radius: 4px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule-strong) inset; pointer-events: none; clip-path: inset(0 100% 0 0); opacity: 0; }
.nav .nav-cta { min-height: 38px; padding: 7px 14px; font-size: 14px; }
/* Phones and small tablets: the text links fold into a Menu (a plain <details>, no animation).
   Secondary pages keep "Scan my site" beside it until 440px, where it moves into the menu. */
.menu { display: none; position: static; }
.menu-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--r); font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.menu-btn::-webkit-details-marker { display: none; }
.menu[open] .menu-btn { background: var(--surface); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px 24px 20px; display: grid; max-height: calc(100vh - 60px); overflow-y: auto; }
@media (max-width: 520px) { .menu-panel { padding-inline: 16px; } }
.menu-panel a { color: var(--ink); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-body); }
.menu-panel a.btn { margin-top: 16px; border-bottom: 1px solid var(--accent); color: var(--accent-ink); }
@media (max-width: 860px) {
  .nav .nav-links, .nav .nav-cta.hide-sm { display: none; }
  .menu { display: block; }
  .nav .wrap > .nav-cta { margin-left: auto; }
}
@media (max-width: 440px) { .nav .nav-cta { display: none; } }

/* Type */
h1, .display { font-size: var(--t-display); line-height: 0.95; letter-spacing: -0.045em; font-weight: 700; margin: 0; }
h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 16px; }
h3 { font-size: var(--t-body); line-height: 1.4; font-weight: 600; margin: 0 0 6px; }
.lede { font-size: var(--t-body); line-height: 1.65; color: var(--ink-2); margin: 20px 0 0; max-width: 56ch; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); }

/* Buttons: blue fill = the one action; outline = everything else */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--accent); border-radius: var(--r); cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 12px 20px; min-height: 48px; white-space: nowrap; text-decoration: none;
  transition: background-color 140ms var(--ease), transform 120ms var(--ease);
  touch-action: manipulation;
}
.btn::after { content: "→"; font-weight: 500; transition: transform 160ms var(--ease); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:hover::after { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn[disabled]::after { content: none; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.secondary:hover { border-color: var(--ink-2); background: var(--surface); }
.btn.plain::after { content: none; }

/* Scan form */
.scan { margin: 32px 0 0; max-width: 540px; }
.scan-box { display: flex; align-items: stretch; background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 5px; transition: border-color 160ms var(--ease); }
.scan-box:focus-within { border-color: var(--accent); }
.scan-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 17px var(--mono); padding: 10px 12px; }
.scan-box input::placeholder { color: var(--ink-3); }
.scan-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); }
.scan-error { margin-top: 10px; color: var(--bad); font-size: var(--t-small); }
.scan-error:empty { display: none; }
@media (max-width: 520px) { .scan-box { flex-direction: column; } .scan-box .btn { width: 100%; } }

/* Scan progress */
.progress { margin: 22px 0 0; max-width: 540px; display: none; }
.progress.on { display: block; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-family: var(--mono); font-size: 14px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.steps li.done { color: var(--ink); }
.steps li .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; position: relative; }
.steps li.active .dot { border-color: var(--accent-hover); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.steps li.done .dot { background: var(--good); border-color: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections and surfaces */
section { padding: clamp(72px, 9vw, 112px) 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }
.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.band { background: var(--bg-2); }
.card, .panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; }
.card p { margin: 0; color: var(--ink-2); }
.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid > .card { border: 0; border-radius: 0; }
.icon { display: none; }

/* Report (report.js contract) */
.report { margin-top: 28px; text-align: left; scroll-margin-top: 76px; }
.report-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.ring { --p: 0; --c: var(--good); width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--rule) 0); }
.ring span { width: 80px; height: 80px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 600 28px var(--mono); }
.report-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.25; }
.report-sub { color: var(--ink-2); margin: 4px 0 0; font-size: var(--t-small); }
.findings { display: grid; margin-top: 24px; border-top: 1px solid var(--rule); }
.finding { padding: 16px 0; border-bottom: 1px solid var(--rule); opacity: 0; animation: rise 360ms var(--ease) forwards; }
.finding h4 { margin: 0; font-size: 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.finding p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--t-small); max-width: 70ch; }
.finding .tid { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; color: var(--ink); }
.finding .fix { color: var(--ink); }
.finding .fix b { font-weight: 600; }
.chip { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; white-space: nowrap; border: 1px solid currentColor; }
.chip.high { color: var(--bad); background: var(--bad-bg); }
.chip.medium, .chip.low { color: var(--warn); background: var(--warn-bg); }
.chip.info { color: var(--ink-3); background: transparent; }
.chip.good { color: var(--good); background: var(--good-bg); }
@keyframes rise { to { opacity: 1; } }
.finding.locked h4 { color: var(--ink-2); }
.finding.locked { background: repeating-linear-gradient(135deg, rgba(160, 180, 230, 0.05) 0 1px, transparent 1px 7px); padding-inline: 12px; }
.finding .lock { margin-left: auto; font: 500 11.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.inventory { margin-top: 24px; }
.inventory h3 { font-family: var(--mono); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: 13px; padding: 4px 9px; border-radius: 3px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--rule); }
.tag em { font-style: normal; color: var(--ink-3); }
.cta-box { margin-top: 24px; padding: 22px; border-radius: var(--r); border: 1px solid var(--accent); background: rgba(91, 140, 255, 0.07); display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-box p { margin: 4px 0 0; color: var(--ink-2); font-size: var(--t-small); }
.report-actions { margin-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; align-items: center; color: var(--ink-3); }
.copy-link { background: none; border: 0; color: var(--accent-hover); font: inherit; min-height: 32px; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Alert email + manage page */
.mail { max-width: 560px; }
.mail .meta { font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin-bottom: 14px; }
.mail .subject { font-weight: 600; color: var(--ink); font-size: 16px; margin-top: 4px; }
.mail ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink); }
.store-list { list-style: none; padding: 0; margin: 24px 0; display: grid; border-top: 1px solid var(--rule); }
.store-list > li { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.store-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.store-list .store-name { font-weight: 600; font-family: var(--mono); font-size: 16px; }
.store-meta { margin: 0; color: var(--ink-3); font-size: 14px; }
.store-meta:empty { display: none; }
.store-actions { display: flex; gap: 20px; font-size: 14px; align-items: center; }
.store-actions a, .store-actions .copy-link { padding: 8px 0; }
.store-actions .copy-link { color: var(--ink-3); text-decoration-color: rgba(127, 138, 166, 0.5); }
.store-actions .copy-link:hover { color: var(--bad); }
.store-list > li.muted { display: block; }
/* Purchase Watch panel on the account page */
.t-bad { color: var(--bad); }
.t-warn { color: var(--warn); }
.store-list > li > * { min-width: 0; }
.watch { min-width: 0; max-width: 100%; border: 1px solid var(--rule); border-radius: var(--r); padding: 0 14px; }
.watch summary { cursor: pointer; padding: 12px 0; font-size: 14px; font-weight: 600; color: var(--accent-hover); }
.watch[open] { padding-bottom: 14px; }
.snippet-row { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.snippet { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; display: block; font: 13px var(--mono); background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; color: var(--ink); }
.watch-help { margin: 12px 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.watch-help dt { font-weight: 600; }
.watch-help dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .watch-help { grid-template-columns: 1fr; } .watch-help dd { margin-bottom: 8px; } }
.code-block { white-space: pre; max-height: 220px; overflow: auto; margin: 10px 0 6px; }
.ga4-steps { margin: 10px 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.ga4-steps code { font-size: 12.5px; word-break: break-all; color: var(--ink); }
.ga4-form { display: flex; gap: 10px; margin: 12px 0 6px; flex-wrap: wrap; }
.ga4-form input { flex: 1; min-width: 200px; font: 15px var(--mono); color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 10px 12px; }
.ga4-form input:focus-visible { outline: none; border-color: var(--accent); }
.t-good { color: var(--good); }
.watch-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.watch-table th { text-align: left; font: 500 11.5px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.watch-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 560px) { .watch-table { display: block; overflow-x: auto; } }

/* Pricing bits used on home + manage */
.price-card { text-align: left; padding: 28px 24px; display: flex; flex-direction: column; }
.price { font: 700 46px/1 "Plex", sans-serif; letter-spacing: -0.04em; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.price small { font: 400 15px "Plex", sans-serif; color: var(--ink-3); letter-spacing: 0; }
.ticks { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; font-size: var(--t-small); }
.ticks li { padding-left: 22px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 5px; height: 10px; border: solid var(--good); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--ink-3); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: -8px 0 18px; max-width: 68ch; }

/* Prose (legal + guides) */
.prose { padding: clamp(48px, 8vw, 80px) 0; }
.prose h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; margin-bottom: 14px; }
.prose h2 { font-size: 26px; margin: 44px 0 10px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose .muted { color: var(--ink-3); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--surface); border: 1px solid var(--rule); padding: 1px 5px; border-radius: 3px; color: var(--ink); }
.prose .callout { background: var(--surface); border-left: 2px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; padding: 16px 20px; margin: 24px 0; }
.prose .callout p { color: var(--ink); }

/* About + footer */
.about { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.avatar { width: 96px; height: 96px; border-radius: var(--r); border: 1px solid var(--rule-strong); object-fit: cover; background: var(--surface); }
footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; font-size: 14px; color: var(--ink-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }
@media (max-width: 860px) { footer nav a { padding: 8px 0; } }

/* Lead form (home contact form + checkout waitlist) and the plan note */
.plan-note + .scan, .plan-note + .lead-form { margin-top: 16px; }
.plan-note { margin: 24px 0 0; padding: 10px 14px; border-left: 2px solid var(--accent); background: var(--surface-2); font-size: var(--t-small); color: var(--ink-2); max-width: 540px; }
.plan-note b { color: var(--ink); font-weight: 600; }
.lead-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lead-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .lead-grid, .lead-grid.two { grid-template-columns: 1fr; } }

.lead-form { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.lead-form label { font-size: 14px; font-weight: 600; margin-top: 8px; }
.lead-form input[type="email"], .lead-form input[type="text"], .lead-form select, .lead-form textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 10px 12px; width: 100%; }
.lead-form input:focus-visible, .lead-form select:focus-visible, .lead-form textarea:focus-visible { outline: none; border-color: var(--accent); }
.lead-form [aria-invalid="true"] { border-color: var(--bad); }
.lead-form textarea { resize: vertical; min-height: 72px; }
.lead-kind { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.lead-kind label { font-weight: 500; margin: 0; display: inline-flex; gap: 8px; align-items: center; }
.lead-form .btn { margin-top: 14px; align-self: flex-start; }
.lead-status { min-height: 1.5em; margin: 6px 0 0; }
.lead-status.error { color: var(--bad); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .finding { opacity: 1; }
}
