/* IndexLab — style. Czerń, biel i szarości (#111111, #F1F2F1), Inter i Inter Tight, płaskie formy jak w materiałach kursu. */

@font-face { font-family: "Inter IL"; src: url("../fonty/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter IL"; src: url("../fonty/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight IL"; src: url("../fonty/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight IL"; src: url("../fonty/inter-tight-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F1F2F1;
  --surface: #FFFFFF;
  --surface-2: #F5F6F5;
  --text: #111111;
  --text-2: #5E615E;
  --border: #E2E3E2;
  --border-2: #CDD0CD;
  --primary: #111111;
  --primary-shadow: #111111;
  --primary-soft: #EEEFEE;
  --on-primary: #FFFFFF;
  --accent: #111111;
  --accent-shadow: #111111;
  --accent-text: #111111;
  --accent-soft: #F3F4F3;
  --on-accent: #FFFFFF;
  --ok: #111111;
  --ok-fill: #111111;
  --ok-shadow: #111111;
  --ok-soft: #EEEFEE;
  --warn: #111111;
  --warn-soft: #F3F4F3;
  --bad: #111111;
  --bad-fill: #6E716E;
  --bad-shadow: #6E716E;
  --bad-soft: #FFFFFF;
  --flame: #111111;
  --heart: #111111;
  --c-blue: #111111; --c-gold: #111111; --c-green: #111111; --c-red: #6E716E; --c-purple: #9A9D9A; --c-orange: #C2C5C2;
  --chart-1: #111111;
  --chart-2: #9A9D9A;
  --chart-3: #D0D2D0;
  --radius: 16px;
  --radius-sm: 12px;
  --tap: 50px;
  --font: "Inter IL", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Tight IL", "Inter Tight", "Inter IL", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B0B; --surface: #141414; --surface-2: #1B1B1B; --text: #EDEEED; --text-2: #9EA19E;
    --border: #262726; --border-2: #353635;
    --primary: #EDEEED; --primary-shadow: #F1F2F1; --primary-soft: #202120; --on-primary: #0B0B0B;
    --accent: #EDEEED; --accent-shadow: #F1F2F1; --accent-text: #EDEEED; --accent-soft: #1B1B1B; --on-accent: #0B0B0B;
    --ok: #EDEEED; --ok-fill: #EDEEED; --ok-shadow: #F1F2F1; --ok-soft: #202120;
    --warn: #F1F2F1; --warn-soft: #222222;
    --bad: #F1F2F1; --bad-fill: #8A8D8A; --bad-shadow: #8A8D8A; --bad-soft: #141414;
    --flame: #F1F2F1; --heart: #F1F2F1;
    --c-blue: #F1F2F1; --c-gold: #F1F2F1; --c-green: #F1F2F1; --c-red: #8A8D8A; --c-purple: #5C5F5C; --c-orange: #3A3B3A;
    --chart-1: #F1F2F1; --chart-2: #8A8D8A; --chart-3: #4A4C4A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B0B; --surface: #141414; --surface-2: #1B1B1B; --text: #EDEEED; --text-2: #9EA19E;
  --border: #262726; --border-2: #353635;
  --primary: #EDEEED; --primary-shadow: #F1F2F1; --primary-soft: #202120; --on-primary: #0B0B0B;
  --accent: #EDEEED; --accent-shadow: #F1F2F1; --accent-text: #EDEEED; --accent-soft: #1B1B1B; --on-accent: #0B0B0B;
  --ok: #EDEEED; --ok-fill: #EDEEED; --ok-shadow: #F1F2F1; --ok-soft: #202120;
  --warn: #F1F2F1; --warn-soft: #222222;
  --bad: #F1F2F1; --bad-fill: #8A8D8A; --bad-shadow: #8A8D8A; --bad-soft: #141414;
  --flame: #F1F2F1; --heart: #F1F2F1;
  --c-blue: #F1F2F1; --c-gold: #F1F2F1; --c-green: #F1F2F1; --c-red: #8A8D8A; --c-purple: #5C5F5C; --c-orange: #3A3B3A;
  --chart-1: #F1F2F1; --chart-2: #8A8D8A; --chart-3: #4A4C4A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 400 16.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
body.in-session { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
body.in-lesson { padding-bottom: calc(240px + env(safe-area-inset-bottom)); }
h1, h2, h3 { line-height: 1.15; margin: 0; font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
svg { width: 24px; height: 24px; flex: none; }
button { font: inherit; color: inherit; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 10px; }

/* ---------- górny pasek ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(6px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left));
  background: var(--bg); border-bottom: 2px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 48px; }
.brand img { border-radius: 10px; }
.brand { min-width: 48px; justify-content: center; }
.top-right { display: flex; align-items: center; gap: 2px; }
.top-stats { display: flex; gap: 4px; }
.top-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 1.05rem; color: var(--text-2); }
.top-chip:hover { background: var(--surface-2); }
.top-chip svg { width: 24px; height: 24px; }
.chip-flame svg { color: var(--border-2); }
.chip-flame.on { color: var(--flame); }
.chip-flame.on svg { color: var(--flame); }
.chip-xp { color: var(--accent-text); }
.chip-xp svg { color: var(--accent); }
body.in-session .topbar, body.in-gate .topbar { display: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
#theme-toggle .i-sun { display: none; }
#theme-toggle[data-dark="true"] .i-sun { display: block; }
#theme-toggle[data-dark="true"] .i-moon { display: none; }

/* ---------- układ ---------- */
main { max-width: 720px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left)) 24px max(16px, env(safe-area-inset-right)); outline: none; }
main:focus, main:focus-visible { outline: none; }
.loading { display: grid; place-items: center; gap: 16px; padding: 22vh 0; color: var(--text-2); }
.loading img { animation: spin 2.4s ease-in-out infinite; border-radius: 16px; }
@keyframes spin { 50% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }

.eyebrow { font-size: .9rem; font-weight: 700; color: var(--text-2); }
.lead { color: var(--text-2); margin: 4px 0 18px; }
.muted { color: var(--text-2); }
.center { text-align: center; }
.small { font-size: .84rem; margin-top: 8px; }
.section-title { font-size: 1.2rem; margin: 28px 4px 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card-title { font-size: 1.12rem; margin-bottom: 14px; }
.page-head { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; }
.page-head .icon-btn { margin-left: -10px; }
.page-head h1 { font-size: 1.55rem; }
.alert { background: var(--bad-soft); color: var(--bad); padding: 14px 16px; border-radius: var(--radius-sm); margin: 12px 0; }

/* ---------- przyciski (wypukłe, „wciskane”) ---------- */
.btn {
  --b: var(--surface); --bs: var(--border); --bc: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 12px 20px;
  border-radius: 12px; border: 1.5px solid transparent;
  background: var(--b); color: var(--bc); box-shadow: none;
  font-weight: 600; font-size: 1.02rem; text-decoration: none; text-align: center;
  cursor: pointer; user-select: none; transition: transform .08s ease, box-shadow .08s ease, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled { --b: var(--surface-2); --bs: var(--border); --bc: var(--text-2); cursor: default; filter: none; }
.btn-primary { --b: var(--primary); --bs: var(--primary-shadow); --bc: var(--on-primary); }
.btn-gold { --b: var(--accent); --bs: var(--accent-shadow); --bc: var(--on-accent); }
.btn-success { --b: var(--ok-fill); --bs: var(--ok-shadow); --bc: #fff; }
.btn-danger-solid { --b: var(--bad-fill); --bs: var(--bad-shadow); --bc: #fff; }
.btn-ghost { border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--text); filter: none; }
.btn-danger { --b: var(--bad-soft); --bs: color-mix(in srgb, var(--bad) 30%, var(--bad-soft)); --bc: var(--bad); width: 100%; }
.btn-cta { font-weight: 700; font-size: 1.08rem; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: .92rem; }
.btn-sm svg { width: 20px; height: 20px; }
.btn-lg { width: 100%; min-height: 56px; }
.btn-xl { width: 100%; min-height: 72px; justify-content: flex-start; padding: 14px 18px; text-align: left; font-size: 1.12rem; }
.btn-xl svg { width: 30px; height: 30px; }
.btn-xl span { display: flex; flex-direction: column; }
.btn-xl small { font-weight: 700; font-size: .85rem; opacity: .8; }
.actions { display: grid; gap: 12px; margin: 18px 0; }
.btn-report {
  display: inline-flex; align-items: center; gap: 6px; align-self: center; min-height: 44px; padding: 8px 14px;
  border-radius: 999px; color: var(--text-2); font-size: .88rem; font-weight: 600; text-decoration: none;
}
.btn-report svg { width: 18px; height: 18px; }
.btn-report:hover { background: var(--surface-2); color: var(--text); }

/* ---------- pasek postępu i pierścienie ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--accent); min-width: 0; transition: width .45s cubic-bezier(.3, 1.3, .5, 1); }

.ring { --p: 0; --c: var(--accent); width: 88px; height: 88px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { display: grid; place-items: center; width: calc(100% - 18px); height: calc(100% - 18px); border-radius: 50%; background: var(--surface); font-weight: 700; font-size: 1.2rem; }
.ring-xl { width: 150px; height: 150px; margin: 0 auto 18px; }
.ring-xl span { font-size: 2.2rem; width: calc(100% - 24px); height: calc(100% - 24px); background: var(--bg); }
.ring-ok { --c: var(--ok-fill); }
.ring-warn { --c: var(--accent); }
.ring-bad { --c: var(--bad-fill); }
.ring-row { display: flex; align-items: center; gap: 18px; }
.ring-text { display: flex; flex-direction: column; gap: 2px; }
.ring-text span { color: var(--text-2); font-size: .94rem; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mini-stats div { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.mini-stats strong { font-size: 1.5rem; font-weight: 700; }
.mini-stats span { font-size: .8rem; color: var(--text-2); }
.mini-stats .c-bad strong { color: var(--bad); }
.mini-stats .c-warn strong { color: var(--warn); }
.mini-stats .c-ok strong { color: var(--ok); }
.done-note { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* ---------- ekran główny: cel dnia ---------- */
.goal-card { display: grid; gap: 14px; padding: 18px; border: 2px solid var(--border); border-radius: 24px; margin-bottom: 16px; }
.goal-top { display: flex; align-items: center; gap: 16px; }
.ring-goal { width: 76px; height: 76px; }
.ring-goal span { width: 58px; height: 58px; color: var(--accent); }
.ring-goal span svg { width: 32px; height: 32px; }
.ring-goal.ring-ok span { color: var(--ok-fill); }
.goal-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.goal-text strong { font-size: 1.25rem; font-weight: 700; }
.goal-text > span:last-child { display: flex; align-items: center; gap: 4px; color: var(--text-2); font-size: .92rem; }
.goal-text > span:last-child svg { width: 18px; height: 18px; color: var(--flame); }
.btn-continue small { text-transform: none; letter-spacing: 0; }
.install-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 14px 12px 14px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.install-banner div:first-child { display: flex; flex-direction: column; }
.install-banner span { font-size: .9rem; color: var(--text-2); }
.install-actions { display: flex; align-items: center; gap: 4px; }

.quests { display: grid; gap: 12px; }
.quests .card-title { margin-bottom: 2px; }
.quest { display: flex; align-items: center; gap: 12px; }
.quest-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.quest.done .quest-icon { background: var(--ok-soft); color: var(--ok); }
.quest-body { flex: 1; min-width: 0; display: grid; gap: 6px; font-weight: 600; }
.quest-bar { display: flex; align-items: center; gap: 10px; }
.quest-bar .progress { flex: 1; }
.quest-bar small { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.quest.done .progress span { background: var(--ok-fill); }

/* ---------- błędy do poprawy, wyszukiwarka ---------- */
.mistakes-card { display: flex; align-items: center; gap: 12px; text-decoration: none; border-color: color-mix(in srgb, var(--bad-fill) 40%, var(--border)); box-shadow: none; }
.mistakes-card .quest-icon { background: var(--bad-soft); color: var(--bad); }
.mistakes-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mistakes-text small { color: var(--text-2); font-size: .88rem; }
.mistakes-card > svg { color: var(--text-2); }
.search-input { margin-bottom: 4px; }

/* ---------- przycisk przedmiotu w górnym pasku ---------- */
.subj-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding-right: 8px; text-decoration: none; font-weight: 700; }
.subj-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--primary); color: #fff; box-shadow: none; }
.subj-icon svg { width: 60%; height: 60%; }
.subj-icon-sm { width: 36px; height: 36px; border-radius: 11px; box-shadow: none; }
.subj-letters { font-weight: 700; font-size: 1.1rem; }
.subj-icon-sm .subj-letters { font-size: .7rem; }
.subj-btn-name { font-size: 1.05rem; }

/* ---------- logowanie i wybór przedmiotu ---------- */
body.in-gate { padding-bottom: 24px; }
.gate { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding-block: 24px; }
.gate-logo { border-radius: 20px; }
.gate-title { font-size: 1.6rem; }
.who { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.who-item { display: grid; justify-items: center; gap: 8px; width: 96px; padding: 6px; border: 0; background: none; cursor: pointer; font-weight: 600; }
.who-item .avatar-lg { width: 80px; height: 80px; font-size: 1.6rem; box-shadow: none; transition: transform .08s; }
.who-item:active .avatar-lg { transform: scale(.985); }
.who-item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-add { --av: var(--surface-2); color: var(--text-2) !important; border: 2px dashed var(--border-2); box-shadow: none !important; font-size: 2rem !important; }
.gate-form { display: grid; gap: 10px; width: min(360px, 100%); }
.link-btn { border: 0; background: none; color: var(--primary); font-weight: 600; font-size: .98rem; cursor: pointer; min-height: 44px; padding: 8px 12px; }
.gate-who { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.subj-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.subj-tile { display: grid; justify-items: center; gap: 10px; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 1.2rem; letter-spacing: .02em; }
.subj-tile .subj-icon { width: 104px; height: 104px; border-radius: 30px; box-shadow: none; transition: transform .08s, box-shadow .08s; }
.subj-tile:active .subj-icon { transform: scale(.985); }

/* ---------- profil ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.profile-head h1 { font-size: 1.5rem; }
.profile-head .muted { font-size: .9rem; }
.profile-meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lv-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .88rem; }
.lv-row .progress { flex: 1; height: 10px; }
.lv-row small { color: var(--text-2); font-weight: 600; }
.medals { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.medal { flex: none; width: 76px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.medal small { font-size: .74rem; font-weight: 600; color: var(--text-2); line-height: 1.2; }
.medal .badge-medal { width: 52px; height: 52px; margin: 0; }
.medal.got small { color: var(--text); }
.medal.got .badge-medal { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.more > summary, .connect > summary { cursor: pointer; margin: 0; list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 1.05rem; }
.more > summary::-webkit-details-marker, .connect > summary::-webkit-details-marker { display: none; }
.more > summary::after, .connect > summary::after { content: "›"; color: var(--text-2); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.more[open] > summary::after, .connect[open] > summary::after { transform: rotate(90deg); }
.more[open] > summary { margin-bottom: 14px; }
.connect[open] > summary { margin-bottom: 12px; }
.more .card { border: 0; padding: 14px 0 0; margin: 0; border-top: 2px solid var(--border); border-radius: 0; }
.more .tiles { margin-bottom: 14px; }
.menu-list { display: grid; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.menu-list > a, .menu-list > button { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border: 0; background: var(--surface); text-decoration: none; font-weight: 600; font-size: 1rem; text-align: left; cursor: pointer; }
.menu-list > * + * { border-top: 2px solid var(--border) !important; }
.menu-list span { flex: 1; }
.menu-list svg { color: var(--text-2); width: 22px; height: 22px; }
.goal-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 2px; text-decoration: none; color: var(--text-2); font-weight: 700; }
.goal-link span { flex: 1; }
.goal-link b { color: var(--text); }
.goal-link svg { width: 20px; height: 20px; }

/* ---------- nagłówek zakładek ---------- */
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.today-head h1 { font-size: 1.6rem; min-width: 0; }
.subject-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--border); text-decoration: none; font-weight: 600; font-size: .92rem; flex: none; }
.subject-chip span { color: var(--text-2); font-weight: 700; }
.route-card { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.route-card .quest-icon { background: var(--primary-soft); color: var(--primary); }
.route-card > svg { color: var(--text-2); }
.route-sum { margin: -6px 0 16px; }

/* ---------- trasa nauki: odcinki (działy) i przystanki (poddziały) ---------- */
.route { display: grid; gap: 12px; }
.leg { border: 2px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; }
.leg-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.leg-head::-webkit-details-marker { display: none; }
.leg-num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); font-weight: 700; color: var(--text-2); flex: none; font-variant-numeric: tabular-nums; }
.leg[open] .leg-num { background: var(--primary); color: var(--on-primary); }
.leg-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.leg-text strong { font-size: 1.02rem; line-height: 1.25; }
.leg-text small { color: var(--text-2); font-size: .84rem; font-weight: 700; }
.leg-text .progress { height: 8px; margin-top: 2px; }
.leg-text .progress span::after { display: none; }
.leg-chev { color: var(--text-2); transition: transform .2s; flex: none; }
.leg[open] .leg-chev { transform: rotate(90deg); }
.stops { list-style: none; margin: 0; padding: 4px 16px 8px; position: relative; }
.stop { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 8px 0; }
.stop::before { content: ""; position: absolute; left: 17px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.stop:first-child::before { top: 24px; }
.stop:last-child::before { bottom: calc(100% - 24px); }
.stop-dot { --p: 0; position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--border) 0); }
.stop-dot i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); font-style: normal; font-size: .8rem; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.stop-dot i svg { width: 16px; height: 16px; }
.stop.done .stop-dot { background: var(--ok-fill); }
.stop.done .stop-dot i { background: var(--ok-fill); color: #fff; }
.stop.current .stop-dot i { background: var(--primary); color: var(--on-primary); }
.stop-main { min-width: 0; }
.stop-body { display: grid; gap: 2px; width: 100%; padding: 4px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.stop-name { font-weight: 600; line-height: 1.3; }
.stop-meta { font-size: .82rem; color: var(--text-2); font-weight: 700; }
.here { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-style: normal; font-size: .75rem; font-weight: 600; vertical-align: 2px; }
.stop-go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--border); color: var(--primary); text-decoration: none; }
.stop-go svg { width: 20px; height: 20px; }
.stop.current .stop-go { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stop-pop { padding: 8px 0 4px; animation: pop .18s ease; }
.stop-pop .pop-row .btn { flex: 1 1 auto; }
.pop-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pop-row .type-input { flex: 1 1 160px; min-height: 48px; font-size: 1rem; }
.leg-guide { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 2px solid var(--border); text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .9rem; }
.leg-guide svg { width: 20px; height: 20px; }

/* ---------- wybór przedmiotu ---------- */
.onboard { display: grid; gap: 12px; }
.onboard > img { border-radius: 16px; margin-top: 8px; }
.onboard > h1 { font-size: 1.7rem; }
.subject-pick { display: grid; gap: 10px; margin-top: 6px; }
.subject-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-decoration: none; color: inherit; padding: 14px 16px; margin-bottom: 4px; border-radius: 16px; border: 2px solid var(--border); box-shadow: none; background: var(--surface); text-align: left; cursor: pointer; }
.subject-opt:active:not(.soon) { transform: scale(.985); }
.subject-opt.active { border-color: var(--primary); box-shadow: none; }
.subject-opt.soon { cursor: default; opacity: .55; box-shadow: none; border-style: dashed; }
.subject-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .95rem; flex: none; }
.subject-opt.soon .subject-badge { background: var(--surface-2); color: var(--text-2); }
.subject-opt-text { display: flex; flex-direction: column; min-width: 0; }
.subject-opt-text small { color: var(--text-2); font-size: .85rem; }

/* ---------- profil ---------- */
.profile-card { display: grid; gap: 10px; }
.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-name { display: grid; justify-items: start; }
.profile-name strong { font-size: 1.3rem; }
.profile-name .btn-report { padding-inline: 0; min-height: 32px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--av); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.profiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.profiles li { display: flex; align-items: center; gap: 4px; }
.profile-switch { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: 14px; border: 2px solid transparent; background: var(--surface-2); text-align: left; cursor: pointer; font-weight: 600; }
.profiles li.active .profile-switch { border-color: var(--primary); background: var(--primary-soft); }
.profile-switch > span:not(.avatar) { flex: 1; min-width: 0; }
.acc-form { display: grid; gap: 10px; }
.acc-form .type-input { min-height: 50px; font-size: 1rem; }
.acc-row { display: grid; gap: 2px; }
.acc-row > span { display: flex; align-items: center; gap: 6px; color: var(--ok); }
.acc-row svg { width: 18px; height: 18px; }
.acc-msg { padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: .92rem; }

/* ---------- działy (przewodnik) ---------- */
.subjects { display: grid; gap: 16px; }
.subject-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; }
.subject-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.dzial-list { display: grid; gap: 10px; }
.dzial-row { display: block; text-decoration: none; background: var(--surface); border: 2px solid var(--border); box-shadow: none; border-radius: var(--radius-sm); padding: 16px; min-height: var(--tap); margin-bottom: 4px; transition: transform .08s, box-shadow .08s; }
.dzial-row:active { transform: scale(.985); }
.dzial-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.dzial-name { font-weight: 600; }
.dzial-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; color: var(--text-2); margin-top: 8px; }
.badge { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 999px; background: var(--bad-fill); color: #fff; font-weight: 700; font-size: .9rem; flex: none; }
.badge-ok { background: var(--ok-soft); color: var(--ok); padding: 0; }
.badge-ok svg { width: 20px; height: 20px; }

/* ---------- sesja: fiszki ---------- */
.session-top { display: flex; align-items: center; gap: 10px; padding-top: env(safe-area-inset-top); margin: 0 0 10px -8px; }
.session-progress { flex: 1; }
.session-progress .progress { height: 16px; }
.session-count { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; }
.session-label { text-align: center; margin-bottom: 12px; min-height: 28px; color: var(--text-2); font-size: .9rem; font-weight: 600; }
.session-unit { display: block; margin-top: 4px; font-size: .82rem; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .82rem; font-weight: 600; }
.tag-new { background: var(--accent-soft); color: var(--accent-text); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.flashcard { perspective: 1400px; cursor: pointer; outline: none; border-radius: 24px; }
.flashcard:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.flashcard-inner { display: grid; transition: transform .5s cubic-bezier(.3, .8, .3, 1); transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  min-height: min(50vh, 400px); padding: 28px 24px; margin-bottom: 6px;
  border-radius: 24px; background: var(--surface); border: 2px solid var(--border); box-shadow: none;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.face-back { transform: rotateY(180deg); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: none; }
.face-label { font-size: .88rem; font-weight: 600; color: var(--text-2); }
.face-text { font-size: clamp(1.2rem, 4.4vw, 1.45rem); line-height: 1.42; font-weight: 600; }
.face-back .face-text { font-weight: 700; font-size: clamp(1.05rem, 3.8vw, 1.22rem); }
.face-hint { color: var(--text-2); font-size: .9rem; margin-top: auto; }
.source { display: inline-flex; align-self: flex-start; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.card-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.rate-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn-rate { flex-direction: column; gap: 0; min-height: 72px; padding: 10px 6px; }
.btn-rate small { font-weight: 700; font-size: .78rem; opacity: .9; min-height: 1.2em; }
.rate-nie { --b: var(--bad-fill); --bs: var(--bad-shadow); --bc: #fff; }
.rate-trudne { --b: var(--accent); --bs: var(--accent-shadow); --bc: var(--on-accent); }
.rate-umiem { --b: var(--ok-fill); --bs: var(--ok-shadow); --bc: #fff; }

/* ---------- test ABCD i lekcja ---------- */
.question { display: flex; flex-direction: column; gap: 14px; }
.question-text, .ex-prompt { font-size: clamp(1.2rem, 4.8vw, 1.5rem); font-weight: 600; margin-bottom: 4px; }
.ex-kind { font-size: .95rem; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.exercise { display: flex; flex-direction: column; gap: 14px; animation: slidein .25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 60px; padding: 12px 16px; margin-bottom: 4px; text-align: left; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); border-radius: 16px; box-shadow: none;
  font-size: 1.02rem; font-weight: 700; line-height: 1.38; transition: transform .08s, box-shadow .08s, background-color .12s, border-color .12s;
}
.option:hover:not(:disabled) { background: var(--surface-2); }
.option:active:not(:disabled) { transform: scale(.985); }
.option:disabled { cursor: default; }
.option-letter { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; border: 2px solid var(--border); color: var(--text-2); font-weight: 700; font-size: .95rem; }
.option.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: none; color: var(--primary); }
.option.selected .option-letter { border-color: var(--primary); color: var(--primary); }
.option.correct { border-color: var(--ok-fill); background: var(--ok-soft); box-shadow: none; color: var(--ok); }
.option.correct .option-letter { background: var(--ok-fill); border-color: var(--ok-fill); color: #fff; }
.option.wrong { border-color: var(--bad-fill); background: var(--bad-soft); box-shadow: none; color: var(--bad); animation: shake .35s; }
.option.wrong .option-letter { background: var(--bad-fill); border-color: var(--bad-fill); color: #fff; }
.option:disabled:not(.correct):not(.wrong) { opacity: .55; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.tf-claim { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); font-size: 1.05rem; font-weight: 700; }
.tf-claim span { display: block; font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option.tf { flex-direction: column; justify-content: center; gap: 4px; min-height: 92px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.option.tf svg { width: 30px; height: 30px; }
.type-input { width: 100%; min-height: 60px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font: 800 1.2rem var(--font); }
.type-input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.type-input.ok { border-color: var(--ok-fill); background: var(--ok-soft); color: var(--ok); }
.type-input.bad { border-color: var(--bad-fill); background: var(--bad-soft); color: var(--bad); }
.match { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; }
.match-col { display: grid; gap: 10px; align-content: start; }
.match-item {
  min-height: 64px; padding: 10px 12px; margin-bottom: 4px; border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--surface); border: 2px solid var(--border); box-shadow: none;
  font-weight: 700; font-size: .9rem; line-height: 1.3; transition: transform .08s, box-shadow .08s, opacity .25s;
}
.match-col:first-child .match-item { font-weight: 700; font-size: .95rem; text-align: center; }
.match-item:active:not(:disabled) { transform: scale(.985); }
.match-item.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: none; color: var(--primary); }
.match-item.matched { border-color: var(--ok-fill); background: var(--ok-soft); color: var(--ok); box-shadow: none; opacity: .45; cursor: default; transform: translateY(4px); }
.match-item.wrong-flash { border-color: var(--bad-fill); background: var(--bad-soft); color: var(--bad); animation: shake .35s; }
.match-item.nudge { animation: shake .3s; }
.lesson-top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding-block: 8px; }
.hearts { display: inline-flex; align-items: center; gap: 4px; color: var(--heart); font-weight: 700; font-size: 1.1rem; min-width: 3em; justify-content: flex-end; }
.hearts.lost svg { animation: beat .5s; }
@keyframes beat { 30% { transform: scale(1.35); } 60% { transform: scale(.85); } }
.combo { display: flex; align-items: center; justify-content: center; gap: 6px; margin: -4px auto 10px; width: max-content; padding: 4px 14px; border-radius: 999px; background: color-mix(in srgb, var(--flame) 16%, transparent); color: var(--flame); font-weight: 700; font-size: .9rem; animation: popin2 .3s; }
.combo svg { width: 18px; height: 18px; }
@keyframes popin2 { from { transform: scale(.6); opacity: 0; } }
.lesson-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; gap: 10px; padding: 16px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--bg); border-top: 2px solid var(--border);
}
.lesson-bar > * { width: 100%; max-width: 688px; margin-inline: auto; }
.sheet { animation: sheetup .22s ease; border-top: 0; }
.sheet.ok { background: var(--ok-soft); color: var(--ok); }
.sheet.bad { background: var(--bad-soft); color: var(--bad); }
@keyframes sheetup { from { transform: translateY(40px); opacity: .4; } }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head strong { font-size: 1.4rem; font-weight: 700; }
.sheet-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); }
.sheet-right, .sheet-note { color: var(--text); font-weight: 700; }
.sheet-right b { color: inherit; }
.sheet.bad .sheet-right b { color: var(--bad); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-src { font-size: .82rem; font-weight: 600; opacity: .85; }
.sheet .btn-report { color: inherit; }

#feedback { display: grid; gap: 12px; }
#feedback:empty { display: none; }
.feedback { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 16px; animation: pop .25s ease; }
.feedback strong { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; }
.feedback.ok { background: var(--ok-soft); }
.feedback.ok strong { color: var(--ok); }
.feedback.bad { background: var(--bad-soft); }
.feedback.bad strong { color: var(--bad); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

.result { text-align: center; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.result h1 { font-size: 1.8rem; font-weight: 700; }
.result .actions { width: 100%; }
.result .mini-stats { width: 100%; }
.result-icon { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); animation: popin2 .45s cubic-bezier(.3, 1.6, .5, 1); }
.result-icon svg { width: 68px; height: 68px; }
.result-icon.sad { background: var(--bad-soft); color: var(--heart); }
.end-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 6px; }
.end-tile { --tc: var(--c-gold); display: flex; flex-direction: column; border: 2px solid var(--tc); border-radius: 16px; overflow: hidden; background: var(--tc); }
.end-tile span { padding: 4px 6px; font-size: .8rem; font-weight: 600; color: #fff; }
.end-tile strong { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 12px 4px; background: var(--surface); color: var(--tc); font-size: 1.3rem; font-weight: 700; border-radius: 12px 12px 0 0; }
.end-tile strong svg { width: 22px; height: 22px; }
.t-gold { --tc: var(--c-gold); } .t-gold span { color: var(--on-accent); }
.t-green { --tc: var(--c-green); }
.t-blue { --tc: var(--c-blue); }

.review-list { display: grid; gap: 12px; }
.review { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.review h3 { font-size: 1.05rem; }
.review-head { display: flex; justify-content: space-between; align-items: center; }
.review-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ans { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.ans svg { width: 20px; height: 20px; margin-top: 2px; }
.ans.ok { color: var(--ok); }
.ans.bad { color: var(--bad); }
.abcd { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.abcd li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.abcd li.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.abcd li svg { width: 20px; height: 20px; margin-left: auto; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface-2); margin-bottom: 16px; }
.tab, .segmented button { min-height: 46px; border: 2px solid transparent; border-radius: 12px; background: transparent; font-weight: 600; color: var(--text-2); cursor: pointer; }
.tab.active, .segmented button.active { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface-2); }
.seg-4 { grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.seg-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- zakładki w sekcji Matura ---------- */
.seg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 4px; margin-bottom: 16px; border-radius: 14px; background: var(--surface-2); position: sticky; top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 5; }
.seg-tabs a { display: grid; place-items: center; min-height: 42px; padding: 4px; border-radius: 10px; border: 2px solid transparent; text-decoration: none; font-weight: 600; font-size: .86rem; color: var(--text-2); text-align: center; line-height: 1.15; }
.seg-tabs a.active { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.dzial-both { display: grid; gap: 10px; }
.dzial-both .btn b { margin-left: 4px; color: var(--primary); }

/* ---------- zadania maturalne ---------- */
.subject-exam { margin-top: 12px; }
.sub-title { font-size: .95rem; margin: 18px 0 10px; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--border); text-decoration: none; font-weight: 600; font-size: .92rem; }
.chip b { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 1px 8px; font-size: .8rem; }
.task-title { font-size: 1.35rem; margin: 4px 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-title .muted { font-size: 1rem; font-weight: 700; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.material summary, .rules summary { cursor: pointer; font-weight: 600; min-height: 32px; list-style-position: inside; }
.material[open] summary { margin-bottom: 12px; }
.material .pre { font-size: .97rem; line-height: 1.6; font-weight: 600; }
.note { background: var(--accent-soft); color: var(--accent-text); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: .92rem; margin-bottom: 12px; }
.task-body .pre { font-weight: 600; font-size: 1.05rem; }
.answer-label { display: block; margin: 16px 0 8px; font-weight: 600; font-size: .92rem; }
textarea { width: 100%; min-height: 110px; padding: 12px 14px; border-radius: 14px; resize: vertical; border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 1rem var(--font); }
textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.key { border-color: color-mix(in srgb, var(--ok-fill) 55%, var(--border)); }
.key .card-title { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.rules { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--border); }
.rules .pre { margin-top: 8px; color: var(--text-2); font-size: .92rem; }
.score-q { font-weight: 600; text-align: center; margin: 6px 0 10px; }
.score-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
.btn-score { flex: 1 1 80px; max-width: 140px; border-color: var(--border); }
.btn-score.active { --b: var(--accent); --bs: var(--accent-shadow); --bc: var(--on-accent); border-color: transparent; }
.task-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.task-nav .btn:disabled { opacity: .5; }
.tile-wide { grid-column: 1 / -1; }

/* ---------- próbna matura ---------- */
.exam-card { display: grid; gap: 14px; border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.exam-card .card-title { margin-bottom: 0; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--primary); }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.exam-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; margin-bottom: 4px; border-radius: var(--radius-sm); border: 2px solid var(--border); box-shadow: none; text-decoration: none; }
.exam-tile:active { transform: scale(.985); }
.exam-tile strong { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-tile span { font-size: .75rem; color: var(--text-2); }
.exam-tile.open { border-color: var(--primary); box-shadow: none; }
.exam-tile.done { background: var(--ok-soft); border-color: var(--ok-fill); box-shadow: none; }
.exam-tile.done span { color: var(--ok); font-weight: 600; }
.exam-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; background: var(--bg); padding-block: 8px; margin-bottom: 4px; }
.exam-clock { flex: 1; text-align: center; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-clock.late { color: var(--bad); }
.exam-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; scrollbar-width: thin; }
.exam-strip button { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.exam-strip button.done { background: var(--accent-soft); border-color: var(--accent); }
.exam-strip button.cur { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.exam-answer, .exam-key { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.exam-key { background: var(--ok-soft); }
.exam-key > strong { display: flex; align-items: center; gap: 6px; color: var(--ok); }
.exam-key svg { width: 18px; height: 18px; }

/* ---------- statystyki ---------- */
.level-card { display: flex; align-items: center; gap: 18px; }
.level-badge { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: var(--primary); color: var(--on-primary); box-shadow: none; flex: none; }
.level-badge span { font-size: .78rem; font-weight: 600; margin-bottom: -14px; }
.level-badge strong { font-size: 2.2rem; font-weight: 700; }
.level-body { flex: 1; display: grid; gap: 8px; min-width: 0; }
.level-body strong { font-size: 1.15rem; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; margin-bottom: 8px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week-val { font-size: .78rem; font-weight: 700; color: var(--text-2); min-height: 1.2em; }
.week-bar { width: 100%; max-width: 36px; height: 72px; display: flex; align-items: flex-end; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.week-bar span { display: block; width: 100%; background: var(--primary); border-radius: 10px 10px 0 0; min-height: 0; }
.week-day.hit .week-bar span { background: var(--accent); }
.week-day small { font-size: .74rem; font-weight: 600; color: var(--text-2); text-transform: capitalize; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 16px; border: 2px solid var(--border); }
.badge-item small { font-size: .78rem; color: var(--text-2); line-height: 1.3; }
.badge-item strong { font-size: .92rem; }
.badge-item .progress { width: 100%; height: 10px; margin-top: 4px; }
.badge-medal { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); color: var(--border-2); margin-bottom: 4px; }
.badge-medal svg { width: 30px; height: 30px; }
.badge-item.got { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: var(--accent-soft); }
.badge-item.got .badge-medal { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tile-label { font-size: .85rem; color: var(--text-2); font-weight: 600; }
.tile strong { font-size: 2rem; line-height: 1.1; font-weight: 700; }
.tile strong small { font-size: 1rem; color: var(--text-2); font-weight: 600; }
.tile-sub { font-size: .82rem; color: var(--text-2); }
.tile-gold { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tile-gold strong { color: var(--accent-text); }
.days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.day .dot { display: grid; place-items: center; width: 100%; max-width: 30px; aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); }
.day.on .dot { background: var(--flame); color: #fff; }
.day .dot svg { width: 60%; height: 60%; }
.day small { font-size: .7rem; color: var(--text-2); text-transform: uppercase; }
.stat-row { display: block; text-decoration: none; padding: 10px 0; min-height: 48px; }
.stat-row + .stat-row { border-top: 2px solid var(--border); }
.stat-row-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: .95rem; }
.test-list { list-style: none; margin: 0; padding: 0; }
.test-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.test-list li + li { border-top: 2px solid var(--border); }
.test-list li div { display: flex; flex-direction: column; min-width: 0; }
.test-list li div span { font-size: .85rem; color: var(--text-2); }
.score { font-weight: 700; font-size: 1.05rem; padding: 6px 12px; border-radius: 12px; flex: none; text-decoration: none; }
.score.ok { background: var(--ok-soft); color: var(--ok); }
.score.warn { background: var(--warn-soft); color: var(--warn); }
.score.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- ustawienia ---------- */
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.about p + p { margin-top: 10px; }
.empty { text-align: center; padding: 14vh 8px; display: grid; justify-items: center; gap: 14px; }
.empty-icon { color: var(--primary); }
.empty-icon svg { width: 72px; height: 72px; }

/* ---------- dolny pasek ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  background: var(--bg); border-top: 2px solid var(--border);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; border-radius: 14px; border: 2px solid transparent; text-decoration: none; color: var(--text-2); font-size: .78rem; font-weight: 600; }
.tabbar a svg { width: 26px; height: 26px; }
.tabbar a.active { color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
body.in-session .tabbar, body.in-gate .tabbar { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 14px 12px 18px; border-radius: 16px;
  background: var(--text); color: var(--bg); font-weight: 600; box-shadow: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.in-lesson .toast { bottom: calc(250px + env(safe-area-inset-bottom)); }
.toast-btn { border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 8px 14px; border-radius: 10px; min-height: 40px; cursor: pointer; }

/* ---------- konfetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: .9; } }

/* ---------- tablet i komputer ---------- */
@media (min-width: 700px) {
  body { font-size: 18px; }
  main { padding-top: 24px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .face { padding: 40px; }
  .options { gap: 12px; }
}
@media (min-width: 760px) {
  /* górny pasek wyrównany do kolumny z treścią */
  .topbar { padding-left: max(16px, calc((100% - 688px) / 2)); padding-right: max(16px, calc((100% - 688px) / 2)); }
}
@media (min-width: 1000px) {
  body { padding-bottom: 128px; }
  .tabbar { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 560px; border: 2px solid var(--border); border-radius: 22px; padding-bottom: 6px; }
}
@media (max-width: 380px) {
  .end-tile strong { font-size: 1.1rem; }
  .match { grid-template-columns: 1fr 1.2fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- materiały: wykresy, tabele, opisy rysunków ---------- */
.rich { display: flex; flex-direction: column; gap: 14px; }
.mat-fig { margin: 0; min-width: 0; }
.mat-fig figcaption { font-weight: 600; margin-bottom: 10px; }
.mat-table-wrap { overflow-x: auto; }
.mat-table { border-collapse: collapse; width: 100%; font-size: .92rem; font-variant-numeric: tabular-nums; }
.mat-table th, .mat-table td { border: 2px solid var(--border); padding: 7px 9px; text-align: left; vertical-align: top; }
.mat-table thead th { background: var(--surface-2); }
.mat-table tbody th { font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 34%) 1fr; gap: 10px; align-items: center; }
.bar-label { font-size: .9rem; color: var(--text-2); }
.bar-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bar-line { display: flex; align-items: center; gap: 6px; }
.bar { display: block; height: 14px; border-radius: 0 6px 6px 0; min-width: 2px; background: var(--c); }
.bar-val { font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s0 { --c: var(--chart-1); } .s1 { --c: var(--chart-2); } .s2, .s3 { --c: var(--chart-3); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--text-2); margin: 4px 0 10px; }
.chart-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.chart-line { width: 100%; max-width: 520px; height: auto; display: block; }
.chart-line text { font-size: 10px; fill: var(--text-2); font-family: var(--font); font-weight: 700; }
.chart-line .grid { stroke: var(--border); stroke-width: 1; }
.chart-line .ln { fill: none; stroke: var(--c); stroke-width: 2.6; stroke-linejoin: round; }
.chart-line .pt { fill: var(--surface); stroke: var(--c); stroke-width: 2; }
.chart-data summary { cursor: pointer; font-size: .85rem; color: var(--text-2); margin-top: 6px; }
.chart-data .mat-table { margin-top: 8px; }
.mat-drawing { border: 2px dashed var(--border-2); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.mat-drawing p { margin: 0; line-height: 1.55; }
.mat-drawing-label { font-size: .82rem; color: var(--text-2); font-weight: 600; }

/* ======================================================================
   IndexLab — elementy marki (monochromatycznie; stany rozróżnia kształt i ikona, nie kolor)
   ====================================================================== */
.eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); }
.tabbar { background: var(--surface); border-top: 1px solid var(--border); }
.tabbar a { position: relative; border: 0; }
.tabbar a.active { background: transparent; color: var(--text); }
.tabbar a.active::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--text); }
.tabbar a:not(.active) { color: var(--text-2); }
.subj-btn { gap: 10px; color: var(--text); }
.subj-btn .brand-mark { width: 30px; height: 30px; }
.subj-btn-name { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.subj-btn-name small { font-family: var(--font); font-weight: 500; color: var(--text-2); margin-left: 6px; font-size: .82rem; letter-spacing: 0; }
.brand-mark { display: block; color: var(--text); }
.subj-icon { color: var(--on-primary); border-radius: 18px; }
.subj-tile .subj-icon { border-radius: 26px; }

/* karty z czarną kreską u góry — jak w materiałach kursu */
.goal-card, .quests, .exam-card { border: 1px solid var(--border); border-top: 3px solid var(--text); border-radius: var(--radius); background: var(--surface); }
.ink { background: var(--text); color: var(--bg); border-radius: var(--radius); padding: 18px 20px; }
.ink .eyebrow { color: color-mix(in srgb, var(--bg) 65%, transparent); }

/* odpowiedzi: dobrze = wypełnienie + ✓, źle = przerywana ramka + przekreślenie */
.option.correct { background: var(--text); color: var(--bg); border-color: var(--text); }
.option.correct .option-letter { background: var(--bg); color: var(--text); border-color: var(--bg); }
.option.wrong { background: var(--surface); color: var(--text); border: 2px dashed var(--text); text-decoration: line-through; text-decoration-thickness: 1px; }
.option.wrong .option-letter { background: transparent; color: var(--text); border: 2px dashed var(--text); }
.option.selected { background: var(--primary-soft); color: var(--text); border-color: var(--text); }
.option.selected .option-letter { border-color: var(--text); color: var(--text); }
.option.selected.wrong { background: var(--surface); }
.type-input.ok { background: var(--text); color: var(--bg); border-color: var(--text); }
.type-input.bad { background: var(--surface); color: var(--text); border: 2px dashed var(--text); text-decoration: line-through; }
.match-item.selected { background: var(--primary-soft); color: var(--text); border-color: var(--text); }
.match-item.matched { background: var(--text); color: var(--bg); border-color: var(--text); opacity: .35; }
.match-item.wrong-flash { background: var(--surface); color: var(--text); border: 2px dashed var(--text); }
.sheet.ok { background: var(--text); color: var(--bg); }
.sheet.ok .sheet-right, .sheet.ok .sheet-note, .sheet.ok .btn-report { color: inherit; }
.sheet.ok .sheet-icon { background: var(--bg); color: var(--text); }
.sheet.bad { background: var(--surface); color: var(--text); border-top: 2px dashed var(--text); }
.sheet.bad .sheet-icon { background: transparent; border: 2px dashed var(--text); }
.btn-success { --b: var(--text); --bc: var(--bg); }
.sheet.ok .btn-success { --b: var(--bg); --bc: var(--text); }
.btn-danger-solid { --b: var(--text); --bc: var(--bg); }
.feedback.ok { background: var(--text); color: var(--bg); }
.feedback.ok strong { color: inherit; }
.feedback.bad { background: var(--surface); border: 2px dashed var(--text); }
.ans.bad span { text-decoration: line-through; }
.rate-nie { --b: var(--surface); --bc: var(--text); border: 2px dashed var(--text); }
.rate-trudne { --b: var(--surface-2); --bc: var(--text); }
.rate-umiem { --b: var(--text); --bc: var(--bg); }
.score.ok { background: var(--text); color: var(--bg); }
.score.warn { background: var(--surface-2); color: var(--text); }
.score.bad { background: var(--surface); color: var(--text); border: 1.5px dashed var(--text); }
.done-note { background: var(--surface-2); color: var(--text); }
.day.on .dot, .stop.done .stop-dot i { color: var(--bg); }
.end-tile span, .t-gold span { color: var(--bg); }
.end-tile strong { color: var(--text); }
.level-badge { color: var(--bg); }
.badge-item.got .badge-medal, .medal.got .badge-medal { color: var(--bg); }
.chip-flame.on, .chip-flame.on svg, .chip-xp, .chip-xp svg { color: var(--text); }
.chip-flame svg { color: var(--border-2); }
.combo { background: var(--text); color: var(--bg); }
.avatar { background: var(--text) !important; color: var(--bg); }
.avatar-add { background: transparent !important; color: var(--text-2) !important; }
.who-item .avatar-lg { box-shadow: none; }
.mistakes-card .quest-icon, .route-card .quest-icon, .quest-icon, .quest.done .quest-icon { background: var(--surface-2); color: var(--text); }
.quest.done .quest-icon { background: var(--text); color: var(--bg); }
.mistakes-card { border-color: var(--border); }
.here { background: var(--text); color: var(--bg); }
.exam-tile.done { background: var(--text); color: var(--bg); border-color: var(--text); }
.exam-tile.done span { color: var(--bg); }
.exam-strip button.cur { color: var(--bg); }
.toast-btn { background: var(--bg); color: var(--text); }
.btn-gold, .btn-primary { --bc: var(--bg); }
.btn-continue { background: var(--text); }

/* logowanie: blok z logo marki */
.gate-brand { display: grid; justify-items: center; gap: 10px; color: var(--text); }
.gate-brand svg.brand-name { width: 210px; height: auto; }
.gate-brand .eyebrow { margin-top: 2px; }
.gate-logo { display: none; }

/* komunikat „Kolumb jest teraz częścią IndexLab” */
.rebrand-note { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.rebrand-note .brand-mark { width: 34px; height: 34px; flex: none; color: var(--bg); }
.rebrand-note p { margin: 2px 0 0; color: color-mix(in srgb, var(--bg) 80%, transparent); font-size: .92rem; }
.rebrand-note strong { font-family: var(--font-head); font-size: 1.05rem; }
.rebrand-note .icon-btn { color: var(--bg); margin: -8px -10px 0 auto; }

/* ---------- odcienie i drobne poprawki (IndexLab v2) ---------- */
.progress { background: var(--surface-2); }
.ring { background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring-goal span { color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; }
.goal-text > span:last-child svg { color: var(--text-2); }
.lv-row svg { width: 18px; height: 18px; color: var(--text); }
.lv-row b { font-weight: 600; }
.tabbar a { font-size: .72rem; }
.tabbar a svg { width: 24px; height: 24px; }
.btn-continue { border-radius: 14px; }
.card, .goal-card, .quests, .exam-card, .leg, .dzial-row, .option, .match-item, .subject-opt, .exam-tile, .menu-list { border-color: var(--border); }
.dzial-row, .option, .match-item, .exam-tile { border-width: 1px; }

/* „Na dziś” */
.plan { display: grid; gap: 2px; border-top: 3px solid var(--text); }
.plan .card-title { margin-bottom: 8px; }
.plan-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; text-decoration: none; border-top: 1px solid var(--border); }
.plan-item:first-of-type { border-top: 0; }
.plan-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border-2); color: var(--text); flex: none; }
.plan-check svg { width: 18px; height: 18px; }
.plan-item.done .plan-check { background: var(--text); border-color: var(--text); color: var(--bg); }
.plan-item.done .plan-name { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.plan-name { flex: 1; min-width: 0; font-weight: 500; }
.plan-item > svg:last-child { width: 18px; height: 18px; color: var(--text-2); }

/* Aktualności */
.news-meta { margin: -6px 0 12px; }
.news { display: grid; gap: 10px; margin-top: 12px; }
.news-sec { padding: 0; overflow: hidden; }
.news-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.news-sec > summary::-webkit-details-marker { display: none; }
.news-sec > summary small { font-family: var(--font); font-weight: 600; font-size: .78rem; color: var(--text-2); min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.news-sec[open] > summary { border-bottom: 1px solid var(--border); }
.news-rows { margin: 0; padding: 4px 18px 8px; }
.news-row { display: grid; grid-template-columns: minmax(0, 42%) 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.news-row:first-child { border-top: 0; }
.news-row dt { font-size: .86rem; color: var(--text-2); font-weight: 500; }
.news-row dd { margin: 0; font-weight: 600; font-size: .95rem; min-width: 0; }
.news-row dd small { display: block; font-weight: 400; color: var(--text-2); font-size: .84rem; margin-top: 2px; }
.news-note { margin: 0 18px 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; line-height: 1.5; }
.news-foot { margin-top: 14px; }
@media (max-width: 420px) { .news-row { grid-template-columns: 1fr; gap: 2px; } }
.search-input { font-weight: 400; font-size: 1rem; min-height: 50px; background: var(--surface); border: 1px solid var(--border-2); }
.search-input::placeholder { color: var(--text-2); font-weight: 400; }
.option { font-weight: 500; font-size: .98rem; }
.option .option-text { line-height: 1.42; }
.ex-prompt, .question-text { font-weight: 700; }

/* przedmiot bez zakładki Aktualności — pasek ma wtedy 4 pozycje */
.tabbar a[hidden] { display: none; }

/* ---------- licznik podstawy programowej ---------- */
.core-card { display: grid; gap: 6px; padding: 20px; margin-bottom: 16px; border-radius: var(--radius); background: var(--text); color: var(--bg); }
.core-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.core-card .eyebrow { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.core-link { display: inline-flex; align-items: center; gap: 2px; color: var(--bg); text-decoration: none; font-weight: 600; font-size: .9rem; }
.core-link svg { width: 18px; height: 18px; }
.core-num { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-head); line-height: 1; margin-top: 6px; }
.core-num b { font-size: clamp(4rem, 22vw, 5.5rem); font-weight: 700; letter-spacing: -.04em; }
.core-num span { font-size: 2rem; font-weight: 600; }
.core-sub { margin: 0; font-size: 1rem; color: color-mix(in srgb, var(--bg) 75%, transparent); }
.core-bar, .core-mini { position: relative; height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--bg) 18%, transparent); overflow: hidden; margin-top: 10px; }
.core-bar i, .core-mini i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.core-bar i.m, .core-mini i.m { background: var(--bg); }
.core-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.core-stats div { min-width: 0; }
.core-stats dt { font-size: .76rem; color: color-mix(in srgb, var(--bg) 65%, transparent); }
.core-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.core-dz { margin-top: 8px; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); }
.core-dz summary { cursor: pointer; padding: 12px 0 4px; font-weight: 600; font-size: .92rem; list-style: none; display: flex; justify-content: space-between; }
.core-dz summary::-webkit-details-marker { display: none; }
.core-dz summary::after { content: "+"; font-size: 1.1rem; line-height: 1; }
.core-dz[open] summary::after { content: "−"; }
.core-dz ol { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.core-dz a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 7px 0; color: inherit; text-decoration: none; font-size: .88rem; }
.core-dz-name { min-width: 0; }
.core-dz .core-mini { grid-column: 1 / -1; margin: 0; height: 5px; }
.core-dz b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- aktualności ---------- */
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 14px; color: var(--text-2); font-size: .92rem; }
.nw-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: .78rem; font-weight: 600; }
.nw-chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 16px; padding: 2px max(16px, env(safe-area-inset-left, 0px)); scrollbar-width: none; }
.nw-chips::-webkit-scrollbar { display: none; }
.nw-chip { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 .88rem var(--font); cursor: pointer; white-space: nowrap; }
.nw-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.nw-sec { margin-bottom: 22px; }
.nw-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.nw-title small { font: 600 .76rem var(--font); color: var(--text-2); padding: 2px 8px; border-radius: 99px; background: var(--surface-2); }
.nw-role { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.nw-date { flex: none; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text); letter-spacing: 0; text-transform: none; font-size: .76rem; }
.nw-changes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.nw-change { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.nw-now { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.nw-was { font-size: .86rem; color: var(--text-2); }
.nw-was span { text-decoration: none; font-size: .74rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); margin-right: 4px; }
.nw-people { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.nw-people li { display: grid; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--border); }
.nw-people li:first-child { border-top: 0; }
.nw-people strong { font-size: 1.02rem; }
.nw-people small { color: var(--text-2); font-size: .86rem; line-height: 1.45; }
.nw-time { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); display: grid; gap: 14px; margin-left: 6px; }
.nw-time li { position: relative; }
.nw-time li::before { content: ""; box-sizing: border-box; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); }
.nw-time time { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.nw-time p { margin: 2px 0 0; font-weight: 600; }
.nw-note { display: grid; gap: 2px; margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: .9rem; line-height: 1.5; }
.nw-note b { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.core-legend { display: flex; gap: 14px; margin: 6px 0 0; font-size: .78rem; color: color-mix(in srgb, var(--bg) 70%, transparent); }
.core-legend span { display: inline-flex; align-items: center; gap: 6px; }
.core-legend i { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.core-legend i.m { background: var(--bg); }

/* materiał w oryginalnym arkuszu CKE (kursy „link + omówienie”) */
.material-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); margin-bottom: 12px; }
.material-link > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.material-link small { color: var(--text-2); }
.material-link svg { width: 22px; height: 22px; flex: none; }
.omowienie { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 4px; }
.omowienie strong { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }

/* temat kursu jeszcze bez treści */
.stop.soon { opacity: .5; }
.stop.soon .stop-body { cursor: default; }

/* ---------- plan nauki ---------- */
.seg-5 { grid-template-columns: repeat(5, 1fr); margin-top: 12px; }
.seg-5 button { padding: 0 4px; }
.plan-card { display: grid; gap: 12px; box-shadow: none; }
a.plan-card, .premium-cta { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); box-shadow: none; }
.plan-top { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.plan-edit { margin-left: auto; color: var(--text-2); display: flex; }
.plan-card svg { flex: none; }
.plan-days { flex: none; display: grid; justify-items: center; min-width: 64px; padding: 8px 6px; border-radius: 14px; background: var(--surface-2); }
.plan-days b { font-family: var(--font-head); font-size: 1.7rem; line-height: 1; }
.plan-days span { font-size: .68rem; text-align: center; color: var(--text-2); line-height: 1.2; margin-top: 4px; }
.plan-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.plan-text small { color: var(--text-2); font-size: .88rem; }
.plan-today { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-chip { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.plan-chip b { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.05; }
.plan-chip span { font-size: .85rem; color: var(--text-2); }
.plan-chip i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--text); }
a.plan-chip { border: 2px solid var(--text); }
a.plan-chip.ok { border-color: transparent; }
.plan-slider { display: grid; gap: 10px; }
.plan-date { font-family: var(--font-head); font-size: clamp(1.9rem, 9vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.plan-slider input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.plan-slider input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(to right, var(--text) var(--v, 50%), var(--surface-2) var(--v, 50%)); }
.plan-slider input[type="range"]::-moz-range-track { height: 10px; border-radius: 99px; background: var(--surface-2); }
.plan-slider input[type="range"]::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--text); }
.plan-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.plan-slider input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); }
.plan-slider input[type="range"]:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 8px; }
.plan-scale { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-2); margin-top: -6px; }
.plan-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; }
.plan-bar i { background: var(--text); transition: width .15s; }
.plan-bar i.rez, .plan-legend i.rez { background: repeating-linear-gradient(45deg, var(--text-2) 0 3px, transparent 3px 7px); }
.plan-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .85rem; color: var(--text-2); }
.plan-legend span { display: inline-flex; align-items: center; gap: 6px; }
.plan-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--text); display: inline-block; }
.plan-legend b { color: var(--text); }
.plan-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.plan-tile { display: grid; gap: 2px; padding: 14px 10px; border-radius: var(--radius); background: var(--text); color: var(--bg); text-align: center; }
.plan-tile b { font-family: var(--font-head); font-size: 2rem; line-height: 1; }
.plan-tile span { font-size: .78rem; opacity: .75; }
.plan-tile.warn { background: var(--surface); color: var(--text); border: 2px dashed var(--text); }
.plan-left { margin: 0 4px 16px; font-size: .9rem; }
.plan-exam summary { cursor: pointer; font-weight: 600; }
.plan-exam input { margin-top: 12px; }
input[type="date"].type-input { font-size: 1.05rem; }

