/* Основа оформления TheWoman.ru. Цвета и размеры меняются только здесь */
:root {
    color-scheme: light;

    --ink: #101820;
    --wine: #8e1537;
    --wine-dark: #6d0f2a;
    --paper: #f9f7f6;
    --paper-dark: #efeae7;
    --white: #fff;
    --line: #efeae7;
    --line-strong: #ddd5cf;
    --muted: #6e7377;
    --muted-dark: #565b5f;
    --strip-text: #f3e9e2;
    --blush: #f3e9e2;

    --font-logo: "Forum", Georgia, "Times New Roman", serif;
    --font-ui: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-accent: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --gutter: clamp(16px, 3.2vw, 46px);
    --row-h: 60px;
    --nav-h: 48px;
    --control-h: 44px;
    --ease: cubic-bezier(.65, 0, .35, 1);
    --speed: .4s;
    --menu-top: 0px;
}

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

html {
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
}

html.menu-open { overflow: hidden; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 15px/1.5 var(--font-ui);
}

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

.skip {
    position: absolute;
    left: var(--gutter);
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--white);
    color: var(--wine);
}

.skip:focus { top: 8px; }

/* Верхняя полоса */
.top-strip {
    padding: 10px var(--gutter);
    background: var(--ink);
    color: var(--strip-text);
    font: italic 400 13px/20px var(--font-accent);
    text-align: center;
}

.top-strip a {
    transition: opacity var(--speed) var(--ease);
}

.top-strip a:hover { opacity: .75; }

.top-strip a:focus-visible { outline-color: var(--strip-text); }

/* Основной ряд */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--white);
    border-bottom: 1px solid transparent;
    transition: border-color var(--speed) var(--ease);
}

.is-compact .site-header,
.menu-open .site-header { border-bottom-color: var(--line); }

.site-header__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    height: var(--row-h);
    padding: 0 var(--gutter);
}

.site-header__edge {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.site-header__edge--end {
    justify-content: flex-end;
    gap: 8px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    color: var(--wine);
    font: 400 clamp(21px, 2vw, 29px)/1 var(--font-logo);
    letter-spacing: .26em;
    margin-right: -.26em; /* компенсация разрядки у последней буквы */
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--speed) var(--ease);
}

.logo:hover { color: var(--wine-dark); }

.logo__mark {
    flex: none;
    width: auto;
    height: 1.05em;
    fill: currentColor;
}

/* Кнопки */
.round-btn {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: var(--control-h);
    height: var(--control-h);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.round-btn:hover { background: var(--paper-dark); }

.burger__lines,
.burger__lines::before {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    transition: transform var(--speed) var(--ease);
}

.burger__lines {
    position: relative;
    transform: translateY(-3px);
}

.burger__lines::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
}

.burger[aria-expanded="true"] {
    background: var(--wine);
    color: var(--white);
}

.burger[aria-expanded="true"] .burger__lines { transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines::before { transform: translateY(-6px) rotate(-90deg); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--control-h);
    padding: 0 20px;
    border: 1px solid transparent;
    font: 500 14px/1 var(--font-ui);
    white-space: nowrap;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.btn--primary {
    background: var(--wine);
    color: var(--white);
}

.btn--primary:hover { background: var(--wine-dark); }

.btn--ghost { color: var(--ink); }

.btn--ghost:hover { color: var(--wine); }

/* Поиск */
.search {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--control-h);
    min-width: 0;
    border-radius: 800px;
}

.search--header { flex: 0 1 221px; }

.search__btn {
    position: absolute;
    left: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink);
    cursor: pointer;
}

.search__input {
    width: 100%;
    height: 100%;
    padding: 0 14px 0 34px;
    border: 1px solid transparent;
    border-radius: inherit;
    background: none;
    color: var(--ink);
    font: 400 15px/1 var(--font-ui);
    transition: border-color var(--speed) var(--ease);
    appearance: none;
}

.search__input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.search__input:hover,
.search__input:focus { border-color: var(--line); }

.search__input:focus {
    outline: none;
    border-color: var(--wine);
}

/* Рубрики */
.site-nav {
    position: sticky;
    top: var(--row-h);
    z-index: 20;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    transition: transform var(--speed) var(--ease);
}

.is-compact .site-nav { transform: translateY(-100%); }

.site-nav__list {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 2.2vw, 31px);
    padding: 0 var(--gutter);
}

.site-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-h);
    white-space: nowrap;
    transition: color var(--speed) var(--ease);
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--wine);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--speed) var(--ease);
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] { color: var(--wine); }

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* Выпадающее меню */
.menu {
    position: fixed;
    top: var(--menu-top);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--white);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform var(--speed) var(--ease), visibility 0s linear var(--speed);
}

.menu-open .menu {
    visibility: visible;
    transform: none;
    transition: transform var(--speed) var(--ease), visibility 0s;
}

.menu__inner { padding: 32px var(--gutter) 48px; }

.search--menu {
    display: none;
    margin-bottom: 24px;
    background: var(--paper);
}

.menu__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px clamp(24px, 3vw, 46px);
}

.menu__title {
    margin: 0 0 14px;
    color: var(--muted);
    font: 400 13px/1.4 var(--font-ui);
}

.menu__list li + li { margin-top: 10px; }

.menu__list a {
    transition: color var(--speed) var(--ease);
}

.menu__list a:hover { color: var(--wine); }

