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

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

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

/* ── Palette ── */
:root {
    --bg: #FAFAF7;
    --bg-card: #FFFFFF;
    --text: #2C2C2C;
    --text-soft: #5A5A5A;
    --text-faint: #595959;
    --accent: #3B7C7A;
    --accent-hover: #2E6361;
    --border: #E8E5DF;
    --border-light: #F0EDE8;
    --scripture-bg: #F5F3EE;
    --tag-bg: #E8F0F0;
    --tag-text: #2E6462;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --font-heading: 'Lora', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 720px;
    --max-width-wide: 960px;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-hover);
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

::selection {
    background: rgba(59, 124, 122, 0.15);
    color: var(--text);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
    color: var(--text);
}

.btn:hover {
    text-decoration: none !important;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ── Skip Link ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    font-weight: 600;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 0;
}

/* ── Header ── */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    padding: 0.5rem 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}



.header-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    align-items: center;
    margin-left: auto;
}

.header-nav a:not(.btn) {
    color: var(--text-soft);
    transition: color 0.15s;
    padding: 0.75rem 0.5rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.header-nav a:hover {
    color: var(--text);
}

.header-nav a[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* Dropdown specific */
.nav-group {
    position: relative;
    padding: 0.75rem 0.5rem;
}

.nav-toggle {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: var(--text-soft);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-toggle:hover,
.nav-toggle:focus-visible,
.nav-toggle[aria-expanded="true"] {
    color: var(--text);
}

.nav-hamburger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 20;
}

.dropdown-menu.is-open {
    display: block;
    /* JS toggle */
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-soft);
    white-space: nowrap;
    min-height: auto;
}

.dropdown-menu a:hover {
    background: var(--tag-bg);
    color: var(--accent);
}

/* ── Hero ── */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.hero .subtitle {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-soft);
}

.hero .scripture-epigraph {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text);
    margin: 0.75rem 0 0;
}

.hero .scripture-epigraph .epigraph-ref {
    display: block;
    font-size: 0.9em;
    font-family: var(--font-body);
    font-style: normal;
    color: var(--text-faint);
    margin-top: 0.25rem;
}

.hero-cta {
    margin-top: 2rem;
}

/* ── Divider ── */
.divider {
    max-width: var(--max-width);
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

.divider hr {
    border: none;
    border-top: 1px solid var(--border);
}

/* ── Feed ── */
.feed {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.feed-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 1.5rem;
}

/* ── Post Card ── */
.post {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    position: relative;
}

.post:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    transform: translateY(-1px);
}

/* Full-card clickability via stretched link */
.post h2 a::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Lift all card content above the overlay for text selection */
.post>* {
    position: relative;
    z-index: 2;
}

/* Keep h2 static so ::after stretches to .post, not h2 */
.post>h2 {
    position: static;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-faint);
    margin-bottom: 0.5rem;
    display: block;
}

.post h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.post h2 a {
    color: inherit;
    transition: color 0.15s;
}

.post h2 a:hover {
    color: var(--accent);
}

