/* =============================================================================
   Тихая молитва — design system
   Palette: deep navy, antique gold, warm ivory. Mobile-first.
   Fonts: Cormorant Garamond (display), PT Serif (prayer text), Golos Text (UI).
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --navy-950: #080e18;
  --navy-900: #0c1526;
  --navy-850: #101b30;
  --navy-800: #16233c;
  --navy-700: #1e2f4d;
  --navy-600: #2b3f63;

  --gold-700: #8a6a2f;
  --gold-600: #a9863f;
  --gold-500: #c29b4e;
  --gold-400: #d4b16d;
  --gold-300: #e4c894;
  --gold-200: #f0dfbd;

  --ivory-50: #fdfbf6;
  --ivory-100: #f8f3e9;
  --ivory-200: #f0e8d8;
  --ivory-300: #e3d8c2;

  --ink-900: #141c29;
  --ink-700: #2b3546;
  --ink-500: #4d586b;
  --ink-400: #6e7a8f;

  --paper: var(--ivory-50);
  --card: #fffdf9;
  --line: #e7decd;
  --line-soft: #efe8da;

  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", "PT Serif", Georgia, serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1160px;
  --read: 760px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(20, 28, 41, 0.05), 0 2px 8px rgba(20, 28, 41, 0.04);
  --shadow-md: 0 8px 30px -12px rgba(20, 28, 41, 0.18), 0 2px 6px rgba(20, 28, 41, 0.05);
  --shadow-lg: 0 30px 70px -30px rgba(8, 14, 24, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--gold-300); color: var(--navy-900); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--navy-900);
  color: var(--ivory-100);
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

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

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tight { padding-block: clamp(36px, 5vw, 60px); }
.section--alt { background: linear-gradient(180deg, var(--ivory-100), var(--ivory-50)); }

.section__head { margin-bottom: clamp(24px, 3vw, 40px); }
.section__head--center { text-align: center; }

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.section__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

.section__lead {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--ink-500);
  font-size: 1.02rem;
}

.section__head--center .section__lead { margin-inline: auto; }

/* thin ornamental rule */
.rule {
  width: 56px;
  height: 1px;
  margin: 20px 0 0;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-200));
}
.section__head--center .rule { margin-inline: auto; }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 21, 38, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(212, 177, 109, 0.16);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory-100);
  flex-shrink: 0;
}

.brand__mark { width: 26px; height: 26px; color: var(--gold-400); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand__tag {
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(240, 223, 189, 0.55);
}

.nav { display: none; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 500;
  color: rgba(248, 243, 233, 0.78);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}

.nav__link:hover { color: var(--ivory-50); background: rgba(212, 177, 109, 0.1); }

.nav__link[aria-current="page"] {
  color: var(--gold-300);
  background: rgba(212, 177, 109, 0.13);
}

.header__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(212, 177, 109, 0.28);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory-100);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--gold-400);
  background: rgba(212, 177, 109, 0.12);
}

.icon-btn svg { width: 18px; height: 18px; }

.menu-toggle { display: inline-grid; }

.nav--open { display: block; }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 20px 40px;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-950));
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.drawer.is-open { opacity: 1; visibility: visible; transform: none; }

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 4px;
  border-bottom: 1px solid rgba(212, 177, 109, 0.14);
  color: var(--ivory-100);
  font-family: var(--display);
  font-size: 1.35rem;
}

.drawer__link span { font-family: var(--sans); font-size: 0.78rem; color: rgba(240, 223, 189, 0.5); }

.drawer__link:active { color: var(--gold-300); }

body.is-locked { overflow: hidden; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(520px, 84svh, 780px);
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  overflow: hidden;
  color: var(--ivory-100);
  isolation: isolate;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__media img {
  object-fit: cover;
  object-position: 50% 42%;
  filter: saturate(1.1) contrast(1.12) brightness(0.94);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(95deg, rgba(8, 14, 24, 0.95) 0%, rgba(8, 14, 24, 0.88) 24%, rgba(8, 14, 24, 0.6) 46%, rgba(8, 14, 24, 0.24) 70%, rgba(8, 14, 24, 0.4) 100%),
    linear-gradient(to top, rgba(8, 14, 24, 0.95) 0%, rgba(8, 14, 24, 0.42) 24%, transparent 52%),
    linear-gradient(rgba(11, 20, 36, 0.2), rgba(11, 20, 36, 0.2));
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(40px, 7vw, 72px);
}

.hero__body { max-width: 700px; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-400);
}

.hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.9rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 40px rgba(8, 14, 24, 0.5);
}

.hero__lead {
  margin-top: 18px;
  max-width: 54ch;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.6;
  color: rgba(248, 243, 233, 0.84);
}

/* ---------- search ---------- */
.search {
  margin-top: 28px;
  max-width: 620px;
}

.search__field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(212, 177, 109, 0.42);
  border-radius: 999px;
  background: rgba(12, 21, 38, 0.55);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.search__field:focus-within {
  border-color: var(--gold-400);
  background: rgba(12, 21, 38, 0.78);
  box-shadow: 0 0 0 4px rgba(212, 177, 109, 0.12);
}

.search__icon { width: 18px; height: 18px; color: var(--gold-300); flex-shrink: 0; }

.search__input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--ivory-50);
  font-family: var(--sans);
  font-size: 1rem;
}

.search__input::placeholder { color: rgba(240, 223, 189, 0.5); }
.search__input:focus { outline: none; }

.search__submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search__submit:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(212, 177, 109, 0.7); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(212, 177, 109, 0.3);
  border-radius: 999px;
  background: rgba(248, 243, 233, 0.04);
  color: rgba(248, 243, 233, 0.8);
  font-size: 0.82rem;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--gold-400);
  background: rgba(212, 177, 109, 0.14);
  color: var(--ivory-50);
}

/* chips on the light paper background (search page) */
.chips--paper .chip {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink-500);
  box-shadow: var(--shadow-sm);
}

.chips--paper .chip:hover {
  border-color: var(--gold-400);
  background: var(--ivory-100);
  color: var(--ink-900);
}

/* ---------- cards: categories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 560px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 250px;
  padding: 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--ivory-100);
  isolation: isolate;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.cat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(8, 14, 24, 0.95) 0%, rgba(8, 14, 24, 0.68) 32%, rgba(8, 14, 24, 0.12) 72%, rgba(8, 14, 24, 0.2) 100%);
  transition: opacity 0.4s var(--ease);
}

.cat-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
  transition: transform 0.8s var(--ease);
}

.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card:hover img { transform: scale(1.045); }
.cat-card:hover::after { opacity: 0.92; }

.cat-card__count {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 4px 10px;
  border: 1px solid rgba(240, 223, 189, 0.32);
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.3);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 243, 233, 0.85);
}

.cat-card__title {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
}

.cat-card__meta {
  margin-top: 6px;
  font-size: 0.84rem;
  color: rgba(248, 243, 233, 0.72);
}

/* ---------- prayer list rows ---------- */
.prayer-list {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
}

.prayer-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 14px 20px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.25s var(--ease), padding 0.25s var(--ease);
}

.prayer-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--gold-400);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.prayer-row:hover { background: rgba(240, 232, 216, 0.42); padding-left: 14px; }
.prayer-row:hover::before { opacity: 1; }

.prayer-row__title {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink-900);
}

.prayer-row__when {
  margin-top: 5px;
  color: var(--ink-500);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prayer-row__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-600);
  transition: all 0.25s var(--ease);
}

.prayer-row:hover .prayer-row__arrow {
  border-color: var(--gold-400);
  background: var(--gold-500);
  color: var(--ivory-50);
}

.prayer-row__arrow svg { width: 15px; height: 15px; }

/* grid variant for popular prayers on the home page */
.prayer-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 700px) {
  .prayer-cards { grid-template-columns: repeat(2, 1fr); }
}

.prayer-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.prayer-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-300);
  box-shadow: var(--shadow-md);
}

.prayer-card__cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.prayer-card__title {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
}

