/* ===================================================================
   DARK NEWS THEME — Classic newspaper, dark mode
   ------------------------------------------------------------------- */

/* -------- Tokens -------- */
:root {
    /* Colours */
    --bg:           #0d0e11;
    --bg-elev:      #15171c;
    --bg-elev-2:    #1c1f26;
    --bg-elev-3:    #242732;
    --ink:          #f2efe6;
    --ink-soft:     #c4c0b6;
    --ink-mute:     #7d7a72;
    --rule:         #262932;
    --rule-strong:  #353944;
    --brand:        #c8102e;
    --brand-soft:   #e63b53;
    --gold:         #d4a64a;
    --ok:           #5fa978;

    /* Type */
    --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
    --font-body:    "Lora", Georgia, "Times New Roman", serif;
    --font-ui:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Layout */
    --container:     1280px;
    --gap:           1.5rem;
    --radius:        4px;
    --radius-lg:     8px;
    --shadow-sm:     0 1px 2px rgba(0,0,0,.4);
    --shadow-md:     0 8px 24px rgba(0,0,0,.5);
    --transition:    .2s ease;
}

/* -------- Light theme override -------- */
[data-theme="light"] {
    --bg:           #f8f7f4;
    --bg-elev:      #ffffff;
    --bg-elev-2:    #f0eeea;
    --bg-elev-3:    #e6e4df;
    --ink:          #1a1a1a;
    --ink-soft:     #3d3d3d;
    --ink-mute:     #6b6b6b;
    --rule:         #e0ddd6;
    --rule-strong:  #ccc9c0;
    --brand:        #c8102e;
    --brand-soft:   #a50d24;
    --gold:         #b8860b;
    --ok:           #2e7d4f;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 8px 24px rgba(0,0,0,.1);
}

[data-theme="light"] .hero-tile::after {
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 45%, transparent 70%);
}

[data-theme="light"] .breaking {
    background: var(--brand);
}

[data-theme="light"] .page-loader {
    background: var(--bg);
}

/* Theme toggle button (desktop) */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--bg-elev-2);
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    padding: .5rem .75rem;
    border-radius: var(--radius);
    font: 600 12px var(--font-ui);
    cursor: pointer;
    transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--brand); color: var(--ink); }

/* -------- Base -------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    font-feature-settings: "kern", "liga";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, video, iframe { max-width: 100%; display: block; }
img { height: auto; }

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-soft); }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

::selection { background: var(--brand); color: #fff; }

/* -------- Container -------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* -------- Page loader -------- */
.page-loader {
    position: fixed; inset: 0;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity .35s ease, visibility .35s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--rule);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------- Header -------- */
.site-header {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--rule);
}

.header-main {
    padding: 1.4rem 0;
    border-bottom: 3px double var(--rule-strong);
}

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
}

.header-search {
    justify-self: end;
    width: 100%;
    max-width: 320px;
}

.header-search form {
    display: flex;
    background: var(--bg-elev-2);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.header-search form:focus-within { border-color: var(--brand); }

.header-search input {
    flex: 1;
    background: transparent;
    border: 0;
    padding: .65rem .9rem;
    color: var(--ink);
    font: 14px var(--font-ui);
    outline: 0;
}
.header-search input::placeholder { color: var(--ink-mute); }

.header-search button {
    background: var(--brand);
    border: 0;
    color: #fff;
    padding: 0 1rem;
    font-size: 14px;
    transition: background var(--transition);
}
.header-search button:hover { background: var(--brand-soft); }

.header-logo { justify-self: start; }
.header-logo img { max-height: 64px; width: auto; }
.header-logo .logo-light { display: none; }
.header-logo .logo-dark { display: block; }

[data-theme="light"] .header-logo .logo-dark { display: none; }
[data-theme="light"] .header-logo .logo-light { display: block; }

.header-tools {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--ink-mute);
    font: 13px/1 var(--font-ui);
    letter-spacing: .03em;
    text-transform: uppercase;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink);
    padding: .55rem .8rem;
    border-radius: var(--radius);
    font-size: 18px;
}

