:root {
  --indigo: #1E2B4F;
  --indigo-deep: #141D38;
  --marigold: #E3A21A;
  --lotus: #7E2F4F;
  --teal: #2D6A6E;
  --milk: #FAF9F6;
  --white: #FFFFFF;
  --ink: #1B2238;
  --ash: #58607A;
  --rule: #DDD9CE;
  --serif: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--milk);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 0.2em; }
a:hover { color: var(--indigo); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--marigold); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--marigold); color: var(--indigo);
  padding: 0.6rem 1rem; font-family: var(--sans); font-weight: 700;
}
.skip:focus { top: 1rem; }

/* Type */
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 1rem; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.9rem, 6.5vw, 4.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); max-width: 24ch; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1rem; max-width: 62ch; }
.lead { font-size: 1.35rem; line-height: 1.55; color: var(--ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--indigo); color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.bar { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; }
.wordmark { display: flex; align-items: baseline; gap: 0.7rem; color: var(--white); text-decoration: none; }
.wordmark:hover { color: var(--white); }
.wordmark-name { font-size: 1.45rem; font-weight: 700; }

.nav { display: flex; align-items: center; gap: 1.25rem; font-family: var(--sans); font-weight: 500; font-size: 1.02rem; }
.nav a { color: #DCE1F0; text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--white); border-bottom-color: var(--marigold); }
.nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--marigold); }

.nav-toggle {
  display: none; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.5); border-radius: 4px;
  padding: 0.4rem 0.9rem; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  padding: 0.8rem 1.5rem; border-radius: 4px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--marigold); color: var(--indigo); }
