/**
 * Happy Pens Archive — People & Pen Catalogue
 */

.hpc-pp-start-button,
.hpc-pp-catalogue-button,
.hpc-pp-random-story__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid #B08A52;
    border-radius: 3px;
    background: #B08A52;
    color: #FDFBF8 !important;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .055em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
}

.hpc-pp-start-button:hover,
.hpc-pp-start-button:focus-visible,
.hpc-pp-catalogue-button:hover,
.hpc-pp-catalogue-button:focus-visible {
    background: #171411;
    border-color: #171411;
    color: #FDFBF8 !important;
}

.hpc-pp-counts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 0px solid rgba(176, 138, 82, .35);
    border-bottom: 0px solid rgba(176, 138, 82, .35);
    background: #FAF8F5;
}

.hpc-pp-counts__item {
    display: grid;
    grid-template-columns: 52px auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 112px;
    padding: 22px 28px;
}

.hpc-pp-counts__item + .hpc-pp-counts__item {
    border-left: 1px solid rgba(176, 138, 82, .35);
}

.hpc-pp-counts__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    color: #B08A52;
}

.hpc-pp-counts__icon .hpc-icon {
    display: flex;

    width: 44px !important;
    height: 44px !important;

    max-width: none !important;
    max-height: none !important;
}

.hpc-pp-counts__icon .hpc-icon svg {
    display: block;

    width: 44px !important;
    height: 44px !important;

    max-width: none !important;
    max-height: none !important;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.hpc-pp-counts__number {
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: 40px;
    line-height: 1;
}

.hpc-pp-counts__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hpc-pp-counts__copy strong {
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: 16px;
    font-weight: 400;
}

.hpc-pp-counts__copy small {
    color: #5E5A55;
    font-size: 14px;
}

/* =========================================================
   PEOPLE & PEN — FIRST STORY
   ========================================================= */

.hpc-pp-first-story {
    /*
     * Главный регулятор высоты фотографий.
     *
     * Меняй только это значение:
     * 340px — ниже
     * 380px — средняя высота
     * 420px — выше
     */
    --hpc-pp-first-story-height: 330px;

    /*
     * Дополнительное расстояние между портретом и текстом.
     */
    --hpc-pp-first-story-text-indent: 12px;

    display: grid;

    /*
     * Колонки:
     * 1. Портрет — ширина автоматически рассчитывается
     *    из высоты с сохранением пропорции 3:4.
     * 2. Текст.
     * 3. Фото ручки.
     */
    grid-template-columns:
        calc(var(--hpc-pp-first-story-height) * 0.8)
        minmax(0, 0.9fr)
        minmax(0, 1.1fr);
 
    column-gap: 24px;
    align-items: stretch;

    padding: 16px;

    border: 1px solid rgba(176, 138, 82, .42);
    border-radius: 5px;
    background: #FDFBF8;

    box-shadow: 0 -4px 14px 0 rgba(23, 20, 17, 0.12);
    box-sizing: border-box;
}


/* =========================================================
   PHOTO WRAPPERS
   ========================================================= */

.hpc-pp-first-story__portrait-wrap,
.hpc-pp-first-story__pen-wrap {
    position: relative;

    width: 100%;
    height: var(--hpc-pp-first-story-height);

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    border-radius: 5px;
    background: #EFEAE2;

    box-sizing: border-box;
}


/* =========================================================
   IMAGES
   ========================================================= */

.hpc-pp-first-story__portrait,
.hpc-pp-first-story__pen-image,
.hpc-pp-first-story__portrait.is-placeholder,
.hpc-pp-first-story__pen-image.is-placeholder {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    object-fit: cover;
}

.hpc-pp-first-story__portrait {
    object-position: center top;
}

.hpc-pp-first-story__pen-image {
    object-position: center;
}


/* =========================================================
   STORY NUMBER
   ========================================================= */

.hpc-pp-first-story__number {
    position: absolute;
    left: 10px;
    bottom: 9px;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 28px;
    min-height: 24px;

    padding: 3px 6px;

    border: 1px solid rgba(253, 251, 248, .7);
    background: rgba(23, 20, 17, .72);

    color: #FDFBF8;

    font-family: "Libre Baskerville", serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;

    backdrop-filter: blur(4px);
    box-sizing: border-box;
}


/* =========================================================
   FIRST STORY — TEXT COLUMN
   ========================================================= */

.hpc-pp-first-story__content {
    /*
     * Главные рабочие регуляторы расстояний.
     */

    --hpc-pp-gap-eyebrow-title: 20px;
    --hpc-pp-gap-title-pen: 10px;
    --hpc-pp-gap-identity-story: 22px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;
    height: var(--hpc-pp-first-story-height);

    min-width: 0;
    min-height: 0;

    padding:
        20px
        0
        15px
        var(--hpc-pp-first-story-text-indent);

    box-sizing: border-box;
}


/* =========================================================
   MAIN TEXT STACK
   ========================================================= */

.hpc-pp-first-story__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;
    min-width: 0;

    gap: var(--hpc-pp-gap-identity-story);

    margin: 0;
    padding: 0;
}


/* =========================================================
   IDENTITY: LABEL → NAME → PEN
   ========================================================= */

.hpc-pp-first-story__identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   FIRST STORY LABEL
   ========================================================= */

.hpc-pp-first-story__eyebrow {
    display: block;

    margin: 0;
    padding: 0 0 var(--hpc-pp-gap-eyebrow-title);

    color: #B08A52;

    font-family: inherit;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .11em;
    text-transform: uppercase;

    box-sizing: border-box;
}


/* =========================================================
   PERSON NAME
   ========================================================= */

.hpc-pp-first-story__title {
    display: block;

    margin: 0;
    padding: 0 0 var(--hpc-pp-gap-title-pen);

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: clamp(20px, 2vw, 35px);
    font-style: normal;
    font-weight: 400;

    /*
     * Не ставить 0.
     * Это нормальная высота текстовой строки.
     */
    line-height: 1.12;

    letter-spacing: normal;
    text-transform: none;

    box-sizing: border-box;
}


