/* ==========================================================================
   coursera.wiki — Authentic Wikipedia Vector Theme
   Pixel-accurate recreation of Wikimedia Foundation Vector skin
   ========================================================================== */

:root {
  --wiki-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Lato, Helvetica, Arial, sans-serif;
  --wiki-font-serif: "Linux Libertine", "Georgia", "Times New Roman", Times, serif;
  --wiki-font-mono: monospace, "Courier";

  --wiki-bg: #f6f6f6;
  --wiki-content-bg: #ffffff;
  --wiki-border: #a2a9b1;
  --wiki-border-light: #c8ccd1;
  --wiki-border-subtle: #eaecf0;

  --wiki-text: #202122;
  --wiki-text-muted: #54595d;
  --wiki-text-light: #72777d;

  --wiki-link: #0645ad;
  --wiki-link-visited: #0b0080;
  --wiki-link-active: #faa700;
  --wiki-link-new: #ba0000;
  
  --wiki-header-bg: #eaecf0;
  --wiki-box-bg: #f8f9fa;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
}

body {
  font-family: var(--wiki-font-sans);
  font-size: 0.875rem; /* 14px */
  line-height: 1.6;
  background-color: var(--wiki-bg);
  color: var(--wiki-text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--wiki-link);
  text-decoration: none;
}
a:visited {
  color: var(--wiki-link-visited);
}
a:hover {
  text-decoration: underline;
}
a.external::after {
  content: " \2197";
  font-size: 0.8em;
  color: var(--wiki-text-light);
}

/* ==========================================================================
   Header & Personal Bar (Topmost)
   ========================================================================== */

#mw-head-base {
  height: 5em;
  background-color: #ffffff;
  background-image: linear-gradient(to bottom, #ffffff 50%, #f6f6f6 100%);
  background-repeat: repeat-x;
}

#mw-page-base {
  height: 5em;
  background-color: #ffffff;
  background-image: linear-gradient(to bottom, #ffffff 50%, #f6f6f6 100%);
}

.wiki-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   Wikipedia Left Sidebar
   ========================================================================== */

#mw-panel {
  width: 170px;
  padding-left: 0.8em;
  padding-right: 0.8em;
  flex-shrink: 0;
}

.wiki-logo-container {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 14px;
  text-decoration: none !important;
}

.wiki-globe {
  width: 80px;
  height: 80px;
  margin: 0 auto 6px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d8e2ec 60%, #9cb2cc 100%);
  border: 1px solid #7c95b3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wiki-font-serif);
  font-size: 38px;
  color: #233e5c;
  box-shadow: inset -2px -2px 6px rgba(0,0,0,0.15), 1px 1px 3px rgba(0,0,0,0.1);
  user-select: none;
}
.wiki-globe img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

/* MediaWiki Standard Image Thumbnails */
div.thumb {
  margin-bottom: 0.5em;
  width: auto;
  background-color: transparent;
}
div.tleft {
  float: left;
  clear: left;
  margin: 0.3em 1.2em 0.5em 0;
}
div.tright {
  float: right;
  clear: right;
  margin: 0.3em 0 0.5em 1.2em;
}
.thumbinner {
  border: 1px solid #c8ccd1;
  padding: 3px;
  background-color: #f8f9fa;
  font-size: 88%;
  text-align: center;
  overflow: hidden;
}
.thumbimage {
  background-color: #ffffff;
  border: 1px solid #c8ccd1;
  display: block;
}
.thumbcaption {
  border: 0;
  line-height: 1.4em;
  padding: 4px 2px 2px;
  font-size: 0.75rem;
  text-align: left;
  color: #54595d;
}

.wiki-wordmark {
  font-family: var(--wiki-font-serif);
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.wiki-tagline {
  font-family: var(--wiki-font-serif);
  font-size: 10px;
  color: var(--wiki-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.portal {
  margin-bottom: 1em;
  padding-top: 0.3em;
  border-top: 1px solid #c8ccd1;
}
.portal:first-of-type {
  border-top: none;
}
.portal h3 {
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--wiki-text-muted);
  text-transform: uppercase;
  padding: 0.25em 0;
  margin: 0;
  letter-spacing: 0.5px;
}
.portal ul {
  list-style: none;
  padding: 0;
  margin: 0.2em 0 0 0;
  font-size: 0.8125rem;
}
.portal li {
  margin-bottom: 0.35em;
  line-height: 1.35;
}
.portal li a {
  color: var(--wiki-link);
}
.portal li a.active {
  font-weight: bold;
  color: #000;
}

/* ==========================================================================
   Wikipedia Main Content Area
   ========================================================================== */

#content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top Navigation Tabs Header */
#head-navigation {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 2.5em;
  margin-top: 1.5em;
}

.vector-tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}
.vector-tabs li {
  background-color: #eaecf0;
  background-image: linear-gradient(to bottom, #f8f9fa 0%, #eaecf0 100%);
  border: 1px solid var(--wiki-border);
  border-bottom: none;
  margin-right: -1px;
  font-size: 0.8125rem;
  line-height: 1.1;
}
.vector-tabs li.selected {
  background: #ffffff;
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
  position: relative;
  z-index: 3;
}
.vector-tabs li a {
  display: block;
  padding: 0.5em 0.8em;
  color: var(--wiki-link);
  text-decoration: none;
}
.vector-tabs li.selected a {
  color: var(--wiki-text);
  cursor: default;
}

.header-right-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

#simpleSearch {
  display: flex;
  border: 1px solid var(--wiki-border);
  background: #ffffff;
  border-radius: 2px;
}
#simpleSearch input[type="search"] {
  border: none;
  padding: 0.35em 0.6em;
  font-size: 0.8125rem;
  width: 220px;
  outline: none;
}
#simpleSearch button {
  background: #f8f9fa;
  border: none;
  border-left: 1px solid var(--wiki-border);
  padding: 0.35em 0.6em;
  cursor: pointer;
  color: var(--wiki-text-muted);
}
#simpleSearch button:hover {
  background: #eaecf0;
}

