.oc-hub {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
    width: var(--container);
    height: calc(100vh - 154px);
    margin: 0 auto;
    padding-top: 24px;
}

.oc-sidebar,
.oc-content {
    border-radius: var(--radius-xl);
}

.oc-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    min-height: 0;
    max-height: calc(100vh - 154px);
    flex-direction: column;
    overflow: hidden;
    padding: 14px 0;
}

.oc-sidebar__top {
    padding: 8px 18px 14px;
    border-bottom: 1px solid var(--border);
}

.oc-sidebar__top h1 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    letter-spacing: -0.04em;
}

.oc-sidebar__top p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.oc-sidebar__group {
    padding: 15px 0 0;
}

.oc-sidebar__group-label {
    display: block;
    padding: 0 18px 6px;
    color: var(--subtle);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.oc-sidebar .sb-link {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 18px;
    border: 0;
    border-right: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.oc-sidebar .sb-link:hover,
.oc-sidebar .sb-link.active {
    border-right-color: var(--cyan);
    background: rgba(104, 192, 255, 0.10);
    color: var(--text);
}

.oc-sidebar .sb-link.child {
    padding-left: 33px;
    color: var(--subtle);
    font-size: 11.5px;
    font-weight: 600;
}

.oc-sidebar .sb-link.child.active {
    color: var(--cyan);
}

.oc-sidebar .sb-icon {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 1.4;
}

.oc-sidebar .sb-label-text {
    flex: 1;
    min-width: 0;
}

.oc-sidebar .sb-toggle {
    flex: 0 0 auto;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.58;
    transition: transform 180ms ease;
}

.oc-sidebar .sb-toggle.open {
    transform: rotate(90deg);
}

.oc-sidebar .sb-children {
    overflow: hidden;
    max-height: 1800px;
    transition: max-height 220ms ease;
}

.oc-sidebar .sb-children.collapsed {
    max-height: 0;
}

.oc-content {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(22px, 4vw, 48px);
    scrollbar-color: rgba(117, 171, 255, 0.50) transparent;
    scrollbar-width: thin;
}

.oc-loading,
.oc-error {
    display: grid;
    min-height: 300px;
    place-items: center;
    color: var(--muted);
    text-align: center;
}

.oc-loading>div,
.oc-error>div {
    max-width: 480px;
}

.oc-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 14px;
    border: 3px solid rgba(111, 174, 255, 0.18);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: oc-spin 800ms linear infinite;
}

.oc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--subtle);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.04em;
}

.oc-breadcrumb span {
    color: var(--cyan);
}

.oc-source {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 30px;
    padding: 7px 10px;
    border: 1px solid rgba(105, 232, 255, 0.18);
    border-radius: 999px;
    background: rgba(105, 232, 255, 0.06);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 700;
}

.oc-source:hover {
    background: rgba(105, 232, 255, 0.12);
}

.oc-content .md-body {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.84;
    overflow-wrap: anywhere;
}

.oc-content .md-body h1,
.oc-content .md-body h2,
.oc-content .md-body h3,
.oc-content .md-body h4 {
    color: var(--text);
    letter-spacing: -0.045em;
    line-height: 1.2;
}

.oc-content .md-body h1 {
    margin: 0 0 20px;
    font-size: clamp(28px, 4vw, 42px);
}

.oc-content .md-body h2 {
    margin: 43px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 25px;
}

.oc-content .md-body h3 {
    margin: 30px 0 10px;
    font-size: 20px;
}

.oc-content .md-body p {
    margin: 0 0 16px;
}

.oc-content .md-body a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: rgba(114, 168, 255, 0.35);
    text-underline-offset: 3px;
}

.oc-content .md-body pre {
    position: relative;
    overflow-x: auto;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: #070b14;
}

.oc-content .md-body code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(105, 151, 255, 0.10);
    color: var(--cyan);
    font-family: "DM Mono", monospace;
    font-size: 0.84em;
}

.oc-content .md-body pre code {
    padding: 0;
    background: transparent;
    color: #dce8ff;
}

