@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #fbfcfd; --surface: #ffffff; --sunken: #eff2f6; --ink: #161c26; --muted: #55606f; --line: #dbe0e7; --line-strong: #7f8997;
  --accent: #1f4fa3; --accent-hover: #173d82; --on-accent: #ffffff; --accent-soft: #e8eef9;
  --good: #1c6b3a; --mid: #8f5a00; --poor: #b3261e;
  --sev3-bg: #fdeada; --sev3: #83450a; --sev2-bg: #fbf1cf; --sev2: #665000; --sev1-bg: #e9edf2; --sev1: #47515f;
  --note-bg: #fff6e5; --note: #6e4700; --note-line: #ecd5a2;
  --err-bg: #fdeeed; --err: #8c1d18; --err-line: #efc4c0;
  --serp-title: #1a0dab; --serp-url: #0b6b2d;
  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #11151b; --surface: #181d25; --sunken: #20262f; --ink: #edf0f4; --muted: #a6b0bd; --line: #2f3742; --line-strong: #6b7685;
  --accent: #9dbcf5; --accent-hover: #bcd2f9; --on-accent: #10203f; --accent-soft: #1d2b44;
  --good: #7fd59b; --mid: #e8c06c; --poor: #f4978f;
  --sev3-bg: #47301a; --sev3: #f8cfa3; --sev2-bg: #413717; --sev2: #efdc9b; --sev1-bg: #2b323c; --sev1: #c8d0da;
  --note-bg: #2c2412; --note: #ecd093; --note-line: #574720;
  --err-bg: #331a18; --err: #f9c0ba; --err-line: #5e2f2b;
  --serp-title: #9dbcf5; --serp-url: #7fd59b;
} }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--sans); caret-color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, pre { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; margin: 8px 0; padding: 10px 12px; background: var(--sunken); border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -200px; padding: 8px 12px; background: var(--surface); border-radius: 4px; z-index: 2; }
.skip:focus { top: 8px; }
.wrap, main { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; padding-top: 16px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 700; font-size: 1.0625rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand svg { display: block; }
.brand .mark-bg { fill: var(--accent); }
.brand .mark-tick { stroke: var(--on-accent); }
.top nav { display: flex; flex-wrap: wrap; gap: 0 16px; margin-left: -1px; }
.top nav a { display: inline-block; padding: 6px 0; font-size: .875rem; color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

h1 { font-size: 2.5rem; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; margin: 32px 0 8px; text-wrap: balance; overflow-wrap: anywhere; }
h2 { font-size: 1.375rem; line-height: 1.25; font-weight: 700; margin: 0 0 6px; text-wrap: balance; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 700; margin: 0 0 6px; }
.lead { color: var(--muted); font-size: 1.125rem; margin: 0 0 24px; max-width: 70ch; text-wrap: pretty; }
.muted { color: var(--muted); font-size: .875rem; }

/* controls */
.btn { display: inline-block; font: 600 .9375rem/1.3 var(--sans); padding: 11px 18px; min-height: 44px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); cursor: pointer; text-decoration: none; transition: background-color 150ms ease-out; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--sunken); color: var(--ink); }
.field { display: block; margin: 0 0 14px; }
.field label, .scan .lbl { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 4px; }
input[type=text] { width: 100%; font: 400 1rem/1.3 var(--sans); padding: 11px 12px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
input[type=text]::placeholder { color: var(--muted); opacity: 1; }
input[type=text]:focus-visible { outline-offset: 0; border-radius: 8px; }
.hint { color: var(--muted); font-size: .8125rem; margin: 4px 0 0; }

.scan { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 8px; align-items: end; margin: 0 0 10px; }
.scan .lbl { grid-column: 1 / -1; margin: 0 0 -4px; font-size: .9375rem; }
.scan fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.segs { display: flex; height: 44px; }
.scan legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.seg { position: relative; display: flex; margin: 0; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line-strong); font-size: .9375rem; background: var(--surface); }
.seg:first-of-type span { border-radius: 8px 0 0 8px; margin-right: -1px; }
.seg input:checked + span { position: relative; }
.seg:last-of-type span { border-radius: 0 8px 8px 0; }
.seg input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.scan-note { max-width: 62ch; }
.alert { margin: 10px 0; padding: 10px 14px; border: 1px solid var(--err-line); background: var(--err-bg); color: var(--err); border-radius: 8px; font-size: .9375rem; }
.spin { display: inline-block; flex: none; width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; border-top-color: var(--line-strong); } .btn { transition: none; } }

