/* BD/IT Buddy Team-Website: gemeinsame Gestaltung für index.html und stats.html.
   Systemschrift, viel Weißraum, hell und dunkel automatisch, Family Blue (#003ACC) nur als Akzent.
   Alles Bewegte läuft über transform/opacity und ist mit „weniger Bewegung" abgeschaltet. */
:root {
  color-scheme: light dark;
  --bg: #f5f5f7; --surface: #ffffff; --card: #ffffff; --inset: #f5f5f7;
  --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .15); --hover: rgba(0, 0, 0, .04);
  --text: #1d1d1f; --text-2: #3a3a3c; --muted: #6e6e73;
  --accent: #003acc; --accent-text: #003acc; --accent-soft: rgba(0, 58, 204, .08); --on-accent: #ffffff;
  --track: rgba(0, 0, 0, .08); --ok: #157538; --ok-soft: rgba(21, 117, 56, .1); /* green text ≥ 4.5:1 also on its soft chip */ --on-ok: #ffffff; --bad: #b3261e;
  --talk: #7a2fb0; --talk-soft: rgba(175, 82, 222, .12); /* Lil Dev speaks: purple like his rings in the app */
  --shadow: 0 1px 1px rgba(0, 0, 0, .03), 0 14px 40px -18px rgba(0, 58, 204, .14);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .04), 0 28px 60px -28px rgba(0, 58, 204, .22);
  --nav: rgba(245, 245, 247, .74); --glow: rgba(0, 58, 204, .13); --spot: transparent; /* the light that follows the mouse: dark mode only (blue over white can only darken, it read as a smudge) */
  --gold: #7f6428; /* Level 1000: the gold name, one flat tone, ≥ 4.8:1 also on the blue ladder row */
  --r: 22px; --r-sm: 14px;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d; --surface: #151518; --card: #151518; --inset: #1c1c20;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .22); --hover: rgba(255, 255, 255, .06);
    --text: #f5f5f7; --text-2: #d1d1d6; --muted: #a1a1a6;
    --accent: #3d6cf0; --accent-text: #7a9cff; --accent-soft: rgba(90, 130, 255, .15); --on-accent: #ffffff;
    --track: rgba(255, 255, 255, .11); --ok: #4cd964; --ok-soft: rgba(76, 217, 100, .14); --on-ok: #0b0b0d; --bad: #ff6b6b;
    --talk: #d79bff; --talk-soft: rgba(191, 90, 242, .18);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 20px 50px -24px rgba(0, 0, 0, .7);
    --shadow-lg: inset 0 1px 0 rgba(255, 255, 255, .05), 0 32px 70px -30px rgba(0, 0, 0, .85);
    --nav: rgba(11, 11, 13, .7); --glow: rgba(61, 108, 240, .24); --spot: rgba(122, 156, 255, .14);
    --gold: #d9b65a;
  }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(0, 0, 0, .3); --line-2: rgba(0, 0, 0, .5); --muted: #515154; }
  @media (prefers-color-scheme: dark) { :root { --line: rgba(255, 255, 255, .35); --line-2: rgba(255, 255, 255, .6); --muted: #c7c7cc; } }
}

/* Grundlagen */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; } /* Anker und Tab-Fokus landen unter der Leiste */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; } /* links inside running text: not by colour alone (WCAG 1.4.1) */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.8rem + 3.6vw, 4.5rem); letter-spacing: -.025em; line-height: 1.02; }
h2 { font-size: clamp(1.8rem, 1.35rem + 1.9vw, 2.75rem); letter-spacing: -.022em; line-height: 1.06; }
h3 { font-size: 1.3rem; letter-spacing: -.015em; }
p { margin: 0; text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: max(clamp(16px, 4vw, 48px), calc((100vw - 1120px) / 2)); top: -48px; z-index: 20; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.skip:focus-visible { top: 12px; }
a, button, .chart, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wrap { --gut: clamp(16px, 4vw, 48px); max-width: calc(1120px + 2 * var(--gut)); margin-inline: auto; padding-inline: max(var(--gut), env(safe-area-inset-left)) max(var(--gut), env(safe-area-inset-right)); } /* der Rand wächst mit: 16 px am Handy, 41 bei 1024, ab 1216 bleibt der Inhalt bei 1120 px */
.sub { margin-top: 14px; font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); color: var(--muted); max-width: 56ch; }