.oc-content .md-body blockquote {
    margin: 22px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--cyan);
    border-radius: 0 12px 12px 0;
    background: rgba(105, 232, 255, 0.07);
    color: var(--text);
}

.oc-content .md-body ul,
.oc-content .md-body ol {
    padding-left: 23px;
}

.oc-content .md-body li {
    margin-bottom: 7px;
}

.oc-content .md-body li::marker {
    color: var(--cyan);
}

.oc-content .md-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 14px;
}

.oc-content .md-body table {
    display: block;
    overflow-x: auto;
    width: 100%;
    margin: 22px 0;
    border-collapse: collapse;
    font-size: 13px;
}

.oc-content .md-body th,
.oc-content .md-body td {
    min-width: 120px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.oc-content .md-body th {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.oc-nav-btns {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 48px;
}

.oc-nav-btn {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.oc-nav-btn:hover {
    border-color: rgba(111, 183, 255, 0.42);
    background: rgba(111, 183, 255, 0.11);
}

.oc-nav-btn.next {
    text-align: right;
}

.oc-nav-btn-label {
    color: var(--subtle);
    font-family: "DM Mono", monospace;
    font-size: 10px;
}

.oc-nav-btn-title {
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.oc-content .copy-code {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #d5e3ff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.oc-content .copy-code:hover {
    background: rgba(255, 255, 255, 0.16);
}

.img-lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 5, 12, 0.85);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}

.img-lightbox img {
    max-width: min(100%, 1200px);
    max-height: 90vh;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
    cursor: default;
}

@keyframes oc-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .oc-hub {
        grid-template-columns: 1fr;
    }

    .oc-sidebar {
        position: static;
        max-height: 290px;
    }

    .oc-content {
        min-height: 450px;
    }
}

@media (max-width: 620px) {
    .oc-hub {
        width: var(--container);
        padding-top: 14px;
    }

    .oc-content {
        padding: 22px 18px 34px;
    }

    .oc-nav-btns {
        flex-direction: column;
    }

    .oc-nav-btn.next {
        text-align: left;
    }
}

.oc-source-picker {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.oc-source-picker label {
    display: block;
    margin-bottom: 7px;
    color: var(--subtle);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* .oc-source-picker .field {
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
} */

#sidebar-content {
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(117, 171, 255, 0.45) transparent;
    scrollbar-width: thin;
}

.oc-content::-webkit-scrollbar,
#sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.oc-content::-webkit-scrollbar-thumb,
#sidebar-content::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(117, 171, 255, 0.48);
    background-clip: padding-box;
}

.oc-content::-webkit-scrollbar-thumb:hover,
#sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(144, 199, 255, 0.74);
    background-clip: padding-box;
}

.oc-content .md-body img {
    display: block;
    max-width: min(100%, 960px);
    height: auto;
    margin: 22px 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    cursor: zoom-in;
}

