/* The First 39: The Church Year (/church-year/ and /church-year/<id>). Built by tools/build_church_year.py;
   js/church-year-page.js fills in "Today". Light backgrounds only, so the Scripture buttons keep the Ink focus ring. */

.cy-crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-5); padding: 0; font-size: var(--fs-small); }
.cy-crumb li + li::before { content: "/"; margin-right: var(--s-2); color: var(--stone); }
.cy-crumb a { color: var(--stone); }
.cy-hero .lead { max-width: 52ch; }
.cy-wrap { padding-block: var(--s-7) var(--s-9); }
.cy-intro { color: var(--stone); margin: 0 0 var(--s-5); max-width: 60ch; }

/* Today (filled by JS) */
.cy-now { display: inline-grid; gap: var(--s-1); margin-top: var(--s-5); padding: var(--s-3) var(--s-5); background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--radius); max-width: 40rem; }
.cy-now[hidden] { display: none; }
.cy-now p { margin: 0; }
.cy-now-k { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cy-now-label { font-weight: 600; }
.cy-now-label a { color: var(--ink); font-weight: 500; }
.cy-now-next { font-size: var(--fs-small); color: var(--stone); }

/* Hub */
.cy-note { border-left: 4px solid var(--gold); background: var(--linen); padding: var(--s-4) var(--s-5); border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 var(--s-8); max-width: 60rem; }
.cy-year h2, .cy-seasons-sec h2, .cy-dates h2, .cy-calendars h2 { margin: 0 0 var(--s-2); }

/* Season colors: the liturgical color, in brand tokens (Pentecost's red stands in as deep gold; Clay is for History) */
.cy-c-advent { --c: var(--accent); }
.cy-c-christmas, .cy-c-easter { --c: var(--gold); }
.cy-c-epiphany, .cy-c-pentecost { --c: var(--gold-deep); }
.cy-c-ordinary { --c: var(--cedar); }
.cy-c-lent { --c: var(--minor); }
.cy-c-holy-week { --c: var(--ink); }

/* The wheel of the year */
.cy-year { margin-bottom: var(--s-7); }
.cy-year-head { margin-bottom: var(--s-5); }
.cy-year-grid { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: var(--s-6) clamp(var(--s-6), 5vw, var(--s-9)); align-items: center; }
.cy-wheel { position: relative; margin: 0; width: 100%; max-width: 460px; }
.cy-wheel svg { display: block; width: 100%; height: auto; overflow: visible; }
.cy-wheel-bg { fill: #fff; }
path.cy-seg { fill: var(--c); stroke: var(--scroll); stroke-width: 1.5; transition: opacity .2s; }
.has-hot path.cy-seg:not(.is-hot) { opacity: .22; }
.cy-seg-label { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-anchor: middle; dominant-baseline: central; fill: #fff; pointer-events: none; }
.cy-t-easter, .cy-t-christmas { fill: var(--ink); }
.cy-month { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-anchor: middle; fill: var(--stone); }
.cy-tick { stroke: var(--stone); stroke-width: 1; }
.cy-needle line { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.cy-needle circle { fill: var(--ink); stroke: var(--scroll); stroke-width: 3; }
.cy-wheel-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42%; text-align: center; pointer-events: none; }
.cy-wheel-center p { margin: 0; }
.cy-wheel-k { font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.cy-wheel-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(1rem, 2.4vw, 1.35rem); line-height: 1.15; margin: var(--s-1) 0 !important; text-wrap: balance; }
.cy-wheel-sub { font-size: .8rem; line-height: 1.35; color: var(--stone); text-wrap: balance; }
.cy-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cy-legend a { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-3); min-height: 44px; padding: var(--s-1) var(--s-3); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; }
.cy-legend a:hover, .cy-legend a:focus-visible { background: #fff; }
.cy-legend a.is-now { background: #fff; box-shadow: inset 4px 0 0 var(--accent); }
.cy-legend b { min-width: 8rem; }
.cy-legend span { font-size: var(--fs-small); color: var(--stone); }
.cy-sw { flex: none; width: 1.1rem; height: 1.1rem; border-radius: 3px; background: var(--c); }

/* The timeline */
.cy-tl { list-style: none; margin: var(--s-6) 0 var(--s-8); padding: 0; }
.cy-tl-item { display: grid; grid-template-columns: 8.5rem 3rem minmax(0, 1fr); grid-template-areas: "when rail card"; scroll-margin-top: 100px; }
.cy-tl-item:target .cy-tl-card { outline: 3px solid var(--gold); outline-offset: 3px; }
.cy-tl-when { grid-area: when; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: var(--s-5); text-align: right; }
.cy-tl-date { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; }
.cy-tl-sub { font-size: var(--fs-small); color: var(--stone); }
.cy-tl-len { margin-top: var(--s-1); font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.cy-tl-rail { grid-area: rail; position: relative; }
.cy-tl-rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--c); }
.cy-tl-item:first-child .cy-tl-rail::before { top: calc(var(--s-5) + 11px); }
.cy-tl-item:last-child .cy-tl-rail::before { bottom: auto; height: calc(var(--s-5) + 11px); }
.cy-tl-node { position: absolute; left: 50%; top: var(--s-5); width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 4px var(--scroll), 0 0 0 6px var(--c); }
.cy-tl-item.is-now .cy-tl-node { width: 30px; height: 30px; margin: -4px 0 0 -15px; box-shadow: 0 0 0 4px var(--scroll), 0 0 0 7px var(--accent); }
.cy-tl-card { grid-area: card; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); margin-bottom: var(--s-6); background: #fff;
  border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); overflow: hidden; }
.cy-tl-item.is-now .cy-tl-card { box-shadow: 0 0 0 2px var(--accent); }
.cy-tl-item--brief .cy-tl-card { grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); }
.cy-tl-art { margin: 0; display: flex; flex-direction: column; background: var(--linen); }
.cy-tl-art img { display: block; flex: 1 1 auto; width: 100%; height: 100%; min-height: 10rem; object-fit: cover; }
.cy-tl-art figcaption { padding: var(--s-2) var(--s-3); font-size: .75rem; line-height: 1.4; color: var(--stone); }
.cy-tl-art figcaption a { color: var(--ink); }
.cy-tl-body { padding: var(--s-5); }
.cy-tl-body > p { margin: 0 0 var(--s-3); }
.cy-tl-body h3 { margin: 0 0 var(--s-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.cy-tl-body h3 a { color: var(--ink); }
.cy-tl-keys, .cy-card-roots, .cy-card-color { font-size: var(--fs-small); }
.cy-tl-keys span, .cy-card-roots span, .cy-card-color span, .cy-read span { font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep); margin-right: var(--s-1); }
.cy-tl-prog { margin: 0 0 var(--s-4); padding: var(--s-2) var(--s-3); background: var(--accent-soft); border-radius: var(--radius); font-size: var(--fs-small); font-weight: 600; }
.cy-tl-prog[hidden] { display: none; }
.cy-tl-bar { display: block; height: 6px; margin-bottom: var(--s-2); background: rgba(42, 91, 140, .18); border-radius: var(--radius-pill); overflow: hidden; }
.cy-tl-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.cy-card-now { font-family: var(--font-display); font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-fg); }
.cy-card-now[hidden] { display: none; }
.cy-card-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); }
.cy-soon { margin: 0; font-size: var(--fs-small); font-style: italic; color: var(--stone); }

