@font-face {
  font-family: "DM Sans";
  src: url("./dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("./playfair-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f5eb;
  --panel: #fffcf3;
  --ink: #19362b;
  --muted: #526055;
  --line: #ded5bf;
  --accent: #83571c;
  --tint: #f2ead6;
  --evergreen: #16382a;
  --gold: #f2cf85;
  --hero-text: #f9f3e4;
  --heading: "Playfair Display", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --reading-size: 100%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #14251e;
    --panel: #1b2e25;
    --ink: #faf0db;
    --muted: #c9cbbd;
    --line: #546052;
    --accent: #f2cf85;
    --tint: #2b3b2d;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14251e;
  --panel: #1b2e25;
  --ink: #faf0db;
  --muted: #c9cbbd;
  --line: #546052;
  --accent: #f2cf85;
  --tint: #2b3b2d;
}

:root[data-font="0"] { --reading-size: 87.5%; }
:root[data-font="2"] { --reading-size: 112.5%; }
:root[data-font="3"] { --reading-size: 125%; }
:root[data-font="4"] { --reading-size: 150%; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--reading-size); }
body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--body);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.12; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .13em; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
[id] { scroll-margin-top: 1.25rem; }
a, h1, h2, p { overflow-wrap: break-word; }
.icon { flex: none; width: 1.15em; height: 1.15em; vertical-align: -.17em; }
.shell { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 3;
  left: 1rem;
  top: 1rem;
  padding: .5rem 1rem;
  background: var(--panel);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  min-height: 4.6rem;
  gap: .3rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  color: inherit;
  font: 700 1.65rem/1 var(--heading);
  letter-spacing: -.045em;
  text-decoration: none;
}
.brand .icon { color: var(--accent); width: .88em; height: .88em; }
.header-nav, .preferences {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.header-nav { gap: 1.85rem; }
.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.header-nav a:hover, .header-nav [aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: .5em;
}
.preferences {
  padding: .15rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
}
.icon-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .32rem;
  background: transparent;
  border: 0;
  border-radius: .45rem;
  font-size: .93rem;
  font-weight: 700;
}
.icon-button:hover { background: var(--tint); }
.icon-button:disabled { opacity: .55; cursor: default; }
.theme-toggle { border-left: 1px solid var(--line); }
.theme-toggle .sun, .theme-toggle[aria-pressed="true"] .moon { display: none; }
.theme-toggle[aria-pressed="true"] .sun { display: inline; }