@media (max-width: 900px) {
    .oc-hub {
        height: auto;
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .oc-sidebar {
        position: static;
        max-height: 300px;
    }

    .oc-content {
        height: auto;
        min-height: 560px;
        max-height: none;
        overflow-y: visible;
    }
}

.oc-table-wrap {
    overflow-x: auto;
    margin: 22px 0;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.oc-table-wrap table {
    display: table !important;
    min-width: 620px;
    margin: 0 !important;
}

.oc-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.oc-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(117, 171, 255, 0.42);
}

/* =========================================================
   OpenCore Docs Hub: desktop app-style viewport layout
   ========================================================= */

html:has(.oc-hub) {
    height: 100%;
    overflow: hidden;
}

body:has(.oc-hub) .site-main {
    min-height: 0;
    height: calc(100vh - 200px);
    padding-top: 12px;
    padding-bottom: 10px;
}

body:has(.oc-hub) .site-footer {
    height: 104px;
    padding-top: 0;
    padding-bottom: 12px;
}

body:has(.oc-hub) .footer-inner {
    height: 100%;
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 14px;
}

.oc-hub {
    width: var(--container);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 0;
    align-items: stretch;
}

.oc-sidebar,
.oc-content {
    min-height: 0;
    height: 100%;
}

.oc-sidebar {
    position: static;
    max-height: none;
    overflow: hidden;
}

.oc-content {
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar navigation must be scrollable internally. */
#sidebar-content {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Hide internal scrollbars but preserve scrolling functionality. */
.oc-content,
#sidebar-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.oc-content::-webkit-scrollbar,
#sidebar-content::-webkit-scrollbar {
    display: none;
}

/* Keep the footer compact enough to stay in the viewport. */
body:has(.oc-hub) .footer-inner {
    grid-template-columns: 1.2fr auto;
    align-items: start;
}

body:has(.oc-hub) .footer-inner p {
    margin-top: 5px;
}

body:has(.oc-hub) .footer-copy {
    margin-top: 3px !important;
    padding-top: 10px;
}

/* Tablets and phones return to normal page scrolling. */
@media (max-width: 900px) {

    html:has(.oc-hub),
    body:has(.oc-hub) {
        height: auto;
        overflow: auto;
    }

    body:has(.oc-hub) .site-main {
        height: auto;
        min-height: calc(100vh - 240px);
        padding-top: 22px;
        padding-bottom: 64px;
    }

    body:has(.oc-hub) .site-footer {
        height: auto;
        padding-bottom: 28px;
    }

    body:has(.oc-hub) .footer-inner {
        height: auto;
        min-height: 0;
        padding: 26px;
    }

    .oc-hub {
        height: auto;
    }

    .oc-sidebar,
    .oc-content {
        height: auto;
    }

    .oc-sidebar {
        position: static;
        max-height: 320px;
    }

    .oc-content {
        min-height: 560px;
        overflow-y: visible;
    }

    .oc-content,
    #sidebar-content {
        -ms-overflow-style: auto;
        scrollbar-width: thin;
    }

    .oc-content::-webkit-scrollbar,
    #sidebar-content::-webkit-scrollbar {
        display: block;
    }
}

/* =========================================================
   OpenCore Docs Hub: desktop app-style viewport layout
   ========================================================= */

html:has(.oc-hub) {
    height: 100%;
    overflow: hidden;
}

body:has(.oc-hub) {
    height: 100%;
    overflow: hidden;
}

body:has(.oc-hub) .site-main {
    min-height: 0;
    height: calc(100vh - 166px);
    padding-top: 12px;
    padding-bottom: 10px;
}

.oc-hub {
    width: var(--container);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 0;
    align-items: stretch;
}

.oc-sidebar,
.oc-content {
    min-height: 0;
    height: 100%;
}

.oc-sidebar {
    position: static;
    max-height: none;
    overflow: hidden;
}

.oc-content {
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar navigation must be scrollable internally. */
#sidebar-content {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Hide internal scrollbars but preserve scrolling functionality. */
.oc-content,
#sidebar-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.oc-content::-webkit-scrollbar,
#sidebar-content::-webkit-scrollbar {
    display: none;
}

/* Tablets and phones return to normal page scrolling. */
@media (max-width: 900px) {

    html:has(.oc-hub),
    body:has(.oc-hub) {
        height: auto;
        overflow: auto;
    }

    body:has(.oc-hub) .site-main {
        height: auto;
        min-height: calc(100vh - 240px);
        padding-top: 22px;
        padding-bottom: 64px;
    }

    body:has(.oc-hub) .site-footer {
        height: auto;
        padding-bottom: 28px;
    }

    body:has(.oc-hub) .footer-inner {
        height: auto;
        min-height: 0;
        padding: 26px;
    }

    .oc-hub {
        height: auto;
    }

    .oc-sidebar,
    .oc-content {
        height: auto;
    }

    .oc-sidebar {
        position: static;
        max-height: 320px;
    }

    .oc-content {
        min-height: 560px;
        overflow-y: visible;
    }

    .oc-content,
    #sidebar-content {
        -ms-overflow-style: auto;
        scrollbar-width: thin;
    }

    .oc-content::-webkit-scrollbar,
    #sidebar-content::-webkit-scrollbar {
        display: block;
    }
}

