/* ============================================================
   source-povod — визуальный язык лендинга povod.io для блога
   #F9F9F8 · чёрно-белая · Suisse Int'l / IBM Plex Mono
   12-колоночная сетка с липкой рейкой (2 колонки), волосяные линии 0.5px
   ============================================================ */
:root {
    --bg: #F9F9F8;
    --bg-cell: #EFEFED;
    --fg: #121212;
    --fg-soft: #444444;
    --muted: #8E8E8E;
    --grid-line: rgba(0, 0, 0, 0.08);
    --cell-line: rgba(0, 0, 0, 0.14);
    --hair: 0.5px solid var(--fg);
    --cell: 0.5px solid var(--cell-line);
    --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "Courier New", monospace;
    --sans: "Suisse Intl", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --pad: 20px;
    --rail-w: 2;
}

html { background: var(--bg); scroll-behavior: smooth; }

body.pv-theme {
    margin: 0;
    padding: var(--pad);
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.pv-theme *, .pv-theme *::before, .pv-theme *::after { box-sizing: border-box; }
.pv-theme a { color: inherit; }
.pv-theme button { color: inherit; font: inherit; }
.pv-theme img { display: block; max-width: 100%; }
.pv-theme ::selection { background: var(--fg); color: var(--bg); }
.pv-theme a:focus-visible, .pv-theme button:focus-visible { outline: 1.5px solid var(--fg); outline-offset: 3px; }

/* ---------- примитивы ---------- */
.g10 { display: grid; grid-template-columns: repeat(10, 1fr); }
.label-mono {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.label-mono.dark { color: var(--fg); }
.label-mono a { text-decoration: none; }
.label-mono a:hover { text-decoration: underline; text-underline-offset: 3px; }
.label-mono .sep { margin: 0 6px; }
.micro { font-size: 11px; line-height: 1.5; color: var(--muted); max-width: 24em; }

.pv-btn-solid {
    display: inline-block;
    background: var(--fg);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 14px 26px;
    border: var(--hair);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.pv-btn-solid:hover { background: var(--bg); color: var(--fg); }

.pv-btn-minimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fg);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border: 0;
    border-bottom: 1px solid var(--fg);
    padding: 0 0 3px;
    background: none;
    cursor: pointer;
    transition: gap 0.25s ease;
}
.pv-btn-minimal:hover { gap: 14px; }

.pv-visually-hidden {
    position: absolute; overflow: hidden; width: 1px; height: 1px;
    padding: 0; border: 0; margin: -1px; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.pv-status-sq { width: 9px; height: 9px; background: var(--fg); display: inline-block; margin-right: 8px; }

/* ---------- каркас: рейка = 2 колонки сетки ---------- */
.pv-page {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: stretch;
    min-height: calc(100vh - 2 * var(--pad));
}
.pv-rail { grid-column: 1 / span 2; border-right: var(--hair); }
.pv-content { grid-column: 3 / span 10; min-width: 0; display: flex; flex-direction: column; }

.pv-rail__inner {
    position: sticky;
    top: var(--pad);
    height: calc(100vh - 2 * var(--pad));
    display: flex;
    flex-direction: column;
    padding: 6px 18px 0 0;
}
.pv-rail__logo { display: block; width: 86%; max-width: 150px; color: var(--fg); }
.pv-rail__logo img { width: 100%; height: auto; }
.pv-rail__tag { margin-top: 10px; font-size: 9.5px; }

.pv-rail__nav { margin: 44px 0 auto; }
.pv-rail__nav .nav, .pv-menu__links .nav, .pv-menu__extras, .pv-footer__links .nav {
    list-style: none; margin: 0; padding: 0;
}
.pv-rail__nav .nav { display: flex; flex-direction: column; gap: 1px; counter-reset: navi; }
.pv-rail__nav .nav li { counter-increment: navi; }
.pv-rail__nav .nav a {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.15s;
}
.pv-rail__nav .nav a::before {
    content: counter(navi, decimal-leading-zero);
    width: 20px;
    flex: 0 0 20px;
}
.pv-rail__nav .nav a:hover, .pv-rail__nav .nav li.nav-current a { color: var(--fg); }
.pv-rail__nav .nav li.nav-current a::before { text-decoration: underline; text-underline-offset: 3px; }

.pv-rail__search {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
    margin-bottom: 18px;
    border: 0;
    border-top: var(--cell);
    border-bottom: var(--cell);
    background: none;
    cursor: pointer;
    text-align: left;
}
.pv-rail__search .label-mono { color: var(--fg); }
.pv-rail__search i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); }

