/*
 * MicroPowerCore — визуальный язык «Чертёж» (DES-01, направление B, 2026-10-21).
 * Белый лист, тонкие линии туши, широкий гротеск Archivo и моноширинный B612 Mono,
 * один акцент #C8361B для кнопок заказа и измеренных значений.
 * Шрифты лежат на нашем сервере (/fonts, лицензия OFL): без запросов к Google Fonts.
 */

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url('/fonts/archivo-latin-2f7ea45bad3ae17dff84f7bd507b5dbe.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url('/fonts/archivo-latin-ext-cde95d2797df1f8229ed26ddd75172d8.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'B612 Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/b612mono-400-4069c931934083720a3bca4a4b159145.woff2') format('woff2');
}

@font-face {
    font-family: 'B612 Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/b612mono-700-2187bfa6ea64e0e185cd08a9da5f2de0.woff2') format('woff2');
}

:root {
    --ink: #0B1F2A;
    --ink-2: #475966;
    --body: #1E3340;
    --text: #142A36;
    --rule: #B9C9D0;
    --rule-soft: #E1E8EB;
    --panel: #F2F6F7;
    --code-bg: #F6F9FA;
    --grid-fine: #E6EEF1;
    --grid-major: #CBDBE1;
    --mark: #C8361B;
    --mark-dark: #9E2A14;
    --mark-tint: #FBEFEC;
    --sheet: #FFFFFF;
    --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'B612 Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --wrap: 1280px;
    --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--sheet);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--ink);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--mark);
}

:focus-visible {
    outline: 2px solid var(--mark);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        transition: none !important;
    }
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 10;
    padding: 10px 14px;
    background: var(--ink);
    color: #FFFFFF;
}

.skip-link:focus {
    top: 8px;
}

/* ---------- Типографика ---------- */

.mono {
    font-family: var(--font-mono);
}

.mark {
    color: var(--mark);
}

.muted {
    color: var(--ink-2);
}

.eyebrow {
    margin: 0 0 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.eyebrow--mark {
    color: var(--mark);
}

.label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.wide {
    font-stretch: 118%;
    font-variation-settings: 'wdth' 118;
}

.h-display {
    margin: 0;
    font-weight: 700;
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -0.015em;
    font-stretch: 125%;
    font-variation-settings: 'wdth' 125;
}

.h-section {
    margin: 0;
    font-weight: 700;
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    font-stretch: 118%;
    font-variation-settings: 'wdth' 118;
}

.lead {
    margin: 16px 0 0;
    max-width: 34em;
    font-size: 18px;
    line-height: 1.5;
    color: var(--body);
}

.footnote {
    margin: 16px 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid var(--ink);
    background: var(--sheet);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--ink);
    color: #FFFFFF;
}

.btn--mark {
    border-color: var(--mark);
    background: var(--mark);
    color: #FFFFFF;
}

.btn--mark:hover {
    border-color: var(--mark-dark);
    background: var(--mark-dark);
    color: #FFFFFF;
}

.btn--lg {
    min-height: 52px;
    font-size: 17px;
}

.btn--block {
    display: flex;
    width: 100%;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* ---------- Шапка ---------- */

.site-header {
    background: var(--sheet);
    border-bottom: 2px solid var(--ink);
}

.site-header__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 32px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand {
    padding: 10px 0;
    font-weight: 700;
    font-size: 21px;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
    font-stretch: 125%;
    font-variation-settings: 'wdth' 125;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 28px;
    font-size: 15px;
    font-weight: 500;
}

.site-nav a {
    padding: 12px 0;
    text-decoration: none;
}

.site-nav a[aria-current] {
    border-bottom: 2px solid var(--ink);
}

.site-nav .btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 15px;
}

.site-strip {
    border-top: 1px solid var(--rule);
}

