/* ==================================================
   TRYNEWS — shared design system: "Almanac"
   Loaded once, cached by the browser across every page
   (homepage, ~4,900 articles, legal pages, horoscope).
   Keep this file lean — every byte here is downloaded by
   first-time visitors before anything renders.

   Palette rationale: trynews now runs hard news and daily/
   weekly/monthly/yearly horoscopes side by side — genuinely
   almanac territory, the old publishing format that mixed
   weather, astrology and current events in one issue. Ink is
   a deep indigo-black (night sky) rather than neutral black;
   paper is warm parchment rather than cool newsprint grey.

   Two accent shades by design, not accident: --accent (bronze)
   is for text/links on the light parchment ground; --accent-light
   (a lighter gold) is for the same role on dark ink grounds
   (header, ticker, masthead, page-hero). A single accent can't
   clear 4.5:1 in both directions — verified by contrast-checking
   every real usage before choosing these values, the same way
   --live and the .cat-* tag colors were already fixed for AA
   in this file's history.
   ================================================== */

:root {
  --ink:        #171a2c;
  --ink-soft:   #232842;
  --paper:      #f3ede0;
  --cream:      #e9e0c9;
  --surface:    #fbf8f0;
  --accent:       #8a5a1f; /* bronze — text/links on paper (5.1:1) */
  --accent-light: #d4a44a; /* gold — text/labels on ink (7.5:1) */
  --accent-2:   #3d5a8c;   /* indigo — borders/structure on paper only (5.9:1); never text-on-ink */
  --accent-ink: #ffffff;
  --read-ink:   #2b2717;   /* warm near-black for long-form reading text */
  --excerpt-ink:#4a4433;   /* warm dark brown for excerpts/ledes/notes */
  --muted:      #6f6a58;
  --rule:       #cabf9c;
  --live:       #c11e1e;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 8px 24px -12px rgba(23,26,44,0.25);
  --shadow-lg:  0 20px 48px -16px rgba(23,26,44,0.35);
  --maxw:       1280px;
  --font-display: 'Cormorant Garamond', 'Noto Serif Devanagari', Georgia, serif;
  --font-read:    'Spectral', 'Noto Serif Devanagari', Georgia, serif;
  --font-body:    'Archivo', 'Noto Sans Devanagari', 'Segoe UI', sans-serif;
  --font-mono:    'Archivo', 'Noto Sans Devanagari', 'Segoe UI', sans-serif;
}

/* Category accent hues — used for tag chips, card borders, hover glow.
   Already fixed once for AA (white text) — left untouched here; they're
   informational chip colors, not part of the core brand palette, and
   read fine against parchment/ink either way. */
