/* Floating contents button + popup */
.gospel-contents-btn {
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:1200;
    display:inline-flex;
    align-items:center;
    gap:.6rem;
    padding:.55rem .7rem;
    border-radius:10px;
    box-shadow: 0 8px 20px rgba(11,22,45,0.12);
    background:var(--chip-bg, #fff);
    color:var(--fg, #1f1f1f);
    border:1px solid rgba(127,127,127,.12);
    cursor:pointer;
    font-weight:600;
    font-size:0.95rem;
    backdrop-filter: blur(3px);
}
.gospel-contents-btn .dot {
    width:10px;
    height:10px;
    border-radius:50%;
    background:var(--progress,#0b57d0);
    display:inline-block;
}

/* Popup: initially hidden */
.gospel-contents-panel {
    position:fixed;
    right:18px;
    bottom:76px;
    z-index:1200;
    width:320px;
    max-height:60vh;
    overflow:auto;
    background:var(--chip-bg,#fff);
    border-radius:12px;
    box-shadow: 0 20px 60px rgba(11,22,45,0.18);
    padding:12px;
    transform-origin:100% 100%;
    transition: transform .18s ease, opacity .18s ease;
    opacity:0;
    transform:translateY(8px) scale(.98);
    display:flex;
    flex-direction:column;
    gap:.6rem;
    font-size:.85rem;
}
.gospel-contents-panel.open {
    opacity:1;
    transform:translateY(0) scale(1);
}

.gospel-contents-panel header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
}
.gospel-contents-panel h4 {
    margin:0;
    font-size:1rem;
}
.gospel-contents-panel .controls {
    display:flex;
    gap:.4rem;
    align-items:center;
}
.gospel-contents-panel .toc-list {
    list-style:none;
    padding:0;
    margin:0;
    font-size:.75rem;
}
.gospel-contents-panel .toc-list li {
    margin:.45rem 0;
}
.gospel-contents-panel .toc-list a {
    color:var(--link,#0b57d0);
    text-decoration:none;
}

/* Small collapsed peek badge */
.gospel-contents-btn.collapsed {
    padding:.4rem .5rem;
    border-radius:999px;
    width:48px;
    justify-content:center;
}

/* mobile adjustments */
@media (max-width:720px) {
    .gospel-contents-panel {
        right:10px;
        left:10px;
        width:auto;
        bottom:70px;
        max-height:55vh;
    }
    .gospel-contents-btn {
        right:12px;
        bottom:12px;
    }
}

/* subtle focus ring */
.gospel-contents-btn:focus, .gospel-contents-panel button:focus, .gospel-contents-panel a:focus {
    outline: 3px solid rgba(11,87,208,0.12);
    outline-offset:3px;
}

/* keep main content padding for anchor scroll offset on sticky header */
:target {
    scroll-margin-top: 96px;
}

/* Collapsible Acts — styles (drop into your site.css or page <style>) */
.act {
    --collapsible-transition: 260ms cubic-bezier(.2,.9,.2,1);
}

/* the wrapper that will be collapsed/expanded */
.act-body {
    overflow: hidden;
    max-height: 9999px;         /* expanded by default */
    transition: max-height var(--collapsible-transition), opacity var(--collapsible-transition);
    opacity: 1;
}

/* collapsed state */
.act.collapsed .act-body {
    max-height: 0;
    opacity: 0;
    transition: max-height var(--collapsible-transition), opacity calc(var(--collapsible-transition) / 1.2);
}

/* heading toggle button styling (adapts to existing theme) */
.act-toggle {
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    border:0;
    background:transparent;
    cursor:pointer;
    font-weight:600;
    color:inherit;
    padding:6px 8px;
    border-radius:8px;
}
.act-toggle:focus {
    outline:3px solid rgba(11,87,208,0.12);
    outline-offset:3px;
}

/* icon rotation when collapsed/expanded */
.act-toggle .chev {
    transition: transform 200ms ease;
    display:inline-block;
    width:18px;
    height:18px;
}
.act.collapsed .act-toggle .chev {
    transform: rotate(-90deg);
}

/* make the whole header row flex so title and button align nicely */
.act > h2 {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:0 0 12px 0;
}
.act > h2 .title {
    flex:1;
    font-size:1.5rem
}

header h1{
    text-align: center;
}