@property --gold-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 135deg
}

@property --shimmer-pos {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 0%
}

@keyframes goldSweep {
    0% {
        --gold-angle: 120deg
    }

    50% {
        --gold-angle: 200deg
    }

    to {
        --gold-angle: 120deg
    }
}

@keyframes flamePulse {

    0%,
    to {
        filter: drop-shadow(0 2px 5px #00000029)drop-shadow(0 0 #b9924a00)
    }

    50% {
        filter: drop-shadow(0 2px 8px #0000001a)drop-shadow(0 0 10px #b9924a73)
    }
}

@keyframes stripeBreath {

    0%,
    to {
        opacity: .85
    }

    50% {
        opacity: 1
    }
}

@keyframes tipGlow {

    0%,
    to {
        box-shadow: 0 0 8px 2px var(--accent-gold-glow)
    }

    50% {
        box-shadow: 0 0 18px 6px var(--accent-gold-glow)
    }
}

@keyframes crossGlow {

    0%,
    to {
        text-shadow: 0 2px 6px #0000000f, 0 0 0 var(--accent-gold-soft)
    }

    50% {
        text-shadow: 0 2px 6px #0000000f, 0 0 16px var(--accent-gold-glow)
    }
}

@keyframes btnSweep {
    0% {
        transform: translate(-110%)skew(-18deg)
    }

    to {
        transform: translate(230%)skew(-18deg)
    }
}

@keyframes floatOrnament {

    0%,
    to {
        transform: translateY(0)translate(-50%)
    }

    50% {
        transform: translateY(-3px)translate(-50%)
    }
}

@keyframes inkBloom {
    0% {
        opacity: 0;
        transform: scaleY(.72)
    }

    to {
        opacity: 1;
        transform: scaleY(1)
    }
}

@keyframes rubricate {

    0%,
    to {
        text-shadow: 0 1px #ffffff80, 0 0 #6c101000
    }

    50% {
        text-shadow: 0 1px #ffffff80, 0 0 22px #6c101038
    }
}

@keyframes ruleBreath {

    0%,
    to {
        opacity: .5;
        transform: translate(-50%)scaleX(1)
    }

    50% {
        opacity: .72;
        transform: translate(-50%)scaleX(1.06)
    }
}

@keyframes sealPulse {

    0%,
    to {
        opacity: .28;
        transform: scale(1)rotate(0)
    }

    33% {
        opacity: .44;
        transform: scale(1.06)rotate(6deg)
    }

    66% {
        opacity: .34;
        transform: scale(.96)rotate(-3deg)
    }
}

:root {
    --font-serif: "Ibarra Real Nova", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --font-heading: "Cormorant Garamond", var(--font-serif);
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bg-primary: #fdfaf6;
    --bg-warm: #f8f2e8;
    --surface: #fff;
    --surface-warm: #f4eee2;
    --surface-subtle: #eae2d0;
    --text-body: #221e1b;
    --text-muted: #564f49;
    --text-faint: #655c53;
    --text-heading: #0f0d0b;
    --text-gold: #735725;
    --leather-crimson: #6c1010;
    --leather-crimson-hover: #4f0b0b;
    --accent-red: #8a1414;
    --accent-gold: #b9924a;
    --accent-gold-warm: #d4a85e;
    --accent-gold-soft: #b9924a1a;
    --accent-gold-glow: #b9924a42;
    --gold-foil: linear-gradient(var(--gold-angle), #c8a055 0%, #f5e8b0 22%, #b9924a 46%, #7d6030 74%, #c8a055 100%);
    --crimson-foil: linear-gradient(135deg, #8a1414 0%, #a82424 30%, #6c1010 55%, #3a0808 80%, #8a1414 100%);
    --shadow-gold: 0 0 0 3px var(--accent-gold-glow), 0 10px 35px #b9924a1f;
    --rule-color: #d8cebc;
    --rule-faint: #e8dfd0;
    --ornament: #b4a898;
    --glass-bg: #fdfaf6e6;
    --reading-measure: 66ch;
    --site-width: 1140px;
    --header-h: 76px;
    --shadow-sm: 0 2px 8px #221e1b0d, 0 1px 3px #221e1b08;
    --shadow-md: 0 8px 30px #221e1b12, 0 3px 10px #221e1b0a;
    --shadow-lg: 0 22px 60px #221e1b17, 0 8px 24px #221e1b0d;
    --shadow-inner: inset 0 2px 10px #221e1b0a;
    --bevel-top: inset 0 1px 0 #fffffff0;
    --bevel-bottom: inset 0 -1px 0 #0000000f;
    --ease: cubic-bezier(.25, .1, .25, 1);
    --ease-out-quint: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.5, .64, 1);
    --t-fast: .2s;
    --t-med: .4s;
    --t-slow: .72s;
    --accent-gold-mid: #b9924a2e;
    --crimson-soft: #6c101012;
    --crimson-glow: #6c10102e;
    --header-rule-width: 280px;
    --illumination-bg: #b9924a0a;
    --illumination-edge: #b9924a38;
    --vellum-bg: linear-gradient(150deg, #b9924a0f 0%, #d4a85e07 50%, #b9924a0f 100%);
    --runic-dot: radial-gradient(circle at center, var(--accent-gold) 0%, var(--accent-gold) 30%, transparent 70%);
    --spine-ribbing: repeating-linear-gradient(180deg, transparent 0px, transparent 10px, #00000006 10px, #00000006 11px);
    --gold-hairline: linear-gradient(90deg, transparent, var(--accent-gold) 30%, var(--accent-gold-warm) 50%, var(--accent-gold) 70%, transparent);
    --double-rule-gold: linear-gradient(180deg, var(--accent-gold) 0px, var(--accent-gold) 1px, transparent 1px, transparent 3px, #b9924a47 3px, #b9924a47 4px)
}

[data-theme=dark] {
    --bg-primary: #070605;
    --bg-warm: #0d0b09;
    --surface: #100e0c;
    --surface-warm: #161310;
    --surface-subtle: #1c1914;
    --text-body: #eae6df;
    --text-muted: #a49c93;
    --text-faint: #9a9086;
    --text-heading: #fbf9f5;
    --text-gold: #d4b683;
    --leather-crimson: #ad1e1e;
    --leather-crimson-hover: #8b1616;
    --accent-red: #ce2c2c;
    --accent-gold: #cda96e;
    --accent-gold-warm: #e8ca8c;
    --accent-gold-soft: #cda96e17;
    --accent-gold-glow: #cda96e4d;
    --gold-foil: linear-gradient(var(--gold-angle), #e8ca8c 0%, #fff4d0 25%, #cda96e 50%, #9a7848 76%, #e8ca8c 100%);
    --shadow-gold: 0 0 0 3px #cda96e33, 0 10px 42px #0000008c;
    --rule-color: #282420;
    --rule-faint: #201d19;
    --ornament: #4c4640;
    --glass-bg: #070605e6;
    --shadow-sm: 0 2px 10px #000000b3, 0 1px 3px #00000080;
    --shadow-md: 0 10px 44px #000000d9, 0 4px 18px #0009;
    --shadow-lg: 0 28px 80px #000000fa, 0 10px 32px #000000bf;
    --shadow-inner: inset 0 2px 10px #000000e0;
    --bevel-top: inset 0 1px 0 #ffffff0e;
    --bevel-bottom: inset 0 -1px 0 #000000e0;
    --accent-gold-mid: #cda96e29;
    --crimson-soft: #ad1e1e14;
    --crimson-glow: #ce2c2c38;
    --header-rule-width: 220px;
    --illumination-bg: #cda96e07;
    --illumination-edge: #cda96e33
}

[data-theme=sepia] {
    --bg-primary: #f0e5ce;
    --bg-warm: #e9dbbe;
    --surface: #f7edda;
    --surface-warm: #e5d5b4;
    --surface-subtle: #d8c49a;
    --text-body: #3a2c1c;
    --text-muted: #685440;
    --text-faint: #6a5439;
    --text-heading: #251808;
    --text-gold: #664a1a;
    --leather-crimson: #8f251a;
    --leather-crimson-hover: #6f1c14;
    --accent-red: #a6301c;
    --accent-gold: #9a6e2e;
    --accent-gold-warm: #ba8c44;
    --accent-gold-soft: #9a6e2e1f;
    --accent-gold-glow: #9a6e2e38;
    --rule-color: #ceb898;
    --rule-faint: #dcccac;
    --ornament: #a88e68;
    --glass-bg: #f0e5ceeb
}

[data-theme=high-contrast] {
    --bg-primary: #fff;
    --bg-warm: #fff;
    --surface: #fff;
    --surface-warm: #f0f0f0;
    --surface-subtle: #e0e0e0;
    --text-body: #000;
    --text-muted: #111;
    --text-heading: #000;
    --text-gold: #3e2c00;
    --leather-crimson: #000;
    --accent-red: #600000;
    --accent-gold: #3e2c00;
    --rule-color: #444;
    --ornament: #000;
    --glass-bg: #fff;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-gold: 0 0 0 3px #3e2c00
}

[data-theme=high-contrast] .search-title,
[data-theme=high-contrast] .drop-cap {
    -webkit-text-fill-color: var(--text-heading);
    color: var(--text-heading);
    text-shadow: none;
    background: 0 0;
    animation: none
}

*,
:before,
:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scrollbar-gutter: stable;
    font-size: 20px;
    line-height: 1.8;
    font-family: var(--font-serif);
    background: var(--bg-primary);
    color: var(--text-body);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 2rem);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizelegibility;
    font-optical-sizing: auto;
    font-variant-numeric: oldstyle-nums proportional-nums;
    font-feature-settings: "kern" 1, "liga" 1, "dlig" 1, "onum" 1;
    color-scheme: light dark;
    overflow-x: clip
}

body {
    background-color: var(--bg-primary);
    min-height: 100dvh;
    color: var(--text-body);
    -webkit-hyphens: auto;
    hyphens: auto;
    flex-direction: column;
    display: flex;
    overflow-x: hidden
}

body:before {
    content: "";
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: multiply;
    background: radial-gradient(88% 62% at 50% 26%, #0000 36%, #0000000b 100%);
    position: fixed;
    inset: 0
}

[data-theme=dark] body:before {
    background: radial-gradient(55% 38% at 50% 0, #b9823212 0%, #0000 100%), radial-gradient(88% 62% at 50% 26%, #0000 24%, #000000b8 100%)
}

body:after {
    content: "";
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.024'/%3E%3C/svg%3E");
    position: fixed;
    inset: 0
}

[data-theme=dark] body:after {
    mix-blend-mode: overlay;
    opacity: .58
}

button {
    cursor: pointer;
    font: inherit;
    color: inherit;
    background: 0 0;
    border: none;
    padding: 0
}

input,
textarea,
select {
    caret-color: var(--accent-gold)
}

:focus-visible {
    outline: 3px solid var(--text-gold);
    outline-offset: 3px;
    border-radius: 4px
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--text-gold);
    outline-offset: 4px;
    border-radius: 6px
}

::-webkit-scrollbar {
    background: var(--bg-primary);
    border-left: 1px solid var(--rule-faint);
    width: 12px
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ornament) 0%, var(--rule-color) 48%, var(--ornament) 100%);
    border: 3px solid var(--bg-primary);
    transition: background var(--t-fast) var(--ease);
    border-radius: 10px;
    box-shadow: inset 1px 1px #ffffff47, inset -1px -1px #0000001a
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-foil)
}

[data-theme=dark] ::-webkit-scrollbar-thumb {
    box-shadow: inset 1px 1px #ffffff0f, inset -1px -1px #0000008c
}

.progress-container {
    z-index: 10001;
    pointer-events: none;
    background: 0 0;
    width: 100%;
    height: 3px;
    position: fixed;
    top: 0;
    left: 0
}

.progress-bar {
    background: var(--crimson-foil);
    border-radius: 0 3px 3px 0;
    width: 0%;
    height: 100%;
    transition: width .1s linear;
    position: relative;
    box-shadow: 0 1px 5px #6c101066
}

.progress-bar:after {
    content: "";
    background: var(--gold-foil);
    width: 6px;
    box-shadow: 0 0 10px 3px var(--accent-gold-glow);
    animation: tipGlow 1.4s var(--ease) infinite;
    border-radius: 0 3px 3px 0;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0
}

.skip-link {
    background: var(--leather-crimson);
    color: #fff;
    z-index: 10002;
    font-family: var(--font-sans);
    letter-spacing: .13em;
    text-transform: uppercase;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px #fff3;
    transition: transform var(--t-med) var(--ease-spring);
    border-radius: 0 0 8px 8px;
    padding: 16px 30px;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    position: absolute;
    top: 0;
    left: 1.5rem;
    transform: translateY(-100%)
}

.skip-link:focus {
    transform: translateY(0)
}

::selection {
    background: var(--accent-gold-glow);
    color: var(--text-heading);
    text-shadow: none
}

article ::selection {
    background: var(--accent-gold-glow);
    color: var(--text-heading);
    text-shadow: none
}

.verse ::selection {
    background: var(--accent-gold-glow);
    color: var(--text-heading);
    text-shadow: none
}

.commentary-block ::selection {
    background: var(--accent-gold-glow);
    color: var(--text-heading);
    text-shadow: none
}

[data-theme=dark] ::selection {
    color: #fff;
    background: #cda96e5c
}

.container {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 1.5rem
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    text-rendering: optimizelegibility;
    font-optical-sizing: auto;
    font-feature-settings: "liga" 1, "dlig" 1, "onum" 1;
    text-wrap: balance
}

h1 {
    letter-spacing: -.024em;
    text-shadow: 0 1px #ffffffb3, 0 2px 8px #0000000a;
    margin-bottom: 1rem;
    font-size: clamp(2.8rem, 6.5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.05
}

[data-theme=dark] h1 {
    text-shadow: 0 -1px 1px #000000eb, 0 2px 22px #ffffff0a
}

article h2,
.commentary-content h2 {
    color: var(--accent-red);
    text-align: center;
    letter-spacing: .025em;
    text-shadow: 0 1px #ffffff80;
    animation: rubricate 7s var(--ease) infinite;
    justify-content: center;
    align-items: center;
    gap: 1.8rem;
    margin-top: 4.8rem;
    margin-bottom: 2.8rem;
    font-size: clamp(1.6rem, 3.6vw, 2.3rem);
    font-style: italic;
    font-weight: 500;
    display: flex
}

[data-theme=dark] article h2,
[data-theme=dark] .commentary-content h2 {
    text-shadow: 0 1px 2px #000000eb;
    animation: none
}

article h2:before,
article h2:after,
.commentary-content h2:before,
.commentary-content h2:after {
    content: "";
    opacity: .8;
    flex: 1;
    max-width: 130px;
    height: 1px;
    position: relative
}

article h2:before,
.commentary-content h2:before {
    background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 58%, var(--ornament) 100%)
}

article h2:after,
.commentary-content h2:after {
    background: linear-gradient(90deg, var(--ornament) 0%, var(--accent-gold) 42%, transparent 100%)
}

h3 {
    color: var(--leather-crimson);
    letter-spacing: .02em;
    align-items: center;
    gap: .8rem;
    margin-top: 3.6rem;
    margin-bottom: 1.3rem;
    padding-bottom: .8rem;
    font-size: 1.4rem;
    font-style: normal;
    font-weight: 500;
    display: flex;
    position: relative
}

h3:before {
    content: "☩" / "";
    color: var(--text-gold);
    opacity: .85;
    text-shadow: 0 2px 5px var(--accent-gold-soft);
    flex-shrink: 0;
    font-size: .86em
}

h3:after {
    content: "";
    background: linear-gradient(90deg, var(--accent-gold) 0%, #b9924a38 40%, transparent 80%);
    opacity: .55;
    pointer-events: none;
    height: 1px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0
}

p {
    word-spacing: .022em;
    hanging-punctuation: first last;
    text-wrap: pretty;
    margin-bottom: 1.5rem
}

article p:first-of-type:first-line,
.study-intro p:first-of-type:first-line,
article h2+p:first-line,
.commentary-content h2+p:first-line {
    font-variant: small-caps;
    letter-spacing: .06em
}

a {
    color: var(--accent-red);
    transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
    text-decoration: none
}

main a:not(.book-card):not(.nav-btn):not(.logo):not(.commentary-btn) {
    text-underline-offset: 5px;
    transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
    -webkit-text-decoration: underline #8a1414bf;
    text-decoration: underline #8a1414bf;
    text-decoration-thickness: 1px
}

main a:not(.book-card):not(.nav-btn):not(.logo):not(.commentary-btn):hover {
    color: var(--leather-crimson);
    -webkit-text-decoration-color: var(--accent-gold);
    -webkit-text-decoration-color: var(--accent-gold);
    text-decoration-color: var(--accent-gold);
    text-shadow: 0 0 14px var(--accent-gold-soft)
}

.breadcrumbs {
    z-index: 10;
    padding: 1.3rem 0;
    position: relative
}

.breadcrumbs ol {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: .17em;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .7rem;
    font-size: .67rem;
    font-weight: 600;
    list-style: none;
    display: flex
}

.breadcrumbs li {
    color: var(--text-muted);
    align-items: center;
    display: flex
}

.breadcrumbs li:not(:last-child):after {
    content: "❦" / "";
    color: var(--text-gold);
    opacity: .55;
    margin-left: .7rem;
    font-size: .92em
}

.breadcrumbs a {
    color: var(--text-faint);
    transition: color var(--t-fast) var(--ease);
    position: relative
}

.breadcrumbs a:before {
    content: "";
    min-width: 48px;
    min-height: 48px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}

.breadcrumbs a:hover {
    color: var(--accent-gold-warm)
}

.breadcrumbs li:last-child {
    color: var(--leather-crimson);
    border-bottom: 1.5px solid #6c101047;
    padding-bottom: .08em;
    font-weight: 800
}

[data-theme=dark] .breadcrumbs li:last-child {
    color: var(--accent-gold);
    border-bottom-color: #cda96e59
}

header {
    height: var(--header-h);
    min-height: var(--header-h);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--rule-faint);
    box-shadow: var(--bevel-top), 0 6px 28px #00000006;
    z-index: 1000;
    backdrop-filter: blur(32px) saturate(220%);
    -webkit-backdrop-filter: blur(32px) saturate(220%);
    transition: transform .48s var(--ease-out-quint), opacity .48s var(--ease), background .36s var(--ease);
    contain: layout style;
    align-items: center;
    display: flex;
    position: sticky;
    top: 0
}

[data-theme=dark] header {
    border-bottom-color: var(--rule-color);
    box-shadow: var(--bevel-top), 0 8px 36px #000000ad
}

header:after {
    content: "";
    width: var(--header-rule-width);
    background: var(--gold-hairline);
    opacity: .42;
    pointer-events: none;
    height: 1px;
    animation: ruleBreath 9s var(--ease) infinite;
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translate(-50%)
}

header:before {
    content: "";
    width: calc(var(--header-rule-width) * .52);
    background: linear-gradient(90deg, transparent, var(--ornament) 40%, var(--ornament) 60%, transparent);
    opacity: .22;
    pointer-events: none;
    z-index: -1;
    height: 1px;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translate(-50%)
}

header.header--hidden {
    transform: translateY(-100%)
}

.header-content {
    justify-content: space-between;
    align-items: center;
    width: 100%;
    display: flex
}

.logo {
    font-family: var(--font-heading);
    color: var(--text-heading);
    letter-spacing: -.012em;
    transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
    text-shadow: 0 1px #ffffff9e;
    align-items: center;
    gap: .6rem;
    font-size: 1.72rem;
    font-style: italic;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    position: relative
}

.logo:before {
    content: "";
    min-width: 48px;
    min-height: 48px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}

.logo:hover {
    color: var(--leather-crimson);
    text-shadow: 0 2px 16px var(--accent-gold-soft), 0 1px 0 #ffffffb3
}

.logo:after {
    content: "";
    background: var(--gold-hairline);
    opacity: 0;
    height: 1px;
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
    pointer-events: none;
    position: absolute;
    bottom: -2px;
    left: 2.2rem;
    right: 0;
    transform: scaleX(.6)
}

.logo:hover:after {
    opacity: .45;
    transform: scaleX(1)
}

[data-theme=dark] .logo {
    text-shadow: 0 1px 2px #000000f5
}

.logo-symbol {
    color: var(--text-gold);
    filter: drop-shadow(0 2px 5px #00000029);
    transition: color var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
    animation: flamePulse 3.5s var(--ease) infinite;
    flex-shrink: 0;
    font-size: 1.42rem;
    font-style: normal;
    line-height: 1
}

.logo:hover .logo-symbol {
    filter: drop-shadow(0 2px 8px #b9924a8c);
    animation: none
}

.theme-toggle {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    background: 0 0;
    border: 1px solid #0000;
    border-radius: 50%;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    display: flex
}

.theme-toggle:hover {
    background: var(--surface);
    border-color: var(--accent-gold);
    color: var(--accent-gold-warm);
    box-shadow: var(--shadow-sm), inset 0 0 0 1px #fffffff0
}

[data-theme=dark] .theme-toggle:hover {
    box-shadow: var(--shadow-sm), inset 0 0 0 1px #ffffff12;
    background: var(--surface-subtle)
}

.theme-toggle:active {
    transition-duration: 60ms;
    transform: scale(.88)
}

.theme-toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2px;
    width: 19px;
    height: 19px;
    transition: transform var(--t-med) var(--ease-spring)
}

.theme-toggle:hover svg {
    transform: rotate(20deg)scale(1.1)
}

.search-section {
    text-align: center;
    border-top: 1px solid #0000;
    margin-bottom: 2.5rem;
    padding: 4rem 0 3.5rem;
    position: relative
}

.search-section:before {
    content: "";
    background: var(--gold-hairline);
    opacity: .5;
    width: 280px;
    height: 1px;
    animation: ruleBreath 10s var(--ease) infinite;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%)
}

.search-section:after {
    content: "";
    background: linear-gradient(90deg, transparent, var(--ornament) 40%, var(--ornament) 60%, transparent);
    opacity: .3;
    width: 160px;
    height: 1px;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translate(-50%)
}

.search-title {
    font-family: var(--font-heading);
    color: var(--text-heading);
    letter-spacing: -.022em;
    background: linear-gradient(var(--gold-angle), #4a3008 0%, #a87c2a 20%, #6b4a0e 46%, #8c6418 74%, #4a3008 100%);
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px #ffffff8c, 0 4px 22px #0000000f;
    animation: goldSweep 8s var(--ease) infinite;
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: .6rem;
    font-size: clamp(3.2rem, 7.4vw, 5.6rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.05
}

@supports not ((-webkit-background-clip:text) or (background-clip:text)) {
    .search-title {
        -webkit-text-fill-color: unset;
        background: 0 0
    }
}

[data-theme=sepia] .search-title {
    background: linear-gradient(var(--gold-angle), #3e2408 0%, #916620 20%, #5a3a0c 46%, #7a5418 74%, #3e2408 100%);
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px #fff6dcb3, 0 4px 22px #0000000f;
    -webkit-background-clip: text;
    background-clip: text
}

[data-theme=dark] .search-title {
    background: linear-gradient(var(--gold-angle), #c8922a 0%, #f2d888 22%, #a87428 46%, #d4a84c 74%, #c8922a 100%);
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 8px #000000f5, 0 0 40px #c8922a2e;
    -webkit-background-clip: text;
    background-clip: text
}

.search-subtitle {
    font-family: var(--font-sans);
    color: var(--text-muted);
    letter-spacing: .22em;
    text-transform: uppercase;
    text-wrap: balance;
    max-width: 88vw;
    margin-bottom: 3.4rem;
    margin-left: auto;
    margin-right: auto;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.65;
    position: relative
}

.search-subtitle:before {
    content: "· ✦ ·" / "";
    letter-spacing: .4em;
    color: var(--text-gold);
    opacity: .55;
    font-size: .62rem;
    font-family: var(--font-sans);
    animation: sealPulse 7s var(--ease) infinite;
    transform-origin: 50%;
    margin-bottom: .55rem;
    display: block
}

.search-wrapper {
    max-width: 480px;
    margin: 0 auto;
    position: relative
}

#search-box {
    width: 100%;
    font-size: 1.08rem;
    font-family: var(--font-serif);
    border: 1px solid var(--rule-color);
    background: var(--surface);
    color: var(--text-heading);
    box-shadow: var(--shadow-md), var(--bevel-top);
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
    appearance: none;
    border-radius: 50px;
    padding: 18px 26px 18px 60px
}

#search-box:focus {
    border-color: var(--accent-gold);
    background: linear-gradient(180deg, var(--surface) 0%, #f4eee299 100%);
    box-shadow: var(--shadow-gold), var(--shadow-md), var(--bevel-top), inset 0 2px 22px #b9924a0f
}

#search-box:focus:not(:focus-visible) {
    outline: none
}

#search-box:focus-visible {
    outline: 3px solid var(--text-gold);
    outline-offset: 3px
}

#search-box::placeholder {
    color: var(--text-faint);
    font-style: italic;
    font-weight: 400
}

[data-theme=dark] #search-box {
    background: var(--surface-warm);
    border-color: var(--rule-color)
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-gold);
    opacity: .72;
    pointer-events: none;
    transition: opacity var(--t-fast) var(--ease);
    position: absolute;
    top: 50%;
    left: 22px;
    transform: translateY(-50%)
}

#search-box:focus~.search-icon,
#search-box:focus+.search-icon {
    opacity: 1
}