.pv-rail__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 4px;
    font-size: 9.5px;
    letter-spacing: 0.08em;
}
.pv-rail__meta .st { color: var(--fg); margin-top: 10px; }

/* верхняя полоса и плавающая шапка (видимы без рейки) */
.pv-topbar { display: none; }
.pv-scroll-header {
    position: fixed;
    z-index: 900;
    top: 0; right: 0; left: 0;
    display: none;
    align-items: center;
    gap: 16px;
    padding: 12px var(--pad);
    background: rgba(249, 249, 248, 0.97);
    border-bottom: var(--hair);
    transform: translateY(-110%);
    transition: transform 0.22s ease;
}
.pv-scroll-header.is-visible { transform: translateY(0); }
.pv-scroll-header__logo { width: 72px; flex: 0 0 auto; }
.pv-scroll-header__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.pv-scroll-header .pv-topbar__btn { display: none; }

.pv-progress {
    position: fixed;
    z-index: 1100;
    top: 0; right: 0; left: 0;
    height: 2px;
    pointer-events: none;
    visibility: hidden;
}
.pv-progress.is-active { visibility: visible; }
.pv-progress i { display: block; height: 100%; width: calc(var(--pv-reading-progress, 0) * 100%); background: var(--fg); }

/* ---------- служебная строка ---------- */
.pv-util {
    padding: 14px 0 14px var(--pad);
    border-bottom: var(--hair);
    align-items: baseline;
}
.pv-util .l { grid-column: 1 / span 6; }
.pv-util .r { grid-column: 7 / span 4; text-align: right; }
.pv-util .r a {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}
.pv-util .r a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pv-util .l a { text-decoration: none; color: var(--fg); }

/* ---------- главная: шапка ---------- */
.pv-masthead { padding: 56px 0 40px var(--pad); align-items: end; gap: 24px 0; }
.pv-masthead__title { grid-column: 1 / span 6; margin: 0; }
.pv-masthead__title img { width: 100%; max-width: 640px; height: auto; }
.pv-masthead__meta {
    grid-column: 8 / span 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 6px;
}

/* ---------- лента: ячейки с волосяными линиями ---------- */
.pv-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: dense;
    border-top: var(--hair);
    border-bottom: var(--hair);
    overflow: hidden;
}
.pv-feed--archive { margin-top: 0; }
.pv-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    margin-top: -0.5px;
    margin-left: -0.5px;
    padding: 24px var(--pad) 28px;
    border-top: var(--cell);
    border-left: var(--cell);
}
.pv-card__text { display: flex; flex: 1; flex-direction: column; gap: 14px; min-width: 0; }
.pv-card__meta { display: flex; justify-content: space-between; gap: 12px; }
.pv-card__fig {
    display: block;
    overflow: hidden;
    background: var(--bg-cell);
    aspect-ratio: 16 / 10;
    border: var(--cell);
}
.pv-card__fig img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pv-card__fig:hover img { transform: scale(1.02); }
.pv-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.22;
}
.pv-card__title a, .pv-related h3 a {
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
    transition: background-size 0.28s ease;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.pv-card__title a:hover, .pv-related h3 a:hover { background-size: 100% 1px; }
.pv-card__excerpt { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-soft); }
.pv-card__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; }
.pv-card .is-side { display: none; }

