/* ==========================================================
   DOKO Docs Theme — Odoo 19.0 layout style
   ========================================================== */

:root {
    --primary: #7B3FE4;
    --primary-dark: #6230B8;
    --primary-light: #F0EAFC;
    --primary-hover: #EBE3FA;

    --teal: #6BD653;
    --teal-dark: #4FB83B;
    --teal-light: #EAFBE5;

    --text: #282F33;
    --text-muted: #6B7280;
    --text-light: #6B7280;

    --bg: #FFFFFF;
    --bg-soft: #F9FAFB;
    --bg-code: #1e1e1e;

    --border: #E5E7EB;

    --sidebar-width: 320px;
    --toc-width: 220px;

    --radius: 6px;
    --radius-lg: 10px;

    --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Roboto Slab', 'Inter', serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    font-size: 15px;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Skip-to-content link */
.o-skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 2000;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.o-skip-link:focus {
    top: 8px;
    color: #fff;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color .15s;
}

a:hover {
    color: var(--teal-dark);
    text-decoration: underline;
}

/* ══════════════════════════════════════════
   HEADER — 2-row Odoo style (scrolls with page)
══════════════════════════════════════════ */
.o-header {
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    z-index: 1000;
}

/* Row 1: Main header */
.o-header__main {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.o-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.o-header__brand:hover {
    text-decoration: none;
}

.o-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.o-header__logo img {
    height: 52px;
    width: auto;
}

.o-header__search {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
}

.o-search-box {
    position: relative;
}

.o-search-box__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.o-search-box__input {
    width: 100%;
    padding: 8px 40px 8px 38px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.o-search-box__input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(107, 214, 83, .15);
    background: var(--bg);
}

.o-search-box__input::placeholder {
    color: var(--text-muted);
}

.o-search-box__kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-family: var(--font);
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.4;
    pointer-events: none;
}

.o-version-pill {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 12px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Row 2: Subheader */
.o-header__sub {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 24px;
    font-size: 13px;
    background: var(--bg-soft);
}

.o-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
}

.o-burger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.o-burger:hover {
    background: var(--border);
}

.o-header__badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--teal-dark);
    background: var(--teal-light);
    border: 1.5px solid var(--teal);
    padding: 2px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Breadcrumb — in subheader row */
.o-breadcrumb {
    flex: 1;
    min-width: 0;
}

