:root {
    --bg: #ffffff;
    --soft: #f5f5f6;
    --card: #ffffff;
    --ink: #071833;
    --text: #263247;
    --muted: #687387;
    --line: #e9edf3;
    --accent: #ff6863;
    --accent-dark: #e64d49;
    --footer: #14161c;
    --max: 1150px;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    letter-spacing: 0;
}

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

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

.site-header {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.top-strip,
.masthead,
.site-main,
.site-footer {
    width: min(var(--max), calc(100vw - 32px));
    margin: 0 auto;
}

.top-strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 118px;
    padding: 18px 0;
}

.date-stack {
    display: grid;
    gap: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.date-stack span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.date-icon {
    position: relative;
    display: inline-block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border: 2px solid var(--accent);
    border-radius: 4px;
}

.date-icon-calendar::before {
    position: absolute;
    top: 4px;
    right: -2px;
    left: -2px;
    height: 2px;
    background: var(--accent);
    content: "";
}

.date-icon-calendar::after {
    position: absolute;
    top: -5px;
    left: 3px;
    width: 7px;
    height: 4px;
    border-right: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    content: "";
}

.date-icon-day {
    border-radius: 999px;
}

.date-icon-day::before,
.date-icon-day::after {
    position: absolute;
    background: var(--accent);
    content: "";
    transform-origin: left center;
}

.date-icon-day::before {
    top: 7px;
    left: 7px;
    width: 5px;
    height: 2px;
}

.date-icon-day::after {
    top: 7px;
    left: 7px;
    width: 4px;
    height: 2px;
    transform: rotate(-90deg);
}

.site-logo img {
    width: 245px;
    height: auto;
}

.search-link {
    justify-self: end;
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
}

.search-link span {
    position: relative;
    display: block;
    width: 19px;
    height: 19px;
    border: 2px solid var(--ink);
    border-radius: 999px;
}

.search-link span::after {
    position: absolute;
    right: -7px;
    bottom: -5px;
    width: 9px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    content: "";
    transform: rotate(45deg);
}

.search-link:hover {
    background: var(--soft);
}

.masthead {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 18px;
    min-height: 58px;
}

.site-nav ul,
.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 56px;
    border-bottom: 4px solid transparent;
    color: var(--ink);
    font-size: 14px;
    font-weight: 950;
    text-transform: uppercase;
}

.site-nav .nav-current a,
.site-nav a:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.member-link,
.live-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    color: white;
    background: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.live-link {
    border: 1px solid var(--accent);
    color: var(--accent);
    background: white;
}

.site-main {
    padding-top: 16px;
}

.slider-shell {
    position: relative;
}

.slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.hero-slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(430px, 0.96fr);
    gap: 16px;
    padding: 0 0 16px;
}

.lead-story,
.stack-story {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111;
}

.lead-story {
    min-height: 402px;
}

.lead-media,
.stack-media {
    position: absolute;
    inset: 0;
    background: #dfe4eb;
}

.lead-media::after,
.stack-media::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.76));
}

.lead-media img,
.stack-media img,
.post-card-media img,
.article-image img,
.trend-item img,
.rail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lead-copy,
.stack-story > div {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    padding: 20px;
    color: white;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 950;
}

.lead-copy h1,
.stack-story h2,
.post-card h2 {
    margin: 0;
    color: inherit;
    line-height: 1.16;
    letter-spacing: 0;
}

.lead-copy h1 {
    max-width: 760px;
    font-size: 27px;
}

.stack-story h2 {
    font-size: 19px;
}

.lead-copy h1 a,
.stack-story h2 a,
.post-card h2 a,
.trend-item strong,
.rail-link strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.lead-copy h1 a,
.stack-story h2 a {
    -webkit-line-clamp: 2;
}

.post-card h2 a {
    -webkit-line-clamp: 2;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-top: 14px;
    color: inherit;
    font-size: 12px;
    font-weight: 800;
}

