/* Horarium brand board: vellum leaves on a Lampblack surround. Brand values live in tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--lampblack); color: var(--lampblack); font: 400 1.0625rem/1.5 var(--font-text); font-kerning: normal; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--rubric); }
:focus-visible { outline: 2px solid var(--lampblack); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 20; padding: 10px 16px; background: var(--vellum); color: var(--lampblack); }
.skip:focus { top: 8px; }

/* The mark */
.mk rect { fill: var(--lampblack); }
.mk rect.on { fill: var(--rubric); }

/* Board grid */
.board { display: grid; gap: clamp(10px, 1.2vw, 16px); width: min(100% - 2 * clamp(10px, 2.4vw, 40px), 1600px); margin: clamp(10px, 2.4vw, 40px) auto; scroll-margin-top: var(--dd-bar-h, 0px); }
.board:focus { outline: 0; }
@media (min-width: 960px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--wide { grid-column: 1 / -1; }
}
.tile { --tp: clamp(20px, 3vw, 44px); position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--tp); background: var(--vellum); overflow: hidden; container-type: inline-size; }
@media (min-width: 960px) { .tile:not(.tile--wide):not(.tile--colophon) { min-height: clamp(520px, 40vw, 680px); } }
.tile--deep { background: var(--vellum-deep); }

/* Tile label: a Roman numeral and a small-caps name */
.tl { display: flex; align-items: baseline; gap: 12px; color: var(--stone); font-size: 1rem; font-variant-caps: all-small-caps; letter-spacing: .1em; }
.tl__n { min-width: 2.6em; color: var(--lampblack); font-family: var(--font-display); font-size: .8125rem; letter-spacing: .12em; }
.th { margin: 14px 0 clamp(20px, 3cqi, 36px); color: var(--rubric); font: 400 clamp(1rem, 2.6cqi, 1.3125rem)/1.3 var(--font-display); letter-spacing: .16em; text-transform: uppercase; }
.note { margin-top: auto; padding-top: 20px; max-width: 58ch; color: var(--stone); font-size: .9375rem; font-style: italic; }
.note a { color: var(--lampblack); }

/* I. Cover */
.cover { display: grid; place-items: center; align-content: center; flex: 1; gap: 22px; padding-block: 48px; text-align: center; }
.lockup-h { display: flex; align-items: center; gap: .55em; font-size: clamp(1.75rem, 7.4cqi, 3.75rem); font-weight: 400; }
.lockup-h .mk { width: 1.5em; height: 1.5em; flex: none; }
.lockup-h .caps { letter-spacing: .3em; margin-right: -.3em; }
.cover__line { font-size: clamp(1.125rem, 3cqi, 1.5rem); font-style: italic; }
.tile__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--stone); font-size: 1rem; }
.tile__foot a { color: var(--lampblack); }

/* Hour colours arrive as inline custom properties taken from the app: --g ground, --i ink, --m muted, --r rubric, --h halo */

/* II. The Vespers sky with the stacked lockup in that hour's colours */
.tile--paint { padding: 0; min-height: 420px; background: var(--g); }
.tile--paint img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.paint-lock { position: absolute; left: 50%; top: 22%; display: grid; justify-items: center; gap: 18px; transform: translateX(-50%); color: var(--i); }
.paint-lock .mk { width: clamp(52px, 10cqi, 84px); }
.paint-lock .mk rect { fill: var(--i); }
.paint-lock .mk rect.on { fill: var(--r); }
.paint-lock .caps { font-size: clamp(1.25rem, 4.4cqi, 2.25rem); letter-spacing: .34em; margin-right: -.34em; text-shadow: 0 0 .35em var(--h), 0 0 1.1em var(--h); }
.tl--on-paint { position: absolute; left: var(--tp); bottom: var(--tp); color: var(--i); text-shadow: 0 0 .35em var(--h), 0 0 1.1em var(--h); }
.tl--on-paint .tl__n { color: var(--i); }

/* III. The mark: construction left, lockups right, sizes and hour states as a strip beneath */
.mark { display: grid; gap: clamp(24px, 3cqi, 40px); }
@container (min-width: 960px) { .mark { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } .mstrip { grid-column: 1 / -1; } }
.con { display: grid; gap: 28px; align-items: center; }
@container (min-width: 560px) { .con { grid-template-columns: 1.15fr 1fr; } }
.con__svg { width: 100%; max-width: 420px; margin-inline: auto; overflow: visible; }
.con__strokes rect { fill: var(--lampblack); }
.con__strokes rect.on { fill: var(--rubric); }
.con__names { fill: var(--stone); font-family: var(--font-text); letter-spacing: .04em; }
.con__spec { display: grid; gap: 14px; }
.con__spec div { padding-top: 10px; border-top: 1px solid var(--rule); }
.con__spec dt { font-size: .9375rem; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--stone); }
.con__spec dd { font-size: 1rem; }

