/* ════════════════════════════════════════════════════════════════
   himalaya-tirtha.org · lesson.css
   Single lesson / article — ONE unified reading measure.

   The body column is the spine. Header, hero, audio, body, daksina
   and continue-reading all align to the SAME centred column. The
   study hero may breathe a little wider; nothing is full-bleed.
   Shared by the three lesson templates (Hridaya / PMH / Other).
   ════════════════════════════════════════════════════════════════ */

:root {
  --measure: 748px;        /* the one reading measure (~72 char; +10% od 680) */
  --measure-hero: 768px;   /* study hero may breathe a little wider */
}

/* ── The column ─────────────────────────────────────────────── */
.lesson-main { padding-top: 28px; padding-bottom: 8px; }
/* the narrow, readable column — ONLY the audio + article text live here.
   Everything else (title, hero, daksina, continue-reading) spans the
   full container so the page reads wide with a narrow spine of text. */
.reading {
  max-width: var(--measure);
  margin-inline: auto;
}

/* ── Reading-progress line (top of viewport) ────────────────── */
.read-progress--soft { height: 2.5px; opacity: .85; }

/* ── Breadcrumb, centred for the lesson header ──────────────── */
.crumbs--center { justify-content: center; margin: 28px 0 22px; }

/* ── Header block ───────────────────────────────────────────── */
.lesson-head {
  text-align: center;
  padding: 4px 0 40px;
  max-width: 880px;
  margin-inline: auto;
}
.lesson-head--study { max-width: 940px; }

/* ONE small eyebrow = collection name only */
.lesson-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 22px;
}
.lesson-eyebrow::before { display: none; }
/* Podtytuł strony statycznej — ten sam niebieski druczek, ale POD tytułem. */
.lesson-eyebrow--sub { margin: 14px 0 0; }

.lesson-head h1 {
  font-size: 62px;
  line-height: 1.06;
  margin: 0 auto;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.lesson-head--study h1 { font-size: 72px; letter-spacing: -0.02em; }
@media (max-width: 760px) {
  .lesson-head h1, .lesson-head--study h1 { font-size: 38px; }
}

.lesson-head .sanskrit-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 23px;
  color: var(--gold-500);
  margin: 14px 0 0;
  letter-spacing: 0.01em;
}

.lesson-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-500);
  letter-spacing: 0.01em;
}
.lesson-meta .lead-term { color: var(--ink-700); font-weight: 500; }
.lesson-meta > span { white-space: nowrap; }
.lesson-meta .dot {
  width: 3px; height: 3px;
  background: var(--gold-500);
  border-radius: 50%;
}

/* ── Hero ───────────────────────────────────────────────────── */
.lesson-hero {
  max-width: 100%;            /* big — spans the whole container */
  margin: 0 auto 52px;
}
.lesson-hero--study { max-width: 100%; }

.lesson-hero__frame {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--sepia-300);   /* ta sama hairline co karty zajawek i dół menu */
}
.lesson-hero--pearl .lesson-hero__frame { aspect-ratio: 16 / 9; }
.lesson-hero--study .lesson-hero__frame { aspect-ratio: 16 / 9; }
/* Prawdziwy obraz (featured) wypełnia ramkę i centruje się — w mocku był tu placeholder. */
.lesson-hero__frame img,
.lesson-hero__frame .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 720px) {
  .lesson-hero__frame,
  .lesson-hero--pearl .lesson-hero__frame,
  .lesson-hero--study .lesson-hero__frame { aspect-ratio: 3 / 2; }
}

/* large numeral set into the study hero */
.lesson-hero__numeral {
  position: absolute;
  left: 40px; bottom: 28px;
  z-index: 4;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 136px;
  line-height: 0.82;
  color: var(--sepia-100);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  text-shadow: 0 2px 24px rgba(15,31,60,.55);
}
.lesson-hero__numeral .series {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(242,235,217,.82);
  margin-bottom: 8px;
  text-shadow: 0 1px 8px rgba(15,31,60,.6);
}
@media (max-width: 600px) { .lesson-hero__numeral { font-size: 72px; left: 18px; } }