.hero-image-container {
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-lg), 0 36px 70px #221e1b21;
    background: var(--surface-warm);
    contain: layout paint;
    border-radius: 18px;
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
    transform: translateZ(0)
}

.hero-image-container img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block
}

.hero-image-container:before {
    content: "";
    z-index: 3;
    pointer-events: none;
    opacity: .7;
    transition: opacity var(--t-slow) var(--ease);
    background: linear-gradient(90deg, #b9924a99, #0000) 16px 16px/32px 1px no-repeat, linear-gradient(#b9924a99, #0000) 16px 16px/1px 32px no-repeat, linear-gradient(270deg, #b9924a99, #0000) right 16px top 16px/32px 1px no-repeat, linear-gradient(#b9924a99, #0000) right 16px top 16px/1px 32px no-repeat, linear-gradient(90deg, #b9924a99, #0000) left 16px bottom 16px/32px 1px no-repeat, linear-gradient(#0000, #b9924a99) left 16px bottom 16px/1px 32px no-repeat, linear-gradient(270deg, #b9924a99, #0000) right 16px bottom 16px/32px 1px no-repeat, linear-gradient(#0000, #b9924a99) right 16px bottom 16px/1px 32px no-repeat;
    border-radius: 18px;
    position: absolute;
    inset: 0
}

.hero-image-container:hover:before {
    opacity: 1
}

.hero-image-container:after {
    content: "";
    pointer-events: none;
    border-radius: 18px;
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px #ffffff42, inset 0 0 42px #0000001c
}

[data-theme=dark] .hero-image-container:after {
    box-shadow: inset 0 0 0 1px #ffffff0f, inset 0 0 58px #000000bd
}

.canon-section {
    contain: content;
    margin-bottom: 3.6rem
}

.canon-header {
    align-items: center;
    gap: 1.35rem;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    display: flex;
    position: relative
}

.canon-header:after {
    content: "";
    background: linear-gradient(90deg, transparent 0%, var(--rule-faint) 15%, var(--rule-color) 45%, var(--rule-color) 55%, var(--rule-faint) 85%, transparent 100%);
    opacity: .55;
    height: 1px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0
}

.canon-header:before {
    content: "";
    opacity: 1;
    pointer-events: none;
    background: linear-gradient(90deg, #0000 0%, #b9924a24 30% 70%, #0000 100%);
    height: 1px;
    position: absolute;
    bottom: -3px;
    left: 10%;
    right: 10%
}

.canon-title {
    font-family: var(--font-heading);
    white-space: nowrap;
    color: var(--text-heading);
    text-shadow: 0 1px #ffffffad;
    letter-spacing: -.01em;
    margin: 0;
    font-size: 1.85rem;
    font-style: italic;
    font-weight: 500;
    display: block
}

[data-theme=dark] .canon-title {
    text-shadow: 0 1px 2px #000000f5
}

.canon-subtitle {
    font-family: var(--font-sans);
    letter-spacing: .15em;
    color: var(--text-body);
    text-align: right;
    text-transform: uppercase;
    text-wrap: balance;
    flex-shrink: 1;
    min-width: 0;
    font-size: .65rem;
    font-weight: 700
}

[data-theme=dark] .canon-subtitle {
    color: var(--text-body)
}

.canon-line {
    background: linear-gradient(180deg, transparent 0px, transparent 1px, transparent 1px, transparent 3px, #b9924a33 3px, #b9924a33 4px), linear-gradient(90deg, var(--accent-gold) 0%, transparent 100%);
    background-position: 0 100%, 0 0;
    background-repeat: no-repeat;
    background-size: 100% 4px, 100% 1px;
    background: linear-gradient(90deg, var(--accent-gold) 0%, transparent 100%);
    opacity: .38;
    flex: 1;
    min-width: 0;
    height: 1px;
    position: relative
}

.canon-line:after {
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, #b9924a33 0%, #0000 100%);
    height: 1px;
    position: absolute;
    top: 3px;
    left: 0;
    right: 20%
}

.book-grid {
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 20px;
    display: grid
}

.book-card {
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-warm) 55%, #ede4cf 100%);
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 95%, var(--accent-gold) 5%) 0%, var(--surface-warm) 55%, color-mix(in srgb, var(--surface-warm) 88%, var(--accent-gold) 12%) 100%);
    border-left: 11px solid var(--leather-crimson);
    text-align: left;
    font-family: var(--font-sans);
    letter-spacing: .02em;
    color: var(--text-body);
    z-index: 1;
    width: 100%;
    min-height: max(5.5rem, 48px);
    box-shadow: inset 0 0 0 1px var(--rule-faint), inset 4px 0 7px #00000016, inset 0 1px 0 #ffffffe0, inset 0 0 0 1px transparent, var(--shadow-sm);
    transition: transform var(--t-med) var(--ease-spring), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    border-radius: 3px 12px 12px 3px;
    justify-content: flex-start;
    align-items: center;
    padding: 1.95rem 1.45rem 1.95rem 1.9rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    position: relative;
    text-decoration: none !important
}

