/* ============================================================
   SPIRILIGIOUS — EDITORIAL THEME
   Premium Indian spiritual editorial archive.
   Page-scoped: only affects pages with .ed-body
   ============================================================ */

:root {
  /* Editorial palette */
  --ed-forest: #0e3020;
  --ed-forest-2: #163f2b;
  --ed-forest-3: #1f5438;
  --ed-gold: #b88732;
  --ed-gold-soft: #d6a84f;
  --ed-gold-pale: #eedcb2;
  --ed-ivory: #f8f1e3;
  --ed-parchment: #f1e7d2;
  --ed-brown: #3b2f24;
  --ed-brown-soft: #6b5a47;
  --ed-charcoal: #1a1a1a;
  --ed-rule: rgba(184, 135, 50, 0.22);
  --ed-rule-soft: rgba(59, 47, 36, 0.08);

  --ed-serif: "EB Garamond", "Playfair Display", Georgia, serif;
  --ed-sans: "Inter", "Noto Sans Devanagari", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --ed-dev: "Tiro Devanagari Hindi", "Noto Sans Devanagari", serif;

  --ed-shadow-sm: 0 4px 18px rgba(14, 48, 32, 0.06);
  --ed-shadow-md: 0 14px 40px rgba(14, 48, 32, 0.09);
  --ed-shadow-lg: 0 24px 60px rgba(14, 48, 32, 0.14);

  --ed-maxw: 1240px;
  --ed-reading: 780px;
  --ed-radius: 4px;
  --ed-radius-lg: 10px;
}

/* ============================================================
   BASE OVERRIDES FOR EDITORIAL PAGES
   ============================================================ */
.ed-body {
  background: var(--ed-ivory);
  color: var(--ed-brown);
  font-family: var(--ed-sans);
  padding-top: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ed-body a {
  color: inherit;
  text-decoration: none;
}

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

.ed-body :focus-visible {
  outline: 2px solid var(--ed-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.ed-container {
  max-width: var(--ed-maxw);
  margin: 0 auto;
  padding: 0 2rem;
}

.ed-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ed-eyebrow {
  font-family: var(--ed-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-gold);
  margin: 0 0 0.8rem;
}
.ed-eyebrow--light {
  color: var(--ed-gold-soft);
}

.ed-section-title {
  font-family: var(--ed-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.15;
  color: var(--ed-forest);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ed-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease,
    color 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}
.ed-btn i {
  font-size: 0.72rem;
  transition: transform 0.25s ease;
}
.ed-btn:hover i {
  transform: translateX(3px);
}
.ed-btn--gold {
  background: var(--ed-gold);
  color: #fff;
}
.ed-btn--gold:hover {
  background: #a17528;
}
.ed-btn--forest {
  background: var(--ed-forest);
  color: #fff;
}
.ed-btn--forest:hover {
  background: var(--ed-forest-2);
}
.ed-btn--outline {
  background: transparent;
  color: var(--ed-forest);
  border-color: var(--ed-forest);
}
.ed-btn--outline:hover {
  background: var(--ed-forest);
  color: #fff;
}

/* ============================================================
   HERO — IMMERSIVE EDITORIAL COVER
   ============================================================ */
.ed-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 150px 0 100px;
  overflow: hidden;
  isolation: isolate;
}
.ed-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.ed-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.ed-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(14, 48, 32, 0.62) 0%,
      rgba(14, 48, 32, 0.32) 38%,
      rgba(14, 48, 32, 0.88) 100%
    ),
    radial-gradient(
      ellipse at 25% 45%,
      rgba(184, 135, 50, 0.16) 0%,
      transparent 62%
    );
}
.ed-hero__om {
  position: absolute;
  top: 10%;
  right: 5%;
  font-family: var(--ed-dev);
  font-size: clamp(8rem, 20vw, 18rem);
  color: rgba(214, 168, 79, 0.07);
  z-index: -1;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.ed-hero__inner {
  position: relative;
  max-width: var(--ed-maxw);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  color: #fff;
}
.ed-hero__title {
  font-family: var(--ed-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
  color: #fff;
  max-width: 20ch;
  text-wrap: balance;
}
.ed-hero__title em {
  font-style: italic;
  color: var(--ed-gold-soft);
  font-weight: 500;
}
.ed-hero__lede {
  font-family: var(--ed-serif);
  font-size: clamp(1rem, 1.15vw, 1.16rem);
  line-height: 1.75;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 2.2rem;
  font-weight: 400;
}
.ed-hero__actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.ed-hero__sanskrit {
  font-family: var(--ed-dev);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--ed-gold-soft);
  opacity: 0.9;
}

/* ============================================================
   FEATURED ARTICLE
   ============================================================ */
.ed-featured {
  padding: 5rem 0 1rem;
}
.ed-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--ed-rule);
  border-radius: var(--ed-radius-lg);
  overflow: hidden;
  box-shadow: var(--ed-shadow-md);
}
.ed-feature__media {
  position: relative;
  display: block;
  min-height: 480px;
  overflow: hidden;
  background: var(--ed-parchment);
}
.ed-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.ed-feature:hover .ed-feature__media img {
  transform: scale(1.035);
}
.ed-feature__body {
  padding: 3.2rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}
