/* ════════════════════════════════════════════════════════════════
   himalaya-tirtha.org · index-pages.css
   Shared components for the three LIST / INDEX pages:
   Hridaya (library), Messages (garden), Other Teachings (archive).
   Builds on shared.css tokens — never redefines brand, header, footer.
   ════════════════════════════════════════════════════════════════ */

/* ─── Collection header strip (NOT a hero) ─────────────────────── */
.ix-head {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--sepia-400);
  background: var(--sepia-200);
}
.ix-head__inner {
  position: relative;
  z-index: 2;
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 56px 32px 48px;
}
@media (max-width: 720px) { .ix-head__inner { padding: 36px 20px 32px; } }

.ix-head__eyebrow {
  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 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.ix-head__eyebrow::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--blue-500);
}
.ix-head__title {
  font-size: 76px;
  line-height: 1;
  margin: 0 0 20px;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 14ch;
}
.ix-head__title em { font-style: italic; color: var(--navy-800); }
@media (max-width: 900px) { .ix-head__title { font-size: 52px; } }
@media (max-width: 540px) { .ix-head__title { font-size: 40px; } }

.ix-head__essence {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0 0 28px;
  max-width: 620px;
  font-variation-settings: "opsz" 24;
  text-wrap: pretty;
}
@media (max-width: 540px) { .ix-head__essence { font-size: 19px; } }

.ix-head__stat {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-700);
}
.ix-head__stat .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--navy-800);
}
.ix-head__stat .bar {
  position: relative;
  width: 200px; height: 5px;
  background: var(--sepia-400);
  border-radius: 100px;
  overflow: hidden;
}
.ix-head__stat .bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--navy-800);
  border-radius: 100px;
}
@media (max-width: 540px) { .ix-head__stat .bar { width: 120px; } }

/* idiom backdrops — restrained, set behind the inner content */
.ix-head__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.ix-head__art::after {
  /* fade the art into the strip so text stays legible */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--sepia-200) 28%, rgba(235,227,204,.72) 52%, rgba(235,227,204,.30) 100%);
}
@media (max-width: 720px) {
  .ix-head__art::after {
    background: linear-gradient(180deg, rgba(235,227,204,.55) 0%, var(--sepia-200) 78%);
  }
}
.ix-head__art img {
  position: absolute;
  top: 50%; right: 0;
  transform: translateY(-50%);
  width: 62%;
  min-width: 540px;
  opacity: 0.9;
}
@media (max-width: 720px) {
  .ix-head__art img { width: 130%; min-width: 0; right: -15%; opacity: 0.4; }
}

/* Hridaya: navy, sacred-geometric overlay line */
.ix-head--hridaya { background: var(--navy-900); }
.ix-head--hridaya .ix-head__art::after {
  background: linear-gradient(90deg, var(--navy-900) 26%, rgba(15,31,60,.74) 52%, rgba(15,31,60,.32) 100%);
}
@media (max-width: 720px) {
  .ix-head--hridaya .ix-head__art::after {
    background: linear-gradient(180deg, rgba(15,31,60,.45) 0%, var(--navy-900) 80%);
  }
}
.ix-head--hridaya .ix-head__title { color: var(--sepia-100); }
.ix-head--hridaya .ix-head__title em { color: var(--blue-400); }
.ix-head--hridaya .ix-head__essence { color: rgba(242,235,217,.82); }
.ix-head--hridaya .ix-head__eyebrow { color: var(--blue-400); }
.ix-head--hridaya .ix-head__eyebrow::before { background: var(--blue-400); }
.ix-head--hridaya .ix-head__stat { color: rgba(242,235,217,.78); }
.ix-head--hridaya .ix-head__stat .num { color: var(--sepia-100); }
.ix-head--hridaya .ix-head__stat .bar { background: rgba(242,235,217,.18); }
.ix-head--hridaya .ix-head__stat .bar span { background: var(--gold-500); }
.ix-head--hridaya { border-bottom-color: var(--navy-700); }

/* Other Teachings: warm scholarly */
.ix-head--other { background: var(--sepia-300); }
.ix-head--other .ix-head__art::after {
  background: linear-gradient(90deg, var(--sepia-300) 30%, rgba(229,219,194,.70) 54%, rgba(229,219,194,.22) 100%);
}

