:root {
    --bg: #ffffff;
    --surface: #f7f8fa;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --red: #d71920;
    --dark: #0f172a;
    --breaking: #fff1f2;
    --container: 1180px;
    --article: 720px;
    --sidebar: 320px;
    --gap: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--red);
}

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

figure {
    max-width: 100%;
}

button,
input {
    font: inherit;
}

:focus-visible {
    outline: 3px solid rgba(215, 25, 32, .35);
    outline-offset: 3px;
}

.container,
.container-narrow {
    width: min(calc(100% - 32px), var(--container));
    margin-inline: auto;
}

.container-narrow {
    width: min(calc(100% - 32px), var(--article));
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    z-index: 99;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid var(--red);
}

.skip-link:focus {
    left: 10px;
}

.top-bar {
    background: #080d14;
    color: #fff;
    font-size: 13px;
}

.top-bar__inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-social,
.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.legal-nav {
    flex: 1;
    min-width: 0;
}

.legal-nav ul {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.legal-nav a {
    display: block;
    padding: 8px 0;
    color: rgba(255,255,255,.86);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.legal-nav a:hover {
    color: #fff;
}

.top-social a,
.footer-social a,
.search-toggle {
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.top-social svg,
.footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.search-toggle {
    width: auto;
    padding: 0 4px;
    font-size: 11px;
    text-transform: uppercase;
}

.brand-row {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.brand-row__inner {
    position: relative;
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-branding {
    min-width: 0;
    text-align: center;
}

.site-title,
.footer-title {
    display: inline-block;
    color: var(--text);
    font-size: clamp(40px, 6vw, 66px);
    font-weight: 900;
    letter-spacing: 0;
}

.site-branding img {
    max-width: min(420px, calc(100vw - 120px));
    max-height: 96px;
    width: auto;
    height: auto;
}

.site-branding p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.menu-toggle {
    position: absolute;
    left: 0;
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 2px 0;
    background: var(--text);
}

.header-ad {
    position: absolute;
    right: 0;
    width: 220px;
}

.main-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 4px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.main-nav ul::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    display: block;
    min-height: 48px;
    padding: 15px 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.search-panel {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"],
.newsletter-card input,
.footer-newsletter input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    padding: 0 13px;
}

.search-form input[type="submit"],
.newsletter-card button,
.footer-newsletter button,
.button {
    min-height: 44px;
    border: 1px solid var(--red);
    padding: 0 18px;
    background: var(--red);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.breaking-ticker {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    align-items: stretch;
    margin-top: 18px;
    border-bottom: 1px solid var(--border);
}

.breaking-ticker strong {
    display: grid;
    place-items: center;
    min-height: 48px;
    background: var(--red);
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
}

.breaking-ticker div {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.breaking-ticker a {
    display: block;
    min-height: 48px;
    padding: 10px 16px;
    border-left: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
}

.breaking-ticker span {
    margin-right: 6px;
    color: var(--red);
    font-size: 11px;
    font-weight: 900;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .78fr) var(--sidebar);
    gap: 16px;
    margin-top: 28px;
}

.hero-grid .card--large {
    grid-row: span 2;
}

.card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.card__media,
.list-card__media {
    display: block;
    overflow: hidden;
    background: var(--surface);
}

.card__media img,
.list-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.card:hover img,
.list-card:hover img {
    transform: scale(1.025);
}

.card__media span,
.list-card__media span {
    display: grid;
    min-height: 160px;
    place-items: center;
    color: var(--muted);
    font-weight: 900;
}

.card--large .card__media {
    height: 430px;
}

.card--medium .card__media {
    height: 205px;
}

.card--compact .card__media {
    height: 132px;
}

.card__body {
    padding: 16px;
}

.cat-label {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--red);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.card h2,
.list-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.18;
}

.card--large h2 {
    font-size: clamp(32px, 4vw, 52px);
}

.card--compact h2 {
    font-size: 17px;
}

.card p,
.list-card p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.meta,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 13px;
}

.trending-box,
.newsletter-card,
.widget {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 18px;
}

.trending-box h2,
.widget-title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--red);
    font-size: 17px;
    text-transform: uppercase;
}

.trending-box ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: trend;
}

.trending-box li {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    counter-increment: trend;
}

.trending-box li::before {
    content: counter(trend);
    color: var(--dark);
    font-size: 27px;
    line-height: 1;
}

.trending-box li:last-child {
    border-bottom: 0;
}

.ad-slot {
    width: min(calc(100% - 32px), var(--container));
    margin: 28px auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: linear-gradient(#fafafa, #f3f4f6);
    color: #9ca3af;
    text-align: center;
}

.ad-slot span {
    margin-top: 10px;
    font-size: 11px;
    text-transform: uppercase;
}

.ad-slot--leaderboard {
    min-height: 250px;
}

.ad-slot--rectangle {
    width: 100%;
    min-height: 250px;
    margin: 0;
}

.ad-slot--in-article {
    width: 100%;
    min-height: 180px;
    margin: 30px 0;
}

.home-main,
.archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar);
    gap: 28px;
    align-items: start;
    margin-top: 34px;
}

.home-sidebar,
.sidebar {
    display: grid;
    gap: 22px;
}

.home-sidebar {
    position: sticky;
    top: 72px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--red);
}

.section-heading h2 {
    margin: 0;
    padding-bottom: 8px;
    font-size: 19px;
    text-transform: uppercase;
}

