/*
 * Wikiportfolio — a recreation of Wikipedia's Vector 2022 skin.
 * Framework file: override styles in your own stylesheet via "customCss" in wikiportfolio.config.json.
 */

/* ---------- Design tokens (Codex values) ---------- */
:root {
  --color-base: #202122;
  --color-emphasized: #101418;
  --color-subtle: #54595d;
  --color-placeholder: #72777d;
  --color-disabled: #a2a9b1;
  --color-progressive: #36c;
  --color-progressive-hover: #3056a9;
  --color-progressive-active: #233566;
  --color-visited: #6a60b0;
  --color-destructive: #d73333;
  --color-inverted: #fff;

  --bg-base: #fff;
  --bg-neutral-subtle: #f8f9fa;
  --bg-neutral: #eaecf0;
  --bg-interactive: #eaecf0;
  --bg-interactive-subtle: #f8f9fa;
  --bg-progressive: #36c;
  --bg-progressive-subtle: #eaf3ff;
  --bg-notice: #eaecf0;
  --bg-warning-subtle: #fdf2d5;

  --border-base: #a2a9b1;
  --border-subtle: #c8ccd1;
  --border-muted: #dadde3;
  --border-progressive: #36c;

  --font-serif: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
  --font-sans: sans-serif;

  --body-font-size: 0.875rem;
  --page-max-width: 99.75rem;

  color-scheme: light;
}

/* Night mode — follows the OS unless the reader picked a mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-base: #eaecf0;
    --color-emphasized: #f8f9fa;
    --color-subtle: #a2a9b1;
    --color-placeholder: #a2a9b1;
    --color-disabled: #72777d;
    --color-progressive: #88a3e8;
    --color-progressive-hover: #a6bbf5;
    --color-progressive-active: #b0c1f0;
    --color-visited: #a799cd;
    --color-destructive: #fd7865;
    --color-inverted: #101418;
    --bg-base: #101418;
    --bg-neutral-subtle: #202122;
    --bg-neutral: #27292d;
    --bg-interactive: #27292d;
    --bg-interactive-subtle: #202122;
    --bg-progressive: #88a3e8;
    --bg-progressive-subtle: #1b223d;
    --bg-notice: #27292d;
    --bg-warning-subtle: #452e05;
    --border-base: #72777d;
    --border-subtle: #54595d;
    --border-muted: #404244;
    --border-progressive: #88a3e8;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --color-base: #eaecf0;
  --color-emphasized: #f8f9fa;
  --color-subtle: #a2a9b1;
  --color-placeholder: #a2a9b1;
  --color-disabled: #72777d;
  --color-progressive: #88a3e8;
  --color-progressive-hover: #a6bbf5;
  --color-progressive-active: #b0c1f0;
  --color-visited: #a799cd;
  --color-destructive: #fd7865;
  --color-inverted: #101418;
  --bg-base: #101418;
  --bg-neutral-subtle: #202122;
  --bg-neutral: #27292d;
  --bg-interactive: #27292d;
  --bg-interactive-subtle: #202122;
  --bg-progressive: #88a3e8;
  --bg-progressive-subtle: #1b223d;
  --bg-notice: #27292d;
  --bg-warning-subtle: #452e05;
  --border-base: #72777d;
  --border-subtle: #54595d;
  --border-muted: #404244;
  --border-progressive: #88a3e8;
  color-scheme: dark;
}

:root[data-text-size="small"] { --body-font-size: 0.8125rem; }
:root[data-text-size="large"] { --body-font-size: 1rem; }
:root[data-width="wide"] { --page-max-width: none; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-base);
  background-color: var(--bg-base);
  direction: ltr;
  overflow-wrap: break-word;
}

a {
  color: var(--color-progressive);
  text-decoration: none;
  background: none;
  border-radius: 2px;
}
a:visited { color: var(--color-visited); }
a:hover { text-decoration: underline; }
a:active { color: var(--color-progressive-active); }
a:focus-visible { outline: 2px solid var(--border-progressive); outline-offset: 1px; }
a.new, a.new:visited { color: var(--color-destructive); }

a.external {
  padding-right: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2336c' d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16zM2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1'/%3E%3C/svg%3E");
  background-position: center right;
  background-repeat: no-repeat;
  background-size: 0.857em;
}

img { border: 0; vertical-align: middle; }

button { font-family: inherit; font-size: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- Icons ---------- */
.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  vertical-align: middle;
  fill: currentColor;
  flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; min-width: 16px; }

