/* ═══════════════════════════════════════════════════════════════
   SzkolyPonadpodstawowe — base styles
   Zmienne CSS (--midnight, --electric, etc.) są dostarczane
   przez plik motywu w katalogu themes/ (ładowany przez <link id="theme-link">).
   Default motyw: pastel-goth.
   ═══════════════════════════════════════════════════════════════ */

/* ─────── Base ─────── */

html, body {
  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  color: var(--text-bright);
  background: var(--midnight);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 1200px 600px at 10% 0%, rgba(96, 224, 255, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 900px 700px at 90% 30%, rgba(167, 139, 250, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 700px 500px at 50% 100%, rgba(244, 63, 94, 0.06) 0%, transparent 55%),
    var(--midnight);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

/* Star field — subtle dots */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60px 70px, rgba(96,224,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 130px 120px, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 200px 50px, rgba(167,139,250,0.4), transparent),
    radial-gradient(1px 1px at 280px 200px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 360px 90px, rgba(249,168,212,0.4), transparent);
  background-repeat: repeat;
  background-size: 400px 250px;
  opacity: 0.7;
  z-index: 0;
  animation: drift 60s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 400px 250px; }
}

main, header, footer {
  position: relative;
  z-index: 1;
}

/* ─────── Typography ─────── */

h1, h2, h3, .display {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-feature-settings: "ss01", "ss02";
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  color: var(--text-bright);
}

h1 {
  font-weight: 500;
  font-style: italic;
}

.display-num {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.04em;
}

/* ─────── Header ─────── */

header {
  background: linear-gradient(135deg, rgba(22, 20, 42, 0.85) 0%, rgba(14, 13, 23, 0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(96, 224, 255, 0.20);
  box-shadow: 0 1px 0 rgba(96, 224, 255, 0.08), 0 4px 24px rgba(0,0,0,0.5);
}

header h1 {
  font-size: 2.2rem;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  color: var(--text-bright);
}

header h1 .ampersand {
  color: var(--electric);
  display: inline-block;
  text-shadow: var(--glow-electric);
  transform: translateY(-2px);
}

header h1 .accent-year {
  color: var(--electric);
  font-style: normal;
  font-weight: 400;
  text-shadow: var(--glow-electric);
}

.tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Decorative shimmery glyphs in header */
.shimmer {
  display: inline-block;
  animation: shimmer 4s ease-in-out infinite;
}
.shimmer:nth-child(2n) { animation-delay: 1.5s; }
.shimmer:nth-child(3n) { animation-delay: 2.8s; }

@keyframes shimmer {
  0%, 100% { opacity: 0.5; transform: scale(0.95); filter: brightness(0.9); }
  50% { opacity: 1; transform: scale(1.08); filter: brightness(1.4); }
}

/* ─────── Buttons ─────── */

.btn-primary {
  background: linear-gradient(135deg, var(--electric-deep) 0%, var(--violet-deep) 100%);
  color: var(--text-bright);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(96, 224, 255, 0.4);
  box-shadow: var(--glow-electric), 0 4px 12px -2px rgba(0,0,0,0.5);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(96, 224, 255, 0.7), 0 6px 20px -2px rgba(124, 58, 237, 0.6);
  background: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
  color: var(--midnight);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(22, 20, 42, 0.7);
  color: var(--text-soft);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.825rem;
  border: 1px solid rgba(167, 139, 250, 0.30);
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.20);
  border-color: var(--violet);
  color: var(--text-bright);
}

/* Pulsing glow dla głównego CTA */
.btn-glow {
  position: relative;
}
.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--electric), var(--violet), var(--pink));
  opacity: 0.7;
  z-index: -1;
  filter: blur(10px);
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* ─────── Sidebar (profil ucznia) ─────── */

.glass-card {
  background: linear-gradient(160deg, rgba(30, 27, 54, 0.85) 0%, rgba(22, 20, 42, 0.85) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(96, 224, 255, 0.18);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-medium);
}

/* Filter bar */
.filter-bar {
  background: rgba(22, 20, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(96, 224, 255, 0.15);
  border-radius: 0.875rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ─────── Form elements ─────── */

select, input[type="text"], input[type="number"] {
  background: rgba(14, 13, 23, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.30);
  border-radius: 0.625rem;
  padding: 0.45rem 0.85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--text-bright);
  transition: all 0.2s ease;
  cursor: pointer;
}
select:hover, input:hover { border-color: var(--electric); }
select:focus, input:focus {
  outline: none;
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(96, 224, 255, 0.20), var(--glow-electric);
}

/* Select w dark theme — strzalka */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2360E0FF' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}

/* Checkbox */
input[type="checkbox"] {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--violet);
  border-radius: 0.3rem;
  background: var(--midnight);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
input[type="checkbox"]:hover { border-color: var(--electric); box-shadow: var(--glow-electric); }
input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
  border-color: var(--electric);
  box-shadow: var(--glow-electric);
}
input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--midnight);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

