:root {
    color-scheme: dark;
    --background: #080808;
    --surface: #141414;
    --surface-raised: #191919;
    --surface-border: #2a2a2a;
    --text: #f4f4f4;
    --muted: #b4b4b4;
    --accent: #f5c400;
    --accent-soft: #2a2300;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--background);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top right, #2a2300 0, transparent 32rem),
        var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--surface-border);
    background: rgb(8 8 8 / 92%);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    width: 35px;
    height: 35px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: var(--accent);
    color: #111111;
    font-weight: 900;
}

.primary-navigation {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.primary-navigation a {
    color: var(--muted);
    font-size: 0.97rem;
    font-weight: 550;
    text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a[aria-current="page"] {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--surface-border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    padding: 0.55rem 0.8rem;
    font: inherit;
}

.hero,
.page-hero {
    padding: clamp(4.5rem, 8vw, 7.5rem) 0;
}

.page-hero {
    padding-bottom: clamp(2.5rem, 5vw, 4.25rem);
}

.eyebrow {
    margin: 0 0 0.85rem;
    color: var(--accent);
    font-size: 0.77rem;
    font-weight: 850;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 980px;
    margin-bottom: 1.35rem;
    font-size: clamp(2.8rem, 7.2vw, 6.2rem);
    line-height: 0.97;
    letter-spacing: -0.058em;
}

h2 {
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.hero-copy,
.page-intro {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1.06rem, 2vw, 1.34rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.7rem 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.button-primary {
    background: var(--accent);
    color: #111111;
}

.button-secondary {
    border-color: var(--surface-border);
    background: var(--surface);
    color: var(--text);
}

.section {
    padding: clamp(3.5rem, 6vw, 5.75rem) 0;
}

.section-compact {
    padding-top: 1rem;
}

.section-muted {
    border-block: 1px solid var(--surface-border);
    background: rgb(20 20 20 / 72%);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-heading h2 {
    max-width: 700px;
    margin-bottom: 0;
    font-size: clamp(2rem, 4.5vw, 3.8rem);
}

.section-heading > p {
    max-width: 470px;
    margin-bottom: 0;
    color: var(--muted);
}

.section-copy {
    max-width: 650px;
    color: var(--muted);
    font-size: 1.08rem;
}

.text-link {
    flex: 0 0 auto;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card,
.content-card,
.panel {
    border: 1px solid var(--surface-border);
    border-radius: 17px;
    background: rgb(20 20 20 / 84%);
}

.metric-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
}

.metric-card span,
.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    font-size: 1.45rem;
}

.card-grid {
    display: grid;
    gap: 1rem;
}

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

.spaced-grid {
    margin-top: 2rem;
}

.content-card {
    min-height: 230px;
    padding: 1.5rem;
}

.content-card h2,
.content-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.35rem;
}

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

.card-label {
    display: block;
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.panel {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.data-placeholder {
    min-height: 170px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.data-placeholder h3 {
    margin-bottom: 0.35rem;
}

.data-placeholder p {
    max-width: 700px;
    margin-bottom: 0;
    color: var(--muted);
}

.status-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 7px rgb(245 196 0 / 12%);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: stretch;
}

.principle-list {
    display: grid;
    gap: 0;
    border: 1px solid var(--surface-border);
    border-radius: 17px;
    background: var(--surface);
}

.principle-list article {
    display: grid;
    gap: 0.3rem;
    padding: 1.2rem 1.3rem;
    border-bottom: 1px solid var(--surface-border);
}

.principle-list article:last-child {
    border-bottom: 0;
}

.principle-list span {
    color: var(--muted);
}

.methodology-list {
    max-width: 900px;
}

.api-callout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 3rem;
    align-items: center;
}

.code-preview {
    display: grid;
    gap: 0.75rem;
    border: 1px solid var(--surface-border);
    border-radius: 17px;
    background: #0d0d0d;
    padding: 1.4rem;
}

.code-preview-large {
    align-self: stretch;
    align-content: start;
}

.code-preview span,
.code-preview small {
    color: var(--muted);
}

.code-preview code {
    overflow-wrap: anywhere;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.disclaimer-section {
    padding-block: 2rem;
}

.disclaimer-section p {
    max-width: 900px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.ranking-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ranking-toolbar > div:first-child {
    display: grid;
}

.ranking-toolbar span {
    color: var(--muted);
    font-size: 0.88rem;
}

.status-badge {
    border: 1px solid #5a4a00;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.table-shell {
    overflow-x: auto;
    border: 1px solid var(--surface-border);
    border-radius: 17px;
    background: var(--surface);
}

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

th,
td {
    padding: 1rem;
    border-bottom: 1px solid var(--surface-border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.table-empty-state {
    min-height: 170px;
    display: grid;
    place-content: center;
    gap: 0.35rem;
    text-align: center;
}

.table-empty-state span {
    color: var(--muted);
}

.prose {
    max-width: 760px;
}

.prose h2 {
    margin-top: 2.2rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p {
    color: var(--muted);
    font-size: 1.06rem;
}

.prose a,
.contact-panel a {
    color: var(--accent);
}

.plain-list {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-list li {
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--surface-border);
}

.plain-list li:last-child {
    border-bottom: 0;
}

.contact-panel {
    max-width: 760px;
}

.error-page {
    min-height: 65vh;
}

.site-footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--surface-border);
    background: #0b0b0b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
}

.footer-grid h2 {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-grid > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-grid a:not(.brand) {
    margin-bottom: 0.55rem;
    color: var(--muted);
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--accent);
}

.footer-grid p {
    max-width: 390px;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-brand {
    margin-bottom: 0.4rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-border);
}

.footer-bottom p {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

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

    .split-section,
    .api-callout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
        flex-wrap: wrap;
        padding-block: 0.8rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .primary-navigation {
        width: 100%;
        display: none;
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
        padding-bottom: 0.75rem;
    }

    .primary-navigation.is-open {
        display: flex;
    }

    .primary-navigation a {
        width: 100%;
        padding: 0.65rem 0;
        border-bottom: 1px solid var(--surface-border);
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid,
    .card-grid-three,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
