/* =============================================================
   AybBen Lab — Blog app CSS
   Дополнение к site:abn-v1/default.css. Все CSS-переменные
   (--terracotta, --cream, --maxw, --ease и т.д.) объявлены там
   и доступны здесь без дополнительных :root.
   ============================================================= */


/* ===================== BREADCRUMBS ===================== */
.blog-breadcrumbs {
    padding: 28px 0 0;
    font-size: 13px;
    color: var(--text-mute);
    letter-spacing: 0.02em;
}
.blog-breadcrumbs a {
    color: var(--text-mute);
    transition: color .2s var(--ease);
}
.blog-breadcrumbs a:hover { color: var(--terracotta); }
.blog-breadcrumbs a:not(:last-child)::after {
    content: " / ";
    margin: 0 6px;
    color: var(--line-strong);
}


/* ===================== HERO — модификаторы для блога ===================== */
/* margin-bottom: 0 — чтобы не было разрыва между hero и контентной секцией ниже.
   Высоту и центровку контента задаёт .hero--inner (см. default.css, patch 06). */
.hero--blog,
.hero--post {
    margin-bottom: 0;
}


/* ===================== STREAM (list of posts) ===================== */
.blog-stream {
    padding-bottom: var(--gap-section);
}
.blog-stream__wrap {
    padding-top: clamp(32px, 4vw, 48px);
}


/* ===================== POST CARDS (grid) ===================== */

/* Featured row: первая карточка шире, рядом две обычных — как в журнале на главной */
.blog-grid--featured {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Обычная сетка для остальных постов */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.blog-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    transition:
        transform   .25s var(--ease),
        border-color .25s var(--ease),
        box-shadow  .25s var(--ease);
}
.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--terracotta);
    box-shadow: 0 12px 28px rgba(30, 33, 40, 0.07);
}

.blog-card__link {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    min-height: 264px;
    padding: 24px;
    color: inherit;
    text-decoration: none;
}

/* Картинка-обложка (если задана) — на всю ширину карточки сверху */
.blog-card__pic {
    margin: -24px -24px 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--cream-soft);
}
.blog-card__pic img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s var(--ease);
}
.blog-card:hover .blog-card__pic img { transform: scale(1.04); }

.blog-card__meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.blog-card__type {
    display: inline-flex;
    padding: 4px 8px;
    border: 1px solid var(--line-strong);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
}
.blog-card__date {
    font-size: 11.5px;
    color: var(--text-mute);
}
.blog-card__body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card__title {
    margin: 0 0 12px;
    color: var(--graphite);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.01em;
}
.blog-card__excerpt {
    margin: 0 0 auto;
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card__cta {
    position: relative;
    z-index: 2;
    margin-top: 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--terracotta);
}
.blog-card__cta svg {
    margin-left: 6px;
    transition: transform .25s var(--ease);
}
.blog-card:hover .blog-card__cta svg { transform: translateX(4px); }

/* Лид-карточка — графит + декоративные формы (как journal-card--lead на главной) */
.blog-card--lead {
    background: var(--graphite);
    color: #fff;
    border-color: var(--graphite);
}
.blog-card--lead:hover {
    border-color: var(--ochre);
    box-shadow: 0 12px 28px rgba(30, 33, 40, 0.18);
}
.blog-card--lead .blog-card__link {
    min-height: 344px;
}
.blog-card--lead::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -66px;
    top: -54px;
    background: var(--ochre);
    border-radius: 50%;
    opacity: 0.72;
    z-index: 1;
}
.blog-card--lead::before {
    content: "";
    position: absolute;
    width: 88px;
    height: 178px;
    right: 62px;
    bottom: -58px;
    background: var(--blue-muted);
    transform: rotate(23deg);
    opacity: 0.8;
    z-index: 1;
}
.blog-card--lead .blog-card__title {
    color: #fff;
    max-width: 18ch;
    font-size: 26px;
    line-height: 1.2;
}
.blog-card--lead .blog-card__type {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}
.blog-card--lead .blog-card__date { color: rgba(255, 255, 255, 0.62); }
.blog-card--lead .blog-card__excerpt {
    color: rgba(255, 255, 255, 0.72);
    max-width: 44ch;
}
.blog-card--lead .blog-card__cta { color: #fff; }

/* Если у лида есть картинка — прячем декоративные формы, чтобы не накладывались */
.blog-card--lead:has(.blog-card__pic)::before,
.blog-card--lead:has(.blog-card__pic)::after {
    display: none;
}

/* Теги в карточках блога */
.blog-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
}
.blog-card__tag {
    display: inline-flex;
    padding: 3px 8px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    text-decoration: none;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}
