/* parrott.ink — Study section. Loaded only on study templates. */
:root, [data-theme="light"] { --mark: rgba(242,119,119,0.2); --teal-mid: #7fbcbc; --shadow: 0 10px 30px -12px rgba(3,35,38,0.25); }
[data-theme="dark"] { --mark: rgba(242,119,119,0.28); --teal-mid: #2f8a8a; --shadow: 0 10px 30px -12px rgba(0,0,0,0.6); }

.st-label { font-family: var(--serif-b); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--warm-gray); }
.st-wrap { max-width: var(--wide-width); margin: 0 auto; padding: 0 var(--space-md); }
.st-narrow { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }

/* Breadcrumbs */
.st-crumbs { display: flex; flex-wrap: wrap; gap: 0.5em; font-family: var(--serif-b); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--warm-gray); padding-top: var(--space-lg); }
.st-crumbs a { color: var(--warm-gray); }
.st-crumbs a:hover { color: var(--teal); }
.st-crumbs .sep { opacity: 0.45; }

/* Hero */
.st-hero { max-width: 46rem; margin: var(--space-xl) auto var(--space-lg); padding: 0 var(--space-md); text-align: center; }
.st-hero h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: var(--space-sm); }
.st-hero p { font-size: 1.05rem; color: var(--text-light); line-height: 1.55; }

/* Search */
.st-search { position: relative; max-width: 36rem; margin: var(--space-lg) auto 0; text-align: left; }
.st-search input { width: 100%; font-family: var(--serif); font-size: 1.1rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0.85em 1em 0.85em 2.8em; transition: border-color .15s, box-shadow .15s; }
.st-search input[type="search"]::-webkit-search-cancel-button, .st-search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.st-search input:not(:placeholder-shown) ~ .st-kbd { display: none; }
.st-search input::placeholder { color: var(--warm-gray); }
.st-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--light-teal); }
.st-search > svg { position: absolute; left: 1em; top: 1.15em; color: var(--warm-gray); pointer-events: none; }
.st-kbd { position: absolute; right: 0.9em; top: 1em; font-family: var(--serif-b); font-size: 0.7rem; color: var(--warm-gray); border: 1px solid var(--border); border-radius: 3px; padding: 0.1em 0.45em; }
.st-chips { display: flex; flex-wrap: wrap; gap: 0.45em; justify-content: center; margin-top: var(--space-sm); }
.st-chip { font-family: var(--serif-b); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-light); background: var(--bg-surface); border: 0; border-radius: 3px; padding: 0.4em 0.9em; cursor: pointer; transition: background .15s, color .15s; }
.st-chip:hover { background: var(--cream); color: var(--teal); }
.st-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; }
.st-suggest:empty { display: none; }
.st-sug { display: grid; grid-template-columns: 6rem 1fr; gap: 0.2rem 0.8rem; align-items: baseline; padding: 0.65em 1em; color: var(--text); border-bottom: 1px solid var(--border); }
.st-sug:last-child { border-bottom: 0; }
.st-sug.active, .st-sug:hover { background: var(--pale-teal); color: var(--text); }
.st-sug .k { font-family: var(--serif-b); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); }
.st-sug .t { font-weight: 700; font-size: 0.98rem; }
.st-sug .s { grid-column: 2; font-size: 0.85rem; color: var(--text-light); line-height: 1.45; }
.st-sug mark, .st-hit mark, .st-note mark, .post-body mark { background: var(--mark); color: inherit; padding: 0 0.08em; border-radius: 2px; }

.st-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4em 1.4em; margin-top: var(--space-md); font-family: var(--serif-b); font-size: 0.75rem; color: var(--warm-gray); letter-spacing: 0.04em; }
.st-stats b { color: var(--text); font-weight: 700; }

