:root,
html[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f0ec;
  --paper-2: #fffdf9;
  --paper-3: #eee8e4;
  --ink: #241c22;
  --muted: #726872;
  --line: #d8ccd4;
  --line-strong: #bcaab6;
  --plum: #793f69;
  --plum-strong: #5d274d;
  --plum-soft: #f0dce8;
  --gold: #97703a;
  --danger: #a43d48;
  --overlay: rgba(20, 14, 19, .86);
  --shadow: 0 16px 44px rgba(72, 43, 61, .1);
  --reader-scale: 1;
  --article-max: 920px;
  font-family: Inter, "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171318;
  --paper-2: #201a20;
  --paper-3: #2a2229;
  --ink: #f5edf2;
  --muted: #bcaebb;
  --line: #493a45;
  --line-strong: #725c6b;
  --plum: #e0a9cc;
  --plum-strong: #f2c9e2;
  --plum-soft: #432a39;
  --gold: #e1c18b;
  --danger: #f18d98;
  --overlay: rgba(0, 0, 0, .9);
  --shadow: 0 18px 48px rgba(0, 0, 0, .3);
}
html[data-theme="eye"] {
  color-scheme: light;
  --paper: #e9e3d1;
  --paper-2: #f4efdf;
  --paper-3: #ded7c1;
  --ink: #312f27;
  --muted: #686456;
  --line: #c8bea3;
  --line-strong: #a99a78;
  --plum: #6b5364;
  --plum-strong: #4f3a49;
  --plum-soft: #ddd0d4;
  --gold: #806b35;
  --danger: #954c4c;
  --overlay: rgba(31, 29, 23, .88);
  --shadow: 0 14px 38px rgba(55, 48, 30, .12);
}
html[data-theme="oled"] {
  color-scheme: dark;
  --paper: #000;
  --paper-2: #080808;
  --paper-3: #111;
  --ink: #f7f3f6;
  --muted: #b9b0b7;
  --line: #292329;
  --line-strong: #514550;
  --plum: #e9afd4;
  --plum-strong: #ffd5ee;
  --plum-soft: #271520;
  --gold: #e5c98f;
  --danger: #ff919b;
  --overlay: rgba(0, 0, 0, .96);
  --shadow: 0 14px 40px rgba(0, 0, 0, .68);
}
html[data-theme="system"] { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --paper: #171318;
    --paper-2: #201a20;
    --paper-3: #2a2229;
    --ink: #f5edf2;
    --muted: #bcaebb;
    --line: #493a45;
    --line-strong: #725c6b;
    --plum: #e0a9cc;
    --plum-strong: #f2c9e2;
    --plum-soft: #432a39;
    --gold: #e1c18b;
    --danger: #f18d98;
    --overlay: rgba(0, 0, 0, .9);
    --shadow: 0 18px 48px rgba(0, 0, 0, .3);
  }
}
html[data-reader-width="narrow"] { --article-max: 760px; }
html[data-reader-width="comfortable"] { --article-max: 920px; }
html[data-reader-width="wide"] { --article-max: 1180px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 280px;
  overflow-x: hidden;
  background: radial-gradient(circle at 8% -4%, color-mix(in srgb, var(--plum) 11%, transparent), transparent 32rem), var(--paper);
  color: var(--ink);
  font-size: calc(16px * var(--reader-scale));
  line-height: 1.6;
  transition: background-color .18s ease, color .18s ease;
}
button, input, select, summary { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--plum); text-underline-offset: .18em; }
img { max-width: 100%; }
::selection { background: var(--plum-soft); color: var(--ink); }
.boot-state, .state-panel { width: min(36rem, calc(100% - 2rem)); margin: 16vh auto 0; padding: 2.2rem; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--paper-2); box-shadow: var(--shadow); text-align: center; }
.state-panel.inline { margin: 1rem 0; width: 100%; }
.state-panel strong, .state-panel span, .boot-state strong, .boot-state span { display: block; }
.state-panel span, .boot-state span { margin-top: .45rem; color: var(--muted); }
.boot-mark { margin-bottom: .8rem; color: var(--plum); font-size: 2.2rem; }
.spinner { width: 2rem; height: 2rem; margin: 0 auto 1rem; border: .2rem solid var(--line); border-top-color: var(--plum); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-panel.error { color: var(--danger); }
.state-panel pre { max-height: 20rem; overflow: auto; white-space: pre-wrap; text-align: left; }
.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .8rem 1rem; padding: max(.65rem, env(safe-area-inset-top)) clamp(.8rem, 3vw, 2.4rem) .65rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper-2) 91%, transparent); backdrop-filter: blur(18px) saturate(1.08); }
.header-primary { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.brand { display: flex; min-width: 0; align-items: center; gap: .65rem; padding: .2rem; border: 0; background: transparent; cursor: pointer; text-align: left; }
.brand-mark { display: grid; flex: 0 0 auto; width: 2.15rem; height: 2.15rem; place-items: center; border-radius: 50%; background: var(--plum-soft); color: var(--plum); }
.brand > span:last-child { min-width: 0; }
.brand strong, .brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand strong { font-size: .92rem; }
.brand small { margin-top: .03rem; color: var(--muted); font-size: .54rem; letter-spacing: .11em; }
.site-header nav { display: flex; min-width: 0; justify-content: flex-end; gap: .2rem; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav button { flex: 0 0 auto; min-height: 2.35rem; padding: .4rem .68rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.site-header nav button:hover, .site-header nav button.active { border-color: var(--line); color: var(--plum-strong); background: var(--paper-2); }
.display-menu { position: relative; margin-left: auto; }
.display-menu > summary { display: flex; min-height: 2.35rem; align-items: center; gap: .35rem; padding: .38rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); color: var(--muted); cursor: pointer; list-style: none; white-space: nowrap; }
.display-menu > summary::-webkit-details-marker { display: none; }
.display-menu[open] > summary { border-color: var(--plum); color: var(--plum); }
.display-panel { position: absolute; top: calc(100% + .55rem); right: 0; z-index: 90; width: min(25rem, calc(100vw - 1.5rem)); padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper-2); box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.display-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.display-panel-head small { color: var(--muted); font-size: .68rem; }
.display-panel fieldset { margin: .75rem 0 0; padding: .65rem; border: 1px solid var(--line); border-radius: .75rem; }
.display-panel legend { padding: 0 .35rem; color: var(--muted); font-size: .7rem; }
.segmented { display: flex; flex-wrap: wrap; gap: .35rem; }
.segmented button { flex: 1 1 auto; min-height: 2.2rem; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: .55rem; background: transparent; cursor: pointer; white-space: nowrap; }
.segmented button[aria-pressed="true"] { border-color: var(--plum); background: var(--plum-soft); color: var(--plum-strong); font-weight: 700; }
.site-main { width: min(1280px, calc(100% - 2rem)); min-height: calc(100vh - 9rem); margin: 0 auto; padding: clamp(1.4rem, 3.5vw, 3.2rem) 0 4.5rem; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.site-footer button { border: 0; background: transparent; color: var(--plum); cursor: pointer; }
.to-top { position: fixed; right: max(.8rem, env(safe-area-inset-right)); bottom: max(.8rem, env(safe-area-inset-bottom)); z-index: 40; width: 2.8rem; height: 2.8rem; border: 1px solid var(--line); border-radius: 50%; background: color-mix(in srgb, var(--paper-2) 92%, transparent); box-shadow: var(--shadow); color: var(--plum); cursor: pointer; backdrop-filter: blur(10px); }
.eyebrow, .result-kicker { margin: 0 0 .45rem; color: var(--gold); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, h4 { text-wrap: balance; }
.portal-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(17rem, .65fr); align-items: end; gap: clamp(1.2rem, 4vw, 3.5rem); margin-bottom: 1.5rem; }
.portal-hero h1, .article-header h1, .about-page > h1 { margin: 0; font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: 1.08; letter-spacing: -.04em; }
.portal-hero p:not(.eyebrow), .section-copy { max-width: 52rem; color: var(--muted); line-height: 1.75; }
.coverage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.coverage-grid div { padding: .85rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--paper-2); }
.coverage-grid strong, .coverage-grid span { display: block; }
.coverage-grid strong { color: var(--plum); font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.coverage-grid span { margin-top: .12rem; color: var(--muted); font-size: .7rem; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; margin: 1rem 0; }
.search-field { display: flex; align-items: center; gap: .55rem; min-height: 2.85rem; padding: 0 .85rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper-2); }
.search-field:focus-within { border-color: var(--plum); box-shadow: 0 0 0 3px color-mix(in srgb, var(--plum) 14%, transparent); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: inherit; }
.toolbar select { min-height: 2.85rem; max-width: 100%; padding: 0 2.2rem 0 .9rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper-2); color: inherit; }
.portal-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0 1.6rem; }
.portal-card { min-height: 8.6rem; padding: .9rem; border: 1px solid var(--line); border-radius: .95rem; background: var(--paper-2); cursor: pointer; text-align: left; transition: transform .16s, border-color .16s, box-shadow .16s; }
.portal-card:hover, .portal-card.active { transform: translateY(-2px); border-color: var(--plum); box-shadow: var(--shadow); }
.portal-card.active { background: linear-gradient(145deg, color-mix(in srgb, var(--plum-soft) 58%, var(--paper-2)), var(--paper-2)); }
.portal-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.portal-card-top b { color: var(--plum); transition: transform .16s; }
.portal-card:hover .portal-card-top b, .portal-card.active .portal-card-top b { transform: translateX(.2rem); }
.portal-card strong, .portal-card small, .portal-card > span:last-child { display: block; }
.portal-card strong { line-height: 1.35; }
.portal-card small { margin-top: .35rem; color: var(--muted); font-size: .8em; line-height: 1.5; }
.portal-card > span:last-child { margin-top: .8rem; color: var(--plum); font-size: .72rem; }
.category-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .9rem 0 1.4rem; }
.category-scroller { padding-bottom: .15rem; }
.chip, .namespace-badge { display: inline-flex; align-items: center; min-height: 1.7rem; padding: .2rem .58rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: .68rem; white-space: nowrap; }
button.chip { cursor: pointer; }
.chip.active, button.chip:hover, .namespace-badge { border-color: transparent; background: var(--plum-soft); color: var(--plum-strong); }
.results-section { scroll-margin-top: 5.5rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.1rem 0 .8rem; }
.section-heading h1, .section-heading h2 { margin: 0; }
.section-heading span { color: var(--muted); font-size: .75rem; }
.article-list { display: grid; gap: .45rem; }
.article-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .8rem; min-height: 4.1rem; padding: .72rem .85rem; border: 1px solid var(--line); border-radius: .78rem; background: color-mix(in srgb, var(--paper-2) 93%, transparent); cursor: pointer; text-align: left; }
.article-row:hover { border-color: var(--plum); background: var(--paper-2); }
.article-row > b { color: var(--plum); font-size: 1.25rem; }
.article-row strong, .article-row small { display: block; }
.article-row small { margin-top: .2rem; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.row-size { color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: center; align-items: center; gap: .8rem; margin-top: 1.3rem; }
.pager button, .back-button, .article-actions button, .article-actions a, .state-panel button, .reading-bar button { min-height: 2.55rem; padding: .48rem .75rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper-2); color: inherit; cursor: pointer; text-decoration: none; }
.pager button:disabled { opacity: .42; cursor: default; }
.article-page { width: min(var(--article-max), 100%); margin: 0 auto; transition: width .16s ease; }
.reading-bar { position: sticky; top: 4.25rem; z-index: 35; display: flex; align-items: center; gap: .5rem; margin: -.35rem 0 .8rem; padding: .4rem; border: 1px solid var(--line); border-radius: .8rem; background: color-mix(in srgb, var(--paper-2) 91%, transparent); backdrop-filter: blur(14px); }
.reading-bar span { margin-left: auto; color: var(--muted); font-size: .72rem; }
.reading-bar button { min-height: 2.2rem; padding: .35rem .6rem; background: transparent; }
.back-button { border-color: transparent; color: var(--plum); }
.article-header { padding: 1rem 0 1.2rem; border-bottom: 1px solid var(--line); }
.article-header h1 { max-width: 100%; font-size: clamp(2rem, 4vw, 3.4rem); overflow-wrap: anywhere; }
.article-tags { margin-bottom: .7rem; }
.technical-meta { margin-top: .7rem; color: var(--muted); font-size: .72rem; }
.technical-meta summary { width: fit-content; cursor: pointer; color: var(--plum); }
.technical-meta > div { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .55rem; padding: .65rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--paper-2); }
.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .85rem 0 1.2rem; }
.rendered-layout { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; grid-template-areas: "body toc"; gap: 1.6rem; align-items: start; }
.article-body { grid-area: body; min-width: 0; overflow: hidden; }
.article-toc { position: sticky; top: 8rem; grid-area: toc; max-height: calc(100vh - 9rem); overflow: auto; border: 1px solid var(--line); border-radius: .85rem; background: var(--paper-2); font-size: .72rem; }
.article-toc > summary { display: flex; justify-content: space-between; gap: .5rem; padding: .75rem; color: var(--plum); cursor: pointer; list-style: none; }
.article-toc > summary::-webkit-details-marker { display: none; }
.article-toc > summary span { color: var(--muted); }
.article-toc ol { margin: 0; padding: 0 .75rem .8rem; list-style: none; }
.article-toc li { margin-inline-start: calc(var(--toc-depth, 0) * .75rem); }
.article-toc li + li { margin-top: .28rem; }
.article-toc a { color: var(--muted); text-decoration: none; }
.article-toc a:hover { color: var(--plum); }
.wiki-document { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.72; }
.wiki-document > :first-child { margin-top: 0; }
.wiki-document > :last-child { margin-bottom: 0; }
.wiki-document p, .wiki-document li, .wiki-document dd { line-height: 1.75; }
.wiki-document h1, .wiki-document h2, .wiki-document h3, .wiki-document h4, .wiki-document h5, .wiki-document h6 { scroll-margin-top: 8.5rem; overflow-wrap: anywhere; line-height: 1.28; }
.wiki-document h2 { margin: 2.2rem 0 .8rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); font-size: 1.55rem; }
.wiki-document h3 { margin: 1.7rem 0 .65rem; font-size: 1.3rem; }
.wiki-document h4 { margin: 1.4rem 0 .55rem; font-size: 1.12rem; }
.wiki-document a { overflow-wrap: anywhere; }
.wiki-document ul, .wiki-document ol { padding-inline-start: 1.35rem; }
.wiki-document pre, .wiki-document code { max-width: 100%; overflow-x: auto; }
.wiki-document pre { padding: .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper-3); white-space: pre-wrap; }
.wiki-document blockquote { margin: 1rem 0; padding: .7rem 1rem; border-inline-start: .25rem solid var(--plum); background: color-mix(in srgb, var(--plum-soft) 35%, transparent); }
.wiki-document center { max-width: 100%; }
.wiki-document .floatright, .wiki-document .tright, .wiki-document .thumb, .wiki-document .infobox, .wiki-document .wikitable { max-width: 100% !important; }
.wiki-document .floatright, .wiki-document .tright { float: none !important; margin: 1rem auto !important; }
.wiki-document .thumbinner { max-width: 100% !important; }
.reader-image, .wiki-document img { display: block; width: auto !important; max-width: 100% !important; height: auto !important; max-height: min(68vh, 46rem); margin: .75rem auto; object-fit: contain; cursor: zoom-in; border-radius: .35rem; }
.reader-image:focus, .wiki-document img:focus { outline: 3px solid color-mix(in srgb, var(--plum) 45%, transparent); outline-offset: 3px; }
.reader-image.reader-icon, .wiki-document img.reader-icon { display: inline-block; max-width: 6rem !important; max-height: 6rem; margin: .25rem; vertical-align: middle; cursor: zoom-in; }
.reader-image.table-image, .wiki-document table img { max-width: 7.5rem !important; max-height: 7.5rem; margin: .25rem auto; }
.image-failed { display: none !important; }
.table-viewport { width: 100%; max-width: 100%; margin: 1rem 0; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: .7rem; background: var(--paper-2); }
.table-viewport table { width: max-content !important; min-width: 100%; max-width: none !important; margin: 0 !important; border-collapse: collapse; font-size: .9em; }
.table-viewport th, .table-viewport td { max-width: 30rem; padding: .55rem .65rem !important; border: 1px solid var(--line); vertical-align: top; white-space: normal !important; overflow-wrap: anywhere; }
.table-viewport th { background: var(--plum-soft); color: var(--ink); }
.table-viewport caption { padding: .6rem; font-weight: 700; }
.raw-details { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.raw-details summary { color: var(--plum); cursor: pointer; }
.raw-source { max-width: 100%; max-height: 70vh; margin-top: .8rem; padding: .9rem; overflow: auto; border: 1px solid var(--line); border-radius: .7rem; background: #120f13; color: #f8eef4; font: .72rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .65rem; }
.media-card { display: flex; min-width: 0; flex-direction: column; gap: .35rem; padding: .65rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper-2); }
.media-card img { width: 100% !important; height: 10rem !important; max-height: 10rem; margin: 0; object-fit: contain; background: var(--paper-3); }
.media-card strong { overflow-wrap: anywhere; font-size: .78rem; }
.media-card small { color: var(--muted); font-size: .67rem; }
.media-card a { margin-top: auto; font-size: .72rem; }
.audio-list { display: grid; gap: .5rem; }
.audio-list article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .7fr); align-items: center; gap: .8rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper-2); }
.audio-list strong, .audio-list small { display: block; overflow-wrap: anywhere; }
.audio-list small { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.audio-list audio { width: 100%; }
.about-page { width: min(860px, 100%); margin: 0 auto; }
.about-page section { margin-top: 1.4rem; padding: 1.05rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--paper-2); }
.about-page section p { color: var(--muted); line-height: 1.75; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.definition-grid div { padding: .7rem; border: 1px solid var(--line); border-radius: .65rem; }
.definition-grid dt { color: var(--muted); font-size: .68rem; }
.definition-grid dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.image-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--overlay); color: white; }
.image-viewer::backdrop { background: var(--overlay); }
.viewer-stage { display: grid; width: 100%; height: 100%; place-items: center; padding: 3.5rem 1rem 1rem; }
.viewer-stage img { max-width: 96vw; max-height: 88dvh; object-fit: contain; }
.viewer-stage p { position: absolute; bottom: 1rem; left: 50%; max-width: calc(100% - 2rem); margin: 0; padding: .4rem .7rem; transform: translateX(-50%); border-radius: .5rem; background: rgba(0, 0, 0, .62); text-align: center; font-size: .75rem; }
.viewer-close { position: fixed; top: max(.8rem, env(safe-area-inset-top)); right: max(.8rem, env(safe-area-inset-right)); z-index: 2; width: 2.7rem; height: 2.7rem; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(0,0,0,.55); color: white; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 1000px) {
  .portal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rendered-layout { grid-template-columns: 1fr; grid-template-areas: "toc" "body"; gap: .9rem; }
  .article-toc { position: static; max-height: 17rem; }
  .reading-bar { top: 7.1rem; }
}
@media (max-width: 760px) {
  body { font-size: calc(15.5px * var(--reader-scale)); }
  .site-header { grid-template-columns: 1fr; gap: .45rem; padding-inline: .65rem; }
  .header-primary { width: 100%; }
  .brand { flex: 1 1 auto; }
  .brand strong { font-size: .85rem; }
  .brand small { font-size: .48rem; }
  .display-menu > summary span { display: none; }
  .display-panel { position: fixed; top: auto; right: .65rem; bottom: max(.65rem, env(safe-area-inset-bottom)); left: .65rem; width: auto; max-height: calc(100dvh - 1.3rem); overflow-y: auto; border-radius: 1.1rem; }
  .site-header nav { justify-content: flex-start; margin-inline: -.65rem; padding: 0 .65rem .05rem; }
  .site-header nav button { min-height: 2.2rem; padding: .35rem .58rem; }
  .site-main { width: calc(100% - 1rem); padding-top: 1rem; }
  .portal-hero { grid-template-columns: 1fr; gap: .9rem; margin-bottom: 1rem; }
  .portal-hero h1, .article-header h1, .about-page > h1 { font-size: clamp(1.85rem, 9vw, 2.7rem); }
  .portal-hero p:not(.eyebrow) { margin-bottom: 0; font-size: .92em; }
  .coverage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; overflow-x: auto; }
  .coverage-grid div { min-width: 6.5rem; padding: .65rem; }
  .coverage-grid strong { font-size: 1rem; }
  .toolbar { grid-template-columns: 1fr; }
  .portal-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14.5rem, 78vw); grid-template-columns: none; gap: .55rem; margin-inline: -.5rem; padding: .1rem .5rem .5rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .portal-card { min-height: 7.2rem; padding: .8rem; scroll-snap-align: start; }
  .portal-card small { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .category-scroller { flex-wrap: nowrap; margin-inline: -.5rem; padding: 0 .5rem .4rem; overflow-x: auto; scrollbar-width: none; }
  .category-scroller::-webkit-scrollbar { display: none; }
  .section-heading { align-items: flex-start; }
  .article-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem; padding: .65rem .7rem; }
  .article-row .row-size { display: none; }
  .article-row > b { display: block; }
  .article-row small { max-width: 100%; }
  .site-footer { flex-direction: column; }
  .reading-bar { top: 6.1rem; margin-inline: -.1rem; }
  .reading-bar span { display: none; }
  .article-header { padding-top: .55rem; }
  .article-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .article-actions > * { display: grid; place-items: center; text-align: center; }
  .wiki-document { font-size: .98rem; line-height: 1.68; }
  .wiki-document h2 { font-size: 1.38rem; }
  .wiki-document h3 { font-size: 1.18rem; }
  .reader-image, .wiki-document img { max-height: 58dvh; }
  .table-viewport { margin-inline: 0; border-radius: .55rem; }
  .table-viewport table { font-size: .78rem; }
  .table-viewport th, .table-viewport td { max-width: 18rem; padding: .4rem .48rem !important; }
  .reader-image.table-image, .wiki-document table img { max-width: 5.5rem !important; max-height: 5.5rem; }
  .audio-list article { grid-template-columns: 1fr; }
  .definition-grid { grid-template-columns: 1fr; }
  .to-top { width: 2.55rem; height: 2.55rem; }
}
@media (max-width: 420px) {
  body { font-size: calc(15px * var(--reader-scale)); }
  .brand small { display: none; }
  .brand-mark { width: 1.95rem; height: 1.95rem; }
  .coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .coverage-grid div { min-width: 0; }
  .article-row .namespace-badge { display: none; }
  .article-row { grid-template-columns: minmax(0, 1fr) auto; }
  .article-actions { grid-template-columns: 1fr; }
  .portal-cards { grid-auto-columns: 84vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
