/* ==========================================================================
   SnapBriefing — Stylesheet
   Fast, concise news briefings.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --accent: #d62828;
  --accent-dark: #b21f1f;
  --accent-soft: #fde8e8;

  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --bg-card: #ffffff;
  --bg-header: #ffffff;

  --text: #14181f;
  --text-soft: #475063;
  --text-mute: #8a93a4;
  --border: #e6e8ec;
  --border-strong: #d3d7de;

  --headline: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 24, 31, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 24, 31, 0.12);

  --radius: 10px;
  --radius-sm: 6px;
  --container: 1240px;
  --header-h: 68px;
}

[data-theme="dark"] {
  --accent: #ff4d4d;
  --accent-dark: #e63946;
  --accent-soft: #3a1c1c;

  --bg: #0f1318;
  --bg-alt: #161b22;
  --bg-card: #1a2029;
  --bg-header: #0f1318;

  --text: #e8eaed;
  --text-soft: #b4bcc9;
  --text-mute: #7d8696;
  --border: #2a313c;
  --border-strong: #3a424f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--text);
  padding-bottom: 10px;
}

.section-head h2 {
  font-family: var(--headline);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2::before {
  content: "";
  width: 6px;
  height: 22px;
  background: var(--accent);
  border-radius: 3px;
}

.section-head a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--text);
  color: #fff;
  font-size: 0.8rem;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}

.topbar a {
  color: rgba(255, 255, 255, 0.8);
}

.topbar a:hover {
  color: #fff;
}

.topbar-date {
  color: rgba(255, 255, 255, 0.65);
}

.topbar-links {
  display: flex;
  gap: 18px;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 19px;
  height: 19px;
}

.logo-text {
  font-family: var(--headline);
  font-weight: 800;
  font-size: 1.42rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-text span {
  color: var(--accent);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav a {
  padding: 8px 13px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-soft);
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  height: 38px;
  width: 200px;
  transition: width 0.2s, border-color 0.15s;
}

.search-box:focus-within {
  width: 260px;
  border-color: var(--accent);
}

.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--text-mute);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  color: var(--text);
  font-size: 0.88rem;
  width: 100%;
  margin-left: 8px;
}

.search-box input::placeholder {
  color: var(--text-mute);
}

.menu-toggle {
  display: none;
}

/* ---------- Breaking ticker ---------- */
.ticker {
  background: var(--accent);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.ticker .container {
  display: flex;
  align-items: center;
  height: 40px;
  gap: 14px;
}

.ticker-label {
  background: rgba(0, 0, 0, 0.22);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticker-label::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: scroll 38s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-track a {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
}

.ticker-track a:hover {
  text-decoration: underline;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Hero ---------- */
.hero {
  padding: 36px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
}

.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow-md);
  min-height: 440px;
}

.hero-main img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-main .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.05) 75%);
}

.hero-main .hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  color: #fff;
}

.hero-main .cat-tag {
  background: var(--accent);
}

.hero-main h1 {
  font-family: var(--headline);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 12px 0 12px;
  letter-spacing: -0.01em;
  max-width: 90%;
}

.hero-main p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 80%;
  line-height: 1.5;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-side-card {
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.hero-side-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hero-side-card .thumb {
  width: 110px;
  height: 84px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-alt);
}

.hero-side-card h3 {
  font-family: var(--headline);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 6px 0 8px;
  letter-spacing: -0.01em;
}

/* ---------- Category tag ---------- */
.cat-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
}

.cat-tag.alt {
  background: var(--text);
}

/* ---------- Meta ---------- */
.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-mute);
}

.meta .dot {
  width: 3px;
  height: 3px;
  background: var(--text-mute);
  border-radius: 50%;
}

/* ---------- Quick Briefing ---------- */
.briefing {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.briefing h2 {
  font-family: var(--headline);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.briefing ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}

.briefing li {
  display: flex;
  gap: 10px;
  font-size: 0.93rem;
  line-height: 1.45;
  padding: 4px 0;
}

.briefing li::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}

.briefing li a {
  font-weight: 600;
}

/* ---------- Article cards grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card .card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}

.card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img img {
  transform: scale(1.05);
}

.card .card-img .cat-tag {
  position: absolute;
  top: 12px;
  left: 12px;
}

.card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-family: var(--headline);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 8px;
  letter-spacing: -0.01em;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

/* horizontal card variant */
.card.horizontal {
  flex-direction: row;
  gap: 16px;
  align-items: stretch;
}