.menu__list--large { font-size: 20px; line-height: 1.3; }

/* Хлебные крошки */
.crumbs-block { padding: 0 var(--gutter); }

.crumbs-block__inner {
    display: flex;
    align-items: center;
    min-height: 61px;
    border-bottom: 1px solid var(--line);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    line-height: 1.3;
}

.crumbs__item + .crumbs__item::before {
    content: "/";
    margin: 0 8px;
    color: var(--muted);
}

.crumbs__item[aria-current="page"] { color: var(--wine); }

.crumbs__home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color var(--speed) var(--ease);
}

.crumbs__home:hover { color: var(--wine); }

.crumbs__mark {
    flex: none;
    width: 22px;
    height: 14px;
    fill: var(--wine);
}

/* Планшет и телефон */
@media (max-width: 991.98px) {

    .search--header,
    .site-header__action,
    .site-nav { display: none; }

    .search--menu { display: flex; }

    .menu__inner { padding-top: 20px; }

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

@media (max-width: 575.98px) {
    .menu__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Самые узкие телефоны: логотип со значком иначе не влезает между кнопками */
@media (max-width: 374.98px) {
    .logo {
        gap: .4em;
        font-size: 18px;
        letter-spacing: .18em;
        margin-right: -.18em;
    }
}

@media (min-width: 992px) {
    .search-toggle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
    }
}

.sketch-page { padding-bottom: 64px; }

/* Цветные плашки: обложки, цитаты и приглашения */
.tone-wine { --tone: var(--wine); background: var(--tone); color: var(--white); --soft: var(--strip-text); --accent: var(--white); }
.tone-ink { --tone: var(--ink); background: var(--tone); color: var(--strip-text); --soft: var(--strip-text); --accent: var(--white); }
.tone-blush { --tone: var(--blush); background: var(--tone); color: var(--ink); --soft: var(--muted-dark); --accent: var(--wine); }
.tone-white { --tone: var(--white); background: var(--tone); color: var(--ink); --soft: var(--muted); --accent: var(--wine); }
.tone-paper { --tone: var(--paper-dark); background: var(--tone); color: var(--ink); --soft: var(--muted-dark); --accent: var(--wine); }

.tone-wine :focus-visible,
.tone-ink :focus-visible { outline-color: var(--white); }

/* Общие детали */
.front-hero__title,
.front-band__quote { text-wrap: balance; }

.front-hero__text { text-wrap: pretty; }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 32px;
    margin-bottom: 24px;
}

.section-title {
    margin: 0;
    font: 400 clamp(30px, 3.2vw, 44px)/1.1 var(--font-logo);
}

.sort-tabs { display: flex; gap: 22px; }

.sort-tabs__btn {
    display: inline-flex;
    align-items: center;
    height: var(--control-h);
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: 400 15px/1 var(--font-ui);
    cursor: pointer;
    transition: color var(--speed) var(--ease);
}

.sort-tabs__btn:hover { color: var(--ink); }

.sort-tabs__btn[aria-pressed="true"],
.sort-tabs__btn[aria-current="page"] {
    color: var(--wine);
    box-shadow: inset 0 -1px 0 var(--wine);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 12px;
    color: var(--soft, var(--muted));
    font-size: 13px;
    line-height: 1.5;
}

.meta__rubric { color: var(--accent, var(--wine)); }
.meta__rubric:hover { text-decoration: underline; }

.stats {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: var(--soft, var(--muted));
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.author-link { transition: color var(--speed) var(--ease); }
a.author-link:hover { color: var(--accent, var(--wine)); }

.author-link__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
}

.like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--control-h);
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color var(--speed) var(--ease);
}

.like:hover,
.like[aria-pressed="true"] { color: var(--accent, var(--wine)); }

.like[aria-pressed="true"] .icon { fill: currentColor; }

.ad {
    display: grid;
    place-content: center;
    gap: 2px;
    max-width: 100%;
    margin-inline: auto;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.ad--300x250 { width: 300px; height: 250px; }
.ad--300x600 { width: 300px; height: 600px; }
.ad--970x250 { width: 970px; height: 250px; }

.btn--light {
    background: var(--white);
    color: var(--ink);
}

.btn--light:hover { background: var(--paper-dark); }

.chip {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 800px;
    background: none;
    color: var(--ink);
    font: 400 14px/1 var(--font-ui);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.chip:hover { border-color: var(--wine); }

.chip[aria-pressed="true"] {
    border-color: var(--wine);
    background: var(--wine);
    color: var(--white);
}

.phone-rubrics {
    display: none;
    gap: 8px;
    margin: 0 calc(var(--gutter) * -1) 20px;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
}

/* Подвал */
.site-footer {
    padding: 40px var(--gutter);
    border-top: 1px solid var(--line);
    background: var(--white);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 48px;
    max-width: calc(1320px - var(--gutter) * 2);
    margin-inline: auto;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: 14px;
}

.site-footer__links a:hover { color: var(--wine); }

.site-footer__note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.age-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-size: 13px;
}

/* Панель страниц макета, на сайт не попадает */
.sketch-switch {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 2px;
    max-width: calc(100vw - 16px);
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 800px;
    background: var(--ink);
    color: var(--strip-text);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgb(16 24 32 / .25);
    transform: translateX(-50%);
}

.sketch-switch a {
    flex: none;
    padding: 10px 12px;
    border-radius: 800px;
}

@media (max-width: 479.98px) {
    .sketch-switch a { padding-inline: 9px; }
}

.sketch-switch a[aria-current="page"] {
    background: var(--white);
    color: var(--ink);
}

.sketch-switch a:focus-visible { outline-color: var(--white); }

.sketch-states {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: var(--ink);
    color: var(--strip-text);
    font-size: 13px;
    line-height: 1.5;
}

.sketch-states a { text-decoration: underline; text-underline-offset: 3px; }

.sketch-states a[aria-current="page"] {
    color: var(--white);
    font-weight: 500;
    text-decoration: none;
}

.sketch-states a:focus-visible { outline-color: var(--white); }

.menu-open .sketch-switch { display: none; }

/* Боковая колонка, .top-list, .invite и .feed-picture */

.feed {
    display: grid;
    gap: 12px;
}

.feed-picture {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    min-height: 340px;
    padding: clamp(24px, 3.4vw, 44px);
}

.feed-picture__text {
    margin: 0;
    font: 400 clamp(30px, 3.4vw, 46px)/1.12 var(--font-logo);
}

.feed-picture__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 24px;
}

