.magazine-page {
    padding: 20px;
    font-family: Arial, Helvetica, sans-serif;
}

.mag-top {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.mag-hero-text {
    width: 35%;
}

.mag-hero-text h1 {
    font-size: 52px;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #111;
}

.mag-hero-text .mag-home-title,
.mag-heading h1,
.mag-article h1,
.mag-article-body h2,
.mag-article-body h3,
.mag-section-head h2,
.mag-side-box h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-transform: none;
}

.mag-home-title::after,
.mag-heading h1::after {
    content: "";
    display: block;
    width: 72px;
    height: 5px;
    margin-top: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e64b9a, #9d00a9);
}

.mag-hero-text p {
    font-size: 20px;
    line-height: 1.6;
    color: #555;
}

.mag-search {
    margin: 25px 0 0;
    display: flex;
}

.mag-search input {
    flex: 1;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px 0 0 12px;
    font-size: 16px;
}

.mag-search button {
    border: none;
    background: #9d00a9;
    color: white;
    padding: 0 22px;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
}

/* Cards are links wrapping the full article preview. */
a.mag-card-link {
    display: block;
    color: #222;
    text-decoration: none;
}

a.mag-card-link:hover,
a.mag-card-link:focus,
a.mag-card-link:active,
a.mag-card-link:visited {
    color: #222;
    text-decoration: none;
}

a.mag-card-link:focus-visible {
    outline: 3px solid #9d00a9;
    outline-offset: 4px;
}

.mag-hero-card .mag-overlay h2 {
    color: #fff;
}
.mag-hero-card {
    position: relative;
    width: 65%;
    border-radius: 22px;
    overflow: hidden;
}

.mag-hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    display: block;
    height: 100%;
    object-fit: cover;
}

.mag-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 24px 30px 18px;
    color: white;
    width: 100%;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0)
    );
}

.mag-overlay h2 {
    font-size: 32px;
    line-height: 1.15;
    margin: 0;
}

.mag-content {
    display: flex;
    gap: 30px;
}

.mag-main {
    width: 72%;
}

.mag-sidebar {
    width: 28%;
}

.section-title {
    font-size: 34px;
    margin-bottom: 25px;
}

.mag-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 25px;
}

.mag-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
}

