/* ========= STYLES.CSS (deduped) =========
   Usunięto wszystkie dokładne duplikaty i pozostawiono pojedyncze,
   skonsolidowane reguły: :root, .socials, .icon-btn, .acc-btn itd.
*/

/* ===== VARIABLES (force dark theme as default) =====
   Usuwamy rozróżnienie light/dark — ustawiamy wartości z dotychczasowego
   @media (prefers-color-scheme: dark) jako domyślne.
*/
:root{
  --brand-orange: #D66C2C;
  --brand-blue: #4A93C3;
  --white: #FFFFFF;
  --black: #000000;
  --light-gray: #0b1724;

  /* Page / theme tokens (dark as default) */
  --page-bg: var(--black);
  --header-bg: var(--black);
  --social-bg: #253b4d;
  --main-bg: var(--black);

  --bg: var(--page-bg);
  --panel: var(--light-gray);

  /* new: specific accordion background (lighter than panel) */
  --accordion-bg: var(--black);

  --text: #e6eef8;
  --muted: #9aa6b2;
  --border: #1f2937;
  --shadow: 0 10px 30px var(--shadow-light);
  --radius: 16;

  --header-height: 126px;
  --social-size: 92px;
  --social-gap: 8px;
  
  /* Animation durations - keep in sync with JS CONFIG */
  --animation-duration: 300ms;
  --accordion-transition: 400ms;
  --question-reveal-duration: 480ms;
  --social-glow-duration: 750ms;

  --content-bg: #071226;
  --question-bg: #0b2130;
  --answer-bg: #071925;
  --answer-border: var(--border-subtle);
  --answer-text: var(--text);

  --card-gradient: linear-gradient(135deg, rgba(7,25,39,1) 0%, rgba(4,16,28,1) 100%);
  --card-border: var(--border-medium);
  --card-radius: 14px;
  --card-shadow: 0 16px 34px var(--shadow-primary);
  --accent-gradient: linear-gradient(140deg, rgba(214,108,44,0.32) 0%, rgba(74,147,195,0.26) 100%);
  --accent-ring-orange: rgba(214,108,44,0.18);
  --accent-ring-blue: rgba(74,147,195,0.16);
  
  /* Consolidated RGBA values */
  --shadow-dark: rgba(2,6,23,0.36);
  --shadow-primary: rgba(2,6,23,0.4);
  --shadow-light: rgba(2,6,23,0.6);
  --border-subtle: rgba(255,255,255,0.03);
  --border-light: rgba(255,255,255,0.05);
  --border-medium: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.12);
  --overlay-dark: rgba(7,18,38,0.85);
  
  /* Typography Scale - Mobile-first with larger base sizes */
  --font-xs: clamp(12px, 1.2vw, 14px);     /* Fine print, captions - increased from 10-12px */
  --font-sm: clamp(14px, 1.4vw, 16px);     /* Small UI text - increased from 12-14px */
  --font-base: clamp(18px, 1.6vw, 20px);   /* Body text - increased from 16-18px */
  --font-md: clamp(20px, 1.8vw, 22px);     /* Large body, small headings - increased from 18-20px */
  --font-lg: clamp(22px, 2.0vw, 26px);     /* Section headings - increased from 20-24px */
  --font-xl: clamp(26px, 2.4vw, 30px);     /* Page headings - increased from 24-28px */
  --font-2xl: clamp(34px, 3.2vw, 42px);    /* Hero text - increased from 32-40px */
  --font-3xl: clamp(42px, 4.2vw, 58px);    /* Display text - increased from 40-56px */
}

/* responsive tokens */
@media (max-width: 600px) { :root { --header-height: 110px; } }

/* ===== BASE / LAYOUT ===== */
h﻿tml, body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

