/*
 * Insights (archive-notification.php, taxonomy-rm_insight_kind.php,
 * parts/insights-archive.php, parts/insight-card.php): head as on Publications
 * (title 69/400/1 ls -3px with the red accent, intro 20/300 grey), kind chips
 * (the shared outline pill; the current one filled black) with the RSS link,
 * the page's first item large (image | copy), the other 12 as white cards in a
 * lavender .rm-panel (3 columns, compact image-left rows below 768) with the
 * pager inside it, then the newsletter sign-up. Head, filters, lead and panel
 * content sit on the --rm-content column inside the 1440 frame (--rm-bleed).
 * parts/insight-card.php is shared with the single page's related cards.
 */

.rm-insights {
    padding: 0 calc(var(--rm-bleed) + var(--rm-gutter));
    color: var(--rm-black);
    font-family: var(--rm-font);
}

.rm-insights__head,
.rm-insights__filters,
.rm-insights__lead,
.rm-insights__empty,
.rm-insights__signup {
    max-width: var(--rm-content);
    margin-right: auto;
    margin-left: auto;
}

/* Head */
.rm-insights__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 80px 0 40px;
}

.rm-insights__title {
    max-width: 900px;
    margin: 0;
    color: var(--rm-black);
    font-size: 69px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -3px;
}

.rm-insights__title .rm-accent {
    color: var(--rm-red);
}

.rm-insights__intro {
    max-width: 62ch;
    margin: 0;
    color: var(--rm-grey);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.4;
}

/* Kind chips and feed */
.rm-insights__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rm-grey-medium);
}

.rm-insights__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rm-insights__chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid rgba(41, 41, 41, .3);
    border-radius: 80px;
    color: var(--rm-black);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .4s, color .4s, border-color .4s;
}

.rm-insights__chip:hover,
.rm-insights__chip:focus-visible {
    border-color: var(--rm-black);
}

.rm-insights__chip.is-current {
    border-color: var(--rm-black);
    background: var(--rm-black);
    color: var(--rm-white);
}

.rm-insights__count {
    color: var(--rm-grey);
    font-size: 15px;
}

.rm-insights__chip.is-current .rm-insights__count {
    color: #BBB;
}

.rm-insights__feed {
    color: var(--rm-grey);
    font-size: var(--rm-type-16l);
    font-weight: 300;
    text-decoration: none;
}

.rm-insights__feed::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border-radius: 3px;
    background: currentColor;
    vertical-align: -1px;
}

.rm-insights__feed:hover,
.rm-insights__feed:focus-visible {
    color: var(--rm-black);
}

.rm-insights__empty {
    padding: 56px 0 90px;
    color: var(--rm-grey);
    font-size: var(--rm-type-20l);
    font-weight: 300;
}

/* Cards */
.rm-insight-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rm-insight-card__art {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: var(--rm-lavender);
}

.rm-insight-card__art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rm-insight-card__art.is-placeholder::after {
    content: "";
    position: absolute;
    inset: 22% 14% 0;
    border-radius: 14px 14px 0 0;
    background: var(--rm-white);
    box-shadow: 0 10px 30px rgba(94, 85, 252, .18);
}

.rm-insight-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.rm-insight-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rm-insight-card__meta li {
    padding: 5px 14px;
    border-radius: 80px;
    background: var(--rm-lavender);
    font-size: 14px;
    line-height: 1.3;
}

.rm-insight-card__meta .rm-insight-card__kind {
    background: var(--rm-black);
    color: var(--rm-white);
}

.rm-insight-card__title {
    margin: 0;
    font-size: var(--rm-type-24);
    font-weight: 400;
    line-height: 1.2;
}

.rm-insight-card__link {
    color: inherit;
    text-decoration: none;
}

.rm-insight-card__link:hover,
.rm-insight-card__link:focus-visible {
    text-decoration: underline;
}

.rm-insight-card__excerpt {
    margin: 0;
    color: var(--rm-grey);
    font-size: var(--rm-type-16l);
    font-weight: 300;
    line-height: 1.4;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* Small cards: the whole card is the title link */
.rm-insights__grid .rm-insight-card {
    gap: 16px;
    padding: 12px 12px 26px;
    border-radius: 25px;
    background: var(--rm-white);
}

.rm-insights__grid .rm-insight-card__body {
    padding: 0 12px;
}

.rm-insights__grid .rm-insight-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.rm-insights__grid .rm-insight-card__link:focus-visible {
    outline: 2px solid var(--rm-blurple);
    outline-offset: -2px;
    border-radius: 25px;
}

/* First item, large */
.rm-insights__lead {
    padding: 44px 0 56px;
}

.rm-insight-card--large {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 48px;
}

.rm-insight-card--large .rm-insight-card__art {
    grid-column: 2;
    grid-row: 1;
    border-radius: 25px;
}

.rm-insight-card--large .rm-insight-card__body {
    grid-column: 1;
    grid-row: 1;
    gap: 18px;
}

.rm-insight-card--large .rm-insight-card__title {
    font-size: var(--rm-type-45);
    line-height: 1.05;
    letter-spacing: -1px;
}

.rm-insight-card--large .rm-insight-card__excerpt {
    font-size: var(--rm-type-20l);
    line-height: 1.4;
}

.rm-insight-card--large .rm-insight-card__more {
    margin-top: 8px;
    padding: 16px 26px;
    font-size: 18px;
}

/* Panel with the grid and the pager */
.rm-insights__panel.rm-panel {
    margin: 0;
    padding: 60px max(40px, calc((100% - var(--rm-content)) / 2));
}

.rm-insights__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Pager */
.rm-insights__pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
}