.story-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.author-dot::before {
    display: inline-block;
    width: 23px;
    height: 23px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 35%, #ffd1aa 0 26%, transparent 27%),
        radial-gradient(circle at 50% 82%, #6242ca 0 35%, transparent 36%),
        #ff9b45;
    content: "";
}

.post-card .author-dot::before,
.rail-link .author-dot::before {
    border-color: #eceff5;
}

.story-meta span:not(:last-child)::after {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 3px;
    border-radius: 999px;
    background: var(--accent);
    content: "";
}

.hero-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stack-story {
    min-height: 193px;
}

.slider-arrows {
    position: absolute;
    top: 50%;
    right: -6px;
    left: -6px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.slider-arrows button {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 26px rgba(7, 24, 51, 0.18);
    cursor: pointer;
    pointer-events: auto;
}

.slider-arrows button::before {
    width: 12px;
    height: 12px;
    border-top: 3px solid var(--ink);
    border-left: 3px solid var(--ink);
    content: "";
}

.slider-arrows button:first-child::before {
    transform: rotate(-45deg);
}

.slider-arrows button:last-child::before {
    transform: rotate(135deg);
}

.trending-strip {
    margin: 0 calc(50% - 50vw);
    padding: 50px max(16px, calc((100vw - var(--max)) / 2));
    background: var(--soft);
}

.trending-heading h2 {
    display: inline-flex;
    margin: 0;
    padding: 10px 14px;
    border-radius: 9px 9px 0 0;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.section-heading h2,
.magazine-rail h3,
.archive-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
    line-height: 1.1;
}

.section-heading h2::after,
.magazine-rail h3::after,
.archive-header h1::after {
    display: block;
    width: 82px;
    height: 4px;
    margin-top: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) 0 70%, var(--line) 70%);
    content: "";
}

.trending-list {
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--line);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    background: white;
}

.trend-item {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 16px;
    min-height: 160px;
    padding: 20px;
    border-left: 1px solid var(--line);
    flex: 0 0 33.333%;
    min-width: 360px;
    scroll-snap-align: start;
}

.trend-item:first-child {
    border-left: 0;
}

.trend-item img {
    width: 136px;
    height: 136px;
    border-radius: 8px;
}

.trend-item span,
.rail-link span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.trend-item strong {
    margin-top: 6px;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.32;
    -webkit-line-clamp: 2;
}

.ad-slot {
    display: grid;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    overflow: hidden;
    margin: 28px auto;
    border-radius: 0;
    background:
        linear-gradient(90deg, rgba(20, 22, 28, 0.94), rgba(20, 22, 28, 0.78)),
        radial-gradient(circle at 18% 20%, rgba(255, 104, 99, 0.28), transparent 36%),
        #14161c;
    color: #fff;
    text-align: center;
}

.ad-slot span {
    color: var(--accent);
    font-size: 33px;
    font-weight: 950;
    line-height: 1;
}

.ad-slot strong {
    font-size: 16px;
    font-weight: 850;
}

.ad-slot em {
    color: #d9dde5;
    font-style: normal;
    font-weight: 900;
}

.ad-slot-wide {
    width: min(728px, 100%);
    min-height: 90px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 14px 28px;
}

.ad-slot-box {
    min-height: 280px;
    padding: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
    padding: 36px 0 72px;
}

.main-feed {
    min-width: 0;
}

.section-heading {
    margin-bottom: 28px;
}

.latest-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.post-card {
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
    border-top: 1px dashed var(--line);
}

.post-card:first-child {
    border-top: 0;
}

.post-card-media {
    position: relative;
    display: block;
    aspect-ratio: 1.25 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #e7ebf0;
}

.post-card-media span {
    display: grid;
    height: 100%;
    place-items: center;
    color: var(--muted);
    font-weight: 900;
}

.post-card-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.post-card h2 {
    color: var(--ink);
    font-size: 23px;
}

.post-card-copy .eyebrow {
    align-self: flex-start;
    order: -1;
}

.post-card-copy .story-meta {
    color: var(--muted);
}