.prayer-card__excerpt {
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 0.9rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prayer-card__more {
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prayer-card:hover .prayer-card__more { color: var(--gold-600); }
.prayer-card__more svg { width: 13px; height: 13px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn svg { width: 16px; height: 16px; }

.btn--gold {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 6px 18px -10px rgba(169, 134, 63, 0.9);
}

.btn--gold:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(169, 134, 63, 0.95); }

.btn--ghost {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink-700);
}

.btn--ghost:hover { border-color: var(--gold-300); color: var(--ink-900); background: var(--ivory-100); }

.btn--dark {
  border-color: rgba(212, 177, 109, 0.3);
  background: transparent;
  color: var(--ivory-100);
}

.btn--dark:hover { border-color: var(--gold-400); background: rgba(212, 177, 109, 0.12); }

.btn--sm { padding: 9px 16px; font-size: 0.82rem; }

/* ---------- breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px 0;
  font-size: 0.8rem;
  color: var(--ink-400);
}

.crumbs a { color: var(--ink-400); transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--gold-700); }
.crumbs__sep { color: var(--ivory-300); }
.crumbs [aria-current] { color: var(--ink-500); }

/* ---------- page banner (category) ---------- */
.banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(280px, 38vw, 400px);
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  overflow: hidden;
  color: var(--ivory-100);
  isolation: isolate;
}

.banner__media,
.banner__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.banner__media img { object-fit: cover; object-position: 50% 74%; }

.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(8, 14, 24, 0.9) 0%,
    rgba(8, 14, 24, 0.62) 30%,
    rgba(8, 14, 24, 0.2) 66%,
    rgba(8, 14, 24, 0.32) 100%
  );
}

.banner h1,
.banner__lead { text-shadow: 0 2px 26px rgba(8, 14, 24, 0.6); }

.banner__inner { position: relative; z-index: 2; padding-block: clamp(28px, 4vw, 48px); width: 100%; }

.banner h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); font-weight: 500; }
.banner__lead { margin-top: 12px; max-width: 56ch; color: rgba(248, 243, 233, 0.82); }
.banner .crumbs { padding-top: 0; margin-bottom: 14px; color: rgba(248, 243, 233, 0.55); }
.banner .crumbs a { color: rgba(248, 243, 233, 0.62); }
.banner .crumbs a:hover { color: var(--gold-300); }
.banner .crumbs [aria-current] { color: rgba(248, 243, 233, 0.9); }
.banner .crumbs__sep { color: rgba(248, 243, 233, 0.3); }

/* ---------- prayer article ---------- */
.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

@media (min-width: 1000px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

.article { min-width: 0; }

.article__header { margin-bottom: 26px; }

.article h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 500;
  line-height: 1.14;
}

.article__subtitle {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold-700);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--ink-400);
}

.article__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ivory-300); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ivory-100);
  font-size: 0.74rem;
  color: var(--ink-500);
}

.when {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--gold-200);
  border-left: 3px solid var(--gold-400);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fdf8ee, #fbf5e9);
}

.when__icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: var(--gold-600); }

.when__label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.when p { color: var(--ink-700); font-size: 0.95rem; line-height: 1.6; }

/* the prayer text itself */
.prayer {
  position: relative;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 100% at 0% 0%, #fffefb 0%, #fffdf7 45%, #fdf9f0 100%);
  box-shadow: var(--shadow-sm);
}

.prayer::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 177, 109, 0.16);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}

.prayer__ornament {
  display: block;
  width: 84px;
  height: 12px;
  margin: 0 auto 26px;
  color: var(--gold-500);
  opacity: 0.85;
}

.prayer__text {
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.45vw, 1.12rem);
  line-height: 1.95;
  color: var(--ink-900);
  text-align: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.prayer__text p + p { margin-top: 1.1em; text-indent: 1.2em; }

.prayer__text p.is-rubric {
  text-align: center;
  text-indent: 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: normal;
  color: var(--ink-400);
}

.prayer__text .amen { color: var(--ink-900); }

.prayer__source {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-400);
  text-align: center;
}

/* action bar under the prayer */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.actions .btn { flex: 0 1 auto; }

.actions__hint {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--ink-400);
}

.share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.share__label { font-size: 0.78rem; color: var(--ink-400); margin-right: 2px; }

.share__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.8rem;
  color: var(--ink-700);
  transition: all 0.2s var(--ease);
}