.card.horizontal .card-img {
  width: 42%;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.card.horizontal .card-body {
  padding: 14px 16px 14px 0;
  justify-content: center;
}

.card.horizontal .card-body h3 {
  font-size: 1.05rem;
  margin: 8px 0;
}

/* ---------- Main + sidebar layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.widget h3 {
  font-family: var(--headline);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget h3::before {
  content: "";
  width: 5px;
  height: 18px;
  background: var(--accent);
  border-radius: 3px;
}

.trending-list {
  display: flex;
  flex-direction: column;
}

.trending-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-num {
  font-family: var(--headline);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 30px;
}

.trending-item h4 {
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(135deg, var(--text) 0%, #2a3340 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
}

.newsletter h3 {
  font-family: var(--headline);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter p {
  font-size: 0.88rem;
  opacity: 0.82;
  margin-bottom: 16px;
}

.newsletter form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter input {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.newsletter input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter input:focus {
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn:active {
  transform: scale(0.98);
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn.outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Article page ---------- */
.article-hero {
  padding: 40px 0 24px;
}

.article-hero .cat-tag {
  margin-bottom: 16px;
}

.article-hero h1 {
  font-family: var(--headline);
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  max-width: 900px;
}

.article-hero .deck {
  font-size: 1.18rem;
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 780px;
  margin-bottom: 22px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.byline .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.byline .author-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.byline .meta {
  margin-top: 2px;
}

.share-btns {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.share-btns button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}

.share-btns button:hover {
  background: var(--accent);
  color: #fff;
}

.share-btns svg {
  width: 16px;
  height: 16px;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--text);
  max-width: 760px;
}

.article-body .lead-fig {
  margin: 0 0 28px;
  padding: 0;
}

.article-body .lead-img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body .caption {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 28px;
  font-style: italic;
}

.article-body p {
  margin-bottom: 22px;
}

.article-body h2 {
  font-family: var(--headline);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 36px 0 16px;
  letter-spacing: -0.01em;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 8px 0 8px 24px;
  margin: 28px 0;
  font-family: var(--headline);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--text);
}

.article-body ul.list {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 22px;
}

.article-body ul.list li {
  margin-bottom: 8px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-tags a {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-soft);
  border: 1px solid var(--border);
}

.article-tags a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Category page ---------- */
.page-head {
  padding: 40px 0 8px;
}

.page-head h1 {
  font-family: var(--headline);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head p {
  color: var(--text-soft);
  margin-top: 8px;
  font-size: 1.05rem;
  max-width: 640px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  color: rgba(255, 255, 255, 0.75);
  margin-top: 60px;
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .logo-text {
  color: #fff;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 16px 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.6);
}

.social-row {
  display: flex;
  gap: 10px;
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: #fff;
}

.social-row a:hover {
  background: var(--accent);
}

.social-row svg {
  width: 17px;
  height: 17px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 90;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-3px);
}

/* ---------- Search results overlay ---------- */
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
}

.search-results.open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.search-results-inner {
  max-width: 540px;
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-right: 50px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.search-item .cat-tag {
  flex-shrink: 0;
}

.search-item .search-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.search-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.9rem;
}

/* ---------- Newsletter success ---------- */
.newsletter .success-msg {
  display: none;
  padding: 12px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: #6ee7b7;
  margin-top: 10px;
}

.newsletter.sent .success-msg {
  display: block;
}

/* ---------- Empty / loading ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
}

@media (max-width: 768px) {
  .search-results-inner {
    margin-right: 0;
    max-width: 100%;
  }
}

/* ---------- Topbar update indicator ---------- */
.topbar-updated {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.6s infinite;
}

.today-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Updated time + new flag ---------- */
.updated-time {
  color: var(--accent);
  font-weight: 600;
}

.new-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  animation: pulse 2s infinite;
}

/* ---------- Recently Updated strip ---------- */
.recent-section {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.recent-head h2 {
  font-family: var(--headline);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
}

.recent-head h2::before {
  content: "";
  width: 5px;
  height: 18px;
  background: var(--accent);
  border-radius: 3px;
}

.recent-count {
  font-size: 0.8rem;
  color: var(--text-mute);
  font-weight: 600;
}

.recent-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}

.recent-list::-webkit-scrollbar {
  height: 5px;
}
.recent-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.recent-item {
  flex: 0 0 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.recent-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--text);
}

.recent-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recent-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  font-family: var(--headline);
  flex: 1;
}

.recent-item .cat-tag {
  align-self: flex-start;
  font-size: 0.62rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--text-mute);
  border-bottom: 1px solid var(--border);
}