.cat-technology { --cat: #4f46e5; }
.cat-science    { --cat: #0a7a56; }
.cat-business   { --cat: #b45309; }
.cat-health     { --cat: #be185d; }
.cat-world      { --cat: #046380; }
.cat-culture    { --cat: #7c3aed; }
.cat-general, .cat-sports { --cat: #475569; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--read-ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #fff; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--muted); /* the one color that clears 3:1 against both ink and paper grounds */
  outline-offset: 2px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ── LIVE PULSE DOT ── */
.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(193,30,30,0.6);
  animation: pulse 1.8s infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(193,30,30,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(193,30,30,0); }
  100% { box-shadow: 0 0 0 0 rgba(193,30,30,0); }
}

/* ==================================================
   SITE HEADER — slim, sticky, on every page
   ================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23,26,44,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
}

.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.01em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.brand .accent { color: var(--accent-light); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  justify-content: flex-end;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a, .site-nav button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  color: rgba(255,255,255,0.62);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover, .site-nav button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.site-nav a.active, .site-nav button.active { color: #fff; background: rgba(212,164,74,0.28); }

/* Hamburger toggle — injected by site.js, only shown once site.js has
   actually measured that the nav doesn't fit and added .nav-collapsed to
   <html> (see the responsive section below). Absent entirely without JS,
   so it never shows on a page where the drawer wouldn't be interactive. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  margin-left: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,0.16); }
.nav-toggle svg { width: 20px; height: 20px; display: block; }

/* Language switcher — visually distinct pill so it doesn't read as just
   another nav item */
.lang-switch {
  margin-left: 6px;
  padding: 6px 12px !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  border-radius: 999px !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lang-switch:hover { border-color: var(--accent-light) !important; background: rgba(212,164,74,0.14) !important; }

/* ── Site search — pill input in the dark header, light dropdown card ── */
.site-search { position: relative; margin-left: 8px; flex: 0 0 auto; }
.site-search input {
  width: 150px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font: inherit;
  font-size: 12px;
  transition: width .2s, background .2s, border-color .2s;
}
.site-search input::placeholder { color: rgba(255,255,255,0.5); }
.site-search input:focus {
  outline: none;
  width: 220px;
  background: rgba(255,255,255,0.14);
  border-color: var(--accent-light);
}
/* position:fixed with top/left/width set inline by search.js from the
   input's live getBoundingClientRect() — NOT position:absolute anchored
   to .site-search. .search-dropdown lives inside .site-nav, which needs
   overflow-x:auto for its own horizontal-scroll / drawer-scroll behavior;
   per spec an element with only overflow-x set computes overflow-y to
   auto too, and an ancestor with overflow other than visible clips every
   descendant during paint — position:fixed included — as long as it
   stays in that DOM subtree. search.js reparents this element to <body>
   at init specifically to escape that clip. */
.search-dropdown {
  position: fixed;
  max-width: 90vw;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 300;
}
.search-result { display: block; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--cream); }
.search-result .category-tag { margin-bottom: 6px; }
.search-result-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--read-ink); line-height: 1.35; }
.search-result-excerpt { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.search-empty { padding: 16px; font-size: 13px; color: var(--muted); text-align: center; }

/* ── HOMEPAGE MASTHEAD (index only) ── */
.masthead {
  background:
    radial-gradient(ellipse 900px 300px at 15% -20%, rgba(138,90,31,0.30), transparent),
    radial-gradient(ellipse 700px 260px at 100% 0%, rgba(61,90,140,0.28), transparent),
    var(--ink);
  color: var(--paper);
  padding: 56px 24px 40px;
  text-align: center;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

.masthead-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243,237,224,0.55);
  margin-bottom: 20px;
}
.masthead-eyebrow .sep { color: rgba(243,237,224,0.25); }

.masthead-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(52px, 8.5vw, 96px);
  letter-spacing: 0;
  line-height: 1;
}
.masthead-logo .accent {
  background: linear-gradient(100deg, var(--accent-2), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.masthead-tagline {
  font-family: var(--font-read);
  font-style: italic;
  font-size: 16px;
  color: rgba(243,237,224,0.6);
  margin-top: 10px;
  letter-spacing: 0.01em;
}

/* ── TICKER ── */
.ticker {
  background: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 38px;
}
.ticker-label {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: var(--live);
  color: #fff;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 16px;
  height: 100%;
  box-shadow: 6px 0 10px -4px rgba(0,0,0,0.35);
}
.ticker-label .pulse-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
.ticker-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  padding-left: 24px;
  color: rgba(243,237,224,0.85);
  font-size: 13px;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { color: rgba(243,237,224,0.85); }
.ticker-item:hover { color: var(--accent-light); text-decoration: underline; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==================================================
   AD SLOTS — fixed footprints reserved now so turning
   real ad units on later causes ZERO layout shift (CLS-safe).
   Sizes follow standard IAB dimensions: 728x90 leaderboard,
   300x250 sidebar.
   ================================================== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border: 1px dashed var(--rule);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
}
.ad-slot--leaderboard { min-height: 90px; margin: 24px 0; }
.ad-slot--rect         { min-height: 250px; width: 100%; max-width: 300px; margin: 0 auto 24px; }
.ad-slot--native        { min-height: 180px; margin: 32px 0; }
@media (max-width: 640px) {
  .ad-slot--leaderboard { min-height: 50px; }
}

/* ==================================================
   HERO (homepage top story) — grid-template-areas so the
   breakpoints redefine layout safely without leftover
   grid-column placements dragging in phantom columns.
   ================================================== */
.hero {
  padding: 32px 0 0;
}
.hero-grid {
  display: grid;
  gap: 0;
  grid-template-columns: 1.15fr 1fr 300px;
  grid-template-areas: "main secondary sidebar";
  border-bottom: 2px solid var(--ink);
  padding-bottom: 40px;
  margin-bottom: 40px;
}
.hero-main      { grid-area: main;      padding-right: 32px; border-right: 1px solid var(--rule); }
.hero-secondary { grid-area: secondary; padding: 0 32px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 24px; }
.hero-sidebar   { grid-area: sidebar;   padding-left: 32px; }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "main secondary"; }
  .hero-sidebar { display: none; }
  .hero-secondary { border-right: none; }
}
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "main" "secondary"; gap: 0; }
  .hero-main { padding-right: 0; border-right: none; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
  .hero-secondary { padding: 24px 0 0; border-right: none; }
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--cat, var(--accent));
  color: #fff;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin-bottom: 14px;
}
.hero-headline a:hover { color: var(--accent); }

.hero-excerpt { font-family: var(--font-read); font-size: 18px; color: var(--excerpt-ink); line-height: 1.6; margin-bottom: 16px; }

.article-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.article-meta .dot { color: var(--rule); }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  transition: gap .15s ease;
}
.read-more:hover { gap: 10px; color: var(--accent); }