.rm-insights__grid + .rm-insights__pager {
    margin-top: 40px;
}

.rm-insights__step {
    padding: 10px 22px;
}

.rm-insights__step.is-disabled {
    opacity: .35;
    cursor: default;
}

.rm-insights__pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rm-insights__num,
.rm-insights__gap {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 80px;
    color: var(--rm-black);
    font-size: 18px;
    font-weight: 300;
    text-decoration: none;
}

.rm-insights__num:hover,
.rm-insights__num:focus-visible {
    background: var(--rm-white);
}

.rm-insights__num.is-current {
    background: var(--rm-black);
    color: var(--rm-white);
}

.rm-insights__of {
    display: none;
    margin: 0;
    color: var(--rm-grey);
    font-size: var(--rm-type-16l);
    font-weight: 300;
}

/* Sign-up closer */
.rm-insights__signup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    padding: 70px 0 90px;
}

.rm-insights__signup-title {
    margin: 0 0 12px;
    font-size: var(--rm-type-45);
    font-weight: 400;
    line-height: 1.05;
}

.rm-insights__signup-text {
    margin: 0;
    color: var(--rm-grey);
    font-size: var(--rm-type-18l);
    font-weight: 300;
    line-height: 1.4;
}

.rm-insights__signup .rm-form .rm-form__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
}

.rm-insights__signup .rm-field:nth-child(3) {
    grid-column: 1 / -1;
}

.rm-insights__signup .rm-form .rm-form__submit {
    padding: 16px 28px;
    border-radius: 30px;
    background: var(--rm-blurple);
    font-family: var(--rm-font-helvetica);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

@media (max-width: 1024px) {
    .rm-insights__title {
        font-size: 56px;
        letter-spacing: -2px;
    }

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

@media (max-width: 767px) {
    .rm-insights__head {
        gap: 14px;
        padding: 44px 0 28px;
    }

    .rm-insights__title {
        font-size: 41px;
        letter-spacing: -1.5px;
    }

    .rm-insights__filters {
        padding-bottom: 0;
        border: 0;
    }

    .rm-insights__chips {
        flex-wrap: nowrap;
        width: 100%;
        margin: 0 -10px;
        padding: 0 10px 4px;
        overflow-x: auto;
    }

    .rm-insights__chip {
        padding: 7px 16px;
        font-size: 16px;
    }

    .rm-insights__feed {
        display: none;
    }

    .rm-insights__lead {
        padding: 26px 0 36px;
    }

    .rm-insight-card--large {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .rm-insight-card--large .rm-insight-card__art {
        grid-column: 1;
        grid-row: 1;
    }

    .rm-insight-card--large .rm-insight-card__body {
        grid-column: 1;
        grid-row: 2;
        gap: 12px;
    }

    .rm-insight-card--large .rm-insight-card__title {
        font-size: var(--rm-type-28);
        letter-spacing: -.5px;
    }

    .rm-insight-card--large .rm-insight-card__excerpt {
        font-size: var(--rm-type-16l);
    }

    .rm-insights__panel.rm-panel {
        padding: 36px 14px;
        border-radius: 30px;
    }

    .rm-insights__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .rm-insights__grid .rm-insight-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 10px;
        border-radius: 20px;
    }

    .rm-insights__grid .rm-insight-card__art {
        flex: none;
        width: 104px;
        aspect-ratio: 1;
        border-radius: 14px;
    }

    .rm-insights__grid .rm-insight-card__body {
        gap: 6px;
        min-width: 0;
        padding: 2px 4px 0 0;
    }

    .rm-insights__grid .rm-insight-card__title {
        font-size: 17.3px;
    }

    .rm-insights__grid .rm-insight-card__excerpt {
        display: none;
    }

    .rm-insights__grid .rm-insight-card__meta li {
        padding: 3px 10px;
        font-size: 12px;
    }

    .rm-insights__pages {
        display: none;
    }

    .rm-insights__of {
        display: block;
    }

    .rm-insights__step {
        padding: 9px 18px;
        font-size: 16px;
    }

    .rm-insights__signup {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 44px 0 56px;
    }

    .rm-insights__signup .rm-form .rm-form__fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .rm-insights__signup .rm-form .rm-form__submit {
        width: 100%;
    }
}

/* == Single == (single-notification.php: hero, wide image, body + aside, related panel, sign-up) */
.rm-insight {
    padding: 0 calc(var(--rm-bleed) + var(--rm-gutter));
    color: var(--rm-black);
    font-family: var(--rm-font);
}

.rm-insight__hero,
.rm-insight__art,
.rm-insight__article {
    max-width: var(--rm-content);
    margin-right: auto;
    margin-left: auto;
}

.rm-insight__hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 48px 0 36px;
}

.rm-insight__hero > * {
    max-width: 900px;
}

.rm-insight__back {
    color: var(--rm-grey);
    font-size: var(--rm-type-16l);
    font-weight: 300;
    text-decoration: none;
}

.rm-insight__back::before {
    content: "\2190";
    margin-right: 8px;
}

.rm-insight__back:hover,
.rm-insight__back:focus-visible {
    color: var(--rm-black);
    text-decoration: underline;
}

.rm-insight__meta .rm-insight-card__kind a {
    color: inherit;
    text-decoration: none;
}

.rm-insight__meta .rm-insight-card__kind a:hover,
.rm-insight__meta .rm-insight-card__kind a:focus-visible {
    text-decoration: underline;
}

.rm-insight__title {
    margin: 0;
    font-size: 60px;
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -2px;
}

.rm-insight__lead {
    max-width: 60ch;
    margin: 0;
    color: var(--rm-grey);
    font-size: 22px;
    font-weight: 300;
    line-height: 1.4;
}

.rm-insight__art {
    overflow: hidden;
    aspect-ratio: 21 / 9;
    border-radius: 25px;
    background: var(--rm-lavender);
}

.rm-insight__art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rm-insight__article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 80px;
    padding: 56px 0 80px;
}