/* ─── Continue reading (Hridaya only) ──────────────────────────── */
.ix-resume {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--navy-900);
  color: var(--sepia-100);
  border-radius: 2px;
  padding: 24px 28px;
  margin: 40px 0 8px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.ix-resume::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gold-500);
}
.ix-resume__numeral {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 58px;
  line-height: 0.9;
  color: var(--sepia-100);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  text-align: center;
}
.ix-resume__numeral .label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-top: 8px;
}
.ix-resume__body { min-width: 0; }
.ix-resume__eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin: 0 0 8px;
}
.ix-resume__title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--sepia-100);
  text-wrap: pretty;
}
.ix-resume__progress {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ix-resume__bar {
  position: relative;
  flex: 1;
  max-width: 340px;
  height: 5px;
  background: rgba(242,235,217,.2);
  border-radius: 100px;
  overflow: hidden;
}
.ix-resume__bar span {
  position: absolute; inset: 0 auto 0 0;
  background: var(--gold-500);
  border-radius: 100px;
}
.ix-resume__pct {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(242,235,217,.8);
  font-variant-numeric: tabular-nums;
}
.ix-resume .btn--primary { background: var(--sepia-100); color: var(--navy-900); white-space: nowrap; }
.ix-resume .btn--primary:hover { background: var(--sepia-200); color: var(--navy-900); }
@media (max-width: 720px) {
  .ix-resume { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .ix-resume__numeral { display: flex; align-items: baseline; gap: 12px; font-size: 40px; text-align: left; }
  .ix-resume__numeral .label { margin-top: 0; }
}

/* ─── Draw a pearl (Messages only) ─────────────────────────────── */
.ix-draw {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: var(--navy-900);
  color: var(--sepia-100);
  border-radius: 2px;
  padding: 36px 40px;
  margin: 40px 0 8px;
  position: relative;
  overflow: hidden;
}
.ix-draw::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gold-500);
}
.ix-draw__lotus {
  position: absolute;
  right: -40px; bottom: -60px;
  font-size: 220px;
  line-height: 1;
  color: rgba(168,139,76,.14);
  font-family: var(--font-serif);
  pointer-events: none;
  user-select: none;
}
.ix-draw__body { position: relative; z-index: 2; }
.ix-draw__eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin: 0 0 10px;
}
.ix-draw h3 {
  font-family: var(--font-serif);
  font-size: 30px;
  margin: 0 0 8px;
  color: var(--sepia-100);
  line-height: 1.15;
}
.ix-draw p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: rgba(242,235,217,.82);
  margin: 0;
}
.ix-draw__actions {
  position: relative; z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.ix-draw .btn--primary { background: var(--sepia-100); color: var(--navy-900); white-space: nowrap; }
.ix-draw .btn--primary:hover { background: var(--sepia-200); color: var(--navy-900); }
.ix-draw__incl {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(242,235,217,.72);
  cursor: pointer;
  user-select: none;
}
.ix-draw__incl input { position: absolute; opacity: 0; width: 0; height: 0; }
.ix-draw__incl .box {
  width: 16px; height: 16px;
  border: 1px solid rgba(242,235,217,.5);
  border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 160ms ease, border-color 160ms ease;
}
.ix-draw__incl .box svg { width: 11px; height: 11px; stroke: var(--navy-900); fill: none; stroke-width: 2.4; opacity: 0; }
.ix-draw__incl input:checked + .box { background: var(--gold-500); border-color: var(--gold-500); }
.ix-draw__incl input:checked + .box svg { opacity: 1; }
.ix-draw__incl input:focus-visible + .box { outline: 2px solid var(--blue-400); outline-offset: 2px; }
@media (max-width: 640px) {
  .ix-draw { grid-template-columns: 1fr; padding: 28px 24px; gap: 22px; }
  .ix-draw__actions { align-items: stretch; }
  .ix-draw__actions .btn { width: 100%; }
  .ix-draw__incl { justify-content: center; }
}

/* ─── Newly translated strip ───────────────────────────────────── */
.ix-fresh { margin: 48px 0 8px; }
.ix-fresh__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}
.ix-fresh__head h2 {
  font-size: 24px;
  margin: 0;
  font-weight: 500;
}
.ix-fresh__head .tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-500);
}
.ix-fresh__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.ix-fresh__rail > * { scroll-snap-align: start; }

/* ─── Sticky toolbar (search + filters) ────────────────────────── */
.ix-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 4px;
  margin: 28px 0 4px;
  border-top: 1px solid var(--sepia-300);
}
@media (max-width: 720px) { .ix-toolbar { gap: 12px; } }

.ix-search {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
}
.ix-search__icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-500);
  pointer-events: none;
}
.ix-search__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ix-search input {
  width: 100%;
  height: 46px;
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  border-radius: 2px;
  padding: 0 16px 0 42px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-900);
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.ix-search input::placeholder { color: var(--ink-500); }
.ix-search input:focus { border-color: var(--blue-500); background: var(--sepia-100); }

.ix-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ix-control select {
  appearance: none;
  -webkit-appearance: none;
  height: 46px;
  background: var(--sepia-100);
  border: 1px solid var(--sepia-400);
  border-radius: 2px;
  padding: 0 38px 0 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-900);
  cursor: pointer;
  outline: none;
  transition: border-color 160ms ease;
}
.ix-control select:focus { border-color: var(--blue-500); }
.ix-control::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--ink-700);
  border-bottom: 1.5px solid var(--ink-700);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

/* English-only toggle */
.ix-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ix-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ix-switch__track {
  width: 40px; height: 23px;
  background: var(--sepia-400);
  border-radius: 100px;
  position: relative;
  transition: background 180ms ease;
  flex-shrink: 0;
}
.ix-switch__track::after {
  content: "";
  position: absolute;
  top: 2.5px; left: 2.5px;
  width: 18px; height: 18px;
  background: var(--sepia-100);
  border-radius: 50%;
  transition: transform 200ms cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 3px rgba(15,31,60,.3);
}
.ix-switch input:checked + .ix-switch__track { background: var(--navy-800); }
.ix-switch input:checked + .ix-switch__track::after { transform: translateX(17px); }
.ix-switch input:focus-visible + .ix-switch__track { outline: 2px solid var(--blue-500); outline-offset: 2px; }

