/* ==========================================================================
   சிறுபஞ்சமூலம் · Ciṟupañcamūlam — The Five Small Roots
   100 ethical quintet-verses · c. 1st–5th century CE
   Author: Āmūvaṉār · Patiṉeṇkīḻkaṇakku collection

   Title: சிறு (ciṟu) = small, minor; பஞ்ச (pañca) = five; மூலம் (mūlam) = root(s).
   The five small roots are a classical Ayurvedic herbal combination —
   small-caltrops (நெருஞ்சி), small-sida (சிற்றாமணக்கு), pea-plant (குதிரைமசால்),
   small-jointed-plant (சிறுவழுதுணை), and solanum (கண்டங்கத்தரி). As these five
   roots together restore and strengthen the body, each verse's five moral truths
   together restore and strengthen a life.

   Visual identity: The roots are buried but sustaining — underground, fibrous,
   vital. The palette draws from the root world: deep forest-green (root-dark,
   the earth in which roots live), herb-green (the living plant above ground),
   root-amber (the dried root — warm, fibrous, medicinal), and pale clay (the
   soil itself). Each verse presents five items: a stable pentagon of truths.

   Mark: five small circles arranged in a pentagon (or quincunx) — five roots,
   five truths, the structural quintet that defines the entire work.
   ========================================================================== */

:root {
  /* ── Forest-green (primary) ─────────────────────────── */
  --sp-forest:        #1a3820;
  --sp-forest-mid:    #2a5030;
  --sp-forest-bright: #3a7040;
  --sp-forest-pale:   rgba(26, 56, 32, 0.10);
  --sp-forest-pale2:  rgba(26, 56, 32, 0.05);

  /* ── Herb-green (secondary) ─────────────────────────── */
  --sp-herb:          #4a8840;
  --sp-herb-mid:      #3a6830;
  --sp-herb-bright:   #6aaa5a;
  --sp-herb-pale:     rgba(74, 136, 64, 0.14);
  --sp-herb-pale2:    rgba(74, 136, 64, 0.06);

  /* ── Root-amber (accent) ────────────────────────────── */
  --sp-amber:         #a07030;
  --sp-amber-mid:     #805818;
  --sp-amber-pale:    rgba(160, 112, 48, 0.13);

  /* ── Clay (background) ──────────────────────────────── */
  --sp-clay:          #e8e0cc;
  --sp-clay-mid:      #dbd0b4;

  /* ── Soil ink ───────────────────────────────────────── */
  --sp-ink:           #181e12;
  --sp-ink-mid:       #303828;
  --sp-ink-pale:      rgba(24, 30, 18, 0.55);

  /* ── Site overrides ─────────────────────────────────── */
  --accent-vermillion: var(--sp-forest);
  --accent-kumkum:     var(--sp-forest-mid);
  --accent-ochre:      var(--sp-amber-mid);
  --accent-gold:       var(--sp-herb);
}

/* ── Page base ───────────────────────────────────────── */
body {
  background: var(--sp-clay);
  color: var(--sp-ink);
  font-family: 'Georgia', 'Times New Roman', serif;
}

/* ── Hero ─────────────────────────────────────────────── */
.sp-hero {
  background: linear-gradient(160deg, var(--sp-forest) 0%, var(--sp-forest-mid) 55%, #1e4828 100%);
  color: #e8f0e0;
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(106, 170, 90, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.sp-hero-mark {
  margin-bottom: 1.5rem;
}

.sp-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
  color: #e8f4e0;
}

.sp-hero-roman {
  font-size: 1.1rem;
  color: rgba(232, 244, 224, 0.72);
  margin: 0 0 0.2rem;
  font-style: italic;
}

.sp-hero-meaning {
  font-size: 0.95rem;
  color: rgba(232, 244, 224, 0.60);
  margin: 0 0 1.4rem;
  letter-spacing: 0.03em;
}

.sp-hero p {
  max-width: 680px;
  margin: 0 auto 0.9rem;
  line-height: 1.7;
  font-size: 0.98rem;
  color: rgba(232, 244, 224, 0.88);
}

.sp-stat-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.sp-stat {
  text-align: center;
}

.sp-stat-num {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--sp-herb-bright);
  line-height: 1;
}

.sp-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 244, 224, 0.50);
  margin-top: 0.3rem;
}

/* ── Roots banner ─────────────────────────────────────── */
.sp-roots-banner {
  background: var(--sp-forest);
  color: rgba(232, 244, 224, 0.90);
  padding: 1.2rem 2rem;
  text-align: center;
  font-size: 0.93rem;
  line-height: 1.65;
  border-bottom: 2px solid var(--sp-herb-pale);
}