.block-title {
    margin: 0 0 8px;
    font: 400 24px/1.2 var(--font-logo);
}

.invite {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding: clamp(24px, 3vw, 36px);
}

.invite__title {
    margin: 0 0 4px;
    font: 400 clamp(26px, 2.5vw, 32px)/1.15 var(--font-logo);
}

.invite__text {
    margin: 0;
    color: var(--soft);
}

.feed-side {
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-width: 0;
}

.feed-side__invite { padding: 24px; }
.feed-side__invite .btn { width: 100%; margin-top: 16px; }

.top-list { counter-reset: top; }

.top-list__item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 4px 8px;
    padding: 14px 0;
    border-top: 1px solid var(--line-strong);
    counter-increment: top;
}

.top-list__item::before {
    content: counter(top);
    color: var(--wine);
    font: 400 24px/1 var(--font-logo);
}

.top-list__title {
    display: block;
    margin-bottom: 6px;
    font: 400 19px/1.2 var(--font-logo);
    transition: color var(--speed) var(--ease);
}

.top-list__item a:hover .top-list__title { color: var(--wine); }

.top-list .stat {
    color: var(--muted);
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 14px;
}

.tag-list a:hover { color: var(--wine); }

.feed-side__sticky {
    position: sticky;
    top: calc(var(--row-h) + var(--nav-h) + 16px);
}

/* Главная */
.front-hero {
    padding: clamp(24px, 2.8vw, 40px) var(--gutter) clamp(8px, 1vw, 16px);
    background: var(--white);
    text-align: center;
}

.front-hero__eyebrow {
    margin: 0 0 clamp(8px, .9vw, 12px);
    color: var(--wine);
    font: italic 400 15px/1.4 var(--font-accent);
}

.front-hero__title {
    max-width: 30ch;
    margin: 0 auto clamp(10px, 1vw, 14px);
    font: 400 clamp(32px, 4.1vw, 58px)/1.06 var(--font-logo);
}

.front-hero__title a {
    color: var(--wine);
    transition: color var(--speed) var(--ease);
}

.front-hero__title a:hover { color: var(--wine-dark); }

.dashed-link {
    color: var(--wine);
    border-bottom: 1px dashed currentColor;
    font-size: 14px;
    line-height: 1.4;
    transition: color var(--speed) var(--ease);
}

.dashed-link:hover { color: var(--wine-dark); border-bottom-color: transparent; }

.front-hero__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-width: 82ch;
    margin: 0 auto 2px;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.55;
}

.front-hero__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 24px;
}

.front-hero .meta { justify-content: center; }

.front-section {
    max-width: 1320px;
    margin-inline: auto;
    padding: clamp(32px, 4.4vw, 64px) var(--gutter);
}

.front-hero + .front-section { padding-top: clamp(24px, 2.5vw, 36px); }

.front-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 28px);
}

/* Цвет плашки виден по бокам и сверху, а снизу картинка растворяется в нём под текстом */
.cover {
    --frame: clamp(10px, 1vw, 14px);
    position: relative;
    display: flex;
    align-items: flex-end;
    aspect-ratio: 4 / 3;
    margin-bottom: 14px;
    padding: 0 clamp(20px, 2vw, 30px) clamp(14px, 1.3vw, 20px);
    overflow: hidden;
    transition: opacity var(--speed) var(--ease);
}

.cover:hover { opacity: .9; }

.cover__image {
    position: absolute;
    top: var(--frame);
    left: var(--frame);
    width: calc(100% - var(--frame) * 2);
    height: calc(100% - var(--frame));
    object-fit: cover;
}

.cover::after {
    content: "";
    position: absolute;
    inset: var(--frame) var(--frame) 0;
    background: linear-gradient(
        to top,
        var(--tone) 12%,
        color-mix(in srgb, var(--tone) 78%, transparent) 24%,
        color-mix(in srgb, var(--tone) 40%, transparent) 38%,
        color-mix(in srgb, var(--tone) 10%, transparent) 50%,
        transparent 58%
    );
}

.cover__text {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    font: 400 clamp(18px, 1.55vw, 22px)/1.2 var(--font-logo);
    text-shadow: 0 0 2px var(--tone), 0 0 8px var(--tone), 0 0 14px var(--tone);
}

.card__title {
    margin: 6px 0 2px;
    font: 400 clamp(22px, 1.9vw, 27px)/1.18 var(--font-logo);
}