.breadcrumb a {
  color: var(--text-soft);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.crumb-sep {
  margin: 0 8px;
  color: var(--text-mute);
}

.crumb-current {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Author role (byline) ---------- */
.author-role {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Inline internal links (readalso) ---------- */
.readalso {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
}

.readalso-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.readalso-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px dashed var(--border);
}

.readalso-link:last-child {
  border-bottom: none;
}

.readalso-link:hover {
  color: var(--accent);
}

.readalso-arrow {
  color: var(--accent);
  font-weight: 700;
}

.readalso-target {
  flex-basis: 100%;
  font-family: var(--headline);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.35;
}

.readalso-link:hover .readalso-target {
  color: var(--accent);
}

/* ---------- Source citations ---------- */
.sources-box {
  margin: 32px 0 8px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sources-box h3 {
  font-family: var(--headline);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sources-box h3::before {
  content: "";
  width: 5px;
  height: 16px;
  background: var(--accent);
  border-radius: 3px;
}

.sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sources-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.source-type {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  color: #fff;
}

.source-type.official {
  background: #2563eb;
}

.source-type.media {
  background: #7c3aed;
}

.source-name {
  color: var(--text-soft);
  font-weight: 500;
}

/* ---------- Author card ---------- */
.author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 32px 0 8px;
  padding: 26px;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.author-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--headline);
  font-weight: 800;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.author-card-body {
  flex: 1;
}

.author-card-role {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.author-card-name {
  font-family: var(--headline);
  font-size: 1.3rem;
  font-weight: 800;
  margin: 2px 0 8px;
}

.author-card-bio {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.author-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-mute);
}

.author-twitter {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-main {
    min-height: 380px;
  }
  .hero-main img {
    min-height: 380px;
  }
  .hero-main h1 {
    font-size: 1.9rem;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .search-box {
    width: 160px;
  }
}

@media (max-width: 768px) {
  .nav, .search-box, .topbar-links, .topbar-updated {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .header-inner {
    gap: 14px;
  }
  .nav.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-header);
    flex-direction: column;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 2px;
    align-items: stretch;
  }
  .nav.open a {
    padding: 12px;
  }
  .hero-main h1 {
    font-size: 1.6rem;
  }
  .hero-main .hero-content {
    padding: 22px;
  }
  .hero-main p {
    display: none;
  }
  .briefing ul {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .card.horizontal {
    flex-direction: column;
  }
  .card.horizontal .card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
  .card.horizontal .card-body {
    padding: 16px 18px 20px;
  }
  .article-hero h1 {
    font-size: 1.9rem;
  }
  .article-body {
    font-size: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .section-head h2 {
    font-size: 1.35rem;
  }
  .byline {
    flex-wrap: wrap;
  }
  .share-btns {
    margin-left: 0;
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .topbar-date {
    display: none;
  }
  .container {
    padding: 0 16px;
  }
  .hero-main h1 {
    font-size: 1.4rem;
  }
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .author-card-meta {
    justify-content: center;
  }
  .sources-list li {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Tag Cloud / Hot Tags
   ========================================================================== */
.tag-cloud-section {
  padding-top: 16px;
  padding-bottom: 40px;
}
.tag-cloud-sub {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.tag-chip:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  border-color: var(--accent);
}
.tag-chip .tag-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-soft);
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.tag-chip:hover .tag-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Dark theme tag cloud adjustments */
[data-theme="dark"] .tag-chip {
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .tag-chip .tag-count {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
}

@media (max-width: 480px) {
  .tag-chip {
    padding: 6px 12px;
  }
}

/* ==========================================================================
   Article Publication Info + Enhanced Sources
   ========================================================================== */
.article-publication {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  margin: 36px 0 8px;
  padding: 28px;
  background: var(--bg-alt);
  border-radius: 14px;
  border-left: 4px solid var(--accent);
}
.pub-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pub-heading {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.pub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
}
.pub-row:last-child {
  border-bottom: none;
}
.pub-label {
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.pub-row time,
.pub-row span,
.pub-row a {
  font-size: 0.88rem;
  color: var(--text);
  text-align: right;
}
.sources-box {
  margin: 0;
}
.sources-note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(214, 40, 40, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.sources-note strong {
  color: var(--accent);
}

[data-theme="dark"] .pub-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .sources-note {
  background: rgba(214, 40, 40, 0.1);
}

@media (max-width: 768px) {
  .article-publication {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
}
@media (max-width: 480px) {
  .pub-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .pub-row time,
  .pub-row span,
  .pub-row a {
    text-align: left;
  }
}

/* ==========================================================================
   Legal / Compliance Pages
   ========================================================================== */
.legal-page {
  padding: 20px 0 60px;
  max-width: 820px;
  margin: 0 auto;
}
.legal-head {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.legal-head h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  font-weight: 800;
  margin: 14px 0 8px;
  line-height: 1.15;
}
.legal-updated {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}
.legal-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}
.legal-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 28px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
}
.legal-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}
.legal-content h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--accent);
}
.legal-content p {
  margin-bottom: 14px;
  color: var(--text-soft);
}
.legal-content ul,
.legal-content ol {
  margin: 8px 0 18px 22px;
  color: var(--text-soft);
}
.legal-content li {
  margin-bottom: 7px;
  line-height: 1.7;
}
.legal-content a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover {
  text-decoration: none;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .legal-head h1 { font-size: 1.7rem; }
  .legal-content { font-size: 0.9rem; }
}

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1c;
  color: #e8e8e8;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.show {
  transform: translateY(0);
}
.cookie-banner .cookie-text {
  flex: 1;
  min-width: 260px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cookie-banner .cookie-text a {
  color: #ff6b6b;
  text-decoration: underline;
}
.cookie-banner .cookie-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-banner .cookie-btn {
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.cookie-banner .cookie-btn:hover {
  opacity: 0.85;
}
.cookie-banner .cookie-btn.accept {
  background: var(--accent);
  color: #fff;
}
.cookie-banner .cookie-btn.decline {
  background: transparent;
  color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-banner .cookie-btns { width: 100%; }
  .cookie-banner .cookie-btn { flex: 1; }
}

/* ==========================================================================
   Static site generator — additional layout classes
   (grid-2, grid-3, grid-4, home-grid, side-item, hero-card, page wrappers,
   search page, reading progress, category/latest page headers)
   ========================================================================== */

/* Multi-column grids (alias for card-grid with different column counts) */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Homepage main + sidebar layout */
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.home-main { min-width: 0; }
.home-sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 28px; }

/* Sidebar boxes (alias for .widget) */
.sidebar-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.sidebar-box h3 { font-family: var(--headline); font-size: 1.15rem; font-weight: 800; margin-bottom: 16px; }

/* Side items — horizontal compact cards (hero side + sidebar) */
.side-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.side-item:last-child { border-bottom: none; }
.side-item .thumb { width: 84px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.side-item h4 { font-size: 0.92rem; font-weight: 700; line-height: 1.35; margin: 4px 0; }
.side-item .cat-tag { font-size: 0.68rem; padding: 2px 8px; }
.side-item .meta { font-size: 0.76rem; color: var(--text-soft); }

/* Side list container */
.side-list { display: flex; flex-direction: column; }

/* Hero card (category pages — same style as .hero-main) */
.hero-card { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; min-height: 300px; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); }
.hero-card .hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; z-index: 2; }
.hero-card .hero-content h2 { font-family: var(--headline); font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin: 8px 0; }
.hero-card .hero-content h2 a { color: #fff; text-decoration: none; }
.hero-card .hero-content p { color: rgba(255,255,255,0.9); font-size: 0.95rem; margin-top: 6px; }

/* "View all" link */
.see-all { font-size: 0.88rem; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }

/* Section head (title + see-all) */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }

/* Recently updated strip title */
.strip-title { font-family: var(--headline); font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.recent-section-wrap { padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 24px 0; }

/* Reading progress bar (article pages) */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 9999; transition: width 0.1s ease; }

/* Page wrappers */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 24px 0; }
.category-wrap { padding: 24px 0; }
.latest-wrap { padding: 24px 0; }
.search-wrap { padding: 24px 0; min-height: 60vh; }

/* Category / Latest page header */
.category-head { margin: 24px 0 32px; }
.category-head h1 { font-family: var(--headline); font-size: 2.2rem; font-weight: 800; margin: 10px 0 6px; letter-spacing: -0.02em; }
.category-head .deck { color: var(--text-soft); font-size: 1.05rem; }

/* Search page */
.search-page-box { margin: 20px 0 32px; }
.search-page-box input { width: 100%; padding: 16px 20px; font-size: 1.1rem; border: 2px solid var(--border); border-radius: 12px; background: var(--bg-card); color: var(--text); font-family: var(--body); }
.search-page-box input:focus { outline: none; border-color: var(--accent); }
.search-results-page { min-height: 40vh; }
.search-results-page .grid-3 { gap: 20px; }
.search-results-page .empty-state { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.search-results-page .empty-state h2 { font-family: var(--headline); margin-bottom: 8px; color: var(--text); }

/* Card image wrapper (static cards) */
.card-img-wrap { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card-img-wrap img { transform: scale(1.05); }

/* Newsletter confirmation */
.newsletter-box.sent form { display: none; }
.newsletter-box.sent .newsletter-confirm { display: block; }
.newsletter-confirm { display: none; color: var(--accent); font-weight: 600; margin-top: 8px; }
.newsletter-box form { display: flex; gap: 8px; margin-top: 12px; }
.newsletter-box input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 0.9rem; }
.newsletter-box button { padding: 10px 18px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.9rem; white-space: nowrap; }
.newsletter-box button:hover { opacity: 0.9; }

/* Empty state (search no results) */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state h2 { font-family: var(--headline); font-size: 1.6rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-soft); }
.empty-state .btn { display: inline-block; padding: 10px 24px; background: var(--accent); color: #fff; border-radius: 8px; text-decoration: none; font-weight: 700; }

/* Responsive */
@media (max-width: 968px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-sidebar { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-card .hero-content h2 { font-size: 1.2rem; }
  .category-head h1 { font-size: 1.6rem; }
}
