/* /today.html — builds on style.css variables (--ink, --paper, --panel, --border, --accent, --accent-2, --link) */

.today {
  --lit: #d4af37;
  --lit-ink: #7a5d00;
  --gold: #b8860b;
  max-width: 44rem;
  margin: 0 auto;
}

/* liturgical colours; "white" is drawn as gold so it shows on a pale page */
.lit-white  { --lit: #d4af37; }
.lit-red    { --lit: #b3261e; }
.lit-purple { --lit: #6b3fa0; }
.lit-green  { --lit: #2e7d32; }
.lit-rose   { --lit: #d4719b; }

@media (prefers-color-scheme: dark) {
  .today { --gold: #e0b94a; --lit-ink: #e0b94a; }
  .lit-white  { --lit: #e6c65a; }
  .lit-red    { --lit: #ef6b62; }
  .lit-purple { --lit: #a77fdc; }
  .lit-green  { --lit: #5cb860; }
  .lit-rose   { --lit: #ee9bbd; }
}

.t-dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--lit);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent);
  margin-right: 0.4em;
  vertical-align: baseline;
  flex: none;
}

/* hero */
.t-hero {
  text-align: center;
  padding: 0.5rem 0 1.25rem;
  border-bottom: 3px double var(--border);
  margin-bottom: 0.5rem;
}
.t-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.t-date-hero {
  margin: 0.25rem 0 0.4rem;
  font-size: 2rem;
  line-height: 1.2;
}
.t-season {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--lit);
  border-radius: 99px;
  color: var(--ink);
  font-size: 0.92rem;
}

/* section headings with a rule */
.t-sec {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.t-sec-small { font-size: 1rem; margin-top: 0.5rem; }

/* cards */
.t-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.15rem;
  margin: 0 0 0.9rem;
}
.t-card h3 {
  margin: 0.4rem 0 0.2rem;
  font-size: 1.3rem;
  line-height: 1.3;
}
.t-card p { margin: 0.35rem 0; }
.t-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

/* observance cards: coloured left stripe */
.t-obs { border-left: 6px solid var(--lit); }
.t-obs.grade-6, .t-obs.grade-7 {
  background: linear-gradient(180deg, color-mix(in srgb, var(--lit) 10%, var(--panel)), var(--panel) 70%);
}
.t-badge {
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: 0.25rem;
  color: var(--paper);
  background: var(--accent-2);
}
.grade-3 .t-badge, .grade-4 .t-badge, .grade-5 .t-badge { background: var(--accent); }
.grade-6 .t-badge, .grade-7 .t-badge { background: var(--gold); }
.t-colour { display: inline-flex; align-items: center; font-size: 0.9rem; color: var(--accent-2); }
.t-common { margin: 0; color: var(--accent-2); font-style: italic; }
.t-meaning { font-size: 0.92rem; color: var(--ink); }

.t-hdo {
  margin: 0 0 0.9rem;
  padding: 0.6rem 1rem;
  border: 1px solid #b3261e;
  border-radius: 0.4rem;
  background: color-mix(in srgb, #b3261e 12%, var(--panel));
  text-align: center;
}

.t-readings {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.2rem 1rem;
  margin: 0.8rem 0 0.2rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  font-size: 0.95rem;
}
.t-readings dt { color: var(--accent-2); }
.t-readings dd { margin: 0; }
.t-short { color: var(--accent-2); font-size: 0.88rem; }

.t-readings-link { text-align: center; margin: 1rem 0 0; }
.t-btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 0.3rem;
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
}
.t-btn:hover { background: var(--accent); color: var(--paper); }

/* first-Mass cards */
.t-history { border-top: 4px solid var(--gold); }
.t-when { font-weight: bold; color: var(--gold); }
.t-gap {
  font-size: 0.85rem;
  color: var(--accent-2);
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 99px;
}
.t-gap-today {
  color: var(--ink);
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 18%, var(--panel));
  font-weight: bold;
}
.t-history h3 a { color: var(--ink); text-decoration: none; }
.t-history h3 a:hover { color: var(--link); text-decoration: underline; }
.t-priest, .t-expedition { color: var(--accent-2); font-size: 0.95rem; }
.t-note { margin-top: 0.7rem !important; }
.t-more { margin-bottom: 0 !important; font-weight: bold; }
.t-more a { color: var(--link); }

/* quote */
.today { overflow-wrap: break-word; }
.t-quote { margin-left: 0; margin-right: 0; border-left: 6px solid var(--accent); }
.t-quote blockquote { margin: 0; }
.t-quote blockquote p { font-size: 1.15rem; font-style: italic; margin: 0 0 0.7rem; }
.t-quote figcaption { display: flex; flex-direction: column; gap: 0.15rem; }
.t-cite { color: var(--accent-2); font-size: 0.85rem; overflow-wrap: anywhere; }
a.t-cite { color: var(--link); }

/* coming up */
.t-ahead { list-style: none; padding: 0.35rem 1.15rem; }
.t-ahead li {
  display: grid;
  grid-template-columns: 6.2rem 1rem 6.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0 0.4rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.t-ahead li:last-child { border-bottom: 0; }
.t-ahead .t-dot { margin: 0; align-self: start; margin-top: 0.4em; }
.t-name { overflow-wrap: anywhere; }
.t-date { font-weight: bold; white-space: nowrap; }
.t-rank { font-size: 0.82rem; color: var(--accent-2); white-space: nowrap; }
.t-ahead .grade-6 .t-rank, .t-ahead .grade-7 .t-rank { color: var(--gold); font-weight: bold; }
.t-extra { display: block; font-size: 0.85rem; color: var(--accent-2); }
.t-hdo-mark { color: #b3261e; font-weight: bold; margin-right: 0.3em; }
.t-legend { margin: -0.4rem 0 0; font-size: 0.85rem; color: var(--accent-2); text-align: right; }

.t-muted { color: var(--accent-2); font-size: 0.9rem; }

/* credits */
.t-credits {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
  border-top: 3px double var(--border);
  font-size: 0.88rem;
}
.t-credits ul { margin: 0.5rem 0 0.8rem; padding-left: 1.2rem; }
.t-credits li { margin-bottom: 0.3rem; }
.t-credits a { color: var(--link); }

@media (max-width: 34rem) {
  .t-date-hero { font-size: 1.55rem; }
  .t-card h3 { font-size: 1.15rem; }
  .t-ahead li { grid-template-columns: 5.6rem 0.9rem minmax(0, 1fr); }
  .t-date { font-size: 0.95rem; }
  .t-ahead .t-rank { grid-column: 3; }
  .t-ahead .t-name { grid-column: 3; }
  .t-readings { grid-template-columns: 1fr; }
  .t-readings dd { margin-bottom: 0.3rem; }
}
