:root {
  --canvas: #eef1ed;
  --paper: #fffefb;
  --paper-muted: #f4f6f2;
  --ink: #202522;
  --muted: #5d6760;
  --rule: #cbd2cc;
  --rule-strong: #8e9a91;
  --accent: #235c46;
  --accent-soft: #dcebe3;
  --link: #245f87;
  --link-visited: #65477b;
  --draft: #8a5a15;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--link-visited);
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(35, 92, 70, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 20;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: var(--paper);
  border-top: 4px solid var(--accent);
}

.brand-row,
.utility-bar,
.site-footer {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.brand-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:visited {
  color: var(--ink);
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, var(--accent-soft));
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: -0.08em;
  box-shadow: inset 0 0 0 4px var(--paper);
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.brand-copy small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-search {
  position: relative;
  display: flex;
  width: min(100%, 370px);
}

.page-search input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--rule-strong);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.52rem 0.7rem;
}

.page-search button {
  border: 1px solid var(--accent);
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  color: #fff;
  font: 600 0.86rem var(--sans);
  padding-inline: 0.9rem;
  cursor: pointer;
}

.search-status {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  z-index: 5;
  max-width: 100%;
  padding: 0.25rem 0.45rem;
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.search-status.visible {
  opacity: 1;
}

.utility-bar {
  min-height: 42px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.article-tabs {
  display: flex;
  align-items: end;
}

.article-tabs a {
  padding: 0.55rem 0.9rem 0.5rem;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.article-tabs a.active,
.article-tabs a:hover {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.draft-label {
  margin-bottom: 0.52rem;
  color: var(--draft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.page-frame {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 35px rgba(30, 45, 36, 0.08);
}

.article {
  display: flow-root;
  padding: clamp(1.4rem, 3.5vw, 3rem) clamp(1.2rem, 4vw, 3.6rem) 3.5rem;
}

.article-header {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.article-deck {
  max-width: 760px;
  margin: 0.55rem 0 1rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
}

.editorial-note {
  margin: 1rem 0 1.4rem;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #b9822a;
  background: #fbf5e9;
  color: #53441f;
  font-size: 0.83rem;
  line-height: 1.5;
}

.infobox {
  float: right;
  width: min(330px, 40%);
  margin: 0.2rem 0 1.5rem 2rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.infobox-title {
  padding: 0.58rem 0.75rem;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--accent-soft);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
}

.infobox-photo {
  margin: 0.75rem;
}

.infobox-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: #171918;
}

.infobox-photo figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

.infobox dl {
  margin: 0;
}

.infobox dl > div {
  display: grid;
  grid-template-columns: minmax(90px, 34%) 1fr;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--rule);
}

.infobox dt {
  font-weight: 700;
}

.infobox dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.lead {
  font-size: 1rem;
}

.lead p:first-child::first-letter {
  float: left;
  margin: 0.07em 0.08em 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: 0.78;
}

p {
  margin: 0 0 0.95rem;
}

sup {
  margin-left: 0.08rem;
  font-size: 0.7em;
  line-height: 0;
}

sup a {
  text-decoration: none;
}

.contents {
  display: table;
  min-width: 285px;
  max-width: 520px;
  margin: 1.4rem 0 1.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  background: var(--paper-muted);
  font-size: 0.83rem;
}

.contents-heading {
  margin-bottom: 0.4rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.contents ol {
  margin: 0;
  padding-left: 1.45rem;
}

.contents li {
  padding-block: 0.12rem;
}

.article-section {
  scroll-margin-top: 1rem;
}

.article-section h2 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 2.1rem 0 0.8rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule-strong);
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  line-height: 1.25;
}

.section-link {
  color: var(--rule-strong);
  font: 400 0.72em var(--sans);
  text-decoration: none;
}

.section-link:visited {
  color: var(--rule-strong);
}

.career-timeline {
  margin: 1.2rem 0 1.5rem;
  border-block: 1px solid var(--rule);
}

.career-timeline > div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.8rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.career-timeline > div:last-child {
  border-bottom: 0;
}

.career-timeline dt {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.career-timeline dd {
  margin: 0;
}

.entity-card {
  margin: 1.25rem 0 1.5rem;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  background: var(--paper-muted);
}

.entity-card h3 {
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.entity-card dl {
  margin: 0;
}

.entity-card dl > div {
  display: grid;
  grid-template-columns: minmax(9rem, 26%) 1fr;
  gap: 0.8rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.entity-card dl > div:last-child {
  border-bottom: 0;
}

.entity-card dt {
  font-weight: 700;
}

.entity-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.entity-card code {
  font-size: 0.82em;
}

.methodology {
  padding: 0.15rem 1rem 0.25rem;
  border-left: 3px solid var(--accent-soft);
  background: linear-gradient(90deg, rgba(220, 235, 227, 0.32), transparent 80%);
}

.references {
  padding-left: 2rem;
  font-size: 0.8rem;
}

.references li {
  margin-bottom: 0.55rem;
  padding-left: 0.2rem;
}

.references li:target {
  background: #fff2b8;
}

.external-links {
  padding-left: 1.3rem;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  margin-top: 2.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  background: var(--paper-muted);
  font-size: 0.78rem;
}

.site-footer {
  padding: 1.2rem 0 2.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.search-hit {
  animation: search-pulse 1.6s ease;
}

@keyframes search-pulse {
  0%, 100% { background: transparent; }
  25%, 70% { background: #fff2b8; }
}

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

/*
 * Classic encyclopedia skin. The layout follows familiar reference-site
 * conventions while retaining an independent Meelis.wiki identity.
 */
:root {
  --canvas: #f6f6f6;
  --paper: #ffffff;
  --paper-muted: #f8f9fa;
  --ink: #202122;
  --muted: #54595d;
  --rule: #c8ccd1;
  --rule-strong: #a2a9b1;
  --accent: #235c46;
  --accent-soft: #dfece4;
  --link: #0645ad;
  --link-visited: #0b0080;
  --serif: Georgia, "Linux Libertine", "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --content-width: 1100px;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
}

a {
  text-decoration: none;
  text-underline-offset: initial;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-header {
  border-top: 0;
  border-bottom: 1px solid #eaecf0;
  background: #fff;
}

.brand-row,
.utility-bar,
.site-footer {
  width: min(100% - 2rem, var(--content-width));
}

.brand-row {
  min-height: 56px;
  gap: 1rem;
  padding-block: 0.35rem;
}

.brand {
  gap: 0.65rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e8eee9);
  color: var(--accent);
  font-size: 0.95rem;
  box-shadow: none;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 400;
}

.brand-copy small {
  margin-top: 0;
  color: #54595d;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
}

.page-search {
  width: min(100%, 282px);
}

.page-search input {
  min-height: 29px;
  border-color: #72777d;
  border-radius: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
}

.page-search button {
  min-height: 29px;
  border-color: #72777d;
  border-radius: 0;
  background: linear-gradient(#fff, #f1f2f3);
  color: var(--ink);
  padding-inline: 0.8rem;
  font-size: 0.78rem;
}

.utility-bar {
  min-height: 37px;
  align-items: end;
  background: var(--canvas);
}

.article-tabs,
.view-tabs {
  display: flex;
  align-items: end;
}

.view-tabs {
  margin-left: auto;
}

.article-tabs a,
.view-tabs a {
  min-height: 36px;
  padding: 0.5rem 0.78rem 0.42rem;
  border: 1px solid #a7d7f9;
  border-bottom: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #eaf3f8);
  color: #3366cc;
  font-size: 0.78rem;
  text-decoration: none;
}

.article-tabs a + a,
.view-tabs a + a {
  border-left: 0;
}

.article-tabs a.active,
.article-tabs a:hover,
.view-tabs a.active,
.view-tabs a:hover {
  border-bottom-color: #fff;
  background: #fff;
  color: var(--ink);
}

.article-tabs a.active,
.view-tabs a.active {
  font-weight: 700;
}

.page-frame {
  width: min(100% - 2rem, var(--content-width));
  margin-top: -1px;
  border: 1px solid #a7d7f9;
  background: #fff;
  box-shadow: none;
}

.article {
  padding: 1.15rem 1.55rem 2.25rem;
}

.article-header {
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule-strong);
}

.eyebrow {
  display: none;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.article-deck {
  margin: 0.18rem 0 0.35rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-style: italic;
}

.editorial-note {
  margin: 0.8rem 0 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-left: 9px solid #f28500;
  background: #fbfbfb;
  color: var(--ink);
  font-size: 0.78rem;
}

.infobox {
  width: min(300px, 34%);
  margin: 1rem 0 1.2rem 1.35rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper-muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.infobox-title {
  padding: 0.45rem 0.65rem;
  border-bottom-color: var(--rule-strong);
  background: #dfeccd;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
}

.infobox-photo {
  width: min(220px, calc(100% - 1.5rem));
  margin: 0.72rem auto;
}

.infobox-photo img {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 32%;
}

.infobox dl > div {
  grid-template-columns: minmax(88px, 36%) 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
}

.lead {
  font-size: inherit;
}

.lead p:first-child::first-letter {
  float: none;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

p {
  margin-bottom: 0.72rem;
}

.contents {
  display: table;
  min-width: 307px;
  max-width: 430px;
  margin: 1rem 0 1.25rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper-muted);
  font-size: 0.78rem;
}

.contents-heading {
  margin-bottom: 0.25rem;
  font-family: var(--sans);
  font-size: 0.83rem;
  font-weight: 700;
  text-align: center;
}

.article-section h2 {
  gap: 0.55rem;
  margin: 1.6rem 0 0.55rem;
  padding-bottom: 0.12rem;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 1.5rem;
  line-height: 1.3;
}

.section-link {
  color: #3366cc;
  font: 400 0.48em var(--sans);
  white-space: nowrap;
}

.section-link:visited {
  color: #3366cc;
}

.career-timeline {
  margin-block: 0.9rem 1.1rem;
  border-color: var(--rule-strong);
}

.career-timeline > div {
  padding: 0.5rem 0.65rem;
}

.entity-card {
  border-color: var(--rule-strong);
  border-top: 1px solid var(--rule-strong);
  background: var(--paper-muted);
}

.entity-card h3 {
  background: var(--accent-soft);
  font-family: var(--sans);
  font-size: 0.9rem;
  text-align: center;
}

.methodology {
  padding: 0;
  border-left: 0;
  background: transparent;
}

.references {
  padding-left: 2rem;
  font-size: 0.74rem;
  line-height: 1.48;
}

.categories {
  margin-top: 1.7rem;
  padding: 0.45rem 0.65rem;
  border-color: var(--rule-strong);
  background: var(--paper-muted);
  font-size: 0.75rem;
}

.site-footer {
  padding: 1.1rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.68rem;
}

@media (max-width: 760px) {
  .brand-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
    padding-block: 0.8rem 1rem;
  }

  .page-search {
    width: 100%;
  }

  .utility-bar {
    align-items: end;
    flex-direction: row;
    gap: 0.5rem;
  }

  .draft-label {
    margin: 0.5rem 0 0;
  }

  .article-tabs a {
    padding-inline: 0.7rem;
  }

  .article-tabs a,
  .view-tabs a {
    min-height: 34px;
    padding: 0.45rem 0.55rem 0.38rem;
    font-size: 0.7rem;
  }

  .view-tabs a:nth-child(2) {
    display: none;
  }

  .page-frame {
    width: 100%;
    border-inline: 0;
  }

  .infobox {
    float: none;
    width: 100%;
    margin: 1.2rem 0 1.5rem;
  }

  .career-timeline > div {
    grid-template-columns: 3.6rem 1fr;
    gap: 0.55rem;
    padding-inline: 0.4rem;
  }

  .entity-card dl > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .contents {
    display: block;
    min-width: 0;
    max-width: none;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .utility-bar,
  .editorial-note,
  .site-footer,
  .section-link {
    display: none;
  }

  .page-frame {
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .article {
    padding: 0;
  }

  a {
    color: inherit;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .search-hit {
    animation: none;
    background: #fff2b8;
  }
}