.ed-feature__badge {
  display: inline-block;
  font-family: var(--ed-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-gold);
  background: rgba(184, 135, 50, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  width: fit-content;
}
.ed-cat-label {
  font-family: var(--ed-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-forest);
  opacity: 0.78;
}
.ed-feature__title {
  font-family: var(--ed-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0.2rem 0 0.4rem;
  color: var(--ed-forest);
  letter-spacing: -0.01em;
}
.ed-feature__title a {
  color: inherit;
  transition: color 0.25s ease;
}
.ed-feature__title a:hover {
  color: var(--ed-gold);
}
.ed-feature__summary {
  font-family: var(--ed-serif);
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--ed-brown-soft);
  margin: 0;
  max-width: 54ch;
}
.ed-feature__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ed-sans);
  font-size: 0.78rem;
  color: var(--ed-brown-soft);
  margin: 0.4rem 0 0.6rem;
}
.ed-dot {
  opacity: 0.4;
}
.ed-feature__cta {
  margin-top: 0.4rem;
  align-self: flex-start;
}

/* ============================================================
   LIBRARY — HEAD, TOOLBAR, CATEGORIES, GRID
   ============================================================ */
.ed-library {
  padding: 4rem 0 5rem;
}
.ed-library__head {
  max-width: 720px;
  margin-bottom: 2.6rem;
}
.ed-library__intro {
  font-family: var(--ed-serif);
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ed-brown-soft);
  margin: 0.4rem 0 0;
  max-width: 60ch;
}

.ed-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.ed-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--ed-rule);
  border-radius: 3px;
  padding: 0.7rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ed-field:focus-within {
  border-color: var(--ed-gold);
  box-shadow: 0 0 0 3px rgba(184, 135, 50, 0.13);
}
.ed-field--search {
  flex: 1;
  min-width: 260px;
}
.ed-field--search > i {
  color: var(--ed-brown-soft);
  font-size: 0.8rem;
  opacity: 0.65;
  flex-shrink: 0;
}
.ed-field--search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ed-sans);
  font-size: 0.92rem;
  color: var(--ed-brown);
  min-width: 0;
  padding: 0;
}
.ed-field--search input::placeholder {
  color: var(--ed-brown-soft);
  opacity: 0.55;
}
.ed-field__clear {
  border: none;
  background: transparent;
  color: var(--ed-brown-soft);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.25rem 0.35rem;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}
.ed-field__clear:hover {
  color: var(--ed-forest);
  background: rgba(184, 135, 50, 0.09);
}
.ed-field--sort {
  padding: 0.35rem 0.85rem 0.35rem 0.95rem;
  gap: 0.6rem;
}
.ed-field--sort label {
  font-family: var(--ed-sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-brown-soft);
  font-weight: 600;
}
.ed-field--sort select {
  border: none;
  background: transparent;
  padding: 0.35rem 1.4rem 0.35rem 0.2rem;
  font-family: var(--ed-sans);
  font-size: 0.85rem;
  color: var(--ed-brown);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%236b5a47' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
  background-size: 10px;
}