.pv-card.is-wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
}
.pv-card.is-wide .is-inline { display: none; }
.pv-card.is-wide .is-side { display: block; aspect-ratio: auto; min-height: 260px; }
.pv-card.is-wide .pv-card__title { font-size: 28px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; }
.pv-card.is-wide .pv-card__excerpt { font-size: 15px; }

.pv-more { display: flex; justify-content: flex-start; padding: 40px 0 0 var(--pad); }

/* ---------- заголовки разделов, архивы ---------- */
.pv-sec-head { border-top: var(--hair); padding: 18px 0 0 var(--pad); margin: 90px 0 40px; align-items: start; }
.pv-sec-head .lbl { grid-column: 1 / span 4; }
.pv-sec-head .txt { grid-column: 6 / span 5; font-size: 14.5px; line-height: 1.6; }

.pv-page-head { padding: 48px 0 36px var(--pad); align-items: end; }
.pv-page-head h1 {
    grid-column: 1 / span 6;
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-wrap: balance;
}
.pv-page-head p { grid-column: 7 / span 4; margin: 0; padding-left: 24px; font-size: 14.5px; line-height: 1.6; color: var(--fg-soft); }

.pv-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    margin-top: 0;
    padding: 18px 0 18px var(--pad);
    border-bottom: var(--hair);
}
.pv-pagination__side.is-next { text-align: right; padding-right: var(--pad); }
.pv-pagination a { color: var(--fg); text-decoration: none; }
.pv-pagination a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- материал ---------- */
.pv-article { padding-bottom: 20px; }
.pv-article-head { padding: 56px 0 0 var(--pad); align-items: start; gap: 22px 0; }
.pv-article-head h1 {
    grid-column: 1 / span 8;
    margin: 0;
    max-width: 22ch;
    font-size: clamp(30px, 4.4vw, 52px);
    font-weight: 500;
    letter-spacing: -0.022em;
    line-height: 1.04;
    text-wrap: balance;
}
.pv-article-lede {
    grid-column: 4 / span 6;
    margin: 6px 0 0;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.005em;
    color: var(--fg);
}
.pv-article-meta { grid-column: 4 / span 6; }

.pv-fig { margin: 0; }
.pv-fig--hero { padding: 40px 0 0 var(--pad); }
.pv-fig--hero .pv-fig__frame { grid-column: 1 / span 10; }
.pv-fig__frame { background: var(--bg-cell); border: var(--cell); overflow: hidden; }
.pv-fig__frame img { width: 100%; height: auto; max-height: min(64vh, 720px); object-fit: cover; }
.pv-fig__cap, .pv-prose figcaption {
    grid-column: 4 / span 6;
    padding: 10px 0 0;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.7;
    color: var(--muted);
    text-align: left;
}
.pv-fig__n { color: var(--fg); }

.pv-article-body { padding: 44px 0 0 var(--pad); }
.pv-prose { grid-column: 4 / span 6; max-width: 68ch; min-width: 0; }