/* Nav */
.site-nav {
    background: var(--bg-elev);
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block;
    padding: .95rem 1.1rem;
    font: 600 13px/1 var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-soft);
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
.nav-list > li > a:hover,
.nav-list > li > a.active {
    color: var(--ink);
    border-bottom-color: var(--brand);
}
.nav-list .nav-dropdown > a::after {
    content: "▾";
    margin-left: .35rem;
    font-size: 10px;
}
.dropdown-menu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 200px;
    background: var(--bg-elev-2);
    border: 1px solid var(--rule);
    list-style: none;
    margin: 0; padding: .5rem 0;
    opacity: 0; visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 50;
    box-shadow: var(--shadow-md);
}
.nav-list .nav-dropdown:hover .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
    display: block;
    padding: .6rem 1rem;
    font: 500 13px var(--font-ui);
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.dropdown-menu a:hover { color: var(--ink); background: var(--bg-elev-3); }

/* -------- Breaking ticker -------- */
.breaking {
    background: var(--brand);
    color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.2);
    overflow: hidden;
}
.breaking-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}
.breaking-label {
    flex: 0 0 auto;
    background: #1a0508;
    color: #fff;
    padding: .65rem 1rem;
    font: 700 12px/1 var(--font-ui);
    letter-spacing: .12em;
    text-transform: uppercase;
    display: flex; align-items: center; gap: .5rem;
}
.breaking-label::before {
    content: "";
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}
.breaking-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}
.breaking-track-inner {
    display: flex;
    gap: 3rem;
    white-space: nowrap;
    animation: ticker 60s linear infinite;
    padding-left: 100%;
}
.breaking-track:hover .breaking-track-inner { animation-play-state: paused; }
.breaking-track-inner a {
    color: #fff;
    font: 600 13.5px var(--font-ui);
    letter-spacing: .02em;
}
.breaking-track-inner a::before {
    content: "•";
    color: var(--gold);
    margin-right: .8rem;
}
.breaking-track-inner a:hover { color: var(--gold); }
@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* -------- Page layout -------- */
.page {
    padding: 2rem 0 3rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.layout-grid.layout-narrow {
    grid-template-columns: 280px minmax(0, 760px);
    justify-content: center;
}

/* -------- Sidebar -------- */
.sidebar { display: flex; flex-direction: column; gap: 1.75rem; }

.widget {
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    padding: 1.25rem;
}

.widget-title {
    font: 700 12px/1 var(--font-ui);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: .14em;
    padding-bottom: .9rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--brand);
    position: relative;
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li + li {
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px solid var(--rule);
}
.widget-item h4 {
    font: 600 14.5px/1.4 var(--font-display);
    color: var(--ink);
    transition: color var(--transition);
}
.widget-item:hover h4 { color: var(--brand-soft); }
.widget-item .meta {
    margin-top: .35rem;
    color: var(--ink-mute);
    font: 11px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.widget-trend { counter-reset: trend; }
.widget-trend li { padding-left: 2.4rem; position: relative; counter-increment: trend; }
.widget-trend li::before {
    content: counter(trend, decimal-leading-zero);
    position: absolute; left: 0; top: -.1rem;
    font: 800 1.6rem/1 var(--font-display);
    color: var(--brand);
}
.widget-trend li + li { padding-top: .9rem; }

/* -------- Section header -------- */
.section-head {
    display: flex; align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0 1.25rem;
    padding-bottom: .65rem;
    border-bottom: 3px double var(--rule-strong);
}
.section-head:first-child { margin-top: 0; }
.section-title {
    font: 800 1.55rem/1 var(--font-display);
    color: var(--ink);
    position: relative;
    padding-left: 1rem;
}
.section-title::before {
    content: "";
    position: absolute; left: 0; top: .2rem; bottom: .2rem;
    width: 4px; background: var(--brand);
}
.section-link {
    font: 600 12px var(--font-ui);
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.section-link:hover { color: var(--brand-soft); }

/* -------- Hero mosaic (5 piece) -------- */
.hero-mosaic {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: .85rem;
    aspect-ratio: 16 / 9;
    margin-bottom: 2.25rem;
}
.hero-tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elev-2);
}
.hero-tile a { display: block; height: 100%; }
.hero-tile img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}
.hero-tile:hover img { transform: scale(1.04); }
.hero-tile::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 45%, transparent 70%);
    pointer-events: none;
}
.hero-tile .caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.1rem 1.2rem;
    z-index: 2;
}
.hero-tile .kicker {
    display: inline-block;
    background: var(--brand); color: #fff;
    padding: .25rem .55rem;
    font: 700 10px/1 var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .55rem;
}
.hero-tile h2,
.hero-tile h3 {
    color: #fff;
    font-weight: 700;
}
.hero-tile.is-lead {
    grid-row: 1 / span 2;
    grid-column: 1 / span 1;
}
.hero-tile.is-lead h2 {
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    line-height: 1.15;
}
.hero-tile h3 {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.25;
}
.hero-tile .meta {
    margin-top: .55rem;
    color: rgba(255,255,255,.72);
    font: 11px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* -------- News card variants -------- */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: border-color var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.card .card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-elev-2); }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card .card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card .kicker {
    color: var(--brand);
    font: 700 11px/1 var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .12em;
}
.card h3 {
    font: 700 1.05rem/1.3 var(--font-display);
    color: var(--ink);
    transition: color var(--transition);
}
.card:hover h3 { color: var(--brand-soft); }
.card .meta {
    margin-top: auto;
    color: var(--ink-mute);
    font: 11.5px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
    display: flex; gap: .9rem;
}