.ed-cats {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.3rem 0 0.2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid var(--ed-rule);
  margin-bottom: 1.4rem;
}
.ed-cats::-webkit-scrollbar {
  display: none;
}
.ed-cat {
  flex-shrink: 0;
  background: transparent;
  border: none;
  font-family: var(--ed-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ed-brown-soft);
  padding: 0.6rem 0.85rem 0.75rem;
  cursor: pointer;
  position: relative;
  transition: color 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.015em;
}
.ed-cat:hover {
  color: var(--ed-forest);
}
.ed-cat.is-active {
  color: var(--ed-forest);
  font-weight: 600;
}
.ed-cat::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: -1px;
  height: 2px;
  background: var(--ed-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ed-cat.is-active::after {
  transform: scaleX(1);
}

.ed-results {
  font-family: var(--ed-sans);
  font-size: 0.82rem;
  color: var(--ed-brown-soft);
  margin: 0 0 1.6rem;
}

.ed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.6rem;
}

/* ============================================================
   ARTICLE CARD
   ============================================================ */
.ed-card {
  background: #fff;
  border: 1px solid var(--ed-rule);
  border-radius: var(--ed-radius-lg);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
  box-shadow: var(--ed-shadow-sm);
}
.ed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ed-shadow-md);
  border-color: rgba(184, 135, 50, 0.34);
}
.ed-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.ed-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ed-parchment);
}
.ed-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ed-card:hover .ed-card__media img {
  transform: scale(1.05);
}
.ed-card__chip {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  background: rgba(14, 48, 32, 0.86);
  color: #fff;
  font-family: var(--ed-sans);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ed-card__body {
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
.ed-card__title {
  font-family: var(--ed-serif);
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ed-forest);
  margin: 0;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ed-card__summary {
  font-family: var(--ed-serif);
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--ed-brown-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.ed-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ed-sans);
  font-size: 0.72rem;
  color: var(--ed-brown-soft);
  margin: 0;
}
.ed-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.95rem;
  border-top: 1px solid var(--ed-rule);
}
.ed-card__read {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--ed-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ed-forest);
}
.ed-card__read i {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
}
.ed-card:hover .ed-card__read i {
  transform: translateX(4px);
}
.ed-card__time {
  font-family: var(--ed-sans);
  font-size: 0.66rem;
  color: var(--ed-brown-soft);
  opacity: 0.72;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.ed-empty {
  text-align: center;
  padding: 4.5rem 1rem 3rem;
  max-width: 460px;
  margin: 0 auto;
}
.ed-empty i {
  font-size: 1.6rem;
  color: var(--ed-gold);
  opacity: 0.55;
  display: block;
  margin-bottom: 1rem;
}
.ed-empty h3 {
  font-family: var(--ed-serif);
  font-size: 1.5rem;
  color: var(--ed-forest);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.ed-empty p {
  font-family: var(--ed-sans);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ed-brown-soft);
  margin: 0 0 1.5rem;
}

/* ============================================================
   CTA
   ============================================================ */
.ed-cta {
  padding: 1rem 0 5rem;
}
.ed-cta__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.6rem 2.8rem;
  background: var(--ed-forest);
  color: #fff;
  border-radius: var(--ed-radius-lg);
  position: relative;
  overflow: hidden;
}
.ed-cta__card::before {
  content: "ॐ";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--ed-dev);
  font-size: 10rem;
  color: rgba(214, 168, 79, 0.09);
  line-height: 1;
  pointer-events: none;
}
.ed-cta__text {
  position: relative;
  z-index: 1;
}
.ed-cta__text h2 {
  font-family: var(--ed-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.ed-cta__text p {
  font-family: var(--ed-sans);
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  max-width: 52ch;
}
.ed-cta__card .ed-eyebrow {
  color: var(--ed-gold-soft);
  margin-bottom: 0.35rem;
}
.ed-cta__card .ed-btn--forest {
  background: var(--ed-gold);
  position: relative;
  z-index: 1;
}
.ed-cta__card .ed-btn--forest:hover {
  background: var(--ed-gold-soft);
  color: var(--ed-forest);
}

/* ============================================================
   ARTICLE READING PAGE — refined
   ============================================================ */
.ed-article-page {
  background:
    radial-gradient(
      ellipse at top,
      rgba(214, 168, 79, 0.055) 0%,
      transparent 55%
    ),
    var(--ed-ivory);
  position: relative;
  padding-top: 0;
  min-height: 100vh;
}
.ed-article-page::before {
  /* Subtle portrait artwork watermark */
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  width: 62vw;
  max-width: 900px;
  height: 100vh;
  background-image: url("images/cover-phone.png");
  background-size: contain;
  background-position: right center;
  background-repeat: no-repeat;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}
.ed-article-page main {
  position: relative;
  z-index: 1;
}

/* ---------- Reading progress ---------- */
.ed-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 99999;
  background: rgba(184, 135, 50, 0.06);
  pointer-events: none;
}
.ed-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    var(--ed-forest) 0%,
    var(--ed-gold) 55%,
    var(--ed-gold-soft) 100%
  );
  box-shadow: 0 0 12px rgba(184, 135, 50, 0.35);
  transition: transform 0.08s linear;
  will-change: transform;
}

