:root {
  --fg: #1d2127; --muted: #5d6470; --line: #e3e6ea; --bg: #fff; --band: #f5f6f8; --card: #fff; --code: #f3f4f6;
  --primary: #3b4a66; --primary-fg: #fff; --accent: #2457c5;
  --ok: #17803d; --bad: #b42318; --warn: #9a5800; --warn-bg: #fff8eb;
  --footer: #1f242c; --footer-fg: #c4cad3;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e8eb; --muted: #9aa1ac; --line: #2c3139; --bg: #14171b; --band: #0f1215; --card: #1a1e23; --code: #22272e;
    --primary: #5b6e94; --accent: #8ab4ff;
    --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --warn-bg: #2a2212;
    --footer: #0b0d10; --footer-fg: #9aa1ac;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--fg); background: var(--bg); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.center { text-align: center; }

/* Header: brand left, tools right */
header.site .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { font: 700 18px/1 var(--mono); color: var(--fg); text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
header.site nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
header.site nav a { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--fg); }
header.site nav a[aria-current] { box-shadow: 0 2px 0 var(--fg); }

/* Hero */
.hero { text-align: center; padding: 28px 0 36px; }
.hero h1 { font-size: 2.3rem; font-weight: 500; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto; }

/* Tool band with input and output cards */
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 20px; }
.card:last-child { margin-bottom: 0; }
.card-label { margin: 0 0 12px; color: var(--muted); }
.card-label strong { color: var(--fg); text-transform: uppercase; letter-spacing: .04em; font-size: 14px; }
.card h3 { font-size: 1rem; margin: 18px 0 6px; }
.card > :last-child { margin-bottom: 0; }
.placeholder { color: var(--muted); margin: 0; }
.next { margin: 12px 0 0; font-weight: 600; }

/* Forms */
form { display: grid; gap: 10px; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 6px; padding: 10px 14px; margin: 0; }
legend { color: var(--muted); padding: 0 4px; }
code, pre, textarea, input { font: 14px/1.5 var(--mono); }
textarea, input:not([type]) { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid #b9c4d6; border-radius: var(--radius); background: var(--bg); color: var(--fg); }
textarea:focus, input:not([type]):focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
button, .btn { font: 600 14px/1 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 14px 24px; border-radius: var(--radius); cursor: pointer; text-decoration: none; text-align: center; }
button.primary { flex: 1 1 280px; border: 1px solid var(--primary); background: var(--primary); color: var(--primary-fg); }
button.primary:hover { filter: brightness(1.1); }
.btn { flex: 0 1 150px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
.btn:hover { border-color: var(--muted); }

/* Code and output */
code { background: var(--code); padding: 1px 4px; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--code); padding: 12px 14px; border-radius: var(--radius); overflow-x: auto; }
pre code { padding: 0; background: none; }
pre.header-out { font-size: 15px; border: 1px solid var(--line); }
.card pre code { user-select: all; }

/* Content below the band */
.content { padding-top: 16px; padding-bottom: 24px; }
.content h2 { font-size: 1.6rem; font-weight: 500; margin: 40px 0 14px; }
.content p { color: var(--muted); }
.content p code, .content td code { color: var(--fg); }

/* Tables */
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: 14px; }
table.examples { border: 1px solid var(--line); }
table.examples th { background: var(--band); }
table.examples td:last-child { text-align: right; white-space: nowrap; }
table.examples a { text-decoration: none; }
.steps { margin-top: 6px; font-size: 13px; }

/* More tools list */
ul.more { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); }
ul.more li + li { border-top: 1px solid var(--line); }
ul.more a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 18px; color: var(--fg); text-decoration: none; }
ul.more a::after { content: '›'; grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 22px; color: var(--muted); }
ul.more a:hover { background: var(--band); }
ul.more span { color: var(--muted); font-size: 15px; }

/* Status and messages */
.muted { color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 3px; border: 1px solid currentColor; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.box { border-left: 3px solid currentColor; padding: 10px 14px; margin: 16px 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--card); }
.box.warn { color: var(--warn); background: var(--warn-bg); }
.box > * { color: var(--fg); }
.box ul { margin: 4px 0 0; }
ul.errors li::marker { content: '✗  '; color: var(--bad); }
ul.warnings li::marker { content: '!  '; color: var(--warn); }
ul.notes { color: var(--muted); }
.hint { color: var(--muted); margin-top: 2px; }
.caret { margin: 6px 0; font-size: 13px; color: var(--bad); }
.actions { margin: 4px 0 0; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }

/* Footer */
footer.site { margin-top: 48px; background: var(--footer); color: var(--footer-fg); font-size: 14px; }
footer.site .wrap { padding-top: 28px; padding-bottom: 32px; text-align: center; }
footer.site nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 10px; }
footer.site a { color: #fff; }
footer.site nav a { text-decoration: none; font-weight: 600; }
footer.site p { margin: 0; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .btn { flex: 1 1 100%; }
  .card { padding: 16px; }
}

/* Tool pages end with the band: join it to the footer without a white strip. */
main:has(> .band:last-child) + footer.site { margin-top: 0; }

/* Two verdicts: draft and Chrome */
table.verdicts { width: auto; margin: 0 0 12px; font-size: 15px; }
table.verdicts th { font-weight: 600; padding-left: 0; white-space: nowrap; }
table.verdicts td { color: var(--muted); }
table.verdicts tr:last-child > * { border-bottom: 0; }
.form-label { margin: 14px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.form-label + pre { margin-top: 0; }
h2.sub { font-size: 1.2rem; font-weight: 600; margin: 28px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Guide */
.guide { max-width: 800px; }
.guide > p, .guide li, .guide dd { color: var(--fg); }
.guide h2 { scroll-margin-top: 16px; }
.guide h3 { font-size: 1.1rem; margin: 28px 0 6px; }
.guide pre { margin: 6px 0 4px; }
.check-link { margin: 0 0 12px; font-size: 14px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--band); padding: 14px 20px; margin: 8px 0 8px; }
.toc p { margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 32px; }
.toc li { break-inside: avoid; }
.guide table ul { margin: 0; padding-left: 18px; }
dl.faq dt { font-weight: 600; margin-top: 16px; }
dl.faq dd { margin: 4px 0 0; }

/* Keep header snippets in tables on one line; wide tables scroll on phones. */
td code { overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 600px) {
  .guide table, table.examples, table.matches, table.params, table.where { display: block; overflow-x: auto; }
  table.params td:nth-child(4) { min-width: 220px; }
}

/* Parameters of a pasted link */
table.params { margin: 4px 0 8px; }
table.params td:nth-child(3) { white-space: nowrap; }
.small { font-size: 14px; margin: 2px 0 0; }

/* Where a header applies */
table.where { margin: 0 0 8px; font-size: 15px; }
table.where th { font-weight: 500; white-space: nowrap; padding-left: 0; }
table.where td:last-child { color: var(--muted); }
details.snippet { border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; }
details.snippet > summary { padding: 8px 12px; font-weight: 600; color: var(--fg); }
details.snippet > pre { margin: 0; border-radius: 0 0 var(--radius) var(--radius); }