.mag-cat {
    color: #a000b0;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

.mag-card p {
    color: #666;
    line-height: 1.6;
}

.sidebar-box {
    background: white;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.sidebar-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 28px;
}

.mag-categories,
.mag-popular {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mag-categories li,
.mag-popular li {
    border-bottom: 1px solid #eee;
}
.mag-categories li a {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 0;

    text-decoration: none;
    color: #222;

    font-size: 18px;
    font-weight: 500;

    transition: 0.2s;
}

.mag-categories li a:hover {
    color: #a000b0;
}

.mag-categories li i {
    color: #b100c7;

    font-size: 22px;

    width: 26px;

    text-align: center;
}

.mag-categories li:last-child,
.mag-popular li:last-child {
    border-bottom: none;
}

.mag-categories a,
.mag-popular a {
    display: block;
    padding: 14px 0;
    color: #333;
    text-decoration: none;
}

.mag-categories a:hover,
.mag-popular a:hover {
    color: #a000b0;
}

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

    .mag-top,
    .mag-content {
        display: block;
    }

    .mag-hero-text,
    .mag-hero-card,
    .mag-main,
    .mag-sidebar {
        width: 100%;
    }

    .mag-hero-card {
        margin-top: 25px;
    }

    .mag-hero-card img {
        position: static;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .mag-grid {
        grid-template-columns: 1fr;
    }

    .mag-hero-text h1 {
        font-size: 38px;
    }

    .mag-overlay h2 {
        font-size: 30px;
    }

}

.mag-page {
    padding: 28px 20px 42px 20px;
}

.mag-heading {
    margin: 0 0 24px 0;
}

.mag-heading h1,
.mag-article h1 {
    color: #222;
    font-size: 42px;
    line-height: 1.2em;
    margin: 0 0 10px 0;
}

.mag-heading p,
.mag-card p,
.mag-article p {
    line-height: 1.7em;
}

.mag-meta {
    color: #777;
    font-size: 0.9em;
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.mag-meta a {
    margin-right: 12px;
}

.mag-card,
.mag-sidebar,
.mag-article {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
}

.mag-card h2,
.mag-sidebar h2 {
    font-size: 1.3em;
    line-height: 1.25em;
    margin: 0 0 10px 0;
}

.mag-card h2 a {
    color: #222;
    text-decoration: none;
}

.mag-back a {
    font-weight: bold;
}

.mag-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mag-sidebar li {
    border-top: 1px solid #eee;
    padding: 10px 0;
}

.mag-sidebar li:first-child {
    border-top: 0;
}

.mag-back {
    margin: 0 0 18px 0;
}

.mag-article {
    max-width: 820px;
}

.mag-lead {
    color: #555;
    font-size: 1.15em;
}

.mag-category-page,
.mag-article-page {
    background: #f4f4f4;
    padding-top: 24px;
}

.mag-breadcrumb {
    color: #777;
    font-size: 13px;
    margin: 0 0 18px 0;
}

.mag-breadcrumb a {
    color: #555;
    text-decoration: none;
}

.mag-breadcrumb a:hover {
    color: #9d00a9;
}

.mag-breadcrumb span {
    margin: 0 8px;
}

.mag-article-layout {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
}

.mag-article-main {
    min-width: 0;
}

.mag-article-rich {
    border: 0;
    border-radius: 16px;
    max-width: none;
    overflow: hidden;
    padding: 0;
}

.mag-article-hero {
    padding: 24px 24px 18px;
}

.mag-article-eyebrow {
    align-items: center;
    color: #7b7b7b;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.mag-article-eyebrow a {
    background: #9d00a9;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    padding: 5px 9px;
    text-decoration: none;
}

.mag-article-rich h1 {
    color: #161616;
    font-size: 42px;
    line-height: 1.12em;
    margin: 0 0 16px 0;
}

.mag-article-rich .mag-lead {
    border-left: 3px solid #d00078;
    color: #444;
    font-size: 20px;
    line-height: 1.6em;
    margin: 0;
    padding-left: 18px;
}

.mag-byline {
    color: #777;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 14px;
    margin-top: 16px;
    padding-top: 0;
}

.mag-article-cover {
    background: #eee;
    margin: 0 24px;
    border-radius: 12px;
    overflow: hidden;
}

.mag-article-cover img {
    display: block;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    width: 100%;
}

.mag-article-body {
    color: #2f2f2f;
    font-size: 18px;
    line-height: 1.65em;
    padding: 20px 24px 32px;
}

.mag-article-body p {
    margin: 0 0 22px 0;
}

.mag-article-body h2,
.mag-article-body h3 {
    color: #191919;
    line-height: 1.25em;
    margin: 34px 0 14px 0;
}

.mag-article-body h2 {
    font-size: 28px;
}

.mag-article-body h3 {
    font-size: 23px;
}

.mag-article-body ul,
.mag-article-body ol {
    margin: 0 0 24px 24px;
}

.mag-article-body blockquote {
    border-left: 4px solid #d6a2dc;
    color: #555;
    font-style: italic;
    margin: 28px 0;
    padding: 8px 0 8px 18px;
}

.mag-article-body img {
    border-radius: 6px;
    height: auto;
    max-width: 100%;
}

.mag-article-sidebar {
    position: sticky;
    top: 18px;
}

.mag-side-box {
    background: #fff;
    border: 1px solid #ebe8ed;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(32,17,42,0.06);
    margin-bottom: 18px;
    padding: 20px;
}

.mag-side-box h2 {
    color: #202020;
    font-size: 20px;
    line-height: 1.25em;
    margin: 0 0 14px 0;
}

.mag-side-list,
.mag-popular-ranked {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mag-side-list li {
    border-top: 1px solid #eeeeee;
}

.mag-side-list li:first-child {
    border-top: 0;
}

.mag-side-list a {
    color: #333;
    display: block;
    padding: 11px 0;
    text-decoration: none;
}

.mag-side-list a:hover {
    color: #9d00a9;
}

.mag-popular-ranked {
    counter-reset: popular;
}

.mag-popular-ranked li {
    border-top: 1px solid #eeeeee;
    counter-increment: popular;
}

.mag-popular-ranked li:first-child {
    border-top: 0;
}

.mag-popular-ranked a {
    color: #222;
    display: grid;
    gap: 2px;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 13px 0;
    text-decoration: none;
}

.mag-popular-ranked a:before {
    color: #9d00a9;
    content: counter(popular);
    font-size: 26px;
    font-weight: bold;
    line-height: 1em;
}

.mag-popular-ranked strong {
    font-size: 15px;
    line-height: 1.35em;
}

.mag-popular-ranked span {
    color: #888;
    font-size: 12px;
    grid-column: 2;
}

.mag-side-cta {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
}

.mag-side-cta h2,
.mag-side-cta p {
    color: #fff;
}

.mag-side-cta p {
    line-height: 1.55em;
    margin: 0 0 14px 0;
}

.mag-side-cta a {
    background: #9d00a9;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-weight: bold;
    padding: 10px 14px;
    text-decoration: none;
}

.mag-related {
    margin-top: 26px;
}

.mag-section-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 0 14px 0;
}

.mag-section-head h2 {
    color: #202020;
    font-size: 26px;
    margin: 0;
}

.mag-section-head a {
    color: #9d00a9;
    font-weight: bold;
    text-decoration: none;
}

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

    .mag-heading h1,
    .mag-article h1 {
        font-size: 32px;
    }

    .mag-article-layout {
        grid-template-columns: 1fr;
    }

    .mag-article-sidebar {
        position: static;
    }

    .mag-article-hero,
    .mag-article-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .mag-article-rich h1 {
        font-size: 30px;
    }

    .mag-article-rich .mag-lead,
    .mag-article-body {
        font-size: 16px;
    }

    .mag-section-head {
        align-items: flex-start;
        display: block;
    }

    .mag-section-head a {
        display: inline-block;
        margin-top: 6px;
    }
}

/* Shared editorial cards across index, categories and related articles. */
.magazine-page {
    --mag-section-size: 34px;
    --mag-card-title-size: 28px;
    --mag-card-detail-size: 13px;
    --mag-card-image-height: 150px;
}

.mag-home-page .section-title {
    color: #17131b;
    font-size: var(--mag-section-size);
    line-height: 1.2;
    margin-bottom: 16px;
}

.mag-home-page .section-title::after,
.mag-section-head h2::after,
.mag-article-body h2::after,
.mag-article-body h3::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: #d00078;
    margin-top: 8px;
}

.magazine-page .mag-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.magazine-page .mag-grid > a.mag-card {
    display: grid;
    grid-template-columns: minmax(0, 29%) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 8px;
    border: 1px solid #ebe8ed;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(32, 17, 42, 0.06);
}

.magazine-page .mag-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: var(--mag-card-image-height);
    object-fit: cover;
    border-radius: 10px;
}