/* ---------- premium ---------- */
.stop.locked .stop-dot i svg { width: 16px; height: 16px; }
.stop.locked .stop-body { text-decoration: none; color: var(--text-2); }
.stop.locked .stop-name { color: var(--text-2); }
.locked-row .badge svg { width: 14px; height: 14px; }
.locked-row { color: var(--text-2); }
.premium-cta { border-color: var(--text); }
.premium-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.plany { display: grid; gap: 12px; margin-bottom: 16px; }
.plany .card { margin-bottom: 0; }
.plan-oferta.polecany { border: 2px solid var(--text); }
.plan-oferta .eyebrow { display: block; margin-bottom: 6px; }
.plan-cena { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.plan-cena b { font-family: var(--font-head); font-size: 2.2rem; letter-spacing: -.02em; }
.plan-cena span { color: var(--text-2); }
.leg-text small svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------- przełącznik kursów i Nauka ---------- */
.subj-switch { display: flex; gap: 6px; padding: 5px; margin-bottom: 14px; border-radius: 16px; background: var(--surface-2); overflow-x: auto; }
.subj-switch button { flex: 1; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); font: 600 .95rem var(--font); cursor: pointer; white-space: nowrap; }
.subj-switch button.active { background: var(--text); color: var(--bg); }
.nauka-hero { display: grid; gap: 8px; padding: 20px; margin-bottom: 10px; border-radius: var(--radius); background: var(--text); color: var(--bg); }
.nauka-hero .eyebrow { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.nauka-hero h2 { font-size: 1.45rem; line-height: 1.2; text-wrap: balance; }
.nauka-hero .core-bar { margin-top: 4px; }
.nauka-hero .core-bar i { position: absolute; inset: 0 auto 0 0; background: var(--bg); border-radius: 99px; }
.hero-actions { display: flex; gap: 8px; margin-top: 8px; }
.hero-actions .btn { min-height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700; }
.hero-actions svg { width: 22px; height: 22px; }
.hero-main { flex: 1; background: var(--bg); color: var(--text); }
.hero-sec { min-width: 56px; padding: 0 14px; background: color-mix(in srgb, var(--bg) 14%, transparent); color: var(--bg); }
.nauka-tiles { margin-bottom: 16px; }
.nauka-tiles .plan-tile { text-decoration: none; background: var(--surface); color: var(--text); border: 2px solid var(--border); }
.nauka-tiles .plan-tile span { opacity: 1; color: var(--text-2); }
.nauka-tiles .plan-tile small { font-size: 1rem; color: var(--text-2); }
.nauka-tiles .plan-tile.off { pointer-events: none; opacity: .55; }
.pop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.pop-act { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .82rem; font-weight: 600; }
.pop-act svg { width: 22px; height: 22px; }
.pop-act.main { background: var(--text); color: var(--bg); }

/* ---------- zgłoszenie błędu (okienko w aplikacji) ---------- */
button.btn-report { border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.report-layer { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); animation: pop .15s ease; }
.report-box { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; display: grid; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); animation: sheetup .22s ease; }
.report-top { display: flex; align-items: center; justify-content: space-between; }
.report-top h2 { font-size: 1.3rem; }
.rep-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-kind { min-height: 40px; padding: 0 12px; border-radius: 99px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: 600 .88rem var(--font); cursor: pointer; }
.rep-kind.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.rep-text { min-height: 100px; font: 500 1rem var(--font); resize: vertical; }
.rep-actions { display: grid; gap: 8px; }
@media (min-width: 700px) { .report-layer { align-items: center; } }