/* =========================================================
   PEN NAME
   ========================================================= */

.hpc-pp-first-story__pen-name {
    display: block;

    margin: 0;
    padding: 0;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;

    box-sizing: border-box;
}


/* =========================================================
   STORY COPY
   ========================================================= */

.hpc-pp-first-story__story-copy {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   EXCERPT
   ========================================================= */

.hpc-pp-first-story__excerpt {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #B08A52;

    font-family: inherit;
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: normal;
    text-transform: none;

    box-sizing: border-box;
}

.hpc-pp-first-story__excerpt::before {
    content: "“";
}

.hpc-pp-first-story__excerpt::after {
    content: "”";
}

/* =========================================================
   STATUSES
   ========================================================= */

.hpc-pp-first-story__statuses {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    width: 100%;
    min-width: 0;

    gap: 12px 16px;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   SINGLE STATUS
   ========================================================= */

.hpc-pp-first-story__status {
    display: inline-flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 7px;

    margin: 0;
    padding: 0;

    color: #5E5A55;

    font-family: inherit;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .055em;
    text-transform: uppercase;

    white-space: nowrap;

    box-sizing: border-box;
}


/* =========================================================
   STATUS ICON
   ========================================================= */

.hpc-pp-first-story__status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 18px;

    width: 18px;
    height: 18px;

    color: #B08A52;
}

.hpc-pp-first-story__status-icon svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   STATUS LABEL
   ========================================================= */

.hpc-pp-first-story__status-label {
    display: inline-block;

    margin: 0;
    padding: 0;

    color: inherit;

    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}


/* =========================================================
   BUTTON
   ========================================================= */

.hpc-pp-first-story__button {
    flex: 0 0 auto;
    margin: 0;
}

.hpc-pp-first-story__bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;

    gap: 20px;
    margin-top: auto;
}

/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width: 1024px) {

    .hpc-pp-first-story {
        --hpc-pp-first-story-height: 340px;
        --hpc-pp-first-story-text-indent: 4px;

        grid-template-columns:
            calc(var(--hpc-pp-first-story-height) * 0.75)
            minmax(0, 1fr)
            minmax(0, .9fr);

        column-gap: 18px;
    }

    .hpc-pp-first-story__content {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .hpc-pp-first-story__title {
        font-size: clamp(24px, 3vw, 34px);
    }

    .hpc-pp-first-story__excerpt {
        font-size: 14px;
        line-height: 1.6;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 767px) {

    .hpc-pp-first-story {
        display: grid;
        grid-template-columns: 1fr;

        row-gap: 18px;
        column-gap: 0;

        padding: 12px;
    }

    .hpc-pp-first-story__portrait-wrap {
        width: min(100%, 300px);
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .hpc-pp-first-story__pen-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .hpc-pp-first-story__content {
        width: 100%;
        height: auto;

        padding: 4px 0 0;
    }

    .hpc-pp-first-story__title {
        font-size: 30px;
    }

    .hpc-pp-first-story__button {
        margin-top: 8px;
    }
}

.hpc-pp-random-story,
.hpc-pp-start-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 22px 30px;
    border: 1px solid rgba(176, 138, 82, .42);
    border-radius: 5px;
    background: #FDFBF8;
}

.hpc-pp-random-story__text,
.hpc-pp-start-strip__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hpc-pp-random-story__text strong,
.hpc-pp-start-strip__text strong {
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: 18px;
    font-weight: 400;
}

.hpc-pp-random-story__text span,
.hpc-pp-start-strip__text span {
    color: #5E5A55;
    font-size: 13px;
}

.hpc-pp-random-story__button {
    background: transparent;
    color: #B08A52 !important;
}

.hpc-pp-random-story__button:hover,
.hpc-pp-random-story__button:focus-visible {
    background: #B08A52;
    color: #FDFBF8 !important;
}

@media (max-width: 1024px) {
    .hpc-pp-counts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hpc-pp-counts__item:nth-child(3) {
        border-left: 0;
        border-top: 1px solid rgba(176, 138, 82, .35);
    }

    .hpc-pp-counts__item:nth-child(4) {
        border-top: 1px solid rgba(176, 138, 82, .35);
    }

    .hpc-pp-first-story {
        grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
        gap: 20px;
    }

    .hpc-pp-first-story__portrait-wrap {
        aspect-ratio: 3 / 4;
    }

    .hpc-pp-first-story__pen-wrap {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 7;
    }

    .hpc-pp-first-story__content {
        padding: 18px 0;
    }
}

@media (max-width: 680px) {
    .hpc-pp-counts {
        grid-template-columns: 1fr;
    }

    .hpc-pp-counts__item {
        min-height: 92px;
        padding: 18px 20px;
    }

    .hpc-pp-counts__item + .hpc-pp-counts__item {
        border-left: 0;
        border-top: 1px solid rgba(176, 138, 82, .35);
    }

    .hpc-pp-first-story {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 14px;
    }

    .hpc-pp-first-story__portrait-wrap {
        aspect-ratio: 3 / 4;
    }

    .hpc-pp-first-story__content {
        padding: 4px 2px 6px;
    }

    .hpc-pp-first-story__pen-wrap {
        aspect-ratio: 4 / 3;
    }

    .hpc-pp-random-story,
    .hpc-pp-start-strip {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }
}


/* =========================================================
   ALL STORIES
========================================================= */

.hpc-pp-all-stories {
    scroll-margin-top: 32px;
}

.hpc-pp-all-stories__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 14px;
}

.hpc-pp-all-stories__heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.hpc-pp-all-stories__heading h2 {
    margin: 0;
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 400;
    line-height: 1.1;
}

.hpc-pp-all-stories__heading p {
    margin: 0;
    color: #5E5A55;
    font-size: 14px;
    line-height: 1.5;
}

.hpc-pp-all-stories__actions {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 0 0 auto;
}

.hpc-pp-all-stories__start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #171411 !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .025em;
    text-decoration: none !important;
}

.hpc-pp-all-stories__start:hover,
.hpc-pp-all-stories__start:focus-visible {
    color: #B08A52 !important;
}