.site-strip .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.crumbs {
    padding-top: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.crumbs a {
    display: inline-block;
    padding: 8px 0;
    color: var(--ink-2);
}

.crumbs span[aria-hidden] {
    padding: 0 8px;
}

/* ---------- Лист и штамп ---------- */

.sheet {
    border: 1px solid var(--ink);
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 1px;
    background: var(--ink);
}

.sheet-grid > * {
    min-width: 0;
    background: var(--sheet);
}

/* Штамп — flex, а не grid: последний ряд растягивается на всю ширину, и сквозь
   незаполненные клетки не проступает фон-«тушь». Сетку с явными колонками
   включает модификатор .cells--grid. */
.cells {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: var(--ink);
}

.cells > .cell {
    flex: 1 1 210px;
}

.cells--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cells--top {
    border-top: 1px solid var(--ink);
}

.cells--soft {
    background: var(--rule);
    border: 1px solid var(--rule);
}

.cell {
    min-width: 0;
    padding: 12px 16px;
    background: var(--sheet);
    text-decoration: none;
}

.cells--soft .cell {
    padding: 10px 12px;
}

.cell__value {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 600;
}

.cell__value--mark {
    font-weight: 700;
    color: var(--mark);
}

.cell--link .cell__value {
    text-decoration: underline;
}

.cells > .cell--wide {
    flex-basis: 100%;
    grid-column: 1 / -1;
}

/* ---------- Первый экран ---------- */

.page-top {
    padding-top: 40px;
}

.hero__text {
    padding: clamp(28px, 4vw, 56px) clamp(20px, 3.5vw, 48px);
}

.hero__title {
    margin: 0;
}

.hero__name {
    display: block;
    font-weight: 800;
    font-size: clamp(28px, 4.2vw, 58px);
    line-height: 1;
    letter-spacing: -0.02em;
    font-stretch: 112%;
    font-variation-settings: 'wdth' 112;
}

.hero__desc {
    display: block;
    margin-top: 14px;
    font-weight: 600;
    font-size: clamp(22px, 2.3vw, 32px);
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: var(--body);
}

.tagline {
    margin: 22px 0 0;
    padding-left: 12px;
    border-left: 3px solid var(--mark);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.drawing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: 32px 24px;
    background-color: var(--sheet);
    background-image:
        linear-gradient(var(--grid-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
        linear-gradient(var(--grid-fine) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

.drawing svg {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
}

.drawing text {
    font-family: var(--font-mono);
}

/* ---------- Секции ---------- */

.section {
    padding-top: 96px;
}

.section:last-child {
    padding-bottom: 96px;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 12px 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--ink);
}

.split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px 56px;
}

.split__aside {
    flex: 1 1 300px;
    min-width: 0;
}

.split__main {
    flex: 2 1 560px;
    min-width: 0;
}

.table-scroll {
    overflow-x: auto;
}

/* ---------- Таблицы данных: BOM, соединения, сравнение ---------- */

.data {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.45;
}

.data th,
.data td {
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
}

.data th:first-child,
.data td:first-child {
    padding-left: 0;
}

.data th:last-child,
.data td:last-child {
    padding-right: 0;
}

.data caption {
    padding-bottom: 8px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.data thead th {
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.data tbody th {
    font-weight: 600;
}

.data .num {
    text-align: right;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.data .code {
    font-family: var(--font-mono);
    font-weight: 700;
}

.data .muted {
    color: var(--ink-2);
}

.data tr.rule-strong > * {
    border-bottom-color: var(--ink);
}

.data tr.total > * {
    border-bottom: 3px double var(--ink);
    font-weight: 700;
}

.data tr.total .num {
    font-size: 20px;
    color: var(--mark);
}

.data tr.highlight {
    background: var(--mark-tint);
}

.data tr.highlight > :first-child {
    padding-left: 10px;
    border-left: 3px solid var(--mark);
}

.data tr:last-child > * {
    border-bottom-color: var(--ink);
}

/* ---------- Каталог ---------- */

.product {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    margin-top: 32px;
    background: var(--ink);
    border: 1px solid var(--ink);
}

.product > * {
    min-width: 0;
    background: var(--sheet);
}

.product__media {
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.product__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.product__media--contain {
    padding: 24px;
}

.product__media--contain img {
    width: auto;
    height: auto;
    min-height: 0;
    max-height: 280px;
    object-fit: contain;
}

.product__body {
    flex: 2 1 420px;
    padding: 28px clamp(20px, 3vw, 32px);
}

.product__name {
    margin: 10px 0 0;
    font-weight: 700;
    font-size: clamp(26px, 2vw + 16px, 34px);
    line-height: 1.05;
    font-stretch: 118%;
    font-variation-settings: 'wdth' 118;
}

.product__name a {
    text-decoration: none;
}

.product__text {
    margin: 10px 0 0;
    max-width: 34em;
    font-size: 17px;
    line-height: 1.5;
    color: var(--body);
}

.product .cells {
    margin-top: 20px;
}

.product .cells > .cell {
    flex-basis: 160px;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
}

.links a {
    padding: 10px 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1px;
    margin-top: 1px;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-top: 0;
}

.gallery figure {
    margin: 0;
    background: var(--sheet);
}

.gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery figcaption {
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--ink-2);
}

/* ---------- Панель заказа ---------- */

.order {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
}

.product > .order {
    background: var(--panel);
}

.order fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order legend {
    padding: 0 0 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.order-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 12px;
    border: 1px solid var(--rule);
    background: var(--sheet);
    cursor: pointer;
}

.order-option:has(input:checked) {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.order-option input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--mark);
}

.order-option__text {
    flex: 1 1 auto;
    min-width: 0;
}

.order-option__name {
    display: block;
    font-weight: 700;
    font-size: 15px;
}

.order-option__note {
    display: block;
    font-size: 13px;
    color: var(--ink-2);
}

/* Цены — Archivo с табличными цифрами: в B612 Mono точка занимает целую клетку и рвёт «16.00» */
.order-option__price {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-cta {
    margin-top: 6px;
}

/* С поддержкой :has видна только кнопка выбранного канала; без неё — все кнопки сразу. */
@supports selector(:has(*)) {
    .order .order-cta {
        display: none;
    }
    .order:has(input[value="direct"]:checked) .order-cta[data-channel="direct"],
    .order:has(input[value="lectronz"]:checked) .order-cta[data-channel="lectronz"],
    .order:has(input[value="tindie"]:checked) .order-cta[data-channel="tindie"] {
        display: flex;
    }
    .order:has(input[value="direct"]:checked) .order-cta[data-channel="direct"] {
        display: block;
    }
}

.order-note {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-2);
}

/* Форма прямого заказа (fragments/buy.html) внутри панели */
.buy-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buy-price {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-2);
}

.buy-price strong {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.buy-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buy-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.buy-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
    /* flex-элемент не должен расти до самого длинного названия страны в селекте */
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.buy-field-country {
    flex: 1 1 160px;
    max-width: 100%;
}

.buy-field-country select {
    width: 100%;
}

.buy-field select {
    min-height: 44px;
    min-width: 72px;
    max-width: 100%;
    padding: 0 10px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--sheet);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0;
}

.buy-summary {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 13px;
}

.buy-note,
.buy-test-mode {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ink-2);
}

.buy-test-mode {
    color: var(--mark);
}

.buy-button {
    width: 100%;
}

/* ---------- Список статей ---------- */

.guide-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 32px;
    padding: 24px 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
}

.guide-row:last-child {
    border-bottom: 2px solid var(--ink);
}

.guide-row__main {
    flex: 1 1 460px;
    min-width: 0;
}

.guide-row__title {
    display: block;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    font-stretch: 112%;
    font-variation-settings: 'wdth' 112;
}

.guide-row:hover .guide-row__title {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.guide-row__summary {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-2);
}

.guide-row__topic {
    flex: 0 0 160px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.guide-row__figure {
    flex: 0 0 120px;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--mark);
}

.guide-row__meta {
    flex: 0 0 90px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
}

.guide-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 32px;
    margin-top: 28px;
    padding: 10px 0;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

/* ---------- Вопросы и ответы ---------- */

.qa {
    margin: 0;
}

.qa__item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0 8px;
    padding: 20px 0;
    border-top: 1px solid var(--rule);
}

.qa__item:first-child {
    border-top: 2px solid var(--ink);
}

.qa__item:last-child {
    border-bottom: 2px solid var(--ink);
}

.qa__item dt {
    display: contents;
}

.qa__mark {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--mark);
}

