/*
 * Public documentation styles for dev.elonn.
 *
 * The layout favors dense, readable reference material with generated
 * navigation and source-code inspection.
 */

:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #182026;
    --muted: #5f6b75;
    --line: #dce2e8;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --code-bg: #101820;
    --code-text: #edf7f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--accent-strong);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 12px clamp(16px, 4vw, 40px);
}

.brand {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 12px;
}

.site-header nav a {
    border-radius: 4px;
    color: var(--muted);
    padding: 5px 7px;
    text-decoration: none;
}

.site-header nav a[aria-current="page"],
.site-header nav a:hover {
    background: #e7f5f2;
    color: var(--accent-strong);
}

.site-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.hero {
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
    padding: 20px 0 24px;
}

.hero--compact {
    margin-bottom: 18px;
}

.eyebrow {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.18;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 0 0 10px;
}

h2 {
    font-size: 1.35rem;
    margin: 0 0 14px;
}

.hero p {
    color: var(--muted);
    max-width: 760px;
    margin: 0;
}

.doc-content,
.listing {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: clamp(18px, 3vw, 28px);
}

.doc-content > :first-child {
    margin-top: 0;
}

.doc-content > :last-child {
    margin-bottom: 0;
}

.doc-content code {
    background: #eef3f5;
    border-radius: 4px;
    padding: 0.08em 0.28em;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.entry-card {
    display: grid;
    gap: 6px;
    min-height: 118px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    color: var(--text);
    padding: 14px;
    text-decoration: none;
}

.entry-card:hover {
    border-color: #8ac4bd;
    background: #f4fbfa;
}

.entry-card__type {
    color: var(--accent-strong);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.entry-card span:last-child {
    color: var(--muted);
    font-size: 0.92rem;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fbfcfd;
    padding: 8px 10px;
    text-decoration: none;
}

.source-block {
    overflow: auto;
    border-radius: 8px;
    background: var(--code-bg);
    color: var(--code-text);
    margin: 0 0 20px;
    padding: 18px;
    tab-size: 2;
}

.source-block code {
    background: transparent;
    color: inherit;
    font: 0.92rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    padding: 0;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 18px;
}

@media (max-width: 720px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header nav {
        justify-content: flex-start;
    }
}