.hpc-pp-all-stories__total {
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: 17px;
    white-space: nowrap;
}

.hpc-pp-all-stories__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.hpc-pp-story-card {
    min-width: 0;
    border: 1px solid rgba(176, 138, 82, .34);
    border-radius: 5px;
    overflow: hidden;
    background: #FDFBF8;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hpc-pp-story-card:hover,
.hpc-pp-story-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(176, 138, 82, .65);
    box-shadow: 0 8px 22px rgba(23, 20, 17, .08);
}

.hpc-pp-story-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit !important;
    text-decoration: none !important;
}

.hpc-pp-story-card__image {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #EFEAE2;

}

.hpc-pp-story-card__cover,
.hpc-pp-story-card__cover.is-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.hpc-pp-story-card:hover .hpc-pp-story-card__cover {
    transform: scale(1.025);
}

.hpc-pp-story-card__number {
    position: absolute;
    right: 10px;
    bottom: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 24px;
    padding: 3px 6px;
    border: 1px solid rgba(253, 251, 248, .7);
    background: rgba(23, 20, 17, .72);
    color: #FDFBF8;
    font-family: "Libre Baskerville", serif;
    font-size: 12px;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.hpc-pp-story-card__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 13px 14px 12px;
}

.hpc-pp-story-card__pen {
    color: #171411;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.hpc-pp-story-card__footer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-width: 0;
    padding: 0 14px 14px;
}

.hpc-pp-story-card__avatar,
.hpc-pp-story-card__portrait,
.hpc-pp-story-card__portrait.is-placeholder {
    display: block;
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 3px;
}

.hpc-pp-story-card__avatar { overflow: hidden; background: #F5F1EA; }
.hpc-pp-story-card__portrait { object-fit: cover; }

.hpc-pp-story-card__identity {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-end;
    gap: 3px;
    min-width: 0;
    min-height: 60px;
}

.hpc-pp-story-card__name {
    margin: 0;
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.hpc-pp-story-card__country {
    color: #8E6D36;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.hpc-pp-all-stories__empty {
    margin: 0;
    padding: 28px;
    border: 1px solid rgba(176, 138, 82, .34);
    color: #5E5A55;
    text-align: center;
}

/* =========================================================
   PAGINATION
========================================================= */

.hpc-pp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    width: 100%;
    margin-top: 22px;
}


/* =========================================================
   PAGE NUMBERS
========================================================= */

.hpc-pp-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    margin: 0;
    padding: 0;
}


.hpc-pp-pagination__page,
.hpc-pp-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 32px;
    min-height: 32px;

    padding: 4px;

    color: #171411 !important;

    font-size: 12px;
    line-height: 1;

    text-decoration: none !important;
}


.hpc-pp-pagination__page:hover,
.hpc-pp-pagination__page:focus-visible {
    color: #B08A52 !important;
}


.hpc-pp-pagination__page.is-current {
    background: #B08A52;
    color: #FDFBF8 !important;
}


.hpc-pp-pagination__ellipsis {
    color: #5E5A55 !important;
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.hpc-pp-pagination__direction {
    display: inline-flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 8px;

    color: #5E5A55 !important;

    font-size: 12px;
    line-height: 1;

    text-decoration: none !important;

    white-space: nowrap;
}


.hpc-pp-pagination__direction:hover,
.hpc-pp-pagination__direction:focus-visible {
    color: #B08A52 !important;
}


.hpc-pp-pagination__direction.is-disabled {
    opacity: .42;
    cursor: default;
}

@media (max-width: 1100px) {
    .hpc-pp-all-stories__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .hpc-pp-all-stories__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .hpc-pp-all-stories__actions {
        width: 100%;
        justify-content: space-between;
    }

    .hpc-pp-all-stories__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .hpc-pp-pagination {
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .hpc-pp-pagination__pages {
        flex-wrap: wrap;
    }
}

@media (max-width: 470px) {
    .hpc-pp-all-stories__grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   BROWSE STORIES
========================================================= */

.hpc-pp-browse {
    scroll-margin-top: 32px;
}

.hpc-pp-browse__header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;

    gap: 10px 18px;

    margin-bottom: 24px;
}

.hpc-pp-browse__header h2 {
    margin: 0;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 400;
    line-height: 1.12;
}

.hpc-pp-browse__header p {
    margin: 0;

    color: #5E5A55;

    font-size: 14px;
    line-height: 1.5;
}

.hpc-pp-browse__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.hpc-pp-browse-card {
    min-width: 0;
    border: 1px solid rgba(176, 138, 82, .34);
    border-radius: 5px;
    box-shadow: 0 -4px 14px 2px rgba(23, 20, 17, 0.12);

    background: #FDFBF8;
}

.hpc-pp-browse-card__summary {
    display: flex;
    min-height: 120px;
    padding: 24px;
    flex-direction: column;
    cursor: pointer;
    list-style: none;
}

.hpc-pp-browse-card__summary::-webkit-details-marker {
    display: none;
}

.hpc-pp-browse-card__summary:focus-visible,
.hpc-pp-browse-card__random-link:focus-visible,
.hpc-pp-browse-value__summary:focus-visible,
.hpc-pp-browse-value__story:focus-visible {
    outline: 2px solid #B08A52;
    outline-offset: 3px;
}

.hpc-pp-browse-card__title {
    display: block;
    margin: 0;
    color: #171411;
    font-family: "Libre Baskerville", serif;
    font-size: 24px;
    line-height: 1.25;
}

.hpc-pp-browse-card__description {
    display: block;
    margin-top: 10px;
    color: #5E5A55;
    font-size: 13px;
    line-height: 1.55;
}

.hpc-pp-browse-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 26px;
    color: #5E5A55;
    font-size: 12px;
}

.hpc-pp-browse-card__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(176, 138, 82, .55);
    color: #B08A52;
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.hpc-pp-browse-card[open] .hpc-pp-browse-card__toggle {
    transform: rotate(45deg);
}

.hpc-pp-browse-card__panel {
    border-top: 1px solid rgba(176, 138, 82, .25);
    padding: 0 18px 18px;
}

.hpc-pp-browse__values {
    max-height: 480px;
    overflow: auto;
    overscroll-behavior: contain;
}

.hpc-pp-browse-value {
    border-bottom: 1px solid rgba(23, 20, 17, .09);
}

.hpc-pp-browse-value__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 4px;
    color: #171411;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.hpc-pp-browse-value__summary::-webkit-details-marker {
    display: none;
}