[data-theme=dark] .book-card {
    background: linear-gradient(160deg, var(--surface-warm) 0%, var(--surface-subtle) 100%);
    box-shadow: inset 0 0 0 1px var(--rule-color), inset 4px 0 7px #0000006b, inset 0 1px 0 #ffffff0a, var(--shadow-sm)
}

.book-card--commentary {
    border-left-color: var(--accent-gold)
}

.book-card:before {
    content: "";
    border: 1px solid var(--rule-faint);
    opacity: .4;
    pointer-events: none;
    transition: opacity var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
    border-radius: 2px 8px 8px 2px;
    position: absolute;
    inset: 4px;
    box-shadow: inset -3px -3px 0 -2px #b9924a26, inset -3px 3px 0 -2px #b9924a26
}

.book-card:after {
    content: "";
    background: linear-gradient(90deg, var(--accent-gold-glow) 0%, var(--accent-gold) 30%, var(--accent-gold-warm) 50%, var(--accent-gold) 70%, transparent 100%);
    opacity: 0;
    height: 2px;
    transition: opacity var(--t-fast) var(--ease);
    pointer-events: none;
    border-radius: 0 12px 0 0;
    position: absolute;
    top: 0;
    left: 11px;
    right: 0
}

.book-card:hover {
    box-shadow: inset 0 0 0 1px transparent, inset 7px 0 12px #00000024, var(--shadow-md), 0 18px 38px var(--accent-gold-soft);
    color: var(--leather-crimson);
    border-left-color: var(--leather-crimson-hover);
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 92%, var(--accent-gold) 8%) 0%, var(--surface-warm) 55%, color-mix(in srgb, var(--surface-warm) 82%, var(--accent-gold) 18%) 100%);
    transform: translateY(-6px)translate(3px)
}

