/* v38 — the illuminated book, the collection and the reception room. */
:is(.history-page, .catalog-page, .reception-page) {
  --edition-ink: #263b30;
  --edition-gold: #ac8c50;
  --edition-line: #bba16a55;
  --edition-paper: #fbf8ef;
  --edition-ease: cubic-bezier(.22, 1, .36, 1);
}

:is(.history-page, .catalog-page) :is(.history-breadcrumb, .catalog-breadcrumb) {
  background: #f1ebdc;
  padding-block: 18px;
  font-size: 11px;
  letter-spacing: .06em;
}

:is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) {
  background: radial-gradient(ellipse at 10% 0%, #58604855, transparent 60%), #10271f;
}

:is(.history-page, .catalog-page) :is(.history-hero-copy, .catalog-hero-copy) {
  padding-block: clamp(64px, 6.3vw, 104px);
}

:is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) h1 {
  font-size: clamp(38px, 3.75vw, 62px);
  line-height: 1.7;
  letter-spacing: .09em;
  text-shadow: 0 2px 24px #eac77412;
}

:is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) figure {
  border-left-width: 1px;
}

:is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) figure::after {
  inset: 18px;
  border-color: #fae7b660;
  box-shadow: 0 0 0 5px #15271c22;
}

/* A quiet, glass-like chapter rail. It remains legible without backdrop-filter. */
.history-page .history-chapters,
.catalog-page .catalog-chapters {
  background: #f4efe2f7;
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  border-bottom: 1px solid #b99a58aa;
  box-shadow: 0 8px 24px #172a1b0a;
  padding-inline: 5%;
}

.history-page .history-chapters a,
.catalog-page .catalog-chapters a {
  position: relative;
  min-height: 74px;
  padding-block: 17px;
  font-size: 14px;
  letter-spacing: .035em;
  color: #615132;
  transition: color .25s ease, background-color .25s ease;
}

