/* ==========================================================================
   jokaylab – Styles
   Schriften: Bricolage Grotesque (OFL), Fragment Mono (OFL) – lokal gehostet
   ========================================================================== */

@font-face {
  font-family: 'Bricolage';
  src: url('fonts/bricolage-grotesque.woff2') format('woff2-variations'), url('fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage';
  src: url('fonts/bricolage-grotesque-ext.woff2') format('woff2-variations'), url('fonts/bricolage-grotesque-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fragment Mono';
  src: url('fonts/fragment-mono.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font: 'Bricolage', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --wrap: 1200px;
  --pad: clamp(18px, 4vw, 40px);
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  box-sizing: border-box;
}

:root[data-theme="dark"] {
  --bg: #131a3a;
  --bg-deep: #0f1532;
  --surface: #1a2250;
  --surface-2: #222c62;
  --line: #2e3a7a;
  --line-soft: rgba(154, 168, 255, .14);
  --text: #eef0ff;
  --muted: #a8b0de;
  --faint: #7a85bd;
  --brand: #9aa8ff;
  --ok: #6ee7b7;
  --warn: #ffc857;
  --down: #ff7e6b;
  --idle: #7a85bd;
  --on-acc: #10163a;
  --dot: rgba(154, 168, 255, .17);
  --shadow: 0 30px 70px -30px rgba(3, 6, 25, .75);
  --topbar-bg: rgba(19, 26, 58, .74);
  --scrim: rgba(7, 10, 30, .6);
}

:root[data-theme="light"] {
  --bg: #eef1fb;
  --bg-deep: #e4e8f7;
  --surface: #ffffff;
  --surface-2: #f3f5fd;
  --line: #d2d8ef;
  --line-soft: rgba(40, 56, 140, .11);
  --text: #141a3d;
  --muted: #4f5989;
  --faint: #7b84ae;
  --brand: #3f51d4;
  --ok: #138a58;
  --warn: #a4680b;
  --down: #c93a26;
  --idle: #8a92b8;
  --on-acc: #ffffff;
  --dot: rgba(40, 56, 140, .14);
  --shadow: 0 26px 60px -30px rgba(20, 30, 80, .35);
  --topbar-bg: rgba(238, 241, 251, .8);
  --scrim: rgba(20, 26, 61, .35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 16px + env(safe-area-inset-top, 0px));
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-variation-settings: 'opsz' 14;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

main { flex: 1 0 auto; outline: none; }

img, svg, canvas { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-variation-settings: 'opsz' 60; letter-spacing: -.02em; line-height: 1.15; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-logo { fill: currentColor; stroke: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: var(--on-acc);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Akzentfarben: Standard = Marke, Bereiche setzen --acc über .acc-<id> (app.js) */
body { --acc: var(--brand); }

/* Status-Farben */
[data-state="up"] { --st: var(--ok); }
[data-state="down"] { --st: var(--down); }
[data-state="warn"], [data-state="maint"] { --st: var(--warn); }
[data-state="checking"], [data-state="idle"], [data-state="unknown"], [data-state="external"] { --st: var(--idle); }
[data-state="soon"] { --st: var(--brand); }
[data-state="idea"] { --st: var(--faint); }

/* ---------- Hintergrund ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 72% 0%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 70% at 72% 0%, #000 20%, transparent 72%);
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  transition: opacity .5s var(--ease), visibility .5s;
  animation: preloader-failsafe 0s 5s forwards;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader-name { color: var(--muted); font-weight: 600; font-size: 15px; letter-spacing: .01em; }
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line-soft); }

.topbar-inner {
  position: relative;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  font-variation-settings: 'opsz' 36;
  white-space: nowrap;
}
.brand .ic-logo { width: 30px; height: 30px; color: var(--ok); }
.brand-sub { color: var(--faint); font-weight: 500; }
.brand-sub::before { content: '/'; margin: 0 8px 0 2px; color: var(--line); }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, background-color .15s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--text); background: var(--surface); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ok);
  margin-left: 2px;
}
.nav-link .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.nav-link[aria-expanded="true"] .ic { transform: rotate(180deg); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 8px 0 12px;
  min-width: 220px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--faint);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.search-btn:hover { border-color: var(--line); color: var(--muted); }
.search-btn .ic { width: 18px; height: 18px; }
.search-btn kbd { margin-left: auto; }

kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font: 12px/1 var(--mono);
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--muted);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line); background: var(--surface); }
.icon-btn .ic { width: 19px; height: 19px; }
.menu-btn { display: none; }

/* Theme-Toggle zeigt jeweils das Ziel-Icon */
:root[data-theme="dark"] .theme-btn .i-moon,
:root[data-theme="light"] .theme-btn .i-sun { display: none; }

/* ---------- Mega-Menü ---------- */
.mega {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  width: min(940px, calc(100vw - 2 * var(--pad)));
  transform: translateX(-50%);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: pop-in .18s var(--ease);
}
.mega[hidden] { display: none; }
.mega-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mega-col { padding: 8px; border-radius: var(--r-lg); }
.mega-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background-color .15s;
}
.mega-head:hover { background: var(--surface-2); }
.mega-head strong { display: block; font-size: 16px; font-weight: 650; }
.mega-desc { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.mega-links { list-style: none; margin: 6px 0 0; padding: 0; }
.mega-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background-color .15s;
}
.mega-link:hover { background: var(--surface-2); }
.mega-link .ic { width: 17px; height: 17px; color: var(--acc); }
.mega-link .dot { margin-left: auto; }
.mega-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding: 12px 18px 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
}
.mega-foot button {
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Mobile Drawer ---------- */
.drawer {
  position: fixed;
  inset: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)) 0 0 0;
  z-index: 45;
  overflow-y: auto;
  background: var(--bg);
  padding: 12px var(--pad) calc(32px + env(safe-area-inset-bottom, 0px));
  animation: drawer-in .22s var(--ease);
}
.drawer[hidden] { display: none; }
.drawer-section { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.drawer-section:last-child { border-bottom: 0; }
.drawer-title { font-size: 14px; color: var(--faint); margin: 0 0 6px 4px; }
.drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 18px;
  font-weight: 550;
}
.drawer a .ic { color: var(--acc); }
.drawer a .dot { margin-left: auto; }
.drawer-sub a { font-size: 16px; font-weight: 500; padding-left: 38px; color: var(--muted); }
body.drawer-open { overflow: hidden; }
@keyframes drawer-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Grundbausteine ---------- */
.block { margin-top: clamp(56px, 8vw, 96px); }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sec-head h2 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 650; }
.sec-head p { color: var(--muted); font-size: 15px; }

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: clamp(18px, 2.4vw, 26px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .15s var(--ease);
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 28%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn-acc { background: var(--acc); border-color: transparent; color: var(--on-acc); }
.btn-acc:hover { border-color: transparent; background: color-mix(in srgb, var(--acc) 88%, var(--text)); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.squircle {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--acc) 15%, transparent);
  color: var(--acc);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 30%, transparent);
}
.squircle img { width: 60%; height: 60%; object-fit: contain; }
.squircle .ic { width: 22px; height: 22px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.chip .ic { width: 14px; height: 14px; }

.mono { font-family: var(--mono); font-size: .88em; letter-spacing: 0; }

/* Status */
.dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--st, var(--idle));
}
.dot[data-state="idle"], .dot[data-state="external"], .dot[data-state="unknown"] {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--st);
}
.dot[data-state="down"]::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--down);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--st) 14%, transparent);
  color: color-mix(in srgb, var(--st) 70%, var(--text));
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
}
.pill jk-orb { margin: 0 -2px; }