.book-card:hover:before {
    opacity: 1;
    border-color: #b9924a52
}

.book-card:hover:after {
    opacity: 1
}

.book-card:active {
    box-shadow: inset 0 0 0 1px var(--accent-gold), var(--shadow-sm), inset 4px 0 7px #00000016;
    transition-duration: 70ms;
    transform: translateY(-1px)translate(1px)
}

[data-theme=dark] .book-card:hover {
    color: var(--accent-gold-warm);
    box-shadow: inset 0 0 0 1px transparent, inset 7px 0 12px #0000008c, var(--shadow-md), 0 18px 38px #000000d1
}

.book-card--commentary:hover {
    color: var(--accent-gold-warm);
    border-left-color: var(--accent-gold)
}

main {
    flex: 1
}

article {
    max-width: var(--reading-measure);
    color: var(--text-body);
    margin: 3.5rem auto 7rem
}

.book-nav,
.nav-buttons {
    justify-content: space-between;
    gap: 1.3rem;
    margin: 3.8rem 0;
    display: flex
}

.nav-btn {
    background: var(--surface);
    border: 1px solid var(--rule-color);
    color: var(--text-muted);
    font-family: var(--font-sans);
    text-align: center;
    letter-spacing: .11em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm), var(--bevel-top);
    transition: transform var(--t-med) var(--ease-spring), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
    border-radius: 50px;
    flex: 1;
    justify-content: center;
    align-items: center;
    padding: .95rem 1.7rem;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    position: relative;
    overflow: hidden
}

.nav-btn:before {
    content: "";
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(90deg, #0000 0%, #ffffff61 50%, #0000 100%);
    width: 40%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translate(-110%)skew(-18deg)
}

.nav-btn:hover:before {
    animation: btnSweep .55s var(--ease-out-quint) forwards
}

[data-theme=dark] .nav-btn:hover {
    color: var(--accent-gold-warm)
}

.nav-btn:active {
    box-shadow: var(--shadow-sm);
    transition-duration: 70ms;
    transform: translateY(0)
}

.nav-btn.disabled,
.nav-btn[disabled] {
    opacity: .3;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none;
    background: 0 0;
    border-color: #0000
}

.verse {
    transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    background-color: #0000;
    border-radius: 7px;
    margin-bottom: .9rem;
    padding: .85rem 1.4rem .85rem 3.2rem;
    display: block;
    position: relative
}

.verse:before {
    content: "";
    background: var(--gold-foil);
    opacity: 0;
    width: 3px;
    transition: opacity var(--t-fast) var(--ease);
    border-radius: 7px 0 0 7px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    box-shadow: 1px 0 3px #b9924a2e
}

.verse:hover:before {
    opacity: 1;
    animation: stripeBreath 2.2s var(--ease) infinite, inkBloom .28s var(--ease-out-quint) 1
}

.verse:after {
    content: "";
    opacity: 0;
    pointer-events: none;
    width: 1px;
    transition: opacity var(--t-fast) var(--ease);
    background: linear-gradient(#0000, #b9924a1f 40% 60%, #0000);
    position: absolute;
    top: 10%;
    bottom: 10%;
    right: 0
}

.verse:hover:after {
    opacity: 1
}

.verse:hover {
    background-color: var(--accent-gold-soft);
    box-shadow: inset 0 0 0 1px #b9924a1a, 0 4px 20px var(--accent-gold-glow)
}

.verse:hover:before {
    opacity: 1
}

[data-theme=dark] .verse:hover {
    background-color: var(--surface-subtle);
    box-shadow: inset 0 0 0 1px #ffffff0a, 0 4px 26px #000000bd
}

.v-num {
    font-family: var(--font-heading);
    color: var(--accent-red);
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
    transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-spring), text-shadow var(--t-fast) var(--ease);
    margin: 0;
    font-size: .9rem;
    font-style: italic;
    font-weight: 600;
    line-height: 1;
    position: absolute;
    top: 1.05rem;
    left: .92rem
}

.verse:hover .v-num {
    color: var(--leather-crimson);
    text-shadow: 0 0 12px var(--accent-gold-glow);
    transform: scale(1.12)translate(2px)
}

[data-theme=dark] .v-num {
    color: var(--accent-gold-warm)
}

[data-theme=dark] .verse:hover .v-num {
    color: #fff;
    text-shadow: 0 0 14px #fff6
}

[data-theme=sepia] .v-num {
    color: var(--leather-crimson)
}

@media (min-width:900px) {
    .verse {
        padding: .85rem 3.2rem .85rem 5rem
    }

    .v-num {
        text-align: right;
        width: 3.55rem;
        font-size: .95rem;
        top: 1.15rem;
        left: .4rem
    }
}

body.isolation-mode article .verse {
    opacity: .13;
    filter: blur(4px);
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity .52s var(--ease), filter .52s var(--ease), background .52s var(--ease), box-shadow .52s var(--ease)
}

body.isolation-mode article .verse.isolated {
    opacity: 1;
    filter: none;
    background-color: var(--surface);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-gold-soft), 0 0 42px var(--accent-gold-glow);
    z-index: 10;
    pointer-events: auto;
    -webkit-user-select: auto;
    user-select: auto;
    border-radius: 11px
}

body.isolation-mode article .verse.isolated:before {
    opacity: 1;
    border-radius: 11px 0 0 11px;
    width: 4px
}

[data-theme=dark] body.isolation-mode article .verse.isolated {
    box-shadow: 0 0 65px #000000fa, 0 0 0 1px #cda96e33
}

.verse-popover {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid var(--accent-gold);
    box-shadow: var(--shadow-md), 0 9px 26px var(--accent-gold-glow);
    font-family: var(--font-sans);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .26s var(--ease-spring);
    z-index: 20;
    text-transform: uppercase;
    letter-spacing: .14em;
    white-space: nowrap;
    border-radius: 8px;
    gap: .5rem;
    padding: .65rem .8rem;
    font-size: .7rem;
    font-weight: 700;
    display: flex;
    position: absolute;
    top: -58px;
    left: 50%;
    transform: translate(-50%)translateY(14px)
}

.verse-popover.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%)translateY(0)
}

.verse-popover button {
    min-width: 48px;
    min-height: 48px;
    color: var(--text-heading);
    justify-content: center;
    align-items: center;
    padding: .6rem .8rem;
    transition: color .14s;
    display: flex
}

.verse-popover button:hover {
    color: var(--leather-crimson)
}

.verse-popover .separator {
    color: var(--rule-color);
    align-items: center;
    font-weight: 300;
    display: flex
}

.verse-popover:after {
    content: "";
    border-left: 5px solid #0000;
    border-right: 5px solid #0000;
    border-top: 5px solid var(--accent-gold);
    pointer-events: none;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translate(-50%)
}

.verse-popover:before {
    content: "";
    background: var(--gold-hairline);
    opacity: .55;
    border-radius: 0;
    height: 1px;
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem
}

.verse-popover .popover-rule {
    pointer-events: none;
    background: linear-gradient(90deg, #0000, #b9924a2e 40% 60%, #0000);
    height: 1px;
    position: absolute;
    top: 2px;
    left: 2.5rem;
    right: 2.5rem
}

.v-anchor {
    opacity: 0;
    width: 48px;
    height: 48px;
    color: var(--text-gold);
    cursor: pointer;
    transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-spring), color var(--t-fast) var(--ease);
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 1.1rem;
    display: flex;
    position: absolute;
    top: 0;
    right: 0
}

.verse:hover .v-anchor {
    opacity: .85
}

.v-anchor:hover {
    color: var(--leather-crimson);
    transform: scale(1.24);
    opacity: 1 !important
}

.v-anchor:focus-visible {
    opacity: 1;
    color: var(--leather-crimson)
}

.verse:target {
    background-color: var(--surface);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-gold-soft);
    border-radius: 8px
}

.verse:target:before {
    opacity: 1;
    background: var(--accent-red)
}

