:root {
  --ink: #172033;
  --muted: #647089;
  --paper: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f0f2fa;
  --line: #dce1ee;
  --line-strong: #c7cede;
  --forest: #4f46e5;
  --forest-dark: #3730a3;
  --forest-soft: #e8eafe;
  --ochre: #0e7490;
  --radius: 6px;
  --max-width: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-dark); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(79, 70, 229, .32); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); border-radius: 5px; padding: 9px 12px; background: var(--ink); color: #fff; }
.skip-link:focus { transform: none; }
.section-shell { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(247, 248, 252, .94); backdrop-filter: blur(12px); }
.top-nav { width: min(calc(100% - 48px), var(--max-width)); min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-inline: auto; }
.brand { color: var(--ink); font-family: var(--sans); font-size: .9rem; font-weight: 800; letter-spacing: .01em; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-size: .82rem; font-weight: 650; }
.nav-links a { color: #42514c; text-decoration: none; }
.nav-links a:hover { color: var(--forest); }
.nav-links a[aria-current="page"] { color: var(--forest); text-decoration: underline; text-decoration-thickness: 2px; }
.nav-toggle { display: none; }
.app-view[hidden] { display: none; }

.hero { min-height: 520px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); align-items: center; gap: clamp(42px, 7vw, 88px); padding-block: clamp(60px, 8vw, 96px); }
.hero-copy { max-width: 760px; }
.hero-copy > *, .taxonomy-summary { animation: content-in 420ms ease both; }
.hero-copy > :nth-child(2) { animation-delay: 50ms; }
.hero-copy > :nth-child(3) { animation-delay: 90ms; }
.hero-copy > :nth-child(4) { animation-delay: 130ms; }
.hero-copy > :nth-child(5), .taxonomy-summary { animation-delay: 170ms; }
.eyebrow { margin: 0 0 10px; color: var(--ochre); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--sans); font-weight: 720; }
.hero h1 { max-width: 760px; font-size: clamp(2.7rem, 5vw, 4.45rem); letter-spacing: -.035em; }
.hero-lede { max-width: 720px; margin: 24px 0 0; color: #35405a; font-family: var(--sans); font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.55; }
.scope-note { max-width: 690px; margin: 20px 0 0; color: var(--muted); font-size: .96rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button { min-height: 42px; display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 14px; color: var(--ink); font-size: .82rem; font-weight: 720; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.button.primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.button:hover { border-color: var(--forest); transform: translateY(-1px); }
.button.primary:hover { background: var(--forest-dark); color: #fff; }
.artifact-links { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 19px; font-size: .8rem; }
.taxonomy-summary { border-top: 2px solid var(--forest); border-bottom: 1px solid var(--line); padding: 24px 0; }
.taxonomy-facts { margin: 0; border-top: 1px solid var(--line); }
.taxonomy-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding: 10px 2px; }
.taxonomy-facts dt { color: var(--muted); font-size: .78rem; font-weight: 650; }
.taxonomy-facts dd { margin: 0; color: var(--ink); font-size: 1.15rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.scope-section, .explain-section, .how-section, .references-section { padding-block: clamp(60px, 8vw, 92px); border-top: 1px solid var(--line); }
.section-intro { max-width: 760px; margin-bottom: 42px; }
.section-intro h2, .browser-heading h2 { font-size: clamp(1.9rem, 3vw, 2.65rem); letter-spacing: -.025em; }
.section-intro > p:last-child { margin: 17px 0 0; color: var(--muted); }
.scope-boundaries { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--line-strong); }
.scope-boundaries div { padding: 18px 24px 20px 0; border-bottom: 1px solid var(--line); }
.scope-boundaries div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.scope-boundaries dt { color: var(--forest); font-size: .76rem; font-weight: 780; }
.scope-boundaries dd { margin: 9px 0 0; color: var(--muted); font-size: .86rem; }
.concept-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.concept-grid article { min-height: 190px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px; }
.concept-grid article > span { color: var(--ochre); font-family: var(--sans); font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.concept-grid h3 { margin-top: 35px; font-family: var(--sans); font-size: 1.15rem; font-weight: 750; }
.concept-grid p { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }
.component-map-section { padding-block: clamp(60px, 8vw, 92px); border-top: 1px solid var(--line); }
.component-graph-figure { margin: 0; }
.component-map-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; color: var(--muted); font-size: .72rem; }
.component-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.component-legend-node { width: 10px; height: 10px; display: inline-block; border-radius: 50%; background: var(--ochre); }
.component-legend-node.pattern-key { border: 2px solid var(--forest); border-radius: 2px; background: var(--surface); }
.component-legend-line { width: 23px; height: 2px; display: inline-block; background: #a9b3c9; }
.component-map { max-width: 100%; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); scrollbar-color: #b7bfd1 transparent; }
.component-graph-canvas { position: relative; width: 100%; min-width: 1120px; height: 760px; background-image: radial-gradient(#dce1ee 1px, transparent 1px); background-size: 18px 18px; }
.component-graph-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.component-graph-edge { fill: none; stroke: var(--category-accent); stroke-linecap: round; opacity: .13; transition: opacity 180ms ease, stroke-width 180ms ease; animation: graph-line-in 600ms ease both; }
.component-map.has-focus .component-graph-edge { opacity: .025; }
.component-map.has-focus .component-graph-edge.is-active { opacity: .82; stroke-width: 2.5; }
.component-graph-node { position: absolute; z-index: 2; transform: translate(-50%, -50%); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--surface); color: var(--ink); font-size: .66rem; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; box-shadow: 0 2px 8px rgba(23, 32, 51, .06); transition: opacity 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.component-graph-node:hover, .component-graph-node:focus-visible, .component-graph-node.is-current { transform: translate(-50%, -50%) translateY(-1px); border-color: var(--forest); color: var(--ink); box-shadow: 0 5px 16px rgba(23, 32, 51, .12); }
.component-map.has-focus .component-graph-node { opacity: .24; }
.component-map.has-focus .component-graph-node.is-current, .component-map.has-focus .component-graph-node.is-related { opacity: 1; }
.component-node { width: 178px; border: 1px solid #99cbd5; border-left: 4px solid var(--ochre); background: #f1fafb; color: #0e6075; font-size: .72rem; text-align: left; }
.pattern-node { width: 142px; border-left: 3px solid var(--category-accent); }
.component-graph-group-label { position: absolute; z-index: 3; top: 20px; width: 150px; transform: translateX(-50%); color: var(--category-accent); font-size: .65rem; font-weight: 800; letter-spacing: .035em; text-align: center; text-transform: uppercase; }
.component-graph-figure figcaption { margin-top: 11px; color: var(--muted); font-size: .74rem; }
.component-map-mobile, .mobile-map-copy { display: none; }
@keyframes graph-line-in { from { opacity: 0; stroke-dasharray: 8 10; } }
@keyframes content-in { from { opacity: 0; transform: translateY(7px); } }
.how-section { background: transparent; }
.field-guide { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.field-guide div { min-height: 150px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 22px; }
.field-guide dt { color: var(--forest); font-family: var(--sans); font-size: 1rem; font-weight: 750; }
.field-guide dd { margin: 10px 0 0; color: var(--muted); font-size: .84rem; }

.catalog-browser { padding-block: clamp(60px, 8vw, 92px); }
.browser-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.result-count { margin: 0 0 8px; color: var(--muted); font-size: .86rem; font-weight: 650; }
.notice, .empty-state { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--forest-soft); }
.notice { margin-bottom: 12px; }
.notice.error { border-color: #b96a65; background: #f9ecea; }
.explorer-shell { display: grid; grid-template-columns: 310px minmax(0, 1fr); align-items: start; min-height: 78vh; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); }
.tree-pane { position: sticky; top: 58px; height: calc(100vh - 58px); max-height: 920px; overflow-y: auto; border-right: 1px solid var(--line); background: #f0f2fa; scrollbar-gutter: stable; }
.controls { position: sticky; z-index: 2; top: 0; display: grid; gap: 10px; padding: 15px; border-bottom: 1px solid var(--line); background: rgba(240, 242, 250, .96); backdrop-filter: blur(8px); }
.field { min-width: 0; display: grid; gap: 4px; }
.field label { color: #3f4d48; font-size: .72rem; font-weight: 780; }
.field input, .field select { width: 100%; min-height: 39px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 7px 9px; background: var(--surface); color: var(--ink); font-size: .82rem; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clear-filters { justify-self: start; border: 0; padding: 3px 0; background: transparent; color: var(--forest); cursor: pointer; font-size: .76rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.empty-state { margin: 12px; font-size: .84rem; }
.taxonomy-tree { padding: 8px; }
.tree-group[hidden] { display: none; }
.tree-row { --indent: 0px; width: 100%; min-height: 35px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 2px; padding: 5px 7px 5px calc(7px + var(--indent)); background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.tree-row:hover { background: #e8eafe; }
.tree-level-category { margin-top: 3px; color: var(--category-accent); font-size: .81rem; font-weight: 800; }
.tree-level-subcategory { --indent: 15px; color: #42504b; font-size: .79rem; font-weight: 700; }
.tree-level-pattern { --indent: 32px; min-height: 35px; font-size: .81rem; }
.tree-level-direct-pattern { --indent: 15px; }
.tree-level-pattern.selected { border-color: transparent; background: #e8eafe; box-shadow: inset 2px 0 var(--category-accent); font-weight: 760; }
.tree-icon { color: var(--category-accent); text-align: center; }
.tree-label { min-width: 0; overflow-wrap: anywhere; }
.tree-count { min-width: 25px; border-radius: 2px; padding: 1px 6px; background: #e2e6f1; color: #59657d; font-size: .68rem; font-weight: 760; text-align: center; }
.detail-pane { min-width: 0; padding: clamp(24px, 4vw, 46px); border-top: 2px solid var(--category-accent); }
.detail-placeholder { min-height: 360px; display: grid; place-items: center; color: var(--muted); }
.pattern-header { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.pattern-id { margin: 0 0 5px; color: var(--muted); font: .72rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.pattern-header h1 { overflow-wrap: anywhere; font-family: var(--sans); font-size: clamp(2.05rem, 4vw, 3.15rem); font-weight: 740; letter-spacing: -.025em; }
.pattern-note { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; border-left: 2px solid var(--line-strong); padding: 2px 0 2px 10px; background: transparent; color: var(--muted); font-size: .78rem; }
.pattern-note strong { flex: 0 0 auto; color: var(--ink); font-size: .78rem; font-weight: 720; }
.pattern-note p { margin: 0; }
.contextual-pattern-link { font-weight: 760; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.badge { border: 1px solid var(--line); border-radius: 2px; padding: 3px 7px; background: transparent; color: #46534f; font-size: .68rem; font-weight: 700; text-decoration: none; }
.badge:hover { border-color: var(--category-accent); color: var(--category-accent); }
.category-badge { border-color: var(--category-accent); border-left-width: 4px; background: var(--surface); color: var(--ink); }
.category-badge:hover { border-color: var(--category-accent); background: var(--category-soft); color: var(--ink); }
.subcategory-badge { border-color: #a5b4fc; background: #e8eafe; color: #3730a3; }
.subcategory-badge:hover { background: transparent; border-color: #4f46e5; color: #3730a3; }
.component-badge { border-radius: 99px; background: #e6f4f7; border-color: #99cbd5; color: #0e6075; }
.component-badge:hover { background: transparent; border-color: var(--component-ink); color: var(--component-ink); }
.component-profile-role, .component-directive, .component-context, .component-procedural-steps,
.component-examples, .component-output-format, .component-constraints {
  --component-soft: #e6f4f7;
  --component-border: #99cbd5;
  --component-ink: #0e6075;
}
.unassigned-badge { border-style: dashed; color: var(--muted); }
.catalog-section { padding: 25px 0; border-bottom: 1px solid var(--line); }
.catalog-section:last-child { border-bottom: 0; }
.catalog-section > h2 { margin-bottom: 14px; color: #293632; font-family: var(--sans); font-size: 1.08rem; font-weight: 760; }
.field-heading-link { color: inherit; text-decoration: none; }
.field-heading-link:hover { color: var(--forest); text-decoration: underline; }
.field-heading { display: inline-flex; align-items: center; gap: 5px; }
.term-trigger { border: 0; border-bottom: 1px dotted currentColor; padding: 0; background: transparent; color: inherit; cursor: help; font: inherit; }
.term-trigger.inline-term { display: inline; white-space: normal; }
.term-trigger.compact { display: inline-grid; width: 1.35em; height: 1.35em; place-items: center; border: 0; border-radius: 50%; color: var(--forest); font-family: var(--sans); font-size: .72rem; line-height: 1; cursor: pointer; }
.term-trigger.compact:hover { background: var(--forest-soft); }
.variables-table th .term-trigger { margin-left: 3px; font-size: .75rem; }
.cardinality-value { white-space: nowrap; }
.cardinality-value .term-trigger { margin-left: 3px; }
.term-popover { position: fixed; z-index: 60; max-width: calc(100vw - 24px); border: 1px solid var(--line-strong); border-top: 3px solid var(--forest); border-radius: 7px; padding: 15px 38px 15px 16px; background: var(--surface); box-shadow: 0 14px 45px rgba(23, 34, 31, .22); color: var(--ink); font-size: .82rem; }
.term-popover strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.term-popover p { margin: 7px 0 9px; color: #45534f; }
.term-popover a { font-weight: 700; }
.popover-close { position: absolute; top: 5px; right: 7px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.3rem; }
.popover-close:hover { background: var(--surface-soft); color: var(--ink); }
.subsection { min-width: 0; border: 0; border-left: 2px solid var(--line-strong); border-radius: 0; padding: 10px 14px; background: transparent; }
.subsection h3, .structure-subsection h3, .name-card h3 { margin-bottom: 8px; font-size: .88rem; }
.subsection p { margin: 0; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.subsection.positive { border-left-color: #4a8465; }
.subsection.caution { border-left-color: #a66e3c; }
.not-documented { margin: 0; color: #5f6968; font-size: .86rem; font-style: italic; }
.plain-list { margin: 0; padding-left: 19px; }
.structure-subsection + .structure-subsection { margin-top: 25px; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 0; }
.variables-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .78rem; }
.variables-table th, .variables-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.variables-table th { background: #f0f2fa; color: #48546c; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.variables-table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-block { max-width: 100%; overflow-x: auto; margin: 0; border: 1px solid var(--line); border-radius: 0; padding: 15px; background: #f4f5fa; color: #273149; font: .8rem/1.58 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.promptspec-source { margin-top: 10px; }
.promptspec-source summary { cursor: pointer; color: var(--forest); font-size: .82rem; font-weight: 750; }
.promptspec-source[open] summary { margin-bottom: 9px; }
.example-card + .example-card, .name-card + .name-card { margin-top: 14px; }
.provenance { margin: 0 0 7px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.source-link { font-size: .77rem; }
.name-card { border-left: 3px solid var(--category-accent); padding: 4px 0 4px 13px; }
.name-card p { margin: 0 0 7px; color: #46524e; }
.alias-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.alias-chip { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 9px; background: transparent; font-size: .8rem; }
.alias-chip .source-link { color: var(--muted); font-size: .69rem; }
.pattern-source-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.pattern-source-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
.source-roles { border-radius: 2px; padding: 2px 6px; background: var(--surface-soft); color: var(--muted); font-size: .68rem; }
.paper-count, .paper-location { color: var(--muted); font-size: .76rem; }
.source-links { margin: 7px 0 0; }

.references-section, .relations-section { border-top: 1px solid var(--line); }
.relation-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.relation-list .relation-card { min-height: 230px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 25px; scroll-margin-top: 86px; }
.relation-card { border-left: 3px solid var(--ochre); padding: 5px 0 5px 14px; }
.relation-card + .relation-card { margin-top: 14px; }
.relation-list .relation-card + .relation-card { margin-top: 0; }
.relation-type { margin: 0 0 8px; color: var(--ochre); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.relation-card h3 { font-family: var(--sans); font-size: 1rem; }
.relation-card p:not(.relation-type) { color: #46524e; }
.relation-patterns a { font-weight: 750; }
.reference-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reference-card { min-height: 280px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 25px; scroll-margin-top: 86px; }
.reference-card:target { background: var(--forest-soft); }
.reference-label { margin: 0 0 12px; color: var(--ochre); font-size: .72rem; font-weight: 800; }
.reference-card h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 720; }
.reference-authors { margin: 14px 0 0; color: #42504c; font-size: .8rem; }
.reference-meta { margin: 12px 0 0; color: var(--muted); font-size: .74rem; }
.reference-links { margin: 18px 0 0; font-size: .76rem; }
.category-icl { --category-accent: #4f46e5; --category-soft: #e8eafe; }
.category-reasoning { --category-accent: #0e7490; --category-soft: #e6f4f7; }
.category-output { --category-accent: #7c3aed; --category-soft: #f1eafe; }
.category-context { --category-accent: #2563a6; --category-soft: #eaf2fc; }
.category-meta { --category-accent: #9f3f72; --category-soft: #f9ebf3; }
.mobile-tree-toggle { display: none; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: .8rem; }
.site-footer p { margin: 0; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .taxonomy-summary { max-width: 620px; }
  .concept-grid { grid-template-columns: repeat(2, 1fr); }
  .field-guide { grid-template-columns: repeat(2, 1fr); }
  .explorer-shell { grid-template-columns: 300px minmax(0, 1fr); }
  .detail-pane { padding: 26px; }
  .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 58px; }
  .section-shell, .top-nav { width: min(calc(100% - 24px), var(--max-width)); }
  .site-header { position: static; }
  .top-nav { min-height: 58px; }
  .top-nav { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding-block: 9px; }
  .nav-toggle { display: inline-flex; min-height: 38px; align-items: center; border: 1px solid var(--line-strong); border-radius: 5px; padding: 5px 11px; background: var(--surface); color: var(--ink); font-size: .78rem; font-weight: 750; }
  .nav-links { grid-column: 1 / -1; display: none; width: 100%; gap: 0; padding: 4px 0 7px; }
  .nav-links.open { display: grid; }
  .nav-links a { min-height: 42px; display: flex; align-items: center; border-top: 1px solid var(--line); padding: 6px 4px; }
  .hero { gap: 48px; padding-block: 62px 72px; }
  .hero h1 { font-size: clamp(2.45rem, 12vw, 3.6rem); }
  .hero-lede { font-size: 1.15rem; }
  .scope-boundaries, .concept-grid, .field-guide, .reference-list, .relation-list { grid-template-columns: 1fr; }
  .scope-boundaries div, .scope-boundaries div + div { padding: 16px 0; border-left: 0; }
  .concept-grid article { min-height: 190px; }
  .concept-grid h3 { margin-top: 30px; }
  .desktop-map-copy, .component-map, .component-map-legend { display: none; }
  .mobile-map-copy { display: block; }
  .component-map-mobile { display: grid; border-top: 1px solid var(--line-strong); }
  .mobile-component-row { border-bottom: 1px solid var(--line); }
  .mobile-component-row summary { min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); cursor: pointer; list-style-position: inside; }
  .mobile-component-row summary::marker { color: var(--ochre); }
  .mobile-component-label { font-size: .84rem; font-weight: 760; }
  .mobile-component-count { border-radius: 99px; padding: 3px 8px; background: #e6f4f7; color: #0e6075; font-size: .68rem; font-weight: 720; white-space: nowrap; }
  .mobile-component-patterns { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0 0 16px 20px; list-style: none; }
  .mobile-pattern-link { display: inline-flex; border: 1px solid var(--line); border-left: 3px solid var(--category-accent); border-radius: 4px; padding: 5px 7px; background: var(--surface); color: var(--ink); font-size: .7rem; font-weight: 680; text-decoration: none; }
  .mobile-pattern-link:hover { border-color: var(--category-accent); background: var(--category-soft); color: var(--ink); }
  .component-graph-figure figcaption { display: none; }
  .browser-heading { display: block; }
  .result-count { margin-top: 8px; }
  .mobile-tree-toggle { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 8px 12px; background: var(--surface); color: var(--ink); text-align: left; }
  .mobile-tree-toggle > span:first-child { font-weight: 750; }
  .mobile-tree-toggle > span:last-child { max-width: 55%; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
  .explorer-shell { display: block; min-height: 0; margin-top: 8px; }
  .tree-pane { position: static; display: none; height: auto; max-height: min(68vh, 600px); border-right: 0; border-bottom: 1px solid var(--line); }
  .tree-pane.mobile-open { display: block; }
  .controls { position: static; }
  .tree-row { min-height: 42px; }
  .detail-pane { padding: 21px 15px; }
  .pattern-header h1 { font-size: 1.9rem; }
  .catalog-section { padding: 23px 0; }
  .site-footer { display: grid; }
}
@media (max-width: 430px) {
  .brand { font-size: .9rem; }
  .nav-links a { font-size: .75rem; }
  .filter-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