.post p {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.post .read-more:last-child {
    margin-bottom: 0;
}

.post:hover .read-more {
    color: var(--accent-hover);
    letter-spacing: 0.02em;
}

/* ── Blockquote ── */
blockquote {
    background: var(--scripture-bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

blockquote p {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--text-faint);
    font-weight: 500;
    display: block;
    margin-top: 0.5rem;
}

/* ── Scripture Pull Quote ── */
.scripture-quote {
    background: var(--scripture-bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 2rem;
    margin-bottom: 1.25rem;
    position: relative;
    /* Context for any absolutely positioned elements */
}

.scripture-quote p {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.scripture-quote cite {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--text-faint);
    font-weight: 500;
    display: block;
}

/* ── Pull Quote ── */
.pull-quote {
    margin: 2.5rem 0;
    padding: 1.75rem 2rem;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    text-align: center;
}

.pull-quote p {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* ── Footer ── */
main {
    flex: 1;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 2rem;
    background: var(--bg);
}

.footer-inner {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.footer-brand {
    flex: 1;
}

.footer-site-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-logo {
    display: block;
    height: 77px;
    width: auto;
    margin-bottom: 0.75rem;
}

.footer-site-name:hover {
    color: var(--accent);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-faint);
    line-height: 1.6;
    max-width: 340px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
    flex-shrink: 0;
}

.footer-nav a {
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
    padding: 0.4rem 0;
    white-space: nowrap;
}

.footer-nav a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-copyright {
    max-width: var(--max-width-wide);
    margin: 2rem auto 0;
    font-size: 0.825rem;
    color: var(--text-faint);
}

/* ── Article Content (for Start Here and similar pages) ── */
.article-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* ── Article Page (individual posts) ── */
.article-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 0;
}

.article-header .back-link {
    font-size: 0.9rem;
    color: var(--text-faint);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
    min-height: 44px;
    padding: 0.5rem 0;
}

.article-header .back-link:hover {
    color: var(--accent);
}

.article-meta {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.article-meta .author {
    color: var(--text-soft);
    font-weight: 500;
}

.article-meta .meta-separator {
    color: var(--border);
}

.article-meta time {
    color: var(--text-faint);
}

.article-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.article-header .lede {
    font-size: 1.15rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.article-body {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding: 0 1.5rem 4rem;
    font-size: 1.125rem;
    line-height: 1.8;
    overflow-wrap: break-word;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-logo {
    display: block;
    height: 77px;
    width: auto;
    margin: -0.5rem auto 1.5rem;
}

.article-logo-colophon {
    display: block;
    height: 77px;
    width: auto;
    margin: -0.5rem auto 1.5rem;
    opacity: 0.9;
}

.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body em {
    font-style: italic;
}

.article-body strong {
    font-weight: 600;
}

.article-body a,
.article-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* ── Start Here Page ── */
.start-here-hero {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
}

.start-here-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
    text-wrap: balance;
}

.start-here-hero .verse {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text);
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

.start-here-hero .verse-ref {
    font-size: 0.9em;
    font-family: var(--font-body);
    font-style: normal;
    color: var(--text-faint);
}

.evidence-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    margin-top: 2rem;
    color: var(--text);
}

.evidence-subheading {
    text-align: center;
    color: var(--text-soft);
}

.cta-section {
    text-align: center;
    margin-top: 2rem;
}

.cta-section .read-more {
    font-size: 1.1rem;
    margin-top: 1rem;
}

.step-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    align-items: flex-start;
}

.step-number {
    background: var(--tag-bg);
    color: var(--accent);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.step-content a {
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ── The Map Page ── */
.map-track {
    margin-bottom: 0.5rem;
}

.map-track-header {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.map-track-numeral {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--tag-bg);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.map-track-header h2 {
    margin-bottom: 0.15rem;
}

.map-track-desc {
    font-size: 1rem;
    color: var(--text-soft);
    font-style: italic;
    margin: 0;
}

.map-entries {
    list-style: none;
    padding: 0 0 0 1.5rem;
    margin: 0 0 0 21px;
    border-left: 2px solid var(--border);
}

.map-entry {
    margin-bottom: 1.25rem;
}

.map-entry:last-child {
    margin-bottom: 0;
}

.map-entry > a,
.map-entry-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    display: inline;
}

.map-entry > p {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0.2rem 0 0;
}

.map-entry--soon {
    opacity: 0.6;
}

.map-entry-soon {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-faint);
    margin-left: 0.5rem;
}

.map-reference {
    margin-top: 1rem;
}

.map-reference > p {
    margin-bottom: 2rem;
    color: var(--text-soft);
}

.map-reference h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.map-reference h3:first-of-type {
    margin-top: 0;
}

.map-ref-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.map-ref-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.map-ref-list li:last-child {
    border-bottom: none;
}

.map-ref-list a {
    font-weight: 500;
    font-size: 1rem;
}

.map-start-here {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.map-start-here p {
    color: var(--text-soft);
    margin-bottom: 0.5rem;
}

/* ── Hamburger Menu ── */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile Nav Overlay ── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9;
}

.nav-overlay.is-visible {
    display: block;
}

body.nav-open {
    overflow: hidden;
}

/* ── Carousel ── */
.carousel-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 0;
}

.carousel-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.carousel-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.carousel-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.carousel-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.carousel-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.carousel-item p {
    font-size: 0.9rem;
    color: var(--text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.carousel-meta {
    font-size: 0.75rem;
    color: var(--text-faint);
    margin-top: 1rem;
    display: block;
}

/* ── Coming Soon States ── */
.carousel-item--soon {
    opacity: 0.6;
    cursor: default;
}

.carousel-item--soon:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--border-light);
}

.post--soon {
    opacity: 0.7;
    cursor: default;
}

.post--soon:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--border-light);
}

.post--soon .read-more {
    color: var(--text-faint);
}

/* ── Sources ── */
.sources {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.sources h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sources-list li {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ── Footnotes ── */
.footnotes {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-soft);
}

.footnotes h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.footnotes ol {
    padding-left: 1.5rem;
}

.footnotes li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ── Article Actions (Save / Share) ── */
.article-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.article-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-soft);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    min-height: 44px;
    transition: color 0.15s, background 0.15s;
}

