:root {
    --site-width: 870px;
    --yellow: #ffc928;
    --yellow-deep: #f6bd16;
    --black: #1f1f1f;
    --ink: #242424;
    --muted: #888888;
    --soft: #f7f7f7;
    --line: #eeeeee;
    --white: #ffffff;
    --radius: 0;
    --font: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --gh-font-heading: var(--font);
    --gh-font-body: var(--font);
    --heading-font: var(--gh-font-heading);
    --body-font: var(--gh-font-body);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--body-font);
    font-size: 14px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 30;
    transform: translateY(-160%);
    padding: 10px 14px;
    background: var(--black);
    color: var(--white);
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-shell {
    min-height: 100vh;
    background: var(--white);
}

.site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: min(var(--site-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 24px;
}

.brand {
    font-size: 29px;
    font-weight: 900;
    line-height: 1;
}

.brand img {
    max-height: 42px;
    width: auto;
}

.site-nav {
    justify-self: end;
}

.site-nav ul,
.footer-nav ul {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: #202020;
    font-size: 12px;
    font-weight: 800;
}

.utility-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.utility-nav a {
    color: #5a5a5a;
}

.site-nav .nav-current a,
.site-nav a:hover {
    color: var(--yellow-deep);
}

.search-toggle,
.nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.search-toggle {
    margin-left: 12px;
    font-size: 14px;
}

.nav-toggle {
    display: none;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background: var(--black);
}

.magazine-wrap {
    width: min(var(--site-width), calc(100% - 32px));
    margin: 0 auto;
}

.feature-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 370px;
    margin-bottom: 58px;
    background: var(--yellow);
}

.feature-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 370px;
    padding: 58px 34px 78px;
}

.feature-copy h1 {
    max-width: 390px;
    margin: 12px 0 14px;
    color: #151515;
    font-size: clamp(31px, 4vw, 39px);
    font-weight: 900;
    line-height: 1.08;
}

.feature-copy p {
    max-width: 390px;
    margin: 0 0 16px;
    color: #4a3c13;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.65;
}

.feature-image {
    min-width: 0;
    background: #101010;
}

.feature-image img {
    width: 100%;
    height: 100%;
    min-height: 370px;
    object-fit: cover;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    color: #757575;
    font-size: 10px;
    font-weight: 600;
}

.feature-copy .story-meta {
    color: #4b3a05;
}

.story-meta i {
    color: var(--yellow-deep);
    font-size: 10px;
}

.feature-copy .story-meta i {
    color: #111111;
}

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #202020;
    font-size: 12px;
    font-weight: 800;
}

.read-link:hover {
    color: var(--yellow-deep);
}

.hero-pager {
    position: absolute;
    right: 68px;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 370px;
    max-width: calc(200% - 68px);
    transform: translateX(50%);
}

.hero-pager a {
    display: grid;
    min-height: 66px;
    place-items: center;
    background: #d3d3d3;
    color: #555555;
    font-size: 12px;
    font-weight: 600;
}

.hero-pager a:first-child {
    background: #1e1e1e;
    color: var(--white);
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 28px;
    margin-bottom: 34px;
}

.story-stack {
    display: grid;
    gap: 21px;
}

.spotlight-column {
    display: grid;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: 1.55fr 0.75fr 0.75fr;
    gap: 28px;
    margin-bottom: 58px;
}

.content-section {
    margin: 0 0 62px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-title h2 {
    margin: 0;
    color: #252525;
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
}

.section-title span {
    display: inline-block;
    width: 22px;
    height: 3px;
    background: var(--yellow);
}

.most-viewed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.post-card {
    position: relative;
    min-width: 0;
    background: var(--white);
}

.post-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dddddd;
}

.post-card__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.74));
    opacity: 0;
}

.post-card__media img {
    width: 100%;
    aspect-ratio: 1.42 / 1;
    object-fit: cover;
    transition: transform 180ms ease;
}

.post-card:hover .post-card__media img {
    transform: scale(1.035);
}

.card-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-grid;
    width: 25px;
    height: 25px;
    place-items: center;
    background: var(--yellow);
    color: #242424;
    font-size: 10px;
}

.post-card__body {
    padding: 13px 0 0;
}

.post-card h3 {
    margin: 8px 0 6px;
    color: #222222;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.16;
}

.post-card h3 a:hover {
    color: var(--yellow-deep);
}

.post-card p {
    margin: 0 0 8px;
    color: #777777;
    font-size: 12px;
    line-height: 1.55;
}

.post-card__meta {
    color: #8b8b8b;
    font-size: 11px;
    font-weight: 600;
}

.post-card--list {
    display: grid;
    grid-template-columns: 205px 1fr;
    gap: 22px;
    align-items: stretch;
    min-height: 120px;
}

