:root {
  --ink: #25212b;
  --muted: #6e6878;
  --line: #e9e4ee;
  --purple: #753bc8;
  --lilac: #f7f2fd;
  --paper: #fff;
  --body-font: Georgia, "Times New Roman", serif;
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
.preview-bar {
  background: #f7f3fc;
  border-bottom: 1px solid #ebe1f6;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: #6c547f;
}
.type-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #ece4f5;
  border-radius: 8px;
}
.type-switch button {
  border: 0;
  background: transparent;
  color: #6b577d;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 5px;
}
.type-switch button[aria-pressed="true"] {
  background: #fff;
  color: #4a286b;
  box-shadow: 0 1px 3px #3a174012;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fffffff5;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px;
  margin: auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 760;
  font-size: 23px;
  letter-spacing: -0.8px;
  text-decoration: none;
}
.brand svg {
  height: 30px;
  width: 30px;
}
.header-nav {
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.header-nav a {
  text-decoration: none;
}
.header-nav a:hover {
  color: var(--purple);
}
.reading-layout {
  max-width: 1120px;
  margin: 54px auto 90px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 64px;
  align-items: start;
}
.article {
  min-width: 0;
  max-width: 744px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin: 0 0 19px;
}
.eyebrow:before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
}
.eyebrow span {
  color: #aaa0b4;
  letter-spacing: 0;
}
.article h1 {
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: -2.1px;
  font-weight: 760;
  margin: 0 0 24px;
  text-wrap: balance;
}
.lead {
  font-size: 21px;
  line-height: 1.58;
  color: #6d6678;
  margin: 0 0 30px;
}
.byline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  line-height: 1.7;
  padding-bottom: 29px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.byline strong {
  color: var(--ink);
  font-weight: 650;
}
.editor-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  background: var(--lilac);
  border: 1px solid #e9ddf8;
  border-radius: 50%;
  color: var(--purple);
  font-size: 9px;
  font-weight: 800;
}
.byline .dot {
  color: #c8c0d0;
}
.takeaways {
  margin: 32px 0 38px;
  border-left: 3px solid var(--purple);
  border-radius: 0 11px 11px 0;
  background: var(--lilac);
  padding: 22px 24px 20px;
}
.takeaways h2 {
  font: 700 12px/1.5 var(--ui-font);
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 13px;
}
.takeaways ul {
  padding-left: 19px;
  margin: 0;
  font: 17px/1.65 var(--body-font);
}
.takeaways li + li {
  margin-top: 9px;
}
.takeaways li::marker {
  color: var(--purple);
}
.article-body {
  font: 20px/1.72 var(--body-font);
  overflow-wrap: break-word;
}
.article-body > p {
  margin: 0 0 22px;
}
.article-body a {
  color: #6435a3;
  text-decoration-line: underline;
  text-decoration-color: #b69ad7;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.article-body a:hover {
  color: #4b247d;
  text-decoration-color: currentColor;
}
.article-body strong {
  font-weight: 700;
  color: #25212b;
}
.article-body h2 {
  font: 730 31px/1.23 var(--ui-font);
  letter-spacing: -0.65px;
  margin: 56px 0 20px;
  scroll-margin-top: 105px;
  text-wrap: balance;
}
.article-body h3 {
  font: 700 23px/1.3 var(--ui-font);
  letter-spacing: -0.25px;
  margin: 34px 0 15px;
  scroll-margin-top: 105px;
}
.article-body h4 {
  font: 700 18px/1.4 var(--ui-font);
  margin: 28px 0 12px;
  scroll-margin-top: 105px;
}
.article-body ul,
.article-body ol {
  padding-left: 25px;
  margin: 0 0 25px;
}
.article-body li + li {
  margin-top: 8px;
}
.article-body li::marker {
  color: #8a739f;
}
.article-body li p {
  margin: 0;
}
.article-body .article-list {
  font: inherit;
  color: inherit;
  line-height: inherit;
}
.article-callout {
  margin: 30px 0;
  background: #f8f7fa;
  border-left: 3px solid #c6b8d5;
  padding: 19px 23px;
  border-radius: 0 10px 10px 0;
  font-size: 18px;
  line-height: 1.7;
}
.article-callout p {
  margin: 0 0 14px;
}
.article-callout p:last-child {
  margin-bottom: 0;
}
.article-body .article-callout strong {
  font-family: var(--ui-font);
  font-size: 0.91em;
}
.article-figure {
  margin: 34px 0 14px;
}
.article-figure img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border: 1px solid #ebe3f3;
  border-radius: 12px;
}
.article-body .article-figure + p:has(> em:only-child) {
  font: 13px/1.6 var(--ui-font);
  color: var(--muted);
  margin-bottom: 32px;
}
.article-body > p:has(> em:only-child):first-child {
  font: 12px/1.6 var(--ui-font);
  color: var(--muted);
}
.article-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 28px 0 32px;
}
.article-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font: 14px/1.65 var(--ui-font);
  text-align: left;
}
.article-table th,
.article-table td {
  padding: 13px 15px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.article-table th {
  background: #f7f5fa;
  font-weight: 650;
  color: #4e3d60;
}
.article-table tbody tr:last-child td {
  border-bottom: 0;
}
.article-table td:first-child {
  font-weight: 550;
}
.article-table th:not(:last-child),
.article-table td:not(:last-child) {
  border-right: 1px solid #f2eef6;
}
.prompt-block {
  margin: 30px 0;
  border: 1px solid #e1dbe9;
  border-radius: 11px;
  overflow: hidden;
  background: #f8f7fa;
}
.prompt-header {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6e1ed;
  font: 650 11px/1.5 var(--ui-font);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7b6a8e;
}
.copy-prompt {
  background: white;
  border: 1px solid #dcd3e7;
  padding: 6px 10px;
  border-radius: 5px;
  font: 500 12px/1.3 var(--ui-font);
  letter-spacing: 0;
  text-transform: none;
  color: #633e88;
}
.prompt-block pre {
  margin: 0;
  padding: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    14px/1.8 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: #3d3349;
}
.article-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}
.contents-rail {
  position: sticky;
  top: 108px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.contents-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8c7c9b;
  margin: 0 0 16px;
}
.contents-rail ol,
.mobile-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contents-rail li + li {
  margin-top: 3px;
}
.contents-rail nav {
  max-height: 65vh;
  overflow: auto;
  scrollbar-width: thin;
}
.contents-rail a {
  display: block;
  padding: 7px 0 7px 13px;
  border-left: 1px solid #e5deec;
  color: #797080;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.55;
}
.contents-rail a[aria-current="true"] {
  border-left: 2px solid var(--purple);
  color: #592e8a;
  font-weight: 650;
  background: linear-gradient(90deg, #f7f2fd00, #fff);
}
.rail-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0 18px;
}
.related-link {
  color: #7d638f;
  font-size: 12px;
  text-decoration: none;
  line-height: 1.7;
}
.mobile-toc {
  display: none;
}
.article-footer {
  border-top: 1px solid var(--line);
  padding: 25px 0;
  margin-top: 50px;
  font: 13px/1.7 var(--ui-font);
  color: var(--muted);
}
.article-footer a {
  color: var(--purple);
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: #8e8497;
  font-size: 12px;
}
body[data-type="sans"] {
  --body-font: var(--ui-font);
}
body[data-type="sans"] .article-body {
  font-size: 19px;
  line-height: 1.75;
}
body[data-type="sans"] .takeaways ul {
  font-size: 16px;
}
@media (max-width: 1050px) {
  .reading-layout {
    grid-template-columns: minmax(0, 744px);
    justify-content: center;
    max-width: 808px;
    margin-top: 40px;
  }
  .contents-rail {
    display: none;
  }
  .mobile-toc {
    display: block;
    border: 1px solid var(--line);
    padding: 15px 18px;
    border-radius: 9px;
    margin: 24px 0 30px;
    font: 13px/1.6 var(--ui-font);
  }
  .mobile-toc summary {
    cursor: pointer;
    color: #6a497f;
    font-weight: 600;
  }
  .mobile-toc ol {
    margin-top: 12px;
  }
  .mobile-toc a {
    display: block;
    padding: 6px 0;
    text-decoration: none;
    color: var(--muted);
  }
  .article h1 {
    font-size: 46px;
    letter-spacing: -1.5px;
  }
  .header-inner {
    max-width: 808px;
  }
}
@media (max-width: 600px) {
  html {
    scroll-padding-top: 85px;
  }
  .preview-bar {
    padding: 10px 12px;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 10px;
  }
  .type-switch button {
    font-size: 11px;
    padding: 5px 8px;
  }
  .header-inner {
    padding: 17px 20px;
    gap: 12px;
  }
  .brand {
    font-size: 21px;
  }
  .brand svg {
    width: 26px;
    height: 26px;
  }
  .header-nav {
    gap: 16px;
    font-size: 12px;
  }
  .header-nav a:last-child {
    display: none;
  }
  .reading-layout {
    display: block;
    margin: 32px auto 60px;
    padding: 0 20px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 17px;
    gap: 8px;
  }
  .article h1 {
    font-size: 34px;
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 20px;
  }
  .lead {
    font-size: 19px;
    line-height: 1.55;
    margin-bottom: 22px;
  }
  .byline {
    font-size: 11px;
    gap: 7px;
    padding-bottom: 23px;
  }
  .takeaways {
    padding: 19px 18px;
    margin: 26px 0 27px;
  }
  .takeaways ul {
    font-size: 17px;
    line-height: 1.65;
    padding-left: 17px;
  }
  .takeaways h2 {
    font-size: 11px;
  }
  .article-body {
    font-size: 19px;
    line-height: 1.7;
  }
  .article-body h2 {
    font-size: 27px;
    line-height: 1.25;
    margin-top: 44px;
    letter-spacing: -0.5px;
  }
  .article-body h3 {
    font-size: 22px;
  }
  .article-callout {
    padding: 17px 18px;
    font-size: 17px;
  }
  .article-table {
    font-size: 13px;
  }
  .article-table-wrap:before {
    content: "Таблицу можно прокрутить ↔";
    display: block;
    padding: 9px 12px;
    background: #faf8fc;
    font: 11px/1.5 var(--ui-font);
    color: #8c7a9c;
  }
  .prompt-block pre {
    font-size: 13px;
    line-height: 1.8;
    padding: 17px;
  }
  .article-footer {
    margin-top: 35px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.without-contents {
  display: block;
  max-width: 808px;
}
.without-contents .article {
  margin: auto;
}
.post-title {
  color: var(--ink);
}
.series-label {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
}
.article-series {
  font: 15px/1.7 var(--ui-font);
  padding: 22px 24px;
  margin: 36px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  scroll-margin-top: 100px;
}
.article-series p {
  font-weight: 700;
  margin: 0 0 12px;
}
.article-series ol {
  margin: 0;
  padding-left: 20px;
}
.article-series a[aria-current="page"] {
  font-weight: 700;
}
.reader-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.reader-actions button,
.comment-input button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--muted);
  font: 13px/1.4 var(--ui-font);
}
.reader-actions button[aria-pressed="true"] {
  border-color: #cbb4e8;
  background: var(--lilac);
  color: var(--purple);
}
.ico {
  display: inline-flex;
}
.ico svg {
  height: 18px;
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reader-status {
  min-height: 20px;
  color: var(--purple);
}
.comments h2 {
  font: 700 22px/1.4 var(--ui-font);
}
.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.comment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-input {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.comment-input textarea {
  min-height: 100px;
  max-width: 100%;
  width: 100%;
  font: 16px/1.5 var(--ui-font);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.comment-input button {
  justify-self: start;
  color: var(--purple);
}
