html {
    scroll-behavior: smooth;
}

/* TOC Styles */
.ghp-simple-toc-wrapper {
    clear: both;
    display: block;
    width: 100%;
    border: 1px solid #ccc;
    padding: 0;
    margin: 1.5em 0;
    background-color: #f9f9f9;
}

.ghp-toc-toggle {
    background: none;
    border: none;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .5em 1em;
    color: #222;
}

.ghp-toc-toggle[aria-expanded="true"] {
    background-color: #5da44f;
	color: #fff;
}

.ghp-toc-toggle .arrow {
    transition: transform 0.2s ease;
}

.ghp-toc-toggle[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.ghp-simple-toc {
    padding: 0 1em 1em;
}

.ghp-simple-toc ul {
    list-style: none;
    margin: 0.5em 0 0;
    padding: 0;
}

.ghp-simple-toc ul li { margin: 0; }
.ghp-simple-toc .toc-h2 { font-weight: bold; }

/* Scroll-to-TOC Button (Mobile-First) */
.ghp-scroll-progress-wrap {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: auto;
    padding: 0.75rem 0;
    border: 2px solid #e36344;
    border-radius: 0 10px 10px 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 4px;
    transition: border 0.2s ease;
}

.ghp-scroll-arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    user-select: none;
    padding: 0;
    margin: 0;
    color: #e36344;
    transition: color 0.2s ease;
}

.ghp-scroll-arrow-icon svg {
    display: block;
}

.ghp-scroll-progress-wrap:hover {
	border: 2px solid #5da44f;
}

.ghp-scroll-progress-wrap:hover .ghp-scroll-arrow-icon {
    color: #5da44f;
}

/* Desktop override: move button inward */
@media (min-width: 1367px) {
    .ghp-scroll-progress-wrap {
        border-radius: 10px;
    }
}

/* Top Scroll Bar (Mobile First: small height) */
.ghp-scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 8px;
    width: 0%;
    background: #5da44f;
    z-index: 99999;
    transition: width 0.2s ease-out;
}

/* Invisible Anchors */
#ghp-toc-anchor,
#ghp-scroll-trigger {
    position: relative;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}