/* Sections */
.st-section { margin: 0 auto var(--space-2xl); }
.st-section .feed-section-label { display: flex; justify-content: space-between; align-items: baseline; }
.st-section .feed-section-label a { color: var(--warm-gray); letter-spacing: 0.12em; }
.st-section .feed-section-label a:hover { color: var(--teal); }

/* Recent cards */
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: var(--space-md); }
.st-card { display: flex; flex-direction: column; padding: var(--space-sm) var(--space-md) var(--space-md); background: var(--bg-surface); border-left: 3px solid var(--teal); border-radius: 0 4px 4px 0; color: var(--text); transition: transform .2s ease, background .2s; }
.st-card:hover { color: var(--text); background: var(--cream); transform: translateY(-3px); }
.st-card.is-post { border-left-color: var(--coral); }
.st-card h3 { font-size: 1.15rem; line-height: 1.25; margin: 0.15rem 0 0.4rem; }
.st-card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.st-card .post-meta { margin-top: 0.6rem; }

/* Library */
.st-recent .st-posts .t { font-size: 0.9rem; }
.st-recent .st-posts li a { padding: 0.55em 0; }
.st-testament + .st-testament { margin-top: var(--space-xl); }
.st-testament h3 { font-size: 1.05rem; margin-bottom: var(--space-sm); display: flex; align-items: baseline; gap: 0.8em; }
.st-testament h3 .st-label { letter-spacing: 0.1em; }
.st-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr)); gap: 0.55rem; }
.st-book { display: block; padding: 0.7em 0.8em 0.6em; border: 1px solid var(--border); border-radius: 4px; color: var(--text); background: var(--bg); transition: border-color .15s, transform .15s, opacity .15s; }
.st-book:hover { border-color: var(--teal); color: var(--text); transform: translateY(-2px); }
.st-book .n { display: block; font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.st-book .bar { display: block; height: 3px; background: var(--cream); border-radius: 2px; margin: 0.55em 0 0.4em; overflow: hidden; }
.st-book .bar i { display: block; height: 100%; background: var(--teal); border-radius: 2px; }
.st-book .m { display: block; font-family: var(--serif-b); font-size: 0.64rem; letter-spacing: 0.05em; color: var(--warm-gray); }
.st-book.is-empty { opacity: 0.45; }
.st-book.is-empty:hover { opacity: 0.8; }

.st-topics { columns: 2; column-gap: var(--space-xl); }
.st-topics a { display: block; break-inside: avoid; padding: 0.55em 0; border-bottom: 1px solid var(--border); color: var(--text); }
.st-topics a:hover { color: var(--teal); }
.st-topics .st-label { margin-left: 0.6em; letter-spacing: 0.08em; }
details.st-more { margin-top: var(--space-md); }
details.st-more summary { cursor: pointer; font-family: var(--serif-b); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }

/* Page headers */
.st-head { max-width: var(--max-width); margin: var(--space-lg) auto var(--space-lg); padding: 0 var(--space-md); text-align: center; }
.st-head h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: var(--space-sm); }
.st-head .post-meta { font-size: 0.82rem; }
.st-head-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5em 1.6em; margin-top: var(--space-sm); font-family: var(--serif-b); font-size: 0.75rem; letter-spacing: 0.06em; }
.st-head-links a { color: var(--teal); }
.st-head-links a:hover { color: var(--coral); }
.st-head-links .off { color: var(--border); }

