/* Wspólne elementy wszystkich stron: dostępność (fokus, link „Przejdź do treści”,
   ograniczenie animacji), stopka z dokumentami prawnymi, informacja o cookies
   i układ stron tekstowych (regulamin, polityka prywatności, dostępność).
   Kolory spełniają WCAG 2.1 AA: tekst ≥ 4,5:1, elementy interfejsu ≥ 3:1. */
:root{
  --site-bg:#EFE6D9; --site-paper:#FAF3E7; --site-paper2:#FFF9EE; --site-ink:#2E2419;
  --site-coffee:#6B4F38; --site-muted:#6E5C49; --site-accent:#7E5A2F; --site-line:#DAC9B2;
  --site-border:#A08A72; --site-focus:#1F5FBF;
}

/* Fokus widoczny zawsze przy obsłudze klawiaturą (WCAG 2.4.7 / 2.4.11). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible{
  outline:3px solid var(--site-focus);
  outline-offset:2px;
  border-radius:6px;
}
:where(input, select, textarea):focus-visible{ outline-offset:1px; }
/* Nagłówki i <main> dostają fokus programowo (po zmianie widoku), żeby czytnik ekranu
   odczytał nową treść — nie są elementami interaktywnymi, więc bez obramowania. */
:where(h1, h2, main)[tabindex="-1"]:focus{ outline:none; }

.skip-link{
  position:absolute; left:12px; top:-60px; z-index:2000;
  background:var(--site-ink); color:#FFF6E8; font-weight:800; font-size:15px;
  padding:12px 18px; border-radius:10px; text-decoration:none;
  transition:top .15s ease;
}
.skip-link:focus{ top:12px; }

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

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