/* tag-constellation chips (optional, hidden when no tags) */
.ix-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-basis: 100%;
  padding-top: 4px;
}
.ix-tags[hidden] { display: none; }
.ix-tag {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-700);
  background: transparent;
  border: 1px solid var(--sepia-400);
  padding: 7px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.ix-tag:hover { border-color: var(--navy-800); color: var(--navy-800); }
.ix-tag.is-active { background: var(--navy-800); color: var(--sepia-100); border-color: var(--navy-800); }

/* ─── Index layout: jump rail + grid ───────────────────────────── */
.ix-layout {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 40px;
  margin: 24px 0 48px;
  align-items: start;
}
@media (max-width: 900px) { .ix-layout { grid-template-columns: 1fr; gap: 0; } }

/* Desktop vertical rail */
.ix-rail {
  position: sticky;
  top: 168px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (max-width: 900px) { .ix-rail { display: none; } }
.ix-rail__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 12px 14px;
}
.ix-rail__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-500);
  text-decoration: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
  background: none;
  border-top: 0; border-right: 0; border-bottom: 0;
  text-align: left;
}
.ix-rail__item:hover { color: var(--navy-800); }
.ix-rail__item.is-active {
  color: var(--navy-900);
  border-left-color: var(--navy-800);
  font-weight: 600;
}
.ix-rail__item .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sepia-400);
  flex-shrink: 0;
  transition: background 160ms ease;
}
.ix-rail__item.is-active .dot { background: var(--gold-500); }

/* Mobile jump bar — pinned chip row */
.ix-railmobile {
  display: none;
}
@media (max-width: 900px) {
  .ix-railmobile {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    margin: 8px 0 20px;
    position: sticky;
    top: 134px;
    z-index: 25;
    background: var(--sepia-100);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ix-railmobile::-webkit-scrollbar { display: none; }
}
@media (max-width: 720px) { .ix-railmobile { top: 116px; } }
.ix-railmobile__chip {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-700);
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
}
.ix-railmobile__chip.is-active {
  background: var(--navy-800);
  color: var(--sepia-100);
  border-color: var(--navy-800);
}

/* ─── Bucket sections & dividers ───────────────────────────────── */
.ix-bucket { scroll-margin-top: 180px; margin-bottom: 8px; }
@media (max-width: 900px) { .ix-bucket { scroll-margin-top: 200px; } }
.ix-bucket__divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 36px 0 22px;
}
.ix-bucket:first-child .ix-bucket__divider { margin-top: 8px; }
.ix-bucket__range {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--navy-900);
  font-variation-settings: "opsz" 36;
  letter-spacing: 0.01em;
}
.ix-bucket__range .of {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  margin-left: 10px;
}
.ix-bucket__line { flex: 1; height: 1px; background: var(--sepia-400); }

/* ─── Lesson grids ─────────────────────────────────────────────── */
.ix-grid-sutra {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 760px) { .ix-grid-sutra { grid-template-columns: 1fr; } }

.ix-grid-pearl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .ix-grid-pearl { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ix-grid-pearl { grid-template-columns: 1fr; } }

/* the fresh strip keeps its own compact card width */
.ix-fresh__rail.ix-grid-sutra,
.ix-fresh__rail.ix-grid-pearl { display: grid; grid-template-columns: none; }

.ix-empty {
  padding: 64px 0 80px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-500);
}
.ix-empty .om { display: block; font-size: 26px; color: var(--gold-500); margin-bottom: 10px; font-style: normal; }

/* ═══ HEAVY sutra card (Hridaya) — numeral signature ═══ */
.sutra-card {
  display: flex;
  flex-direction: column;
  background: var(--sepia-100);
  border: 1px solid var(--sepia-300);
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, box-shadow 220ms ease, border-color 200ms ease;
}
a.sutra-card:hover {
  transform: translateY(-3px);
  border-color: var(--navy-800);
  box-shadow: 0 18px 38px -24px rgba(26,45,92,.4);
}
.sutra-card__plate {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--navy-900);
  overflow: hidden;
}
.sutra-card__plate img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.sutra-card__plate::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,31,60,.15) 0%, rgba(15,31,60,0) 38%, rgba(15,31,60,.82) 100%);
}
.sutra-card__marker {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--blue-500); z-index: 3;
}
.sutra-card__numeral {
  position: absolute;
  bottom: 14px; left: 22px;
  z-index: 3;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 62px;
  line-height: 0.86;
  color: var(--sepia-100);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  text-shadow: 0 2px 14px rgba(15,31,60,.6);
}
.sutra-card__corner {
  position: absolute;
  bottom: 16px; right: 18px;
  z-index: 3;
  text-align: right;
}
.sutra-card__corner .k {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242,235,217,.6);
  margin-bottom: 2px;
}
.sutra-card__corner .v {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: rgba(242,235,217,.92);
}
.sutra-card__body {
  padding: 22px 24px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sutra-card__title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 6px;
  color: var(--ink-900);
  letter-spacing: -0.004em;
  text-wrap: pretty;
}
a.sutra-card:hover .sutra-card__title { color: var(--navy-800); }
.sutra-card__sanskrit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-500);
  margin: 0 0 12px;
}
.sutra-card__teaser {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.sutra-card__foot {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--sepia-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-500);
}
.sutra-card__read {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--navy-800); font-weight: 500;
}
.sutra-card__read .arrow { font-family: var(--font-serif); font-size: 15px; transition: transform 220ms ease; }
a.sutra-card:hover .sutra-card__read .arrow { transform: translateX(4px); }

