/* ==========================================================================
   NewsPulse — front-end stylesheet
   Light/dark themes, responsive layout, and motion (respects reduced-motion)
   ========================================================================== */

:root {
    --bg: #f6f5f2;
    --surface: #ffffff;
    --surface-2: #f1efea;
    --ink: #0b1220;
    --ink-2: #273244;
    --muted: #667085;
    --line: #e6e2da;
    --line-strong: #d6d0c4;
    --accent: #e11d48;
    --accent-2: #f97316;
    --accent-ink: #ffffff;
    --accent-soft: rgba(225, 29, 72, .09);
    --grad: linear-gradient(120deg, #e11d48 0%, #f43f5e 45%, #f97316 100%);
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -8px rgba(16, 24, 40, .12);
    --shadow-lg: 0 24px 48px -16px rgba(16, 24, 40, .28);
    --radius: 16px;
    --radius-sm: 10px;
    --font-head: 'Fraunces', 'Noto Sans Devanagari', Georgia, serif;
    --font-body: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --container: 1280px;
    --header-h: 72px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0a0e16;
    --surface: #111827;
    --surface-2: #172033;
    --ink: #f3f4f6;
    --ink-2: #d1d5db;
    --muted: #94a3b8;
    --line: #1f2a3c;
    --line-strong: #2b3950;
    --accent-soft: rgba(244, 63, 94, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .4s var(--ease), color .4s var(--ease);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; letter-spacing: -.01em; margin: 0; font-weight: 700; }
p { margin: 0; }
mark { background: linear-gradient(transparent 55%, rgba(249, 115, 22, .35) 55%); color: inherit; padding: 0 .1em; }
.icon { flex-shrink: 0; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -60px; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 1000; transition: top .2s; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.section { margin-top: 48px; }

/* ---------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .72rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .94rem; line-height: 1; white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); background-size: 200% 100%; color: #fff; box-shadow: 0 6px 18px -6px rgba(225, 29, 72, .55); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 10px 26px -8px rgba(225, 29, 72, .7); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-sm { padding: .55rem .95rem; font-size: .85rem; }
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
    animation: shine 3.2s var(--ease) infinite;
}
.icon-btn {
    width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px;
    background: transparent; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn:active { transform: scale(.92); }

/* ------------------------------------------------------ Progress & loader */
.progress-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px rgba(225, 29, 72, .6); transition: width .1s linear; }
.page-loader { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 201; background: var(--grad); }
html.js .page-loader { animation: loadbar 1.1s var(--ease) forwards; }
html.loaded .page-loader { opacity: 0; transition: opacity .4s .2s; }

/* ------------------------------------------------------------------ Topbar */
.topbar { background: var(--ink); color: #cbd5e1; font-size: .8rem; }
[data-theme="dark"] .topbar { background: #05080e; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 1rem; }
.topbar-date { display: flex; align-items: center; gap: .45rem; }
.topbar-date .icon { width: 14px; height: 14px; opacity: .7; }
.topbar-links { display: flex; align-items: center; gap: .15rem; }
.topbar-links a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; transition: background .2s, color .2s, transform .2s; }
.topbar-links a:hover { background: rgba(255, 255, 255, .1); color: #fff; transform: translateY(-1px); }
.topbar-links .icon { width: 15px; height: 15px; }

.theme-toggle {
    position: relative; width: 52px; height: 26px; border-radius: 99px; margin-left: .5rem;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .15); padding: 0; overflow: hidden;
}
.theme-toggle::before {
    content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, .8); transition: transform .45s var(--ease-spring), background .3s;
}
[data-theme="dark"] .theme-toggle::before { transform: translateX(26px); background: #e2e8f0; box-shadow: 0 0 10px rgba(226, 232, 240, .6); }
.theme-icon { position: absolute; top: 4px; width: 16px; height: 16px; display: grid; place-items: center; }
.theme-icon .icon { width: 13px; height: 13px; }
.theme-icon.sun { right: 6px; color: #fcd34d; }
.theme-icon.moon { left: 6px; color: #cbd5e1; }

/* ------------------------------------------------------------------ Header */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .3s, background .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(16, 24, 40, .35); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; height: var(--header-h); transition: height .35s var(--ease); }
.site-header.scrolled .header-inner { height: 60px; }
.menu-toggle, .search-toggle { display: none; }

.logo { display: inline-flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.logo img { max-height: 44px; width: auto; }
.logo-mark {
    position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--grad); background-size: 200% 200%; animation: gradientShift 6s ease infinite;
    color: #fff; font: 800 1.35rem/1 var(--font-head); box-shadow: 0 8px 18px -8px rgba(225, 29, 72, .7);
    overflow: hidden; transition: transform .4s var(--ease-spring);
}
.logo-mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-100%); animation: shine 4s 1s infinite; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-text { display: flex; flex-direction: column; font: 800 1.45rem/1 var(--font-head); letter-spacing: -.03em; }
.logo-text small { font: 500 .68rem/1.3 var(--font-body); color: var(--muted); letter-spacing: .02em; margin-top: .25rem; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-light .logo-text { color: #fff; }

.header-search {
    flex: 1; max-width: 460px; margin-left: auto; position: relative; display: flex; align-items: center;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 .9rem; transition: border-color .25s, box-shadow .25s, background .25s;
}
.header-search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.header-search .icon { width: 18px; color: var(--muted); }
.header-search input { flex: 1; border: 0; background: transparent; padding: .7rem .6rem; outline: none; min-width: 0; }
.header-search kbd { font: 600 .72rem var(--font-body); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: .1rem .4rem; }
.header-actions { display: flex; align-items: center; gap: .5rem; }

/* --------------------------------------------------------------- Main nav */
.main-nav { border-top: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .1rem; overflow-x: auto; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
    position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .85rem .8rem; white-space: nowrap;
    font-weight: 600; font-size: .9rem; color: var(--ink-2); background: none; border: 0; transition: color .2s;
}
.nav-link .icon { width: 16px; height: 16px; }
.nav-link::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--cat, var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-more { position: relative; }
.dropdown {
    position: absolute; top: 100%; right: 0; min-width: 220px; padding: .5rem; background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98); transform-origin: top right;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; z-index: 50;
}
.nav-more.open .dropdown, .nav-more:hover .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 9px; font-weight: 500; font-size: .9rem; transition: background .2s, padding .2s; }
.dropdown a:hover { background: var(--surface-2); padding-left: 1rem; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--accent)); flex-shrink: 0; }
.live-chip { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); white-space: nowrap; }