.hpc-pp-browse-value__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid rgba(176, 138, 82, .38);
    color: #5E5A55;
    font-size: 10px;
    font-weight: 500;
}

.hpc-pp-browse-value__stories {
    padding: 0 4px 12px 14px;
}

.hpc-pp-browse-value__story {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    color: #5E5A55 !important;
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none !important;
}

.hpc-pp-browse-value__story:hover {
    color: #B08A52 !important;
}

.hpc-pp-browse__empty {
    margin: 0;
    padding: 20px 4px 4px;
    color: #5E5A55;
    font-size: 12px;
}

.hpc-pp-browse-card--random {
    display: flex;
    min-height: 120px;
    padding: 24px;
    flex-direction: column;
    background:
        linear-gradient(
            145deg,
            rgba(176, 138, 82, .08),
            rgba(253, 251, 248, 0) 58%
        ),
        #FDFBF8;
}


.hpc-pp-browse-card__random-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 26px;
    color: #171411 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.hpc-pp-browse-card__random-link:hover {
    color: #B08A52 !important;
}

@media (max-width: 980px) {
    .hpc-pp-browse__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hpc-pp-browse__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 560px) {
    .hpc-pp-browse__grid {
        grid-template-columns: 1fr;
    }

    .hpc-pp-browse-card__summary,
    .hpc-pp-browse-card--random {
        min-height: 196px;
    }
}


/* =========================================================
   MOST VIEWED + STORY SPOTLIGHT ROW
========================================================= */


/* =========================================================
   MOST VIEWED
========================================================= */

.hpc-pp-most-viewed {
    /*
     * Расстояние между заголовком
     * MOST VIEWED STORIES и списком.
     */
    --hpc-pp-most-viewed-label-gap: 20px;

    width: 100%;
    height: 100%;
    min-height: 100%;

    padding: 20px 22px;

    border: 1px solid rgba(176, 138, 82, .42);
    border-radius: 5px;

    background: #FDFBF8;
    box-shadow: 0 -4px 14px 2px rgba(23, 20, 17, 0.12);

    box-sizing: border-box;
}


/* =========================================================
   MOST VIEWED LABEL
   Такой же уровень, как STORY SPOTLIGHT
========================================================= */

.hpc-pp-most-viewed__label {
    display: block;

    margin: 0 0 var(--hpc-pp-most-viewed-label-gap);
    padding: 0;

    color: #8E6D36;

    font-family: inherit;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;

    letter-spacing: .11em;
    text-transform: uppercase;

    box-sizing: border-box;
}


/* =========================================================
   MOST VIEWED LIST
========================================================= */

.hpc-pp-most-viewed__list {
    width: 100%;

    margin: 0;
    padding: 0;

    list-style: none;
}


/* =========================================================
   MOST VIEWED ITEM
========================================================= */

.hpc-pp-most-viewed__item {
    margin: 0;
    padding: 0;
}


.hpc-pp-most-viewed__item + .hpc-pp-most-viewed__item {
    border-top: 1px solid rgba(23, 20, 17, .09);
}


/* =========================================================
   MOST VIEWED LINK / ROW
========================================================= */

.hpc-pp-most-viewed__link {
    display: grid;

    grid-template-columns:
        24px
        58px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 13px;

    padding: 14px 0;

    color: #171411 !important;

    text-decoration: none !important;
}


.hpc-pp-most-viewed__link:hover strong {
    color: #B08A52;
}


.hpc-pp-most-viewed__link:focus-visible {
    outline: 2px solid #B08A52;
    outline-offset: 3px;
}


/* =========================================================
   MOST VIEWED RANK
========================================================= */

.hpc-pp-most-viewed__rank {
    color: #8E6D36;

    font-family: "Libre Baskerville", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
}


/* =========================================================
   MOST VIEWED IMAGE
========================================================= */

.hpc-pp-most-viewed__image-wrap {
    display: block;

    width: 58px;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    border-radius: 3px;

    background: #F5F1EA;
}


