/**
 * Pulpit biblioteki i strony study-mode.
 * Osobna warstwa wizualna, aby narzędzia nie przypominały zakładek lekcji.
 */
.fe-ct-shell--library{max-width:1180px}
.fe-ct-shell--tool{max-width:1080px}
.fe-ct-head--compact{max-width:860px;margin-bottom:30px}
.fe-ct-head--tool{max-width:850px;margin-bottom:22px}
.fe-ct-head h1 small{font-weight:450;color:var(--fe-muted,#6b7280)}
.fe-ct-library{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:28px;align-items:start}
.fe-ct-library__rail{position:sticky;top:96px;padding:16px;border:1px solid var(--fe-border,#e5e7eb);border-radius:24px;background:color-mix(in srgb,var(--fe-surface,#fff) 95%,transparent);box-shadow:0 18px 45px rgba(34,25,15,.06)}
.fe-ct-library__rail-label,.fe-ct-article-nav__label{margin:4px 8px 12px;color:var(--fe-muted,#6b7280);font-size:.73rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.fe-ct-library__nav{display:grid;gap:7px}
.fe-ct-library__nav-item{display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:center;width:100%;padding:11px 12px;border:0;border-radius:15px;background:transparent;color:var(--fe-text,#1f2937);text-align:left;cursor:pointer;transition:background .18s ease,transform .18s ease,color .18s ease}
.fe-ct-library__nav-item:hover{background:var(--fe-surface-soft,#faf6f2);transform:translateX(2px)}
.fe-ct-library__nav-item.is-active{background:#172033;color:#fff}
.fe-ct-library__nav-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid currentColor;border-radius:11px;font-size:.72rem;font-weight:800;opacity:.78}
.fe-ct-library__nav-item strong,.fe-ct-library__nav-item small{display:block}
.fe-ct-library__nav-item strong{font-size:.91rem;line-height:1.25}
.fe-ct-library__nav-item small{margin-top:3px;font-size:.74rem;opacity:.67}
.fe-ct-library__help{margin-top:14px;padding:14px;border-radius:15px;background:#fff4e9;color:#6f3514;font-size:.84rem}
.fe-ct-library__help p{margin:5px 0 0;line-height:1.45}
.fe-ct-library__content{min-width:0;padding:4px 0}
.fe-ct-library__panel[hidden]{display:none!important}
.fe-ct-library__panel-head{display:flex;justify-content:space-between;gap:20px;align-items:end;padding-bottom:14px;border-bottom:1px solid var(--fe-border,#e5e7eb)}
.fe-ct-library__panel-head h2{margin:0;font-size:clamp(1.65rem,3vw,2.35rem)}
.fe-ct-library__panel-head .fe-ct-eyebrow{margin-bottom:5px}
.fe-ct-library__count{display:grid;place-items:center;min-width:45px;height:45px;border-radius:15px;background:#fff1e7;color:#913f15;font-weight:850}
.fe-ct-library__description{max-width:680px;margin:16px 0 22px;color:var(--fe-muted,#6b7280);font-size:1rem;line-height:1.6}
.fe-ct-library__panel .fe-ct-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.fe-ct-library-card{min-height:220px;border-radius:20px}
.fe-ct-library-card h3 small{font-weight:450;color:var(--fe-muted,#6b7280)}
.fe-ct-library-card .fe-ct-card__go{font-size:.82rem;font-weight:750}
.fe-ct-library__empty{padding:70px 25px;text-align:center;border:1px dashed var(--fe-border,#d1d5db);border-radius:22px}

.fe-ct-workbench{margin:20px 0 42px;padding:clamp(18px,3vw,32px);border:1px solid #e5cdbd;border-radius:26px;background:linear-gradient(145deg,#fffdfb 0%,#fff8f2 100%);box-shadow:0 22px 60px rgba(99,55,27,.1)}
.fe-ct-workbench__head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:22px}
.fe-ct-workbench__head h2{margin:2px 0 7px;font-size:clamp(1.45rem,3vw,2rem)}
.fe-ct-workbench__head p{margin:0;color:var(--fe-muted,#6b7280)}
.fe-ct-workbench__switch{display:inline-flex;gap:5px;margin:0 0 22px;padding:5px;border:1px solid #ead7ca;border-radius:14px;background:#fff}
.fe-ct-workbench__switch .fe-ct-tab{border:0;border-radius:10px;background:transparent}
.fe-ct-workbench__switch .fe-ct-tab.is-active{background:#172033;color:#fff}
.fe-ct-btn--report{white-space:nowrap;background:#172033;color:#fff}
.fe-ct-btn--report:disabled{cursor:not-allowed;opacity:.45}
.fe-ct-workbench__export-note{margin:18px 0 0;padding-top:14px;border-top:1px solid #ead7ca;color:var(--fe-muted,#6b7280);font-size:.82rem;line-height:1.5}
.fe-ct-tool-choices{margin:0 0 38px}
.fe-ct-article-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:46px;align-items:start;padding-top:36px;border-top:1px solid var(--fe-border,#e5e7eb)}
.fe-ct-article-nav{position:sticky;top:100px;display:grid;gap:4px}
.fe-ct-article-nav a{padding:8px 10px;border-left:2px solid var(--fe-border,#e5e7eb);color:var(--fe-muted,#6b7280);font-size:.84rem;text-decoration:none}
.fe-ct-article-nav a:hover{border-left-color:#b45309;color:var(--fe-text,#1f2937)}
.fe-ct-article{max-width:730px}
.fe-ct-article>header{margin-bottom:35px}
.fe-ct-article>header h2{margin:5px 0 12px;font-size:clamp(1.8rem,4vw,2.65rem)}
.fe-ct-article__lead{font-size:1.16rem;line-height:1.72;color:var(--fe-text,#374151)}
.fe-ct-article>section{scroll-margin-top:110px;margin:0;padding:27px 0;border-top:1px solid var(--fe-border,#e5e7eb)}
.fe-ct-article>section h2{margin:0 0 12px;font-size:1.42rem}
.fe-ct-article>section p,.fe-ct-article>section li{line-height:1.75}
.fe-ct-article .fe-ct-details{margin:20px 0}
.fe-ct-report-status{margin-top:10px;font-size:.85rem}
@media(max-width:850px){
 .fe-ct-library{grid-template-columns:1fr}
 .fe-ct-library__rail{position:static;padding:12px;border-radius:18px;overflow:hidden}
 .fe-ct-library__nav{display:flex;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x proximity}
 .fe-ct-library__nav-item{flex:0 0 190px;scroll-snap-align:start}
 .fe-ct-library__help,.fe-ct-library__rail-label{display:none}
 .fe-ct-article-layout{grid-template-columns:1fr;gap:20px}
 .fe-ct-article-nav{position:static;display:flex;overflow-x:auto;padding-bottom:8px}
 .fe-ct-article-nav__label{display:none}
 .fe-ct-article-nav a{flex:0 0 auto;border-left:0;border-bottom:2px solid var(--fe-border,#e5e7eb)}
}
@media(max-width:620px){
 .fe-ct-library__panel .fe-ct-grid{grid-template-columns:1fr}
 .fe-ct-workbench__head{display:block}
 .fe-ct-btn--report{width:100%;margin-top:16px}
 .fe-ct-workbench{padding:17px;border-radius:20px}
}
@media(prefers-color-scheme:dark){
 .fe-ct-library__nav-item.is-active,.fe-ct-btn--report{background:#e8edf8;color:#111827}
 .fe-ct-workbench__switch{background:#141714;border-color:#554439}
 .fe-ct-workbench__switch .fe-ct-tab{color:#c8bdb4;background:transparent}
 .fe-ct-workbench__switch .fe-ct-tab:is(:hover,:focus-visible){color:#f2efe9}
 .fe-ct-workbench__switch .fe-ct-tab.is-active{background:#e39a67;color:#1a1c1a}
 .fe-ct-workbench{background:linear-gradient(145deg,#211b18,#1b1715);border-color:#4f3b2e}
 .fe-ct-library__help{background:#3b291d;color:#ffd8bb}
}


/* Kontrast sterowany faktycznym motywem strony, nie wyłącznie motywem systemu. */
.fe-ct-shell--tool h1,
.fe-ct-shell--tool h2,
.fe-ct-shell--tool h3,
.fe-ct-shell--tool h4,
.fe-ct-workbench__head h2,
.fe-ct-article h2 {
    color: var(--fe-heading, var(--fe-text, #1f2937));
    -webkit-text-fill-color: currentColor;
}
html[style*="color-scheme: light"] .fe-ct-workbench {
    color: #2b211b;
    background: linear-gradient(145deg, #fffdfb 0%, #fff7ef 100%);
    border-color: #e8cdbb;
}
html[style*="color-scheme: light"] .fe-ct-workbench h2,
html[style*="color-scheme: light"] .fe-ct-workbench .fe-ct-field__label,
html[style*="color-scheme: light"] .fe-ct-workbench .fe-ct-big__value {
    color: #241b17;
    -webkit-text-fill-color: #241b17;
}
html[style*="color-scheme: light"] .fe-ct-workbench__head p,
html[style*="color-scheme: light"] .fe-ct-workbench__export-note {
    color: #675b54;
}
html[style*="color-scheme: light"] .fe-ct-workbench .fe-ct-input,
html[style*="color-scheme: light"] .fe-ct-workbench select {
    color: #17120f;
    background: #fff;
    border-color: #cdb9aa;
}
html[style*="color-scheme: light"] .fe-ct-btn--report {
    color: #fff;
    background: #164a7b;
}
html[style*="color-scheme: light"] .fe-ct-btn--report:disabled {
    color: #5f6977;
    background: #dce3eb;
}
html[style*="color-scheme: dark"] .fe-ct-workbench {
    color: #f2ede7;
    background: linear-gradient(145deg, #211b18 0%, #171412 100%);
    border-color: #665044;
}
html[style*="color-scheme: dark"] .fe-ct-workbench h2,
html[style*="color-scheme: dark"] .fe-ct-workbench .fe-ct-field__label,
html[style*="color-scheme: dark"] .fe-ct-workbench .fe-ct-big__value,
html[style*="color-scheme: dark"] .fe-ct-article h2,
html[style*="color-scheme: dark"] .fe-ct-article h3 {
    color: #f6f1eb;
    -webkit-text-fill-color: #f6f1eb;
}
html[style*="color-scheme: dark"] .fe-ct-workbench__head p,
html[style*="color-scheme: dark"] .fe-ct-workbench__export-note,
html[style*="color-scheme: dark"] .fe-ct-article-nav a {
    color: #c8beb7;
}
html[style*="color-scheme: dark"] .fe-ct-workbench .fe-ct-input,
html[style*="color-scheme: dark"] .fe-ct-workbench select {
    color: #f7f3ed;
    background: #111713;
    border-color: #5f544d;
}
html[style*="color-scheme: dark"] .fe-ct-btn--report {
    color: #102033;
    background: #dbeafe;
}
html[style*="color-scheme: dark"] .fe-ct-btn--report:disabled {
    color: #a7a7aa;
    background: #3f4147;
}
html[style*="color-scheme: dark"] .fe-ct-article__lead,
html[style*="color-scheme: dark"] .fe-ct-article p,
html[style*="color-scheme: dark"] .fe-ct-article li {
    color: #ddd6cf;
}
html[style*="color-scheme: dark"] .fe-ct-article > section {
    border-color: #343a34;
}
@media (max-width: 850px) {
    .fe-ct-shell--tool { padding-bottom: 150px; }
    .fe-ct-article-nav {
        position: sticky;
        top: 6px;
        z-index: 20;
        margin: 0 -6px;
        padding: 9px 6px 11px;
        background: var(--fe-bg, #fff);
        box-shadow: 0 8px 18px color-mix(in srgb, #000 12%, transparent);
    }
    html[style*="color-scheme: dark"] .fe-ct-article-nav { background: #111310; }
    html[style*="color-scheme: light"] .fe-ct-article-nav { background: #fffdf9; }
}

/* Widoczność nagłówków listy w motywie ciemnym. */
html[style*="color-scheme: dark"] #fe-ct-all-title,
html[data-fe-theme="dark"] #fe-ct-all-title {
    color: #f6f1eb;
    -webkit-text-fill-color: #f6f1eb;
}

/* Przełącznik trybu kwestionariusza / Mam już wynik w motywie ciemnym. */
html[style*="color-scheme: dark"] .fe-ct-workbench__switch,
html[data-fe-theme="dark"] .fe-ct-workbench__switch {
    background: #141714;
    border-color: #554439;
}
html[style*="color-scheme: dark"] .fe-ct-workbench__switch .fe-ct-tab,
html[data-fe-theme="dark"] .fe-ct-workbench__switch .fe-ct-tab {
    border: 0;
    border-radius: 10px;
    background: transparent !important;
    color: #c8bdb4 !important;
}
html[style*="color-scheme: dark"] .fe-ct-workbench__switch .fe-ct-tab:is(:hover, :focus-visible),
html[data-fe-theme="dark"] .fe-ct-workbench__switch .fe-ct-tab:is(:hover, :focus-visible) {
    color: #f2efe9 !important;
}
html[style*="color-scheme: dark"] .fe-ct-workbench__switch .fe-ct-tab.is-active,
html[data-fe-theme="dark"] .fe-ct-workbench__switch .fe-ct-tab.is-active {
    background: #e39a67 !important;
    color: #1a1c1a !important;
    font-weight: 700;
}