/* In-translation sutra state */
.sutra-card.is-untranslated {
  background: var(--sepia-200);
  border-style: dashed;
  border-color: var(--sepia-400);
  cursor: default;
}
.sutra-card.is-untranslated .sutra-card__plate {
  background: var(--sepia-300);
  aspect-ratio: 16/10;
}
.sutra-card.is-untranslated .sutra-card__plate::after { content: none; }
.sutra-card.is-untranslated .sutra-card__marker { background: var(--sepia-400); }
.sutra-card.is-untranslated .sutra-card__numeral {
  color: var(--sepia-400);
  text-shadow: none;
  opacity: 0.9;
}
.sutra-card.is-untranslated .sutra-card__title { color: var(--ink-500); font-style: italic; font-weight: 400; }

/* ═══ LIGHT pearl card (Messages) ═══ */
.pearl-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0;
  background: var(--sepia-100);
  border: 1px solid var(--sepia-300);
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 200ms ease, border-color 180ms ease;
}
a.pearl-card:hover {
  transform: translateY(-2px);
  border-color: var(--navy-800);
  box-shadow: 0 14px 30px -22px rgba(26,45,92,.38);
}
.pearl-card__num {
  position: relative;
  background:
    radial-gradient(120% 90% at 30% 20%, #F8EFD7 0%, #EFE2C2 45%, #DCC9A0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--sepia-300);
}
.pearl-card__num::before {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(123,171,230,.5), rgba(168,139,76,.35) 60%, transparent 75%);
  top: 12px;
}
.pearl-card__num .n {
  position: relative;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--navy-800);
  font-variation-settings: "opsz" 24;
  letter-spacing: -0.01em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0.04em;
}
.pearl-card__body {
  padding: 16px 18px 15px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pearl-card__badge {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pearl-card__badge .pip { width: 4px; height: 4px; border-radius: 50%; background: var(--blue-500); }
.pearl-card__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.24;
  margin: 0 0 12px;
  color: var(--ink-900);
  text-wrap: pretty;
  letter-spacing: -0.003em;
}
a.pearl-card:hover .pearl-card__title { color: var(--navy-800); }
.pearl-card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-500);
}
.pearl-card__read {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--navy-800); font-weight: 500;
}
.pearl-card__read .arrow { font-family: var(--font-serif); font-size: 14px; transition: transform 200ms ease; }
a.pearl-card:hover .pearl-card__read .arrow { transform: translateX(3px); }

/* read state — subtle check + gentle dim */
.pearl-card.is-read { opacity: 0.66; }
.pearl-card.is-read .pearl-card__num::after {
  content: "";
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--success);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat;
  background-color: var(--success);
}
.pearl-card.is-read:hover { opacity: 0.85; }

/* In-translation pearl state */
.pearl-card.is-untranslated {
  background: var(--sepia-200);
  border-style: dashed;
  border-color: var(--sepia-400);
  cursor: default;
}
.pearl-card.is-untranslated .pearl-card__num {
  background: var(--sepia-300);
}
.pearl-card.is-untranslated .pearl-card__num::before { content: none; }
.pearl-card.is-untranslated .pearl-card__num .n { color: var(--sepia-400); }
.pearl-card.is-untranslated .pearl-card__title { color: var(--ink-500); font-style: italic; font-weight: 400; }

/* shared "In translation" label */
.ix-pending {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ix-pending::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
}

/* ─── Messages: image-led PMH cards (reuse shared .pmh-card) ───── */
.ix-grid-pearl .pmh-card__image,
.ix-fresh__rail .pmh-card__image { position: relative; }
.pmh-card__check {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--success); color: var(--sepia-100);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(15,31,60,.4);
}
.pmh-card__check svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.pmh-card__readtag {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 9px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--success);
}
.pmh-card.is-read { opacity: 0.74; }
.pmh-card.is-read:hover { opacity: 1; }
.pmh-card.is-read .pmh-card__image img { filter: saturate(0.82); }

/* ─── Bottom note / scale hint ─────────────────────────────────── */
.ix-foot-note {
  text-align: center;
  max-width: 560px;
  margin: 40px auto 96px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-700);
}
.ix-foot-note .om { display: block; font-size: 24px; color: var(--gold-500); margin-bottom: 10px; font-style: normal; }

/* ════════════════════════════════════════════════════════════════
   OTHER TEACHINGS — editorial archive rows
   ════════════════════════════════════════════════════════════════ */