/* Book page */
.st-intro { max-width: var(--max-width); margin: 0 auto var(--space-xl); padding: 0 var(--space-md); }
.st-intro .post-body { font-size: 1.05rem; }
.st-chmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr)); gap: 0.4rem; }
.st-ch { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 3px; font-family: var(--serif-b); font-size: 0.82rem; color: var(--warm-gray); background: var(--bg); transition: transform .12s, border-color .12s; }
.st-ch:hover { transform: translateY(-2px); border-color: var(--coral); color: var(--coral); }
.st-ch.has-posts { border-color: var(--teal); color: var(--teal); }
.st-ch.has-notes { background: var(--teal); border-color: var(--teal); color: #fff; }
[data-theme="dark"] .st-ch.has-notes { color: var(--bg); }
.st-ch.has-notes:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.st-ch .dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--coral); }
.st-ch.has-notes .dot { background: #fff; }
[data-theme="dark"] .st-ch.has-notes .dot { background: var(--bg); }
.st-legend { display: flex; flex-wrap: wrap; gap: 0.5em 1.4em; margin-top: var(--space-sm); font-family: var(--serif-b); font-size: 0.7rem; color: var(--warm-gray); }
.st-legend i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; vertical-align: -0.1em; margin-right: 0.4em; border: 1px solid var(--border); }
.st-legend .l-notes { background: var(--teal); border-color: var(--teal); }
.st-legend .l-posts { border-color: var(--teal); }
.st-vlegend { display: none; }
.st-legend .l-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--coral); border: 0; vertical-align: 0.1em; }
.st-rows a { display: grid; grid-template-columns: 7rem 1fr auto; gap: 0.3rem var(--space-md); align-items: baseline; padding: 0.95em 0; border-bottom: 1px solid var(--border); color: var(--text); }
.st-rows a:hover { color: var(--text); }
.st-rows a:hover .r { color: var(--coral); }
.st-rows .r { font-weight: 700; color: var(--teal); transition: color .15s; }
.st-rows .x { font-size: 0.92rem; color: var(--text-light); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-rows .c { font-family: var(--serif-b); font-size: 0.68rem; color: var(--warm-gray); white-space: nowrap; letter-spacing: 0.04em; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }

/* Post lists (sermons, daily, essays) */
.st-posts li a { display: block; padding: 0.7em 0; border-bottom: 1px solid var(--border); color: var(--text); }
.st-posts li a:hover .t { color: var(--teal); }
.st-posts .k { display: block; font-family: var(--serif-b); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); margin-bottom: 0.15em; }
.st-posts .t { display: block; font-weight: 700; font-size: 0.96rem; line-height: 1.3; transition: color .15s; }
.st-posts .r { display: block; font-family: var(--serif-b); font-size: 0.7rem; color: var(--warm-gray); margin-top: 0.2em; letter-spacing: 0.03em; }
.st-posts .lock { color: var(--coral); }

