/* ================================================
   SOHAN SUN — Domain Template Page
   ================================================ */

/* ---- Reading Progress Bar ---- */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold-dk), var(--color-gold), var(--color-gold-lt));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.6);
  will-change: width;
}

/* ---- Domain Template Main ---- */
#domain-page {
  padding-top: var(--navbar-h);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Domain Banner */
.domain-banner {
  padding: 4rem 2rem 3rem;
  position: relative;
  overflow: hidden;
  border-bottom: var(--border-gold);
}

.domain-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

.domain-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 2rem;
}

.domain-banner-icon {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 0 16px currentColor);
}

.domain-banner-text h1 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--color-ivory);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.domain-banner-text p {
  color: var(--color-silver);
  font-style: italic;
  font-size: 1rem;
}

.domain-back-btn {
  position: absolute;
  top: 2rem; right: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-silver);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(168, 184, 200, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  transition: color 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
}

.domain-back-btn:hover { color: var(--color-gold); border-color: rgba(201, 168, 76, 0.4); }

/* ---- Content Layout ---- */
.domain-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- Sidebar ---- */
.domain-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + 1.5rem);
}

.sidebar-widget {
  background: rgba(13, 13, 31, 0.7);
  border: var(--border-gold);
  border-radius: 8px;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

/* Domain nav list */
.sidebar-domain-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  color: var(--color-muted);
  font-size: 0.88rem;
  transition: color 0.3s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.sidebar-domain-nav a:hover,
.sidebar-domain-nav a.active { color: var(--color-gold); }

.sidebar-domain-nav a span:first-child { font-size: 1rem; }

/* Recent articles */
.sidebar-recent-list { display: flex; flex-direction: column; gap: 1rem; }

.recent-article-item {
  cursor: none;
  transition: opacity 0.3s ease;
}

.recent-article-item:hover { opacity: 0.7; }

.recent-article-item h5 {
  font-size: 0.85rem;
  color: var(--color-silver);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.recent-article-item span {
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* Tags */
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.sidebar-tag {
  background: rgba(201, 168, 76, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--color-silver);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.sidebar-tag:hover { background: rgba(201, 168, 76, 0.18); color: var(--color-gold); }

/* ---- Article Grid ---- */
.articles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: var(--border-gold);
}

.articles-header h2 {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--color-ivory);
  letter-spacing: 0.08em;
}

.articles-count {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

/* ---- Article Card ---- */
.article-card {
  background: rgba(13, 13, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.6rem;
  cursor: none;
  transition: transform 0.35s var(--transition-smooth), box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--domain-accent, rgba(201, 168, 76, 0.3));
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--domain-accent, rgba(201, 168, 76, 0.1));
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.card-domain-tag {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--domain-accent, var(--color-gold));
  background: rgba(201, 168, 76, 0.08);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--domain-accent, rgba(201, 168, 76, 0.2));
}

.card-read-time {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-left: auto;
}

.article-card h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-ivory);
  line-height: 1.45;
  margin-bottom: 0.7rem;
  transition: color 0.3s ease;
}

.article-card:hover h3 { color: var(--color-gold-lt); }

.card-excerpt {
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.card-author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--domain-accent, var(--color-gold)), var(--color-bg));
  border: 1px solid var(--domain-accent, rgba(201, 168, 76, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--color-ivory);
  flex-shrink: 0;
}

.card-author-name {
  font-size: 0.8rem;
  color: var(--color-silver);
}

.card-date {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-left: auto;
}

/* ---- Article Reader View — Parchment Illuminated Panel ---- */
#article-reader {
  display: none;
  position: relative;
  background: #EFE0D5;
  border-radius: 10px;
  padding: 2.5rem 3rem 3rem;
  box-shadow: 0 8px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,168,76,0.18);
}

#article-reader.active {
  display: block;
}

/* Floral corner ornaments */
#article-reader .reader-corner {
  position: absolute;
  width: 72px; height: 72px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
#article-reader .reader-corner-tl { top: 0; left: 0; }
#article-reader .reader-corner-tr { top: 0; right: 0; transform: scaleX(-1); }
#article-reader .reader-corner-bl { bottom: 0; left: 0; transform: scaleY(-1); }
#article-reader .reader-corner-br { bottom: 0; right: 0; transform: scale(-1); }
#article-reader .reader-corner svg { width: 100%; height: 100%; }

@media (max-width: 768px) {
  #article-reader { padding: 1.5rem 1.2rem 2rem; }
  #article-reader .reader-corner { width: 44px; height: 44px; }
}

#articles-view {
  display: block;
}

#articles-view.hidden {
  display: none;
}

.reader-header {
  margin-bottom: 3rem;
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-silver);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: none;
  padding: 0;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.reader-back:hover { color: var(--color-gold); }