.ix-archive { margin: 8px 0 48px; }
.ix-row {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--sepia-300);
  text-decoration: none;
  color: inherit;
  transition: background 180ms ease;
}
.ix-row:first-child { border-top: 1px solid var(--sepia-300); }
.ix-row:hover { background: var(--sepia-200); }
.ix-row__thumb {
  aspect-ratio: 4/3;
  background: var(--sepia-300);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.ix-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ix-row__main { min-width: 0; }
.ix-row__kind {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 12px;
}
.ix-row__kind .sep { width: 1px; height: 11px; background: var(--sepia-400); }
.ix-row__kind .author { color: var(--ink-500); }
.ix-row__title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--ink-900);
  letter-spacing: -0.006em;
  text-wrap: pretty;
}
.ix-row:hover .ix-row__title { color: var(--navy-800); }
.ix-row__dek {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0;
  max-width: 62ch;
  text-wrap: pretty;
}
.ix-row__aside {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-top: 2px;
}
.ix-row__date {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ix-row__read {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-800);
  white-space: nowrap;
}
.ix-row__read .arrow { font-family: var(--font-serif); font-size: 16px; transition: transform 220ms ease; }
.ix-row:hover .ix-row__read .arrow { transform: translateX(4px); }
@media (max-width: 820px) {
  .ix-row { grid-template-columns: 96px 1fr; gap: 20px; }
  .ix-row__title { font-size: 23px; }
  .ix-row__dek { font-size: 16px; }
  .ix-row__aside {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding-top: 6px;
  }
}
@media (max-width: 540px) {
  .ix-row { grid-template-columns: 1fr; }
  .ix-row__thumb { aspect-ratio: 16/9; }
  .ix-row__aside { grid-column: 1; }
}

/* filter row for Other Teachings (non-sticky, simpler) */
.ix-archive-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 28px 0 4px;
  margin-bottom: 8px;
}

/* Other Teachings — read-state marker + thumbnail-free layout */
.ix-archive--noimg .ix-row { grid-template-columns: 1fr auto; align-items: center; }
.ix-archive--noimg .ix-row__aside { flex-direction: column; align-items: flex-end; gap: 12px; }
.ix-row__marker {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--sepia-400);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 160ms ease, border-color 160ms ease;
}
.ix-row__marker svg { width: 12px; height: 12px; stroke: var(--sepia-100); fill: none; stroke-width: 2.6; }
.ix-row__marker.is-read { background: var(--success); border-color: var(--success); }
.ix-row.is-read .ix-row__title { color: var(--ink-500); }
.ix-row.is-read:hover .ix-row__title { color: var(--navy-800); }
.ix-row.is-read .ix-row__dek { color: var(--ink-500); }
@media (max-width: 600px) {
  .ix-archive--noimg .ix-row { grid-template-columns: 1fr; }
  .ix-archive--noimg .ix-row__aside {
    grid-column: 1; flex-direction: row; align-items: center;
    justify-content: space-between; width: 100%; padding-top: 6px;
  }
}

/* ════════════════════════════════════════════════════════════════
   TYPOGRAPHIC LIBRARY — Hridaya + Messages indexes (v3 rebuild)
   A beautifully typeset table of contents. The lesson NUMERAL is the
   visual anchor; read-state is the spine. No hero, no per-row imagery.
   ════════════════════════════════════════════════════════════════ */

/* ─── Compact text header (no hero, no image) ──────────────────── */
.lib-head { background: var(--sepia-200); margin-top: -100px; padding-top: 100px; }
.lib-head__inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 46px 32px 40px;
}
@media (max-width: 720px) { .lib-head__inner { padding: 34px 20px 30px; } }
.lib-head__eyebrow {
  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 16px;
  display: inline-flex; align-items: center; gap: 12px;
}
.lib-head__eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.lib-head__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0 0 18px;
  font-variation-settings: "opsz" 96;
  max-width: 34ch;
}
.lib-head__title em { font-style: italic; color: var(--navy-800); }
@media (max-width: 720px) { .lib-head__title { font-size: 38px; } }
.lib-head__essence {
  font-family: var(--font-serif);
  font-size: 21px; line-height: 1.5;
  color: var(--ink-700);
  margin: 0 0 22px;
  max-width: 58ch;
  text-wrap: pretty;
}
@media (max-width: 540px) { .lib-head__essence { font-size: 18px; } }
.lib-head__scope {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-sans);
  font-size: 13px; line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink-500);
}
.lib-head__scope strong { font-weight: 600; color: var(--navy-800); }
.lib-head__scope .bar {
  position: relative;
  width: 120px; height: 4px;
  background: var(--sepia-400);
  border-radius: 100px; overflow: hidden;
  flex-shrink: 0;
}
.lib-head__scope .bar span {
  position: absolute; inset: 0 auto 0 0;
  background: var(--navy-800); border-radius: 100px;
}

