:root {
  --ink: #17232b;
  --ink-soft: #4e606b;
  --muted: #71818a;
  --line: #dce5e8;
  --line-strong: #c7d4d9;
  --paper: #ffffff;
  --wash: #f4f8f8;
  --blue-wash: #eef5f7;
  --teal: #0a6f72;
  --teal-dark: #07585b;
  --teal-pale: #dceff0;
  --navy: #173d50;
  --amber: #a96012;
  --amber-pale: #fff2dc;
  --violet: #665b89;
  --violet-pale: #efedf6;
  --shadow: 0 18px 48px rgba(22, 52, 63, .08);
  --radius: 14px;
  --sidebar: 256px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 86px; }
body { margin: 0; background: var(--paper); line-height: 1.55; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: white; }
.skip-link:focus { top: 10px; }

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: 72px; display: grid;
  grid-template-columns: var(--sidebar) minmax(260px, 640px) 1fr; align-items: center;
  gap: 28px; padding: 0 32px 0 24px; background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--navy); color: white; font-weight: 800; font-size: 17px; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 14px; letter-spacing: .01em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.top-search { width: 100%; }
.search-box { height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 10px 0 13px; background: var(--wash); border: 1px solid transparent; border-radius: 9px; transition: .2s ease; }
.search-box:focus-within { background: white; border-color: #8db8ba; box-shadow: 0 0 0 3px var(--teal-pale); }
.search-box svg, .hero-search svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
kbd { min-width: 24px; padding: 2px 7px; text-align: center; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--muted); font: 11px/18px ui-monospace, SFMono-Regular, Consolas, monospace; box-shadow: 0 1px 0 var(--line); }
.edition-pill { justify-self: end; padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.menu-button { display: none; width: 44px; height: 44px; padding: 11px; border: 0; background: transparent; }
.menu-button span { display: block; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 2px; }

.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); padding-top: 72px; }
.sidebar { position: fixed; top: 72px; bottom: 0; left: 0; z-index: 20; width: var(--sidebar); display: flex; flex-direction: column; padding: 28px 20px 20px; border-right: 1px solid var(--line); background: #fbfdfd; overflow-y: auto; }
.sidebar nav { display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 42px; padding: 8px 10px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: 13px; font-weight: 600; }
.nav-link span { color: #9ba9ae; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.nav-link:hover, .nav-link.active { color: var(--teal-dark); background: var(--teal-pale); }
.nav-link.active span { color: var(--teal); }
.sidebar-note { margin-top: auto; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sidebar-meta { margin: 13px 4px 0; color: #8a989e; font: 9px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.sidebar-backdrop { display: none; }
main { grid-column: 2; min-width: 0; }

.intro { padding: 68px clamp(32px, 6vw, 92px) 72px; background: linear-gradient(180deg, #f7fbfb 0%, #fff 84%); border-bottom: 1px solid var(--line); }
.eyebrow, .section-kicker { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 50px; align-items: end; max-width: 1180px; }
h1 { max-width: 820px; margin: 13px 0 12px; font-size: clamp(37px, 5vw, 66px); line-height: .98; letter-spacing: -.055em; font-weight: 760; }
h1 span { color: var(--teal); font-weight: 430; }
.lead { max-width: 720px; margin: 0; color: var(--ink-soft); font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.edition-card { padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 5px 5px 12px 12px; background: white; box-shadow: var(--shadow); }
.edition-card span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.edition-card strong { display: block; margin: 5px 0 9px; font-size: 20px; }
.edition-card code { color: var(--teal-dark); font-size: 11px; }
.hero-search-wrap { max-width: 920px; margin-top: 42px; }
.hero-search { min-height: 70px; display: flex; align-items: center; gap: 16px; padding: 10px 11px 10px 22px; border: 1px solid var(--line-strong); border-radius: 12px; background: white; box-shadow: 0 10px 32px rgba(21, 59, 74, .08); }
.hero-search svg { width: 23px; height: 23px; }
.hero-search > span { min-width: 0; flex: 1; }
.hero-search small { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.hero-search input { width: 100%; padding: 3px 0 0; border: 0; outline: 0; color: var(--ink); font-size: 15px; }
.hero-search button { min-height: 46px; padding: 0 23px; border: 0; border-radius: 8px; background: var(--teal); color: white; font-weight: 700; cursor: pointer; }
.hero-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-pale), 0 10px 32px rgba(21, 59, 74, .08); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 920px; margin-top: 28px; border-block: 1px solid var(--line); }
.stat { padding: 17px 18px 16px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: 22px; letter-spacing: -.03em; }
.stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.quick-paths { max-width: 1180px; margin-top: 45px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.quick-card { position: relative; min-height: 124px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.8); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.quick-card:hover { transform: translateY(-2px); border-color: #9abfc1; box-shadow: var(--shadow); }
.quick-card span { display: block; margin-bottom: 17px; color: var(--teal); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.quick-card strong { display: block; padding-right: 20px; font-size: 14px; line-height: 1.35; }
.quick-card::after { content: "→"; position: absolute; right: 16px; bottom: 15px; color: var(--teal); }

.doc-section { padding: 76px clamp(32px, 6vw, 92px); border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; max-width: 1180px; margin-bottom: 30px; }
.section-heading > div { display: flex; align-items: baseline; gap: 17px; }
.section-number { color: var(--teal); font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.section-heading p { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: 13px; }

.map-section { background: var(--wash); }
.schematic-card { max-width: 1180px; padding: 24px 26px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); overflow: hidden; }
.map-legend { display: flex; justify-content: flex-end; gap: 20px; color: var(--muted); font-size: 10px; }
.map-legend span { display: flex; align-items: center; gap: 7px; }
.map-legend i { width: 22px; display: block; border-top: 2px solid var(--teal); }
.map-legend .line-cross { border-top-style: dashed; border-top-color: var(--violet); }
.resource-map { width: 100%; height: auto; min-height: 360px; margin: 8px 0 2px; }
.map-edge { fill: none; stroke: #a9c2c7; stroke-width: 2; }
.map-edge.cross { stroke: #9187aa; stroke-dasharray: 6 6; }
.map-arrow { fill: #87aab0; }
.map-node { cursor: pointer; outline: none; }
.map-node rect { fill: white; stroke: #c5d4d8; stroke-width: 1.5; rx: 10; transition: .18s ease; }
.map-node.main rect { fill: #f6fbfb; }
.map-node.cross rect { fill: var(--violet-pale); stroke: #cfc8df; }
.map-node:hover rect, .map-node:focus rect { stroke: var(--teal); stroke-width: 2.5; filter: drop-shadow(0 7px 10px rgba(18, 63, 73, .12)); }
.map-node-title { fill: var(--ink); font-size: 15px; font-weight: 750; }
.map-node-detail { fill: var(--muted); font-size: 10px; }
.map-node-index { fill: var(--teal); font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.map-text { display: none; }

.workflow-list { max-width: 1180px; border-top: 1px solid var(--line-strong); }
.workflow { border-bottom: 1px solid var(--line); scroll-margin-top: 86px; }
.workflow > summary { min-height: 105px; display: grid; grid-template-columns: 50px minmax(200px, 330px) minmax(260px, 1fr) 30px; gap: 20px; align-items: center; padding: 18px 4px; list-style: none; cursor: pointer; }
.workflow > summary::-webkit-details-marker { display: none; }
.workflow-index { color: var(--teal); font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.workflow-title strong { display: block; font-size: 16px; }
.workflow-title span, .workflow-summary { color: var(--ink-soft); font-size: 12px; }
.workflow-toggle { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--teal); transition: transform .18s ease; }
.workflow[open] .workflow-toggle { transform: rotate(45deg); }
.workflow-body { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(280px, .8fr); gap: 40px; padding: 0 4px 34px 70px; }
.workflow-steps { margin: 0; padding: 0; list-style: none; counter-reset: workflow-step; }
.workflow-steps li { position: relative; min-height: 39px; padding: 0 0 14px 37px; color: var(--ink-soft); font-size: 13px; counter-increment: workflow-step; }
.workflow-steps li::before { content: counter(workflow-step); position: absolute; left: 0; top: -1px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-pale); color: var(--teal-dark); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.workflow-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.tool-link { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--teal-dark); background: white; text-decoration: none; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.tool-link:hover { border-color: var(--teal); }
.prompt-card { padding: 18px; border-left: 3px solid var(--teal); background: var(--wash); }
.prompt-card small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.prompt-card p { margin: 0; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.copy-button { min-height: 38px; margin-top: 13px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; color: var(--teal-dark); font-size: 11px; font-weight: 700; cursor: pointer; }

.catalog-heading { margin-bottom: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 1180px; margin-bottom: 22px; color: var(--ink-soft); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }
.dot.bounded-native { background: var(--teal); }
.dot.local-partial { background: var(--amber); }
.dot.deferred { background: var(--violet); }
.legend-note { max-width: 820px; margin: -12px 0 20px; color: var(--muted); font-size: 10px; }
.filter-panel { position: sticky; top: 71px; z-index: 8; display: grid; grid-template-columns: minmax(230px, 1.4fr) repeat(2, minmax(160px, .7fr)) auto; gap: 10px; max-width: 1180px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.96); box-shadow: 0 7px 22px rgba(20, 52, 63, .06); backdrop-filter: blur(10px); }
.filter-panel label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-panel input, .filter-panel select { width: 100%; height: 35px; display: block; margin-top: 3px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: var(--wash); color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: 0; }
.filter-panel input:focus, .filter-panel select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-pale); }
.clear-button { align-self: end; height: 35px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--teal-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.catalog-list { max-width: 1180px; margin-top: 20px; }
.tool-card { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 10px; background: white; scroll-margin-top: 145px; transition: border-color .18s ease, box-shadow .18s ease; }
.tool-card:hover { border-color: #b2c9ce; }
.tool-card[open] { border-color: #9ebec2; box-shadow: var(--shadow); }
.tool-card > summary { min-height: 92px; display: grid; grid-template-columns: minmax(240px, .85fr) minmax(280px, 1.35fr) auto 24px; gap: 18px; align-items: center; padding: 18px 19px; list-style: none; cursor: pointer; }
.tool-card > summary::-webkit-details-marker { display: none; }
.tool-identity strong { display: block; font-size: 15px; }
.tool-identity code { display: block; margin-top: 4px; color: var(--teal-dark); font-size: 10px; word-break: break-word; }
.tool-purpose { margin: 0; color: var(--ink-soft); font-size: 12px; }
.tool-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.badge { padding: 4px 7px; border-radius: 99px; background: var(--blue-wash); color: var(--navy); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge.bounded-native { background: var(--teal-pale); color: var(--teal-dark); }
.badge.local-partial { background: var(--amber-pale); color: #87500f; }
.badge.deferred { background: var(--violet-pale); color: var(--violet); }
.badge.destructive { background: #f8e7e4; color: #8c433a; }
.tool-chevron { color: var(--teal); font-size: 18px; transition: transform .18s ease; }
.tool-card[open] .tool-chevron { transform: rotate(45deg); }
.tool-body { padding: 0 19px 22px; border-top: 1px solid var(--line); }
.tool-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; padding: 20px 0; }
.tool-meta h4, .action-block h4, .schema-details summary { margin: 0 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tool-meta p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.action-block { padding: 15px; border-radius: 8px; background: var(--wash); }
.action-list { display: flex; flex-wrap: wrap; gap: 6px; }
.action { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--navy); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.action i { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.action small { padding-left: 2px; color: var(--muted); font: 8px ui-sans-serif, system-ui, sans-serif; }
.action.bounded-native i { background: var(--teal); }
.action.local-partial i { background: var(--amber); }
.action.deferred i { background: var(--violet); }
.action.none { color: var(--muted); font-family: inherit; }
.input-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 7px; margin-top: 9px; }
.input-item { padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 10px; }
.input-item code { color: var(--teal-dark); }
.input-item span { float: right; color: var(--muted); }
.example-card { margin-top: 14px; padding: 15px; border-left: 3px solid var(--teal); background: #f6fbfb; }
.example-card p { margin: 0; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.schema-details { margin-top: 14px; }
.schema-details summary { width: max-content; cursor: pointer; color: var(--teal-dark); }
.schema-details pre { max-height: 420px; margin: 10px 0 0; padding: 15px; overflow: auto; border-radius: 8px; background: #13242c; color: #d6e7e8; font: 10px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.empty-state { max-width: 1180px; padding: 44px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--ink-soft); }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0; font-size: 12px; }
.text-button { min-height: 40px; border: 0; background: transparent; color: var(--teal); font-weight: 700; cursor: pointer; }

.parameter-section { background: #fbfdfd; }
.parameter-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; margin-bottom: 20px; }
.parameter-summary > div { padding: 15px 18px; border-left: 3px solid var(--line-strong); }
.parameter-summary > div:first-child { border-color: var(--teal); }
.parameter-summary strong { display: block; font-size: 22px; }
.parameter-summary span { color: var(--muted); font-size: 11px; }
.filter-panel.compact { position: static; grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(160px, .5fr)) auto; }
.result-count { max-width: 1180px; margin: 17px 0 9px; color: var(--muted); font-size: 11px; }
.parameter-table-wrap { max-width: 1180px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
.parameter-table { width: 100%; border-collapse: collapse; text-align: left; }
.parameter-table th { padding: 10px 12px; background: var(--wash); color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.parameter-table td { padding: 11px 12px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; vertical-align: top; }
.parameter-table code { color: var(--teal-dark); font-size: 10px; white-space: nowrap; }
.parameter-table small { display: block; color: var(--muted); }
.support { display: inline-flex; padding: 3px 6px; border-radius: 4px; background: var(--blue-wash); color: var(--navy); font-size: 9px; font-weight: 800; white-space: nowrap; }
.support.typed { background: var(--teal-pale); color: var(--teal-dark); }
.support.adapter { background: var(--amber-pale); color: #87500f; }

.future-section { background: #f7f6fa; }
.future-toggle { width: min(720px, 100%); min-height: 62px; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; border: 1px solid #d8d3e5; border-radius: 9px; background: white; color: var(--violet); font-weight: 750; cursor: pointer; }
.future-toggle strong { min-width: 35px; padding: 5px 8px; border-radius: 99px; background: var(--violet-pale); font-size: 11px; }
.future-filters { display: flex; gap: 7px; margin: 20px 0 12px; }
.chip { min-height: 36px; padding: 0 12px; border: 1px solid #d8d3e5; border-radius: 99px; background: white; color: var(--violet); font-size: 11px; cursor: pointer; }
.chip.active { background: var(--violet); color: white; }
.future-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 1180px; }
.future-card { padding: 15px; border: 1px solid #ded9e9; border-radius: 8px; background: rgba(255,255,255,.8); }
.future-card header { display: flex; justify-content: space-between; gap: 10px; }
.future-card code { color: var(--violet); font-size: 10px; }
.future-card span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.future-card strong { display: block; margin: 9px 0 5px; font-size: 12px; }
.future-card p { margin: 0; color: var(--ink-soft); font-size: 10px; }

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1180px; }
.principles article { padding: 20px; border-top: 2px solid var(--teal); background: var(--wash); }
.principles span { color: var(--teal); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.principles h3 { margin: 17px 0 8px; font-size: 14px; }
.principles p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; max-width: 980px; margin-top: 45px; }
.glossary div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.glossary dt { color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.glossary dd { margin: 0; color: var(--ink-soft); font-size: 11px; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 35px clamp(32px, 6vw, 92px) 35px calc(var(--sidebar) + clamp(32px, 6vw, 92px)); background: var(--ink); color: #d7e0e3; }
footer p { max-width: 600px; margin: 0; font-size: 10px; }
footer strong { color: white; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: white; font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.noscript { position: fixed; inset: auto 0 0; z-index: 100; padding: 12px; background: #fff2dc; text-align: center; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: 210px minmax(240px, 1fr) auto; }
  .intro-grid { grid-template-columns: 1fr; }
  .edition-card { width: 220px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-card > summary { grid-template-columns: minmax(220px, .8fr) minmax(240px, 1.2fr) 24px; }
  .tool-badges { grid-column: 1 / 3; grid-row: 2; justify-content: flex-start; }
  .tool-chevron { grid-column: 3; grid-row: 1 / 3; }
  .future-grid { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  html { scroll-padding-top: 68px; }
  .topbar { height: 62px; grid-template-columns: 44px 1fr auto; gap: 8px; padding: 0 12px 0 5px; }
  .menu-button { display: block; }
  .brand-mark { width: 31px; height: 31px; }
  .brand strong { font-size: 12px; }
  .brand small { display: none; }
  .top-search { display: none; }
  .edition-pill { font-size: 9px; }
  .layout { display: block; padding-top: 62px; }
  .sidebar { top: 62px; width: min(315px, 88vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 62px 0 0; z-index: 19; background: rgba(18, 31, 37, .35); }
  .sidebar-backdrop.show { display: block; }
  main { display: block; }
  .intro, .doc-section { padding: 48px 20px; }
  .intro { padding-top: 42px; }
  h1 { font-size: 41px; }
  h1 span { display: block; margin-top: 5px; }
  .intro-grid { gap: 28px; }
  .edition-card { width: 100%; box-shadow: none; }
  .hero-search { padding-left: 14px; gap: 10px; }
  .hero-search button { min-width: 58px; padding: 0 11px; font-size: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 96px; }
  .section-heading { display: block; }
  .section-heading > div { gap: 10px; }
  .section-heading p { margin-top: 14px; }
  .schematic-card { padding: 16px; }
  .resource-map { display: none; }
  .map-legend { display: none; }
  .map-text { display: grid; gap: 7px; }
  .map-text button { min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--wash); color: var(--ink); text-align: left; }
  .map-text button span { color: var(--muted); font-size: 10px; }
  .workflow > summary { grid-template-columns: 36px 1fr 30px; gap: 10px; min-height: 88px; }
  .workflow-summary { display: none; }
  .workflow-body { grid-template-columns: 1fr; gap: 20px; padding: 0 0 28px 46px; }
  .filter-panel, .filter-panel.compact { position: static; grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .clear-button { min-height: 44px; }
  .tool-card { scroll-margin-top: 72px; }
  .tool-card > summary { grid-template-columns: 1fr 24px; gap: 8px; padding: 16px; }
  .tool-purpose { grid-column: 1; }
  .tool-badges { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .tool-chevron { grid-column: 2; grid-row: 1 / 4; }
  .tool-body { padding: 0 16px 18px; }
  .tool-meta-grid { grid-template-columns: 1fr; gap: 14px; }
  .parameter-summary { grid-template-columns: 1fr; }
  .parameter-summary > div { border-left: 0; border-top: 2px solid var(--line); }
  .parameter-summary > div:first-child { border-color: var(--teal); }
  .future-grid, .principles, .glossary { grid-template-columns: 1fr; }
  .glossary div { grid-template-columns: 90px 1fr; }
  footer { display: block; padding: 30px 20px; }
  footer p + p { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .topbar, .sidebar, .filter-panel, .copy-button, .future-toggle, .toast { display: none !important; }
  .layout { display: block; padding: 0; }
  main { display: block; }
  .intro, .doc-section { padding: 30px 0; }
  .tool-card, .workflow { break-inside: avoid; }
  footer { padding: 20px 0; color: var(--ink); background: white; }
}
