/* WiC64 – www.wic64.de · (C) by Sven Oliver "KiWi" Arke */

/* ---------- Tokens ---------- */

:root {
  --c-violet: #8b5cf6;
  --c-blue: #6366f1;
  --c-cyan: #22b8cf;
  --c-red: #ef4444;
  --c-green: #22c55e;
  --c-amber: #f59e0b;

  --bg: #f6f5ff;
  --bg-2: #ffffff;
  --bg-3: #eeecfb;
  --surface: rgba(255, 255, 255, .78);
  --text: #15132b;
  --text-2: #4a4766;
  --muted: #6d6a8a;
  --line: rgba(32, 24, 90, .12);
  --line-strong: rgba(32, 24, 90, .22);
  --accent: #6d4aff;
  --accent-2: #0e9fb6;
  --accent-text: #5b36f0;
  --glow: rgba(109, 74, 255, .18);
  --code-bg: #f0eefc;
  --shadow: 0 1px 2px rgba(20, 16, 60, .06), 0 8px 30px rgba(20, 16, 60, .08);
  --shadow-lg: 0 2px 6px rgba(20, 16, 60, .08), 0 30px 80px rgba(20, 16, 60, .16);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
  --maxw: 1200px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a18;
    --bg-2: #11112a;
    --bg-3: #171734;
    --surface: rgba(20, 20, 46, .72);
    --text: #ecebff;
    --text-2: #bdbbe0;
    --muted: #8f8db5;
    --line: rgba(160, 150, 255, .14);
    --line-strong: rgba(160, 150, 255, .26);
    --accent: #a78bfa;
    --accent-2: #22d3ee;
    --accent-text: #b9a3ff;
    --glow: rgba(139, 92, 246, .28);
    --code-bg: #0f0f26;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 80px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a18;
  --bg-2: #11112a;
  --bg-3: #171734;
  --surface: rgba(20, 20, 46, .72);
  --text: #ecebff;
  --text-2: #bdbbe0;
  --muted: #8f8db5;
  --line: rgba(160, 150, 255, .14);
  --line-strong: rgba(160, 150, 255, .26);
  --accent: #a78bfa;
  --accent-2: #22d3ee;
  --accent-text: #b9a3ff;
  --glow: rgba(139, 92, 246, .28);
  --code-bg: #0f0f26;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 80px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font: 400 17px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--glow), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34, 184, 207, .10), transparent 60%);
  background-repeat: no-repeat;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 750; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 720; }
h3 { font-size: 1.25rem; font-weight: 680; }
h4 { font-size: 1.05rem; font-weight: 680; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: .25em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--code-bg); border: 1px solid var(--line); padding: .1em .38em; border-radius: 6px; }
kbd { display: inline-block; min-width: 1.6em; text-align: center; padding: .05em .45em; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 3px; background: var(--bg-2); font-size: .82em; }
pre { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1em 1.2em; overflow-x: auto; line-height: 1.55; margin: 0 0 1.4em; }
pre code { background: none; border: 0; padding: 0; font-size: .88em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: .5em 1em; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
.site-header .wrap { width: min(1480px, 100% - 32px); }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.logo { width: 124px; height: auto; }
.logo text { font: 800 25px/1 var(--font-display); letter-spacing: -.5px; }
.logo-wic { fill: var(--accent-2); }
.logo-64 { fill: var(--c-red); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.main-nav li { margin: 0; }
.main-nav a {
  display: block; padding: 8px 7px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 550; white-space: nowrap;
  transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--bg-3); color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--text); background: var(--bg-3); box-shadow: inset 0 -2px 0 var(--accent); }
.header-tools { display: flex; gap: 6px; flex: none; }
/* Settings next to the menu (like arke.de): appearance Auto / Light / Dark and language DE / EN */
.hdr-settings { display: flex; align-items: center; gap: 6px; flex: none; }
.hdr-settings.in-menu { display: none; }
.seg { display: flex; align-items: center; gap: 2px; padding: 3px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent); flex: none; }
.seg button, .seg a { flex: none; display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; min-width: 30px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-size: .74rem; font-weight: 650; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.seg-theme button { padding: 0; width: 30px; }
.seg-theme button span { display: none; }
.seg button:hover, .seg a:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg a[data-cur="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.seg-theme svg { width: 14px; height: 14px; flex: none; }
.lang-switch svg { width: 20px; height: 14px; border-radius: 3px; flex: none; display: block; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
:root[data-theme="dark"] .lang-switch svg { box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lang-switch svg { box-shadow: 0 0 0 1px rgba(255,255,255,.4); } }
@media (max-width: 640px) {
  .header-tools .hdr-settings { display: none; }
  .hdr-settings.in-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 4px 16px 20px; }
  .hdr-settings.in-menu .seg-theme button { width: auto; padding: 0 10px; }
  .hdr-settings.in-menu .seg-theme button span { display: inline; }
}
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.nav-toggle { display: none; }

@media (max-width: 1500px) {
  .nav-toggle { display: grid; }
  .header-tools { margin-left: auto; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 18px; }
  .main-nav a { padding: 12px 14px; font-size: 1.02rem; }
}

/* ---------- Buttons, badges ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .82em 1.35em; border-radius: 14px; border: 1px solid transparent;
  font: 650 1rem/1.1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #7c4dff, #4f46e5 55%, #0891b2); box-shadow: 0 8px 24px rgba(99, 70, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(99, 70, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .32em .8em; border-radius: 999px; font-size: .8rem; font-weight: 650; letter-spacing: .02em;
  color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.badge { text-decoration: none; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.eyebrow { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: .8em; }
.grad-text { background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--c-red) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--text-2); font-size: 1.12rem; }
.alt { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-3) 60%, transparent) 20%, color-mix(in srgb, var(--bg-3) 60%, transparent) 80%, transparent); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: center; }
.hero h1 { margin: .45em 0 .35em; }
.hero .lead { font-size: clamp(1.08rem, 1.7vw, 1.28rem); color: var(--text-2); max-width: 36em; margin-bottom: 1.6em; }
.hero-media { position: relative; }
.hero-media img { border-radius: 26px; box-shadow: var(--shadow-lg); aspect-ratio: 1920 / 1088; object-fit: cover; width: 100%; }
.hero-media::before {
  content: ""; position: absolute; inset: -14% -10%; z-index: -1;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .45), transparent), radial-gradient(closest-side at 80% 70%, rgba(34, 211, 238, .30), transparent);
  filter: blur(30px);
}
.hero-chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow);
  font-size: .86rem; font-weight: 600; animation: float 6s ease-in-out infinite;
}
.hero-chip b { font-size: 1.05rem; color: var(--accent-text); }
.hero-chip.c1 { left: -18px; bottom: 26px; }
.hero-chip.c2 { left: -18px; top: 26px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--muted); font-size: .9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 16px; height: 16px; fill: none; stroke: var(--c-green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-chip.c1 { left: 10px; bottom: 10px; }
  .hero-chip.c2 { right: 10px; top: 10px; }
}

/* Page hero (sub pages) */
.page-hero { padding: clamp(40px, 6vw, 76px) 0 clamp(20px, 3vw, 36px); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: .3em 0 .3em; }
.page-hero p { font-size: 1.15rem; color: var(--text-2); max-width: 46em; }
.page-hero-grid { display: grid; grid-template-columns: 1.2fr .9fr; gap: 40px; align-items: center; }
.page-hero-grid img { border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.page-hero-grid img.hero-vic { aspect-ratio: auto; object-fit: contain; image-rendering: pixelated; border-radius: 14px; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: 1fr; } }
.breadcrumb { font-size: .86rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 22px 24px; }
.stat b { display: block; font: 750 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards, bento ---------- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { border-color: var(--line-strong); }
a.card { color: inherit; text-decoration: none; display: block; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--text-2); margin-bottom: 0; }
.card .more { display: inline-flex; margin-top: 14px; font-weight: 650; color: var(--accent-text); font-size: .95rem; }
.ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 18%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.ico svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento > * { grid-column: span 2; }
.bento .w3 { grid-column: span 3; }
.bento .w4 { grid-column: span 4; }
.bento .w6 { grid-column: span 6; }
@media (max-width: 980px) { .bento > *, .bento .w3, .bento .w4 { grid-column: span 3; } }
@media (max-width: 640px) { .bento > *, .bento .w3, .bento .w4 { grid-column: span 6; } }
.card-media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-media .card-body { padding: 22px 24px 24px; }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-feature { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)), var(--bg-2) 60%); }

