:root {
  color-scheme: dark;
  --ink: #eef4ff;
  --muted: #c0cee4;
  --navy: #12254b;
  --blue: #2858dc;
  --blue-hover: #1c47bf;
  --blue-light: #92b5ff;
  --line: rgba(183, 205, 245, .32);
  --paper: #fff;
  --canvas: #101c31;
  --panel: rgba(12, 25, 46, .82);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  background: var(--canvas);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.16; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.025em; }
h3 { font-size: 1.16rem; }
a { color: #a9c6ff; text-underline-offset: .16em; }
:focus-visible { outline: 3px solid #ffc280; outline-offset: 3px; }
#tresc:focus { outline: 0; }
#nauka, #funkcje, #prywatnosc, #zasady { scroll-margin-top: 1.5rem; }

.wrap { width: min(72rem, 100% - 3rem); margin-inline: auto; }
.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 1;
  padding: .55rem .8rem;
  border-radius: .4rem;
  background: var(--canvas);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { background: rgba(10, 21, 40, .85); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; gap: 1.25rem; }
.header-inner { min-height: 4.75rem; justify-content: space-between; gap: clamp(.65rem, 3vw, 1.5rem); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: -.045em;
}
.brand-mark {
  display: grid;
  width: 2.35rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: .65rem;
  color: var(--paper);
  background: var(--blue);
  font-size: 1.32rem;
  letter-spacing: 0;
}
.brand-mark svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--paper); text-decoration: underline; }
.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: .55rem 1.08rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  line-height: 1.35;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.button-outline { border-color: var(--line); color: var(--ink); }
.button-outline:hover { border-color: #8aaaf0; background: rgba(255, 255, 255, .1); }
.button-primary { padding-inline: 1.32rem; background: var(--blue); color: var(--paper); }
.button-primary:hover { background: var(--blue-hover); }
.hero-copy .button:focus-visible { outline-color: var(--paper); }

.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background: radial-gradient(ellipse at 95% 20%, #203f76, transparent 60%), var(--navy);
  color: var(--paper);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 4.9rem);
}
.hero-copy { padding-top: clamp(.25rem, 3vw, 2.4rem); }
.hero h1 {
  font-size: clamp(2.3rem, 5.8vw, 4.5rem);
  max-width: 13ch;
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 780;
  text-wrap: balance;
}
.hero h1 .hero-emphasis { color: var(--blue-light); }
.hero h1 > .site-language-secondary {
  max-width: 17ch;
  margin-top: .45em;
  color: #c3d4f6;
  font-size: .43em;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.18;
}
.hero-lead {
  max-width: 33rem;
  margin: 1.15rem 0 1.6rem;
  color: #e1eaff;
  font-size: clamp(1rem, 2vw, 1.23rem);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-actions .button-outline { color: var(--paper); border-color: #83a1dc; }
.hero-actions .button-outline:hover { background: rgba(255, 255, 255, .12); }

.study { padding-block: clamp(2rem, 7vw, 5.4rem); }
.study > h2 { color: var(--paper); text-shadow: 0 2px 9px #081424, 0 1px 3px #081424; }
.study-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.study-grid section { padding: 1.2rem 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: .72rem; background: var(--panel); }
.study-grid p, .legal-grid p { margin-top: .55rem; color: var(--muted); }

.exam-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: .65rem 2rem;
  align-items: center;
  padding: clamp(1.1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: rgba(14, 30, 56, .79);
}
.exam h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
.exam p { margin-top: .35rem; color: var(--muted); }
.exam a { justify-self: start; }
.exam dl { grid-row: span 2; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.exam dl div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding-inline: .65rem; }
.exam dl div + div { border-left: 1px solid var(--line); }
.exam dt { color: var(--muted); font-size: .88rem; }
.exam dd { margin: 0; color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }

.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding-block: clamp(2rem, 5vw, 3.5rem); }
.legal-grid section { border: 1px solid var(--line); border-radius: .72rem; padding: clamp(1rem, 3vw, 1.5rem); background: var(--panel); overflow-wrap: anywhere; }
.legal-grid h2 { font-size: 1.24rem; }
.site-footer { background: rgba(10, 21, 40, .85); border-top: 1px solid var(--line); }
.footer-inner { justify-content: space-between; flex-wrap: wrap; min-height: 4.5rem; padding-block: .85rem; }
.footer-inner span { font-weight: 700; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; }
.footer-inner a { display: inline-flex; min-height: 2.3rem; justify-content: center; flex-direction: column; }

@media (max-width: 48rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .study-grid { grid-template-columns: 1fr; gap: .7rem; }
  .exam-panel { grid-template-columns: 1fr; gap: .9rem; }
  .exam dl { grid-row: auto; }
  .exam dl div:first-child { padding-left: 0; }
}

@media (max-width: 38rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 4rem; gap: .45rem .8rem; padding-block: .55rem; }
  .header-inner > kurs-language-switch { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .legal-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
