:root {
    --bg: #0c0e12;
    --fg: #c5cbd3;
    --dim: #5f6773;
    --user: #4fc36b;
    --path: #00aaff;
    --link: #00aaff;
    --err: #e0596b;
    --mono: "IBM Plex Mono", ui-monospace, "DejaVu Sans Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 16px;
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.6 var(--mono);
}

::selection {
    background: var(--fg);
    color: var(--bg);
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.term {
    width: 100%;
    max-width: 78ch;
}

.term > p + p,
.term pre,
.term form {
    margin-top: 0.15rem;
}

.term > p:has(.ps1),
.term form {
    margin-top: 1.4rem;
}

.term > p:first-child {
    margin-top: 0;
}

pre {
    font: inherit;
    font-size: min(1em, 2.6vw);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--dim) transparent;
}

.motd {
    white-space: pre-wrap;
}

pre a.x {
    color: var(--user);
}

.ps1 b {
    color: var(--user);
    font-weight: 600;
}

.ps1 i {
    color: var(--path);
    font-style: normal;
    font-weight: 600;
}

.dim {
    color: var(--dim);
}

.ok {
    color: var(--user);
}

.err {
    color: var(--err);
}

/* réponse à whoami : une ligne de saisie nue, comme dans un shell */
.answer {
    display: flex;
}

.answer::before {
    content: "> ";
    white-space: pre;
    color: var(--dim);
}

.answer input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--fg);
    font: inherit;
    caret-color: var(--user);
}

/* le format est dans le HTML pour qui inspecte, mais jamais affiché */
.answer input::placeholder {
    color: transparent;
    opacity: 0;
}

#whoami-out:empty {
    display: none;
}

footer {
    width: 100%;
    max-width: 78ch;
    margin-top: 3rem;
    display: flex;
    gap: 1.5ch;
    flex-wrap: wrap;
}

footer a {
    color: var(--dim);
    font-size: 0.85em;
}

footer a:hover {
    color: var(--fg);
}

@media (max-width: 600px) {
    body {
        font-size: 13px;
    }
}