/* ── Audio bar (placeholder; not the focus) ─────────────────── */
.lesson-audio { margin: 0 auto 48px; }
.lesson-audio .audio-bar { margin: 0; }

/* ── Body ───────────────────────────────────────────────────── */
.lesson-body {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink-900);
  font-variation-settings: "opsz" 24;
  text-align: left;            /* ragged right — never justified */
}
.lesson-body--study { font-size: 21px; line-height: 1.75; }
.lesson-body p { margin: 0 0 1.2em; }
.lesson-body--study p { margin: 0 0 1.3em; }

.lesson-body h2 {
  font-size: 29px;
  line-height: 1.2;
  margin: 46px 0 16px;
  color: var(--navy-900);
  font-variation-settings: "opsz" 48;
}
.lesson-body--study h2 {
  font-size: 32px;
  margin: 54px 0 18px;
  font-variation-settings: "opsz" 64;
}
.lesson-body h3 {
  font-size: 22px;
  margin: 38px 0 12px;
  color: var(--navy-900);
}

/* drop cap (study + opt) — opening paragraph only */
.lesson-body > p:first-of-type::first-letter,
.lesson-body p.dropcap::first-letter {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144;
  font-size: 82px;
  font-weight: 500;
  float: left;
  line-height: 0.8;
  margin: 9px 14px -4px 0;
  color: var(--navy-800);
}

/* figures — locked to the column width (single measure) */
.lesson-body figure {
  margin: 44px 0;
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  padding: 20px;
  border-radius: 2px;
}
.lesson-body figure .placeholder { aspect-ratio: 16 / 9; border-radius: 1px; }
.lesson-body figcaption {
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
  text-align: left;
}

/* pull quote inherits shared .pullquote, just re-centre its measure */
.lesson-body .pullquote { margin-inline: 0; }

/* ── End-of-lesson signature ────────────────────────────────── */
.lesson-end {
  text-align: center;
  margin: 64px 0 48px;
}
.lesson-end .om {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--gold-500);
}
.lesson-end--study .om { font-size: 38px; margin-bottom: 14px; display: block; }
.lesson-end .signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-500);
  letter-spacing: 0.03em;
  margin: 0;
}
.lesson-end .signature .roman { color: var(--gold-500); }
/* slim rule flourish for the light end mark (pearl/other) */
.lesson-end--flourish::before,
.lesson-end--flourish::after {
  content: "";
  display: inline-block;
  width: 90px; height: 1px;
  background: var(--gold-500);
  vertical-align: middle;
  margin: 0 18px;
  opacity: .8;
}

/* ── Continue reading ───────────────────────────────────────── */
.continue { padding: 8px 0 0; }
.continue__head {
  text-align: center;
  margin: 0 auto 38px;
  max-width: 640px;
}
.continue__head .eyebrow { justify-content: center; margin-bottom: 16px; }
.continue__head h2 {
  font-size: 34px;
  margin: 0;
  color: var(--navy-900);
  text-wrap: balance;
}
.continue__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-700);
  margin: 16px auto 0;
  max-width: 540px;
  text-wrap: pretty;
}
@media (max-width: 600px) { .continue__head h2 { font-size: 26px; } }

/* Featured "next step" card — one wide horizontal card */
/* featured next-step card is constrained to the reading measure —
   a single focused card, not a stretched full-container band */