.card__title a { transition: color var(--speed) var(--ease); }
.card__title a:hover { color: var(--wine); }

/* Заголовок в сетке не длиннее двух строк, чтобы ряды карточек шли ровно */
.front-grid .card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: calc(1.18em * 2);
    overflow: hidden;
}

.front-grid .card__title a:focus-visible,
.front-articles .card__title a:focus-visible { outline-offset: -2px; }

.front-grid .meta {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.front-grid .meta > * { flex: none; }

.front-grid .meta > .author-link {
    flex: 0 1 auto;
    min-width: 0;
}

/* Лента статей и историй: по две карточки в ряд, между рядами реклама и вставки */
.front-section--feed { padding-top: 0; }

.front-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 3.6vw, 52px) clamp(16px, 2.4vw, 32px);
}

.front-feed__wide {
    grid-column: 1 / -1;
    min-width: 0;
}

.post {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post__media {
    position: relative;
    margin-bottom: 16px;
}

.post__image {
    display: block;
    overflow: hidden;
}

.post__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform var(--speed) var(--ease);
}

.post__image:hover img { transform: scale(1.03); }

.post__links {
    position: absolute;
    top: 14px;
    right: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post__link {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    background: var(--white);
    color: var(--ink);
    font-size: 13px;
    line-height: 1;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.post__link:hover { color: var(--wine); }

.post__link--rubric {
    background: var(--wine);
    color: var(--white);
}

.post__link--rubric:hover {
    background: var(--wine-dark);
    color: var(--white);
}

.post__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: calc(1.16em * 2);
    margin: 0 0 8px;
    overflow: hidden;
    font: 400 clamp(24px, 2.2vw, 32px)/1.16 var(--font-logo);
}

.post__title a { transition: color var(--speed) var(--ease); }
.post__title a:hover { color: var(--wine); }
.post__title a:focus-visible { outline-offset: -2px; }

.post__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    margin: 0 0 14px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.55;
}

.post__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line-strong);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.front-rubrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px clamp(16px, 2vw, 28px);
}

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

.front-rubric__name {
    display: block;
    padding: 14px 0 18px;
    color: var(--wine);
    font: 400 clamp(26px, 2.3vw, 32px)/1.1 var(--font-logo);
}

.front-rubric__list a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--line-strong);
    font-size: 15px;
    line-height: 1.35;
    transition: color var(--speed) var(--ease);
}

/* Все материалы одной высоты: заголовок занимает одинаковое число строк, даже если текста меньше */
.front-rubric__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: calc(1.35em * 2);
    overflow: hidden;
}

.front-rubric__list .stat {
    display: flex;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.front-rubric__list a:hover { color: var(--wine); }

/* Полоса меток: две линии на всю ширину окна, между ними идут ссылки */
.tag-band {
    margin-inline: calc(50% - 50cqw);
    border-block: 1px solid var(--line-strong);
}

.tag-band__scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.tag-band__list {
    display: flex;
    flex: none;
    justify-content: space-around;
    min-width: 100%;
}

.tag-band__list li {
    display: flex;
    align-items: center;
    flex: none;
}

.tag-band__list li::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-inline: clamp(16px, 1.8vw, 26px);
    border-radius: 50%;
    background: var(--wine);
}

.tag-band__list a {
    display: block;
    padding-block: 14px;
    font: 400 clamp(20px, 1.7vw, 24px)/1.2 var(--font-logo);
    white-space: nowrap;
    transition: color var(--speed) var(--ease);
}

.tag-band__list a:hover { color: var(--wine); }
.tag-band__list a:focus-visible { outline-offset: -2px; }

/* Плашка идёт от края до края окна, а текст в ней выровнен по ленте. cqw не считает полосу прокрутки */
main { container-type: inline-size; }

.front-band {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    align-items: end;
    gap: 28px clamp(32px, 5vw, 72px);
    margin-inline: calc(50% - 50cqw);
    padding: clamp(32px, 3.6vw, 52px) max(var(--gutter), calc(50cqw - 660px + var(--gutter)));
}

.front-band__quote {
    margin: 12px 0 8px;
    font: 400 clamp(30px, 3.8vw, 54px)/1.08 var(--font-logo);
}

.front-band__text { margin: 8px 0 20px; color: var(--soft); }

.front-articles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px clamp(16px, 2vw, 28px);
}

.front-article {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 14px;
    border-top: 1px solid var(--line-strong);
}

/* Название не длиннее трёх строк и всегда одной высоты, поэтому описания начинаются вровень */
.front-article .card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    min-height: calc(1.18em * 3);
    overflow: hidden;
}

.front-article .stats { margin-top: auto; }

.front-article__text {
    margin: 6px 0 2px;
    font-size: 15px;
}

/* Фирменный стиль */
.brand {
    max-width: 1120px;
    margin-inline: auto;
    padding: clamp(32px, 4vw, 56px) var(--gutter) 64px;
}

.brand__intro {
    max-width: 66ch;
    margin: 12px 0 0;
    font-size: 17px;
    line-height: 1.6;
}

.brand__section { margin-top: clamp(36px, 4.4vw, 56px); }

.brand__section .block-title { margin-bottom: 16px; }

.brand-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.brand-panel {
    display: grid;
    place-items: center;
    gap: 16px;
    min-height: 180px;
    padding: 24px 16px;
    text-align: center;
}