.magazine-page .mag-card-content {
    min-width: 0;
    align-self: center;
    margin: 4px 0;
    padding: 0 0 0 12px;
    border-left: 3px solid #d00078;
}

.magazine-page .mag-cat {
    display: block;
    color: #d00078;
    font-size: var(--mag-card-detail-size);
    line-height: 1.3;
    font-weight: 800;
}

.magazine-page .mag-card h3 {
    color: #17131b;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: var(--mag-card-title-size);
    font-weight: 800;
    line-height: 1.15;
    margin: 5px 0;
    overflow-wrap: anywhere;
}

.magazine-page .mag-card-content p {
    display: none;
}

.magazine-page .mag-meta {
    color: #615a65;
    font-size: var(--mag-card-detail-size);
    line-height: 1.5;
    text-transform: none;
    margin: 0;
}

/* Index: mobile category navigation and compact sizing. */
.mag-mobile-categories {
    display: none;
}

@media screen and (max-width: 736px) {
    .magazine-page {
        --mag-section-size: 28px;
        --mag-card-title-size: clamp(17px, 4.5vw, 27px);
        --mag-card-detail-size: 11px;
        --mag-card-image-height: 104px;
    }

    .mag-home-page {
        padding: 12px 0;
    }

    .mag-home-page .mag-top {
        margin-bottom: 20px;
    }

    .mag-home-page .mag-mobile-categories {
        display: flex;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        margin: 0 0 22px;
        padding: 4px 2px 8px;
    }

    .mag-mobile-categories .sidebar-box,
    .mag-mobile-categories .mag-categories {
        display: contents;
    }

    .mag-mobile-categories h3,
    .mag-mobile-categories i,
    .mag-home-page .mag-sidebar > .sidebar-box {
        display: none;
    }

    .mag-mobile-categories .mag-categories li {
        flex: 0 0 auto;
        border: 0;
        padding: 0;
    }

    .mag-mobile-categories .mag-category-all,
    .mag-mobile-categories .mag-categories li a {
        display: block;
        flex: 0 0 auto;
        padding: 10px 18px;
        border-radius: 999px;
        background: #fff;
        color: #28232d;
        font-size: 15px;
        line-height: 1.3;
        white-space: nowrap;
        text-decoration: none;
    }

    .mag-mobile-categories .mag-category-all {
        background: #d00078;
        color: #fff;
        font-weight: 700;
    }

    .mag-mobile-categories a:focus-visible {
        outline: 2px solid #9d00a9;
        outline-offset: 2px;
    }

    .mag-home-page .mag-sidebar {
        margin-top: 24px;
    }
}
/* Category navigation and article details. */
.mag-category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    margin-bottom: 22px;
}

