/* ==========================================================================
   THE DAILY SAMACHAR — Premium Editorial Design System
   ==========================================================================
   A distinctive, world-class editorial aesthetic.
   - Headlines: Fraunces (variable serif w/ optical sizing)
   - UI / body : Geist (modern grotesque)
   - Mono     : JetBrains Mono (for meta, tabular numerics)

   Light theme  : warm newsprint cream + ink black
   Dark theme   : warm near-black + cream text + amber accent
   Brand accent : editorial crimson (warm, considered, NEVER pure red)
   ========================================================================== */

/* -------- Variables: Light (default) ------------------------------------ */
:root {
  /* Surface — clean traditional newspaper white */
  --paper:        #FDFCF8;   /* pure white background */
  --paper-2:      #F3F1EC;   /* very light warm gray for cards / wells */
  --paper-3:      #E6E2D8;   /* slightly deeper neutral */
  --ink:          #0D162B;   /* warm ink black */
  --ink-2:        #2A364F;
  --ink-3:        #57544D;   /* muted text */
  --ink-4:        #8E8B83;   /* subtle / meta */
  --rule:         #D1CCC1;   /* neutral hairline rule */
  --rule-soft:    rgba(13, 22, 43, 0.06);

  /* Brand */
  --accent:       #C82A3A;   /* editorial crimson */
  --accent-2:     #A41B28;   /* hover/press */
  --accent-soft:  rgba(200, 42, 58, 0.08);
  --gold:         #B58A2E;   /* secondary accent */

  /* Type stacks */
  --serif:  "Newsreader", "Fraunces", "GT Sectra", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:   "Public Sans", "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:   "Chivo Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --max:    1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --rule-w: 1px;
  --radius: 2px;
  --radius-md: 6px;

  /* Motion */
  --ease:        cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast:      160ms var(--ease);
  --t:           260ms var(--ease);
  --t-slow:      480ms var(--ease);

  color-scheme: light;
}

/* -------- Dark theme ---------------------------------------------------- */
.dark-mode {
  --paper:        #121212;
  --paper-2:      #1A1A1A;
  --paper-3:      #242424;
  --ink:          #FDFCF8;
  --ink-2:        #E6E2D8;
  --ink-3:        #A39B85;
  --ink-4:        #7A7263;
  --rule:         #333333;
  --rule-soft:    rgba(253, 252, 248, 0.08);
  --accent:       #E04859;
  --accent-2:     #C82A3A;
  --accent-soft:  rgba(224, 72, 89, 0.10);
  --gold:         #D6A85C;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  width: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "ss02", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  margin: 0;
  padding: 0;
  overflow-x: clip; /* Fix mobile scaling/scrolling issues without breaking sticky */
  width: 100%;
  position: relative;
  transition: background-color var(--t), color var(--t);
}

/* Subtle paper grain — adds tactile warmth without busy-ness */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.dark-mode body::before { mix-blend-mode: screen; opacity: 0.22; }

main, header, footer, nav, section, article, aside { position: relative; z-index: 2; }

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--accent); }

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

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  color: var(--ink);
  line-height: 1.06;
  letter-spacing: -0.018em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.18; }
h4 { font-size: 1.0625rem; line-height: 1.3; }

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-main { padding: 28px 0 80px; }

section { margin-bottom: clamp(48px, 7vw, 96px); }