.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-out infinite; }

/* ----------------------------------------------------------------- Ticker */
.ticker { background: var(--surface); border-bottom: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 1rem; height: 46px; }
.ticker-label {
    display: inline-flex; align-items: center; gap: .5rem; padding: .38rem .85rem; border-radius: 8px;
    background: var(--accent); color: #fff; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; flex-shrink: 0;
    box-shadow: 0 6px 14px -6px rgba(225, 29, 72, .8);
}
.ticker-track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-items { display: inline-flex; gap: 2.5rem; white-space: nowrap; animation: ticker var(--ticker-duration, 60s) linear infinite; will-change: transform; }
.ticker-track:hover .ticker-items { animation-play-state: paused; }
.ticker-items a { display: inline-flex; align-items: center; gap: .6rem; font-weight: 500; font-size: .92rem; color: var(--ink-2); transition: color .2s; }
.ticker-items a:hover { color: var(--accent); }
.ticker-items a::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); margin-left: 1.9rem; }
.ticker-time { font-size: .75rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Ads */
.ad-slot { position: relative; margin: 24px 0; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.ad-label { position: absolute; top: 4px; right: 8px; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ad-placeholder { min-height: 90px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--surface-2) 70%, transparent) 10px 20px); }
.ad-placeholder span { font-size: .7rem; color: var(--muted); letter-spacing: .15em; text-transform: uppercase; }
.ad-sidebar.ad-placeholder { min-height: 250px; }
.header-ad .ad-slot { margin: 16px 0 0; }

/* ------------------------------------------------------------------- Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.hero-slider { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; min-height: 520px; background: #0b1220; box-shadow: var(--shadow-lg); isolation: isolate; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 1s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.slide-media, .slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.is-active .slide-media img { animation: kenburns 9s ease-out forwards; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 8, 14, 0) 25%, rgba(5, 8, 14, .55) 55%, rgba(5, 8, 14, .95) 100%); pointer-events: none; }
.slide-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 36px 72px; z-index: 2; color: #fff; }
.slide-body > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.slide.is-active .slide-body > * { opacity: 1; transform: none; }
.slide.is-active .slide-body > :nth-child(2) { transition-delay: .12s; }
.slide.is-active .slide-body > :nth-child(3) { transition-delay: .22s; }
.slide.is-active .slide-body > :nth-child(4) { transition-delay: .32s; }
.slide-title { font-size: clamp(1.6rem, 3vw, 2.6rem); margin: .8rem 0 .7rem; max-width: 22ch; text-wrap: balance; }
.slide-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease); }
.slide-title a:hover { background-size: 100% 2px; }
.slide-excerpt { color: rgba(255, 255, 255, .82); max-width: 60ch; margin-bottom: .8rem; }
.slide .meta { color: rgba(255, 255, 255, .75); }
.slide .meta-source { color: #fff; }
.slide .meta .dot { background: rgba(255, 255, 255, .5); }
.slider-controls { position: absolute; left: 36px; right: 36px; bottom: 22px; z-index: 3; display: flex; align-items: center; gap: .75rem; }
.slider-arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.slider-arrow:hover { background: rgba(255, 255, 255, .25); transform: scale(1.08); }
.slider-arrow .icon { width: 18px; height: 18px; }
.slider-dots { display: flex; gap: .5rem; flex: 1; }
.slider-dots button { flex: 1; max-width: 80px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.slider-dots button span { display: block; height: 100%; width: 0; background: #fff; border-radius: 4px; }
.slider-dots button.active span { animation: slideProgress var(--slide-time, 7s) linear forwards; }
.hero-slider.paused .slider-dots button.active span { animation-play-state: paused; }

.hero-side { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.hero-side-head { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); padding: 0 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.hero-side .card-list { padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.hero-side .card-list:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------ Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.content { min-width: 0; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.list-stack { display: flex; flex-direction: column; gap: 18px; }
.list-stack.compact { gap: 0; }

/* ----------------------------------------------------------- Section head */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--line); position: relative; }
.section-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 2px; background: var(--accent-local, var(--accent)); transition: width .8s var(--ease) .2s; }
html.js .section-head.reveal:not(.in)::after { width: 0; }
.section-head h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.55rem; }
.section-head h2 .icon { width: 22px; height: 22px; color: var(--accent-local, var(--accent)); }
.section-more { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .2s, gap .3s var(--ease); }
.section-more .icon { width: 16px; height: 16px; }
.section-more:hover { color: var(--accent-local, var(--accent)); gap: .6rem; }