.mag-category-tabs a {
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 1px solid #ebe8ed;
    border-radius: 999px;
    background: #fff;
    color: #28232d;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
}

.mag-category-tabs a[aria-current="page"] {
    background: #d00078;
    border-color: #d00078;
    color: #fff;
    font-weight: 700;
}

.mag-category-cta {
    display: table;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 12px 20px;
    border: 1px solid #d00078;
    border-radius: 12px;
    color: #d00078;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.mag-category-tabs a:focus-visible,
.mag-category-cta:focus-visible {
    outline: 2px solid #9d00a9;
    outline-offset: 2px;
}

.mag-category-grid {
    align-content: start;
    min-width: 0;
}

.mag-category-empty {
    padding: 20px;
}

.mag-heading .mag-lead {
    margin-top: 18px;
}

.mag-related {
    --mag-card-title-size: 23px;
    --mag-card-image-height: 112px;
}

.mag-category-page .mag-search {
    margin-bottom: 22px;
}

.mag-search input {
    min-width: 0;
}

@media screen and (max-width: 980px) {
    .mag-category-page .mag-article-layout,
    .mag-article-page .mag-article-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .mag-article-sidebar {
        position: static;
    }
}

@media screen and (max-width: 736px) {
    .mag-category-page,
    .mag-article-page {
        padding: 20px 12px 30px;
    }
    .mag-article-hero,
    .mag-article-body {
        padding-left: 12px;
        padding-right: 12px;
    }
    .mag-article-cover {
        margin: 0 8px;
    }
    .mag-article-body h2 {
        font-size: 25px;
    }
    .mag-related {
        --mag-card-title-size: 18px;
        --mag-card-image-height: 90px;
    }
}