/* Focused QA fixes for the newsletter card and verified popular content. */

.kc-ref-feature--newsletter > h2,
.kc-ref-feature--newsletter > p,
.kc-ref-feature--newsletter form,
.kc-ref-feature--newsletter .kc-newsletter-message {
    position: relative;
    z-index: 4;
}

.kc-ref-feature--newsletter form {
    width: 100%;
    max-width: 340px;
}

.kc-ref-feature--newsletter .kc-newsletter-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.kc-ref-feature--newsletter input[type="email"] {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    opacity: 1;
    border: 1px solid rgba(112, 80, 122, .28);
    background: #fff;
    color: #473b49;
    -webkit-text-fill-color: #473b49;
    box-shadow: 0 7px 18px rgba(74, 55, 82, .12);
}

.kc-ref-feature--newsletter input[type="email"]::placeholder {
    color: #705f75;
    opacity: 1;
    -webkit-text-fill-color: #705f75;
}

/* Fail-safe styling if the form is deliberately disabled during maintenance. */
.kc-ref-feature--newsletter input:disabled {
    opacity: 1;
}

.kc-ref-feature--newsletter button {
    position: relative;
    z-index: 2;
    justify-self: start;
    min-width: 142px;
    margin-top: 0;
    cursor: pointer;
}

.kc-ref-feature--newsletter button:focus-visible,
.kc-ref-feature--newsletter input:focus-visible,
.kc-ref-feature--newsletter a:focus-visible {
    outline: 3px solid rgba(101, 72, 120, .38);
    outline-offset: 2px;
}

.kc-newsletter-consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    width: 100%;
    max-width: 340px;
    margin-top: 10px;
    color: #58495b;
    font-size: 11px;
    line-height: 1.45;
}

.kc-newsletter-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #7a5a88;
}

.kc-newsletter-consent a {
    color: #5c456c;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kc-newsletter-message {
    width: min(100%, 340px);
    margin: 0 0 10px !important;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 11px !important;
    line-height: 1.45 !important;
}

.kc-newsletter-message--success {
    background: rgba(255, 255, 255, .72);
    color: #365e45 !important;
}

.kc-newsletter-message--error {
    background: rgba(255, 242, 239, .88);
    color: #8c4038 !important;
}

.kc-newsletter-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.kc-ref-feature--newsletter img {
    z-index: 1;
    opacity: .72;
    pointer-events: none;
}

/* Give the popular cards a little more image area and keep each subject on its focal point. */
.kc-ref-article > img {
    height: 170px;
    object-fit: cover;
}

.kc-ref-article:nth-child(1) > img {
    object-position: 50% 24%;
}

.kc-ref-article:nth-child(2) > img {
    object-position: 50% 72%;
}

.kc-ref-article:nth-child(3) > img {
    object-position: 70% 48%;
}

.kc-ref-article:nth-child(4) > img {
    object-position: 52% 56%;
}

.kc-ref-article:nth-child(5) > img {
    object-position: 50% 32%;
}

.kc-ref-article__body {
    display: flex;
    min-height: 265px;
    flex-direction: column;
}

.kc-ref-article__sources {
    margin: 0 0 13px;
    padding-top: 11px;
    border-top: 1px solid #eee4dc;
}

.kc-ref-article__sources > strong {
    display: block;
    margin-bottom: 6px;
    color: #57473f;
    font-size: 10px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.kc-ref-article__sources ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kc-ref-article__sources li {
    margin: 0;
    line-height: 1.3;
}

.kc-ref-article__sources a {
    color: #66504a;
    font-size: 10px;
    text-decoration: underline;
    text-decoration-color: rgba(102, 80, 74, .28);
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.kc-ref-article__read {
    margin-top: auto;
    width: fit-content;
    font-weight: 700;
}

@media (max-width: 430px) {
    .kc-ref-feature--newsletter form,
    .kc-newsletter-message,
    .kc-newsletter-consent {
        width: 100%;
        max-width: 300px;
    }

    .kc-ref-feature--newsletter .kc-newsletter-form__row button {
        min-height: 44px;
    }

    .kc-newsletter-consent {
        font-size: 12px;
    }

    .kc-ref-feature--newsletter img {
        opacity: .5;
    }

    .kc-ref-article > img {
        height: 190px;
    }

    .kc-ref-article__body {
        min-height: 0;
    }

    .kc-ref-article__sources a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        font-size: 11px;
    }
}
