@import url("https://fonts.googleapis.com/css2?family=Tiro+Bangla:ital@0;1&family=Tiro+Devanagari+Hindi:ital@0;1&family=Tiro+Devanagari+Sanskrit:ital@0;1&display=swap");

:root {
  --parchment: #fdfbf7;
  --paper: #fffaf0;
  --paper-deep: #f4ede2;
  --ink: #2e2a26;
  --muted: #6b6258;
  --saffron: #cd5c5c;
  --saffron-soft: rgba(205, 92, 92, 0.12);
  --royal: #1e4f8a;
  --royal-soft: rgba(30, 79, 138, 0.12);
  --border: rgba(64, 51, 38, 0.12);
  --shadow: 0 24px 70px rgba(70, 50, 30, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --content-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Merriweather", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(205, 92, 92, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(30, 79, 138, 0.18), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, var(--parchment) 38%, #f7f0e3 100%);
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(160, 130, 90, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 130, 90, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
  opacity: 0.4;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  position: relative;
  overflow: hidden;
}

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section-title {
  margin: 0 0 1rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--royal);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--saffron);
  box-shadow: 0 0 0 6px rgba(205, 92, 92, 0.12);
}

.section-copy {
  max-width: 70ch;
  color: var(--muted);
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(253, 251, 247, 0.78);
  border-bottom: 1px solid rgba(72, 57, 40, 0.08);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(205, 92, 92, 0.16), rgba(30, 79, 138, 0.22)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  color: var(--royal);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 12px 28px rgba(30, 79, 138, 0.14);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.nav-link {
  padding: 0.68rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--royal);
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.hero {
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: stretch;
}

.hero-copy {
  position: relative;
  padding: 3rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(244, 237, 226, 0.96)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.1);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
  gap: 1rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.hero-visual-card {
  margin: 0;
  padding: 1rem;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(244, 237, 226, 0.96)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 40px rgba(70, 50, 30, 0.1);
}

.hero-visual-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(64, 51, 38, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.hero-visual-card-wide img {
  aspect-ratio: 16 / 9;
}

.hero-visual-card figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.visual-credit {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: rgba(64, 51, 38, 0.76);
}

.visual-credit a {
  color: var(--royal);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 79, 138, 0.18);
}

.visual-credit a:hover,
.visual-credit a:focus-visible {
  color: var(--saffron);
  border-bottom-color: rgba(205, 92, 92, 0.35);
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 92, 92, 0.18), transparent 70%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(205, 92, 92, 0.1);
  color: var(--saffron);
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.hero-title {
  margin: 1.2rem 0 1rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.97;
}

.hero-title span {
  display: block;
  color: var(--royal);
}

.hero-copy p {
  max-width: 60ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--saffron), #db7a62);
  color: #fffaf6;
  box-shadow: 0 18px 36px rgba(205, 92, 92, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.78);
  color: var(--royal);
  border-color: rgba(30, 79, 138, 0.18);
}

.ornament-card,
.quote-card,
.feature-card,
.contact-card,
.language-panel {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(244, 237, 226, 0.92)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ornament-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.image-panel {
  display: grid;
  gap: 1rem;
}

.image-panel img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(64, 51, 38, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.image-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.mini-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
}

.quote-card {
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
}

.quote-card > * {
  position: relative;
  z-index: 1;
}

.quote-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(30, 79, 138, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(205, 92, 92, 0.1), transparent 26%);
  pointer-events: none;
}

.quote-topline,
.card-meta,
.history-grid,
.category-meta,
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.quote-badge,
.meta-badge,
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(64, 51, 38, 0.08);
  font-size: 0.82rem;
  color: var(--royal);
}

.quote-number {
  color: var(--muted);
  font-size: 0.9rem;
}

.quote-artwork {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(64, 51, 38, 0.12);
  object-fit: cover;
  background: var(--paper);
}

.quote-sanskrit {
  position: relative;
  margin: 1.3rem 0 1rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.8;
}

.quote-sanskrit::before {
  content: "॥";
  display: inline-block;
  margin-right: 0.55rem;
  color: var(--saffron);
}

.quote-translation {
  margin: 0;
  color: var(--muted);
}

