:root {
  --bg: #f4f7fb;
  --bg-2: #edf3f8;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --text: #101828;
  --muted: #5b6678;
  --line: #d8e0ea;
  --ink: #07111f;
  --navy: #0f2f4a;
  --blue: #14517d;
  --teal: #0f766e;
  --red: #c2410c;
  --amber: #f59e0b;
  --green: #166534;
  --brand: #0f4c81;
  --brand-2: #c2410c;
  --shadow-sm: 0 8px 22px rgba(16, 24, 40, .08);
  --shadow: 0 24px 70px rgba(16, 24, 40, .14);
  --max: 1220px;
  --radius: 8px;
}

.dark {
  --bg: #08111d;
  --bg-2: #0c1726;
  --card: #101c2b;
  --card-soft: #132235;
  --text: #edf4fb;
  --muted: #a9b7c8;
  --line: #25384f;
  --ink: #050a12;
  --navy: #153b5a;
  --blue: #2b79a6;
  --teal: #22a18f;
  --red: #f97316;
  --amber: #fbbf24;
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .28);
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.58;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -10%, rgba(20, 81, 125, .13), transparent 32rem),
    linear-gradient(180deg, var(--bg), #fff 420px, var(--bg));
}
.dark body { background: linear-gradient(180deg, #07111f, #0b1422 420px, #08111d); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.container { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 200; background: var(--card); color: var(--text); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.skip-link:focus { left: 10px; }

.site-header { position: relative; z-index: 30; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.dark .site-header { background: rgba(8,17,29,.86); }
.marketbar { background: linear-gradient(90deg, var(--ink), #12263b 42%, #0f766e); color: #eaf2f8; border-bottom: 1px solid rgba(255,255,255,.12); overflow: hidden; }
.marketbar-shell { height: 38px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.marketbar strong { color: #fff; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 4px 8px; font-size: 12px; letter-spacing: .08em; }
.market-ticker { min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.market-track { display: inline-flex; align-items: center; gap: 28px; min-width: max-content; white-space: nowrap; animation: market-scroll 38s linear infinite; }
.market-track span { color: #dbeafe; font-size: 13px; }
.market-track b { color: #fff; margin-right: 5px; }
.market-source { font-size: 12px; color: #c7f9ee; font-weight: 800; }
@keyframes market-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.topbar { color: var(--muted); font-size: 13px; background: rgba(255,255,255,.72); border-bottom: 1px solid var(--line); }
.dark .topbar { background: rgba(16,28,43,.72); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 0; }
.topbar nav, .social-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar a { font-weight: 700; color: var(--text); opacity: .82; }
.topbar a:hover { color: var(--brand-2); opacity: 1; }

.header-sticky { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.90); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); box-shadow: 0 12px 28px rgba(16,24,40,.05); }
.dark .header-sticky { background: rgba(8,17,29,.90); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.dark .brand { color: #fff; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(135deg, var(--brand), var(--teal)); border-radius: var(--radius); font-weight: 950; letter-spacing: -.04em; box-shadow: var(--shadow-sm); }
.brand-text { font-family: Newsreader, Georgia, serif; font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: .95; letter-spacing: 0; }
.brand img { max-height: 58px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-toggle { height: 40px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: var(--radius); padding: 0 12px; display: inline-grid; place-items: center; cursor: pointer; font-size: 13px; font-weight: 850; box-shadow: var(--shadow-sm); }
.icon-button:hover, .menu-toggle:hover { border-color: rgba(20,81,125,.35); color: var(--brand); transform: translateY(-1px); }
.menu-toggle { display: none; }
.main-nav { background: transparent; }
.nav-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll a { position: relative; padding: 10px 13px; color: var(--text); border-radius: var(--radius); font-size: 14px; font-weight: 850; white-space: nowrap; }
.nav-scroll a:hover { background: var(--card-soft); color: var(--brand); }
.nav-scroll a:first-child { background: var(--ink); color: #fff; }
.dark .nav-scroll a:first-child { background: #fff; color: #07111f; }
.breaking { background: linear-gradient(90deg, #fff7ed, #eef8ff); border-bottom: 1px solid #fed7aa; }
.dark .breaking { background: linear-gradient(90deg, #2b170a, #0f2435); border-color: #7c2d12; }
.breaking-inner { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 10px 0; }
.breaking strong { background: var(--red); color: #fff; padding: 6px 9px; border-radius: 6px; font-size: 12px; letter-spacing: .04em; }
.ticker { display: flex; gap: 28px; overflow: hidden; white-space: nowrap; }
.ticker a { color: #9a3412; font-size: 14px; font-weight: 850; }
.dark .ticker a { color: #fed7aa; }

.search-overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: start center; padding: 9vh 18px; background: rgba(2, 6, 23, .74); backdrop-filter: blur(7px); }
.search-overlay.open { display: grid; }
.search-overlay form { width: min(780px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.search-overlay button { float: right; border: 1px solid var(--line); background: var(--card-soft); color: var(--text); border-radius: var(--radius); height: 36px; padding: 0 12px; cursor: pointer; font-weight: 850; }
.search-overlay label { display: grid; gap: 10px; font-weight: 850; clear: both; }
.search-overlay input { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: var(--radius); padding: 15px; outline: none; }
.search-overlay input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20,81,125,.14); }
.live-results { display: grid; gap: 8px; margin-top: 14px; }
.live-results a { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius); background: var(--card-soft); border: 1px solid transparent; }
.live-results a:hover { border-color: var(--line); }
.live-results img { width: 92px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.live-results strong { display: block; line-height: 1.25; }
.live-results small, .no-result { color: var(--muted); }

.site-main { min-height: 60vh; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 24px; padding: 30px 0 18px; }
.headline { position: relative; min-height: 560px; display: grid; align-content: end; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: var(--shadow); isolation: isolate; }
.headline::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7,17,31,.12), rgba(7,17,31,.26) 34%, rgba(7,17,31,.92)); }
.headline img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.002); transition: transform .35s ease, filter .35s ease; }
.headline:hover img { transform: scale(1.045); filter: saturate(1.05); }
.headline div { position: relative; z-index: 2; padding: clamp(22px, 4vw, 42px); }
.headline h1 { margin: 12px 0 12px; max-width: 900px; font-family: Newsreader, Georgia, serif; font-size: clamp(38px, 5.6vw, 70px); line-height: .98; font-weight: 800; letter-spacing: 0; text-wrap: balance; }
.headline p { max-width: 780px; margin: 0; color: #e8eef7; font-size: clamp(17px, 2vw, 21px); line-height: 1.45; }
.kicker { display: inline-flex; align-items: center; color: var(--red); font-size: 12px; line-height: 1; text-transform: uppercase; font-weight: 950; letter-spacing: .05em; }
.headline .kicker { color: #fff; background: linear-gradient(135deg, var(--red), var(--amber)); padding: 8px 10px; border-radius: 6px; }
.side-news { display: grid; gap: 14px; }
.news-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: rgba(20,81,125,.34); }
.news-card .thumb { aspect-ratio: 16 / 9; background: var(--card-soft); overflow: hidden; display: block; }
.news-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease, filter .28s ease; }
.news-card:hover img { transform: scale(1.04); filter: saturate(1.08); }
.card-body { padding: 16px; }
.news-card h2 { margin: 8px 0 10px; font-family: Newsreader, Georgia, serif; font-size: 23px; line-height: 1.08; font-weight: 800; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card p { margin: 0 0 13px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.news-card.compact { display: grid; grid-template-columns: 142px 1fr; align-items: stretch; min-height: 126px; }
.news-card.compact .thumb { aspect-ratio: auto; min-height: 126px; }
.news-card.compact .card-body { padding: 13px; }
.news-card.compact h2 { font-size: 18px; }
.news-card.compact p { display: none; }
.news-card.compact .card-meta { font-size: 12px; }

.content-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; padding: 12px 0 42px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 30px 0 17px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-title h1, .section-title h2 { position: relative; margin: 0; font-family: Newsreader, Georgia, serif; font-size: clamp(28px, 3vw, 36px); line-height: 1; font-weight: 800; letter-spacing: 0; }
.section-title h1::after, .section-title h2::after { content: ""; position: absolute; left: 0; bottom: -12px; width: 72px; height: 3px; background: linear-gradient(90deg, var(--brand), var(--red)); border-radius: 999px; }
.section-title a, .sort-links a { color: var(--brand); font-weight: 850; font-size: 14px; }
.sort-links { display: flex; gap: 12px; flex-wrap: wrap; }
.section-intro { color: var(--muted); font-size: 17px; margin: -4px 0 18px; max-width: 780px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sidebar { display: grid; gap: 18px; align-content: start; position: sticky; top: 132px; }
.sidebar section { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--card); box-shadow: var(--shadow-sm); }
.sidebar h2 { margin: 0 0 12px; font-family: Newsreader, Georgia, serif; font-size: 24px; line-height: 1; }
.ranked { margin: 0; padding-left: 24px; }
.ranked li { padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 850; line-height: 1.3; }
.ranked li::marker { color: var(--red); font-weight: 950; }
.ranked li:last-child { border-bottom: 0; }
.empty, .state-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.pagination { display: flex; gap: 8px; margin: 24px 0; flex-wrap: wrap; }
.pagination a { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 8px 12px; font-weight: 800; }
.pagination a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.article-page { padding: 34px 0 48px; max-width: 940px; }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 18px; font-weight: 650; }
.article-header h1 { margin: 10px 0 14px; font-family: Newsreader, Georgia, serif; font-size: clamp(42px, 6vw, 72px); line-height: .98; font-weight: 800; letter-spacing: 0; text-wrap: balance; }
.article-header p { color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.48; }
.article-meta { color: var(--muted); font-size: 14px; font-weight: 650; }
.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin: 26px 0; box-shadow: var(--shadow); }
.article-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.article-tools a, .article-tools button { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 9px 11px; color: var(--text); cursor: pointer; font-weight: 800; }
.article-body { font-family: Newsreader, Georgia, serif; font-size: 22px; line-height: 1.72; color: color-mix(in srgb, var(--text) 92%, var(--muted)); }
.article-body p { margin: 0 0 20px; }
.article-body h2, .page-body h2 { margin: 34px 0 12px; font-family: Inter, Arial, sans-serif; font-size: 24px; line-height: 1.18; color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.source-line { color: var(--muted); font-weight: 650; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.tag-list a { background: var(--card-soft); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--text); font-weight: 800; font-size: 13px; }
.article-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.article-nav a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-weight: 850; box-shadow: var(--shadow-sm); }

.timeline { display: grid; gap: 14px; }
.timeline article { display: grid; grid-template-columns: 74px 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.timeline time { color: #fff; background: linear-gradient(135deg, var(--brand), var(--red)); border-radius: var(--radius); display: grid; place-items: center; height: 42px; font-weight: 950; }
.timeline h2 { margin: 6px 0; font-family: Newsreader, Georgia, serif; font-size: 26px; line-height: 1.08; }
.author-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.author-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.author-card img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); }
.author-card h2 { margin: 0 0 6px; font-family: Newsreader, Georgia, serif; font-size: 26px; line-height: 1; }
.author-card p { margin: 0 0 8px; color: var(--muted); }
.author-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 28px 0 18px; box-shadow: var(--shadow-sm); }
.narrow { max-width: 780px; padding: 34px 0 50px; }
.narrow-wide { max-width: 1000px; padding: 34px 0 50px; }
.page-body { font-size: 18px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 7px; font-weight: 850; color: var(--text); }
.form input, .form textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--card); color: var(--text); outline: none; }
.form input:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20,81,125,.13); }
.form button, .button { border: 0; background: linear-gradient(135deg, var(--brand), var(--teal)); color: #fff; font-weight: 850; padding: 12px 16px; cursor: pointer; border-radius: var(--radius); display: inline-block; }
.button.secondary { background: var(--card-soft); color: var(--text); border: 1px solid var(--line); }

.site-footer { background: linear-gradient(135deg, #07111f, #0f2f4a 58%, #0f766e); color: #d7e3ef; margin-top: 34px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr .75fr .9fr; gap: 30px; padding: 42px 0; }
.footer-brand { display: inline-block; color: #fff; font-family: Newsreader, Georgia, serif; font-size: 34px; line-height: 1; font-weight: 800; margin-bottom: 12px; }
.footer-grid p { color: #d7e3ef; margin-top: 0; }
.footer-grid strong { display: block; color: #fff; margin-bottom: 10px; }
.footer-grid nav { display: grid; gap: 10px; align-content: start; }
.footer-grid a { color: #eef6ff; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-note { opacity: .8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 15px 0; color: #bfd0df; }
.mobile-bottom-nav { display: none; }
.cookie-notice { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: min(340px, calc(100% - 36px)); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px; }
.cookie-notice p { margin: 0 0 10px; color: var(--muted); }
.cookie-notice button { border: 0; border-radius: var(--radius); background: var(--brand); color: #fff; padding: 9px 12px; font-weight: 850; }

.install-body { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 22px; }
.install-card { width: min(660px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.alert { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: var(--radius); padding: 12px; }
.alert.success { background: #ecfdf3; color: #027a48; border-color: #abefc6; }

@media (max-width: 1040px) {
  .menu-toggle { display: inline-grid; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-scroll { flex-wrap: wrap; overflow: visible; padding: 8px 0 12px; }
  .hero-layout, .content-with-sidebar, .footer-grid { grid-template-columns: 1fr; }
  .headline { min-height: 470px; }
  .sidebar { position: static; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .container, .marketbar-shell { width: min(100% - 22px, var(--max)); }
  .marketbar-shell { grid-template-columns: auto 1fr; }
  .market-source { display: none; }
  .topbar-inner { align-items: flex-start; flex-direction: column; }
  .brand-row { padding: 14px 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-text { font-size: 31px; }
  .header-actions { gap: 6px; }
  .icon-button, .menu-toggle { height: 38px; padding: 0 10px; }
  .headline { min-height: 390px; }
  .headline div { padding: 20px; }
  .headline h1 { font-size: clamp(34px, 12vw, 48px); }
  .headline p { font-size: 16px; }
  .post-grid, .gallery, .author-grid, .article-nav { grid-template-columns: 1fr; }
  .news-card.compact { grid-template-columns: 118px 1fr; }
  .news-card.compact .thumb { min-height: 118px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .article-header h1 { font-size: clamp(34px, 12vw, 50px); }
  .article-body { font-size: 20px; }
  .timeline article { grid-template-columns: 1fr; }
  .footer-grid { padding-bottom: 86px; }
  .mobile-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px rgba(16,24,40,.12); }
  .mobile-bottom-nav a, .mobile-bottom-nav button { border: 0; background: transparent; color: var(--text); padding: 10px 6px; font-size: 12px; font-weight: 850; text-align: center; }
  .cookie-notice { bottom: 64px; }
}