.hero {
  position: relative;
  display: grid;
  isolation: isolate;
  background: #101f16;
  color: var(--hero-text);
}
.hero-image, .hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
}
.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero::after {
  content: "";
  background:
    linear-gradient(90deg, #0b2018 0%, #0c2017ed 19%, #10251873 51%, transparent 75%),
    linear-gradient(0deg, #0e241b 0%, #10251950 37%, transparent 72%);
}
.hero-inner { padding-block: clamp(3.6rem, 7vw, 6.6rem) 2.2rem; }
.hero-copy { max-width: 37rem; }
.eyebrow {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  color: var(--accent);
  font-size: .73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.hero .eyebrow, .page-banner .eyebrow { color: var(--gold); }
.hero-date {
  padding: .38rem .75rem;
  border: 1px solid #e7c37e67;
  border-radius: 2rem;
  background: #1b35287f;
}
.hero h1 {
  margin: .85rem 0 1.1rem;
  font-size: clamp(3.75rem, 7.4vw, 6.55rem);
  font-weight: 550;
  line-height: .99;
  letter-spacing: -.065em;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-copy > p { max-width: 27rem; color: #e4e6d9; font-size: 1.08rem; }
.hero-actions { display: flex; align-items: center; gap: .55rem 1.4rem; flex-wrap: wrap; margin-top: 1.65rem; }
.button, .hero-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  width: fit-content;
  min-height: 44px;
  font-weight: 750;
  font-size: .9rem;
  text-decoration: none;
}
.button { padding: .65rem 1rem; border: 1px solid transparent; border-radius: .5rem; }
.button-gold { background: var(--gold); color: #203526; }
.button-gold:hover { background: #ffdfa0; }
.button-outline { border-color: var(--line); background: var(--panel); }
.button-outline:hover { border-color: var(--accent); background: var(--tint); }
.hero-link { color: #fcf4df; }
.hero-link:hover { text-decoration: underline; }
.hero-link .icon { color: var(--gold); }
.hero a:focus-visible { outline-color: var(--gold); }

.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .7rem 2rem;
  margin-top: clamp(2.4rem, 5vw, 4.3rem);
  padding: .85rem 1.25rem;
  border: 1px solid #d7bb8170;
  border-radius: .85rem;
  background: #182e24ed;
}
.countdown-heading { display: flex; align-items: center; gap: .9rem; }
.countdown-icon {
  display: grid;
  place-items: center;
  min-width: 2.65rem;
  min-height: 2.65rem;
  border-radius: .52rem;
  background: #2f4030;
  color: var(--gold);
}
.countdown h2 { font-size: 1.2rem; font-weight: 600; }
.countdown-heading p { margin-top: .15rem; color: #d1d7c7; font-size: .8rem; }
.timer { display: flex; align-items: stretch; justify-content: center; }
.timer-unit {
  display: grid;
  min-width: 5.4rem;
  padding: .1rem .55rem;
  justify-items: center;
  align-content: center;
}
.timer-unit + .timer-unit { border-left: 1px solid #dec9924d; }
.timer-unit strong, .christmas-greeting {
  color: var(--gold);
  font: 600 1.85rem/1.1 var(--heading);
  font-variant-numeric: lining-nums tabular-nums;
}
.timer-unit > span { margin-top: .2rem; color: #e5e7d9; font-size: .7rem; }
.christmas-greeting { padding: .35rem .5rem; }

.days-section { padding-block: 3.65rem 3.2rem; }
.section-heading { max-width: 48rem; margin: 0 auto 2rem; text-align: center; }
.section-heading h2 { margin: .5rem 0 .65rem; font-size: clamp(2rem, 4.3vw, 3.15rem); letter-spacing: -.05em; }
.section-heading p, .home-share p, .footer-inner p { color: var(--muted); }
.day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.day-grid li { display: flex; }
.day-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  width: 100%;
  min-height: 5.7rem;
  padding: .8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .65rem;
  text-decoration: none;
}
.day-card:hover { border-color: var(--accent); background: var(--tint); }
.day-card[aria-current="date"] { border: 2px solid var(--accent); padding: calc(.8rem - 1px); }
.day-date {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 3.2rem;
  min-height: 3.5rem;
  padding: .2rem;
  border-radius: .38rem;
  background: var(--tint);
  color: var(--accent);
}
.day-date strong { font: 650 1.55rem/1 var(--heading); }
.day-date > span { margin-top: .13rem; font-size: .62rem; font-weight: 800; letter-spacing: .13em; }
.day-copy { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .35rem; }
.day-title { font: 650 1.23rem/1.2 var(--heading); }
.today-label { color: var(--accent); font-size: .73rem; font-weight: 800; }
.day-theme { flex-basis: 100%; margin-top: .23rem; color: var(--muted); font-size: .84rem; }
.day-card > .icon { color: var(--accent); }

.home-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--tint);
}
.home-share h2 { margin-bottom: .25rem; font-size: 1.6rem; }
.site-footer { padding-block: 2rem; border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem 1rem;
}
.footer-inner p { margin-top: .5rem; font-size: .85rem; }
.footer-inner nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }

.page-banner {
  padding-block: 1rem 2.6rem;
  background: linear-gradient(100deg, #142e23, #1d4331);
  color: var(--hero-text);
}
.page-banner .hero-link { margin-bottom: .65rem; }
.page-banner .eyebrow { display: flex; width: fit-content; margin-bottom: .65rem; }
.page-banner h1 { max-width: 55rem; font-size: clamp(2rem, 6vw, 3.9rem); letter-spacing: -.045em; }
.page-banner p { margin-top: .55rem; color: #e9e3d1; }
.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 4.9vw, 4.4rem);
  padding-block: 2rem 3.5rem;
}
.reading-sidebar nav {
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--panel);
}
.reading-sidebar h2 { font-size: 1.2rem; }
.reading-sidebar ol { margin: .55rem 0 0; padding-left: 1.2rem; font-size: .89rem; }
.reading-sidebar ol a { display: inline-flex; align-items: center; min-height: 44px; }
.reading-sidebar .share { margin-top: .7rem; }
.reading-section { padding-block: 1.65rem; border-bottom: 1px solid var(--line); }
.reading-section:first-child { padding-top: 0; }
.reading-section h2, .info-body h2 { font-size: clamp(1.55rem, 3.3vw, 2.2rem); }
.reading-text { margin-top: 1rem; max-width: 70ch; font-size: 1.03rem; line-height: 1.8; }
.reading-text > p + p, .verse + .verse { margin-top: .85rem; }
.reading-note, .reading-theme { color: var(--muted); font-size: .92rem; }
.reading-theme { margin-top: .45rem; }
.prayer-details, .song {
  margin-top: .65rem;
  padding-inline: .85rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--panel);
}
summary { min-height: 44px; padding-block: .4rem; cursor: pointer; font-weight: 750; }
details[open] > p:last-child { margin-bottom: .8rem; }
.song .reading-note { margin-bottom: .55rem; }
.refrain {
  width: fit-content;
  padding: .55rem .9rem;
  border-left: .2rem solid var(--accent);
  background: var(--tint);
}
.gozos { padding-left: 1.65rem; }
.gozos li { padding-left: .35rem; margin-top: 1rem; }
.gozos li::marker { color: var(--accent); font-weight: 700; }
.editorial {
  padding: .85rem 1rem;
  margin-top: 1.3rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--tint);
  font-size: .92rem;
}
.day-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1.5rem; }
.pager-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--panel);
  text-decoration: none;
}
.pager-link:hover { border-color: var(--accent); }
.pager-link small { display: block; color: var(--muted); }
.pager-link strong { font-family: var(--heading); }
.pager-link .icon { color: var(--accent); }
.info-body { max-width: 50rem; padding-block: 2rem 3.5rem; }
.info-body h2 { margin: 1.35rem 0 .65rem; }
.info-body h2:first-child { margin-top: 0; }
.info-body p + p, .info-body li + li { margin-top: .65rem; }

