/* Hymnal: a hymn book open on the pew. Staves run across the page, the service is sung in verses. */
:root {
  --te-radius: 0;
  --hy-ln: color-mix(in srgb, var(--te-primary-text) 38%, transparent);
  /* Five staff lines, positioned in em so they scale with the text set on them. */
  --hy-staff: linear-gradient(transparent 0 .248em, var(--hy-ln) .248em calc(.248em + 1px), transparent calc(.248em + 1px) .448em, var(--hy-ln) .448em calc(.448em + 1px), transparent calc(.448em + 1px) .648em, var(--hy-ln) .648em calc(.648em + 1px), transparent calc(.648em + 1px) .848em, var(--hy-ln) .848em calc(.848em + 1px), transparent calc(.848em + 1px) 1.048em, var(--hy-ln) 1.048em calc(1.048em + 1px), transparent calc(1.048em + 1px));
  --hy-clef: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 104' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 64C16 64 14 58 18 54C23 49 31 53 31 62C31 74 12 76 8 64C4 50 20 38 27 28C32 20 31 8 25 7C20 7 17 16 18 28L26 90C27 98 16 100 14 93C13 89 19 87 21 91'/%3E%3C/svg%3E");
  --hy-wood: color-mix(in srgb, var(--te-accent) 50%, #000);
}

/* Chrome */
.te-nav-wrap { padding: 0; position: relative; }
.te-nav { max-width: none; border-radius: 0; background: var(--te-bg); box-shadow: none; border-bottom: 3px double var(--te-primary-text); }
.te-nav-brand { font-weight: 400; }
.te-nav-link { border-radius: 0; font-size: .9375rem; }
.te-nav-link.is-active { background: none; color: var(--te-accent-text); box-shadow: inset 0 -1px 0 currentColor; }
.te-nav-sheet { background: var(--te-bg); }
.te-btn, .te-btn-outline { border-radius: .125rem; box-shadow: none; font-family: var(--te-heading); font-weight: 600; font-size: 1rem; }
.te-btn { background: var(--te-primary); color: var(--te-on-primary); }
.te-btn-accent { background: var(--te-accent); color: var(--te-on-accent); box-shadow: none; }
.te-btn-soft { background: transparent; color: var(--te-primary-text); box-shadow: inset 0 0 0 1px var(--te-primary-text); }
.te-btn-light { background: #fff; color: #14141c; }
.te-btn.te-btn-outline { background: transparent; color: var(--te-primary-text); }
.te-chip { border-radius: 0; background: none; padding: 0; color: var(--te-accent-text); font-size: 1rem; }
.te-field, .te-choice { border-radius: .125rem; }

/* Hero: a title page with the name on the staff */
.hy-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hy-label { max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; color: var(--te-accent-text); font-size: 1.125rem; }
.hy-score { position: relative; margin-top: .75rem; }
.hy-title { --lh: 1.5; margin: 0; padding: 0 1.25rem 0 max(clamp(2.75rem, 6vw, 5.5rem), calc(50vw - 36rem + 1.25rem)); font-size: calc(var(--fit, 1) * clamp(4.25rem, 11vw, 8rem)); line-height: var(--lh); font-weight: 400; letter-spacing: -.01em; color: var(--te-primary-text); background: var(--hy-staff) 0 0 / 100% calc(var(--lh) * 1em) repeat-y; overflow-wrap: break-word; -webkit-text-stroke: .1em var(--te-bg); paint-order: stroke fill; }
.hy-title::before { content: ""; position: absolute; left: max(.5rem, calc(50vw - 36rem + 1.25rem - .62em)); top: -.06em; width: .5em; height: 1.28em; background: var(--te-primary-text); -webkit-mask: var(--hy-clef) center / contain no-repeat; mask: var(--hy-clef) center / contain no-repeat; }
.hy-sub { max-width: 72rem; margin: .5rem auto 0; padding-inline: 1.25rem; text-align: right; font-size: clamp(1.125rem, 2.4vw, 1.5rem); color: var(--te-ink); }
.hy-body { display: grid; grid-template-columns: 9.75rem minmax(0, 1fr); gap: clamp(.875rem, 3vw, 2.5rem); max-width: 72rem; margin: clamp(1.75rem, 4vw, 3rem) auto 0; padding-inline: 1.25rem; }

/* The wooden hymn-board */
.hy-board { display: flex; flex-direction: column; justify-content: center; gap: .75rem; padding: 2rem .625rem 1rem; background: repeating-linear-gradient(91deg, rgba(255,255,255,.035) 0 3px, rgba(0,0,0,.08) 3px 5px, transparent 5px 12px), var(--hy-wood); clip-path: polygon(0 1.25rem, 50% 0, 100% 1.25rem, 100% 100%, 0 100%); }
.hy-rail { display: grid; gap: .25rem; justify-items: center; padding-bottom: .375rem; border-bottom: 3px solid rgba(0,0,0,.42); box-shadow: 0 1px 0 rgba(255,255,255,.14); }
.hy-cap { color: color-mix(in srgb, var(--te-surface) 88%, transparent); font-size: .875rem; }
.hy-cards { display: flex; gap: .1875rem; }
.hy-card { display: grid; place-items: center; width: 1.8125rem; height: 2.625rem; background: var(--te-surface); color: var(--te-ink); font-family: var(--te-heading); font-weight: 600; font-size: 1.625rem; line-height: 1; box-shadow: 0 2px 3px rgba(0,0,0,.45); }
.hy-plate { position: relative; min-height: 22rem; padding: .4375rem; border: 1px solid var(--te-primary-text); }
.hy-plate > * { position: absolute; inset: .4375rem; width: calc(100% - .875rem); height: calc(100% - .875rem); object-fit: cover; object-position: 50% 18%; }
.hy-foot { display: grid; gap: 1.25rem; justify-items: start; max-width: 72rem; margin: 1.75rem auto 0; padding-inline: 1.25rem; }
.hy-venue { font-size: 1.375rem; color: var(--te-primary-text); font-family: var(--te-heading); }
.hy-foot .te-count { width: min(100%, 26rem); justify-content: flex-start; gap: .3125rem; padding: .375rem .375rem .3125rem; background: repeating-linear-gradient(91deg, rgba(255,255,255,.035) 0 3px, rgba(0,0,0,.08) 3px 5px, transparent 5px 12px), var(--hy-wood); }
.te-count-cell { background: var(--te-surface) !important; border-radius: 0; box-shadow: 0 2px 3px rgba(0,0,0,.4) !important; padding-block: .5rem .375rem; }
.te-count-num { font-weight: 600; color: var(--te-ink); }
.te-count-label { font-size: .8125rem; }
@media (min-width: 800px) {
  .hy-body { grid-template-columns: 16rem minmax(0, 1fr); }
  .hy-board { gap: 1.125rem; padding: 3rem 1.25rem 1.5rem; clip-path: polygon(0 2rem, 50% 0, 100% 2rem, 100% 100%, 0 100%); }
  .hy-card { width: 2.625rem; height: 3.625rem; font-size: 2.375rem; }
  .hy-plate { min-height: min(28rem, 50svh); }
  .hy-foot { grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem) auto; align-items: center; }
}

/* Every section title is set on its own staff, running the full width of the page */
.te-section-head { position: relative; max-width: none; margin-bottom: 2rem; padding: 0 !important; text-align: left; }
.te-h-section { --lh: 1.5; position: relative; font-size: clamp(2.5rem, 8vw, 4.25rem); line-height: var(--lh); font-weight: 400; padding: 0 1.25rem 0 max(clamp(2.75rem, 6vw, 5.5rem), calc(50vw - 36rem + 1.25rem)); background: var(--hy-staff) 0 0 / 100% calc(var(--lh) * 1em) repeat-y; -webkit-text-stroke: .1em var(--te-bg); paint-order: stroke fill; }
.te-h-section::before { content: ""; position: absolute; left: max(.5rem, calc(50vw - 36rem + 1.25rem - .62em)); top: -.06em; width: .5em; height: 1.28em; background: var(--te-primary-text); -webkit-mask: var(--hy-clef) center / contain no-repeat; mask: var(--hy-clef) center / contain no-repeat; }
.te-section-sub { padding-inline: 1.25rem; max-width: 72rem; margin-inline: auto; }
.te-h-page { font-weight: 400; font-size: clamp(2.75rem, 9vw, 5rem); line-height: 1.2; }
.te-h-card { font-weight: 400; font-size: 1.375rem; }
.te-card .te-h-section { padding-inline: 1.25rem; }
.te-card .te-h-section::before { display: none; }

/* Surfaces: open paper between ruled lines */
.te-card, .te-tile { background: none; border: 0; border-block: 1px solid var(--te-line); border-radius: 0; box-shadow: none; }
a.te-card:hover { transform: none; box-shadow: none; }
.te-icon-tile { display: none; }
.te-eyebrow { color: var(--te-accent-text); font-size: 1rem; }
.te-muted { color: var(--te-muted); }
.te-prose { color: var(--te-ink); font-size: 1.25rem; line-height: 1.7; }

/* Facts: a ruled colophon */
.te-facts-grid { max-width: 72rem !important; gap: 0 !important; grid-template-columns: 1fr !important; border-block: 3px double var(--te-primary-text); }
.te-facts-grid > * { grid-column: auto !important; border: 0; background: none; }
.te-facts-grid > * + * { border-top: 1px solid var(--te-line); }
.te-facts-grid .te-eyebrow { margin-top: 0 !important; }
.te-facts-grid .te-h-card { font-size: 1.625rem; line-height: 1.25; }
.te-facts-grid a:not(.te-card) { min-height: 2.75rem; font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; }
.te-facts-grid .te-i-sm { display: none; }
@media (min-width: 800px) { .te-facts-grid { grid-template-columns: repeat(3, 1fr) !important; } .te-facts-grid > * + * { border-top: 0; border-left: 1px solid var(--te-line); } }

/* Explore: the contents page, with dotted leaders */
.te-explore > div { max-width: 72rem !important; }
.te-explore .te-section-head { margin-inline: calc(50% - 50vw); }
.te-explore .grid { gap: 0 !important; grid-template-columns: 1fr !important; }
.te-explore a.te-card { display: flex; align-items: baseline; gap: 0; padding: .875rem 0; min-height: 3.5rem; border-width: 0; }
.te-explore a.te-card > .te-icon-tile, .te-explore a.te-card > svg { display: none; }
.te-explore a.te-card > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .625rem; width: 100%; }
.te-explore a.te-card .te-h-card { font-size: 1.625rem; }
.te-explore a.te-card > span::before { content: ""; order: 1; flex: 1 1 2rem; border-bottom: 2px dotted var(--te-primary-text); opacity: .5; align-self: end; margin-bottom: .4375rem; }
.te-explore a.te-card .te-muted { order: 2; margin: 0 !important; font-size: 1.0625rem; }
.te-explore a.te-card:hover .te-h-card { color: var(--te-accent-text); }