/* ---------- Quiet icon buttons (Codex) ---------- */
.button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  min-width: 32px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--color-base);
  font-weight: bold;
  font-size: 0.875rem;
  line-height: 1.4285714;
  cursor: pointer;
  text-decoration: none;
}
.button-quiet:hover { background-color: rgba(0, 24, 73, 0.027); }
.button-quiet:active { background-color: rgba(0, 24, 73, 0.082); }
:root[data-theme="dark"] .button-quiet:hover { background-color: rgba(255, 255, 255, 0.06); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button-quiet:hover { background-color: rgba(255, 255, 255, 0.06); }
}
.button-quiet.icon-only { padding: 5px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--border-base);
  border-radius: 2px;
  background-color: var(--bg-interactive-subtle);
  color: var(--color-base);
  font-weight: bold;
  font-size: 0.875rem;
  line-height: 1.4285714;
  cursor: pointer;
}
.button:hover { background-color: var(--bg-base); color: var(--color-emphasized); }
.button:active { background-color: var(--bg-interactive); }

/* ---------- Page container ---------- */
.mw-page-container {
  max-width: var(--page-max-width);
  min-width: 300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  background-color: var(--bg-base);
}

/* ---------- Header ---------- */
.vector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.125rem;
  margin: 0.5rem 0;
  gap: 0.75rem;
}

.vector-header-start {
  display: flex;
  align-items: center;
  flex-grow: 1;
  min-width: 0;
}

.vector-header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.vector-main-menu-landmark { margin-left: -6px; margin-right: 6px; }

.mw-logo {
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
  color: var(--color-base);
  min-width: 0;
}
.mw-logo:hover, .mw-logo:visited { text-decoration: none; color: var(--color-base); }

.mw-logo-icon {
  width: 50px;
  height: 50px;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.mw-logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: var(--font-serif);
  line-height: 1;
}

.mw-logo-wordmark {
  font-size: 1.32rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
  white-space: nowrap;
}
.mw-logo-wordmark .cap { font-size: 1.16em; }

.mw-logo-tagline {
  font-size: 0.76rem;
  letter-spacing: 0.012em;
  white-space: nowrap;
}

/* Search */
.vector-search-box {
  flex-grow: 1;
  max-width: 35.75rem;
  margin-left: 0.75rem;
  position: relative;
}

.search-form {
  display: flex;
  width: 100%;
}

.search-input-wrap {
  position: relative;
  flex-grow: 1;
}

.search-input-wrap .icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-placeholder);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px 5px 36px;
  border: 1px solid var(--border-base);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  background-color: var(--bg-base);
  color: var(--color-base);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4285714;
  box-shadow: inset 0 0 0 1px transparent;
  transition: border-color 100ms, box-shadow 100ms;
}
.search-input::placeholder { color: var(--color-placeholder); opacity: 1; }
.search-input:focus {
  outline: 0;
  border-color: var(--border-progressive);
  border-right: 1px solid var(--border-progressive);
  box-shadow: inset 0 0 0 1px var(--border-progressive);
}

.search-button {
  border-radius: 0 2px 2px 0;
}