/* Grids */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

/* Politics: 1 big + 3 list */
.layout-1plus3 {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
}
.layout-1plus3 .featured .card-img { aspect-ratio: 16 / 10; }
.layout-1plus3 .featured h3 {
    font-size: 1.55rem;
    line-height: 1.2;
}
.layout-1plus3 .stack {
    display: flex; flex-direction: column;
    gap: .85rem;
}
.row-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    align-items: start;
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    padding: .65rem;
    transition: border-color var(--transition);
}
.row-card:hover { border-color: var(--rule-strong); }
.row-card .row-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-elev-2);
}
.row-card .row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-card .row-body {
    display: flex; flex-direction: column;
    gap: .35rem;
    padding: .15rem 0;
}
.row-card h4 {
    font: 600 .98rem/1.3 var(--font-display);
    color: var(--ink);
}
.row-card:hover h4 { color: var(--brand-soft); }
.row-card .meta {
    margin-top: auto;
    color: var(--ink-mute);
    font: 11px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* World: 4-card filled grid */
.layout-asym {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 1.1rem;
}
.layout-asym .a-1 { grid-column: 1; }
.layout-asym .a-2 { grid-column: 2; }
.layout-asym .a-3 { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

/* Show: horizontal scroll */
.h-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--rule-strong) transparent;
}
.h-scroll::-webkit-scrollbar { height: 6px; }
.h-scroll::-webkit-scrollbar-track { background: transparent; }
.h-scroll::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 3px; }
.h-scroll .card { flex: 0 0 260px; }

/* Tech: compact list */
.compact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}
.compact-list .row-card .row-img { aspect-ratio: 1 / 1; }
.compact-list .row-card { grid-template-columns: 90px 1fr; }