/* Radio */
input[type="radio"] {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--violet);
  border-radius: 50%;
  background: var(--midnight);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
input[type="radio"]:hover { border-color: var(--electric); }
input[type="radio"]:checked {
  border-color: var(--electric);
  border-width: 2px;
  box-shadow: var(--glow-electric);
}
input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--plum) 0%, var(--violet) 50%, var(--electric) 100%);
  cursor: pointer;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
  border: 2px solid var(--midnight);
  box-shadow: var(--glow-electric), 0 2px 4px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.3); }
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
  border: 2px solid var(--midnight);
  box-shadow: var(--glow-electric);
  cursor: pointer;
}

/* ─────── School cards ─────── */

.school-card {
  background: var(--void);
  border-radius: 0.875rem;
  padding: 1.2rem 1.35rem;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease;
  position: relative;
  border: 1px solid var(--plum);
  color: var(--text-bright);
}
.school-card:hover {
  transform: translateY(-3px);
  border-color: var(--electric);
  box-shadow: var(--shadow-bold);
}

/* Kategorie: full-card backround glow (NIE side-stripe) */
.school-card.cat-safe {
  background:
    radial-gradient(ellipse 200px 100px at 90% 0%, rgba(94, 234, 212, 0.18) 0%, transparent 65%),
    var(--void);
  border-color: rgba(94, 234, 212, 0.30);
}
.school-card.cat-safe:hover { box-shadow: 0 8px 24px -4px rgba(94, 234, 212, 0.30), 0 0 16px rgba(94, 234, 212, 0.20); border-color: var(--safe-border); }

.school-card.cat-reach {
  background:
    radial-gradient(ellipse 200px 100px at 90% 0%, rgba(249, 168, 212, 0.15) 0%, transparent 65%),
    var(--void);
  border-color: rgba(249, 168, 212, 0.30);
}
.school-card.cat-reach:hover { box-shadow: 0 8px 24px -4px rgba(249, 168, 212, 0.25), 0 0 16px rgba(249, 168, 212, 0.18); border-color: var(--reach-border); }

.school-card.cat-out {
  background:
    radial-gradient(ellipse 200px 100px at 90% 0%, rgba(82, 82, 91, 0.12) 0%, transparent 65%),
    rgba(22, 20, 42, 0.5);
  border-color: rgba(82, 82, 91, 0.25);
  opacity: 0.7;
}

.school-card .punkty-num {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.04em;
}
.cat-safe .punkty-num { color: var(--safe-text); text-shadow: 0 0 12px rgba(94, 234, 212, 0.4); }
.cat-reach .punkty-num { color: var(--reach-text); text-shadow: 0 0 12px rgba(249, 168, 212, 0.4); }
.cat-out .punkty-num { color: var(--out-text); }

.school-card .lok {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.school-card .school-name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--text-bright);
  margin: 0.2rem 0 0.1rem;
}

.school-card .klasa-name {
  font-size: 0.875rem;
  color: var(--text-soft);
  font-weight: 500;
}

.school-card .label-badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 0.6rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.cat-safe .label-badge { background: var(--safe-bg); color: var(--safe-text); border: 1px solid var(--safe-border); }
.cat-reach .label-badge { background: var(--reach-bg); color: var(--reach-text); border: 1px solid var(--reach-border); }
.cat-out .label-badge { background: var(--out-bg); color: var(--out-text); border: 1px solid var(--out-border); }

/* ─────── Stat bar (inline) ─────── */

.stat-bar {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  color: var(--text-soft);
}

.stat-bar .stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.18rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: 1px solid;
}
.stat-bar .stat-pill .num {
  font-weight: 700;
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 36;
}
.stat-bar .stat-pill.safe { background: var(--safe-bg); color: var(--safe-text); border-color: var(--safe-border); }
.stat-bar .stat-pill.reach { background: var(--reach-bg); color: var(--reach-text); border-color: var(--reach-border); }
.stat-bar .stat-pill.out { background: var(--out-bg); color: var(--out-text); border-color: var(--out-border); }
.stat-bar .stat-total {
  font-weight: 500;
  font-style: italic;
  color: var(--text-soft);
  font-size: 1rem;
}

/* ─────── Modale ─────── */