/* Chapter page */
.st-verses { position: sticky; top: 0; z-index: 40; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.st-verses-inner { max-width: var(--wide-width); margin: 0 auto; padding: 0.55rem var(--space-md); display: flex; align-items: center; gap: 0.9rem; }
.st-verses .st-label { flex-shrink: 0; }
.st-vgrid { display: flex; flex-wrap: wrap; gap: 3px; }
.st-v { min-width: 1.75rem; height: 1.75rem; padding: 0 0.25rem; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif-b); font-size: 0.68rem; color: var(--warm-gray); background: none; border: 1px solid transparent; border-radius: 3px; cursor: pointer; transition: background .12s, color .12s; }
.st-v:hover { color: var(--coral); border-color: var(--coral); }
.st-v.p { border-color: var(--border); color: var(--text-light); }
.st-v.n1 { background: var(--light-teal); color: var(--deep); }
.st-v.n2 { background: var(--teal-mid); color: var(--deep); }
.st-v.n3 { background: var(--teal); color: #fff; }
[data-theme="dark"] .st-v.n3 { color: var(--bg); }
.st-v.on { box-shadow: 0 0 0 2px var(--coral); }
.st-vclear { margin-left: auto; flex-shrink: 0; font-family: var(--serif-b); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; background: none; border: 0; color: var(--teal); cursor: pointer; }
.st-vclear[hidden] { display: none; }

.st-chapter { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--space-xl); max-width: var(--wide-width); margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-2xl); }
.st-notes { max-width: var(--max-width); }
.st-group-label { margin: var(--space-md) 0 0; }
.st-note { position: relative; padding: var(--space-md) 0; border-top: 1px solid var(--border); scroll-margin-top: 4.5rem; transition: background .25s; }
.st-notes > .st-note:first-child, .st-group-label + .st-note { border-top: 0; }
.st-note-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35em 0.9em; margin-bottom: 0.45em; }
.st-note-ref { font-family: var(--serif-b); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.st-note-ref:hover { color: var(--coral); }
.st-note-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.st-note-meta { font-family: var(--serif-b); font-size: 0.7rem; color: var(--warm-gray); letter-spacing: 0.03em; }
.st-note-nrsv { margin-left: auto; font-family: var(--serif-b); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warm-gray); }
.st-note-nrsv:hover { color: var(--teal); }
.st-note .post-body { font-size: 1.05rem; line-height: 1.6; }
.st-note .post-body p { margin-bottom: 0.9em; }
.st-note .post-body p:last-child, .st-note .post-body ul:last-child { margin-bottom: 0; }
.st-note .post-body ul, .st-note .post-body ol { margin-bottom: 0.9em; }
.st-note .post-body h3, .st-note .post-body h4 { font-size: 1.08rem; margin: 1.2em 0 0.4em; }
.st-note .post-body h5, .st-note .post-body h6 { font-family: var(--serif-b); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.15em; text-transform: uppercase; color: var(--warm-gray); margin: 1.3em 0 0.45em; }
.st-note .post-body > h5:first-child, .st-note .post-body > h6:first-child { margin-top: 0.2em; }
.st-note .post-body blockquote { margin: 1em 0; }
.st-note .post-body table { border-collapse: collapse; font-size: 0.9rem; margin: 1em 0; }
.st-note .post-body td, .st-note .post-body th { border: 1px solid var(--border); padding: 0.3em 0.6em; }
.st-note.is-focus { background: var(--pale-teal); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-radius: 4px; border-top-color: transparent; }
.st-note.is-focus + .st-note { border-top-color: transparent; }
.st-note.is-focus::before { content: ''; position: absolute; left: 0; top: 0.8rem; bottom: 0.8rem; width: 3px; border-radius: 2px; background: var(--coral); }
.st-note.is-context { border-left: 3px solid var(--light-teal); padding-left: 1rem; margin-left: -1rem; }
.st-empty { padding: var(--space-md); background: var(--bg-surface); border-radius: 4px; color: var(--text-light); font-size: 0.98rem; }
.st-empty a { white-space: nowrap; }
.st-nearby { margin-bottom: var(--space-md); padding: 0.8em 1em; border: 1px dashed var(--border); border-radius: 4px; font-size: 0.95rem; color: var(--text-light); }
.he { font-family: 'SBL Hebrew', 'Taamey Frank CLM', 'Ezra SIL', 'Noto Serif Hebrew', 'Times New Roman', serif; font-size: 1.12em; unicode-bidi: isolate; }
.grc { font-family: 'SBL Greek', 'Gentium Plus', 'Noto Serif', 'Georgia', serif; }

/* Rail */
.st-rail { position: sticky; top: 4.2rem; align-self: start; max-height: calc(100vh - 5rem); overflow: auto; padding-top: var(--space-md); scrollbar-width: thin; }
.st-rail-toggle { display: none; }
.st-rail h2 { font-family: var(--serif-b); font-size: 0.66rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.16em; color: var(--warm-gray); padding-bottom: 0.5em; border-bottom: 1px solid var(--border); margin: var(--space-lg) 0 0; }
.st-rail h2:first-of-type { margin-top: 0; }
.st-rail-filter { font-size: 0.85rem; color: var(--text-light); margin-bottom: var(--space-sm); }
.st-rail-filter b { color: var(--text); }
.st-rail-filter button { font: inherit; color: var(--teal); background: none; border: 0; cursor: pointer; padding: 0; }
.st-rail .none { font-size: 0.85rem; color: var(--warm-gray); padding: 0.6em 0; }