.hpc-pp-most-viewed__image,
.hpc-pp-most-viewed__image-wrap .is-placeholder {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   MOST VIEWED COPY
========================================================= */

.hpc-pp-most-viewed__copy {
    display: block;

    min-width: 0;
}


.hpc-pp-most-viewed__copy strong,
.hpc-pp-most-viewed__copy small {
    display: block;
}


.hpc-pp-most-viewed__copy strong {
    overflow: hidden;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.35;

    text-overflow: ellipsis;
    white-space: nowrap;

    transition: color .2s ease;
}


.hpc-pp-most-viewed__copy small {
    overflow: hidden;

    margin-top: 4px;

    color: #5E5A55;

    font-size: 13px;
    line-height: 1.4;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   MOST VIEWED VIEWS
========================================================= */

.hpc-pp-most-viewed__views {
    color: #5E5A55;

    font-size: 14px;
    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   MOST VIEWED EMPTY
========================================================= */

.hpc-pp-most-viewed__empty {
    margin: 0;
    padding: 0;

    color: #5E5A55;

    font-size: 13px;
    line-height: 1.65;
}


/* =========================================================
   STORY SPOTLIGHT
========================================================= */

.hpc-pp-story-spotlight {

    /*
     * =====================================================
     * ГЛАВНЫЕ РЕГУЛЯТОРЫ БЛОКА
     * =====================================================
     */

    /*
     * Пропорция портретного фото.
     */
    --hpc-pp-spotlight-image-ratio: 4 / 5;

    /*
     * Ширина фото относительно текстовой части.
     */
    --hpc-pp-spotlight-image-width: 40%;

    /*
     * Расстояние между фото и текстом.
     */
    --hpc-pp-spotlight-column-gap: 24px;

    /*
     * STORY SPOTLIGHT → основной контент.
     */
    --hpc-pp-spotlight-label-gap: 20px;

    /*
     * Name → Country.
     */
    --hpc-pp-spotlight-gap-name-country: 6px;

    /*
     * Country → Pen.
     */
    --hpc-pp-spotlight-gap-country-pen: 16px;

    /*
     * Identity → Excerpt.
     */
    --hpc-pp-spotlight-gap-identity-excerpt: 16px;

    /*
     * Внутренние отступы блока.
     */
    --hpc-pp-spotlight-padding-x: 22px;
    --hpc-pp-spotlight-padding-y: 20px;


    width: 100%;
    height: 100%;
    min-height: 100%;

    padding:
        var(--hpc-pp-spotlight-padding-y)
        var(--hpc-pp-spotlight-padding-x);

    border: 1px solid rgba(176, 138, 82, .42);
    border-radius: 5px;

    background: #FDFBF8;
    box-shadow: 0 -4px 14px 2px rgba(23, 20, 17, 0.12);

    box-sizing: border-box;
}


/* =========================================================
   STORY SPOTLIGHT LABEL
========================================================= */

.hpc-pp-story-spotlight__label {
    display: block;

    margin: 0 0 var(--hpc-pp-spotlight-label-gap);
    padding: 0;

    color: #8E6D36;

    font-family: inherit;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;

    letter-spacing: .11em;
    text-transform: uppercase;

    box-sizing: border-box;
}


/* =========================================================
   STORY SPOTLIGHT BODY
   IMAGE + CONTENT
========================================================= */

.hpc-pp-story-spotlight__body {
    display: grid;

    grid-template-columns:
        minmax(0, var(--hpc-pp-spotlight-image-width))
        minmax(0, 1fr);

    gap: var(--hpc-pp-spotlight-column-gap);

    align-items: stretch;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   STORY SPOTLIGHT IMAGE
========================================================= */

.hpc-pp-story-spotlight__image-wrap {
    position: relative;

    width: 100%;
    min-width: 0;

    aspect-ratio: var(--hpc-pp-spotlight-image-ratio);

    overflow: hidden;

    border-radius: 5px;

    background: #EFEAE2;
}


.hpc-pp-story-spotlight__image,
.hpc-pp-story-spotlight__image.is-placeholder {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    object-fit: cover;
    object-position: center top;
}


/* =========================================================
   STORY SPOTLIGHT CONTENT
========================================================= */

.hpc-pp-story-spotlight__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;

    min-width: 0;
    min-height: 0;

    margin: 0;
    padding: 4px 0 0;

    box-sizing: border-box;
}


/* =========================================================
   STORY SPOTLIGHT TEXT STACK
========================================================= */

.hpc-pp-story-spotlight__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;
    min-width: 0;

    gap: var(--hpc-pp-spotlight-gap-identity-excerpt);

    margin: 0;
    padding: 0;
}


/* =========================================================
   STORY SPOTLIGHT IDENTITY
========================================================= */

.hpc-pp-story-spotlight__identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   STORY SPOTLIGHT NAME
========================================================= */

.hpc-pp-story-spotlight__title {
    display: block;

    margin: 0;

    padding:
        0
        0
        var(--hpc-pp-spotlight-gap-name-country);

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: clamp(18px, 2vw, 28px);
    font-style: normal;
    font-weight: 400;
    line-height: 1.12;

    letter-spacing: normal;
    text-transform: none;

    box-sizing: border-box;
}


/* =========================================================
   STORY SPOTLIGHT COUNTRY
========================================================= */

.hpc-pp-story-spotlight__country {
    display: block;

    margin: 0;

    padding:
        0
        0
        var(--hpc-pp-spotlight-gap-country-pen);

    color: #5E5A55;

    font-family: inherit;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;

    letter-spacing: .055em;
    text-transform: uppercase;

    box-sizing: border-box;
}


/* =========================================================
   STORY SPOTLIGHT PEN
========================================================= */

.hpc-pp-story-spotlight__pen {
    display: block;

    margin: 0;
    padding: 0;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: 17px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;

    letter-spacing: normal;
    text-transform: none;

    box-sizing: border-box;
}


/* =========================================================
   STORY SPOTLIGHT EXCERPT
========================================================= */

.hpc-pp-story-spotlight__excerpt {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #8E6D36;

    font-family: inherit;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;

    letter-spacing: normal;
    text-transform: none;

    box-sizing: border-box;
}


.hpc-pp-story-spotlight__excerpt::before {
    content: "“";
}


.hpc-pp-story-spotlight__excerpt::after {
    content: "”";
}


/* =========================================================
   STORY SPOTLIGHT BOTTOM / BUTTON
========================================================= */

.hpc-pp-story-spotlight__bottom {
    display: flex;
    align-items: flex-start;

    width: 100%;

    margin-top: auto;
    padding-top: 20px;
}


.hpc-pp-story-spotlight__button {
    flex: 0 0 auto;

    margin: 0;

    background: #FDFBF8;
    border-color: #B08A52;

    color: #8E6D36 !important;
}

.hpc-pp-story-spotlight__button:hover,
.hpc-pp-story-spotlight__button:focus-visible {
    background: #B08A52;
    border-color: #B08A52;

    color: #FDFBF8 !important;
}


/* =========================================================
   SHARED FOCUS
========================================================= */

.hpc-pp-story-spotlight a:focus-visible {
    outline: 2px solid #B08A52;
    outline-offset: 3px;
}


/* =========================================================
   MOST VIEWED + STORY SPOTLIGHT — LABEL ICONS
========================================================= */

.hpc-pp-most-viewed__label,
.hpc-pp-story-spotlight__label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hpc-pp-most-viewed__label .hpc-icon,
.hpc-pp-story-spotlight__label .hpc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 28px;
    height: 28px;

    color: #B08A52;
}

.hpc-pp-most-viewed__label .hpc-icon svg,
.hpc-pp-story-spotlight__label .hpc-icon svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 760px) {

    .hpc-pp-story-spotlight {
        --hpc-pp-spotlight-image-width: 40%;
        --hpc-pp-spotlight-column-gap: 18px;
    }
}