.o-breadcrumb__list {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.o-breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.o-breadcrumb__link {
    font-size: 13px;
    color: var(--text-muted);
}

.o-breadcrumb__link:hover {
    color: var(--teal);
    text-decoration: underline;
}

.o-breadcrumb__sep {
    font-size: 13px;
    color: var(--text-light);
}

.o-breadcrumb__current {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.o-breadcrumb .section-number {
    display: none !important;
}

/* ══════════════════════════════════════════
   LAYOUT — CSS Grid (Odoo style)
══════════════════════════════════════════ */
.o-layout {
    display: flex;
    min-height: calc(100vh - 100px);
}

/* ══════════════════════════════════════════
   LEFT SIDEBAR — Sticky
══════════════════════════════════════════ */
.o-sidebar {
    position: fixed;
    top: 100px;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 100px);
    background: var(--bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 900;
    transition: transform .28s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.o-sidebar::-webkit-scrollbar {
    width: 4px;
}

.o-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.o-sidebar__inner {
    padding: 8px 0 60px;
}

.o-sidenav {
    font-size: 14px;
}

.o-sidenav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Caption / section header ── */
.o-sidenav .caption,
.o-sidenav p.caption {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.o-sidenav .caption:first-child,
.o-sidenav p.caption:first-child {
    padding-top: 8px;
}

.o-sidenav .caption-text {
    color: var(--text-muted);
}

/* ══════════════════════════════════════════
   SIDEBAR ITEMS — FLEX ROW (Odoo style)
   JS wraps: <div class="o-entry"> <button.o-toggle> <a>
══════════════════════════════════════════ */

.o-sidenav li {
    list-style: none;
}

/* Entry wrapper created by JS */
.o-entry {
    display: flex;
    align-items: center;
}

/* ── Toggle button ── */
.o-nav-toggle {
    flex-shrink: 0;
    width: 24px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 3px;
    padding: 0;
    transition: background .13s, color .13s;
}

.o-nav-toggle:hover {
    background: var(--primary-hover);
    color: var(--primary);
}

.o-nav-toggle svg {
    width: 12px;
    height: 12px;
    transition: transform .22s ease;
    flex-shrink: 0;
}

/* Collapsed: › (0°), Open: ∨ (90°) */
.o-nav-toggle.is-open svg {
    transform: rotate(90deg);
}

/* ── Spacer for leaf items ── */
.o-entry-spacer {
    flex-shrink: 0;
    width: 24px;
    height: 32px;
}

/* L2 toggle/spacer height */
.o-sidenav .toctree-l2 > .o-entry > .o-nav-toggle {
    height: 30px;
}

.o-sidenav .toctree-l2 > .o-entry > .o-entry-spacer {
    height: 30px;
}

/* ══════════════════════════════════════════
   LINKS — L1 and L2
══════════════════════════════════════════ */

/* ══ L1 LINKS ══ */
.o-sidenav .toctree-l1 > .o-entry {
    cursor: pointer;
    border-radius: 4px;
    margin: 1px 8px;
    transition: background .12s;
}

.o-sidenav .toctree-l1 > .o-entry:hover {
    background: var(--primary-hover);
}

.o-sidenav .toctree-l1 > .o-entry > a {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 4px 8px 4px 2px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 24px;
    text-decoration: none;
}

.o-sidenav .toctree-l1 > .o-entry:hover > a {
    color: var(--primary);
    text-decoration: none;
}

.o-sidenav .toctree-l1 > .o-entry > a:hover {
    text-decoration: none;
}

.o-sidenav .toctree-l1.current > .o-entry > a {
    color: var(--primary);
    font-weight: 700;
}

/* ══ ACTIVE L1 — when L1 itself is the current page ══ */
.o-sidenav .toctree-l1.current > .o-entry:has(> a.current) {
    background: var(--primary);
    border-radius: 4px;
}

.o-sidenav .toctree-l1.current > .o-entry:has(> a.current):hover {
    background: var(--primary-dark);
}

.o-sidenav .toctree-l1.current > .o-entry:has(> a.current) > a {
    color: #fff !important;
    font-weight: 700;
}

.o-sidenav .toctree-l1.current > .o-entry:has(> a.current):hover > a {
    color: #fff !important;
    text-decoration: none;
}

.o-sidenav .toctree-l1.current > .o-entry:has(> a.current) .o-nav-toggle {
    color: rgba(255, 255, 255, .8);
}

.o-sidenav .toctree-l1.current > .o-entry:has(> a.current) .o-nav-toggle:hover {
    background: rgba(255, 255, 255, .15);
}

/* L2 link */
.o-sidenav .toctree-l2 > .o-entry {
    margin: 0 8px 0 28px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .12s;
}

.o-sidenav .toctree-l2 > .o-entry:hover {
    background: var(--primary-hover);
}

.o-sidenav .toctree-l2 > .o-entry > a {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 3px 8px 3px 2px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 24px;
    text-decoration: none;
}

.o-sidenav .toctree-l2 > .o-entry:hover > a {
    color: var(--primary);
    text-decoration: none;
}

.o-sidenav .toctree-l2 > .o-entry > a:hover {
    text-decoration: none;
}

/* ══ ACTIVE PAGE (L2.current) — Full purple + white ══ */
.o-sidenav .toctree-l2.current > .o-entry {
    background: var(--primary) !important;
    border-radius: 4px;
    margin: 1px 8px 1px 28px;
    padding-left: 0;
}

.o-sidenav .toctree-l2.current > .o-entry:hover {
    background: var(--primary-dark) !important;
}

.o-sidenav .toctree-l2.current > .o-entry > a {
    color: #ffffff !important;
    font-weight: 600;
    padding-left: 4px;
}

.o-sidenav .toctree-l2.current > .o-entry:hover > a {
    color: #fff !important;
    text-decoration: none;
}

.o-sidenav .toctree-l2.current .o-nav-toggle {
    color: rgba(255, 255, 255, .8);
}

.o-sidenav .toctree-l2.current .o-nav-toggle:hover {
    background: rgba(255, 255, 255, .15);
}

/* ══ L3 LINKS ══ */
.o-sidenav .toctree-l3 > .o-entry > .o-nav-toggle {
    height: 28px;
}

.o-sidenav .toctree-l3 > .o-entry > .o-entry-spacer {
    height: 28px;
}

.o-sidenav .toctree-l3 > .o-entry {
    margin: 0 8px 0 48px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .12s;
}

.o-sidenav .toctree-l3 > .o-entry:hover {
    background: var(--primary-hover);
}

.o-sidenav .toctree-l3 > .o-entry > a {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 2px 8px 2px 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
    line-height: 24px;
    text-decoration: none;
}

.o-sidenav .toctree-l3 > .o-entry:hover > a {
    color: var(--primary);
    text-decoration: none;
}

.o-sidenav .toctree-l3 > .o-entry > a:hover {
    text-decoration: none;
}

/* ══ ACTIVE L3 ══ */
.o-sidenav .toctree-l3.current > .o-entry {
    background: var(--primary-light) !important;
    border-radius: 4px;
    margin: 1px 8px 1px 48px;
}

.o-sidenav .toctree-l3.current > .o-entry:hover {
    background: var(--primary-hover) !important;
}

.o-sidenav .toctree-l3.current > .o-entry > a {
    color: var(--primary) !important;
    font-weight: 600;
}

.o-sidenav .toctree-l3.current > .o-entry:hover > a {
    color: var(--primary-dark) !important;
    text-decoration: none;
}

/* ── Hide section number prefixes ── */
.o-sidenav .section-number {
    display: none !important;
}

/* ── Collapsible children ── */
.o-sidenav ul.o-nav-children {
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: max-height .3s cubic-bezier(0.4, 0, 0.2, 1), opacity .2s ease;
}

.o-sidenav ul.o-nav-children.is-collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* ── Mobile overlay ── */
.o-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .38);
    z-index: 850;
}

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.o-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    margin-right: var(--toc-width);
}

.o-main__inner {
    padding: 32px 48px 80px;
}

/* Hide Sphinx search hint text, default form, and results heading */
.o-document > noscript + p,
.o-document > noscript + p + form,
#search-results h2 {
    display: none;
}