/* Paywall */
.st-lock { position: relative; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border); }
.st-skel { height: 0.72rem; border-radius: 2px; background: var(--cream); margin: 0.75rem 0; }
.st-skel.h { width: 4.5rem; height: 0.6rem; background: var(--light-teal); margin-top: 1.6rem; }
.st-skel-wrap { position: relative; }
.st-skel-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0%, var(--bg) 92%); }
.st-cta { position: relative; z-index: 2; margin-top: -2rem; background: var(--newsletter-bg); border-radius: 6px; padding: var(--space-xl) var(--space-lg); text-align: center; }
.st-cta .st-label { color: var(--newsletter-muted); }
.st-cta h2 { color: var(--newsletter-text); font-size: 1.5rem; line-height: 1.25; margin: 0.4rem 0 0.6rem; letter-spacing: -0.01em; }
.st-cta p { color: var(--newsletter-muted); font-size: 0.95rem; line-height: 1.55; max-width: 26rem; margin: 0 auto; }
.st-btn { display: inline-block; margin-top: var(--space-md); font-family: var(--serif-b); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; padding: 0.75em 1.8em; background: var(--coral); color: #fff; border-radius: 3px; border: 0; cursor: pointer; transition: background .15s; }
.st-btn:hover { background: var(--rose); color: #fff; }
.st-cta small { display: block; margin-top: var(--space-sm); font-size: 0.85rem; color: var(--newsletter-muted); }
.st-cta small a { color: var(--newsletter-text); text-decoration: underline; text-underline-offset: 2px; }
.st-cta.compact { margin-top: var(--space-md); padding: var(--space-lg); }
.st-cta.compact h2 { font-size: 1.2rem; }

/* Results */
.st-results { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md) var(--space-2xl); }
.st-results .st-search { margin: var(--space-lg) 0 var(--space-md); max-width: none; }
.st-tabs { display: flex; flex-wrap: wrap; gap: 0.2em 1.4em; border-bottom: 1px solid var(--border); margin-bottom: var(--space-sm); }
.st-tabs button { font-family: var(--serif-b); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--warm-gray); background: none; border: 0; border-bottom: 2px solid transparent; padding: 0.7em 0; margin-bottom: -1px; cursor: pointer; }
.st-tabs button.on { color: var(--teal); border-bottom-color: var(--teal); }
.st-tabs button:hover { color: var(--teal); }
.st-hit { display: block; padding: 0.95em 0; border-bottom: 1px solid var(--border); color: var(--text); }
.st-hit:hover { color: var(--text); }
.st-hit:hover .t { color: var(--teal); }
.st-hit .k { font-family: var(--serif-b); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); }
.st-hit .t { display: block; font-weight: 700; font-size: 1.02rem; margin: 0.1em 0 0.25em; transition: color .15s; }
.st-hit .x { display: block; font-size: 0.93rem; color: var(--text-light); line-height: 1.55; }
.st-passage { border: 1px solid var(--teal); border-radius: 4px; padding: var(--space-md); margin-bottom: var(--space-lg); }
.st-passage h2 { font-size: 1.4rem; margin: 0.2rem 0 0.3rem; }
.st-passage .post-meta { margin-bottom: var(--space-sm); }
.st-passage .st-btn { margin-top: var(--space-xs); background: var(--teal); }
.st-passage .st-btn:hover { background: var(--coral); }
.st-noresults { padding: var(--space-lg) 0; color: var(--text-light); }

/* Topic page */
.st-topic { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md) var(--space-2xl); }

/* Overlay search */
.st-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 500; background: rgba(3, 35, 38, 0.45); display: flex; justify-content: center; align-items: flex-start; padding: 12vh var(--space-md) var(--space-md); }
[data-theme="dark"] .st-overlay { background: rgba(0, 0, 0, 0.6); }
.st-overlay[hidden] { display: none; }
.st-overlay .st-search { width: min(38rem, 100%); margin: 0; }
.st-overlay .st-suggest { position: static; margin-top: 6px; max-height: 60vh; overflow: auto; }
.st-overlay .st-search input { box-shadow: var(--shadow); }