/* ---------- Article shell ---------- */
.ed-article {
  padding: 4rem 0 5rem;
}

/* Breadcrumb */
.ed-breadcrumb {
  font-family: var(--ed-sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-brown-soft);
  margin-bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.ed-breadcrumb a {
  color: var(--ed-brown-soft);
  transition: color 0.2s ease;
}
.ed-breadcrumb a:hover {
  color: var(--ed-gold);
}
.ed-breadcrumb i {
  font-size: 0.5rem;
  opacity: 0.55;
}
.ed-breadcrumb span[aria-current] {
  color: var(--ed-forest);
  font-weight: 600;
}

/* Head */
.ed-article__head {
  max-width: 860px;
  margin: 0 auto 3rem;
}
.ed-article__cat {
  font-family: var(--ed-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.ed-article__cat::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--ed-gold);
  display: inline-block;
}
.ed-article__title {
  font-family: var(--ed-serif);
  font-size: clamp(2.1rem, 4.6vw, 3.55rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ed-forest);
  font-weight: 600;
  margin: 0 0 1.4rem;
  text-wrap: pretty;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.ed-article__summary {
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.7;
  color: var(--ed-brown-soft);
  margin: 0 0 1.6rem;
  max-width: 68ch;
  text-wrap: pretty;
}
.ed-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.8rem;
  font-family: var(--ed-sans);
  font-size: 0.8rem;
  color: var(--ed-brown-soft);
  padding-top: 1.3rem;
  border-top: 1px solid var(--ed-rule);
  letter-spacing: 0.02em;
}
.ed-article__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.ed-article__meta i {
  color: var(--ed-gold);
  font-size: 0.72rem;
  opacity: 0.85;
}

/* Cover */
.ed-article__cover {
  max-width: 1080px;
  margin: 0 auto 3.2rem;
  border-radius: var(--ed-radius-lg);
  overflow: hidden;
  box-shadow: var(--ed-shadow-md);
  background: var(--ed-parchment);
  aspect-ratio: 16 / 9;
  position: relative;
}
.ed-article__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Body ---------- */
.ed-article__body {
  max-width: 740px;
  margin: 0 auto;
  font-family: var(--ed-serif);
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--ed-brown);
  letter-spacing: 0.003em;
}
.ed-article__body > * + * {
  margin-top: 1.55rem;
}
.ed-article__body p {
  margin: 0;
  text-wrap: pretty;
}

/* Drop cap */
.ed-article__body .ed-first-para::first-letter {
  font-family: var(--ed-serif);
  font-weight: 600;
  font-size: 4.4rem;
  line-height: 0.9;
  float: left;
  padding: 0.35rem 0.7rem 0 0;
  color: var(--ed-forest);
  letter-spacing: -0.02em;
}

/* Headings */
.ed-article__body h2 {
  font-family: var(--ed-serif);
  font-size: 1.82rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--ed-forest);
  margin: 3rem 0 0.3rem;
  position: relative;
}
.ed-article__body h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 1.5px;
  background: var(--ed-gold);
  margin-top: 0.7rem;
  opacity: 0.7;
}
.ed-article__body h3 {
  font-family: var(--ed-serif);
  font-size: 1.36rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.008em;
  color: var(--ed-forest);
  margin: 2.2rem 0 0.2rem;
}

/* Lists */
.ed-article__body ul,
.ed-article__body ol {
  padding-left: 1.5rem;
  margin: 0.4rem 0;
}
.ed-article__body li {
  margin-bottom: 0.55rem;
  line-height: 1.78;
}
.ed-article__body li::marker {
  color: var(--ed-gold);
}