/* Hridaya keeps its navy library identity (image removed, colour kept) */
.lib-head--navy { background: var(--navy-900); border-bottom-color: var(--navy-700); }
.lib-head--navy .lib-head__title { color: var(--sepia-100); }
.lib-head--navy .lib-head__title em { color: var(--blue-400); }
.lib-head--navy .lib-head__essence { color: rgba(242,235,217,.82); }
.lib-head--navy .lib-head__eyebrow { color: var(--blue-400); }
.lib-head--navy .lib-head__scope { color: rgba(242,235,217,.66); }
.lib-head--navy .lib-head__scope strong { color: var(--sepia-100); }
.lib-head--navy .lib-head__scope .bar { background: rgba(242,235,217,.18); }
.lib-head--navy .lib-head__scope .bar span { background: var(--gold-500); }

/* ── Nagłówek dwukolumnowy: opis 2/3 + panel prowadzący 1/3.
   Tylko gdy nagłówek ma panel (archiwa); search bez panelu zostaje blokowy. ── */
.lib-head__inner:has(.lib-panel) {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 56px;
  align-items: start;
}
.lib-head__lead { min-width: 0; }
.lib-head__lead .lib-head__essence:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .lib-head__inner:has(.lib-panel) { grid-template-columns: 1fr; gap: 30px; }
}

/* Panel prowadzący — delikatny, na tle sepii (nie granatowy box) */
.lib-panel {
  align-self: start;
  margin-top: 20px;
  padding: 22px 24px 24px;
  border: 1px solid var(--sepia-400);
  border-radius: 5px;
}
.lib-panel__eyebrow {
  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;
}
.lib-panel__text {
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.45;
  color: var(--ink-700);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.lib-panel__title {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500; font-size: 21px; line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy-800);
  text-decoration: none;
  margin: 0 0 14px;
  transition: color 160ms ease;
}
.lib-panel__title:hover { color: var(--blue-500); }
.lib-panel__bar {
  height: 3px; border-radius: 100px;
  background: var(--sepia-400);
  overflow: hidden;
  margin: 0 0 16px;
}
.lib-panel__bar span {
  display: block; height: 100%;
  background: var(--blue-500); border-radius: 100px;
}
.lib-panel__link {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--blue-500);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.lib-panel__link .arrow { transition: transform 160ms ease; }
.lib-panel__link:hover .arrow { transform: translateX(3px); }

/* ─── Newly translated (Hridaya) — small TEXT rows, not cards ──── */
.lib-fresh { max-width: none; margin: 36px 0 4px; }
.lib-fresh__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 6px;
}
.lib-fresh__rows { display: flex; flex-direction: column; }
.lib-fresh__row {
  display: flex; align-items: baseline; gap: 16px;
  padding: 10px 8px; margin: 0 -8px;
  text-decoration: none; color: inherit;
  border-bottom: 1px dotted var(--sepia-400);
  border-radius: 2px;
  transition: background 160ms ease;
}
.lib-fresh__row:last-child { border-bottom: 0; }
.lib-fresh__row:hover { background: var(--sepia-100); }
.lib-fresh__num {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 19px; color: var(--navy-800);
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
  flex: 0 0 auto; min-width: 38px;
}
.lib-fresh__title {
  font-family: var(--font-serif); font-size: 17px;
  color: var(--ink-900); line-height: 1.3; min-width: 0;
}
.lib-fresh__row:hover .lib-fresh__title { color: var(--navy-800); }
.lib-fresh__date {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--font-sans); font-size: 12px;
  color: var(--ink-500); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 540px) { .lib-fresh__date { display: none; } }

/* ─── Library wrapper + controls ───────────────────────────────── */
.lib { max-width: none; margin: 52px 0 0; }
.lib-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin: 34px 0 0;
  padding-bottom: 4px;
}
.lib-controls__count {
  font-family: var(--font-sans);
  font-size: 13.5px; letter-spacing: 0.02em;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.lib-controls__count strong { color: var(--navy-800); font-weight: 600; }

/* ─── Group (series / mandala) ─────────────────────────────────── */
.lib-group { margin: 0 0 10px; }
.lib-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 36px 0 14px;
  border-bottom: 1px solid var(--sepia-400);
}
.lib-group__roman {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 22px; color: var(--gold-500);
  font-variation-settings: "opsz" 36;
  line-height: 1; letter-spacing: 0.06em;
}
.lib-group__name {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 25px; line-height: 1.14;
  margin: 0; color: var(--navy-900);
  letter-spacing: -0.008em;
}
.lib-group__blurb {
  font-family: var(--font-serif); font-style: italic;
  font-size: 15.5px; line-height: 1.45;
  color: var(--ink-700); margin: 0;
  max-width: 54ch; text-wrap: pretty;
}
.lib-group__prog {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--ink-500);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.lib-group__prog .done { color: var(--success); }
@media (max-width: 600px) {
  .lib-group__name { font-size: 22px; }
}