/* ---------------------------------------------------------------- Badges */
.badge {
    display: inline-flex; align-items: center; padding: .3rem .7rem; border-radius: 999px; font-size: .7rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--badge, var(--accent));
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--badge, var(--accent)) 70%, transparent); transition: transform .25s var(--ease-spring);
}
.badge:hover { transform: translateY(-2px); }
.badge-sm { padding: .18rem .5rem; font-size: .62rem; margin-bottom: .35rem; }
.badge-text { background: none; box-shadow: none; padding: 0; color: var(--badge, var(--accent)); margin-bottom: .35rem; }
.badge-float { position: absolute; top: 14px; left: 14px; z-index: 2; }

/* ------------------------------------------------------------------ Cards */
.card { position: relative; }
.card-media { position: relative; display: block; overflow: hidden; background: var(--surface-2); }
.card-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 60%, transparent) 50%, transparent 80%) var(--surface-2); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.media-img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), opacity .5s; }
html.js .media-img[loading="lazy"]:not(.loaded) { opacity: 0; }
.card-title { font-size: 1.12rem; line-height: 1.3; text-wrap: pretty; }
.card-title a { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease), color .25s; }
.card:hover .card-title a { background-size: 100% 1.5px; }
.card-excerpt { color: var(--muted); font-size: .92rem; margin-top: .5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .65rem; font-size: .78rem; color: var(--muted); font-weight: 500; }
.meta-source { font-weight: 700; color: var(--ink-2); }
.meta-views { display: inline-flex; align-items: center; gap: .25rem; }
.meta-views .icon { width: 14px; height: 14px; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); display: inline-block; }

.card-grid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.card-grid .card-media { aspect-ratio: 16 / 10; }
.card-grid .card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-grid .meta { margin-top: auto; padding-top: .8rem; }
.card-grid:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-grid:hover .media-img, .card-wide:hover .media-img, .card-list:hover .media-img, .card-overlay:hover .media-img { transform: scale(1.07); }

.card-list { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; }
.card-list .card-media { aspect-ratio: 1; border-radius: 12px; }
.card-list .card-title { font-size: .98rem; font-family: var(--font-body); font-weight: 700; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-list .meta { margin-top: .35rem; }

.card-compact { padding: 14px 0; border-bottom: 1px solid var(--line); }
.card-compact:last-child { border-bottom: 0; }
.card-compact .card-title { font-size: .95rem; font-family: var(--font-body); font-weight: 650; }

.card-wide { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: box-shadow .4s var(--ease), transform .4s var(--ease), border-color .3s; }
.card-wide .card-media { border-radius: 12px; aspect-ratio: 16 / 11; }
.card-wide .card-body { padding: 6px 6px 6px 0; }
.card-wide .card-title { font-size: 1.28rem; margin-top: .55rem; }
.card-wide:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }

.card-overlay { border-radius: calc(var(--radius) + 2px); overflow: hidden; min-height: 420px; display: flex; isolation: isolate; box-shadow: var(--shadow); }
.card-overlay .card-media { position: absolute; inset: 0; }
.card-overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(5, 8, 14, .92)); z-index: 0; pointer-events: none; transition: opacity .4s; }
.card-overlay-body { position: relative; z-index: 1; margin-top: auto; padding: 28px; color: #fff; }
.card-overlay .card-title { font-size: clamp(1.35rem, 2.3vw, 1.95rem); margin-top: .7rem; }
.card-overlay .card-title a { background-image: linear-gradient(#fff, #fff); }
.card-overlay .meta { color: rgba(255, 255, 255, .8); }
.card-overlay .meta-source { color: #fff; }

/* -------------------------------------------------------------- Timeline */
.timeline { position: relative; display: flex; flex-direction: column; gap: 18px; padding-left: 86px; }
.timeline::before { content: ""; position: absolute; left: 66px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--line) 40%); border-radius: 2px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -25px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-time { position: absolute; left: -86px; top: 18px; width: 52px; text-align: right; font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timeline-time small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); margin-top: .2rem; }
.timeline .card-wide { grid-template-columns: 200px minmax(0, 1fr); }
html.js .timeline-item .card.reveal { opacity: 1; transform: none; }

/* -------------------------------------------------------- Category blocks */
.category-block { padding: 48px 0; }
.category-block.alt { background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 6%, transparent), transparent 80%); }
.category-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
.category-list { display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
.category-list .card-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.category-list .card-list:hover { transform: translateX(6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--cat) 40%, var(--line)); }
.category-list .card-list .card-media { width: 112px; }