.sizes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 28px; }
.sizes li { display: grid; justify-items: center; gap: 10px; color: var(--stone); font-size: .875rem; font-variant-numeric: lining-nums; }
.s128 { width: 128px; } .s64 { width: 64px; } .s32 { width: 32px; } .s24 { width: 24px; }
.s16 { width: 16px; height: 16px; } .s32f { width: 32px; height: 32px; }
.mstrip { display: grid; gap: 28px clamp(24px, 4cqi, 64px); padding-top: 24px; border-top: 1px solid var(--rule); }
@container (min-width: 960px) { .mstrip { grid-template-columns: auto minmax(0, 1fr); align-items: end; } }
.mstrip__f { display: grid; gap: 14px; align-content: end; }
.mstrip__f figcaption { max-width: 52ch; color: var(--stone); font-size: .9375rem; font-style: italic; }
.states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; }
@container (min-width: 960px) { .states { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.states li { display: grid; justify-items: center; gap: 8px; font-size: .9375rem; font-variant-caps: all-small-caps; letter-spacing: .08em; }
.st__chip { display: grid; place-items: center; width: 64px; height: 64px; background: var(--g); box-shadow: inset 0 0 0 1px var(--rule); }
.states .mk { width: 40px; }
.states .mk rect { fill: var(--i); }
.states .mk rect.on { fill: var(--r); }

.locks { display: grid; gap: clamp(10px, 1.4cqi, 16px); }
@container (min-width: 480px) { .locks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lk { display: grid; grid-template-rows: 1fr auto; gap: 12px; min-width: 0; }
.lk__art { display: grid; place-items: center; min-height: 180px; padding: 24px; border: 1px solid var(--rule); }
.lk figcaption { color: var(--stone); font-size: .9375rem; font-variant-caps: all-small-caps; letter-spacing: .1em; }
.lockup-h--sm { font-size: clamp(1rem, 1.6cqi, 1.375rem); }
.lockup-s { display: grid; justify-items: center; gap: 16px; }
.lockup-s .mk { width: 64px; }
.lockup-s .caps { font-size: 1.25rem; letter-spacing: .32em; margin-right: -.32em; }
.mk-alone { width: 88px; }
.icons { display: flex; gap: 20px; justify-content: center; }
.icon { display: grid; place-items: center; width: 104px; height: 104px; }
.icon .mk { width: 64%; }
.icon--dark { background: var(--lampblack); }
.icon--dark .mk rect { fill: var(--vellum); }
.icon--dark .mk rect.on { fill: var(--rubric-lift); }
.icon--light { background: var(--vellum); box-shadow: inset 0 0 0 1px var(--gilt); }

/* IV. Colour: the five, then the season colours */
.pal { display: grid; gap: 8px; flex: 1; }
@container (min-width: 520px) { .pal { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sw { display: flex; flex-direction: column; gap: 4px; min-height: 120px; padding: 14px 12px; font-size: .9375rem; line-height: 1.35; }
@container (min-width: 520px) { .sw { min-height: 260px; } }
.sw strong { font-weight: 500; font-size: 1.0625rem; }
.sw .hex { font-variant-numeric: lining-nums; letter-spacing: .04em; }
.sw .use { margin-top: auto; }
.sw .ct { font-size: .875rem; font-style: italic; }
.sw--vellum { background: var(--vellum); box-shadow: inset 0 0 0 1px var(--rule); }
.sw--lamp { background: var(--lampblack); color: var(--vellum); }
.sw--rubric { background: var(--rubric); color: var(--vellum); }
.sw--gilt { background: var(--gilt); color: var(--lampblack); }
.sw--stone { background: var(--stone); color: var(--vellum); }

/* V. Colour through the day */
.hrs { flex: 1; width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: lining-nums; }
.hrs thead th { padding: 0 6px 8px; color: var(--stone); font-weight: 400; font-size: .9375rem; font-variant-caps: all-small-caps; letter-spacing: .1em; text-align: left; }
.hrs tbody tr { border-top: 1px solid var(--rule); }
.hrs th[scope="row"], .hrs td { padding: 5px 6px; vertical-align: middle; font-weight: 400; text-align: left; white-space: nowrap; }
.hrs th[scope="row"] { padding-left: 0; width: 34%; }
.hrs__s { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 12px; background: var(--g); }
.hrs__n { color: var(--r); font: 400 .875rem/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase; }
.hrs__g { color: var(--i); font-size: .9375rem; font-style: italic; }
.chip { display: inline-block; width: 14px; height: 14px; margin-right: 7px; vertical-align: -2px; box-shadow: inset 0 0 0 1px var(--rule); }
@container (max-width: 500px) {
  .hrs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hrs tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 0; }
  .hrs th[scope="row"] { grid-column: 1 / -1; width: auto; padding: 0; }
  .hrs td { padding: 0; }
  .hrs td::before { content: attr(data-k); display: block; color: var(--stone); font-size: .875rem; font-variant-caps: all-small-caps; letter-spacing: .1em; }
}

.note--pal { padding-top: 14px; }
.sublabel { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--stone); font-size: 1rem; font-variant-caps: all-small-caps; letter-spacing: .1em; }
.seasons { display: grid; gap: 10px; margin-top: 12px; }
.seasons li { display: grid; grid-template-columns: 4px 1fr; align-content: start; column-gap: 12px; font-size: .9375rem; line-height: 1.3; }
.seasons li > :nth-child(n+3) { grid-column: 2; }
.seasons .band { grid-row: 1 / span 3; width: 4px; height: auto; }
.seasons strong { font-weight: 500; }
.seasons .hex { color: var(--stone); font-size: .875rem; font-variant-numeric: lining-nums; }
@container (min-width: 520px) {
  .seasons { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .seasons li { grid-template-columns: 1fr; row-gap: 2px; }
  .seasons li > :nth-child(n+3) { grid-column: 1; }
  .seasons .band { grid-row: auto; width: 100%; height: 10px; margin-bottom: 8px; }
}
.band--green { background: var(--season-green); }
.band--violet { background: var(--season-violet); }
.band--white { background: var(--season-white); box-shadow: inset 0 0 0 1px var(--gilt); }
.band--red { background: var(--season-red); }
.band--rose { background: var(--season-rose); }

/* VI. Type */
.type { display: grid; align-content: space-between; gap: 10px; flex: 1; padding-top: 24px; }
.type__cinzel { color: var(--rubric); font-size: clamp(2.5rem, 13cqi, 6rem); letter-spacing: .14em; line-height: 1; }
.type__meta { max-width: 52ch; margin-bottom: 18px; color: var(--stone); font-size: .9375rem; }
.type__meta strong { color: var(--lampblack); font-weight: 500; }
.type__garamond { font-size: clamp(1.375rem, 4.6cqi, 2.125rem); line-height: 1.25; }
.type__italic { color: var(--rubric); font-size: clamp(1.25rem, 3.6cqi, 1.625rem); }
.type__sc { font-size: 1.25rem; font-variant-caps: all-small-caps; letter-spacing: .1em; }
.type__sc span { color: var(--stone); font-variant-caps: normal; letter-spacing: 0; font-style: italic; font-size: 1rem; }
.type__pair { display: grid; gap: 6px; margin-top: 18px; }
.type__pair p { display: flex; align-items: baseline; gap: 14px; padding: 10px 14px; background: var(--g); color: var(--i); font-size: clamp(1.125rem, 3.4cqi, 1.375rem); line-height: 1.3; }
.type__pair p:first-child { font-weight: 500; box-shadow: inset 0 0 0 1px var(--rule); }
.type__pair p:last-child { font-weight: 400; }
.type__pair span { flex: none; min-width: 2.2em; color: var(--m); font-size: .875rem; font-weight: 400; font-style: italic; font-variant-numeric: lining-nums; }

/* VII. The rubric rule, on a day sky and a night sky */
.rr { display: grid; gap: clamp(14px, 2cqi, 24px); }
@container (min-width: 760px) { .rr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rr__f { display: grid; grid-template-rows: 1fr auto; gap: 12px; min-width: 0; }
.rr__f figcaption { color: var(--stone); font-size: .9375rem; font-style: italic; }
.specimen { padding: clamp(22px, 3.4cqi, 40px); background: var(--g) top center / 720px auto no-repeat; color: var(--i); text-shadow: 0 0 .35em var(--h), 0 0 1.1em var(--h); }
.specimen--day { background-image: url("assets/sky2-sext.webp"); }
.specimen--night { background-image: url("assets/sky2-compline.webp"); }
.specimen--day .sp-vr, .specimen--day .sp-t { font-weight: 500; }
.sp-h { color: var(--r); font-size: 1.1875rem; letter-spacing: .22em; margin-bottom: 18px; }
.sp-r, .sp-c { color: var(--r); }
.sp-r { margin-bottom: 4px; }
.sp-vr { font-size: 1.1875rem; }
.sp-vr .m { display: inline-block; width: 1.4em; color: var(--r); font-family: var(--font-text), "Segoe UI Symbol", serif; }
.sp-c { margin-top: 22px; font-variant-caps: all-small-caps; letter-spacing: .08em; }
.sp-c em { font-variant-caps: normal; letter-spacing: 0; }
.sp-t { margin-top: 6px; max-width: 34rem; font-size: 1.1875rem; line-height: 1.52; }
.sp-t p { margin-bottom: .45em; }
.sp-t p:first-child::first-letter { float: left; margin: .1em .1em 0 0; color: var(--r); font-family: var(--font-display); font-size: 3.7em; font-weight: 400; line-height: .78; }

/* VIII. The hours */
.hours { display: grid; gap: clamp(16px, 2cqi, 24px) clamp(10px, 1.4cqi, 18px); }
@container (min-width: 440px) { .hours { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 900px) { .hours { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hours img { width: 100%; aspect-ratio: 640 / 358; object-fit: cover; margin-bottom: 12px; }
.hours strong { display: block; color: var(--rubric); font: 400 1rem/1.3 var(--font-display); letter-spacing: .22em; text-transform: uppercase; }
.hours span { color: var(--stone); font-size: .9375rem; font-style: italic; }
.how { display: grid; gap: 20px 32px; align-items: end; margin-top: clamp(24px, 3cqi, 36px); padding-top: 24px; border-top: 1px solid var(--rule); }
@container (min-width: 720px) { .how { grid-template-columns: auto minmax(0, 1fr); } }
.how .note { margin-top: 0; padding-top: 0; }
.how__f { display: grid; gap: 10px; }
.how__f figcaption { color: var(--stone); font-size: .9375rem; font-variant-caps: all-small-caps; letter-spacing: .1em; }
/* the still at four times, nearest neighbour, framed on the chapel */
.dots { width: 320px; max-width: 100%; aspect-ratio: 8 / 5; background: url("assets/still-vespers.png") -1200px -640px / 2560px auto no-repeat; image-rendering: pixelated; }

/* IX. In use */
.screens { display: grid; gap: 32px 24px; justify-content: center; }
@container (min-width: 520px) { .screens { grid-template-columns: repeat(2, minmax(0, 280px)); } }
@container (min-width: 1040px) { .screens { grid-template-columns: repeat(4, minmax(0, 280px)); gap: clamp(24px, 3cqi, 48px); } }
.screens li { display: grid; gap: 14px; justify-items: center; align-content: start; }
.screens img { width: 100%; max-width: 280px; border: 1px solid rgb(28 26 23 / .55); outline: 1px solid var(--gilt); outline-offset: 5px; }
.screens span { max-width: 280px; font-size: .9375rem; text-align: center; color: var(--stone); }
.screens strong { color: var(--lampblack); font-weight: 500; }

/* X. Voice */
.th--big { font-size: clamp(1.5rem, 4cqi, 2.75rem); letter-spacing: .12em; line-height: 1.2; }
.voice { display: grid; gap: 0 clamp(24px, 4cqi, 56px); }
@container (min-width: 720px) { .voice { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vrule { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.vrule h3 { margin-bottom: 8px; font-size: 1rem; font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--stone); }
.vrule p { display: grid; grid-template-columns: 4.5rem 1fr; gap: 12px; font-size: 1.1875rem; }
.vrule .sc { color: var(--stone); font-size: 1rem; padding-top: .15em; }
.vq { margin-right: .5em; color: var(--rubric); font-size: .9375rem; letter-spacing: .22em; }
/* Begin as the app sets it: small Cinzel capitals, a short hairline beneath */
.vrule .vq-b { position: relative; display: inline-block; padding: 0 0 .55em .3em; color: var(--lampblack); font-size: .8125rem; letter-spacing: .3em; line-height: 1.6; }
.vrule .vq-b::after { content: ""; position: absolute; left: 50%; bottom: .2em; width: 2.6em; margin-left: -1.3em; border-top: 1px solid currentColor; opacity: .7; }
.dont { color: var(--stone); }
.dont s { text-decoration-thickness: 1px; }
.parting { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--rule); }
.parting h3 { margin-bottom: 8px; font-size: 1rem; font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--stone); }
.parting p { max-width: 70ch; color: var(--stone); font-size: 1rem; }
.parting p em { color: var(--lampblack); }
.parting ul { display: grid; gap: 6px; margin: 12px 0 16px; }
.parting li { font-size: 1.1875rem; }
.parting li em[lang="la"] { margin-left: .6em; color: var(--stone); font-size: 1rem; }
.parting .parting__c { margin-top: 4px; }

/* Colophon */
.tile--colophon { display: grid; gap: 10px; justify-items: center; padding-block: 36px; background: var(--vellum-deep); text-align: center; color: var(--stone); font-size: 1rem; }
.tile--colophon p { max-width: 70ch; }
.tile--colophon a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lampblack); }
.tile__foot a, .note a { display: inline-block; padding-block: 12px; margin-block: -12px; }