/* ---------- prognoza matury ---------- */
.prog-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); box-shadow: none; }
.prog-card > svg { color: var(--text-2); flex: none; }
.prog-left { flex: 1; display: grid; gap: 6px; min-width: 0; }
.prog-left small { color: var(--text-2); font-size: .85rem; }
.prog-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prog-nums div { display: grid; gap: 2px; }
.prog-nums b { font-family: var(--font-head); font-size: 2rem; line-height: 1; letter-spacing: -.02em; }
.prog-nums small { color: var(--text-2); font-size: .8rem; line-height: 1.25; }
.prog-hero { display: grid; gap: 12px; padding: 20px; margin-bottom: 16px; border-radius: var(--radius); background: var(--text); color: var(--bg); }
.prog-hero .prog-nums small, .prog-hero .prog-scale { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.prog-nums.big b { font-size: clamp(2.6rem, 14vw, 3.6rem); }
.prog-range { position: relative; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--bg) 18%, transparent); margin-top: 6px; }
.prog-range i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.prog-range b { position: absolute; top: -5px; width: 4px; height: 24px; margin-left: -2px; border-radius: 2px; background: var(--bg); }
.prog-range em { position: absolute; top: -3px; width: 2px; height: 20px; margin-left: -1px; background: repeating-linear-gradient(var(--bg) 0 3px, transparent 3px 6px); }
.prog-scale { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; font-size: .82rem; color: var(--text-2); }
.prog-tempo { display: grid; gap: 8px; }
.prog-tempo .card-title { margin-bottom: 0; }
.prog-tempo-val b { font-family: var(--font-head); font-size: 1.8rem; }
.prog-tempo input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.prog-tempo input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(to right, var(--text) var(--v, 50%), var(--surface-2) var(--v, 50%)); }
.prog-tempo input[type="range"]::-moz-range-track { height: 10px; border-radius: 99px; background: var(--surface-2); }
.prog-tempo input[type="range"]::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--text); }
.prog-tempo input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); }
.prog-tempo input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); }
.prog-zysk { display: grid; gap: 6px; }
.prog-zysk a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.prog-zysk span { flex: 1; min-width: 0; font-weight: 600; }
.prog-zysk svg { width: 18px; height: 18px; color: var(--text-2); }
.prog-dz { display: grid; gap: 14px; }
.prog-dz-row { display: grid; gap: 3px; }
.prog-dz-row span { font-weight: 600; }
.prog-dz-row small { color: var(--text-2); font-size: .82rem; }
.prog-dz-row .core-mini { background: var(--surface-2); margin-top: 4px; height: 8px; }
.prog-dz-row .core-mini i { position: absolute; inset: 0 auto 0 0; background: var(--text); border-radius: 99px; }
.prog-how summary { cursor: pointer; font-weight: 600; }
.prog-how ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); font-size: .92rem; }
.plan-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.plan-more .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; }
.plan-more svg { width: 18px; height: 18px; }
.plan-info { margin: 12px 4px 0; }
.plan-track { position: relative; padding-bottom: 18px; }
.plan-marks { position: absolute; left: 15px; right: 15px; bottom: 0; height: 18px; pointer-events: none; }
.plan-marks i { position: absolute; top: -28px; width: 2px; height: 12px; margin-left: -1px; background: var(--text-2); }
.plan-marks span { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); font: 600 .7rem var(--font); font-style: normal; color: var(--text-2); white-space: nowrap; }
.plan-status { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600; background: var(--surface-2); }
.plan-status.bad { background: var(--surface); border: 2px dashed var(--text); }
.plan-status.ok { background: var(--text); color: var(--bg); }