.drop-cap {
    font-family: var(--font-heading);
    background: var(--gold-foil);
    -webkit-text-fill-color: transparent;
    color: var(--text-gold);
    float: left;
    filter: drop-shadow(1px 3px 6px #00000024);
    transition: filter var(--t-slow) var(--ease);
    animation: goldSweep 6s var(--ease) infinite;
    -webkit-background-clip: text;
    background-clip: text;
    margin: .06em .14em -.04em 0;
    padding-right: .04em;
    font-size: 5.8rem;
    line-height: .76;
    position: relative
}

.drop-cap:before {
    content: "";
    pointer-events: none;
    z-index: -1;
    opacity: .7;
    transition: opacity var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease);
    background: linear-gradient(135deg, #b9924a12 0%, #d4a85e0a 50%, #b9924a12 100%);
    border: .5px solid #b9924a2e;
    border-radius: 3px;
    position: absolute;
    inset: -6% -8% -6% -6%
}

.drop-cap:hover:before {
    opacity: 1;
    border-color: #b9924a61
}

.drop-cap:after {
    content: "";
    z-index: -1;
    background: radial-gradient(circle, var(--accent-gold-soft) 0%, transparent 68%);
    opacity: 0;
    transition: opacity var(--t-slow) var(--ease);
    position: absolute;
    inset: -12%
}

.drop-cap:hover {
    filter: drop-shadow(1px 5px 16px #b9924a66)
}

.drop-cap:hover:after {
    opacity: 1
}

[data-theme=dark] .drop-cap:hover {
    filter: drop-shadow(1px 6px 22px #e8ca8c4d)
}

sup,
.calibre19 {
    vertical-align: super;
    font-size: .63em;
    line-height: 0;
    position: relative
}

.calibre20 {
    color: var(--text-gold);
    font-size: .82em;
    font-style: italic;
    font-family: var(--font-sans);
    letter-spacing: .02em;
    font-weight: 600
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

.study-intro {
    background: linear-gradient(150deg, var(--surface) 0%, var(--surface-warm) 100%);
    border: 1px solid var(--rule-color);
    border-left: 7px solid var(--accent-gold);
    box-shadow: var(--shadow-md), var(--shadow-inner), -4px 0 18px -4px #b9924a24;
    font-size: 1.14rem;
    font-family: var(--font-serif);
    color: var(--text-body);
    border-radius: 3px 14px 14px 3px;
    margin-bottom: 4.8rem;
    padding: 3.8rem 3.5rem;
    line-height: 1.85;
    position: relative;
    overflow: hidden
}

.study-intro:before {
    content: "✦" / "";
    color: var(--text-gold);
    opacity: .3;
    pointer-events: none;
    transition: opacity var(--t-slow) var(--ease);
    animation: sealPulse 9s var(--ease) infinite;
    transform-origin: 50%;
    font-size: .75rem;
    line-height: 1;
    display: inline-block;
    position: absolute;
    top: 1.1rem;
    right: 1.4rem
}

.study-intro:hover:before {
    opacity: .55
}

.study-intro>:first-child:before {
    content: "";
    pointer-events: none;
    width: 16px;
    height: 16px;
    transition: border-color var(--t-slow) var(--ease), width var(--t-slow) var(--ease), height var(--t-slow) var(--ease);
    border-top: 1px solid #b9924a59;
    border-left: 1px solid #b9924a59;
    position: absolute;
    top: .9rem;
    left: 1.2rem
}

.study-intro:hover>:first-child:before {
    border-color: #b9924a99;
    width: 20px;
    height: 20px
}

.study-intro:after {
    content: "";
    pointer-events: none;
    border-radius: inherit;
    opacity: .6;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.020'/%3E%3C/svg%3E");
    position: absolute;
    inset: 0
}

.commentary-btn {
    font-family: var(--font-sans);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--rule-color);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    border-radius: 50px;
    align-items: center;
    gap: .55rem;
    padding: .85rem 1.5rem;
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    position: relative;
    overflow: hidden
}

.commentary-btn:before {
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, #0000 0%, #ffffff47 50%, #0000 100%);
    width: 40%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translate(-110%)skew(-18deg)
}

.commentary-btn:hover:before {
    animation: btnSweep .55s var(--ease-out-quint) forwards
}

.commentary-btn:hover {
    color: var(--leather-crimson);
    border-color: var(--accent-gold);
    background: var(--surface-warm);
    box-shadow: var(--shadow-sm), 0 4px 14px var(--accent-gold-soft)
}

.commentary-container {
    max-width: var(--reading-measure);
    margin: 0 auto;
    padding: 3.8rem 1.5rem
}

.chapter-title {
    font-family: var(--font-heading);
    text-align: center;
    color: var(--text-heading);
    text-shadow: 0 1px #ffffffb3;
    letter-spacing: -.018em;
    margin-bottom: 4.4rem;
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.14;
    position: relative
}

[data-theme=dark] .chapter-title {
    text-shadow: 0 1px 2px #000000f5
}

.chapter-title:before {
    content: "";
    background: var(--gold-hairline);
    opacity: .6;
    width: 100px;
    height: 1px;
    margin: 0 auto 2.4rem;
    display: block
}

.chapter-title:after {
    content: "— ❦ —" / "";
    white-space: nowrap;
    color: var(--text-gold);
    opacity: .68;
    letter-spacing: .3em;
    font-size: 1.15rem;
    font-style: normal;
    font-family: var(--font-heading);
    position: absolute;
    bottom: -2.8rem;
    left: 50%;
    transform: translate(-50%)
}

.chapter-title {
    margin-bottom: 6rem
}

.commentary-block {
    text-indent: 0;
    background-image: linear-gradient(var(--surface), var(--surface)), linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-warm) 20%, var(--rule-faint) 50%, transparent 100%);
    transition: box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
    -webkit-hyphens: none;
    hyphens: none;
    overflow-wrap: break-word;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-left: 2px solid #0000;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.7rem;
    padding: .8rem 1.4rem .8rem 1.75rem;
    font-size: 1.06rem;
    line-height: 1.85;
    position: relative
}

.commentary-block:before {
    content: "";
    background: linear-gradient(180deg, var(--accent-gold-warm), transparent);
    opacity: .7;
    pointer-events: none;
    border-radius: 1px 1px 0 0;
    width: 2px;
    height: 8px;
    position: absolute;
    top: 0;
    left: -1px
}

.commentary-block:hover {
    box-shadow: 2px 0 0 0 var(--accent-gold), 0 2px 18px var(--accent-gold-soft);
    background-color: var(--accent-gold-soft);
    border-radius: 0 8px 8px 0
}

[data-theme=dark] .commentary-block {
    background-image: linear-gradient(var(--surface), var(--surface)), linear-gradient(180deg, var(--accent-gold-warm) 0%, var(--accent-gold) 25%, var(--rule-color) 50%, transparent 100%)
}

[data-theme=dark] .commentary-block:hover {
    box-shadow: 2px 0 0 0 var(--accent-gold-warm), 0 2px 22px #00000080;
    background-color: #cda96e0d
}

.author {
    font-family: var(--font-sans);
    color: var(--text-gold);
    letter-spacing: .14em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--accent-gold-soft);
    margin-bottom: .52rem;
    padding-bottom: .16rem;
    font-size: .7rem;
    font-weight: 800;
    display: inline-block;
    position: relative
}

.author:before {
    content: "✦ " / "";
    opacity: .7;
    vertical-align: middle;
    font-size: .6em
}

.author:after {
    content: "";
    background: var(--accent-gold);
    width: 0;
    height: 1px;
    transition: width var(--t-med) var(--ease-out-quint);
    position: absolute;
    bottom: -1px;
    left: 0
}

.author:hover:after {
    width: 100%
}

.scripture-quote {
    font-family: var(--font-heading);
    color: var(--text-heading);
    border-left: 5px solid var(--accent-gold);
    text-indent: 0;
    background: linear-gradient(90deg, var(--accent-gold-soft) 0%, var(--accent-gold-mid) 30%, transparent 80%);
    box-shadow: -2px 0 12px -4px #b9924a33, var(--shadow-sm);
    border-radius: 0 10px 10px 0;
    margin: 3rem 0;
    padding: 1.6rem 2.2rem 1.6rem 2.3rem;
    font-size: 1.35rem;
    font-style: italic;
    line-height: 1.62;
    display: block;
    position: relative
}

.scripture-quote:before {
    content: "“" / "";
    color: var(--text-gold);
    opacity: .3;
    font-size: 4rem;
    line-height: 0;
    font-family: var(--font-heading);
    position: absolute;
    top: 1.7rem;
    left: -1.3rem
}

.scripture-quote:after {
    content: "”" / "";
    color: var(--text-gold);
    opacity: .2;
    font-size: 3rem;
    line-height: 0;
    font-family: var(--font-heading);
    position: absolute;
    bottom: .9rem;
    right: .65rem
}

.scripture-quote:has(cite):after,
.scripture-quote~.scripture-quote-rule {
    content: "";
    background: var(--gold-hairline);
    opacity: .45;
    width: 50px;
    height: 1px;
    margin-top: 1.2rem;
    display: block
}

.calibre26 {
    text-align: center;
    font-family: var(--font-sans);
    color: var(--leather-crimson);
    letter-spacing: .17em;
    text-transform: uppercase;
    animation: rubricate 8s var(--ease) infinite;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 4.8rem 0 2.4rem;
    font-size: .92rem;
    font-weight: 800;
    display: flex;
    position: relative
}

.calibre26:before,
.calibre26:after {
    content: "";
    flex: 1;
    max-width: 100px;
    height: 1px
}

.calibre26:before {
    background: linear-gradient(90deg, transparent, var(--accent-gold) 80%);
    opacity: .45
}

.calibre26:after {
    background: linear-gradient(90deg, var(--accent-gold) 20%, transparent);
    opacity: .45
}

.calibre26 .calibre26-ornaments,
.calibre26 [class*=ornament] {
    margin-bottom: .55rem;
    display: block
}

.footer-divider {
    border: none;
    border-top: 1px solid var(--rule-color);
    opacity: .72;
    width: 100%;
    height: 0;
    margin-top: auto;
    position: relative
}

.footer-divider:after {
    content: "";
    border-top: 1px solid var(--rule-faint);
    margin-top: 3px;
    display: block
}

.footer-divider:before {
    content: "◆" / "";
    color: var(--text-gold);
    background: var(--bg-primary);
    opacity: .4;
    pointer-events: none;
    transition: opacity var(--t-slow) var(--ease);
    padding: 0 .5rem;
    font-size: .35rem;
    line-height: 1;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%)translateY(-50%)
}

[data-theme=dark] .footer-divider {
    border-top-color: var(--rule-faint)
}

footer {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-warm) 50%, var(--surface-subtle) 100%);
    border-top: 1px solid var(--rule-color);
    padding: 6rem 0 4.5rem;
    position: relative;
    box-shadow: inset 0 20px 50px #00000003
}

[data-theme=dark] footer {
    border-top-color: var(--rule-faint);
    background: linear-gradient(#100e0c 0%, #070605 100%);
    box-shadow: inset 0 20px 50px #00000070
}

footer:before {
    content: "☩" / "";
    color: var(--text-gold);
    background: var(--bg-primary);
    text-shadow: 0 2px 6px #0000000f;
    z-index: 10;
    letter-spacing: 0;
    animation: crossGlow 5s var(--ease) infinite;
    border-radius: 50%;
    padding: 0 1.6rem;
    font-size: 1.55rem;
    line-height: 1;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%)translateY(-50%)
}

[data-theme=dark] footer:before {
    background: var(--bg-primary);
    text-shadow: 0 2px 8px #000000eb;
    animation: crossGlow 3.5s var(--ease) infinite
}

.footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4.2rem;
    margin-bottom: 3.5rem;
    display: flex
}

.footer-links a {
    font-family: var(--font-heading);
    color: var(--text-muted);
    letter-spacing: .04em;
    transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
    margin: 0 -.5rem;
    padding: .6rem .5rem;
    font-size: 1.3rem;
    font-style: italic;
    text-decoration: none;
    position: relative
}

.footer-links a+a:before {
    content: "✦" / "";
    color: var(--text-gold);
    opacity: .38;
    font-size: .45rem;
    font-style: normal;
    font-family: var(--font-sans);
    letter-spacing: 0;
    pointer-events: none;
    transition: opacity var(--t-fast) var(--ease), transform var(--t-med) var(--ease-spring);
    position: absolute;
    top: 50%;
    left: -2.25rem;
    transform: translateY(-52%)
}

.footer-links:hover a+a:before {
    opacity: .6;
    transform: translateY(-52%)scale(1.25)
}

.footer-links a:after {
    content: "";
    background: var(--gold-hairline);
    width: 0;
    height: 1px;
    transition: width var(--t-med) var(--ease);
    position: absolute;
    bottom: .6rem;
    left: 50%;
    transform: translate(-50%)
}

.footer-links a:hover {
    color: var(--leather-crimson);
    text-shadow: 0 0 14px var(--accent-gold-soft)
}

.footer-links a:hover:after {
    width: 110%
}

.footer-social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.3rem;
    margin-bottom: 4rem;
    display: flex
}

.footer-social a {
    font-family: var(--font-sans);
    color: var(--text-muted);
    border: 1px solid var(--rule-color);
    letter-spacing: .17em;
    text-transform: uppercase;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-med) var(--ease-spring), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    border-radius: 50px;
    padding: .9rem 2.3rem;
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    overflow: hidden
}