.search-suggestions {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  margin-top: -1px;
  border: 1px solid var(--border-base);
  border-radius: 0 0 2px 2px;
  background-color: var(--bg-base);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  list-style: none;
  padding: 0;
  margin-left: 0;
}
.search-suggestions.open { display: block; }
.search-suggestions li { margin: 0; }
.search-suggestions a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--color-base);
  text-decoration: none;
}
.search-suggestions a:visited { color: var(--color-base); }
.search-suggestions a:hover,
.search-suggestions a.active { background-color: var(--bg-interactive); text-decoration: none; }
.search-suggestions .thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--border-muted);
  border-radius: 2px;
  background: var(--bg-neutral-subtle) center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-disabled);
}
.search-suggestions .s-title { font-weight: bold; font-size: 0.875rem; }
.search-suggestions .s-title mark { background: none; color: inherit; font-weight: bold; }
.search-suggestions .s-title span { font-weight: normal; }
.search-suggestions .s-desc { font-size: 0.8125rem; color: var(--color-subtle); line-height: 1.4; }
.search-suggestions .s-empty { padding: 8px 12px; font-size: 0.875rem; color: var(--color-subtle); }
.search-suggestions .s-footer a {
  border-top: 1px solid var(--border-muted);
  font-size: 0.875rem;
}

.search-toggle { display: none; }

/* Header personal links */
.vector-user-links {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}
.vector-user-links ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.vector-user-links li { margin: 0 0 0 0.75rem; }
.vector-user-links .user-links-text a { white-space: nowrap; }

/* ---------- Dropdowns ---------- */
.vector-dropdown { position: relative; }

.vector-dropdown-content {
  display: none;
  position: absolute;
  z-index: 50;
  min-width: 200px;
  max-width: 280px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  background-color: var(--bg-base);
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  font-size: 0.875rem;
  text-align: left;
}
.vector-dropdown.open > .vector-dropdown-content { display: block; }
.vector-dropdown-content.align-right { right: 0; }
.vector-dropdown-content.align-left { left: 0; }

.vector-menu-heading {
  display: block;
  padding: 6px 0;
  margin: 0;
  border-bottom: 1px solid var(--border-muted);
  color: var(--color-subtle);
  font-size: 0.75rem;
  font-weight: bold;
}
.vector-pinnable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-muted);
}
.vector-pinnable-header .label { font-weight: bold; font-size: 0.875rem; }
.vector-pinnable-header button {
  border: 1px solid var(--border-base);
  border-radius: 2px;
  background: var(--bg-interactive-subtle);
  padding: 0 8px;
  font-size: 0.75rem;
  line-height: 1.5;
  cursor: pointer;
}
.vector-pinnable-header button:hover { background: var(--bg-base); }

.vector-menu-content ul { list-style: none; margin: 0; padding: 0; }
.vector-menu-content li { margin: 0; padding: 6px 0; line-height: 1.125em; }
.vector-menu-content li a { display: flex; align-items: center; gap: 6px; }
.vector-menu-portal + .vector-menu-portal { margin-top: 12px; }

/* ---------- Main layout grid ---------- */
.mw-page-container-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    'header'
    'main'
    'footer';
  column-gap: 1.5rem;
}

.mw-header { grid-area: header; }
.mw-body { grid-area: main; min-width: 0; }
.mw-footer-container { grid-area: footer; }
.vector-column-start { grid-area: columnStart; display: none; }

@media (min-width: 1120px) {
  .mw-page-container-inner {
    grid-template-columns: 12.25rem minmax(0, 1fr);
    grid-template-areas:
      'header header'
      'columnStart main'
      'columnStart footer';
  }
  .vector-column-start { display: block; }
  :root.toc-hidden .mw-page-container-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'header'
      'main'
      'footer';
  }
  :root.toc-hidden .vector-column-start { display: none; }
}

/* ---------- Sticky table of contents ---------- */
.vector-sticky-pinned-container {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding-top: 1rem;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}

.vector-toc {
  font-size: 0.875rem;
  line-height: 1.375;
}

.vector-toc-contents,
.vector-toc-contents ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vector-toc-contents ul { padding-left: 0.75rem; }