.pv-prose > :first-child { margin-top: 0; }
.pv-prose p, .pv-prose li { font-size: 17.5px; line-height: 1.62; }
.pv-prose p { margin: 0 0 24px; }
.pv-prose h1, .pv-prose h2, .pv-prose h3, .pv-prose h4 { font-family: var(--sans); color: var(--fg); text-wrap: balance; }
.pv-prose h1, .pv-prose h2 { margin: 48px 0 16px; font-size: 26px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.pv-prose h3 { margin: 36px 0 12px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.pv-prose h4 { margin: 28px 0 10px; font-size: 16px; font-weight: 600; }
.pv-prose ul, .pv-prose ol { margin: 0 0 24px; padding-left: 24px; }
.pv-prose li { margin-bottom: 8px; padding-left: 4px; }
.pv-prose li::marker { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.pv-prose a { text-decoration: underline; text-decoration-thickness: 0.5px; text-underline-offset: 3px; }
.pv-prose a:hover { text-decoration-thickness: 1.5px; }
.pv-prose strong, .pv-prose b { font-weight: 600; }
.pv-prose blockquote {
    margin: 34px 0;
    padding: 4px 0 4px 24px;
    border: 0;
    border-left: var(--hair);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.005em;
    color: var(--fg);
}
.pv-prose blockquote p { font-size: inherit; line-height: inherit; margin: 0 0 12px; }
.pv-prose blockquote p:last-child { margin-bottom: 0; }
.pv-prose blockquote.kg-blockquote-alt { border: 0; padding: 0; font-size: 24px; text-align: left; }
.pv-prose hr { margin: 44px 0; border: 0; border-top: var(--hair); }
.pv-prose code { font-family: var(--mono); font-size: 0.86em; padding: 1px 5px; background: var(--bg-cell); }
.pv-prose pre { margin: 0 0 24px; padding: 18px 20px; background: var(--bg-cell); border: var(--cell); overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.pv-prose pre code { padding: 0; background: none; }
.pv-prose figure, .pv-prose .kg-card { margin: 34px 0; }
.pv-prose figure img, .pv-prose .kg-image-card img { width: 100%; height: auto; background: var(--bg-cell); }
.pv-prose figcaption { padding-top: 10px; }
.pv-prose figcaption a { text-decoration: none; }
.pv-prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14.5px; }
.pv-prose th, .pv-prose td { padding: 9px 12px 9px 0; border-bottom: var(--cell); vertical-align: top; text-align: left; }
.pv-prose th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.pv-prose .kg-callout-card { background: var(--bg-cell); border: var(--cell); border-radius: 0; }
.pv-prose .kg-button-card .kg-btn { border-radius: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.pv-prose .kg-bookmark-container { border-radius: 0; border: var(--cell); box-shadow: none; }
.pv-prose .kg-toggle-card { border-radius: 0; border: var(--cell); }
.pv-prose .kg-width-wide { position: relative; width: calc(100% + 30%); max-width: none; margin-left: -30%; }
.pv-prose .kg-width-full { position: relative; width: calc(100% + 50%); max-width: none; margin-left: -50%; }

.pv-article-foot { margin-top: 44px; padding: 16px 0 16px var(--pad); border-top: var(--hair); border-bottom: var(--hair); align-items: baseline; }
.pv-article-foot .l { grid-column: 1 / span 3; }
.pv-article-foot .r { grid-column: 4 / span 6; }
.pv-share { display: inline-flex; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); }
.pv-share:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* комментарии Tolstoy Comments под материалом */
.pv-comments { padding: 0 0 0 var(--pad); }
.pv-comments__inner { grid-column: 4 / span 6; max-width: 68ch; min-width: 0; padding-top: 36px; }
.pv-comments__head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: var(--cell); }
.pv-comments .tolstoycomments-feed { min-height: 240px; }
.pv-comments .tolstoycomments-feed iframe { display: block; width: 100%; border: 0; }
.pv-card__foot .tolstoycomments-cc { color: inherit; text-decoration: none; }
.pv-card__foot .tolstoycomments-cc:hover { text-decoration: underline; text-underline-offset: 3px; }
#pv-comments { scroll-margin-top: 24px; }

/* нумерованные секции (шаблон «Numbered») */
.pv-numbered-intro { margin-bottom: 36px; }
.pv-numbered {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0 16px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: var(--cell);
}
.pv-numbered__n { padding-top: 6px; }
.pv-numbered__body > :first-child { margin-top: 0; }

/* читайте также */
.pv-related { margin-bottom: 20px; }
.pv-related__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: var(--hair);
    border-bottom: var(--hair);
    overflow: hidden;
}
.pv-related__item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    margin-left: -0.5px;
    padding: 22px var(--pad) 26px;
    border-left: var(--cell);
}
.pv-related h3 { margin: 0; font-size: 16.5px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.pv-related time { margin-top: auto; }

/* ---------- промо о продукте (главная) ---------- */
.pv-promo { margin-top: 110px; padding: 18px 0 0 var(--pad); border-top: var(--hair); align-items: start; gap: 40px 0; }
.pv-promo__copy { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 22px; padding-right: 32px; }
.pv-promo__copy p { margin: 0; font-size: 20px; line-height: 1.32; letter-spacing: -0.01em; max-width: 30em; }
.pv-promo__actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pv-promo__mock {
    grid-column: 7 / span 4;
    background: var(--bg-cell);
    border: var(--cell);
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pv-mock__head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: var(--cell); }
.pv-mock__row { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; }
.pv-mock__row b { font-family: var(--mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pv-mock__row span { display: flex; flex-direction: column; gap: 5px; }
.pv-mock__row i { display: block; height: 6px; background: var(--fg); }
.pv-mock__row i + i { height: 4px; background: var(--cell-line); }
.pv-mock__foot { padding-top: 10px; border-top: var(--cell); }

/* ---------- футер ---------- */
.pv-footer { margin-top: auto; padding: 90px 0 8px var(--pad); align-items: start; gap: 20px 0; }
.pv-footer::before { content: ""; grid-column: 1 / -1; border-top: var(--hair); margin-bottom: 18px; }
.pv-footer__brand { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 8px; }
.pv-footer__brand .sub { font-size: 12px; color: var(--muted); max-width: 30em; }
.pv-footer__links { grid-column: 5 / span 3; display: flex; flex-direction: column; gap: 8px; }
.pv-footer__links .nav { display: contents; }
.pv-footer__links a { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--fg); }
.pv-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pv-footer__contact { grid-column: 8 / span 3; display: flex; flex-direction: column; gap: 8px; }
.pv-footer__contact .mail { font-size: 14px; text-decoration: none; }
.pv-footer__contact .mail:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- полноэкранное меню ---------- */
.pv-menu {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    overflow: auto;
    background: var(--bg);
    color: var(--fg);
    padding: var(--pad);
}
.pv-menu.is-open { display: block; }
.pv-menu__inner { display: flex; min-height: 100%; flex-direction: column; }
.pv-menu__top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: var(--hair); }
.pv-menu__logo { width: 96px; }
.pv-menu__close { padding: 8px 0; border: 0; background: none; cursor: pointer; color: var(--fg); }
.pv-menu__links { display: flex; flex-direction: column; padding: 28px 0 8px; }
.pv-menu__links .nav, .pv-menu__extras { display: flex; flex-direction: column; }
.pv-menu__links li { border-bottom: var(--cell); }
.pv-menu__links a {
    display: flex;
    min-height: 58px;
    align-items: center;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
}
.pv-menu__extras a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; min-height: 48px; }
.pv-menu__search {
    display: flex;
    width: 100%;
    align-items: baseline;
    gap: 16px;
    padding: 22px 0;
    border: 0;
    border-bottom: var(--hair);
    background: none;
    cursor: pointer;
    text-align: left;
}
.pv-menu__search .label-mono { color: var(--fg); }
.pv-menu__search i { flex: 1; font-style: normal; font-size: 15px; color: var(--muted); }
.pv-menu__bottom { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 22px; }

