/* Load once with preserved archive fragments. All selectors remain scoped.
   Horizontal reading is the default. Desktop vertical reading is opt-in through
   .jra-preserve-vertical-mode on an ancestor; mobile remains horizontal. */
.jra-preserved-archive { overflow-wrap:anywhere; line-height:1.85; }
.jra-preserved-archive [hidden] { display:none !important; }
.jra-preserved-archive img { max-width:100%; height:auto; object-fit:contain; }
.jra-preserved-archive iframe { display:block; width:100%; max-width:100%; height:auto; aspect-ratio:16/9; border:0; }
.jra-preserved-archive ruby { ruby-position:over; }
.jra-preserved-archive rt { font-size:.55em; }
.jra-preserved-archive del { text-decoration:line-through; }
.jra-preserved-archive .jra-preserve-uta { font-size:1.12em; }
.jra-preserved-archive .jra-preserve-mae { font-size:.95em; }
.jra-preserved-archive .jra-preserve-bold,
.jra-preserved-archive .jra-preserve-bbold { font-weight:700; }
.jra-preserved-archive .jra-preserve-bbold { font-size:1.1em; }
.jra-preserved-archive .jra-preserve-small { font-size:.85em; }
.jra-preserved-archive .jra-preserve-middle { font-size:1.3em; }
.jra-preserved-archive .jra-preserve-mlarge { font-size:1.5em; }
.jra-preserved-archive .jra-preserve-large,
.jra-preserved-archive .jra-preserve-fs2,
.jra-preserved-archive .jra-preserve-fs2em { font-size:2em; }
.jra-preserved-archive .jra-preserve-center,
.jra-preserved-archive .jra-preserve-aligncenter { text-align:center; }
.jra-preserved-archive .jra-preserve-right { text-align:right; }
.jra-preserved-archive .jra-preserve-left { text-align:left; }
.jra-preserved-archive .jra-preserve-poem { margin:1.4em clamp(.5em,4vw,3em); }
.jra-preserved-archive .jra-preserve-iny { margin-inline-start:1em; }
.jra-preserved-archive .jra-preserve-half { margin-block:1.3em; }
.jra-preserved-archive .jra-preserve-dl3 { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:.4em 1.2em; }
.jra-preserved-archive .jra-preserve-dl3 > :is(dt,dd) { margin:0; }
.jra-preserved-archive .jra-preserve-dlx { grid-template-columns:5em minmax(0,1fr); }
.jra-preserved-archive .jra-preserve-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:1.3rem; margin-block:1.4rem; }
.jra-preserved-archive .jra-preserve-gallery > br { display:none; }
.jra-preserved-archive .jra-preserve-gallery-item { margin:0; min-width:0; }
.jra-preserved-archive .jra-preserve-gallery-icon { margin:0; text-align:center; }
.jra-preserved-archive .jra-preserve-gallery-caption { margin:.5em 0 0; font-size:.9em; }
.jra-preserved-archive .jra-preserve-background { display:block; margin-block:.8em; max-height:30rem; }
.jra-preserved-archive .jra-preserve-toggle-heading { font-weight:700; margin-top:1.5em; }
.jra-preserved-archive .jra-preserve-inert-form { border:1px solid currentColor; padding:.8em; opacity:.8; }
.jra-preserved-archive .jra-preserve-screen-reader-only:not(:focus) { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.jra-preserved-archive table { width:100%; border-collapse:collapse; }
.jra-preserved-archive :is(th,td) { padding:.5em; border:1px solid #ddd; vertical-align:top; overflow-wrap:anywhere; }
@media (min-width:1024px) {
 .jra-preserve-vertical-mode .jra-preserved-archive { overflow-x:auto; }
 .jra-preserve-vertical-mode .jra-preserved-archive .jra-preserve-vertical-source { writing-mode:vertical-rl; text-orientation:mixed; inline-size:min(42rem,78vh); max-inline-size:78vh; block-size:auto; margin:1.5em 0; }
 .jra-preserve-vertical-mode .jra-preserved-archive .jra-preserve-vertical-source :is(img,iframe,figure,.jra-preserve-gallery,[lang="en"]) { writing-mode:horizontal-tb; text-orientation:mixed; }
}
@media (max-width:767px) {
 .jra-preserved-archive .jra-preserve-dl3 { grid-template-columns:minmax(0,1fr); }
 .jra-preserved-archive .jra-preserve-dl3 > dd { margin-bottom:1em; }
 .jra-preserved-archive .jra-preserve-vertical-source { writing-mode:horizontal-tb; height:auto; }
}
@media print {
 .jra-preserved-archive { overflow:visible; }
 .jra-preserved-archive .jra-preserve-vertical-source { writing-mode:horizontal-tb !important; inline-size:auto !important; max-inline-size:none !important; block-size:auto !important; }
 .jra-preserved-archive :is(img,figure,.jra-preserve-gallery-item) { break-inside:avoid; }
}
/* The archived Home (page631) originally placed white lettering over a hero
   background. Its preserved background image is an independent image, not a
   text underlay. Correct only its eight original white declarations where no
   inline background is retained on the element or any ancestor. The stored
   source HTML and all other source colours remain unchanged. */
.jra-preserved-archive[data-jra-source-type="page"][data-jra-source-id="631"] :is([style^="color:#ffffff;" i],[style*=";color:#ffffff;" i]):not([style*="background" i]):not([style*="background" i] *) {
 color:var(--jra-ink,#1C3144) !important;
}
/* Keep the original heading hierarchy readable on narrow archive pages. */
.jra-preserved-archive[data-jra-source-type="page"][data-jra-source-id="631"] h1 {
 font-size:clamp(1.65rem,5vw,2.4rem) !important;
 line-height:1.45;
}
