/* ==========================================================
   AFDES MONTHLY REVIEW — PUBLIC LIBRARY
========================================================== */

.mr-page {
    background: #f6f8fb;
    color: #0c1423;
}

.mr-hero {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
}

.mr-hero-inner {
    padding: clamp(42px, 7vw, 76px) 0;
}

.mr-eyebrow,
.mr-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.mr-eyebrow-dark {
    color: var(--primary);
}

.mr-hero h1 {
    margin: 0;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1;
}

.mr-hero p {
    max-width: 820px;
    margin: 18px 0 0;
    color: #475569;
    font-size: 1.15rem;
    line-height: 1.75;
}

.mr-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
}

.mr-hero-link span {
    color: var(--primary);
}

.mr-latest {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: clamp(34px, 6vw, 74px);
    align-items: center;
    padding-top: 58px;
    padding-bottom: 62px;
}

.mr-latest-cover,
.mr-issue-cover {
    min-width: 0;
}

.mr-latest-cover > a,
.mr-issue-cover {
    display: block;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 58px rgba(7, 24, 39, .16);
}

.mr-latest-cover img,
.mr-issue-cover > img,
.mr-card-cover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mr-latest-cover > a,
.mr-issue-cover,
.mr-card-cover {
    aspect-ratio: 8.5 / 11;
}

.mr-latest-copy {
    max-width: 760px;
}

.mr-issue-number {
    margin: 10px 0 0;
    color: #64748b;
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.mr-latest-copy h2,
.mr-library-heading h2,
.mr-section-heading h2,
.mr-not-found h1 {
    margin: 9px 0 12px;
    color: #071827;
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.35rem);
    letter-spacing: -.03em;
    line-height: 1.08;
}

.mr-latest-copy > p,
.mr-library-heading p,
.mr-section-heading p {
    color: #526274;
    line-height: 1.75;
}

.mr-theme,
.mr-issue-theme {
    color: #183a54 !important;
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.mr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.mr-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #0a93c3;
    padding: 11px 17px;
    font-weight: 900;
    text-decoration: none;
    transition: .2s ease;
}

.mr-btn-primary {
    background: #079bcf;
    color: #fff;
}

.mr-btn-secondary {
    background: #fff;
    color: #087fa8;
}

.mr-btn:hover {
    box-shadow: 0 8px 24px rgba(7, 24, 39, .10);
    transform: translateY(-1px);
}

.mr-library {
    padding-top: 46px;
    padding-bottom: 82px;
    border-top: 1px solid #dbe3ea;
}

.mr-library-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.mr-library-heading > div {
    max-width: 780px;
}

.mr-year-filter {
    display: grid;
    gap: 7px;
    min-width: 150px;
}

.mr-year-filter label {
    color: #64748b;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mr-year-filter select,
.mr-year-filter button {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 8px 12px;
    color: #0c1423;
    font: inherit;
    font-weight: 800;
}

.mr-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2.3vw, 30px);
}

.mr-card {
    min-width: 0;
}

.mr-card-cover {
    display: block;
    overflow: hidden;
    border: 1px solid #d5dde5;
    background: #fff;
    box-shadow: 0 14px 34px rgba(7, 24, 39, .10);
    transition: transform .22s ease, box-shadow .22s ease;
}

.mr-card:hover .mr-card-cover {
    box-shadow: 0 22px 46px rgba(7, 24, 39, .15);
    transform: translateY(-4px);
}

.mr-card-body {
    padding: 16px 2px 4px;
}

.mr-card-body > span {
    color: #087fa8;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mr-card-body h3 {
    margin: 7px 0 6px;
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.25;
}

.mr-card-body h3 a {
    color: #071827;
    text-decoration: none;
}

.mr-card-body p {
    margin: 0;
    color: #64748b;
    font-size: .84rem;
    font-weight: 700;
}

.mr-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 11px;
}

.mr-card-actions a,
.mr-highlight a,
.mr-empty a,
.mr-back-link {
    color: #087fa8;
    font-size: .84rem;
    font-weight: 900;
    text-decoration: none;
}

