:root {
    color-scheme: light;
    --forest: #17352d;
    --ink: #18352d;
    --leaf: #456b50;
    --clay: #ad4f3a;
    --paper: #f7f5ef;
    --muted: #68766e;
    --line: #e4e5dc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background-image: radial-gradient(#456b5010 0.65px, transparent 0.65px); background-size: 9px 9px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.site-header { position: relative; z-index: 2; border-bottom: 1px solid #e4e5dc; background: rgba(247, 245, 239, .95); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #e8eee5; color: var(--leaf); }
.nav-link { transition: color .18s ease; }
.nav-link:hover, .footer-link:hover, .text-link:hover { color: var(--clay); }
.header-tools { position: relative; display: flex; align-items: center; gap: 10px; }
.search-toggle { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: #fffefa; color: var(--ink); cursor: pointer; transition: border-color .18s ease, color .18s ease; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { border-color: var(--clay); color: var(--clay); }
.account-toggle.is-authenticated { border-color: var(--leaf); background: #e8eee5; color: var(--leaf); }
.header-reading, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 4px; background: var(--clay); padding: 11px 15px; color: #fff; font-size: 13px; font-weight: 700; transition: background .18s ease, transform .18s ease; }
.header-reading:hover, .primary-button:hover { transform: translateY(-1px); background: #923f2f; }
.header-reading.catechism-button { background: var(--leaf); }
.header-reading.catechism-button:hover { background: var(--forest); }
.header-search[hidden] { display: none; }
.header-search:not([hidden]) { position: absolute; top: calc(100% + 10px); right: 0; z-index: 5; width: min(380px, calc(100vw - 40px)); max-width: none; margin: 0; box-shadow: 0 12px 32px #18352d24; transform-origin: top right; animation: search-pop .2s ease-out both; }
.quick-browser { display: grid; width: 100%; max-width: none; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) repeat(2, minmax(0, .8fr)) auto; gap: 8px; }
.quick-browser select { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 3px; background: #fffefa; padding: 0 11px; color: var(--ink); font-size: 13px; }
.quick-browser select:disabled { background: #efeee8; color: #89948d; }
.quick-browser-actions { display: flex; gap: 8px; }
.quick-browser button { display: inline-flex; min-width: 90px; height: 42px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 3px; background: var(--leaf); padding: 0 13px; color: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.quick-browser button:hover { background: var(--forest); }
.quick-browser button[hidden] { display: none; }
.copy-toast { position: fixed; bottom: 24px; left: 50%; z-index: 10; border-radius: 3px; background: var(--forest); padding: 12px 18px; color: white; font-size: 13px; font-weight: 600; box-shadow: 0 6px 24px #18352d33; transform: translateX(-50%); }
.copy-toast[hidden] { display: none; }
.home-hero { position: relative; overflow: hidden; background: var(--forest); color: white; }
.home-hero::after { position: absolute; inset: 0; background-image: linear-gradient(105deg, transparent 65%, #d3d0b50d 65.1%, transparent 65.3%), radial-gradient(#ffffff13 .7px, transparent .7px); background-size: auto, 10px 10px; content: ""; pointer-events: none; }
.home-hero > div { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 10px; color: var(--clay); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-light { color: #db9c7d; }
.hero-copy { animation: arrive .55s ease both; }
.hero-copy h1 em { color: #d99b7e; font-weight: 500; }
.hero-search, .search-form { display: flex; align-items: center; gap: 12px; border: 1px solid #e4e5dc; border-radius: 4px; background: #fff; padding: 7px 8px 7px 15px; color: var(--ink); }
.hero-search { max-width: 510px; margin-top: 28px; }
.hero-search input, .search-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.hero-search input::placeholder, .search-form input::placeholder { color: #89948d; }
.hero-search button, .search-form button { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 3px; background: var(--clay); color: white; cursor: pointer; }
.hero-shortcuts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; color: #d4ded6; font-size: 12px; font-weight: 600; }
.hero-shortcuts a, .panel-action, .text-link, .back-link, .footer-link { display: inline-flex; align-items: center; gap: 8px; }
.hero-shortcuts a:hover { color: white; }
.hero-art { position: relative; display: grid; min-height: 290px; place-items: center; border: 1px solid #ffffff29; background: linear-gradient(145deg, #22483c, #17352d 70%); animation: arrive .65s .12s ease both; }
.hero-art::before, .hero-art::after { position: absolute; width: 70%; height: 70%; border: 1px solid #df9e7c44; content: ""; transform: rotate(-9deg); }
.hero-art::after { width: 63%; height: 77%; border-color: #ffffff2b; transform: rotate(8deg); }
.art-rule { position: absolute; width: 46%; height: 1px; background: #d99b7e; transform: rotate(-32deg); }
.art-icon { position: relative; z-index: 1; width: 82px; height: 82px; stroke-width: .8; color: #f0c8a9; }
.art-label, .art-number { position: absolute; z-index: 1; color: #d5e0d7; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.art-label { right: 18px; bottom: 17px; }
.art-number { top: 17px; left: 18px; color: #d99b7e; }
.daily-card, .today-card { min-width: 0; border: 1px solid var(--line); background: #fffefa; padding: 26px; }
.daily-card { border-top: 3px solid var(--clay); }
.daily-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.daily-sun, .today-icon { display: grid; width: 42px; height: 42px; place-items: center; background: #f5e9df; color: var(--clay); }
.daily-quote { margin: 26px 0 15px; color: var(--ink); font-family: Lora, Georgia, serif; font-size: 22px; line-height: 1.65; }
.daily-citation { color: var(--muted); font-size: 13px; }
.download-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; border: 1px solid #d8ddd5; border-radius: 3px; background: transparent; padding: 9px 12px; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .18s ease, color .18s ease; }
.download-button:hover { border-color: var(--clay); color: var(--clay); }
.download-button:disabled { cursor: wait; opacity: .65; }
.today-card { background: #e9eee5; }
.today-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.today-card-heading .eyebrow { margin: 0; color: var(--leaf); }
.today-icon { background: #d8e3d4; color: var(--leaf); }
.today-reference { margin-top: 10px; color: var(--muted); }
.today-reference strong { margin-left: 5px; color: var(--ink); font-family: Lora, Georgia, serif; font-size: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.text-link { color: var(--leaf); font-size: 13px; font-weight: 700; white-space: nowrap; }
.testament-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.testament-panel { position: relative; display: flex; min-height: 185px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 22px; transition: transform .2s ease; }
.testament-panel:hover { transform: translateY(-3px); }
.old-panel { background: #dbe5d8; color: var(--ink); }
.new-panel { background: #e9d9cb; color: #442e27; }
.panel-index { font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.panel-index, .panel-title, .panel-action { position: relative; z-index: 1; }
.panel-title { max-width: 64%; font-family: Lora, Georgia, serif; font-size: clamp(20px, 3vw, 30px); font-weight: 600; }
.panel-action { width: fit-content; font-size: 12px; font-weight: 700; }
.testament-art { position: absolute; top: 50%; right: 3%; width: 43%; max-height: 90%; object-fit: contain; transform: translateY(-50%); transition: transform .25s ease; }
.testament-panel:hover .testament-art { transform: translateY(-50%) scale(1.04); }
.site-footer { border-top: 1px solid var(--line); background: #f0eee7; color: var(--muted); font-size: 12px; }
.site-footer .brand { color: var(--ink); }
.footer-link { color: var(--leaf); font-weight: 700; }
.status-banner { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #e9cbb8; background: #fff9f1; padding: 14px 16px; color: #754431; font-size: 13px; line-height: 1.6; }
.status-banner p { margin: 0; }
.status-banner code { border-radius: 2px; background: #f4e8dc; padding: 1px 4px; font-size: 11px; }
.back-link { color: var(--leaf); font-size: 13px; font-weight: 700; }
.chapter-heading { margin: 40px 0 28px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.chapter-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.chapter-page.has-comments { grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); align-items: start; }
.chapter-main { min-width: 0; }
.chapter-text { max-width: 760px; margin: auto; padding: 8px 0 30px; }
.chapter-section-heading { margin: 26px 10px 8px; color: var(--leaf); font-family: Lora, Georgia, serif; font-size: 19px; font-weight: 600; line-height: 1.5; }
.catechism-page { display: grid; max-width: 1280px; min-height: calc(100vh - 170px); grid-template-columns: 270px minmax(0, 1fr); gap: 56px; margin: 0 auto; padding: 48px 32px 80px; }
.catechism-sidebar { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; border-right: 1px solid var(--line); padding: 4px 24px 20px 0; }
.catechism-sidebar h2 { margin: 0 0 24px; }
.catechism-menu-chapter { margin: 0 0 22px; }
.catechism-chapter-link { display: block; border-left: 2px solid transparent; padding: 5px 0 5px 10px; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; }
.catechism-chapter-link.is-active { border-color: var(--clay); color: var(--clay); }
.catechism-menu ul { display: grid; gap: 3px; margin: 6px 0 0 12px; padding: 0; list-style: none; }
.catechism-menu li a { display: block; border-left: 1px solid var(--line); padding: 6px 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.catechism-menu li a:hover, .catechism-menu li a[aria-current="page"] { border-color: var(--clay); color: var(--clay); }
.catechism-article { min-width: 0; max-width: 780px; padding-top: 8px; }
.catechism-article h1 { margin: 0; line-height: 1.2; }
.catechism-copy { margin-top: 28px; color: #34463d; font-family: Lora, Georgia, serif; font-size: 18px; line-height: 1.9; }
.catechism-empty { margin-top: 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.account-page { max-width: 880px; min-height: calc(100vh - 170px); margin: 0 auto; padding: 48px 24px 80px; }
.account-heading { margin-bottom: 28px; }
.account-heading h1 { margin: 0; }
.account-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.account-section { min-width: 0; border-top: 1px solid var(--line); padding: 24px 0; }
.account-section h2 { margin: 0 0 18px; }
.account-form { display: grid; gap: 9px; }
.account-form label { margin-top: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
.account-form input { width: 100%; min-height: 44px; border: 1px solid #cad5c8; border-radius: 3px; background: #fffefa; padding: 0 12px; color: var(--ink); }
.account-form input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.social-links-fieldset { display: grid; gap: 9px; margin: 20px 0 0; border: 1px solid var(--line); padding: 14px; }
.social-links-fieldset legend { padding: 0 6px; color: var(--leaf); font-family: Lora, Georgia, serif; font-size: 18px; font-weight: 600; }
.comment-social-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 3px; }
.comment-social-links a { color: var(--leaf); font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.account-form button { justify-self: start; margin-top: 12px; cursor: pointer; }
.account-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; color: var(--muted); font-size: 14px; }
.account-summary form { margin: 0; }
.account-notice { margin: 0 0 22px; border-left: 3px solid var(--leaf); background: #edf2e9; padding: 12px 15px; color: var(--ink); font-size: 14px; line-height: 1.6; }
.account-notice-error { border-color: var(--clay); background: #fff3ee; color: #754431; }
.account-notice code { font-size: 12px; }
.account-narrow { max-width: 460px; }
.account-help { margin: 14px 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.account-help .text-link { display: inline-flex; align-items: center; gap: 6px; }
.account-delete-section { border-top-color: #e9cbb8; }
.account-delete-section > p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.account-delete-button { border: 1px solid #ad4f3a; border-radius: 3px; background: transparent; padding: 10px 13px; color: #923f2f; font-size: 13px; font-weight: 700; }
.account-delete-button:hover { background: #fff3ee; }
.verse-comments { margin: 0 10px 22px 54px; border-left: 2px solid var(--line); padding: 3px 0 2px 14px; color: var(--muted); font-family: 'DM Sans', sans-serif; }
.verse-comments h3 { margin: 0 0 8px; color: var(--leaf); font-size: 11px; font-weight: 700; }
.comment-list { display: grid; gap: 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.comment-list li { min-width: 0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; font-size: 11px; }
.comment-meta strong { color: var(--ink); }
.comment-author-link:hover { color: var(--leaf); text-decoration: underline; text-underline-offset: 2px; }
.comment-meta time { color: var(--muted); }
.comment-delete-form { display: inline-flex; margin: 0 0 0 auto; }
.comment-delete-form button { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.comment-delete-form button:hover { border-color: #e9cbb8; background: #fff3ee; color: var(--clay); }
.comment-list li p { margin: 3px 0 0; color: #42544a; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.comment-form { display: flex; align-items: flex-end; gap: 8px; }
.comment-form textarea { min-width: 0; min-height: 40px; flex: 1; resize: vertical; border: 1px solid var(--line); border-radius: 3px; background: #fffefa; padding: 9px 10px; color: var(--ink); font: 13px/1.5 'DM Sans', sans-serif; }
.comment-form textarea:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
.comment-form button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 3px; background: var(--leaf); padding: 0 12px; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.comment-form button:hover { background: var(--forest); }
.comment-login-hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.comment-login-hint a { color: var(--leaf); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.profile-page { max-width: 880px; min-height: calc(100vh - 170px); margin: 0 auto; padding: 48px 24px 80px; }
.profile-heading { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.profile-heading h1 { margin: 0; }
.profile-heading > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.profile-comments-section { margin-top: 32px; }
.profile-comments-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.profile-comments-heading h2 { margin: 0; }
.profile-comments-heading span { color: var(--muted); font-size: 12px; }
.profile-comment-list { margin: 0; padding: 0; list-style: none; }
.profile-comment-list li { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.profile-comment-target { display: inline-flex; align-items: center; gap: 6px; color: var(--leaf); font-size: 12px; font-weight: 700; }
.profile-comment-target:hover { color: var(--clay); }
.profile-comment-list li p { margin: 7px 0; color: #42544a; font-family: Lora, Georgia, serif; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.profile-comment-list time { color: var(--muted); font-size: 11px; }
.profile-empty, .profile-not-found { color: var(--muted); font-size: 14px; line-height: 1.7; }
.profile-not-found { padding-top: 24px; }
.profile-not-found h1 { color: var(--ink); }
.verse-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin: 0; border-radius: 3px; padding: 9px 11px; color: #34463d; font-family: Lora, Georgia, serif; font-size: 17px; line-height: 1.9; scroll-margin-top: 20px; }
.verse-item { display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 3px; }
.verse-comment-toggle { display: inline-flex; min-width: 32px; min-height: 32px; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.verse-comment-toggle:hover, .verse-comment-toggle[aria-expanded="true"] { background: #e8eee5; color: var(--leaf); }
.verse-comment-toggle span { font: 700 10px 'DM Sans', sans-serif; }
.chapter-comments-panel { position: sticky; top: 20px; min-width: 0; max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--line); border-top: 3px solid var(--leaf); background: #fffefa; padding: 20px; animation: arrive .18s ease both; }
.chapter-comments-panel[hidden] { display: none; }
.chapter-comments-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.chapter-comments-heading h2 { margin: 0; color: var(--ink); font-family: Lora, Georgia, serif; font-size: 21px; font-weight: 600; }
.chapter-comments-heading button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.chapter-comments-heading button:hover { border-color: var(--clay); color: var(--clay); }
.chapter-comments-body { padding-top: 16px; }
.chapter-comments-panel .verse-comments { margin: 0; border: 0; padding: 0; }
.catechism-article > .verse-comments { margin-top: 46px; }
.verse-row sup { padding-top: 5px; color: var(--clay); font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700; }
.verse-highlight { background: #f8e4de; box-shadow: inset 3px 0 var(--clay); color: #772f25; animation: highlight 1.2s ease-out; }
.chapter-pager { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding: 18px 0; color: var(--leaf); font-size: 12px; font-weight: 700; }
.chapter-pager a { display: inline-flex; align-items: center; gap: 6px; }
.chapter-pager a:hover { color: var(--clay); }
.empty-state { margin-top: 24px; border: 1px dashed #cbd2c8; padding: 22px; color: var(--muted); font-size: 14px; }
.testament-tabs { display: flex; gap: 10px; margin: 0 0 30px; border-bottom: 1px solid var(--line); }
.testament-tabs a { border-bottom: 2px solid transparent; padding: 0 2px 12px; color: var(--leaf); font-size: 13px; font-weight: 700; }
.testament-tabs a:hover { border-color: var(--clay); }
.book-link, .chapter-tile { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: #fffefa; padding: 11px 12px; color: var(--ink); font-size: 13px; font-weight: 600; transition: border .15s ease, background .15s ease; }
.book-link:hover, .chapter-tile:hover { border-color: #bb8c74; background: #fff; }
.book-name { display: inline-flex; align-items: baseline; gap: 7px; }
.book-number { color: var(--clay); font-size: 11px; font-weight: 700; }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.chapter-tile { min-height: 64px; }
.chapter-tile svg { color: var(--clay); }
.search-form { max-width: 690px; min-height: 56px; }
.search-result { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: start; padding: 18px 8px; }
.search-result:hover { background: #fffefa; }
.search-reference { color: var(--clay); font-size: 12px; font-weight: 700; }
.search-copy { color: #42544a; font-family: Lora, Georgia, serif; font-size: 15px; line-height: 1.7; }
.reading-page { min-height: calc(100vh - 65px); background: #e9eee5; padding: 24px max(20px, calc((100% - 1000px) / 2)); }
.reading-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.reading-content { max-width: 760px; margin: 13vh auto 50px; }
.reading-date-picker { display: grid; gap: 10px; margin: 26px 0 38px; border: 1px solid #cad5c8; background: #f7f8f3; padding: 16px; }
.date-picker-label { display: inline-flex; align-items: center; gap: 8px; color: var(--leaf); font-size: 12px; font-weight: 700; }
.date-picker-controls { display: flex; gap: 9px; }
.date-picker-controls input { min-width: 0; min-height: 44px; flex: 1; border: 1px solid #cad5c8; border-radius: 3px; background: #fffefa; padding: 0 12px; color: var(--ink); font: 500 14px 'DM Sans', sans-serif; }
.date-picker-controls input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.date-picker-controls .primary-button { min-height: 44px; white-space: nowrap; }
.calendar-error { border-left: 3px solid var(--clay); background: #fff9f1; padding: 12px 15px; color: #754431; }
.reading-chapter + .reading-chapter { margin-top: 30px; border-top: 1px solid #cad5c8; padding-top: 10px; }
.reading-reference { margin-top: 24px; color: var(--leaf); font-family: Lora, Georgia, serif; font-size: 24px; }
.reading-verse { margin-top: 70px; border-top: 1px solid #cad5c8; padding-top: 25px; }
.reading-verse p { margin: 16px 0; font-family: Lora, Georgia, serif; font-size: 23px; line-height: 1.7; }
.reading-verse cite { color: var(--muted); font-size: 13px; font-style: normal; }
.animate-on-load { animation: arrive .55s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes search-pop { from { opacity: 0; transform: translateY(-7px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes highlight { 0% { background: #edb7a3; } 100% { background: #f8e4de; } }

@media (max-width: 640px) {
    .quick-browser { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-browser select[name="book"], .quick-browser select[name="chapter"] { grid-column: 1 / -1; }
    .quick-browser-actions { grid-column: 1 / -1; }
    .quick-browser-actions button { flex: 1; }
    .search-toggle { width: 38px; height: 38px; }
    .header-reading { width: 38px; height: 38px; padding: 0; }
    .header-reading span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .catechism-page { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 32px 20px 54px; }
    .catechism-sidebar { position: static; max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 18px; }
    .catechism-sidebar h2 { margin-bottom: 16px; }
    .catechism-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .catechism-menu-chapter { min-width: 0; margin-bottom: 0; }
    .catechism-article h1 { font-size: 32px; }
    .catechism-copy { font-size: 17px; }
    .account-auth-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .account-page { padding: 34px 20px 56px; }
    .profile-page { padding: 34px 20px 56px; }
    .account-summary { align-items: flex-start; flex-direction: column; }
    .verse-comments { margin-left: 34px; }
    .chapter-page.has-comments { grid-template-columns: minmax(0, 1fr); }
    .chapter-page.has-comments .chapter-comments-panel { position: fixed; inset: 0 0 0 auto; z-index: 20; width: min(92vw, 410px); max-height: 100dvh; border-top: 0; padding: 20px; box-shadow: -16px 0 42px #18352d26; }
    .comment-form { align-items: stretch; flex-direction: column; }
    .comment-form button { align-self: flex-end; }
    .hero-art { min-height: 225px; }
    .daily-card, .today-card { padding: 21px; }
    .daily-quote { font-size: 19px; }
    .date-picker-controls { align-items: stretch; flex-direction: column; }
    .date-picker-controls .primary-button { width: 100%; }
    .testament-preview { grid-template-columns: 1fr; }
    .testament-panel { min-height: 150px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .search-result { grid-template-columns: 1fr auto; gap: 7px 12px; }
    .search-copy { grid-column: 1 / -1; grid-row: 2; }
    .search-result svg { grid-column: 2; grid-row: 1; }
    .chapter-pager { font-size: 11px; }
}

@media (min-width: 640px) {
    .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .chapter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}