/* =========================================================
   RESET + BASE
========================================================= */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
img,svg{display:block;max-width:100%;height:auto}

:root{
  --header-h:72px;

  /* layout */
  --container:1160px;

  /* radius */
  --r-12:12px;
  --r-16:16px;
  --r-18:18px;
  --r-pill:999px;

  /* colors */
  --bg:#f5fbff;
  --panel:#fff;
  --panel-2:#f7fbff;
  --panel-3:#edf8ff;
  --border:rgba(16,48,72,.12);
  --border-2:rgba(16,48,72,.22);
  --muted:rgba(16,32,51,.72);
  --muted-2:rgba(16,32,51,.58);

  --accent:#38b6ff;
  --accent-hover:#0a95df;
  --accent-soft:rgba(56,182,255,.12);
  --accent-border:rgba(56,182,255,.34);

  --text:#102033;
  --text-dark:#102033;

  /* effects */
  --shadow:0 12px 30px rgba(15,56,86,.10);
}

html{
  scrollbar-gutter:stable;
  overflow-y:scroll;
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  padding-top:var(--header-h);
}

/* Links (bazowo) */
a{color:inherit}
/* nie wymuszamy białego na hover globalnie (psuje jasne elementy) */
a:hover{opacity:.92}

.cd-skip-link{
  position:fixed;
  left:16px;
  top:12px;
  z-index:3000;
  transform:translateY(-140%);
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 14px;
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-weight:800;
  text-decoration:none;
  box-shadow:var(--shadow);
}

.cd-skip-link:focus{
  transform:translateY(0);
  opacity:1;
}

/* Focus – dostępność */
:focus{outline:none}
:focus-visible{
  outline:2px solid rgba(56,182,255,.55);
  outline-offset:2px;
  border-radius:10px;
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto !important}
  *{transition:none !important;animation:none !important}
}

/* Scroll lock (np. przy otwartym menu) */
html.is-locked body{
  position:fixed;
  left:0;right:0;
  width:100%;
}

/* =========================================================
   COOKIE CONSENT
========================================================= */
.cd-cookie-banner{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:2600;
  color:var(--text);
  border-top:1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(56,182,255,.08), rgba(255,255,255,.92)),
    #fff;
  box-shadow:0 -18px 55px rgba(15,56,86,.12);
}

.cd-cookie-banner[hidden]{
  display:none !important;
}

.cd-cookie-banner__content{
  width:min(1180px, 100%);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  min-height:104px;
  padding:22px 24px;
}

.cd-cookie-banner p{
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
}

.cd-cookie-banner a{
  color:var(--accent-hover);
  font-weight:800;
  text-decoration:none;
  border-bottom:1px solid rgba(56,182,255,.45);
}

.cd-cookie-banner a:hover{
  opacity:1;
  border-bottom-color:rgba(56,182,255,.85);
}

.cd-cookie-banner__actions{
  flex:0 0 auto;
  display:flex;
  gap:10px;
}

.cd-cookie-banner__button{
  flex:0 0 auto;
  min-height:46px;
  padding:0 20px;
  border:1px solid rgba(56,182,255,.45);
  border-radius:999px;
  color:var(--text);
  font:inherit;
  font-size:14px;
  font-weight:850;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease, border-color .16s ease;
}

.cd-cookie-banner__button:hover{
  transform:translateY(-1px);
}

.cd-cookie-banner__button--primary{
  background:rgba(56,182,255,.14);
}

.cd-cookie-banner__button--primary:hover{
  border-color:rgba(56,182,255,.75);
  background:rgba(56,182,255,.20);
}

@media (max-width:640px){
  .cd-cookie-banner__content{
    align-items:stretch;
    flex-direction:column;
    gap:16px;
    min-height:150px;
    padding:18px 14px;
  }

  .cd-cookie-banner__button{
    width:100%;
  }
}

/* =========================================================
   LAYOUT WRAPPERS
========================================================= */
.cd-main{padding:26px 0 70px}

.cd-container{
  width:min(var(--container), 100%);
  margin:0 auto;
  padding:0 16px;
  min-width:0;
}

.cd-pagehead{padding:18px 0 16px}
.cd-pagehead__title{
  margin:0;
  font-size:clamp(28px, 3.2vw, 42px);
  letter-spacing:.2px;
}
.cd-pagehead__desc{
  margin:10px 0 0;
  opacity:.72;
  line-height:1.55;
  max-width:70ch;
}

/* =========================================================
   404
========================================================= */

.cd-error404-page{
  padding:0;
  min-height:calc(100vh - var(--header-h));
  min-height:calc(100svh - var(--header-h));
  display:grid;
}

.cd-error404-page .cd-container{
  display:grid;
}

.cd-error404{
  min-height:calc(100vh - var(--header-h));
  min-height:calc(100svh - var(--header-h));
  padding:42px 0 72px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 340px;
  gap:32px;
  align-items:center;
}

.cd-error404__content{
  max-width:760px;
}