/* Blockquote */
.ed-article__body blockquote {
  margin: 2.6rem 0;
  padding: 0.2rem 0 0.2rem 1.8rem;
  border-left: 3px solid var(--ed-gold);
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.65;
  color: var(--ed-forest);
  position: relative;
  letter-spacing: -0.005em;
}
.ed-article__body blockquote::before {
  content: "\201C";
  font-family: var(--ed-serif);
  position: absolute;
  top: -0.6rem;
  left: -1.5rem;
  font-size: 3rem;
  color: var(--ed-gold);
  opacity: 0.35;
  line-height: 1;
}
.ed-article__body blockquote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-family: var(--ed-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-brown-soft);
  opacity: 0.78;
}

/* Inline images */
.ed-article__body img {
  width: 100%;
  height: auto;
  border-radius: var(--ed-radius-lg);
  margin: 2.2rem 0;
  box-shadow: var(--ed-shadow-sm);
}

/* Sanskrit verse */
.ed-sanskrit {
  font-family: var(--ed-dev);
  font-size: 1.5rem;
  line-height: 2;
  color: var(--ed-forest);
  text-align: center;
  padding: 2rem 1.6rem;
  background: linear-gradient(
    180deg,
    rgba(184, 135, 50, 0.06) 0%,
    rgba(184, 135, 50, 0.02) 100%
  );
  border-radius: var(--ed-radius-lg);
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  margin: 2.6rem 0;
  white-space: pre-line;
  letter-spacing: 0.02em;
}
.ed-sanskrit::before {
  content: "॥";
  display: block;
  font-family: var(--ed-dev);
  font-size: 1rem;
  color: var(--ed-gold);
  opacity: 0.6;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3em;
}
.ed-sanskrit__translation {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ed-brown-soft);
  letter-spacing: 0;
}

/* Takeaways */
.ed-takeaways {
  background: linear-gradient(
    180deg,
    rgba(14, 48, 32, 0.055) 0%,
    rgba(14, 48, 32, 0.03) 100%
  );
  border-left: 3px solid var(--ed-forest);
  border-radius: 0 var(--ed-radius-lg) var(--ed-radius-lg) 0;
  padding: 2rem 2.2rem 1.9rem;
  margin: 3.4rem auto 2.6rem;
  max-width: 740px;
  font-family: var(--ed-sans);
}
.ed-takeaways h3 {
  font-family: var(--ed-serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ed-forest);
  margin: 0 0 1rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ed-takeaways h3::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--ed-gold);
  border-radius: 2px;
}
.ed-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.ed-takeaways li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.97rem;
  line-height: 1.68;
  color: var(--ed-brown);
}
.ed-takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 1.5px;
  background: var(--ed-gold);
}

/* Share controls */
.ed-share {
  max-width: 740px;
  margin: 3rem auto 0;
  padding: 1.8rem 0;
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-family: var(--ed-sans);
}
.ed-share__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-brown-soft);
  margin-right: 0.6rem;
}
.ed-share button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ed-rule);
  background: #fff;
  color: var(--ed-forest);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, transform 0.25s ease;
  font-size: 0.88rem;
}
.ed-share button:hover {
  background: var(--ed-forest);
  color: #fff;
  border-color: var(--ed-forest);
  transform: translateY(-2px);
}
.ed-share button:focus-visible {
  outline: 2px solid var(--ed-gold);
  outline-offset: 3px;
}

/* Related */
.ed-related {
  max-width: var(--ed-maxw);
  margin: 5.5rem auto 0;
  padding: 0 2rem;
}
.ed-related__head {
  text-align: center;
  margin-bottom: 2.4rem;
}
.ed-related__head .ed-eyebrow {
  margin-bottom: 0.4rem;
}
.ed-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

/* Back to library */
.ed-back-wrap {
  max-width: 740px;
  margin: 4rem auto 0;
  text-align: center;
}
.ed-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ed-sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ed-forest);
  padding: 0.85rem 1.7rem;
  border: 1px solid var(--ed-forest);
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease;
}
.ed-back-link:hover {
  background: var(--ed-forest);
  color: #fff;
}
.ed-back-link i {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}
.ed-back-link:hover i {
  transform: translateX(-2px);
}