.post-card-copy p {
    display: -webkit-box;
    overflow: hidden;
    margin: 14px 0 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.62;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.editor-grid {
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.editor-grid .post-card {
    display: block;
    flex: 0 0 calc(50% - 12px);
    min-width: 310px;
    padding: 0;
    border: 0;
    scroll-snap-align: start;
}

.editor-grid .post-card-media {
    margin-bottom: 18px;
    aspect-ratio: 16 / 10;
}

.editor-grid .post-card-copy {
    display: block;
}

.extra-heading {
    margin-top: 44px;
}

.magazine-rail {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 28px;
}

.magazine-rail section {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.magazine-rail h3 {
    font-size: 26px;
}

.category-list {
    display: grid;
    gap: 0;
    margin-top: 24px;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
    color: var(--ink);
    font-size: 16px;
    font-weight: 850;
    text-transform: uppercase;
}

.category-list a::before {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    content: "";
    transform: rotate(45deg);
}

.rail-link {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 6px 14px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
}

.rail-link img {
    grid-row: span 2;
    width: 70px;
    height: 70px;
    border-radius: 8px;
}

.rail-link strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.tag-cloud a {
    padding: 9px 14px;
    border-radius: 6px;
    background: #edf3fb;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.newsletter-box a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-top: 8px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-weight: 900;
}

.article-layout {
    align-items: start;
    padding-top: 32px;
}

.article {
    min-width: 0;
}

.article-image {
    margin: 0 0 22px;
    overflow: hidden;
    border-radius: var(--radius);
}

.article-image img {
    max-height: 540px;
}

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

.article-header h1,
.archive-header h1 {
    margin: 10px 0 0;
    color: var(--ink);
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.12;
}

.article-excerpt {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.article-body {
    color: #6f7785;
    font-size: 18px;
    line-height: 1.82;
}

.article-body a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
    margin: 0 0 1.45em;
}

.article-body h2,
.article-body h3 {
    margin: 1.8em 0 0.7em;
    color: var(--ink);
    line-height: 1.16;
}

.article-body .kg-width-wide {
    width: min(100%, 1040px);
    max-width: 1040px;
    margin-right: auto;
    margin-left: auto;
}

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

.article-body .kg-width-wide img,
.article-body .kg-width-full img {
    width: 100%;
    height: auto;
}

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

.archive-header {
    padding: 42px 0 24px;
}

.archive-grid {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 36px 0;
    color: var(--muted);
    font-weight: 800;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 38px;
    padding: 52px 0;
    color: #c8ccd4;
}

.site-footer::before {
    position: absolute;
    right: 0;
    left: 0;
    z-index: -1;
    height: 250px;
    margin-top: -52px;
    background: var(--footer);
    content: "";
}

.site-footer img {
    width: 150px;
    margin-bottom: 14px;
}

.site-footer a {
    color: white;
    font-weight: 800;
}

@media (max-width: 980px) {
    .portal-hero,
    .content-grid,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .magazine-rail {
        position: static;
    }

    .masthead {
        grid-template-columns: 1fr;
        justify-items: center;
        padding-bottom: 12px;
    }

    .trend-item {
        flex-basis: 50%;
    }
}

@media (max-width: 760px) {
    .top-strip {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .top-strip > a:last-child {
        justify-self: center;
    }

    .site-logo img {
        width: 210px;
    }

    .portal-hero,
    .hero-stack {
        grid-template-columns: 1fr;
    }

    .lead-story,
    .stack-story {
        min-height: 330px;
    }

    .trend-item,
    .post-card {
        grid-template-columns: 1fr;
    }

    .trend-item {
        flex-basis: 86%;
        min-width: 280px;
        border-left: 1px solid var(--line);
    }

    .trend-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .post-card h2 {
        font-size: 21px;
    }

    .editor-grid .post-card {
        flex-basis: 86%;
    }

    .ad-slot-wide {
        grid-template-columns: 1fr;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }
}