.share__btn:hover { border-color: var(--gold-300); background: var(--ivory-100); transform: translateY(-1px); }
.share__btn svg { width: 16px; height: 16px; }
.share__btn--tg:hover { color: #229ed9; border-color: #229ed9; }
.share__btn--ok:hover { color: #ee8208; border-color: #ee8208; }
.share__btn--wa:hover { color: #1f9c53; border-color: #1f9c53; }
.share__btn--vk:hover { color: #0077ff; border-color: #0077ff; }

/* about block below the prayer */
.about-block { margin-top: 36px; }
.about-block h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 12px; }
.about-block p { color: var(--ink-700); line-height: 1.75; }
.about-block p + p { margin-top: 12px; }

/* ---------- sidebar ---------- */
.sidebar { display: grid; gap: 22px; }

@media (min-width: 1000px) {
  .sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
}

/* on phones the category list is already in the menu and the footer,
   and the sibling list duplicates the "Читайте также" cards */
@media (max-width: 999px) {
  .sidebar .widget--siblings,
  .sidebar .widget:last-child { display: none; }
}

.widget {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.widget__title {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.widget__list { display: grid; gap: 12px; }

.widget__link {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink-700);
  transition: color 0.2s var(--ease);
}

.widget__link:hover { color: var(--gold-700); }

.widget__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 0.9rem;
  color: var(--ink-700);
}

.widget__cat:last-child { border-bottom: 0; }
.widget__cat:hover { color: var(--gold-700); }
.widget__cat span { color: var(--ink-400); font-size: 0.8rem; }

/* ---------- ads ---------- */
.ad {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px dashed var(--ivory-300);
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #fdfaf3, #fdfaf3 10px, #faf5ea 10px, #faf5ea 20px);
  color: var(--ink-400);
  text-align: center;
}

.ad__label {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-400);
  opacity: 0.75;
}

.ad__inner { padding: 22px 16px; font-size: 0.8rem; line-height: 1.5; }

.ad--leaderboard { min-height: 96px; margin-top: 34px; }
.ad--native { min-height: 120px; margin-top: 30px; }
.ad--sidebar { min-height: 260px; }
.ad--footer { min-height: 92px; margin-top: 40px; }

.ad--in-grid { min-height: 150px; }

@media (min-width: 1000px) {
  .ad--leaderboard { min-height: 110px; }
}

/* ---------- prayer of the day ---------- */
.day-prayer {
  position: relative;
  padding: clamp(26px, 4vw, 46px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--ivory-100);
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}

.day-prayer::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 177, 109, 0.22), transparent 70%);
  z-index: -1;
}

.day-prayer__eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.day-prayer h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; }

.day-prayer__text {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.9;
  color: rgba(248, 243, 233, 0.86);
  max-width: 62ch;
}

.day-prayer__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.day-prayer__date { font-size: 0.78rem; color: rgba(240, 223, 189, 0.6); }

/* ---------- intro text / prose ---------- */
.prose { max-width: var(--read); }
.prose p { color: var(--ink-700); line-height: 1.8; }
.prose p + p { margin-top: 14px; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 2.1em 0 0.6em; }
.prose h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.prose > :first-child { margin-top: 0; }
.prose a {
  color: var(--gold-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--gold-600); }
.prose ul { margin: 14px 0; padding-left: 20px; list-style: disc; }
.prose li { margin-bottom: 8px; color: var(--ink-700); line-height: 1.7; }

/* two-column intro with sidebar */
.intro-grid {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 900px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding-block: clamp(40px, 5vw, 64px) 28px;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: rgba(248, 243, 233, 0.7);
}

.footer__top {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(212, 177, 109, 0.16);
}

@media (min-width: 760px) {
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}

.footer__brand .brand { color: var(--ivory-100); }

.footer__about {
  margin-top: 14px;
  max-width: 38ch;
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(248, 243, 233, 0.6);
}

.footer__title {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.footer__list { display: grid; gap: 9px; }

.footer__link {
  font-size: 0.88rem;
  color: rgba(248, 243, 233, 0.7);
  transition: color 0.2s var(--ease);
}

.footer__link:hover { color: var(--gold-300); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 0.76rem;
  color: rgba(248, 243, 233, 0.45);
}

.footer__bottom a { color: rgba(248, 243, 233, 0.6); }
.footer__bottom a:hover { color: var(--gold-300); }

/* ---------- empty / search results ---------- */
.results-head { margin-bottom: 24px; }
.results-count { color: var(--ink-400); font-size: 0.9rem; }

.empty {
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ink-500);
  background: var(--ivory-100);
}