.blog-card__tag:hover { border-color: var(--terracotta); color: var(--terracotta); }
.blog-card--lead .blog-card__tag {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.72);
}
.blog-card--lead .blog-card__tag:hover {
    border-color: var(--ochre);
    color: #fff;
}

.blog-empty {
    grid-column: 1 / -1;
    padding: 40px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    color: var(--text-soft);
    text-align: center;
    font-size: 15px;
}


/* ===================== PAGING / LAZYLOAD ===================== */
.pageless-wrapper {
    padding-top: 32px;
    text-align: center;
    color: var(--text-mute);
    font-size: 14px;
    font-style: italic;
}
.pageless-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 22px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--graphite);
    font-size: 14px;
    font-weight: 600;
    font-style: normal;
    text-decoration: none;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}
.pageless-link:hover { border-color: var(--terracotta); color: var(--terracotta); }

.blog-paging {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.blog-paging li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.blog-paging li a:hover {
    border-color: var(--terracotta);
    color: var(--terracotta);
}
.blog-paging li.is-current a {
    background: var(--graphite);
    border-color: var(--graphite);
    color: #fff;
}


/* ===================== SINGLE POST ===================== */
.blog-post {
    margin: 0 0 var(--gap-section);
}

.hero--post .hero__content { text-align: center; }
.hero--post h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    margin: 0 0 24px;
    max-width: 26ch;
    margin-left: auto;
    margin-right: auto;
}

.blog-post__meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--text-mute);
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}
.blog-post__type {
    display: inline-flex;
    padding: 4px 10px;
    border: 1px solid var(--terracotta);
    color: var(--terracotta);
    font-weight: 700;
    background: rgba(241, 233, 216, 0.7);
}
.blog-post__date {
    color: var(--text-soft);
    font-weight: 600;
}

.blog-post__author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text-soft);
    position: relative;
    z-index: 2;
}
.blog-post__userpic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}


/* ===================== ARTICLE TYPOGRAPHY (full container width) ===================== */
.blog-article {
    padding-top: clamp(40px, 5vw, 64px);
}

/* Раньше тут был max-width: 760px, но это сужало контент.
   Теперь статья занимает всю ширину .container (1200px),
   как и остальные страницы сайта. */