.btn-primary:hover { background: #F0B431; color: var(--indigo); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.btn-dark { background: var(--indigo); color: var(--white); }
.btn-dark:hover { background: var(--indigo-deep); color: var(--white); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* Home hero */
.hero { position: relative; background: var(--indigo); color: var(--white); padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(4rem, 10vw, 7.5rem); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; position: relative; }
.lede { font-size: 1.3rem; line-height: 1.5; color: #DCE1F0; max-width: 32rem; }

.sun-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6rem; }
.sun-wrap { position: relative; width: min(330px, 70vw); aspect-ratio: 1; display: grid; place-items: center; }
.sun-wrap::before {
  content: ""; position: absolute; inset: -26%;
  background: url("assets/alpona-light.svg") center / contain no-repeat;
  opacity: 0.22;
}
.sun {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: var(--marigold); color: var(--indigo);
  display: grid; place-items: center;
  box-shadow: 0 0 0 10px var(--indigo), 0 0 0 12px rgba(227, 162, 26, 0.55), 0 0 70px rgba(227, 162, 26, 0.28);
  animation: rise 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sun span { font-family: var(--serif); font-weight: 800; font-size: clamp(2.2rem, 6.5vw, 3.4rem); line-height: 1; }
.sun-figure figcaption { font-family: var(--sans); font-size: 1rem; color: #B9C2DD; text-align: center; max-width: 18rem; }

@keyframes rise {
  from { transform: translateY(60px) scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Inner page header */
.page-head { position: relative; background: var(--indigo); color: var(--white); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.25rem); overflow: hidden; }
.page-head::after {
  content: ""; position: absolute; right: -9rem; top: 50%; width: 30rem; aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("assets/alpona-light.svg") center / contain no-repeat;
  opacity: 0.2; pointer-events: none;
}
.page-head .wrap { position: relative; z-index: 1; }
.crumbs { font-family: var(--sans); font-size: 1rem; color: #B9C2DD; margin: 0 0 1.2rem; }
.crumbs a { color: #DCE1F0; }
.crumbs a:hover { color: var(--white); }
.page-head h1 { margin-bottom: 1rem; }
.page-head .lede { margin: 0; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--white { background: var(--white); }
.section--tight { padding-top: 0; }
.intro { font-size: 1.25rem; color: var(--ash); margin-bottom: 2.5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
.split--wide-right { grid-template-columns: 0.85fr 1.15fr; }

/* Meaning of satsang */
.meaning { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.meaning-word { font-family: var(--serif); font-weight: 800; font-size: clamp(4rem, 11vw, 7.5rem); line-height: 1; letter-spacing: -0.02em; color: var(--indigo); margin: 0; }
.etymology { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; font-family: var(--sans); margin: 1.4rem 0 0; max-width: 30rem; }
.etymology p { margin: 0; }
.etymology b { display: block; font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.08em; }
.etymology span { color: var(--ash); }

/* Doorways on home */
.doorways { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 1.25rem; margin-top: 2.5rem; }
.door {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 2rem; min-height: 15rem; border-radius: 6px;
  color: var(--white); text-decoration: none;
}
.door:hover { color: var(--white); }
.door::after {
  content: ""; position: absolute; right: -4.5rem; bottom: -4.5rem; width: 14rem; aspect-ratio: 1;
  background: url("assets/alpona-light.svg") center / contain no-repeat; opacity: 0.12; pointer-events: none;
}
.door--thakur { grid-row: span 2; background: var(--indigo); min-height: 31rem; }
.door--gather { background: var(--teal); }
.door--ashram { background: var(--lotus); }
.door h3 { font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05; color: var(--marigold); margin: 0 0 auto; padding-bottom: 2rem; position: relative; z-index: 1; max-width: 12ch; }
.door--gather h3, .door--ashram h3 { font-size: clamp(2rem, 3.4vw, 2.5rem); color: #F6DFA3; }
.door p { margin: 0 0 0.9rem; color: #E4E8F4; position: relative; z-index: 1; }
.door-link { font-family: var(--sans); font-weight: 700; text-decoration: underline; text-underline-offset: 0.25em; position: relative; z-index: 1; }
.door:hover .door-link { color: var(--marigold); }

/* Coming up */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.2rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 1px solid var(--rule); }
.rows .when strong { display: block; font-family: var(--sans); font-size: 1.1rem; }
.rows .when span { font-family: var(--sans); color: var(--ash); font-size: 1rem; }
.rows h4 { margin: 0; font-size: 1.2rem; }
.rows p { margin: 0.1rem 0 0; color: var(--ash); }
.rows .empty { display: block; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.1rem 0; color: var(--ash); }
.more { font-family: var(--sans); font-weight: 700; display: inline-block; margin-top: 1.2rem; }

/* Call to action band */
.cta { position: relative; background: var(--indigo-deep); color: var(--white); padding: clamp(3rem, 7vw, 5rem) 0; overflow: hidden; }
.cta::after {
  content: ""; position: absolute; left: -8rem; top: 50%; width: 26rem; aspect-ratio: 1; transform: translateY(-50%);
  background: url("assets/alpona-light.svg") center / contain no-repeat; opacity: 0.1; pointer-events: none;
}
.cta .wrap { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: center; }
.cta h2 { margin: 0; max-width: 20ch; }
.cta p { color: #CBD2E6; margin: 0.6rem 0 0; }

/* Facts list */
.facts { margin: 0; }
.facts > div { border-top: 1px solid var(--rule); padding: 1.1rem 0 1.2rem; }
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 700; font-size: 1.3rem; }
.facts dd { margin: 0.2rem 0 0; color: var(--ash); max-width: 46ch; }

/* Callout */
.note { border-left: 4px solid var(--marigold); background: var(--white); padding: 1.1rem 1.4rem; margin: 2rem 0 0; font-family: var(--sans); font-size: 1.05rem; color: var(--ash); max-width: 62ch; }
.section--white .note { background: var(--milk); }

/* Portrait */
.portrait { margin: 0 0 2rem; max-width: 340px; }
.portrait img { border: 1px solid var(--rule); }
.portrait figcaption { font-family: var(--sans); font-size: 0.95rem; color: var(--ash); margin-top: 0.6rem; }

/* Name panel on Thakur page */
.panel { position: relative; overflow: hidden; background: var(--indigo); color: var(--white); border-radius: 6px; padding: 2rem; max-width: 340px; }
.panel::after { content: ""; position: absolute; right: -4rem; bottom: -4rem; width: 13rem; aspect-ratio: 1; background: url("assets/alpona-light.svg") center / contain no-repeat; opacity: 0.14; pointer-events: none; }
.panel p { position: relative; z-index: 1; margin: 0; }
.panel-years { font-size: 3rem; font-weight: 700; line-height: 1.1; color: var(--marigold); }
.panel-places { font-family: var(--sans); color: #CBD2E6; margin-top: 0.3rem !important; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.75rem; border-left: 2px solid var(--marigold); }
.timeline li { position: relative; padding-bottom: 1.9rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.75rem - 7px); top: 0.55em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--marigold);
}
.timeline time { display: block; font-family: var(--sans); font-weight: 700; font-size: 1.05rem; color: var(--teal); }
.timeline p { margin: 0.15rem 0 0; }

/* Links list */
.links { list-style: none; margin: 0; padding: 0; }
.links li { border-top: 1px solid var(--rule); }
.links li:last-child { border-bottom: 1px solid var(--rule); }
.links a { display: block; padding: 1rem 0; font-family: var(--sans); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links small { display: block; font-weight: 400; color: var(--ash); font-size: 1rem; margin-top: 0.1rem; }

.books { list-style: none; margin: 0; padding: 0; }
.books li { border-top: 1px solid var(--rule); padding: 0.9rem 0; }
.books li:last-child { border-bottom: 1px solid var(--rule); }
.books em { font-weight: 700; }
.books span { display: block; font-family: var(--sans); color: var(--ash); font-size: 1rem; }

/* Observances */
.observances { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.observances li { border-top: 3px solid var(--marigold); padding-top: 0.9rem; }
.observances strong { display: block; font-size: 1.55rem; line-height: 1.2; }
.observances span { color: var(--ash); display: block; margin-top: 0.3rem; }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.4rem 3.2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--marigold); color: var(--indigo);
  font-family: var(--sans); font-weight: 700; display: grid; place-items: center;
}
.steps strong { display: block; }

/* Gallery */
.gallery { columns: 3 15rem; column-gap: 1rem; }
.gallery figure { break-inside: avoid; margin: 0 0 1rem; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery img { width: 100%; border: 1px solid var(--rule); }
.gallery figcaption { font-family: var(--sans); font-size: 0.98rem; color: var(--ash); margin-top: 0.4rem; }
.empty-state { display: grid; justify-items: center; text-align: center; padding: 3rem 1rem; border: 1px dashed #B9B4A6; }
.empty-state img { width: 7rem; opacity: 0.55; margin-bottom: 1rem; }
.empty-state p { margin-inline: auto; color: var(--ash); }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1000px); }
dialog.lightbox::backdrop { background: rgba(10, 14, 28, 0.85); }
.lightbox img { max-height: 78vh; width: auto; margin-inline: auto; }
.lightbox p { color: #E4E8F4; text-align: center; font-family: var(--sans); margin: 0.8rem auto 0; }
.lightbox .btn { display: block; margin: 1rem auto 0; }

/* Contact */
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; font-family: var(--sans); }
.contact-list li { padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-list strong { display: inline-block; min-width: 7.5rem; margin-right: 0.5rem; }

.form label { display: block; font-family: var(--sans); font-weight: 700; font-size: 1rem; margin: 0 0 0.3rem; }
.form input, .form textarea {
  width: 100%; font-family: var(--sans); font-size: 1.1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid #B9B4A6; border-radius: 4px;
  padding: 0.7rem 0.85rem; margin-bottom: 1.2rem;
}
.form textarea { resize: vertical; min-height: 9rem; }
.form input:focus, .form textarea:focus { border-color: var(--teal); }
.form-status { font-family: var(--sans); margin: 1rem 0 0; color: var(--ash); }

/* Footer */
.site-footer { background: var(--indigo-deep); color: #CBD2E6; padding: 3.5rem 0 2rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-bn { font-weight: 800; font-size: 2rem; color: var(--marigold); margin: 0; line-height: 1.3; }
.footer-sub { margin: 0.2rem 0 1rem; font-family: var(--sans); }
.site-footer h2 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; color: var(--white); margin: 0 0 0.8rem; max-width: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #CBD2E6; }
.site-footer a:hover { color: var(--white); }
.footer-base { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.14); font-family: var(--sans); font-size: 0.98rem; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; }
.footer-base p { margin: 0; max-width: 44rem; }

/* Small screens */
@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1rem;
    background: var(--indigo-deep);
  }
  .nav.open { display: flex; }
  .nav { align-items: stretch; }
  .nav a { padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .nav .nav-donate { margin-top: 0.8rem; text-align: center; padding: 0.7rem 1rem; }
}

@media (max-width: 820px) {
  .hero-inner, .split, .split--wide-left, .split--wide-right, .meaning { grid-template-columns: 1fr; }
  .doorways { grid-template-columns: 1fr; }
  .door--thakur { grid-row: auto; min-height: 22rem; }
  .observances { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .sun-figure { margin-top: 1.5rem; }
  .page-head::after { right: -14rem; opacity: 0.14; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sun { animation: none; }
}

/* Brand logo and donate button */
.wordmark { align-items: center; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--white); box-shadow: 0 0 0 2px var(--marigold), 0 2px 10px rgba(0, 0, 0, 0.35); }
.nav .nav-donate { background: var(--marigold); color: var(--indigo); font-weight: 700; padding: 0.4rem 1.1rem; border-radius: 4px; border-bottom: 0; }
.nav .nav-donate:hover, .nav .nav-donate[aria-current="page"] { background: #F0B431; color: var(--indigo); border-bottom: 0; }

/* Home extras */
.tagline { font-weight: 600; font-size: 1.3rem; color: var(--marigold); margin: 0 0 1rem; }
.subhead { margin: 2rem 0 0.6rem; }
.focus { list-style: none; margin: 0; padding: 0; }
.focus li { border-left: 4px solid var(--marigold); padding: 0.3rem 0 0.3rem 1.2rem; margin-bottom: 1.1rem; max-width: 56ch; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0 0.5rem; }
.photo-strip figure { margin: 0; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--rule); }
.photo-strip figcaption { font-family: var(--sans); font-size: 0.98rem; color: var(--ash); margin-top: 0.4rem; }

/* Links with small meta label */
.links small { display: inline-block; margin-left: 0.6rem; font-weight: 500; }

/* Books */
.books-grid { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.books-grid li { text-align: center; font-family: var(--sans); font-size: 0.98rem; }
.books-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--white); border: 1px solid var(--rule); margin-bottom: 0.4rem; }
.books-grid--large { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.books-grid--large li { font-size: 1.1rem; font-weight: 700; }

/* Reading layouts */
.article-layout { display: grid; grid-template-columns: 16rem 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; font-family: var(--sans); padding-right: 0.5rem; }
.toc h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 0.32rem 0 0.32rem 0.9rem; text-decoration: none; color: var(--ash); font-size: 1rem; }
.toc a:hover { color: var(--indigo); border-left: 2px solid var(--marigold); margin-left: -2px; }
.article section { margin-bottom: 3rem; scroll-margin-top: 5.5rem; }
.article h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); max-width: none; }
.article p { max-width: 66ch; line-height: 1.75; }
.prose p { max-width: 62ch; }

/* Cards beside text */
.aside-card { background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--marigold); padding: 1.6rem 1.6rem 1.2rem; border-radius: 4px; }
.section--white .aside-card { background: var(--milk); }
.aside-card h3 { margin-bottom: 0.8rem; }
.aside-card p { font-family: var(--sans); }
.aside-card .contact-list { margin-top: 0.4rem; }
.aside-card .contact-list li { line-height: 1.5; }
.btn-lg { font-size: 1.15rem; padding: 0.95rem 2rem; }
.actions-inline { margin-top: 1.6rem; }

/* Rows without a time column details */
.rows--plain li { grid-template-columns: 11rem 1fr; }

/* Region chips */
.chips { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { font-family: var(--sans); font-size: 1rem; border: 1.5px solid var(--rule); border-radius: 999px; padding: 0.3rem 0.9rem; background: var(--white); }

/* Gallery albums */
.album { margin-bottom: 3rem; }
.album h2 { margin-bottom: 1.2rem; }
.gallery img { background: var(--rule); }

/* Footer: four columns */
.footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr 1fr; }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--rule); background: var(--white); padding: 1rem 1.2rem; }
  .toc ol { columns: 2 14rem; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rows--plain li { grid-template-columns: 1fr; gap: 0.2rem; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .books-grid--large { grid-template-columns: 1fr 1fr; }
}

/* Prayer time picker */
.region-picker button {
  font: inherit; font-family: var(--sans); font-size: 1rem; cursor: pointer;
  border: 1.5px solid var(--rule); border-radius: 999px; padding: 0.3rem 0.9rem;
  background: var(--white); color: var(--ink);
}
.region-picker button:hover { border-color: var(--teal); }
.region-picker button[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
.prayer-result { margin-top: 2rem; }
.table-scroll { overflow-x: auto; }
.prayer-table { width: 100%; max-width: 40rem; border-collapse: collapse; font-family: var(--sans); background: var(--white); }
.prayer-table th, .prayer-table td { text-align: left; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--rule); }
.prayer-table thead th { background: var(--indigo); color: var(--white); }
.prayer-table tbody th { font-weight: 500; }
.prayer-table tr.is-current { background: #FBEFCF; font-weight: 700; }
.prayer-note { font-size: 0.95rem; color: var(--ash); margin-top: 0.75rem; }

/* Home portraits (four photos on the theme background) */
.portraits { background: var(--indigo); padding: clamp(1.5rem, 4vw, 2.5rem) 0 0; }
.portrait-row { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: clamp(0.6rem, 2vw, 1.5rem); }
.portrait-row li {
  flex: 0 1 15rem; aspect-ratio: var(--ar);
  background: url("assets/banner.jpg") no-repeat;
  background-size: var(--size) auto; background-position: var(--x) var(--y);
  border: 3px solid var(--marigold); border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
@media (max-width: 600px) {
  .portrait-row { flex-wrap: wrap; }
  .portrait-row li { flex: 0 1 calc(50% - 0.6rem); }
}

/* Portrait phones: show the portraits as 2 + 2 in a set order */
@media (max-width: 600px) and (orientation: portrait) {
  .portrait-row li:nth-child(2) { order: 1; }
  .portrait-row li:nth-child(3) { order: 2; }
  .portrait-row li:nth-child(1) { order: 3; }
  .portrait-row li:nth-child(4) { order: 4; }
}

/* Contact form validation */
.form-note { font-family: var(--sans); font-size: 0.95rem; color: var(--ash); margin: 0 0 1rem; }
.field-error { font-family: var(--sans); font-size: 0.95rem; color: #A12B2B; margin: 0.3rem 0 0.9rem; min-height: 0; }
.field-error:empty { margin: 0; }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #A12B2B; }
.form-status.is-ok { color: var(--teal); font-weight: 700; }
.form-status.is-error { color: #A12B2B; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chips.region-picker li { border: 0; padding: 0; background: none; border-radius: 0; }

/* Event flyer */
.rows .flyer { display: block; margin-top: 0.9rem; max-width: 22rem; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(30, 43, 79, 0.12); }
.rows .flyer img { width: 100%; height: auto; }
.rows .flyer:hover { box-shadow: 0 8px 22px rgba(30, 43, 79, 0.22); }

/* "Next event" card on the home page: compact on phones, a full-width banner on larger screens */
.event-card-wrap { position: relative; z-index: 2; margin-top: -2.6rem; }
.event-card {
  display: flex; align-items: center; gap: 1.1rem; width: 100%; max-width: 34rem; margin-inline: auto;
  padding: 1rem 1.3rem; border: 0; border-radius: 22px; cursor: pointer; text-align: left;
  font: inherit; color: var(--indigo);
  background: linear-gradient(100deg, #F4B731 0%, #FFD87A 100%);
  box-shadow: 0 14px 30px rgba(20, 29, 56, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card[hidden] { display: none; }
.event-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(20, 29, 56, 0.34); }
.event-date { flex: 0 0 auto; display: grid; place-items: center; align-content: center; width: 4.6rem; aspect-ratio: 1; border-radius: 16px; background: var(--indigo); color: var(--white); font-family: var(--sans); line-height: 1.1; }
.event-date strong { font-size: 1.9rem; font-weight: 800; }
.event-date span { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; }
.event-info { display: grid; gap: 0.1rem; min-width: 0; font-family: var(--sans); }
.event-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.event-title { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.event-hint { font-size: 0.95rem; opacity: 0.85; }
.event-details, .event-thumb, .event-cta { display: none; }

@media (min-width: 900px) {
  .event-card-wrap { margin-top: -3.4rem; }
  .event-card { max-width: none; gap: 1.6rem; padding: 1.1rem 1.6rem 1.1rem 1.2rem; border-radius: 18px; }
  .event-date { width: 5.6rem; border-radius: 14px; }
  .event-date strong { font-size: 2.3rem; }
  .event-info { flex: 1; gap: 0.2rem; }
  .event-title { font-size: 1.9rem; }
  .event-details { display: block; font-size: 1.05rem; font-weight: 600; }
  .event-hint { display: none; }
  .event-thumb { display: block; width: 4rem; height: auto; border-radius: 5px; border: 2px solid var(--white); box-shadow: 0 6px 14px rgba(20, 29, 56, 0.3); transform: rotate(3deg); }
  .event-cta { display: inline-block; flex: 0 0 auto; padding: 0.8rem 1.5rem; border-radius: 6px; background: var(--indigo); color: var(--white); font-family: var(--sans); font-weight: 800; font-size: 1.05rem; }
  .event-card:hover .event-cta { background: var(--indigo-deep); }
}

.flyer-dialog { border: 0; padding: 1rem; border-radius: 14px; background: var(--white); width: min(94vw, 30rem); max-height: 94vh; overflow: auto; text-align: center; }
.flyer-dialog::backdrop { background: rgba(20, 29, 56, 0.82); }
.flyer-dialog img { width: 100%; max-height: 74vh; object-fit: contain; border-radius: 6px; }
.flyer-dialog .btn { margin-top: 0.9rem; }
.flyer-close { position: absolute; top: 0.35rem; right: 0.5rem; z-index: 1; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: rgba(20, 29, 56, 0.85); color: var(--white); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.flyer-close:hover { background: var(--indigo); }
