:root {
  --ink: #2b2620;
  --rubric: #9c2b1b;     /* liturgical red */
  --gold: #b08a3e;
  --paper: #fbf7ee;
  --paper-edge: #efe7d4;
  --line: #d9cfb8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Crimson Text", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.5;
}

.site-header {
  text-align: center;
  padding: 2.2rem 1rem 1rem;
  border-bottom: 2px solid var(--gold);
}
.site-header h1 {
  font-family: "Crimson Text", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--rubric);
}
.subtitle { margin: 0.3rem 0 0; color: #6c6151; font-style: italic; }

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 3rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.year-picker label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #82765f;
  margin-bottom: 0.25rem;
}
.year-picker select {
  font-family: inherit;
  font-size: 1.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  min-width: 7rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.actions button {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: #fff;
  color: var(--rubric);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.actions button:hover { background: var(--rubric); color: #fff; border-color: var(--rubric); }
.actions button:disabled { opacity: 0.45; cursor: not-allowed; }

.dates { margin: 1.4rem 0 0.5rem; }
#date-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
#date-table th, #date-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
#date-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #82765f;
}
#date-table td:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
#date-table td[lang="la"] { font-style: italic; color: var(--rubric); }

.score-wrap {
  margin: 1.6rem 0 0.5rem;
  padding: 1.6rem 1.2rem;
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.proclamation-title {
  font-family: "Crimson Text", Georgia, serif;
  text-align: center;
  color: var(--ink);
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0.2rem 0 0.7rem;
}
.rubric {
  color: var(--rubric);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: justify;
  margin: 0 0 1.5rem;
}
.score { width: 100%; }
.score svg { display: block; max-width: 100%; height: auto; }
.score-msg { color: #9a8d74; font-style: italic; margin: 0.6rem 0 0; }

.gabc-source { margin-top: 1.4rem; }
.gabc-source summary { cursor: pointer; color: #82765f; letter-spacing: 0.04em; }
#gabc-text {
  white-space: pre-wrap;
  word-break: break-word;
  background: #2b2620;
  color: #f1e9d6;
  padding: 1rem;
  border-radius: 6px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 0.7rem;
}

.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.1rem 3rem;
  font-size: 0.85rem;
  color: #8a7e68;
}
.site-footer a { color: var(--rubric); }
.site-footer .credit { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--line); color: #6c6151; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .score-wrap { border: none; box-shadow: none; padding: 0; }
  main { padding: 0; }
}
