/* Public guides (/blog): server-rendered by src/blog/render.ts. */
:root {
  --bg: #08080a; --bg2: #0f0f12; --bg3: #141418; --code-bg: #0b0b0e;
  --line: #1f1f25; --line2: #2e2e38;
  --text: #f5f5f7; --text2: #b4b4c2; --body: #cfcfd8; --muted: #8e8e9f;
  --accent: #5f57ff; --accent-text: #a49dff; --accent-glow: rgba(95, 87, 255, .14);
  --ok: #34d399; --ok-bg: rgba(16, 185, 129, .1); --ok-line: rgba(16, 185, 129, .28);
  --warn: #fbbf24; --warn-bg: rgba(245, 158, 11, .1); --warn-line: rgba(245, 158, 11, .28); --warn-text: #f5d29a;
  --bad: #f87171; --bad-bg: rgba(239, 68, 68, .1); --bad-line: rgba(239, 68, 68, .28);
  --tok-tag: #9b8cff; --tok-str: #7dd3a8;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
/* data-theme is set before paint by the head script in render.ts (saved choice, else the system setting). */
:root[data-theme="light"] {
  --bg: #ffffff; --bg2: #f7f7f9; --bg3: #efeff3; --code-bg: #f7f7f9;
  --line: #e5e5ea; --line2: #d4d4dc;
  --text: #111114; --text2: #4a4a55; --body: #2c2c35; --muted: #6b6b78;
  --accent-text: #4e46e5; --accent-glow: rgba(95, 87, 255, .1);
  --ok: #047857; --warn: #b45309; --warn-text: #92400e; --bad: #b91c1c;
  --tok-tag: #5b4fd6; --tok-str: #047857;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
code, pre { font-family: var(--mono); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; border-radius: 8px; padding: 9px 16px; font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid var(--accent); white-space: nowrap; }
.btn:hover { background: #4e46e5; }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); }

/* Header and footer */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 18px 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.site-nav nav { display: flex; gap: 20px; align-items: center; font-size: 14px; }
.site-nav nav a:not(.btn) { color: var(--text2); text-decoration: none; }
.site-nav nav a[aria-current] { color: var(--text); }
.theme-toggle { position: relative; width: 36px; height: 36px; flex: none; border-radius: 8px; border: 1px solid var(--line2); background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { color: var(--text); background: var(--bg3); }
.theme-toggle svg { position: absolute; transition: transform .4s cubic-bezier(.4, 0, .2, 1), opacity .4s cubic-bezier(.4, 0, .2, 1); }
.theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(0); }
[data-theme="light"] .theme-toggle .sun { opacity: 1; transform: none; }
[data-theme="light"] .theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(0); }
.site-nav .btn { white-space: nowrap; }
.site-nav .btn .short { display: none; }
@media (max-width: 480px) { .site-nav { flex-wrap: wrap; row-gap: 12px; } .site-nav nav { gap: 12px; } .site-nav .btn { padding: 8px 12px; } .site-nav .btn .wide { display: none; } .site-nav .btn .short { display: inline; } }
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 28px 16px 40px; color: var(--muted); font-size: 13px; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 28px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* Index and category pages */
.hero { padding: 56px 0 24px; max-width: 760px; }
.hero-small { padding-top: 20px; }
.eyebrow { color: var(--accent-text); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; letter-spacing: -.03em; margin: 12px 0 16px; font-weight: 700; text-wrap: balance; }
.lede { color: var(--text2); font-size: 18px; max-width: 660px; }
.lede a { color: var(--accent-text); }
.section-title { font-size: 14px; font-weight: 600; color: var(--text2); letter-spacing: .02em; margin: 40px 0 12px; }
.section-title span { color: var(--muted); font-weight: 400; margin-left: 4px; }

.post-grid, .cat-grid, .check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.post-card, .cat-card, .check { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.post-card:hover, .cat-card:hover, .check:hover { border-color: var(--line2); }
.post-card h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.post-card h3 a, .check h3 a { text-decoration: none; }
.post-card h3 a:hover, .check h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-card p, .cat-card p, .check p { color: var(--text2); font-size: 14px; line-height: 1.5; }
.post-card-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.post-card-meta a { color: var(--accent-text); text-decoration: none; }
.cat-card { text-decoration: none; }
.cat-card h3 { font-size: 16px; }
.cat-card span { margin-top: auto; font-size: 12px; color: var(--muted); }
.check { scroll-margin-top: 20px; }
.check:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.check h3 { font-size: 15px; line-height: 1.35; }
.check-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 4px; }
.check-id { font-size: 11px; color: var(--muted); }
.tag { font-size: 11px; border-radius: 4px; padding: 2px 7px; font-weight: 500; text-decoration: none; }
.tag.guide { background: var(--accent-glow); color: var(--accent-text); }
details { font-size: 13px; }
details summary { cursor: pointer; color: var(--text2); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; font-family: var(--mono); color: var(--muted); }
details[open] summary::before { content: "−"; }
.fix { margin-top: 8px; display: grid; gap: 6px; }
.fix div { background: var(--bg3); border-radius: 8px; padding: 8px 10px; color: var(--text2); }
.fix b { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 2px; }
.fix code { font-size: 12px; color: var(--text); overflow-wrap: anywhere; }

.band { margin-top: 64px; border: 1px solid var(--line); border-radius: 16px; padding: 28px; background: radial-gradient(600px 200px at 0 0, var(--accent-glow), transparent), var(--bg2); display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.band h2 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.band p { color: var(--text2); margin-top: 6px; max-width: 580px; }

/* Article */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .article { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { max-width: 700px; min-width: 0; }
.prose h1 { margin-top: 14px; }
.byline { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin: 4px 0 28px; flex-wrap: wrap; }
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.prose h2 { font-size: 24px; letter-spacing: -.02em; line-height: 1.25; margin: 44px 0 12px; scroll-margin-top: 20px; }
.prose h3 { font-size: 17px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--body); font-size: 16.5px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose p code, .prose li code, .prose span code, .callout code { font-size: .86em; background: var(--bg3); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.prose strong { color: var(--text); }

.answer { border: 1px solid var(--line2); border-left: 3px solid var(--accent); background: var(--bg2); border-radius: 10px; padding: 18px 20px; margin: 0 0 8px; }
.answer .k { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.answer p { margin: 0; }
.allowed { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 2px; }
.allowed code { font-size: 13px; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); border-radius: 6px; padding: 3px 8px; }

pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.65; margin: 0 0 16px; color: var(--body); position: relative; }
pre.code { padding-top: 40px; }
/* Code inside a <pre> must not pick up the inline-code chip styles (e.g. a <pre> inside an <li>). */
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; border-radius: 0; }
pre .t { color: var(--tok-tag); } pre .s { color: var(--tok-str); } pre .m { color: var(--muted); font-style: italic; }
pre .x { background: var(--bad-bg); color: var(--bad); border-radius: 3px; padding: 0 2px; }
.copy { position: absolute; top: 8px; right: 8px; background: var(--bg3); border: 1px solid var(--line2); color: var(--text2); border-radius: 6px; font: 12px var(--sans); padding: 3px 9px; cursor: pointer; }
.copy:hover { color: var(--text); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 8px; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } }
.split figure { min-width: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.split figcaption { font-size: 12px; color: var(--text2); padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.split figcaption span { color: var(--muted); }
.split pre { border: 0; border-radius: 0; margin: 0; background: transparent; font-size: 12px; }
.prose .note { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.culprits { display: grid; gap: 8px; margin: 12px 0 18px; }
.culprit { display: grid; grid-template-columns: 150px 1fr; gap: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; }
@media (max-width: 560px) { .culprit { grid-template-columns: 1fr; gap: 4px; } }
.culprit b { font-weight: 600; }
.culprit span { color: var(--text2); }

/* Status code cards */
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; margin: 14px 0 22px; }
.status { background: var(--bg2); border: 1px solid var(--line); border-top: 3px solid var(--muted); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.status b { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.status span { color: var(--text2); line-height: 1.45; }
.status span strong { color: var(--text); }
.status.ok { border-top-color: var(--ok); } .status.ok b { color: var(--ok); }
.status.warn { border-top-color: var(--warn); } .status.warn b { color: var(--warn); }
.status.bad { border-top-color: var(--bad); } .status.bad b { color: var(--bad); }

/* Redirect flow: boxes joined by labelled arrows; stacks on phones */
.flow { display: flex; align-items: center; gap: 0; margin: 14px 0 8px; flex-wrap: wrap; }
.flow .node { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.flow .node small { color: var(--muted); font-size: 11px; }
.flow .node code { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.flow .node em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--bad); font-weight: 600; }
.flow .node.bad { border-color: var(--bad-line); background: var(--bad-bg); }
.flow .arrow { flex: 1 1 40px; min-width: 40px; height: 2px; background: var(--line2); position: relative; margin: 0 6px; }
.flow .arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--line2); border-right: 0; }
.flow .arrow span { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.flow .arrow.warn { background: var(--warn); } .flow .arrow.warn::after { border-left-color: var(--warn); } .flow .arrow.warn span { color: var(--warn); }
@media (max-width: 640px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow .arrow { flex: none; width: 2px; height: 28px; min-width: 0; margin: 2px 0 2px 22px; }
  .flow .arrow::after { right: auto; top: auto; bottom: -1px; left: -4px; border: 5px solid transparent; border-top: 7px solid var(--warn); border-bottom: 0; }
  .flow .arrow span { left: 14px; top: 50%; transform: translateY(-50%); }
}

/* Several sources combined into one result (e.g. robots meta + header) */
.merge { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 210px); align-items: center; gap: 0; margin: 16px 0 8px; }
.merge-sources { display: grid; gap: 8px; min-width: 0; }
.src, .merge-result { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.src small, .merge-result small { color: var(--muted); font-size: 11px; }
.src code { font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.src code.none { color: var(--muted); font-style: italic; }
.src.bad, .merge-result.bad { border-color: var(--bad-line); background: var(--bad-bg); }
.src.bad code { color: var(--bad); }
.merge-arrow { position: relative; height: 2px; background: var(--line2); margin: 0 8px; }
.merge-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--line2); border-right: 0; }
.merge-arrow span { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.merge-result strong { font-family: var(--mono); font-size: 15px; color: var(--bad); overflow-wrap: anywhere; }
.merge-result.ok { border-color: var(--ok-line); background: var(--ok-bg); }
.merge-result.ok strong { color: var(--ok); }
.merge-result span { font-size: 13px; color: var(--text2); }
@media (max-width: 640px) {
  .merge { grid-template-columns: minmax(0, 1fr); }
  .merge-arrow { width: 2px; height: 34px; margin: 4px 0 4px 22px; }
  .merge-arrow::after { right: auto; top: auto; bottom: -1px; left: -4px; border: 5px solid transparent; border-top: 7px solid var(--line2); border-bottom: 0; }
  .merge-arrow span { left: 14px; bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* Phone mockups: the same mini page laid out at phone width, or at desktop width and shrunk */
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; gap: 28px; margin: 18px 0 10px; }
.phone { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.phone-screen { aspect-ratio: 9 / 17; border: 6px solid var(--line2); border-radius: 26px; background: #fff; overflow: hidden; position: relative; }
.phone.ok .phone-screen { border-color: var(--ok-line); }
.phone.bad .phone-screen { border-color: var(--bad-line); }
.phone figcaption { font-size: 13px; color: var(--text2); line-height: 1.45; }
.phone figcaption b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.phone.ok figcaption b { color: var(--ok); } .phone.bad figcaption b { color: var(--bad); }
.phone figcaption code { font-size: 11px; }
.mini-page { font-family: var(--sans); color: #111114; width: 100%; }
/* Desktop proportions, then shrunk to fit: what a phone does without a viewport tag */
/* About 980px of layout squeezed into the screen, as phone browsers do by default */
.zoomed-out .mini-page { width: 476%; transform: scale(.21); transform-origin: 0 0; }
.zoomed-out .mini-nav { padding: 20px 40px; gap: 24px; }
.zoomed-out .mini-nav i { width: 32px; height: 32px; border-radius: 8px; }
.zoomed-out .mini-nav span { width: 70px; height: 10px; }
.zoomed-out .mini-hero { padding: 70px 40px; }
.zoomed-out .mini-hero b { font-size: 44px; }
.prose .zoomed-out .mini-hero p { font-size: 17px; margin: 12px 0 22px; }
.zoomed-out .mini-hero em { font-size: 15px; padding: 10px 18px; border-radius: 8px; }
.zoomed-out .mini-cards { padding: 40px; gap: 24px; }
.zoomed-out .mini-cards i { height: 260px; border-radius: 12px; }
.phone-screen:not(.zoomed-out) .mini-cards i:nth-child(n+4) { display: none; }
.mini-nav { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #e5e5ea; }
.mini-nav i { width: 16px; height: 16px; border-radius: 4px; background: #5f57ff; margin-right: auto; }
.mini-nav span { width: 22px; height: 5px; border-radius: 3px; background: #d4d4dc; }
.mini-hero { padding: 16px 12px; background: linear-gradient(160deg, #eeedff, #fff); }
.mini-hero b { display: block; font-size: 20px; letter-spacing: -.02em; }
.prose .mini-hero p { font-size: 12px; color: #4a4a55; margin: 6px 0 10px; line-height: 1.4; }
.mini-hero em { font-style: normal; display: inline-block; background: #5f57ff; color: #fff; font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.mini-cards { display: grid; gap: 8px; padding: 12px; }
.mini-cards i { height: 52px; border-radius: 8px; background: #efeff3; }
.zoomed-out .mini-cards { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .phones { gap: 14px; } .phone figcaption { font-size: 12px; } }

/* Text measured against a pixel limit, drawn in the real font */
.serp-measure { margin: 14px 0 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.serp-measure svg { width: 100%; height: auto; display: block; }
.serp-measure .t { font-family: Arial, Helvetica, sans-serif; font-size: 20px; fill: var(--accent-text); }
.serp-measure .t.over { fill: var(--muted); opacity: .45; }
.serp-measure .small { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.serp-measure .small.bad { fill: var(--bad); }
.serp-measure .limit { stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 4 4; }
.serp-measure .limit-label { font-family: var(--mono); font-size: 11px; fill: var(--bad); }
.serp-measure figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* A URL with its problems marked, and the clean version */
.url-anatomy { margin: 14px 0 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.url-anatomy code { font-size: 13px; overflow-wrap: anywhere; line-height: 1.7; }
.url-anatomy .url-bad { color: var(--text2); }
.url-anatomy mark { background: var(--bad-bg); color: var(--bad); border-bottom: 2px solid var(--bad); padding: 0 1px; }
.url-anatomy .url-good { color: var(--ok); }
.url-anatomy .url-good::before { content: "✓ "; font-family: var(--sans); }
.prose .url-anatomy ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.prose .url-anatomy li { font-size: 12.5px; color: var(--muted); margin: 0; }
.url-anatomy li b { font-family: var(--mono); color: var(--bad); font-weight: 500; }

/* Heading outlines, indented by level */
.outline-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 8px; }
@media (max-width: 640px) { .outline-pair { grid-template-columns: minmax(0, 1fr); } }
.outline { margin: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.outline figcaption { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 4px; }
.outline span { color: var(--text2); border-left: 2px solid var(--line2); padding-left: 8px; }
.outline .l1 { color: var(--text); font-weight: 600; }
.outline .l2 { margin-left: 14px; } .outline .l3 { margin-left: 28px; } .outline .l4 { margin-left: 42px; }
.outline .bad { color: var(--bad); border-left-color: var(--bad); }
.outline .ok { color: var(--ok); border-left-color: var(--ok); }
.outline .gap { border-left: 0; padding-left: 22px; color: var(--muted); font-size: 12px; }
.outline em { font-style: normal; font-size: 11px; margin-left: 6px; background: var(--bad-bg); border-radius: 4px; padding: 1px 6px; }

/* Search result mock-ups */
.serp-cards { display: grid; gap: 10px; margin: 14px 0 10px; }
.serp-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; font-family: Arial, Helvetica, sans-serif; max-width: 640px; }
.serp-url { font-size: 12px; color: var(--text2); }
.serp-title { font-size: 19px; color: var(--accent-text); line-height: 1.3; }
.serp-snippet { font-size: 14px; color: var(--text2); line-height: 1.55; }
.serp-snippet.cut { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.serp-card small { font-family: var(--sans); font-size: 12px; margin-top: 4px; }
.serp-card small.ok { color: var(--ok); } .serp-card small.bad { color: var(--bad); }

/* A code sample with its parser error underneath */
.code-error { margin: 14px 0 8px; border: 1px solid var(--bad-line); border-radius: 10px; overflow: hidden; background: var(--code-bg); }
.code-error pre { border: 0; border-radius: 0; margin: 0; }
.code-error figcaption { border-top: 1px solid var(--bad-line); background: var(--bad-bg); padding: 10px 14px; font-size: 13.5px; color: var(--text2); }
.code-error figcaption b { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--bad); font-weight: 500; margin-bottom: 4px; }

/* A set of pages that list each other (hreflang) */
.cluster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 8px; }
@media (max-width: 640px) { .cluster { grid-template-columns: minmax(0, 1fr); } }
.cluster-page { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cluster-page.bad { border-color: var(--bad-line); }
.cluster-page b { font-family: var(--mono); font-size: 12px; color: var(--text); overflow-wrap: anywhere; margin-bottom: 2px; }
.cluster-page span { font-family: var(--mono); font-size: 12px; padding-left: 18px; position: relative; color: var(--text2); }
.cluster-page span::before { position: absolute; left: 0; font-family: var(--sans); font-weight: 700; }
.cluster-page span.ok::before { content: "✓"; color: var(--ok); }
.cluster-page span.bad { color: var(--bad); }
.cluster-page span.bad::before { content: "✗"; color: var(--bad); }

/* A small browser window drawn in CSS */
.mini-browser { background: #fff; color: #111114; font-family: var(--sans); height: 100%; min-height: 190px; display: flex; flex-direction: column; }
.mini-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: #efeff3; border-bottom: 1px solid #e0e0e6; }
.mini-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d0d0d8; }
.mini-bar span { margin-left: 8px; flex: 1; background: #fff; border-radius: 4px; padding: 2px 8px; font-family: var(--mono); font-size: 10.5px; color: #6b6b78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; gap: 6px; }
.mini-body b { font-size: 16px; letter-spacing: -.01em; }
.prose .mini-body p { font-size: 12.5px; color: #4a4a55; margin: 0 0 6px; }
.mini-body em { font-style: normal; font-size: 12px; font-weight: 600; background: #5f57ff; color: #fff; border-radius: 6px; padding: 6px 12px; }

/* Plain data tables inside articles */
.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--text2); }
table.data thead th { border-top: 0; background: var(--bg2); color: var(--muted); font-weight: 500; font-size: 12px; }
table.data tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
table.data code { font-size: .9em; background: var(--bg3); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; color: var(--text); }
table.data.crawler-map { min-width: 660px; table-layout: fixed; }
table.data.crawler-map td { overflow-wrap: anywhere; }
table.data.crawler-map .none { color: var(--muted); }
table.data .ok { color: var(--ok); } table.data .warn { color: var(--warn); } table.data .bad { color: var(--bad); }

.method { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px 6px; margin: 14px 0; background: var(--bg2); }
.method h3 { display: flex; gap: 10px; align-items: center; }
.method h3 i { font-style: normal; font-size: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.method .time { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: auto; }
.prose .callout { border-radius: 10px; padding: 12px 14px; font-size: 14.5px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); }

.auto { margin: 48px 0 0; border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; background: var(--bg2); scroll-margin-top: 20px; }
.auto-top { padding: 24px 24px 4px; }
.auto-top .eyebrow { font-size: 12px; margin: 0; }
.prose .auto h2 { margin: 6px 0 8px; }
.prose .ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.ticks li { padding-left: 24px; position: relative; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.ticket { margin: 20px 24px 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--bg); padding: 14px 16px 0; font-size: 13px; overflow-x: auto; }
.ticket-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg3); color: var(--text2); font-weight: 500; }
.pill.bad { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.pill.warn { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.prose .ticket-src { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.prose .ticket-err { margin: 4px 0 0; font-size: 12px; }
.prose .ticket-err code { color: var(--bad); }
.prose .ticket-title { font-size: 15px; margin: 8px 0 2px; font-weight: 600; color: var(--text); }
.ticket-url { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.ticket-sec { margin-top: 12px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ticket table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; }
.ticket td, .ticket th { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.ticket th { color: var(--muted); font-weight: 500; }
.ticket code { font-size: 11.5px; }
.ticket .bad { color: var(--bad); }
.ticket .warn { color: var(--warn); }
.auto-cta { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 24px 24px; border-top: 1px solid var(--line); background: var(--bg3); }

.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; margin-top: 12px; }
.related a { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; font-size: 14px; }
.related a:hover { border-color: var(--line2); }
.related small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: 4px; }

.toc { position: sticky; top: 24px; font-size: 13px; padding-top: 110px; }
.toc b { display: block; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.toc > a { display: block; color: var(--text2); text-decoration: none; padding: 5px 0 5px 12px; border-left: 1px solid var(--line); }
.toc > a:hover { color: var(--text); border-color: var(--accent); }
.toc .side { margin-top: 24px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg2); }
.toc .side p { color: var(--text2); margin: 6px 0 10px; font-size: 13px; line-height: 1.5; }
.toc .side .btn { width: 100%; }

/* Playbook: the step list, previous/next links and the steps in the sidebar. */
.chapter-list { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 10px; counter-reset: none; }
.chapter-list a { display: flex; gap: 16px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--text); }
.chapter-list a:hover { border-color: var(--line2); }
.chapter-list b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.chapter-list small { display: block; color: var(--text2); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.chapter-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; color: var(--accent-text); background: var(--accent-glow); border: 1px solid var(--line2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 48px; }
.pager a { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; background: var(--bg2); color: var(--text); font-weight: 500; }
.pager a:hover { border-color: var(--line2); }
.pager small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-bottom: 2px; }
.pager .next { grid-column: 2; text-align: right; }
.toc .toc-steps { margin-top: 24px; }
.toc > a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; text-align: left; } }