.latency { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; white-space: nowrap; }

.spark { display: block; width: 72px; height: 22px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--acc); }

.bars { display: flex; align-items: stretch; gap: 3px; height: 26px; }
.bar { flex: 1 1 0; min-width: 3px; max-width: 8px; border-radius: 3px; background: var(--st, var(--line-soft)); }
.bar:not([data-state]) { background: var(--line-soft); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 7vw, 92px) clamp(8px, 2vw, 24px);
}

.hero-greet { color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); }

.hero-title {
  margin: 14px 0 20px;
  font-size: clamp(46px, 7.2vw, 92px);
  line-height: .98;
  font-weight: 720;
  letter-spacing: -.045em;
  font-variation-settings: 'opsz' 96;
  text-wrap: balance;
}

.hero-sub {
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  text-wrap: pretty;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 470px);
  height: 56px;
  margin-top: 32px;
  padding: 0 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--faint);
  font-size: 17px;
  text-align: left;
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.hero-search:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.hero-search kbd { margin-left: auto; }

.hero-note { margin-top: 14px; font-size: 14px; color: var(--faint); max-width: 52ch; }
.hero-note[hidden] { display: none; }

.hero-orb {
  position: relative;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero-orb::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118%;
  aspect-ratio: 1;
  transform: translate(-50%, -62%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--orb, var(--brand)) 20%, transparent) 0%, transparent 62%);
  transition: background .8s;
  pointer-events: none;
}
.hero-orb jk-orb { position: relative; width: clamp(220px, 28vw, 340px) !important; height: clamp(220px, 28vw, 340px) !important; }
.hero-clock { position: relative; text-align: center; }
.hero-time {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'opsz' 48;
}
.hero-date { display: block; color: var(--muted); font-size: 15px; }

