/* News design system.
   A newsroom palette: one strong red for identity and urgency, near-black
   ink for headlines, and quiet greys for everything else, so the red keeps
   its meaning (breaking, live, the section bar) instead of becoming wallpaper.
   Token names are shared with ads.css, share.css, geo.css and friends. */
:root {
  --red: #D7141A;
  --red-dark: #A80F14;
  --red-ink: #B3121A;
  --red-tint: #FDECEC;

  /* Aliases used by the shared stylesheets. */
  --primary: var(--red);
  --primary-hover: var(--red-dark);
  --primary-ink: var(--red-ink);
  --primary-light: var(--red-tint);
  --primary-soft: #FAD7D8;
  --primary-border: #F3B7B9;
  --primary-ring: rgba(215, 20, 26, 0.18);
  --accent: var(--red);
  --accent-2: #FF6A6F;

  --navy: #141414;
  --navy-2: #1C1C1C;
  --navy-surface: #222;
  --navy-card: #2A2A2A;

  --ink: #121212;
  --ink-2: #2B2B2B;
  --slate-dark: #444;
  --slate: #666;
  --slate-light: #9A9A9A;
  --line: #E5E5E5;
  --line-strong: #D0D0D0;
  --panel: #F5F5F5;
  --panel-2: #EEEEEE;
  --white: #FFFFFF;
  --success: #12805C;
  --ok: #12805C;
  --warn: #B45309;
  --bad: #C81E1E;
  --info: #0B6BA8;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);

  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 46px; /* the sticky section bar */
  --wrap: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
@media (max-width: 1024px) { input, select, textarea { font-size: 16px; } }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--red); color: var(--white); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--navy); color: #CFCFCF; font-size: 0.78rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.topbar-date { font-weight: 600; color: #fff; }
.topbar-edition { color: #CFCFCF; }
.topbar-edition::before { content: '·'; margin: 0 8px; color: #777; }
.topbar-links { display: flex; gap: 18px; align-items: center; }
.topbar-links a:hover { color: #fff; }
.topbar-live { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; }
.topbar-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(215,20,26,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(215,20,26,0); } 100% { box-shadow: 0 0 0 0 rgba(215,20,26,0); } }
@media (max-width: 720px) { .topbar-links a:not(.topbar-live) { display: none; } .topbar-edition { display: none; } }

/* ---------- Masthead ---------- */
.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 16px; }
.masthead-side { display: flex; align-items: center; gap: 10px; }
.masthead-side.right { justify-content: flex-end; }
.logo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo-img { height: var(--logo-h, 54px); width: auto; max-width: min(480px, 70vw); object-fit: contain; }
.wordmark {
  font-family: var(--serif); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1; letter-spacing: -0.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 10px;
}
.wordmark-mark { display: inline-grid; place-items: center; width: 0.95em; height: 0.95em; background: var(--red); color: #fff; font-family: var(--body); font-size: 0.62em; font-weight: 900; border-radius: 3px; }
.logo-tagline { margin-top: 6px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); font-weight: 600; }
.mh-search { display: flex; align-items: center; height: 38px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 4px 0 14px; width: min(260px, 100%); background: var(--white); }
.mh-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--primary-ring); }
.mh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 0.9rem; }
.mh-search button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--slate); }
.mh-search button:hover { background: var(--panel); color: var(--red); }
.mh-search svg, .icon-btn svg { width: 18px; height: 18px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink); }
.icon-btn:hover { background: var(--panel); color: var(--red); }
.btn-alerts { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; font-size: 0.85rem; }
.btn-alerts:hover { background: var(--red-dark); }
.btn-alerts svg { width: 16px; height: 16px; }
.search-toggle { display: none; }
@media (max-width: 860px) {
  .masthead .wrap { grid-template-columns: auto 1fr auto; padding-top: 12px; padding-bottom: 12px; }
  .masthead .logo { align-items: flex-start; text-align: left; }
  .logo-tagline { display: none; }
  .logo-img { height: var(--logo-h-m, 38px); max-width: 62vw; }
  .mh-search, .btn-alerts span { display: none; }
  .btn-alerts { width: 40px; padding: 0; justify-content: center; }
  .search-toggle { display: inline-grid; }
  .masthead-side.left { display: none; }
  .masthead .wrap > .logo { grid-column: 1 / 3; }
}
.mobile-search { display: none; border-bottom: 1px solid var(--line); padding: 10px 0; background: var(--panel); }
.mobile-search.open { display: block; }
.mobile-search .mh-search { display: flex; width: 100%; }