/* Navigation: schmale Glasleiste, bleibt oben */
.nav { position: sticky; top: 0; z-index: 10; }
/* The glass sits on ::before, not on .nav itself: a blurring parent would cut its children off from the page behind, and the soft edge below needs that page.
   ::after is that edge: what scrolls up blurs a little before it slides under the bar (progressive blur, one layer, 14 px). */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--nav); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.nav::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 1px); height: 14px; pointer-events: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; flex-wrap: wrap; gap: 0 12px; }
.brand { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; opacity: .72; }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand-name { white-space: nowrap; }
@media (max-width: 460px) { .brand-name { display: none; } } /* phones up to 430 pt (Plus/Pro Max): the logo alone, else the bar wraps to two rows and hides jump targets; the name is the big headline right below */
.nav ul { flex-wrap: wrap; list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav li a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 13px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .25s var(--ease-out), background .25s var(--ease-out);
}
.nav li a:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.nav li a[aria-current="page"] { color: var(--text); background: var(--hover); }

/* Knöpfe, Chips, Tasten */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); white-space: nowrap;
  transition: transform .16s var(--ease-out), background .25s var(--ease-out), filter .25s var(--ease-out);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn[aria-disabled="true"] { opacity: .6; cursor: progress; transform: none; }
.btn.done { background: var(--ok); color: var(--on-ok); }
.btn.ghost { background: var(--hover); color: var(--text); }
.btn.ghost:hover { filter: none; background: var(--line); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--inset); font-size: 13.5px; font-weight: 500; white-space: nowrap; line-height: 1.3; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.chip.wait { background: var(--accent); color: var(--on-accent); }
.chip.wait i { background: var(--on-accent); }
.chip.done { background: var(--ok-soft); color: var(--ok); }
.chip.listen { background: var(--accent-soft); color: var(--accent-text); }
.chip.listen i { background: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip.speak { background: var(--talk-soft); color: var(--talk); }
.chip.speak i { background: var(--talk); box-shadow: 0 0 0 3px var(--talk-soft); }
kbd { display: inline-block; min-width: 28px; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.3; text-align: center; color: var(--text); }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }

/* Held: Text links, Lil Dev rechts mit sanftem Schweben */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 5vw, 72px); }
.hero-copy { max-width: 600px; }
.hero h1 { margin-top: 18px; }
.lead { margin-top: 20px; font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); line-height: 1.4; color: var(--text-2); max-width: 40ch; }
.quick-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 24px; }
.quick-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0; font-size: 15px; font-weight: 600; }
.quick-links a:hover { color: var(--text); }
.install { margin-top: 24px; padding: 22px 24px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.install h2 { font-size: 1.18rem; line-height: 1.3; letter-spacing: -.015em; }
.install-platform { margin-top: 6px; font-size: 13px; color: var(--muted); }
.install-help { border-top: 1px solid var(--line); margin-top: 8px; }
.install-help summary { padding: 12px 0; min-height: 44px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.install-help summary:hover { color: var(--accent-text); }
.install-help[open] { padding-bottom: 14px; }
.install-help .hint { margin-top: 0; }
.install-help .hint + .hint { margin-top: 10px; }
.cmd {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.cmd code { flex: 1; min-width: 0; padding: 6px 0; font-size: 13.5px; line-height: 1.5; color: var(--text); overflow-wrap: normal; word-break: normal; } /* wraps only at spaces and the <wbr> points of the URL, never inside a word */
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 1.02rem; line-height: 1.4; }
.steps .n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
details.git { margin-top: 18px; }
details.git summary { cursor: pointer; width: fit-content; font-size: 14px; font-weight: 600; color: var(--text-2); border-radius: 8px; padding: 4px 2px; }
details.git summary:hover { color: var(--text); }
details.git[open] summary { margin-bottom: 12px; }
.cmd code::before { content: "$ "; color: var(--muted); }
.nw { white-space: nowrap; } /* the host name never breaks at its hyphens ("lil-" / "dev-pet-api") */
.hint { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 60ch; }
.hint code { font-size: .9em; }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 320px; }
.hero-art::before { content: ""; position: absolute; inset: 0; margin: auto; width: 110%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent 72%); pointer-events: none; }
.hero-art .ground { position: absolute; bottom: 4%; left: 50%; width: 56%; height: 22px; margin-left: -28%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .22), transparent); filter: blur(6px); animation: ground 5s ease-in-out 1; }
.hero-art picture { display: contents; } /* the image itself is the flex child: centred over its ground shadow at every width */
.hero-art img { position: relative; width: min(100%, 400px); height: auto; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .18)); animation: float 5s ease-in-out 1; /* ein Zyklus, höchstens 5 s: längere Bewegung bräuchte einen Pause-Knopf (WCAG 2.2.2) */ }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes ground { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.86); opacity: .7; } }
.rise { animation: rise .9s var(--ease-out) both; animation-delay: var(--d, 0s); }
.d1 { --d: .05s; } .d2 { --d: .1s; } .d3 { --d: .14s; } .d4 { --d: .18s; } /* staggered start as classes: the CSP allows no inline style attributes */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Abschnitte */
.section { padding: clamp(48px, 7vw, 104px) 0; }
.section + .section { padding-top: 0; }
.sec-head { margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head.row .status { margin-top: 10px; }
@media (min-width: 1000px) { .sec-head.row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; } .sec-head.row .status { margin-top: 0; text-align: right; } } /* the status keeps its column: as a wrapping flex item, the longer text after loading jumped below the title and pushed the tiles down (CLS 0.64 at 1024 px) */
.status { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status.err { color: var(--bad); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* Was er für dein Team tut: zwei große Blöcke, darunter vier kleinere als 2 × 2 (bei drei Spalten stand der vierte allein) */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cell { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 30px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.cell.main { grid-column: 1 / -1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(30px, 4vw, 48px); background: linear-gradient(135deg, var(--accent-soft), transparent 55%), var(--card); }
.cell.main h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); letter-spacing: -.02em; }
.cell h3 { margin: 16px 0 8px; }
.cell p { color: var(--muted); max-width: 52ch; }
.cell .main-p { font-size: 1.1rem; color: var(--text-2); }
.cell .fill { flex: 1; }
.ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-face { display: block; width: 36px; height: 42px; object-fit: contain; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)); } /* Lil Dev himself, no tile (R7: images keep no tile); the white edge keeps the black hoodie visible in dark, like .av img */
.where { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 0; padding: 0; list-style: none; }
.more { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.45; color: var(--text-2); } /* a card's details as short bullet points (GT 18.11.: at most two sentences): dots, not pills, so they never read like the product chips; a long one wraps on a phone instead of being cut */
.more li { position: relative; padding-left: 13px; }
.more li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-text); }

/* Mock-Ansichten in den Blöcken (rein dekorativ) */
.mock { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; font-size: 14px; }
.mock .mhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--muted); }
.mock .mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; }
.mock .mrow + .mrow { border-top: 1px solid var(--line); }
.mock .mname { min-width: 0; font-weight: 500; } /* wraps on phones instead of „Ticket an HR ist fe…“ */
.mock .mname small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--muted); }
.mock .chip { flex: none; }
.notes { display: grid; gap: 8px; margin-top: auto; padding-top: 16px; }
.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; }
.note .ic { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.note .ic svg { width: 18px; height: 18px; }
.note b { display: block; font-size: 14px; }
.note span { color: var(--muted); font-size: 13px; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--inset); }
.seg span { flex: 1; padding: 6px 0; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); text-align: center; font-size: 13px; font-weight: 600; white-space: nowrap; }
.note.later { background: transparent; box-shadow: none; } .note.later b { color: var(--muted); } .note.later .ic { opacity: .6; } /* "danach" quieter, the text still ≥ 4.5:1 */
.ladder { list-style: none; margin: auto 0 0; padding: 16px 0 0; font-size: 14px; }
.ladder li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.ladder li:first-child { border-top: 0; }
.ladder li span { color: var(--muted); font-variant-numeric: tabular-nums; }
.ladder li:last-child b { color: var(--accent-text); }
.objects { display: grid; grid-template-columns: repeat(5, 44px); gap: 4px 8px; margin: auto 0 0 -8px; padding-top: 16px; font-size: 28px; line-height: 1; } /* ten objects: always 5 + 5, never 9 + 1; padding: in one column (no stretched card) auto is 0; -8px = (44 - 28) / 2, so the first emoji starts at the text edge */
.objects span { display: grid; place-items: center; width: 44px; height: 44px; transition: transform .45s var(--ease-out); }