/* =========================================================
   MOBILE — SPOTLIGHT
========================================================= */

@media (max-width: 560px) {

    .hpc-pp-story-spotlight__body {
        grid-template-columns: 1fr;
    }

    .hpc-pp-story-spotlight__image-wrap {
        width: min(100%, 320px);
    }

    .hpc-pp-story-spotlight__content {
        padding-top: 0;
    }

    .hpc-pp-story-spotlight__bottom {
        margin-top: 20px;
        padding-top: 0;
    }
}


/* =========================================================
   MOBILE — MOST VIEWED
========================================================= */

@media (max-width: 520px) {

    .hpc-pp-most-viewed {
        padding: 20px 18px;
    }

    .hpc-pp-most-viewed__link {
        grid-template-columns:
            20px
            50px
            minmax(0, 1fr);
    }

    .hpc-pp-most-viewed__image-wrap {
        width: 50px;
    }

    .hpc-pp-most-viewed__views {
        grid-column: 3;
    }
}

/* =========================================================
   MOST VIEWED + STORY SPOTLIGHT
   FORCE EQUAL HEIGHT
========================================================= */

/*
 * Сам Row: колонки должны растягиваться
 * по высоте самой высокой колонки.
 */
.hpc-pp-feature-row .kt-row-column-wrap {
    align-items: stretch !important;
}


/*
 * Обе Kadence Column растягиваем.
 */
.hpc-pp-feature-row .wp-block-kadence-column {
    align-self: stretch !important;
    height: 100% !important;
}


/*
 * Внутренний контейнер каждой колонки.
 */
.hpc-pp-feature-row .kt-inside-inner-col {
    display: flex !important;
    flex-direction: column !important;

    height: 100% !important;
    min-height: 100% !important;
}


/*
 * Любая промежуточная обёртка непосредственно вокруг
 * Most Viewed или Story Spotlight также растягивается.
 *
 * Это ловит shortcode wrapper независимо от того,
 * какой класс WordPress/Kadence ему присвоил.
 */
.hpc-pp-feature-row *:has(> .hpc-pp-most-viewed),
.hpc-pp-feature-row *:has(> .hpc-pp-story-spotlight) {
    display: flex !important;
    flex-direction: column !important;

    flex: 1 1 auto !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
}


/*
 * Финальные два наших блока.
 */
.hpc-pp-feature-row .hpc-pp-most-viewed,
.hpc-pp-feature-row .hpc-pp-story-spotlight {
    flex: 1 1 auto !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;

    box-sizing: border-box;
}

/* =========================================================
   READING NAVIGATION
   CONTINUE READING + GO TO A STORY
========================================================= */

.hpc-pp-reading-nav {

    /*
     * =====================================================
     * ГЛАВНЫЕ РЕГУЛЯТОРЫ
     * =====================================================
     */

    /* Внутренний вертикальный воздух. */
    --hpc-pp-reading-padding-y: 18px;

    /* Внутренний горизонтальный воздух. */
    --hpc-pp-reading-padding-x: 28px;

    /* Размер больших иконок. */
    --hpc-pp-reading-icon-size: 46px;

    /* Расстояние иконка → текст. */
    --hpc-pp-reading-icon-gap: 18px;

    /* Расстояние title → subtitle. */
    --hpc-pp-reading-title-gap: 5px;

    /* Левая / правая части. */
    --hpc-pp-reading-columns: 1fr 1fr;


    display: grid;

    grid-template-columns:
        var(--hpc-pp-reading-columns);

    width: 100%;

    border: 1px solid rgba(176, 138, 82, .42);
    border-radius: 5px;

    background: #FDFBF8;
    box-shadow: 0 -4px 14px 8px rgba(23, 20, 17, 0.12);

    box-sizing: border-box;
}


/* =========================================================
   SHARED SECTION
========================================================= */

.hpc-pp-reading-nav__section {
    display: grid;
    align-items: center;

    min-width: 0;

    padding:
        var(--hpc-pp-reading-padding-y)
        var(--hpc-pp-reading-padding-x);

    box-sizing: border-box;
}


/* =========================================================
   CONTINUE SIDE
========================================================= */

.hpc-pp-reading-nav__continue {
    grid-template-columns:
        var(--hpc-pp-reading-icon-size)
        minmax(0, 1fr)
        auto;

    gap: var(--hpc-pp-reading-icon-gap);
}


/* =========================================================
   GO TO STORY SIDE
========================================================= */

.hpc-pp-reading-nav__jump {
    position: relative;

    grid-template-columns:
        var(--hpc-pp-reading-icon-size)
        minmax(0, 1fr)
        auto;

    gap: var(--hpc-pp-reading-icon-gap);

    border-left: 1px solid rgba(176, 138, 82, .32);
}


/* =========================================================
   ICON
========================================================= */

.hpc-pp-reading-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: var(--hpc-pp-reading-icon-size);
    height: var(--hpc-pp-reading-icon-size);

    border: 1.5px solid rgba(176, 138, 82, .55);
    border-radius: 50%;

    color: #8E6D36;

    box-sizing: border-box;
}


.hpc-pp-reading-nav__icon .hpc-icon {
    display: flex;

    width: 100%;
    height: 100%;
}


.hpc-pp-reading-nav__icon svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   TITLE + DESCRIPTION
========================================================= */

.hpc-pp-reading-nav__identity {
    display: flex;
    flex-direction: column;

    min-width: 0;

    gap: var(--hpc-pp-reading-title-gap);

    margin: 0;
    padding: 0;
}


.hpc-pp-reading-nav__title {
    margin: 0;
    padding: 0;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: clamp(16px, 1.65vw, 22px);
    font-weight: 400;
    line-height: 1.15;
}


.hpc-pp-reading-nav__description {
    margin: 0;
    padding: 0;

    color: #5E5A55;

    font-size: 12px;
    line-height: 1.45;
}