@media (max-width: 970px) {
  .day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-inner { column-gap: .75rem; }
  .header-nav { gap: 1rem; }
}

@media (max-width: 850px) {
  .timer { flex: 1 1 auto; }
  .timer-unit { flex: 1 1 0; min-width: 0; }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { padding-block: .55rem .15rem; }
  .header-nav { order: 1; flex-basis: 100%; }
  .header-nav a { min-height: 44px; }
  .brand { font-size: 1.4rem; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .reading-sidebar ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: 1.7rem; }
  .reading-layout, .days-section { padding-top: 2.3rem; }
}

@media (max-width: 650px) {
  .hero-inner { padding-top: clamp(13.5rem, 59vw, 20rem); padding-bottom: 1.15rem; }
  .hero-image { bottom: auto; height: clamp(23rem, 91vw, 30rem); }
  .hero-image img { object-position: center 42%; }
  .hero::after { background: linear-gradient(180deg, #0a1e1526 0, #10221926 9rem, #101f168c 15rem, #101f16 25rem); }
  .hero h1 { font-size: clamp(2.1rem, 11vw, 4.5rem); letter-spacing: -.055em; }
  .hero-copy > p { font-size: 1rem; }
  .hero-actions { margin-top: 1rem; }
  .countdown { align-items: stretch; flex-direction: column; margin-top: 1.6rem; padding: .75rem; }
  .timer-unit { flex: 1 1 0; min-width: 0; padding-inline: .25rem; }
  .countdown h2 { font-size: 1.1rem; }
  .countdown-icon { min-width: 2rem; min-height: 2rem; }
  .timer-unit strong { font-size: 1.55rem; }
  .christmas-greeting { text-align: center; }
}

@media (max-width: 480px) {
  .day-grid { grid-template-columns: minmax(0, 1fr); }
  .home-share { padding: 1rem; margin-bottom: 2rem; }
  .header-inner { column-gap: .4rem; }
  .header-nav a { font-size: .82rem; }
}

@media (max-width: 360px) {
  .day-pager { grid-template-columns: minmax(0, 1fr); }
  .timer-unit > span { font-size: .58rem; }
}