/* -------- Article (news detail) -------- */
.article {
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    padding: 2.25rem;
}
.article-kicker {
    display: inline-block;
    color: var(--brand);
    font: 700 12px/1 var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 1rem;
}
.article-title {
    font: 800 clamp(1.7rem, 3vw, 2.4rem)/1.18 var(--font-display);
    color: var(--ink);
    margin-bottom: 1rem;
    letter-spacing: -0.005em;
}
.article-meta {
    display: flex; flex-wrap: wrap;
    gap: 1.25rem;
    color: var(--ink-mute);
    font: 12px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--rule);
}
.article-meta i { color: var(--brand); margin-right: .35rem; }

.article-hero {
    margin: 0 0 1.75rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-hero img { width: 100%; height: auto; display: block; }

.article-body {
    color: var(--ink-soft);
    font: 1.075rem/1.85 var(--font-body);
}
.article-body p { margin: 0 0 1.25rem; }
.article-body a { color: var(--brand-soft); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--brand);
    color: var(--ink);
    font-style: italic;
    background: var(--bg-elev-2);
}
.article-body img { margin: 1.5rem auto; border-radius: var(--radius); }

.article-embed { margin: 1.75rem 0; }
.embed-16x9 {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000;
}
.embed-16x9 > iframe,
.embed-16x9 > video,
.embed-16x9 > * {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}
.article-embed video {
    width: 100%;
    border-radius: var(--radius);
    background: #000;
}
.article-embed iframe[data-tg-embed="1"] {
    width: 100%;
    height: 480px;
    border: 0;
    border-radius: var(--radius);
    display: block;
    overflow: hidden;
}
.article-figure { margin: 1.5rem 0; }
.article-figure img {
    width: 100%; height: auto;
    border-radius: var(--radius);
}

/* Source */
.article-source {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--bg-elev-2);
    border-left: 3px solid var(--gold);
    display: flex; align-items: center; gap: 1rem;
    font: 13px var(--font-ui);
    color: var(--ink-soft);
}
.article-source i { color: var(--gold); }
.article-source a { color: var(--ink); border-bottom: 1px solid var(--rule-strong); }
.article-source a:hover { color: var(--brand-soft); }

/* Share bar */
.share-bar {
    display: flex; flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin: 1.75rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.share-bar .label {
    margin-right: .35rem;
    font: 700 12px var(--font-ui);
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: .12em;
}
.share-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .8rem;
    background: var(--bg-elev-2);
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    font: 600 12px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.share-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.share-btn.copy { cursor: pointer; }
.share-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Reading progress */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--brand), var(--gold));
    z-index: 9999;
    transition: width .1s linear;
}

/* -------- Pagination -------- */
.pagination {
    display: flex; flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .35rem;
    margin: 2rem 0 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center; justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 .8rem;
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    font: 600 13px var(--font-ui);
    transition: all var(--transition);
}
.pagination a:hover {
    background: var(--bg-elev-2);
    color: var(--ink);
    border-color: var(--rule-strong);
}
.pagination .active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pagination span:not(.active) { background: transparent; border: 0; }

