:root {
    color-scheme: dark;
    background: #15171d;
    color: #f1f4f8;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background: #15171d;
    margin: 0;
    min-height: 100vh;
}

.top-nav {
    align-items: center;
    background: #20242d;
    border-bottom: 1px solid #343b49;
    display: flex;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 18px;
}

.nav-links {
    align-items: center;
    display: flex;
    gap: 12px;
}

.nav-links a {
    border-radius: 6px;
    color: #f1f4f8;
    padding: 8px 10px;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    background: #303746;
}

.status-text {
    color: #b9c2d3;
    font-size: 13px;
}

main {
    display: grid;
    gap: 18px;
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px 18px 40px;
}

.rules-header {
    border-bottom: 1px solid #343b49;
    padding-bottom: 18px;
}

h1,
h2,
h3,
p,
ol,
ul {
    margin-top: 0;
}

h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

p,
li,
.rules-table span {
    color: #dce5f4;
    line-height: 1.45;
}

section {
    background: #20242d;
    border: 1px solid #343b49;
    border-radius: 8px;
    padding: 18px;
}

.quick-start {
    border-color: #52617a;
}

.section-note {
    max-width: 860px;
}

.step-list {
    display: grid;
    gap: 10px;
    margin-bottom: 0;
    padding-left: 24px;
}

.flow-grid,
.card-grid,
.reference-grid {
    display: grid;
    gap: 12px;
}

.flow-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

article {
    background: #171b23;
    border: 1px solid #343b49;
    border-radius: 8px;
    padding: 14px;
}

article p:last-child,
article ul:last-child {
    margin-bottom: 0;
}

.eyebrow {
    background: #2f6fed;
    border-radius: 999px;
    display: inline-grid;
    font-size: 12px;
    font-weight: 700;
    height: 24px;
    margin-bottom: 10px;
    place-items: center;
    width: 24px;
}

.rules-table {
    border: 1px solid #343b49;
    border-radius: 8px;
    display: grid;
    overflow: hidden;
}

.rules-table div {
    display: grid;
    gap: 10px;
    grid-template-columns: 190px minmax(0, 1fr);
    padding: 12px;
}

.rules-table div:nth-child(odd) {
    background: #171b23;
}

.rules-table div:nth-child(even) {
    background: #1b2029;
}

.rules-table.compact div {
    grid-template-columns: 160px minmax(0, 1fr);
}

.plain-list {
    display: grid;
    gap: 6px;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}

strong {
    color: #ffffff;
}

@media (max-width: 980px) {
    .flow-grid,
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .top-nav,
    .nav-links {
        align-items: stretch;
        flex-direction: column;
    }

    .top-nav {
        padding: 10px;
    }

    .nav-links {
        gap: 4px;
        width: 100%;
    }

    .status-text {
        display: none;
    }

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

    .rules-table div,
    .rules-table.compact div {
        grid-template-columns: 1fr;
    }
}