.reader-domain-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #A0522D;
  margin-bottom: 1.2rem;
  display: block;
}

.reader-title {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: #C96F54;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.reader-byline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(160, 82, 45, 0.25);
  border-bottom: 1px solid rgba(160, 82, 45, 0.25);
  margin-bottom: 2.5rem;
}

.reader-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--domain-accent, var(--color-gold)), var(--color-bg));
  border: 1px solid var(--domain-accent, rgba(201, 168, 76, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--color-ivory);
  flex-shrink: 0;
}

.reader-author-name {
  font-size: 0.9rem;
  color: #3C2010;
  display: block;
}

.reader-date {
  font-size: 0.8rem;
  color: #7A4020;
}

.reader-share {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: none;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.share-btn:hover { color: var(--color-gold); border-color: rgba(201, 168, 76, 0.4); background: rgba(201, 168, 76, 0.06); }

/* ---- Article Body — Warm Parchment Ink ---- */
.reader-body {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.9;
  color: #2C1A0E;
  position: relative;
  z-index: 1;
}

.reader-body p { margin-bottom: 1.6em; }

.reader-body h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: #C96F54;
  margin: 2.5em 0 0.8em;
  letter-spacing: 0.05em;
}

.reader-body h3 {
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 600;
  color: #6B3A1F;
  margin: 2em 0 0.6em;
}

.reader-body blockquote {
  border-left: 3px solid #C9A84C;
  padding: 1rem 1.5rem;
  margin: 2em 0;
  background: rgba(201, 168, 76, 0.08);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #5A3015;
}

.reader-arabic-quote {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  direction: rtl;
  text-align: center;
  color: #8B4513;
  margin: 2.5em 0;
}

/* Reader music toggle */
.reader-music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(160, 82, 45, 0.08);
  border: 1px solid rgba(160, 82, 45, 0.3);
  color: #7A4020;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}
.reader-music-toggle:hover { background: rgba(160, 82, 45, 0.16); color: #5A2A0A; }
.reader-music-toggle.playing { color: #C96F54; border-color: rgba(201, 111, 84, 0.5); }

/* ---- Domain Colors (CSS Variables per domain) ---- */
[data-domain="metaphysique"] { --domain-accent: #A855F7; --domain-bg: rgba(90, 40, 180, 0.15); }
[data-domain="spiritualite"] { --domain-accent: #FCD34D; --domain-bg: rgba(100, 80, 10, 0.15); }
[data-domain="politique"]    { --domain-accent: #F87171; --domain-bg: rgba(80, 20, 20, 0.15); }
[data-domain="temoignages"]  { --domain-accent: #38BDF8; --domain-bg: rgba(0, 60, 120, 0.15); }
[data-domain="islam"]        { --domain-accent: #34D399; --domain-bg: rgba(10, 80, 30, 0.15); }
[data-domain="litterature"]  { --domain-accent: #FB923C; --domain-bg: rgba(100, 60, 10, 0.15); }
[data-domain="histoire"]     { --domain-accent: #D4AF37; --domain-bg: rgba(80, 65, 30, 0.15); }
[data-domain="astronomie"]   { --domain-accent: #60A5FA; --domain-bg: rgba(10, 30, 80, 0.15); }
[data-domain="cinema"]       { --domain-accent: #FB7185; --domain-bg: rgba(80, 10, 10, 0.15); }
[data-domain="sport"]        { --domain-accent: #FB923C; --domain-bg: rgba(80, 40, 0, 0.15); }
[data-domain="art"]          { --domain-accent: #C084FC; --domain-bg: rgba(60, 20, 80, 0.15); }
[data-domain="nature"]       { --domain-accent: #6EE7B7; --domain-bg: rgba(10, 60, 10, 0.15); }

/* ---- World Background Container ---- */
#world-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(255, 245, 200, 0.04), transparent 28%),
              radial-gradient(circle at 20% 20%, rgba(110, 235, 192, 0.04), transparent 18%),
              radial-gradient(circle at 80% 28%, rgba(248, 113, 113, 0.04), transparent 22%);
}

#world-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 10%, rgba(255, 255, 255, 0.12), transparent 24%);
  pointer-events: none;
}

#world-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

#world-container .world-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

#world-container .world-ray {
  position: absolute;
  width: 140%;
  height: 24%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 220, 130, 0.18), transparent 70%);
  transform: translateX(-20%) rotate(6deg);
  filter: blur(14px);
  animation: raySweep 14s linear infinite;
}

#world-container .world-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#world-container .world-aurora {
  background: radial-gradient(circle at 40% 20%, rgba(168, 85, 247, 0.14), transparent 28%),
              radial-gradient(circle at 65% 18%, rgba(96, 165, 250, 0.12), transparent 24%);
  filter: blur(14px);
}

#world-container .world-glow-orbs {
  background: radial-gradient(circle at 18% 70%, rgba(250, 242, 173, 0.16), transparent 18%),
              radial-gradient(circle at 80% 40%, rgba(168, 85, 247, 0.12), transparent 12%);
}

#world-container .world-mist {
  background: linear-gradient(180deg, rgba(7, 11, 35, 0) 0%, rgba(7, 11, 35, 0.4) 60%, rgba(7, 11, 35, 0.9) 100%);
}

#world-container .world-metallic-glyphs {
  background-image: radial-gradient(circle at 33% 28%, rgba(190, 242, 100, 0.12), transparent 20%),
                    radial-gradient(circle at 72% 32%, rgba(251, 191, 36, 0.1), transparent 16%);
  filter: blur(10px);
}

#world-container .world-alchemy-fog {
  background: linear-gradient(180deg, rgba(10, 0, 20, 0.04), rgba(10, 20, 40, 0.18));
}

#world-container .world-pearl-light {
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.14), transparent 20%);
  filter: blur(10px);
}

#world-container .world-spiritual-dust {
  background: radial-gradient(circle at 25% 85%, rgba(251, 191, 36, 0.08), transparent 18%),
              radial-gradient(circle at 80% 75%, rgba(56, 189, 248, 0.08), transparent 16%);
}