.footer-social a:before {
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, #0000 0%, #ffffff52 50%, #0000 100%);
    width: 40%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translate(-110%)skew(-18deg)
}

.footer-social a:hover:before {
    animation: btnSweep .55s var(--ease-out-quint) forwards
}

.footer-social a:hover {
    color: var(--leather-crimson);
    border-color: var(--accent-gold);
    background: var(--surface-warm);
    box-shadow: var(--shadow-md), 0 8px 20px var(--accent-gold-soft);
    transform: translateY(-4px)
}

.footer-credit {
    background: linear-gradient(155deg, var(--surface) 0%, var(--surface-subtle) 100%);
    border: 1px solid var(--rule-color);
    text-align: center;
    max-width: 840px;
    box-shadow: var(--shadow-md), inset 0 0 0 1px #ffffffa6, inset 0 0 0 10px transparent, inset 0 0 0 11px #b9924a0e;
    border-radius: 13px;
    margin: 0 auto 4.5rem;
    padding: 4rem;
    position: relative;
    overflow: hidden
}

[data-theme=dark] .footer-credit {
    box-shadow: var(--shadow-md), inset 0 0 0 1px #ffffff0a, inset 0 0 0 10px transparent, inset 0 0 0 11px #cda96e0b;
    border-color: var(--rule-faint)
}

.footer-credit:before,
.footer-credit:after {
    content: "❦" / "";
    color: var(--text-gold);
    opacity: .28;
    transition: opacity var(--t-slow) var(--ease);
    font-size: 1.75rem;
    position: absolute
}

.footer-credit:before {
    top: 1.6rem;
    left: 1.6rem
}

.footer-credit:after {
    bottom: 1.6rem;
    right: 1.6rem;
    transform: rotate(180deg)
}

.footer-credit:hover:before,
.footer-credit:hover:after {
    opacity: .48
}

.footer-credit>:first-child {
    position: relative
}

.footer-credit>:first-child:before {
    content: "";
    pointer-events: none;
    width: 22px;
    height: 22px;
    transition: border-color var(--t-slow) var(--ease);
    border-top: 1px solid #b9924a47;
    border-right: 1px solid #b9924a47;
    border-radius: 0 4px 0 0;
    position: absolute;
    top: -3.5rem;
    right: -4rem
}

.footer-credit:hover>:first-child:before {
    border-color: #b9924a80
}

.footer-credit p {
    font-family: var(--font-serif);
    color: var(--text-muted);
    margin-bottom: 1.55rem;
    font-size: .96rem;
    line-height: 1.88
}

.footer-credit strong {
    font-family: var(--font-sans);
    color: var(--text-body);
    letter-spacing: .26em;
    text-transform: uppercase;
    margin-bottom: .7rem;
    font-size: .66rem;
    font-weight: 800;
    display: block
}

.footer-credit p:last-child {
    font-family: var(--font-heading);
    color: var(--text-heading);
    border-top: 1px solid var(--rule-color);
    text-shadow: 0 1px #fffc;
    margin: 3rem 0 0;
    padding-top: 2.2rem;
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.62;
    position: relative
}

.footer-credit p:last-child:before {
    content: "“" / "";
    font-family: var(--font-heading);
    color: var(--text-gold);
    opacity: .55;
    margin-bottom: .7rem;
    font-size: 3.4rem;
    font-style: normal;
    font-weight: 400;
    line-height: .6;
    display: block
}

[data-theme=dark] .footer-credit p:last-child {
    color: var(--text-heading);
    text-shadow: 0 1px 3px #000000f5;
    border-top-color: var(--rule-faint)
}

[data-theme=sepia] .footer-credit p:last-child {
    color: var(--text-heading)
}

[data-theme=dark] .footer-info {
    border-top-color: var(--rule-faint)
}

.footer-contact {
    font-family: var(--font-sans);
    color: var(--text-faint);
    letter-spacing: .21em;
    text-transform: uppercase;
    text-align: center;
    font-size: .66rem;
    line-height: 1.8
}

.footer-contact a {
    color: var(--text-muted);
    border-bottom: 1px solid var(--rule-color);
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
    font-weight: 800;
    text-decoration: none
}

.footer-contact a:hover {
    color: var(--leather-crimson);
    border-color: var(--leather-crimson)
}

.footer-copyright {
    font-family: var(--font-sans);
    color: var(--text-faint);
    letter-spacing: .21em;
    text-transform: uppercase;
    margin-top: .9rem;
    font-size: .66rem;
    font-weight: 700
}

.scroll-controls {
    z-index: 500;
    transition: opacity var(--t-med) var(--ease);
    flex-direction: column;
    gap: 1rem;
    display: flex;
    position: fixed;
    bottom: 2.6rem;
    right: 2.6rem
}

.scroll-btn {
    width: 52px;
    height: 52px;
    color: var(--text-muted);
    cursor: pointer;
    transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
    will-change: transform;
    touch-action: manipulation;
    background: #fff9;
    border: 1px solid #d8cebc8c;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    display: flex;
    box-shadow: 0 2px 8px #221e1b14
}

.scroll-controls:hover .scroll-btn,
.scroll-btn:hover {
    background: var(--surface);
    border-color: var(--rule-color);
    color: var(--leather-crimson);
    box-shadow: var(--shadow-md), 0 7px 18px var(--accent-gold-soft);
    transform: translateY(-5px)
}

.scroll-btn:active {
    transition-duration: 70ms;
    transform: translateY(-1px)
}

[data-theme=dark] .scroll-btn {
    color: var(--text-muted);
    background: #161310a6;
    border-color: #282420b3
}

[data-theme=dark] .scroll-btn:hover {
    background: var(--surface-warm);
    color: var(--accent-gold-warm)
}

#toast {
    background: var(--text-heading);
    color: var(--bg-primary);
    font-family: var(--font-sans);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s var(--ease-spring), opacity .26s var(--ease);
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    letter-spacing: .09em;
    text-transform: uppercase;
    will-change: transform, opacity;
    border: 1px solid #ffffff1f;
    border-radius: 100px;
    padding: 1.1rem 2.6rem;
    font-size: .82rem;
    font-weight: 700;
    position: fixed;
    bottom: 4rem;
    left: 50%;
    transform: translate(-50%, 22px)scale(.95)
}

#toast.show {
    opacity: 1;
    transform: translate(-50%)scale(1)
}

@media (max-width:768px) {
    html {
        font-size: 18px
    }

    .container {
        padding: 0 1.1rem
    }

    h1 {
        margin-bottom: 1.3rem;
        font-size: 2.4rem
    }

    article h2,
    .commentary-content h2 {
        margin-top: 3rem;
        margin-bottom: 2rem;
        font-size: 1.65rem
    }

    .search-section {
        padding: 2.5rem 0 2.8rem
    }

    .search-title {
        font-size: 2.8rem
    }

    .search-subtitle {
        margin-bottom: 2.2rem;
        font-size: .7rem
    }

    .search-wrapper {
        max-width: 100%
    }

    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px
    }

    .canon-section {
        margin-bottom: 2.8rem
    }

    .canon-header {
        flex-wrap: wrap;
        row-gap: .5rem
    }

    .canon-subtitle {
        text-align: left;
        letter-spacing: .1em;
        width: 100%;
        font-size: .63rem
    }

    .canon-line {
        flex-grow: 1;
        flex-basis: 2rem
    }

    .book-card {
        border-left-width: 9px;
        width: 100%;
        min-height: max(4.8rem, 48px);
        padding: 1.4rem 1.4rem 1.4rem 1.55rem;
        font-size: .84rem
    }

    .book-nav,
    .nav-buttons {
        flex-direction: column;
        gap: .85rem;
        margin: 2.2rem 0
    }

    .nav-btn {
        width: 100%
    }

    .verse {
        padding: .72rem 3rem .72rem 2.7rem
    }

    .v-num {
        top: .9rem;
        left: .7rem
    }

    .v-anchor {
        justify-content: center;
        align-items: center;
        width: 48px;
        height: 48px;
        padding: 0;
        font-size: .95rem;
        display: flex
    }

    .study-intro {
        border-left-width: 5px;
        margin-bottom: 3rem;
        padding: 2.2rem 1.8rem
    }

    .chapter-title {
        font-size: 2.4rem
    }

    .footer-divider {
        display: none
    }

    footer {
        padding: 4.5rem 0 3rem
    }

    .footer-links {
        gap: 1.7rem;
        margin-bottom: 2.8rem
    }

    .footer-links a {
        font-size: 1.15rem
    }

    .footer-social {
        gap: .9rem;
        margin-bottom: 3.2rem
    }

    .footer-credit {
        margin-bottom: 3.2rem;
        padding: 3rem 1.9rem
    }

    .footer-credit:before,
    .footer-credit:after {
        display: none
    }

    .footer-credit p {
        font-size: .9rem;
        line-height: 1.82
    }

    .footer-credit p:last-child {
        margin-top: 2.2rem;
        padding-top: 1.5rem;
        font-size: 1.18rem
    }

    .footer-credit p:last-child:before {
        font-size: 2.6rem
    }

    .footer-info {
        gap: .9rem;
        padding-top: 2.5rem
    }

    .footer-contact,
    .footer-copyright {
        font-size: .58rem
    }

    .scroll-controls {
        bottom: 1.5rem;
        right: 1.5rem
    }

    .scroll-btn {
        width: 48px;
        height: 48px;
        font-size: 1.05rem
    }
}

@media (max-width:400px) {
    html {
        font-size: 16px
    }

    .book-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .logo {
        font-size: 1.38rem
    }

    .logo-symbol {
        font-size: 1.28rem
    }

    .search-title {
        font-size: 2.3rem
    }

    article h2:before,
    article h2:after,
    .commentary-content h2:before,
    .commentary-content h2:after {
        display: none
    }

    .chapter-title {
        margin-bottom: 2.6rem;
        font-size: 2rem
    }

    .study-intro {
        padding: 1.8rem 1.35rem
    }

    .footer-credit {
        padding: 2.4rem 1.2rem
    }

    .footer-credit p:last-child {
        font-size: 1.08rem
    }

    .footer-credit p:last-child:before {
        margin-bottom: .5rem;
        font-size: 2.2rem
    }

    article {
        margin-bottom: 5rem
    }
}