.sec-article + .sec-article { padding-top: 24px; border-top: 1px solid var(--rule); }
.sec-headline { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.sec-headline a:hover { color: var(--accent); }

.sidebar-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.sidebar-article { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sidebar-article:first-child { padding-top: 0; }
.sidebar-num { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 27px; color: #8a7a54; line-height: 1; width: 28px; flex-shrink: 0; } /* 3.6:1 vs paper at this size — checked, clears the 3:1 large-text floor */
.sidebar-headline { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.3; }
.sidebar-headline a:hover { color: var(--accent); }

/* ==================================================
   SECTIONS + ARTICLE CARDS (reused: homepage grids AND
   article-page "related" widgets share this card look)
   ================================================== */
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.005em; }
.section-rule { flex: 1; height: 1px; background: var(--rule); }
.section-viewall { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.section-viewall:hover { color: var(--accent); text-decoration: underline; }

section + section, .ad-slot { margin-top: 48px; }
section:first-of-type { margin-top: 0; }

.article-grid   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.article-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.article-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--cat, var(--accent));
}
.card-headline { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.card-headline a:hover { color: var(--accent); }
.card-excerpt {
  font-family: var(--font-read);
  font-size: 14.5px;
  color: var(--excerpt-ink);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Feature strip — dark accent band, 3-up */
.feature-strip {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 36px;
  position: relative;
  overflow: hidden;
  min-height: 230px; /* reserves space before JS populates it from articles/latest.json — this was the single biggest CLS contributor (empty div collapsing to 0 height, then jumping to full size) */
}
.feature-strip::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 500px 220px at 100% 0%, rgba(61,90,140,0.22), transparent);
  pointer-events: none;
}
.feature-article { position: relative; padding: 0 28px; }
.feature-article:first-child { padding-left: 0; }
.feature-article:last-child { padding-right: 0; }
.feature-divider { width: 1px; background: rgba(255,255,255,0.14); }
.feature-headline { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 10px; }
.feature-headline a:hover { color: var(--accent-light); }
.feature-excerpt { font-family: var(--font-read); font-size: 14.5px; color: rgba(243,237,224,0.7); line-height: 1.5; }

/* Loading skeletons */
.loading-pulse {
  background: linear-gradient(90deg, var(--cream) 25%, #f2e9d2 37%, var(--cream) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ==================================================
   ARTICLE PAGE
   ================================================== */
.article-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; gap: 40px; }
}

.article-header { padding-bottom: 28px; border-bottom: 2px solid var(--ink); margin-bottom: 28px; }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin-bottom: 18px;
}
.article-excerpt {
  font-family: var(--font-read);
  font-size: 20px;
  color: var(--excerpt-ink);
  line-height: 1.5;
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 18px;
}
.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ── Share bar ── */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.share-label { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--cream); border: 1px solid var(--rule); color: var(--ink-soft);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.share-btn:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--ink); transform: translateY(-1px); }
.share-btn.share-copied { background: var(--accent); border-color: var(--accent); color: #fff; }

.lens-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 8px; }
.lens-strip-label { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.lens-tag { display: inline-flex; align-items: center; background: var(--cream); color: var(--ink-soft); font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--rule); text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.lens-tag:hover { background: var(--accent-light); color: var(--ink); border-color: var(--accent-light); }
.format-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 20px; line-height: 1.55; }
.format-note a { color: var(--accent); text-decoration: none; font-weight: 600; }
.format-note a:hover { text-decoration: underline; }
@media (max-width: 600px) { .lens-strip-label { width: 100%; margin-bottom: 2px; } }

