/* Akademia DGSI — barwy z logo: mięta #71C2AF, jasna zieleń #BBDCB1, oliwka #72786A, morski #427068 */
:root, [data-md-color-scheme="default"] {
  --md-primary-fg-color: #0C0F0E;
  --md-primary-fg-color--light: #1C2220;
  --md-primary-fg-color--dark: #0C0F0E;
  --md-primary-bg-color: #FFFFFF;
  --md-accent-fg-color: #427068;
  --md-typeset-a-color: #335A53;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0C0F0E;
  --md-primary-fg-color--light: #141917;
  --md-primary-fg-color--dark: #080A09;
  --md-accent-fg-color: #71C2AF;
  --md-typeset-a-color: #71C2AF;
  --md-default-bg-color: #0C0F0E;
}
.md-header { border-bottom: 3px solid #71C2AF; }
.md-tabs { background-color: var(--md-primary-fg-color--light); }
.md-typeset h1 { font-weight: 700; letter-spacing: -.01em; }
.md-typeset .grid.cards > ul > li { border-radius: 12px; border-top: 3px solid #427068; }
.md-typeset .grid.cards > ul > li:hover { border-color: #71C2AF; }

/* wideo YouTube 16:9 */
.wideo { position: relative; aspect-ratio: 16 / 9; margin: 0 0 2rem; border-radius: 12px; overflow: hidden; background: #000; }
.wideo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

video { max-width: 100%; border: 1px solid var(--md-default-fg-color--lightest); border-radius: 8px; }
.md-typeset img { border: 1px solid var(--md-default-fg-color--lightest); border-radius: 8px; }
@media print {
  .md-header, .md-tabs, .md-sidebar, .md-footer, .md-top { display: none !important; }
  video, .wideo, .wideo-yt iframe { display: none; }
}

/* nagłówek zawsze grafitowy (motyw Zensical ignoruje primary: custom) */
.md-header { background-color: #0C0F0E !important; color: #FFFFFF !important; }
.md-header .md-header__title, .md-header .md-header__button, .md-header .md-icon { color: #FFFFFF !important; }
.md-tabs { background-color: #141917 !important; color: #DDE5E9 !important; }
.md-tabs__link--active, .md-tabs__item--active .md-tabs__link { color: #71C2AF !important; }
.md-header .md-search__form { background-color: rgba(255,255,255,.1); }
.md-header .md-search__input, .md-header .md-search__input::placeholder { color: #FFFFFF; }
.md-header .md-logo img { height: 1.6rem; width: auto; }

/* filmy YouTube — miniatura, odtwarzanie po kliknięciu */
.wideo-yt { position: relative; display: block; aspect-ratio: 16 / 9; margin: 0 0 2rem; border-radius: 12px; overflow: hidden; background: #000; }
.wideo-yt img { width: 100%; height: 100%; object-fit: cover; border: 0 !important; border-radius: 0 !important; opacity: .9; transition: opacity .2s; }
.wideo-yt:hover img { opacity: 1; }
.wideo-yt .graj { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(12,15,14,.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 76'%3E%3Cpath d='M31 24l22 14-22 14z' fill='%2371C2AF'/%3E%3C/svg%3E"); border: 2px solid #71C2AF; }
.wideo-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* kalkulatory */
.md-typeset .kalk { border: 1px solid var(--md-default-fg-color--lightest); border-radius: 14px; padding: 1.2rem; margin: 0 0 1.5rem; display: grid; gap: .9rem; }
.md-typeset .kalk .pola { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.md-typeset .kalk label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .75rem; }
.md-typeset .kalk input, .md-typeset .kalk select { font: inherit; font-weight: 400; font-size: .8rem; padding: .55rem .7rem; min-height: 2.4rem; border: 1px solid var(--md-default-fg-color--lighter); border-radius: 8px; background: var(--md-default-bg-color); color: var(--md-default-fg-color); }
.md-typeset .kalk .wynik { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; background: var(--md-code-bg-color); border-radius: 10px; padding: .9rem; }
.md-typeset .kalk .wynik div { display: flex; flex-direction: column; }
.md-typeset .kalk .wynik span { font-size: .7rem; opacity: .75; }
.md-typeset .kalk .wynik b { font-family: var(--md-code-font-family); font-size: 1.05rem; }
.md-typeset .kalk .ocena { margin: 0; font-weight: 600; font-size: .75rem; }

/* cookies (wspólne ze stroną główną) */
.dgsi-cookie{position:fixed;left:16px;right:16px;bottom:16px;z-index:200;max-width:760px;margin:0 auto;background:#0C0F0E;color:#E9EEEA;border:1px solid rgba(113,194,175,.4);border-radius:16px;padding:18px 20px;display:flex;flex-wrap:wrap;gap:14px 20px;align-items:center;justify-content:space-between;box-shadow:0 20px 50px rgba(0,0,0,.4);font-size:15px;line-height:1.5}
.dgsi-cookie p{margin:0;flex:1 1 360px}
.dgsi-cookie a{color:#71C2AF}
.dgsi-cookie div{display:flex;gap:10px;flex-wrap:wrap}
.dgsi-cookie button{font:inherit;font-weight:600;min-height:44px;padding:8px 18px;border-radius:999px;border:1px solid rgba(233,238,234,.3);background:transparent;color:#E9EEEA;cursor:pointer}
.dgsi-cookie button.glowny{background:#71C2AF;border-color:#71C2AF;color:#0C0F0E}

/* nagłówek i zakładki — gradient i siatka jak na stronie głównej */
.md-header, .md-tabs {
  background-image:
    linear-gradient(rgba(233,238,234,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,238,234,.045) 1px, transparent 1px),
    radial-gradient(700px 160px at 85% 0%, rgba(113,194,175,.18), transparent 70%),
    radial-gradient(600px 160px at 8% 100%, rgba(66,112,104,.26), transparent 70%) !important;
  background-size: 48px 48px, 48px 48px, auto, auto !important;
}

/* przełącznik trybu: słońce | księżyc */
.md-header__option[data-md-component="palette"] .md-header__button {
  position: relative; width: 3rem; height: 1.5rem; margin: 0 .4rem; padding: 0; align-self: center;
  border-radius: 999px; border: 1px solid rgba(113,194,175,.5); background: rgba(255,255,255,.08); cursor: pointer;
}
.md-header__option[data-md-component="palette"] .md-header__button svg { display: none; }
.md-header__option[data-md-component="palette"] .md-header__button::before {
  content: ""; position: absolute; inset: 0; opacity: .55;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E9EEEA' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E") .3rem 50% / .8rem no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E9EEEA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E") right .3rem top 50% / .8rem no-repeat;
}
.md-header__option[data-md-component="palette"] .md-header__button::after {
  content: ""; position: absolute; top: .12rem; left: .12rem; width: 1.16rem; height: 1.16rem; border-radius: 50%;
  background: #71C2AF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230C0F0E' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E") center / .75rem no-repeat;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
[data-md-color-scheme="slate"] .md-header__option[data-md-component="palette"] .md-header__button::after {
  left: calc(100% - 1.28rem);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230C0F0E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E");
  animation: dgsi-w-prawo .25s ease-out;
}
[data-md-color-scheme="default"] .md-header__option[data-md-component="palette"] .md-header__button::after { animation: dgsi-w-lewo .25s ease-out; }
@keyframes dgsi-w-prawo { from { left: .12rem; } }
@keyframes dgsi-w-lewo { from { left: calc(100% - 1.28rem); } }
.md-header__option[data-md-component="palette"] .md-header__button:hover { border-color: #71C2AF; }
@media (prefers-reduced-motion: reduce) { .md-header__option[data-md-component="palette"] .md-header__button::after { animation: none !important; } }

/* Strefa klienta w nagłówku Akademii */
.dgsi-strefa { display: inline-flex; align-items: center; gap: .35rem; align-self: center; margin: 0 .4rem; padding: .3rem .8rem; border-radius: 999px; background: #71C2AF; color: #0C0F0E !important; font-weight: 600; font-size: .7rem; white-space: nowrap; text-decoration: none; transition: background .2s; }
.dgsi-strefa:hover { background: #BBDCB1; }
.dgsi-strefa svg { width: .9rem; height: .9rem; flex: none; }
@media (max-width: 44.984375em) { .dgsi-strefa { padding: .35rem; } .dgsi-strefa span { display: none; } }

/* logo DGSI (powrót na stronę główną) widoczne także na tablecie i telefonie */
@media screen and (max-width: 76.234375em) {
  .md-header__button.md-logo { display: inline-block !important; order: 1; margin: .2rem .2rem .2rem 0; padding: .4rem 0; }
  .md-header__button.md-logo img { height: 1.3rem !important; }
  .md-header__inner > label[for="__drawer"] { order: 0; }
  .md-header__title { order: 2; }
  .md-header__option, .md-header__inner > label[for="__search"], .md-search, .dgsi-strefa, .md-header__source { order: 3; }
}
@media screen and (max-width: 30em) { .md-header__title { display: none; } .md-header__inner > label[for="__search"] { margin-left: auto; } }

/* Kafle Akademii: ramka gradientowa w barwach firmowych + uniesienie z cieniem pod kursorem (jak na stronie głównej) */
.md-typeset .grid.cards > ul > li { position: relative; border: 1px solid transparent !important; transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s; }
.md-typeset .grid.cards > ul > li::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #71C2AF 0%, #BBDCB1 28%, #427068 62%, #72786A 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .8; transition: opacity .25s, padding .25s; pointer-events: none; }
.md-typeset .grid.cards > ul > li:hover, .md-typeset .grid.cards > ul > li:focus-within { transform: translateY(-5px) scale(1.015); box-shadow: 0 24px 50px rgba(24,32,28,.16), 0 8px 18px rgba(24,32,28,.08), 0 0 30px rgba(113,194,175,.28); z-index: 1; }
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li:hover { box-shadow: 0 22px 44px rgba(0,0,0,.55), 0 8px 16px rgba(0,0,0,.35), 0 0 34px rgba(113,194,175,.30); }
.md-typeset .grid.cards > ul > li:hover::before, .md-typeset .grid.cards > ul > li:focus-within::before { opacity: 1; padding: 2px; }
@media (hover: none), (prefers-reduced-motion: reduce) { .md-typeset .grid.cards > ul > li:hover { transform: none; } }

/* Strefa klienta — stan zalogowania (akademia.js) */
.dgsi-strefa { position: relative; }
.dgsi-strefa.zalogowany span { display: inline-flex; flex-direction: column; line-height: 1.1; }
.dgsi-strefa.zalogowany small { font-size: .55rem; font-weight: 600; opacity: .8; max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dgsi-strefa .kropka-zal { position: absolute; left: 1.15rem; top: .2rem; width: .45rem; height: .45rem; border-radius: 50%; background: #2E9E6B; box-shadow: 0 0 0 2px #71C2AF; }
@media (max-width: 44.984375em) { .dgsi-strefa .kropka-zal { left: auto; right: .1rem; top: .1rem; } }
/* Czcionki lokalne (/assets/fonty.css; mkdocs.yml font: false — bez Google Fonts) */
:root{--md-text-font:"Source Sans 3";--md-code-font:"JetBrains Mono"}