.quote-language {
  margin-top: 1.15rem;
  color: var(--royal);
  font-size: 0.9rem;
}

.quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.download-button {
  min-height: 2.8rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, var(--royal), #16375f);
  color: #fffaf0;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(30, 79, 138, 0.18);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    opacity 120ms ease;
}

.download-button:hover,
.download-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(30, 79, 138, 0.24);
}

.download-button:disabled {
  cursor: progress;
  opacity: 0.62;
  transform: none;
}

.scholarly-quote-card .scholarly-fields {
  margin-top: 1.15rem;
}

.scholarly-quote-card .scholarly-field:first-child {
  border-top: 0;
  padding-top: 0;
}

.translations {
  margin-top: 1rem;
  border-top: 1px solid rgba(64, 51, 38, 0.08);
  padding-top: 1rem;
}

.translations summary {
  cursor: pointer;
  color: var(--saffron);
  font-weight: 700;
}

.translations-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.translations-grid p {
  margin: 0;
  color: var(--muted);
}

.translations-grid strong {
  color: var(--ink);
}

.language-panel {
  padding: 1.2rem;
}

.download-panel {
  max-width: min(100%, 560px);
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.language-button {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(64, 51, 38, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.language-button.active,
.language-button:hover,
.language-button:focus-visible {
  background: linear-gradient(135deg, rgba(205, 92, 92, 0.12), rgba(30, 79, 138, 0.12));
  color: var(--royal);
  transform: translateY(-1px);
}

.site-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: min(92vw, 360px);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  background: rgba(46, 42, 38, 0.94);
  color: #fffaf0;
  font-weight: 800;
  box-shadow: 0 18px 45px rgba(46, 42, 38, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 100ms ease,
    transform 100ms ease;
}

.site-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.history-section {
  position: relative;
}

.history-grid {
  gap: 2rem;
  align-items: flex-start;
}

.history-text {
  display: grid;
  gap: 1.2rem;
}

.history-text p {
  margin: 0;
  color: var(--muted);
}

.history-aside {
  display: grid;
  gap: 1rem;
}

.feature-grid,
.archive-grid,
.quote-grid,
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}

.feature-card h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.feature-link {
  margin-top: auto;
  color: var(--royal);
  font-weight: 700;
}

.feature-tone {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  background: linear-gradient(135deg, rgba(205, 92, 92, 0.16), rgba(30, 79, 138, 0.18));
  color: var(--royal);
}

.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-note {
  padding: 1.5rem;
}

.archive-note h3 {
  margin: 0 0 0.7rem;
  font-family: "Playfair Display", Georgia, serif;
}

.archive-note p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 4.5rem 0 2.5rem;
}

.page-hero-shell {
  padding: 2.4rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.1);
  box-shadow: var(--shadow);
}

.page-hero-shell h1 {
  margin: 0.85rem 0 0.8rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.3rem, 4vw, 4rem);
}

.page-hero-shell p {
  margin: 0;
  max-width: 65ch;
  color: var(--muted);
}

.quote-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.toolbar p {
  margin: 0;
  color: var(--muted);
}

.contact-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  align-items: start;
}

.contact-card {
  padding: 1.8rem;
}

.contact-card h2,
.contact-card h3 {
  margin: 0 0 0.8rem;
  font-family: "Playfair Display", Georgia, serif;
}

.contact-card p {
  color: var(--muted);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(64, 51, 38, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.field textarea {
  min-height: 180px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(30, 79, 138, 0.22);
  border-color: rgba(30, 79, 138, 0.3);
}

.form-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(30, 79, 138, 0.12);
  background: rgba(30, 79, 138, 0.08);
  color: var(--royal);
  display: none;
}

.form-status.visible {
  display: block;
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.contact-item {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(64, 51, 38, 0.08);
}

.contact-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.contact-item a,
.footer-author a {
  color: inherit;
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.contact-item a:hover,
.footer-author a:hover {
  color: var(--royal);
}

.site-footer {
  padding: 2rem 0 3rem;
}

.footer-shell {
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
}

.footer-shell p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(64, 51, 38, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1080px) {
  .hero-grid,
  .contact-grid,
  .feature-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .site-nav,
  .history-grid,
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy,
  .page-hero-shell,
  .contact-card,
  .quote-card,
  .ornament-card,
  .feature-card {
    padding: 1.4rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero-visual-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--content-width));
  }

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

  .hero-title {
    font-size: clamp(2.35rem, 11vw, 3.4rem);
  }

  .section {
    padding: 3.5rem 0;
  }

  .site-nav {
    min-height: 70px;
  }

  .nav-links {
    gap: 0.35rem;
  }

  .nav-link {
    padding: 0.55rem 0.82rem;
    font-size: 0.95rem;
  }
}

.scholarly-archive-page .archive-hero {
  padding-bottom: 3.4rem;
}

.archive-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
}

