:root {
  --blue: #013364;
  --cream: #fffff4;
  --sidebar: #eeeeee;
  --line: #cfcfc6;
  --text: #222;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.45;
}

.modern-prototype {
  max-width: 1100px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

.prototype-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.prototype-header img {
  max-width: 100%;
  height: auto;
}

.prototype-header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.prototype-event-banner {
  position: sticky;
  top: var(--prototype-header-height, 0px);
  z-index: 999;
  box-sizing: border-box;
  width: 100%;
  padding: 0.48rem 1rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid var(--line);
  background: #f1f1f1;
  color: #222;
  font-size: clamp(0.9rem, 1.62vw, 1.305rem);
  line-height: 1.25;
  text-align: center;
}

.prototype-header-row > .prototype-brand {
  justify-self: start;
  width: 100%;
  min-width: 0;
  margin-left: -8px;
}

.prototype-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  text-align: left;
}

.prototype-brand-logo {
  display: block;
  flex: 0 0 50px;
  width: 50px;
  height: 54px;
}

.prototype-brand-logo img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.prototype-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.1;
}

.prototype-brand-copy strong {
  font-family: "Bookman Old Style", Bookman, Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  text-transform: none;
  font-variant-caps: small-caps;
  white-space: nowrap;
}

.prototype-brand-copy span {
  margin-top: 5px;
  font-family: Arial, sans-serif;
  font-size: clamp(0.72rem, 1.7vw, 0.98rem);
  letter-spacing: 0.02em;
}

.prototype-menu-button {
  justify-self: start;
  margin-left: -6px;
}
.prototype-language-buttons { justify-self: end; }

.prototype-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  gap: 0;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  overflow: hidden;
  cursor: pointer;
}