.next-step {
  display: grid;
  max-width: var(--measure);
  margin-inline: auto;
  grid-template-columns: 232px 1fr;
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 44px;
  transition: border-color 200ms ease, box-shadow 220ms ease, transform 200ms ease;
}
.next-step:hover {
  border-color: var(--navy-800);
  box-shadow: 0 16px 38px -24px rgba(26,45,92,.4);
}
.next-step__media {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  min-height: 196px;
}
.next-step__media .placeholder { position: absolute; inset: 0; }
.next-step__numeral {
  position: absolute;
  left: 18px; bottom: 12px;
  z-index: 3;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 0.85;
  color: var(--sepia-100);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(15,31,60,.6);
  font-variation-settings: "opsz" 96;
}
.next-step__body {
  padding: 26px 30px 24px;
  display: flex;
  flex-direction: column;
}
.next-step__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.next-step__label::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--blue-500);
  border-radius: 50%;
}
.next-step__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.18;
  margin: 0 0 8px;
  letter-spacing: -0.006em;
  color: var(--ink-900);
  text-wrap: pretty;
}
.next-step:hover .next-step__title { color: var(--navy-800); }
.next-step__sanskrit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-500);
  margin: 0 0 10px;
}
.next-step__teaser {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.next-step__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sepia-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-500);
  letter-spacing: 0.04em;
}
.next-step__action {
  color: var(--navy-800);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.next-step__action .arrow {
  font-family: var(--font-serif);
  font-size: 16px;
  transition: transform 220ms ease;
}
.next-step:hover .next-step__action .arrow { transform: translateX(4px); }
@media (max-width: 600px) {
  .next-step { grid-template-columns: 1fr; }
  .next-step__media { aspect-ratio: 16/9; min-height: 0; }
  .next-step__numeral { font-size: 44px; }
}

/* sub-label above the random trio */
.also-label {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.also-label::before,
.also-label::after {
  content: "";
  width: 40px; height: 1px;
  background: var(--sepia-400);
}

/* The random trio — three cards drawn from the whole corpus */
.also-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 0 0 16px;
}
@media (max-width: 760px) { .also-grid { grid-template-columns: 1fr; } }

/* collection · time badge — stays legible whatever the nature */
.corpus-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 14px;
}
.corpus-badge::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--blue-500);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Save-your-place note ───────────────────────────────────── */
.save-place {
  text-align: center;
  margin: 60px 0 84px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-500);
}
.save-place .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border: 1px solid var(--success);
  border-radius: 50%;
  color: var(--success);
  font-size: 9px;
  margin-right: 7px;
  vertical-align: middle;
}

/* ── Sanskrit tooltip (shared by all three) ─────────────────── */
.lesson-body .sanskrit { position: relative; }
.lesson-body .sanskrit[data-def]:hover::after {
  content: attr(data-def);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--navy-900);
  color: var(--sepia-100);
  padding: 8px 14px;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: 320px;
  box-shadow: 0 8px 24px -8px rgba(15,31,60,.5);
  pointer-events: none;
  z-index: 20;
}

/* ══════════════════════════════════════════════════════════════
   404 (404.php) — jedno zdanie, wyszukiwarka, drogi do bibliotek.
   ══════════════════════════════════════════════════════════════ */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nf { padding-bottom: 32px; }
.nf__body {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.nf__lead {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-700);
  margin: 0 0 36px;
}
.nf__search {
  display: flex;
  gap: 8px;
  margin: 0 0 40px;
}
.nf__input {
  flex: 1;
  min-width: 0;
  font: 400 17px/1.4 var(--font-sans);
  color: var(--ink-900);
  background: var(--sepia-100);
  border: 1px solid var(--sepia-400);
  border-radius: 4px;
  padding: 12px 16px;
}
.nf__input:focus { outline: 2px solid var(--blue-500); outline-offset: 1px; }
.nf__submit {
  font: 500 15px/1 var(--font-sans);
  color: var(--navy-800);
  background: transparent;
  border: 1px solid var(--sepia-400);
  border-radius: 4px;
  padding: 0 18px;
  cursor: pointer;
}
.nf__submit:hover { border-color: var(--navy-800); }
.nf__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}
.nf__links a {
  font: 500 15px/1.4 var(--font-sans);
  color: var(--navy-800);
  text-decoration: none;
}
.nf__links a:hover { color: var(--blue-500); }
.nf__links .arrow,
.nf__submit .arrow { font-family: var(--font-serif); }