.archive-hero-copy,
.archive-note-panel {
  min-height: 100%;
}

.archive-hero-copy {
  padding: 3rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 237, 226, 0.98)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.1);
  box-shadow: var(--shadow);
}

.archive-title {
  margin-bottom: 1.1rem;
}

.archive-lead {
  max-width: 70ch;
  margin: 0;
  color: var(--muted);
}

.archive-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.archive-stat-card {
  display: grid;
  gap: 0.3rem;
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(64, 51, 38, 0.08);
}

.archive-stat-card strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--royal);
}

.archive-stat-card span {
  color: var(--muted);
  font-size: 0.95rem;
}

.archive-note-panel {
  padding: 2rem;
}

.archive-note-small {
  margin-top: 1rem;
  font-size: 0.96rem;
}

.archive-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.summary-card {
  padding: 1.5rem;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 50, 30, 0.08);
}

.summary-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  color: var(--royal);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card h3 {
  margin: 0 0 0.7rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
}

.summary-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 0.35rem 1rem;
  align-items: end;
  margin-top: 1.2rem;
}

.summary-card-stats strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
  color: var(--ink);
}

.summary-card-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-card-footnote {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.archive-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.archive-search-block,
.archive-results-panel {
  padding: 1.4rem;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 50, 30, 0.08);
}

.archive-search-block {
  display: grid;
  gap: 0.7rem;
}

.archive-input-label {
  font-weight: 700;
}

.archive-search-input {
  width: 100%;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(64, 51, 38, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.archive-search-input:focus {
  outline: 2px solid rgba(30, 79, 138, 0.22);
  border-color: rgba(30, 79, 138, 0.28);
}

.archive-results-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.archive-filter-copy {
  margin: 0;
  color: var(--muted);
}

.archive-grid-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.2rem;
  margin-bottom: 1.25rem;
  padding: 1.2rem 1.4rem;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 50, 30, 0.08);
  color: var(--muted);
}

.archive-grid-intro > div:first-child {
  flex: 1 1 360px;
}

.word-export-button {
  flex: 0 0 auto;
}

.word-export-context {
  flex: 1 1 100%;
  display: grid;
  gap: 0.22rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(64, 51, 38, 0.08);
  color: var(--muted);
  font-size: 0.93rem;
}

.word-export-context strong {
  color: var(--royal);
}

.sangraha-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.sangraha-link-card {
  display: block;
  padding: 1.4rem;
  border-radius: 24px;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 50, 30, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.sangraha-link-card:hover,
.sangraha-link-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(30, 79, 138, 0.22);
  box-shadow: 0 22px 50px rgba(70, 50, 30, 0.12);
}

.sangraha-link-card h3 {
  margin: 0.75rem 0 0.5rem;
  color: var(--ink);
}

.sangraha-link-card p {
  margin: 0;
  color: var(--muted);
}

.sangraha-root {
  display: grid;
  gap: 2rem;
}

.sangraha-chapter {
  scroll-margin-top: 90px;
}

.sangraha-chapter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.sangraha-chapter-title {
  margin-bottom: 0.5rem;
}

.sangraha-chapter-title span {
  color: var(--muted);
  font-weight: 500;
}

.sangraha-chapter-copy {
  max-width: 72ch;
}

.sangraha-top-link {
  white-space: nowrap;
  color: var(--royal);
  font-weight: 700;
  text-decoration: none;
}

.sangraha-top-link:hover,
.sangraha-top-link:focus-visible {
  text-decoration: underline;
}