.vector-toc-list-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.vector-toc-link {
  display: block;
  padding: 6px 0 6px 0;
  color: var(--color-progressive);
}
.vector-toc-link:visited { color: var(--color-progressive); }

.vector-toc-list-item-active > .vector-toc-link,
.vector-toc-list-item-active > .vector-toc-link:visited {
  color: var(--color-base);
  font-weight: bold;
}

.vector-toc-text { display: block; }

.vector-toc-toggle-row { display: flex; align-items: flex-start; }
.vector-toc-toggle {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vector-toc-toggle .icon { transition: transform 100ms; transform: rotate(-90deg); width: 12px; height: 12px; min-width: 12px; }
.vector-toc-list-item.expanded > .vector-toc-toggle .icon { transform: rotate(0deg); }
.vector-toc-list-item:not(.expanded) > ul { display: none; }

.vector-toc-contents { padding-left: 22px; margin-left: -22px; }

/* Floating TOC button (narrow screens / hidden TOC) */
.vector-page-titlebar-toc { display: none; margin-right: 6px; }
@media (max-width: 1119px) {
  .vector-page-titlebar-toc { display: block; }
}
:root.toc-hidden .vector-page-titlebar-toc { display: block; }
.vector-page-titlebar-toc .vector-dropdown-content { width: 280px; max-height: 70vh; overflow-y: auto; }

/* ---------- Title bar ---------- */
.vector-page-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 1px var(--border-base);
}
.vector-page-titlebar-start { display: flex; align-items: center; min-width: 0; }

.firstHeading {
  margin: 0;
  padding: 0;
  padding-top: 4px;
  font-family: var(--font-serif);
  font-size: 1.8em;
  font-weight: normal;
  line-height: 1.375;
  color: var(--color-emphasized);
  overflow-wrap: anywhere;
}
.firstHeading .mw-page-title-namespace,
.firstHeading .mw-page-title-separator { }

.mw-portlet-lang { flex-shrink: 0; }
.mw-portlet-lang .button-quiet { color: var(--color-progressive); }
.mw-portlet-lang .lang-label { white-space: nowrap; }
.dropdown-note { margin: 0 0 8px; }
.dropdown-note.subtle { margin: 0; color: var(--color-subtle); }

/* Toolbar under the title (Article / Talk ... Read / Edit / History / Tools) */
.vector-page-toolbar {
  box-shadow: 0 1px var(--border-base);
}
.vector-page-titlebar:has(+ .vector-page-toolbar) { box-shadow: none; }
.vector-page-toolbar-container { display: flex; width: 100%; justify-content: space-between; }

.vector-menu-tabs { display: flex; align-items: flex-end; font-size: 0.875rem; }
.vector-menu-tabs ul { display: flex; list-style: none; margin: 0; padding: 0; }
.vector-menu-tabs li { margin: 0 8px 0 0; padding: 0; display: flex; }
.vector-menu-tabs-right li { margin: 0 0 0 8px; }
.vector-menu-tabs a,
.vector-menu-tabs .tab-button {
  display: block;
  padding: 18px 0 7px;
  border-bottom: 2px solid transparent;
  color: var(--color-progressive);
  white-space: nowrap;
  line-height: 1.125;
  font-size: 0.875rem;
}
.vector-menu-tabs a:visited { color: var(--color-progressive); }
.vector-menu-tabs a:hover { text-decoration: none; border-bottom-color: var(--border-progressive); }
.vector-menu-tabs .selected a,
.vector-menu-tabs .selected a:visited { color: var(--color-base); border-bottom-color: var(--color-base); }
.vector-menu-tabs .tab-button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  cursor: pointer;
  color: var(--color-base);
}
.vector-menu-tabs .tab-button:hover { border-bottom-color: var(--color-base); }
.vector-menu-tabs .tab-button .icon { width: 12px; height: 12px; min-width: 12px; }

/* ---------- Content columns (body + Tools/Appearance) ---------- */
.vector-body-before-content { overflow: hidden; }