.cy-dates { margin-bottom: var(--s-8); }
.cy-table-wrap { max-width: 44rem; }
.cy-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cy-table caption { text-align: left; font-size: var(--fs-small); color: var(--stone); padding-bottom: var(--s-2); }
.cy-table th, .cy-table td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); text-align: left; }
.cy-table thead th { font-family: var(--font-display); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; background: var(--linen); }
.cy-table tbody th { font-weight: 600; }
.cy-table td { white-space: nowrap; }
.cy-calendars { margin-bottom: var(--s-8); }

/* Lists: how churches keep it, what the Bible doesn't say, the calendars */
.cy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); max-width: 60rem; }
.cy-list li { padding: var(--s-3) var(--s-4); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cy-list b { display: block; margin-bottom: var(--s-1); }
.cy-list--silent li { border-left: 4px solid var(--stone); }

/* Season page */
.cy-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s-4) var(--s-6); margin: 0 0 var(--s-8);
  padding: var(--s-5); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); }
.cy-facts dt { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.cy-facts dd { margin: var(--s-1) 0 0; }
.cy-body { max-width: 46rem; }
.cy-body > section { margin-bottom: var(--s-8); }
.cy-body h2 { margin: 0 0 var(--s-3); }
.cy-body > section > p { max-width: 62ch; }
.cy-root { padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.cy-root h3 { margin: 0 0 var(--s-3); }
.cy-root h3 cite { display: block; margin-top: var(--s-1); font-family: var(--font-body); font-style: normal; font-weight: 600; font-size: var(--fs-small); color: var(--accent); }
.cy-root h4 { margin: var(--s-5) 0 var(--s-2); font-size: .78rem; font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.cy-verse { margin: var(--s-5) 0; padding: var(--s-5) var(--s-6); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.cy-verse blockquote { margin: 0; }
.cy-verse blockquote p { margin: 0; font-family: var(--font-scripture); font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.45; }
.cy-verse figcaption { margin-top: var(--s-3); font-size: var(--fs-small); color: var(--stone); }
.cy-verse figcaption cite { font-style: normal; font-weight: 600; color: var(--ink); }
.cy-read { font-size: var(--fs-small); margin: var(--s-4) 0 0; }
.cy-f39 { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s-4); margin: 0; padding: 0; }
.cy-f39-item > a, .cy-f39-item > div { display: block; height: 100%; padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--accent); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.cy-f39-item > a:hover { border-color: var(--accent); }
.cy-f39-item > a:hover h3 { text-decoration: underline; }
.cy-f39-item--soon > div { border-top-color: var(--line); }
.cy-f39-item h3 { margin: 0 0 var(--s-1); font-size: var(--fs-h4); }
.cy-f39-item p { margin: 0; font-size: var(--fs-small); }
.cy-f39-k { font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--s-1) !important; }
.cy-f39-item .cy-soon { margin-top: var(--s-2); }
.cy-art-note { font-size: var(--fs-small); color: var(--stone); max-width: 62ch; }
.cy-art-note a { color: var(--ink); }

/* Email sign-up */
.cy-email { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-5) var(--s-7); align-items: start; margin: 0 0 var(--s-7);
  padding: var(--s-6); background: var(--linen); border-top: 4px solid var(--accent); border-radius: var(--radius); scroll-margin-top: 100px; }
.cy-email h2 { margin: 0 0 var(--s-2); font-size: var(--fs-h3); }
.cy-email p { margin: 0; }
.cy-notify { margin-top: 0; max-width: none; }
.cy-pick { border: 0; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-2); }
.cy-pick legend { padding: 0; margin-bottom: var(--s-2); font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.cy-opt { display: flex; align-items: flex-start; gap: var(--s-3); min-height: 44px; padding: var(--s-2) var(--s-3); background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); cursor: pointer; }
.cy-opt:has(input:checked) { border-color: var(--accent); }
.cy-opt input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--accent); }
.cy-opt input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cy-opt b { display: block; }
.cy-opt small { display: block; font-size: var(--fs-small); color: var(--stone); }
.notify.is-done .cy-pick { display: none; }

