:root {
  --theme-ink: #101820;
  --theme-muted: #64727b;
  --theme-line: rgba(16, 24, 32, 0.11);
  --theme-blue: #1672dc;
  --theme-teal: #0d8f98;
  --theme-paper: rgba(255, 255, 255, 0.91);
  --theme-wash: #e9eef1;
  --theme-gold: #d99b37;
}

.theme-body {
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 114, 220, 0.08), transparent 28%),
    radial-gradient(circle at 91% 34%, rgba(13, 143, 152, 0.07), transparent 25%),
    #eef1f2;
  color: var(--theme-ink);
}

.theme-page {
  width: min(100% - 48px, 1220px);
  margin: 0 auto;
  padding: 48px 0 92px;
}

.theme-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 68px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: #050505;
  color: #fff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
}

.theme-hero::after {
  content: none;
}

.theme-hero-content { position: relative; z-index: 1; max-width: 760px; }
.theme-eyebrow,
.theme-kicker {
  margin: 0 0 13px;
  color: #75d6d7;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.theme-hero h1 {
  max-width: 840px;
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 6vw, 78px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.theme-hero-lead {
  max-width: 720px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.7;
}

.theme-hero-focus {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 17px 0 0;
  padding-left: 22px;
  color: #fff;
}

.theme-hero-focus li {
  padding-left: 4px;
  font-size: 15px;
  line-height: 1.55;
}

.theme-hero-focus li::marker { color: rgba(255, 255, 255, 0.62); }

.theme-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

.theme-intro-card,
.theme-toc,
.theme-section,
.theme-source-card {
  border: 1px solid var(--theme-line);
  border-radius: 22px;
  background: var(--theme-paper);
  box-shadow: 0 14px 34px rgba(26, 44, 55, 0.07);
}

.theme-intro-card { padding: 27px 30px; }
.theme-intro-card h2 { margin: 0 0 12px; color: var(--theme-ink); font-size: 25px; letter-spacing: -0.03em; line-height: 1.15; }
.theme-intro-card p { margin: 0; color: #4d5e66; line-height: 1.75; }
.theme-intro-card ul { display: grid; gap: 10px; margin: 19px 0 0; padding: 0; list-style: none; }
.theme-intro-card li { position: relative; padding-left: 24px; color: #32464f; font-size: 14px; line-height: 1.55; }
.theme-intro-card li::before { position: absolute; top: 0.58em; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--theme-blue); box-shadow: 0 0 0 5px rgba(22, 114, 220, 0.11); content: ""; }

.theme-intro-note {
  display: grid;
  align-content: space-between;
  min-height: 100%;
  padding: 27px 27px 24px;
  background: linear-gradient(150deg, #f7fbfd, #e5eef2);
}

.theme-intro-note strong { display: block; color: #132e3d; font-size: 18px; line-height: 1.25; }
.theme-intro-note p { margin: 13px 0 0; color: #5e7078; font-size: 14px; line-height: 1.65; }
.theme-intro-note a { color: #126ac7; font-weight: 750; text-underline-offset: 3px; }
.theme-intro-note .theme-edition-source { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--theme-line); font-size: 12px; line-height: 1.55; }

.theme-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.theme-toc {
  position: sticky;
  top: 96px;
  padding: 18px 14px;
}

.theme-toc-label { margin: 0 10px 10px; color: #75848a; font-size: 11px; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.theme-toc nav { display: grid; gap: 2px; }
.theme-toc a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px 10px; border-radius: 10px; color: #586a72; font-size: 13px; font-weight: 680; line-height: 1.35; text-decoration: none; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.theme-toc a span { color: #98a5a9; font-variant-numeric: tabular-nums; }
.theme-toc a:hover { background: #edf4f5; color: var(--theme-teal); transform: translateX(2px); }
.theme-toc-note { margin: 18px 10px 2px; padding-top: 14px; border-top: 1px solid var(--theme-line); color: #879398; font-size: 12px; line-height: 1.55; }

.theme-content { min-width: 0; display: grid; gap: 18px; }
.theme-section { min-width: 0; padding: clamp(25px, 4vw, 42px); scroll-margin-top: 98px; }
.theme-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.theme-section-number { flex: 0 0 auto; min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #e9f3ff; color: #126ac7; font-size: 14px; font-weight: 850; }
.theme-section h2 { margin: 0; color: var(--theme-ink); font-size: clamp(25px, 3vw, 35px); letter-spacing: -0.04em; line-height: 1.08; }
.theme-section h3 { margin: 30px 0 12px; color: #193542; font-size: 20px; letter-spacing: -0.025em; line-height: 1.2; }
.theme-section h4 { margin: 24px 0 10px; color: #49636d; font-size: 13px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.theme-section p { margin: 0 0 15px; color: #435760; font-size: 15px; line-height: 1.78; }
.theme-section p:last-child { margin-bottom: 0; }
.theme-section ul,
.theme-section ol { display: grid; gap: 9px; margin: 12px 0 19px; padding-left: 23px; color: #435760; }
.theme-section li { padding-left: 3px; font-size: 14.5px; line-height: 1.65; }
.theme-section li::marker { color: var(--theme-blue); font-weight: 800; }

.theme-definition,
.theme-callout {
  margin: 18px 0 21px;
  padding: 18px 20px;
  border: 1px solid rgba(22, 114, 220, 0.15);
  border-left: 4px solid var(--theme-blue);
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f7ff, #f7fbfd);
}

.theme-definition strong,
.theme-callout strong { display: block; margin-bottom: 5px; color: #173b59; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; }
.theme-definition p,
.theme-callout p { margin: 0; color: #3f5966; font-size: 14px; line-height: 1.65; }
.theme-callout.is-gold { border-color: rgba(217, 155, 55, 0.22); border-left-color: var(--theme-gold); background: linear-gradient(135deg, #fff8e8, #fffdf7); }
.theme-callout.is-gold strong { color: #805712; }

.theme-table-wrap { width: 100%; max-width: 100%; margin: 19px 0 23px; overflow-x: auto; border: 1px solid var(--theme-line); border-radius: 14px; background: #fff; }
.theme-table { width: 100%; min-width: 560px; border-collapse: collapse; color: #41545d; font-size: 13.5px; line-height: 1.5; }
.theme-table th { padding: 12px 14px; background: #050505; color: #fff; font-size: 12px; font-weight: 820; letter-spacing: 0.03em; text-align: left; }
.theme-table td { padding: 12px 14px; border-top: 1px solid var(--theme-line); vertical-align: top; }
.theme-table tbody tr:nth-child(even) td { background: #f7fafb; }
.theme-table td:first-child { color: #203b4a; font-weight: 760; }
.theme-table--gold th { background: #050505; color: #fff; }
.theme-table--gold td:first-child { color: #78520c; }

.theme-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.theme-mini-card { padding: 18px; border: 1px solid var(--theme-line); border-radius: 15px; background: #f8fafb; }
.theme-mini-card h4 { margin: 0 0 11px; color: #173b59; }
.theme-mini-card ul { margin: 0; padding-left: 18px; }

.theme-figure { margin: 22px 0 27px; padding: 10px; border: 1px solid var(--theme-line); border-radius: 17px; background: #fff; box-shadow: 0 12px 30px rgba(25, 43, 50, 0.08); }
.theme-figure a { display: block; cursor: zoom-in; }
.theme-figure img { width: 100%; height: auto; display: block; border-radius: 10px; }
.theme-figure--portrait { max-width: 680px; }
.theme-figure--square { max-width: 620px; }
.theme-figure figcaption { padding: 12px 7px 3px; color: #7b898f; font-size: 12px; line-height: 1.5; }

.theme-formula { margin: 18px 0 22px; padding: 17px 20px; overflow-x: auto; border: 1px solid rgba(13, 143, 152, 0.2); border-radius: 14px; background: #edfafa; color: #115c62; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; font-weight: 750; white-space: nowrap; }
.theme-source-card { margin-top: 18px; padding: 20px 24px; color: #53666d; font-size: 14px; line-height: 1.65; }
.theme-source-card strong { color: #1a3a48; }
.theme-source-card p { margin: 0; }

@media (max-width: 900px) {
  .theme-page { width: min(100% - 32px, 760px); padding-top: 32px; }
  .theme-intro,
  .theme-layout { grid-template-columns: 1fr; }
  .theme-toc { position: static; }
  .theme-toc nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-toc-note { display: none; }
}

@media (max-width: 620px) {
  .theme-page { width: calc(100% - 20px); padding: 22px 0 60px; }
  .theme-hero { padding: 30px 23px 27px; border-radius: 22px; }
  .theme-hero h1 { font-size: clamp(38px, 13vw, 58px); }
  .theme-hero-lead { margin-top: 23px; }
  .theme-intro-card { padding: 22px 21px; border-radius: 18px; }
  .theme-intro-note { padding: 22px 21px; }
  .theme-toc { padding: 13px 9px; border-radius: 18px; }
  .theme-toc nav { grid-template-columns: 1fr; }
  .theme-section { padding: 24px 20px 27px; border-radius: 18px; }
  .theme-section-header { gap: 12px; }
  .theme-section-number { min-width: 38px; height: 38px; border-radius: 11px; font-size: 12px; }
  .theme-section h2 { font-size: 26px; }
  .theme-two-column { grid-template-columns: 1fr; }
  .theme-table { min-width: 520px; }
  .theme-figure { padding: 6px; border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toc a { transition: none; }
}