.mw-content-container-wrap {
  display: flex;
  gap: 1.5rem;
}

.vector-body {
  position: relative;
  flex-grow: 1;
  min-width: 0;
  font-size: var(--body-font-size);
  line-height: 1.6;
  padding-bottom: 1.5rem;
}

.vector-column-end {
  display: none;
  width: 15.5rem;
  flex-shrink: 0;
  font-size: 0.875rem;
}
@media (min-width: 1000px) {
  .vector-column-end { display: block; }
  :root.appearance-hidden .vector-column-end { display: none; }
}

.vector-column-end .vector-sticky-pinned-container { padding-top: 0.75rem; }

.vector-pinnable-element { padding: 0 0 0 0.75rem; }

.vector-appearance .mw-portlet { margin-bottom: 14px; }
.vector-appearance .mw-portlet-heading {
  font-weight: bold;
  font-size: 0.875rem;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  color: var(--color-base);
  font-family: var(--font-sans);
}

.cdx-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  cursor: pointer;
  line-height: 1.375;
}
.cdx-radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--border-base);
  border-radius: 50%;
  background: var(--bg-base);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-width 100ms, border-color 100ms;
}
.cdx-radio input:hover { border-color: var(--border-progressive); }
.cdx-radio input:checked {
  border: 6px solid var(--bg-progressive);
}
.cdx-radio input:focus-visible { outline: 2px solid var(--border-progressive); outline-offset: 1px; }
.cdx-radio .beta { color: var(--color-subtle); }

/* ---------- Article body (mw-parser-output) ---------- */
#siteSub {
  display: block;
  margin-top: 8px;
  font-size: 0.857em;
  color: var(--color-base);
}

#contentSub { font-size: 0.857em; color: var(--color-subtle); margin: 0 0 1.4em; line-height: 1.2em; }
#contentSub:empty { margin: 0; }

.mw-body-content { margin-top: 12px; }

.mw-parser-output > *:first-child { margin-top: 0; }

.mw-parser-output p { margin: 0.5em 0 1em; }

.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4 {
  color: var(--color-emphasized);
  overflow: hidden;
  margin-bottom: 0.25em;
  padding: 0;
  line-height: 1.375;
}

.mw-parser-output h2 {
  font-family: var(--font-serif);
  font-size: 1.5em;
  font-weight: normal;
  margin-top: 1em;
  border-bottom: 1px solid var(--border-base);
}

.mw-parser-output h3 {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 0.3em;
  padding-top: 0.5em;
}

.mw-parser-output h4 {
  font-size: 100%;
  font-weight: bold;
  margin-top: 0.3em;
  padding-top: 0.5em;
}

.mw-heading { display: flex; align-items: baseline; gap: 0.5em; flex-wrap: wrap; }
.mw-heading h2, .mw-heading h3 { flex-grow: 1; }
.mw-parser-output .mw-heading2 { border-bottom: 1px solid var(--border-base); margin: 1em 0 0.25em; }
.mw-parser-output .mw-heading2 h2 { border: 0; margin: 0; }
.mw-parser-output .mw-heading3 { margin: 0.3em 0 0.25em; padding-top: 0.5em; }
.mw-parser-output .mw-heading3 h3 { margin: 0; padding: 0; }
.mw-editsection {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: normal;
  white-space: nowrap;
  color: var(--color-subtle);
  user-select: none;
  margin-left: auto;
}
.mw-editsection-bracket { color: var(--color-subtle); }
.mw-parser-output .mw-heading3 .mw-editsection { font-size: 0.875em; }

.mw-parser-output ul {
  list-style-type: disc;
  margin: 0.3em 0 0 1.6em;
  padding: 0;
}
.mw-parser-output ol {
  margin: 0.3em 0 0 3.2em;
  padding: 0;
}
.mw-parser-output li { margin-bottom: 0.1em; }

.mw-parser-output dl { margin: 0.2em 0 0.5em; }
.mw-parser-output dd { margin-left: 1.6em; }

