:root {
    --theme-color: #c94f32;
    --base-font-size: 16px;
    --base-line-height: 1.75;
    --docs-ink: #202a33;
    --docs-muted: #66747d;
    --docs-paper: #f5f7f4;
    --docs-surface: #fff;
    --docs-line: #dce4df;
    --docs-green: #32735d;
    --docs-blue: #3c6d91;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--docs-ink);
    background:
        radial-gradient(ellipse at 100% 0, #dceee8 0, transparent 34rem),
        radial-gradient(ellipse at 0 40%, #f9e8dd 0, transparent 26rem),
        var(--docs-paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.content {
    padding-top: 1.25rem;
}

.markdown-section {
    width: min(100%, 1000px);
    max-width: 1000px;
    padding: clamp(2rem, 7vw, 5rem) clamp(1rem, 5vw, 3rem);
    color: var(--docs-ink);
}

.markdown-section > h1:first-child {
    margin: 0 0 1.5rem;
    padding: 0 0 1rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--theme-color), #edaa55, transparent) 1;
    color: #182b34;
    font-size: clamp(2.35rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.markdown-section h2 {
    margin: 3rem 0 1rem;
    padding: .25rem 0 .25rem .9rem;
    border-left: 4px solid var(--docs-green);
    color: #275b4c;
    font-size: clamp(1.5rem, 3.3vw, 2rem);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.25;
}

.markdown-section h3 {
    margin: 2rem 0 .75rem;
    color: var(--docs-blue);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.markdown-section p,
.markdown-section li {
    color: #394750;
    font-size: 1.02rem;
}

.markdown-section p {
    margin: 0 0 1.1rem;
}

.markdown-section strong {
    color: #253943;
}

.markdown-section a {
    color: #a83d27;
    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.markdown-section a:hover {
    color: #762b1d;
}

.markdown-section blockquote {
    margin: 1.75rem 0;
    padding: 1rem 1.4rem;
    border: 1px solid #d6e7df;
    border-left: 5px solid var(--docs-green);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(110deg, #e8f3ed, #f5f8f4);
    color: #285744;
}

.markdown-section blockquote p {
    margin: 0;
    color: inherit;
    font-size: 1.08rem;
}

.markdown-section ol {
    padding-left: 1.5rem;
}

.markdown-section ol li {
    margin: .6rem 0;
    padding-left: .3rem;
}

.markdown-section img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.25rem 0 2rem;
    border: 1px solid #d4ddd8;
    border-radius: 12px;
    background: var(--docs-surface);
    box-shadow: 0 14px 36px #23362c1a;
}

.markdown-section table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.markdown-section pre {
    max-width: 100%;
    overflow-x: auto;
}

.markdown-section iframe,
.markdown-section video {
    max-width: 100%;
}

.docs-home-button,
.docs-inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 1px solid #a8422d;
    border-radius: 999px;
    color: #fff !important;
    background: linear-gradient(135deg, #d65e3b, #b9432a);
    box-shadow: 0 5px 16px #9d3c2726;
    font: 700 .9rem/1.2 ui-sans-serif, system-ui, sans-serif;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.docs-home-button:hover,
.docs-inline-button:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #c94f32, #96351f);
    box-shadow: 0 8px 20px #9d3c2733;
    transform: translateY(-1px);
}

.shortcut-download {
    display: inline-flex;
    align-items: center;
    margin: .25rem 0 1rem;
    padding: .8rem 1.15rem;
    border: 1px solid #2d7059;
    border-radius: 999px;
    color: #fff !important;
    background: linear-gradient(135deg, #428b6d, #28664f);
    box-shadow: 0 5px 16px #28664f26;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.shortcut-download:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #34785d, #20553f);
    box-shadow: 0 8px 20px #28664f33;
    transform: translateY(-1px);
}

.docs-home-button {
    position: fixed;
    z-index: 30;
    top: 1rem;
    right: 1.25rem;
    min-height: 2.65rem;
    padding: .7rem 1.05rem;
}

.docs-home-button span {
    font-size: 1.15rem;
}

.docs-inline-button {
    margin: 1.5rem 0;
    padding: .8rem 1.15rem;
}

.sidebar {
    border-right: 1px solid var(--docs-line);
    background: rgba(255, 255, 255, .94);
    box-shadow: 8px 0 30px #273d3510;
}

.sidebar > h1 {
    margin: 1rem 1.25rem 1.5rem;
    color: #233d45;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.sidebar-nav {
    padding: 0 1rem 2rem;
}

.sidebar-nav > ul > li {
    margin: .35rem 0;
}

.sidebar-nav > ul > li > a {
    padding: .45rem .65rem;
    border-radius: 7px;
    color: #3b5359;
    font-weight: 700;
}

.sidebar-nav > ul > li > a:hover,
.sidebar-nav li.active > a {
    color: #a83d27;
    background: #f9eee8;
}

.sidebar-nav > ul > li > ul {
    padding-left: 1rem;
}

.sidebar-nav > ul > li > ul > li > a {
    color: var(--docs-muted);
    font-size: .9rem;
}

@media (max-width: 768px) {
    .content {
        padding-top: .25rem;
    }

    .markdown-section {
        max-width: none;
        padding: 4.5rem clamp(1rem, 4vw, 1.5rem) 2.5rem;
    }

    .docs-home-button {
        top: .65rem;
        right: .75rem;
        min-height: 2.4rem;
        padding: .6rem .85rem;
        font-size: .82rem;
    }

    .markdown-section h2 {
        margin-top: 2.25rem;
    }

    .markdown-section > h1:first-child {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

@media (orientation: landscape) and (max-height: 540px) {
    .content {
        padding-top: 0;
    }

    .markdown-section {
        padding-top: 4rem;
        padding-bottom: 1.5rem;
    }

    .docs-home-button {
        top: .4rem;
        right: .6rem;
        min-height: 2rem;
        padding: .4rem .65rem;
    }

    .markdown-section h2 {
        margin-top: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