/* -------- Page heading (category, search) -------- */
.page-heading {
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--brand);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
}
.page-heading h1 {
    font: 800 1.85rem/1.2 var(--font-display);
    color: var(--ink);
}
.page-heading p {
    margin: .35rem 0 0;
    color: var(--ink-mute);
    font: 13px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.page-heading strong { color: var(--brand-soft); }

/* Empty / flood state */
.empty-state {
    background: var(--bg-elev);
    border: 1px solid var(--rule);
    padding: 3rem 2rem;
    text-align: center;
}
.empty-state i { font-size: 3rem; color: var(--rule-strong); margin-bottom: 1rem; }
.empty-state h2 { font: 700 1.4rem var(--font-display); color: var(--ink); margin-bottom: .5rem; }
.empty-state p { color: var(--ink-mute); font: 14px var(--font-ui); }
.empty-state .btn {
    display: inline-block; margin-top: 1.25rem;
    padding: .75rem 1.5rem;
    background: var(--brand); color: #fff;
    font: 700 13px var(--font-ui);
    text-transform: uppercase; letter-spacing: .1em;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.empty-state .btn:hover { background: var(--brand-soft); color: #fff; }

.alert-flood {
    background: rgba(212, 166, 74, .08);
    border: 1px solid rgba(212, 166, 74, .35);
    border-left: 4px solid var(--gold);
    padding: 1.5rem 1.75rem;
    color: var(--ink-soft);
}
.alert-flood h2 { color: var(--gold); font-size: 1.25rem; margin-bottom: .35rem; }

/* -------- Footer -------- */
.site-footer {
    background: var(--bg-elev);
    border-top: 3px double var(--rule-strong);
    margin-top: 3rem;
}
.footer-top {
    padding: 2.5rem 0 1.75rem;
}
.footer-brand {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}
.footer-brand h2 {
    font: 800 1.6rem var(--font-display);
    color: var(--ink);
    letter-spacing: .02em;
}
.footer-brand p {
    margin: .5rem 0 0;
    color: var(--ink-mute);
    font: 13px var(--font-ui);
}

.footer-cats {
    display: flex; flex-wrap: wrap;
    justify-content: center;
    gap: .4rem .25rem;
}
.footer-cats a {
    display: inline-block;
    padding: .55rem 1rem;
    color: var(--ink-soft);
    font: 600 12px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .1em;
    border: 1px solid var(--rule);
    transition: all var(--transition);
}
.footer-cats a:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.footer-bottom {
    padding: 1.1rem 0;
    border-top: 1px solid var(--rule);
    text-align: center;
    color: var(--ink-mute);
    font: 12px var(--font-ui);
    letter-spacing: .04em;
}

/* -------- Back to top -------- */
.back-to-top {
    position: fixed;
    right: 1.25rem; bottom: 1.25rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    border: 0;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
    z-index: 90;
}
.back-to-top:hover { background: var(--brand-soft); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* -------- Responsive -------- */
@media (max-width: 1024px) {
    .layout-grid { grid-template-columns: 1fr; }
    .layout-grid.layout-narrow { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .layout-1plus3 { grid-template-columns: 1fr; }
    .compact-list { grid-template-columns: 1fr; }
    .hero-mosaic {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        aspect-ratio: auto;
    }
    .hero-mosaic .hero-tile { aspect-ratio: 16 / 9; }
    .hero-mosaic .hero-tile.is-lead { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
}

@media (max-width: 768px) {
    .header-grid { grid-template-columns: 1fr auto; gap: .75rem; }
    .header-search { display: none; grid-column: 1 / -1; max-width: 100%; }
    .header-search.is-open { display: block; }
    .header-tools { justify-self: end; }
    .mobile-menu-toggle { display: inline-flex; }
    .header-logo { justify-self: start; }

    .site-nav { border-top: 1px solid var(--rule); }
    .nav-list {
        display: none; flex-direction: column;
        padding: .5rem 0;
    }
    .nav-list.is-open { display: flex; }
    .nav-list > li > a { padding: .85rem 1.25rem; border-bottom: 1px solid var(--rule); }
    .dropdown-menu {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        background: var(--bg-elev-2);
        border: 0;
        box-shadow: none;
        max-height: 0; overflow: hidden;
        padding: 0;
        transition: max-height .25s ease;
    }
    .nav-dropdown.is-open .dropdown-menu { max-height: 400px; padding: .35rem 0; }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }

    .layout-asym {
        grid-template-columns: 1fr;
    }
    .layout-asym .a-1, .layout-asym .a-2, .layout-asym .a-3 { grid-column: 1; }
    .layout-asym .a-3 { display: grid; grid-template-columns: 1fr 1fr; }

    .article { padding: 1.5rem; }
    .article-embed iframe[data-tg-embed="1"] { height: 380px; }

    .breaking-label { padding: .55rem .75rem; font-size: 11px; }

    .hero-mosaic { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .layout-asym .a-3 { grid-template-columns: 1fr; }
    .footer-cats a { padding: .5rem .8rem; font-size: 11px; }
}