/* scorecard: one instrument, five readings */
.score-strip { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.score-strip li { border-left: 1px solid var(--line); min-width: 0; }
.score-strip li:first-child { border-left: 0; }
.reading { display: block; overflow-wrap: anywhere; height: 100%; padding: 12px 14px 14px; color: inherit; text-decoration: none; transition: background-color 150ms ease-out; }
.reading:hover { background: var(--sunken); color: inherit; }
.reading:focus-visible { outline-offset: -3px; }
.reading .l { display: block; font-size: .8125rem; color: var(--muted); }
.reading .s { display: block; font-size: 2.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.reading .b { display: block; font-weight: 600; font-size: .8125rem; }
.reading .c { display: block; color: var(--muted); font-size: .8125rem; }
.reading.good .s, .reading.good .b { color: var(--good); }
.reading.mid .s, .reading.mid .b { color: var(--mid); }
.reading.poor .s, .reading.poor .b { color: var(--poor); }
.reading.pending .s, .reading.failed .s { font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: var(--muted); padding: 10px 0 4px; line-height: 1.3; }
.reading.pending .s { display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; margin-top: 20px; }
  .lead { font-size: 1rem; }
  .scan { grid-template-columns: 1fr auto; }
  .scan #scan-url { grid-column: 1 / -1; }
  .scan .btn { width: 100%; }
  .score-strip { grid-template-columns: 1fr; }
  .score-strip li { border-left: 0; border-top: 1px solid var(--line); }
  .score-strip li:first-child { border-top: 0; }
  .reading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: center; padding: 8px 14px; }
  .reading .l { font-size: .9375rem; color: var(--ink); font-weight: 600; }
  .reading .s { grid-column: 2; grid-row: 1 / span 2; font-size: 1.75rem; }
  .reading .b { display: inline; }
  .reading .c { grid-column: 1; }
  .reading.pending .s, .reading.failed .s { grid-row: auto; grid-column: 1; padding: 0; font-size: .875rem; }
}

/* home */
.example { margin: 32px 0; }
.example h2 { font-size: 1.125rem; margin: 0; }
.example p { margin: 0; }
.example h3 { margin: 20px 0 0; }
.example .fixes { margin-top: 8px; }
.tools { margin: 40px 0 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.tools > h2 { margin-bottom: 16px; }
.tool-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 32px; }
.tool-groups h3 { color: var(--muted); font-size: .875rem; font-weight: 600; margin-bottom: 10px; }
.tool-groups ul { list-style: none; margin: 0; padding: 0; }
.tool-groups li { margin: 0 0 10px; }
.tool-groups a { font-weight: 600; text-decoration: none; }
.tool-groups a:hover { text-decoration: underline; }
.tool-groups p { margin: 0; color: var(--muted); font-size: .875rem; }