.blog-article__content {
    color: var(--text);
    font-size: 17px;
    line-height: 1.75;
}
.blog-article__content > * + * { margin-top: 22px; }
.blog-article__content h2 {
    margin: 56px 0 18px;
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--graphite);
    letter-spacing: -0.01em;
}
.blog-article__content h3 {
    margin: 40px 0 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--graphite);
}
.blog-article__content h4 {
    margin: 32px 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--graphite);
}
.blog-article__content p { margin: 0 0 22px; }
.blog-article__content ul,
.blog-article__content ol { margin: 0 0 22px; padding-left: 24px; }
.blog-article__content li { margin-bottom: 8px; }
.blog-article__content li::marker { color: var(--terracotta); }
.blog-article__content a:not(.btn) {
    color: var(--terracotta);
    border-bottom: 1px solid rgba(184, 87, 66, 0.3);
    transition: border-color .2s var(--ease);
}
.blog-article__content a:not(.btn):hover { border-bottom-color: var(--terracotta); }
.blog-article__content strong { color: var(--graphite); font-weight: 700; }
.blog-article__content em { font-style: italic; }
.blog-article__content blockquote {
    margin: 32px 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--terracotta);
    font-size: 19px;
    line-height: 1.55;
    color: var(--text-soft);
    font-style: italic;
}
.blog-article__content blockquote p { margin-bottom: 8px; }
.blog-article__content img {
    max-width: 100%;
    height: auto;
    margin: 32px auto;
    border-radius: 4px;
}
.blog-article__content iframe { max-width: 100%; margin: 32px 0; }
.blog-article__content code {
    padding: 2px 6px;
    background: var(--cream-soft);
    border-radius: 3px;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
    color: var(--graphite);
}
.blog-article__content pre {
    margin: 28px 0;
    padding: 20px 24px;
    background: var(--graphite);
    border-radius: 6px;
    color: #E5E2D8;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.55;
}
.blog-article__content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}
.blog-article__content hr {
    margin: 48px 0;
    border: 0;
    border-top: 1px solid var(--line);
}
.blog-article__content table {
    width: 100%;
    margin: 28px 0;
    border-collapse: collapse;
    font-size: 15px;
}
.blog-article__content th,
.blog-article__content td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.blog-article__content th {
    background: var(--cream-soft);
    font-weight: 700;
    color: var(--graphite);
}


/* ===================== POST FOOTER — теги (Webasyst tag plugin: div.tags-section > ul.chips.tags) ===================== */
/* Важно: Webasyst wa-2.0.css перезаписывает .chips и .smaller — нужны !important на ключевых свойствах */
.blog-article .tags-section {
    margin-top: 48px;
    padding-top: 24px;
    padding-bottom: 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}
.blog-article .tags-section > p {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mute);
    white-space: nowrap;
}
/* Сброс Webasyst: ul.chips { margin: 1em 0; line-height: 2.5em } и .smaller { font-size: 75% } */
.blog-article .chips.tags {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
    font-size: 14px !important;
}
.blog-article .chips.tags > li {
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
}
/* Сброс Webasyst: ul.chips > li > a { background: var(--chips-background-color); color: var(--menu-link-color); margin-right: 0.25em !important } */
.blog-article .chips.tags > li > a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    border: 1px solid var(--line-strong) !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-soft) !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-right: 0 !important;
    white-space: nowrap;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}
.blog-article .chips.tags > li > a:hover {
    border-color: var(--terracotta) !important;
    color: var(--terracotta) !important;
    background: rgba(184,87,66,.05) !important;
}
.blog-article .chips.tags .fas,
.blog-article .chips.tags [class^="fa"] { display: none !important; }

/* ===================== PHOTO ALBUM ATTACHMENT ===================== */
.photo-album-attachment { margin: 40px 0 0; }
.photo-album-attachment ul.thumbs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.photo-album-attachment ul.thumbs li { margin: 0; }
.photo-album-attachment ul.thumbs a {
    display: block;
    overflow: hidden;
    border-radius: 3px;
    transition: transform .2s var(--ease);
}
.photo-album-attachment ul.thumbs a:hover { transform: scale(1.03); }
.photo-album-attachment ul.thumbs img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}


/* ===================== STATIC PAGE (inside blog app) ===================== */
.blog-page-static__sublinks {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.blog-page-static__sublinks a {
    display: inline-flex;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}
.blog-page-static__sublinks a:hover { border-color: var(--terracotta); color: var(--terracotta); }


/* ===================== COMMENTS (full container width) ===================== */
.comments {
    margin: clamp(24px, 3vw, 36px) 0 0;
    padding-top: 0;
}
.comments__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}
.comments__count {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--graphite);
    letter-spacing: -0.005em;
}
.comments ul {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.comments ul:empty { margin: 0; }
.comments ul li { margin-bottom: 16px; }
.comments ul li ul {
    margin: 16px 0 0;
    padding-left: 28px;
    border-left: 2px solid var(--line);
}

.comment {
    padding: 20px 22px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.comment.new {
    background: rgba(184, 87, 66, 0.08);
    border-color: rgba(184, 87, 66, 0.3);
}
.comment .credentials {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.comment .userpic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.comment .username {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--graphite);
}
.comment .staff {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--terracotta);
    color: #fff;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.comment .date {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-mute);
}
.comment .text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    word-break: break-word;
}
.comment .text p { margin: 0 0 10px; }
.comment .actions {
    margin-top: 12px;
    font-size: 12.5px;
}
.comment .actions a {
    color: var(--terracotta);
    text-decoration: none;
    font-weight: 600;
}
.comment .actions a:hover { text-decoration: underline; }