.sp-roots-banner strong {
  color: var(--sp-herb-bright);
}

/* ── Five roots display ───────────────────────────────── */
.sp-five-roots {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: 1.8rem 2rem;
  background: var(--sp-forest-mid);
  border-bottom: 3px solid var(--sp-forest);
}

.sp-root-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(106,170,90,0.22);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  text-align: center;
  min-width: 110px;
  flex: 0 1 130px;
}

.sp-root-num {
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(232,244,224,0.45);
  margin-bottom: 0.4rem;
}

.sp-root-tamil {
  font-size: 1.1rem;
  color: #e8f4e0;
  display: block;
  margin-bottom: 0.15rem;
}

.sp-root-roman {
  font-size: 0.82rem;
  color: rgba(232,244,224,0.65);
  font-style: italic;
  display: block;
  margin-bottom: 0.1rem;
}

.sp-root-english {
  font-size: 0.80rem;
  color: var(--sp-herb-bright);
  font-weight: 600;
}

/* ── Verses header ────────────────────────────────────── */
.sp-verses-header {
  background: var(--sp-clay);
  padding: 1.6rem 2rem 0.8rem;
  border-bottom: 1px solid rgba(26,56,32,0.15);
}

.sp-verses-header h2 {
  margin: 0 0 0.3rem;
  color: var(--sp-forest);
  font-size: 1.25rem;
  font-weight: 600;
}

.sp-verses-header p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--sp-ink-pale);
  font-style: italic;
}

/* ── Main verses container ────────────────────────────── */
.sp-verses-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

/* ── Individual verse card ────────────────────────────── */
.sp-verse {
  background: #fff;
  border: 1px solid rgba(26,56,32,0.13);
  border-left: 4px solid var(--sp-herb);
  border-radius: 8px;
  margin-bottom: 1.2rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(26,56,32,0.06);
}

.sp-verse-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1.2rem 0.5rem;
  background: var(--sp-forest-pale);
  border-bottom: 1px solid rgba(26,56,32,0.10);
}

.sp-verse-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sp-forest-mid);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 2.5rem;
  font-family: 'Georgia', serif;
}

.sp-verse-theme {
  font-size: 0.90rem;
  color: var(--sp-forest-bright);
  font-style: italic;
}

/* ── Quintet (five items) ─────────────────────────────── */
.sp-quintet {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.7rem 1.2rem 0.6rem;
  background: var(--sp-herb-pale2);
  border-bottom: 1px solid rgba(26,56,32,0.08);
}

.sp-quintet-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--sp-ink-mid);
  padding: 0.18rem 0;
  line-height: 1.45;
}

.sp-quintet-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sp-herb);
  flex-shrink: 0;
  margin-top: 0.3em;
  opacity: 0.8;
}

/* ── Layer accordions ─────────────────────────────────── */
.sp-verse-body {
  padding: 0.2rem 0;
}

.sp-layer {
  border-top: 1px solid rgba(26,56,32,0.07);
}

.sp-layer-toggle {
  display: block;
  padding: 0.55rem 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sp-forest-mid);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.sp-layer-toggle::-webkit-details-marker { display: none; }

.sp-layer-toggle::before {
  content: '▸ ';
  font-size: 0.7rem;
  color: var(--sp-herb);
}

.sp-layer[open] .sp-layer-toggle::before {
  content: '▾ ';
}

.sp-layer-content {
  padding: 0.6rem 1.4rem 0.9rem;
}

.sp-tamil-verse {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--sp-forest);
  font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
}

.sp-translit-verse {
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--sp-ink-mid);
  font-style: italic;
  font-family: 'Georgia', serif;
}

.sp-english-prose {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--sp-ink);
}

.sp-note {
  font-size: 0.85rem;
  line-height: 1.70;
  color: var(--sp-ink-pale);
  border-left: 2px solid var(--sp-herb-pale);
  padding-left: 0.8rem;
  font-style: italic;
}

/* ── About page ───────────────────────────────────────── */
.sp-about-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.sp-about-main h2 {
  color: var(--sp-forest);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(26,56,32,0.15);
}

.sp-about-main p {
  line-height: 1.78;
  font-size: 0.95rem;
  color: var(--sp-ink);
  margin: 0 0 1rem;
}

.sp-about-main em { font-style: italic; color: var(--sp-forest-bright); }
.sp-about-main strong { font-weight: 600; color: var(--sp-forest-mid); }