.section-heading a {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.list-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.list-card__media {
    height: 145px;
}

.newsletter-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.newsletter-card p {
    color: var(--muted);
}

.newsletter-card form,
.footer-newsletter form {
    display: grid;
    gap: 10px;
}

.category-grid-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 34px;
}

.category-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.category-block .card {
    margin-bottom: 14px;
    border: 0;
    border-radius: 0;
}

.category-block .card__body {
    padding: 10px 0 0;
}

.category-block .card p,
.category-block .meta {
    display: none;
}

.archive-header,
.page-content {
    padding-top: 34px;
}

.archive-header h1,
.page-content h1,
.article-header h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.archive-posts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.archive-posts .card--large {
    grid-column: 1 / -1;
}

.article-header {
    padding: 36px 0 18px;
}

.breadcrumbs {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs span {
    margin: 0 8px;
}

.article-dek {
    color: var(--muted);
    font-size: 21px;
    line-height: 1.45;
}

.article-image {
    margin-top: 20px;
}

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

.article-image figcaption {
    color: var(--muted);
    font-size: 13px;
}

.article-body {
    font-size: 18px;
    line-height: 1.75;
}

.article-body p {
    margin: 0 0 1.25em;
}

.article-body img,
.article-body figure,
.article-body .wp-caption,
.article-body .wp-block-image,
.article-body .wp-block-image img,
.article-body [style*="width"] {
    max-width: 100%;
    height: auto;
}

.article-body figure,
.article-body .wp-caption,
.article-body .wp-block-image {
    margin-left: 0;
    margin-right: 0;
}

.article-body .alignwide,
.article-body .alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.article-body iframe,
.article-body video,
.article-body embed,
.article-body object {
    width: 100%;
    max-width: 100%;
}

.article-body blockquote {
    margin: 32px 0;
    padding-left: 20px;
    border-left: 4px solid var(--red);
    color: var(--dark);
    font-size: 24px;
    font-weight: 700;
}

.article-footer {
    padding: 28px 0 44px;
}

.author-box {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 18px;
    margin: 28px 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.author-box img {
    border-radius: 50%;
}

.author-box__avatar {
    display: block;
    width: 96px;
    height: 96px;
}

.author-box h2 a {
    color: inherit;
}

.author-box h2 a:hover {
    color: var(--red);
}

.author-box p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 24px;
}

.site-footer {
    margin-top: 44px;
    background: #080d14;
    color: #fff;
}

.footer-top {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    padding: 42px 0;
}

.footer-brand p,
.footer-newsletter p {
    color: #cbd5e1;
}

.footer-title {
    color: #fff;
    font-size: 34px;
}

.footer-brand img {
    max-width: 240px;
    max-height: 90px;
}

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

.footer-columns h2 {
    margin: 0 0 14px;
    font-size: 14px;
    text-transform: uppercase;
}

.footer-columns ul {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
}

.footer-columns li {
    margin-bottom: 9px;
    break-inside: avoid;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.16);
    color: #cbd5e1;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .hero-grid,
    .home-main,
    .archive-layout,
    .footer-top {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
    }

    .category-grid-row,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-ad {
        display: none;
    }
}

@media (max-width: 768px) {
    .container,
    .container-narrow {
        width: min(calc(100% - 24px), var(--container));
    }

    body {
        font-size: 15px;
    }

    .top-bar__inner span,
    .top-social a {
        display: none;
    }

    .top-bar__inner {
        justify-content: space-between;
        min-width: 0;
    }

    .legal-nav ul {
        justify-content: flex-start;
        gap: 12px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .legal-nav ul::-webkit-scrollbar {
        display: none;
    }

    .legal-nav a {
        min-height: 36px;
        padding: 10px 0;
    }

    .brand-row__inner {
        min-height: 86px;
    }

    .menu-toggle {
        display: grid;
    }

    .site-title {
        font-size: 34px;
    }

    .main-nav {
        display: none;
        position: static;
    }

    body.menu-open .main-nav {
        display: block;
    }

    .main-nav ul {
        display: block;
        padding: 10px 0;
    }

    .main-nav a {
        min-height: 44px;
        padding: 12px 0;
    }

    .breaking-ticker {
        grid-template-columns: 1fr;
    }

    .breaking-ticker div {
        grid-template-columns: 1fr;
    }

    .breaking-ticker a {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .hero-grid,
    .category-grid-row,
    .archive-posts,
    .related-grid,
    .footer-columns {
        grid-template-columns: 1fr;
    }

    .card--large .card__media,
    .card--medium .card__media {
        height: 230px;
    }

    .ad-slot {
        width: min(calc(100% - 24px), 336px);
        min-height: 100px;
    }

    .ad-slot--rectangle,
    .ad-slot--leaderboard {
        width: 100%;
        min-height: 250px;
    }

    .article-image {
        width: min(calc(100% - 24px), var(--container));
    }

    .article-image img {
        max-height: none;
        aspect-ratio: auto;
    }

    .article-body {
        overflow-wrap: anywhere;
    }

    .article-body img,
    .article-body figure,
    .article-body .wp-caption,
    .article-body .wp-block-image,
    .article-body .wp-block-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    .list-card {
        grid-template-columns: 112px 1fr;
        gap: 12px;
    }

    .list-card__media {
        height: 88px;
    }

    .list-card p {
        display: none;
    }

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

    .article-body {
        font-size: 17px;
    }

    .author-box,
    .post-navigation {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