.article-actions button:hover {
    color: var(--text);
    background: var(--border-light);
}

.article-actions button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.article-actions button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.article-actions-save .heart-outline {
    display: block;
}

.article-actions-save .heart-filled {
    display: none;
}

.article-actions-save.is-saved {
    color: var(--accent);
}

.article-actions-save.is-saved .heart-outline {
    display: none;
}

.article-actions-save.is-saved .heart-filled {
    display: block;
    fill: var(--accent);
}

.article-actions-save.is-saved:hover {
    color: var(--accent-hover);
    background: var(--tag-bg);
}

.article-actions-copied {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: -0.5rem;
}

.article-actions-copied.is-visible {
    opacity: 1;
}

/* Cross-links between articles */
.related-reading {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related-reading h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.related-reading ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-reading li {
    margin-bottom: 0.75rem;
}

.related-reading a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.related-reading a:hover {
    text-decoration: underline;
}

.related-reading .related-category {
    display: block;
    font-size: 0.8rem;
    color: var(--text-faint);
    margin-top: 0.15rem;
}

/* ── Responsive: Mobile Nav ── */
@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
        order: -1;
    }

    .search-toggle {
        margin-left: auto;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1.5rem 1rem;
        flex-direction: column;
        box-shadow: var(--shadow-md);
        z-index: 20;
    }

    .header-nav.is-open {
        display: flex;
    }

    .header-nav>a:not(.btn) {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-group {
        padding: 0;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-toggle {
        display: none;
    }

    .dropdown-menu {
        display: flex !important;
        flex-direction: column;
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        min-width: auto;
        padding: 0.5rem 0;
        background: transparent;
    }

    .dropdown-menu a {
        padding: 0.5rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1.5rem;
        text-align: left;
    }

    .footer-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ── Responsive: Small Screens ── */
@media (max-width: 600px) {
    .hero {
        padding: 3rem 1.25rem 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.05rem;
    }

    .feed {
        padding: 2rem 1.25rem 3rem;
    }

    .post {
        padding: 1.5rem;
    }

    .post h2 {
        font-size: 1.25rem;
    }

    blockquote {
        padding: 1.25rem 1.5rem;
    }

    .scripture-quote {
        padding: 1.25rem 1.5rem;
    }

    .pull-quote {
        padding: 1.25rem 1rem;
    }

    .pull-quote p {
        font-size: 1.2rem;
    }

    .article-header {
        padding: 2rem 1.25rem 0;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-header .lede {
        font-size: 1.05rem;
    }

    .article-body {
        padding: 1.5rem 1.25rem 3rem;
    }

    .site-footer {
        padding: 2.5rem 1.25rem 1.5rem;
    }

    .start-here-hero {
        padding: 3rem 1.25rem 1.5rem;
    }

    .start-here-hero h1 {
        font-size: 1.85rem;
    }

    .start-here-hero .verse {
        font-size: 1.1rem;
    }

    .step-item {
        gap: 1rem;
        padding: 1.25rem;
    }

    .map-track-header {
        gap: 1rem;
    }

    .map-entries {
        margin-left: 14px;
        padding-left: 1.25rem;
    }

    .map-track-numeral {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .carousel-section {
        padding: 2rem 1.25rem 0;
    }

    .carousel-item {
        flex: 0 0 240px;
    }
}

/* ── Search Toggle Button ── */
.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-soft);
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.search-toggle:hover {
    color: var(--text);
    background: var(--border-light);
}

.search-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.search-toggle svg {
    width: 18px;
    height: 18px;
}

.search-toggle-hint {
    font-size: 0.75rem;
    color: var(--text-faint);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.35rem;
    font-family: var(--font-body);
    line-height: 1;
}

/* ── Search Modal ── */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(12vh, 120px);
}

.search-modal.is-open {
    display: flex;
}

.search-modal.is-visible .search-modal-backdrop {
    opacity: 1;
}

.search-modal.is-visible .search-modal-content {
    opacity: 1;
    transform: scale(1);
}

body.search-open {
    overflow: hidden;
}

.search-modal-backdrop {
    opacity: 0;
    transition: opacity 0.15s ease-out;
    position: fixed;
    inset: 0;
    background: rgba(250, 250, 247, 0.85);
}

@supports (backdrop-filter: blur(6px)) {
    .search-modal-backdrop {
        background: rgba(250, 250, 247, 0.7);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
}

.search-modal-content {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 92%;
    max-width: 580px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-input-icon {
    color: var(--text-faint);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text);
    padding: 0.25rem 0;
    line-height: 1.5;
}

.search-input::placeholder {
    color: var(--text-faint);
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

.search-kbd {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-faint);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Search Results ── */
.search-results {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem;
}

.search-result {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background 0.1s;
    cursor: pointer;
}

.search-result:hover {
    background: var(--scripture-bg);
}

.search-result.is-active {
    background: var(--scripture-bg);
    border-left: 2px solid var(--accent);
}

.search-result-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.search-result-category {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-hover);
    margin-bottom: 0.35rem;
}

.search-result-desc {
    font-size: 0.875rem;
    color: var(--text-soft);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result mark {
    background: rgba(209, 165, 52, 0.25);
    color: inherit;
    padding: 0.05em 0.1em;
    border-radius: 2px;
}

.search-empty {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    color: var(--text-faint);
}

/* ── Search Footer ── */
.search-footer {
    border-top: 1px solid var(--border-light);
    padding: 0.6rem 1rem;
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
}

.search-footer-hint {
    font-size: 0.75rem;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.search-footer-hint kbd {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--text-faint);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    line-height: 1;
    min-width: 1.4em;
    text-align: center;
}

/* ── Search: Mobile Close Button ── */
.search-close-mobile {
    display: none;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--accent);
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
    min-height: 44px;
    align-items: center;
}

/* ── Search: Mobile Responsive ── */
@media (max-width: 768px) {
    .search-toggle-hint {
        display: none;
    }

    .search-modal {
        padding-top: 0;
        align-items: stretch;
    }

    .search-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .search-footer {
        display: none;
    }

    .search-kbd {
        display: none;
    }

    .search-close-mobile {
        display: inline-flex;
    }
}

/* ── Author Photo ── */
.author-photo {
    width: 230px;
    height: 230px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: block;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border-light);
}

@media (min-width: 600px) {
    .author-photo {
        float: right;
        margin: 0.5rem 0 1.5rem 2.5rem;
        width: 290px;
        height: 290px;
    }
}

/* ── View Transitions ── */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.15s;
}

.site-header {
    view-transition-name: header;
}

.site-footer {
    view-transition-name: footer;
}

/* ── Print ── */
@media print {
    body {
        display: block;
        min-height: auto;
    }

    .site-header {
        position: static;
    }

    .header-nav,
    .nav-hamburger,
    .skip-link,
    .nav-overlay,
    .search-toggle,
    .search-modal {
        display: none !important;
    }

    .carousel-section,
    .site-footer {
        display: none;
    }

    a {
        color: var(--text);
    }

    .post {
        break-inside: avoid;
    }

    .scripture-filter-wrap,
    .back-to-top {
        display: none;
    }

    .scripture-toc-books a {
        border-bottom: none;
    }

    .scripture-ref {
        border: 1px solid var(--border);
    }

    .scripture-entry {
        break-inside: avoid;
    }

    .scripture-book-section {
        break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .search-modal-backdrop {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ── Search: High Contrast Mode ── */
@media (forced-colors: active) {
    .search-modal-content {
        border: 2px solid CanvasText;
    }

    .search-input {
        border: 1px solid CanvasText;
    }

    .search-result.is-active {
        outline: 2px solid Highlight;
        outline-offset: -2px;
    }

    .search-kbd {
        border-color: CanvasText;
    }

    .scripture-ref {
        border: 1px solid CanvasText;
    }

    .scripture-toc-books a {
        border: 1px solid LinkText;
    }

    .scripture-filter:focus {
        outline: 2px solid Highlight;
    }

    .back-to-top {
        border: 2px solid ButtonText;
    }
}

/* ── Scripture Index ── */
.scripture-index {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.scripture-filter {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.scripture-filter:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 124, 122, 0.40);
}

.scripture-filter::placeholder {
    color: var(--text-faint);
}

.scripture-filter-wrap {
    position: relative;
    margin-bottom: 2rem;
}

.scripture-filter-wrap svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    pointer-events: none;
}

.scripture-toc {
    margin-bottom: 2.5rem;
}

.scripture-toc-label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.scripture-toc-books {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
    list-style: none;
}

.scripture-toc-books a {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--tag-text);
    background: var(--tag-bg);
    border-radius: 4px;
    border-bottom: 2px solid var(--accent);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.scripture-toc-books a:hover {
    background: var(--accent);
    color: #fff;
    border-bottom-color: var(--accent-hover);
}

.scripture-testament-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    scroll-margin-top: 5rem;
}

.scripture-testament-heading:first-child {
    margin-top: 0;
}

.scripture-book-section {
    margin-bottom: 2.5rem;
}

.scripture-book-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
    scroll-margin-top: 5rem;
}

.scripture-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-light);
}

