:root {
    --bg: #050505;
    --panel: #0d0d0d;
    --panel-alt: #111111;
    --border: #262626;
    --text: #ffffff;
    --text-muted: #9a9a9a;
    --accent: #9a9a9a;
    --accent-dim: #2f4a63;
    --mono: "JetBrains Mono", "Fira Code", monospace;
    --display: "Baloo 2", cursive;
    --nav-height: 64px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--display);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(var(--bg), var(--bg)), repeating-linear-gradient(60deg, transparent 0 46px, rgba(255,255,255,0.02) 46px 47px),
    repeating-linear-gradient(-60deg, transparent 0 46px, rgba(255,255,255,0.02) 46px 47px);
    background-attachment: fixed;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.75rem;
    background-color: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

/* The documentation has two navigation layers that must stay on screen. */
.docs-page .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.docs-page .docs-shell {
    padding-top: var(--nav-height);
    padding-left: 270px;
}

.navbar .logo {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar .logo span.name {
    color: var(--text);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.navbar nav {
    display: flex;
    gap: 1.75rem;
}

.navbar nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.navbar nav a:hover,
.navbar nav a:focus-visible{
    color: var(--text)
}

.navbar nav a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}


main {
    flex: 1;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 3rem 1.75rem 5rem;
}

main.wide {
    max-width: 1240px;
}

.eyebrow {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
}

h1 {
    color: var(--text);
    margin: 0 0 0.4rem;
    font-size: 2.6rem;
    line-height: 1.15;
}

h2 {
    color: var(--text);
    font-size: 1.5rem;
    margin: 2.5rem 0 0.8rem;
}

h3 {
    color: var(--text);
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem;
}

p {
    color: var(--text);
    line-height: 1.7;
    font-size: 1.02rem;
}

.lede {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 60ch;
}

hr.rule {
    height: 2px;
    border: none;
    background: linear-gradient(90deg, var(--accent), transparent);
    width: 100%;
    max-width: 220px;
    margin: 1.5rem 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
}

.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    font-family: var(--display);
    font-weight: 600;
    text-decoration: none;
    color: var(--bg);
    background-color: var(--accent);
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    transition: opacity 0.15s ease;
}

.btn:hover {
    opacity: 0.85;
}

.btn.ghost {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn.ghost:hover {
    border-color: var(--text-muted);
}

pre, code {
    font-family: var(--mono);
}

pre.code-block {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    font-size: 0.9rem;
    color: #e6e6e6;
    line-height: 1.6;
}

.docs-shell {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - var(--nav-height));
}

.docs-sidebar {
    position: sticky;
    top: var(--nav-height);
    z-index: 9;
    align-self: flex-start;
    height: calc(100vh - var(--nav-height));
    width: 270px;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 2rem 1.25rem;
    border-right: 1px solid var(--border);
    background-color: var(--panel);
    transition: transform 0.25s ease;
}

.docs-page .docs-sidebar {
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    left: 0;
    z-index: 15;
}

.docs-sidebar-group {
    margin-bottom: 1.75rem;
}

.docs-sidebar-group a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--display);
    font-size: 0.98rem;
    padding: 0.45rem 0.75rem;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.docs-sidebar-group a:hover,
.docs-sidebar-group a:focus-visible {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.04);
}

.docs-sidebar-group a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background-color: rgba(111, 168, 220, 0.08);
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 3rem 3rem 5rem;
}

.docs-content-inner {
    max-width: 720px;
}

.docs-section {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.docs-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Make links in the getting-started section easy to spot in the dark theme. */
.docs-section#start a {
    color: var(--text);
    text-decoration-line: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.docs-section#start a:hover,
.docs-section#start a:focus-visible {
    color: var(--accent);
    text-decoration-color: var(--text);
}

.docs-subgroup {
    margin: 0;
}

.docs-subgroup summary {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--display);
    font-size: 0.98rem;
    padding: 0.45rem 0.75rem;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    list-style: none;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.docs-subgroup summary::-webkit-details-marker {
    display: none;
}

.docs-subgroup summary::before {
    content: "▸";
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
    transition: transform 0.15s ease;
}

.docs-subgroup[open] summary::before {
    transform: rotate(90deg);
}

.docs-subgroup summary:hover {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.04);
}

.docs-subgroup a.sub-link {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--display);
    font-size: 0.88rem;
    padding: 0.4rem 0.75rem 0.4rem 2.1rem;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.docs-subgroup a.sub-link:hover,
.docs-subgroup a.sub-link:focus-visible {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.04);
}

.docs-subgroup a.sub-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background-color: rgba(111, 168, 220, 0.08);
}

.docs-subsection {
    scroll-margin-top: calc(var(--nav-height) + 1rem);
    margin-top: 1.5rem;
}

table.ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin: 1rem 0;
}

table.ref-table th, table.ref-table td {
    text-align: left;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--border);
}