/* report */
.report-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-top: 28px; }
.report-head h1 { margin: 0 0 4px; }
.report-head .meta { margin: 0; color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-note { margin: 8px 0 0; }
.report-cta { margin-top: 40px; }
.progress { display: flex; gap: 10px; align-items: center; margin: 14px 0; padding: 8px 12px; min-height: 40px; border-radius: 8px; background: var(--sunken); font-size: .9375rem; }
.progress.warn { background: var(--note-bg); color: var(--note); }
.progress.fail { background: var(--err-bg); color: var(--err); }
.diff { margin: 8px 0 0; }
.panel { margin: 40px 0; scroll-margin-top: 16px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.panel-head .score { font-size: 1rem; font-weight: 600; color: var(--muted); }
.panel-head .score.good { color: var(--good); } .panel-head .score.mid { color: var(--mid); } .panel-head .score.poor { color: var(--poor); }
.panel > .muted { margin: 0 0 12px; }
.fixes { list-style: none; padding: 0; margin: 12px 0; border-bottom: 1px solid var(--line); }
.fix { border-top: 1px solid var(--line); padding: 12px 0; }
.fix summary { cursor: pointer; list-style: none; border-radius: 4px; }
.fix summary::-webkit-details-marker { display: none; }
.fix-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; }
.fix-line .t { font-weight: 600; overflow-wrap: anywhere; }
.rank { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 8px; }
.fix-line .m { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
details.fix-open > summary .t::after { content: ""; }
.chev { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
details[open] > summary .chev { transform: translateY(1px) rotate(225deg); }
.sev { justify-self: start; font-size: .75rem; font-weight: 600; line-height: 1.3; padding: 2px 7px; border-radius: 4px; }
.s4, .s3 { background: var(--sev3-bg); color: var(--sev3); }
.s2 { background: var(--sev2-bg); color: var(--sev2); } .s1 { background: var(--sev1-bg); color: var(--sev1); }
.fix-body { margin: 6px 0 0 86px; max-width: 72ch; min-width: 0; overflow-wrap: anywhere; }
.fix-body p { margin: 0; }
.fix-body .e { color: var(--muted); font-size: .8125rem; margin-top: 4px; overflow-wrap: anywhere; }
.fix-body code { display: block; margin-top: 6px; padding: 6px 8px; background: var(--sunken); border-radius: 4px; font-size: .75rem; color: var(--ink); }
.where { margin-top: 6px; }
.where > summary { cursor: pointer; font-size: .8125rem; color: var(--muted); list-style: none; display: inline-block; padding: 3px 0; }
.where > summary::-webkit-details-marker { display: none; }
.more-fixes { border-top: 1px solid var(--line); }
.more-fixes > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--accent); list-style: none; }
.more-fixes > summary::-webkit-details-marker { display: none; }
.more-fixes .fixes { margin: 0; border-bottom: 0; }
.none { color: var(--muted); padding: 12px 0; }
@media (max-width: 640px) {
  .fix-line { grid-template-columns: minmax(0, 1fr) auto; }
  .fix-line .t { grid-column: 1 / -1; grid-row: 2; }
  .fix-line .m { grid-column: 2; grid-row: 1; white-space: normal; text-align: right; }
  .fix-body { margin-left: 0; }
  .actions, .actions .btn { width: 100%; text-align: center; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
caption { text-align: left; color: var(--muted); font-size: .8125rem; padding-bottom: 4px; }
th, td { text-align: left; vertical-align: top; padding: 6px 12px 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: .8125rem; }
tbody th { font-weight: 400; color: var(--muted); width: 34%; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; padding-right: 0; }
td.mono { font-family: var(--mono); font-size: .8125rem; }
td abbr { text-decoration: none; }
.rate { color: var(--muted); }
.rate.good { color: var(--good); } .rate.ni { color: var(--mid); } .rate.poor { color: var(--poor); }
.speed-verdict { margin: 8px 0 0; font-size: .875rem; color: var(--muted); }

/* share previews */
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; margin: 24px 0 12px; }
.previews .full { grid-column: 1 / -1; }
figure { margin: 0; min-width: 0; }
figcaption { font-size: .8125rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.pcard { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.pcard .img { aspect-ratio: 1.91; background: var(--sunken); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8125rem; overflow: hidden; }
.pcard .img.empty { aspect-ratio: auto; height: 48px; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: 10px 12px; overflow-wrap: anywhere; }
.pcard .dom { font-size: .75rem; color: var(--muted); }
.pcard .tt { font-weight: 600; }
.pcard .dd { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.serp { max-width: 600px; }
.serp .tt { color: var(--serp-title); font-size: 1.125rem; font-weight: 400; }
.serp .u { color: var(--serp-url); font-size: .8125rem; }
.note-box { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--note-line); background: var(--note-bg); color: var(--note); border-radius: 8px; font-size: .9375rem; max-width: 72ch; }
.notes { margin: 12px 0; padding-left: 20px; max-width: 65ch; }

.form-narrow { max-width: 560px; }
.prose { max-width: 60ch; overflow-wrap: anywhere; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin-top: 32px; }
.prose li { margin-bottom: 6px; }
.check-detail { margin: 32px 0 0; }

/* Guides. Diagrams are inline SVG, 480 wide, colored only through these classes so they follow the theme. */
.guide-fig { margin: 24px 0; }
.guide-fig svg { display: block; width: 100%; height: auto; }
.guide-fig figcaption { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.guide-next { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.guide-list { list-style: none; padding: 0; margin: 0; max-width: 65ch; }
.guide-list li { margin-bottom: 14px; }
.guide-list p { margin: 2px 0 0; color: var(--muted); font-size: .9375rem; }
.dg text { fill: var(--ink); font-family: var(--sans); font-size: 14px; }
.dg text.dg-muted { fill: var(--muted); }
.dg text.dg-mono { font-family: var(--mono); font-size: 13px; }
.dg text.dg-strong { font-weight: 600; }
.dg text.dg-good { fill: var(--good); }
.dg text.dg-poor { fill: var(--poor); }
.dg text.dg-accent { fill: var(--accent); }
.dg .dg-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.dg .dg-sunken { fill: var(--sunken); stroke: none; }
.dg .dg-box-good { fill: none; stroke: var(--good); stroke-width: 2; }
.dg .dg-box-poor { fill: none; stroke: var(--poor); stroke-width: 2; }
.dg .dg-box-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.dg .dg-line { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.dg .dg-head { fill: var(--line-strong); stroke: none; }
.dg .dg-fill-good { fill: var(--good); stroke: none; }
.dg .dg-fill-poor { fill: var(--poor); stroke: none; }
.dg .dg-fill-accent { fill: var(--accent); stroke: none; }

footer { color: var(--muted); font-size: .8125rem; margin-top: 56px; border-top: 1px solid var(--line); }
footer .wrap { padding-top: 20px; padding-bottom: 28px; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 8px; }
footer nav a { color: var(--muted); display: inline-block; padding: 5px 0; }
footer p { margin: 0; max-width: 62ch; }

@media print {
  .top nav, .actions, .progress, footer nav, .skip, #rescan, .share-note, .report-cta { display: none; }
  a { color: inherit; }
}