.scripture-entry:last-child {
    border-bottom: none;
}

.scripture-ref {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tag-text);
    background: var(--tag-bg);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.scripture-articles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    list-style: none;
}

.scripture-articles a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.scripture-articles a:hover {
    text-decoration: underline;
}

.scripture-articles .related-category {
    display: inline;
    font-size: 0.8rem;
    color: var(--text-faint);
    margin-left: 0.4rem;
}

.scripture-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-faint);
    font-size: 1.05rem;
    font-style: italic;
}

.scripture-empty:empty {
    padding: 0;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--accent);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 5;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    color: #fff;
}

.back-to-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.is-hidden {
    display: none !important;
}

.dropdown-divider {
    height: 1px;
    margin: 0.35rem 0;
    background: var(--border-light);
}

@media (max-width: 768px) {
    .scripture-index {
        padding: 0 1.25rem 3rem;
    }

    /* TOC pills: 44px tap targets, readable font */
    .scripture-toc-books {
        gap: 0.5rem;
    }

    .scripture-toc-books a {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .scripture-toc-label {
        font-size: 0.9rem;
    }

    /* Testament headings */
    .scripture-testament-heading {
        font-size: 1rem;
        margin-top: 2rem;
        margin-bottom: 1.25rem;
    }

    /* Book headings */
    .scripture-book-name {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .scripture-book-section {
        margin-bottom: 2rem;
        padding-bottom: 0.5rem;
    }

    /* Entries: stack with breathing room */
    .scripture-entry {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }

    /* Article links: stack vertically, 44px tap targets */
    .scripture-articles {
        flex-direction: column;
        gap: 0;
    }

    .scripture-articles li {
        min-height: 44px;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        padding: 0.35rem 0;
    }

    .scripture-articles a {
        font-size: 0.9rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Category labels: own line on mobile */
    .scripture-articles .related-category {
        display: block;
        margin-left: 0;
        font-size: 0.78rem;
        margin-top: 0.1rem;
    }
}

@media (max-width: 600px) {
    .scripture-index {
        padding: 0 1rem 2.5rem;
    }

    /* TOC pills: uniform grid on small phones */
    .scripture-toc-books {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
        gap: 0.4rem;
    }

    .scripture-toc-books a {
        font-size: 0.8rem;
        padding: 0.45rem 0.5rem;
        text-align: center;
        justify-content: center;
        border-radius: 6px;
    }

    .scripture-filter {
        font-size: 0.95rem;
        padding: 0.65rem 0.9rem 0.65rem 2.5rem;
    }

    .scripture-filter-wrap {
        margin-bottom: 1.5rem;
    }

    .scripture-book-name {
        font-size: 1.15rem;
    }

    .scripture-testament-heading {
        font-size: 0.9rem;
        margin-top: 1.75rem;
    }

    .scripture-ref {
        font-size: 0.82rem;
        max-width: 100%;
    }

    .scripture-articles a {
        font-size: 0.85rem;
    }
}

.article-body [id^="ref-"] {
    scroll-margin-top: 5rem;
}