.article-body { font-family: var(--font-read); font-size: 19px; line-height: 1.75; color: var(--read-ink); }
.article-body p { margin-bottom: 22px; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 27px; font-weight: 700;
  margin: 38px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 84px; /* clears the sticky header when a lens-tag jumps here */
}
.article-body h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin: 28px 0 10px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0; padding: 14px 22px;
  background: var(--cream);
  font-style: italic; font-size: 20px; color: var(--read-ink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body ul, .article-body ol { margin: 0 0 22px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { font-weight: 700; }

.article-tags { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tags-label { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tag { background: var(--cream); border: 1px solid var(--rule); font-size: 12px; padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.tag:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.related-articles { margin-top: 40px; padding: 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); border-left: 3px solid var(--accent); }
.related-articles h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 12px; }
.related-articles ul { list-style: none; margin: 0; padding: 0; }
.related-articles li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.related-articles li:last-child { border-bottom: none; }
.related-articles a { color: var(--accent); font-weight: 600; font-size: 14px; }
.related-articles a:hover { text-decoration: underline; }

/* Sidebar (article page) */
.article-sidebar { display: flex; flex-direction: column; gap: 32px; }
.sidebar-widget-title {
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px;
}
.fb-like-box-wrap { padding: 10px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); }

/* ==================================================
   LEGAL / STATIC PAGES
   ================================================== */
.page-hero {
  background: var(--ink); color: var(--paper);
  padding: 56px 24px;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
.page-hero-inner { max-width: 820px; margin: 0 auto; }
.page-eyebrow { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 10px; }
.page-title { font-family: var(--font-display); font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -0.005em; }
.page-subtitle { margin-top: 12px; color: rgba(243,237,224,0.7); font-size: 16px; max-width: 640px; }

.page-body { max-width: 820px; margin: 0 auto; padding: 48px 24px 64px; font-family: var(--font-read); }
.page-body h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 36px 0 12px; }
.page-body h2:first-child { margin-top: 0; }
.page-body p { margin-bottom: 16px; line-height: 1.7; color: var(--read-ink); }
.page-body ul { margin: 0 0 16px 22px; line-height: 1.7; color: var(--read-ink); }
.page-body li { margin-bottom: 6px; }
.page-body a { color: var(--accent); font-weight: 600; }
.page-body a:hover { text-decoration: underline; }
.page-note {
  background: var(--cream); border-left: 3px solid var(--accent-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px; margin: 20px 0; font-size: 15px; color: var(--excerpt-ink);
}
.contact-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.contact-card h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 6px; }
.contact-card a { color: var(--accent); }

/* ==================================================
   HOROSCOPE — hub grid + per-sign tabs
   ================================================== */
.zodiac-grid { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 64px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.zodiac-tile {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px 20px; text-align: center; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.zodiac-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.zodiac-tile-symbol { font-size: 36px; line-height: 1; margin-bottom: 10px; color: var(--accent-2); }
.zodiac-tile-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.zodiac-tile-dates { font-size: 13px; color: var(--muted); }

.horoscope-sign-header {
  display: flex; align-items: center; gap: 20px; max-width: 820px; margin: 0 auto;
}
.horoscope-symbol { font-size: 54px; line-height: 1; color: var(--accent-light); flex-shrink: 0; }
.horoscope-sign-meta { display: flex; gap: 16px; margin-top: 6px; flex-wrap: wrap; font-size: 13px; color: rgba(243,237,224,0.65); }
.horoscope-sign-meta span strong { color: rgba(243,237,224,0.9); }

.horoscope-tabs {
  display: flex; gap: 4px; max-width: 820px; margin: 0 auto; padding: 0 24px;
  border-bottom: 2px solid var(--rule); margin-top: 40px;
}
.horoscope-tab {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 12px 18px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; background: none; border-left: none; border-right: none; border-top: none;
}
.horoscope-tab:hover { color: var(--read-ink); }
.horoscope-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.horoscope-panel { max-width: 820px; margin: 0 auto; padding: 28px 24px 64px; }
.horoscope-panel[hidden] { display: none; }
.horoscope-updated { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.horoscope-text {
  font-family: var(--font-read);
  font-size: 19px; line-height: 1.7; color: var(--read-ink);
  min-height: 5.5em; /* daily/weekly default — reserves the skeleton's
                         footprint so the real text swap-in doesn't shift
                         the page, same fix as the homepage hero's CLS
                         issue. Longer periods override this below. */
}
.horoscope-text p { margin-bottom: 16px; }
.horoscope-text p:last-child { margin-bottom: 0; }
/* Monthly/yearly run much longer (see generate_horoscopes.py's
   PERIOD_SPECS) — a taller reserve keeps their swap-in just as
   shift-free as the shorter periods'. */
#ho-panel-monthly .horoscope-text { min-height: 14em; }
#ho-panel-yearly .horoscope-text { min-height: 20em; }
.horoscope-disclosure {
  max-width: 820px; margin: 0 auto 48px; padding: 0 24px;
  font-size: 13px; color: var(--muted);
}
.horoscope-disclosure a { color: var(--accent); font-weight: 600; }

.other-signs { max-width: 820px; margin: 0 auto 56px; padding: 0 24px; }
.other-signs-title { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.other-signs-list { display: flex; flex-wrap: wrap; gap: 8px; }
.other-signs-list a {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px;
}
.other-signs-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ── Homepage horoscope digest widget ── */
.horo-widget {
  background: var(--ink-soft); color: var(--paper);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex; align-items: center; gap: 28px;
  margin-top: 40px;
}
.horo-widget-label { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); flex-shrink: 0; writing-mode: horizontal-tb; }
.horo-widget-sign { font-family: var(--font-display); font-style: italic; font-size: 22px; font-weight: 600; flex-shrink: 0; }
.horo-widget-text { font-family: var(--font-read); font-size: 15px; line-height: 1.55; color: rgba(243,237,224,0.82); flex: 1; min-width: 0; }
.horo-widget-link { flex-shrink: 0; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--accent-light); white-space: nowrap; }
.horo-widget-link:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .horo-widget { flex-wrap: wrap; padding: 22px 24px; }
  .horo-widget-text { order: 3; flex-basis: 100%; }
}

@media (max-width: 900px) {
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .zodiac-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 32px 16px 48px; }
  .horoscope-sign-header { padding: 0 16px; }
  .horoscope-symbol { font-size: 40px; }
  .horoscope-tabs { padding: 0 16px; overflow-x: auto; }
  .horoscope-panel, .horoscope-disclosure { padding-left: 16px; padding-right: 16px; }
}

/* ==================================================
   FOOTER — shared across all pages
   ================================================== */
footer.site-footer { background: var(--ink); color: rgba(243,237,224,0.6); margin-top: 64px; }
.footer-grid { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 24px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 26px; color: #fff; letter-spacing: 0.01em; margin-bottom: 12px; }
.footer-brand .accent { color: var(--accent-light); }
.footer-about { font-family: var(--font-read); font-size: 14px; line-height: 1.6; max-width: 320px; }
.footer-col-title { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(243,237,224,0.4); margin-bottom: 14px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; flex-wrap: wrap; gap: 12px;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: #fff; }

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .article-grid, .article-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .feature-strip { grid-template-columns: 1fr; padding: 28px; gap: 24px; min-height: 560px; }
  .feature-article { padding: 0 !important; }
  .feature-divider { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .article-grid, .article-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .site-header-inner { padding: 0 16px; }
  .masthead { padding: 40px 20px 32px; }
}

/* ── Adaptive nav collapse ──
   Not a fixed pixel breakpoint. site.js measures the nav's actual
   natural width against the space available in the header on load and
   on every resize, and adds .nav-collapsed to <html> only when the
   items genuinely don't fit — so the same horizontal nav that works on
   a phone in landscape stays put, and a narrower desktop window that
   can't fit every category collapses too. Without JS this class never
   appears and the header falls back to the original horizontal-scroll
   nav, so navigation still works either way. */
.nav-collapsed .nav-toggle { display: inline-flex; }

.nav-collapsed .site-nav {
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  /* Explicit vh-based height, not "bottom: 0" — .site-header is
     position:sticky, which (in current browsers) becomes the
     containing block for fixed descendants, so a percentage/edge
     value like "bottom: 0" resolves against the ~57px header box
     instead of the viewport and collapses the drawer. vh is always
     viewport-relative regardless of containing block. */
  height: calc(100vh - 57px);
  z-index: 100;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 8px 20px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 0;
  visibility: hidden;
  opacity: 0;
  background: var(--ink);
  box-shadow: 0 16px 32px -12px rgba(0,0,0,0.5);
  transition: opacity .18s ease, visibility .18s ease;
}
.nav-collapsed .site-nav.nav-open {
  max-height: none;
  visibility: visible;
  opacity: 1;
}
.nav-collapsed .site-nav a,
.nav-collapsed .site-nav button {
  width: 100%;
  text-align: left;
  padding: 15px 10px;
  font-size: 15px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-collapsed .site-nav a.active,
.nav-collapsed .site-nav button.active { background: none; color: var(--accent-light); }
.nav-collapsed .lang-switch {
  display: flex;
  justify-content: center;
  margin: 14px 0 0;
  border-radius: var(--radius-sm) !important;
}
.nav-collapsed .site-search { display: flex !important; margin: 14px 0 0; width: 100%; }
.nav-collapsed .site-search input,
.nav-collapsed .site-search input:focus { width: 100%; }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .article-grid, .article-grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .article-wrap { padding: 28px 16px 0; }
}

@media (max-width: 480px) {
  .masthead-logo { font-size: 48px; }
  .hero-headline { font-size: 26px; }
}

/* ── Trending Stories digest bubble + popup ── */
.digest-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 500;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: var(--accent-light);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .15s;
}
.digest-bubble:hover { transform: translateY(-2px) scale(1.04); }
.digest-bubble-open { background: var(--accent); color: #fff; }
.digest-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--live); color: #fff;
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--paper);
}

.digest-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 500;
  width: min(340px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: digest-in .18s ease;
}
@keyframes digest-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.digest-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink); color: var(--accent-light);
  font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 12px 16px;
}
.digest-close { background: none; border: none; color: var(--accent-light); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.digest-list { display: flex; flex-direction: column; }
.digest-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.digest-item:last-child { border-bottom: none; }
.digest-item:hover { background: var(--cream); }
.digest-item-cat {
  align-self: flex-start;
  background: var(--cat, var(--accent)); color: #fff;
  font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
}
.digest-item-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--read-ink); }
.digest-share-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--rule);
}
.digest-share-label {
  font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-right: 2px;
}
.digest-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--cream); border: 1px solid var(--rule); color: var(--read-ink);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.digest-share-btn:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--ink); transform: translateY(-1px); }

@media (max-width: 480px) {
  .digest-bubble { right: 14px; bottom: 14px; width: 48px; height: 48px; }
  .digest-panel { right: 12px; left: 12px; width: auto; bottom: 74px; }
}
