:root {
  color-scheme: light;
  --paper: #f8f9fa;
  --white: #fff;
  --ink: #202122;
  --muted: #54595d;
  --blue: #3366cc;
  --line: #a2a9b1;
  --soft-line: #c8ccd1;
  --wash: #eaecf0;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
svg { flex: none; vertical-align: middle; }
::selection { background: #d8e5ff; }
[hidden] { display: none !important; }
.skip-link { position: absolute; z-index: 20; left: 16px; top: -100px; padding: 8px 14px; background: var(--white); color: var(--blue); border: 1px solid var(--line); }
.skip-link:focus { top: 12px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1180px; min-height: 70px; margin: 0 auto; padding: 14px 28px; background: var(--white); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.brand:hover { text-decoration: none; }
.monogram { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; color: #54595d; background: #f8f9fa; font: 20px/1 var(--serif); letter-spacing: -1.5px; }
.brand-title { display: block; font: 22px/1.2 var(--serif); white-space: nowrap; }
.brand-subtitle { display: block; margin-top: 3px; color: var(--ink); font: 12px/1.3 var(--serif); text-align: center; }
.search-trigger { display: inline-flex; align-items: center; gap: 9px; width: 260px; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: var(--white); font-size: 13px; line-height: 1.5; text-align: left; }
.search-trigger:hover { border-color: #72777d; }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger kbd { margin-left: auto; padding: 0 4px; border: 1px solid var(--soft-line); color: var(--muted); background: var(--paper); font: 11px/18px var(--sans); }

.nav-bar { display: flex; align-items: stretch; justify-content: space-between; gap: 18px; max-width: 1180px; margin: 0 auto; padding: 0 28px; border: 1px solid var(--soft-line); border-bottom-color: var(--line); background: #f8f9fa; font-size: 13px; }
.top-nav, .article-actions { display: flex; align-items: stretch; gap: 19px; }
.top-nav a, .article-actions a, .article-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 39px; margin-bottom: -1px; padding: 7px 0; border: 0; border-bottom: 1px solid transparent; color: var(--blue); background: transparent; font: 13px/1.5 var(--sans); white-space: nowrap; }
.top-nav a[aria-current="page"], .article-actions a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--white); background: var(--white); box-shadow: -8px 0 var(--white), 8px 0 var(--white); }
.article-actions svg { width: 13px; height: 13px; }
.article-actions button:hover { text-decoration: underline; }

.page-shell { display: block; max-width: 1180px; margin: 0 auto; padding: 23px 28px 32px; border: 1px solid var(--line); border-top: 0; background: var(--white); }
#main-content { min-width: 0; }
.article-heading { margin: 0 0 19px; }
h1 { margin: 0; padding: 0 0 5px; border-bottom: 1px solid var(--line); font: 400 34px/1.3 var(--serif); }
.page-origin { margin: 5px 0 0; font-size: 13px; line-height: 1.6; }
.article-body { display: flow-root; }
.article-body p { margin: 0 0 15px; }
.article-body .lead { font-size: 15px; line-height: 1.65; }
.article-body h2 { overflow: hidden; margin: 26px 0 12px; padding: 0 0 3px; border-bottom: 1px solid var(--line); font: 400 25px/1.3 var(--serif); }
.article-body h3 { margin: 20px 0 8px; font: 700 17px/1.45 var(--sans); }
.article-body ul, .article-body ol { margin: 8px 0 18px; padding-left: 26px; }
.article-body li { margin-bottom: 5px; }
.article-body sup { padding-left: 1px; font-size: 10px; line-height: 0; white-space: nowrap; }
.article-body sup a { text-decoration: none; }
.article-body blockquote { margin: 18px 25px; padding-left: 15px; border-left: 3px solid var(--soft-line); }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table { width: 100%; margin: 16px 0; border-collapse: collapse; background: var(--paper); font-size: 14px; }
.article-body th, .article-body td { padding: 7px 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.article-body th { background: var(--wash); font-weight: 700; }
.section-anchor { margin-left: 9px; color: var(--blue); font: 12px var(--sans); opacity: 0; }
h2:hover .section-anchor, .section-anchor:focus-visible { opacity: 1; }
.section-link { font-size: 13px; }
.note, .editorial-note { margin: 17px 0; padding: 10px 13px; border: 1px solid var(--soft-line); background: var(--paper); font-size: 13px; }
.note p:last-child, .editorial-note p:last-child { margin-bottom: 0; }
.article-body .hatnote { margin: -3px 0 16px; padding-left: 22px; font-size: 14px; font-style: italic; }
.table-scroll { max-width: 100%; margin: 16px 0 23px; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.table-scroll > .wikitable { width: 100%; min-width: 560px; margin: 0; background: var(--paper); font-size: 13px; line-height: 1.55; }
.wikitable caption { padding: 0 0 8px; color: var(--ink); font-size: 13px; font-weight: 700; text-align: left; }
.timeline-table th, .timeline-table td { padding: 9px 11px; }
.timeline-table thead th { background: var(--wash); }
.timeline-table tbody th { width: 9%; min-width: 78px; background: #f1f2f3; white-space: nowrap; }
.timeline-table td:nth-child(2) { width: 25%; font-weight: 700; }
.timeline-table td p:last-child { margin-bottom: 0; }

.infobox { float: right; width: 310px; margin: 0 0 22px 28px; padding: 5px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; line-height: 1.5; }
.article-body .infobox-title { margin: 0; padding: 7px 9px; border: 0; background: #e7edf3; font: 700 20px/1.35 var(--sans); text-align: center; }
.infobox figure { margin: 12px auto; width: 260px; max-width: 100%; }
.infobox figure img { width: 100%; aspect-ratio: 4 / 4.7; object-fit: cover; object-position: center 24%; background: #eaecf0; }
.infobox figcaption { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }
.infobox dl { margin: 9px 3px; }
.infobox dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 9px; padding: 5px 3px; }
.infobox dt { font-weight: 700; }
.infobox dd { margin: 0; overflow-wrap: anywhere; }
.infobox dd span { color: var(--muted); }
.infobox-section { margin: 10px 0 0; padding: 4px 8px; background: #e7edf3; font-size: 13px; font-weight: 700; text-align: center; }
.infobox > p, .infobox > ul { margin: 9px 7px; }
.infobox > ul { padding-left: 17px; }
.infobox > ul li { margin-bottom: 3px; }

.contents { width: 340px; max-width: calc(100% - 338px); margin: 20px 0 24px; padding: 10px 14px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; line-height: 1.6; }
.contents summary { cursor: pointer; font-weight: 700; list-style: none; }
.contents summary::-webkit-details-marker { display: none; }
.contents summary span { margin-left: 5px; color: var(--blue); font-size: 12px; font-weight: 400; }
.contents summary::after { margin-left: 6px; color: var(--blue); font-size: 12px; font-weight: 400; }
.contents details[open] > summary::after, details.contents[open] > summary::after { content: "[hide]"; }
.contents details:not([open]) > summary::after, details.contents:not([open]) > summary::after { content: "[show]"; }
.contents summary span { display: none; }
.contents nav { display: flex; flex-direction: column; gap: 2px; padding-top: 7px; }
.contents a { display: block; padding: 1px 0; }
.contents a[aria-current="location"] { font-weight: 700; }
.toc-number { display: inline-block; min-width: 23px; padding-right: 5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.contents p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.article-body .timeline { margin: 12px 0 22px; padding: 0; list-style: none; border-top: 1px solid var(--soft-line); }
.timeline li { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 15px; margin: 0; padding: 11px 8px; border-bottom: 1px solid var(--soft-line); }
.timeline li:nth-child(odd) { background: var(--paper); }
.timeline .year { font-size: 13px; font-weight: 700; }
.timeline .event { min-width: 0; font-size: 14px; }
.timeline .event h3 { margin: 0 0 3px; font-size: 14px; line-height: 1.5; }
.timeline .event p { margin: 0; }
.record-list li { margin-bottom: 8px; }

.reference-intro, .reference-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.reference-list { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.reference-list ol, ol.reference-list { column-count: 2; column-gap: 35px; margin-top: 12px; padding-left: 22px; }
.reference-list li { break-inside: avoid; margin-bottom: 11px; padding-left: 2px; }
.reference-list li:target { background: #eaf3ff; outline: 5px solid #eaf3ff; }
.reference-type { color: var(--muted); }
.reference-note { display: block; margin-top: 3px; }
.about-wiki { margin-top: 25px; }
.about-wiki > summary, .about-wiki details > summary { cursor: pointer; color: var(--ink); font: 400 22px/1.4 var(--serif); }
.about-wiki > summary { padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.about-wiki p { font-size: 13px; line-height: 1.7; }
.about-wiki h3 { font-size: 14px; }
.categories { clear: both; margin-top: 25px; padding: 7px 10px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; line-height: 1.7; }
.categories a + a { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--soft-line); }
#action-status:empty { display: none; }
#action-status:not(:empty) { margin: 0 0 14px; padding: 8px 10px; border: 1px solid var(--soft-line); background: var(--paper); font-size: 12px; overflow-wrap: anywhere; }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 19px 28px 30px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.site-footer p { margin: 0 0 7px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 19px; margin-top: 9px; }

#search-dialog { width: min(600px, calc(100% - 32px)); max-height: min(80vh, 700px); padding: 24px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--white); box-shadow: 0 8px 35px #0003; }
#search-dialog::backdrop { background: #20212280; }
#search-dialog > form { display: flex; justify-content: flex-end; margin: -10px -8px 6px; }
.close-search { min-height: 32px; padding: 4px 8px; border: 0; color: var(--muted); background: transparent; font-size: 13px; }
#search-dialog > label { display: block; margin-bottom: 13px; font: 26px/1.3 var(--serif); }
#wiki-search { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid #72777d; border-radius: 0; color: var(--ink); background: var(--white); font-size: 16px; }
#search-status { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
#search-results { margin: 0; padding: 0; list-style: none; }
#search-results li { border-top: 1px solid var(--soft-line); }
#search-results a { display: block; padding: 12px 3px; }
#search-results a:hover { background: var(--paper); text-decoration: none; }
.search-result-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.4; }
.search-result-section { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.search-result-excerpt { display: block; margin-top: 5px; color: var(--ink); font-size: 12px; line-height: 1.6; }

@media (max-width: 700px) {
  .site-header { min-height: 76px; gap: 12px; padding: 14px 16px; }
  .brand { gap: 9px; }
  .brand-title { font-size: 21px; }
  .brand-subtitle { font-size: 11px; }
  .monogram { width: 36px; height: 36px; font-size: 18px; }
  .search-trigger { flex: none; justify-content: center; width: 36px; min-height: 36px; padding: 8px; gap: 0; font-size: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .nav-bar { flex-wrap: wrap; gap: 0 12px; padding: 0 16px; }
  .top-nav { margin-right: auto; }
  .top-nav, .article-actions { gap: 13px; }
  .top-nav a, .article-actions a, .article-actions button { font-size: 12px; min-height: 38px; }
  .article-actions svg { display: none; }
  .page-shell { padding: 19px 16px 25px; }
  h1 { font-size: 31px; }
  .page-origin { font-size: 12px; }
  .article-heading { margin-bottom: 17px; }
  .infobox { float: none; width: 300px; max-width: 100%; margin: 0 auto 21px; }
  .article-body h2 { font-size: 24px; }
  .article-body h3 { font-size: 16px; }
  .contents { width: 340px; max-width: 100%; margin-top: 18px; }
  .timeline li { grid-template-columns: 77px minmax(0, 1fr); gap: 10px; padding: 10px 6px; }
  .reference-list ol, ol.reference-list { column-count: 1; }
  .site-footer { padding: 17px 16px 25px; }
  #search-dialog { padding: 20px; }
}

@media (max-width: 380px) {
  .brand-title { font-size: 19px; }
  .brand-subtitle { font-size: 10px; }
  .brand { gap: 8px; }
  .monogram { width: 32px; height: 32px; font-size: 17px; }
  .site-header { gap: 9px; }
  .top-nav, .article-actions { gap: 11px; }
  .article-actions a, .article-actions button { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  @page { margin: 16mm; }
  html { scroll-behavior: auto; }
  body { color: #000; background: #fff; font-size: 10pt; line-height: 1.55; }
  .site-header { min-height: 0; padding: 0 0 16px; }
  .brand-title { font-size: 19pt; }
  .search-trigger, .nav-bar, .contents, .section-anchor, #action-status, #search-dialog, .skip-link { display: none !important; }
  .page-shell { max-width: none; padding: 0; border: 0; }
  h1 { font-size: 28pt; }
  .article-body .lead { font-size: 10pt; line-height: 1.55; }
  .article-body h2 { font-size: 18pt; break-after: avoid; }
  .article-body h3 { font-size: 12pt; break-after: avoid; }
  .infobox { float: right; width: 235px; margin: 0 0 15px 20px; break-inside: avoid; font-size: 9pt; }
  .infobox figure { width: 180px; }
  .infobox dl > div { grid-template-columns: 70px minmax(0, 1fr); }
  .infobox figcaption { font-size: 8pt; }
  .timeline li { break-inside: avoid; }
  .timeline .event { font-size: 10pt; }
  .table-scroll { overflow: visible; }
  .table-scroll > .wikitable { min-width: 0; font-size: 9pt; }
  .timeline-table th, .timeline-table td { padding: 6px; }
  .timeline-table tr { break-inside: avoid; }
  .reference-list ol, ol.reference-list { column-count: 1; }
  .reference-list { font-size: 8.5pt; }
  .about-wiki { display: none; }
  .site-footer { margin-top: 15px; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 8pt; }
  a { color: inherit; }
}