a {
  display: inline;
  color: var(--brand-orange);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

a:hover, a:focus, a:active {
  text-decoration-style: solid;
}

/* ===== TYPOGRAPHY SYSTEM ===== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--font-3xl); }
h2 { font-size: var(--font-2xl); }
h3 { font-size: var(--font-xl); }
h4 { font-size: var(--font-lg); }
h5 { font-size: var(--font-md); }
h6 { font-size: var(--font-base); font-weight: 600; }

p {
  margin: 0;
  font-size: var(--font-base);
  line-height: 1.7;
  color: var(--text);
}

/* Typography utilities */
.text-xs { font-size: var(--font-xs); }
.text-sm { font-size: var(--font-sm); }
.text-base { font-size: var(--font-base); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.container {
  max-width: 1200px;
  height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 0 24px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.card-surface {
  background: var(--card-gradient);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.28s ease, border-color 0.24s ease, background 0.24s ease;
}

.card-surface:focus-within {
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  background: var(--card-gradient) padding-box,
              var(--accent-gradient) border-box;
  box-shadow: 0 0 0 1px var(--accent-ring-orange),
              0 0 0 2px var(--accent-ring-blue),
              0 12px 28px var(--shadow-dark);
}

.socials.card-surface,
.question.card-surface,
.acc-body.card-surface,
.acc-static.card-surface,
.mobile-footer.card-surface {
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  background: var(--card-gradient) padding-box,
              var(--accent-gradient) border-box;
  box-shadow: 0 0 0 1px var(--accent-ring-orange),
              0 0 0 2px var(--accent-ring-blue),
              0 12px 28px var(--shadow-dark);
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 40%) minmax(0, 60%);
  gap: 24px;
  align-items: stretch;
  margin-top: 24px;
  flex: 1 1 auto;
  min-height: 0;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
  overflow: visible;
  min-height: 0;
}

.question.card-surface.question-animate {
  animation: questionReveal var(--question-reveal-duration) cubic-bezier(.24,.82,.18,1) both;
}

@keyframes questionReveal {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(.98);
    filter: blur(6px);
  }
  55% {
    opacity: 1;
    transform: translateY(-6px) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}
.socials-desktop {
  position: static;
  top: auto;
  z-index: initial;
  align-self: stretch;
}

.mobile-footer {
  margin-top: 20px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: clamp(20px, 6vw, 32px);
}
.question-empty {
  padding: 24px;
  border-radius: 12px;
  background: var(--overlay-dark);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  line-height: 1.6;
}

/* ===== HEADER / LOGO BANNER ===== */
header { position: static; width: 100%; background: var(--bg); }
.bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.logo-banner {
  width: 100%;
  height: var(--header-height);
  min-height: var(--header-height);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding: 0;
  box-shadow: var(--shadow);
  box-sizing: border-box;

  /* make the banner background explicitly black */
  background: var(--header-bg);
}

/* keep logo image sizing (no change) */
.logo-banner img {
  max-width: 84%;
  max-height: calc(var(--header-height) - 42px);
  height: auto;
  width: auto;
  display: block;
  transition: max-width 0.3s, height 0.3s;
}
@media (max-width: 600px) {
  .logo-banner img {
    max-width: 92%;
    max-height: calc(var(--header-height) - 32px);
  }
}

/* ===== QUESTIONS / CARDS ===== */
.question {
  /* reset scroll offset (start from clean state) */
  scroll-margin-top: 0;
  margin: 0 auto;
  width: min(100%, 840px);
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
  border-radius: clamp(16px, 1.8vw, 22px);
  color: var(--text);
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  min-height: 0;
  max-height: calc(100vh - var(--header-height) - 162px);
}

.question.card-surface {
  transition: transform 0.24s ease, box-shadow 0.28s ease, border-color 0.24s ease, background 0.24s ease;
  transform-origin: center top;
}

/* ANSWER container */
.answer {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  line-height: 1.7;
  font-size: var(--font-base);
  color: var(--answer-text);
}

.acc-body {
  padding: 16px 18px;
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1.65;
  color: var(--text);
}

.answer > * + *,
.acc-body > * + * {
  margin-top: 0;
}

.answer p,
.answer ul,
.answer ol,
.acc-body p,
.acc-body ul,
.acc-body ol {
  margin: 0;
}

.answer ul,
.acc-body ul {
  padding-left: 18px;
  margin: 12px 0;
}

.answer li,
.acc-body li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.answer li:last-child,
.acc-body li:last-child {
  margin-bottom: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 72px);
  border-radius: clamp(18px, 2.6vw, 26px);
  padding: clamp(10px, 1vw, 16px);
  gap: clamp(8px, 1vw, 14px);
}

.sidebar.card-surface {
  border-radius: clamp(18px, 2.6vw, 26px);
  border: 1px solid transparent;
  background: var(--card-gradient) padding-box,
              var(--accent-gradient) border-box;
  box-shadow: 0 0 0 1px var(--accent-ring-orange),
              0 0 0 2px var(--accent-ring-blue),
              0 12px 28px var(--shadow-dark);
}

.sidebar-content {
  flex: 1 1 auto;
  overflow: visible;
  padding: 8px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-gutter: stable both-edges;
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-radius: clamp(20px, 6vw, 32px);
  border: 1px solid transparent;
  background: var(--card-gradient) padding-box,
              var(--accent-gradient) border-box;
  box-shadow: 0 0 0 1px var(--accent-ring-orange),
              0 0 0 2px var(--accent-ring-blue),
              0 12px 28px var(--shadow-dark);
  text-align: center;
}

.sidebar-footer small,
.mobile-footer small {
  font-size: var(--font-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.8;
}

.sidebar-footer a,
.sidebar-footer a:visited,
.mobile-footer a,
.mobile-footer a:visited {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease;
}

.sidebar-footer a:hover,
.sidebar-footer a:focus-visible,
.mobile-footer a:hover,
.mobile-footer a:focus-visible {
  color: var(--brand-orange);
}

.side-section + .side-section {
  border-top: 1px dashed rgba(255,255,255,0.06);
  padding-top: 18px;
}

.side-title {
  font-size: var(--font-md);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-orange);
  margin: 0 0 12px;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  min-height: 48px;
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  text-align: left;
}

@media (hover: hover) and (pointer: fine) {
  .side-link:hover {
    background: rgba(214,108,44,0.22);
    color: var(--white);
    border-color: rgba(214,108,44,0.32);
    transform: translateX(2px);
    box-shadow: 0 6px 16px rgba(214,108,44,0.18);
  }
}

.side-link.active,
.side-link.is-active {
  background: rgba(214,108,44,0.28);
  color: var(--white);
  border-color: rgba(214,108,44,0.35);
}

/* ===== ACCORDION / MOBILE ===== */
.mobile {
  display: none;
}
.accordion { 
  background: var(--accordion-bg); /* use dedicated accordion color */
  border: none; 
  border-radius: var(--radius); 
  box-shadow: var(--shadow); 
  /* do not change page scrolling by forcing clipping here */
  overflow: visible;
}
.acc-item + .acc-item { border-top:1px solid var(--border); }

/* leave space for sticky socials when items scroll into view */
.acc-item { scroll-margin-top: calc(var(--social-size) + 32px); }

.acc-btn {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--font-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 3;
  border-radius: 10px;
  transform: translateZ(0);
}
.acc-btn .chev { transition: transform .2s ease; }

.acc-panel {
  margin-top: 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--accordion-transition) cubic-bezier(.4,0,.2,1), opacity var(--accordion-transition) cubic-bezier(.4,0,.2,1);
  opacity: 0;
  padding: 0;
  scroll-margin-top: calc(var(--social-size) + 32px);
}
.acc-panel.open { opacity: 1; will-change: max-height; }