.mw-parser-output b, .mw-parser-output strong { font-weight: bold; }

.mw-parser-output code {
  font-family: monospace, monospace;
  font-size: 0.9375em;
  background-color: var(--bg-neutral-subtle);
  color: var(--color-emphasized);
  border: 1px solid var(--border-muted);
  border-radius: 2px;
  padding: 1px 4px;
}

/* Hatnote */
.hatnote {
  font-style: italic;
  padding-left: 1.6em;
  margin-bottom: 0.5em;
}
.hatnote i { font-style: normal; }

/* Superscript citations */
sup.reference {
  font-size: 0.75em;
  line-height: 1;
  font-weight: normal;
  font-style: normal;
  white-space: nowrap;
  unicode-bidi: isolate;
}
sup.reference a { border-radius: 0; }
sup.noprint.Inline-Template { font-size: 0.75em; line-height: 1; white-space: nowrap; }
sup.noprint.Inline-Template i a { font-style: italic; }

/* Infobox */
.infobox {
  float: right;
  clear: right;
  width: 22em;
  margin: 0.5em 0 0.5em 1em;
  padding: 0.2em;
  border: 1px solid var(--border-base);
  border-spacing: 3px;
  background-color: var(--bg-neutral-subtle);
  color: var(--color-base);
  font-size: 88%;
  line-height: 1.5em;
}
.infobox-title {
  font-size: 125%;
  font-weight: bold;
  text-align: center;
  padding: 0.2em;
  caption-side: top;
}
.infobox-above {
  font-size: 125%;
  font-weight: bold;
  text-align: center;
  padding: 0.2em;
}
.infobox-image {
  text-align: center;
  padding: 0.2em;
}
.infobox-image img {
  max-width: 100%;
  height: auto;
  max-height: 340px;
}
.infobox-caption {
  font-size: 0.9em;
  line-height: 1.4;
  padding-top: 0.2em;
}
.infobox-header {
  text-align: center;
  font-weight: bold;
  background-color: var(--bg-neutral);
  padding: 0.2em;
}
.infobox th.infobox-label {
  text-align: left;
  vertical-align: top;
  padding: 0.2em 0.4em 0.2em 0.2em;
  font-weight: bold;
  white-space: nowrap;
}
.infobox td.infobox-data {
  vertical-align: top;
  padding: 0.2em;
}
.infobox .plainlist ul { list-style: none; margin: 0; padding: 0; }
.infobox .plainlist li { margin: 0; }

/* Wikitable */
.wikitable {
  background-color: var(--bg-neutral-subtle);
  color: var(--color-base);
  margin: 1em 0;
  border: 1px solid var(--border-base);
  border-collapse: collapse;
}
.wikitable > tr > th, .wikitable > tr > td,
.wikitable > * > tr > th, .wikitable > * > tr > td {
  border: 1px solid var(--border-base);
  padding: 0.2em 0.4em;
}
.wikitable > tr > th, .wikitable > * > tr > th {
  background-color: var(--bg-neutral);
  text-align: center;
}
.wikitable > caption { font-weight: bold; padding: 0.2em 0.4em; }
.table-scroll { overflow-x: auto; }

/* Thumbnails / figures */
.mw-parser-output figure.thumb-right,
.mw-parser-output figure.thumb-left {
  display: table;
  margin: 0.5em 0 1.3em 1.4em;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  background-color: var(--bg-neutral-subtle);
  padding: 3px;
  text-align: left;
}
.mw-parser-output figure.thumb-right { float: right; clear: right; }
.mw-parser-output figure.thumb-left { float: left; clear: left; margin: 0.5em 1.4em 1.3em 0; }
.mw-parser-output figure img { display: block; border: 1px solid var(--border-subtle); background: var(--bg-base); }
.mw-parser-output figcaption {
  display: table-caption;
  caption-side: bottom;
  padding: 6px 6px 8px;
  border: 1px solid var(--border-subtle);
  border-top: 0;
  background-color: var(--bg-neutral-subtle);
  font-size: 0.88em;
  line-height: 1.4;
}