.post-card--list .post-card__media img {
    height: 120px;
    aspect-ratio: auto;
}

.post-card--list .post-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 0;
}

.post-card--list h3 {
    font-size: 17px;
}

.post-card--overlay {
    overflow: hidden;
    background: #111111;
}

.post-card--overlay .post-card__media::after {
    opacity: 1;
}

.post-card--overlay .post-card__media img {
    aspect-ratio: 1 / 1.24;
}

.post-card--large .post-card__media img {
    height: 470px;
    aspect-ratio: auto;
}

.post-card--wide .post-card__media img {
    height: 250px;
    aspect-ratio: auto;
}

.post-card--overlay .post-card__body,
.post-card--wide .post-card__body {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 2;
    padding: 0;
}

.post-card--overlay h3,
.post-card--wide h3 {
    color: var(--white);
}

.post-card--overlay .story-meta,
.post-card--wide .story-meta {
    color: rgba(255,255,255,0.78);
}

.post-card--overlay p,
.post-card--wide p,
.post-card--overlay .post-card__meta {
    display: none;
}

.post-card--overlay .read-link,
.post-card--wide .read-link {
    margin-top: 4px;
    color: var(--white);
}

.post-card--overlay .read-link:hover,
.post-card--wide .read-link:hover {
    color: var(--yellow);
}

.newsletter-panel {
    max-width: 640px;
    margin: 0 auto 74px;
    text-align: center;
}

.newsletter-panel h2 {
    margin: 0 0 14px;
    color: #252525;
    font-size: 33px;
    font-weight: 900;
    line-height: 1.15;
}

.newsletter-panel h2 span {
    color: var(--yellow-deep);
}

.newsletter-panel p {
    max-width: 530px;
    margin: 0 auto 24px;
    color: #8a8a8a;
    font-size: 12px;
    line-height: 1.7;
}

.newsletter-form {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 126px;
    max-width: 570px;
    margin: 0 auto;
    background: #f7f7f7;
}

.newsletter-form input {
    min-width: 0;
    height: 54px;
    border: 0;
    padding: 0 22px;
    background: #f7f7f7;
    color: #2f2f2f;
    font: 500 12px var(--body-font);
    outline: none;
}

.newsletter-form input:focus {
    box-shadow: inset 0 0 0 2px rgba(246, 189, 22, 0.45);
}

.newsletter-form button {
    border: 0;
    background: var(--yellow);
    color: #252525;
    font: 700 12px var(--body-font);
    cursor: pointer;
}

.message-success,
.message-error {
    display: none;
    grid-column: 1 / -1;
    margin: 10px 0 0;
    font-size: 12px;
}