.acc-static {
  margin-top: 12px;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.acc-static:focus,
.acc-static:focus-visible {
  box-shadow: 0 0 0 3px rgba(214,108,44,0.24);
  outline: none;
}

.acc-static + .acc-item {
  border-top: 1px solid var(--border);
}

/* ===== SOCIALS / ICONS (single definition) ===== */
/* ===== SOCIAL MEDIA LINKS (Unified Component) ===== */
.socials {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(14px, 2vw, 28px);
  width: 100%;
  margin: 0;
  height: var(--social-size);
  padding: 24px;
  background: var(--card-gradient);
  border-radius: 14px;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
  
  /* Desktop positioning - in layout flow */
  position: static;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--social-size) - 16px);
  height: calc(var(--social-size) - 16px);
  padding: 0;
  border-radius: 12px;
  background: rgba(12,28,44,0.55);
  color: var(--text);
  text-decoration: none;
  transition: transform .06s, box-shadow .12s, background .12s;
}
/* Enhanced social icon interaction */
.icon-btn {
  position: relative;
  overflow: hidden;
}

.icon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(214,108,44,0.4) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    background: rgba(214,108,44,0.38);
    color: var(--white);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 22px rgba(214,108,44,0.28);
  }

  .icon-btn:hover::before {
    transform: scale(1);
  }

  .icon-btn:hover img,
  .icon-btn:hover svg {
    filter: drop-shadow(0 0 6px rgba(214,108,44,0.45));
  }
}