/* Gallery (<gallery> tag) */
.mw-parser-output ul.gallery {
  list-style: none;
  margin: 2px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.gallerybox {
  width: 155px;
  margin: 2px !important;
  vertical-align: top;
  text-align: center;
}
.gallery-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 155px;
  height: 150px;
  background-color: var(--bg-neutral-subtle);
  border-radius: 0;
}
.gallery-thumb img { max-width: 120px; max-height: 120px; width: auto; height: auto; }
.gallerytext { padding: 2px 4px; font-size: 0.94em; line-height: 1.4; overflow-wrap: break-word; }

/* Message boxes (ambox / talk header / notices) */
.mbox {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0 0 1em;
  padding: 0.5em 0.75em;
  border: 1px solid var(--border-base);
  border-left: 10px solid var(--color-progressive);
  background-color: var(--bg-neutral-subtle);
  font-size: 0.9em;
  line-height: 1.5;
}
.mbox.mbox-notice { border-left-color: #36c; }
.mbox.mbox-talk { border-left-color: var(--border-subtle); background: var(--bg-neutral-subtle); }
.mbox.mbox-plain { border-left-width: 1px; background: var(--bg-neutral-subtle); }
.mbox .mbox-image { flex-shrink: 0; width: 40px; text-align: center; }
.mbox .mbox-text { flex-grow: 1; }

.talk-header {
  margin: 0 0 1em;
  border: 1px solid var(--border-base);
  background-color: var(--bg-neutral-subtle);
  text-align: center;
  padding: 0.5em 1em;
  font-size: 0.95em;
}
.talk-header .talk-title { font-weight: bold; font-size: 1.05em; }
.talk-header ul {
  list-style: none;
  margin: 0.4em 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.5em;
}

/* References */
.reflist { font-size: 90%; margin-bottom: 0.5em; }
.reflist ol.references { margin-left: 2.4em; list-style-type: decimal; }
.references li { margin-bottom: 0.1em; }
.mw-cite-backlink { margin-right: 0.25em; }
.mw-cite-backlink a { font-weight: bold; }
.references li:target, .references li.highlight { background-color: var(--bg-progressive-subtle); }
cite { font-style: normal; }
cite q { quotes: '"' '"'; }

/* Plain lists inline (navbox/see also columns) */
.div-col { column-width: 30em; margin-top: 0.3em; }
.div-col ul { margin-top: 0; }

/* Navbox */
.navbox {
  clear: both;
  margin: 1em 0 0;
  border: 1px solid var(--border-base);
  padding: 1px;
  font-size: 88%;
  text-align: center;
  width: 100%;
  border-spacing: 0;
}
.navbox-title { background-color: #ccf; padding: 0.25em 1em; font-weight: bold; font-size: 114%; line-height: 1.6; }
.navbox-group {
  background-color: #ddf;
  padding: 0.25em 1em;
  font-weight: bold;
  text-align: right;
  white-space: nowrap;
  width: 1%;
  border-top: 2px solid var(--bg-base);
}
.navbox-list { text-align: left; padding: 0 0.25em; border-top: 2px solid var(--bg-base); border-left: 2px solid var(--bg-base); line-height: 1.6; }
.navbox-list.odd { background-color: var(--bg-base); }
.navbox-list.even { background-color: var(--bg-neutral-subtle); }
:root[data-theme="dark"] .navbox-title { background-color: #2b2f45; }
:root[data-theme="dark"] .navbox-group { background-color: #222740; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .navbox-title { background-color: #2b2f45; }
  :root:not([data-theme="light"]) .navbox-group { background-color: #222740; }
}

/* Category pages */
.mw-category { column-width: 24em; column-gap: 1em; margin-top: 0.5em; }
.mw-category-group { break-inside: avoid; }
.mw-parser-output .mw-category-group h3 { font-size: 1em; margin: 0; padding: 0; }
.mw-category-group ul { margin-top: 0; }

/* Reference list text */
.references .reference-text > p { display: inline; margin: 0; }

/* Misc */
.vector-pinnable-header h2.label { margin: 0; font-size: 0.875rem; }
.vector-appearance .beta { font-weight: normal; color: var(--color-subtle); }
.infobox-subheader { text-align: center; font-size: 0.95em; padding-bottom: 0.2em; }
.user-menu { margin-left: 0.5rem; }

/* "Not found" notice */
.noarticletext {
  border: 1px solid var(--border-base);
  background-color: var(--bg-neutral-subtle);
  padding: 0.75em 1em;
  margin: 1em 0;
}

/* Categories */
.catlinks {
  clear: both;
  margin-top: 1em;
  padding: 5px;
  border: 1px solid var(--border-base);
  background-color: var(--bg-neutral-subtle);
  font-size: 0.875rem;
  line-height: 1.6;
}
.catlinks ul { display: inline; margin: 0; padding: 0; list-style: none; }
.catlinks li {
  display: inline-block;
  margin: 0.125em 0;
  padding: 0 0.5em;
  border-left: 1px solid var(--border-subtle);
  line-height: 1.25em;
}
.catlinks li:first-child { padding-left: 0.25em; border-left: 0; }

.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- Footer ---------- */
.mw-footer {
  border-top: 1px solid var(--border-base);
  padding: 1.25rem 0;
  margin-top: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-base);
}

.mw-footer ul { list-style: none; margin: 0; padding: 0; }
.mw-footer #footer-info li { padding: 0.5em 0; }
.mw-footer #footer-places {
  display: flex;
  flex-wrap: wrap;
  padding: 0.5em 0;
  gap: 0;
}
.mw-footer #footer-places li { margin-right: 1em; padding: 0.5em 0; }

.mw-footer #footer-icons {
  display: flex;
  gap: 0.5em;
  float: right;
  margin-top: 0.5em;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  background: var(--bg-neutral-subtle);
  color: var(--color-subtle);
  font-size: 10px;
  line-height: 1.05;
  text-transform: none;
}
.footer-badge:visited { color: var(--color-subtle); }
.footer-badge:hover { text-decoration: none; border-color: var(--border-base); }
.footer-badge strong { display: block; font-size: 11px; color: var(--color-base); }
.footer-badge svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 999px) {
  .vector-user-links .user-links-text { display: none; }
}

