/* Ostatnia warstwa mobilna — ładowana po pozostałych stylach. */
@media (max-width: 820px) {
  html, body { max-width: 100%; overflow-x: hidden; }

  .dark-theme .site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 68px;
    padding: 0 18px;
    background: rgba(16, 17, 18, .96);
    backdrop-filter: blur(14px);
  }

  .dark-theme .brand { font-size: 24px; }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--ink);
    border: 1px solid #ffffff26;
    border-radius: 12px;
    font-size: 21px;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    padding: 10px;
    gap: 4px;
    border: 1px solid #ffffff20;
    border-radius: 16px;
    background: #181a1b;
    box-shadow: 0 18px 44px #0009;
  }

  /* Stara klasa .show mogła zostać przywrócona przez pamięć przeglądarki.
     Tylko nowa klasa .menu-open może otworzyć menu. */
  .site-header nav.show { display: none; }
  .site-header nav.menu-open { display: flex; }
  .site-header nav a { padding: 14px 12px; border-radius: 10px; font-size: 14px; }
  .site-header nav .nav-cta { justify-content: center; margin-top: 5px; }

  .dark-theme .trust {
    display: block;
    margin-top: 12px;
    padding: 22px 18px;
    font-size: 13px;
  }

  .dark-theme .trust p { margin-bottom: 14px; }
  .dark-theme .trust div { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; font-size: 12px; }

  .section { padding: 58px 18px; }
  .ranking, .faq { gap: 34px; }
  .section-intro h2, .steps h2, .faq h2, .final-cta h2 { font-size: 36px; letter-spacing: -1.7px; }
  .section-intro > p:last-child { font-size: 14px; margin-top: 18px; }

  .dark-theme .portal-card {
    grid-template-columns: 28px 48px minmax(0, 1fr);
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
  }

  .portal-mark { width: 46px; height: 46px; border-radius: 13px; font-size: 25px; }
  .portal-info { min-width: 0; }
  .portal-info h3 { font-size: 22px; line-height: 1.05; }
  .portal-info > p:last-child { font-size: 12px; line-height: 1.45; }
  .portal-tag { font-size: 10px; line-height: 1.25; }

  .portal-meta {
    display: flex;
    grid-column: 2 / -1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-align: left;
    margin-top: 2px;
  }

  .portal-meta strong { font-size: 14px; }

  .dark-theme .circle-link {
    grid-column: 2 / -1;
    width: 100%;
    height: 44px;
    margin-top: 4px;
    border-radius: 13px;
  }

  .dark-theme .circle-link:after { font-size: 13px; }
  .ranking .button-dark { width: 100%; justify-content: center; margin-top: 6px; }

  .steps { padding: 58px 18px; }
  .steps ol { margin-top: 34px; }
  .steps li { grid-template-columns: 38px 1fr; gap: 12px; padding: 19px 0; }
  .steps h3 { font-size: 22px; }
  .steps li p { font-size: 13px; }

  .quote { padding: 58px 20px; }
  .quote p { font-size: 28px; }
  .faq-item button { padding: 18px 0; font-size: 14px; line-height: 1.4; }
  .final-cta { padding: 62px 18px; }
  .final-cta .button { justify-content: center; width: 100%; }

  footer { padding: 26px 18px; }
  footer p { line-height: 1.5; }
}

@media (max-width: 360px) {
  .section-intro h2, .steps h2, .faq h2, .final-cta h2 { font-size: 33px; }
  .dark-theme .portal-card { grid-template-columns: 25px 44px minmax(0, 1fr); padding: 14px; }
  .portal-mark { width: 42px; height: 42px; font-size: 22px; }
}

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