/* ---------- Section bar ---------- */
.sectionbar { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.sectionbar .wrap { display: flex; align-items: stretch; height: var(--header-h); }
.sectionbar-links { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; flex: 1; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.sectionbar-links::-webkit-scrollbar { display: none; }
.sectionbar-links a { display: flex; align-items: center; padding: 0 14px; font-weight: 700; font-size: 0.86rem; letter-spacing: 0.01em; white-space: nowrap; text-transform: uppercase; position: relative; }
.sectionbar-links a:hover { background: rgba(0,0,0,.14); }
.sectionbar-links a.active { background: var(--red-dark); }
.sectionbar-links a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: #fff; }
.sectionbar-links .home-link { padding: 0 12px; }
.sectionbar-links .home-link.active::after { display: none; }
.sectionbar-links .home-link svg { width: 18px; height: 18px; }
.sectionbar .fc-link { flex: 0 0 auto; display: flex; align-items: center; padding: 0 0 0 16px; margin-left: 8px; border-left: 1px solid rgba(255,255,255,.3); font-weight: 800; font-size: 0.86rem; text-transform: uppercase; white-space: nowrap; }
.sectionbar .fc-link:hover, .sectionbar .fc-link.active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.sectionbar .fc-link span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: #fff; color: var(--red); font-size: 0.7rem; }
@media (max-width: 560px) { .sectionbar .fc-link { font-size: 0; padding-left: 12px; } .sectionbar .fc-link span { margin: 0; width: 24px; height: 24px; font-size: 0.85rem; } }

/* ---------- Ticker ---------- */
.ticker { background: var(--white); border-bottom: 1px solid var(--line); }
.ticker .wrap { display: flex; align-items: center; gap: 14px; height: 42px; overflow: hidden; }
.ticker-label { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; background: var(--red); color: #fff; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; border-radius: 2px; }
.ticker-label.is-latest { background: var(--ink); }
.ticker-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.ticker-label.is-latest::before { animation: none; background: var(--red); }
@keyframes blink { 50% { opacity: .25; } }
.ticker-track { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 95%, transparent); }
.ticker-items { display: flex; width: max-content; gap: 0; animation: ticker var(--ticker-dur, 60s) linear infinite; }
.ticker:hover .ticker-items, .ticker:focus-within .ticker-items { animation-play-state: paused; }
.ticker-items a { font-size: 0.9rem; font-weight: 600; white-space: nowrap; padding-right: 40px; position: relative; }
.ticker-items a::after { content: ''; position: absolute; right: 17px; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--red); transform: rotate(45deg); }
.ticker-items a:hover { color: var(--red); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { overflow-x: auto; }
  .ticker-items { animation: none; }
}

/* ---------- Common blocks ---------- */
.eyebrow { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.lead { color: var(--slate); margin-top: 10px; max-width: 720px; font-size: 1.02rem; }
.text-link { color: var(--red-ink); font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius-md); font-weight: 700; font-size: 0.9rem; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: var(--white); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); margin: 0 0 18px; padding-bottom: 8px; }
.section-head h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ''; width: 5px; height: 1.15em; background: var(--red); }
.section-head a.more { font-size: 0.82rem; font-weight: 700; color: var(--red-ink); white-space: nowrap; }
.section-head a.more:hover { text-decoration: underline; }

.kicker { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-ink); }
a.kicker:hover { text-decoration: underline; }
.tag-breaking { display: inline-block; background: var(--red); color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; margin-right: 6px; vertical-align: 2px; }
.meta { font-size: 0.78rem; color: var(--slate); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.meta > * + *::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--slate-light); margin-right: 10px; vertical-align: middle; }