.rm-insight__body {
    max-width: 68ch;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.rm-insight__body > :first-child {
    margin-top: 0;
}

.rm-insight__body h2,
.rm-insight__body h3,
.rm-insight__body h4 {
    margin: 36px 0 16px;
    font-weight: 400;
    line-height: 1.15;
}

.rm-insight__body h2 {
    font-size: 36px;
}

.rm-insight__body h3 {
    font-size: 30px;
}

.rm-insight__body h4 {
    font-size: 28px;
}

.rm-insight__body p {
    margin: 0 0 18px;
}

.rm-insight__body ul,
.rm-insight__body ol {
    margin: 0 0 22px;
    padding-left: 22px;
}

.rm-insight__body li {
    margin-bottom: 6px;
}

.rm-insight__body a {
    color: var(--rm-blurple);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rm-insight__body strong {
    font-weight: 500;
}

.rm-insight__body .rm-table {
    overflow-x: auto;
    margin: 6px 0 24px;
    border: 1px solid var(--rm-grey-medium);
    border-radius: 20px;
}

.rm-insight__body .rm-table table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.4;
}

.rm-insight__body .rm-table th {
    padding: 12px 16px;
    background: var(--rm-lavender);
    font-weight: 500;
    text-align: left;
}

.rm-insight__body .rm-table td {
    padding: 11px 16px;
    border-top: 1px solid var(--rm-grey-medium);
}

.rm-insight__body .rm-table .is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rm-insight__aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-self: start;
    position: sticky;
    top: 100px;
}

.rm-insight__box {
    padding: 24px;
    border-radius: 25px;
    background: var(--rm-lavender);
}

.rm-insight__box-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 500;
}

.rm-insight__box-text {
    margin: 0 0 16px;
    color: var(--rm-grey);
    font-size: var(--rm-type-16l);
    font-weight: 300;
    line-height: 1.4;
}

.rm-insight__box .rm-btn {
    padding: 14px 24px;
    font-size: 18px;
}

.rm-insight__steps {
    display: grid;
    gap: 14px;
}

.rm-insight__step {
    color: var(--rm-black);
    font-size: var(--rm-type-16l);
    font-weight: 300;
    line-height: 1.35;
    text-decoration: none;
}

.rm-insight__step small {
    display: block;
    color: var(--rm-grey);
    font-size: 14px;
}

.rm-insight__step:hover,
.rm-insight__step:focus-visible {
    text-decoration: underline;
}

.rm-insight__related-title {
    margin: 0 0 28px;
    font-size: var(--rm-type-45);
    font-weight: 400;
    line-height: 1.05;
}

@media (max-width: 1023px) {
    .rm-insight__article {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .rm-insight__aside {
        position: static;
    }
}

@media (max-width: 767px) {
    .rm-insight__hero {
        gap: 16px;
        padding: 26px 0 22px;
    }

    .rm-insight__title {
        font-size: 34px;
        letter-spacing: -1px;
    }

    .rm-insight__lead {
        font-size: 17.8px;
    }

    .rm-insight__art {
        aspect-ratio: 4 / 3;
        border-radius: 20px;
    }

    .rm-insight__article {
        padding: 30px 0 46px;
    }

    .rm-insight__body {
        font-size: 17px;
    }

    .rm-insight__body h2 {
        font-size: 26px;
    }

    .rm-insight__body h3 {
        font-size: 24px;
    }

    .rm-insight__body h4 {
        font-size: 22px;
    }

    .rm-insight__related-title {
        margin-bottom: 20px;
        font-size: var(--rm-type-28);
    }
}
