:root {
    --bg: #0a0e14;
    --surface: #0f151e;
    --surface-2: #141c27;
    --surface-3: #192330;
    --text: #f4f7fb;
    --muted: #aab5c4;
    --soft: #d7dee8;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.17);
    --cyan: #58d5e9;
    --blue: #6c9cff;
    --green: #67d7a4;
    --amber: #f0c66c;
    --red: #f0808e;
    --max: 1440px;
    --sidebar: 286px;
    --ui: "Plus Jakarta Sans", system-ui, sans-serif;
    --display: "Newsreader", Georgia, serif;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: var(--ui);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(88, 213, 233, 0.74);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(88, 213, 233, 0.11);
}

.skip-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100;
    transform: translateY(-160%);
    border: 1px solid rgba(88, 213, 233, 0.44);
    border-radius: 999px;
    background: #07111d;
    color: #f8fdff;
    padding: 12px 16px;
    font-weight: 800;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    transition: transform 160ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
}

code {
    border: 1px solid rgba(88, 213, 233, 0.18);
    border-radius: 6px;
    padding: 0.14rem 0.38rem;
    color: #dffbff;
    background: rgba(88, 213, 233, 0.08);
    font-family: var(--mono);
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 14, 20, 0.94);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(calc(100% - 40px), var(--max));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand span {
    display: grid;
    gap: 1px;
}

.brand strong {
    font-size: 0.9rem;
}

.brand small {
    color: var(--muted);
    font-size: 0.72rem;
}

.header-actions,
.intro-actions,
.closing-actions,
.site-footer nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-blue {
    color: #071018;
    background: var(--cyan);
}

.button-blue:hover {
    background: #8be7f4;
}

.button-muted {
    border-color: var(--line-strong);
    color: var(--soft);
    background: rgba(255, 255, 255, 0.045);
}

