/* Article layout follows the familiar encyclopedia reading hierarchy. */
:root {
  color-scheme: light;
  --background: #fff;
  --text: #202122;
  --muted: #54595d;
  --line: #a2a9b1;
  --subtle-line: #c8ccd1;
  --panel: #f8f9fa;
  --accent: #36c;
  --hover: #eaf3ff;
  --plate: #f3f5f2;
  --teal: #26746b;
  --article-size: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #101418;
  --text: #eaecf0;
  --muted: #a2a9b1;
  --line: #72777d;
  --subtle-line: #454b53;
  --panel: #181e24;
  --accent: #8daeff;
  --hover: #202d42;
  --plate: #1b2929;
  --teal: #8fc9ba;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; color: var(--text); background: var(--background); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--accent); }
button, input, select { font: inherit; }
button, select, input { color: var(--text); }
button { cursor: pointer; }
button, select { border: 1px solid var(--line); background: var(--background); border-radius: 2px; }
button { min-height: 32px; padding: 4px 10px; }
button:hover { background: var(--hover); }
button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--hover); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 12px; top: -90px; z-index: 200; background: var(--background); padding: 10px 16px; border: 1px solid var(--accent); }
.skip-link:focus { top: 12px; }
.site-header { max-width: 1680px; margin: auto; padding: 23px 44px 18px; display: flex; align-items: center; gap: 34px; }
.wordmark { display: flex; gap: 12px; align-items: center; color: var(--text) !important; line-height: 1.2; text-decoration: none !important; }
.wordmark-icon { font: 38px Georgia, "Times New Roman", serif; border-right: 1px solid var(--subtle-line); padding-right: 14px; }
.wordmark strong { font: 23px Georgia, "Times New Roman", serif; letter-spacing: .04em; }
.wordmark small { display: block; font-size: 12px; letter-spacing: .08em; margin-top: 3px; }
.site-links { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.site-links .theme-toggle { font-size: 13px; }
.site-context { color: var(--muted); font-size: 13px; }
.page-layout { max-width: 1680px; margin: 0 auto; padding: 14px 44px 60px; display: grid; grid-template-columns: 164px minmax(0, 1060px) 132px; gap: 40px; justify-content: center; }
.sidebar { position: sticky; top: 24px; align-self: start; font-size: 13px; max-height: calc(100vh - 48px); overflow-y: auto; }
.sidebar-heading { display: flex; align-items: center; gap: 8px; padding: 7px 0; margin: 0 0 9px; border-bottom: 1px solid var(--subtle-line); font-size: 13px; }
.contents { padding-top: 16px; }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents li { margin: 10px 0; line-height: 1.45; }
.contents a { display: block; }
.contents a[aria-current="location"] { font-weight: 650; color: var(--text); }
.contents .toc-sub { padding-left: 12px; font-size: 12px; margin-top: 7px; }
.contents .toc-sub li { margin: 8px 0; }
.contents-top { margin-bottom: 14px; }
.appearance { padding-top: 16px; }
:root:not(.article-enhanced) .appearance { display: none; }
.appearance fieldset { border: 0; padding: 0; margin: 16px 0 22px; }
.appearance legend { color: var(--muted); margin-bottom: 8px; padding: 0; }
.appearance label { display: flex; align-items: center; gap: 7px; margin: 9px 0; cursor: pointer; }
.appearance input { accent-color: var(--accent); margin: 0; width: 15px; height: 15px; }
.appearance .theme-toggle { font-size: 12px; padding: 4px 8px; }
.article { min-width: 0; font-size: var(--article-size); line-height: 1.625; }
.article-title { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
h1 { font: normal 31px/1.4 "Linux Libertine", Georgia, "Times New Roman", serif; margin: 0; }
.ai-marker { display: inline-block; cursor: help; font: 15px/1.2 system-ui, sans-serif; vertical-align: middle; }
.article-tabs { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--subtle-line); font-size: 13px; min-height: 42px; margin-bottom: 12px; }
.article-tabs > div { display: flex; gap: 21px; align-items: stretch; }
.article-tabs a, .article-tabs span { padding: 10px 0 8px; }
.article-tabs .selected { border-bottom: 2px solid var(--text); color: var(--text); }
.article-tabs .plain-control { padding: 4px 0; min-height: 26px; border: 0; background: none; font-size: 13px; color: var(--accent); }
.mobile-toc-toggle { display: none; }
.article-origin { font-size: 13px; margin: 0 0 20px; }
.hatnote { font-size: .89em; padding-left: 20px; margin: 0 0 20px; }
.article p { margin: 0 0 16px; }
.article h2 { font: normal 25px/1.35 "Linux Libertine", Georgia, "Times New Roman", serif; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 30px 0 15px; scroll-margin-top: 24px; }
.article h3 { font-size: 1.13em; font-weight: 650; line-height: 1.4; margin: 24px 0 12px; }
.article h4 { font-size: 1em; margin: 18px 0 8px; }
.article sup { font-size: 11px; line-height: 0; vertical-align: super; white-space: nowrap; }
.article sup a { padding: 3px 0; }
.infobox { float: right; clear: right; width: 300px; margin: 0 0 22px 25px; padding: 4px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.infobox-title { text-align: center; background: #e6eedc; color: #202122; padding: 6px; font-weight: 700; font-size: 17px; margin-bottom: 5px; }
[data-theme="dark"] .infobox-title { background: #2a3c32; color: var(--text); }
.infobox-image { display: block; line-height: 0; }
.infobox img { width: 100%; height: auto; }
.infobox-caption { font-size: 12px; padding: 6px 5px 10px; line-height: 1.45; }
.specimen-photo { float: right; width: 340px; max-width: 100%; margin: 0 0 18px 24px; padding: 4px; border: 1px solid var(--line); background: var(--panel); }
.specimen-photo img { display: block; width: 100%; height: auto; }
.specimen-photo figcaption { padding: 7px 5px 4px; font-size: 13px; line-height: 1.5; }
.plush-figure { max-width: 620px; margin: 24px 0; border: 1px solid var(--line); background: var(--panel); }
.plush-figure .article-photo-image { display: block; }
.plush-figure img { display: block; width: 100%; height: auto; }
.plush-figure figcaption { padding: 10px 15px 13px; font-size: 13px; line-height: 1.5; }
section[aria-labelledby="ecology"] { display: flow-root; }
@media (max-width: 700px) { .specimen-photo { float: none; width: 100%; margin: 0 0 18px; } }
.infobox-band { text-align: center; padding: 4px; background: #e6eedc; color: #202122; font-weight: 650; margin: 3px 0; }
[data-theme="dark"] .infobox-band { background: #2a3c32; color: var(--text); }
.infobox dl { display: grid; grid-template-columns: 98px 1fr; gap: 4px 6px; margin: 9px 8px; }
.infobox dt, .infobox dd { margin: 0; }
.binomial { text-align: center; padding: 6px; }
.binomial strong { display: block; font-size: 15px; }
.binomial small { display: block; margin-top: 3px; }
.mini-range { display: block; width: 100%; height: auto; background: #dce7e9; }
.infobox .range-label { padding: 5px 6px; text-align: center; font-size: 12px; }
.quick-facts { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: .88em; }
.quick-facts th, .quick-facts td { padding: 7px 10px; border: 1px solid var(--subtle-line); text-align: left; }
.quick-facts th { background: var(--panel); font-weight: 600; }
.article-section { display: flow-root; }
.interactive-figure { clear: both; margin: 24px 0 28px; padding: 0; border: 1px solid var(--line); background: var(--panel); }
.figure-header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 11px 15px 9px; border-bottom: 1px solid var(--subtle-line); }
.figure-header strong { font-size: 14px; font-weight: 650; }
.figure-number { font-size: 12px; color: var(--muted); white-space: nowrap; }
.plate-stage { position: relative; background: var(--plate); }
.plate-stage canvas { width: 100%; height: auto; display: block; }
.plate-fallback { padding: 20px 24px; }
.plate-fallback svg { display: block; width: 100%; height: auto; max-height: 260px; margin: 0 auto 12px; }
.plate-fallback p { font-size: 14px; margin-bottom: 0; }
.plate-stage canvas { display: none; }
.interactive-figure.is-ready .plate-stage canvas { display: block; }
.interactive-figure.is-ready .plate-fallback { display: none; }
.plate-controls { display: none; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 15px; border-top: 1px solid var(--subtle-line); font-size: 13px; }
.interactive-figure.is-ready .plate-controls { display: flex; }
.plate-controls label { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.plate-controls input[type="range"] { width: 120px; accent-color: var(--teal); height: 26px; }
.plate-controls select { max-width: 100%; min-height: 32px; padding: 4px 24px 4px 8px; }
.control-group { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.control-label { color: var(--muted); font-size: 12px; margin-right: 4px; }
.plate-controls output { font-variant-numeric: tabular-nums; min-width: 2.6em; }
.plate-controls .wide-range { flex: 1 1 210px; }
.plate-controls .wide-range input { flex: 1; min-width: 100px; }
.figure-readouts { display: flex; gap: 14px 30px; flex-wrap: wrap; padding: 10px 15px; border-top: 1px solid var(--subtle-line); font-size: 12px; }
.figure-readouts > div { display: flex; flex-direction: column; }
.figure-readouts output { color: var(--text); font-size: 18px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.figure-readouts span { color: var(--muted); }
.plate-status { font-size: 12px; color: var(--muted); padding: 8px 15px 0; margin: 0 !important; min-height: 28px; }
.plate-status:empty { min-height: 0; padding: 0; }
.interactive-figure figcaption { padding: 10px 15px 13px; font-size: 13px; line-height: 1.5; }
.interactive-figure figcaption .caption-number { font-weight: 650; }
.figure-jump { font-size: 13px; }
.figure-jump ul { display: flex; flex-wrap: wrap; gap: 5px 24px; margin: 8px 0 0; padding-left: 17px; }
.formula { font-family: Georgia, "Times New Roman", serif; font-size: 1.08em; text-align: center; padding: 9px; }
.references { font-size: 13px; line-height: 1.5; column-count: 2; column-gap: 32px; padding-left: 28px; }
.references li { break-inside: avoid; margin-bottom: 10px; padding-left: 3px; }
.references li:target { background: var(--hover); outline: 4px solid var(--hover); }
.article section:target > h2 { color: var(--text); }
.category-box { clear: both; border: 1px solid var(--line); padding: 8px 12px; background: var(--panel); font-size: 13px; margin-top: 28px; }
.category-box a + a::before { content: " | "; color: var(--line); padding: 0 7px; }
.article-footer { border-top: 1px solid var(--subtle-line); padding-top: 18px; margin-top: 30px; font-size: 12px; color: var(--muted); }
.article-footer a { margin-right: 16px; }
.image-dialog { max-width: min(1440px, 96vw); width: 100%; max-height: 94dvh; padding: 14px; border: 1px solid var(--line); background: var(--background); color: var(--text); }
.image-dialog::backdrop { background: #000c; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.image-dialog img { display: block; max-width: 100%; max-height: 75dvh; margin: auto; object-fit: contain; }
.image-dialog p { font-size: 13px; margin: 10px 0 0; }
html[data-text-size="large"] { --article-size: 18px; }
html[data-text-size="small"] { --article-size: 14px; }
html[data-width="wide"] .page-layout { grid-template-columns: 164px minmax(0, 1fr) 132px; max-width: none; }
@media (min-width: 1700px) { .page-layout { gap: 48px; } }
@media (max-width: 1250px) {
  .site-header { padding-inline: 28px; }
  .page-layout { padding-inline: 28px; gap: 30px; grid-template-columns: 154px minmax(0, 1fr); }
  .appearance { display: none; }
  html[data-width="wide"] .page-layout { grid-template-columns: 154px minmax(0, 1fr); }
  .site-context { display: none; }
}
@media (max-width: 950px) {
  .site-header { padding: 17px 22px; }
  .page-layout, html[data-width="wide"] .page-layout { display: block; padding: 12px 22px 40px; max-width: 850px; }
  .contents { display: block; position: static; max-height: none; padding: 12px 16px; margin-bottom: 20px; border: 1px solid var(--subtle-line); background: var(--panel); }
  .article-enhanced .contents:not(.is-open) { display: none; }
  .contents.is-open { display: block; }
  .contents ul { columns: 2; }
  .contents li { break-inside: avoid; }
  .contents .toc-sub { display: none; }
  .article-enhanced .mobile-toc-toggle { display: inline-block; }
  .site-links { gap: 14px; }
  .article-tabs > div { gap: 16px; }
}
@media (max-width: 620px) {
  :root { --article-size: 16px; }
  .site-header { padding: 15px 16px 12px; gap: 12px; }
  .wordmark-icon { display: none; }
  .wordmark strong { font-size: 21px; }
  .wordmark small { font-size: 11px; letter-spacing: .03em; }
  .site-links { gap: 12px; font-size: 12px; }
  .site-links .home-link { display: none; }
  .site-links .theme-toggle { font-size: 12px; min-height: 32px; }
  .page-layout, html[data-width="wide"] .page-layout { padding-inline: 16px; }
  h1 { font-size: 28px; line-height: 1.2; padding: 5px 0 9px; }
  .article-title { gap: 8px; }
  .article-origin { margin-bottom: 15px; }
  .article-tabs { min-height: 40px; }
  .article-tabs > div { gap: 15px; }
  .article-tabs a, .article-tabs span { padding-top: 8px; }
  .article-tabs .reading-label { display: none; }
  .hatnote { padding-left: 0; font-size: 13px; }
  .infobox { float: none; width: min(100%, 390px); margin: 22px auto 24px; font-size: 13px; }
  .article .lead { display: flex; flex-direction: column; }
  .article .lead .infobox { order: 2; }
  .article h2 { font-size: 24px; }
  .interactive-figure { margin-inline: -4px; }
  .figure-header { padding: 10px 11px; }
  .figure-header strong { font-size: 13px; }
  .figure-number { font-size: 11px; }
  .plate-controls { padding: 10px; gap: 10px 12px; }
  .plate-controls button { min-height: 40px; padding-inline: 12px; }
  .plate-controls select { min-height: 40px; }
  .plate-controls input[type="range"] { min-height: 34px; }
  .plate-controls .control-group { gap: 5px; }
  .control-label { flex-basis: 100%; }
  .figure-readouts { padding: 9px 12px; gap: 10px 20px; }
  .figure-readouts output { font-size: 17px; }
  .references { column-count: 1; }
  .quick-facts { font-size: 12px; }
  .quick-facts th, .quick-facts td { padding: 6px; }
  .image-dialog { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root { --background: #fff !important; --text: #000 !important; --muted: #333 !important; --line: #999 !important; --panel: #fff !important; --accent: #000 !important; }
  .site-header, .sidebar, .article-tabs, .plate-controls, .skip-link, .image-dialog, .ai-marker { display: none !important; }
  .page-layout { display: block; padding: 0; max-width: none; }
  .article { font-size: 11pt; }
  .interactive-figure { break-inside: avoid; }
  .references { column-count: 2; }
  .article h2 { break-after: avoid; }
}
