/* ==========================================================================
   Hub — mati-it.pl
   Ciemny, „szklany” motyw spójny z zadania.mati-it.pl.
   Bez zewnętrznych fontów i zależności.
   ========================================================================== */

:root {
  --bg: #06080f;
  --bg-soft: #0a0e19;
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef1fb;
  --muted: #9aa4bb;
  --faint: #6d7791;
  --accent: #8b7bff;
  --accent-2: #4cd7e8;
  --accent-ink: #080b14;
  --success: #5ee0a0;
  --danger: #ff7288;
  --warn: #ffc857;
  --topbar-bg: rgba(6, 8, 15, .74);
  --input-bg: rgba(0, 0, 0, .22);
  --footer-bg: rgba(0, 0, 0, .16);
  --grid-line: rgba(255, 255, 255, .022);
  --radius: 22px;
  --radius-sm: 13px;
  --shadow: 0 32px 80px -34px rgba(0, 0, 0, .85);
  --font: "Segoe UI", system-ui, -apple-system, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --maxw: 1180px;
  --header-h: 70px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f3f4f9;
  --bg-soft: #ffffff;
  --card-bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --border: rgba(15, 23, 42, .1);
  --border-strong: rgba(15, 23, 42, .18);
  --text: #0e1327;
  --muted: #56607a;
  --faint: #7b8399;
  --accent: #5b4cf0;
  --accent-2: #0891b2;
  --accent-ink: #ffffff;
  --success: #0f9d63;
  --danger: #d92d4b;
  --warn: #a86a00;
  --topbar-bg: rgba(243, 244, 249, .86);
  --input-bg: #ffffff;
  --footer-bg: #eceef6;
  --grid-line: rgba(15, 23, 42, .035);
  --shadow: 0 30px 70px -38px rgba(25, 35, 80, .38);
  color-scheme: light;
}

/* Kolory kategorii (RGB, żeby składać je z alpha). */
.cat-studia { --cat: 139, 123, 255; }
.cat-gry    { --cat: 76, 215, 232; }
.cat-inne   { --cat: 255, 180, 84; }

html[data-theme="light"] .cat-studia { --cat: 91, 76, 240; }
html[data-theme="light"] .cat-gry    { --cat: 8, 145, 178; }
html[data-theme="light"] .cat-inne   { --cat: 168, 106, 0; }

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -8%, rgba(139, 123, 255, .2), transparent 62%),
    radial-gradient(820px 480px at 96% 0%, rgba(76, 215, 232, .13), transparent 58%),
    radial-gradient(700px 620px at 48% 112%, rgba(184, 243, 91, .055), transparent 64%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(900px 520px at 10% -10%, rgba(91, 76, 240, .13), transparent 62%),
    radial-gradient(820px 480px at 96% 0%, rgba(8, 145, 178, .09), transparent 58%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(75% 55% at 50% 0%, #000 10%, transparent 100%);
  mask-image: radial-gradient(75% 55% at 50% 0%, #000 10%, transparent 100%);
}

main { flex: 1; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--text); }
button { font: inherit; }
img, svg { max-width: 100%; }
::selection { background: rgba(139, 123, 255, .4); }

.wrap {
  width: min(var(--maxw), calc(100% - 48px));
  margin-inline: auto;
}

.muted { color: var(--muted); }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Nagłówek
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #080b14;
  background: linear-gradient(135deg, #a99cff, #8b7bff 45%, #4cd7e8);
  box-shadow: 0 8px 24px -10px rgba(139, 123, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
  flex-shrink: 0;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.brand-mark svg path { fill: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; letter-spacing: -.01em; }
.brand-text span {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 3px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--cat));
  box-shadow: 0 0 0 3px rgba(var(--cat), .13);
}

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

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.server-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(94, 224, 160, .14);
  animation: beat 2.8s ease-in-out infinite;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-theme="dark"] .i-moon { display: none; }
html[data-theme="light"] .i-sun { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 58px;
  align-items: center;
  padding: 56px 0 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(94, 224, 160, .13);
  animation: pulse 2.8s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(44px, 5.4vw, 70px);
  font-weight: 600;
  line-height: 1.01;
  letter-spacing: -.035em;
  margin: 18px 0 20px;
}
.grad {
  background: linear-gradient(100deg, #c0b6ff 0%, #71e3f0 52%, #c9f57c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .grad {
  background: linear-gradient(100deg, #5b4cf0 0%, #0891b2 55%, #4d7c0f 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 56ch;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--muted);
}
.meta-item { display: inline-flex; align-items: baseline; gap: 6px; }
.meta-item b {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.meta-total { color: var(--faint); font-size: 11.5px; }
.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
  opacity: .7;
}
.meta-live { color: var(--faint); align-items: center; }
.meta-live b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.meta-live.is-online { color: var(--muted); }
.meta-live.is-offline { color: var(--muted); }
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 3px rgba(154, 164, 187, .12);
  flex-shrink: 0;
}
.meta-live.is-online .live-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(94, 224, 160, .14);
  animation: beat 2.6s ease-in-out infinite;
}
.meta-live.is-offline .live-dot {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(255, 200, 87, .13);
}

/* Panel katalogu */

.hero-panel {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(139, 123, 255, .11), rgba(76, 215, 232, .04) 52%, rgba(255, 255, 255, .02));
  box-shadow: var(--shadow);
  overflow: hidden;
}
html[data-theme="light"] .hero-panel {
  background: linear-gradient(160deg, rgba(91, 76, 240, .07), rgba(8, 145, 178, .04) 52%, #fff);
}
.hero-panel::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 215, 232, .18), transparent 66%);
  pointer-events: none;
}
.hero-panel > * { position: relative; z-index: 1; }