.cd-error404__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin:0 0 14px;
  font-size:12px;
  font-weight:850;
  letter-spacing:0;
  text-transform:uppercase;
  color:var(--accent);
}

.cd-error404__eyebrow::before{
  content:"";
  width:26px;
  height:2px;
  border-radius:2px;
  background:currentColor;
}

.cd-error404__title{
  margin:0;
  font-size:clamp(42px, 7vw, 86px);
  line-height:1.02;
  font-weight:900;
  letter-spacing:0;
  text-wrap:balance;
}

.cd-error404__lead{
  margin:18px 0 0;
  max-width:66ch;
  color:var(--muted);
  line-height:1.7;
  font-size:18px;
}

.cd-error404__search{
  margin-top:28px;
  max-width:680px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

.cd-error404__searchlabel{
  display:block;
  margin:0 0 10px;
  color:var(--muted-2);
  font-size:12px;
  font-weight:800;
}

.cd-error404__searchrow{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:center;
}

.cd-error404__input{
  width:100%;
  height:46px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel-2);
  color:var(--text);
  padding:0 14px;
  font:inherit;
  outline:none;
}

.cd-error404__input:focus{
  border-color:var(--accent-border);
  box-shadow:0 0 0 3px var(--accent-soft);
}

.cd-error404__submit{
  height:46px;
  padding:0 18px;
  border:1px solid var(--accent);
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-weight:850;
  cursor:pointer;
  transition:transform .16s ease, filter .16s ease;
}

.cd-error404__submit:hover{
  transform:translateY(-1px);
  filter:brightness(.96);
}

.cd-error404__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:24px;
}

.cd-error404__button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border-radius:8px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight:850;
  transition:
    transform .2s ease,
    opacity .2s ease,
    background .2s ease,
    border-color .2s ease;
}

.cd-error404__button:hover{
  opacity:1;
  transform:translateY(-1px);
}

.cd-error404__button--primary{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
}

.cd-error404__button--ghost{
  background:var(--panel);
  color:var(--text);
  border-color:var(--border);
}