.sangraha-grid {
  margin-top: 0.5rem;
}

.scholarly-format-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 1.25rem;
}

.format-card,
.archive-loading-card {
  padding: 1.55rem;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 50, 30, 0.08);
}

.format-card h3 {
  margin-bottom: 0.9rem;
}

.format-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  color: var(--ink);
}

.format-sample-card .summary-card-topline {
  margin-bottom: 0.85rem;
}

.format-mini-field {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(64, 51, 38, 0.08);
}

.format-sample-card h3 + .format-mini-field {
  border-top: 0;
  padding-top: 0.2rem;
}

.format-mini-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--royal);
}

.format-mini-value {
  color: var(--ink);
  word-break: break-word;
}

.format-mini-value.devanagari {
  font-size: 1.08rem;
  line-height: 1.85;
}

.format-mini-value.bengali-script {
  font-size: 1.05rem;
  line-height: 1.85;
}

.format-mini-value.iast {
  font-style: italic;
}

.chapter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.chapter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(64, 51, 38, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.chapter-pill:hover,
.chapter-pill:focus-visible {
  transform: translateY(-1px);
  color: var(--royal);
  border-color: rgba(30, 79, 138, 0.22);
}

.chapter-pill.is-active {
  color: var(--royal);
  background: rgba(30, 79, 138, 0.1);
  border-color: rgba(30, 79, 138, 0.18);
}

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

.scholarly-card {
  padding: 1.55rem;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 237, 226, 0.95)),
    var(--paper);
  border: 1px solid rgba(64, 51, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 50, 30, 0.08);
}

.verse-image-frame {
  margin: 0 0 1.15rem;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(64, 51, 38, 0.14);
  aspect-ratio: 16 / 9;
  background: #efe3c8;
}

.verse-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scholarly-card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-bottom: 1.1rem;
}

.scholarly-index,
.scholarly-chapter,
.scholarly-sequence {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.78rem;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid rgba(64, 51, 38, 0.08);
}

.scholarly-index {
  color: var(--royal);
  background: rgba(30, 79, 138, 0.08);
}

.scholarly-chapter {
  color: var(--ink);
  background: rgba(205, 92, 92, 0.1);
}

.scholarly-sequence {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
}

.scholarly-field {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(64, 51, 38, 0.08);
}

.scholarly-card-topline + .scholarly-field {
  border-top: 0;
  padding-top: 0;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--royal);
}

.field-value {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  word-break: break-word;
}

.field-value.devanagari {
  font-family: "Aparajita", "Aparija", "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
  font-size: 1.08rem;
  line-height: 1.9;
}

.field-value.bengali-script,
.field-value.bangla-meaning {
  font-family: "Trio Bangla", "Tiro Bangla", "Noto Serif Bengali", serif;
  font-size: 1.05rem;
  line-height: 1.9;
}

.field-value.hindi-meaning {
  font-family: "Trio Devnagari", "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  line-height: 1.85;
}

.field-value.iast,
.field-value.english-meaning {
  font-family: Arial, Helvetica, sans-serif;
}

.field-value.iast {
  font-style: italic;
}

.source-citation {
  color: var(--muted);
}

.archive-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pager-status {
  min-width: 130px;
  text-align: center;
  color: var(--muted);
}

.archive-empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border-radius: 24px;
  border: 1px dashed rgba(64, 51, 38, 0.2);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
}

@media (max-width: 1080px) {
  .archive-hero-layout,
  .archive-toolbar,
  .sangraha-link-grid,
  .scholarly-format-grid,
  .archive-summary-grid,
  .scholarly-grid {
    grid-template-columns: 1fr;
  }

  .sangraha-chapter-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .archive-hero-copy,
  .archive-note-panel,
  .archive-search-block,
  .archive-results-panel,
  .summary-card,
  .scholarly-card {
    padding: 1.25rem;
  }

  .archive-stat-grid {
    grid-template-columns: 1fr;
  }

  .archive-results-topline,
  .archive-pager {
    flex-direction: column;
  }

  .chapter-pill,
  .button.button-secondary {
    width: 100%;
    justify-content: center;
  }
}