/* Document */
.o-document {
    color: var(--text);
}

.o-document .section-number {
    display: none !important;
}

.o-document h1 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    line-height: 1.2;
}

.o-document h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 36px 0 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
}

.o-document h3 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 600;
    margin: 24px 0 9px;
}

.o-document h4 {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 18px 0 7px;
}

.o-document h5,
.o-document h6 {
    font-size: .9rem;
    font-weight: 600;
    margin: 14px 0 6px;
}

.o-document h1 .headerlink,
.o-document h2 .headerlink,
.o-document h3 .headerlink {
    font-size: .6em;
    color: var(--border);
    margin-left: 6px;
    text-decoration: none;
    opacity: 0;
    transition: opacity .2s;
}

.o-document *:hover > .headerlink {
    opacity: 1;
    color: var(--teal);
}

.o-document p {
    margin-bottom: 14px;
}

.o-document ul,
.o-document ol {
    padding-left: 22px;
    margin-bottom: 14px;
}

.o-document li {
    margin-bottom: 5px;
}

.o-document strong {
    font-weight: 600;
}

.o-document code,
.o-document tt {
    font-family: var(--font-mono);
    font-size: .845em;
    background: #f3f4f6;
    color: #6230B8;
    padding: .12em .38em;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.o-document .highlight {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid #2a2a2a;
    background: var(--bg-code);
    position: relative;
}

.o-document .highlight pre {
    padding: 16px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: .845rem;
    line-height: 1.65;
    color: #d4d4d4;
    background: var(--bg-code);
    margin: 0;
    border: none;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.o-document .highlight pre::-webkit-scrollbar {
    height: 4px;
}

.o-document .highlight pre::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.o-document table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: .875rem;
    border: 1px solid var(--border);
}

.o-document th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    padding: 9px 14px;
    text-align: left;
    font-size: .82rem;
}

.o-document td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.o-document tr:last-child td {
    border-bottom: none;
}

.o-document tr:nth-child(even) td {
    background: var(--bg-soft);
}

.o-document hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

.o-document img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 12px 0;
}

/* ══════════════════════════════════════════
   ADMONITIONS — Bootstrap-style alert boxes
══════════════════════════════════════════ */
.o-document .admonition {
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 18px 0;
    border: 1px solid var(--border);
    border-left: 4px solid;
    background: var(--bg-soft);
}

.o-document .admonition-title {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Admonition title icons via ::before pseudo-element */
.o-document .admonition-title::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
}

.o-document .admonition.note {
    background: #EFF8FF;
    border-color: #3B82F6;
    border-left-color: #3B82F6;
}

.o-document .admonition.note .admonition-title {
    color: #1D4ED8;
}

.o-document .admonition.note .admonition-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231D4ED8'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.o-document .admonition.warning {
    background: #FFF7ED;
    border-color: #F97316;
    border-left-color: #F97316;
}

.o-document .admonition.warning .admonition-title {
    color: #C2410C;
}