/* Tiny grid system */
.grid { display: grid; gap: clamp(20px, 2.6vw, 36px); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

@media (min-width: 1025px) {
  .col-span-3  { grid-column: span 3; }
  .col-span-4  { grid-column: span 4; }
  .col-span-5  { grid-column: span 5; }
  .col-span-6  { grid-column: span 6; }
  .col-span-7  { grid-column: span 7; }
  .col-span-8  { grid-column: span 8; }
  .col-span-12 { grid-column: span 12; }
}

@media (max-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .col-span-8, .col-span-7, .col-span-6, .col-span-5, .col-span-4, .col-span-12 { grid-column: span 12; }
  .col-span-3 { grid-column: span 6; }
}

@media (max-width: 640px) {
  .grid-12 { grid-template-columns: 1fr !important; }
  .col-span-3, .col-span-4, .col-span-5, .col-span-6,
  .col-span-7, .col-span-8, .col-span-12 { grid-column: 1 / -1 !important; }
}

/* ==========================================================================
   MASTHEAD — newspaper-style top bar + brand + nav
   ========================================================================== */
.masthead {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  z-index: 50;
}

/* Slim utility bar */
.mh-utility {
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.mh-utility .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px; gap: 24px;
}
.mh-utility .util-l, .mh-utility .util-r {
  display: flex; gap: 22px; align-items: center;
}
.mh-utility .util-pulse {
  display: inline-flex; align-items: center; gap: 8px;
}
.mh-utility .util-pulse::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
@media (max-width: 720px) {
  .mh-utility .util-l span:not(.util-pulse) { display: none; }
}

/* Brand row */
.mh-brand-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 0 18px;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}
.mh-edition, .mh-actions {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.mh-actions { justify-content: flex-end; }

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.025em;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.brand .ampersand {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.brand-tag {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 8px;
}

/* Icon buttons */
.icon-btn {
  background: none; border: 1px solid transparent;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-2);
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  font-size: 1.1rem;
}
.icon-btn:hover { background: var(--paper-2); color: var(--accent); }

/* Nav */
.mh-nav { padding: 0; }
.mh-nav .container {
  display: flex; align-items: center; justify-content: center;
  padding-top: 0; padding-bottom: 0;
}
.nav-links {
  list-style: none;
  display: flex; gap: clamp(18px, 3vw, 38px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 14px 0;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  position: relative;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 0;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.nav-link:hover { color: var(--accent); }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -16px;
  height: 2px; background: var(--accent);
}

/* Fullscreen Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  color: var(--ink);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  overflow-y: auto;
}
.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
}
.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu-links a {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mobile-menu-links a:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  .mh-brand-row { grid-template-columns: auto 1fr auto; padding: 16px 0 12px; gap: 8px; }
  .brand { font-size: clamp(1.4rem, 5vw, 1.7rem); }
  .mh-edition span, .mh-actions .label { display: none; }
  .mh-actions .icon-btn:not(#mobileMenuOpen) { display: none; } /* Hide other icons on mobile */
  .nav-links { display: none; } /* Hide standard nav links on mobile */
  .mh-nav { display: none; } /* Hide bottom nav bar on mobile */
}

/* ==========================================================================
   SECTION HEADERS — editorial rule + kicker
   ========================================================================== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(20px, 3vw, 34px);
}
.section-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
}
.section-kicker::before {
  content: ""; width: 18px; height: 1px; background: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.section-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color var(--t-fast);
}
.section-link:hover { color: var(--accent); }

/* ==========================================================================
   KICKERS / CATEGORY LABELS
   ========================================================================== */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: ""; width: 14px; height: 1px; background: currentColor;
}
.kicker.no-rule::before { display: none; }

/* ==========================================================================
   HERO — front-page lead story (NOT a generic full-bleed carousel)
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--rule);
}
.hero-lead { display: flex; flex-direction: column; gap: 18px; }
.hero-lead .hl-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 5/4;
  border-radius: var(--radius);
}
.hero-lead .hl-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
  filter: saturate(1.02) contrast(1.02);
}
.hero-lead a:hover .hl-media img { transform: scale(1.025); }

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-weight: 600;
}
.hero-headline a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--t-slow); }
.hero-headline a:hover { background-size: 100% 1px; }

.hero-deck {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 64ch;
}

.byline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.byline .author { color: var(--ink-2); font-weight: 500; }

/* Side column — 3 stacked stories */
.hero-side {
  display: flex; flex-direction: column;
  border-left: 1px solid var(--rule);
  padding-left: clamp(20px, 2.6vw, 36px);
}
.hero-side-item {
  display: flex; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.hero-side-item:first-child { padding-top: 0; }
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 500;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}
.hero-side-item .body { flex: 1; min-width: 0; }
.hero-side-item h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.22;
  margin-bottom: 6px;
  letter-spacing: -0.012em;
}
.hero-side-item h3 a::before {
  content: ""; position: absolute; inset: 0;
}
.hero-side-item .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { border-left: none; padding-left: 0; padding-top: 20px; border-top: 1px solid var(--rule); }
}

/* ==========================================================================
   STORY CARDS
   ========================================================================== */