/* ---------- страницы Source, не переопределённые темой ---------- */
.pv-theme .gh-main:not(.pv-content), .pv-theme .gh-container { max-width: none; }

/* ---------- широкие экраны ---------- */
@media (min-width: 1700px) {
    .pv-feed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- без рейки: планшеты и телефоны ---------- */
@media (max-width: 1023px) {
    body.pv-theme { padding: 0; }
    .pv-page { display: block; min-height: 100vh; }
    .pv-rail { display: none; }
    .pv-content { display: flex; }

    .pv-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 14px var(--pad);
        border-bottom: var(--hair);
    }
    .pv-topbar__logo { width: 96px; }
    .pv-topbar__actions { display: flex; gap: 18px; }
    .pv-topbar__btn { padding: 6px 0; border: 0; background: none; cursor: pointer; }
    .pv-topbar__btn .label-mono { color: var(--fg); }
    .pv-scroll-header { display: flex; }
    .pv-scroll-header .pv-topbar__btn { display: block; }

    .pv-util { padding-right: var(--pad); }
    .pv-util .l { grid-column: 1 / span 6; }
    .pv-util .r { grid-column: 7 / span 4; }

    .pv-masthead { padding: 36px var(--pad) 28px; gap: 20px 0; }
    .pv-masthead__title { grid-column: 1 / -1; }
    .pv-masthead__meta { grid-column: 1 / -1; }

    .pv-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pv-card.is-wide { grid-column: span 2; }
    .pv-more { padding: 28px var(--pad) 0; }

    .pv-sec-head { padding-right: var(--pad); margin: 64px 0 28px; }
    .pv-sec-head .lbl { grid-column: 1 / -1; margin-bottom: 8px; }
    .pv-sec-head .txt { grid-column: 1 / -1; }

    .pv-page-head { padding: 32px var(--pad) 24px; gap: 14px 0; }
    .pv-page-head h1, .pv-page-head p { grid-column: 1 / -1; padding-left: 0; }

    .pv-article-head { padding: 36px var(--pad) 0; gap: 16px 0; }
    .pv-article-head h1, .pv-article-lede, .pv-article-meta { grid-column: 1 / -1; }
    .pv-fig--hero { padding: 28px var(--pad) 0; }
    .pv-fig__cap, .pv-prose figcaption { grid-column: 1 / -1; }
    .pv-article-body { padding: 32px var(--pad) 0; }
    .pv-prose { grid-column: 1 / -1; max-width: none; }
    .pv-prose .kg-width-wide, .pv-prose .kg-width-full { width: 100%; margin-left: 0; }
    .pv-article-foot { padding-right: var(--pad); }
    .pv-article-foot .l, .pv-article-foot .r { grid-column: 1 / -1; }
    .pv-article-foot .r { margin-top: 10px; }
    .pv-comments { padding: 0 var(--pad); }
    .pv-comments__inner { grid-column: 1 / -1; max-width: none; padding-top: 28px; }

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

    .pv-promo { margin-top: 72px; padding-right: var(--pad); gap: 28px 0; }
    .pv-promo__copy, .pv-promo__mock { grid-column: 1 / -1; padding-right: 0; }

    .pv-footer { padding: 56px var(--pad) 20px; }
    .pv-footer__brand, .pv-footer__links, .pv-footer__contact { grid-column: 1 / -1; }
}

@media (max-width: 719px) {
    .pv-feed { grid-template-columns: 1fr; }
    .pv-card, .pv-card.is-wide { grid-column: span 1; display: flex; }
    .pv-card.is-wide .is-inline { display: block; }
    .pv-card.is-wide .is-side { display: none; }
    .pv-card.is-wide .pv-card__title { font-size: 22px; }
    .pv-util .l { grid-column: 1 / -1; }
    .pv-util .r { grid-column: 1 / -1; text-align: left; margin-top: 6px; }
    .pv-related__list { grid-template-columns: 1fr; }
    .pv-numbered { grid-template-columns: 1fr; gap: 8px 0; }
    .pv-pagination { grid-template-columns: 1fr 1fr; padding-right: var(--pad); }
    .pv-pagination__status { grid-column: 1 / -1; grid-row: 1; }
    .pv-pagination__side { grid-row: 2; }
    .pv-pagination__side.is-next { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pv-theme *, .pv-theme *::before, .pv-theme *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
