/* ==========================================================================
   THEME: Farben, Schriften, Grundlagen.  Alles Bunte steht hier oben als
   Variablen - wer das Aussehen ändern will, fängt hier an.
   Motiv: Platine (PCB) mit Kupferbahnen, Lötzinn und LEDs, im 8-Bit-Look.
   ========================================================================== */

@font-face {
    font-family: 'Press Start 2P';
    src: url('/fonts/PressStart2P-Regular.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'VT323';
    src: url('/fonts/VT323-Regular.ttf') format('truetype');
    font-display: swap;
}

:root {
    /* Platine */
    --pcb-dark:   #07211a;
    --pcb:        #0d3a29;
    --pcb-light:  #17573b;
    --pcb-line:   #1f7a50;

    /* Bauteile und Beschriftung */
    --copper:     #e8a24a;
    --copper-dim: #a8712c;
    --gold:       #ffd34d;
    --silk:       #eef7f0;   /* Siebdruck: Haupttext */
    --silk-dim:   #b7d3c0;
    --solder:     #c9d1d8;
    --ink:        #04100c;

    /* LEDs */
    --led-red:    #ff4d4d;
    --led-green:  #5dff7a;
    --led-blue:   #4db8ff;
    --led-yellow: #ffd34d;

    /* Schriften */
    --font-pixel: 'Press Start 2P', 'Courier New', monospace;   /* Überschriften */
    --font-text:  'VT323', 'Courier New', monospace;           /* Fließtext */
    --font-code:  ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;

    /* Pixel-Kanten */
    --px: 4px;
    --panel-shadow: 0 0 0 var(--px) var(--ink), calc(var(--px) * 2) calc(var(--px) * 2) 0 var(--px) var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-text);
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--silk);
    background-color: var(--pcb-dark);
    /* Lötpads im Raster */
    background-image:
        radial-gradient(circle at 50% 50%, var(--pcb-light) 0 3px, transparent 4px),
        linear-gradient(var(--pcb) 0 0);
    background-size: 32px 32px, 100% 100%;
    background-attachment: fixed;
}

img { max-width: 100%; height: auto; border: 0; }
.panel img, .content img { image-rendering: auto; }

a { color: var(--gold); text-decoration: underline dashed var(--copper-dim); text-underline-offset: 4px; }
a:hover, a:focus-visible { color: var(--ink); background: var(--gold); text-decoration-style: solid; outline: none; }

:focus-visible { outline: 3px dashed var(--led-blue); outline-offset: 3px; }

h1, h2, h3, h4 {
    font-family: var(--font-pixel);
    font-weight: normal;
    line-height: 1.5;
    margin: 0 0 1rem;
    color: var(--copper);
    text-shadow: 3px 3px 0 var(--ink);
    overflow-wrap: anywhere;
}
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.9rem; }
h4 { font-size: 0.8rem; }

h2 a, h3 a { color: inherit; text-decoration: none; }
h2 a:hover, h3 a:hover { background: var(--copper); color: var(--ink); text-shadow: none; }

p { margin: 0 0 0.9rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.6rem; }
li { margin-bottom: 0.25rem; }
ul { list-style: square; }
li::marker { color: var(--copper); }

hr { border: 0; border-top: 4px dotted var(--copper-dim); margin: 1.5rem 0; }

code, pre { font-family: var(--font-code); font-size: 0.85em; }
code { background: var(--ink); color: var(--led-green); padding: 0.1em 0.4em; }
pre { background: var(--ink); border: 4px solid var(--pcb-line); padding: 1rem; overflow-x: auto; line-height: 1.5; margin: 0 0 1rem; }
pre code { background: none; padding: 0; color: inherit; }

table { border-collapse: collapse; }
th { background: var(--pcb-light); color: var(--gold); text-align: left; }
th, td { padding: 6px 10px; border: 2px solid var(--pcb-line); }

::selection { background: var(--gold); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