#world-container .world-flags {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08), transparent 30%),
              linear-gradient(215deg, rgba(251, 191, 36, 0.08), transparent 34%);
}

#world-container .world-ribbon-wave {
  background: radial-gradient(circle at 50% 20%, rgba(248, 113, 113, 0.14), transparent 22%);
  transform: translateY(-6%);
}

#world-container .world-pulse {
  background: radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.14), transparent 18%);
  animation: pulseGlow 6s ease-in-out infinite;
}

#world-container .world-shadow-mist {
  background: linear-gradient(180deg, rgba(5, 8, 20, 0.18), rgba(5, 8, 20, 0.62));
}

#world-container .world-moonlight {
  background: radial-gradient(circle at 50% 24%, rgba(148, 163, 184, 0.18), transparent 22%);
}

#world-container .world-calligraphy-cloud {
  background: radial-gradient(circle at 30% 65%, rgba(251, 191, 36, 0.08), transparent 20%),
              radial-gradient(circle at 70% 80%, rgba(34, 197, 94, 0.08), transparent 18%);
}

#world-container .world-paper-fall {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(245, 226, 179, 0.16));
}

#world-container .world-ink-swell {
  background: radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.12), transparent 16%),
              radial-gradient(circle at 20% 40%, rgba(251, 146, 60, 0.1), transparent 14%);
}

#world-container .world-archive-glow {
  background: radial-gradient(circle at 24% 22%, rgba(212, 175, 55, 0.12), transparent 22%);
}

#world-container .world-chronicle-layer {
  background: linear-gradient(180deg, rgba(34, 40, 49, 0.1), rgba(10, 10, 15, 0.5));
}

#world-container .world-map-grid {
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

#world-container .world-planetary-haze {
  background: radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.12), transparent 18%);
}

#world-container .world-projector {
  background: radial-gradient(circle at 45% 20%, rgba(248, 113, 113, 0.16), transparent 25%);
}

#world-container .world-film-grain {
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0) 2px);
  mix-blend-mode: screen;
}

#world-container .world-stadium-lights {
  background: radial-gradient(circle at 20% 18%, rgba(251, 191, 36, 0.18), transparent 18%),
              radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.14), transparent 16%);
}

#world-container .world-energy-trails {
  background: radial-gradient(circle at 25% 70%, rgba(251, 146, 60, 0.12), transparent 18%);
}

#world-container .world-paint-splatter {
  background: radial-gradient(circle at 30% 34%, rgba(251, 146, 60, 0.14), transparent 20%),
              radial-gradient(circle at 68% 20%, rgba(168, 85, 247, 0.1), transparent 18%);
}

#world-container .world-color-wave {
  background: radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.1), transparent 18%);
}

#world-container .world-forest-fog {
  background: linear-gradient(180deg, rgba(10, 30, 10, 0.12), rgba(10, 20, 10, 0.58));
}

#world-container .world-firefly-cloud {
  background: radial-gradient(circle at 25% 50%, rgba(134, 239, 172, 0.14), transparent 18%),
              radial-gradient(circle at 75% 70%, rgba(34, 197, 94, 0.1), transparent 15%);
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.03); }
}

@media (max-width: 768px) {
  #world-container { filter: saturate(0.95); }
  #world-container .world-ray { opacity: 0.45; }
}