/* ---------- animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .js .reveal[data-delay="1"] { transition-delay: 0.08s; }
  .js .reveal[data-delay="2"] { transition-delay: 0.16s; }
  .js .reveal[data-delay="3"] { transition-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- toast (copy feedback) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--navy-900);
  color: var(--ivory-50);
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: var(--gold-300); }

/* ---------- 404 ---------- */
.error-page {
  display: grid;
  place-items: center;
  min-height: 62vh;
  text-align: center;
}

.error-page__code {
  font-family: var(--display);
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 1;
  color: var(--gold-300);
  opacity: 0.5;
}

/* ---------- desktop nav ---------- */
@media (min-width: 900px) {
  .nav { display: block; }
  .menu-toggle { display: none; }
  .drawer { display: none; }
  :root { --header-h: 76px; }
}

/* ---------- banner variants ---------- */
.banner--slim { min-height: clamp(210px, 27vw, 300px); }
.banner--slim h1 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); }

/* mobile: portrait screens need a bottom-up gradient, not a left-right one */
@media (max-width: 700px) {
  .hero::after {
    background:
      linear-gradient(to top, rgba(8, 14, 24, 0.97) 6%, rgba(8, 14, 24, 0.74) 40%, rgba(8, 14, 24, 0.26) 72%, rgba(8, 14, 24, 0.48) 100%);
  }
  .hero__media img { object-position: 50% 34%; }
}

.banner__subtitle {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: var(--gold-200);
}

/* ---------- search page variant (on light paper) ---------- */
.search--page { max-width: 640px; margin-top: 0; }

.search--page .search__field {
  border-color: var(--line);
  background: var(--card);
  min-height: 56px;
  box-shadow: var(--shadow-sm);
}

.search--page .search__field:focus-within {
  border-color: var(--gold-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(212, 177, 109, 0.14);
}

.search--page .search__icon { color: var(--gold-600); }
.search--page .search__input { color: var(--ink-900); }
.search--page .search__input::placeholder { color: var(--ink-400); }

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  max-width: 840px;
  border-top: 1px solid var(--line);
}

.faq__item { border-bottom: 1px solid var(--line-soft); }

.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-900);
  list-style: none;
}

.faq__q::-webkit-details-marker { display: none; }

.faq__q::after {
  content: "+";
  flex-shrink: 0;
  margin-top: -2px;
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--gold-600);
  transition: transform 0.25s var(--ease);
}

.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__item[open] .faq__q { color: var(--ink-900); }

.faq__a {
  max-width: 70ch;
  padding: 0 4px 22px;
  color: var(--ink-500);
  line-height: 1.78;
  font-size: 0.96rem;
}

/* ---------- search results ---------- */
.results-count {
  margin-bottom: 14px;
  font-size: 0.86rem;
  color: var(--ink-400);
}

.results .prayer-list { border-top-color: var(--line); }

/* ---------- related block (inside the article, above the sidebar on mobile) ---------- */
.related-block {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.related-block .section__title { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }

.related-block .prayer-cards { margin-top: 18px; }

@media (min-width: 900px) {
  .related-block .prayer-cards { grid-template-columns: repeat(3, 1fr); }
}

.ad--sidebar { min-height: 250px; }

@media (min-width: 1000px) {
  .ad--sidebar { min-height: 300px; }
}

/* ---------- reveal stagger ---------- */
.js .cat-grid > .reveal:nth-child(2),
.js .prayer-cards > .reveal:nth-child(2) { transition-delay: 0.07s; }
.js .cat-grid > .reveal:nth-child(3),
.js .prayer-cards > .reveal:nth-child(3) { transition-delay: 0.14s; }
.js .cat-grid > .reveal:nth-child(4),
.js .prayer-cards > .reveal:nth-child(4) { transition-delay: 0.08s; }
.js .cat-grid > .reveal:nth-child(5),
.js .prayer-cards > .reveal:nth-child(5) { transition-delay: 0.15s; }
.js .cat-grid > .reveal:nth-child(6),
.js .prayer-cards > .reveal:nth-child(6) { transition-delay: 0.22s; }

/* safety net: if app.js never boots, show everything */
.reveal-off .reveal { opacity: 1 !important; transform: none !important; }

/* ---------- entrance animations ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__body > * { animation: fade-up 0.9s var(--ease) both; }
  .hero__body > *:nth-child(2) { animation-delay: 0.08s; }
  .hero__body > *:nth-child(3) { animation-delay: 0.16s; }
  .hero__body > *:nth-child(4) { animation-delay: 0.24s; }
  .hero__body > *:nth-child(5) { animation-delay: 0.32s; }
  .banner__inner > * { animation: fade-up 0.8s var(--ease) both; }
  .banner__inner > *:nth-child(2) { animation-delay: 0.07s; }
  .banner__inner > *:nth-child(3) { animation-delay: 0.14s; }
  .prayer { animation: fade-up 0.75s var(--ease) both; }
  .when { animation: fade-up 0.6s var(--ease) both; }
}


/* ---------- long category lists & collections ---------- */
.prayer-list__toggle { margin-top: 18px; }
.prayer-list__more { display: contents; }

.subsection-title {
  margin: 36px 0 8px;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.subsection-note {
  margin-bottom: 14px;
  max-width: 62ch;
  font-size: 0.88rem;
  color: var(--ink-400);
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ivory-200);
  color: var(--gold-700);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.collection-note {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--gold-300);
  border-radius: var(--radius);
  background: var(--ivory-100);
  color: var(--ink-500);
  font-size: 0.9rem;
  line-height: 1.6;
}

.prayer__heading {
  margin: 1.7em 0 0.6em;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-700);
  text-align: center;
}

