/* The Maintenance Notebook: plain CSS, no frameworks, no web fonts (system fonts load instantly and never shift the page). */
:root {
  --bg: #fbfaf6; --surface: #ffffff; --ink: #1c1f1d; --muted: #565d59; --rule: #e3e0d6;
  --accent: #a8410c; --accent-ink: #ffffff; --link: #a8410c;
  --stop-bg: #fdf0ee; --stop-line: #b42318; --stop-ink: #7a1b12;
  --ok-bg: #eef6ef; --ok-line: #2f6f3e; --warn-bg: #fff6e5; --warn-line: #b25e09; --pro-bg: #f1f0f7; --pro-line: #4b3fa0;
  --r: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141614; --surface: #1b1e1c; --ink: #ecebe5; --muted: #a8aea9; --rule: #2c302d;
    --accent: #f19a63; --accent-ink: #1a1208; --link: #f19a63;
    --stop-bg: #2a1816; --stop-line: #f97066; --stop-ink: #ffd5d0;
    --ok-bg: #16251a; --ok-line: #6fcf84; --warn-bg: #2a2012; --warn-line: #f0b25a; --pro-bg: #1f1d2b; --pro-line: #a79bff;
    --shadow: none;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.125rem/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.prose { max-width: 44rem; margin: 0 auto; }
.prose-wide { max-width: 60rem; margin: 0 auto; }

.site-header { border-bottom: 1px solid var(--rule); background: var(--surface); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand-mark { display: block; border-radius: 8px; flex: none; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: 6px 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); font-weight: 800; margin: 0.4em 0 0.3em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); margin: 2em 0 0.6em; scroll-margin-top: 16px; }
h3 { font-size: 1.15rem; margin: 0 0 0.3em; }
.lede { font-size: 1.25rem; color: var(--muted); margin: 0 0 1em; }
.byline { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.4em; }
.crumbs { font-size: 0.95rem; color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
.hero { padding-top: clamp(32px, 7vw, 80px); padding-bottom: 24px; }
.hero h1 { max-width: 20ch; }
.hero .lede { max-width: 38rem; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 12px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 8px 16px; font-size: 1rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--rule); }

.grid { list-style: none; margin: 0 0 1em; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 a, .card > a { text-decoration: none; color: var(--ink); }
.card > a:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); }
.card p { margin: 0 0 0.6em; font-size: 1rem; color: var(--muted); }
.card .count { font-size: 0.9rem; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge { font-size: 0.8rem; font-weight: 600; background: var(--bg); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; color: var(--ink); }
.badge.draft { background: var(--warn-bg); border-color: var(--warn-line); }
section.wrap { padding-bottom: 8px; }
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 1.6em; position: relative; margin: 0 0 0.7em; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok-line); font-weight: 800; }

.guide { padding-bottom: 48px; }
.body > :first-child { margin-top: 0; }
.body ol, .body ul { padding-left: 1.4em; } .body li { margin: 0 0 0.6em; }
.body li::marker { color: var(--accent); font-weight: 700; }
.body strong { font-weight: 700; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 0 1.4em; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.summary > div { padding: 12px 16px; background: var(--surface); }
.summary dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.summary dd { margin: 2px 0 0; font-weight: 600; font-size: 1rem; line-height: 1.4; }
.summary .tools { grid-column: 1 / -1; }
.summary .tools dd { font-weight: 400; }
@media (max-width: 34rem) { .summary { grid-template-columns: 1fr 1fr; } .summary > div:nth-child(3) { grid-column: 1 / -1; } }
.callout { border: 1px solid var(--rule); border-left-width: 6px; border-radius: var(--r); padding: 4px 20px 14px; margin: 1.6em 0; background: var(--surface); }
.callout h2 { font-size: 1.15rem; margin: 0.8em 0 0.4em; }
.callout p, .callout li { font-size: 1rem; }
.callout ul { padding-left: 1.2em; margin: 0.4em 0 0; }
.callout.safety.green { background: var(--ok-bg); border-left-color: var(--ok-line); }
.callout.safety.caution { background: var(--warn-bg); border-left-color: var(--warn-line); }
.callout.safety.pro { background: var(--pro-bg); border-left-color: var(--pro-line); }
.callout.stop { background: var(--stop-bg); border-left-color: var(--stop-line); }
.callout.stop h2 { color: var(--stop-ink); }
.callout.pro { border-left-color: var(--accent); }
.callout .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.callout .tel { white-space: nowrap; font-weight: 600; }
.callout .fine { font-size: 0.9rem; color: var(--muted); }
.toc { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 4px 20px 12px; margin: 1.4em 0; }
.toc h2 { font-size: 1rem; margin: 0.8em 0 0.3em; }
.toc ol { margin: 0; padding-left: 1.3em; font-size: 1rem; } .toc li { margin: 0 0 0.2em; }
.faq details { border-top: 1px solid var(--rule); padding: 12px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 0.6em 0 0; }
.related { margin-top: 2em; }
.author { margin-top: 2em; padding: 16px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); font-size: 1rem; }
.author p { margin: 0; }
.draft-banner { background: var(--warn-bg); border: 2px dashed var(--warn-line); border-radius: var(--r); padding: 10px 16px; margin-top: 1em; }

/* Advertisements: the space is reserved up front, so ads never push the page around (that keeps the page fast and stable). */
.ad { margin: 2em 0; min-height: 280px; text-align: center; }
.ad-label { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.site-footer { border-top: 1px solid var(--rule); margin-top: 48px; padding: 28px 0 40px; font-size: 0.95rem; color: var(--muted); }
.site-footer p { margin: 0 0 0.7em; max-width: 46rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0 0 0.7em; padding: 0; }
.site-footer a { color: var(--ink); }

@media print {
  .site-header, .site-footer, .ad, .toc, .skip, .btn, .callout.pro { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- search ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.search { display: flex; align-items: stretch; flex: 0 1 17rem; min-width: 11rem; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 8px 12px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--rule); border-right: 0; border-radius: 10px 0 0 10px; }
.search button { font: inherit; padding: 0 12px; color: var(--accent-ink); background: var(--accent); border: 1.5px solid var(--accent); border-radius: 0 10px 10px 0; cursor: pointer; display: inline-flex; align-items: center; }
.search input:focus-visible { outline-offset: -1px; }
.search.big { display: block; flex: none; margin: 0 0 1.2em; }
.search.big label { display: block; font-weight: 700; margin-bottom: 8px; }
.search-row { display: flex; gap: 10px; }
.search.big input { font-size: 1.15rem; padding: 12px 16px; border-right: 1.5px solid var(--rule); border-radius: 10px; }
.search.big .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.topics { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 1.5em; }
.topics a { display: inline-block; padding: 6px 14px; border: 1.5px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--surface); }
.topics a:hover { border-color: var(--accent); }
.partial { color: var(--muted); }
.card h2 { font-size: 1.15rem; margin: 0 0 0.3em; }
@media (max-width: 40rem) { .brand { order: 1; } .search { order: 2; flex: 1 1 100%; } .site-header nav { order: 3; flex: 1 1 100%; } }