table.ref-table th {
    color: var(--text-muted);
    font-family: var(--mono);
    font-weight: 400;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

table.ref-table code {
    color: var(--accent);
}

.playground {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    min-width: 0;
}

.pg-panel {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 520px;
    min-width: 0;
}

.pg-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pg-editor {
    flex: 1;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    background-color: transparent;
    color: var(--text);
    border: none;
    resize: vertical;
    font-family: var(--mono);
    font-size: 1.05rem;
    line-height: 1.7;
    padding: 1.25rem;
    outline: none;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    overflow-x: scroll !important;
    overflow-y: auto;
}

.pg-output {
    flex: 1;
    min-width: 0;
    padding: 1.25rem;
    font-family: var(--mono);
    font-size: 1.02rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow-x: hidden;
}

.pg-toolbar {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
    align-items: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-dim);
    display: inline-block;
    margin-right: 0.4rem;
}

footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.75rem;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}


@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.download-page {
    max-width: 980px;
}

.hero {
    margin-bottom: 2.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 68ch;
    margin: 0;
}

.update-notice {
    border-left: 4px solid var(--accent);
}

.update-notice h2 {
    margin: 0 0 0.5rem;
}

.update-notice p {
    color: var(--text-muted);
    line-height: 1.6;
}

.update-notice .eyebrow {
    margin: 0 0 0.25rem;
    color: var(--text);
}

.update-notice pre {
    margin: 1rem 0;
}

.content-card {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.content-card h2 {
    margin-top: 0;
}

.content-card > p {
    color: var(--text-muted);
    margin-top: 0;
}

.steps {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    background-color: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background-color: var(--accent);
    color: var(--bg);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 600;
}

.step h3 {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.step p {
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.step a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.step a:hover,
.step a:focus-visible {
    color: var(--accent);
}

.step pre {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 0.85rem 1rem;
    margin: 0.8rem 0 0;
    overflow-x: auto;
}

.step code {
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.next-steps {
    text-align: left;
}

.next-steps .button {
    display: inline-block;
    font-family: var(--display);
    font-weight: 600;
    text-decoration: none;
    color: var(--bg);
    background-color: var(--accent);
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    transition: opacity 0.15s ease;
}

.next-steps .button:hover,
.next-steps .button:focus-visible {
    opacity: 0.85;
}

/* About page */
.about-content {
    max-width: 1120px;
    padding-top: 5.5rem;
}

.about-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: center;
    padding: 1rem 0 4.5rem;
}

.about-intro h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -0.035em;
    margin-bottom: 0.75rem;
}

.about-intro .lede {
    font-size: 1.3rem;
    line-height: 1.55;
}

.about-intro p:not(.eyebrow):not(.lede) {
    color: var(--text-muted);
    max-width: 62ch;
}

.about-intro strong {
    color: var(--text);
}

.about-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 280px;
    justify-content: flex-end;
    padding: 1.5rem;
    overflow: hidden;
    background: linear-gradient(145deg, #171717, #090909);
    border: 1px solid #353535;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.about-badge::before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    top: -65px;
    right: -45px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.025), 0 0 0 44px rgba(255, 255, 255, 0.02);
}

.badge-mark {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    color: var(--bg);
    background: var(--text);
    border-radius: 12px;
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.badge-label,
.about-badge > span:last-child {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.78rem;
}

.about-badge strong {
    font-size: 2rem;
    line-height: 1.1;
}

.contact-card {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 2rem;
    padding: 2rem;
    background: rgba(13, 13, 13, 0.86);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.contact-card h2 {
    margin: 0;
    font-size: 2rem;
}

.contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.9rem;
    color: var(--text);
    text-decoration: none;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a.contact-item:hover,
a.contact-item:focus-visible {
    transform: translateY(-2px);
    border-color: #666;
    background: #161616;
}

.contact-icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 0.7rem;
}

.contact-item > span:nth-child(2) {
    min-width: 0;
}

.contact-item small,
.contact-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-item small {
    margin-bottom: 0.15rem;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.68rem;
}

.contact-item strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

@media (max-width: 720px) {
    .about-content {
        padding-top: 3rem;
    }

    .about-hero,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .about-hero {
        gap: 2rem;
        padding-bottom: 3rem;
    }

    .contact-card {
        padding: 1.25rem;
    }

    .contact-list {
        grid-template-columns: 1fr;
    }

    .step {
        grid-template-columns: 1fr;
    }

    .step-number {
        width: 2rem;
        height: 2rem;
    }
}

code {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background-color: var(--text);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: rgba(0,0,0,0.6);
    z-index: 12;
    opacity: 0;
    transition: opacity 0.25s ease;
}

@media (max-width: 720px) {
    .docs-shell {
        display: block;
        padding-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .docs-page .docs-sidebar {
        top: var(--nav-height);
        left: 0;
        bottom: 0;
        width: 78vw;
        max-width: 320px;
        height: calc(100vh - var(--nav-height));
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
        white-space: normal;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .docs-page .docs-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
        opacity: 1;
    }

    .docs-sidebar-group {
        display: block;
        width: auto;
        gap: 0;
    }

    .docs-sidebar-group a,
    .docs-subgroup summary,
    .docs-subgroup a.sub-link {
        display: block;
        white-space: normal;
    }

    .docs-content {
        padding: 2rem 1rem 4rem;
    }

    .docs-section,
    .docs-subsection {
        scroll-margin-top: calc(var(--nav-height) + 1rem);
    }
}
