/*
 * Twój Klub — wspólny arkusz podstron strony produktu (dokumenty prawne, strona 404).
 *
 * Strona główna (`index.html`) trzyma style w sobie (ADR-25); podstrony dzielą ten jeden plik,
 * żeby cztery dokumenty i 404 wyglądały identycznie. Role kolorów i czcionka są te same co na
 * stronie głównej i w aplikacjach (wartości 1:1 z packages/ui-core/src/styles/_m3.scss, ADR-39;
 * przy zmianie palety aktualizuj oba miejsca). Domyślnie jasny, ciemny tylko z przełącznika
 * (`:root[data-theme='dark']`, ui.md A18). Czcionka self-host, bez CDN.
 */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(fonts/figtree-latin-ext-wght.woff2) format('woff2-variations');
  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: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(fonts/figtree-latin-wght.woff2) format('woff2-variations');
  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 {
  color-scheme: light;
  --md-sys-color-primary: #3b1a9e;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #e6ddff;
  --md-sys-color-on-primary-container: #180552;
  --md-sys-color-secondary-container: #eeffb8;
  --md-sys-color-on-secondary-container: #2f4300;
  --md-sys-color-surface: #fcfbff;
  --md-sys-color-on-surface: #171326;
  --md-sys-color-on-surface-variant: #4e4a62;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f3f1fa;
  --md-sys-color-surface-container: #eceaf5;
  --md-sys-color-surface-container-high: #e4e1ef;
  --md-sys-color-outline-variant: #c7c3d9;
  --md-sys-color-outline-soft: #dedbea;
  --md-sys-color-warning-container: #ffdeaa;
  --md-sys-color-on-warning-container: #5f4100;
  --md-sys-color-info-container: #cfebfa;
  --md-sys-color-on-info-container: #004660;
  --md-ref-typeface-brand:
    'Figtree Variable', Figtree, ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-full: 9999px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --md-sys-color-primary: #cabeff;
  --md-sys-color-on-primary: #320695;
  --md-sys-color-primary-container: #492dab;
  --md-sys-color-on-primary-container: #e6deff;
  --md-sys-color-secondary-container: #3c4d00;
  --md-sys-color-on-secondary-container: #c8f241;
  --md-sys-color-surface: #13131a;
  --md-sys-color-on-surface: #e4e1ec;
  --md-sys-color-on-surface-variant: #c8c3dc;
  --md-sys-color-surface-container-lowest: #0e0d15;
  --md-sys-color-surface-container-low: #1b1b23;
  --md-sys-color-surface-container: #1f1f27;
  --md-sys-color-surface-container-high: #2a2931;
  --md-sys-color-outline-variant: #474459;
  --md-sys-color-outline-soft: #3b394d;
  --md-sys-color-warning-container: #5f4100;
  --md-sys-color-on-warning-container: #ffdeaa;
  --md-sys-color-info-container: #004c6c;
  --md-sys-color-on-info-container: #c7e7ff;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-ref-typeface-brand);
  font-size: 1rem;
  line-height: 1.625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a {
  color: var(--md-sys-color-primary);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}
@media (max-width: 600px) {
  .wrap {
    padding-inline: 16px;
  }
}

/* ——— pasek ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--md-sys-color-surface);
  border-bottom: 1px solid var(--md-sys-color-outline-soft);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1.75rem;
  text-decoration: none;
}
.brand svg {
  width: 32px;
  height: 32px;
  flex: none;
}
.nav__back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-full);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.nav__back:hover {
  background: var(--md-sys-color-surface-container);
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 999px;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
}
.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}
.theme-toggle .sun,
:root[data-theme='dark'] .theme-toggle .moon {
  display: none;
}
:root[data-theme='dark'] .theme-toggle .sun {
  display: block;
}

/* ——— dokument ——— */
.doc {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 48px;
  padding-block: 48px 96px;
  align-items: start;
}
@media (max-width: 900px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 32px 64px;
  }
}
.doc__toc {
  position: sticky;
  top: 88px;
  padding: 20px;
  border-radius: var(--md-sys-shape-corner-large);
  border: 1px solid var(--md-sys-color-outline-soft);
  background: var(--md-sys-color-surface-container-lowest);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
@media (max-width: 900px) {
  .doc__toc {
    position: static;
  }
}
.doc__toc b {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}
.doc__toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.doc__toc a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
}
.doc__toc a:hover {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
}
.doc__body {
  max-width: 78ch;
}
.doc__eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--md-sys-color-primary);
}
.doc h1 {
  margin: 8px 0 16px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 500;
  text-wrap: balance;
}
.doc h2 {
  margin: 40px 0 12px;
  font-size: 1.375rem;
  line-height: 1.875rem;
  font-weight: 500;
}
.doc h3 {
  margin: 24px 0 8px;
  font-size: 1.0625rem;
  line-height: 1.5rem;
  font-weight: 500;
}
.doc p {
  margin: 0 0 12px;
}
.doc ol,
.doc ul {
  margin: 0 0 12px;
  padding-left: 1.5rem;
}
.doc li {
  margin-bottom: 6px;
}
.doc li > ol,
.doc li > ul {
  margin-top: 6px;
}
.doc ol.alpha {
  list-style: lower-alpha;
}
.doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.doc__meta li {
  margin: 0;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 500;
}
.doc__lead {
  font-size: 1.0625rem;
  line-height: 1.75rem;
  color: var(--md-sys-color-on-surface-variant);
}
.note {
  margin: 16px 0;
  padding: 16px 20px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-info-container);
  color: var(--md-sys-color-on-info-container);
}
.note a {
  color: inherit;
}
.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-on-warning-container);
  font-weight: 500;
}
.table-scroll {
  overflow-x: auto;
  margin: 0 0 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid var(--md-sys-color-outline-soft);
  background: var(--md-sys-color-surface-container-lowest);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.375rem;
}
.doc th,
.doc td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--md-sys-color-outline-soft);
}
.doc th {
  background: var(--md-sys-color-surface-container);
  font-weight: 500;
}
.doc tr:last-child td {
  border-bottom: 0;
}
dl.def {
  margin: 0 0 12px;
}
dl.def dt {
  font-weight: 500;
}
dl.def dd {
  margin: 0 0 10px 1.5rem;
}

/* ——— strona 404 ——— */
.oops {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding-block: 96px;
  max-width: 60ch;
}
.oops h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 500;
}
.oops p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 500;
  text-decoration: none;
}

/* ——— stopka (ten sam układ co na stronie głównej) ——— */
.site-foot {
  padding-block: 32px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.site-foot .wrap {
  display: grid;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--md-sys-color-outline-soft);
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-foot a {
  color: var(--md-sys-color-on-surface-variant);
}
.site-foot a:hover {
  color: var(--md-sys-color-primary);
}
.site-foot address {
  font-style: normal;
}

@media print {
  .nav,
  .doc__toc,
  .site-foot nav,
  .theme-toggle {
    display: none;
  }
  .doc {
    display: block;
    padding: 0;
  }
  body {
    background: #fff;
    color: #000;
  }
}
