:root {
    --bg: #07111d;
    --bg-elevated: #0b1726;
    --panel: rgba(14, 29, 46, 0.78);
    --panel-strong: #0f2033;
    --border: rgba(142, 176, 207, 0.22);
    --border-strong: rgba(142, 176, 207, 0.34);
    --text: #e8f0f7;
    --muted: #9eb0c1;
    --accent: #51c7e8;
    --accent-soft: rgba(81, 199, 232, 0.12);
    --success: #74d99f;
    --warning: #f3c36b;
    --danger: #e97979;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 113, 147, 0.18), transparent 32rem),
        linear-gradient(180deg, #081421 0%, var(--bg) 42rem);
}

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

a:hover {
    text-decoration: underline;
}

.site-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    background: rgba(6, 16, 28, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(81, 199, 232, 0.42);
    background: linear-gradient(145deg, rgba(81, 199, 232, 0.2), rgba(81, 199, 232, 0.05));
    color: #c9f4ff;
    font-weight: 800;
    box-shadow: inset 0 0 18px rgba(81, 199, 232, 0.08);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.brand small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.76rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-pill,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(116, 217, 159, 0.34);
    border-radius: 999px;
    background: rgba(116, 217, 159, 0.08);
    color: #b9f2cf;
    font-size: 0.78rem;
    font-weight: 650;
}

.subtle-link,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 650;
}

.subtle-link:hover,
.button:hover {
    border-color: rgba(81, 199, 232, 0.48);
    background: rgba(81, 199, 232, 0.07);
    text-decoration: none;
}

.layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    width: min(1480px, 100%);
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: 77px;
    align-self: start;
    min-height: calc(100vh - 77px);
    padding: 30px 20px 36px;
    border-right: 1px solid var(--border);
}

.nav-link,
.nav-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 9px;
    color: #b8c7d6;
    font-weight: 620;
}

.nav-link {
    min-height: 42px;
    padding: 9px 11px;
    margin-bottom: 5px;
}

.nav-child {
    min-height: 35px;
    padding: 6px 10px 6px 23px;
    margin-bottom: 3px;
    font-size: 0.88rem;
    font-weight: 540;
}

.nav-link:hover,
.nav-child:hover,
.nav-link.active,
.nav-child.active {
    background: var(--accent-soft);
    color: #e7faff;
    text-decoration: none;
}

.nav-link.active,
.nav-child.active {
    box-shadow: inset 2px 0 0 var(--accent);
}

.nav-children {
    margin: 2px 0 10px;
}

.nav-lock {
    color: var(--warning);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-note {
    margin-top: 28px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-note strong {
    font-size: 0.82rem;
}

.sidebar-note p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.content {
    min-width: 0;
    padding: clamp(34px, 5vw, 72px) clamp(24px, 6vw, 84px) 80px;
}

.hero {
    max-width: 980px;
    margin-bottom: 36px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 780;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.16;
    letter-spacing: -0.025em;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(2.15rem, 4vw, 3.55rem);
}

h2 {
    margin: 50px 0 15px;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
}

h3 {
    margin: 30px 0 9px;
    font-size: 1.08rem;
}

.lead {
    max-width: 820px;
    margin: 0;
    color: #b9cad9;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 26px 0 8px;
}

.card {
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.card h3 {
    margin-top: 0;
}

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

.card .button {
    margin-top: 16px;
}

.callout {
    margin: 24px 0;
    padding: 18px 20px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    background: rgba(81, 199, 232, 0.055);
}

.callout.warning {
    border-left-color: var(--warning);
    background: rgba(243, 195, 107, 0.055);
}

.callout.success {
    border-left-color: var(--success);
    background: rgba(116, 217, 159, 0.055);
}

.callout strong {
    display: block;
    margin-bottom: 4px;
}

.callout p:last-child {
    margin-bottom: 0;
}

.feature-list {
    padding-left: 1.25rem;
}

.feature-list li {
    margin: 8px 0;
    color: #c6d3df;
}

.figure {
    margin: 30px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #050c14;
    box-shadow: var(--shadow);
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 9px;
}

.figure figcaption {
    padding: 11px 5px 1px;
    color: var(--muted);
    font-size: 0.82rem;
}

.table-wrap {
    overflow-x: auto;
    margin: 22px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

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

th {
    background: rgba(255, 255, 255, 0.035);
    color: #dce9f4;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

td {
    color: #bdccda;
}

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

.flow {
    counter-reset: flow;
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.flow-step {
    position: relative;
    padding: 15px 16px 15px 54px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.018);
}

.flow-step::before {
    counter-increment: flow;
    content: counter(flow);
    position: absolute;
    left: 14px;
    top: 13px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: #bcefff;
    font-size: 0.8rem;
    font-weight: 800;
}

.footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 18px;
    }

    .sidebar-note {
        display: none;
    }

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

@media (max-width: 700px) {
    .topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .auth-pill {
        order: 2;
    }

    .content {
        padding-left: 19px;
        padding-right: 19px;
    }
}