@media (prefers-contrast:more) {
    :root {
        --rule-color: #666;
        --text-faint: #333;
        --text-muted: #1a1a1a;
        --accent-gold: #735725
    }

    .search-title,
    .drop-cap {
        -webkit-text-fill-color: var(--text-heading);
        color: var(--text-heading);
        text-shadow: none;
        background: 0 0;
        animation: none
    }

    main a:not(.book-card):not(.nav-btn):not(.logo):not(.commentary-btn) {
        -webkit-text-decoration-color: var(--accent-red);
        -webkit-text-decoration-color: var(--accent-red);
        text-decoration-color: var(--accent-red);
        text-decoration-thickness: 2px
    }

    :focus-visible {
        outline-width: 4px;
        outline-color: var(--text-gold)
    }

    .verse:hover {
        outline: 2px solid var(--accent-gold)
    }

    .book-card {
        border-left-width: 12px
    }

    header:after,
    .search-section:before,
    .footer-divider,
    article h2,
    .calibre26,
    .logo-symbol {
        animation: none !important
    }

    h1,
    h2,
    h3,
    .chapter-title,
    .canon-title,
    .breadcrumbs li:last-child {
        text-shadow: none !important
    }
}

@media (prefers-reduced-motion:reduce) {

    *,
    :before,
    :after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important
    }

    html {
        scroll-behavior: auto
    }
}

section[id^=ch],
.canon-section {
    content-visibility: auto;
    contain-intrinsic-block-size: auto 580px
}

.commentary-container h1:after,
article>h1:after {
    content: "";
    background: linear-gradient(180deg, transparent 0px, transparent 1px, transparent 1px, transparent 3px, #b9924a42 3px, #b9924a42 4px), var(--gold-hairline);
    opacity: .55;
    width: 80px;
    height: 4px;
    animation: ruleBreath 11s var(--ease) infinite;
    margin: 1.4rem auto 0;
    display: block
}

.book-card {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1
}

.book-card .book-num {
    font-family: var(--font-heading);
    color: var(--text-faint);
    font-feature-settings: "onum" 1;
    transition: color var(--t-fast) var(--ease);
    font-size: .7rem;
    font-style: italic;
    position: absolute;
    top: .65rem;
    right: .8rem
}

.book-card:hover .book-num {
    color: var(--text-gold)
}

.chapter-title {
    color: var(--text-heading);
    -webkit-text-fill-color: unset;
    background: 0 0;
    animation: none
}

.footer-info {
    border-top: 1px solid var(--rule-color);
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding-top: 3.2rem;
    display: flex;
    position: relative
}

.footer-info:before {
    content: "";
    background: linear-gradient(90deg, transparent, var(--rule-faint) 40%, var(--rule-faint) 60%, transparent);
    pointer-events: none;
    width: 120px;
    height: 1px;
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translate(-50%)
}

.footer-copyright:before {
    content: "✦ " / "";
    color: var(--text-gold);
    opacity: .45;
    vertical-align: middle;
    font-size: .55em
}

body.isolation-mode .verse.isolated .v-num {
    background: var(--gold-foil);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    transform: scale(1.14)translate(2px)
}

[data-theme=dark] .drop-cap {
    filter: drop-shadow(0 4px 20px #cda96e33)
}

blockquote {
    font-family: var(--font-heading);
    color: var(--text-muted);
    border-left: 3px solid var(--rule-color);
    margin: 2.4rem 0;
    padding: 1rem 1.8rem 1.2rem;
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.72;
    position: relative;
    box-shadow: -5px 0 0 -3px #b9924a33
}

blockquote:before {
    content: "“" / "";
    color: var(--text-gold);
    opacity: .28;
    font-size: 2.8rem;
    line-height: 0;
    font-family: var(--font-heading);
    font-style: normal;
    position: absolute;
    top: .55rem;
    left: .5rem
}

blockquote:after {
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, #b9924a73, #0000);
    width: 40px;
    height: 1px;
    margin-top: 1rem;
    display: block
}

[data-theme=dark] blockquote {
    border-left-color: var(--rule-color)
}

abbr[title] {
    text-underline-offset: 3px;
    cursor: help;
    -webkit-text-decoration: underline dotted #b9924a73;
    text-decoration: underline dotted #b9924a73
}

article a[href*=chapter],
article a[href*=verse] {
    color: var(--leather-crimson);
    text-underline-offset: 3px;
    font-style: italic;
    -webkit-text-decoration: underline dotted #6c101038;
    text-decoration: underline dotted #6c101038;
    position: relative
}

article a[href*=chapter]:hover,
article a[href*=verse]:hover {
    -webkit-text-decoration-color: var(--accent-gold);
    -webkit-text-decoration-color: var(--accent-gold);
    text-decoration-color: var(--accent-gold);
    text-shadow: 0 0 12px var(--accent-gold-soft);
    text-decoration-style: solid
}

#search-box:focus~.search-icon {
    opacity: 1;
    filter: drop-shadow(0 0 5px #b9924a66)
}

.canon-section:before {
    content: "✦" / "";
    color: var(--text-gold);
    opacity: .18;
    pointer-events: none;
    font-size: .55rem;
    font-family: var(--font-sans);
    position: absolute;
    top: .6rem;
    right: 0
}

.canon-section {
    position: relative
}

body.isolation-mode:after {
    content: "";
    pointer-events: none;
    z-index: 8;
    background: radial-gradient(50% 30%, #0000 60%, #0000004d 100%);
    position: fixed;
    inset: 0
}

[data-theme=sepia] body:after {
    opacity: .85
}

@media (prefers-reduced-motion:reduce) {

    .drop-cap,
    .chapter-title,
    .search-title {
        animation: none !important
    }

    .nav-btn:before,
    .footer-social a:before,
    .commentary-btn:before {
        display: none
    }

    .logo-symbol,
    .progress-bar:after,
    footer:before,
    .verse:before,
    .hero-image-container img {
        animation: none
    }

    .search-subtitle:before,
    .search-section:before,
    .header:after,
    .commentary-container h1:after,
    article>h1:after,
    article h2,
    .commentary-content h2,
    .calibre26,
    .study-intro:before,
    .search-subtitle:before {
        animation: none !important
    }
}

@media print {

    header,
    footer,
    .footer-divider,
    .scroll-controls,
    .theme-toggle,
    .v-anchor,
    .commentary-btn,
    .book-nav,
    .nav-buttons,
    .breadcrumbs,
    body:before,
    body:after,
    .progress-container {
        display: none !important
    }

    body {
        color: #000;
        background: #fff;
        font-size: 10pt;
        line-height: 1.5
    }

    article {
        max-width: 100%;
        margin: 0
    }

    h1,
    h2,
    h3 {
        color: #000;
        page-break-after: avoid;
        text-shadow: none
    }

    article h2,
    .commentary-content h2 {
        color: #600;
        text-align: left;
        display: block
    }

    article h2:before,
    article h2:after,
    .commentary-content h2:before,
    .commentary-content h2:after {
        display: none
    }

    .verse {
        break-inside: avoid;
        padding: .2rem 0 .2rem 2.1rem;
        box-shadow: none !important;
        background: 0 0 !important
    }

    .verse:before {
        display: none
    }

    .v-num {
        text-align: right;
        color: #555;
        width: 1.7rem;
        font-style: normal;
        top: .28rem;
        left: 0;
        text-shadow: none !important;
        transform: none !important
    }

    .drop-cap {
        color: #600;
        -webkit-text-fill-color: #600;
        filter: none;
        text-shadow: none;
        background: 0 0
    }

    .drop-cap:after {
        display: none
    }

    a {
        color: #000;
        text-decoration: none
    }

    .study-intro {
        box-shadow: none;
        page-break-inside: avoid;
        background: 0 0;
        border: 1px solid #ccc;
        padding: 2rem
    }

    .study-intro:after {
        display: none
    }

    p {
        widows: 3;
        orphans: 3
    }
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    position: absolute;
    overflow: hidden
}

html.reading-mode {
    --reading-measure: 63ch;
    font-size: 23px
}

html.reading-mode article {
    line-height: 1.9
}

html.reading-mode header,
html.reading-mode .canon-section:not(.active-reading-section),
html.reading-mode .search-section,
html.reading-mode footer,
html.reading-mode .footer-divider,
html.reading-mode .scroll-controls,
html.reading-mode .breadcrumbs,
html.reading-mode .nav-buttons {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .7s var(--ease), visibility .7s var(--ease)
}

header,
.canon-section,
.search-section,
footer,
.footer-divider,
.scroll-controls,
.breadcrumbs,
.nav-buttons {
    transition: opacity .45s var(--ease)
}

@media (prefers-reduced-motion:no-preference) {
    .hero-image-container img {
        transform-origin: 50%;
        animation: heroKenBurns 30s var(--ease) infinite alternate
    }

    @keyframes heroKenBurns {
        0% {
            transform: scale(1)translate(0)
        }

        to {
            transform: scale(1.04)translate(-.8%, -.4%)
        }
    }
}

h3:hover:before {
    text-shadow: 0 0 14px var(--accent-gold-glow), 0 2px 5px var(--accent-gold-soft);
    opacity: 1
}

.breadcrumbs li:not(:last-child):hover:after {
    opacity: .85;
    display: inline-block;
    transform: scale(1.3)
}

::-webkit-scrollbar-track {
    background: repeating-linear-gradient(#0000 0 9px, #b9924a07 9px 10px)
}

#toast:before {
    content: "";
    background: var(--gold-foil);
    pointer-events: none;
    border-radius: 100px 0 0 100px;
    width: 3px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0
}

.scroll-btn:after {
    content: "☩" / "";
    color: var(--text-gold);
    opacity: .05;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity var(--t-fast) var(--ease);
    font-size: 2.2rem;
    line-height: 1;
    position: absolute
}

.scroll-btn:hover:after {
    opacity: .13
}

[data-theme=dark] .search-section {
    background: radial-gradient(70% 55% at 50% 40%, #b9823208 0%, #0000 100%)
}

[data-theme=sepia] .drop-cap {
    filter: drop-shadow(1px 3px 8px #3a2c1c38)
}

.verse:target {
    transition: background-color .6s var(--ease), box-shadow .6s var(--ease);
    border-radius: 9px;
    background-color: var(--accent-gold-soft) !important;
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-gold-glow), 0 0 28px var(--accent-gold-glow) !important
}

.verse:target:before {
    width: 4px;
    animation: stripeBreath 2s var(--ease) infinite;
    opacity: 1 !important;
    background: linear-gradient(180deg, var(--accent-gold-warm) 0%, var(--accent-gold) 60%, var(--leather-crimson) 100%) !important
}

.verse:target:after {
    content: "";
    pointer-events: none;
    background: 0 0;
    border-top: 1px solid #b9924a61;
    border-right: 1px solid #b9924a61;
    border-radius: 0 3px 0 0;
    width: 12px;
    height: 12px;
    position: absolute;
    top: 6px;
    right: 6px;
    opacity: 1 !important
}

@media (prefers-reduced-motion:reduce) {

    .logo-symbol,
    .progress-bar:after,
    footer:before,
    .verse:before,
    .hero-image-container img,
    .search-title {
        animation: none !important
    }

    .nav-btn:before {
        display: none
    }
}

article>p:last-of-type:after,
.commentary-container>p:last-of-type:after {
    content: "· · · ✦ · · ·" / "";
    text-align: center;
    letter-spacing: .55em;
    color: var(--text-gold);
    opacity: .38;
    font-size: .55rem;
    font-family: var(--font-sans);
    pointer-events: none;
    transition: opacity var(--t-slow) var(--ease);
    margin-top: 3.2rem;
    display: block
}

article:hover>p:last-of-type:after {
    opacity: .58
}

.nav-btn:hover {
    border-color: var(--accent-gold);
    color: var(--leather-crimson);
    background: var(--surface-warm);
    box-shadow: var(--shadow-md), 0 7px 18px var(--accent-gold-soft), var(--bevel-top), inset 0 1px 0 #fffffff0, inset 0 -1px 0 #0000000a;
    transform: translateY(-4px)
}

.hero-image-container:hover:after {
    box-shadow: inset 0 0 0 1px #b9924a38, inset 0 0 42px #0000001c, inset 0 0 80px #0000000f
}

#search-box:hover:not(:focus) {
    box-shadow: var(--shadow-md), var(--bevel-top), inset 0 1px 8px #b9924a0a;
    border-color: #b9924a61
}

.breadcrumbs li:last-child {
    color: var(--leather-crimson);
    text-shadow: 0 0 12px var(--crimson-soft);
    border-bottom: 1.5px solid #6c101047;
    padding-bottom: .08em;
    font-weight: 800
}

body.isolation-mode article .verse.isolated:after {
    content: "";
    pointer-events: none;
    background: 0 0;
    border-top: 1px solid #b9924a66;
    border-right: 1px solid #b9924a66;
    border-radius: 0 4px 0 0;
    width: 14px;
    height: 14px;
    position: absolute;
    top: 6px;
    right: 8px;
    opacity: 1 !important
}

.canon-section:hover .canon-title {
    text-shadow: 0 1px #ffffffad, 0 0 18px #b9924a14;
    transition: text-shadow var(--t-med) var(--ease)
}

#toast:after {
    content: "";
    background: linear-gradient(90deg, var(--accent-gold) 0%, #b9924a33 60%, transparent 100%);
    opacity: .55;
    pointer-events: none;
    border-radius: 0 100px 0 0;
    height: 1px;
    position: absolute;
    top: 0;
    left: 3px;
    right: 0
}

[data-theme=dark] .drop-cap:before {
    opacity: .75;
    background: linear-gradient(135deg, #cda96e17 0%, #e8ca8c0d 50%, #cda96e17 100%);
    border-color: #cda96e38
}

[data-theme=sepia] .study-intro {
    box-shadow: var(--shadow-md), var(--shadow-inner), -4px 0 18px -4px #9a6e2e2e, inset 0 0 40px #9a6e2e06
}

[data-theme=sepia] .drop-cap:before {
    background: linear-gradient(135deg, #9a6e2e1a 0%, #ba8c440d 50%, #9a6e2e1a 100%);
    border-color: #9a6e2e38
}

.chapter-toc {
    margin: 2.5rem 0 3.5rem
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 12px;
    margin-top: 1.5rem
}

.chapter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--rule-color);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none !important;
    border-radius: 8px;
    transition: all var(--t-fast) var(--ease);
    box-shadow: var(--shadow-sm), var(--bevel-top)
}

.chapter-link:hover {
    background: var(--surface-warm);
    border-color: var(--accent-gold);
    color: var(--leather-crimson);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 5px 15px var(--accent-gold-soft)
}

[data-theme=dark] .chapter-link {
    background: var(--surface-subtle);
    border-color: var(--rule-color);
    color: var(--text-muted)
}

[data-theme=dark] .chapter-link:hover {
    background: var(--surface-warm);
    color: var(--accent-gold-warm);
    box-shadow: 0 5px 20px #00000080
}

/* -------------------------------------------------------------------------------
   Amazon Affiliate Sticky Bar  Matches Cathedral Codex Aesthetic
   ------------------------------------------------------------------------------- */

@keyframes affBarSlideUp {
    from {
        transform: translateY(120%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes affBarFadeIn {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
        filter: blur(6px);
    }

    60% {
        opacity: 0.8;
        transform: translateX(-4px) scale(1.02);
        filter: blur(1px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes ctaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 16, 16, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(108, 16, 16, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 16, 16, 0);
    }
}

@keyframes ctaPulseDark {
    0% {
        box-shadow: 0 0 0 0 rgba(206, 44, 44, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(206, 44, 44, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(206, 44, 44, 0);
    }
}

@keyframes iconGlowSweep {

    0%,
    100% {
        filter: drop-shadow(0 0 5px var(--accent-gold-glow));
        transform: scale(1) rotate(0deg);
    }

    50% {
        filter: drop-shadow(0 0 15px var(--accent-gold));
        transform: scale(1.15) rotate(5deg);
    }
}

@keyframes iconGlowSweepDark {

    0%,
    100% {
        filter: drop-shadow(0 0 8px var(--accent-gold));
        transform: scale(1) rotate(0deg);
    }

    50% {
        filter: drop-shadow(0 0 18px var(--accent-gold-warm));
        transform: scale(1.15) rotate(5deg);
    }
}

#amazon-affiliate-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-top: 1px solid var(--rule-color);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08), var(--bevel-top);
    padding: 0;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.5s var(--ease);
    contain: layout style;
}

#amazon-affiliate-bar.aff-bar-visible {
    transform: translateY(0);
    opacity: 1;
}

#amazon-affiliate-bar.aff-bar-hiding {
    transform: translateY(120%);
    opacity: 0;
}

[data-theme="dark"] #amazon-affiliate-bar {
    border-top-color: var(--rule-faint);
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.65), var(--bevel-top);
}

.aff-bar-inner {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), filter 0.4s var(--ease);
}

.aff-bar-inner.aff-bar-fading {
    opacity: 0;
    transform: translateX(-15px) scale(0.95);
    filter: blur(4px);
}

.aff-bar-inner.aff-bar-fade-in {
    animation: affBarFadeIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.aff-bar-content {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
    min-width: 0;
}

.aff-bar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--surface);
    background: var(--leather-crimson);
    border: 1px solid var(--leather-crimson);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .aff-bar-badge {
    color: var(--bg-primary);
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.aff-bar-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.aff-bar-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.aff-bar-subtitle {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.aff-bar-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--leather-crimson) !important;
    background: transparent;
    border: 1px solid var(--leather-crimson);
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none !important;
    transition: background var(--t-fast) var(--ease),
        color var(--t-fast) var(--ease),
        box-shadow var(--t-fast) var(--ease),
        transform var(--t-fast) var(--ease-spring);
    box-shadow: none;
    position: relative;
    overflow: hidden;
    animation: ctaPulse 2.5s infinite;
}

.aff-bar-cta:hover {
    background: var(--leather-crimson);
    color: var(--surface) !important;
    box-shadow: var(--shadow-md), 0 4px 16px rgba(108, 16, 16, 0.25);
    transform: translateY(-1px);
}

[data-theme="dark"] .aff-bar-cta {
    border-color: var(--accent-gold);
    color: var(--accent-gold-warm) !important;
    animation: ctaPulseDark 2.5s infinite;
}

[data-theme="dark"] .aff-bar-cta:hover {
    background: var(--accent-gold);
    color: var(--bg-primary) !important;
    box-shadow: var(--shadow-md), 0 4px 18px rgba(206, 44, 44, 0.30);
}

.aff-bar-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--text-faint);
    border-radius: 50%;
    border: 1px solid transparent;
    transition: color var(--t-fast) var(--ease),
        background var(--t-fast) var(--ease),
        border-color var(--t-fast) var(--ease),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    cursor: pointer;
    background: transparent;
}