/* So bedienst du ihn: Aktion links, Wirkung rechts */
.howto { display: grid; grid-template-columns: 1fr; margin: 0; padding: 0 clamp(20px, 3vw, 32px); }
.howto > div { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 8px 24px; align-items: start; padding: 18px 0; } /* the label sits on the first line of a long text, not in its middle */
.howto > div + div { border-top: 1px solid var(--line); }
.howto dt { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.howto dd { margin: 0; color: var(--muted); } /* running text (as a flex box, ". Unter Darstellung …" stood alone on a line) */
.groups { list-style: none; display: grid; gap: 8px; margin: 12px 0; padding: 0; }
.groups > li { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: 6px 12px; }
.gl { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tabs { list-style: none; justify-self: start; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 3px; border-radius: 16px; background: var(--inset); } /* like the sidebar in the app: one row per group, wraps on a phone */
.tabs li { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.groups > li:first-child .tabs li:first-child { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
@media (max-width: 420px) { .groups > li { grid-template-columns: 1fr; gap: 4px; } .tabs li { padding: 3px 8px; } } /* phones: the group name above its pages */

/* Rangliste */
.tbl { overflow-x: auto; border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 14px; text-align: left; vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr { transition: background .25s var(--ease-out); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.n[data-v] { display: inline-block; } /* min-width (site.js hold) needs a box; the cell keeps its own alignment */
.rank { width: 64px; padding-right: 0; }
.rb { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rb-1 { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 18px -8px var(--accent); }
.rb-2 { background: var(--text); color: var(--bg); }
@media (prefers-color-scheme: dark) { .rb-2 { background: rgba(255, 255, 255, .16); color: var(--text); } } /* dark: a white disc outshone the blue first place */
.rb-3 { box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--text); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 16px; }
.av img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)); } /* the black hoodie stays visible on the dark circle */
.av .hat { position: absolute; top: -4px; right: -5px; font-style: normal; font-size: 13px; line-height: 1; } /* clear of the row above and the name */
.id { min-width: 0; }
@media (min-width: 901px) { .board .who { max-width: clamp(150px, 100vw - 760px, 280px); } } /* lange Namen kürzen statt Tabelle zu verbreitern */
.nm { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt { display: block; font-size: 13px; color: var(--muted); }
.level { min-width: 180px; }
.lv { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; font-size: 14px; }
.lv small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bar { height: 5px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .9s var(--ease-out); }
.on { color: var(--ok); font-weight: 500; }
.on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s var(--ease-out) 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--ok-soft); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty img { width: 64px; height: auto; }
.empty p { margin: 14px auto 20px; font-size: 17px; color: var(--text); max-width: 40ch; }
.sk { display: inline-block; height: 12px; width: 60%; border-radius: 6px; background: var(--track); animation: shimmer 1.4s ease-in-out infinite; }
.sk.w { width: 90%; }
@keyframes shimmer { 50% { opacity: .4; } }
.loading { opacity: .6; transition: opacity .3s var(--ease-out); }

/* Statistik: Kacheln, Spielerkarten, Linien */
.page-title { padding-top: clamp(40px, 6vw, 72px); }
.page-title h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-top: 28px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { padding: 20px 22px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.tile .k { font-size: 13px; color: var(--muted); }
.tile .v { margin-top: 6px; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile .d { margin-top: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .d b { color: var(--ok); font-weight: 600; }
.pcard { padding: 24px 26px; }
.pcard + .pcard { margin-top: 14px; }
.phead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.phead h3.nm { font-size: inherit; line-height: inherit; letter-spacing: inherit; }
.lvpill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; margin: 22px 0 6px; } /* nine numbers: 3 + 3 + 3 */
.records { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1080px) { .records { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .records { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .records { grid-template-columns: 1fr; } }
.records > .empty { grid-column: 1 / -1; } /* „Noch keine Rekorde“ or the error text spans the whole row, not one of four columns */
.rec { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; min-width: 0; } .rec .emo { font-size: 28px; line-height: 1; margin-top: 2px; } .rec .emo.sk { flex: none; width: 28px; height: 28px; border-radius: 50%; } /* loading: a round placeholder in the emoji's slot, so the text does not jump when the data arrives */ .rec > div { flex: 1; min-width: 0; }
.rec .k { font-size: 12.5px; color: var(--muted); } .rec b { display: block; margin-top: 3px; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rec small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fact b { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fact > span { font-size: 12.5px; color: var(--muted); }
.chart-title { margin: 20px 0 8px; font-size: 13px; color: var(--muted); }
.chart { position: relative; border-radius: var(--r-sm); outline-offset: 6px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid line { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart text.end { fill: var(--text); font-weight: 600; font-size: 12px; }
.chart .area { fill: var(--accent); opacity: .1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .pt { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chart .cur { stroke: var(--line-2); opacity: 0; transition: opacity .2s; }
.chart .cur-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; opacity: 0; transition: opacity .2s; }
.chart.anim .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s var(--ease-out) .1s forwards; }
.chart.anim .area, .chart.anim .pt, .chart.anim .end { opacity: 0; animation: fade .6s var(--ease-out) .8s forwards; }
.chart.anim .area { animation-name: fade-area; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes fade-area { to { opacity: .1; } }
.tip {
  position: absolute; pointer-events: none; padding: 8px 11px; border-radius: 10px; white-space: nowrap; font-size: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(-100% - 14px));
}
.tip.l { transform: translate(-14px, calc(-100% - 14px)); }
.tip.r { transform: translate(calc(-100% + 14px), calc(-100% - 14px)); }
.tip.b { transform: translate(-50%, 16px); }
.tip.l.b { transform: translate(-14px, 16px); }
.tip.r.b { transform: translate(calc(-100% + 14px), 16px); }
.tip b { display: block; font-size: 14px; }
.tip span { color: var(--muted); }
.none { padding: 8px 0; font-size: 13px; color: var(--muted); }
details.twin { margin-top: 10px; font-size: 13px; }
details.twin summary { cursor: pointer; color: var(--muted); width: fit-content; min-height: 44px; padding: 12px 0; }
details.twin summary:hover { color: var(--text); }
details.twin table { margin-top: 6px; font-size: 13px; }
details.twin th, details.twin td { padding: 7px 10px; }
details.twin th:first-child, details.twin td:first-child { padding-left: 0; }

/* Fußzeile */
footer { border-top: 1px solid var(--line); padding: 28px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
footer nav { display: flex; gap: 18px; }
footer nav a { padding: 10px 4px; margin: -10px -4px; } /* größere Trefferfläche, gleiche Optik */

/* Einblenden beim Scrollen (nur mit JS, sonst sofort sichtbar) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media print { .js .reveal { opacity: 1; transform: none; } .chart.anim .line, .chart.anim .area, .chart.anim .pt, .chart.anim .end { animation: none; } .chart.anim .line { stroke-dasharray: none; } .chart.anim .pt, .chart.anim .end { opacity: 1; } .chart.anim .area { opacity: .1; } } /* Codex review 21.11.: charts nobody scrolled to are printed in their end state, not paused before the draw */

/* Nur bei echter Maus: Objekte kippen, Zeilen helfen beim Lesen (Karten heben sich nicht: sie sind kein Link) */
@media (hover: hover) and (pointer: fine) {
  .objects span:hover { transform: translateY(-4px) rotate(-8deg); }
  tbody tr:hover { background: var(--hover); }
}

/* Schmale Bildschirme: einspaltig (die vier kleinen Karten ab 700 px 2 × 2), Rangliste als Karten */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .hero-art { min-height: 0; }
  .hero-art img { width: min(48%, 200px); }
  .hero-art .ground { bottom: -2%; }
  .hero-art::before { width: min(110%, 440px); } /* eine Spalte: das Leuchten gehört zur 200-px-Figur, nicht zur ganzen Spalte */
  .hero h1 { margin-top: 12px; }
  .bento { grid-template-columns: 1fr; }
  .cell.main { grid-template-columns: 1fr; }
  /* Rangliste als Karten, sobald die 8 Spalten nicht mehr ohne Querscrollen passen */
  .board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .board table, .board tbody { display: block; }
  .board tbody tr { display: grid; grid-template-columns: 36px repeat(2, minmax(0, 1fr)); gap: 12px 10px; padding: 16px; align-items: center; }
  .board tbody tr + tr { border-top: 1px solid var(--line); }
  .board tbody tr + tr td { border-top: 0; }
  .board td { display: block; padding: 0; }
  .board td.rank { grid-area: 1 / 1; width: auto; }
  .board td.player { grid-area: 1 / 2 / 2 / -1; }
  .board td.level { grid-area: 2 / 2 / 3 / -1; min-width: 0; }
  .board td.num { text-align: left; font-size: 15px; font-weight: 600; }
  .board td.num::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
  .board td:nth-child(4) { grid-area: 3 / 2; } .board td:nth-child(5) { grid-area: 3 / 3; }
  .board td.empty { grid-column: 1 / -1; padding: 40px 8px; }
  .skel td:nth-child(n+4) { display: none; }
}
@media (min-width: 700px) and (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cell.main { grid-column: 1 / -1; } } /* Tablet: die vier kleinen Karten 2 × 2 wie am Desktop, statt gestrecktem Handy-Layout */
@media (min-width: 761px) and (max-width: 900px) { .gain .nm { max-width: calc(92vw - 420px); } } /* lange Namen enden mit … statt die Spalte „Münzen“ aus der Karte zu schieben, wie unter 760 px; 280 px bei 761, wächst mit der Karte (92vw) */
@media (min-width: 901px) and (max-width: 1200px) { .board th:nth-child(7), .board td:nth-child(7) { display: none; } .board th, .board td { padding-inline: 10px; } .board th:first-child, .board td:first-child { padding-left: 18px; } .board th:last-child, .board td:last-child { padding-right: 18px; } .board .level { min-width: 150px; } } /* 8 Spalten passen mit dem mitwachsenden Rand erst ab ~1200 px Fensterbreite: darunter fehlt „Abzeichen“ (steht in der Statistik), statt dass „Zuletzt gesehen“ abgeschnitten wird */
.board:has(td.empty) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* leer oder Fehler: keine Spaltenköpfe über einer Zeile, die keine Spalten hat (nicht .gain: dort ist td.empty der Ladeplatzhalter) */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .howto > div { grid-template-columns: 1fr; gap: 6px; }
  .gain th, .gain td { padding: 12px 8px; }
  .gain th:last-child, .gain td:last-child { padding-right: 22px; } /* Münzen hidden: Level is the last column and keeps the card's edge */
  .gain .nm { max-width: 150px; }
  .pcard { padding: 18px; }
  .cell, .cell.main { padding: 24px; }
}
@media (max-width: 420px) {
  .nav li a { padding: 6px 7px; }
  .nav .wrap { gap: 0 4px; }
  .install { padding-inline: 18px; }
  .board tbody tr { grid-template-columns: 32px repeat(2, minmax(0, 1fr)); gap: 12px 8px; padding: 14px; }
  .cmd { flex-wrap: wrap; padding: 10px 8px 8px 14px; } /* phones: the command gets the full width (two lines instead of four), the button sits below */
  .cmd code { flex-basis: 100%; font-size: 12.5px; }
  .cmd .btn { margin-left: auto; }
  .mock .mrow { flex-wrap: wrap; row-gap: 6px; } .mock .chip { margin-left: auto; } /* phones: a long line keeps the full width, its chip goes below on the right */
  .gain th, .gain td { padding: 10px 6px; }
  .gain td { font-size: 14px; }
  .gain th:first-child, .gain td:first-child { padding-left: 14px; }
  .gain th:last-child, .gain td:last-child { padding-right: 14px; }
  .gain .nm { max-width: 96px; } /* 320 px: four columns without scrolling sideways */
  .facts b { font-size: 16px; letter-spacing: -.02em; } /* „12.000 / 300“ bleibt bei 390 px in einer Zeile; bewusst ohne nowrap, das ragt bei 320/360 px aus der Spalte */
}
@media (prefers-reduced-transparency: reduce) {
  .nav::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav::after { display: none; }
}

/* Live-Vorschau (index.js): Zeiger, Konfetti und +XP werden je Bild aus der Zeit gesetzt, darum hier keine Übergänge (außer 40 ms am Zeiger, im Block „no-preference“ unten: er gleitet zwischen den Takten) */
.live { position: relative; }
.live .mrow { will-change: opacity, transform; }
.live .lp { position: absolute; left: 0; top: 0; width: 15px; height: 25px; opacity: 0; pointer-events: none; z-index: 3; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.live .lp path { fill: #fff; stroke: #111; stroke-width: .8; stroke-linejoin: round; }
.live .cf { position: absolute; left: 0; top: 0; width: 7px; height: 4px; border-radius: 1px; opacity: 0; pointer-events: none; z-index: 2; }
.live .cf0 { background: var(--accent); } .live .cf1 { background: var(--ok); } .live .cf2 { background: var(--talk); } .live .cf3 { background: #f5b300; }
.live .xp { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; z-index: 2; padding: 3px 9px; border-radius: 999px; background: var(--ok); color: var(--on-ok); font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); }
.mock .ghost { color: transparent; }
.chip.think { background: var(--accent-soft); color: var(--accent-text); }
.chip.think i { width: 9px; height: 9px; background: none; border: 2px solid var(--accent-text); border-right-color: transparent; }
.live-toggle { position: absolute; top: -11px; right: -11px; z-index: 4; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); opacity: .75; cursor: pointer; transition: opacity .2s; }
.live-toggle[hidden] { display: none; } /* display: grid outranked the hidden attribute: without JS and with reduced motion a button that did nothing */
.live-toggle::before { content: ""; position: absolute; inset: -10px; } /* 44 px hit area, same 26 px look */
.live-toggle:hover, .live-toggle:focus-visible, .live-toggle[aria-pressed="true"] { opacity: 1; }
.live-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-toggle span { width: 9px; height: 10px; background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%); } /* pause: two bars */
.live-toggle[aria-pressed="true"] span { background: currentColor; clip-path: polygon(12% 0, 100% 50%, 12% 100%); } /* play */
/* Hero: Lil Dev neigt sich zur Maus (--tx/--ty von index.js, −1…1), das Leuchten wandert mit */
.hero-art { perspective: 1100px; }
.hero-art img { rotate: calc(var(--ty, 0) * -1) var(--tx, 0) .001 var(--ta, 0deg); translate: calc(var(--tx, 0) * 8px) calc(var(--ty, 0) * 5px); }
.hero-art::before { translate: calc(var(--tx, 0) * 22px) calc(var(--ty, 0) * 16px); }
/* Karten und Kacheln (auch auf der Statistik): ein weiches Licht unter dem Inhalt folgt der Maus (site.js; nur im dunklen Modus sichtbar) */
@media (hover: hover) and (pointer: fine) {
  .cell, .tile, .rec { isolation: isolate; }
  .tile, .rec { position: relative; }
  .cell::before, .tile::before, .rec::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 46%); opacity: 0; transition: opacity .4s var(--ease-out); pointer-events: none; }
  .tile::before, .rec::before { background-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 58%); } /* small tiles: a smaller light, or the whole tile glows */
  .cell:hover::before, .tile:hover::before, .rec:hover::before { opacity: 1; }
}

/* Die vier kleinen Karten spielen einmal (index.js): Zustände liegen übereinander (.sw), damit beim Wechsel nichts springt */
.sw { display: grid; }
.sw > * { grid-area: 1 / 1; min-width: 0; }
.note > :not(.ic) { min-width: 0; }
.note > .sw:not(.ic) { flex: 1; }
.live .alt { opacity: 0; } /* the second state: invisible without JS, it still holds its space */
.live .note { position: relative; }
.live .note::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 80%, transparent), 0 10px 24px -14px var(--accent); opacity: var(--lit, 0); pointer-events: none; } /* "Jetzt": the note lights up once */
.fring { position: relative; display: grid; place-items: center; width: 34px; height: 34px; }
.note .fring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fring .tr { fill: var(--accent-soft); stroke: color-mix(in srgb, var(--accent) 22%, transparent); stroke-width: 2.5; }
.fring .pr { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100 100; }
.note .fring b { position: relative; font-size: 11px; font-weight: 700; letter-spacing: -.02em; color: var(--accent-text); font-variant-numeric: tabular-nums; } /* like the menu: minutes left in a ring that empties */
.seg span.hov { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.seg.run span:first-child { color: var(--accent-text); } .seg.run span:last-child { color: var(--muted); } /* "+15 Min." and "Beenden" */
.note .hand { transform-box: view-box; transform-origin: 12px 12px; }
.note .join { margin-left: auto; flex: none; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.ladder { position: relative; }
.ladder li { position: relative; }
.ladder::before { content: ""; position: absolute; left: -10px; right: -10px; top: 0; height: var(--bh, 0px); border-radius: 10px; background: var(--accent-soft); opacity: var(--bo, 0); transform: translateY(var(--by, 0px)); pointer-events: none; }
.ladder li.cur span { color: var(--accent-text); }
.ladder li.gold b { background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .8) 50%, transparent 60%) var(--gx, 100%) 0 / 300% 100% no-repeat, linear-gradient(var(--gold), var(--gold)); -webkit-background-clip: text; background-clip: text; } /* Unsterblich: gold like the name on the leaderboard, one glint */
@media (prefers-contrast: more) { .ladder li.gold b { background: none; color: var(--text) !important; } }
.objects i { display: block; font-style: normal; transform-origin: 50% 90%; }
@media (prefers-reduced-motion: no-preference) { .live .seg span { transition: background-color .2s var(--ease-out), color .2s var(--ease-out); } .live .lp { transition: transform 40ms linear; } } /* hover-like, only where motion is welcome */

/* Überschriften Wort für Wort (site.js), einmal beim ersten Sichtbarwerden; der Block darum blendet nur noch ein */
.js [data-words] .word { display: inline-block; opacity: 0; transform: translateY(.3em); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--w) * 70ms); }
.js [data-words].in .word { opacity: 1; transform: none; }
.js .reveal:has([data-words]) { transform: none; }
/* Statistik: jede XP-Linie zeichnet sich erst, wenn sie selbst zu 35 % im Bild ist (vorher liefen alle los, sobald der Abschnitt kam, bis 2.400 px tiefer) */
.js .chart.anim:not(.seen) * { animation-play-state: paused; }

/* Weniger Bewegung: nichts schwebt, nichts zählt hoch, alles sofort sichtbar */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .sk, .hero-art img, .hero-art .ground, .on::before, .chart.anim .line, .chart.anim .area, .chart.anim .pt, .chart.anim .end { animation: none; }
  .chart.anim .line { stroke-dasharray: none; }
  .chart.anim .area { opacity: .1; }
  .chart.anim .pt, .chart.anim .end { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .bar i, .btn, .objects span, .nav li a, tbody tr, .cell, .loading { transition: none; }
  .cell:hover { transform: none; }
}
/* Unsterblich (Level 1000): goldener Name auf der Rangliste, wie im Buddy versprochen */
.nm.gold { color: var(--gold); font-weight: 700; }
@media (prefers-contrast: more) { .nm.gold { color: var(--text); } }
