/*
 * The docs site's own pages: the home page, the vocabulary viewer and the save button preview. TypeDoc's API reference
 * keeps its own look.
 */

:root {
    --paper: #fbfaf7;
    --surface: #ffffff;
    --ink: #1f1d1a;
    --muted: #67645e;
    --line: #dcd8cf;
    --accent: #4a25c9;
    --accent-soft: #ece6ff;
    --note: #fdf3d8;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #17161a;
        --surface: #211f25;
        --ink: #eceae6;
        --muted: #a9a5ae;
        --line: #3a3740;
        --accent: #b9a4ff;
        --accent-soft: #2c2547;
        --note: #3a3220;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.6 system-ui, sans-serif;
}

a { color: var(--accent); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
h1, h2, h3 { line-height: 1.25; }
h2 code { font-size: 0.8em; word-break: break-all; }

.site-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

.lede { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }

.note {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--note);
}

.button {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
}

/* The home page */

.hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1rem;
}

.hero h1 { margin: 0; font-size: 2.4rem; }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.card {
    display: block;
    height: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
}

.card:hover, .card:focus-visible { border-color: var(--accent); }
.card h2 { margin: 0 0 0.25rem; font-size: 1.15rem; color: var(--accent); }
.card p { margin: 0; color: var(--muted); }
.card code { color: var(--ink); }

/* The vocabulary viewer */

.document { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.term { margin-top: 2rem; }
.term h3 { margin-bottom: 0.25rem; }
.kind { margin-left: 0.5rem; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.iri { margin-top: 0; color: var(--muted); word-break: break-all; }
.facts { color: var(--muted); }

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 0.5rem 0.75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--accent-soft); font-weight: 600; }

details { margin-top: 1.5rem; }
summary { cursor: pointer; }

pre {
    overflow-x: auto;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}