.icon-btn:active::before {
  transform: scale(1.3);
  transition: transform 0.15s ease;
}
/* keep icon aspect consistent: use 80% for both width and height */
.icon-btn img, .icon-btn svg { width: 80%; height: 80%; object-fit: contain; display: block; }
.icon-btn:focus-visible { 
  outline: none; 
  box-shadow: 0 0 0 3px rgba(214,108,44,0.4), 0 4px 12px rgba(214,108,44,0.15); 
  z-index: 5; 
}

.icon-btn:focus:not(:focus-visible) {
  outline: none;
}
.icon-btn:active { transform: translateY(1px); }

.icon-btn.glow-twice {
  animation: socialsGlowTwice var(--social-glow-duration) ease-in-out 2;
}

@keyframes socialsGlowTwice {
  0%, 100% {
    box-shadow: none;
    background: rgba(12,28,44,0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(214,108,44,0.28), 0 0 16px rgba(214,108,44,0.65);
    background: rgba(214,108,44,0.55);
    transform: scale(1.05);
  }
}

/* ---- active / "lit" states (visual highlight on click) ---- */
.acc-btn,
.side-link,
.icon-btn {
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}

/* accordion button highlighted */
.acc-btn.is-active {
  background: var(--brand-orange);
  color: var(--white);
  box-shadow: none;
}
.acc-btn.is-active .chev { color: var(--white); transform: rotate(180deg); }

/* Full-element "lit" state (higher specificity) */
.accordion .acc-btn.is-active,
.accordion .acc-btn.is-active * {
  background: var(--brand-orange) !important;
  color: var(--white) !important;
  box-shadow: none !important;
}

/* Ensure the chevron contrasts */
.accordion .acc-btn.is-active .chev {
  color: var(--white) !important;
  transform: rotate(180deg) !important;
}

/* Sidebar links and icon buttons full-bg */
#sidebar .side-link.is-active,
#sidebar .side-link.active {
  background: var(--brand-orange) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.10) !important;
}

.icon-btn.is-active,
.icon-btn.is-active * {
  background: var(--brand-orange) !important;
  color: var(--white) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
}

.sidebar,
.sidebar-content,
.question,
.question-display {
  scrollbar-width: thin;
  scrollbar-color: rgba(214,108,44,0.65) rgba(7,18,38,0.45);
}

.sidebar::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.question::-webkit-scrollbar,
.question-display::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track,
.question::-webkit-scrollbar-track,
.question-display::-webkit-scrollbar-track {
  background: rgba(7,18,38,0.45);
  border-radius: 999px;
  margin: 8px 0;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb,
.question::-webkit-scrollbar-thumb,
.question-display::-webkit-scrollbar-thumb {
  background: rgba(214,108,44,0.75);
  border-radius: 999px;
  border: 4px solid transparent;
  background-clip: content-box;
}

.sidebar::-webkit-scrollbar-button,
.sidebar-content::-webkit-scrollbar-button,
.question::-webkit-scrollbar-button,
.question-display::-webkit-scrollbar-button {
  height: 0;
  width: 0;
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover,
.question::-webkit-scrollbar-thumb:hover,
.question-display::-webkit-scrollbar-thumb:hover {
  background: rgba(214,108,44,0.92);
  background-clip: content-box;
}

.side-link:focus,
.side-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214,108,44,0.24);
  border-color: rgba(214,108,44,0.28);
}