.text-link{ color:var(--site-accent); font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.text-link:hover{ color:var(--site-ink); }

/* Pasek „wersja demonstracyjna” */
.demo-ribbon{
  background:var(--site-ink); color:#F3E3CD; font-size:13px; font-weight:700;
  text-align:center; padding:7px 16px; line-height:1.45;
}
.demo-ribbon a{ color:#FFE3B8; text-decoration:underline; text-underline-offset:2px; }

/* Stopka z dokumentami prawnymi */
.legal-footer{
  border-top:4px solid var(--site-line); background:var(--site-paper);
  color:var(--site-muted); font-size:14px; line-height:1.6; padding:22px 0 26px;
}
.legal-footer .legal-in{ max-width:1120px; margin:0 auto; padding:0 22px; display:flex; flex-wrap:wrap; gap:10px 28px; justify-content:space-between; align-items:flex-start; }
.legal-footer b{ color:var(--site-ink); }
.legal-footer nav ul{ list-style:none; display:flex; flex-wrap:wrap; gap:6px 18px; margin:0; padding:0; }
.legal-footer nav a{ color:var(--site-coffee); font-weight:800; text-decoration:underline; text-underline-offset:3px; display:inline-block; padding:4px 0; }
.legal-footer nav a:hover{ color:var(--site-ink); }
.legal-footer small{ display:block; font-size:13px; }
.legal-footer small a{ color:var(--site-coffee); font-weight:700; text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }

/* Informacja o plikach cookies — nie blokuje strony (tylko niezbędne cookies). */
.cookie-note{
  position:fixed; z-index:1500; left:50%; bottom:16px; transform:translateX(-50%);
  width:min(640px, calc(100% - 24px));
  background:var(--site-ink); color:#FBEFDD; border-radius:16px;
  box-shadow:0 14px 34px rgba(46,36,25,.35);
  padding:16px 18px; display:flex; gap:14px; align-items:center; flex-wrap:wrap;
  font-size:14px; line-height:1.55;
}
.cookie-note p{ flex:1 1 300px; margin:0; }
.cookie-note a{ color:#FFE3B8; font-weight:800; text-decoration:underline; text-underline-offset:2px; }
.cookie-note button{
  font:inherit; font-weight:800; border:0; border-radius:12px; cursor:pointer;
  background:#FFF6E8; color:var(--site-ink); padding:11px 18px; min-height:44px;
}
.cookie-note button:hover{ background:#FFFFFF; }
.cookie-note button:focus-visible{ outline-color:#FFE3B8; }
@media print{ .cookie-note, .demo-ribbon{ display:none!important; } }

/* Strony tekstowe: regulamin, polityka prywatności, dostępność, 404 */
.doc-page{
  font-family:'Trebuchet MS','Segoe UI',Verdana,sans-serif; background:var(--site-bg); color:var(--site-ink);
  margin:0; line-height:1.65; font-size:16.5px;
  min-height:100vh; display:flex; flex-direction:column;
}
.doc-page > main{ flex:1 0 auto; width:100%; }
.doc-page *{ box-sizing:border-box; }
.doc-header{ border-bottom:4px solid var(--site-line); }
.doc-header .in{ max-width:880px; margin:0 auto; padding:13px 22px; display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; }
.doc-header img{ width:140px; height:auto; display:block; }
.doc-header nav{ display:flex; gap:6px 16px; flex-wrap:wrap; }
.doc-header nav a{ color:var(--site-coffee); font-weight:800; font-size:15px; padding:8px 4px; text-decoration:none; }
.doc-header nav a:hover, .doc-header nav a[aria-current="page"]{ color:var(--site-ink); text-decoration:underline; text-underline-offset:4px; }
.page-narrow{ max-width:880px; margin:0 auto; padding:30px 22px 56px; }
.doc{ background:var(--site-paper); border-radius:14px; padding:clamp(20px, 4vw, 40px); box-shadow:0 10px 26px rgba(122,92,67,.12); }
.doc h1{ font-size:clamp(26px, 4vw, 36px); line-height:1.15; margin:0 0 8px; letter-spacing:-.02em; }
.doc h2{ font-size:clamp(19px, 2.6vw, 23px); line-height:1.25; margin:34px 0 10px; padding-top:6px; border-top:2px solid var(--site-line); }
.doc h3{ font-size:17.5px; margin:22px 0 6px; }
.doc p, .doc li{ color:#3B2F24; }
.doc p{ margin:0 0 12px; }
.doc ul, .doc ol{ margin:0 0 14px; padding-left:24px; }
.doc li{ margin-bottom:6px; }
.doc a{ color:var(--site-accent); font-weight:700; text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.doc .meta{ color:var(--site-muted); font-size:14.5px; margin-bottom:18px; }
.doc .callout{ background:var(--site-paper2); border-left:5px solid var(--site-accent); border-radius:6px; padding:14px 16px; margin:16px 0; }
.doc .callout p:last-child{ margin-bottom:0; }
.doc .toc{ background:var(--site-paper2); border-radius:10px; padding:14px 18px; margin:18px 0 6px; }
.doc .toc ol{ margin:6px 0 0; }
.doc .table-wrap{ overflow-x:auto; margin:12px 0 16px; -webkit-overflow-scrolling:touch; }
.doc table{ border-collapse:collapse; width:100%; min-width:520px; font-size:15px; }
.doc th, .doc td{ border:1px solid var(--site-line); padding:9px 11px; text-align:left; vertical-align:top; }
.doc th{ background:var(--site-paper2); }
.doc caption{ text-align:left; font-weight:800; margin-bottom:6px; }
.doc address{ font-style:normal; }
@media print{
  .doc-page{ background:#fff; }
  .doc{ box-shadow:none; padding:0; }
  .doc-header nav, .legal-footer nav{ display:none; }
}

/* Znak RoyalLoyal w nagłówkach stron tekstowych (polityka, regulamin serwisu, 404). */
.brand{ display:inline-flex; align-items:center; gap:10px; color:var(--site-ink); text-decoration:none; font-weight:800; font-size:20px; letter-spacing:-.02em; }
.brand img{ width:40px; height:40px; display:block; }
.brand small{ display:block; font-size:11.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--site-muted); font-weight:800; margin-top:1px; }
.doc-header .brand img{ width:40px; }
