/* crt-skin, Gerätelook (optional). https://github.com/tbx/crt-skin, MIT.

   crt.css ist nur das Signal, die Seite behält ihre Gestaltung. Diese Datei legt zusätzlich den
   Look des Geräts auf die Seite: NES-Palette, Press Start 2P für h1, h2 und Titel-Haken in festen
   Pixelstufen, Lime-Links, Knöpfe und Formularfelder mit dickem Rahmen, Marker in Pixelschrift.
   Nach crt.css einbinden:
     <link rel="stylesheet" href="crt.css">
     <link rel="stylesheet" href="crt-look.css">

   Haken zusätzlich zu denen aus crt.css:
   - data-crt="marker"  kleine Marke in Pixelschrift (A, B, C, 01, 02)
   - data-crt="button"  Link, der wie ein Knopf aussieht
   - data-crt="muted"   gedämpfter Text

   Gleicher Wurzelselektor wie crt.css, damit auch diese Regeln die Styles der Seite schlagen. */

html[data-skin="crt"]:not(#_) {
	/* Tokens: nur dunkel, NES-Palette. Überschreibt die Tokens aus crt.css. */
	--crt-bg: #050507;
	--crt-fg: #ececec;
	--crt-muted: #c6c6c6;
	--crt-line: #3a3a3a;
	--crt-green: #12923a;
	--crt-danger: #ff5a4e;

	::selection { background: var(--crt-lime); color: #000; text-shadow: none; }

	/* Zwei Stimmen: Press Start 2P ist das Gerät (h1, h2, Titel-Haken, Marker), die Schrift der Seite ist das Programm.
	   Press Start 2P ist ein 8-px-Raster, deshalb feste Größen statt clamp(): krumme Werte machen die Pixel ungleich.
	   Monospaced: das Leerzeichen ist eine volle Zelle, deshalb der engere Wortabstand. h1 Lime, alle anderen Titel weiß. */
	h1, h2, [data-crt="title"] { font-family: var(--crt-font-px); font-weight: 400; font-style: normal; font-stretch: 100%; letter-spacing: 0; word-spacing: -0.12em; color: var(--crt-fg); text-transform: none; }
	h1 { font-size: 40px; line-height: 1.35; color: var(--crt-lime); }
	h1 em, h1 strong, h2 em, h2 strong { color: inherit; font-weight: inherit; font-style: inherit; }
	h2 { font-size: 24px; line-height: 1.4; }
	[data-crt="title"] { font-size: 24px; line-height: 1.4; }
	@media (max-width: 1100px) { h1 { font-size: 32px; } }
	@media (max-width: 760px) { h1 { font-size: 24px; } h2, [data-crt="title"] { font-size: 16px; line-height: 1.5; } }
	h3, h4, h5, h6 { color: var(--crt-fg); font-weight: 600; }

	/* Marker in Pixelschrift. font-weight 400 ausdrücklich, sonst synthetisiert der Browser aus einem fetten Elternelement Fettdruck. */
	[data-crt="marker"] { font-family: var(--crt-font-px); font-weight: 400; font-size: 14px; line-height: 1.6; color: var(--crt-lime); letter-spacing: 0; }
	[data-crt="muted"] { color: var(--crt-muted); }

	/* Flächen dunkel. hr, wo die Seite eine setzt, als dicke grüne Linie. */
	hr { border: 0; border-top: 3px solid var(--crt-green); margin: 2rem 0; }
	header, nav, footer { background: var(--crt-bg); color: var(--crt-fg); backdrop-filter: none; -webkit-backdrop-filter: none; }

	/* Links und Knöpfe. Links Lime, Knöpfe mit dickem Rahmen und ohne Rundung, beim Zeigen invertiert. Der Kanalknopf bleibt, wie crt.css ihn setzt. */
	a { color: var(--crt-lime); }
	a:hover { color: var(--crt-fg); }
	button:not(.crt-ch), [type="button"]:not(.crt-ch), [type="submit"], [type="reset"], [data-crt="button"] { display: inline-block; border-radius: 0; border: 3px solid var(--crt-fg); background: #000; color: var(--crt-fg); font-weight: 600; text-decoration: none; cursor: pointer; transition: none; text-shadow: none; box-shadow: none; }
	button:not(.crt-ch):hover, [type="button"]:not(.crt-ch):hover, [type="submit"]:hover, [type="reset"]:hover, [data-crt="button"]:hover { background: var(--crt-fg); color: #000; transform: none; }

	/* Formular: schwarze Felder, dicker Rahmen, Fokus in Lime. */
	label { color: var(--crt-lime); }
	input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]), textarea, select { border: 3px solid var(--crt-line); border-radius: 0; background: #000; color: var(--crt-fg); box-shadow: none; transition: none; }
	input:focus, textarea:focus, select:focus { background: #000; border-color: var(--crt-lime); box-shadow: none; outline: none; }
	a:focus-visible, button:not(.crt-ch):focus-visible, summary:focus-visible, [data-crt="button"]:focus-visible { outline: 3px solid var(--crt-lime); outline-offset: 2px; border-radius: 0; }

	/* Code: ein Kasten im Gerätestil. */
	pre { border: 3px solid var(--crt-line); background: #000; color: var(--crt-fg); text-shadow: none; }
	code { color: var(--crt-lime); }
	pre code { color: var(--crt-fg); }

	/* Fotos mit Rahmen. */
	[data-crt="photo"] { border: 3px solid var(--crt-line); border-radius: 8px; background: #000; }
}
