/* TASK-016 — minimalistyczny styl stron formalnych (REQ-023).
   TASK-023 — ciemny motyw z akcentami pomarańczowymi spójnymi z img/logo.png (REQ-027):
   tło czarne/prawie czarne, tekst jasny/biały, akcent w rodzinie odcienia ~28° HSL (ref. #f07000),
   wszystkie pary tekst/tło zweryfikowane na kontrast ≥ 4.5:1 (WCAG 2.1 AA). */
:root {
  color-scheme: dark;
  --bp-bg: #0a0a0a;
  --bp-surface: rgba(20, 20, 22, 0.92);
  --bp-surface-strong: rgba(32, 32, 35, 0.95);
  --bp-text: #f5f7fa;
  --bp-muted: #9aa3ad;
  --bp-border: rgba(255, 255, 255, 0.14);
  --bp-accent: #f48525;
  --bp-accent-soft: rgba(244, 133, 37, 0.16);
  --bp-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --bp-radius: 24px;
  --bp-max-width: 76rem;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bp-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bp-bg);
  color: var(--bp-text);
}

body[dir="rtl"] {
  font-family: "SF Pro Text", "Segoe UI", Tahoma, sans-serif;
}

a {
  color: var(--bp-accent);
}

img {
  max-width: 100%;
}

.bp-formal-shell {
  width: min(calc(100% - 2rem), var(--bp-max-width));
  margin: 0 auto;
  padding: 1.25rem 0 7rem;
}

.bp-formal-header,
.bp-formal-intro,
.bp-formal-content,
.bp-formal-footer {
  background: var(--bp-surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--bp-border);
  box-shadow: var(--bp-shadow);
}

.bp-formal-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.5rem;
  margin-top: 1rem;
  height: 5rem;
}

.bp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  width: fit-content;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.bp-brand img {
  width: auto;
  /* TASK-027 — logo 1.5× (REQ-031): 2.25rem * 1.5 = 3.375rem. */
  height: 6rem;
  border-radius: 0.4rem;
}

.bp-header-tools {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bp-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.bp-header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--bp-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--bp-text);
  font-weight: 600;
  text-decoration: none;
}

.bp-header-nav a:hover,
.bp-header-nav a:focus-visible,
.bp-header-nav a.is-active {
  border-color: var(--bp-accent);
  background: var(--bp-accent-soft);
  color: var(--bp-accent);
}

.bp-header-nav a:focus-visible,
.bp-language-picker select:focus-visible,
.bp-consent__button:focus-visible {
  outline: 3px solid var(--bp-accent-soft);
  outline-offset: 2px;
}

.bp-language-picker {
  display: inline-flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 18rem;
  font-weight: 600;
  color: var(--bp-muted);
}

.bp-language-picker select {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid var(--bp-border);
  background: var(--bp-surface-strong);
  color: var(--bp-text);
  font: inherit;
}

.bp-formal-intro {
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: var(--bp-radius);
}

.bp-formal-kicker,
.bp-consent__eyebrow {
  margin: 0 0 0.6rem;
  color: var(--bp-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bp-formal-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.1;
}

.bp-formal-summary {
  max-width: 40rem;
  margin: 1rem 0 0;
  color: var(--bp-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.bp-formal-content {
  padding: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 1rem;
  border-radius: var(--bp-radius);
  line-height: 1.72;
}

.bp-formal-content :is(h2, h3, h4) {
  color: var(--bp-text);
  line-height: 1.25;
}

.bp-formal-content h2 {
  margin-top: 2rem;
  font-size: 1.55rem;
}

.bp-formal-content h3 {
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.bp-formal-content p,
.bp-formal-content li,
.bp-formal-content td,
.bp-formal-content th {
  color: var(--bp-text);
}

.bp-formal-content p:first-child {
  margin-top: 0;
}

.bp-formal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--bp-border);
}

.bp-formal-content th,
.bp-formal-content td {
  padding: 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid var(--bp-border);
}

.bp-formal-content th {
  background: var(--bp-surface-strong);
  text-align: left;
}

.bp-formal-content code {
  padding: 0.12rem 0.35rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bp-formal-content blockquote {
  margin: 1.5rem 0;
  padding-inline-start: 1rem;
  border-inline-start: 4px solid var(--bp-accent);
  color: var(--bp-muted);
}

.bp-feedback {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: var(--bp-surface-strong);
  color: var(--bp-muted);
}

.bp-feedback h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.bp-formal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  border-radius: 1.4rem;
  color: var(--bp-muted);
}

[data-consent-root] {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 20;
  padding: 1rem;
}

.bp-consent {
  width: min(calc(100% - 2rem), 70rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 27, 45, 0.96);
  color: #f8fbff;
  box-shadow: 0 -12px 40px rgba(15, 27, 45, 0.28);
}

.bp-consent h2,
.bp-consent p {
  margin: 0;
}

.bp-consent__copy {
  display: grid;
  gap: 0.55rem;
}

.bp-consent__button {
  min-height: 2.9rem;
  padding: 0.8rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f6a34c, var(--bp-accent));
  color: #1a0f00;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 48rem) {
  .bp-formal-shell {
    padding-top: 1.75rem;
  }

  .bp-formal-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
  }

  .bp-header-tools {
    align-items: center;
    flex-direction: row;
  }

  .bp-language-picker {
    align-items: flex-start;
  }

  .bp-consent {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
  }

  .bp-consent__button {
    flex: 0 0 auto;
    min-width: 10rem;
  }
}

/* TASK-026 — ukrywa wizualnie etykietę tekstową przełącznika języka, zachowując ją w drzewie
   dostępności (REQ-030): <select data-language-select> pozostaje w pełni funkcjonalny i widoczny,
   ale bez towarzyszącego opisowego tekstu zajmującego miejsce w nagłówku. */
.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;
}
