/* Advent with Saint Joseph — shared styles (matches site palette) */
html { overflow-y: scroll; }
body { background:#eae3d6; margin:0; font-family:Georgia, serif; color:#2e2218; }

/* ── Nav (same as site) ── */
.top-nav { background:#4A3232; color:#F5F1E8; padding:0; position:sticky; top:0; z-index:100; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.top-nav .nav-inner { max-width:1200px; margin:0 auto; padding:0 30px; display:flex; align-items:center; min-height:52px; }
.nav-links { display:none; gap:2em; align-items:center; font-size:1.05rem; }
.nav-links a { color:#F5F1E8; text-decoration:none; letter-spacing:0.02em; }
.nav-links a:hover { text-decoration:underline; }
.menu-toggle { display:flex; align-items:center; gap:6px; background:transparent; border:none; color:#F5F1E8; font-size:1.1rem; font-family:Georgia,serif; cursor:pointer; padding:12px 0; }
.nav-dropdown { display:none; position:absolute; top:100%; left:0; right:0; background:#4A3232; border-top:1px solid rgba(245,241,232,.2); box-shadow:0 8px 16px rgba(0,0,0,.3); padding:12px 0 16px 20px; }
.nav-dropdown.open { display:block; }
.nav-dropdown a { display:block; color:#F5F1E8; text-decoration:none; padding:10px 0; font-size:1.05rem; }
.nav-dropdown a:hover { text-decoration:underline; }
@media (min-width:901px) { .nav-links { display:flex; } .menu-toggle { display:none; } .nav-dropdown { display:none !important; } }
@media (max-width:900px) { .top-nav .nav-inner { position:relative; } }

/* ── Page ── */
.page { max-width:1200px; margin:0 auto; padding:0 16px 60px; }
.reading-panel { background:#f6f2ea; padding:36px 48px; border-radius:10px; margin-top:24px; box-shadow:0 1px 0 rgba(0,0,0,0.04),0 8px 24px rgba(0,0,0,0.06); }
.reading-column { max-width:800px; margin:0 auto; }
a { color:#6B1E2E; }
p { font-size:1.02rem; line-height:1.8; }

.page-eyebrow { font-size:10px; font-weight:700; letter-spacing:0.2em; text-transform:uppercase; color:#9a6a3a; margin:0 0 14px 0; }
.page-eyebrow a { color:#9a6a3a; text-decoration:none; }
.page-eyebrow a:hover { text-decoration:underline; }
.page-title { font-size:2.4rem; color:#6B1E2E; margin:0 0 10px 0; font-weight:normal; line-height:1.15; }
.day-num { display:block; font-size:0.95rem; letter-spacing:0.15em; text-transform:uppercase; color:#2B3A55; margin-bottom:6px; }
.page-dates { font-size:0.98rem; color:#2B3A55; margin:0; line-height:1.6; }
.page-rule { display:block; width:56px; height:2px; background:#c8a25a; border:none; margin:18px 0 28px 0; }
.page-intro { font-size:1.08rem; line-height:1.9; margin:0 0 20px 0; font-style:italic; }

.adv-section { margin-top:32px; padding-top:24px; border-top:1px solid #D3C8B8; }
.adv-section-label { display:block; font-size:10px; font-weight:700; letter-spacing:0.15em; text-transform:uppercase; color:#9a6a3a; margin-bottom:14px; }
.adv-section p:first-of-type { margin-top:0; }
.note { font-size:0.9rem; color:#6b5d4f; line-height:1.7; }

.prayer { margin:16px 0 0; padding:20px 24px; background:#f1ece3; border-radius:6px; border-left:3px solid #6B1E2E; font-style:italic; font-size:1.05rem; line-height:1.85; }
.opening { background:#f1ece3; border-radius:6px; padding:12px 18px; }
.opening summary { cursor:pointer; color:#6B1E2E; font-size:0.98rem; }
.opening .prayer { background:none; border-left:none; padding:8px 0 4px; margin:0; }

.refs { list-style:none; margin:0; padding:0; }
.refs li { padding:6px 0 6px 18px; position:relative; font-size:1.02rem; }
.refs li::before { content:"\2726"; position:absolute; left:0; color:#c8a25a; font-size:0.8rem; top:9px; }
.refs a { text-decoration:none; border-bottom:1px solid #d9c49a; }
.refs a:hover { border-bottom-color:#6B1E2E; }

.journal-prompt { font-size:1.1rem; font-style:italic; color:#2B3A55; }
textarea.journal { width:100%; box-sizing:border-box; font:inherit; font-size:1rem; line-height:1.7; padding:12px 14px; border:1px solid #D3C8B8; border-radius:6px; background:#fffdf8; color:#2e2218; resize:vertical; }
textarea.journal:focus { outline:2px solid #c8a25a; outline-offset:1px; }

.insight { border-top:2px solid #c8a25a; }
.insight-text { font-size:1.35rem; line-height:1.5; color:#6B1E2E; margin:0 0 18px; }
.complete { display:inline-flex; align-items:center; gap:10px; cursor:pointer; font-size:0.98rem; color:#2B3A55; }
.complete input { width:18px; height:18px; accent-color:#6B1E2E; }

.day-nav { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-top:36px; padding-top:20px; border-top:1px solid #D3C8B8; font-size:0.95rem; }
.day-nav a { text-decoration:none; max-width:40%; line-height:1.4; }
.day-nav a:hover { text-decoration:underline; }
.day-nav .next { text-align:right; }
.day-nav .all { white-space:nowrap; color:#9a6a3a; }

/* ── Landing ── */
.today-banner { display:block; margin:0 0 24px; padding:14px 20px; background:#6B1E2E; color:#F5F1E8; border-radius:6px; text-decoration:none; font-size:1.05rem; }
.today-banner:hover { background:#5a1826; }
.today-banner[hidden] { display:none; }
.rule { width:100%; border-collapse:collapse; font-size:0.98rem; }
.rule td { padding:8px 0; border-bottom:1px solid #e1d8c8; vertical-align:top; }
.rule td:last-child { text-align:right; color:#2B3A55; white-space:nowrap; padding-left:16px; }

.movement { margin:8px 0 34px; }
.movement-title { font-weight:normal; font-size:1.4rem; color:#6B1E2E; margin:0 0 6px; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
.movement-title .num { color:#c8a25a; min-width:1.6em; }
.movement-title .when { font-size:0.9rem; color:#2B3A55; margin-left:auto; }
.questions { font-style:italic; color:#6b5d4f; font-size:0.98rem; margin:0 0 12px; }
.day-list { list-style:none; margin:0; padding:0; }
.day-list li { margin-bottom:8px; }
.day-list a { display:flex; align-items:center; gap:14px; padding:10px 14px; background:#f1ece3; border-radius:6px; border-left:3px solid #c8a25a; text-decoration:none; color:#2e2218; transition:background .15s, border-color .15s; }
.day-list a:hover { background:#e9e3d7; border-left-color:#6B1E2E; }
.badge { flex:none; width:44px; text-align:center; background:#fffdf8; border:1px solid #D3C8B8; border-radius:4px; line-height:1.1; padding:4px 0; }
.badge .mon { display:block; font-size:0.65rem; letter-spacing:0.1em; text-transform:uppercase; color:#6B1E2E; }
.badge .dt { display:block; font-size:1.15rem; color:#2B3A55; }
.dtitle { flex:1; font-size:1rem; line-height:1.35; }
.dn { color:#9a6a3a; font-size:0.85rem; margin-right:4px; }
.dnote { display:block; font-size:0.82rem; color:#2B3A55; font-style:italic; }
.done { flex:none; width:20px; color:#6B1E2E; font-size:1.1rem; }
.day-list li.is-done .done::before { content:"\2713"; }
.day-list li.is-today a { background:#fffdf8; border-left-color:#6B1E2E; box-shadow:0 0 0 2px #c8a25a inset; }

.link-cards, .library, .checklist, .resolutions { margin:0; padding:0; }
.link-cards { list-style:none; }
.link-cards li { margin-bottom:10px; }
.link-cards a { display:block; padding:14px 18px; background:#f1ece3; border-radius:6px; border-left:3px solid #c8a25a; text-decoration:none; color:#2e2218; }
.link-cards a:hover { background:#e9e3d7; border-left-color:#6B1E2E; }
.link-cards strong { color:#6B1E2E; font-weight:normal; font-size:1.08rem; }
.link-cards span, .library span { display:block; font-size:0.93rem; color:#6b5d4f; margin-top:4px; line-height:1.6; }
.library { list-style:none; }
.library li { padding:12px 0; border-bottom:1px solid #e1d8c8; }
.library strong { font-weight:normal; font-size:1.05rem; }
.checklist, .resolutions { padding-left:22px; }
.checklist li, .resolutions li { line-height:1.75; margin-bottom:6px; }
.btn { font:inherit; font-size:0.95rem; padding:9px 16px; background:#6B1E2E; color:#F5F1E8; border:none; border-radius:5px; cursor:pointer; }
.btn:hover { background:#5a1826; }

/* ── Paintings ── */
.adv-fig { margin:0 0 28px; }
.adv-fig img { display:block; width:100%; height:auto; border-radius:4px; box-shadow:0 6px 20px rgba(0,0,0,.18); background:#2e2218; }
.adv-fig figcaption { font-size:0.82rem; color:#6b5d4f; line-height:1.55; margin-top:10px; text-align:center; }
.adv-fig figcaption a { color:#6b5d4f; }
/* Tall paintings shouldn't take over the screen on day pages */
.fig-day img { width:auto; max-width:100%; max-height:min(62vh, 560px); margin:0 auto; }
/* Landing: portrait floated beside the introduction on wide screens */
.fig-hero { float:right; width:300px; margin:4px 0 20px 32px; }
@media (max-width:700px) { .fig-hero { float:none; width:auto; max-width:360px; margin:0 auto 24px; } }
/* Phones: keep the painting to roughly a third of the screen so the day's readings show sooner */
@media (max-width:600px) {
  .fig-day img { max-height:34vh; }
  .fig-hero { max-width:240px; }
  .adv-fig figcaption { font-size:0.75rem; }
}
.adv-section { clear:both; }

/* ── Study notes popup ── */
.study-btn { margin-top:4px; }
.study-dialog { width:min(720px, calc(100vw - 32px)); max-height:min(86vh, 900px); padding:0; border:none; border-radius:10px; background:#f6f2ea; color:#2e2218; box-shadow:0 20px 60px rgba(0,0,0,.35); overflow:hidden; }
.study-dialog[open] { display:flex; flex-direction:column; }
.study-dialog::backdrop { background:rgba(40,25,25,.55); }
.dlg-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:22px 28px 14px; border-bottom:1px solid #D3C8B8; background:#f1ece3; }
.dlg-head .adv-section-label { margin-bottom:6px; }
.dlg-head h2 { margin:0; font-weight:normal; font-size:1.45rem; color:#6B1E2E; line-height:1.25; }
.dlg-close { flex:none; background:none; border:none; font-size:2rem; line-height:1; color:#6B1E2E; cursor:pointer; padding:0 4px; }
.dlg-close:hover { color:#2e2218; }
.dlg-body { overflow-y:auto; padding:18px 28px 24px; }
.dlg-body p { font-size:1rem; line-height:1.8; margin:0 0 14px; }
.dlg-body .dlg-task { font-style:italic; color:#2B3A55; }
.dlg-body strong { color:#6B1E2E; font-weight:normal; font-size:1.05rem; }

@media (max-width:600px) {
  .study-dialog { width:100vw; max-width:100vw; max-height:92vh; margin:auto 0 0; border-radius:12px 12px 0 0; }
  .dlg-head, .dlg-body { padding-left:18px; padding-right:18px; }
  .reading-panel { padding:24px 18px; }
  .page-title { font-size:1.8rem; }
  .day-nav { flex-wrap:wrap; }
  .day-nav a { max-width:100%; }
  .day-nav .all { order:3; width:100%; text-align:center; }
  .movement-title .when { margin-left:0; width:100%; }
}

@media print {
  .top-nav, .day-nav, .opening, textarea.journal, .journal-status, .complete, .today-banner, .btn { display:none !important; }
  body { background:#fff; }
  .reading-panel { box-shadow:none; padding:0; background:#fff; }
  .opening[open] { display:block !important; }
  .study-btn, .dlg-close { display:none !important; }
  .study-dialog { display:block !important; position:static; width:auto; max-height:none; box-shadow:none; background:#fff; }
  .dlg-head { background:#fff; padding:12px 0; }
  .dlg-body { overflow:visible; padding:8px 0; }
  a { color:inherit; text-decoration:none; }
}