.story {
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.story .media {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  transition: box-shadow var(--t-slow), transform var(--t-slow);
}
.story .media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), filter var(--t);
  filter: saturate(1) contrast(1.02);
}
.story:hover .media img { transform: scale(1.03); }
.story:hover .media { box-shadow: 0 6px 24px rgba(15, 14, 12, 0.12); transform: translateY(-2px); }
.story h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
}
.story h3 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--t);
}
.story:hover h3 a { background-size: 100% 1px; color: var(--accent); }
.story h3 a::before {
  content: ""; position: absolute; inset: 0;
}
.story p {
  font-size: 0.95rem;
  color: var(--ink-3);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Horizontal/list-style story (no media or small thumb) */
.row-story {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}
.row-story:last-child { border-bottom: none; }
.row-story .body h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.row-story .body p {
  font-size: 0.88rem; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-story .thumb {
  width: 110px; aspect-ratio: 1/1;
  overflow: hidden; border-radius: var(--radius);
  background: var(--paper-3);
  transition: box-shadow var(--t-slow), transform var(--t-slow);
}
.row-story .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.row-story:hover .thumb img { transform: scale(1.04); }
.row-story:hover .thumb { box-shadow: 0 4px 16px rgba(15, 14, 12, 0.10); transform: translateY(-1px); }
.row-story .body h3 a::before { content: ""; position: absolute; inset: 0; }
.row-story { position: relative; }
.row-story:hover h3 { color: var(--accent); }

/* ==========================================================================
   LATEST WIRE / TIMELINE
   ========================================================================== */
.wire { display: flex; flex-direction: column; }


/* ==========================================================================
   ARTICLE PAGE
   ========================================================================== */
.crumbs {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 12px 0 28px;
}
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--ink-4); }

.article-shell {
  max-width: 760px;
  margin: 0 auto;
}
.article-head { margin-bottom: 36px; }
.article-head .kicker { margin-bottom: 18px; }
.article-head h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  margin-bottom: 18px;
}
.article-deck {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 24px;
}
.article-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.article-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 1rem;
  letter-spacing: -0.02em;
}
.author-name {
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  color: var(--ink); line-height: 1.2;
}
.author-line {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 2px;
}
.article-tools { display: flex; gap: 4px; flex-wrap: wrap; }

/* Featured media */
.article-figure { margin: 36px 0; }
.article-figure img {
  width: 100%; max-height: 70vh; object-fit: cover;
  border-radius: var(--radius);
}
.article-figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  margin-top: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

/* Body type */
.article-body {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--ink-2);
  font-variation-settings: "opsz" 14, "SOFT" 30;
}
.article-body p { margin-bottom: 1.3em; }
.article-body p.lede::first-letter,
.article-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  float: left;
  font-size: 4.6rem;
  line-height: 0.88;
  padding: 6px 12px 0 0;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 0;
}
.article-body h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  margin: 2em 0 0.5em;
  letter-spacing: -0.012em;
}
.article-body h3 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
.article-body blockquote {
  margin: 2em 0;
  padding: 2px 0 2px 24px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.45;
  color: var(--ink);
}
.article-body a {
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
}
.article-body a:hover { background-size: 0 1px; }
.article-body em { font-style: italic; }

/* Also-read inline block */
.also-read {
  margin: 36px 0;
  padding: 18px 22px;
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.also-read .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.also-read-grid { display: flex; flex-direction: column; gap: 8px; }
.also-read-link {
  display: flex; gap: 14px; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed var(--rule);
  transition: transform var(--t-fast);
}
.also-read-link:last-child { border-bottom: none; }
.also-read-link:hover { transform: translateX(4px); }
.also-read-link img {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: var(--radius);
}
.also-read-link .ttl {
  font-family: var(--serif); font-size: 1rem; font-weight: 600;
  line-height: 1.3;
}
.also-read-link .cat {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 3px;
}
.also-read-link:hover .ttl { color: var(--accent); }

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */
.cat-masthead {
  text-align: center;
  padding: 36px 0 28px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 48px;
}
.cat-masthead .label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.cat-masthead h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  margin-bottom: 12px;
}
.cat-masthead p {
  font-family: var(--serif); font-style: italic;
  font-size: 1.15rem; color: var(--ink-3);
  max-width: 56ch; margin: 0 auto;
}