/* Einmalige Einblendung nach dem Laden */
[data-reveal] { opacity: 0; transform: translateY(10px); }
body.is-ready [data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* ---------- Schnellstart (Dock) ---------- */
.dock {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 6px;
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 6px 12px;
  border-radius: var(--r-lg);
  text-decoration: none;
  text-align: center;
  transition: background-color .15s;
}
.dock-item:hover { background: var(--surface); }
.dock-item .squircle {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  transition: transform .22s var(--ease);
}
.dock-item .squircle .ic { width: 26px; height: 26px; }
.dock-item:hover .squircle { transform: translateY(-3px); }
.dock-item .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border: 2.5px solid var(--bg);
}
.dock-item .dot[data-state="idle"], .dock-item .dot[data-state="external"], .dock-item .dot[data-state="unknown"], .dock-item .dot[data-state="checking"] { display: none; }
.dock-name { font-size: 14px; font-weight: 550; line-height: 1.25; }
.dock-group { font-size: 12.5px; color: var(--faint); line-height: 1.2; margin-top: -6px; }

/* ---------- Bereiche ---------- */
.areas {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.area { grid-column: span 6; display: flex; flex-direction: column; }
.area--feature {
  grid-column: 1 / -1;
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 60%),
    var(--surface);
}
.area--side { grid-column: span 6; }
@media (min-width: 881px) {
  .area--feature .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .area--feature .rows li:nth-child(-n+2) { border-top: 0; }
  .area--feature .rows[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .area--feature .rows[data-count="3"] li:nth-child(3) { border-top: 0; }
  .area--feature .row { align-items: start; }
  .area--feature .row .row-meta { padding-top: 10px; }
  .area--feature .row-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

.area-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: -8px -8px 10px;
  padding: 8px;
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: background-color .15s;
}
.area-head:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.area-head h3 { font-size: 22px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.area-head p { color: var(--muted); font-size: 15px; margin-top: 3px; }
.area-head > .ic { margin-left: auto; margin-top: 12px; color: var(--faint); transition: transform .2s var(--ease), color .15s; }
.area-head:hover > .ic { transform: translateX(3px); color: var(--text); }
.area--feature .area-head h3 { font-size: 28px; }

.area-foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-inline: -10px;
  padding: 11px 10px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background-color .15s;
}
.row:hover { background: var(--surface-2); }
.row .squircle { width: 40px; height: 40px; border-radius: 12px; }
.row .squircle .ic { width: 20px; height: 20px; }
.row-name { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.row-desc { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; align-items: center; gap: 12px; }
.row-host { color: var(--faint); font-size: 13px; }
.row .latency { min-width: 48px; text-align: right; font-size: 13.5px; }
.rows li + li { border-top: 1px solid var(--line-soft); }

/* ---------- Duo: Games + Status ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.duo .panel { display: flex; flex-direction: column; gap: 18px; }
.duo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.duo-head h2 { font-size: 26px; font-weight: 650; }
.duo-head p { color: var(--muted); font-size: 15px; margin-top: 4px; max-width: 40ch; }
.duo-foot { margin-top: auto; }

.mini-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mini-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.mini-game .squircle { width: 36px; height: 36px; border-radius: 11px; }
.mini-game .squircle .ic { width: 18px; height: 18px; }
.mini-game strong { font-weight: 600; }
.mini-game .pill { margin-left: auto; }

.status-strip { display: grid; gap: 10px; }
.status-strip .bars { height: 54px; gap: 5px; }
.status-strip .bar { max-width: none; border-radius: 6px; }
.status-strip-legend { display: flex; justify-content: space-between; color: var(--faint); font-size: 13px; }

/* ---------- Unterseiten ---------- */
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 40px;
  padding-block: clamp(32px, 6vw, 72px) clamp(24px, 3vw, 36px);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--faint);
  font-size: 14px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .ic { width: 14px; height: 14px; }
.page-title {
  font-size: clamp(42px, 6.4vw, 80px);
  line-height: 1;
  font-weight: 720;
  letter-spacing: -.04em;
  font-variation-settings: 'opsz' 96;
  color: var(--acc);
}
.page-lead { margin-top: 16px; max-width: 52ch; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); text-wrap: pretty; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.page-orb { position: relative; }
.page-orb::before {
  content: '';
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 22%, transparent), transparent 65%);
  pointer-events: none;
}
.page-orb jk-orb { position: relative; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.tiles[data-count="4"], .tiles[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile { display: flex; flex-direction: column; gap: 16px; min-height: 250px; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tile .squircle { width: 62px; height: 62px; border-radius: 19px; }
.tile .squircle .ic { width: 28px; height: 28px; }
.tile h3 { font-size: 26px; font-weight: 650; }
.tile-desc { color: var(--muted); margin-top: 6px; font-size: 16px; max-width: 42ch; }
.tile-host { display: inline-block; margin-top: 10px; color: var(--faint); font-size: 14px; }
.tile-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.tile-metrics { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.tile-actions { display: flex; align-items: center; gap: 8px; }

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--acc) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent);
  color: var(--muted);
  font-size: 15px;
}
.note .ic { color: var(--acc); margin-top: 2px; }
.note strong { color: var(--text); }
.note--warn { --acc: var(--warn); }

/* ---------- Games ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.game { display: flex; flex-direction: column; gap: 18px; }
.game--idea { background: transparent; border-style: dashed; border-color: var(--line); }
.game-top { display: flex; gap: 16px; align-items: center; }
.game-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 24px;
  background: color-mix(in srgb, var(--acc) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 24%, transparent);
  color: var(--acc);
}
.game-visual jk-orb { position: absolute; inset: 10px; width: 64px !important; height: 64px !important; opacity: .55; }
.game-visual .ic { position: relative; width: 30px; height: 30px; }
.game h3 { font-size: 26px; font-weight: 650; }
.game-sub { color: var(--faint); font-size: 14px; }
.game-desc { color: var(--muted); }
.game-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.game-addr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.game-addr .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.game-addr .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
.game-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.game-players { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Status-Seite ---------- */
.status-table { display: grid; }
.status-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(0, 2fr) 70px 130px;
  align-items: center;
  gap: 18px;
  padding: 14px 4px;
  border-top: 1px solid var(--line-soft);
}
.status-row:first-child { border-top: 0; }
.status-row--head { color: var(--faint); font-size: 13.5px; padding-block: 0 10px; }
.status-name { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.status-name .squircle { width: 34px; height: 34px; border-radius: 10px; }
.status-name .squircle .ic { width: 17px; height: 17px; }
.status-name strong { display: block; font-weight: 600; line-height: 1.25; }
.status-name small { display: block; color: var(--faint); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-name > span { min-width: 0; }
.status-row .latency { text-align: right; }
.status-row .pill { justify-self: end; }
.status-group-title { font-size: 15px; color: var(--muted); font-weight: 600; margin: 26px 0 6px; }
.status-group-title:first-child { margin-top: 0; }

.kuma-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.kuma-card h2 { font-size: 24px; font-weight: 650; }
.kuma-card p { color: var(--muted); margin-top: 6px; max-width: 58ch; }

.stack { display: grid; gap: 20px; }

/* ---------- Rechtliches ---------- */
.prose { max-width: 70ch; padding-block: clamp(32px, 6vw, 72px) 0; }
.prose h1 { font-size: clamp(38px, 5vw, 56px); font-weight: 720; letter-spacing: -.035em; font-variation-settings: 'opsz' 96; margin-bottom: 10px; }
.prose .lead { color: var(--muted); font-size: 18px; }
.prose h2 { font-size: 22px; font-weight: 650; margin: 40px 0 10px; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; margin: 10px 0; }
.prose a { color: var(--brand); text-underline-offset: 3px; }
.prose address { font-style: normal; font-size: 17px; line-height: 1.65; }
.prose .meta { margin-top: 48px; color: var(--faint); font-size: 14px; }
mark.todo {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--text);
  border-radius: 5px;
  padding: 0 5px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 55%, transparent);
}