/* =========================================================
   CONTINUE LINK
========================================================= */

.hpc-pp-reading-nav__continue-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    margin-left: 16px;
    padding: 0 18px;

    border: 1px solid #B08A52;
    border-radius: 3px;

    background: #FDFBF8;

    color: #8E6D36 !important;

    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    letter-spacing: .055em;
    text-transform: uppercase;
    text-decoration: none !important;

    white-space: nowrap;

    box-sizing: border-box;
}


.hpc-pp-reading-nav__continue-link:hover,
.hpc-pp-reading-nav__continue-link:focus-visible {
    background: #B08A52;
    border-color: #B08A52;

    color: #FDFBF8 !important;
}


/* =========================================================
   GO TO STORY FORM
========================================================= */

.hpc-pp-reading-nav__form {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-left: 12px;
}


.hpc-pp-reading-nav__input {
    width: 74px;
    height: 44px;

    margin: 0;
    padding: 0 14px;

    border: 1px solid rgba(176, 138, 82, .48);
    border-radius: 3px;

    background: #FDFBF8;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: 16px;
    line-height: 1;

    box-sizing: border-box;
}


.hpc-pp-reading-nav__input:focus {
    border-color: #B08A52;
    outline: 1px solid #B08A52;
    outline-offset: 1px;
}


.hpc-pp-reading-nav__go {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    height: 44px;

    margin: 0;
    padding: 0 18px;

    border: 1px solid #B08A52;
    border-radius: 3px;

    background: #B08A52;

    color: #FDFBF8;

    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;

    letter-spacing: .055em;
    text-transform: uppercase;

    cursor: pointer;

    box-sizing: border-box;
}


.hpc-pp-reading-nav__go:hover,
.hpc-pp-reading-nav__go:focus-visible {
    background: #8E6D36;
    border-color: #8E6D36;

    color: #FDFBF8;
}


/* =========================================================
   INVALID STORY NUMBER
========================================================= */

.hpc-pp-reading-nav__error {
    position: absolute;

    left: calc(
        var(--hpc-pp-reading-padding-x)
        + var(--hpc-pp-reading-icon-size)
        + var(--hpc-pp-reading-icon-gap)
    );

    bottom: 4px;

    color: #8E3B32;

    font-size: 10px;
    line-height: 1.2;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .hpc-pp-reading-nav {
        --hpc-pp-reading-padding-x: 20px;
        --hpc-pp-reading-icon-size: 40px;
        --hpc-pp-reading-icon-gap: 14px;

        grid-template-columns: 1fr 1fr;
    }

    .hpc-pp-reading-nav__continue {
        grid-template-columns:
            var(--hpc-pp-reading-icon-size)
            minmax(0, 1fr);
    }

    .hpc-pp-reading-nav__continue-link {
        grid-column: 2;

        margin-left: 0;
    }

    .hpc-pp-reading-nav__jump {
        grid-template-columns:
            var(--hpc-pp-reading-icon-size)
            minmax(0, 1fr);
    }

    .hpc-pp-reading-nav__form {
        grid-column: 2;

        margin-left: 0;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .hpc-pp-reading-nav {
        grid-template-columns: 1fr;
    }

    .hpc-pp-reading-nav__jump {
        border-left: 0;
        border-top: 1px solid rgba(176, 138, 82, .32);
    }

    .hpc-pp-reading-nav__continue,
    .hpc-pp-reading-nav__jump {
        grid-template-columns:
            var(--hpc-pp-reading-icon-size)
            minmax(0, 1fr);
    }

    .hpc-pp-reading-nav__continue-link,
    .hpc-pp-reading-nav__form {
        grid-column: 2;

        margin-left: 0;
    }

    .hpc-pp-reading-nav__error {
        position: static;

        grid-column: 2;

        margin-top: -6px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .hpc-pp-reading-nav {
        --hpc-pp-reading-padding-x: 16px;
    }

    .hpc-pp-reading-nav__form {
        width: 100%;
    }

    .hpc-pp-reading-nav__input {
        min-width: 0;
        width: 100%;
    }
}

/* =========================================================
   LATEST STORY
========================================================= */

.hpc-pp-latest-story {

    /*
     * =====================================================
     * ГЛАВНЫЕ РЕГУЛЯТОРЫ
     * =====================================================
     */

    /* Вертикальный внутренний воздух блока. */
    --hpc-pp-latest-padding-y: 18px;

    /* Горизонтальный внутренний отступ. */
    --hpc-pp-latest-padding-x: 28px;

    /* Размер иконки. */
    --hpc-pp-latest-icon-size: 46px;

    /* Title → description. */
    --hpc-pp-latest-title-gap: 5px;

    /* Расстояние между основными зонами. */
    --hpc-pp-latest-section-gap: 17px;


    display: grid;

    /* The boundary between the two equal halves stays at the card's centre. */
    grid-template-columns: repeat(2, minmax(0, 1fr));

    align-items: center;

    gap: 0;

    width: 100%;

    padding:
        var(--hpc-pp-latest-padding-y)
        var(--hpc-pp-latest-padding-x);

    border: 1px solid rgba(176, 138, 82, .42);
    border-radius: 5px;

    background: #FDFBF8;
    box-shadow: 0 -2px 14px 2px rgba(23, 20, 17, 0.12);

    box-sizing: border-box;
}

.hpc-pp-latest-story__left,
.hpc-pp-latest-story__right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.hpc-pp-latest-story__left {
    gap: var(--hpc-pp-latest-section-gap);
}

.hpc-pp-latest-story__right {
    position: relative;
    padding-left: 24px;
}

.hpc-pp-latest-story__right::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    height: 34px;
    border-left: 1px solid rgba(176, 138, 82, .32);
    transform: translateY(-50%);
}


/* =========================================================
   ICON
========================================================= */

.hpc-pp-latest-story__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: var(--hpc-pp-latest-icon-size);
    height: var(--hpc-pp-latest-icon-size);

    border: 1.5px solid rgba(176, 138, 82, .55);
    border-radius: 50%;

    color: #8E6D36;

    box-sizing: border-box;
}