.brand-panel .logo {
    margin-right: 0;
    color: var(--accent);
    font-size: clamp(16px, 1.55vw, 20px);
}

.brand-mark {
    width: 180px;
    max-width: 100%;
    height: auto;
    fill: currentColor;
}

.brand-mark--wine { fill: var(--wine); }

.brand-mark--small { width: 44px; }

.brand-sizes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
}

.swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px 12px;
}

.swatch__color {
    height: 88px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
}

.swatch__color--ink { background: var(--ink); }
.swatch__color--wine { background: var(--wine); }
.swatch__color--wine-dark { background: var(--wine-dark); }
.swatch__color--paper { background: var(--paper); }
.swatch__color--white { background: var(--white); }
.swatch__color--paper-dark { background: var(--paper-dark); }
.swatch__color--blush { background: var(--blush); }
.swatch__color--muted { background: var(--muted); }

.swatch__name { display: block; font-weight: 500; }

.swatch__role {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.font-samples { display: grid; gap: 20px; }

.font-sample { padding-top: 14px; border-top: 1px solid var(--line-strong); }

.font-sample__text { margin: 0 0 4px; }

.font-sample__text--logo { font: 400 clamp(28px, 3vw, 40px)/1.15 var(--font-logo); }
.font-sample__text--ui { font: 400 17px/1.5 var(--font-ui); }
.font-sample__text--accent { font: italic 400 17px/1.5 var(--font-accent); }

.font-sample__role {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1099.98px) {
    

    .feed-side__sticky { display: none; }
}

/* В узких колонках заголовки длиннее */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .front-rubric__title {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        min-height: calc(1.35em * 3);
    }
}

@media (max-width: 991.98px) {
    .phone-rubrics { display: flex; }

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

    .front-band,
    .front-articles { grid-template-columns: minmax(0, 1fr); }

    .front-article .card__title { min-height: 0; }

    .site-footer__inner { grid-template-columns: minmax(0, 1fr) auto; }

    .site-footer__links { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 599.98px) {
    .feed { margin-inline: calc(var(--gutter) * -1); }

    

    .front-grid,
    .front-feed,
    .front-rubrics,
    .brand-panels { grid-template-columns: minmax(0, 1fr); }

    .front-hero__text {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .front-rubric__list .stat { margin-top: 4px; }
}

/* Страницы рубрики и материала */
[hidden] { display: none !important; }

.chip[aria-current="page"] {
    border-color: var(--wine);
    background: var(--wine);
    color: var(--white);
}

.btn--outline {
    border-color: var(--wine);
    background: none;
    color: var(--wine);
    cursor: pointer;
}

.btn--outline:hover {
    background: var(--wine);
    color: var(--white);
}

.ad--640x250 { width: 640px; height: 250px; }

/* Крошки */
.crumbs-band { background: var(--white); }

.crumbs-band .crumbs-block {
    max-width: 1320px;
    margin-inline: auto;
}

.crumbs-band .crumbs-block__inner {
    min-height: 44px;
    border-bottom: 0;
}

/* Шапка рубрики */
.cat-head { margin-bottom: 24px; }

.cat-head__title {
    margin: 0 0 10px;
    color: var(--wine);
    font: 400 clamp(46px, 6vw, 84px)/1 var(--font-logo);
}

.cat-head__text {
    max-width: 66ch;
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.55;
    text-wrap: pretty;
}

.cat-head__title--long {
    font-size: clamp(38px, 4.6vw, 64px);
    line-height: 1.06;
    text-wrap: balance;
}

.cat-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 32px;
    margin-bottom: 24px;
}

.cat-filter {
    display: flex;
    gap: 8px;
}

.cat-filter--wrap { flex-wrap: wrap; }

/* Поиск и страница 404 */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.search-form .field__input {
    flex: 1 1 220px;
    width: auto;
    min-width: 0;
}

.search-form .btn { cursor: pointer; }

.search-count {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

.empty-note p { margin: 0 0 14px; }

.not-found__actions { margin-bottom: 32px; }

/* Страницы журнала и документы */
.doc-gap {
    padding: 0 3px;
    background: var(--blush);
    color: var(--wine);
}

.account-list a[aria-current="page"] {
    color: var(--wine);
    font-weight: 500;
}

.mat-foot__report {
    height: auto;
    color: var(--muted);
    font-size: 14px;
}

.cat-controls--end { justify-content: flex-end; }

.empty-note {
    margin: 0;
    padding-block: 24px;
    border-top: 1px solid var(--line-strong);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* Страница автора */
.author-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.author-head .avatar {
    width: 72px;
    height: 72px;
    font-size: 36px;
}

.author-head .cat-head__title { margin: 0; }

.author-head__count {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
}

/* Мои истории */
.my-stories {
    display: grid;
    gap: 12px;
}

.my-story {
    padding: clamp(18px, 2vw, 24px);
    background: var(--white);
}

.my-story__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.status-badge {
    padding: 1px 8px;
    background: var(--blush);
    color: var(--wine);
    font-size: 12px;
}

.status-badge--done {
    background: var(--wine);
    color: var(--white);
}

.status-badge--muted {
    background: var(--paper-dark);
    color: var(--muted-dark);
}

.my-story__title {
    margin: 8px 0 6px;
    font: 400 clamp(23px, 2.1vw, 30px)/1.16 var(--font-logo);
}

.my-story__title a { transition: color var(--speed) var(--ease); }
.my-story__title a:hover { color: var(--wine); }

.my-story__note {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 2px solid var(--wine);
    background: var(--blush);
    font-size: 14px;
    line-height: 1.5;
}

.my-story__note strong { font-weight: 500; }

.my-story__hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.my-story__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 14px;
}

.account-list {
    margin-block: 10px 14px;
    font-size: 14px;
    line-height: 1.4;
}

.account-list a {
    display: flex;
    align-items: center;
    min-height: var(--control-h);
    padding-block: 8px;
    border-top: 1px solid var(--line-strong);
    transition: color var(--speed) var(--ease);
}

.account-list a:hover { color: var(--wine); }

/* Постраничная навигация */
.pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: clamp(32px, 4vw, 52px);
}

.pages__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pages__link {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.pages__link:hover { color: var(--wine); }

.pages__link[aria-current="page"] {
    background: var(--wine);
    color: var(--white);
}

.pages__gap {
    min-width: 24px;
    color: var(--muted);
    text-align: center;
}

/* Основная колонка и колонка справа */
.side-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(32px, 4vw, 64px);
    max-width: 1320px;
    margin-inline: auto;
    padding: clamp(24px, 3vw, 40px) var(--gutter) clamp(40px, 5vw, 64px);
}

.side-layout__main { min-width: 0; }

/* Рубрика: карточки в строку */
.row-card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(16px, 2.4vw, 32px);
    padding-block: clamp(20px, 2.4vw, 28px);
    border-top: 1px solid var(--line-strong);
}

