* {
  box-sizing: border-box;
}

:root {
  --text: #111827;
  --muted: #4b5563;
  --soft: #6b7280;
  --border: #e5e7eb;
  --panel: #f9fafb;
  --accent: #2563eb;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  max-width: 980px;
  margin: 0 auto;
  padding: 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.logo {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.back-link:hover,
.logo:hover {
  color: var(--accent);
}

.article {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.article-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article h1 {
  margin: 0 0 22px;
  max-width: 820px;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.article-lead {
  margin: 0 0 48px;
  max-width: 760px;
  color: #374151;
  font-size: 21px;
  line-height: 1.6;
}

.article h2 {
  margin: 56px 0 20px;
  padding-top: 8px;
  font-size: 31px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.article h3 {
  margin: 44px 0 18px;
  font-size: 24px;
  line-height: 1.3;
}

.article p {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.55;
}


.article ul,
.article ol {
  margin: 0 0 20px 24px;
  padding: 0;
  font-size: 18px;
  line-height: 1.45;
}

.article ol li {
  margin-bottom: 8px;
}

.article li {
  margin: 0 0 10px;
  padding-left: 4px;
}

.article li p {
  margin: 0 0 8px;
}

.bullet-line {
  padding-left: 18px;
}

.formula {
  margin: 22px 0;
}

.formula code {
  display: block;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: #111827;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.5;
}

figure {
  margin: 42px 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

figcaption {
  margin-top: 10px;
  color: var(--soft);
  font-size: 14px;
  text-align: center;
}

.table-wrap {
  width: 100%;
  margin: 28px 0 34px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}

th,
td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel);
  font-weight: 700;
}

@media (max-width: 640px) {
  .site-header {
    padding: 18px;
  }

  .article {
    padding: 36px 18px 72px;
  }

  .article h1 {
    font-size: 34px;
  }

  .article h2 {
    font-size: 26px;
  }

  .article h3 {
    font-size: 22px;
  }

  .article-lead {
    font-size: 18px;
  }

  .article p,
  .article ul,
  .article ol {
    font-size: 17px;
  }
}

.article-source {
  margin: 0 0 48px;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
  font-style: italic;
}

.article-source a {
  color: #2563eb;
  text-decoration: none;
}

.article-source a:hover {
  text-decoration: underline;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.lang-switcher a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
}

.lang-switcher a:hover {
  color: var(--accent);
  background: var(--panel);
}

.lang-switcher a.active {
  color: #ffffff;
  background: var(--accent);
}

.lowercase {
text-transform: lowercase;
}

.article-lead {
  margin: 0 0 20px;
  max-width: 760px;
  color: #374151;
  font-size: 20px;
  line-height: 1.55;
}

.article-meta {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 15px;
}

.article-source {
  margin: 0 0 56px;
  max-width: 760px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
  font-style: italic;
}

.article-references {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-references h2 {
  margin-top: 0;
}

.article-references p {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
}