/* Stock ticker — premium tape */
.ticker-wrap {
  background: var(--ink);
  color: var(--paper);
  margin-bottom: 44px;
  overflow: hidden;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 12px 0;
  position: relative;
}
.ticker-wrap::before {
  content: "LIVE · MARKETS";
  position: absolute; left: 0; top: 0; bottom: 0;
  display: flex; align-items: center;
  padding: 0 14px;
  background: var(--accent); color: #fff;
  font-weight: 700; letter-spacing: 0.2em;
  z-index: 2;
}
.ticker {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: ticker 36s linear infinite;
}
.ticker:hover { animation-play-state: paused; }
@keyframes ticker {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-100%,0,0); }
}
.stock-item { margin-right: 3rem; letter-spacing: 0.04em; }
.stock-item strong { font-weight: 700; margin-right: 8px; }
.stock-item .change.up { color: #6ED694; font-weight: 600; }
.stock-item .change.down { color: #F26F6B; font-weight: 600; }

/* ==========================================================================
   SEARCH
   ========================================================================== */
.search-shell {
  max-width: 760px; margin: 0 auto;
  text-align: center; padding: 36px 0;
}
.search-shell .label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.search-shell h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  margin-bottom: 24px;
}
.search-form {
  display: flex; gap: 10px;
  max-width: 560px; margin: 0 auto;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}
.search-form input {
  flex: 1;
  background: none; border: none; outline: none;
  font-family: var(--serif); font-size: 1.3rem;
  color: var(--ink);
  font-style: italic;
}
.search-form input::placeholder { color: var(--ink-4); }
.search-form button {
  background: none; border: none;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}
.search-meta {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin: 30px 0 24px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 22px;
  font-family: var(--sans); font-weight: 500;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--ink); color: var(--ink);
  background: transparent;
  border-radius: 0;
  cursor: pointer; transition: all var(--t-fast);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.ghost { border-color: var(--rule); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.block { width: 100%; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 4px double var(--ink);
  padding: 56px 0 28px;
  margin-top: 80px;
  background: var(--paper);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand {
  font-family: var(--serif); font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.footer-brand .ampersand { font-style: italic; color: var(--accent); }
.footer-blurb {
  font-family: var(--serif); font-style: italic;
  font-size: 0.95rem; color: var(--ink-3);
  max-width: 36ch; line-height: 1.55;
}
.footer-col h4 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-family: var(--sans); font-size: 0.92rem;
  color: var(--ink-2);
}
.footer-col a:hover { color: var(--accent); }

.newsletter-form { display: flex; flex-direction: row; gap: 10px; margin-top: 6px; }
@media (max-width: 640px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
}
.newsletter-form input {
  flex: 1;
  background: transparent; border: none; border-bottom: 1px solid var(--ink);
  padding: 8px 2px; outline: none;
  font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
}
.newsletter-form input::placeholder { color: var(--ink-4); font-style: italic; }

.footer-base {
  padding-top: 20px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
.footer-base a { color: var(--ink-3); }
.footer-base a:hover { color: var(--accent); }
.footer-base .socials { display: flex; gap: 14px; }
.footer-base .socials a { font-size: 1rem; }

/* ==========================================================================
   FORMS  (admin / login etc)
   ========================================================================== */
.form-card {
  max-width: 460px; margin: 64px auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 40px;
}
.form-card.wide { max-width: 880px; }
.form-card h1 {
  text-align: center; font-size: 2rem;
  margin-bottom: 8px;
}
.form-card .tagline {
  text-align: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 28px;
}
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  margin-bottom: 6px;
}
.form-control, input.form-control, textarea.form-control, select.form-control {
  display: block; width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.form-control:focus { border-color: var(--accent); background: var(--paper); }
textarea.form-control { min-height: 110px; resize: vertical; font-family: var(--sans); }
.form-error {
  display: block;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--accent); margin-top: 4px;
}

/* Flash messages */
.flash {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  margin-bottom: 18px;
}
.flash.success { border-color: #2E8B57; }
.flash.error   { border-color: var(--accent); }

/* ==========================================================================
   ADMIN — refined editorial workspace
   ========================================================================== */
.admin-header { background: var(--ink); color: var(--paper); border-bottom: none; }
.admin-header .brand,
.admin-header .nav-link,
.admin-header .icon-btn { color: var(--paper); }
.admin-header .nav-link:hover,
.admin-header .icon-btn:hover { color: var(--accent); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
}
.admin-table th, .admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.admin-table th {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  border-bottom: 2px solid var(--ink);
}
.admin-table tbody tr { transition: background var(--t-fast); }
.admin-table tbody tr:hover { background: var(--paper-2); }
.admin-table .title-cell {
  font-family: var(--serif); font-weight: 600; font-size: 1rem;
  color: var(--ink); line-height: 1.3;
}
.admin-table .sub {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3); margin-top: 4px;
  letter-spacing: 0.04em;
}

.tag {
  display: inline-block;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--radius);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.muted { color: var(--ink-3); }
.text-center { text-align: center; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-2 { gap: 8px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.hide-mobile { }
@media (max-width: 720px) { .hide-mobile { display: none !important; } }

/* Entrance animations */
.fade-up { opacity: 0; transform: translateY(8px); animation: fadeUp .8s var(--ease) forwards; }
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }
.fade-up.d3 { animation-delay: .24s; }
.fade-up.d4 { animation-delay: .32s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Empty states */
.empty {
  text-align: center; padding: 80px 20px;
  font-family: var(--serif); font-style: italic;
  font-size: 1.2rem; color: var(--ink-3);
}

/* ==========================================================================
   ERROR PAGES
   ========================================================================== */
.error-page {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(28px, 5vw, 56px) 0 12px;
}

.error-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(circle at top right, var(--accent-soft), transparent 36%),
    linear-gradient(180deg, var(--paper), var(--paper-2));
  border: 1px solid var(--rule);
  box-shadow: 0 18px 50px rgba(16, 15, 13, 0.08);
}

.error-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(15, 14, 12, 0.06);
  pointer-events: none;
}

.error-code {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1vw, 1rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.error-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.error-panel h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  max-width: 10ch;
  margin-bottom: 18px;
}

.error-message {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 42ch;
}

.error-hint {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--ink-3);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.error-links {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.error-links__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.error-links__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error-links__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.error-links__item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(16, 15, 13, 0.08);
}

.error-links__category {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.error-links__title {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
  color: var(--ink);
}

.error-links__empty {
  color: var(--ink-3);
}

.error-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.error-rail__box {
  padding: 22px 20px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}

.error-rail__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 12px 0 14px;
}

.error-rail__nav {
  display: grid;
  gap: 10px;
}

.error-rail__nav a {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
}

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

.error-rail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-rail__copy {
  color: var(--ink-3);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .error-page { grid-template-columns: 1fr; }
  .error-links__list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   READING PROGRESS BAR
   ========================================================================== */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  box-shadow: 0 0 12px var(--accent-soft);
  transition: width 80ms linear;
}

/* ==========================================================================
   TIME-LEFT DOCK (floating)
   ========================================================================== */
.time-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 64px;
  height: 64px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  color: var(--ink-2);
  z-index: 90;
  box-shadow: 0 6px 24px rgba(16,15,13,0.10);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.time-dock.is-visible { opacity: 1; transform: translateY(0); }
.time-dock__num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  font-variation-settings: "opsz" 60;
}
.time-dock__unit {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  margin-top: 2px;
}
@media (max-width: 720px) {
  .time-dock { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .time-dock__num { font-size: 1.35rem; }
}

/* ==========================================================================
   TTS PLAYER
   ========================================================================== */
.tts-player {
  margin: 28px 0 36px;
  padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  animation: ttsIn .35s var(--ease);
}
@keyframes ttsIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tts-player__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.tts-player__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.tts-player__title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.tts-player__controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tts-btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}
.tts-btn-lg:hover { background: var(--accent-2); border-color: var(--accent-2); }
.tts-btn-lg:disabled { opacity: 0.4; cursor: not-allowed; }
.tts-btn-lg.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.tts-btn-lg.ghost:hover { border-color: var(--ink); background: transparent; }
.tts-btn-lg i { font-size: 1.1rem; }
.tts-player__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.tts-select {
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  border-radius: var(--radius);
}
.tts-player__note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  margin-top: 12px;
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments { margin-top: 24px; }
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 36px;
}
.comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-soft);
}
.comment:last-child { border-bottom: none; }
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.comment-body { min-width: 0; }
.comment-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.comment-author {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.comment-when {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.comment-body p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-form {
  margin-top: 28px;
  padding: 22px 24px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.comment-form .form-control { background: var(--paper); }

/* Subtle dark-mode tweaks for new components */
.dark-mode .time-dock { box-shadow: 0 6px 24px rgba(0,0,0,0.45); }
.dark-mode .tts-player { background: var(--paper-2); }

/* ==========================================================================
   Bookmark card (used on /bookmarks — no overlay anchors)
   ========================================================================== */
.bookmark-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
  height: 100%;
}
.bookmark-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,15,13,0.06); }
.bookmark-card .bc-media {
  aspect-ratio: 4/3; overflow: hidden; background: var(--paper-3); display: block;
}
.bookmark-card .bc-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.bookmark-card:hover .bc-media img { transform: scale(1.03); }
.bookmark-card .bc-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bookmark-card .bc-title {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  line-height: 1.22; letter-spacing: -0.012em;
}
.bookmark-card .bc-title a { background: none; }
.bookmark-card .bc-title a:hover { color: var(--accent); }
.bookmark-card p {
  font-size: 0.9rem; color: var(--ink-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bookmark-card .bc-row {
  margin-top: auto; padding-top: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.bookmark-card .bc-remove {
  padding: 6px 14px; font-size: 10px; cursor: pointer;
  position: relative; z-index: 2;
}

/* ==========================================================================
   CAROUSEL CURSOR HERO
   ========================================================================== */
.carousel-hero-section {
  position: relative;
  width: 100%;
  margin-bottom: clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--rule);
  padding-bottom: clamp(36px, 5vw, 56px);
}

.carousel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 70vh;
  min-height: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: none; /* Hide default cursor to use custom one */
  background: var(--paper-3);
}

.custom-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
  mix-blend-mode: difference;
  opacity: 0;
}
.custom-cursor.hovering {
  width: 60px;
  height: 60px;
  background: #fff;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
  display: flex;
  align-items: flex-end;
  padding: clamp(30px, 5vw, 60px);
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.slide-media {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
}

.slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease-out;
  transform: scale(1.05);
}