.hp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hp-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}
.hp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(94, 224, 160, .22);
  border-radius: 99px;
  background: rgba(94, 224, 160, .07);
  color: var(--success);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hp-badge .live-dot { background: var(--success); animation: beat 2.6s ease-in-out infinite; }

.hp-total {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
}
.hp-total strong {
  font-family: var(--display);
  font-size: 50px;
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.04em;
}
.hp-total span {
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}

.hp-rows { display: flex; flex-direction: column; gap: 2px; }
.hp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -10px;
  padding: 10px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.hp-row:hover { background: var(--surface); color: var(--text); }
.hp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--cat));
  box-shadow: 0 0 0 4px rgba(var(--cat), .13);
  flex-shrink: 0;
}
.hp-name { font-size: 13.5px; font-weight: 550; }
.hp-n {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}
.hp-arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .15s ease, transform .15s ease;
}
.hp-row:hover .hp-arrow { stroke: rgb(var(--cat)); transform: translate(1px, -1px); }

.hp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}
.hp-foot b { color: var(--muted); font-weight: 600; }

/* --------------------------------------------------------------------------
   Kategorie
   -------------------------------------------------------------------------- */

.group {
  padding-top: 38px;
  scroll-margin-top: 92px;
}
.group:last-of-type { padding-bottom: 30px; }

.group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.group-title { display: flex; align-items: center; gap: 14px; }

.group-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--cat), .28);
  border-radius: 13px;
  background: rgba(var(--cat), .11);
  color: rgb(var(--cat));
  flex-shrink: 0;
}
.group-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.group h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -.025em;
}
.group-count {
  padding: 2px 8px;
  border: 1px solid rgba(var(--cat), .26);
  border-radius: 99px;
  background: rgba(var(--cat), .08);
  color: rgb(var(--cat));
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .06em;
  transform: translateY(1px);
}
.group-desc {
  max-width: 44ch;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Kafelki aplikacji
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr));
  gap: 15px;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 208px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-bg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: rise .45s ease both;
}
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 0% 0%, rgba(var(--cat), .15), transparent 58%);
  opacity: .8;
  pointer-events: none;
  transition: opacity .2s ease;
}
.app > * { position: relative; z-index: 1; }
.app:hover,
.app:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--cat), .38);
  box-shadow: 0 24px 54px -28px rgba(0, 0, 0, .9);
}
html[data-theme="light"] .app:hover,
html[data-theme="light"] .app:focus-visible {
  box-shadow: 0 22px 46px -26px rgba(25, 35, 80, .4);
}
.app:hover::before { opacity: 1; }