/* ---------- C64 screens ---------- */
.screen {
  position: relative; margin: 0; border-radius: 16px; padding: 14px; background: #1b1a2e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), var(--shadow);
}
.screen img { image-rendering: auto; border-radius: 6px; width: 100%; aspect-ratio: 8 / 5; background: #000; cursor: zoom-in; }
.screen::after { content: none; }
.screen figcaption, figure.photo figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; text-align: center; }
.screen figcaption { color: #a9a6c9; }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.screens.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .screens { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .screens, .screens.two { grid-template-columns: 1fr; } }

figure.photo { margin: 0; }
figure.photo img { border-radius: var(--radius-sm); box-shadow: var(--shadow); cursor: zoom-in; width: 100%; background: var(--bg-3); }

/* ---------- Split layouts ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.check { list-style: none; padding: 0; }
.check li { position: relative; padding-left: 30px; margin: .55em 0; }
.check li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 19px; height: 19px; border-radius: 6px;
  background: color-mix(in srgb, var(--c-green) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; }
.step::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px;
  font: 750 1.1rem/1 var(--font-display); color: #fff; background: linear-gradient(135deg, #7c4dff, #0891b2);
}

/* ---------- Docs (manual) ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; font-size: .9rem; padding-right: 6px; }
.toc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .8em; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent-text); border-left-color: var(--accent); font-weight: 600; }
.toc .toc-actions { margin-top: 18px; display: grid; gap: 8px; }
.toc .toc-actions .btn { padding: .65em 1em; font-size: .9rem; justify-content: center; }
@media (max-width: 980px) {
  .docs { grid-template-columns: 1fr; gap: 10px; }
  .toc { position: static; max-height: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
}
.prose { max-width: 820px; }
.prose > h2 { margin-top: 2.6em; padding-top: .4em; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.prose > h2:first-child { margin-top: 0; }
.prose > h3 { margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose figure { margin: 1.6em 0; }
.prose .figrow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 1.6em 0; }
.prose .figrow.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .prose .figrow, .prose .figrow.three { grid-template-columns: 1fr; } }
.hnum { color: var(--accent-text); margin-right: .35em; font-variant-numeric: tabular-nums; }
.anchor { opacity: 0; margin-left: .3em; text-decoration: none; color: var(--muted); font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }

/* Callouts */
.note {
  border: 1px solid var(--line); border-left: 4px solid var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, var(--bg-2));
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 1.4em 0; color: var(--text-2);
}
.note p:last-child { margin-bottom: 0; }
.note > strong:first-child { display: block; color: var(--text); margin-bottom: .2em; }
.note.warn { border-left-color: var(--c-amber); background: color-mix(in srgb, var(--c-amber) 10%, var(--bg-2)); }
.note.danger { border-left-color: var(--c-red); background: color-mix(in srgb, var(--c-red) 9%, var(--bg-2)); }
.note.ok { border-left-color: var(--c-green); background: color-mix(in srgb, var(--c-green) 9%, var(--bg-2)); }
.mini-hint { margin-top: 28px; max-width: 760px; }
.mini-hint .btn { margin-top: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; background: var(--bg-3); color: var(--text); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* Numbered list of parts */
.legend { list-style: none; padding: 0; counter-reset: lg; }
.legend li { counter-increment: lg; position: relative; padding-left: 40px; margin: .7em 0; }
.legend li::before {
  content: counter(lg); position: absolute; left: 0; top: .05em; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: .82rem; font-weight: 750; color: #fff; background: var(--c-red);
}

/* ---------- Downloads ---------- */
.dl { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.dl .ico { margin: 0; }
.dl h3 { margin: 0 0 .15em; font-size: 1.12rem; }
.dl p { margin: 0; font-size: .94rem; }
.dl .meta { font-size: .8rem; color: var(--muted); margin-top: 6px; word-break: break-all; }
@media (max-width: 640px) { .dl { grid-template-columns: auto 1fr; } .dl .btn { grid-column: 1 / -1; justify-content: center; } }

/* ---------- Flasher ---------- */
.flash-box { text-align: center; padding: clamp(28px, 5vw, 48px); background: radial-gradient(600px 300px at 50% 0%, var(--glow), transparent 70%), var(--bg-2); }
.flash-box esp-web-install-button { display: inline-block; }
.flash-box .btn-flash { font-size: 1.12rem; padding: 1em 1.8em; }
.flash-status { margin-top: 18px; font-size: .95rem; }
.unsupported, .not-allowed { display: none; }
.is-unsupported .unsupported, .is-not-allowed .not-allowed { display: block; }
.is-unsupported .flash-ready, .is-not-allowed .flash-ready { display: none; }
.parts td:nth-child(2) { font-family: var(--mono); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); margin: 0 0 12px; overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 20px; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > div { padding: 0 20px 18px; color: var(--text-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(32px, 6vw, 64px);
  background: linear-gradient(135deg, #2b1a73, #1d1452 45%, #0a3f52); color: #fff; box-shadow: var(--shadow-lg);
}
.cta::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(34, 211, 238, .35), transparent); }
.cta h2 { color: #fff; }
.cta p { color: #d9d4ff; max-width: 40em; }
.cta .btn-ghost { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 28px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid p { max-width: 30em; margin-top: 12px; }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .8em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent-text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .86rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(6, 6, 18, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox img.pixel { image-rendering: auto; min-width: min(960px, 100%); }
.lightbox figcaption { color: #cfcbef; text-align: center; margin-top: 12px; font-size: .95rem; }
.lightbox-close { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.now { transition: none; }

/* ---------- Copy button ---------- */
.copy-btn {
  position: absolute; top: 8px; right: 8px; font: 600 .75rem/1 var(--font); padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text-2); cursor: pointer; opacity: .85;
}
.copy-btn:hover { opacity: 1; }

/* ---------- Print (manual as PDF) ---------- */
@media print {
  :root { --bg: #fff; --bg-2: #fff; --bg-3: #f2f2f6; --text: #000; --text-2: #222; --muted: #555; --line: #ccc; --code-bg: #f4f4f8; --accent-text: #3b1fc9; color-scheme: light; }
  @page { size: A4; margin: 16mm 14mm 24mm; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.5; }
  .site-header, .site-footer, .toc, .skip, .lightbox, .copy-btn, .no-print, .page-hero .btn-row { display: none !important; }
  .print-only { display: block !important; }
  .docs { display: block; }
  .prose { max-width: none; }
  .prose > h2 { break-before: auto; margin-top: 9mm; }
  .prose > h2:first-child { break-before: avoid; }
  h2, h3 { break-after: avoid; }
  figure, .note, pre, table, .screen, .figrow { break-inside: avoid; }
  .screen { background: #1b1a2e; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 8px; box-shadow: none; }
  .screen::after { display: none; }
  .figrow, .screens { gap: 10px; }
  figure.photo img { box-shadow: none; max-height: 72mm; max-width: 100%; width: auto; margin: 0 auto; }
  .screen img { max-height: 62mm; width: auto; margin: 0 auto; }
  .prose .figrow figure.photo img { max-height: 80mm; }
  .prose > h2 + *, .prose > h3 + * { break-before: avoid; }
  .js .reveal { opacity: 1; transform: none; }
  a { color: #000; text-decoration: none; }
  .page-hero { padding: 0 0 6mm; }
  .page-hero-grid { display: block; }
  .page-hero-grid img { max-height: 80mm; width: auto; margin-top: 6mm; }
  .note, th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-only { display: none; }

/* ---------- Handbuch style (inspired by the 1980s C64 manual, modernised) ---------- */
:root { --hb-blue: #1d4fb8; --hb-blue-2: #2c63d6; --rainbow: linear-gradient(90deg, #e53935 0 20%, #fb8c00 20% 40%, #fdd835 40% 60%, #43a047 60% 80%, #1e88e5 80% 100%); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -15px; height: 14px; pointer-events: none;
  background: linear-gradient(to bottom, #e31e24 0 2px, transparent 2px 3px, #f58220 3px 5px, transparent 5px 6px, #ffdd00 6px 8px, transparent 8px 9px, #6abe30 9px 11px, transparent 11px 12px, #0098da 12px 14px); }
.rainbow-text { background: linear-gradient(100deg, #ef5350, #ffa726 30%, #ffee58 50%, #66bb6a 70%, #42a5f5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb-cover {
  position: relative; overflow: hidden; color: #fff; border-radius: 28px;
  background: linear-gradient(180deg, var(--hb-blue-2), var(--hb-blue) 55%);
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 56px) 0; box-shadow: var(--shadow-lg);
}
.hb-cover .hb-frame { border: 2px solid rgba(255, 255, 255, .85); border-radius: 6px; padding: clamp(20px, 4vw, 40px); text-align: center; max-width: 640px; margin: 0 auto; }
.hb-cover h1 { font-family: "Cooper Black", "Bookman Old Style", Georgia, "Times New Roman", serif; font-weight: 800; letter-spacing: -.01em; margin: 0; color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); }
.hb-cover .hb-sub { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.1rem, 2.4vw, 1.6rem); margin: .3em 0 0; color: #dfe8ff; }
.hb-cover .hb-big { color: #fff; font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: .04em; font-size: clamp(2rem, 6vw, 3.6rem); margin: .25em 0 0; line-height: 1; }
.hb-cover .hb-ver { display: block; font: 900 clamp(3rem, 9vw, 6rem)/1 var(--font-display); margin: .1em 0; letter-spacing: -.04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.hb-stripes { height: clamp(120px, 16vw, 180px); margin: clamp(24px, 4vw, 40px) calc(-1 * clamp(24px, 5vw, 56px)) 0;
  background:
    linear-gradient(180deg,
      var(--hb-blue) 0 10%, #fff 10% 13%, var(--hb-blue) 13% 22%, #fff 22% 26%, var(--hb-blue) 26% 34%, #fff 34% 39%,
      var(--hb-blue) 39% 46%, #fff 46% 52%, var(--hb-blue) 52% 58%, #fff 58% 65%, var(--hb-blue) 65% 70%, #fff 70% 78%,
      var(--hb-blue) 78% 82%, #fff 82% 91%, var(--hb-blue) 91% 94%, #fff 94% 100%); }
.hb-cover .hb-foot { background: #fff; color: var(--hb-blue); text-align: center; font-weight: 700; letter-spacing: .02em; padding: 10px 0 18px; margin: 0 calc(-1 * clamp(24px, 5vw, 56px)); }
.hb-cover .btn-row { justify-content: center; margin-top: 22px; }
.hb-cover .btn-ghost { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); }

.manual .prose > h2 { text-transform: uppercase; letter-spacing: .03em; color: var(--hb-blue-2); font-size: clamp(1.35rem, 2.3vw, 1.75rem); font-weight: 800; }
:root[data-theme="dark"] .manual .prose > h2 { color: #7ea6ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .manual .prose > h2 { color: #7ea6ff; } }
.manual .prose > h2 .hnum { color: inherit; opacity: .55; }
.manual .prose > h3 { color: var(--text); }
.listing { background: #0b0b0f; color: #f5f5f5; border: 0; border-radius: 4px; font-weight: 700; letter-spacing: .03em; box-shadow: var(--shadow); }
.listing code { color: inherit; }
.listing .copy-btn { background: #222; color: #ddd; border-color: #444; }
/* Printed listings as in the original Commodore handbooks: own 5x7 needle-printer font (tools/make_matrixfont.py) */
@font-face { font-family: "WiC64 Matrix"; src: url("../fonts/wic64-matrix.woff") format("woff"); font-display: swap; }
.hb-listing { margin: 1.4em 0; }
.hb-listing pre { position: relative; margin: 0; padding: 20px 22px; background: #fff; color: #000; border: 1px solid #c9c9c9; border-radius: 0; box-shadow: none;
  font: 16px/1.45 "WiC64 Matrix", "Courier New", monospace; letter-spacing: 0; overflow-x: auto; white-space: pre; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hb-listing pre code { font: inherit; color: inherit; }
.hb-listing .copy-btn { background: #f2f2f2; color: #161616; border-color: #999; border-radius: 0; font-family: var(--font); }
.hb-listing figcaption { margin-top: 8px; font-size: .95rem; color: var(--muted); }
.hb-listing figcaption strong { color: var(--text); }
@media (max-width: 640px) { .hb-listing pre { font-size: 12px; padding: 14px 12px; } }
@media print { .hb-listing pre { font-size: 10.5pt; break-inside: avoid; } .manual .prose > h2#listing { break-before: page; } }
.key { font-weight: 800; font-family: var(--font); white-space: nowrap; }
.key::before { content: "<"; } .key::after { content: ">"; }

@media print {
  .site-header::after { display: none; }
  .print-cover { display: flex !important; flex-direction: column; justify-content: space-between; height: 252mm; break-after: page; border-radius: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-cover .hb-stripes { flex: 1; max-height: 90mm; }
  .hb-cover.screen-cover { display: none !important; }
  .listing { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-cover { display: none; }
.prose > figure.screen { max-width: 560px; margin-inline: auto; }
.split > *, .docs > *, .grid > *, .bento > * { min-width: 0; }
@media (max-width: 980px) { .docs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Download table (uniform rows) ---------- */
.dl-table { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px 150px; gap: 20px; align-items: center; padding: 20px 24px; border-top: 1px solid var(--line); }
.dl-row:first-child { border-top: 0; }
.dl-head { padding-top: 14px; padding-bottom: 14px; background: var(--bg-3); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dl-main h3 { margin: 0 0 .2em; font-size: 1.1rem; }
.dl-main p { margin: 0; color: var(--text-2); font-size: .94rem; }
.dl-meta { margin-top: 6px !important; font-size: .78rem !important; color: var(--muted) !important; display: flex; flex-wrap: wrap; gap: 4px 14px; word-break: break-all; }
.dl-file { font-family: var(--mono); color: var(--text) !important; }
.dl-size, .dl-date { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.btn-dl { width: 100%; justify-content: center; color: #fff; background: linear-gradient(135deg, #7c4dff, #4f46e5 55%, #0891b2); box-shadow: 0 6px 18px rgba(99, 70, 255, .28); }
.btn-dl:hover { transform: translateY(-1px); }
@media (max-width: 760px) {
  .dl-head { display: none; }
  .dl-row { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .dl-main { grid-column: 1 / -1; }
  .dl-size::before, .dl-date::before { content: attr(data-label) ": "; font-weight: 400; color: var(--muted); }
  .dl-row > span:last-child { grid-column: 1 / -1; }
}
@media print { .dl-row { grid-template-columns: minmax(0, 1fr) 90px 100px; } .dl-row > span:last-child { display: none; } }

/* ---------- Printed table of contents (page numbers filled in by tools/make_pdf.py) ---------- */
.print-toc { display: none; }
@media print {
  .print-toc { display: block !important; break-after: page; padding: 0 2mm; }
  .print-toc h2 { font-size: 20pt; text-transform: uppercase; color: var(--hb-blue-2); margin: 4mm 0 8mm; letter-spacing: .03em; }
  .print-toc ol { list-style: none; padding: 0; margin: 0; }
  .print-toc li { display: flex; align-items: baseline; gap: 3mm; margin: 0; padding: 1.6mm 0; font-size: 11pt; }
  .print-toc .pt-n { width: 8mm; color: var(--hb-blue-2); font-weight: 700; text-align: right; }
  .print-toc .pt-dots { flex: 1; border-bottom: 1px dotted #999; transform: translateY(-1mm); }
  .print-toc .pt-p { width: 10mm; text-align: right; color: #fff; }
  .print-toc .pt-foot { margin-top: 10mm; color: #555; font-size: 9.5pt; }
}
.hero .btn-row .btn { white-space: nowrap; }
@media (max-width: 560px) { .hero .btn-row .btn { width: 100%; justify-content: center; white-space: normal; } }

/* big PDF button in the table of contents of the manual */
.toc .toc-actions .btn-pdf { padding: 14px 16px; font-size: 1rem; justify-content: flex-start; gap: 12px; text-align: left; line-height: 1.25; }
.toc .toc-actions .btn-pdf svg { width: 26px; height: 26px; flex: none; }
.btn-pdf span { display: flex; flex-direction: column; }
.btn-pdf small { font-weight: 500; font-size: .78rem; opacity: .85; margin-top: 2px; }
.toc .toc-actions { position: sticky; bottom: 0; padding-top: 12px; background: linear-gradient(transparent, var(--bg) 30%); }
@media (max-width: 980px) { .toc .toc-actions { position: static; background: none; } }
.btn-pdf-xl { padding: 16px 26px; font-size: 1.15rem; gap: 14px; text-align: left; line-height: 1.2; }
.btn-pdf-xl svg { width: 28px; height: 28px; }
a.prglink { text-decoration: none; }
a.prglink code { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
a.prglink:hover code { background: color-mix(in srgb, var(--accent) 14%, var(--code-bg)); }

/* logo: WiC64 on a black badge with the five rainbow stripes */
.logo { width: 188px; height: auto; display: block; }
.logo .logo-text { font: 900 27px/1 "Segoe UI Black", "Segoe UI", "Arial Black", system-ui, sans-serif; fill: #fff; letter-spacing: -.3px; }
.brand-footer .logo { width: 140px; }

:root { --header-h: 78px; }
@media (max-width: 560px) { .logo { width: 150px; } }

/* start.prg: the most important download */
.dl-star { background: color-mix(in srgb, var(--accent) 9%, var(--bg-2)); box-shadow: inset 4px 0 0 var(--accent); }
.dl-star-name { font-family: var(--mono); font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; color: var(--accent-text); }
.dl-aka { font-size: 1rem; font-weight: 600; color: var(--text-2); }
.dl-star-cell { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.dl-star-file { font-family: var(--mono); font-size: 1.15rem; font-weight: 800; text-align: center; color: var(--accent-text); }
.dl-star .btn-dl { padding: 1em 1.2em; font-size: 1.05rem; }
.dl-star-title { font-size: 1.7rem; line-height: 1.2; }
.dl-star-title .dl-aka { font-size: 1.7rem; font-weight: 400; color: var(--text-2); }
.dl-star-title .dl-tb { font-size: 1.7rem; font-weight: 850; color: var(--text); }

/* ---------- Magazine article (mini.html): a type-in page like an 80s computer magazine ---------- */
.mag-wrap { padding: 28px 0 72px; }
.mag {
  --paper: #f4efe2; --ink: #1c1a17; --ink-2: #4a453c; --rule: #1c1a17; --red: #c8102e;
  background: var(--paper); color: var(--ink); max-width: 980px; margin: 0 auto; padding: clamp(18px, 4vw, 48px);
  border-radius: 3px; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 18px 40px rgba(0,0,0,.18);
  font: 400 17px/1.55 Georgia, "Times New Roman", "Liberation Serif", serif;
}
.mag a { color: var(--red); }
.mag code { font: 700 .92em/1 "Courier New", Courier, "Liberation Mono", monospace; background: none; padding: 0; border: 0; border-radius: 0; color: var(--ink); }
.mag-head { border-bottom: 3px solid var(--rule); padding-bottom: 14px; margin-bottom: 20px; }
.mag-rubrik { display: inline-block; margin: 0 0 12px; padding: 3px 10px; background: var(--red); color: #fff;
  font: 800 .8rem/1.3 "Arial Black", "Helvetica Neue", Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.mag h1 { font: 900 clamp(2rem, 5.4vw, 3.4rem)/1.02 "Arial Black", "Helvetica Neue", Arial, sans-serif; letter-spacing: -.02em; color: var(--ink); margin: 0 0 .35em; }
.mag-teaser { font-style: italic; font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.55rem); line-height: 1.35; color: var(--ink); margin: 0; padding-left: 14px; border-left: 6px solid var(--red); }
.mag-cols { column-count: 2; column-gap: 34px; column-rule: 1px solid rgba(0,0,0,.18); }
.mag-cols p, .mag-cols li { text-align: justify; hyphens: auto; }
.mag-cols p { margin: 0 0 .8em; }
.mag-cols h2 { font: 800 1.05rem/1.2 "Arial Black", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; color: var(--ink); margin: 1em 0 .4em; break-after: avoid; }
.mag-cols ol { margin: 0 0 .8em; padding-left: 1.3em; }
.mag-cols li { margin-bottom: .35em; }
.mag-lead::first-letter { float: left; font: 900 3.4em/.85 "Arial Black", Arial, sans-serif; margin: .06em .08em 0 0; color: var(--red); }
.mag-kurzinfo { break-inside: avoid; border: 2px solid var(--rule); padding: 10px 14px 6px; margin: 0 0 1em; background: #fffaf0; }
.mag-kurzinfo h2 { margin: 0 0 .4em; padding-bottom: 4px; border-bottom: 2px solid var(--rule); font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; }
.mag-kurzinfo dl { margin: 0; font-size: .92rem; line-height: 1.4; }
.mag-kurzinfo dt { font: 700 .8rem/1.3 Arial, sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.mag-kurzinfo dd { margin: 0 0 .5em; }
.mag-listing { margin: 26px 0 0; }
.mag-listing pre { position: relative; margin: 0; padding: 20px 22px; background: #fff; color: #000; border: 2px solid var(--rule); border-radius: 0;
  font: 16px/1.45 "WiC64 Matrix", "Courier New", monospace; overflow-x: auto; white-space: pre; box-shadow: none; }
.mag-listing pre code { font: inherit; color: inherit; }
.mag-listing .copy-btn { background: #f4efe2; color: #1c1a17; border-color: #1c1a17; border-radius: 0; }
.mag-listing figcaption { margin-top: 8px; font-size: .95rem; color: var(--ink-2); }
.mag-listing figcaption strong { color: var(--ink); font-family: Arial, sans-serif; }
.mag-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.25); font-size: .95rem; }
.mag-foot p { margin: 0 0 .5em; }
.mag-sha { font: 400 .75rem/1.4 "Courier New", monospace; color: var(--ink-2); word-break: break-all; }
.mag-copy { font: 700 .8rem/1.3 Arial, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
@media (max-width: 720px) {
  .mag-cols { column-count: 1; }
  .mag-cols p, .mag-cols li { text-align: left; }
  .mag { font-size: 16px; }
  .mag-listing pre { font-size: 12px; padding: 14px 12px; }
}
.dl-mini { display: block; margin-top: 8px; text-align: center; font-weight: 700; font-size: .9rem; }
.mag-cols ol ul { margin: .3em 0 0; padding-left: 1.1em; list-style: disc; }

/* Legal page */
.legal h2 { margin-top: 1.6em; }
.legal h3 { margin-top: 1.4em; font-size: 1.1rem; }

/* Highlight at the top of the home page: chat + online games, screens fanned out like on arke.de/finalradio.
   Hover lifts and straightens a screen, a click opens its page (chat guide or the game). */
.showcase { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 44px); text-align: center; }
.showcase h1 { margin: .2em 0 .25em; font-size: clamp(1.9rem, 4.4vw, 3.2rem); line-height: 1.08; letter-spacing: -.02em; }
.showcase .lead { max-width: 760px; margin: 0 auto; }
.sc-shots { display: grid; grid-template-columns: 1fr 1.9fr 1fr; align-items: center; gap: clamp(12px, 2.6vw, 34px);
  max-width: 1180px; margin: clamp(26px, 4vw, 44px) auto 0; padding: 0 clamp(4px, 1vw, 12px); }
.sc-col { display: grid; gap: clamp(12px, 2.4vw, 28px); }
.sc-shot { display: block; position: relative; color: var(--text); text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1); animation: scIn .8s cubic-bezier(.2,.8,.2,1) both; }
.sc-shot .tv { display: block; padding: 3.2%; border-radius: 16px; background: linear-gradient(150deg, #3a3a46 0%, #16161c 35%, #0b0b0f 70%, #2a2a33 100%);
  box-shadow: 0 22px 60px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.14), inset 0 2px 5px rgba(255,255,255,.12);
  transition: box-shadow .35s ease; }
.sc-shot img { display: block; width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 0 0 1px #000; }
.sc-shot .lbl { display: block; margin-top: 10px; font-weight: 700; font-size: clamp(.85rem, 1.2vw, 1rem); }
.sc-shot .lbl small { display: block; font-weight: 500; color: var(--muted); font-size: .85em; }
.sc-col.l .sc-shot:nth-child(1) { transform: rotate(-3deg) translateX(6px); animation-delay: .08s; }
.sc-col.l .sc-shot:nth-child(2) { transform: rotate(2deg) translateX(4px); animation-delay: .16s; }
.sc-col.r .sc-shot:nth-child(1) { transform: rotate(3deg) translateX(-6px); animation-delay: .12s; }
.sc-col.r .sc-shot:nth-child(2) { transform: rotate(-2deg) translateX(-4px); animation-delay: .2s; }
.sc-main { z-index: 1; }
.sc-main .tv { padding: 2.4%; border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent),
  0 0 40px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 0 0 1px rgba(255,255,255,.14); }
.sc-main .lbl { font-size: clamp(1rem, 1.6vw, 1.25rem); }
.sc-shot:hover, .sc-shot:focus-visible { z-index: 3; outline: none; }
.sc-col .sc-shot:hover, .sc-col .sc-shot:focus-visible { transform: translateY(-8px) rotate(0deg) scale(1.07); }
.sc-main:hover, .sc-main:focus-visible { transform: translateY(-8px) scale(1.03); }
.sc-shot:hover .tv, .sc-shot:focus-visible .tv { box-shadow: 0 34px 90px rgba(0,0,0,.6), 0 0 0 2px var(--accent-2), 0 0 46px color-mix(in srgb, var(--accent-2) 45%, transparent), inset 0 0 0 1px rgba(255,255,255,.18); }
.sc-shot:hover img { animation: scWiggle .9s ease-in-out; }
.sc-new { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--c-red); color: #fff; font-size: .7em; vertical-align: middle; letter-spacing: .04em; }
@keyframes scIn { from { opacity: 0; translate: 0 18px; scale: .96; } }
@keyframes scWiggle { 0%, 100% { transform: none; } 30% { transform: rotate(-.8deg) scale(1.01); } 65% { transform: rotate(.7deg); } }
@media (max-width: 760px) {
  .sc-shots { grid-template-columns: 1fr 1fr; }
  .sc-main { grid-column: 1 / -1; order: -1; }
  .sc-col { gap: 14px; }
  .sc-col .sc-shot:nth-child(n) { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .sc-shot, .sc-shot:hover img { animation: none; transition: none; } }

/* Chat page: command table */
.cmds { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cmds td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmds td:first-child { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; color: var(--accent-text); }

/* News flash at the very top of the home page (links to news.html):
   big headline, a C64 screen that cycles through chat and the three games (12 s, 3 s each),
   the game chips light up in step, a shine sweeps over the banner now and then */
.nf-wrap { padding: 22px 0 0; }
.newsflash { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(20px, 4vw, 56px);
  padding: clamp(22px, 3.4vw, 44px) clamp(20px, 3.4vw, 48px) clamp(28px, 3.8vw, 50px);
  border-radius: 24px; overflow: hidden; text-decoration: none; color: #fff; isolation: isolate;
  background: radial-gradient(90% 140% at 0% 0%, #3a2a9a 0%, #1a1450 45%, #0a0a18 100%);
  box-shadow: 0 24px 70px rgba(20, 10, 80, .4), inset 0 0 0 1px rgba(255,255,255,.14); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.newsflash::before { content: ""; position: absolute; inset: -20% auto -20% -40%; width: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.13), transparent); transform: skewX(-18deg); animation: nfShine 7s ease-in-out infinite 1.5s; }
.newsflash::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(90deg, #e31e24, #f58220, #ffdd00, #6abe30, #0098da, #6a3fd6, #e31e24); background-size: 200% 100%; animation: nfStripe 8s linear infinite; }
.newsflash:hover, .newsflash:focus-visible { transform: translateY(-4px); box-shadow: 0 30px 80px rgba(20, 10, 80, .5), 0 0 0 2px var(--accent-2); outline: none; }
.nf-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.nf-tag { padding: 7px 14px; border-radius: 9px; background: #e31e24; color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .14em;
  text-transform: uppercase; box-shadow: 0 0 18px rgba(227,30,36,.6); animation: nfPulse 1.6s ease-in-out infinite; }
.nf-head { font-size: clamp(1.9rem, 4.2vw, 3.4rem); font-weight: 900; line-height: 1.04; letter-spacing: -.02em; color: #ffdd00;
  text-shadow: 0 4px 30px rgba(255, 221, 0, .25); animation: nfIn .8s cubic-bezier(.2,.8,.2,1) both .1s; }
.nf-wic20 { display: inline-block; padding: 6px 12px; border-radius: 9px; background: #ffdd00; color: #1a1200; font-weight: 800;
  font-size: clamp(.95rem, 1.5vw, 1.15rem); box-shadow: 0 0 22px rgba(255, 221, 0, .45); animation: nfIn .8s cubic-bezier(.2,.8,.2,1) both .2s; }
.nf-wic20 b { color: #b3141c; }
.screen img.vic { aspect-ratio: auto; image-rendering: pixelated; }
.nf-text { font-size: clamp(1.02rem, 1.6vw, 1.3rem); line-height: 1.45; color: #e8e6ff; max-width: 34em; animation: nfIn .8s cubic-bezier(.2,.8,.2,1) both .25s; }
.nf-three { color: #22d3ee; letter-spacing: .04em; }
.nf-games { display: flex; flex-wrap: wrap; gap: 8px; animation: nfIn .8s cubic-bezier(.2,.8,.2,1) both .4s; }
.nf-games span { padding: 5px 11px; border-radius: 999px; font-size: .85rem; font-weight: 700; color: #b9b5e8; background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); animation: nfChip 12s infinite; }
.nf-more { margin-top: 4px; font-weight: 800; font-size: 1.05rem; color: #22d3ee; white-space: nowrap; transition: transform .3s; }
.newsflash:hover .nf-more { transform: translateX(6px); }
.nf-screen { position: relative; display: block; aspect-ratio: 8 / 5; border-radius: 14px; overflow: hidden; background: #000;
  border: 10px solid #1d1b2e; box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.2), 0 0 60px rgba(34, 211, 238, .18);
  transform: rotate(1.5deg); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.newsflash:hover .nf-screen { transform: rotate(0) scale(1.03); }
.nf-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; opacity: 0; animation: nfCycle 12s infinite; }
.nf-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0,0,0,.45)); }
/* image k shows from 3k s on: delays 0, -9, -6, -3 s (no empty start) */
.nf-screen img:nth-child(1), .nf-games span:nth-child(1) { animation-delay: 0s; }
.nf-screen img:nth-child(2), .nf-games span:nth-child(2) { animation-delay: -9s; }
.nf-screen img:nth-child(3), .nf-games span:nth-child(3) { animation-delay: -6s; }
.nf-screen img:nth-child(4), .nf-games span:nth-child(4) { animation-delay: -3s; }
@keyframes nfCycle { 0% { opacity: 0; transform: scale(1.06); } 4% { opacity: 1; transform: scale(1); } 25% { opacity: 1; } 29%, 100% { opacity: 0; } }
@keyframes nfChip { 0%, 27% { color: #0a0a18; background: #22d3ee; box-shadow: 0 0 16px rgba(34,211,238,.6); } 29%, 100% { color: #b9b5e8; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); } }
@keyframes nfShine { 0% { left: -40%; } 35%, 100% { left: 130%; } }
@keyframes nfStripe { to { background-position: 200% 0; } }
@keyframes nfIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nfPulse { 0%, 100% { box-shadow: 0 0 10px rgba(227,30,36,.45); } 50% { box-shadow: 0 0 24px rgba(255,60,60,.95); } }
@media (max-width: 860px) { .newsflash { grid-template-columns: 1fr; } .nf-screen { order: -1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .nf-tag, .newsflash::before, .newsflash::after, .nf-head, .nf-text, .nf-games, .nf-games span { animation: none; }
  .nf-screen img { animation: none; } .nf-screen img:first-child { opacity: 1; } }
/* news page: all screens equally big (2 per row), slightly fanned */
.sc-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(22px, 3.4vw, 46px) clamp(18px, 3vw, 40px); max-width: 1240px; }
.sc-grid .sc-shot:nth-child(odd) { transform: rotate(-1.4deg); }
.sc-grid .sc-shot:nth-child(even) { transform: rotate(1.4deg); }
.sc-grid .sc-shot:nth-child(1) { animation-delay: 0s; } .sc-grid .sc-shot:nth-child(2) { animation-delay: .06s; }
.sc-grid .sc-shot:nth-child(3) { animation-delay: .12s; } .sc-grid .sc-shot:nth-child(4) { animation-delay: .18s; }
.sc-grid .sc-shot:nth-child(5) { animation-delay: .24s; } .sc-grid .sc-shot:nth-child(6) { animation-delay: .3s; }
.sc-grid .sc-shot .tv { padding: 2.4%; border-radius: 20px; }
.sc-grid .sc-shot:hover, .sc-grid .sc-shot:focus-visible { transform: translateY(-8px) rotate(0deg) scale(1.03); }
.sc-grid .lbl { font-size: clamp(1rem, 1.5vw, 1.2rem); }
@media (max-width: 760px) { .sc-grid { grid-template-columns: 1fr; } .sc-grid .sc-shot:nth-child(n) { transform: none; } }

/* screenshots over the full width (games): text below or above, never beside */
.split.stack { grid-template-columns: 1fr; gap: 28px; align-items: start; }
.split.stack > :first-child { order: 0; }
.split.stack .muted, .split.stack ol, .split.stack ul.check { max-width: 900px; }

/* flasher page: big notice at the very top - updates only with start.prg on the C64 */
.update-stop { padding: clamp(22px, 3.4vw, 40px) 0; background: #b3141c; color: #fff; border-bottom: 6px solid #ffdd00; }
.update-stop .us-tag { display: inline-block; margin: 0 0 12px; padding: 5px 12px; border-radius: 8px; background: #ffdd00; color: #1a1200;
  font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.update-stop h2 { margin: 0 0 .45em; color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.1; font-weight: 900; max-width: 26em; }
.update-stop .us-text { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46em; color: #ffe9e9; }
.update-stop .us-text code, .update-stop a.prglink code, .update-stop a.prglink:hover code { background: rgba(0, 0, 0, .3); color: #fff; border-color: transparent; box-shadow: none; }
.update-stop .btn-primary { background: #ffdd00; border-color: #ffdd00; color: #1a1200; font-weight: 800; }
.update-stop .btn-ghost { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .75); }
.update-stop .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.update-stop .us-only { margin: 18px 0 0; padding: 14px 18px; border-radius: 12px; background: rgba(0, 0, 0, .28); font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 46em; }
.update-stop .us-only strong { color: #ffdd00; }

/* ---------- Dark theme (html.space, set by site.js): star field behind the page, now and then a ship ---------- */
.space-layer { display: none; }
.space .space-layer { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.space-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.space main, .space .site-footer { position: relative; z-index: 1; }
.space-front { display: none; }                      /* ships that pass in front of text and pictures */
.space .space-front { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }
@media print { .space-front { display: none !important; } }
@media print { .space-layer { display: none !important; } }

/* ---------- Debug menu (site.js; only on the developer's home connection or a local preview) ---------- */
.dbg { position: fixed; left: 12px; bottom: 12px; z-index: 95; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  font: 600 12px/1.3 var(--mono, ui-monospace, Consolas, monospace); }
.dbg button { font: inherit; cursor: pointer; border-radius: 7px; border: 1px solid rgba(160, 150, 255, .4); background: #14142e; color: #dcdaf5; padding: 4px 8px; }
.dbg button:hover { border-color: #22d3ee; }
.dbg button[aria-pressed="true"] { background: #22d3ee; border-color: #22d3ee; color: #06121a; }
.dbg-head { background: #e31e24 !important; border-color: #e31e24 !important; color: #fff !important; letter-spacing: .08em; text-transform: uppercase; }
.dbg-body { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: rgba(8, 8, 22, .94);
  border: 1px solid rgba(160, 150, 255, .4); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); max-width: min(92vw, 520px); }
.dbg-body[hidden] { display: none; }
.dbg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.dbg-t { min-width: 92px; color: #8f8db5; }
.dbg-info { color: #8f8db5; font-weight: 400; }
@media print { .dbg { display: none; } }

/* Live monitor of the debug menu: log window with the page views of the last 24 hours (site.js) */
.vmon { position: fixed; left: 12px; bottom: 56px; z-index: 96; display: flex; flex-direction: column;
  /* as wide as its lines and as high as its list, at most the whole screen (client 2026-12-02) */
  width: max-content; min-width: min(560px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 68px);
  border-radius: 10px; background: rgba(6, 6, 18, .97); border: 1px solid rgba(160, 150, 255, .4); box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  color: #dcdaf5; font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; }
.vmon[hidden] { display: none; }
.vmon-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 10px; border-bottom: 1px solid rgba(160, 150, 255, .25); }
.vmon-top b { color: #fff; letter-spacing: .06em; text-transform: uppercase; }
.vmon-sum { flex: 1 1 260px; color: #8f8db5; }
.vmon-top button { font: inherit; cursor: pointer; border-radius: 7px; border: 1px solid rgba(160, 150, 255, .4); background: #14142e; color: #dcdaf5; padding: 3px 8px; }
.vmon-top button:hover { border-color: #22d3ee; }
.vmon-list { overflow: auto; padding: 0 10px 8px; }
.vmon table { width: 100%; border-collapse: collapse; }
.vmon th { position: sticky; top: 0; background: #06060f; color: #8f8db5; font-weight: 400; text-align: left; padding: 6px 12px 4px 0; white-space: nowrap; }
.vmon td { padding: 2px 12px 2px 0; vertical-align: top; white-space: nowrap; border-top: 1px solid rgba(160, 150, 255, .1); }
.vmon td:nth-child(3), .vmon td:nth-child(4) { white-space: normal; word-break: break-all; }
.vmon td:nth-child(4) { color: #fff; }
.vmon-net { display: block; color: #22d3ee; }
.vmon-on td:last-child { color: #4ade80; }
.vmon-me td { opacity: .55; }
@media print { .vmon { display: none; } }

/* ---------- Christmas (html.xmas, 1 Dec - 6 Jan): night sky, C64 snow, Santa of the SX Christmas demo 1989 ---------- */
.xmas-layer, .xmas-sky { display: none; }
:root.xmas { --px: 3; --town: 2; --flake: #fff; }
:root.xmas:not([data-theme="light"]) {
  --bg: #000; --bg-2: #0b0b16; --bg-3: #131322; --surface: rgba(14, 14, 28, .78);
  --text: #ecebff; --text-2: #c4c2e6; --muted: #9593ba;
  --line: rgba(160, 150, 255, .16); --line-strong: rgba(160, 150, 255, .28);
  --accent: #a78bfa; --accent-2: #22d3ee; --accent-text: #b9a3ff; --glow: rgba(139, 92, 246, .28);
  --code-bg: #0c0c1c; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 80px rgba(0, 0, 0, .55); color-scheme: dark;
}
:root.xmas[data-theme="light"] { --flake: #a9b2d6; }
.xmas .xmas-layer { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.xmas .xmas-sky { display: block; position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }   /* the sleigh flies in front of everything */
.xmas main, .xmas .site-footer { position: relative; z-index: 1; }
.xmas main { padding-bottom: calc(56px * var(--town)); }
.xmas .site-footer { background: color-mix(in srgb, var(--bg) 82%, transparent); }
/* text stays readable where it passes over the houses or the sleigh */
.xmas:not([data-theme="light"]) main :is(p, li, h1, h2, h3, h4, td, th, figcaption, summary, dt, dd, .eyebrow) { text-shadow: 0 0 2px #000, 0 0 6px #000, 0 0 12px #000; }
.xmas-snow { position: absolute; inset: 0; width: 100%; height: 100%; }
.xmas-town { position: absolute; left: 0; right: 0; bottom: 0; height: calc(72px * var(--town)); opacity: .72;
  background: url(../img/xmas/xmas-houses.png) repeat-x left bottom / auto 100%; image-rendering: pixelated; }
.xmas-fly { position: absolute; left: 0; top: 18vh; width: calc(58px * var(--px)); height: calc(22px * var(--px));
  animation: xmas-fly 17s linear infinite; will-change: transform; }
.xmas-bob { width: 100%; height: 100%; animation: xmas-bob 1.6s steps(6) infinite alternate; }
.xmas-team { width: 100%; height: 100%; image-rendering: pixelated;
  background: url(../img/xmas/xmas-sleigh.png) no-repeat 0 0 / calc(348px * var(--px)) calc(44px * var(--px));
  animation: xmas-gallop .48s steps(6) infinite, xmas-dir 17s steps(1) infinite; }
@keyframes xmas-fly {
  0% { transform: translate(calc(-60px * var(--px)), 0); }
  47% { transform: translate(100vw, 6vh); }
  50% { transform: translate(100vw, 30vh); }
  97% { transform: translate(calc(-60px * var(--px)), 26vh); }
  100% { transform: translate(calc(-60px * var(--px)), 0); }
}
@keyframes xmas-gallop { from { background-position-x: 0; } to { background-position-x: calc(-348px * var(--px)); } }
@keyframes xmas-dir { 0% { background-position-y: 0; } 50% { background-position-y: calc(-22px * var(--px)); } }
@keyframes xmas-bob { from { transform: translateY(calc(-3px * var(--px))); } to { transform: translateY(calc(3px * var(--px))); } }
.xmas-seg { display: none; }
.xmas .xmas-seg { display: flex; }
.xmas .xmas-seg :is(.xmas-music, .xmas-toggle) { display: flex; width: 34px; padding: 0; }
.xmas-seg svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.seg .xmas-music[aria-pressed="true"] { color: #fff; background: #d23026; }
.seg .xmas-toggle[aria-pressed="false"] { opacity: .6; }
/* music could not start by itself (browser blocks sound without a click): the note button flashes */
.seg .xmas-music.nudge { color: #fff; animation: xmas-nudge .9s steps(1) infinite; }
@keyframes xmas-nudge { 0% { background: #d23026; box-shadow: 0 0 0 0 rgba(255, 221, 0, .0); } 50% { background: #e8b400; box-shadow: 0 0 14px 4px rgba(255, 221, 0, .75); } }
@media (prefers-reduced-motion: reduce) { .seg .xmas-music.nudge { animation: none; background: #d23026; box-shadow: 0 0 0 3px #ffdd00; } }
:root.xmas-off :is(.xmas-layer, .xmas-sky, .xmas-ice) { display: none; }
/* main page: snow cap with icicles on the news flash box, drawn by site.js to fit width and round corners */
.xmas-ice { position: absolute; z-index: 3; pointer-events: none; overflow: visible; max-width: none; height: auto; display: block; filter: drop-shadow(0 3px 3px rgba(0, 0, 20, .35)); }
.xmas[data-page="start"] .newsflash { overflow: visible; }
.xmas[data-page="start"] .newsflash::before { display: none; }
.xmas[data-page="start"] .newsflash::after { clip-path: inset(-60px 0 0 0 round 0 0 24px 24px); }
@media print { .xmas-layer, .xmas-sky, .xmas-seg, .xmas-ice { display: none !important; } }