.prototype-menu-button > span {
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  text-align: center;
  transform: rotate(0deg) scale(1);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.menu-open .prototype-menu-button > span {
  transform: rotate(90deg) scale(1.53);
}

.prototype-menu-button:hover,
.prototype-menu-button:focus-visible {
  background: transparent;
  color: #fff;
}

.prototype-menu-label,
.prototype-language-button > span:not([aria-hidden="true"]) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.prototype-language-buttons {
  min-width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.prototype-language-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 30px;
  flex-shrink: 0;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.prototype-language-button .language-flag {
  display: block;
  width: 28px;
  min-width: 28px;
  height: 19px;
  flex-shrink: 0;
  object-fit: fill;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.prototype-language-button.is-current,
.prototype-language-button:hover,
.prototype-language-button:focus-visible {
  background: transparent;
  color: #111;
}

.prototype-nav {
  position: fixed;
  top: max(var(--prototype-nav-top, 0px), var(--prototype-header-height, 0px));
  left: var(--prototype-nav-left, 0px);
  z-index: 90;
  width: max-content;
  max-width: calc(100vw - 24px);
  height: auto;
  max-height: calc(100vh - var(--prototype-nav-top, 0px));
  margin: 0;
  padding: 0;
  overflow-y: auto;
  background: var(--sidebar);
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.25);
  transform: translateX(-12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0s linear 0.2s;
}

.prototype-nav.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

@media (min-width: 701px) {
  .prototype-language-button .language-flag {
    width: 34px;
    min-width: 34px;
    height: 23px;
  }

  .modern-prototype {
    max-width: 1440px;
  }

  .prototype-header {
    width: 100%;
    margin-left: 0;
  }

  .prototype-header-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .prototype-brand {
    justify-content: center;
  }

  .prototype-brand-copy {
    flex: 0 1 auto;
    text-align: left;
  }

  .prototype-brand-copy strong {
    display: inline-block;
    min-width: 28rem;
  }

  .prototype-language-buttons {
    justify-self: end;
  }

  .prototype-menu-button {
    display: none;
  }

  .prototype-nav {
    top: max(var(--prototype-nav-top, 0px), var(--prototype-header-height, 0px));
    left: var(--prototype-nav-left, 0px);
    width: 240px;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .modern-prototype > main {
    width: calc(100% - 260px);
    margin-left: 260px;
  }

  .modern-prototype .prototype-content table {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

.prototype-nav ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Shared menu order: home, programme, Q&A, family, information,
   accommodation, transport, restaurants, the three PDFs, updates. */
.prototype-nav li:nth-child(1) { order: 1; }
.prototype-nav li:nth-child(2) { order: 2; }
.prototype-nav li:nth-child(3) { order: 5; }
.prototype-nav li:nth-child(4) { order: 3; }
.prototype-nav li:nth-child(5) { order: 10; }
.prototype-nav li:nth-child(6) { order: 11; }
.prototype-nav li:nth-child(7) { order: 12; }
.prototype-nav li:nth-child(8) { order: 4; }
.prototype-nav li:nth-child(9) { order: 6; }
.prototype-nav li:nth-child(10) { order: 7; }
.prototype-nav li:nth-child(11) { order: 8; }
.prototype-nav li:nth-child(12) { order: 9; }
.prototype-nav li:nth-child(13) { order: 13; }

.prototype-nav a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.prototype-nav a[href$=".pdf"] {
  white-space: normal;
}

.prototype-nav a[href$=".pdf"] .pdf-badge {
  margin-left: 0.25rem;
  font-size: 0.6em;
  white-space: nowrap;
}

.menu-mobile-break {
  display: inline;
}

.prototype-nav a[aria-current="page"] {
  background: #e4edf6;
  color: var(--blue);
  box-shadow: inset 4px 0 0 var(--blue);
}

.prototype-nav a:hover,
.prototype-nav a:focus-visible {
  background: var(--cream);
}

.prototype-content {
  padding: 20px;
  background: #fff;
}

/* Keep the Home page exterior consistent with the site background. */
.modern-prototype > main > .prototype-content:not(.legacy-content) {
  background: var(--cream);
}

.modern-prototype > main {
  flex: 1;
}

.modern-prototype > footer {
  margin-top: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--cream);
  text-align: center;
  font-size: 0.8rem;
}

/* The prototype contains legacy table markup; keep it fluid on narrow screens. */
.modern-prototype .prototype-content table,
.modern-prototype .prototype-content table[width] {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  table-layout: fixed;
}

.prototype-content td,
.prototype-content p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.prototype-content p {
  font-size: clamp(1rem, 2.8vw, 1.35rem);
}

.home-introduction,
.home-location,
.home-notes {
  color: #000;
  text-align: center;
}

.legacy-index .home-introduction,
.legacy-index .home-location,
.legacy-index .home-notes {
  text-align: center;
}

.legacy-index p {
  font-size: clamp(1rem, 2.8vw, 1.35rem) !important;
  line-height: 1.45 !important;
}

.legacy-index,
.legacy-index .legacy-centered {
  background: #fff;
}

.home-event-details {
  color: #000;
}

.home-card {
  width: min(100%, 535px);
  height: auto;
  margin-inline: auto;
  background: #fff;
  border: 1px solid #3f4d56;
  outline: 3px double #3f4d56;
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.hotel-table {
  border: 1px solid #000;
  border-collapse: collapse;
  background: #fff;
  table-layout: fixed;
}

.hotel-table th,
.hotel-table td {
  border: 1px solid #000;
}

.hotel-table tr,
.hotel-table td {
  background: #fdfff4;
  border-color: #000;
}

.legacy-accommodation .hotel-table,
.legacy-hotels .hotel-table {
  width: 680px !important;
  max-width: none !important;
  margin: 1.5rem auto;
  border: 2px solid var(--blue);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  table-layout: auto !important;
}

.legacy-accommodation .hotel-table td,
.legacy-hotels .hotel-table td,
.legacy-accommodation .hotel-table th,
.legacy-hotels .hotel-table th {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-right: 1px solid #d5dde5;
  border-bottom: 1px solid #d5dde5;
  overflow-wrap: anywhere;
}

.legacy-accommodation .hotel-table tr:first-child td,
.legacy-hotels .hotel-table tr:first-child td,
.legacy-accommodation .hotel-table tr:first-child th,
.legacy-hotels .hotel-table tr:first-child th {
  background: var(--blue) !important;
  color: #fff !important;
  font-weight: 700;
}

.legacy-accommodation .hotel-table tr:first-child td *,
.legacy-hotels .hotel-table tr:first-child td *,
.legacy-accommodation .hotel-table tr:first-child th *,
.legacy-hotels .hotel-table tr:first-child th * {
  color: #fff !important;
}

.legacy-accommodation .hotel-table tr:nth-child(even) td,
.legacy-hotels .hotel-table tr:nth-child(even) td {
  background: #f7f9fb;
}

.modern-prototype .prototype-content.legacy-accommodation,
.modern-prototype .prototype-content.legacy-hotels {
  overflow-x: auto !important;
}

.modern-prototype .prototype-content .hotel-table {
  width: max-content !important;
  min-width: 680px;
  max-width: none !important;
  table-layout: auto !important;
}

.legacy-accommodation .legacy-subsection-title,
.legacy-hotels .legacy-subsection-title {
  margin-top: 2rem;
}

.transport-table {
  width: max-content !important;
  min-width: 760px;
  max-width: none !important;
  margin: 1rem auto 1.5rem;
  border: 2px solid var(--blue);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  table-layout: auto !important;
}

.modern-prototype .prototype-content.legacy-transport {
  overflow-x: auto !important;
}

.modern-prototype .prototype-content .transport-table {
  width: max-content !important;
  min-width: 760px;
  max-width: none !important;
  table-layout: auto !important;
}

.modern-prototype .prototype-content .transport-rental-table {
  width: max-content !important;
  min-width: 0 !important;
}

.transport-table th,
.transport-table td {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid #d5dde5;
  border-bottom: 1px solid #d5dde5;
  vertical-align: top;
  white-space: nowrap;
}

.transport-table caption,
.hotel-table caption {
  padding: 0.65rem 0.8rem;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-align: left;
}

.transport-table tr:first-child td,
.transport-table tr:first-child th {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.transport-table tr:first-child td *,
.transport-table tr:first-child th * {
  color: #fff !important;
}

.transport-table tr:first-child p {
  margin: 0;
}

.transport-table tr:nth-child(even):not(:first-child) td {
  background: #f7f9fb;
}

.transport-table tr:last-child td {
  border-bottom: 0;
}

.transport-table td:last-child,
.transport-table th:last-child {
  border-right: 0;
}

@media (max-width: 600px) {
  .transport-table {
    font-size: 0.9rem;
  }

  .transport-table td,
  .transport-table th {
    padding: 0.45rem 0.4rem;
  }
}

.satsang-centered {
  text-align: center;
}

.satsang-centered .legacy-section-title {
  margin-bottom: 1.25rem;
}

.satsangprogram-clean {
  width: min(100%, 430px) !important;
  margin: 0 auto 1.4rem !important;
  border: 2px solid var(--blue);
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 4px;
  overflow: visible;
  background: #fff;
  table-layout: fixed !important;
}

.satsangprogram-clean caption {
  padding: 0.7rem 0.8rem;
  background: var(--blue);
  color: #fff;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
}

.satsangprogram-clean th,
.satsangprogram-clean td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid #d9e0e5;
  color: #111 !important;
  font-size: 1rem;
  line-height: 1.35;
}

.satsangprogram-clean.spanish-schedule th {
  width: 66%;
}

@media (min-width: 701px) {
  .satsangprogram-clean {
    width: min(100%, 600px) !important;
    max-width: 100%;
    table-layout: fixed !important;
  }
}

.satsangprogram-clean.spanish-schedule td {
  width: 34%;
  padding-left: 0;
  padding-right: 0;
}

.satsangprogram-clean th {
  width: 65%;
  text-align: left;
  font-weight: 400;
  border-right: 1px solid #d9e0e5;
}

.satsangprogram-clean td {
  width: 35%;
  position: relative;
  padding-right: 0;
  text-align: right;
  white-space: nowrap;
}

.satsangprogram-clean tr:last-child th,
.satsangprogram-clean tr:last-child td {
  border-bottom: 0;
}

.legacy-satsang .satsangprogram {
  margin-left: auto !important;
  margin-right: auto !important;
}

.legacy-satsang p {
  margin: 0 0 1rem;
}

.legacy-satsang .satsang-date {
  margin: 0 0 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.3rem !important;
}

.legacy-satsang ul {
  margin: 0.5rem auto 1rem;
  padding-left: 1.5rem;
  max-width: 680px;
}

.legacy-satsang li {
  margin-bottom: 0.45rem;
}

.legacy-satsang .legacy-subsection-title + p,
.legacy-satsang .legacy-subsection-title + ul {
  margin-top: 0;
}

.legacy-centered {
  text-align: center;
}

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

/* PDF icon shared by menu and content links. */
.pdf-badge,
.prototype-content a[href$=".pdf"]::after {
  display: inline-block;
  width: 1rem;
  height: 1.2rem;
  margin-left: 0.35rem;
  background: url("../images/file-pdf-color-red-icon.svg") center / contain no-repeat;
  vertical-align: middle;
}

.pdf-badge {
  font-size: 0 !important;
}

.prototype-content a[href$=".pdf"]::after {
  content: "";
}

.legacy-content p,
.legacy-content div:not(.legacy-centered),
.legacy-content li {
  text-align: justify;
}

.legacy-content p {
  margin: 0 0 1rem;
}

.legacy-content ul {
  max-width: 760px;
  margin: 0.75rem auto 1.25rem;
  padding-left: 1.35rem;
  list-style-position: outside;
}

.legacy-content .legacy-subsection-title + ul {
  margin-top: 1rem;
}

.legacy-content .legacy-section-title + ul {
  margin-top: 1.5rem;
}

.legacy-content .legacy-section-title + p {
  margin-top: 1.5rem;
}

.legacy-accommodation .legacy-section-title + p,
.legacy-hotels .legacy-section-title + p {
  margin-top: 1.5rem;
}

.legacy-content li {
  margin-bottom: 0.55rem;
  line-height: 1.45;
}

.legacy-content li > div {
  display: contents;
}

.legacy-content h2,
.legacy-content h3 {
  text-align: left;
}

.legacy-content table {
  margin: 1rem auto 1.5rem;
}

.legacy-q-and-a ul,
.legacy-childcare ul {
  max-width: 760px;
}

.legacy-transport .transport-subheading {
  display: block;
  margin: 1.5rem 0 0.75rem;
  color: var(--blue);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
}

.legacy-content .legacy-tertiary-title {
  display: block;
  margin: 1.25rem 0 0.5rem;
  color: var(--blue);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem !important;
  font-weight: 700;
  line-height: 1.25 !important;
  text-align: left;
}

.legacy-transport h3 + p { margin-top: 0.75rem; }

.legacy-family-area .legacy-section-title + ul,
.legacy-childcare .legacy-section-title + ul {
  margin-top: 1.5rem;
}

.legacy-q-and-a .legacy-subsection-title,
.legacy-childcare .legacy-subsection-title,
.legacy-hotels .legacy-subsection-title,
.legacy-info .legacy-subsection-title,
.legacy-transport .legacy-subsection-title {
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

.legacy-content .legacy-centered {
  text-align: center;
}

.legacy-section-title {
  margin: 1rem 0 0.5rem;
  color: var(--blue);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.15;
  font-weight: 700;
  text-align: left;
}

.rating-symbol {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: -0.08em;
}

.apartment-rating-symbol {
  width: 13px !important;
  height: 25px !important;
  max-width: none !important;
  object-fit: contain;
  vertical-align: -0.25em;
}

.legacy-subsection-title {
  margin: 2rem 0 0.65rem;
  color: var(--blue);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.3rem);
  line-height: 1.25;
  font-weight: 700;
  text-align: left;
}

.legacy-content [align="center"] {
  text-align: center;
}

.legacy-content table[align="center"] {
  margin-inline: auto;
}

.modern-prototype .prototype-content td {
  width: auto !important;
  height: auto !important;
}

@media (max-width: 700px) {
  .modern-prototype {
    padding: calc(10px + var(--prototype-header-height, 0px) + var(--prototype-event-height, 0px)) 10px 10px;
  }
  .prototype-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
  .prototype-event-banner {
    position: fixed;
    top: var(--prototype-header-height, 0px);
    left: 0;
    right: 0;
  }
  .prototype-header-row { gap: 6px; }
  .prototype-menu-button,
  .prototype-content { padding: 10px; overflow-x: hidden; }
  .prototype-brand { gap: 8px; }
  .prototype-brand-logo { flex-basis: 50px; width: 50px; height: 50px; }
  .prototype-brand-logo img { width: 50px; height: 50px; }
  .prototype-brand-copy { overflow: hidden; }
  .prototype-brand-copy strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    font-size: clamp(0.78rem, 3.2vw, 1.05rem);
  }
  .prototype-brand-copy span { font-size: clamp(0.62rem, 2.3vw, 0.82rem); }

  .prototype-event-banner {
    padding: 0.38rem 0.65rem 0.45rem;
    font-size: 0.756rem;
  }
}

body.site-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: #fff;
  color: #111;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

a, a:hover, a:focus { color: #044f99; }

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid #f28c28;
  outline-offset: 2px;
}

.legacy-content {
  max-width: none;
  width: 100%;
  margin: 0;
  background: transparent;
  padding: 18px 20px;
  overflow-x: auto;
  overflow-y: hidden;
}

.legacy-content * { max-width: 100%; }

.legacy-content p,
.legacy-content li,
.legacy-content td,
.legacy-content span {
  color: #111 !important;
  font-family: Arial, sans-serif !important;
}

.legacy-content p,
.legacy-content li,
.legacy-content td {
  font-size: 1.12rem !important;
  line-height: 1.55 !important;
}

.legacy-content td,
.legacy-content th { word-break: break-word; }

.legacy-content table {
  width: 100% !important;
  height: auto !important;
  border-collapse: collapse;
  margin: 8px 0 16px;
}

.legacy-content table td,
.legacy-content table th {
  padding: 8px 10px;
  vertical-align: top;
}

.legacy-content img { height: auto !important; }
.legacy-content center { display: block; }

/* Table headings must override legacy span/text colors. */
.modern-prototype .legacy-content .transport-table tr:first-child td,
.modern-prototype .legacy-content .transport-table tr:first-child td *,
.modern-prototype .legacy-content .transport-table tr:first-child th,
.modern-prototype .legacy-content .transport-table tr:first-child th *,
.modern-prototype .legacy-content .hotel-table tr:first-child td,
.modern-prototype .legacy-content .hotel-table tr:first-child td * {
  color: #fff !important;
}

@media (max-width: 768px) {

  .legacy-content { padding: 10px; }

  .legacy-content p,
  .legacy-content li,
  .legacy-content td {
    font-size: 1.05rem !important;
    line-height: 1.48 !important;
  }

  .legacy-content table {
    width: 100% !important;
    display: table;
    white-space: normal;
  }

  .legacy-content td,
  .legacy-content th { white-space: normal !important; }
}

/* Give the Spanish mobile schedule a little more room for the times. */
@media (max-width: 700px) {
  .satsangprogram-clean.spanish-schedule {
    table-layout: fixed;
  }

  .satsangprogram-clean.spanish-schedule th {
    width: 63%;
  }

  .satsangprogram-clean.spanish-schedule td {
    width: 37%;
  }

  .satsangprogram-clean.spanish-schedule td:not(.schedule-note) {
    text-align: right !important;
    vertical-align: middle !important;
  }

  .satsangprogram-clean.spanish-schedule tr:nth-child(5) td {
    padding-right: 0;
  }

  .satsangprogram-clean .schedule-first-time {
    position: relative;
    display: inline-block;
  }

  .satsangprogram-clean .schedule-star {
    position: absolute;
    left: 100%;
    margin-left: 0.15em;
  }

  .satsangprogram-clean td:not(.schedule-note) {
    padding-right: 0.75rem !important;
    vertical-align: middle !important;
  }

  .satsangprogram-clean:not(.spanish-schedule) td:not(.schedule-note) {
    padding-right: 1rem !important;
  }

  .satsangprogram-clean:not(.spanish-schedule) tr:nth-child(2) td {
    vertical-align: middle !important;
  }

  .satsangprogram-clean.spanish-schedule tr:not(:first-child):not(:last-child) td {
    padding-right: 0.95rem !important;
  }

  .satsangprogram-clean.spanish-schedule tr:first-child .schedule-first-time {
    position: relative;
    left: -0.2rem;
  }

}

/* Keep the schedule entries bold and the note regular. */
.satsangprogram-clean th,
.satsangprogram-clean td {
  font-weight: 700;
}

/* Schedule note and desktop spacing. */
.satsangprogram-clean .schedule-note {
  width: auto;
  text-align: center;
  white-space: normal;
  font-style: italic;
  font-weight: 400;
  font-size: 0.85rem !important;
}

@media (min-width: 701px) {
  .satsangprogram-clean .schedule-star {
    position: absolute;
    left: 100%;
    margin-left: 0.15em;
  }

  .satsangprogram-clean .schedule-first-time {
    position: relative;
    display: inline-block;
    left: 0;
  }

  .satsangprogram-clean.spanish-schedule tr:nth-child(2) td {
    vertical-align: middle !important;
  }

  .satsangprogram-clean.spanish-schedule tr:first-child td {
    vertical-align: middle !important;
  }

  .satsangprogram-clean:not(.spanish-schedule) tr:nth-child(2) td {
    vertical-align: middle !important;
  }

  .legacy-satsang .satsang-date {
    font-size: 1.4rem !important;
  }

  .satsangprogram-clean th,
  .satsangprogram-clean td:not(.schedule-note) {
    font-size: 1.2rem !important;
  }

  .satsangprogram-clean th,
  .satsangprogram-clean td,
  .satsangprogram-clean.spanish-schedule td {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  .satsangprogram-clean.spanish-schedule tr:nth-child(5) td {
    padding-right: 2rem !important;
  }

}

/* The compact Satsang schedule must override the legacy full-width table rule. */
@media (min-width: 701px) {
  .modern-prototype .prototype-content .satsangprogram-clean {
    width: min(100%, 600px) !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }
}

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

@media print {
  .site-topbar,
  .site-subbar,
  .site-sidebar,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  .legacy-content {
    overflow: visible;
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }
}

/* Typography normalization: keep paragraph/body text uniform across legacy span classes */
.legacy-content p *,
.legacy-content li *,
.legacy-content td * {
  font-size: inherit !important;
  line-height: inherit !important;
}

.legacy-content p sup,
.legacy-content p sub,
.legacy-content li sup,
.legacy-content li sub,
.legacy-content td sup,
.legacy-content td sub {
  font-size: 0.75em !important;
}

/* Mobile menu accessibility: keep last item reachable with large system fonts */
@media (max-width: 700px) {
  html.menu-open, body.menu-open {
    overflow: hidden;
  }
  .prototype-nav {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100dvh - var(--prototype-nav-top, 0px));
  }
}

/* Align page and section headings on mobile. */
@media (max-width: 700px) {
  .prototype-content h2,
  .prototype-content h3,
  .prototype-content h4,
  .prototype-content .transport-subheading,
  .prototype-content .legacy-tertiary-title {
    text-align: left;
  }
}

/* Restaurant notice uses the same regular weight in both languages. */
.legacy-restaurants p { font-weight: 400; }

/* Align desktop lists with the page content. */
@media (min-width: 701px) {
  .legacy-content ul {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Improve line breaks across screen sizes. */
.prototype-content p,
.prototype-content li {
  text-wrap: pretty;
}

.prototype-content h1,
.prototype-content h2,
.prototype-content h3,
.prototype-content h4 {
  text-wrap: balance;
}

/* Prevent date superscripts from increasing the line height. */
.legacy-satsang .satsang-date sup {
  line-height: 0 !important;
}

/* Keep the final line of mobile lists aligned left. */
@media (max-width: 700px) {
  .legacy-content li,
  .legacy-content li div {
    text-align: justify;
    text-align-last: left;
    text-wrap: wrap;
    hyphens: auto;
  }
  .legacy-content li > div {
    display: block;
  }
}

/* Mark external websites while keeping PDF links distinct. */
.prototype-content a:is([href^="http://"], [href^="https://"]):not([href$=".pdf"])::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.25em;
  background-color: currentColor;
  -webkit-mask: url("../images/external-link.svg") center / contain no-repeat;
  mask: url("../images/external-link.svg") center / contain no-repeat;
  vertical-align: baseline;
}

/* Keep list paragraphs justified without stretching their final line. */
.legacy-content li > div {
  display: block;
  text-align: justify;
  text-align-last: left;
}

/* Give PDF links a consistent weight throughout the content. */
.prototype-content a[href$=".pdf"],
.prototype-content a[href$=".pdf"] * {
  font-weight: 700;
}

/* Keep link text and icons the same color, including nested spans. */
.prototype-content a:link,
.prototype-content a:visited,
.prototype-content a:link *,
.prototype-content a:visited * {
  color: #00539b !important;
}