/* Story */
.te-story > .te-card { max-width: 44rem !important; margin-left: max(0px, calc(50% - 36rem)); border: 0; padding-inline: 0; }
.te-story .te-prose p:first-of-type::first-letter { float: left; font-family: var(--te-heading); font-size: 3.5em; line-height: .86; padding: .06em .08em 0 0; color: var(--te-accent-text); }

/* Programme: the numbered verses of a hymn */
.te-schedule > div:not(.te-section-head) { max-width: 72rem !important; }
.te-timeline { counter-reset: verse; padding: 0 !important; border: 0; columns: 1; column-gap: 4rem; column-rule: 1px solid var(--te-line); }
.te-timeline li { counter-increment: verse; grid-template-columns: 3rem minmax(0, 1fr) !important; column-gap: 0 !important; padding: 0 0 1.75rem !important; break-inside: avoid; }
.te-timeline li > div:first-child { display: block; }
.te-timeline li > div:first-child::before { content: counter(verse) "."; font-family: var(--te-heading); font-weight: 600; font-size: 2rem; line-height: 1.15; color: var(--te-accent-text); }
.te-timeline li > div:first-child > span { display: none; }
.te-timeline .te-h-card { font-size: clamp(1.625rem, 4vw, 2.125rem); line-height: 1.2; }
.te-timeline .te-chip { margin: 0 !important; font-size: 1.0625rem; }
.te-timeline .te-muted { font-size: 1.125rem; }
@media (min-width: 900px) { .te-timeline { columns: 2; } }

