:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #171a2e;
  --muted: #5d6280;
  --line: #e2e4ee;
  --brand: #4338ca;
  --brand-2: #6366f1;
  --brand-soft: #eef0ff;
  --crit: #dc2626;
  --crit-soft: #fef2f2;
  --major: #ea580c;
  --major-soft: #fff4ec;
  --minor: #a16207;
  --minor-soft: #fefbe8;
  --info: #64748b;
  --info-soft: #f1f5f9;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 60, .05), 0 8px 24px rgba(20, 24, 60, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 5vw, 46px); margin: 0 0 12px; }
h2 { font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 10px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding: 56px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.inline { display: inline; }
.break { word-break: break-all; }
.mt { margin-top: 16px; } .mb0 { margin-bottom: 0; }

/* top bar */
.topbar { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a.btn { color: #fff; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
@media (max-width: 640px) { .hide-sm { display: none; } .nav { gap: 12px; } }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 15px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #c9cce0; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #3730a3; }
.btn.danger { color: var(--crit); }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.btn.big { padding: 14px 22px; font-size: 16px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cfd2e2; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 0 0 14px; }
.check input { margin-top: 4px; width: 16px; height: 16px; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
details.box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; background: #fafbff; }
details.box > summary { cursor: pointer; font-weight: 600; }
details.box[open] > summary { margin-bottom: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.auth { max-width: 460px; }
.notice { padding: 12px 14px; border-radius: 10px; margin: 16px 0; font-size: 15px; }
.notice.ok { background: var(--ok-soft); color: #14532d; border: 1px solid #bbf7d0; }
.notice.err { background: var(--crit-soft); color: #7f1d1d; border: 1px solid #fecaca; }
.notice.warn { background: var(--minor-soft); color: #713f12; border: 1px solid #fde68a; }
.notice.info { background: var(--brand-soft); color: #312e81; border: 1px solid #c7d2fe; }

/* hero */
.hero { padding: 64px 0 40px; background: radial-gradient(1200px 400px at 50% -100px, #e0e3ff 0%, transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 22px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 5px 10px; border-radius: 99px; margin-bottom: 14px; }
.urlform { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.urlform input { border: 0; font-size: 16px; }
.urlform input:focus { outline: none; }
.urlform .btn { flex: none; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.ticks li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .urlform { flex-direction: column; } }

/* browser mock */
.browser { background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(30, 30, 90, .14); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #f1f2f8; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d7d9e6; display: block; }
.browser-bar span { margin-left: 8px; font-size: 12px; color: var(--muted); background: #fff; border-radius: 6px; padding: 3px 10px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mock { padding: 16px; font-size: 13px; position: relative; }
.mock-nav { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.mock-nav b { margin-right: auto; }
.mock-nav span { width: 46px; height: 8px; background: #e6e8f2; border-radius: 4px; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.mock-img { height: 58px; border-radius: 6px; background: linear-gradient(135deg, #c7d2fe, #e0e7ff); margin-bottom: 6px; }
.mock-img.broken { background: repeating-linear-gradient(45deg, #fee2e2, #fee2e2 6px, #fff 6px, #fff 12px); }
.mock-line { height: 7px; background: #e6e8f2; border-radius: 4px; margin: 5px 0; }
.mock-line.w60 { width: 60%; }
.mock-bad { color: var(--crit); font-weight: 700; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.mock-empty { border: 2px dashed #fca5a5; border-radius: 10px; padding: 16px; text-align: center; color: #b91c1c; margin-top: 10px; background: #fff7f7; }
.pin { position: absolute; background: var(--crit); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 8px; box-shadow: 0 2px 8px rgba(220, 38, 38, .35); }

/* steps & features */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { counter-increment: s; }
.step::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 10px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .ico { font-size: 24px; display: block; margin-bottom: 6px; }
.feature p, .step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .steps, .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps, .features { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.hot { border: 2px solid var(--brand); position: relative; }
.plan.hot::before { content: "Most popular"; position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.price { font-size: 34px; font-weight: 800; margin: 6px 0 2px; }
.price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 18px; margin: 14px 0 20px; flex: 1; font-size: 15px; }
.plan li { margin: 5px 0; }
.beta { display: inline-block; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* report */
.sev { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.sev-critical { background: var(--crit-soft); color: var(--crit); border: 1px solid #fecaca; }
.sev-major { background: var(--major-soft); color: var(--major); border: 1px solid #fed7aa; }
.sev-minor { background: var(--minor-soft); color: var(--minor); border: 1px solid #fde68a; }
.sev-info { background: var(--info-soft); color: var(--info); border: 1px solid #e2e8f0; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--info-soft); }
.code.bad { background: var(--crit-soft); color: var(--crit); }
.code.warn { background: var(--major-soft); color: var(--major); }
.code.good { background: var(--ok-soft); color: var(--ok); }

.rep-head { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.rep-head h1 { font-size: clamp(22px, 3.4vw, 32px); word-break: break-word; }
.shot { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #eef0f7; aspect-ratio: 3 / 2; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
@media (max-width: 860px) { .rep-head { grid-template-columns: 1fr; } }

.scorebox { display: flex; align-items: center; gap: 18px; margin: 18px 0; flex-wrap: wrap; }
.ring { --p: 50; --c: var(--brand); width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e6e8f2 0); display: grid; place-items: center; flex: none; }
.ring > div { width: 86px; height: 86px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring b { font-size: 30px; }
.ring span { font-size: 12px; color: var(--muted); }
.counts { display: flex; gap: 10px; flex-wrap: wrap; }
.count { border-radius: 12px; padding: 10px 14px; min-width: 92px; border: 1px solid var(--line); background: #fff; }
.count b { display: block; font-size: 24px; line-height: 1.1; }
.count span { font-size: 13px; color: var(--muted); }
.count.critical b { color: var(--crit); } .count.major b { color: var(--major); } .count.minor b { color: var(--minor); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 26px 0 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; font: 600 15px inherit; font-family: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--brand); border-color: var(--brand); }
.tabpanel[hidden] { display: none; }

.pagegroup { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.pagegroup > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pagegroup > summary::-webkit-details-marker { display: none; }
.pagegroup > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.pagegroup[open] > summary::after { content: "▴"; }
.pagegroup .purl { font-weight: 600; word-break: break-all; flex: 1 1 260px; }
.issue { border-top: 1px solid var(--line); padding: 12px 16px; display: grid; grid-template-columns: 78px 1fr; gap: 10px; }
.issue h4 { margin: 0 0 2px; font-size: 15px; }
.issue .where { font-size: 14px; color: var(--brand); font-weight: 600; }
.issue p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.issue pre { margin: 6px 0 0; font-size: 12.5px; background: #f6f7fb; border: 1px solid var(--line); border-radius: 8px; padding: 8px; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: auto; }
@media (max-width: 520px) { .issue { grid-template-columns: 1fr; gap: 4px; } }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: #fafbff; font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.u { word-break: break-all; min-width: 220px; }
table.t ol { margin: 0; padding-left: 18px; }

.locked { position: relative; }
.locked .blur { filter: blur(5px); pointer-events: none; user-select: none; }
.locked .unlock { position: absolute; inset: 0; display: grid; place-items: center; }
.locked .unlock .card { text-align: center; max-width: 380px; }

.progress { height: 12px; background: #e6e8f2; border-radius: 99px; overflow: hidden; margin: 18px 0 10px; }
.progress div { height: 100%; width: 5%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width .6s; }
.pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); margin-right: 6px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.scanlist .row { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.scanlist .row:first-child { border-top: 0; }
.scanlist .row .u { flex: 1 1 240px; word-break: break-all; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--info-soft); color: var(--info); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.running, .pill.queued { background: var(--brand-soft); color: var(--brand); }
.pill.failed { background: var(--crit-soft); color: var(--crit); }
.pill.review { background: var(--minor-soft); color: var(--minor); }

.footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 40px; background: #fff; }
.footer-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }

@media print {
  .topbar, .footer, .tabs, .noprint { display: none !important; }
  .tabpanel[hidden] { display: block !important; }
  .pagegroup { break-inside: avoid; }
  details.pagegroup:not([open]) > *:not(summary) { display: block; }
  body { background: #fff; }
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
/* keep wide children from pushing the page sideways on phones */
.hero-in > *, .rep-head > *, .dash-grid > * { min-width: 0; }
.browser-bar span { min-width: 0; }
@media (max-width: 900px) { .hero-in { grid-template-columns: minmax(0, 1fr); } }
.ring span { font-size: 11px; display: inline-block; max-width: 70px; }
.suites { display: grid; gap: 10px; }
.suite { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; flex-wrap: wrap; }
.suite > div:first-child { flex: 1 1 260px; min-width: 0; word-break: break-word; }
.suite-btns { display: flex; gap: 6px; }
.codepreview { margin: 14px 0 0; background: #0f1222; color: #e4e7ff; border-radius: 10px; padding: 14px; font-size: 12.5px; line-height: 1.5; max-height: 520px; overflow: auto; white-space: pre; }

/* ---- v5: production polish shared by all pages ---- */
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
.btn { transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn.primary { box-shadow: 0 1px 2px rgba(67, 56, 202, .25), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.primary:hover { box-shadow: 0 6px 18px rgba(67, 56, 202, .28); }
.nav a:not(.btn) { color: #3b3f5c; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--brand); }
@media (max-width: 860px) { .hide-md { display: none; } }

.footer { padding: 48px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { margin: 4px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid a:not(.logo) { display: block; color: var(--ink); text-decoration: none; font-size: 15px; margin: 0 0 8px; }
.footer-grid a:not(.logo):hover { color: var(--brand); }
.footer-brand p { max-width: 300px; margin: 12px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
html { scroll-behavior: smooth; }
section[id], [id].h-section { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