/* ─── Lesson rows ──────────────────────────────────────────────── */
.lib-rows { display: flex; flex-direction: column; }
.lib-row {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr auto 24px;
  grid-template-areas: "num main token marker";
  gap: 22px;
  align-items: center;
  padding: 18px 12px;
  margin: 0 -12px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--sepia-300);
  border-radius: 2px;
  transition: background 160ms ease;
}
.lib-row:hover { background: var(--sepia-200); }
.lib-row__num {
  grid-area: num;
  font-family: var(--font-serif); font-weight: 500;
  font-size: 34px; line-height: 1;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 60;
  transition: color 160ms ease;
}
.lib-row__main { grid-area: main; min-width: 0; }
.lib-row__title {
  display: block;
  font-family: var(--font-serif); font-weight: 500;
  font-size: 20px; line-height: 1.25;
  color: var(--ink-900); letter-spacing: -0.004em;
  text-wrap: pretty;
  transition: color 160ms ease;
}
.lib-row:hover .lib-row__title { color: var(--navy-800); }
.lib-row__sanskrit {
  display: block;
  font-family: var(--font-serif); font-style: italic;
  font-size: 14px; color: var(--ink-500);
  margin-top: 3px;
}
.lib-row__token {
  grid-area: token;
  font-family: var(--font-sans);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-500); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lib-row__marker {
  grid-area: marker;
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--sepia-400);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; justify-self: end;
  transition: background 160ms ease, border-color 160ms ease;
}
.lib-row__marker svg { width: 12px; height: 12px; stroke: var(--sepia-100); fill: none; stroke-width: 2.6; }
.lib-row__arrow {
  position: absolute; top: 50%; right: 42px;
  transform: translate(-5px, -50%);
  font-family: var(--font-serif); font-size: 18px;
  color: var(--navy-800);
  opacity: 0; pointer-events: none;
  transition: transform 200ms ease, opacity 180ms ease;
}
.lib-row:hover .lib-row__arrow { opacity: 1; transform: translate(0, -50%); }
.lib-row__sliver {
  position: absolute; left: 0; bottom: -1px;
  height: 2px; background: var(--gold-500);
  border-radius: 0 2px 2px 0;
}

/* read state — settles back: dim numeral + title, filled check */
.lib-row.is-read .lib-row__num { color: var(--sepia-400); }
.lib-row.is-read .lib-row__title { color: var(--ink-500); font-weight: 400; }
.lib-row.is-read:hover .lib-row__title { color: var(--navy-800); }
.lib-row.is-read .lib-row__marker { background: var(--success); border-color: var(--success); }

/* in-progress — gold dot + bottom sliver */
.lib-row.is-progress .lib-row__marker { border-color: var(--gold-500); }
.lib-row.is-progress .lib-row__marker::after {
  content: ""; width: 8px; height: 8px;
  border-radius: 50%; background: var(--gold-500);
}

/* hide-read toggle behaviour */
.lib.is-hiding-read .lib-row.is-read { display: none; }
.lib.is-hiding-read .lib-group.is-allread { display: none; }

.lib-allclear {
  text-align: center;
  max-width: 460px; margin: 40px auto 8px;
  font-family: var(--font-serif); font-style: italic;
  font-size: 18px; line-height: 1.5; color: var(--ink-700);
}
.lib-allclear .om { display: block; font-size: 24px; color: var(--gold-500); margin-bottom: 8px; font-style: normal; }

@media (max-width: 600px) {
  .lib-row {
    grid-template-columns: 50px 1fr 24px;
    grid-template-areas: "num main marker" "num token marker";
    column-gap: 16px; row-gap: 2px;
  }
  .lib-row__num { font-size: 28px; align-self: center; }
  .lib-row__title { font-size: 18px; }
  .lib-row__token { justify-self: start; }
  .lib-row__arrow { display: none; }
}

/* continue / draw strips run the full container width */
.ix-resume--flat { grid-template-columns: 1fr auto; }
@media (max-width: 720px) { .ix-resume--flat { grid-template-columns: 1fr; } }

/* Other Teachings has no numeral — anchor the Resume box with the lineage glyph */
.ix-resume__numeral--glyph {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1;
  color: var(--gold-500);
}
.ix-resume__numeral--glyph .label { color: var(--blue-400); }

/* flat rows (Other Teachings — no numeral, date as token) */
.lib-row--flat {
  grid-template-columns: 1fr auto 24px;
  grid-template-areas: "main token marker";
}
.lib-row--flat .lib-row__token { text-transform: none; letter-spacing: 0.02em; font-size: 13px; }
@media (max-width: 600px) {
  .lib-row--flat {
    grid-template-columns: 1fr 24px;
    grid-template-areas: "main marker" "token marker";
  }
}

/* ═══════════════════════════════════════════════════════════════
   Wyniki wyszukiwania (search.php)
   ═══════════════════════════════════════════════════════════════ */