@media (max-width: 720px) {
  .mw-page-container { padding: 0 1rem; }
  .vector-search-box { display: none; position: absolute; left: 1rem; right: 1rem; top: 0.6rem; margin: 0; max-width: none; z-index: 70; }
  .vector-search-box.open { display: block; }
  .vector-search-box.open .search-form { background: var(--bg-base); }
  .search-toggle { display: inline-flex; }
  .vector-header-start { flex-grow: 1; }
  .mw-logo-icon { width: 40px; height: 40px; }
  .mw-logo-wordmark { font-size: 1.12rem; }
  .mw-logo-tagline { font-size: 0.66rem; }

  .infobox {
    float: none;
    width: 100%;
    margin: 0.5em 0 1em;
  }
  .mw-parser-output figure.thumb-right,
  .mw-parser-output figure.thumb-left {
    float: none;
    margin: 0.5em auto 1em;
  }
  .mw-footer #footer-icons { float: none; }
  .lang-label { display: none; }
  .vector-menu-tabs .tab-label-optional { display: none; }
}

@media (max-width: 480px) {
  .mw-logo-container { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .vector-header, .vector-column-start, .vector-column-end,
  .vector-page-toolbar, .mw-portlet-lang, .mw-editsection, .vector-page-titlebar-toc,
  .mw-footer #footer-icons, .catlinks { display: none !important; }
  .mw-page-container-inner { display: block; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