/* ======================================================
   ARTICLE READER — Illuminated Manuscript / Parchment
   ====================================================== */
#article-reader {
  position: relative;
  z-index: 3;
  /* Warm cream parchment background */
  background-color: #EFE0D5;
  /* Subtle paper texture via CSS */
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(140, 110, 60, 0.04) 0px,
      rgba(140, 110, 60, 0.00) 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(140, 110, 60, 0.025) 0px,
      rgba(140, 110, 60, 0.00) 4px
    );
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(180, 130, 60, 0.28),
    inset 0 0 80px rgba(212, 180, 120, 0.06);
  padding: 0;
}

/* Carnelian gradient corners — top-left and top-right */
#article-reader::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 120px at 0% 0%, rgba(217, 142, 115, 0.22), transparent 65%),
    radial-gradient(ellipse 60% 120px at 100% 0%, rgba(201, 122, 80, 0.18), transparent 65%),
    radial-gradient(ellipse 80% 80px at 50% 0%, rgba(227, 161, 140, 0.14), transparent 55%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

/* ── Arabesque arcade frame at top ────────────────── */
.reader-arcade {
  width: 100%;
  display: block;
  line-height: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.reader-arcade-svg {
  width: 100%;
  height: auto;
  display: block;
  /* Faint carnelian tint on the SVG itself */
  filter: drop-shadow(0 1px 8px rgba(180, 100, 50, 0.18));
}

/* ── Inner content area padding ───────────────────── */
.reader-header, .reader-body {
  position: relative;
  z-index: 2;
  padding-left: 3rem;
  padding-right: 3rem;
}

.reader-header {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.reader-header::after {
  content: '';
  position: absolute;
  left: 3rem; right: 3rem; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 120, 60, 0.45), transparent);
}

.reader-body {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* ── Override all text colors for parchment BG ────── */
#article-reader .reader-back {
  color: #8B6040;
}
#article-reader .reader-back:hover { color: #C97A50; }

#article-reader .reader-domain-tag {
  color: #C97A50;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
}

#article-reader .reader-title {
  color: #C96F54;
  font-family: 'EB Garamond', serif;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  font-weight: 500;
  line-height: 1.32;
}

#article-reader .reader-byline {
  border-top-color: rgba(180, 120, 60, 0.3);
  border-bottom-color: rgba(180, 120, 60, 0.3);
}

#article-reader .reader-avatar {
  background: linear-gradient(135deg, #D98E73, #C9A84C);
  border-color: rgba(180, 130, 60, 0.5);
  color: #3A2E22;
}

#article-reader .reader-author-name { color: #3A2E22; }

#article-reader .reader-date { color: #7A6050; }

#article-reader .share-btn {
  background: rgba(180, 120, 60, 0.08);
  border-color: rgba(180, 120, 60, 0.22);
  color: #8B6040;
}
#article-reader .share-btn:hover {
  color: #C97A50;
  border-color: rgba(180, 120, 60, 0.5);
  background: rgba(180, 120, 60, 0.14);
}

/* ── Reader body typography ─────────────────────── */
#article-reader .reader-body {
  font-family: 'EB Garamond', serif;
  font-size: 1.18rem;
  line-height: 2.0;
  color: #3A2E22;
}

#article-reader .reader-body p { margin-bottom: 1.65em; }

#article-reader .reader-body h2 {
  font-family: 'Cinzel Decorative', serif;
  color: #C97A50;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  margin: 2.5em 0 0.9em;
}

#article-reader .reader-body h3 {
  color: #4A3525;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2em 0 0.7em;
}

#article-reader .reader-body blockquote {
  border-left-color: #D98E73;
  background: rgba(217, 142, 115, 0.08);
  color: #5A3E2A;
}

#article-reader .reader-arabic-quote {
  color: #C97A50;
  text-shadow: 0 0 16px rgba(217, 142, 115, 0.3);
}

/* ── CTA button at bottom adapted for parchment ──── */
#article-reader .cta-btn {
  border-color: #C9A84C;
  color: #8A6A1F;
}
#article-reader .cta-btn:hover {
  background: rgba(201, 168, 76, 0.1);
  color: #C9A84C;
}

#article-reader.active + footer {
  position: relative;
  z-index: 3;
}

/* Mobile compact */
@media (max-width: 768px) {
  .reader-header, .reader-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .reader-header::after {
    left: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 768px) {
  #world-container { filter: saturate(0.95); }
  #world-container .world-ray { opacity: 0.45; }
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .domain-layout {
    grid-template-columns: 1fr;
  }

  .domain-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .domain-sidebar { grid-template-columns: 1fr; }
  .domain-layout { padding: 2rem 1rem 4rem; }

  .reader-byline {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .reader-share { margin-left: 0; }
}