/* Main Wikipedia Article Page */
#content {
  background: var(--wiki-content-bg);
  border: 1px solid var(--wiki-border);
  border-right-width: 1px;
  padding: 1.25em 1.75em 2em;
  position: relative;
  z-index: 2;
  margin-top: -1px;
}

/* Disclaimers & Notices */
.siteNotice {
  background: #fdf2d0;
  border: 1px solid #eed28b;
  padding: 6px 12px;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  color: #553805;
}
.siteNotice strong {
  color: #332103;
}

.hatnote {
  font-style: italic;
  padding-left: 1.6em;
  margin-bottom: 0.75em;
  color: var(--wiki-text-muted);
  font-size: 0.8125rem;
}

/* Title Header */
h1.firstHeading {
  font-family: var(--wiki-font-serif);
  font-size: 1.85rem;
  font-weight: normal;
  border-bottom: 1px solid var(--wiki-border);
  padding-bottom: 0.25em;
  margin-bottom: 0.25em;
  line-height: 1.2;
}

#siteSub {
  font-size: 0.75rem;
  color: var(--wiki-text-muted);
  margin-bottom: 1.2em;
}

/* Body Content Typography */
#bodyContent {
  position: relative;
}
#bodyContent p {
  margin-bottom: 0.85em;
  line-height: 1.65;
}
#bodyContent p:first-of-type::first-line {
  /* Classic first lead */
}

h2 {
  font-family: var(--wiki-font-serif);
  font-size: 1.5rem;
  font-weight: normal;
  border-bottom: 1px solid var(--wiki-border);
  padding-bottom: 0.15em;
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  clear: left;
}

h3 {
  font-size: 1.15rem;
  font-weight: bold;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
}

h4 {
  font-size: 0.95rem;
  font-weight: bold;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.mw-editsection {
  font-family: var(--wiki-font-sans);
  font-size: 0.75rem;
  font-weight: normal;
  margin-left: 0.5em;
  vertical-align: baseline;
}
.mw-editsection a {
  color: var(--wiki-link);
}

/* Lists */
#bodyContent ul, #bodyContent ol {
  margin: 0.4em 0 0.85em 2em;
}
#bodyContent li {
  margin-bottom: 0.25em;
}

/* ==========================================================================
   Wikipedia Infobox
   ========================================================================== */

table.infobox {
  border: 1px solid var(--wiki-border);
  background-color: var(--wiki-box-bg);
  color: #000000;
  margin: 0.5em 0 1em 1.4em;
  padding: 0.2em;
  float: right;
  clear: right;
  width: 22em;
  font-size: 88%;
  line-height: 1.5em;
  border-spacing: 3px;
}
table.infobox caption {
  font-size: 125%;
  font-weight: bold;
  padding: 0.25em;
  text-align: center;
  caption-side: top;
}
table.infobox th.infobox-above {
  font-size: 125%;
  font-weight: bold;
  text-align: center;
  padding: 0.35em 0.2em;
  background-color: #eaecf0;
}
table.infobox th.infobox-header {
  font-weight: bold;
  text-align: center;
  padding: 0.25em 0.2em;
  background-color: #eaecf0;
}
table.infobox th.infobox-label {
  padding: 0.2em 0.4em;
  background-color: transparent;
  vertical-align: top;
  text-align: left;
  width: 40%;
  font-weight: bold;
}
table.infobox td.infobox-data {
  padding: 0.2em 0.4em;
  vertical-align: top;
}
table.infobox td.infobox-image {
  text-align: center;
  padding: 0.6em 0.2em;
  background-color: #ffffff;
  border: 1px solid var(--wiki-border-subtle);
}
table.infobox .infobox-badge-box {
  display: inline-block;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid var(--wiki-border);
  font-family: var(--wiki-font-serif);
  font-weight: bold;
  font-size: 20px;
  color: #0056b3;
  letter-spacing: -0.5px;
}