#details > section:not(#venue) > div { max-width: 72rem !important; }
#venue > .te-section-head { margin-inline: -1.25rem; }
#venue > .te-card { max-width: 44rem !important; margin-left: max(0px, calc(50% - 36rem)); }

/* Gallery: tipped-in plates */
.te-gallery .te-section-head { margin-inline: -1.25rem; }
.te-gallery-grid { max-width: 72rem !important; gap: 1rem !important; }
.te-gallery-item { border-radius: 0 !important; padding: .3125rem; border: 1px solid var(--te-primary-text); }

/* Inner pages and close */
.te-page-head { margin: 0; border-radius: 0; background: none; border-bottom: 3px double var(--te-primary-text); text-align: left; padding-inline: max(1.25rem, calc(50% - 36rem)); }
.te-closing-panel { background: none; border: 0; max-width: 72rem !important; position: relative; }
.te-closing-panel .te-h-section { padding-inline: 2.75rem; }
.te-closing-panel .te-h-section::before { left: .5rem; }
/* The final double bar closes the last staff. */
.te-closing-panel .te-h-section::after { content: ""; position: absolute; right: 0; bottom: calc((var(--lh) - 1.048) * 1em - 1px); width: 9px; height: calc(.8em + 1px); border-left: 2px solid var(--te-primary-text); background: linear-gradient(90deg, transparent 0 3px, var(--te-primary-text) 3px); }
footer.te-bg-primary { border-radius: 0; }
footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.te-nav-sheet .te-nav-link, .te-nav .te-btn-sm { min-height: 2.75rem; }