/* ---------- 404 ---------- */
.empty { display: grid; justify-items: start; gap: 18px; padding-block: clamp(48px, 10vw, 120px) 0; max-width: 56ch; }
.empty h1 { font-size: clamp(38px, 5vw, 60px); font-weight: 720; letter-spacing: -.035em; }
.empty p { color: var(--muted); font-size: 18px; }

/* ---------- Befehlspalette ---------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: max(10vh, calc(env(safe-area-inset-top, 0px) + 16px)) 16px 16px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in .15s ease;
}
.palette[hidden] { display: none; }
.pal-box {
  width: min(640px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise-in .2s var(--ease);
}
.pal-input-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 62px; border-bottom: 1px solid var(--line-soft); color: var(--faint); }
.pal-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 18px var(--font);
}
.pal-input::placeholder { color: var(--faint); }
.pal-list { overflow-y: auto; padding: 6px 8px 10px; max-height: min(58vh, 480px); overscroll-behavior: contain; }
.pal-label { padding: 12px 10px 6px; font-size: 13px; color: var(--faint); font-weight: 500; }
.pal-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.pal-item[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft); }
.pal-item .squircle { width: 36px; height: 36px; border-radius: 11px; }
.pal-item .squircle .ic { width: 18px; height: 18px; }
.pal-item strong { display: block; font-weight: 600; line-height: 1.3; }
.pal-item small { display: block; color: var(--faint); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item-hint { color: var(--faint); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.pal-item-hint .ic { width: 16px; height: 16px; }
.pal-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 13px; }
.pal-foot span { display: inline-flex; align-items: center; gap: 6px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { width: 18px; height: 18px; color: var(--ok); }
:root[data-theme="dark"] .toast .ic { color: #138a58; }

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-deep);
  padding-block: 48px 28px;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-about p { color: var(--muted); font-size: 15px; margin-top: 12px; max-width: 34ch; }
.footer-col h3 { font-size: 14px; font-weight: 600; color: var(--faint); margin-bottom: 10px; letter-spacing: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 14px;
}
.footer-status { display: inline-flex; align-items: center; gap: 8px; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.noscript { max-width: 640px; margin: 80px auto; padding: 0 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .search-btn { min-width: 0; }
  .search-btn .label, .search-btn kbd { display: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
  .row-host { display: none; }
}

@media (max-width: 880px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .hero { grid-template-columns: 1fr; }
  .hero-orb { grid-row: 1; flex-direction: row; justify-self: start; gap: 20px; }
  .hero-orb jk-orb { width: 132px !important; height: 132px !important; }
  .hero-orb::before { width: 180px; transform: translate(-50%, -50%); left: 66px; }
  .hero-clock { text-align: left; }
  .hero-title { margin-top: 10px; }
  .area--side { grid-column: span 12; }
  .duo { grid-template-columns: 1fr; }
  .page-head { grid-template-columns: 1fr; }
  .page-orb { display: none; }
  .tiles[data-count="4"], .tiles[data-count="2"] { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
  .status-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; }
  .status-row .bars { grid-column: 1 / -1; grid-row: 2; }
  .status-row .latency { display: none; }
  .status-row--head { display: none; }
  .kuma-card { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand-sub { display: none; }
  .dock { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .dock-item { padding-inline: 2px; }
  .dock-item .squircle { width: 52px; height: 52px; border-radius: 16px; }
  .dock-group { display: none; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; }
  .row .latency { display: none; }
  .tile-foot { gap: 12px; }
  .tile-actions { width: 100%; }
  .tile-actions .btn { flex: 1; }
  .footer-legal { gap: 16px; }
  .hero-search kbd { display: none; }
}

@media (hover: none) {
  .hero-search kbd, .search-btn kbd, .pal-foot, .mega-foot kbd, .kbd-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