.hpc-pp-latest-story__icon .hpc-icon {
    display: flex;

    width: 100%;
    height: 100%;
}


.hpc-pp-latest-story__icon svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   TITLE + DESCRIPTION
========================================================= */

.hpc-pp-latest-story__identity {
    display: flex;
    flex-direction: column;

    min-width: 0;
    flex: 1 1 auto;

    gap: var(--hpc-pp-latest-title-gap);

    margin: 0;
    padding: 0;
}


.hpc-pp-latest-story__title {
    margin: 0;
    padding: 0;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: clamp(16px, 1.65vw, 22px);
    font-weight: 400;
    line-height: 1.15;
}


.hpc-pp-latest-story__description {
    margin: 0;
    padding: 0;

    color: #5E5A55;

    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   STORY NUMBER
========================================================= */

.hpc-pp-latest-story__number {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 3px;

    flex: 0 0 auto;
    margin-left: 7px;
    padding-left: 24px;

    border-left: 1px solid rgba(176, 138, 82, .32);

    white-space: nowrap;
}


.hpc-pp-latest-story__number-label {
    color: #5E5A55;

    font-size: 10px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: .08em;
    text-transform: uppercase;
}


.hpc-pp-latest-story__number-value {
    color: #8E6D36;

    font-family: "Libre Baskerville", serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
}


/* =========================================================
   PUBLISHED DATE
========================================================= */

.hpc-pp-latest-story__published {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 3px;

    flex: 0 0 auto;
    margin-left: 7px;
    margin-right: 24px;
    padding-left: 24px;

    border-left: 1px solid rgba(176, 138, 82, .32);

    white-space: nowrap;
}


.hpc-pp-latest-story__published-label {
    color: #5E5A55;

    font-size: 10px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: .08em;
    text-transform: uppercase;
}


.hpc-pp-latest-story__published-value {
    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
}


/* =========================================================
   PERSON PORTRAIT
========================================================= */

.hpc-pp-latest-story__portrait {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 3px;
    background: #F5F1EA;
}

.hpc-pp-latest-story__portrait-image,
.hpc-pp-latest-story__portrait-image.is-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}


/* =========================================================
   PERSON + PEN
========================================================= */

.hpc-pp-latest-story__story {
    display: flex;
    flex-direction: column;

    min-width: 0;
    flex: 1 1 auto;
    margin-left: 9px;

    gap: 4px;
}


.hpc-pp-latest-story__person {
    overflow: hidden;

    color: #171411;

    font-family: "Libre Baskerville", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.hpc-pp-latest-story__pen {
    overflow: hidden;

    color: #5E5A55;

    font-size: 13px;
    line-height: 1.4;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   BUTTON
========================================================= */

.hpc-pp-latest-story__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    max-width: max-content;

    justify-self: end;

    flex: 0 0 auto;

    margin: 0 0 0 17px;

    background: #FDFBF8;
    border-color: #B08A52;

    color: #8E6D36 !important;

    white-space: nowrap;
}

.hpc-pp-latest-story__button:hover,
.hpc-pp-latest-story__button:focus-visible {
    background: #B08A52;
    border-color: #B08A52;

    color: #FDFBF8 !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .hpc-pp-latest-story {
        --hpc-pp-latest-padding-x: 22px;
        --hpc-pp-latest-icon-size: 40px;
        --hpc-pp-latest-section-gap: 18px;

        /*
         * На tablet:
         * Icon | Main Content | Button
         *
         * Story Number, Published, Portrait и Person/Pen
         * складываются вертикально под основным текстом.
         */
        grid-template-columns:
            var(--hpc-pp-latest-icon-size)
            minmax(0, 1fr)
            auto;

        align-items: center;
        gap: var(--hpc-pp-latest-section-gap);
    }

    .hpc-pp-latest-story__left,
    .hpc-pp-latest-story__right {
        display: contents;
    }

    .hpc-pp-latest-story__right::before {
        content: none;
    }


    .hpc-pp-latest-story__identity {
        grid-column: 2;
    }


    .hpc-pp-latest-story__number {
        grid-column: 2;

        margin-left: 0;
        padding-left: 0;

        border-left: 0;
    }


    .hpc-pp-latest-story__published {
        grid-column: 2;

        margin-left: 0;
        margin-right: 0;
        padding-left: 0;

        border-left: 0;
    }


    .hpc-pp-latest-story__portrait {
        grid-column: 2;
    }


    .hpc-pp-latest-story__story {
        grid-column: 2;

        margin-left: 0;
        padding-left: 0;

        border-left: 0;
    }


    .hpc-pp-latest-story__button {
        grid-column: 3;
        grid-row: 1 / 6;

        margin-left: 0;
        align-self: center;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {

    .hpc-pp-latest-story {
        grid-template-columns:
            var(--hpc-pp-latest-icon-size)
            minmax(0, 1fr);

        gap: 14px 16px;
    }


    .hpc-pp-latest-story__identity {
        grid-column: 2;
    }


    .hpc-pp-latest-story__number,
    .hpc-pp-latest-story__published,
    .hpc-pp-latest-story__portrait,
    .hpc-pp-latest-story__story,
    .hpc-pp-latest-story__button {
        grid-column: 2;
    }


    .hpc-pp-latest-story__number,
    .hpc-pp-latest-story__published,
    .hpc-pp-latest-story__story {
        padding-left: 0;

        border-left: 0;
    }


    .hpc-pp-latest-story__button {
        grid-row: auto;

        justify-self: start;
    }
}

/* =========================================================
   STORY SPOTLIGHT — TABLET PORTRAIT
========================================================= */

@media
(min-width: 561px)
and (max-width: 900px)
and (orientation: portrait) {

    .hpc-pp-story-spotlight__image-wrap {
        aspect-ratio: auto;

        height: 180px;
    }

    .hpc-pp-story-spotlight__image,
    .hpc-pp-story-spotlight__image.is-placeholder {
        width: 100%;
        height: 100%;

        object-fit: cover;
        object-position: center top;
    }
}