:root {
    --bg: #ffffff;
    --text: #101010;
    --muted: #575757;
    --line: #e9e9e9;
    --surface: #f5f5f5;
    --surface-alt: #fafafa;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    line-height: 1.65;
}

a {
    color: var(--text);
    text-decoration: none;
}

code {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

code:not(pre code) {
    background: #f2f2f2;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 0.92em;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
}

.nav {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav h2 {
    margin: 8px 0;
    letter-spacing: 0.02em;
}

.version-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.nav-links a {
    margin-left: 16px;
    color: var(--muted);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links .icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-links .icon-link svg {
    width: 20px;
    height: 20px;
}

.hero {
    text-align: center;
    padding: 44px 20px 26px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.2;
}

.hero p {
    margin: 0 auto;
    max-width: 720px;
    color: var(--muted);
}

.buttons {
    margin: 22px 0;
}

.btn {
    display: inline-block;
    margin: 5px;
    padding: 10px 16px;
    border: 1px solid var(--text);
    border-radius: 7px;
}

.btn.primary {
    background: var(--text);
    color: #ffffff;
}

pre {
    position: relative;
    margin: 20px 0 0;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-x: auto;
    text-align: left;
}

.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid #d7d7d7;
    background: #ffffff;
    color: #3a3a3a;
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.code-copy-btn:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.code-copy-btn.copied {
    border-color: #2563eb;
    background: #dbeafe;
    color: #1d4ed8;
}

pre code {
    display: block;
    font-size: 14px;
    line-height: 1.55;
}

.hljs {
    background: transparent !important;
    padding: 0 !important;
}

.features {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.card {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.card p {
    margin: 0;
    color: var(--muted);
}

footer {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
}

/* Docs layout */
.docs-wrapper {
    display: flex;
    flex-direction: column;
}

.sidebar {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.sidebar h2 {
    margin: 0 0 12px;
}

.sidebar {
    margin-bottom: 12px;
}

.sidebar a {
    display: block;
    padding: 4px 8px;
    margin: 6px 0;
    color: var(--muted);
    border-radius: 6px;
    transition:
        color 0.16s ease,
        background-color 0.16s ease;
}

.sidebar a:hover {
    color: var(--text);
    background: #f3f3f3;
}

.sidebar a.active {
    color: var(--text);
    background: #ececec;
    font-weight: 600;
}

.docs {
    padding: 22px 20px 36px;
    max-width: 960px;
}

.docs h1 {
    margin-top: 0;
}

.docs-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-title h1 {
    margin: 0;
}

.back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    color: var(--text);
    background: #ffffff;
    font-size: 18px;
    line-height: 1;
}

.back-arrow:hover {
    background: #f3f3f3;
}

.docs h2 {
    margin-top: 30px;
    margin-bottom: 10px;
}

.docs h3 {
    margin-top: 20px;
    margin-bottom: 8px;
}

.docs p,
.docs li {
    color: #2b2b2b;
}

.docs section:first-of-type h2 {
    margin-top: 18px;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 50px;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }

    .docs-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .sidebar {
        width: 250px;
        min-height: 100vh;
        position: sticky;
        top: 0;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        padding: 28px 20px;
    }

    .docs {
        flex: 1;
        padding: 34px 42px 56px;
    }
}