/* Error */
.ed-article-error {
  text-align: center;
  padding: 7rem 1.2rem 6rem;
  max-width: 560px;
  margin: 0 auto;
}
.ed-article-error::before {
  content: "ॐ";
  display: block;
  font-family: var(--ed-dev);
  font-size: 3rem;
  color: var(--ed-gold);
  opacity: 0.3;
  margin-bottom: 1.4rem;
}
.ed-article-error h1 {
  font-family: var(--ed-serif);
  font-size: 2.2rem;
  color: var(--ed-forest);
  margin: 0 0 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ed-article-error p {
  font-family: var(--ed-serif);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ed-brown-soft);
  margin: 0 0 2rem;
}

/* ============================================================
   READING PROGRESS + TOAST
   ============================================================ */
.ed-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--ed-forest);
  color: #fff;
  padding: 0.9rem 1.35rem;
  border-radius: 3px;
  font-family: var(--ed-sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  z-index: 99999;
  box-shadow: 0 16px 40px rgba(14, 48, 32, 0.28);
  opacity: 0;
  transition: opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.ed-toast i {
  color: var(--ed-gold-soft);
  font-size: 0.85rem;
}
.ed-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   REVEAL (simple)
   ============================================================ */
.ed-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.ed-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ed-feature {
    grid-template-columns: 1fr;
  }
  .ed-feature__media {
    min-height: 320px;
    aspect-ratio: 16 / 9;
  }
  .ed-feature__body {
    padding: 2.2rem 2rem;
  }
  .ed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ed-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ed-article__body .ed-first-para::first-letter {
    font-size: 3.8rem;
    padding-right: 0.55rem;
  }
}

@media (max-width: 768px) {
  .ed-container {
    padding: 0 1.2rem;
  }
  .ed-hero {
    min-height: 82vh;
    padding: 130px 0 70px;
  }
  .ed-hero__inner {
    padding: 0 1.2rem;
  }
  .ed-hero__om {
    font-size: 9rem;
    opacity: 0.55;
  }
  .ed-hero__title {
    font-size: clamp(2rem, 9vw, 3rem);
  }
  .ed-hero__lede {
    font-size: 1rem;
    max-width: 46ch;
  }
  .ed-hero__actions {
    gap: 1.2rem;
  }
  .ed-featured {
    padding: 3.5rem 0 0.5rem;
  }
  .ed-feature__body {
    padding: 1.7rem 1.5rem 1.9rem;
  }
  .ed-feature__title {
    font-size: 1.55rem;
  }
  .ed-feature__summary {
    font-size: 0.98rem;
  }
  .ed-library {
    padding: 3rem 0 4rem;
  }
  .ed-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .ed-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ed-field--search {
    min-width: 0;
  }
  .ed-field--sort {
    justify-content: space-between;
  }
  .ed-cta__card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.9rem 1.7rem;
    gap: 1.4rem;
  }
  .ed-cta__card::before {
    font-size: 7rem;
  }
  .ed-cta__card .ed-btn {
    align-self: stretch;
    justify-content: center;
  }

  /* Article page — mobile */
  .ed-article {
    padding: 3rem 0 3.5rem;
  }
  .ed-breadcrumb {
    margin-bottom: 1.6rem;
    font-size: 0.68rem;
    gap: 0.4rem;
  }
  .ed-article__head {
    margin-bottom: 2rem;
  }
  .ed-article__cat {
    font-size: 0.64rem;
    margin-bottom: 1rem;
  }
  .ed-article__title {
    font-size: clamp(1.75rem, 7.5vw, 2.4rem);
    margin-bottom: 1.1rem;
    line-height: 1.12;
  }
  .ed-article__summary {
    font-size: 1.02rem;
    margin-bottom: 1.2rem;
  }
  .ed-article__meta {
    font-size: 0.74rem;
    gap: 0.5rem 1.2rem;
    padding-top: 1rem;
  }
  .ed-article__cover {
    aspect-ratio: 4 / 3;
    margin-bottom: 2.2rem;
    border-radius: var(--ed-radius);
  }
  .ed-article__body {
    font-size: 1.09rem;
    line-height: 1.8;
  }
  .ed-article__body > * + * {
    margin-top: 1.35rem;
  }
  .ed-article__body .ed-first-para::first-letter {
    font-size: 3.2rem;
    padding: 0.25rem 0.5rem 0 0;
  }
  .ed-article__body h2 {
    font-size: 1.42rem;
    margin-top: 2.2rem;
  }
  .ed-article__body h2::after {
    margin-top: 0.55rem;
  }
  .ed-article__body h3 {
    font-size: 1.18rem;
    margin-top: 1.8rem;
  }
  .ed-article__body blockquote {
    font-size: 1.14rem;
    padding-left: 1.3rem;
    margin: 2rem 0;
  }
  .ed-article__body blockquote::before {
    font-size: 2.4rem;
    left: -1.1rem;
  }
  .ed-sanskrit {
    font-size: 1.24rem;
    padding: 1.5rem 1.1rem;
    margin: 2rem 0;
    line-height: 1.9;
  }
  .ed-sanskrit__translation {
    font-size: 0.92rem;
  }
  .ed-takeaways {
    padding: 1.5rem 1.4rem;
    margin: 2.6rem auto 2rem;
  }
  .ed-takeaways h3 {
    font-size: 1.1rem;
  }
  .ed-takeaways li {
    font-size: 0.92rem;
  }
  .ed-share {
    margin-top: 2.4rem;
    padding: 1.4rem 0;
    gap: 0.65rem;
  }
  .ed-share__label {
    width: 100%;
    margin-bottom: 0.15rem;
    font-size: 0.66rem;
  }
  .ed-share button {
    width: 42px;
    height: 42px;
    font-size: 0.82rem;
  }
  .ed-related {
    margin-top: 4rem;
    padding: 0 1.2rem;
  }
  .ed-related__grid {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
  .ed-back-wrap {
    margin-top: 3rem;
  }
  .ed-back-link {
    padding: 0.75rem 1.4rem;
    font-size: 0.8rem;
  }
  .ed-article-error {
    padding: 5rem 1.2rem 4rem;
  }
  .ed-article-error h1 {
    font-size: 1.8rem;
  }
  .ed-article-error p {
    font-size: 1rem;
  }
  .ed-article-page::before {
    opacity: 0.025;
    width: 100vw;
    background-position: center 60%;
  }
}

