:root {
  --bg: #f7f8fc;
  --bg-elev: #ffffff;
  --bg-soft: #eef1f8;
  --border: #e2e6f0;
  --border-strong: #cdd4e4;
  --text: #171a23;
  --text-dim: #5b6478;
  --text-faint: #8a93a8;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --brand-border: #c7d2fe;
  --accent: #0ea5a4;
  --accent-soft: #ccfbf1;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 25, 40, .06);
  --shadow: 0 2px 8px rgba(20, 25, 40, .07);
  --shadow-lg: 0 12px 32px rgba(20, 25, 40, .12);
  --maxw: 1200px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; color: var(--brand); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 800;
}
.main-nav { display: flex; gap: 4px; margin-left: 4px; }
.main-nav a {
  padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 14.5px; font-weight: 500;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.main-nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
}
.lang-switch:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  cursor: pointer; color: var(--text); align-items: center; justify-content: center;
}

/* ── Search ──────────────────────────────────────── */
.search-box { position: relative; flex: 1; max-width: 340px; }
.search-box input {
  width: 100%; height: 38px; padding: 0 14px 0 36px;
  border: 1px solid var(--border-strong); border-radius: 100px;
  background: var(--bg-elev); font-family: inherit; font-size: 14.5px; color: var(--text);
}
.search-box input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none; font-size: 15px;
}
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 120;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 420px; overflow-y: auto; display: none; padding: 6px;
}
.search-results.open { display: block; }
.search-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: var(--radius-sm); color: var(--text); font-size: 14.5px;
}
.search-item:hover, .search-item.sel { background: var(--brand-soft); text-decoration: none; }
.search-item .si-icon {
  width: 26px; height: 26px; border-radius: 6px; background: var(--bg-soft);
  display: grid; place-items: center; font-size: 14px; flex-shrink: 0;
}
.search-item .si-name { font-weight: 600; }
.search-item .si-cat { margin-left: auto; font-size: 12px; color: var(--text-faint); flex-shrink: 0; }
.search-empty { padding: 22px 14px; text-align: center; color: var(--text-faint); font-size: 14px; }
mark { background: #fef08a; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ── Hero ────────────────────────────────────────── */
.hero { padding: 52px 0 34px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 14px; letter-spacing: -.025em; }
.hero .sub { font-size: 17px; color: var(--text-dim); max-width: 640px; margin: 0 auto 22px; }
.hero-stats {
  display: flex; justify-content: center; gap: 10px 34px; flex-wrap: wrap;
  margin-top: 26px;
}
.hero-stat { text-align: center; }
.hero-stat b { display: block; font-size: 25px; color: var(--brand); font-weight: 800; line-height: 1.2; }
.hero-stat span { font-size: 13px; color: var(--text-faint); }

.search-hero { max-width: 560px; margin: 0 auto; }
.search-hero input {
  width: 100%; height: 50px; padding: 0 18px 0 46px; font-size: 15.5px;
  border: 1px solid var(--border-strong); border-radius: 100px;
  background: var(--bg-elev); font-family: inherit; color: var(--text);
  box-shadow: var(--shadow);
}
.search-hero input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-hero .search-box { max-width: none; }

/* ── Section ─────────────────────────────────────── */
.section { padding: 38px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 23px; margin: 0; }
.section-head .count { font-size: 13.5px; color: var(--text-faint); }
.section-head .more { margin-left: auto; font-size: 14px; font-weight: 600; }

/* ── Category grid ───────────────────────────────── */
.cat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
}
.cat-card {
  display: block; padding: 16px 18px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); transition: .16s;
}
.cat-card:hover {
  text-decoration: none; border-color: var(--brand);
  box-shadow: var(--shadow); transform: translateY(-2px);
}
.cat-card .cc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cat-card .cc-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 17px;
  background: var(--brand-soft);
}
.cat-card .cc-name { font-weight: 700; color: var(--text); font-size: 15.5px; }
.cat-card .cc-num { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.cat-card .cc-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }

/* ── Tool grid ───────────────────────────────────── */
.tool-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.tool-card {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); transition: .16s; color: var(--text);
}
.tool-card:hover {
  text-decoration: none; border-color: var(--brand);
  box-shadow: var(--shadow); transform: translateY(-1px);
}
.tool-card .tc-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 16px;
  background: var(--bg-soft);
}
.tool-card .tc-body { min-width: 0; }
.tool-card .tc-name { font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.tool-card .tc-desc {
  font-size: 12.8px; color: var(--text-faint); line-height: 1.45; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Page layout (tool/game detail) ──────────────── */
.page-grid {
  display: grid; gap: 28px; align-items: start;
  grid-template-columns: minmax(0, 1fr) 300px;
}
.page-main { min-width: 0; }
.breadcrumb { font-size: 13.5px; color: var(--text-faint); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb .sep { margin: 0 7px; opacity: .5; }

.page-title { font-size: clamp(24px, 4vw, 31px); margin-bottom: 8px; }
.page-desc { color: var(--text-dim); font-size: 16px; margin-bottom: 6px; }
.page-meta { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }

.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-title { font-size: 16.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* ── Tool widget ─────────────────────────────────── */
.tool-io { display: grid; gap: 14px; }
@media (min-width: 860px) {
  .tool-io.two-col { grid-template-columns: 1fr 1fr; }
}
.field { display: block; }
.field-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em;
}
.field-label .grow { margin-left: auto; display: flex; gap: 6px; }

textarea, input[type="text"], input[type="number"], select {
  width: 100%; padding: 10px 12px; font-family: var(--mono); font-size: 13.5px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); line-height: 1.6;
}
textarea { resize: vertical; min-height: 148px; }
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type="text"].sans, .sans { font-family: var(--font); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="color"] {
  width: 46px; height: 34px; padding: 2px; border: 1px solid var(--border-strong);
  border-radius: 6px; background: var(--bg); cursor: pointer;
}
input[type="checkbox"] { accent-color: var(--brand); width: 16px; height: 16px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  color: var(--text-dim); font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: .14s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.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-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

.alert {
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px;
  margin: 12px 0; display: none;
}
.alert.show { display: block; }
.alert-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-info { background: var(--brand-soft); border: 1px solid var(--brand-border); color: var(--brand-dark); }

.result-line {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--border); font-size: 14px;
}
.result-line:last-child { border-bottom: 0; }
.result-line .rl-k { color: var(--text-dim); flex-shrink: 0; min-width: 96px; font-size: 13.5px; }
.result-line .rl-v { font-family: var(--mono); font-size: 13.5px; word-break: break-all; flex: 1; }

.stat-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.stat-tile {
  padding: 13px; border-radius: var(--radius-sm);
  background: var(--bg-soft); text-align: center;
}
.stat-tile b { display: block; font-size: 21px; font-weight: 800; color: var(--text); line-height: 1.3; }
.stat-tile span { font-size: 12.5px; color: var(--text-faint); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 78px; height: 62px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); cursor: pointer; position: relative;
  display: grid; place-items: end center; padding-bottom: 4px;
  font-size: 10.5px; font-family: var(--mono);
}
.swatch:hover { transform: scale(1.05); z-index: 2; }

.copy-out {
  display: flex; gap: 8px; align-items: flex-start;
}
.copy-out textarea, .copy-out > div:first-child { flex: 1; min-width: 0; }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar { position: sticky; top: 82px; }
.side-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 17px; margin-bottom: 16px;
}
.side-title {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-faint); margin-bottom: 11px;
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin-bottom: 3px; }
.side-list a {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  border-radius: var(--radius-sm); color: var(--text-dim); font-size: 14px;
}
.side-list a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.side-list a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.side-list .sl-icon { flex-shrink: 0; opacity: .8; }

/* ── Ads ─────────────────────────────────────────── */
.ad-slot {
  margin: 20px 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px;
  background: repeating-linear-gradient(45deg, #fafbfe, #fafbfe 10px, #f4f6fc 10px, #f4f6fc 20px);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  color: var(--text-faint); overflow: hidden; min-height: 60px;
}
.ad-slot.filled { background: none; border: 0; min-height: 0; }
.ad-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.ad-dim { font-size: 11px; opacity: .6; }
.ad-slot.is-empty { display: none; }
@media (max-width: 860px) {
  .ad-slot[data-slot="header"], .ad-slot[data-slot="footer"] { max-width: 100%; }
}

/* ── Prose (about / privacy / guides) ─────────────── */
.prose { max-width: 760px; }
.prose h2 { font-size: 21px; margin: 34px 0 12px; padding-top: 6px; }
.prose h3 { font-size: 17px; margin: 24px 0 9px; }
.prose p { margin: 0 0 14px; color: var(--text-dim); }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 24px; color: var(--text-dim); }
.prose li { margin-bottom: 7px; }
.prose code {
  background: var(--bg-soft); padding: 2px 6px; border-radius: 5px;
  font-family: var(--mono); font-size: 13px; color: var(--brand-dark);
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; }
.prose blockquote {
  margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--brand-dark);
}
.toc {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 26px;
}
.toc-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 26px; font-size: 14px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  margin-top: 60px; padding: 42px 0 26px;
  background: var(--bg-elev); border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; gap: 30px;
  grid-template-columns: 1.6fr repeat(3, 1fr);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-dim); font-size: 14px; }