.button-muted:hover {
    border-color: rgba(88, 213, 233, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.docs-layout {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    gap: 52px;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 98px;
    max-height: calc(100vh - 120px);
    margin-top: 34px;
    padding-right: 14px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.search-box {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.search-box span,
.nav-group > p,
.eyebrow,
.section-heading > span,
.card-label {
    color: var(--cyan);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.search-box input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    outline: 0;
    padding: 0 12px;
    color: var(--text);
    background: var(--surface);
}

.search-box input:focus {
    border-color: var(--cyan);
}

.search-box input::placeholder {
    color: #718095;
}

.search-status {
    min-height: 20px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.74rem;
}

.search-clear {
    width: 100%;
    min-height: 38px;
    margin: 0 0 14px;
    border: 1px solid rgba(88, 213, 233, 0.18);
    border-radius: 8px;
    color: #dffbff;
    background: rgba(88, 213, 233, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.search-clear[hidden] {
    display: none;
}

.search-clear:hover,
.search-clear:focus-visible {
    border-color: rgba(88, 213, 233, 0.38);
    background: rgba(88, 213, 233, 0.13);
}

.docs-nav {
    display: grid;
    gap: 20px;
}

.nav-group {
    display: grid;
    gap: 3px;
}

.nav-group > p {
    margin: 0 0 5px;
}

.nav-group a {
    min-height: 38px;
    display: flex;
    align-items: center;
    border-left: 2px solid transparent;
    padding: 7px 10px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.nav-group a:hover,
.nav-group a.is-active {
    border-left-color: var(--cyan);
    color: var(--text);
    background: rgba(88, 213, 233, 0.06);
}

.docs-main {
    min-width: 0;
    padding: 46px 0 96px;
}

.doc-section {
    padding: 58px 0;
    border-bottom: 1px solid var(--line);
}

.doc-section[hidden] {
    display: none;
}

.doc-section:first-child {
    padding-top: 28px;
}

.intro {
    min-height: 520px;
    display: grid;
    align-content: center;
}

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

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(103, 215, 164, 0.1);
}

h1,
h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: 0;
}

h1 {
    max-width: 850px;
    margin-top: 18px;
    font-size: 4.5rem;
    line-height: 0.98;
}

h2 {
    max-width: 800px;
    font-size: 2.9rem;
    line-height: 1.04;
}

h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

p {
    color: var(--muted);
}

.intro-lead {
    max-width: 780px;
    margin: 22px 0 0;
    font-size: 1.08rem;
    line-height: 1.8;
}

.intro-actions {
    margin-top: 28px;
}

.release-strip {
    margin-top: 54px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.release-strip span {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 2px;
    border-right: 1px solid var(--line);
    padding: 14px 18px;
    color: var(--muted);
    font-size: 0.78rem;
}

.release-strip span:last-child {
    border-right: 0;
}

.release-strip strong {
    color: var(--text);
    font-size: 0.86rem;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading h2 {
    margin-top: 10px;
}

.section-heading p {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 0.98rem;
    line-height: 1.75;
}

.section-heading a,
.callout a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.surface-grid,
.module-grid,
.feature-list,
.command-index,
.practice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.surface-card,
.module-grid article,
.feature-list article,
.command-index article,
.practice-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    background: var(--surface);
}

.surface-card h3 {
    margin-top: 8px;
    font-size: 1.25rem;
}

.surface-card p,
.module-grid p,
.feature-list p,
.practice-grid p {
    margin: 9px 0 0;
    font-size: 0.88rem;
}

.surface-card ul,
.check-list {
    margin: 15px 0 0;
    padding-left: 20px;
    color: var(--soft);
    font-size: 0.86rem;
}

.surface-card li,
.check-list li {
    margin: 7px 0;
}

.callout {
    margin-top: 20px;
    border-left: 3px solid var(--blue);
    padding: 15px 18px;
    color: var(--muted);
    background: var(--surface-2);
}

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

.callout-info {
    border-left-color: var(--cyan);
}

.callout-warning {
    border-left-color: var(--amber);
}

.callout-danger {
    border-left-color: var(--red);
}

.steps {
    counter-reset: setup-step;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    counter-increment: setup-step;
    min-height: 76px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    border-top: 1px solid var(--line);
    padding: 18px 0;
}

.steps li::before {
    content: counter(setup-step);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(88, 213, 233, 0.3);
    border-radius: 8px;
    color: var(--cyan);
    font-weight: 800;
    background: rgba(88, 213, 233, 0.06);
}

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

.steps p {
    margin: 4px 0 0;
    font-size: 0.88rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text);
    background: var(--surface-2);
    font-size: 0.76rem;
}

td {
    color: var(--muted);
    font-size: 0.84rem;
}

tr:last-child td {
    border-bottom: 0;
}

.module-grid article,
.feature-list article {
    min-height: 128px;
}

.module-grid article h3,
.feature-list article h3,
.command-index article h3 {
    color: var(--text);
}

.feature-list article > code {
    display: inline-block;
    margin-top: 12px;
}

.command-list {
    border-top: 1px solid var(--line);
}

.command-list > div {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.command-list span {
    color: var(--muted);
    font-size: 0.86rem;
}

.command-list.compact {
    margin-top: 24px;
}

.workflow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.workflow span {
    min-height: 58px;
    display: grid;
    place-items: center;
    border-right: 1px solid var(--line);
    padding: 10px;
    color: var(--soft);
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.workflow span:last-child {
    border-right: 0;
}

.command-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 24px;
}

.command-chips code {
    padding: 8px 10px;
}

.command-index article p {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0 0;
}

.troubleshooting-list {
    border-top: 1px solid var(--line);
}

.troubleshooting-list details {
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.troubleshooting-list summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
}

.troubleshooting-list p {
    max-width: 760px;
    margin: 10px 0 0;
}

.practice-grid article strong {
    color: var(--text);
}

.closing-band {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
}

.closing-band span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.closing-band strong {
    display: block;
    margin-top: 3px;
}

.site-footer {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    padding: 28px 0 42px;
    color: var(--muted);
    font-size: 0.8rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a:hover {
    color: var(--text);
}

@media (max-width: 1080px) {
    .docs-layout {
        grid-template-columns: 238px minmax(0, 1fr);
        gap: 34px;
    }

    .release-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .release-strip span:nth-child(2) {
        border-right: 0;
    }

    .release-strip span:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 820px) {
    html {
        scroll-padding-top: 132px;
    }

    .header-inner {
        min-height: 112px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding: 12px 0;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .button {
        flex: 1 1 0;
        min-width: 0;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        margin-top: 24px;
        padding-right: 0;
    }

    .docs-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .nav-group {
        align-content: start;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 12px;
        background: var(--surface);
    }

    .docs-main {
        padding-top: 12px;
    }

    .intro {
        min-height: auto;
        padding-top: 46px;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .docs-layout,
    .site-footer {
        width: min(calc(100% - 28px), var(--max));
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .header-actions .button {
        min-height: 38px;
        padding: 0 9px;
        font-size: 0.72rem;
    }

    .docs-nav,
    .surface-grid,
    .module-grid,
    .feature-list,
    .command-index,
    .practice-grid {
        grid-template-columns: 1fr;
    }

    .nav-group {
        padding: 10px;
    }

    .doc-section {
        padding: 46px 0;
    }

    h1 {
        font-size: 3.25rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .release-strip {
        grid-template-columns: 1fr;
    }

    .release-strip span,
    .release-strip span:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .release-strip span:last-child {
        border-bottom: 0;
    }

    .intro-actions .button,
    .closing-actions .button {
        width: 100%;
    }

    .command-list > div {
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 14px 0;
    }

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

    .workflow span {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .workflow span:last-child {
        border-bottom: 0;
    }

    .closing-band,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

@media (forced-colors: active) {
    a:focus-visible,
    button:focus-visible,
    input:focus-visible {
        outline: 2px solid CanvasText;
        box-shadow: none;
    }

    .skip-link,
    .button,
    .search-box,
    .search-clear {
        border: 1px solid CanvasText;
    }
}
