:root {
  --directive-blue: #075ea8;
  --directive-blue-dark: #064474;
  --directive-gold: #d8aa3b;
  --directive-red: #9c1f22;
  --directive-ink: #252525;
  --directive-muted: #666;
  --directive-paper: #fffdf7;
  --directive-line: #d8d2c4;
  --directive-shadow: 0 8px 24px rgba(28, 35, 42, .12);
  --directive-radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.directives-home,
body.directive-page,
body.directive-legacy-updated {
  margin: 0;
  color: var(--directive-ink);
  background: #f3efe6 url("../bkgnd.gif");
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.58;
}
img { max-width: 100%; height: auto; }
a { color: #064f8d; }
a:hover { color: #8b181b; }
button, input { font: inherit; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10000; padding: .65rem 1rem; background: #fff; }
.skip-link:focus { left: .5rem; top: .5rem; }

.site-header { background: linear-gradient(180deg, var(--directive-blue), var(--directive-blue-dark)); border-bottom: 3px solid var(--directive-gold); }
.site-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; max-width: 1450px; margin: auto; padding: .35rem .75rem; font-family: Arial, Helvetica, sans-serif; font-size: .9rem; }
.site-nav a { color: #fff; text-decoration: none; padding: .5rem .65rem; border-radius: 4px; }
.site-nav a:hover, .site-nav a:focus, .site-nav a[aria-current="page"] { background: rgba(255,255,255,.17); color: #fff; }

.directives-layout { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 900px) minmax(220px, 285px); gap: 1.25rem; max-width: 1480px; margin: 1.25rem auto; padding: 0 1rem; align-items: start; }
.directives-main, .directive-shell { background: var(--directive-paper); border: 1px solid var(--directive-line); border-radius: var(--directive-radius); box-shadow: var(--directive-shadow); }
.directives-main { padding: clamp(1rem, 3vw, 2rem); }
.directives-side { font-family: Arial, Helvetica, sans-serif; font-size: .9rem; }
.directives-side--right iframe { width: 100%; min-height: 1500px; border: 0; background: transparent; }
.holy-hour { display: grid; justify-items: center; gap: .4rem; text-align: center; text-decoration: none; margin-bottom: 1rem; }
.side-card { display: grid; gap: .2rem; padding: .8rem; margin-bottom: 1rem; background: rgba(255,255,255,.82); border: 1px solid var(--directive-line); border-radius: 8px; }
.side-card h2 { color: var(--directive-red); margin: 0 0 .3rem; font: 700 1.35rem Rockwell, Georgia, serif; }
.side-card a { padding: .24rem .3rem; text-decoration: none; font-weight: 700; border-radius: 4px; }
.side-card a:hover { background: #eef5fb; }

.directives-hero { text-align: center; }
.directives-hero > img { width: min(100%, 650px); border: 1px solid #666; border-radius: 7px; }
.directives-hero blockquote { max-width: 760px; margin: 1rem auto; padding: .9rem 1.2rem; background: #f8f3e5; border-left: 5px solid var(--directive-gold); text-align: left; }
.directives-hero blockquote p { margin: 0; }
.directives-hero cite { display: block; margin-top: .4rem; text-align: right; }
.directives-intro h1 { margin-bottom: .25rem; color: var(--directive-blue-dark); font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.05; }
.action-row, .directive-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .55rem .85rem; color: #fff; background: var(--directive-blue); border: 1px solid var(--directive-blue-dark); border-radius: 6px; text-decoration: none; cursor: pointer; }
.button-link:hover, .button-link:focus { color: #fff; background: var(--directive-blue-dark); }
.button-link--donate { background: var(--directive-red); border-color: #721417; }

.directive-finder { margin-top: 1.5rem; }
.finder-heading { display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: 1rem; align-items: end; }
.finder-heading h2 { margin-bottom: 0; color: var(--directive-red); }
.finder-heading p { margin-top: .2rem; color: var(--directive-muted); }
.finder-heading label { display: grid; gap: .25rem; font-family: Arial, Helvetica, sans-serif; font-size: .88rem; font-weight: 700; }
.finder-heading input { width: 100%; padding: .65rem .7rem; border: 1px solid #999; border-radius: 6px; background: #fff; }
.number-jump { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0; font-family: Arial, Helvetica, sans-serif; font-size: .85rem; }
.number-jump a { padding: .3rem .52rem; background: #edf4f9; border: 1px solid #b8cedf; border-radius: 5px; text-decoration: none; }
.directive-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .8rem; padding: 0; list-style: none; }
.directive-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: .45rem; align-items: center; min-height: 48px; padding: .45rem .55rem; background: rgba(255,255,255,.78); border: 1px solid #e1dccf; border-radius: 6px; content-visibility: auto; contain-intrinsic-size: 48px; }
.directive-list li:target { outline: 3px solid var(--directive-gold); background: #fff9d7; }
.directive-number { min-width: 3.2rem; color: var(--directive-red); font: 700 .93rem Arial, Helvetica, sans-serif; }
.directive-link { font-weight: 700; line-height: 1.25; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pdf-link { display: inline-flex; align-items: center; gap: .18rem; white-space: nowrap; font: 700 .78rem Arial, Helvetica, sans-serif; text-decoration: none; }
.pdf-link img { width: 19px; height: 20px; }
.new-marker { width: 32px; height: 16px; }
.no-results { padding: 1rem; border: 1px dashed #999; text-align: center; }

.store-rail { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--directive-line); }
.store-rail-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.store-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 31%); gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .3rem 0 .8rem; }
.store-cards a { display: grid; align-content: end; min-height: 125px; padding: 1rem; color: #fff; background: linear-gradient(145deg, #0a69b4, #073d68); border: 1px solid #0a3658; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.14); scroll-snap-align: start; text-decoration: none; }
.store-cards a:nth-child(even) { background: linear-gradient(145deg, #9f292d, #671619); }
.store-cards strong { font-size: 1.05rem; }
.store-cards span { font-size: .85rem; opacity: .9; }
.mission-note { margin-top: 1.5rem; padding: 1rem; background: #fff6cf; border: 1px solid #e2cb65; border-radius: 8px; }

.directive-shell { max-width: 980px; margin: 1.4rem auto; padding: clamp(1rem, 4vw, 2.5rem); }
.directive-header { display: grid; grid-template-columns: 182px minmax(0,1fr); grid-template-areas: "emblem logo" "heading heading"; gap: .8rem 1.2rem; align-items: center; }
.directive-emblem { grid-area: emblem; justify-self: center; }
.directive-logo { grid-area: logo; justify-self: center; }
.directive-heading { grid-area: heading; text-align: center; }
.directive-heading .eyebrow { margin: 0; color: var(--directive-red); font: 700 .85rem/1.2 Arial, Helvetica, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.directive-heading h1 { margin: .2rem 0 .8rem; color: var(--directive-blue-dark); font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.15; }
.scripture { margin: 1rem auto; padding: .9rem 1.2rem; background: #f6f0df; border-left: 5px solid var(--directive-gold); font-size: 1.05em; }
.directive-rule { border: 0; border-top: 2px solid var(--directive-line); margin: 1.2rem 0; }
.directive-body p { margin: 0 0 1.05rem; }
.directive-body p > strong:first-child { color: #651417; }
.directive-body img { display: block; margin: .8rem auto; }
.directive-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 2rem 0 1rem; }
.directive-pagination a { display: grid; padding: .75rem; background: #eef5fa; border: 1px solid #b7ccdc; border-radius: 7px; text-decoration: none; }
.directive-pagination a.next { text-align: right; }
.directive-pagination span { color: var(--directive-muted); font: .78rem Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.directive-pagination--legacy { margin: 1rem 0; }
.distribution-note { padding: .8rem 1rem; background: #fff7c9; border: 1px solid #dcc45b; border-radius: 7px; }

.directive-legacy-updated { max-width: none; }
.directive-legacy-updated > *:not(.site-header):not(.site-footer) { max-width: 1050px; margin-left: auto; margin-right: auto; }
.directive-legacy-updated img[src*="direct"] { max-width: 100%; height: auto; }

.site-footer { margin-top: 1.5rem; padding: 1.2rem max(1rem, calc((100% - 1100px)/2)); color: #eee; background: #30363b; font: .82rem/1.5 Arial, Helvetica, sans-serif; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .9rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: .35rem 0; }

@media (max-width: 1100px) {
  .directives-layout { grid-template-columns: 190px minmax(0,1fr); }
  .directives-side--right { display: none; }
}
@media (max-width: 760px) {
  body.directives-home, body.directive-page, body.directive-legacy-updated { font-size: 17px; }
  .directives-layout { display: block; padding: 0 .55rem; }
  .directives-side--left { display: none; }
  .directive-list { grid-template-columns: 1fr; }
  .finder-heading { grid-template-columns: 1fr; }
  .store-cards { grid-auto-columns: 82%; }
  .directive-header { grid-template-columns: 110px minmax(0,1fr); }
  .directive-emblem { width: 110px; }
  .directive-pagination { grid-template-columns: 1fr; }
  .directive-pagination a.next { text-align: left; }
}
@media print {
  .site-header, .site-footer, .directive-actions, .directive-pagination, #donorbox-donation-button, .directives-side { display: none !important; }
  body.directive-page { background: #fff; color: #000; font-size: 11pt; }
  .directive-shell { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  a { color: #000; text-decoration: none; }
}