.row-card__image { align-self: start; }

.row-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.row-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin: 6px 0 8px;
    overflow: hidden;
    font: 400 clamp(23px, 2.1vw, 30px)/1.16 var(--font-logo);
}

.row-card__title a { transition: color var(--speed) var(--ease); }
.row-card__title a:hover { color: var(--wine); }
.row-card__title a:focus-visible { outline-offset: -2px; }

.row-card__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin: 0 0 2px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.55;
}

.row-card .stats { margin-top: auto; }

.row-list__insert { padding-block: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--line-strong); }

.row-list__insert .feed-picture { min-height: 280px; }

/* Правая колонка рубрики: последние комментарии, каждый в одну строку */
.side-comments__link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--control-h);
    border-top: 1px solid var(--line-strong);
    font-size: 14px;
    line-height: 1.4;
    transition: color var(--speed) var(--ease);
}

.side-comments__link:hover { color: var(--wine); }

.side-comments__link .icon { color: var(--wine); }

.side-comments__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Материал: заголовок */
.mat-label {
    margin: 0;
    color: var(--wine);
    font: italic 400 15px/1.4 var(--font-accent);
}

.mat-label a:hover { text-decoration: underline; }

.mat-head { margin-bottom: 24px; }

.mat-head__title {
    margin: 8px 0 12px;
    font: 400 clamp(34px, 4.1vw, 58px)/1.08 var(--font-logo);
    text-wrap: balance;
}

.mat-head__lead {
    margin: 0 0 14px;
    font-size: clamp(17px, 1.4vw, 20px);
    line-height: 1.5;
    text-wrap: pretty;
}

.byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.byline .author-link {
    color: var(--wine);
    font-weight: 500;
}

.byline__comments { display: inline-flex; }

.byline .author-link:hover,
.byline__comments:hover { text-decoration: underline; }

.mat-figure { margin: 0 0 28px; }

.mat-figure__note {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.mat-figure__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Текст материала */
.prose {
    font-size: 18px;
    line-height: 1.7;
}

.prose p { margin: 0 0 1.1em; }

.prose h2 {
    margin: 1.6em 0 .5em;
    font: 400 clamp(27px, 2.5vw, 36px)/1.14 var(--font-logo);
    scroll-margin-top: calc(var(--row-h) + 16px);
}

.prose h2:first-child { margin-top: 0; }

.prose ul {
    margin: 0 0 1.1em;
    padding-left: 1.2em;
    list-style: disc;
}

.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--wine); }

.prose blockquote {
    margin: 1.4em 0;
    padding-left: 20px;
    border-left: 2px solid var(--wine);
    color: var(--wine);
    font: 400 clamp(25px, 2.4vw, 33px)/1.2 var(--font-logo);
}

.prose blockquote p { margin: 0; }

.prose .ad { margin-block: 1.6em; }

/* У статьи перед текстом выжимка и содержание */
.mat-intro {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.mat-box {
    padding: clamp(18px, 2vw, 24px);
    background: var(--white);
}

.mat-box__title {
    margin: 0 0 10px;
    color: var(--wine);
    font: italic 400 15px/1.4 var(--font-accent);
}

.mat-box__list {
    padding-left: 1.2em;
    list-style: disc;
    font-size: 16px;
    line-height: 1.5;
}

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

.mat-box__list--links { list-style: decimal; }

.mat-box__list--links a {
    border-bottom: 1px dashed var(--line-strong);
    transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.mat-box__list--links a:hover {
    border-bottom-color: transparent;
    color: var(--wine);
}

/* Низ материала */
.mat-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 28px;
    padding-block: 16px;
    border-block: 1px solid var(--line-strong);
}

.like--big {
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--wine);
    color: var(--wine);
    font-size: 15px;
    line-height: 1;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.like--big:hover,
.like--big[aria-pressed="true"] {
    background: var(--wine);
    color: var(--white);
}

.share {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--muted);
    font-size: 14px;
}

