/* InspectaCar public pages (templates, guides, software, sample report).
   Hand-written and small on purpose: these pages are plain server-rendered HTML
   and load no JavaScript framework. Tokens match the app (blue-600 primary,
   slate-950 header, the logo's orange as an accent). */

:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0;
  --soft: #f8fafc; --soft-2: #f1f5f9; --white: #fff;
  --brand: #2563eb; --brand-dark: #1d4ed8; --nav: #020617; --accent: #ffa900;
  --pass: #15803d; --pass-bg: #dcfce7;
  --adv: #a16207; --adv-bg: #fef3c7;
  --fail: #b91c1c; --fail-bg: #fee2e2;
  --na: #475569; --na-bg: #e2e8f0;
  --radius: 8px; --wrap: 1120px; --prose: 740px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; border-radius: 4px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }

/* ── Buttons ───────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 42px; }
.btn:hover { background: var(--soft-2); color: var(--ink); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-light { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-lg { padding: 13px 26px; font-size: 1rem; min-height: 48px; }
.btn-sm { padding: 7px 14px; font-size: 0.9rem; min-height: 36px; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* ── Header ────────────────────────────────────────── */
.site-header { background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.06); }
.site-header .hdr-bar { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; height: 32px; width: auto; }
.primary { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.primary a { color: #cbd5e1; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: 0.95rem; font-weight: 500; }
.primary a:hover, .primary a[aria-current] { color: #fff; background: rgba(255,255,255,.08); }
.hdr-actions { display: flex; align-items: center; gap: 12px; }
.hdr-actions .signin { color: #cbd5e1; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.hdr-actions .signin:hover { color: #fff; }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; content: ""; position: relative; }
.menu summary span::before { position: absolute; top: -6px; }
.menu summary span::after { position: absolute; top: 6px; }
.menu-panel { position: absolute; right: 0; top: 52px; width: min(300px, 90vw); background: var(--nav); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.menu-panel a { color: #e2e8f0; text-decoration: none; padding: 12px; border-radius: 6px; }
.menu-panel a:hover { background: rgba(255,255,255,.08); }
.menu-panel .btn { margin-top: 6px; color: #fff; }
@media (max-width: 900px) {
  .primary, .hdr-actions { display: none; }
  .menu { display: block; }
}

/* ── Page ──────────────────────────────────────────── */
main { display: block; }
.crumbs { padding: 16px 0 0; font-size: 0.875rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: #cbd5e1; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page { padding: 18px 0 56px; }
.page-head { max-width: 860px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand-dark); margin: 0 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.75rem); margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--ink-2); margin: 0 0 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.meta { color: var(--muted); font-size: .9rem; margin: 16px 0 0; }
.toc { max-width: var(--prose); background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 28px; font-size: .95rem; }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { break-inside: avoid; margin: 2px 0; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

.prose { font-size: 1.0625rem; }
.prose > p, .prose > ul, .prose > ol, .prose > h2, .prose > h3, .prose > .callout { max-width: var(--prose); }
.prose h2 { font-size: 1.55rem; margin: 2.4rem 0 .6rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose li { margin: .3rem 0; }
.steps { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 0 0 0 44px; margin: 0 0 .9rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--nav); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 520px; }
caption { text-align: left; font-weight: 700; padding: 12px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; width: 22%; }
.note-small { font-size: .875rem; color: var(--muted); max-width: var(--prose); }

.callout { border-left: 4px solid var(--brand); background: #eff6ff; border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 1.4rem 0; }
.callout h3 { margin: 0 0 4px; font-size: 1rem; }
.callout p { margin: 0; }
.callout-warn { border-color: #d97706; background: #fffbeb; }

.shot { margin: 1.4rem 0; max-width: 900px; }
.shot img { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(15,23,42,.08); }
.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }

.download-card, .cta-inline { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--soft); border-radius: var(--radius); padding: 16px 20px; margin: 1.4rem 0; }
.download-card p, .cta-inline p { margin: 2px 0 0; color: var(--ink-2); font-size: .95rem; max-width: 640px; }
.cta-inline { background: #eff6ff; border-color: #bfdbfe; }

.chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; line-height: 1.5; white-space: nowrap; }
.chip-pass { background: var(--pass-bg); color: var(--pass); }
.chip-advisory { background: var(--adv-bg); color: var(--adv); }
.chip-fail { background: var(--fail-bg); color: var(--fail); }
.chip-na { background: var(--na-bg); color: var(--na); }

/* ── FAQ, related, CTA band ────────────────────────── */
.faq { max-width: var(--prose); margin-top: 3rem; }
.faq h2, .related h2 { font-size: 1.55rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 28px 14px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq-a { padding: 0 0 14px; color: var(--ink-2); }
.faq-a p { margin: 0; }
.related { margin-top: 3rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--white); }
.card:hover { border-color: #93c5fd; box-shadow: 0 6px 18px rgba(37,99,235,.08); color: var(--ink); }
.card strong { color: var(--brand-dark); }
.card span { font-size: .92rem; color: var(--ink-2); }
.cta-band { background: var(--nav); color: #fff; padding: 56px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: 1.9rem; margin: 0 0 12px; }
.cta-band p { color: #cbd5e1; margin: 0 auto 24px; max-width: 560px; }
.cta-band a:not(.btn) { color: #93c5fd; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ── Footer ────────────────────────────────────────── */
.site-footer { background: #0b1220; color: #94a3b8; padding: 44px 0 32px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.foot-brand p { max-width: 280px; margin: 12px 0 0; }
.foot-grid h2 { color: #e2e8f0; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 6px 0; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-note, .foot-entity { margin: 28px 0 0; font-size: .82rem; color: #94a3b8; max-width: 720px; } /* #64748b was 3.9:1 on the footer (PageSpeed contrast failure) */
.foot-entity { margin-top: 10px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ── Landing page components ───────────────────────── */
.page-head.has-hero { max-width: none; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 40px; align-items: center; }
.hero-img img { display: block; width: 100%; height: auto; border-radius: 16px; }
.action-note { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 980px) {
  .page-head.has-hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-img { max-width: 620px; }
}

.facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; padding: 0 !important; margin: 1.4rem 0 !important; max-width: none !important; }
.facts li { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
.facts strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--ink); }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts li { padding: 12px 14px; } .facts strong { font-size: 1.35rem; } }
.facts span { color: var(--ink-2); font-size: .92rem; }

.workflow { list-style: none; padding: 0 !important; margin: 1.4rem 0 2rem !important; max-width: none !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.workflow > li { display: flex; flex-direction: column; margin: 0; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.wf-img { order: -1; margin: 0 0 16px; }
.wf-img img { display: block; width: 100%; max-width: 250px; margin: 0 auto; height: auto; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 22px rgba(15,23,42,.12); }
.wf-img figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; text-align: center; }
.wf-text h3 { margin: .5rem 0 .4rem !important; font-size: 1.1rem !important; }
.wf-text p { margin: 0 !important; color: var(--ink-2); font-size: .96rem; }
.wf-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--nav); color: #fff; font-weight: 700; font-size: .85rem; }

.shots { display: grid; gap: 18px; margin: 1.4rem 0; max-width: 980px; }
.shots-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots .shot { margin: 0; }
@media (max-width: 720px) { .shots-2, .shots-3 { grid-template-columns: 1fr 1fr; } .shots-3 > :last-child { grid-column: 1 / -1; max-width: 50%; } }
@media (max-width: 460px) { .shots-2, .shots-3 { grid-template-columns: 1fr; } .shots-3 > :last-child { max-width: none; } }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 1.4rem 0; }
.split-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--soft); }
.split-col h3 { margin: 0 0 8px !important; font-size: 1.15rem; }
.split-col ul { margin: 0 !important; padding-left: 1.1rem !important; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

.chip-ok { background: var(--pass-bg); color: var(--pass); }
.chip-minor { background: var(--adv-bg); color: var(--adv); }
.chip-attention { background: #ffedd5; color: #c2410c; }

/* Read-only template preview (built from the product's real check labels) */
.tpl { margin: 1.6rem 0; max-width: 1000px; }
.tpl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tpl-card { border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; padding: 14px 16px 12px; box-shadow: 0 6px 20px rgba(15,23,42,.06); }
.tpl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.tpl-head strong { font-size: 1.05rem; }
.tpl-head span { font-size: .8rem; color: var(--muted); }
.tpl-row { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; display: grid; gap: 8px; }
.tpl-label { font-weight: 600; font-size: .95rem; }
.tpl-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
/* Chip colours are chosen for WCAG AA contrast (4.5:1) at this small size; the lighter shades failed PageSpeed's check. */
.tpl-chips i { font-style: normal; text-align: center; font-size: .78rem; font-weight: 600; padding: 7px 4px; border-radius: 8px; background: #f1f5f9; color: #475569; }
.tpl-chips i.on.ok { background: #15803d; color: #fff; }
.tpl-chips i.on.minor { background: #f59e0b; color: #451a03; } /* dark text on the bright amber: 8:1, and distinct from the orange Attention chip */
.tpl-chips i.on.attention { background: #c2410c; color: #fff; }
.tpl-note { font-size: .82rem; color: var(--ink-2); }
.tpl-foot { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.tpl figcaption { color: var(--muted); font-size: .9rem; margin: 12px 0 0; max-width: 760px; }
.tpl-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; margin: 14px 0 0 !important; max-width: none !important; }
.tpl-steps li { margin: 0; display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 5px; font-size: .84rem; color: var(--ink-2); }
.tpl-steps li span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--nav); color: #fff; font-size: .72rem; font-weight: 700; }
@media (max-width: 760px) { .tpl-cards { grid-template-columns: 1fr; } }

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