.footer-col a:hover { color: var(--brand); }
.footer-about p { color: var(--text-dim); font-size: 14px; margin: 10px 0 0; max-width: 300px; }
.footer-bottom {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-faint);
}

/* ── Game ────────────────────────────────────────── */
.game-stage {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; min-height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.game-hud {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 16px; width: 100%;
}
.hud-pill {
  padding: 5px 13px; border-radius: 100px; background: var(--bg-soft);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.hud-pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.hud-pill.hi { background: var(--brand-soft); color: var(--brand-dark); }
.hud-pill.ok { background: #d1fae5; color: #065f46; }
.hud-pill.bad { background: #fee2e2; color: #991b1b; }

.game-arena {
  position: relative; width: 100%; max-width: 560px; height: 340px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  display: grid; place-items: center; user-select: none; touch-action: manipulation;
}
.game-arena.pad { display: block; }
.game-msg {
  text-align: center; color: var(--text-dim); font-size: 15.5px; padding: 20px;
  max-width: 400px;
}
.game-msg .big { font-size: 27px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.game-msg .hint { font-size: 13.5px; color: var(--text-faint); margin-top: 10px; }

.pad-grid { display: grid; width: 100%; height: 100%; }
.pad-cell {
  display: grid; place-items: center; font-size: 30px; font-weight: 800;
  color: #fff; cursor: pointer; user-select: none; transition: background .08s;
  border: 2px solid var(--bg-elev);
}
.pad-cell:active { filter: brightness(.82); }
.pad-cell.flash { background: var(--brand) !important; }
.seq-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.seq-key {
  width: 62px; height: 62px; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: 25px; font-weight: 800;
  color: #fff; cursor: pointer; user-select: none; transition: transform .08s, filter .08s;
}
.seq-key:active { transform: scale(.9); filter: brightness(1.25); }
.seq-key.lit { filter: brightness(1.4); transform: scale(1.07); box-shadow: 0 0 0 3px var(--brand); }

.grip-area { position: relative; width: 100%; height: 100%; cursor: crosshair; }
.grip-target {
  position: absolute; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 20px; transform: translate(-50%, -50%);
  box-shadow: 0 3px 14px rgba(0, 0, 0, .2);
}
.grip-cursor {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--brand); transform: translate(-50%, -50%); pointer-events: none;
}

.catch-item {
  position: absolute; width: 42px; height: 42px; border-radius: 9px;
  display: grid; place-items: center; font-size: 21px; color: #fff;
  transform: translate(-50%, -50%); box-shadow: var(--shadow);
}
.catch-tray {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: var(--brand-soft); border-top: 2px dashed var(--brand-border);
  display: grid; place-items: center; font-size: 12.5px; color: var(--brand-dark); font-weight: 600;
}

.bar-track { width: 100%; height: 12px; background: var(--bg-soft); border-radius: 100px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 100px; transition: width .12s linear; }
.bar-fill.ok { background: var(--ok); }
.bar-fill.bad { background: var(--danger); }
.bar-fill.warn { background: var(--warn); }

.record-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.record-table th, .record-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.record-table th { font-size: 12.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.record-table td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.record-table tr:last-child td { border-bottom: 0; }

.guide-list { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14.5px; }
.guide-list li { margin-bottom: 8px; }
kbd {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; font-family: var(--mono); font-size: 12.5px; color: var(--text);
}

/* ── Misc ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 12px; font-weight: 600;
}
.pill-game { background: var(--accent-soft); color: #0f766e; }

.breadcrumb-bar { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.breadcrumb-bar .wrap { padding-top: 9px; padding-bottom: 9px; }

.mobile-only { display: none; }
@media (max-width: 940px) {
  .page-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .search-box { display: none; }
  .header-inner { gap: 12px; }
  .mobile-only { display: block; }
  .cat-grid, .tool-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .toc ol { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
}