.qa__q {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.35;
}

.qa__item dd {
    grid-column: 2;
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
}

/* ---------- Карточки-ссылки и заметки ---------- */

.callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed var(--ink);
    text-decoration: none;
}

.callout__label {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mark);
}

.callout__text {
    flex: 1 1 320px;
    font-size: 15px;
}

.callout__go {
    font-weight: 600;
}

.panel-link {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 24px;
    margin-top: 40px;
    padding: 18px 20px;
    border: 1px solid var(--ink);
    text-decoration: none;
}

.panel-link__title {
    display: block;
    margin-top: 6px;
    font-weight: 700;
    font-size: 22px;
    font-stretch: 112%;
    font-variation-settings: 'wdth' 112;
}

.result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-top: 24px;
    padding: 16px 0;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.result__value {
    font-family: var(--font-mono);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--mark);
}

.result__text {
    font-size: 15px;
    color: var(--ink-2);
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
    margin-top: 32px;
    padding: 6px 0;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
    font-weight: 500;
}

.section-nav a {
    padding: 10px 0;
    text-decoration: none;
}

.section-nav .num {
    font-family: var(--font-mono);
    color: var(--mark);
}

/* Галерея страницы платы */
.viewer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.viewer__main {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 16px;
    background-color: var(--sheet);
    background-image:
        linear-gradient(var(--grid-fine) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px);
    background-size: 8px 8px;
}

