/* QuickMap Legal Index — legalindex.quickmap.pl */

/* Fonty serwowane lokalnie (bez zapytań do Google). Licencja: SIL OFL 1.1, zob. fonts/LICENSE-*.txt */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/space-grotesk-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/space-grotesk-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #141413;
  --ink-hover: #2e2e2c;
  --text: #3d3d3d;
  --muted: #5f5f5f;
  --line: #e3e3e0;
  --line-strong: #d9d9d9;
  --soft: #f6f6f4;
  --white: #ffffff;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --warn: #9a3412;
  --ok: #166534;
  --dark-line: #3a3a38;
  --dark-text: #c9c9c4;
  --dark-accent: #9db4ff;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --gutter: 32px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-dark);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: var(--white);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section[id] {
  scroll-margin-top: 16px;
}

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-dark {
  color: var(--white);
  background: var(--ink);
}

.btn-dark:hover {
  color: var(--white);
  background: var(--ink-hover);
}

.btn-light {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
}

.btn-light:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
}

/* Nagłówek */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-logo {
  display: block;
  flex: none;
  width: auto;
  height: 32px;
}

.brand-pill {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  font-size: 14px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Wyniki */
.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 56px;
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
}

h1 {
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.05;
  font-weight: 700;
}

.lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
}

.edition {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Druga linia etykiety, w kolumnie tekstu (za kropką) */
.edition-update {
  grid-column: 2;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.edition-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.ranking-box {
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: 14px;
}

.ranking {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 15px;
}

.ranking th,
.ranking td {
  padding: 22px 18px;
  text-align: left;
  vertical-align: middle;
}

.ranking thead th {
  padding: 14px 18px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ranking thead th.col-aux {
  color: var(--dark-text);
  border-left: 1px solid var(--dark-line);
}

.ranking tbody tr + tr {
  border-top: 1px solid var(--line);
}

.ranking tbody .col-aux {
  color: var(--muted);
  border-left: 1px solid var(--line);
}

.ranking .model {
  font-size: 18px;
  font-weight: 600;
}

/* Pogrubienie = najlepszy wynik w kolumnie (klasa is-best), reszta w wadze 500 */
.num {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1;
}

.num.is-best {
  font-weight: 700;
}

.num-xl {
  font-size: 40px;
  color: var(--blue);
}

.num-lg {
  font-size: 34px;
}

.num-md {
  font-size: 22px;
}

.model-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.is-warn {
  color: var(--warn);
}

.is-ok {
  color: var(--ok);
}

.table-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* Sekcje */
.band {
  background: var(--soft);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 780px;
}

.section-head p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.section-head-narrow {
  gap: 12px;
  max-width: 760px;
}

.h2-md {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
}

.h2-lg {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
}

.kicker {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* Co mierzymy */
.section-metrics {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.metric-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.metric-card {
  display: flex;
  flex: 1 1 230px;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

/* Co to jest */
.about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-text p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.feature h3,
.group h3 {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

/* Jak testujemy */
.dark {
  background: var(--ink);
  color: var(--white);
}

.dark p,
.dark .card-text,
.dark .section-head p {
  color: var(--dark-text);
}

.section-how {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--dark-line);
  border-radius: 12px;
}

.dark .group .kicker {
  color: var(--dark-accent);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--dark-line);
}

.principle {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.principle h3 {
  font-size: 20px;
  font-weight: 600;
}

.principle p {
  font-size: 15px;
  line-height: 1.65;
}

/* CTA */
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.cta-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}

.cta-text p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Stopka */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 13px;
  color: var(--muted);
}

/* Strona 404 */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-top: 72px;
  padding-bottom: 96px;
}

.error-page .lead {
  max-width: 560px;
}

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

@media (max-width: 1000px) {
  .groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Nawigacja w osobnym rzędzie, zanim przycisk zacznie spadać pod logo */
@media (max-width: 900px) {
  .site-nav {
    order: 3;
    flex-basis: 100%;
    gap: 8px 20px;
  }
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }

  .site-header {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hero {
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 44px;
  }

  .lead {
    font-size: 17px;
  }

  .h2-md {
    font-size: 28px;
  }

  .h2-lg {
    font-size: 32px;
  }

  .section-metrics {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .about,
  .section-how {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .section-how {
    gap: 32px;
  }

  .principles {
    padding-top: 32px;
  }

  .cta {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  /* Tabela wyników jako karty */
  .ranking-box {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .ranking {
    min-width: 0;
  }

  .ranking thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .ranking,
  .ranking tbody,
  .ranking tr,
  .ranking th,
  .ranking td {
    display: block;
  }

  .ranking tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .ranking tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
    padding: 18px;
    border: 1px solid var(--ink);
    border-radius: 14px;
  }

  .ranking tbody tr + tr {
    border-top: 1px solid var(--ink);
  }

  .ranking tbody th,
  .ranking tbody td {
    padding: 0;
  }

  /* Etykieta u góry, wartość u dołu: liczby w jednym rzędzie stoją równo, nawet gdy etykieta łamie się na 2 linie */
  .ranking tbody td {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .ranking tbody .model {
    grid-column: 1 / -1;
  }

  .ranking tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .ranking tbody .col-aux {
    border-left: 0;
    font-size: 17px;
  }

  .num-xl {
    font-size: 34px;
  }

  .num-lg {
    font-size: 30px;
  }

  .num-md {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .cta-long {
    display: none;
  }
}

@media (max-width: 440px) {
  .brand-pill {
    display: none;
  }
}
