:root {
  --ink: #202122;
  --muted: #54595d;
  --line: #a2a9b1;
  --light-line: #c8ccd1;
  --link: #3366cc;
  --size: 16px;
  --width: 1620px;
  color-scheme: light;
}
html[data-size="small"] { --size: 14px; }
html[data-size="large"] { --size: 19px; }
html[data-width="wide"] { --width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 Arial, Helvetica, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
h1, h2, h3, p, figure { margin: 0; }
[ id ] { scroll-margin-top: 16px; }
.shell { width: min(var(--width), calc(100% - 88px)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 8px; background: #fff; transform: translateY(-200%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header { display: flex; align-items: center; min-height: 72px; gap: 18px; padding-block: 10px; }
.main-menu { position: relative; }
.main-menu summary { display: grid; width: 36px; height: 36px; place-items: center; cursor: pointer; list-style: none; border-radius: 2px; }
.main-menu summary::-webkit-details-marker { display: none; }
.main-menu summary:hover { background: #f1f2f4; }
.main-menu nav { position: absolute; z-index: 4; top: calc(100% + 6px); left: 0; display: grid; width: 190px; gap: 6px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px #0002; font-size: 14px; }
.main-menu nav b { padding-bottom: 4px; border-bottom: 1px solid var(--light-line); }
.brand { display: flex; align-items: center; flex: none; gap: 6px; color: #101418; }
.brand:hover { text-decoration: none; }
.brand span { font: small-caps 30px/.94 Georgia, 'Times New Roman', serif; }
.brand small { display: block; margin-top: 4px; font: 13px/1 Georgia, 'Times New Roman', serif; }
.search { display: flex; align-items: stretch; position: relative; width: min(42vw, 510px); margin-left: 21px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); }
.search-icon { display: grid; flex: 0 0 34px; place-items: center; }
.search input { min-width: 0; flex: 1; border: 0; padding: 5px 3px; color: var(--ink); font-size: 14px; }
.search button { padding: 5px 12px; color: var(--ink); background: #f8f9fa; border: 0; border-left: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.search button:hover { background: #eaecf0; }
.results { position: absolute; z-index: 6; top: 100%; left: -1px; right: -1px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px #0002; }
.results a { display: block; padding: 8px 12px; color: var(--ink); font-size: 14px; }
.results a:hover, .results a:focus-visible { background: #eaecf0; }
.results small { display: block; color: var(--muted); }
.no-results { padding: 8px 12px; font-size: 14px; }
.quick-random { margin-left: auto; white-space: nowrap; font-size: 14px; }

.page-grid { display: grid; align-items: start; grid-template-columns: minmax(135px, .8fr) minmax(0, 4fr) minmax(130px, .76fr); gap: 26px; margin-top: 25px; }
.home-grid .wiki { grid-column: 2; }
.wiki { min-width: 0; font-size: var(--size); }
.tabs { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tabs > div { display: flex; gap: 15px; align-items: stretch; }
.tabs a, .tabs span, .tabs button { display: inline-flex; align-items: center; padding: 8px 0; white-space: nowrap; }
.tabs .active { margin-bottom: -1px; border-bottom: 2px solid var(--ink); }
.tabs button { padding: 0; color: var(--link); border: 0; background: transparent; }
.tabs button:hover { text-decoration: underline; }
.appearance, .contents { position: sticky; top: 20px; padding-top: 13px; font-size: 14px; }
.appearance summary, .contents summary { padding: 0 0 6px; border-bottom: 1px solid var(--light-line); font-weight: 700; cursor: pointer; }
.appearance fieldset { margin: 12px 0; padding: 0; border: 0; }
.appearance legend { width: 100%; margin-bottom: 5px; padding: 0 0 4px; border-bottom: 1px solid var(--light-line); color: var(--muted); }
.appearance label { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.appearance input { accent-color: var(--link); }
.contents nav { display: grid; gap: 6px; margin-top: 8px; }
.contents a:first-child { color: var(--ink); font-weight: 700; }

.welcome { margin: 16px 0 10px; padding: 12px 10px 11px; text-align: center; background: #f8f9fa; border: 1px solid #ddd; }
.welcome h1 { font-size: 1.63em; font-weight: 400; line-height: 1.25; }
.welcome p { font-size: .89em; }
.welcome p:last-child { margin-top: 3px; }
.portal { display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr); gap: 8px; align-items: start; }
.panel { padding: 6px 8px 8px; margin-bottom: 8px; border: 1px solid var(--panel-line, #d6d1e1); background: var(--panel-bg, #faf5ff); font-size: .88em; }
.panel h2 { margin: 0 0 7px; padding: 2px 7px; border: 1px solid var(--panel-line, #d6d1e1); background: var(--panel-title, #e9dff3); font-size: 1.15em; line-height: 1.45; }
.panel p, .panel li { line-height: 1.5; }
.panel p { margin: 6px 0; }
.panel ul { margin: 5px 0 5px 22px; padding: 0; }
.panel li + li { margin-top: 4px; }
.green { --panel-bg: #f5fffa; --panel-line: #a3bfb1; --panel-title: #cef2e0; }
.blue { --panel-bg: #f5faff; --panel-line: #a3b0bf; --panel-title: #cedff2; }
.portal-image { float: left; width: 42%; max-width: 205px; margin: 0 10px 4px 0; }
.portal-image figcaption { margin-top: 3px; text-align: center; font-size: .85em; }
.portal-links { clear: both; text-align: right; }
.index-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; padding: 5px 8px; }
.index-categories h3 { font-size: 1em; }
.index-categories section:target { background: #ffec9d; }

.article h1 { font: 400 2em/1.2 Georgia, 'Times New Roman', serif; }
.article .tabs { margin-top: 2px; }
.site-description { margin: 7px 0 18px; color: var(--muted); font-size: .8em; }
.hatnote { margin: 0 0 9px 1.2em; font-size: .91em; font-style: italic; }
.prose p { margin: 0 0 13px; }
.prose h2 { margin: 20px 0 6px; padding-bottom: 2px; border-bottom: 1px solid var(--line); font: 400 1.49em/1.4 Georgia, 'Times New Roman', serif; }
.prose ul, .prose ol { padding-left: 23px; margin: 5px 0 13px; }
.prose sup { margin-left: 2px; font-size: .69em; line-height: 0; }
.prose li:target, sup:target { background: #eaf3ff; }
#references { font-size: .9em; }
#references h2 { font-size: 1.66em; }
.infobox { float: right; width: min(36%, 300px); margin: 0 0 12px 18px; padding: 3px; border: 1px solid var(--line); background: #f8f9fa; font-size: .87em; line-height: 1.42; }
.infobox-title { padding: 4px 6px; background: #e9e9e9; font-size: 1.1em; text-align: center; font-weight: 700; }
.infobox figure { margin: 4px 4px 0; text-align: center; }
.infobox img { width: 100%; background: #fff; }
.infobox figcaption { margin-top: 4px; font-size: .9em; }
.infobox dl { margin: 6px 4px; }
.infobox dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; padding-block: 3px; }
.infobox dt { font-weight: 700; }
.infobox dd { margin: 0; overflow-wrap: anywhere; }
.category-box { clear: both; margin-top: 20px; padding: 4px 8px; border: 1px solid var(--line); background: #f8f9fa; font-size: .88em; }
.footer { margin-top: 35px; padding-block: 14px 26px; border-top: 1px solid var(--line); font-size: 12px; }
.footer p { margin-bottom: 6px; }
.footer a + a { margin-left: 12px; }
.alias-tool { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--light-line); background: #f8f9fa; }
.alias-tool button { margin-top: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: #fff; }
.alias-tool output { display: inline-block; margin-left: 10px; font-weight: 700; }

@media (max-width: 1120px) {
  .shell { width: calc(100% - 56px); }
  .page-grid { grid-template-columns: minmax(125px, 1fr) minmax(0, 5fr); gap: 22px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-grid .wiki { grid-column: auto; }
  .appearance { display: none; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 30px); }
  .site-header { flex-wrap: wrap; gap: 9px; padding-block: 8px; }
  .brand img { width: 40px; }
  .brand span { font-size: 24px; }
  .brand small { font-size: 11px; }
  .quick-random { font-size: 12px; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; margin-top: 9px; }
  .contents { position: static; padding-top: 2px; }
  .contents nav { display: flex; flex-wrap: wrap; gap: 5px 12px; }
  .tabs, .tabs > div { gap: 8px; }
  .tabs { font-size: 12px; }
  .portal { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .index-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .infobox { width: min(100%, 310px); float: none; margin: 0 0 12px; }
}
@media print {
  .site-header, .contents, .appearance, .tabs, .footer, .skip { display: none !important; }
  .shell { width: 100%; }
  .page-grid { display: block; }
  a { color: inherit; }
}