.modal-overlay {
  background: rgba(7, 6, 15, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-card {
  background: var(--void);
  background-image:
    radial-gradient(ellipse 800px 500px at 0% 0%, rgba(124, 58, 237, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(96, 224, 255, 0.15) 0%, transparent 60%);
  border-radius: 1.25rem;
  border: 1px solid rgba(96, 224, 255, 0.25);
  box-shadow: 0 32px 64px -16px rgba(0,0,0,0.7), 0 0 32px rgba(124, 58, 237, 0.20);
  color: var(--text-bright);
}

.modal-card h2, .modal-card h3 { color: var(--text-bright); }

/* Animacje wejściowe */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.school-card { animation: fadeUp 0.4s ease-out backwards; }
.school-card:nth-child(1) { animation-delay: 0.02s; }
.school-card:nth-child(2) { animation-delay: 0.04s; }
.school-card:nth-child(3) { animation-delay: 0.06s; }
.school-card:nth-child(4) { animation-delay: 0.08s; }
.school-card:nth-child(5) { animation-delay: 0.10s; }
.school-card:nth-child(6) { animation-delay: 0.12s; }

/* Konfetti — dla goth: czarne + electric blue + pink */
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(140px) rotate(540deg); }
}
.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confetti-fall 1.6s ease-out forwards;
  pointer-events: none;
  z-index: 100;
}

/* ─────── Top 3 cards ─────── */

.top3-card {
  background: rgba(30, 27, 54, 0.6);
  border-radius: 0.875rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--plum);
  position: relative;
  overflow: hidden;
  color: var(--text-bright);
}

.top3-card.ambitna {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.10) 0%, rgba(124, 58, 237, 0.18) 100%);
  border: 1px solid rgba(244, 63, 94, 0.45);
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.15);
}
.top3-card.realistyczna {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12) 0%, rgba(124, 58, 237, 0.20) 100%);
  border: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.15);
}
.top3-card.bezpieczna {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.10) 0%, rgba(96, 224, 255, 0.18) 100%);
  border: 1px solid rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.15);
}

.top3-card .top3-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 500;
}

.top3-card .top3-school {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--text-bright);
  margin-top: 0.2rem;
}

.top3-card .top3-num {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.7rem;
  font-variation-settings: "opsz" 144;
  line-height: 1;
  color: var(--electric);
  text-shadow: var(--glow-electric);
}
.top3-card.ambitna .top3-num { color: var(--blood); text-shadow: 0 0 16px rgba(244, 63, 94, 0.5); }
.top3-card.realistyczna .top3-num { color: var(--violet); text-shadow: 0 0 16px rgba(167, 139, 250, 0.5); }

/* ─────── Compare: pin na karcie + floating bar + modal ─────── */