.cy-pager { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.cy-pager a { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: var(--s-2) var(--s-4); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; }
.cy-pager a:hover { border-color: var(--accent); }
.cy-pager small { font-weight: 400; font-size: .75rem; color: var(--stone); }
.cy-pager .cy-pager-all { justify-content: center; margin-left: auto; }

@media (max-width: 1023px) {
  .cy-email { grid-template-columns: minmax(0, 1fr); }
  .cy-year-grid { grid-template-columns: minmax(0, 1fr); }
  .cy-wheel { margin-inline: auto; max-width: 420px; }
  .cy-tl-card { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .cy-tl-item { grid-template-columns: 2.75rem minmax(0, 1fr); grid-template-areas: "rail when" "rail card"; }
  .cy-tl-when { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-2); padding: var(--s-5) 0 0 var(--s-2); text-align: left; }
  .cy-tl-date { font-size: 1.3rem; }
  .cy-tl-len { flex-basis: 100%; margin-top: 2px; }
  .cy-tl-card, .cy-tl-item--brief .cy-tl-card { grid-template-columns: minmax(0, 1fr); margin-top: var(--s-3); }
  .cy-tl-art img { height: auto; aspect-ratio: 16 / 9; }
  .cy-tl-item--brief .cy-tl-art { display: none; }
}
@media (max-width: 479px) {
  .cy-verse { padding: var(--s-4); }
  .cy-email { padding: var(--s-4); }
  .cy-table th, .cy-table td { padding: var(--s-2); font-size: .85rem; }
  .cy-pager .cy-pager-all { margin-left: 0; }
}

/* A reading plan (/church-year/lent-reading-plan): the weeks, a day per row, a tick box each (js/reading-plan.js) */
.rp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.rp-count { margin: 0; font-weight: 600; color: var(--accent); }
.rp-count[hidden] { display: none; }
.rp-week { padding: var(--s-6) 0 var(--s-2); border-top: 1px solid var(--line); }
.rp-week h3 { margin: 0 0 var(--s-2); }
.rp-week h3 small { display: block; margin-bottom: var(--s-1); font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.rp-about { margin: 0 0 var(--s-4); color: var(--stone); max-width: 60ch; }
.rp-days { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); max-width: 60rem; }
.rp-day { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-2); align-items: start; padding: var(--s-3) var(--s-4) var(--s-3) var(--s-2);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.rp-day input { width: 22px; height: 22px; margin: 11px; accent-color: var(--accent); cursor: pointer; }
.rp-day label { display: block; cursor: pointer; padding-top: 9px; }
.rp-day label b { display: block; font-size: 1.05rem; }
.rp-when { font-size: var(--fs-small); color: var(--stone); }
.rp-text p { margin: var(--s-1) 0 0; }
.rp-ref { font-size: var(--fs-small); font-weight: 600; }
.rp-ref cite { font-style: normal; }
.rp-look { color: var(--ink); }
.rp-day:has(input:checked) { background: var(--linen); }
.rp-day:has(input:checked) label b { text-decoration: line-through; text-decoration-color: var(--stone); }
.rp-day.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rp-today { display: inline-block; padding: .1rem .5rem; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-fg);
  font-family: var(--font-display); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.rp-page .earn-strip { margin: var(--s-7) 0 0; }
@media (max-width: 479px) {
  .rp-day { padding-right: var(--s-3); }
}
@media print {
  .rp-day { break-inside: avoid; }
  .rp-page .earn-strip, .rp-page .cy-email, .rp-page .cy-pager { display: none; }
}