/* =========================================================
   OpenCore Docs Hub: keep shared footer identical to all pages
   ========================================================= */

/* Do not override .site-footer or .footer-inner here.
   They must use the shared styles from assets/css/site.css. */

/* Reserve the actual shared footer footprint in the app-style layout. */
body:has(.oc-hub) .site-main {
    height: calc(100vh - 90px - 188px);
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 10px;
}

/* The Docs Hub takes all available height inside site-main. */
body:has(.oc-hub) .oc-hub {
    height: 100%;
    min-height: 0;
}

/* Ensure the footer has normal styling and dimensions. */
body:has(.oc-hub) .site-footer {
    height: auto;
    padding: 0 0 28px;
}

body:has(.oc-hub) .footer-inner {
    height: auto;
    min-height: 0;
    padding: 26px;
}

/* Mobile/tablet returns to the normal document flow. */
@media (max-width: 900px) {
    body:has(.oc-hub) .site-main {
        height: auto;
        min-height: calc(100vh - 240px);
        padding-top: 22px;
        padding-bottom: 64px;
    }

    body:has(.oc-hub) .site-footer {
        height: auto;
        padding: 0 0 28px;
    }

    body:has(.oc-hub) .footer-inner {
        height: auto;
        padding: 26px;
    }
}

/* =========================================================
   OpenCore Docs Hub — custom Documentation Source select
   ========================================================= */

.oc-source-select {
    position: relative;
    z-index: 50;
    width: 100%;
    min-width: 0;
}

.oc-source-select .glass-select__native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.oc-source-select .glass-select__trigger {
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 11px 0 13px;
    border: 1px solid rgba(131, 178, 255, 0.26);
    border-radius: 13px;
    outline: none;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.12),
            rgba(255, 255, 255, 0.045));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 8px 22px rgba(0, 0, 0, 0.12);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.oc-source-select .glass-select__trigger:hover,
.oc-source-select.is-open .glass-select__trigger {
    border-color: rgba(83, 187, 255, 0.72);
    background:
        linear-gradient(135deg,
            rgba(75, 161, 255, 0.18),
            rgba(134, 88, 255, 0.12));
    box-shadow:
        0 0 0 3px rgba(69, 180, 255, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.oc-source-select .glass-select__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oc-source-select .glass-select__chevron {
    flex: 0 0 auto;
    color: var(--cyan);
    font-size: 16px;
    line-height: 1;
    transition: transform 180ms ease;
}

.oc-source-select.is-open .glass-select__chevron {
    transform: rotate(180deg);
}

.oc-source-select .glass-select__menu {
    position: absolute;
    z-index: 300;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    display: none;
    overflow: hidden;
    padding: 5px;
    border: 1px solid rgba(104, 169, 255, 0.40);
    border-radius: 14px;
    background:
        linear-gradient(145deg,
            rgba(18, 29, 57, 0.97),
            rgba(10, 17, 36, 0.95));
    box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.oc-source-select.is-open .glass-select__menu {
    display: grid;
    gap: 3px;
}

.oc-source-select .glass-select__menu button {
    width: 100%;
    min-height: 37px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(222, 234, 255, 0.84);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    transition:
        background 150ms ease,
        color 150ms ease;
}

.oc-source-select .glass-select__menu button:hover,
.oc-source-select .glass-select__menu button[aria-selected="true"] {
    background:
        linear-gradient(135deg,
            rgba(61, 151, 255, 0.30),
            rgba(123, 76, 241, 0.24));
    color: #ffffff;
}

.oc-source-select .glass-select__menu button[aria-selected="true"] {
    box-shadow: inset 2px 0 0 var(--cyan);
}

/* =========================================================
   OpenCore Docs Hub — static reader panel, no mouse glow
   ========================================================= */

.oc-content {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
}