:root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --muted: #555;
    --accent: #0a5acb;
    --accent-hover: #0641a0;
    --border: #e2e2e2;
    --code-bg: #f5f5f7;
    --code-fg: #24292f;
    --warn: #b14f00;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14171c;
        --fg: #e6e6e6;
        --muted: #a3a3a3;
        --accent: #6aaaff;
        --accent-hover: #94c2ff;
        --border: #2a2f37;
        --code-bg: #1d2129;
        --code-fg: #e6e6e6;
        --warn: #f1a35c;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.wrap {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- topbar ---- */
.topbar {
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
}
.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}
.nav a:hover {
    color: var(--accent);
}

/* ---- content ---- */
.content {
    padding: 2.5rem 1.25rem 4rem;
}

.doc h1 {
    font-size: 2rem;
    margin: 0 0 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
}
.doc h2 {
    font-size: 1.4rem;
    margin: 2.25rem 0 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    line-height: 1.3;
}
.doc h3 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.5rem;
}
.doc h4 {
    font-size: 1rem;
    margin: 1.25rem 0 0.4rem;
    color: var(--muted);
}
.doc p,
.doc ul,
.doc ol {
    margin: 0.6rem 0;
}
.doc ul, .doc ol {
    padding-left: 1.5rem;
}
.doc li {
    margin: 0.25rem 0;
}
.doc a {
    color: var(--accent);
    text-decoration: none;
}
.doc a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* code */
.doc code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: var(--code-bg);
    color: var(--code-fg);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.doc pre {
    background: var(--code-bg);
    color: var(--code-fg);
    padding: 0.9rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    overflow-x: auto;
    line-height: 1.5;
    font-size: 0.92em;
}
.doc pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 1em;
}

/* tables (commands.md has them) */
.doc table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    font-size: 0.95em;
}
.doc th, .doc td {
    border: 1px solid var(--border);
    padding: 0.45rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
.doc th {
    background: var(--code-bg);
    font-weight: 600;
}

/* blockquotes (rare but possible) */
.doc blockquote {
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    background: var(--code-bg);
    border-radius: 0 4px 4px 0;
}

/* horizontal rules separate command sections in commands.md */
.doc hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* hide README's CI badges row (clutters the heading area) */
.doc h1 + p a > img {
    margin-right: 0.5rem;
}

/* ---- footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0 2.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.site-footer a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--border);
}
.site-footer a:hover {
    color: var(--accent);
}

/* ---- seed builder ---- */
.seed-form fieldset {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem 1rem;
    margin: 0 0 1rem;
}
.seed-form legend {
    padding: 0 0.4rem;
    font-weight: 600;
}
.seed-form label {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}
.seed-form label.inline {
    display: block;
    margin: 0.25rem 0;
    font-weight: normal;
}
.seed-form input[type="text"],
.seed-form input[type="password"],
.seed-form input:not([type]),
.seed-form textarea {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.45rem 0.55rem;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg, transparent);
    color: inherit;
}
.seed-form textarea {
    resize: vertical;
}
.seed-form button[type="submit"] {
    padding: 0.55rem 1.1rem;
    font: inherit;
    background: var(--accent, #2563eb);
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}
.seed-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: progress;
}
.seed-result {
    margin-top: 1.25rem;
}
.seed-result .seed-error {
    color: #b91c1c;
}
.seed-result pre {
    background: var(--code-bg, #f3f4f6);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    overflow-x: auto;
}