/* ===================== COMMENT FORM ===================== */
.comment-form {
    margin: 0;
    padding: 28px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.comment-form h4 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--graphite);
}
.comment-form-fields p {
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.comment-form-fields label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.comment-form-fields input[type="text"],
.comment-form-fields input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    transition: border-color .2s var(--ease);
}
.comment-form-fields input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--terracotta);
}
.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}
.comment-form .userpic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}
.comment-form .comment-submit {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.comment-form .comment-submit input[type="submit"] {
    height: 40px;
    padding: 0 24px;
    background: var(--terracotta);
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s var(--ease);
    align-self: flex-start;
}
.comment-form .comment-submit input[type="submit"]:hover { background: var(--terracotta-2); }

/* ---- Captcha layout ---- */
/* .comment-submit остаётся horizontal flex: [captcha] [submit] в ряд */
.comment-form .comment-submit {
    align-items: flex-start;
}

.comment-form .wa-captcha { margin: 0; }

/* Первый <p>: изображение и поле ввода в одну строку */
.comment-form .wa-captcha > p:first-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
}
/* Второй <p>: ссылка Обновить — отдельной строкой под капчей */
.comment-form .wa-captcha > p:last-of-type { margin: 0; }

/* Hide the → arrow */
.comment-form .wa-captcha strong { display: none; }

.comment-form .wa-captcha-img {
    display: block;
    border: 1px solid var(--line);
    border-radius: 4px;
    height: 40px;
    width: auto;
}

.comment-form .wa-captcha-input {
    width: 120px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--text);
}
.comment-form .wa-captcha-input:focus {
    outline: none;
    border-color: var(--terracotta);
}

.comment-form .wa-captcha-refresh {
    font-size: 12px;
    color: var(--text-mute);
    text-decoration: none;
    border-bottom: 1px dashed var(--line);
    transition: color .15s, border-color .15s;
}
.comment-form .wa-captcha-refresh:hover {
    color: var(--terracotta);
    border-color: var(--terracotta);
}

/* ---- Reading time (in post hero) ---- */
.blog-post__readtime {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(30, 33, 40, 0.45);
}
.blog-post__readtime::before {
    content: '·';
    margin-right: 8px;
    opacity: 0.5;
}

/* ---- Table of contents ---- */
.article-toc {
    background: rgba(241, 233, 216, 0.45);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 36px;
    max-width: 520px;
}
.article-toc__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-mute);
    margin: 0 0 10px;
}
.article-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.article-toc__list > li {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.45;
}
.article-toc__list > li::before { display: none; }
.article-toc__list a {
    color: var(--graphite);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
}
.article-toc__list a:hover {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}
.article-toc__sub {
    margin: 4px 0 2px;
    padding-left: 16px;
    list-style: none;
    border-left: 2px solid var(--line);
}
.article-toc__sub li {
    font-size: 13px;
    margin-bottom: 3px;
    line-height: 1.4;
}
.article-toc__sub li::before { display: none; }
.article-toc__sub a { color: var(--text-mute); }