/* -------------------------------------------------------------- Popular */
.popular-card { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.popular-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.popular-rank { font: 800 3rem/0.9 var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 40px; }
.popular-card h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; line-height: 1.35; }
.popular-card h3 a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 140px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.widget.sticky-ad { padding: 0; background: none; border: 0; }
.widget.sticky-ad .ad-slot { margin: 0; }
.widget-title { display: flex; align-items: center; gap: .55rem; font-size: 1.1rem; margin-bottom: 16px; }
.widget-title .icon { width: 20px; height: 20px; color: var(--accent); }
.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trending-list li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trending-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.trending-list a { font-weight: 650; font-size: .93rem; line-height: 1.38; transition: color .2s; }
.trending-list a:hover { color: var(--accent); }
.trending-list .meta { margin-top: .3rem; }
.trend-num { font: 800 1.7rem/1 var(--font-head); color: var(--line-strong); transition: color .3s, transform .3s var(--ease-spring); }
.trending-list li:hover .trend-num { color: var(--accent); transform: scale(1.12) rotate(-4deg); }

.widget-newsletter { position: relative; overflow: hidden; overflow: clip; background: var(--ink); color: #fff; border: 0; }
[data-theme="dark"] .widget-newsletter { background: linear-gradient(145deg, #1e1b4b, #111827); }
.widget-newsletter::before { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -80px; border-radius: 50%; background: var(--grad); opacity: .45; filter: blur(30px); animation: float 8s ease-in-out infinite; }
.widget-newsletter > * { position: relative; }
.widget-newsletter h3 { font-size: 1.35rem; margin: .6rem 0 .3rem; }
.widget-newsletter p { color: rgba(255, 255, 255, .72); font-size: .9rem; margin-bottom: 1rem; }
.nl-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }

.chip-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); transition: all .25s var(--ease); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--accent)); transition: transform .3s var(--ease-spring); }
.chip:hover, .chip.active { border-color: var(--cat, var(--accent)); color: var(--cat, var(--accent)); transform: translateY(-2px); }
.chip:hover::before { transform: scale(1.5); }