.mr-cover-placeholder {
    width: 100%;
    height: 100%;
    padding: clamp(22px, 5vw, 40px);
    background:
        radial-gradient(circle at 72% 68%, rgba(64, 186, 236, .24), transparent 30%),
        linear-gradient(155deg, #071827 0%, #0e2b43 60%, #124669 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mr-cover-placeholder img {
    width: min(78%, 260px);
    height: auto;
    object-fit: contain;
    object-position: left center;
    filter: none;
}

.mr-cover-placeholder span {
    margin-top: auto;
    padding-top: 30px;
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 900;
    line-height: 1.04;
}

.mr-cover-placeholder strong {
    margin-top: 13px;
    color: #73d0ef;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mr-cover-placeholder-small {
    padding: 18px;
}

.mr-cover-placeholder-small span {
    font-size: clamp(1rem, 2vw, 1.55rem);
}

.mr-cover-placeholder-small img {
    width: min(82%, 180px);
}

.mr-empty {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    border: 1px solid #dbe3ea;
    background: #fff;
    padding: clamp(28px, 5vw, 46px);
}

.mr-empty-mark {
    display: grid;
    min-height: 170px;
    place-items: center;
    background: #f0f7fa;
}

.mr-empty-mark img {
    width: min(82%, 180px);
    height: auto;
}

.mr-empty h3 {
    margin: 8px 0 9px;
    color: #071827;
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.mr-empty p {
    max-width: 710px;
    margin: 0 0 12px;
    color: #526274;
    line-height: 1.7;
}

/* ==========================================================
   ISSUE DETAIL
========================================================== */

.mr-issue-hero {
    border-bottom: 1px solid #dbe3ea;
    background: #fff;
}

.mr-issue-hero-grid {
    display: grid;
    grid-template-columns: minmax(250px, 370px) minmax(0, 1fr);
    gap: clamp(36px, 7vw, 82px);
    align-items: center;
    padding-top: 58px;
    padding-bottom: 62px;
}

.mr-issue-copy {
    max-width: 790px;
}

.mr-back-link {
    display: inline-block;
    margin-bottom: 24px;
}

.mr-issue-copy h1 {
    margin: 10px 0 15px;
    color: #071827;
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    letter-spacing: -.04em;
    line-height: 1.03;
}

.mr-issue-summary {
    max-width: 760px;
    color: #526274;
    font-size: 1.04rem;
    line-height: 1.8;
}

.mr-contents,
.mr-highlights {
    padding-top: 54px;
    padding-bottom: 62px;
}

.mr-highlights {
    border-top: 1px solid #dbe3ea;
}

.mr-section-heading {
    max-width: 820px;
    margin-bottom: 26px;
}

.mr-contents-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mr-contents-list li {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    border-top: 1px solid #dbe3ea;
    padding: 15px 0;
}

.mr-contents-list li > span {
    color: #0a93c3;
    font-weight: 900;
}

.mr-contents-list strong {
    display: block;
    color: #071827;
    font-family: "Merriweather", Georgia, serif;
    line-height: 1.3;
}

.mr-contents-list small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    line-height: 1.45;
}

.mr-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.mr-highlight {
    min-width: 0;
    border: 1px solid #dbe3ea;
    background: #fff;
}

.mr-highlight > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.mr-highlight > div {
    padding: 22px;
}

.mr-highlight h3 {
    margin: 0 0 9px;
    color: #071827;
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.25;
}

.mr-highlight p {
    color: #526274;
    line-height: 1.65;
}

.mr-highlight-deck {
    font-weight: 700;
}

.mr-not-found {
    min-height: 52vh;
    padding-top: 80px;
    padding-bottom: 90px;
}

.mr-not-found p {
    max-width: 640px;
    color: #526274;
    line-height: 1.7;
}

/* ==========================================================
   RESPONSIVE LIBRARY
========================================================== */

@media (min-width: 1420px) {
    .mr-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1060px) {
    .mr-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .mr-latest,
    .mr-issue-hero-grid {
        grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
        gap: 30px;
    }

    .mr-library-heading {
        align-items: start;
        flex-direction: column;
    }

    .mr-year-filter {
        width: min(100%, 260px);
    }

    .mr-contents-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .mr-latest,
    .mr-issue-hero-grid {
        grid-template-columns: 1fr;
    }

    .mr-latest-cover,
    .mr-issue-cover {
        width: min(72vw, 310px);
        margin: 0 auto;
    }

    .mr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .mr-highlight-grid {
        grid-template-columns: 1fr;
    }

    .mr-empty {
        grid-template-columns: 1fr;
    }

    .mr-empty-mark {
        min-height: 130px;
    }

    .mr-card-body h3 {
        font-size: .98rem;
    }

    .mr-card-actions {
        gap: 9px;
    }
}

@media (max-width: 620px) {
    .mr-hero-inner {
        padding: 40px 0;
    }

    .mr-hero h1 {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
    }

    .mr-hero p {
        font-size: 1.05rem;
    }
}

@media (max-width: 420px) {
    .mr-latest,
    .mr-library,
    .mr-contents,
    .mr-highlights,
    .mr-issue-hero-grid {
        padding-top: 38px;
        padding-bottom: 46px;
    }

    .mr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 10px;
    }

    .mr-card-body {
        padding-top: 12px;
    }

    .mr-card-body h3 {
        font-size: .9rem;
    }

    .mr-card-body p,
    .mr-card-actions a {
        font-size: .76rem;
    }

    .mr-cover-placeholder-small {
        padding: 11px;
    }

    .mr-cover-placeholder-small span {
        font-size: .84rem;
    }

    .mr-cover-placeholder-small strong {
        font-size: .6rem;
    }
}