.app-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.app-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--cat), .26);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(var(--cat), .19), rgba(var(--cat), .06));
  color: rgb(var(--cat));
  flex-shrink: 0;
  transition: transform .2s ease, border-color .2s ease;
}
.app:hover .app-icon { transform: translateY(-1px); border-color: rgba(var(--cat), .42); }
.app-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 21px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(0, 0, 0, .14);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}
html[data-theme="light"] .status { background: rgba(15, 23, 42, .035); }
.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}
.status-text:empty { display: none; }
.status[data-state="online"] {
  border-color: rgba(94, 224, 160, .26);
  background: rgba(94, 224, 160, .08);
  color: var(--success);
}
.status[data-state="online"] i {
  background: var(--success);
  animation: beat 2.6s ease-in-out infinite;
}
.status[data-state="offline"] {
  border-color: rgba(255, 114, 136, .24);
  background: rgba(255, 114, 136, .07);
  color: var(--danger);
}
.status[data-state="offline"] i { background: var(--danger); }

.app h3 {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.012em;
}
.app p {
  max-width: 42ch;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.55;
}

.app-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .01em;
  color: var(--faint);
}
.app-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-arrow {
  width: 27px;
  height: 27px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--faint);
  flex-shrink: 0;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.app-arrow svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app:hover .app-arrow {
  transform: translate(1px, -1px);
  border-color: rgba(var(--cat), .38);
  background: rgba(var(--cat), .11);
  color: rgb(var(--cat));
}

.grid .app:nth-child(2) { animation-delay: .04s; }
.grid .app:nth-child(3) { animation-delay: .08s; }
.grid .app:nth-child(4) { animation-delay: .12s; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-wrap { padding: 90px 0 110px; }
.error-code {
  display: block;
  font-family: var(--display);
  font-size: 86px;
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--faint);
  opacity: .45;
}
.error-wrap h1 {
  margin: 14px 0 12px;
  font-family: var(--display);
  font-size: clamp(33px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -.025em;
}
.error-wrap p { max-width: 52ch; color: var(--muted); font-size: 14px; }
.error-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-1px); }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 12px 30px -14px rgba(124, 92, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* --------------------------------------------------------------------------
   Stopka
   -------------------------------------------------------------------------- */

.footer {
  margin-top: auto;
  padding: 34px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr auto;
  gap: 18px 40px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 11px; }
.footer-brand p { font-size: 12.5px; line-height: 1.5; }
.brand-mark.small { width: 33px; height: 33px; border-radius: 9px; flex-shrink: 0; }
.brand-mark.small svg { width: 19px; height: 19px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-content: flex-start;
  justify-content: flex-end;
  font-size: 12.5px;
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.55;
  max-width: 110ch;
}
.footer-note b { color: var(--muted); font-weight: 600; }
.footer-copy { grid-column: 1 / -1; margin: 0; color: var(--faint); font-size: 11px; }

/* --------------------------------------------------------------------------
   Animacje
   -------------------------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(94, 224, 160, .12); }
  50% { box-shadow: 0 0 0 7px rgba(94, 224, 160, .04); }
}
@keyframes beat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 224, 160, .35); }
  50% { box-shadow: 0 0 0 5px rgba(94, 224, 160, 0); }
}

/* --------------------------------------------------------------------------
   Responsywność
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero { gap: 40px; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 44px 0 28px;
  }
  .hero-copy { max-width: 660px; }
  .hero-panel { width: 100%; max-width: 540px; }
  .group-desc { text-align: left; }
}

@media (max-width: 820px) {
  :root { --header-h: auto; }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 0;
  }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 6px 10px; }
  .brand-text span { display: none; }
  .server-pill { display: none; }
  .theme-toggle { width: 36px; height: 36px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(38px, 11.5vw, 52px); }
  .lead { font-size: 15px; }
  .hero-meta { margin-top: 22px; gap: 10px; }
  .hero-panel { display: none; }
  .group { padding-top: 32px; }
  .group-head { align-items: flex-start; gap: 10px; }
  .group-icon { width: 38px; height: 38px; border-radius: 11px; }
  .group h2 { font-size: 27px; }
  .group-desc { font-size: 12px; }
  .grid { grid-template-columns: 1fr; }
  .app { min-height: 0; padding: 18px; }
  .app p { margin-bottom: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .brand-text strong { font-size: 15px; }
  .hero h1 { font-size: clamp(35px, 12vw, 46px); }
  .hero-meta { font-size: 11.5px; }
  .meta-item b { font-size: 17px; }
  .hp-total strong { font-size: 44px; }
  .app h3 { font-size: 17px; }
  .status { font-size: 8px; padding: 0 6px; }
}

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