.cd-error404__panel{
  align-self:center;
  padding:20px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

.cd-error404__badge{
  display:block;
  margin:0 0 22px;
  color:rgba(56,182,255,.22);
  font-size:clamp(66px, 8vw, 104px);
  font-weight:900;
  line-height:.82;
  letter-spacing:0;
}

.cd-error404__panelkicker{
  margin:0;
  color:var(--accent);
  font-size:12px;
  font-weight:850;
  text-transform:uppercase;
}

.cd-error404__paneltitle{
  margin:6px 0 0;
  font-size:20px;
  line-height:1.2;
}

.cd-error404__list{
  list-style:none;
  margin:16px 0 0;
  padding:0;
}

.cd-error404__list li{
  padding:14px 0;
  border-top:1px solid var(--border);
}

.cd-error404__list time{
  display:block;
  margin:0 0 6px;
  color:var(--muted-2);
  font-size:12px;
}

.cd-error404__list a{
  color:var(--text);
  font-weight:850;
  line-height:1.35;
  text-decoration:none;
}

.cd-error404__list a:hover{
  opacity:1;
  text-decoration:underline;
  text-underline-offset:.18em;
}

.cd-error404__paneltext{
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

@media (max-width: 900px){
  .cd-error404{
    grid-template-columns:1fr;
    align-items:start;
  }

  .cd-error404__panel{
    align-self:start;
  }
}

@media (max-width: 640px){
  .cd-error404{
    padding:28px 0 56px;
    min-height:auto;
  }

  .cd-error404__lead{
    font-size:16px;
  }

  .cd-error404__searchrow{
    grid-template-columns:1fr;
  }

  .cd-error404__actions{
    flex-direction:column;
  }

  .cd-error404__button{
    width:100%;
  }

  .cd-error404__submit{
    width:100%;
  }
}

/* =========================================================
   GENERIC PAGES
========================================================= */

.cd-page{
  padding:34px 0 72px;
}

.cd-page__article{
  width:min(100%, 900px);
  margin:0 auto;
  padding:28px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

.cd-page__head{
  padding-bottom:16px;
  border-bottom:1px solid var(--border);
}

.cd-page__title{
  margin:0;
  font-size:38px;
  font-weight:900;
  letter-spacing:0;
  line-height:1.08;
  overflow-wrap:anywhere;
}

.cd-page__content{
  margin-top:22px;
  color:var(--muted);
  font-size:16px;
  line-height:1.75;
}

.cd-page__content > *:first-child{
  margin-top:0;
}

.cd-page__content > *:last-child{
  margin-bottom:0;
}

.cd-page__content h2,
.cd-page__content h3,
.cd-page__content h4{
  color:var(--text);
  line-height:1.2;
  letter-spacing:0;
}

.cd-page__content a{
  color:var(--text);
  text-underline-offset:.18em;
}

.cd-page__content img{
  border-radius:8px;
}

.cd-page__pagination{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:24px;
}

@media (max-width:640px){
  .cd-page{
    padding:22px 0 56px;
  }

  .cd-page__article{
    padding:20px;
  }

  .cd-page__title{
    font-size:28px;
  }
}

/* =========================================================
   LEGAL PAGES
========================================================= */

.cd-legal{
  padding:34px 0 78px;
  background:
    linear-gradient(180deg, rgba(56,182,255,.08), rgba(255,255,255,0) 250px),
    var(--bg);
}

.cd-legal .cd-container{
  width:min(1160px, calc(100% - 32px));
  padding:0;
}

.cd-legal-hero{
  padding:30px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

.cd-legal-kicker{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin:0 0 14px;
  color:var(--accent);
  font-size:12px;
  font-weight:850;
  line-height:1.2;
  text-transform:uppercase;
}

.cd-legal-kicker::before{
  content:"";
  width:26px;
  height:2px;
  border-radius:2px;
  background:currentColor;
}

.cd-legal-hero h1{
  max-width:820px;
  margin:0;
  font-size:clamp(36px, 5vw, 64px);
  font-weight:900;
  line-height:1.04;
  letter-spacing:0;
  text-wrap:balance;
}

.cd-legal-hero p:not(.cd-legal-kicker){
  max-width:760px;
  margin:18px 0 0;
  color:var(--muted);
  font-size:18px;
  line-height:1.7;
}

.cd-legal-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:22px;
  color:var(--muted-2);
  font-size:13px;
  line-height:1.35;
}

.cd-legal-layout{
  display:grid;
  grid-template-columns:270px minmax(0, 1fr);
  gap:24px;
  align-items:start;
  margin-top:24px;
}

.cd-legal-toc{
  position:sticky;
  top:calc(var(--header-h, 72px) + 16px);
  padding:18px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

body.admin-bar .cd-legal-toc{
  top:calc(var(--header-h, 72px) + 48px);
}

.cd-legal-toc p{
  margin:0 0 12px;
  color:var(--accent);
  font-size:12px;
  font-weight:850;
  text-transform:uppercase;
}

.cd-legal-toc nav{
  display:grid;
  gap:6px;
}

.cd-legal-toc a{
  display:flex;
  align-items:center;
  min-height:36px;
  padding:8px 10px;
  border-radius:6px;
  color:var(--muted);
  text-decoration:none;
  line-height:1.25;
  transition:background .14s ease, color .14s ease;
}

.cd-legal-toc a:hover{
  opacity:1;
  color:var(--text);
  background:var(--panel-3);
}

.cd-legal-card{
  padding:30px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

.cd-legal-callout{
  margin:0 0 30px;
  padding:16px 18px;
  border:1px solid rgba(56,182,255,.22);
  border-left:3px solid rgba(56,182,255,.62);
  border-radius:8px;
  background:rgba(56,182,255,.08);
  color:var(--muted);
  line-height:1.65;
}

.cd-legal-callout strong{
  color:var(--text);
}

.cd-legal-section{
  scroll-margin-top:calc(var(--header-h, 72px) + 24px);
  color:var(--muted);
  font-size:16px;
  line-height:1.78;
}

body.admin-bar .cd-legal-section{
  scroll-margin-top:calc(var(--header-h, 72px) + 56px);
}

.cd-legal-section + .cd-legal-section{
  margin-top:32px;
  padding-top:26px;
  border-top:1px solid var(--border);
}

.cd-legal-section h2{
  margin:0 0 14px;
  color:var(--text);
  font-size:26px;
  font-weight:850;
  line-height:1.16;
  letter-spacing:0;
  text-wrap:balance;
}

.cd-legal-section p{
  margin:0;
}

.cd-legal-section address{
  margin:14px 0 0;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--panel-2);
  color:var(--text);
  font-style:normal;
  line-height:1.7;
}

.cd-legal-section code{
  padding:.12em .38em;
  border:1px solid var(--border);
  border-radius:6px;
  background:var(--panel-2);
  color:var(--accent-hover);
  font-size:.92em;
}

.cd-legal-section p + p,
.cd-legal-section p + ul,
.cd-legal-section address + p,
.cd-legal-section ul + p{
  margin-top:14px;
}

.cd-legal-section ul{
  margin:0;
  padding-left:22px;
}

.cd-legal-section li + li{
  margin-top:8px;
}

.cd-legal-section a{
  color:var(--text);
  text-underline-offset:.2em;
}

@media (max-width:900px){
  .cd-legal-layout{
    grid-template-columns:1fr;
  }

  .cd-legal-toc{
    position:static;
  }

  .cd-legal-toc nav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:640px){
  .cd-legal{
    padding:22px 0 56px;
  }

  .cd-legal .cd-container{
    width:min(100% - 24px, 1160px);
  }

  .cd-legal-hero,
  .cd-legal-card,
  .cd-legal-toc{
    padding:18px;
  }

  .cd-legal-hero p:not(.cd-legal-kicker){
    font-size:16px;
  }

  .cd-legal-toc nav{
    grid-template-columns:1fr;
  }

  .cd-legal-section h2{
    font-size:22px;
  }
}