.auth-type {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.auth-type li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s var(--ease);
}
.auth-type li a:hover { border-color: var(--terracotta); }
.auth-type li.selected a { background: var(--graphite); color: #fff; border-color: var(--graphite); }
.auth-type li a img { width: 14px; height: 14px; }


/* ===================== SUBSCRIBE / RSS link ===================== */
.blog-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line);
}
.blog-actions__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 360px;
    padding: 10px 14px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.blog-actions__search input {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    outline: none;
    color: var(--text);
}
.blog-actions__search input::placeholder { color: var(--text-mute); }
.blog-actions__search button {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--text-soft);
    padding: 0;
    line-height: 0;
}
.blog-actions__search button:hover { color: var(--terracotta); }
.blog-actions__rss {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}
.blog-actions__rss:hover { color: var(--terracotta); }


/* ===================== WELCOME (empty blog state) ===================== */
.blog-welcome {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 80px 24px;
}
.blog-welcome h1 {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    color: var(--graphite);
    margin: 0 0 16px;
}
.blog-welcome p {
    font-size: 16px;
    color: var(--text-soft);
    margin: 0;
}


/* ===================== RESPONSIVE ===================== */

@media (max-width: 980px) {
    .blog-grid,
    .blog-grid--featured {
        grid-template-columns: 1fr 1fr;
    }
    .blog-grid--featured > .blog-card:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .blog-grid,
    .blog-grid--featured {
        grid-template-columns: 1fr;
    }
    .blog-grid--featured > .blog-card:first-child { grid-column: auto; }
    .blog-card--lead .blog-card__title { font-size: 22px; }
    .blog-article__content { font-size: 16px; }
    .blog-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .blog-actions__search { max-width: none; }
    .comment-form { padding: 20px; }
    .comments ul li ul { padding-left: 16px; }
}


/* ===================== MASONRY GRID ===================== */

.blog-masonry {
    columns: 3;
    column-gap: 16px;
}

.blog-masonry .blog-card {
    break-inside: avoid;
    page-break-inside: avoid;
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

.blog-masonry .blog-card__link {
    height: auto;
    min-height: 0;
}

.blog-masonry .blog-card--lead .blog-card__link {
    min-height: 280px;
}

@media (max-width: 980px) {
    .blog-masonry { columns: 2; }
}

@media (max-width: 560px) {
    .blog-masonry { columns: 1; }
    .blog-masonry .blog-card--lead .blog-card__title { font-size: 22px; }
}


/* ===================== AUTHOR PAGE ===================== */

.hero--author { margin-bottom: 0; }

.author-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
}

.author-hero__photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.author-hero__photo--placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--graphite-2);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-hero__photo--placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

.author-hero__info { min-width: 0; }

.author-hero__info h1 {
    font-size: clamp(26px, 3vw, 36px);
    margin: 0 0 8px;
    line-height: 1.2;
}

.author-hero__info p {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.72);
    max-width: 52ch;
    line-height: 1.55;
}

.author-hero__role {
    font-size: 13px !important;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55) !important;
    margin-bottom: 10px !important;
}

.author-hero__bio {
    margin-top: 12px !important;
    font-size: 15px !important;
    color: rgba(255,255,255,0.65) !important;
}

.author-posts-head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.author-posts-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--graphite);
    letter-spacing: -0.005em;
}

@media (max-width: 560px) {
    .author-hero { flex-direction: column; align-items: flex-start; }
}


/* ===================== TAG PAGE ===================== */

.tag-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--cream-soft);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--graphite);
    letter-spacing: 0.04em;
    margin-top: 12px;
}

.tag-hero__label::before {
    content: "#";
    color: var(--terracotta);
    font-weight: 700;
}


/* ===================== INLINE POST ILLUSTRATION ===================== */

.blog-article__content figure.post-illustration {
    float: right;
    width: 46%;
    margin: 6px 0 28px 36px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.blog-article__content figure.post-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article__content::after {
    content: '';
    display: table;
    clear: both;
}

@media (max-width: 680px) {
    .blog-article__content figure.post-illustration {
        float: none;
        width: 100%;
        margin: 32px 0;
    }
}