/* Fact-check badge, used on cards and articles */
.fact-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; line-height: 1.2; white-space: nowrap; }
.fact-badge svg { width: 12px; height: 12px; flex: 0 0 auto; }
.fact-badge.ok { background: #E3F4EC; color: var(--ok); }
.fact-badge.warn { background: #FDF0DC; color: var(--warn); }
.fact-badge.bad { background: #FDE5E5; color: var(--bad); }
.fact-badge.info { background: #E2F0FA; color: var(--info); }

/* ---------- Story cards ---------- */
.story { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.story-img { display: block; position: relative; overflow: hidden; background: var(--panel); aspect-ratio: 16 / 9; border-radius: var(--radius-sm); }
.story-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.story:hover .story-img img { transform: scale(1.035); }
.story-img-fallback { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--serif); font-weight: 800; font-size: 2rem; color: #fff; background: linear-gradient(135deg, var(--red-dark), var(--red)); }
.story-title { font-family: var(--serif); font-weight: 700; color: var(--ink); line-height: 1.25; font-size: 1.12rem; }
.story-title a:hover { color: var(--red-ink); }
.story-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.story .kicker, .story .fact-badge, .story .meta a { position: relative; z-index: 2; }
.story-excerpt { color: var(--slate-dark); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.story.row { flex-direction: row; gap: 14px; align-items: flex-start; }
.story.row .story-img { flex: 0 0 120px; width: 120px; aspect-ratio: 4 / 3; }
.story.row .story-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.story.row .story-title { font-size: 1rem; }
.story.row.lg .story-img { flex-basis: 260px; width: 260px; aspect-ratio: 16 / 10; }
.story.row.lg .story-title { font-size: 1.3rem; }
@media (max-width: 640px) {
  .story.row .story-img { flex-basis: 104px; width: 104px; }
  .story.row.lg { flex-direction: column; }
  .story.row.lg .story-img { width: 100%; flex-basis: auto; }
  .story.row.lg .story-title { font-size: 1.15rem; }
}
.story.mini { gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.story.mini:last-child { border-bottom: 0; }
.story.mini .story-title { font-size: 0.98rem; }

.story-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.story-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .story-grid, .story-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .story-grid, .story-grid.cols-3 { grid-template-columns: 1fr; } }

/* Numbered most-read list */
.trending { counter-reset: tr; list-style: none; margin: 0; padding: 0; }
.trending li { counter-increment: tr; display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trending li:last-child { border-bottom: 0; }
.trending li::before { content: counter(tr); font-family: var(--serif); font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--red); opacity: .9; }
.trending a { font-family: var(--serif); font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.trending a:hover { color: var(--red-ink); }
.trending .meta { margin-top: 4px; }

.widget { border-top: 3px solid var(--red); background: var(--white); padding-top: 12px; margin-bottom: 28px; }
.widget-title { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin: 0 0 6px; }

/* ---------- Breadcrumbs, pagination, misc ---------- */
.breadcrumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.78rem; color: var(--slate); }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; color: var(--slate-light); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs [aria-current] { color: var(--slate-light); }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 28px 0 56px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; font-size: 0.88rem; }
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }
.pagination .gap { border: none; }

.empty-state { color: var(--slate); padding: 40px 0 80px; }

/* Code blocks (tech stories can still carry code) */
.code-block-wrapper { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--navy); }
.code-block-wrapper pre { margin: 0; padding: 20px; overflow-x: auto; color: #EDEDED; font-family: var(--mono); font-size: 0.88rem; line-height: 1.6; }
.code-block-wrapper pre code { background: none !important; color: inherit !important; padding: 0 !important; font-size: inherit !important; }
.copy-code-btn { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #ddd; }
.copy-code-btn:hover { background: rgba(255,255,255,.25); color: #fff; }
.copy-code-btn.copied { background: var(--success); border-color: var(--success); color: #fff; }
.copy-code-btn svg { width: 16px; height: 16px; fill: currentColor; pointer-events: none; }

/* Page header used by listing pages */
.page-head { padding: 22px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.01em; }
.page-head .lead { margin-top: 6px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.list-search { display: flex; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; width: min(340px, 100%); }
.list-search input { flex: 1; min-width: 0; border: 0; padding: 0 12px; font: inherit; outline: 0; }
.list-search button { width: 44px; background: var(--red); color: #fff; display: grid; place-items: center; }
.list-search button svg { width: 18px; height: 18px; }
.list-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--primary-ring); }

/* Two-column page body: main + sidebar */
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
/* The sidebar runs the full height of the row so a sticky ad inside it can
   follow the reader; the sidebar itself never sticks, or its lower half
   would be unreachable whenever it is taller than the screen. */
.with-sidebar > aside { align-self: stretch; min-width: 0; }
.with-sidebar > :first-child { min-width: 0; }
@media (max-width: 1024px) {
  .with-sidebar { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #BDBDBD; margin-top: 56px; border-top: 4px solid var(--red); font-size: 0.9rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 44px 0 32px; }
.footer-brand .wordmark { color: #fff; font-size: 1.9rem; }
.footer-brand p { margin-top: 12px; max-width: 340px; line-height: 1.6; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-heading { color: #fff; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px; }
.footer-col a:hover, .footer-bottom a:hover { color: #fff; }
.footer-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.footer-bottom { border-top: 1px solid #2E2E2E; padding: 16px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: #8C8C8C; }
.footer-bottom nav { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* Preview banner for drafts */
.preview-bar { background: #FFF4D6; color: #7A4B00; text-align: center; padding: 10px 16px; font-weight: 600; font-size: 0.88rem; }
.preview-bar a { text-decoration: underline; margin-left: 8px; }

/* ---------- Compact logo in the sticky section bar ---------- */
.sb-logo { display: flex; align-items: center; width: 0; overflow: hidden; opacity: 0; transition: width .2s ease, opacity .2s ease, margin .2s ease; }
.sb-logo .wordmark-mark { width: 30px; height: 30px; font-size: 1.05rem; background: #fff; color: var(--red); font-family: var(--serif); }
.sectionbar.is-stuck .sb-logo { width: 30px; opacity: 1; margin-right: 14px; }
.sectionbar.is-stuck .home-link { display: none; }

/* ---------- Trending topics strip ---------- */
.trending-bar { border-bottom: 1px solid var(--line); background: var(--white); }
.trending-bar .wrap { display: flex; align-items: center; gap: 12px; height: 40px; }
.trending-label { flex: 0 0 auto; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.trending-label::before { content: ''; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--red); }
.trending-tags { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.trending-tags::-webkit-scrollbar { display: none; }
.trending-tags a { flex: 0 0 auto; font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-2); white-space: nowrap; }
.trending-tags a:hover { background: var(--red-tint); color: var(--red-ink); }

/* ---------- Social icons ---------- */
.social-icons { display: flex; gap: 8px; align-items: center; }
.social-icons a { display: inline-grid; place-items: center; border-radius: 50%; transition: background .15s, color .15s; }
.social-icons svg { width: 15px; height: 15px; }
.topbar-social { margin-left: 4px; padding-left: 14px; border-left: 1px solid #333; gap: 12px; }
.topbar-social a { color: #BDBDBD; }
.topbar-social a:hover { color: #fff; }
@media (max-width: 720px) { .topbar-social { display: none; } }
.footer-social { margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; background: #2A2A2A; color: #DDD; }
.footer-social a:hover { background: var(--red); color: #fff; }
.gnews-btn { display: inline-flex; gap: 5px; align-items: center; margin-top: 14px; padding: 8px 14px; border: 1px solid #3A3A3A; border-radius: 999px; font-size: 0.82rem; color: #DDD; }
.gnews-btn:hover { border-color: #fff; color: #fff; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 18px; bottom: 22px; z-index: 80; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: var(--shadow-md); }
.to-top:hover { background: var(--red-dark); }
.to-top svg { width: 22px; height: 22px; }
.to-top[hidden] { display: none; }
main:focus { outline: none; }

/* Top bar on tablets: keep it on one line by dropping the secondary links. */
.topbar p, .topbar-links a { white-space: nowrap; }
@media (max-width: 1024px) {
  .topbar-links a[href$="/about"], .topbar-links a[href$="/contact"], .topbar-links a[href$="feed.xml"] { display: none; }
}
@media (max-width: 900px) { .topbar-edition { display: none; } }

/* Uploaded logos (sizes come from Settings → Brand & social) */
.footer-logo-link { display: inline-block; }
.footer-logo { display: block; height: var(--logo-f-h, 40px); width: auto; max-width: 100%; object-fit: contain; }
.footer-logo.is-header-logo { background: #fff; padding: 6px 10px; border-radius: 6px; box-sizing: content-box; }
.sb-favicon { width: 30px; height: 30px; border-radius: 6px; background: #fff; object-fit: contain; display: block; box-shadow: 0 0 0 2px #fff; }