@media (max-width: 340px) {
    .mr-grid {
        grid-template-columns: 1fr;
    }

    .mr-card {
        max-width: 250px;
        margin: 0 auto;
    }
}


/* ==========================================================
   MONTHLY REVIEW — RESPONSIVE HARDENING
   Protects the library and issue pages from horizontal overflow
   across narrow phones, tablets, laptops, and wide displays.
========================================================== */
.mr-page {
    overflow-x: clip;
}

.mr-page *,
.mr-page *::before,
.mr-page *::after {
    min-width: 0;
}

.mr-page img,
.mr-page svg,
.mr-page video {
    max-width: 100%;
}

.mr-latest-copy,
.mr-issue-copy,
.mr-library-heading > div,
.mr-card-body,
.mr-highlight > div,
.mr-empty > div {
    overflow-wrap: anywhere;
}

.mr-actions,
.mr-card-actions {
    max-width: 100%;
}

@media (max-width: 680px) {
    .mr-latest-cover,
    .mr-issue-cover {
        width: min(100%, 310px);
    }

    .mr-actions .mr-btn {
        flex: 1 1 160px;
        max-width: 100%;
        text-align: center;
    }

    .mr-library-heading {
        width: 100%;
    }

    .mr-year-filter {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .mr-hero h1,
    .mr-issue-copy h1,
    .mr-latest-copy h2,
    .mr-library-heading h2 {
        overflow-wrap: anywhere;
    }

    .mr-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .mr-actions .mr-btn {
        width: 100%;
        max-width: none;
    }

    .mr-empty {
        gap: 20px;
    }
}

@media (max-width: 360px) {
    .mr-grid {
        grid-template-columns: 1fr;
    }

    .mr-card {
        width: min(100%, 260px);
        max-width: none;
        margin-inline: auto;
    }
}


/* Public issue editorial presentation (does not affect the 12-page PDF). */
.mr-issue-hero-grid{grid-template-columns:minmax(210px,300px) minmax(0,1fr);gap:clamp(35px,6vw,85px);max-width:1100px;margin-inline:auto;padding-block:clamp(48px,6vw,78px)}
.mr-issue-cover{width:100%;box-shadow:0 20px 50px rgba(7,24,39,.16)}
.mr-issue-copy h1{max-width:13ch;font-size:clamp(2.65rem,4.4vw,4.6rem);line-height:1.06}
.mr-issue-copy .mr-issue-summary{max-width:620px}
.mr-contents,.mr-highlights{max-width:1100px;margin-inline:auto}
.mr-contents{padding-block:clamp(38px,5vw,64px)}
.mr-highlights{padding-block:clamp(40px,5vw,66px)}
.mr-highlights .mr-section-heading{max-width:750px;margin-bottom:30px}
.mr-highlight-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch}
.mr-highlight{display:flex;flex-direction:column;border:1px solid #dbe3ea;background:#fff;min-height:0;overflow:hidden;box-shadow:0 5px 16px rgba(7,24,39,.035)}
.mr-highlight>img{width:100%;height:170px;aspect-ratio:auto;object-fit:cover;flex:0 0 auto}
.mr-highlight>div{display:flex;flex-direction:column;gap:0;padding:21px 22px 22px;min-width:0;flex:1}
.mr-highlight h3{font-size:1.09rem;line-height:1.35;margin:0 0 10px;overflow-wrap:break-word}
.mr-highlight p{margin:0 0 16px;font-size:.94rem;line-height:1.62;color:#526274;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}
.mr-highlight a{display:inline-block;align-self:flex-start;margin-top:auto;padding-top:10px}
.mr-contents-list{gap:6px 26px}
.mr-contents-list li{padding:13px 0}
@media(max-width:900px){.mr-highlight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.mr-issue-hero-grid{grid-template-columns:1fr;gap:26px}.mr-issue-cover{width:min(72vw,275px);margin-inline:auto}.mr-issue-copy h1{max-width:none;font-size:clamp(2.15rem,8vw,3.2rem)}.mr-highlight-grid{grid-template-columns:1fr}.mr-highlight>img{height:190px}.mr-contents,.mr-highlights{padding-inline:18px}}