.share a {
    color: var(--ink);
    transition: color var(--speed) var(--ease);
}

.share a:hover { color: var(--wine); }

.mat-tags { margin-top: 16px; }

.avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font: 400 20px/1 var(--font-logo);
    text-transform: uppercase;
}

.avatar.tone-paper,
.avatar.tone-blush { outline: 1px solid var(--line-strong); outline-offset: -1px; }

.author-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 24px;
}

.author-box__name {
    font-weight: 500;
    transition: color var(--speed) var(--ease);
}

.author-box__name:hover { color: var(--wine); }

.author-box__note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.author-box__more { margin-left: auto; }

.mat-invite { margin-top: clamp(28px, 3.4vw, 44px); }

/* Комментарии */
.comments {
    margin-top: clamp(36px, 4.4vw, 56px);
    scroll-margin-top: calc(var(--row-h) + 16px);
}

.comments__title { font-size: clamp(28px, 2.7vw, 38px); }

.comments .section-head { margin-bottom: 16px; }

.comment-form textarea {
    display: block;
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    font: 400 16px/1.5 var(--font-ui);
    resize: vertical;
    appearance: none;
    transition: border-color var(--speed) var(--ease);
}

.comment-form textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--wine);
}

.comment-form__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    margin-top: 10px;
}

.comment-form__note {
    flex: 1 1 240px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.comment-form .btn { cursor: pointer; }

.comments__list { margin-top: 24px; }

.comment {
    padding-block: 16px 6px;
    border-top: 1px solid var(--line-strong);
}

.comment__row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
}

.comment__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.comment__author {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.comment__badge {
    padding: 1px 8px;
    background: var(--blush);
    color: var(--wine);
    font-size: 12px;
}

.comment__text {
    margin: 4px 0 0;
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.comment__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
}

.comment__action {
    height: var(--control-h);
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color var(--speed) var(--ease);
}

.comment__action:hover:not(:disabled) { color: var(--wine); }
.comment__action:disabled { cursor: default; }

.comment__main > .comment-form { margin-block: 4px 12px; }

.comment__replies {
    margin: 0 0 8px 52px;
}

.comment__replies .comment {
    padding-block: 10px 2px;
    border-top: 1px solid var(--line);
}

.comment__replies .comment__row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
}

.comment__replies .avatar {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.comment__replies .comment__text { font-size: 15px; }

.comment--pending {
    margin-block: 0 2px;
    padding: 14px;
    border-top: 0;
    background: var(--blush);
}

.comment__note {
    margin: 6px 0 0;
    color: var(--wine);
    font-size: 13px;
    line-height: 1.4;
}

.comment--removed .comment__text {
    padding-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
}

.comments__more {
    display: flex;
    width: 100%;
    margin-top: 12px;
}

/* Форма истории */
.story-form {
    display: grid;
    gap: 26px;
}

.field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field__label {
    display: block;
    margin-bottom: 6px;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.field__optional {
    margin-left: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.field__input {
    display: block;
    width: 100%;
    min-height: var(--control-h);
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    font: 400 16px/1.5 var(--font-ui);
    appearance: none;
    transition: border-color var(--speed) var(--ease);
}

.field__input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.field__input:focus {
    outline: none;
    border-color: var(--wine);
}

.field__input[aria-invalid="true"] { border-color: var(--wine); }

.field__input--story {
    min-height: 320px;
    padding: 14px 16px;
    font-size: 17px;
    line-height: 1.6;
    resize: vertical;
}

.field__error {
    margin: 6px 0 0;
    color: var(--wine);
    font-size: 14px;
    line-height: 1.4;
}

.field__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 20px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.field__foot > span:first-child { flex: 1 1 280px; }

.field__foot a {
    border-bottom: 1px dashed currentColor;
    color: var(--wine);
}
.field__foot a:hover { border-bottom-color: transparent; }

.field__static {
    color: var(--wine);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.field__count { flex: none; }

.choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice-chips .chip { height: var(--control-h); }

.choice-chips input:checked + .chip {
    border-color: var(--wine);
    background: var(--wine);
    color: var(--white);
}

.choice-chips input:focus-visible + .chip {
    outline: 2px solid var(--wine);
    outline-offset: 2px;
}

.consents {
    display: grid;
    gap: 4px;
}

.consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding-block: 7px;
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}

.consent input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--wine);
    cursor: pointer;
}

.consent a {
    border-bottom: 1px dashed currentColor;
    color: var(--wine);
}
.consent a:hover { border-bottom-color: transparent; }

.send-box {
    padding: clamp(18px, 2vw, 24px);
    background: var(--white);
}

.send-box__who {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.5;
}

.send-box .block-title { margin-bottom: 14px; }

.send-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px clamp(20px, 3vw, 36px);
}

.send-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.send-option + .send-option {
    padding-left: clamp(20px, 3vw, 36px);
    border-left: 1px solid var(--line-strong);
}

.send-option__title {
    margin: 0;
    color: var(--wine);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.send-option__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.send-option > .btn,
.send-option > .send-box__actions { margin-top: auto; }

/* Вход и регистрация */
.auth-page {
    max-width: calc(600px + var(--gutter) * 2);
    margin-inline: auto;
    padding: clamp(24px, 3vw, 40px) var(--gutter) clamp(40px, 5vw, 64px);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 20px;
}

.password-field { position: relative; }

.password-field .field__input { padding-right: 96px; }

.password-field__toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: var(--control-h);
    padding: 0 14px;
    border: 0;
    background: none;
    color: var(--wine);
    font: 400 14px/1 var(--font-ui);
    cursor: pointer;
}

