/* ==========================================================================
   MelosAjvazi.wiki
   Encyclopedic layout. No frameworks, no webfonts, no build step.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #54595d;
  --rule: #c8ccd1;
  --rule-soft: #eaecf0;
  --box: #f8f9fa;
  --navy: #1b3a5f;
  --link: #2857a4;
  --link-visited: #6a4b9c;
  --link-hover: #14396d;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:visited { color: var(--link-visited); }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover, .brand:focus { text-decoration: none; color: var(--ink); }
.brand:visited { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; }

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.search {
  display: flex;
  gap: 8px;
  flex: 0 1 380px;
}

.search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
}

.search input[type="search"]:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 2px rgba(27, 58, 95, 0.15);
}

.search button {
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--box);
  color: var(--ink);
  cursor: pointer;
}
.search button:hover { background: #eef1f4; border-color: #a2a9b1; }

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.tabs-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tab {
  display: inline-block;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.tab.is-current {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--navy);
}

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

main { padding-bottom: 48px; }

article { padding-top: 24px; }

.page-title {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 4px;
}

.from-line {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
}

article p { margin: 0 0 16px; }

.lead { font-size: 17px; }

h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  margin: 40px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.edit-mark {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  vertical-align: middle;
  margin-left: 6px;
}

.topic-list {
  margin: 0 0 16px;
  padding-left: 22px;
}
.topic-list li { margin-bottom: 10px; }

.plain-list {
  margin: 0 0 16px;
  padding-left: 22px;
}
.plain-list li { margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Infobox
   -------------------------------------------------------------------------- */

.infobox {
  float: right;
  width: 320px;
  margin: 4px 0 20px 28px;
  padding: 10px;
  background: var(--box);
  border: 1px solid #a2a9b1;
  font-size: 13.5px;
  line-height: 1.5;
}

.infobox-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  margin: 4px 0 10px;
}

.infobox-figure {
  margin: 0 0 12px;
  text-align: center;
}

.infobox-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
}

.infobox-figure figcaption {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.infobox-table {
  width: 100%;
  border-collapse: collapse;
}

.infobox-table th,
.infobox-table td {
  text-align: left;
  vertical-align: top;
  padding: 7px 4px;
  border-top: 1px solid var(--rule);
}

.infobox-table tr:first-child th,
.infobox-table tr:first-child td {
  border-top: 0;
}

.infobox-table th {
  width: 38%;
  font-weight: 700;
  padding-right: 10px;
}

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */

.toc {
  display: inline-block;
  min-width: 300px;
  max-width: 100%;
  margin: 8px 0 28px;
  padding: 12px 22px 12px 14px;
  background: var(--box);
  border: 1px solid var(--rule);
  font-size: 14.5px;
}

.toc-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  text-align: center;
  margin: 0 0 8px;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
}

.toc > ol { padding-left: 20px; }

.toc li { margin: 3px 0; }

/* --------------------------------------------------------------------------
   References and categories
   -------------------------------------------------------------------------- */

.references {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 16px;
  padding-left: 22px;
}
.references li { margin-bottom: 8px; }
.references cite { font-style: italic; }

.categories {
  margin-top: 40px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--box);
  font-size: 14px;
}

.categories-label {
  display: inline;
  font-weight: 700;
  margin: 0 8px 0 0;
}

.categories ul {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.categories li {
  display: inline;
  color: var(--muted);
}

.categories li::after {
  content: " · ";
  color: var(--rule);
}

.categories li:last-child::after { content: ""; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 20px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer p { margin: 0 0 6px; }

.footer-brand {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
  .masthead-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .search { flex: 1 1 auto; }
  .page-title { font-size: 32px; }

  .infobox {
    float: none;
    width: 100%;
    max-width: 380px;
    margin: 0 0 24px;
  }

  .toc { display: block; min-width: 0; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .page-title { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  .tabs-inner { justify-content: flex-start; }
  .tabs-right { display: none; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .masthead .search,
  .tabs,
  .skip-link { display: none; }
  body { font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .infobox { float: right; width: 240px; }
}