.site-footer {
    margin-top: 26px;
    background: #202020;
    color: #8c8c8c;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 0.7fr 1.25fr;
    gap: 86px;
    width: min(var(--site-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 70px;
}

.site-footer h2 {
    position: relative;
    margin: 0 0 44px;
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
}

.site-footer h2::after {
    content: "";
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--yellow);
}

.site-footer p,
.contact-list {
    margin: 0;
    font-size: 12px;
    line-height: 1.8;
}

.social-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-row a {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: #303030;
    color: #b7b7b7;
    font-size: 12px;
}

.footer-nav ul {
    display: grid;
    gap: 12px;
    justify-content: start;
}

.policy-links {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-nav a:hover,
.social-row a:hover {
    color: var(--yellow);
}

.contact-list {
    display: grid;
    gap: 13px;
    padding: 0;
    list-style: none;
}

.contact-list i {
    width: 22px;
    color: var(--yellow);
}

.copyright {
    margin: 0;
    padding: 28px 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
    color: #777777;
    font-size: 12px;
    text-align: center;
}

.copyright a,
.copyright span {
    color: var(--yellow);
}

.article,
.archive-header,
.error-page {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 70px;
}

.article-header {
    margin-bottom: 34px;
}

.article-header h1,
.archive-header h1,
.error-page h1 {
    margin: 12px 0;
    color: #222222;
    font-size: clamp(34px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.08;
}

.article-excerpt,
.archive-header p,
.error-page p {
    margin: 0 0 20px;
    color: #727272;
    font-size: 15px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #8c8c8c;
    font-size: 12px;
    font-weight: 600;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.listen-button,
.article-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    background: var(--yellow);
    color: #222222;
    font: 800 12px var(--body-font);
    cursor: pointer;
}

.listen-button.is-playing {
    background: #222222;
    color: var(--white);
}

.listen-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.article-action-link {
    border: 1px solid var(--line);
    background: var(--white);
}

.listen-button:focus-visible,
.article-action-link:focus-visible,
.read-link:focus-visible,
.site-nav a:focus-visible,
.footer-nav a:focus-visible,
.newsletter-form button:focus-visible {
    outline: 2px solid #222222;
    outline-offset: 3px;
}

.article-image {
    margin: 32px 0 0;
}

.article-image img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.article-image figcaption {
    margin-top: 10px;
    color: #858585;
    font-size: 12px;
    text-align: center;
}

.gh-content {
    color: #333333;
    font-size: 17px;
    line-height: 1.85;
}

.gh-content > * {
    margin: 0 0 1.35em;
}

.gh-content a {
    color: #d9a900;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.gh-content blockquote {
    margin-left: 0;
    padding: 18px 0 18px 24px;
    border-left: 4px solid var(--yellow);
    color: #222222;
    font-size: 1.22em;
    font-weight: 700;
}

.kg-width-wide {
    width: min(100vw - 32px, 1040px);
    max-width: none;
    margin-right: calc((100% - min(100vw - 32px, 1040px)) / 2);
    margin-left: calc((100% - min(100vw - 32px, 1040px)) / 2);
}

.kg-width-full {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
}

.kg-width-full img {
    width: 100%;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.kg-gallery-row {
    display: flex;
    gap: 12px;
}

.kg-gallery-image {
    flex: 1;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-bookmark-card {
    display: block;
    width: 100%;
    margin: 32px 0;
    color: inherit;
    text-decoration: none;
}

.kg-bookmark-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    min-height: 150px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #ffffff;
}

.kg-bookmark-content {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 22px;
}

.kg-bookmark-title {
    color: #222222;
    font: 800 18px/1.25 var(--heading-font);
}

.kg-bookmark-description {
    display: -webkit-box;
    overflow: hidden;
    color: #777777;
    font: 500 13px/1.55 var(--body-font);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kg-bookmark-metadata {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #8a8a8a;
    font: 700 11px/1 var(--body-font);
}

.kg-bookmark-icon {
    width: 18px;
    height: 18px;
}

.kg-bookmark-author::after {
    content: "·";
    margin-left: 8px;
}

.kg-bookmark-publisher {
    color: #555555;
}

.kg-bookmark-thumbnail {
    position: relative;
    min-height: 150px;
    background: #eeeeee;
}

.kg-bookmark-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-pill,
.tag-list a {
    display: inline-flex;
    padding: 7px 10px;
    background: var(--yellow);
    color: #222222;
    font-size: 11px;
    font-weight: 800;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.author-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
    color: #777777;
    font-size: 12px;
    font-weight: 800;
}

.pagination a {
    color: #222222;
}

.error-page .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    background: var(--yellow);
    color: #222222;
    font-weight: 800;
}

@media (max-width: 900px) {
    .site-header {
        grid-template-columns: auto auto;
        gap: 12px;
    }

    .nav-toggle {
        display: inline-grid;
        justify-self: end;
    }

    .search-toggle {
        display: none;
    }

    .site-nav {
        display: none;
        grid-column: 1 / -1;
        justify-self: stretch;
        padding-top: 14px;
    }

    .nav-open .site-nav {
        display: block;
    }

    .site-nav ul {
        display: grid;
        gap: 8px;
    }

    .utility-nav {
        display: grid;
        gap: 8px;
        margin-top: 8px;
    }

    .site-nav a {
        justify-content: center;
        min-height: 42px;
        background: #f7f7f7;
    }

    .feature-hero,
    .editorial-grid,
    .mosaic-grid,
    .most-viewed-grid,
    .recent-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .feature-copy,
    .feature-image img {
        min-height: 310px;
    }

    .hero-pager {
        right: auto;
        left: 0;
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .post-card--list {
        grid-template-columns: 220px 1fr;
    }

    .post-card--large .post-card__media img,
    .post-card--overlay .post-card__media img,
    .post-card--wide .post-card__media img {
        height: auto;
        aspect-ratio: 1.42 / 1;
    }

    .footer-inner {
        gap: 42px;
    }
}

@media (max-width: 620px) {
    .site-header {
        width: min(100% - 24px, var(--site-width));
        padding: 22px 0 18px;
    }

    .brand {
        max-width: 72vw;
        overflow: hidden;
        font-size: 25px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .magazine-wrap,
    .footer-inner {
        width: min(100% - 24px, var(--site-width));
    }

    .feature-copy {
        padding: 42px 22px 82px;
    }

    .feature-copy h1 {
        font-size: 32px;
    }

    .post-card--list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .post-card--list .post-card__media img {
        height: auto;
        aspect-ratio: 1.42 / 1;
    }

    .newsletter-panel h2 {
        font-size: 27px;
    }

    .newsletter-form {
        grid-template-columns: 1fr;
    }

    .newsletter-form button {
        min-height: 50px;
    }
}
