.article-head { margin-bottom: 38px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 21px; color: var(--ink-faint); font-size: 11px; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumb-separator { color: #c2bec9; }

.article-head h1 { margin: 0; color: var(--ink); font-size: clamp(2.35rem, 4vw, 3.45rem); font-weight: 760; letter-spacing: -0.052em; line-height: 1.06; }
.article-head .lead { max-width: 690px; margin: 17px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 16px; margin-top: 18px; color: var(--ink-faint); font-size: 11px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }

.markdown-body { color: #312e3b; font-size: 15px; line-height: 1.78; }
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; color: var(--ink); font-weight: 720; letter-spacing: -0.025em; scroll-margin-top: calc(var(--topbar-height) + 28px); }
.markdown-body h1 { margin: 58px 0 19px; font-size: 31px; line-height: 1.22; }
.markdown-body h2 { margin: 54px 0 17px; padding-top: 3px; font-size: 27px; line-height: 1.28; }
.markdown-body h3 { margin: 34px 0 12px; font-size: 20px; line-height: 1.35; }
.markdown-body h4 { margin: 27px 0 9px; font-size: 16px; }
.markdown-body h5, .markdown-body h6 { margin: 23px 0 8px; font-size: 14px; }
.markdown-body .heading-anchor { margin-left: 7px; color: #b7b1c4; font-weight: 500; opacity: 0; text-decoration: none; transition: opacity 130ms ease; }
.markdown-body :is(h1, h2, h3, h4, h5, h6):hover .heading-anchor, .markdown-body .heading-anchor:focus { opacity: 1; }
.markdown-body p { margin: 0 0 18px; }
.markdown-body strong { color: #262331; font-weight: 710; }
.markdown-body a { color: var(--accent-dark); font-weight: 600; text-decoration-color: #c3b9e8; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.markdown-body a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.markdown-body img { max-width: 100%; height: auto; display: block; margin: 24px auto; border-radius: 10px; }
.markdown-body ul, .markdown-body ol { margin: 12px 0 22px; padding-left: 23px; }
.markdown-body li { margin: 7px 0; padding-left: 4px; }
.markdown-body li::marker { color: var(--accent); font-weight: 700; }
.markdown-body hr { height: 1px; margin: 42px 0; border: 0; background: var(--line); }

.markdown-body blockquote { margin: 25px 0; padding: 16px 18px; border: 1px solid #ded8f4; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-softer); color: #494357; }
.markdown-body blockquote > *:last-child { margin-bottom: 0; }
.markdown-body blockquote strong:first-child { color: var(--accent-dark); }

.markdown-body code { padding: 2px 5px; border: 1px solid #e4e1e9; border-radius: 5px; background: #f5f3f7; color: #a33c5d; font: 0.88em/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.code-block { position: relative; margin: 23px 0; }
.code-block__bar { min-height: 37px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 14px; border: 1px solid #353140; border-bottom: 0; border-radius: 10px 10px 0 0; background: #2d2936; color: #b8b1c6; }
.code-block__bar span { font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.code-copy { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 0; border-radius: 5px; background: transparent; color: #c8c1d4; font-size: 10px; cursor: pointer; }
.code-copy:hover { background: #413b4d; color: #fff; }
.markdown-body pre { margin: 0; padding: 18px; border: 1px solid #353140; border-radius: 0 0 10px 10px; background: #201d28; color: #eeeaf5; overflow-x: auto; }
.markdown-body pre code { padding: 0; border: 0; background: transparent; color: inherit; font-size: 12px; line-height: 1.7; }

.table-wrap { margin: 23px 0; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.markdown-body th, .markdown-body td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.markdown-body tr:last-child td { border-bottom: 0; }
.markdown-body th { background: var(--paper-soft); color: var(--ink-soft); font-size: 11px; font-weight: 740; letter-spacing: 0.035em; text-transform: uppercase; }
.markdown-body td:first-child { color: var(--ink); font-weight: 600; }

.doc-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 27px 0 34px; }
.doc-card { position: relative; min-height: 154px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); text-decoration: none !important; box-shadow: 0 1px 0 rgba(31, 26, 48, 0.02); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.doc-card:hover { transform: translateY(-3px); border-color: #cdc6e0; box-shadow: var(--shadow-sm); }
.doc-card strong { margin-bottom: 3px; color: var(--ink); font-size: 14px; }
.doc-card span { color: var(--ink-faint); font-size: 12px; font-weight: 450; line-height: 1.5; }
.doc-card__arrow { position: absolute; top: 19px; right: 17px; color: #aaa4b6; }

.callout { display: block; margin: 24px 0; padding: 15px 17px; border: 1px solid #d8d1f0; border-radius: 10px; background: var(--accent-softer); }
.callout--warning { border-color: #f0d9ad; background: #fffaf0; }
.callout--success { border-color: #cbe8e2; background: #f1fbf9; }
.callout__body { min-width: 0; }
.callout__title { display: block; margin-bottom: 2px; color: var(--ink); font-size: 12px; font-weight: 730; }
.callout__body > * { color: var(--ink-soft); font-size: 12.5px; line-height: 1.6; }
.callout__body > :last-child { margin-bottom: 0; }
.callout__body > :first-child:not(.callout__title) { margin-top: 0; }

.spoiler { margin: 24px 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); overflow: hidden; }
.spoiler summary { position: relative; padding: 14px 44px 14px 16px; color: var(--ink); font-size: 13px; font-weight: 700; list-style: none; cursor: pointer; user-select: none; }
.spoiler summary::-webkit-details-marker { display: none; }
.spoiler summary::after { position: absolute; top: 50%; right: 18px; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-faint); border-bottom: 1.5px solid var(--ink-faint); content: ""; transform: translateY(-65%) rotate(45deg); transition: transform 150ms ease; }
.spoiler[open] summary::after { transform: translateY(-35%) rotate(225deg); }
.spoiler summary:hover { background: var(--paper-soft); }
.spoiler__content { padding: 17px 17px 1px; border-top: 1px solid var(--line); }
.spoiler__content > :first-child { margin-top: 0; }
.spoiler__content > :last-child { margin-bottom: 16px; }
.spoiler__content > .code-block:first-child { margin-top: 0; }

.steps { margin: 26px 0; counter-reset: steps; }
.step { position: relative; min-height: 66px; margin-left: 17px; padding: 0 0 29px 35px; border-left: 1px solid var(--line-strong); counter-increment: steps; }
.step:last-child { padding-bottom: 0; border-color: transparent; }
.step::before { position: absolute; top: -2px; left: -17px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #d6cfed; border-radius: 50%; background: var(--paper); color: var(--accent-dark); font-size: 11px; font-weight: 750; content: counter(steps); }
.step strong { display: block; margin-bottom: 3px; font-size: 13.5px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 13px; }

.article-error { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; }
.article-error__code { margin-bottom: 10px; color: var(--accent); font-size: 12px; font-weight: 760; letter-spacing: 0.12em; text-transform: uppercase; }
.article-error h1 { margin: 0 0 10px; font-size: 38px; letter-spacing: -0.04em; }
.article-error p { max-width: 430px; margin: 0 0 20px; color: var(--ink-soft); }
.article-error__retry { padding: 9px 14px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 650; cursor: pointer; }
.article-error__retry:hover { background: var(--accent-dark); }