.compare-pin {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(14, 13, 23, 0.7);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: var(--violet);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.compare-pin:hover {
  background: rgba(124, 58, 237, 0.30);
  border-color: var(--violet);
  color: var(--text-bright);
  transform: scale(1.08);
}
.compare-pin.active {
  background: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
  border-color: var(--electric);
  color: var(--midnight);
  box-shadow: var(--glow-electric);
}

.school-card.in-compare {
  border-color: var(--electric);
  box-shadow: 0 0 0 1px rgba(96, 224, 255, 0.30), var(--shadow-medium);
}

/* Compare bar — floating bottom right */
.compare-bar {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  background: linear-gradient(135deg, rgba(22, 20, 42, 0.95) 0%, rgba(30, 27, 54, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(96, 224, 255, 0.40);
  border-radius: 999px;
  padding: 0.65rem 0.65rem 0.65rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-electric);
  animation: compare-bar-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.compare-bar.hidden { display: none; }
.compare-bar.shake {
  animation: compare-shake 0.5s ease-in-out;
}
@keyframes compare-bar-in {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes compare-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.compare-bar-label {
  font-size: 0.875rem;
  color: var(--text-bright);
}
.compare-bar-label strong {
  color: var(--electric);
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0.15rem;
}
.compare-bar button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Compare modal — kolumny */
.compare-col {
  background: rgba(22, 20, 42, 0.6);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 1rem;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
}
.compare-col.cat-safe { border-color: rgba(94, 234, 212, 0.40); background: linear-gradient(160deg, rgba(94, 234, 212, 0.06) 0%, rgba(22, 20, 42, 0.7) 100%); }
.compare-col.cat-reach { border-color: rgba(249, 168, 212, 0.40); background: linear-gradient(160deg, rgba(249, 168, 212, 0.06) 0%, rgba(22, 20, 42, 0.7) 100%); }
.compare-col.cat-out { border-color: rgba(82, 82, 91, 0.30); opacity: 0.85; }

.compare-class-header {
  background: rgba(14, 13, 23, 0.5);
  border: 1px solid rgba(167, 139, 250, 0.20);
  border-radius: 0.625rem;
  padding: 0.7rem 0.9rem;
}
.compare-class-kod {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-bright);
  line-height: 1.2;
}

.compare-points {
  background: rgba(14, 13, 23, 0.7);
  border: 1px solid rgba(96, 224, 255, 0.20);
  border-radius: 0.625rem;
  padding: 0.85rem 0.95rem;
}
.compare-points-num {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.04em;
  margin-top: 0.1rem;
}
.compare-delta {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.6rem;
  text-align: center;
  padding: 0.3rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
}
.compare-section {
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  padding-top: 0.65rem;
}
.compare-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.compare-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.compare-value {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.compare-klasa {
  padding: 0.5rem 0.7rem;
  margin-top: 0.4rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(167, 139, 250, 0.20);
  background: rgba(14, 13, 23, 0.5);
}
.compare-klasa.cat-safe {
  background: rgba(94, 234, 212, 0.08);
  border-color: rgba(94, 234, 212, 0.30);
}
.compare-klasa.cat-reach {
  background: rgba(249, 168, 212, 0.08);
  border-color: rgba(249, 168, 212, 0.30);
}
.compare-klasa.cat-out {
  background: rgba(82, 82, 91, 0.08);
  border-color: rgba(82, 82, 91, 0.20);
  opacity: 0.7;
}

.compare-remove {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.40);
  color: var(--blood);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.compare-remove:hover {
  background: var(--blood);
  color: white;
  transform: scale(1.1);
}

/* ─────── Footer ─────── */

footer {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 0 3rem;
  text-align: center;
}

footer .heart {
  color: var(--blood);
  font-style: normal;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* ─────── Decorative gothic SVGs (background) ─────── */
.deco-cloud {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* ─────── Hand-drawn underline ─────── */

.underline-wavy {
  background-image: linear-gradient(to right, var(--electric) 0%, var(--violet) 50%, var(--pink) 100%);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 2px;
  text-shadow: 0 0 8px rgba(96, 224, 255, 0.3);
}

/* ─────── Scrollbar ─────── */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--midnight);
}
::-webkit-scrollbar-thumb {
  background: var(--plum);
  border-radius: 999px;
  border: 2px solid var(--midnight);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
  box-shadow: var(--glow-electric);
}

/* ─────── Selection ─────── */

::selection {
  background: var(--electric);
  color: var(--midnight);
}

/* ─────── Responsive ─────── */

@media (max-width: 1024px) {
  header h1 { font-size: 1.6rem; }
  main { grid-template-columns: 1fr !important; }
  aside { position: static !important; max-height: none !important; }
}

/* ─────── Tailwind text colors override (klasy generowane dynamicznie) ─────── */

.text-emerald-600, .text-emerald-700 { color: var(--safe-text); }
.text-amber-500, .text-amber-600, .text-amber-700 { color: var(--reach-text); }
.text-rose-500, .text-rose-600, .text-rose-700 { color: var(--blood); }
.text-violet-700, .text-violet-500 { color: var(--violet); }

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: var(--glow-electric);
}

/* ─────── Wizard onboarding ─────── */
.wiz-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(167, 139, 250, 0.25);
  transition: background 0.2s, box-shadow 0.2s;
}
.wiz-dot.active {
  background: var(--electric);
  box-shadow: 0 0 8px rgba(96, 224, 255, 0.6);
}
.wiz-dot.done {
  background: var(--violet);
}
.wizard-step input[type="text"]:focus,
.wizard-step input[type="number"]:focus {
  border-color: var(--electric) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 224, 255, 0.2);
}
.wiz-ocena-row {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(30, 27, 54, 0.4);
  border: 1px solid rgba(167, 139, 250, 0.2);
  padding: 0.5rem 0.75rem; border-radius: 0.5rem;
}
.wiz-ocena-label {
  flex: 1; font-size: 0.85rem; color: var(--text-soft);
  font-family: "Fraunces", serif;
}
.wiz-ocena-row select {
  background: rgba(14, 13, 23, 0.7);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: var(--text-bright);
  padding: 0.3rem 0.5rem; border-radius: 0.3rem;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.wiz-cke-row {
  background: rgba(30, 27, 54, 0.4);
  border: 1px solid rgba(167, 139, 250, 0.2);
  padding: 0.75rem; border-radius: 0.5rem;
}
.wiz-cke-row label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.4rem;
  color: var(--violet); font-size: 0.95rem;
}
.wiz-cke-row .wiz-cke-val {
  color: var(--electric); font-weight: 700; font-size: 1.05rem;
}
.wiz-cke-row input[type="range"] { width: 100%; }