.aff-bar-close:hover {
    color: var(--leather-crimson);
    background: var(--surface-warm);
    border-color: var(--rule-color);
    transform: rotate(90deg) scale(1.1);
}

[data-theme="dark"] .aff-bar-close:hover {
    color: var(--accent-gold-warm);
    background: var(--surface-subtle);
}

/* Shift scroll controls up when bar is visible */
#amazon-affiliate-bar.aff-bar-visible~.scroll-controls,
body:has(#amazon-affiliate-bar.aff-bar-visible) .scroll-controls {
    bottom: 5.5rem;
    transition: bottom 0.4s var(--ease-out-quint);
}

@media (max-width: 768px) {

    #amazon-affiliate-bar.aff-bar-visible~.scroll-controls,
    body:has(#amazon-affiliate-bar.aff-bar-visible) .scroll-controls {
        bottom: 8.5rem;
    }
}

/* -- Mobile Responsive -- */
@media (max-width: 768px) {
    .aff-bar-inner {
        padding: 1rem 1.25rem 0.8rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        position: relative;
    }

    .aff-bar-content {
        align-items: flex-start;
        padding-right: 1.5rem;
        gap: 0.35rem;
        flex-direction: column;
        text-align: left;
    }

    .aff-bar-badge {
        font-size: 0.5rem;
        padding: 0.15rem 0.4rem;
        margin: 0;
        align-self: flex-start;
    }

    .aff-bar-title {
        font-size: 1.05rem;
        white-space: normal;
        margin: 0;
        line-height: 1.35;
    }

    .aff-bar-subtitle {
        font-size: 0.75rem;
        white-space: normal;
        display: block;
    }

    .aff-bar-cta {
        align-self: center;
        padding: 0.5rem 1.2rem;
        font-size: 0.65rem;
        width: 100%;
        justify-content: center;
        border-radius: 4px;
        letter-spacing: 0.14em;
        margin-top: 0.2rem;
    }

    .aff-bar-close {
        position: absolute;
        top: 0.6rem;
        right: 0.6rem;
        font-size: 1.5rem;
        color: var(--text-muted);
    }
}

@media (max-width: 400px) {
    .aff-bar-title {
        font-size: 0.95rem;
    }

    .aff-bar-subtitle {
        font-size: 0.7rem;
    }
}

/* -- Print: hidden -- */
@media print {

    #amazon-affiliate-bar,
    #amazon-footer-disclosure {
        display: none !important;
    }
}

/* -- Prefers Reduced Motion -- */
@media (prefers-reduced-motion: reduce) {
    #amazon-affiliate-bar {
        transition: none !important;
    }

    .aff-bar-inner.aff-bar-fade-in {
        animation: none !important;
    }

    .aff-bar-cta,
    .aff-bar-badge {
        animation: none !important;
    }

    .aff-bar-cta::before {
        display: none;
    }
}

/* -- Add body bottom padding when bar is active -- */
body:has(#amazon-affiliate-bar.aff-bar-visible) {
    padding-bottom: 5rem;
}

@media (max-width: 768px) {
    body:has(#amazon-affiliate-bar.aff-bar-visible) {
        padding-bottom: 8rem;
    }
}