/* Responsive */
@media (max-width: 1000px) {
  .st-chapter { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-rail { position: static; max-height: none; overflow: visible; order: -1; padding-top: 0; margin-bottom: var(--space-md); }
  .st-rail-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; font-family: var(--serif-b); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 3px; padding: 0.7em 1em; cursor: pointer; }
  .st-rail-body { display: none; padding: var(--space-sm) 0 0; }
  .st-rail.open .st-rail-body { display: block; }
  .st-notes { max-width: none; }
}
@media (max-width: 768px) {
  .st-hero { margin-top: var(--space-lg); }
  .st-kbd { display: none; }
  .st-two { grid-template-columns: 1fr; gap: var(--space-lg); }
  .st-topics { columns: 1; }
  .st-books { grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); }
  .st-rows a { grid-template-columns: 1fr auto; }
  .st-rows .x { grid-column: 1 / -1; }
  .st-vgrid { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; }
  .st-vgrid::-webkit-scrollbar { display: none; }
  .st-verses .st-label { display: none; }
  .st-note.is-focus { margin: 0 -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .st-note-nrsv { margin-left: 0; }
  .st-cta { padding: var(--space-lg) var(--space-md); }
  .st-sug { grid-template-columns: 1fr; }
  .st-sug .s { grid-column: 1; }
}

/* ═════════════ Ghost integration ═════════════ */
/* Ghost's own paywall box is replaced by .st-cta */
.st-page .gh-post-upgrade-cta { display: none !important; }
.st-page .kg-card, .st-page figure { margin: 0; }

/* Chapter layout: notes + rail. An inline script moves the header and verse strip
   out of the grid before first paint and adds .st-ready. Without it, everything stacks. */
.st-chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; column-gap: var(--space-xl); max-width: var(--wide-width); margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-2xl); }
.st-chapter-grid > * { grid-column: 1; min-width: 0; }
.st-chapter-grid > .st-crumbs, .st-chapter-grid > .st-head, .st-chapter-grid > .st-verses { grid-column: 1 / -1; }
.st-chapter-grid > .st-rail { grid-column: 2; grid-row: 4 / span 500; }
.st-chapter-grid.st-ready > .st-rail { grid-row: 1 / span 500; }
.st-chapter-grid > .st-note, .st-chapter-grid > .st-group-label, .st-chapter-grid > .st-lock, .st-chapter-grid > .st-empty, .st-chapter-grid > .st-nearby { max-width: var(--max-width); }
.st-top .st-crumbs { max-width: var(--wide-width); margin: 0 auto; padding-left: var(--space-md); padding-right: var(--space-md); }
.st-chapter-grid > .st-crumbs { padding-top: 0; }

/* Rail sections each carry their own heading */
.st-rail section + section h2, .st-rail section[hidden] + section h2 { margin-top: var(--space-lg); }
.st-chapter-grid > .st-rail + .st-note, .st-chapter-grid > .st-group-label + .st-note, .st-chapter-grid > .st-rail + .st-group-label + .st-note { border-top: 0; }
.st-home > .st-stats { margin: calc(-1 * var(--space-sm)) auto var(--space-xl); }

/* Book, topic and search pages */
.st-book-page, .st-topic-page, .st-search-page, .st-home { padding-bottom: var(--space-2xl); }
.st-topic-page .st-topic .post-body { font-size: 1.08rem; }
.st-cta-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.st-lock .st-cta { margin-top: -2rem; }

@media (max-width: 1000px) {
  .st-chapter-grid { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-md); }
  .st-chapter-grid > .st-rail, .st-chapter-grid.st-ready > .st-rail { grid-column: 1; grid-row: auto; }
}