.carousel-slide.active .slide-media img {
  transform: scale(1);
}

.slide-media .overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 800px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.8s var(--ease) 0.2s;
}

.carousel-slide.active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

.slide-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff; /* Override default heading color */
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  max-width: 900px;
}

.slide-subtitle {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.5;
  margin-bottom: 24px;
  opacity: 0.9;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
  max-width: 750px;
}

.slide-cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  transition: background 0.3s ease, transform 0.3s ease;
}
.slide-cta:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  color: #fff;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  left: 0; width: 100%;
  display: flex; justify-content: space-between;
  padding: 0 20px;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none; /* Let clicks pass through empty space */
}

.nav-btn {
  pointer-events: auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.nav-btn:hover {
  background: #fff;
  color: var(--ink);
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  right: 30px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: clamp(20px, 3vw, 36px);
  height: 4px;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  border-radius: 2px;
  flex-shrink: 1;
}
.indicator.active {
  background: var(--accent);
}

@media (max-width: 768px) {
  .carousel-container { aspect-ratio: 4/5; min-height: 400px; cursor: auto; }
  .carousel-slide { padding: 24px 20px 36px 20px !important; }
  .custom-cursor { display: none !important; }
  .nav-btn { display: none; } /* Hide arrows on mobile */
  .slide-title { font-size: clamp(1.4rem, 7vw, 1.8rem); max-width: 100%; margin-bottom: 12px; }
  .slide-subtitle { display: none; } /* Hide subtitle on mobile to reduce clutter */
  .slide-content .byline { margin-bottom: 16px !important; font-size: 0.85rem; }
  .carousel-indicators { right: 10px; left: 10px; bottom: 12px; flex-wrap: nowrap; justify-content: center; gap: 4px; }
  .indicator { width: 6px; height: 6px; border-radius: 50%; }
  .indicator.active { width: 16px; border-radius: 4px; }
  
  /* Reduce massive blank space on mobile */
  .carousel-hero-section { margin-bottom: 24px !important; padding-bottom: 24px !important; border-bottom: 1px solid var(--rule); }
}

/* ==========================================================================
   MICRO-ANIMATIONS & INTERSECTION OBSERVER
   ========================================================================== */

/* Fade Up Animation on Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Enhanced hover effects for links and buttons */
.btn-hover-fx {
  position: relative;
  overflow: hidden;
  transition: color 0.3s var(--ease);
  z-index: 1;
}
.btn-hover-fx::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 100%;
  background-color: var(--accent-2);
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  z-index: -1;
}
.btn-hover-fx:hover {
  color: #fff;
}
.btn-hover-fx:hover::after {
  transform: translateY(0);
}

/* Enhanced Story Card Hover (Pulse/Glow) */
.story .media::after, .row-story .thumb::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0);
  transition: background 0.4s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.story:hover .media::after, .row-story:hover .thumb::after {
  background: rgba(255, 255, 255, 0.1);
}
.dark-mode .story:hover .media::after, .dark-mode .row-story:hover .thumb::after {
  background: rgba(255, 255, 255, 0.05);
}

/* Subtle link underline animation for standard links */
.animated-underline {
  position: relative;
  display: inline-block;
}
.animated-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}
.animated-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Screen reader only utility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