.o-document .admonition.warning .admonition-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23C2410C'%3E%3Cpath fill-rule='evenodd' d='M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.o-document .admonition.tip {
    background: var(--teal-light);
    border-color: var(--teal);
    border-left-color: var(--teal);
}

.o-document .admonition.tip .admonition-title {
    color: var(--teal-dark);
}

.o-document .admonition.tip .admonition-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234FB83B'%3E%3Cpath d='M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM4 11a1 1 0 100-2H3a1 1 0 000 2h1zM10 18a7 7 0 004-12.73V6a1 1 0 11-2 0V4.27A7 7 0 0010 18z'/%3E%3C/svg%3E");
}

.o-document .admonition.important {
    background: #FFF1F2;
    border-color: #EF4444;
    border-left-color: #EF4444;
}

.o-document .admonition.important .admonition-title {
    color: #B91C1C;
}

.o-document .admonition.important .admonition-title::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23B91C1C'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════
   RIGHT SIDEBAR — Sticky "On this page"
══════════════════════════════════════════ */
.o-page-toc {
    position: fixed;
    top: 100px;
    right: 0;
    width: var(--toc-width);
    height: calc(100vh - 100px);
    background: var(--bg);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 890;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.o-page-toc::-webkit-scrollbar {
    width: 4px;
}

.o-page-toc::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.o-page-toc__inner {
    padding: 24px 16px 40px;
}

.o-page-toc__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text);
    margin-bottom: 10px;
}

.o-page-toc__nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.o-page-toc__nav li {
    margin: 0;
}

.o-page-toc__nav > ul > li > a {
    display: none;
}

.o-page-toc__nav a {
    display: block;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color .12s, border-color .12s;
}

.o-page-toc__nav a:hover {
    color: var(--teal);
    border-left-color: var(--teal);
}

.o-page-toc__nav a.is-active {
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.o-page-toc__nav ul ul a {
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--text-light);
}

/* Prev/Next */
.o-page-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 52px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.o-page-nav__btn {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    max-width: 45%;
    transition: border-color .15s, background .15s;
}

.o-page-nav__btn:hover {
    border-color: var(--teal);
    background: var(--teal-light);
    text-decoration: none;
}

.o-page-nav__btn--next {
    margin-left: auto;
    text-align: right;
}

.o-page-nav__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.o-page-nav__title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

/* ══════════════════════════════════════════
   FOOTER — Get Help + branding
══════════════════════════════════════════ */
.o-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    margin-left: var(--sidebar-width);
    margin-right: var(--toc-width);
}

.o-footer__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 48px;
}

/* Get Help section */
.o-footer__help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.o-footer__help-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.o-footer__help-text {
    font-size: .85rem;
    color: var(--text-muted);
}

.o-footer__help-links {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.o-footer__help-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.o-footer__help-link:hover {
    background: var(--primary-hover);
    text-decoration: none;
    color: var(--primary-dark);
}

.o-footer__help-link svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Footer bottom */
.o-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.o-footer__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.o-footer__copy {
    font-size: .82rem;
    color: var(--text-muted);
}

.o-footer__copy a {
    color: var(--teal);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .o-page-toc {
        display: none;
    }

    .o-main,
    .o-footer {
        margin-right: 0;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }

    .o-main__inner {
        padding: 24px 28px 60px;
    }
}

@media (max-width: 768px) {
    .o-burger {
        display: flex;
    }

    .o-header__title {
        display: none;
    }

    .o-header__main {
        height: 52px;
        padding: 0 16px;
    }

    .o-header__sub {
        padding: 0 16px;
    }

    .o-sidebar {
        top: 0;
        width: 300px;
        height: 100vh;
        transform: translateX(-100%);
    }

    .o-main,
    .o-footer {
        margin-left: 0;
    }

    .o-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, .12);
    }

    .o-overlay.open {
        display: block;
    }

    .o-main__inner {
        padding: 18px 16px 48px;
    }

    .o-page-nav {
        flex-direction: column;
    }

    .o-page-nav__btn {
        max-width: 100%;
    }

    .o-page-nav__btn--next {
        text-align: left;
    }

    /* Footer responsive */
    .o-footer__help {
        flex-direction: column;
        align-items: flex-start;
    }

    .o-footer__help-links {
        flex-direction: column;
        width: 100%;
    }

    .o-footer__bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .o-footer__inner {
        padding: 0 16px;
    }
}

@media print {

    .o-header,
    .o-sidebar,
    .o-page-toc,
    .o-page-nav,
    .o-footer {
        display: none !important;
    }

    .o-main {
        margin: 0;
    }

    .o-main__inner {
        padding: 0;
        max-width: 100%;
    }
}