@media (max-width: 480px) {
  .ed-hero {
    min-height: 76vh;
    padding: 110px 0 55px;
  }
  .ed-hero__title {
    font-size: 1.95rem;
  }
  .ed-hero__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
  .ed-hero__actions .ed-btn {
    width: 100%;
    justify-content: center;
  }
  .ed-hero__sanskrit {
    font-size: 0.95rem;
  }
  .ed-article__title {
    font-size: 1.68rem;
    line-height: 1.15;
  }
  .ed-article__body {
    font-size: 1.05rem;
    line-height: 1.78;
  }
  .ed-article__body .ed-first-para::first-letter {
    font-size: 2.9rem;
  }
  .ed-article__body h2 {
    font-size: 1.3rem;
  }
  .ed-article__body h3 {
    font-size: 1.12rem;
  }
  .ed-sanskrit {
    font-size: 1.12rem;
    padding: 1.3rem 0.9rem;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ed-body *,
  .ed-body *::before,
  .ed-body *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ed-card:hover,
  .ed-feature:hover .ed-feature__media img,
  .ed-card:hover .ed-card__media img,
  .ed-share button:hover,
  .ed-btn:hover i {
    transform: none !important;
  }
  .ed-reveal {
    opacity: 1;
    transform: none;
  }
  .ed-progress__bar {
    transition: none !important;
  }
  .ed-toast {
    transition: opacity 0.15s linear;
    transform: translate(-50%, 0);
  }
}

/* ============================================================
   HOMEPAGE — FROM THE ARCHIVES
   Scoped so it never affects other homepage components.
   ============================================================ */
.home-archives-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .home-archives-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
@media (max-width: 640px) {
  .home-archives-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

.home-archives-grid .ed-card {
  border: 2.5px solid rgba(254, 191, 1, 0.35);
  border-radius: var(--radius-md, 20px);
  box-shadow: 0 8px 32px rgba(43, 36, 28, 0.04);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease;
}
.home-archives-grid .ed-card:hover {
  transform: translateY(-6px);
  border-color: rgba(254, 191, 1, 0.75);
  box-shadow: 0 20px 60px rgba(43, 36, 28, 0.1);
}

.home-archives-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ed-brown-soft, #6b5a47);
  font-family: var(--ed-serif, "EB Garamond", serif);
  font-size: 1.05rem;
}