/* Enhanced focus indicators for accessibility */
.acc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214,108,44,0.4), inset 0 0 0 2px rgba(214,108,44,0.2);
  border-color: var(--brand-orange);
}

.acc-btn:focus:not(:focus-visible) {
  outline: none;
}

/* Remove tap highlights but preserve focus for accessibility */  
.acc-btn,
.icon-btn {
  -webkit-tap-highlight-color: transparent;
}

/* Clean up inner element styling */
.acc-btn * { 
  border: none; 
  box-shadow: none; 
}

/* Keyboard navigation visual enhancements */
.side-link[aria-current="true"] {
  background: rgba(214,108,44,0.15);
  border-left: 3px solid var(--brand-orange);
}

.question-display:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(214,108,44,0.3);
}

/* Subtle keyboard hint (only visible when keyboard navigation is used) */
body.keyboard-navigation::after {
  content: "⌨️ Use arrow keys to navigate";
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.8);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: var(--font-xs);
  z-index: 1000;
  opacity: 0;
  animation: keyboardHintFade 3s ease-in-out;
  pointer-events: none;
}

@keyframes keyboardHintFade {
  0%, 10% { opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== LOADING STATES ===== */
.loading-skeleton {
  padding: 20px;
}

.skeleton-item,
.skeleton-sidebar-item,
.skeleton-accordion-item {
  margin-bottom: 16px;
  opacity: 0;
  animation: skeletonFadeIn 0.6s ease-out forwards;
}

.skeleton-header {
  margin-bottom: 24px;
}

.skeleton-logo,
.skeleton-title,
.skeleton-content,
.skeleton-sidebar-item,
.skeleton-accordion-button {
  background: linear-gradient(90deg, var(--panel) 25%, rgba(255,255,255,0.05) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-logo {
  height: 60px;
  width: 200px;
  margin: 0 auto;
}

.skeleton-title {
  height: 24px;
  width: 70%;
  margin-bottom: 12px;
}

.skeleton-content {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-content.short {
  width: 60%;
}

.skeleton-sidebar-item {
  height: 20px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-accordion-button {
  height: 48px;
  width: 100%;
}

@keyframes skeletonFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== ERROR STATES ===== */
.error-state {
  text-align: center;
  padding: 40px 20px;
  max-width: 500px;
  margin: 0 auto;
  color: var(--text);
}

.error-icon {
  font-size: 48px;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.error-state h2 {
  color: var(--brand-orange);
  margin-bottom: 16px;
  font-size: var(--font-xl);
}

.error-state p {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.5;
}

.error-retry-btn {
  background: var(--brand-orange);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: var(--font-base);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.error-retry-btn:hover {
  background: #c55a1f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(214,108,44,0.3);
}

.error-retry-btn:active {
  transform: translateY(0);
}

.error-details {
  text-align: left;
  margin-top: 20px;
}

.error-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: var(--font-sm);
  margin-bottom: 8px;
}

.error-details pre {
  background: var(--panel);
  padding: 12px;
  border-radius: 6px;
  font-size: var(--font-xs);
  color: var(--muted);
  overflow-x: auto;
}

/* ===== SMOOTH CONTENT TRANSITIONS ===== */
.content-fade-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.content-fade-in {
  animation: contentFadeIn 0.3s ease-out;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced question reveal animation */
.question-animate {
  animation: questionReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== PROGRESSIVE ENHANCEMENT ===== */
/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .loading-skeleton * {
    animation: none !important;
  }
  
  .content-fade-out,
  .content-fade-in {
    animation: none !important;
    transition: none !important;
  }
  
  .question-animate {
    animation: none !important;
  }
}

/* Enhanced touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .icon-btn,
  .acc-btn,
  .side-link {
    min-height: 48px;  /* Increased from 44px for better touch */
    min-width: 48px;
  }
  
  .icon-btn:active {
    background: rgba(214,108,44,0.2);
    transform: scale(0.95);
  }
  
  .acc-btn:active,
  .side-link:active {
    background: rgba(214,108,44,0.1);
    transform: scale(0.98);
  }
  
  /* Additional mobile typography improvements */
  .acc-body {
    line-height: 1.75; /* More generous line spacing on mobile */
  }
  
  .answer {
    line-height: 1.8; /* Even more generous for main content */
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .icon-btn,
  .acc-btn,
  .side-link {
    border: 2px solid currentColor;
  }
  
  .card-surface {
    border: 1px solid var(--border);
  }
}

/* Dark mode refinements for supported browsers */
@media (prefers-color-scheme: dark) {
  .skeleton-logo,
  .skeleton-title,
  .skeleton-content,
  .skeleton-sidebar-item,
  .skeleton-accordion-button {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  }
}

/* Optional: ensure focus-visible still usable for keyboard users later:
   you can replace the above with a subtler rule instead of removing outlines entirely. */

/* ===== RESPONSIVE (mobile) ===== */
@media (max-width: 960px) {
  html, body {
    height: auto;
    min-height: 100vh;
  }
  
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .container {
    height: auto;
    min-height: calc(100vh - var(--header-height));
  }

  :root {
    --social-size: 82px;
  }

  .layout { display: none; }

  .mobile {
    display: block;
    padding-bottom: 32px;
  }

  .logo-banner { justify-content: center; padding-left: 0; }
  .main { padding: 0; }

  .socials-mobile {
    position: -webkit-sticky;
    position: sticky;
    top: -1px;
    z-index: 1000;
    justify-content: space-around;
    margin-bottom: 16px;
  }

  .accordion { 
    width: 100%; 
    margin: 0; 
    background: var(--accordion-bg);
    min-height: 100vh;
  }
  .accordion .acc-item {
    scroll-margin-top: calc(var(--social-size) + 18px);
    border-top: 1px solid var(--border-light);
  }
  .accordion .acc-static { margin-bottom: 18px; }
  .accordion .side-title { margin-top: 32px; margin-bottom: 16px; }
  .accordion .side-title:first-child { margin-top: 0; }
  .accordion .acc-item:first-of-type,
  .accordion .side-title + .acc-item { border-top: none; }
  .accordion .acc-btn {
    font-size: var(--font-base);
    line-height: 1.4;
    padding: 14px 18px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .accordion .acc-btn span:first-child { flex: 1 1 auto; }
  .accordion .acc-btn .chev { font-size: 1.1em; margin-left: 12px; }
  .accordion .acc-body { font-size: var(--font-base); padding: 20px 22px; }

  .mobile-footer { gap: 12px; }
  .mobile-footer small {
    color: var(--muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: var(--font-sm);
    text-align: center;
    line-height: 1.8;
  }

  .mobile-footer a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
  }

  .mobile-footer a:hover,
  .mobile-footer a:focus-visible { color: var(--brand-orange); }
}

/* ===== ACCESSIBILITY / FOCUS (CONSOLIDATED) =====
   Jedna spójna sekcja obsługująca focus/keyboard visualy dla acc-btn i linków.
*/
.acc-btn:focus { outline: none; }

.acc-btn:focus-visible {
  box-shadow: 0 0 0 3px var(--brand-orange);
  border-radius: 10px;
  z-index: 4;
}

/* we keep an internal visual ring for acc-btn that is toggled on focus-visible */
.acc-btn::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  bottom: 8px;
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--brand-orange);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 0;
}
.acc-btn:focus-visible::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .acc-panel,
  .acc-btn,
  .icon-btn,
  .card-surface {
    transition: none !important;
  }

  .acc-panel {
    transition-property: none !important;
  }

  .question.card-surface:hover {
    transform: none !important;
  }

  .question.card-surface.question-animate {
    animation: none !important;
  }
}