.history-page .history-chapters a::after,
.catalog-page .catalog-chapters a::after {
  content: '';
  position: absolute;
  inset: auto 24% 0;
  height: 2px;
  background: linear-gradient(90deg, #a6884400, #a68844, #a6884400);
  transform: scaleX(0);
  transition: transform .4s var(--edition-ease);
}

.history-page .history-chapters a:is(:hover, :focus-visible)::after,
.catalog-page .catalog-chapters a:is(:hover, :focus-visible)::after {
  transform: scaleX(1);
}

.history-page .history-chapters span,
.catalog-page .catalog-chapters span {
  font-size: 25px;
  color: #a18349;
}

.history-page main [id] { scroll-margin-top: 96px; }
.history-page .history-section,
.catalog-page .catalog-section {
  padding-block: clamp(64px, 6.6vw, 112px);
}

.history-page :is(.history-section-heading, .history-centered-heading) h2,
.catalog-page .catalog-heading h2 {
  font-size: clamp(29px, 2.9vw, 44px);
  letter-spacing: .055em;
  line-height: 1.8;
}

.history-page :is(.history-reading, .history-introduction-copy) p {
  font-size: 15px;
  line-height: 2.25;
  letter-spacing: .025em;
  text-wrap: pretty;
}

.history-page .history-introduction-copy .history-lead {
  font-size: clamp(20px, 1.9vw, 25px);
  line-height: 1.95;
  color: #514425;
}

.history-page .history-introduction-copy .history-editorial-note,
.history-page .history-reading .history-distinction {
  font-size: 13px;
  line-height: 2.05;
}

.history-page .history-era { gap: 10%; }
.history-page .history-era-number {
  font-size: clamp(68px, 6.8vw, 96px);
  color: #aa8a4b;
  letter-spacing: -.035em;
  font-weight: 400;
}

.history-page .history-timeline a {
  padding-block: 25px 30px;
  border-top-color: #ac8a4a;
  transition: background-color .3s ease;
}

.history-page .history-timeline a:hover { background: #c9b57c0e; }
.history-page .history-timeline strong { line-height: 1.9; }
.history-page .history-insight {
  background: linear-gradient(115deg, #e8dfc97a, #faf6eb6b);
  padding: 25px 28px;
  border-left-color: #aa8640;
}

.history-page :is(.history-theurgy, .history-renaissance) {
  gap: clamp(32px, 5vw, 84px);
  padding-block: clamp(64px, 6.6vw, 112px);
}

.history-page .history-art {
  padding: 7px 7px 0;
  box-shadow: 0 18px 46px #101a1426, 0 1px 4px #1b251722;
}

.history-page .history-art figcaption { margin-inline: -7px; }
.history-page .history-deity-grid { gap: 42px 36px; }
.history-page .history-deity {
  border-color: #b69a5b9c;
  background: #fffdf5;
  box-shadow: 0 16px 40px #3c33110c;
}

.history-page .history-deity-body { padding: clamp(25px, 2.6vw, 40px); }
.history-page .history-deity-body > p:not(.eyebrow) {
  font-size: 15px;
  line-height: 2.2;
  text-wrap: pretty;
}

.history-page .history-deity h4 { color: #7c5e2b; }
.history-page .history-prayer-link { padding-top: 8px; }
.history-page .history-angel-strip article {
  background: linear-gradient(145deg, #203b2e, #0f251c);
  box-shadow: 0 10px 28px #061b1520, inset 0 0 0 4px #beaa6522;
}

.history-page .history-angel-strip article > div { padding: 28px; }
.history-page .history-angel-strip p { line-height: 2.15; }
.history-page .history-symbol-grid { gap: 36px; }
.history-page .history-ritual-grid article {
  border: 1px solid #bba17077;
  box-shadow: 0 8px 24px #74603208;
  padding: 32px 28px;
  background: #fffdf5e8;
}

.history-page .history-sources li { padding-block: 21px; }

/* The collection keeps the established compact, half-width divine artwork. */
.catalog-page .catalog-intro { padding-block: 50px; }
.catalog-page .catalog-heading { margin-bottom: 48px; }
.catalog-page .catalog-heading > p { max-width: 42ch; }
.catalog-page .arts-grid {
  border-color: var(--edition-line);
  background: #fffdf57d;
}

.catalog-page .art-card {
  padding: 32px 28px;
  border-color: var(--edition-line);
  transition: background-color .3s ease;
}

.catalog-page .art-card:hover { background: #fffef9; }
.catalog-page .art-number { font-size: 39px; color: #aa8c50; }
.catalog-page .art-card > p:not(.art-deity) { line-height: 2.15; }
.catalog-page .art-card summary,
.catalog-page .item-detail summary { padding-block: 4px; }
.catalog-page .grades-section {
  background: radial-gradient(ellipse at 50% 0%, #45513966, transparent 60%), #10271e;
}

.catalog-page .grades-grid {
  border-color: #c7a66855;
  background: #d9bb7810;
}

.catalog-page .grades-grid article {
  padding: 36px 30px;
  background: linear-gradient(130deg, #e8d5a00a, #091e1614);
  border-color: #c7a66855;
}

.catalog-page .grade-number { font-size: 76px; color: #e0c4861c; }
.catalog-page .grades-grid h3 { line-height: 1.8; }
.catalog-page .grades-grid .eyebrow { letter-spacing: .12em; }
.catalog-page .grades-grid article > p:not(.eyebrow) { line-height: 2.1; }
.catalog-page .collection-section { background: #f4efe2; }
.catalog-page .collection-grid { gap: 40px 32px; }
.catalog-page .item-card {
  container-type: inline-size;
  container-name: sacred-item;
  background: #fffcf5;
  border-color: #b69b6199;
  box-shadow: 0 10px 34px #2d30170a, 0 1px 3px #2d30170a;
  transition: border-color .35s ease, box-shadow .35s ease;
}

.catalog-page .item-card:focus-within {
  border-color: #94733b;
  box-shadow: 0 15px 38px #2d301715;
}

.catalog-page .item-heading { padding: 8px; }
.catalog-page .item-heading figure::after { border-color: #ead6a15e; }
.catalog-page .item-titles { padding-inline: clamp(14px, 2vw, 28px); }
.catalog-page .item-titles h3 { text-wrap: balance; }
.catalog-page .item-body { padding: 22px 30px 30px; }
.catalog-page .item-body > .item-intro { line-height: 2.1; }
.catalog-page .grade-select {
  min-height: 56px;
  padding-block: 15px;
  border-color: #b8a473;
  background-color: #f4efe2;
  color: #453c29;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.catalog-page .grade-select:focus-visible {
  background-color: #fffdf7;
  border-color: #967644;
  outline: 2px solid #9c7a3a;
  outline-offset: 3px;
}

.catalog-page .item-configuration {
  border-bottom: 1px solid #b9a17044;
  padding-bottom: 18px;
}

.catalog-page .price-value {
  font-size: 42px;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.015em;
}

.catalog-page .item-review { min-height: 58px; }
.catalog-page .item-detail { margin-top: 26px; }
.catalog-page .price-section { background: #eee6d5; }
.catalog-page .price-table-scroll {
  border-color: #b49a63;
  box-shadow: 0 12px 32px #332a1410;
  scrollbar-width: thin;
  scrollbar-color: #b49960 #ece3cf;
}

.catalog-page .price-table-scroll caption { padding-block: 23px; }
.catalog-page .price-table-scroll th,
.catalog-page .price-table-scroll td { padding-block: 22px; }
.catalog-page .price-table-scroll thead th { background: #18372a; }
.catalog-page .price-table-scroll tbody tr:hover { background: #e9ddbe66; }
.catalog-page .catalog-faq details { padding-block: 26px; }
.catalog-page .catalog-faq p { line-height: 2.1; }
.catalog-page #selection-dialog {
  border-width: 1px;
  outline: 1px solid #b9a16a66;
  outline-offset: -7px;
  background: #fcf9f0;
  box-shadow: 0 32px 120px #00160db3;
  opacity: 0;
  transform: translateY(16px) scale(.985);
  transition: opacity .24s ease, transform .34s var(--edition-ease);
}

.catalog-page #selection-dialog[open] { opacity: 1; transform: none; }
.catalog-page #selection-dialog::backdrop {
  background: #071c16c9;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.catalog-page .selection-close { min-height: 46px; background: #eee6d5; }
.catalog-page .selection-content { padding: 26px 40px 40px; }
.catalog-page #selection-name { line-height: 1.8; }
.catalog-page #selection-details dd { padding-bottom: 9px; }

@supports (transition-behavior: allow-discrete) {
  .catalog-page #selection-dialog {
    transition: opacity .24s ease, transform .34s var(--edition-ease),
      display .34s allow-discrete, overlay .34s allow-discrete;
  }
}

@starting-style {
  .catalog-page #selection-dialog[open] {
    opacity: 0;
    transform: translateY(16px) scale(.985);
  }
}

@container sacred-item (max-width: 360px) {
  .catalog-page .item-titles { padding-inline: 12px; }
  .catalog-page .item-titles h3 { font-size: 20px; letter-spacing: .025em; }
  .catalog-page .item-body { padding-inline: 22px; }
}

/* The form is deliberately quieter, with paper, measured rhythm and clear focus. */
.reception-page .reception-hero {
  padding-block: clamp(64px, 6vw, 100px);
  background: radial-gradient(ellipse at 50% 0%, #5a604144, transparent 65%), #112a20;
}

.reception-page .reception-hero h1 {
  font-size: clamp(34px, 3.6vw, 55px);
  line-height: 1.8;
  letter-spacing: .09em;
}

.reception-page .reception-hero > p:last-child { font-size: 15px; line-height: 2.15; }
.reception-page .reception-layout {
  max-width: 1400px;
  background: #f4efe4;
  gap: 6%;
  padding-block: 80px 112px;
}

.reception-page main { background: #f4efe4; }
.reception-page .reception-aside { top: 36px; }
.reception-page .reception-aside figure {
  background: #e4d7b8;
  box-shadow: 0 12px 30px #183a2512, inset 0 0 0 3px #fbf1d577;
}

.reception-page .reception-aside-copy { padding-top: 32px; }
.reception-page .reception-aside h2 { line-height: 1.9; letter-spacing: .04em; }
.reception-page .reception-panel {
  padding: 42px 44px 50px;
  background: #fffdf7;
  border-color: #b59b668c;
  outline-color: #cbbd9b66;
  box-shadow: 0 18px 56px #1931210c, 0 1px 5px #1931210a;
}

.reception-page .form-steps { padding-bottom: 26px; margin-bottom: 42px; }
.reception-page .form-steps li { position: relative; }
.reception-page .form-steps li[aria-current="step"]::after {
  content: '';
  position: absolute;
  bottom: -27px;
  inset-inline: 0 16%;
  height: 2px;
  background: #a38649;
}

.reception-page .form-intro h2,
.reception-page .confirmation-heading h2 {
  font-size: clamp(23px, 2.1vw, 29px);
  line-height: 1.9;
  text-wrap: balance;
}

.reception-page .form-field { margin-bottom: 30px; }
.reception-page .form-field > label { margin-bottom: 12px; letter-spacing: .035em; }
.reception-page .form-field :is(input, select, textarea) {
  min-height: 56px;
  background: #fbf9f2;
  border-color: #b5ad9980;
  padding: 14px 16px;
  box-shadow: inset 0 1px 2px #27392405;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.reception-page .form-field :is(input, select, textarea):focus {
  border-color: #9c7c43;
  background: #fffefb;
  outline: 2px solid #9c7c43;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #bfa46812;
}

.reception-page .form-field textarea { min-height: 205px; line-height: 1.9; }
.reception-page .form-field [aria-invalid="true"] { border-color: #ac4833; }
.reception-page .required-label { background: #ebe0c6; color: #6c5527; padding: 2px 7px; }
.reception-page .selection-fields { padding-top: 30px; margin-block: 44px 35px; }
.reception-page .chosen-price { background: #f1ead8; padding: 23px 24px; }
.reception-page .chosen-price output { font-size: 40px; font-variant-numeric: tabular-nums; }
.reception-page .form-privacy { padding-block: 20px; }
.reception-page .form-privacy summary { line-height: 1.9; }
.reception-page .privacy-consent { margin-block: 28px; }
.reception-page .reception-panel .button { min-height: 60px; }
.reception-page .confirmation-details dt { padding-top: 24px; }
.reception-page .confirmation-details dd { padding-bottom: 24px; }

@media (hover: hover) and (pointer: fine) {
  .catalog-page .item-card:hover {
    border-color: #9b7d43;
    box-shadow: 0 18px 42px #2d301715, 0 1px 3px #2d30170a;
  }
}

@media (max-width: 1100px) {
  .catalog-page .catalog-heading { gap: 26px; }
  .catalog-page .item-titles { padding-inline: 17px; }
  .catalog-page .item-body { padding-inline: 25px; }
  .catalog-page .grades-grid article { padding: 30px 24px; }
  .reception-page .reception-layout { gap: 4%; }
  .reception-page .reception-panel { padding: 34px 29px 40px; }
  .history-page .history-angel-strip article > div { padding: 23px; }
}

@media (max-width: 850px) {
  :is(.history-page, .catalog-page) :is(.history-hero-copy, .catalog-hero-copy) {
    padding-block: 58px;
  }
  :is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) h1 { font-size: 44px; }
  :is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) figure { border-left: 0; }
  .history-page .history-chapters,
  .catalog-page .catalog-chapters { padding-inline: 3%; }
  .history-page .history-chapters a,
  .catalog-page .catalog-chapters a { font-size: 12px; gap: 8px; }
  .history-page .history-section,
  .catalog-page .catalog-section { padding-block: 64px; }
  .history-page .history-deity-grid { gap: 30px; }
  .history-page .history-ritual-grid article { padding: 25px; }
  .catalog-page .collection-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .catalog-page .item-heading { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .catalog-page .item-titles { padding-inline: 28px; }
  .catalog-page .item-titles h3 { font-size: 28px; }
  .catalog-page .item-body { padding: 24px 32px 30px; }
  .catalog-page .item-body > .item-intro { min-height: 0; }
  .catalog-page .item-configuration { min-height: 0; }
  .catalog-page .catalog-heading { margin-bottom: 36px; }
}

@media (max-width: 760px) {
  .reception-page .reception-layout { padding: 42px 20px 64px; gap: 36px; }
  .reception-page .reception-aside { position: static; grid-template-columns: 100px minmax(0, 1fr); }
  .reception-page .reception-aside-copy { padding: 0; }
  .reception-page .reception-panel { padding: 30px 25px 38px; }
  .reception-page .form-steps li[aria-current="step"]::after { bottom: -27px; }
  .reception-page .form-steps { margin-bottom: 34px; }
  .reception-page .form-field { margin-bottom: 27px; }
  .reception-page .reception-hero { padding: 58px 24px; }
  .reception-page .reception-hero h1 { font-size: 34px; }
  .reception-page .reception-hero > p:last-child { font-size: 14px; }
}

@media (max-width: 600px) {
  :is(.history-page, .catalog-page) :is(.history-breadcrumb, .catalog-breadcrumb) {
    font-size: 10px;
    padding-block: 16px;
  }
  :is(.history-page, .catalog-page) :is(.history-hero-copy, .catalog-hero-copy) {
    padding-block: 48px;
  }
  :is(.history-page, .catalog-page) :is(.history-hero, .catalog-hero) h1 {
    font-size: clamp(32px, 9vw, 42px);
    letter-spacing: .06em;
  }
  .history-page .history-chapters,
  .catalog-page .catalog-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-page .history-chapters a,
  .catalog-page .catalog-chapters a {
    min-height: 51px;
    padding: 11px 5px;
    font-size: 12px;
    gap: 9px;
  }
  .history-page .history-chapters a:nth-child(3) { border-left: 0; }
  .history-page .history-chapters span,
  .catalog-page .catalog-chapters span { font-size: 22px; }
  .history-page main [id] { scroll-margin-top: 122px; }
  .history-page .history-section,
  .catalog-page .catalog-section { padding-block: 56px; }
  .history-page :is(.history-theurgy, .history-renaissance) { padding-block: 56px; }
  .history-page :is(.history-section-heading, .history-centered-heading) h2,
  .catalog-page .catalog-heading h2 { font-size: 28px; }
  .history-page .history-reading p { line-height: 2.15; }
  .history-page .history-insight { padding: 23px; }
  .history-page .history-deity-body { padding: 26px; }
  .history-page .history-ritual-grid article { padding: 28px 25px; }
  .history-page .history-symbol-grid { gap: 28px 22px; }
  .catalog-page .catalog-intro { padding-block: 34px; }
  .catalog-page .art-card { padding: 27px 25px; }
  .catalog-page .grades-grid article { padding: 29px 25px; }
  .catalog-page .item-heading { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-page .item-titles { padding-inline: 14px; }
  .catalog-page .item-titles h3 { font-size: clamp(18px, 4.7vw, 24px); }
  .catalog-page .item-body { padding: 22px 24px 27px; }
  .catalog-page .price-value { font-size: 39px; }
  .catalog-page .grade-select { font-size: 16px; }
  .catalog-page .selection-content { padding: 20px 25px 30px; }
  .reception-page .reception-panel .button { font-size: 14px; }
}

@media (max-width: 380px) {
  .reception-page .reception-layout { padding-inline: 14px; }
  .reception-page .reception-panel { padding-inline: 21px; }
  .reception-page .reception-aside { grid-template-columns: 82px minmax(0, 1fr); gap: 15px; }
  .reception-page .reception-aside h2 { font-size: 21px; }
  .catalog-page .item-body { padding-inline: 21px; }
  .catalog-page .item-titles { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .history-page .history-chapters a::after,
  .catalog-page .catalog-chapters a::after,
  .catalog-page #selection-dialog,
  .catalog-page .item-card,
  .reception-page .form-field :is(input, select, textarea) {
    transition: none;
  }
}

@media print {
  .catalog-page #selection-dialog[open] {
    opacity: 1;
    transform: none;
    outline: none;
    box-shadow: none;
  }
}

/* Chapter destinations clear the sticky rail at every breakpoint. */
.reception-page .reception-aside img { height: auto; }
.catalog-page main [id] { scroll-margin-top: 96px; }
.catalog-page .item-titles h3 > span { display: inline-block; }
@media(max-width:600px) { .catalog-page main [id] { scroll-margin-top: 122px; } }
