:root {
  /* Color psychology for people who just got a legal threat:
     navy = authority and trust (law, banking); sage green = safety, "resolved", go;
     warm paper instead of clinical white = calmer; brass = proof, seals, permanence.
     Red is reserved for issues that block people, never for selling. */
  --ink: #13294b;
  --ink-soft: #46526b;
  --paper: #f7f5f0;
  --card: #ffffff;
  --line: #e3ded4;
  --primary: #1d6b55;       /* 6.4:1 with white text */
  --primary-hover: #165545;
  --primary-bg: #e3f0ea;
  --brass: #7d5f17;         /* 5.5:1 on paper */
  --seal-bg: #f1ead6;
  --accent: #1d6b55;
  --accent-bg: #fbeee5;
  --ok: #1d6b55;
  --ok-bg: #e3f0ea;
  --warn-bg: #fff4d6;
  --crit: #a3162b;
  --crit-bg: #fbe7ea;
  --serious: #b4410f;
  --focus: #1f5fd6;
  --radius: 12px;
  --wrap: 1080px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--serif); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 16px; top: 16px; color: #fff; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; line-height: 1.1; }
.brand b { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; display: block; }
.brand small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.brand img { width: 36px; height: 36px; }
.site-head nav ul { display: flex; gap: 6px 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; font-size: 0.95rem; }
.site-head nav a { text-decoration: none; font-weight: 600; }
.site-head nav a[aria-current="page"] { text-decoration: underline; }

/* hero */
.hero { padding: 64px 0 48px; }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 640px; }

/* scan form */
.scan-form { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 680px; box-shadow: 0 1px 0 rgba(20,33,61,0.04), 0 12px 32px -18px rgba(20,33,61,0.25); }
.scan-form label { display: block; font-weight: 700; margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row input { flex: 1 1 260px; min-width: 0; }
input[type="text"], input[type="email"], input[type="url"], textarea, select {
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid #8a93a6; border-radius: 10px; padding: 12px 14px; width: 100%;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.hint { font-size: 0.9rem; color: var(--ink-soft); margin: 10px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 22px; cursor: pointer;
  background: var(--primary); color: #fff; text-decoration: none; min-height: 48px;
}
.btn:hover { background: var(--primary-hover); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.secondary:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.callout { margin-top: 22px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-weight: 600; }
.callout a { color: var(--primary); }

/* sections */
section { padding: 56px 0; }
section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--paper); }
.stat { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; line-height: 1; margin-bottom: 8px; color: var(--ink); }
.source { font-size: 0.85rem; color: var(--ink-soft); }
.source a { color: var(--ink-soft); }

.myth { border-left: 5px solid var(--brass); }
.myth h3::before { content: "Myth: "; color: var(--brass); }
.truth { border-left: 5px solid var(--ok); }