.search-main { padding-top: 38px; padding-bottom: 48px; }
.search-results { width: 100%; }
.search-result { padding: 18px 0; }
.search-result__badge {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-500);
}
.search-result__badge .pip { width: 5px; height: 5px; background: var(--blue-400); border-radius: 50%; }
.search-result__title {
  font-family: var(--font-serif); font-weight: 600; font-size: 26px;
  line-height: 1.15; margin: 0 0 8px;
}
.search-result__title a {
  color: var(--ink-900); text-decoration: none;
  display: inline-block;
  transition: color 160ms ease;
}
.search-result__title a:hover {
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.search-result__snippet {
  font-family: var(--font-serif); font-size: 17px; line-height: 1.55;
  color: var(--ink-700); margin: 0 0 10px; max-width: 62ch;
}
.search-result__meta {
  margin: 0;
  font-family: var(--font-sans); font-size: 13px; color: var(--ink-500);
}

.search-empty { max-width: 620px; padding: 12px 0 48px; font-family: var(--font-serif); }
.search-empty__lead { font-size: 24px; color: var(--ink-900); margin: 0 0 8px; }
.search-empty p { font-size: 18px; color: var(--ink-700); margin: 0 0 6px; }
.search-empty__links { list-style: none; padding: 0; margin: 20px 0 0; }
.search-empty__links li { margin: 0 0 12px; }
.search-empty__links a {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--navy-800); text-decoration: none;
}
.search-empty__links a .arrow { display: inline-block; transition: transform 220ms ease; }
.search-empty__links a:hover .arrow { transform: translateX(4px); }

/* ═══════════════════════════════════════════════════════════════
   Biblioteka okładek (archive.php) — serie, karty, continue, losowa
   ═══════════════════════════════════════════════════════════════ */
.ix-series { margin: 0 0 76px; }
.ix-series__head { margin: 0 0 22px; }
.ix-series__label {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-500);
}
.ix-series__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 28px; }
@media (max-width: 1100px) { .ix-series__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .ix-series__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 18px; } }

.ix-card { display: block; text-decoration: none; color: inherit; }
.ix-card__cover {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3; border-radius: 3px;
  border: 1px solid var(--sepia-300); background: var(--sepia-200);
  margin: 0 0 14px;
}
.ix-card__cover img,
.ix-card__cover .placeholder {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}
.ix-card:hover .ix-card__cover img { transform: scale(1.05); }

/* pasek postępu — cienka linia u góry okładki */
.ix-card__bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 3; }
.ix-card__bar > span { display: block; height: 100%; width: 0; background: var(--blue-500); }
.ix-card.is-read .ix-card__bar > span { width: 100%; background: var(--gold-500); }

/* NEW */
.ix-card__flag {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  font-family: var(--font-sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--sepia-100);
  background: var(--navy-800); padding: 4px 8px; border-radius: 2px;
}

/* przeczytane — tick */
.ix-card__check {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%; background: var(--gold-500);
  display: none; align-items: center; justify-content: center;
}
.ix-card.is-read .ix-card__check { display: flex; }
.ix-card.is-read .ix-card__flag { display: none; }
.ix-card__check svg { width: 15px; height: 15px; fill: none; stroke: var(--sepia-100); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* stopka karty */
.ix-card__num {
  display: block; font-family: var(--font-serif); font-size: 15px;
  color: var(--sepia-400); margin: 0 0 4px; letter-spacing: 0.02em;
}
.ix-card__title {
  display: block; font-family: var(--font-serif); font-weight: 600;
  font-size: 21px; line-height: 1.18; color: var(--ink-900); margin: 0 0 6px;
  transition: color 160ms ease;
}
.ix-card:hover .ix-card__title {
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.ix-card.is-read .ix-card__title { color: var(--ink-700); }
.ix-card.is-read:hover .ix-card__title { color: var(--blue-500); }
.ix-card__mins { display: block; font-family: var(--font-sans); font-size: 13px; color: var(--ink-500); }

/* prowadzenie — continue albo losowanie (jeden lekki link) */
.ix-lead { margin: 44px 0 40px; }
.ix-lead__link {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--navy-800); text-decoration: none;
}
.ix-lead__title { font-weight: 600; }
.ix-lead__pct { color: var(--ink-500); font-weight: 400; }
.ix-lead__link .arrow { display: inline-block; transition: transform 220ms ease; }
.ix-lead__link:hover .arrow { transform: translateX(4px); }

/* continue reading — lekki panel */
.ix-resume {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  text-decoration: none; color: inherit;
  padding: 22px 26px; margin: 8px 0 40px;
  border: 1px solid var(--sepia-300); border-radius: 8px;
  transition: border-color 160ms ease, background 160ms ease;
}
.ix-resume:hover { border-color: var(--sepia-400); background: var(--sepia-200); }
.ix-resume__body { display: flex; flex-direction: column; gap: 5px; }
.ix-resume__eyebrow {
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-500);
}
.ix-resume__title { font-family: var(--font-serif); font-weight: 600; font-size: 22px; color: var(--ink-900); line-height: 1.15; }
.ix-resume__meta { font-family: var(--font-sans); font-size: 13px; color: var(--ink-500); }
.ix-resume__cta { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--navy-800); white-space: nowrap; }
.ix-resume__cta .arrow { display: inline-block; transition: transform 220ms ease; }
.ix-resume:hover .ix-resume__cta .arrow { transform: translateX(4px); }
@media (max-width: 600px) { .ix-resume { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* reset postępu — lekki link (jak „continue"), do lewej */
.ix-reset { margin: 40px 0 0; }
.ix-reset__btn {
  background: none; border: 0; cursor: pointer; padding: 0;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--navy-800); text-decoration: none;
}
.ix-reset__btn .arrow { display: inline-block; transition: transform 220ms ease; }
.ix-reset__btn:hover .arrow { transform: translateX(4px); }
