/* WCAG Akademia – Code Lab 2.0. Scoped; no framework dependency. */
.code-lab{--cl-ink:#102538;--cl-muted:#465a6c;--cl-teal:#087d81;--cl-navy:#102b49;--cl-border:#dbe5eb;--cl-bg:#f5f9fb;--cl-focus:#be4a00;max-width:1180px;margin-inline:auto;padding:32px 20px 80px;color:var(--cl-ink);font-size:1rem;line-height:1.65;min-width:0}
.code-lab *,.code-lab *::before,.code-lab *::after{box-sizing:border-box}
.code-lab :is(a,button,input,summary):focus-visible,.code-lab pre:focus-visible{outline:3px solid var(--cl-focus)!important;outline-offset:4px!important}
.code-lab h1,.code-lab h2,.code-lab h3,.code-lab h4{line-height:1.25;letter-spacing:-.025em;color:var(--cl-ink)}
.code-lab h2{font-size:clamp(1.45rem,2.8vw,2.05rem)}
.code-lab h3{font-size:1.25rem}
.code-lab h4{font-size:1rem;margin:0 0 8px}
.code-lab p{max-width:78ch}
.code-lab-kicker{margin:0 0 12px;font-size:.78rem;font-weight:800;letter-spacing:.12em;color:#075b61}
.code-lab-hero{position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(115deg,#eefafa 0%,#eff5fb 58%,#f8fbfd 100%);border:1px solid #d7e5ee;border-radius:24px;padding:clamp(26px,5vw,64px);margin:0 0 26px}
.code-lab-hero::after{content:'</>';position:absolute;right:4%;top:5%;font:bold clamp(5rem,12vw,10rem)/1 ui-monospace,monospace;color:#0a6d7b;opacity:.065;z-index:-1}
.code-lab-hero__pill{display:inline-block;background:#d9f5f0;border:1px solid #a4dcd3;border-radius:999px;padding:5px 13px;font-size:.81rem;font-weight:750;color:#074c4c}
.code-lab-hero h1{max-width:17ch;margin:20px 0;font-size:clamp(2rem,5vw,3.35rem);font-weight:800}
.code-lab-hero h1 span{color:#086e76}
.code-lab-hero__lead{font-size:clamp(1.05rem,1.7vw,1.2rem);color:#354f63;max-width:68ch}
.code-lab-hero__actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}
.code-lab-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:11px 20px;border:2px solid var(--cl-navy);background:var(--cl-navy);color:#fff!important;border-radius:11px;font-size:1rem;font-weight:700;line-height:1.3;text-decoration:none!important;cursor:pointer;transition:background .15s,color .15s}
.code-lab-button:hover{background:#245479;border-color:#245479;color:#fff!important}
.code-lab-button--outline{background:transparent;color:var(--cl-navy)!important}
.code-lab-button--outline:hover{color:#fff!important}
.code-lab-button--small{font-size:.93rem;padding:8px 16px;min-height:44px}
.code-lab-hero__meta{display:flex;flex-wrap:wrap;gap:12px 26px;border-top:1px solid #c9dee4;margin-top:30px;padding-top:18px;color:#3d5965;font-size:.88rem;font-weight:650}
.code-lab-hero__meta span::before{content:'✓';font-weight:900;color:#00756d;margin-right:9px}
.code-lab-rule{border-left:5px solid #118f8e;background:#eaf7f5;border-radius:0 12px 12px 0;padding:17px 22px;margin:0 0 22px}
.code-lab-toc{border:1px solid var(--cl-border);border-radius:16px;padding:20px 24px;background:#fff;box-shadow:0 6px 24px rgba(22,54,75,.035)}
.code-lab-toc strong{display:block;margin-bottom:12px}
.code-lab-toc ul{display:flex;flex-wrap:wrap;list-style:none;gap:10px;padding:0;margin:0}
.code-lab-toc a{display:inline-block;color:#0d415e;text-decoration:none;border:1px solid #d5e3eb;background:#f5f9fb;border-radius:999px;padding:8px 14px;font-weight:650}
.code-lab-toc a:hover{background:#e5f3f5;text-decoration:underline}
.code-lab-section{padding-top:45px;scroll-margin-top:90px}
.code-lab-section__heading{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(420px,560px);
    align-items:end;
    gap:28px;
    margin-bottom:22px;
    padding-bottom:17px;
    border-bottom:1px solid var(--cl-border);
}
.code-lab-section__heading h2{margin:0}
.code-lab-section__heading>p{
    color:var(--cl-muted);
    max-width:58ch;
    width:100%;
    margin:0;
    justify-self:end;
    font-size:1.02rem;
    line-height:1.65;
}
.code-lab-example{overflow:hidden;min-width:0;background:#fff;border:1px solid var(--cl-border);border-radius:18px;margin:0 0 22px;box-shadow:0 9px 30px rgba(22,45,67,.055)}
.code-lab-example__head{display:flex;align-items:start;gap:17px;padding:23px 25px;background:linear-gradient(90deg,#f6fafa,#fff);border-bottom:1px solid var(--cl-border)}
.code-lab-example__head h3{margin:0 0 6px}
.code-lab-example__head p{margin:0;color:var(--cl-muted)}
.code-lab-example__number{flex:none;display:grid;place-items:center;width:43px;height:43px;background:#e0f4f1;border-radius:12px;color:#035e61;font-weight:800}
.code-lab-example__preview{padding:22px 25px;border-bottom:1px solid var(--cl-border)}
.code-lab-example__stage{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:20px;background:#f4f9fb;border:1px dashed #a5bfcc;border-radius:12px;min-width:0}
.code-lab-example__stage label{font-weight:700}
.code-lab-example__stage input{padding:9px 12px;border:1px solid #788d9b;border-radius:8px;max-width:100%;min-height:44px}
.code-lab-demo-link{color:#064b7a;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.code-lab-demo-button{padding:10px 18px;min-height:44px;border:2px solid #0a5966;border-radius:9px;background:#0a5966;color:#fff;font:inherit;cursor:pointer}
.code-lab-demo-status{font-weight:650;color:#005e50}
.code-lab-demo-table{border-collapse:collapse;background:#fff;width:min(100%,420px)}
.code-lab-demo-table caption{text-align:left;font-weight:700;padding-bottom:8px}
.code-lab-demo-table th,.code-lab-demo-table td{border:1px solid #a2b5c0;padding:9px 13px;text-align:left}
.code-lab-example__columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:23px 25px}
.code-lab-example__columns>section{min-width:0;padding:16px;border:1px solid var(--cl-border);border-radius:12px}
.code-lab-example__good{background:#f0faf5}
.code-lab-example__bad{background:#fff7f4}
.code-lab-tag{display:inline-block;font-size:.8rem;font-weight:800;margin:0 0 11px!important;padding:5px 11px;border-radius:999px}
.code-lab-tag--good{background:#cfecda;color:#15502c}
.code-lab-tag--bad{background:#f9dbd1;color:#822d19}
.code-lab pre{display:block;max-width:100%;overflow-x:auto;white-space:pre;tab-size:2;padding:17px;border-radius:10px;margin:0;background:#152737;color:#f2f7fb;font: .89rem/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;overscroll-behavior-x:contain}
.code-lab pre code{color:inherit;background:transparent;font:inherit}
.code-lab details{background:#fff;border:1px solid #d2dfe5;border-radius:10px;margin-top:12px;min-width:0}
.code-lab details summary{padding:12px 15px;cursor:pointer;font-weight:700;color:#073f63}
.code-lab details[open] summary{border-bottom:1px solid #d2dfe5}
.code-lab details pre{margin:12px}
.code-lab-example__bad>p:not(.code-lab-tag){margin:0 0 12px}
.code-lab-example__notes{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:0 25px;padding:20px 0;border-top:1px solid var(--cl-border)}
.code-lab-example__notes p{margin:0;color:var(--cl-muted)}
.code-lab-example__criteria{background:#f6f9fb;padding:15px 25px;font-size:.9rem}
.code-lab-example__criteria ul{list-style:none;display:inline-flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 0 10px}
.code-lab-example__criteria li{padding:3px 9px;border:1px solid #cbdce4;border-radius:7px;background:#fff;font-weight:700}
.code-lab-quiz__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.code-lab-question{min-width:0;margin:0;border:1px solid var(--cl-border);border-radius:17px;padding:23px;background:#fff;box-shadow:0 7px 24px rgba(22,45,67,.055)}
.code-lab-question legend{float:left;width:100%;margin:0 0 18px;padding:0;font-weight:800;font-size:1.06rem;line-height:1.45}
.code-lab-question legend+*{clear:both}
.code-lab-question__number{display:inline-block;color:#006a70;margin-right:9px}
.code-lab-question__option{display:flex;gap:12px;align-items:flex-start;border:1px solid #d8e3e9;padding:12px 14px;border-radius:10px;cursor:pointer;margin-bottom:10px;min-height:44px}
.code-lab-question__option:has(input:checked){border-color:#00777e;background:#edf9f9}
.code-lab-question__option input{width:18px;height:18px;flex:none;margin-top:4px;accent-color:#06656d}
.code-lab-question__feedback{font-weight:800;margin:13px 0 0}
.code-lab-question__explanation{margin:8px 0 0;color:var(--cl-muted)}
.code-lab-end{margin-top:45px;padding:29px 32px;border-radius:18px;background:#e7f4f3;display:flex;align-items:center;justify-content:space-between;gap:20px}
.code-lab-end h2{margin:0 0 10px}
.code-lab-end p:last-child{margin-bottom:0}
@media(max-width:850px){.code-lab-example__columns,.code-lab-example__notes,.code-lab-quiz__grid{grid-template-columns:1fr}.code-lab-section__heading{display:block}.code-lab-section__heading>p{margin-top:10px;max-width:none;width:100%}.code-lab-end{display:block}.code-lab-end .code-lab-button{margin-top:20px}}
@media(max-width:520px){.code-lab{padding:18px 12px 50px}.code-lab-hero{border-radius:16px}.code-lab-example__head,.code-lab-example__columns,.code-lab-example__preview{padding:16px}.code-lab-example__notes{margin:0 16px}.code-lab-example__criteria{padding:16px}.code-lab-example__criteria ul{display:flex;margin:9px 0 0}.code-lab-end{padding:22px}.code-lab-toc{padding:17px}}
@media(prefers-reduced-motion:reduce){.code-lab *{transition:none!important;scroll-behavior:auto!important}}

/* Code Lab 2.1: fallback and high-contrast handling */
.code-lab-js-note{padding:12px 16px;border:2px solid #164e63;background:#eff9fa;color:#102538}
.code-lab [hidden]{display:none!important}
@media (forced-colors:active){.code-lab-button,.code-lab-toc a,.code-lab-example,.code-lab-question{border:2px solid CanvasText}.code-lab :is(a,button,input,summary):focus-visible{outline:3px solid Highlight!important;outline-offset:3px}}


/* Code Lab 2.2: warstwa rozszerzeń; zachowuje lokalne poprawki nagłówków. */
.code-lab-code-tools{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin:0 0 .75rem}
.code-lab-copy{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    box-sizing:border-box;
    padding:0;
    border:1px solid #406579;
    border-radius:0;
    background:#fff;
    color:#12374a;
    cursor:pointer;
}
.code-lab-copy:hover{background:#e3f2f5}
.code-lab-copy-feedback{font-size:.85rem;line-height:1.5;font-weight:650;color:#15502c}
.code-lab-demo-field{display:grid;gap:.55rem;width:min(100%,520px)}
.code-lab-demo-field>p{margin:0}
.code-lab-demo-field button{justify-self:start}
.code-lab-demo-list{margin:0;padding-inline-start:1.5rem}
.code-lab-demo-nav{display:flex;gap:1rem;flex-wrap:wrap}
.code-lab-demo-nav [aria-current="page"]{font-weight:800;text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:4px}
.code-lab-quiz__summary{margin-top:24px;padding:24px;border:1px solid #b4d1d8;background:#eef7f9;border-radius:17px}
.code-lab-quiz__summary h3{margin:0 0 .6rem}
.code-lab-quiz__summary p{margin:.3rem 0}
.code-lab-quiz__summary button{margin-top:1rem}
.code-lab-quiz__summary .code-lab-button--outline{background:#fff}
.code-lab-demo-field input[aria-invalid="true"]{border:2px solid #9c2c22}
.code-lab :is(.code-lab-copy,[data-reset-quiz]):focus-visible{outline:3px solid #be4a00!important;outline-offset:3px!important}
@media(max-width:520px){.code-lab-quiz__summary{padding:18px}.code-lab-code-tools{align-items:flex-start}.code-lab-demo-nav{display:block}}
@media(forced-colors:active){.code-lab-copy{border:2px solid ButtonText}.code-lab-demo-field input[aria-invalid="true"]{border:2px solid Mark}.code-lab-quiz__summary{border:1px solid CanvasText}}


/* Code Lab 2.2 - wyroznienie naglowkow lekcji */
.code-lab .code-lab-example {
    margin-bottom: 30px;
}

.code-lab .code-lab-example__head {
    background: #eaf6f6;
    border-left: 5px solid #087d81;
    border-bottom: 1px solid #b4dcde;
    padding: 25px 28px;
    gap: 20px;
}

.code-lab .code-lab-example__number {
    width: 54px;
    height: 54px;
    background: #087d81;
    color: #ffffff;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 800;
}

.code-lab .code-lab-example__head h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.code-lab .code-lab-example__head p {
    max-width: 75ch;
    line-height: 1.6;
}

@media (max-width: 520px) {
    .code-lab .code-lab-example__head {
        padding: 18px;
        gap: 13px;
    }

    .code-lab .code-lab-example__number {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }
}

@media (forced-colors: active) {
    .code-lab .code-lab-example__head {
        border-left: 5px solid Highlight;
    }

    .code-lab .code-lab-example__number {
        border: 1px solid ButtonText;
    }
}

/* WCAG-AKADEMIA-CODE-TOOLS-ICONS-20261018 */
/* Scoped to the Code Lab only; existing copy implementation retained. */
.code-lab .code-lab-code-tools{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;flex-wrap:wrap;min-width:0;margin:0 0 .625rem}
.code-lab .code-lab-tool{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid #406579;border-radius:0;background:#fff;color:#12374a;cursor:pointer;font:inherit}
.code-lab .code-lab-tool:hover{background:#e3f2f5}
.code-lab .code-lab-tool[aria-pressed="true"]{background:#d7edf0;border-color:#075e68;color:#073b43}
.code-lab .code-lab-tool svg{width:20px;height:20px;display:block;pointer-events:none}
.code-lab .code-lab-tool:focus-visible{outline:3px solid #be4a00!important;outline-offset:3px!important}
.code-lab .code-lab-copy-feedback{flex-basis:100%;font-size:.85rem;line-height:1.5}
.code-lab .code-lab-example__columns>section{min-width:0}
.code-lab .code-lab-example__columns pre{min-width:0;max-width:100%;box-sizing:border-box}
.code-lab .code-lab-example__columns pre[data-code-wrap-state="on"]{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}
/* The code is readable even when JavaScript is disabled. */
@media(max-width:520px){.code-lab .code-lab-example__columns pre:not([data-code-wrap-state]){white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}}
@media(forced-colors:active){.code-lab .code-lab-tool{border:2px solid ButtonText;background:ButtonFace;color:ButtonText}.code-lab .code-lab-tool[aria-pressed="true"]{border:3px solid Highlight}.code-lab .code-lab-tool:focus-visible{outline:3px solid Highlight!important}}

/* WCAG Akademia: jednolite ikony narzędzi kodu */
.code-lab .code-lab-code-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.code-lab .code-lab-code-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #406579;
    border-radius: 0;
    background: #fff;
    color: #12374a;
    cursor: pointer;
    line-height: 1;
}

.code-lab .code-lab-code-tools button svg {
    display: block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex: 0 0 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.code-lab .code-lab-code-tools button:hover {
    background: #e3f2f5;
}

.code-lab .code-lab-code-tools button:focus-visible {
    outline: 3px solid #be4a00;
    outline-offset: 3px;
}

@media (forced-colors: active) {
    .code-lab .code-lab-code-tools button {
        border: 2px solid ButtonText;
        color: ButtonText;
    }
}

/* Jednolity wygląd przycisków ikonowych */
.code-lab .code-lab-code-tools .code-lab-copy,
.code-lab .code-lab-code-tools .code-lab-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 1px solid #406579;
    border-radius: 0;
    background: #fff;
    color: #12374a;
    line-height: 1;
    cursor: pointer;
}

.code-lab .code-lab-code-tools .code-lab-copy svg,
.code-lab .code-lab-code-tools .code-lab-wrap svg {
    display: block;
    width: 20px;
    height: 20px;
    min-width: 0;
    min-height: 0;
    flex: none;
}


/* Jednolity wygląd przycisków ikonowych */
.code-lab .code-lab-code-tools .code-lab-copy,
.code-lab .code-lab-code-tools .code-lab-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 1px solid #406579;
    border-radius: 0;
    background: #fff;
    color: #12374a;
    line-height: 1;
    cursor: pointer;
}

.code-lab .code-lab-code-tools .code-lab-copy svg,
.code-lab .code-lab-code-tools .code-lab-wrap svg {
    display: block;
    width: 20px;
    height: 20px;
    min-width: 0;
    min-height: 0;
    flex: none;
}


/* Jednolity wygląd przycisków ikonowych */
.code-lab .code-lab-code-tools .code-lab-copy,
.code-lab .code-lab-code-tools .code-lab-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 1px solid #406579;
    border-radius: 0;
    background: #fff;
    color: #12374a;
    line-height: 1;
    cursor: pointer;
}

.code-lab .code-lab-code-tools .code-lab-copy svg,
.code-lab .code-lab-code-tools .code-lab-wrap svg {
    display: block;
    width: 20px;
    height: 20px;
    min-width: 0;
    min-height: 0;
    flex: none;
}