.password-field__toggle:hover { color: var(--wine-dark); }
.password-field__toggle:focus-visible { outline-offset: -2px; }

.form-captcha {
    width: 100%;
    padding: 10px 12px;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.secret-link { margin-bottom: 20px; }

.secret-link__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.secret-link__row .field__input {
    flex: 1 1 240px;
    width: auto;
    min-width: 0;
    font-size: 14px;
}

.danger-zone { font-size: 14px; }

.danger-zone summary {
    width: fit-content;
    border-bottom: 1px dashed currentColor;
    color: var(--wine);
    line-height: 1.8;
    list-style: none;
    cursor: pointer;
}

.danger-zone summary:hover { border-bottom-color: transparent; }
.danger-zone summary::-webkit-details-marker { display: none; }

.danger-zone p { margin: 10px 0; line-height: 1.5; }

.send-box__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.send-box .btn { cursor: pointer; }

.form-alert {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-left: 2px solid var(--wine);
    background: var(--blush);
    font-size: 15px;
    line-height: 1.5;
}

.form-alert strong { font-weight: 500; }

.sent-card {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
    padding: clamp(18px, 2vw, 24px);
    background: var(--white);
}

.sent-card > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
}

.sent-card dt {
    color: var(--muted);
    font-size: 14px;
}

.sent-card dd {
    margin: 0;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.sent-note {
    max-width: 66ch;
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.5;
}

.sent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

/* Подсказки справа */
.feed-side .top-list__item > span {
    font-size: 15px;
    line-height: 1.45;
}

.write-rules .block-title + .rule-list { margin-top: 10px; }

.rule-list + .block-title { margin-top: 24px; }

.rule-list {
    display: grid;
    gap: 8px;
    font-size: 15px;
    line-height: 1.4;
}

.rule-list li {
    position: relative;
    padding-left: 22px;
}

.rule-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--wine);
}

.rule-list--no li::before {
    content: "×";
    color: var(--muted);
    font-size: 18px;
    line-height: 1.1;
}

.write-rules__more { margin: 14px 0 0; }

.write-help {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line-strong);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.write-help a {
    border-bottom: 1px dashed currentColor;
    color: var(--wine);
}
.write-help a:hover { border-bottom-color: transparent; }

@media (max-width: 1099.98px) {
    .side-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 699.98px) {
    .send-options { grid-template-columns: minmax(0, 1fr); }

    .send-option + .send-option {
        padding-top: 20px;
        padding-left: 0;
        border-top: 1px solid var(--line-strong);
        border-left: 0;
    }
}

@media (max-width: 599.98px) {
    .row-card { grid-template-columns: minmax(0, 1fr); }

    .prose { font-size: 17px; }

    .comment__replies { margin-left: 16px; }

    .author-box__more {
        width: fit-content;
        margin-left: 54px;
    }
}

/* Цитата во вставках ведёт на страницу картинки */
.front-band__quote a:hover,
.feed-picture__text a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
}

/* Страница картинки с текстом */
.pic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    aspect-ratio: 1200 / 630;
    margin: 0 0 16px;
    padding: clamp(28px, 4vw, 48px) clamp(24px, 5vw, 56px) clamp(56px, 6vw, 68px);
}

/* Длинному тексту на телефоне нужно больше высоты, карточка вырастет сама */
@media (max-width: 599.98px) {
    .pic-card { aspect-ratio: 4 / 3; }
}

.pic-card__text {
    margin: 0;
    font: 400 clamp(28px, 3.6vw, 46px)/1.14 var(--font-logo);
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.pic-card__mark {
    position: absolute;
    left: clamp(24px, 5vw, 56px);
    bottom: clamp(16px, 2.4vw, 24px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--soft);
    font-size: 13px;
}

.pic-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.pic-info__save { margin-left: auto; }

.pic-more {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.pic-more__item {
    display: flex;
    align-items: center;
    aspect-ratio: 1;
    padding: 12px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    transition: opacity var(--speed) var(--ease);
}

.pic-more__item:hover { opacity: 0.85; }

/* Настройки аккаунта */
.account-page > .form-alert,
.account-page > form { max-width: 640px; }

.account-page > .form-alert { margin-bottom: 20px; }

.account-section {
    max-width: 640px;
    padding-block: 24px;
    border-top: 1px solid var(--line-strong);
}

.account-section .block-title { margin-bottom: 10px; }

.account-section .story-form { gap: 18px; }

.account-section .danger-zone .field { margin-block: 12px; }

.account-section__hint {
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.account-section__hint a {
    color: var(--wine);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Баннер cookie */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 35;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    width: min(760px, calc(100vw - 32px));
    padding: 16px 20px;
    background: var(--white);
    box-shadow: 0 8px 32px rgb(16 24 32 / 18%);
    transform: translateX(-50%);
}

.cookie-banner[hidden],
.menu-open .cookie-banner { display: none; }

/* Только для макета: баннер стоит над панелью страниц */
.sketch-page .cookie-banner { bottom: 68px; }

.cookie-banner__text {
    flex: 1 1 320px;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner__text a {
    color: var(--wine);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer__button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color var(--speed) var(--ease);
}

.site-footer__button:hover { color: var(--wine); }
