:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --ink: #2b2622;
  --muted: #6b625a;
  --line: #e6dfd3;
  --primary: #2f4a3a;
  --primary-ink: #ffffff;
  --gold: #a4823f;
  --gold-soft: #f4ecdc;
  --ok: #3f7a52;
  --warn: #b0603a;
  --radius: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.lead { color: var(--muted); font-size: 1.05rem; }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }

/* Header & step navigation */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand svg { width: 30px; height: 30px; fill: none; stroke-width: 2.5; }
.brand svg circle:first-child { stroke: var(--gold); }
.brand svg circle:last-child { stroke: var(--primary); }
.parish-chip { font-size: .8rem; color: var(--muted); background: var(--gold-soft); padding: 4px 10px; border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
.steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps a { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: .85rem; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: var(--bg); }
.steps a.done { color: var(--ok); }
.steps a.done::before { content: '✓'; font-weight: 600; }
.steps a.current { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.steps a.locked { opacity: .45; pointer-events: none; }

main { padding: 32px 16px 24px; outline: none; }
.foot { color: var(--muted); font-size: .8rem; text-align: center; padding-bottom: 32px; }

/* Cards & choices */
.section { margin: 0 0 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head .status { font-size: .85rem; color: var(--muted); }
.section-head .status.ok { color: var(--ok); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.choice { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, box-shadow .15s; }
.choice.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 74, 58, .12); }
.choice-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; margin: 0; }
.choice-meta { font-size: .8rem; color: var(--muted); margin: 2px 0 0; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); border-radius: 99px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }

.big-choice { display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.big-choice:hover:not(:disabled) { border-color: var(--gold); }
.big-choice:disabled { opacity: .5; cursor: not-allowed; }
.big-choice .choice-title { margin-bottom: 4px; }
.big-choice p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Intercessions: whole option is a label */
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.option:has(input:checked) { border-color: var(--primary); background: #f6f9f6; }
.option input { margin-top: 4px; accent-color: var(--primary); width: 18px; height: 18px; flex: none; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--primary); background: var(--primary); color: var(--primary-ink); font: 500 .95rem var(--sans); padding: 10px 20px; border-radius: 99px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.small { padding: 6px 14px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 4px; }
input[type=text], input[type=email], textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 74, 58, .12); }
input:disabled { background: var(--bg); color: var(--muted); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.hint { font-size: .85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Review */
.missing { border-color: #ecc9b7; background: #fdf6f2; }
.missing ul { margin: 8px 0 0; padding-left: 20px; }
.missing a { color: var(--warn); }
.report { padding: 28px clamp(18px, 5vw, 44px); }
.notice { padding: 14px 16px; border-radius: 12px; margin: 12px 0; }
.notice.error { background: #fdf0ec; color: #8a3a1e; }
.notice.success { background: #eef6f0; color: #2c5a3b; }
.success-hero { text-align: center; padding: 32px 0 8px; }
.success-hero .ring { font-size: 3rem; color: var(--gold); }

/* Readings: title list on the left, full text on the right */
main.wide { max-width: 1120px; }
.readings-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 20px; align-items: start; }
.rl { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: 118px; max-height: calc(100vh - 136px); overflow-y: auto; }
.rl-group + .rl-group { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.rl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 10px 4px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.rl-head .status { font-size: .72rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.rl-head .status.ok { color: var(--ok); }
.rl-item { display: flex; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: .92rem; color: var(--ink); background: none; border: 0; border-left: 3px solid transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer; line-height: 1.35; }
.rl-item:hover { background: var(--bg); }
.rl-no { color: var(--muted); min-width: 1.8em; font-variant-numeric: tabular-nums; }
.rl-item.chosen { background: #eaf3ec; color: var(--ok); font-weight: 600; }
.rl-item.chosen .rl-no { color: var(--ok); }
.rl-item.chosen .rl-title::after { content: ' ✓'; }
.rl-item.active { border-left-color: var(--gold); background: var(--gold-soft); }
.rl-item.chosen.active { background: #dcebdf; border-left-color: var(--ok); }
.rl-item .badge { margin-left: 6px; }
.rd { padding: 24px clamp(18px, 4vw, 36px); min-height: 60vh; scroll-margin-top: 118px; }
.rd h2 { font-size: 1.9rem; margin-bottom: 4px; }
.rd-kind { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.rd .full { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.rd-alleluia { font-style: italic; }
.rd-action { margin: 16px 0 0; }
.btn.chosen { background: var(--ok); border-color: var(--ok); }
.rd-back { display: none; margin-top: 16px; }

@media (max-width: 760px) {
  .readings-layout { grid-template-columns: 1fr; }
  .rl { position: static; max-height: none; }
  .rd { scroll-margin-top: 110px; }
  .rd-back { display: inline-flex; }
}

@media (max-width: 520px) {
  .brand { font-size: 1.15rem; white-space: nowrap; }
  .brand svg { width: 24px; height: 24px; }
  .parish-chip { font-size: .72rem; max-width: 42vw; }
}

@media print {
  .top, .foot, .no-print, .nav-buttons { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .card { border: 0; padding: 0; }
}