.viewer__main img {
    max-height: 100%;
    object-fit: contain;
}

.viewer__thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.viewer__thumbs a {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 8px;
    background: var(--sheet);
}

.viewer__thumbs img {
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 3.5vw, 44px);
}

.product-info h1 {
    margin: 14px 0 0;
    font-weight: 700;
    font-size: clamp(32px, 3.6vw, 50px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    font-stretch: 115%;
    font-variation-settings: 'wdth' 115;
}

.product-info .order {
    flex: 0 0 auto;
    margin-top: 22px;
    padding: 0;
}

/* Шапка статьи */
.doc-head h1 {
    margin: 0;
    font-weight: 700;
    font-size: clamp(36px, 4.4vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.015em;
    font-stretch: 115%;
    font-variation-settings: 'wdth' 115;
}

.doc-head .hero__text {
    padding: clamp(24px, 4vw, 48px);
}

.doc-head .cells {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 100%;
    align-content: stretch;
}

.result-big {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    color: var(--mark);
}

/* ---------- Длинный текст: статьи, страницы плат, служебные страницы ---------- */

.doc {
    max-width: 820px;
    padding-top: 56px;
    padding-bottom: 96px;
    font-size: 18px;
    line-height: 1.65;
    color: var(--text);
    overflow-wrap: break-word;
}

/* Вызовы функций и ссылки без пробелов не должны вылезать из колонки на телефоне */
.doc code,
.doc a {
    overflow-wrap: anywhere;
}

.doc > section {
    padding-top: 8px;
}

.doc h2 {
    margin: 64px 0 0;
    padding-top: 14px;
    border-top: 2px solid var(--ink);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.12;
    color: var(--ink);
    font-stretch: 112%;
    font-variation-settings: 'wdth' 112;
}

.doc > section:first-child h2,
.doc > h2:first-child {
    margin-top: 0;
}

.doc h3 {
    margin: 40px 0 0;
    font-weight: 700;
    font-size: 23px;
    line-height: 1.2;
    color: var(--ink);
    font-stretch: 108%;
    font-variation-settings: 'wdth' 108;
}

.doc p,
.doc ul,
.doc ol {
    margin: 16px 0 0;
}

.doc ul,
.doc ol {
    padding-left: 22px;
}

.doc li + li {
    margin-top: 6px;
}

.doc img {
    display: block;
    margin: 24px auto 0;
    border: 1px solid var(--rule);
}

.doc table {
    width: 100%;
    margin-top: 22px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.45;
}

.doc caption {
    padding-bottom: 8px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.doc th,
.doc td {
    padding: 12px 12px 12px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
}

.doc thead th {
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.doc tbody tr:last-child > * {
    border-bottom: 2px solid var(--ink);
}

.doc .table-scroll {
    margin-top: 22px;
}

.doc .table-scroll table {
    margin-top: 0;
    min-width: 640px;
}

.doc code {
    padding: 1px 5px;
    background: #EEF3F5;
    font-family: var(--font-mono);
    font-size: 0.86em;
}

.code-block {
    position: relative;
    margin-top: 22px;
    border: 1px solid var(--ink);
    background: var(--code-bg);
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--ink);
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    white-space: pre;
    font: inherit;
}

.code-block code {
    padding: 0;
    background: none;
    font-size: inherit;
}

.code-block button {
    position: absolute;
    top: 6px;
    right: 6px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--ink);
    background: var(--sheet);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.code-block .comment {
    color: #6B7E89;
}

.code-block .keyword {
    color: var(--ink);
    font-weight: 700;
}

.code-block .string {
    color: var(--mark-dark);
}

.info-box {
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid var(--ink);
    background: var(--panel);
}

.info-box.warning {
    border: 2px solid var(--mark);
    background: var(--sheet);
}

.info-box-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.info-box p:first-of-type {
    margin-top: 8px;
}

.spec-table th {
    width: 32%;
    font-weight: 600;
}

/* FAQ в длинном тексте: вопрос — h3, ответ — абзац */
.faq h3 {
    position: relative;
    padding-left: 44px;
    font-size: 19px;
    font-stretch: 100%;
    font-variation-settings: 'wdth' 100;
}

.faq h3::before {
    content: 'Q';
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
    color: var(--mark);
}

.faq h3 + p {
    padding-left: 44px;
    font-size: 16.5px;
}

/* Служебные страницы и ошибки: старая обёртка main.article */
main.article {
    display: block;
    max-width: 820px;
    margin: 0 auto;
    padding: 48px var(--gutter) 96px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
}

main.article h1 {
    margin: 0 0 24px;
    font-weight: 700;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--ink);
    font-stretch: 118%;
    font-variation-settings: 'wdth' 118;
}

main.article h2,
main.article h3 {
    margin: 32px 0 0;
    color: var(--ink);
    font-stretch: 108%;
    font-variation-settings: 'wdth' 108;
}

main.article br + h3 {
    margin-top: 16px;
}

main.article p {
    margin: 14px 0 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid var(--mark);
    background: var(--mark);
    color: #FFFFFF;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.nav-btn:hover {
    background: var(--mark-dark);
    color: #FFFFFF;
}

/* ---------- Подвал ---------- */

.site-footer {
    border-top: 2px solid var(--ink);
    background: var(--sheet);
}

/* Первая ячейка — название и почта, ей нужно не меньше 260 px; ячейкам со ссылками
   хватает 150 px, поэтому от ~900 px штамп встаёт в одну строку. */
.site-footer .cells > .cell {
    flex-basis: 150px;
}

.site-footer .cells > .site-footer__about {
    flex: 2 1 260px;
}

.site-footer .cells {
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.site-footer .cell {
    padding: 18px 16px;
}

/* Название в узкой ячейке штампа: кегль и ширина подобраны так, чтобы слово
   помещалось в минимальную ячейку 230 px; длиннее не бывает — это одно слово. */
.site-footer__brand {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    font-stretch: 112%;
    font-variation-settings: 'wdth' 112;
}

.site-footer p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
}

.site-footer nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
}

.site-footer nav a {
    padding: 4px 0;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 16px 0 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
}

/* ---------- Онлайн-функция отзыва договора ---------- */

.w-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
    max-width: 640px;
}

.w-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 18px;
}

.w-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.w-field label {
    font-weight: 600;
    font-size: 15px;
}

.w-opt {
    font-weight: 400;
    color: var(--ink-2);
}

.w-field input,
.w-field textarea {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--sheet);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

.w-field textarea {
    resize: vertical;
}

.w-hint {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
}

.w-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-alert {
    margin-top: 24px;
    padding: 14px 16px;
    border: 2px solid var(--mark);
    font-size: 15px;
}

.form-alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.w-statement {
    margin-top: 24px;
    padding: 20px 22px;
    border: 1px solid var(--ink);
    background: var(--panel);
    font-size: 16px;
}

.w-statement p {
    margin: 0 0 12px;
}

.w-dl {
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    gap: 6px 16px;
    margin: 0;
}

.w-dl dt {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
    padding-top: 3px;
}

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

.w-actions {
    display: inline-block;
    margin: 20px 12px 0 0;
}

.w-receipt {
    margin: 16px 0 0;
    padding: 16px;
    border: 1px solid var(--ink);
    background: var(--code-bg);
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.site-footer__withdraw {
    font-weight: 600;
}