.prayer__heading:first-child { margin-top: 0; }
.catalog-more { margin-top: 16px; }

/* ---------- hub-страница сборника ---------- */
.hub-note {
  margin: 0 0 18px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-400);
}

.parts-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: part;
}

.parts-list li {
  counter-increment: part;
  border-bottom: 1px solid var(--line-soft);
}

.parts-list li:last-child { border-bottom: 0; }

.parts-list a {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 13px 2px;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-900);
  transition: color 0.2s var(--ease), padding 0.2s var(--ease);
}

.parts-list a::before {
  content: counter(part);
  flex-shrink: 0;
  min-width: 22px;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--gold-600);
}

.parts-list a:hover { color: var(--gold-700); padding-left: 6px; }

/* ---------- партнёрские карточки ---------- */
.partners {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.partners__title {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.partner-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .partner-cards { grid-template-columns: repeat(2, 1fr); }
}

.partner-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink-900);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

a.partner-card:hover {
  border-color: var(--gold-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.partner-card--soon {
  border-style: dashed;
  background: var(--ivory-100);
  cursor: default;
}

.partner-card__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  color: var(--gold-600);
}

.partner-card__icon svg { width: 100%; height: 100%; }

.partner-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.partner-card__name {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.partner-card__title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.partner-card__note {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-500);
}

.partner-card__label {
  align-self: flex-start;
  flex-shrink: 0;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ivory-200);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-400);
  white-space: nowrap;
}

.partners__disclosure {
  margin-top: 10px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink-400);
}

.widget--partner .partner-card { padding: 12px 14px; }
.widget--partner .partner-card__label { display: none; }
.widget--partner .partners__disclosure { margin-top: 8px; }

/* ---------- поддержка проекта ---------- */
.widget--support {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  border-color: rgba(212, 177, 109, 0.28);
  color: var(--ivory-100);
}

.widget--support .widget__title { color: var(--gold-300); }
.widget--support .widget__text {
  margin-bottom: 14px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(248, 243, 233, 0.75);
}

.widget__text { font-size: 0.88rem; line-height: 1.55; color: var(--ink-500); }

.support__lead {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-700);
}

.support__actions { margin-top: 26px; }

.support__soon {
  padding: 16px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--ivory-100);
  font-size: 0.9rem;
  color: var(--ink-500);
}

.support__note {
  margin-top: 20px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-400);
}

/* ---------- print ---------- */
@media print {
  .header, .footer, .ad, .actions, .share, .sidebar, .crumbs, .drawer, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .prayer { border: 0; box-shadow: none; padding: 0; }
  .prayer::before, .prayer__ornament { display: none; }
  .prayer__text { font-size: 13pt; line-height: 1.6; }
  .banner, .hero { min-height: 0; margin: 0; padding: 0; color: #000; }
  .banner__media, .hero__media, .banner::after, .hero::after { display: none; }
  .banner h1, .hero h1 { color: #000; font-size: 20pt; }
  a { text-decoration: none; }
}