.source-list { list-style: none; padding: 0; margin: 0; }
.source-list a { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; font-weight: 600; font-size: .92rem; transition: color .2s, padding .3s var(--ease); }
.source-list a:hover { color: var(--accent); padding-left: 6px; }
.source-list em { margin-left: auto; font-style: normal; font-size: .75rem; color: var(--muted); background: var(--surface-2); padding: .1rem .5rem; border-radius: 99px; }
.source-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.source-avatar.lg { width: 46px; height: 46px; border-radius: 13px; font-size: 1.1rem; background: var(--grad); color: #fff; }

/* ------------------------------------------------------------- Newsletter */
.newsletter-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.newsletter-form input[type=email] { flex: 1; min-width: 0; padding: .78rem 1rem; border-radius: 999px; border: 1px solid transparent; background: rgba(255, 255, 255, .12); color: #fff; outline: none; transition: background .25s, border-color .25s, box-shadow .25s; }
.newsletter-form input[type=email]::placeholder { color: rgba(255, 255, 255, .6); }
.newsletter-form input[type=email]:focus { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.nl-sidebar input[type=email], .nl-sidebar button { width: 100%; flex-basis: 100%; }
.form-msg { flex-basis: 100%; font-size: .85rem; min-height: 1.2em; }
.form-msg.ok { color: #86efac; }
.form-msg.err { color: #fda4af; }
.newsletter-form.loading button { pointer-events: none; opacity: .75; }
.newsletter-form.loading button span::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: .5rem; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }

.newsletter-band { position: relative; overflow: hidden; overflow: clip; margin-top: 72px; padding: 64px 0; background: #0b1220; color: #fff; isolation: isolate; }
.newsletter-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.newsletter-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: .6rem 0 .5rem; max-width: 18ch; }
.newsletter-band p { color: rgba(255, 255, 255, .7); }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fda4af; }
.eyebrow .icon { width: 15px; height: 15px; }
.band-orbs span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0; animation: float 12s ease-in-out infinite; }
.band-orbs span:nth-child(1) { width: 380px; height: 380px; background: #e11d48; left: -120px; top: -160px; }
.band-orbs span:nth-child(2) { width: 320px; height: 320px; background: #f97316; right: -80px; bottom: -180px; animation-delay: -4s; }
.band-orbs span:nth-child(3) { width: 220px; height: 220px; background: #7c3aed; left: 45%; top: 30%; opacity: .35; animation-delay: -8s; }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: #070b12; color: #a3adbd; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin: 1rem 0 1.2rem; font-size: .92rem; max-width: 42ch; }
.site-footer h4 { color: #fff; font: 700 .8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .92rem; }
.footer-links.two-col { grid-template-columns: 1fr 1fr; }
.footer-links a { display: inline-flex; align-items: center; gap: .4rem; transition: color .2s, transform .25s var(--ease); }
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-links .icon { width: 15px; height: 15px; }
.footer-social { display: flex; gap: .5rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); transition: background .25s, transform .3s var(--ease-spring), color .2s; }
.footer-social a:hover { background: var(--accent); color: #fff; transform: translateY(-3px) rotate(-6deg); }
.footer-social .icon { width: 17px; height: 17px; }
.footer-bottom { margin-top: 48px; padding: 22px 20px 26px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-size: .82rem; }
.footer-note { display: inline-flex; align-items: center; gap: .4rem; color: #cbd5e1; }
.footer-note .icon { width: 15px; height: 15px; color: #fda4af; }

/* ------------------------------------------------------------ Page hero */
.page-hero { position: relative; overflow: clip; padding: 44px 0 36px; background: linear-gradient(180deg, color-mix(in srgb, var(--cat, var(--accent)) 9%, transparent), transparent); border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; width: 480px; height: 480px; right: -140px; top: -260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cat, var(--accent)) 22%, transparent), transparent 70%); animation: float 14s ease-in-out infinite; pointer-events: none; }
.page-title { display: flex; align-items: center; gap: .9rem; font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.02em; }
.title-bar { width: 8px; align-self: stretch; min-height: 1em; border-radius: 6px; background: var(--cat, var(--accent)); }
.page-desc { max-width: 70ch; color: var(--muted); margin-top: .8rem; font-size: 1.05rem; }
.page-count { margin-top: .7rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .icon { width: 14px; height: 14px; opacity: .6; }
.lead-story { margin-bottom: 24px; }
.lead-story .card-overlay { min-height: 460px; }

.source-hero-inner { display: flex; gap: 28px; align-items: center; }
.source-logo { width: 104px; height: 104px; border-radius: 26px; flex-shrink: 0; background: var(--grad); color: #fff; display: grid; place-items: center; font: 800 2.8rem/1 var(--font-head); box-shadow: var(--shadow-lg); overflow: hidden; }
.source-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 12px; }
.source-hero-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.source-hero-actions .page-count { margin: 0; }

.big-search { display: flex; align-items: center; gap: .6rem; margin-top: 22px; max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .4rem .4rem 1.2rem; box-shadow: var(--shadow); transition: box-shadow .3s, border-color .3s; }
.big-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow); }
.big-search .icon { color: var(--muted); }
.big-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 1.05rem; padding: .6rem 0; min-width: 0; }
.search-hero .chip-cloud { margin-top: 18px; }

.empty-state { text-align: center; padding: 64px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-icon { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); animation: bob 3s ease-in-out infinite; }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-state h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.2rem; }

/* ------------------------------------------------------------ Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; margin-top: 40px; }
.page-link { min-width: 42px; height: 42px; padding: 0 .9rem; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; transition: all .25s var(--ease); }
.page-link .icon { width: 16px; height: 16px; }
a.page-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.page-link.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(225, 29, 72, .7); }
.page-gap { color: var(--muted); padding: 0 .3rem; }

/* ---------------------------------------------------------------- Article */
.article-main { padding-top: 28px; }
.preview-bar { background: #fef3c7; color: #92400e; text-align: center; padding: .7rem; font-size: .9rem; margin-top: -28px; margin-bottom: 20px; }
.article-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.article { min-width: 0; max-width: 780px; }
.article-header .badge { margin-bottom: 1rem; }
.article-title { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
.article-summary { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); margin-top: 1rem; padding-left: 1rem; border-left: 3px solid var(--accent); }
.article-byline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.6rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline-source { display: flex; align-items: center; gap: .8rem; }
.byline-source strong { font-size: .98rem; }
.byline-source strong a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.byline-source .meta { margin-top: .2rem; }
.byline-stats { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); font-weight: 600; }
.byline-stats span { display: inline-flex; align-items: center; gap: .35rem; }
.byline-stats .icon { width: 16px; height: 16px; }

.article-figure { margin: 28px 0 8px; }
.figure-frame { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.figure-frame img { width: 100%; max-height: 560px; object-fit: cover; animation: zoomIn 1.4s var(--ease) both; }
.article-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .6rem; }

.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 24px 0; }
.share-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .85rem; margin-right: .3rem; }
.share-label .icon { width: 17px; height: 17px; }
.share-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); transition: transform .3s var(--ease-spring), background .25s, color .25s, border-color .25s; }
.share-btn .icon { width: 18px; height: 18px; }
.share-btn:hover { transform: translateY(-3px) scale(1.06); color: #fff; border-color: transparent; }
.share-btn.whatsapp:hover { background: #25d366; }
.share-btn.facebook:hover { background: #1877f2; }
.share-btn.telegram:hover { background: #229ed9; }
.share-btn.x:hover { background: #111; }
.share-btn.copy:hover, .share-btn.copied { background: var(--accent); color: #fff; }

.article-body { font-size: 1.12rem; line-height: 1.8; color: var(--ink-2); }
.article-body > * + * { margin-top: 1.2em; }
.article-body h2, .article-body h3 { color: var(--ink); margin-top: 1.6em; }
.article-body h2 { font-size: 1.6rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: 12px; margin: 1.4em auto; }
.article-body blockquote { margin: 1.6em 0; padding: 1rem 1.4rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; font-family: var(--font-head); font-size: 1.25rem; color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: .4em; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: .5rem .7rem; }
.lead-in { font-size: 1.2rem; }
.lead-in::first-letter { float: left; font: 800 3.6rem/.9 var(--font-head); margin: .3rem .6rem 0 0; color: var(--accent); }
.prose h2 { font-size: 1.5rem; }

.source-card { position: relative; overflow: hidden; overflow: clip; display: flex; gap: 18px; margin: 36px 0; padding: 26px; border-radius: calc(var(--radius) + 2px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); isolation: isolate; }
.source-card::before { content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; background: var(--grad); background-size: 300% 300%; animation: gradientShift 6s ease infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.source-card-glow { position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; background: radial-gradient(circle, var(--accent-soft), transparent 70%); z-index: -1; animation: float 9s ease-in-out infinite; }
.source-card-icon { width: 52px; height: 52px; border-radius: 15px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 10px 20px -10px rgba(225, 29, 72, .8); }
.source-card-icon .icon { width: 26px; height: 26px; animation: spinSlow 18s linear infinite; }
.source-card-label { font-size: 1.15rem; font-family: var(--font-head); font-weight: 700; }
.source-card-text { color: var(--muted); margin: .4rem 0 1rem; font-size: .95rem; }
.source-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 20px 0; }
.tag { padding: .35rem .8rem; border-radius: 8px; background: var(--surface-2); font-size: .82rem; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
.tag:hover { background: var(--accent); color: #fff; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0; }
.pn-link { display: flex; flex-direction: column; gap: .4rem; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; }
.pn-link span { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.pn-link span .icon { width: 15px; height: 15px; }
.pn-link strong { font-family: var(--font-head); font-size: 1.02rem; line-height: 1.35; }
.pn-link.next { text-align: right; align-items: flex-end; grid-column: 2; }
.pn-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.article-aside { display: flex; flex-direction: column; gap: 24px; }
.article-aside .sidebar { position: static; }

/* ------------------------------------------------------------ Error page */
.error-page { text-align: center; padding: 90px 20px; }
.error-code { font: 800 clamp(6rem, 18vw, 11rem)/1 var(--font-head); background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradientShift 5s ease infinite; }
.error-page h1 { font-size: 2rem; margin: .5rem 0; }
.error-page p { color: var(--muted); }
.error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* ------------------------------------------------------ Overlays & drawer */
.search-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(5, 8, 14, .6); backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center; padding: 90px 16px; animation: fadeIn .25s var(--ease); }
.search-overlay[hidden] { display: none; }
.search-overlay-form { width: 100%; max-width: 640px; display: flex; align-items: center; gap: .6rem; background: var(--surface); border-radius: 18px; padding: .6rem .6rem .6rem 1.1rem; box-shadow: var(--shadow-lg); animation: dropIn .4s var(--ease-spring); }
.search-overlay-form input { flex: 1; border: 0; outline: 0; background: none; font-size: 1.15rem; padding: .7rem 0; min-width: 0; }

.drawer { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 14, .55); opacity: 0; transition: opacity .35s; backdrop-filter: blur(3px); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: var(--surface); padding: 18px; overflow-y: auto; transform: translateX(-100%); transition: transform .45s var(--ease); box-shadow: var(--shadow-lg); }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer-search { display: flex; align-items: center; gap: .5rem; background: var(--surface-2); border-radius: 12px; padding: 0 .8rem; margin-bottom: 12px; }
.drawer-search .icon { width: 18px; color: var(--muted); }
.drawer-search input { flex: 1; border: 0; outline: 0; background: none; padding: .75rem 0; }
.drawer-links { list-style: none; padding: 0; margin: 0; }
.drawer-links li { opacity: 0; transform: translateX(-16px); transition: opacity .4s var(--ease), transform .4s var(--ease); transition-delay: calc(var(--i) * 35ms + 100ms); }
.drawer.open .drawer-links li { opacity: 1; transform: none; }
.drawer-links a { display: flex; align-items: center; gap: .75rem; padding: .85rem .6rem; border-radius: 10px; font-weight: 600; transition: background .2s; }
.drawer-links a:hover { background: var(--surface-2); }
.drawer-links .icon { width: 18px; height: 18px; }

.bottom-nav { display: none; }
.back-to-top { position: fixed; right: 22px; bottom: 26px; z-index: 90; width: 48px; height: 48px; border-radius: 15px; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 26px -10px rgba(225, 29, 72, .8); opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .35s var(--ease), transform .45s var(--ease-spring); }
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px); }

.toast-stack { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; background: var(--ink); color: var(--bg); padding: .8rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--ease-spring); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .icon { width: 18px; height: 18px; color: #4ade80; }

.cookie-notice { position: fixed; left: 20px; bottom: 20px; z-index: 250; max-width: 440px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: slideUp .6s var(--ease) .8s both; font-size: .88rem; }
.cookie-notice[hidden] { display: none; }
.cookie-notice a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 12px; }

/* ------------------------------------------------------------------ Reveal */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
html.js .reveal.in { opacity: 1; transform: none; }
.trending-list li { animation: fadeUp .6s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms + .2s); }

/* -------------------------------------------------------------- Keyframes */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
@keyframes slideProgress { from { width: 0; } to { width: 100%; } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(220%) skewX(-20deg); } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.06); } 66% { transform: translate(-20px, 20px) scale(.96); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { transform: scale(1.08); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes loadbar { 0% { width: 0; } 60% { width: 70%; } 100% { width: 100%; } }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
    .layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-aside .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article { max-width: none; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .live-chip { display: none; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero-slider { min-height: 440px; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid { grid-template-columns: minmax(0, 1fr); }
    .newsletter-inner { grid-template-columns: 1fr; }
    .header-search { display: none; }
    .search-toggle { display: inline-grid; margin-left: auto; }
    .header-actions { margin-left: auto; }
}
@media (max-width: 720px) {
    :root { --header-h: 62px; }
    body { padding-bottom: 96px; font-size: 15.5px; }
    .container { padding: 0 16px; }
    .topbar-date span { font-size: .75rem; }
    .menu-toggle { display: inline-grid; margin-left: -8px; }
    .main-nav { display: none; }
    .logo-mark { width: 36px; height: 36px; font-size: 1.15rem; border-radius: 10px; }
    .logo-text { font-size: 1.2rem; }
    .logo-text small { display: none; }
    .subscribe-btn { display: none; }
    .ticker-inner { height: 42px; }
    .ticker-label { padding: .3rem .6rem; font-size: .66rem; }
    .hero { margin-top: 16px; gap: 16px; }
    .hero-slider { min-height: 420px; border-radius: var(--radius); }
    .slide-body { padding: 22px 20px 64px; }
    .slide-excerpt { display: none; }
    .slider-controls { left: 20px; right: 20px; bottom: 18px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .sidebar, .article-aside .sidebar { grid-template-columns: minmax(0, 1fr); }
    .card-wide, .timeline .card-wide { grid-template-columns: minmax(0, 1fr); padding: 0; overflow: hidden; }
    .card-wide .card-media { border-radius: 0; }
    .card-wide .card-body { padding: 0 16px 16px; }
    .timeline { padding-left: 0; }
    .timeline::before, .timeline-item::before { display: none; }
    .timeline-time { position: static; display: inline-flex; gap: .4rem; width: auto; margin-bottom: .4rem; text-align: left; }
    .timeline-time small { margin: 0; }
    .card-list { grid-template-columns: 96px minmax(0, 1fr); }
    .category-list .card-list .card-media { width: 96px; }
    .card-overlay { min-height: 340px; }
    .card-overlay-body { padding: 20px; }
    .section-head h2 { font-size: 1.3rem; }
    .category-block { padding: 32px 0; }
    .article-title { font-size: 1.8rem; }
    .article-summary { font-size: 1.05rem; }
    .article-body { font-size: 1.05rem; line-height: 1.75; }
    .source-card { flex-direction: column; padding: 20px; }
    .prev-next { grid-template-columns: 1fr; }
    .pn-link.next { grid-column: auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .source-hero-inner { flex-direction: column; align-items: flex-start; }
    .source-logo { width: 80px; height: 80px; font-size: 2rem; border-radius: 20px; }
    .big-search { padding-left: .9rem; }
    .big-search .btn { padding: .65rem .9rem; }
    .back-to-top { bottom: 100px; right: 16px; width: 44px; height: 44px; }
    .cookie-notice { left: 12px; right: 12px; bottom: 96px; max-width: none; }
    .toast-stack { bottom: 104px; }

    /* Floating capsule bottom navigation */
    .bottom-nav { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; padding: 0 14px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
    .bottom-capsule {
        pointer-events: auto; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
        max-width: 420px; margin: 0 auto; height: 64px; padding: 0 6px; border-radius: 999px;
        background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
        border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
        box-shadow: 0 18px 40px -14px rgba(16, 24, 40, .45), 0 2px 6px rgba(16, 24, 40, .08), inset 0 1px 0 rgba(255, 255, 255, .5);
        animation: capsuleIn .7s var(--ease-spring) .2s both;
    }
    [data-theme="dark"] .bottom-capsule { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06); }
    .bn-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 52px; margin: 0 2px; padding: 0; background: none; border: 0; border-radius: 999px; font-size: .64rem; font-weight: 700; color: var(--muted); transition: color .25s, transform .2s, background .3s; }
    .bn-icon { display: grid; place-items: center; transition: transform .4s var(--ease-spring); }
    .bn-item .icon { width: 21px; height: 21px; }
    .bn-item.active { color: var(--accent); background: var(--accent-soft); }
    .bn-item.active .bn-icon { transform: translateY(-1px) scale(1.08); }
    .bn-item.active::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
    .bn-item.active .bn-label { opacity: 0; }
    .bn-item:active { transform: scale(.9); }
    .bn-center { width: 54px; height: 54px; margin: -22px auto 0; justify-self: center; background: var(--grad); background-size: 200% 200%; animation: gradientShift 6s ease infinite; color: #fff; box-shadow: 0 12px 24px -8px rgba(225, 29, 72, .75), 0 0 0 5px var(--bg); }
    .bn-center .icon { width: 23px; height: 23px; }
    .bn-center:hover { color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    html.js .reveal { opacity: 1; transform: none; }
    .ticker-items { animation: none; }
}
@media print {
    .topbar, .site-header, .ticker, .sidebar, .article-aside, .share-bar, .ad-slot, .newsletter-band, .site-footer, .bottom-nav, .back-to-top, .cookie-notice { display: none !important; }
    body { background: #fff; color: #000; }
    .layout, .article-layout { display: block; }
}

/* ==========================================================================
   Category icons
   ========================================================================== */
.cat-icon { width: 16px; height: 16px; }
.nav-link .cat-icon { width: 16px; height: 16px; color: var(--cat, var(--accent)); opacity: .85; transition: transform .35s var(--ease-spring), opacity .2s; }
.nav-link:hover .cat-icon, .nav-link.active .cat-icon { transform: translateY(-1px) rotate(-8deg) scale(1.12); opacity: 1; }
.badge { gap: .35rem; }
.badge .cat-icon { width: 12px; height: 12px; stroke-width: 2.4; }
.badge-sm .cat-icon { width: 10px; height: 10px; }
.chip .cat-icon { width: 14px; height: 14px; color: var(--cat, var(--accent)); }
.chip:has(.cat-icon)::before { display: none; }
.cat-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; flex-shrink: 0; color: var(--cat, var(--accent)); background: color-mix(in srgb, var(--cat, var(--accent)) 12%, transparent); transition: transform .35s var(--ease-spring), background .25s, color .25s; }
.cat-ico .cat-icon { width: 16px; height: 16px; }
.dropdown a:hover .cat-ico, .drawer-links a:hover .cat-ico { transform: rotate(-8deg) scale(1.08); background: var(--cat, var(--accent)); color: #fff; }
.drawer-links a { gap: .8rem; }
.footer-links .cat-icon { width: 15px; height: 15px; color: var(--cat, #fda4af); }
.title-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: var(--cat, var(--accent)); box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--cat, var(--accent)) 80%, transparent); animation: iconPop .8s var(--ease-spring) both; }
.title-icon .cat-icon { width: 30px; height: 30px; }
.section-head h2 .cat-icon { width: 22px; height: 22px; }

/* ==========================================================================
   Codinza developer credit
   ========================================================================== */
.cdz-credit { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.cdz-mark { flex-shrink: 0; border-radius: 7px; box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .8); transition: transform .45s var(--ease-spring); }
.cdz-credit:hover .cdz-mark { transform: rotate(-10deg) scale(1.08); }
.cdz-text { display: flex; flex-direction: column; line-height: 1.05; }
.cdz-text small { font-size: .58rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.cdz-text strong { font-size: .8rem; font-weight: 800; letter-spacing: -.01em; background: linear-gradient(90deg, #a5b4fc, #c4b5fd, #67e8f9, #a5b4fc); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: cdzShine 5s linear infinite; }
.cdz-chip { padding: 3px 10px 3px 4px; margin-right: .5rem; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: #e2e8f0; transition: background .25s, border-color .25s; }
.cdz-chip:hover { background: rgba(255, 255, 255, .12); border-color: rgba(165, 180, 252, .5); }
.drawer-credit { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.drawer-credit .cdz-chip { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.drawer-credit .cdz-text strong { background-image: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4, #6366f1); }

.footer-brandbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: 12px 20px 18px; border-top: 1px solid rgba(255, 255, 255, .05); font-size: .76rem; color: #7c8798; }
.footer-brandbar p { margin: 0; }
/* Subtle one-line credit: small mark + muted text, no card or shine */
.cdz-footer { gap: .4rem; color: #8b95a7; opacity: .85; transition: opacity .2s, color .2s; }
.cdz-footer:hover { opacity: 1; color: #cbd5e1; }
.cdz-footer .cdz-mark { border-radius: 5px; box-shadow: none; }
.cdz-footer .cdz-text { flex-direction: row; align-items: baseline; gap: .3rem; }
.cdz-footer .cdz-text small { font-size: .74rem; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: 1; }
.cdz-footer .cdz-text strong { font-size: .78rem; font-weight: 700; background: none; color: #cbd5e1; animation: none; }
.footer-brandbar .heart { color: #f43f5e; }

@keyframes cdzShine { to { background-position: 200% 0; } }
@keyframes heartbeat { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.3); } 40% { transform: scale(.95); } }
@keyframes iconPop { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes capsuleIn { from { opacity: 0; transform: translateY(40px) scale(.9); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
    .topbar .cdz-chip .cdz-text small { display: none; }
    .title-icon { width: 46px; height: 46px; border-radius: 14px; }
    .title-icon .cat-icon { width: 24px; height: 24px; }
    .footer-brandbar { justify-content: center; text-align: center; }
}
@media (max-width: 420px) {
    .topbar-date span { display: none; }
}
