/* Independent implementation of the Vector-style article layout. */
:root {
  --background: #fff;
  --color: #202122;
  --subtle: #54595d;
  --link: #36c;
  --border: #a2a9b1;
  --border-subtle: #c8ccd1;
  --background-subtle: #f8f9fa;
  --background-strong: #eaecf0;
  --body-size: 16px;
  --page-width: 1650px;
  color-scheme: light;
}
:root[data-text-size="small"] { --body-size: 14px; }
:root[data-text-size="large"] { --body-size: 18px; }
:root[data-content-width="wide"] { --page-width: none; }
:root[data-theme="dark"] {
  --background: #101418;
  --color: #eaecf0;
  --subtle: #a2a9b1;
  --link: #88a3e8;
  --border: #72777d;
  --border-subtle: #54595d;
  --background-subtle: #202122;
  --background-strong: #27292d;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --background: #101418; --color: #eaecf0; --subtle: #a2a9b1;
    --link: #88a3e8; --border: #72777d; --border-subtle: #54595d;
    --background-subtle: #202122; --background-strong: #27292d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--color);
  font: 14px/1.6 sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--link); outline-offset: 2px;
}
.sr-only { position: absolute; clip: rect(0,0,0,0); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 8px; background: var(--background); z-index: 99; }
.skip-link:focus { top: 8px; }
.mw-header {
  height: 66px;
  max-width: 1650px;
  margin: auto;
  padding: 0 44px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.mw-header-start { display: flex; align-items: center; gap: 20px; width: 190px; flex: 0 0 190px; }
.icon-button { display: inline-grid; place-items: center; width: 20px; height: 32px; padding: 0; border: 0; background: none; color: var(--color); }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.icon-button:hover { background: var(--background-strong); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.mw-logo { color: var(--color); }
.mw-logo:hover { text-decoration: none; }
.mw-logo-container { display: flex; flex-direction: column; white-space: nowrap; }
.mw-logo-container strong { font: normal small-caps 25px/1.15 'Linux Libertine', Georgia, Times, 'Source Serif 4', serif; }
.mw-logo-container small { font: 10px/1.7 'Linux Libertine', Georgia, Times, 'Source Serif 4', serif; }
.mw-search { display: flex; position: relative; height: 32px; width: 474px; max-width: 45%; border: 1px solid var(--border); }
.mw-search svg { position: absolute; left: 10px; top: 7px; width: 17px; height: 17px; stroke: var(--subtle); stroke-width: 1.7; fill: none; pointer-events: none; }
.mw-search input { width: 100%; min-width: 0; padding: 4px 8px 4px 33px; border: 0; background: var(--background); color: var(--color); font-size: 14px; outline-offset: -2px; }
.mw-search button { padding: 0 12px; border: 0; border-left: 1px solid var(--border); border-radius: 0; color: var(--color); background: var(--background-subtle); font-weight: bold; }
.mw-search button:hover { background: var(--background-strong); }
.mw-header-end { display: flex; gap: 14px; margin-left: auto; white-space: nowrap; }
.main-menu, .tools-menu, .appearance-menu { position: relative; }
.dropdown-panel, .tools-panel {
  position: absolute; top: calc(100% + 5px); z-index: 10;
  width: 200px; padding: 12px 16px; border: 1px solid var(--border-subtle);
  background: var(--background); box-shadow: 0 2px 8px #0003; text-align: left;
}
.dropdown-panel strong { display: block; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
.dropdown-panel a, .tools-panel a, .tools-panel button { display: block; padding: 5px 0; color: var(--link); }
.tools-panel { right: 0; }
.tools-panel button { width: 100%; border: 0; background: transparent; text-align: left; }
.tools-panel button:hover { text-decoration: underline; }
.search-message { max-width: 912px; margin: 4px auto; padding: 8px 12px; border: 1px solid var(--border-subtle); background: var(--background-subtle); }
[hidden] { display: none !important; }
.mw-page-container {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr) 164px;
  gap: 40px;
  align-items: start;
  max-width: var(--page-width);
  margin: auto;
  padding: 24px 60px 60px;
}
.mw-sidebar, .mw-appearance { position: sticky; top: 24px; margin-top: 44px; min-width: 0; font-size: 14px; }
.side-heading { display: flex; gap: 10px; align-items: center; justify-content: flex-start; padding: 5px 0 8px; border-bottom: 1px solid var(--background-strong); line-height: 1.6; }
.side-heading strong { font-weight: bold; }
.quiet-button { padding: 0 8px; background: var(--background-strong); color: var(--color); border: 0; border-radius: 2px; font-size: 12px; line-height: 22px; }
.quiet-button:hover { background: var(--border-subtle); }
.toc-nav { padding-top: 7px; }
.toc-nav a { display: block; margin: 0; padding: 4px 0; line-height: 1.45; }
.toc-nav a.active { color: var(--color); font-weight: bold; }
.mw-content { min-width: 0; }
.article-title-row { display: flex; align-items: center; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--border-subtle); }
.article-header h1 { margin: 0; font: normal 28.8px/1.375 'Linux Libertine', Georgia, Times, 'Source Serif 4', serif; }
.article-language { margin-left: auto; color: var(--link); font-weight: bold; }
.toc-toggle { display: none; }
.article-toolbar { display: flex; justify-content: space-between; gap: 12px; height: 33px; border-bottom: 1px solid var(--border-subtle); }
.article-tabs, .view-tabs { display: flex; align-items: stretch; gap: 16px; }
.article-tabs > a, .view-tabs > a, .view-tabs summary { display: inline-flex; align-items: center; padding: 3px 0; position: relative; white-space: nowrap; font-size: 14px; }
.view-tabs summary { gap: 5px; color: var(--color); }
.article-tabs .selected, .view-tabs .selected { color: var(--color); }
.article-tabs .selected::after, .view-tabs .selected::after { position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; content: ''; background: var(--color); }
.appearance-menu { display: block; }
.appearance-menu .dropdown-panel { right: 0; width: 210px; }
.article-subtitle { font-size: 14px; margin: 8px 0 16px; }
.mw-parser-output { display: flow-root; font-size: var(--body-size); line-height: 1.625; }
.mw-parser-output p { margin: 0 0 1em; }
.mw-parser-output .hatnote { margin: 0 0 14px; padding-left: 26px; font-style: italic; }
.portrait-frame { float: right; clear: right; width: 260px; margin: 3px 0 16px 24px; padding: 3px; border: 1px solid var(--border-subtle); background: var(--background-subtle); font-size: 14px; line-height: 1.4; }
.portrait-frame img { display: block; width: 100%; height: auto; aspect-ratio: 25 / 17; object-fit: cover; }
.portrait-frame figcaption { padding: 3px 2px; }
.portrait-expand { float: right; color: var(--subtle); font-size: 11px; }
.mw-parser-output .article-section { scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: baseline; gap: 12px; margin: 1.25em 0 .35em; border-bottom: 1px solid var(--border-subtle); }
.section-heading h2 { font: normal 24px/1.375 'Linux Libertine', Georgia, Times, 'Source Serif 4', serif; padding: 0; margin: 0; }
.section-edit { white-space: nowrap; font: 12px/1.6 sans-serif; }
.reference-placeholder { font-size: .9em; color: var(--subtle); }
.appearance-controls fieldset, .mw-appearance fieldset { border: 0; padding: 0; margin: 9px 0 24px; }
.appearance-controls legend, .mw-appearance legend { width: 100%; padding-bottom: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--background-strong); color: var(--subtle); font-size: 14px; }
.appearance-controls label, .mw-appearance label { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 9px 0; cursor: pointer; }
.appearance-controls input, .mw-appearance input { appearance: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--subtle); border-radius: 50%; background: var(--background); flex-shrink: 0; }
.appearance-controls input:checked, .mw-appearance input:checked { border: 5px solid var(--link); }
.mobile-toc { display: none; }
.site-footer { clear: both; margin-top: 45px; padding-top: 14px; border-top: 1px solid var(--border-subtle); color: var(--subtle); font-size: 12px; }
.site-footer p { margin: 0 0 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
:root.toc-collapsed .mw-sidebar { visibility: hidden; }
:root.toc-collapsed .toc-toggle { display: inline-grid; }
:root.appearance-collapsed .mw-appearance { visibility: hidden; }
:root.appearance-collapsed .appearance-menu { display: block; }
@media (min-width: 1650px) {
  .mw-page-container { grid-template-columns: 184px minmax(0,1fr) 184px; gap: 40px; padding-inline: 80px; }
}
@media (max-width: 1199px) {
  .mw-header { padding-inline: 32px; gap: 24px; }
  .mw-header-start { width: 180px; flex-basis: 180px; }
  .mw-header-end { gap: 10px; }
  .mw-page-container { grid-template-columns: minmax(0,1fr) 164px; padding-inline: 40px; gap: 32px; }
  .mw-sidebar { display: none; }
  .toc-toggle { display: none !important; }
  .mobile-toc { display: block; position: relative; margin: 0 0 18px; width: max-content; }
  .mobile-toc summary { padding: 4px 0; font-size: 14px; font-weight: bold; }
  .mobile-toc nav { display: grid; gap: 6px; min-width: 190px; padding: 10px 14px; border: 1px solid var(--border-subtle); background: var(--background-subtle); font-size: 14px; }
}
@media (max-width: 999px) {
  .mw-page-container { display: block; padding: 24px 32px 50px; }
  .mw-appearance { display: none; }
  .appearance-menu { display: block; }
  .mw-header-end { font-size: 12px; }
  .mw-search { max-width: none; flex: 1; }
  .appearance-show { display: none; }
}
@media print {
  .mw-header, .mw-sidebar, .mw-appearance, .article-toolbar, .mobile-toc, .toc-toggle, .section-edit, .site-footer nav, .article-language, .search-message { display: none !important; }
  .mw-page-container { display: block; max-width: none; padding: 0; }
  .mw-parser-output { display: block; font-size: 12px; }
  .portrait-frame { float: right; break-inside: avoid; }
  .section-heading { break-after: avoid; }
  body { background: white; color: black; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Dropdowns use the same restrained grouping and touch targets as the article UI. */
.menu-title { display: block; border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; margin-bottom: 6px; }
.menu-group-title { display: block; color: var(--subtle); font-size: 12px; padding: 8px 0 4px; margin-top: 4px; border-bottom: 1px solid var(--background-strong); }
.dropdown-panel, .tools-panel { border-radius: 2px; }
.tools-panel button, .tools-panel a, .dropdown-panel a { padding: 7px 0; }
.dropdown-chevron { width: 6px; height: 6px; margin: -3px 3px 0 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.appearance-icon, .mobile-tools-icon, .edit-article svg, .save-article, .mobile-search-toggle, .mobile-site-menu { display: none; }
.edit-article svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mobile-site-menu .dropdown-panel { right: 0; }
.article-section summary { position: relative; -webkit-tap-highlight-color: transparent; }
.article-section h3 { font: bold 1.1em/1.5 sans-serif; margin: 1em 0 .3em; }
.section-chevron { display: none; }
.article-section:not([open]) .section-heading { margin-bottom: 1em; }
@media (max-width: 700px) {
  body { font-family: -apple-system, system-ui, 'Segoe UI', Roboto, Inter, Helvetica, Arial, sans-serif; }
  .mw-header { height: auto; min-height: 54px; max-width: none; padding: 0 16px; gap: 20px; display: flex; flex-wrap: wrap; background: var(--background-strong); border-bottom: 1px solid var(--border-subtle); }
  .mw-header-start { width: auto; flex: 1; gap: 16px; min-width: 0; }
  .mw-logo-container strong { font-size: 25px; line-height: 1.1; }
  .mw-logo-container small, .mw-header-end { display: none; }
  .mw-header .icon-button { width: 24px; height: 54px; flex-shrink: 0; }
  .mw-header .icon-button svg { width: 22px; height: 22px; }
  .mobile-search-toggle { display: inline-grid; }
  .mobile-site-menu { display: block; }
  .mw-search { display: none; order: 4; flex: 0 0 100%; width: 100%; height: 36px; margin: 0 0 12px; }
  :root.search-open .mw-search { display: flex; }
  .mw-page-container { display: block; padding: 23px 16px 40px; }
  .article-title-row { border: 0; }
  .article-header h1 { font-size: 27.2px; line-height: 1.375; }
  .article-language, .article-subtitle, .mobile-toc { display: none; }
  .article-toolbar { display: block; height: auto; border-bottom: 0; margin: 12px 0 0; }
  .article-tabs { height: 38px; gap: 20px; border-bottom: 1px solid var(--border-subtle); }
  .article-tabs > a { font-weight: bold; font-size: 14px; color: var(--subtle); padding: 0 0 9px; }
  .article-tabs .selected { color: var(--subtle); }
  .view-tabs { height: 49px; gap: 22px; width: 100%; border-bottom: 1px solid var(--border-subtle); align-items: center; }
  .view-tabs > .selected, .history-link { display: none !important; }
  .appearance-menu { order: 0; margin-right: auto; }
  .save-article { display: inline-grid; order: 1; width: 24px; height: 40px; color: var(--subtle); }
  .save-article svg { width: 22px; height: 22px; stroke-width: 2; }
  .save-article[aria-pressed="true"] { color: var(--link); }
  .save-article[aria-pressed="true"] svg { fill: currentColor; }
  .edit-article { order: 2; color: var(--subtle); width: 24px; height: 40px; justify-content: center; }
  .edit-article span { display: none; }
  .edit-article svg { display: block; }
  .tools-menu { order: 3; }
  .view-tabs summary { display: flex; justify-content: center; height: 40px; min-width: 24px; padding: 0; }
  .tools-label, .view-tabs .dropdown-chevron, .appearance-label { display: none; }
  .mobile-tools-icon { display: block; width: 22px; height: 22px; fill: var(--subtle); }
  .appearance-icon { display: inline; font-size: 21px; font-weight: 600; color: var(--subtle); }
  .main-menu .dropdown-panel, .mobile-site-menu .dropdown-panel, .tools-panel, .appearance-menu .dropdown-panel { width: 250px; max-width: calc(100vw - 32px); padding: 12px 16px; }
  .appearance-menu .dropdown-panel { left: 0; right: auto; }
  .tools-panel { right: 0; }
  .dropdown-panel, .tools-panel { font-size: 14px; max-height: calc(100dvh - 260px); overflow-y: auto; }
  .appearance-controls fieldset[data-control="content-width"] { display: none; }
  .mw-parser-output { display: flex; flex-direction: column; font-family: -apple-system, system-ui, 'Segoe UI', Roboto, Inter, Helvetica, Arial, sans-serif; line-height: 1.65; }
  .mw-parser-output .hatnote { order: 0; background: var(--background-subtle); padding: 8px; margin: 0 0 12px; font-size: .875em; line-height: 1.6; }
  .lead-introduction { order: 1; }
  .portrait-frame { order: 2; float: none; width: 250px; max-width: 100%; margin: 8px auto 16px; padding: 0; background: none; border: 0; }
  .portrait-frame img { aspect-ratio: 25 / 17; }
  .portrait-frame figcaption { padding: 5px 0 0; color: var(--subtle); font-size: 14px; }
  .lead-background { order: 3; }
  .article-section { order: 4; border-top: 1px solid var(--border-subtle); }
  .article-section:last-child { border-bottom: 1px solid var(--border-subtle); }
  .section-heading, .article-section:not([open]) .section-heading { display: block; padding: 12px 0; margin: 0; border: 0; }
  .section-heading h2 { font-size: 23px; line-height: 1.4; display: flex; align-items: baseline; gap: 12px; }
  .section-chevron { display: inline-block; width: 8px; height: 8px; margin: 0 1px 4px 3px; flex-shrink: 0; border-right: 1.5px solid var(--subtle); border-bottom: 1.5px solid var(--subtle); transform: rotate(45deg); }
  .article-section[open] .section-chevron { transform: rotate(225deg); margin-bottom: 0; }
  .section-edit { display: none; }
  .section-body { padding: 0 0 8px; }
  .section-body p:last-child { margin-bottom: .5em; }
  .site-footer { margin-top: 28px; }
}
@media (max-width: 360px) {
  .mw-header { gap: 14px; }
  .mw-header-start { gap: 12px; }
  .mw-logo-container strong { font-size: 23px; }
}
@media print {
  .mobile-search-toggle, .mobile-site-menu, .save-article, .section-chevron { display: none !important; }
  .article-section:not([open]) > .section-body { display: block !important; }
  .mw-parser-output { display: block; }
}