/* ==========================================================================
   Wikipedia Table of Contents (TOC)
   ========================================================================== */

#toc {
  background-color: var(--wiki-box-bg);
  border: 1px solid var(--wiki-border);
  padding: 7px 12px;
  font-size: 92%;
  display: table;
  margin: 1em 0;
}
.toctitle {
  text-align: center;
  font-weight: bold;
  margin-bottom: 0.4em;
  direction: ltr;
}
.toctoggle {
  font-size: 80%;
  font-weight: normal;
  margin-left: 0.4em;
}
#toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
#toc ul ul {
  margin: 0 0 0 1.5em;
}
#toc li {
  margin-bottom: 0.2em;
}
.tocnumber {
  color: var(--wiki-text);
  padding-right: 0.4em;
}
.toctext {
  color: var(--wiki-link);
}
.toctext:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Wikipedia Wikitables
   ========================================================================== */

table.wikitable {
  background-color: var(--wiki-box-bg);
  color: #202122;
  margin: 1em 0;
  border: 1px solid var(--wiki-border);
  border-collapse: collapse;
  font-size: 90%;
  width: 100%;
}
table.wikitable > tr > th,
table.wikitable > * > tr > th {
  background-color: var(--wiki-header-bg);
  text-align: left;
  font-weight: bold;
  border: 1px solid var(--wiki-border);
  padding: 0.4em 0.6em;
}
table.wikitable > tr > td,
table.wikitable > * > tr > td {
  border: 1px solid var(--wiki-border);
  padding: 0.4em 0.6em;
  vertical-align: top;
}
table.wikitable > tr:nth-child(even),
table.wikitable > * > tr:nth-child(even) {
  background-color: #ffffff;
}

/* Callout Box / Messagebox */
.messagebox {
  border: 1px solid #a2a9b1;
  background-color: #f8f9fa;
  padding: 0.5em 1em;
  margin: 1em 0;
  font-size: 90%;
}
.messagebox.standard {
  border-left: 10px solid #36c;
}
.messagebox.warning {
  border-left: 10px solid #fc3;
  background-color: #fef6e7;
}

/* ==========================================================================
   Citations & References Section
   ========================================================================== */

sup.reference {
  font-size: 80%;
  line-height: 1;
  font-weight: normal;
  font-style: normal;
  padding: 0 1px;
}
sup.reference a {
  white-space: nowrap;
}

ol.references {
  font-size: 90%;
  margin-left: 2em;
  padding: 0;
  color: #333333;
}
ol.references li {
  margin-bottom: 0.4em;
  line-height: 1.5;
}
.mw-cite-backlink {
  font-family: var(--wiki-font-sans);
  color: var(--wiki-link);
  user-select: none;
  margin-right: 0.25em;
  font-weight: bold;
}

/* ==========================================================================
   Wikipedia Category Links Box (Catlinks)
   ========================================================================== */

#catlinks {
  background-color: var(--wiki-box-bg);
  border: 1px solid var(--wiki-border);
  padding: 5px 8px;
  margin-top: 1.5em;
  clear: both;
  font-size: 0.8125rem;
}
#catlinks .catlinks-title {
  font-weight: bold;
}
#catlinks ul {
  display: inline;
  list-style: none;
  padding: 0;
  margin: 0;
}
#catlinks li {
  display: inline;
  border-left: 1px solid #a2a9b1;
  padding: 0 0.5em;
  line-height: 1.25;
}
#catlinks li:first-child {
  border-left: none;
  padding-left: 0.25em;
}

/* ==========================================================================
   Wikipedia Vector Footer
   ========================================================================== */

#footer {
  margin: 0;
  padding: 1.25em 1.75em 2.5em;
  direction: ltr;
  font-size: 0.75rem;
  color: var(--wiki-text-muted);
}
#footer-info {
  list-style: none;
  padding: 0;
  margin: 0;
}
#footer-info li {
  margin-bottom: 0.5em;
  line-height: 1.4;
}
#footer-places {
  list-style: none;
  padding: 0;
  margin: 0.6em 0 0 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
#footer-places li a {
  color: var(--wiki-link);
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */

@media (max-width: 900px) {
  .wiki-wrapper {
    flex-direction: column;
  }
  #mw-panel {
    width: 100%;
    padding: 10px;
    border-bottom: 1px solid var(--wiki-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .wiki-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    text-align: left;
  }
  .wiki-globe {
    width: 44px;
    height: 44px;
    font-size: 22px;
    margin: 0;
  }
  .portal {
    border-top: none;
    margin-bottom: 0;
  }
  .portal h3 {
    display: none;
  }
  .portal ul {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  #head-navigation {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 8px;
    margin-top: 0.5em;
    padding: 0 10px;
  }
  #simpleSearch input[type="search"] {
    width: 100%;
  }
  table.infobox {
    float: none;
    width: 100%;
    margin: 1em 0;
  }
  #content {
    border-left: none;
    border-right: none;
    padding: 1em;
  }
}
