/* Capel's console (wiki.php): a phosphor screen of the Zeiss Central Factory. */
:root {
    --capel-bg: #07110b;
    --capel-panel: #0b1a10;
    --capel-text: #9ff2b0;
    --capel-dim: #5fa874;
    --capel-bright: #d8ffe0;
    --capel-amber: #ffc66d;
    --capel-error: #ff8a7a;
    --capel-line: #1f4a2c;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height:100%;margin:0;overflow:hidden; }
body {
    background: radial-gradient(ellipse at center, #0d2215 0%, var(--capel-bg) 70%, #030805 100%);
    color: var(--capel-text);
    font: 15px/1.55 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
.capel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    height: 100dvh;
    margin: 0 auto;
    padding: 18px 18px 14px;
}
/* The screen's glass: scanlines and a soft glow over everything. */
.capel::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, #0000 0 2px, #0003 2px 3px);
    box-shadow: inset 0 0 160px #000c;
    z-index: 5;
}
.capel-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--capel-line);
    font-family: 'VT323', monospace;
    font-size: 1.45rem;
    letter-spacing: .06em;
    color: var(--capel-dim);
}
.capel-bar strong { color: var(--capel-bright); font-weight: 400; text-shadow: 0 0 8px #9ff2b088; }
.capel-lamp { width: 10px; height: 10px; border-radius: 50%; background: #3dff7a; box-shadow: 0 0 10px #3dff7a; animation: capel-blink 2.4s steps(1) infinite; }
.capel-exit { margin-left: auto; color: var(--capel-dim); text-decoration: none; border: 1px solid var(--capel-line); padding: 0 .6rem; border-radius: 3px; }
.capel-exit:hover, .capel-exit:focus-visible { color: var(--capel-bright); border-color: var(--capel-dim); outline: none; }
.capel-screen {
    flex: 1;
    min-height: 0;
    overscroll-behavior-y: contain;
    overflow-y: auto;
    padding: 14px 6px 18px;
    text-shadow: 0 0 6px #9ff2b055;
    scrollbar-color: var(--capel-line) transparent;
}
.capel-line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.55em; }
.capel-dim { color: var(--capel-dim); }
/* The start-up screen of the orbal calculator. */
.capel-boot { min-height: 0; color: var(--capel-bright); font-family: 'VT323', monospace; font-size: 1.45rem; line-height: 1.15; letter-spacing: .04em; text-shadow: 0 0 8px #9ff2b088; }
.capel-echo { color: var(--capel-bright); margin-top: .7em; }
.capel-error { color: var(--capel-error); text-shadow: 0 0 6px #ff8a7a55; }
.capel-title { margin-top: .8em; color: var(--capel-amber); font-family: 'VT323', monospace; font-size: 1.6rem; line-height: 1.2; letter-spacing: .05em; text-shadow: 0 0 10px #ffc66d66; }
.capel-choice {
    display: inline;
    padding: 0 .25em;
    margin: 0 0 0 -.25em;
    color: var(--capel-text);
    background: none;
    border: 0;
    font: inherit;
    text-align: left;
    text-shadow: inherit;
    cursor: pointer;
}
.capel-choice:hover, .capel-choice:focus-visible { color: var(--capel-bg); background: var(--capel-text); text-shadow: none; outline: none; }
.capel-note { color: var(--capel-dim); margin-left: .6em; }
/* A tutorial on the screen: readable, its pictures framed like the console. */
.capel-doc {
    margin: .4em 0 .6em;
    padding: 12px 16px;
    max-width: 900px;
    border-left: 2px solid var(--capel-line);
    background: #0c1d12aa;
    white-space: normal;
    color: #c8f7d2;
    text-shadow: none;
}
.capel-doc h1, .capel-doc h2, .capel-doc h3, .capel-doc h4 { color: var(--capel-amber); font-family: 'VT323', monospace; font-weight: 400; font-size: 1.45rem; margin: 1em 0 .3em; }
.capel-doc p { margin: .55em 0; }
.capel-doc img, .capel-doc iframe { display: block; max-width: min(100%, 640px); height: auto; margin: .6em 0; border: 1px solid var(--capel-line); border-radius: 2px; filter: saturate(.85); }
.capel-doc iframe { width: 100%; aspect-ratio: 16 / 9; }
.capel-doc img { cursor: zoom-in; }
/* A screenshot enlarged: the whole window, the picture as large as it fits. */
.capel-zoom { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 12px; background: #000e; cursor: zoom-out; animation: capel-zoom-in .18s ease-out; }
.capel-zoom[hidden] { display: none; }
.capel-zoom img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
@keyframes capel-zoom-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.capel-doc a { color: var(--capel-amber); }
.capel-doc code, .capel-doc pre { color: var(--capel-bright); background: #000a; padding: 0 .3em; }
.capel-doc ul, .capel-doc ol { padding-left: 1.4em; }
.capel-prompt {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 10px 6px 0;
    border-top: 1px solid var(--capel-line);
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--capel-bright);
    text-shadow: 0 0 8px #9ff2b088;
}
.capel-prompt input {
    flex: 1;
    min-width: 0;
    padding: 0;
    color: var(--capel-bright);
    background: transparent;
    border: 0;
    outline: none;
    font: inherit;
    caret-color: #3dff7a;
    text-shadow: inherit;
}
.capel-static { max-width: 900px; margin: 0 auto; padding: 20px; }
@keyframes capel-blink { 50% { opacity: .35; } }
@media (max-width: 640px) {
    body { font-size: 14px; }
    .capel { padding: 10px 10px 8px; }
    .capel-bar span:not(.capel-lamp) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .capel-lamp { animation: none; } }