/* shield */
.shield { display: grid; gap: 28px; grid-template-columns: 1.2fr 1fr; align-items: start; }
@media (max-width: 820px) { .shield { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { padding-left: 32px; position: relative; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-bg); border: 2px solid var(--ok); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 10px; width: 5px; height: 9px; border: solid var(--ok); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; }
.price small { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.form-stack { display: grid; gap: 12px; }
.form-stack label { font-weight: 700; display: block; margin-bottom: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { font-weight: 600; margin: 8px 0 0; }
.status.ok { color: var(--ok); }
.status.err { color: var(--crit); }

/* report */
.report-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.meta { font-size: 0.92rem; color: var(--ink-soft); }
.meta dt { font-weight: 700; color: var(--ink); }
.meta dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.summary { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 24px 0; }
.pill { border-radius: var(--radius); padding: 16px; border: 1px solid var(--line); background: var(--card); }
.pill b { display: block; font-size: 2rem; line-height: 1.1; }
.pill.critical { background: var(--crit-bg); border-color: #f0b8c1; }
.pill.serious { background: var(--accent-bg); border-color: #f1c4a8; }
.pill.ok { background: var(--ok-bg); border-color: #a9d6bc; }
.flag { border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; border: 1px solid; }
.flag.bad { background: var(--crit-bg); border-color: #f0b8c1; }
.flag.warn { background: var(--warn-bg); border-color: #edd28a; }
.flag.good { background: var(--ok-bg); border-color: #a9d6bc; }
.flag h2 { font-size: 1.2rem; margin-bottom: 0.3em; }
.issue { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; }
.issue-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.badge { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; }
.badge.critical { background: var(--crit); color: #fff; }
.badge.serious { background: var(--serious); color: #fff; }
.badge.moderate { background: #6b5410; color: #fff; }
.badge.minor { background: #4b5568; color: #fff; }
.issue h3 { margin: 0; }
.issue .who { color: var(--ink-soft); }
.issue .platform { background: var(--paper); border-radius: 8px; padding: 10px 14px; font-size: 0.95rem; }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
code { font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1ede5; padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f1ede5; padding: 10px 12px; border-radius: 8px; font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.loading { display: flex; gap: 14px; align-items: center; padding: 40px 0; font-weight: 600; }
.spinner { width: 28px; height: 28px; border: 4px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* article (letter guide) */
.article h2 { margin-top: 1.6em; }
.article ol.steps { counter-reset: step; list-style: none; padding: 0; }
.article ol.steps > li { counter-increment: step; position: relative; padding-left: 56px; margin-bottom: 28px; }
.article ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; }
.article ol.steps .step-h { font-size: 1.3rem; margin-top: 4px; }
.note { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ink); border-radius: 8px; padding: 14px 18px; margin: 18px 0; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.9rem; color: var(--ink-soft); }
.site-foot a { color: var(--ink-soft); }

@media print {
  .site-head nav, .site-foot, .no-print, .scan-form { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .issue, .pill, .flag { break-inside: avoid; }
  details { display: block; }
  details > * { display: block; }
}

/* how it works + pricing */
.step-num { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--seal-bg); color: var(--ink); border: 1.5px solid var(--brass); margin-bottom: 12px; }
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 24px; align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan .checks { flex: 1; font-size: 0.95rem; }
.plan .btn { width: 100%; }
.plan.featured { border: 2px solid var(--primary); box-shadow: 0 14px 36px -22px rgba(29,107,85,0.6); }
.plan.urgent { background: var(--seal-bg); border-color: #dccb9c; }
.tag { display: inline-block; align-self: flex-start; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); background: var(--seal-bg); border: 1px solid #dccb9c; border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.plan.urgent .tag { background: #fff; }
.price-note { font-size: 0.9rem; color: var(--ink-soft); margin-top: -0.6em; }
.seal { display: inline-flex; gap: 10px; align-items: center; background: var(--seal-bg); border: 1px solid #dccb9c; border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; }
.seal code { background: transparent; padding: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
table.pages { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; overflow-x: auto; }
table.pages th, table.pages td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
table.pages th { background: var(--paper); }
.alt-list { padding-left: 1.2em; margin: 0; }
.alt-list li { margin-bottom: 8px; }
@media print { .seal { border: 1px solid #999; } table.pages { display: table; } }

/* long URLs and fingerprints must wrap on phones */
#report p, #report li, #report h3, #report dd { overflow-wrap: anywhere; }

/* support chat */
.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; }
.chat-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 20; font: inherit; font-weight: 700; color: #fff; background: var(--ink); border: 2px solid var(--brass); border-radius: 999px; padding: 12px 20px; cursor: pointer; box-shadow: 0 10px 28px -12px rgba(19,41,75,0.6); min-height: 48px; }
.chat-toggle:hover { background: #1c3561; }
.chat-panel { position: fixed; right: 16px; bottom: 76px; z-index: 21; width: min(400px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -24px rgba(19,41,75,0.55); overflow-y: auto; overscroll-behavior: contain; padding: 0; }
/* the middle scrolls; title (with close) stays on top and the input stays at the bottom */
.chat-panel[hidden] { display: none; }
.chat-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; padding: 12px 16px; }
.chat-head h2 { font-size: 1.15rem; margin: 0; color: #fff; }
.chat-close { background: transparent; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }
.chat-close:focus-visible { outline-color: #fff; }
.chat-note { font-size: 0.82rem; color: var(--ink-soft); margin: 0; padding: 10px 16px; background: var(--seal-bg); border-bottom: 1px solid var(--line); }
.chat-log { flex: 1 0 auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 0.95rem; line-height: 1.5; max-width: 90%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.err { align-self: stretch; background: var(--crit-bg); border: 1px solid #f0b8c1; }
.chat-starters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 8px; }
.chat-starters button { font: inherit; font-size: 0.88rem; background: #fff; color: var(--ink); border: 1.5px solid var(--primary); border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 36px; }
.chat-form { position: sticky; bottom: 0; background: var(--card); display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: end; }
.chat-form label { grid-column: 1 / -1; font-weight: 700; font-size: 0.9rem; }
.chat-form textarea { resize: none; font-size: 0.95rem; padding: 10px; }
.chat-form .btn { min-height: 44px; padding: 10px 16px; }
@media (max-width: 480px) { .chat-toggle { right: 12px; bottom: 12px; } .chat-panel { right: 8px; left: 8px; width: auto; bottom: 70px; } }

/* room below the last content so the floating chat button never covers it */
body { padding-bottom: 84px; }
@media print { body { padding-bottom: 0; } }

.msg.bot a, .msg.err a { color: var(--ink); font-weight: 600; }
.kit-code { white-space: nowrap; font: 700 clamp(1.15rem, 5.4vw, 2.4rem)/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; background: var(--seal-bg); border: 2px dashed var(--brass); border-radius: 12px; padding: 14px 18px; display: inline-block; margin: 4px 0 16px; overflow-wrap: anywhere; }