/* ---------- własna powtórka ---------- */
.plan-tryb { margin-bottom: 12px; }
.quick-rev { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-rev .plan-chip { border: 2px solid var(--text); font: inherit; text-align: left; cursor: pointer; }
.quick-rev .plan-chip.off { border-color: transparent; opacity: .5; cursor: default; }
.rev-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); box-shadow: none; margin-bottom: 14px; }
.rev-link > svg { color: var(--text-2); flex: none; }
.rev-kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rev-kind { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.rev-kind small { color: var(--text-2); font-size: .8rem; }
.rev-kind.on { border-color: var(--text); background: var(--text); color: var(--bg); }
.rev-kind.on small { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.rev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rev-head .card-title { margin-bottom: 10px; }
.rev-dz { display: grid; gap: 6px; }
.rev-group summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.rev-group summary::-webkit-details-marker { display: none; }
.rev-group summary::after { content: '▾'; color: var(--text-2); padding: 0 8px; transition: transform .2s; }
.rev-group[open] summary::after { transform: rotate(180deg); }
.rev-dzial { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 46px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: 600 .92rem var(--font); text-align: left; cursor: pointer; }
.rev-dzial small { font-size: .78rem; color: var(--text-2); }
.rev-dzial.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.rev-dzial.on small { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.rev-dzial.part { border-color: var(--text); border-style: dashed; }
.rev-units { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 6px 10px; }
.rev-unit { min-height: 38px; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: 500 .85rem var(--font); cursor: pointer; }
.rev-unit.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.rev-start { display: grid; gap: 8px; }
.rev-start .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.rev-start .btn svg { width: 20px; height: 20px; }
.rev-start .btn[disabled] { opacity: .5; }
.rev-info { margin: 8px 4px 16px; }

/* ---------- wczytywanie kursu ---------- */
.loading-course { display: grid; justify-items: center; gap: 14px; padding: 80px 16px; color: var(--text-2); text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.diag-nums { margin: 14px 0 6px; text-align: left; }

/* ---------- kurs: pigułka zamiast zakładek (skaluje się na wiele kursów) ---------- */
.course-pill { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--border); color: var(--text); text-decoration: none; }
.course-pill-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--text); color: var(--bg); flex: none; }
.course-pill-icon svg { width: 24px; height: 24px; }
.course-pill-icon .subj-letters { font-size: .72rem; font-weight: 700; }
.course-pill-text { flex: 1; min-width: 0; display: grid; }
.course-pill-text small { color: var(--text-2); font-size: .75rem; }
.course-pill-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-pill-change { font-weight: 600; font-size: .88rem; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); }

/* ---------- szkielet zamiast „wczytywania” ---------- */
.skeleton { display: grid; gap: 14px; padding-top: 8px; }
.skeleton i { display: block; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
.sk-title { height: 34px; width: 40%; }
.sk-card { height: 150px; }
.sk-card.short { height: 90px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } }

/* ---------- cel dnia: duże liczby mieszczą się w kółku ---------- */
.ring-goal.digits-3 span { font-size: 1.05rem; }
.ring-goal.digits-4 span { font-size: .82rem; letter-spacing: -.02em; }
.goal-own { margin-top: 10px; }
.goal-own .type-input { min-height: 48px; font-size: 1rem; }

/* ---------- zdjęcie profilowe i kontakt ---------- */
.avatar-photo { padding: 0; overflow: hidden; background: var(--surface-2) !important; }
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.contact-mail { font-size: 1.05rem; word-break: break-all; }
.diag-idk { margin-top: 12px; }
.diag-hint { text-align: center; margin: 6px 0 0; }
.diag-tag { font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); margin-left: 6px; white-space: nowrap; }
.diag-tag.ok { background: var(--text); color: var(--bg); }
.diag-tag.bad { border: 1.5px dashed var(--text); background: transparent; color: var(--text); }
