/* Akademia Trzecia Ręka — jasny styl spójny ze stroną. */
/* Czcionki własne (bez zewnętrznych serwerów): Bricolage Grotesque — nagłówki, Onest — tekst. Licencja SIL OFL. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2"); 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: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-latin-wght-normal.woff2) format("woff2"); 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; }
:root {
  --ink: #0F172A; --ink2: #334155; --muted: #64748B; --line: #E2E8F0; --alt: #F6F7F9;
  --copper: #C2611F; --copper-l: #E07A2E; --copper-t: #A9521A; --copper-bg: #FDF3EC;
  --emerald: #10B981; --emerald-t: #047857; --red: #DC2626; --red-t: #B91C1C;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px -12px rgba(15, 23, 42, .16);
  --font: "Onest", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--alt); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--copper-t); }
h1, h2 { font-family: var(--display); letter-spacing: -.026em; line-height: 1.15; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
h2 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--copper-t); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: 1.1rem; color: var(--ink2); }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; box-shadow: 0 8px 22px -10px rgba(15, 23, 42, .55); transition: background .2s, transform .15s, opacity .2s; }
@media (hover: hover) { .btn:hover { background: var(--copper-t); } .btn-ghost:hover { background: #fff; color: var(--copper-t); box-shadow: inset 0 0 0 1.5px var(--copper-l); } .a-item:hover, .opt:hover:not(:disabled) { border-color: var(--copper-l); } }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: default; background: var(--ink); transform: none; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--copper-l); outline-offset: 3px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.cta-col { display: grid; gap: 12px; margin-top: 26px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--copper-t); text-decoration: underline; cursor: pointer; }

/* Nagłówek */
.a-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(18px, env(safe-area-inset-left)); background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.a-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.a-brand b { display: block; line-height: 1.1; }
.a-brand small { display: block; font-size: .72rem; color: var(--muted); }
.a-back { font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--ink2); padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); background: #fff; }
.a-wrap { max-width: 720px; margin: 0 auto; padding: 30px 18px 40px; }

/* Start */
.a-hero { background: #fff; border-radius: 28px; padding: 28px 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.a-prog { display: flex; align-items: center; gap: 12px; margin: 6px 0 20px; font-weight: 700; color: var(--muted); font-size: .9rem; }
.a-prog-bar { flex: 1; height: 8px; border-radius: 8px; background: #EEF1F5; overflow: hidden; }
.a-prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--copper), var(--copper-l)); border-radius: 8px; transition: width .6s; }
.a-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.a-item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 700; transition: border-color .2s, transform .15s; }
.a-item:active { transform: scale(.99); }
.a-em { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--copper-bg); display: grid; place-items: center; }
.a-em svg { width: 24px; height: 24px; fill: none; stroke: var(--copper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a-item.done .a-em svg { stroke: var(--emerald-t); }
.a-rep .a-em svg { stroke: #fff; }
.a-t { flex: 1; line-height: 1.3; }
.a-t small { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.a-ck { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.a-item.done .a-ck { background: var(--emerald); border-color: var(--emerald); }
.a-item.done .a-em { background: rgba(16, 185, 129, .12); }
.a-rep { background: var(--ink); color: #fff; border-color: var(--ink); }
.a-rep .a-t small { color: #CBD5E1; }
.a-rep .a-em { background: rgba(255, 255, 255, .12); }
.a-rep .a-ck { border-color: rgba(255, 255, 255, .3); }
.a-note { margin-top: 22px; font-size: .88rem; color: var(--muted); text-align: center; }

/* Lekcja */
.p-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px max(16px, env(safe-area-inset-left)); background: rgba(246, 247, 249, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.p-x { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink2); text-decoration: none; font-size: 1rem; box-shadow: inset 0 0 0 1.5px var(--line); }
.p-bar { flex: 1; display: flex; gap: 5px; }
.p-bar i { flex: 1; height: 7px; border-radius: 7px; background: #E2E8F0; transition: background .3s; }
.p-bar i.done { background: var(--copper-l); }
.p-bar i.cur { background: linear-gradient(90deg, var(--copper-l) 50%, #E2E8F0 50%); }
.p-n { flex: none; font-weight: 700; font-size: .85rem; color: var(--muted); min-width: 32px; text-align: right; }
.p-wrap { max-width: 720px; margin: 0 auto; padding: 8px 18px 130px; }
.p-kick { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.p-card { background: #fff; border-radius: 26px; padding: 26px 22px; box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); }
.p-card.in { opacity: 1; transform: none; transition: opacity .35s, transform .35s; }
.p-card h2 { font-size: 1.4rem; }
.p-card h2.q-h { font-size: 1.2rem; line-height: 1.3; }
.p-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--alt) 70%, rgba(246, 247, 249, 0)); }
.p-next { display: flex; width: 100%; max-width: 684px; margin: 0 auto; }
.md p, .md li { color: var(--ink2); }
.md ul, .md ol { padding-left: 1.2em; margin: 0 0 1em; }
.md li { margin-bottom: 6px; }
.md b { color: var(--ink); }
.md blockquote { margin: 0 0 1em; padding: 12px 16px; border-radius: 14px; background: var(--copper-bg); color: var(--copper-t); font-size: .92rem; font-weight: 600; }
.q-kind { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--copper-t); margin-bottom: 8px; }
.hint { color: var(--muted); font-size: .92rem; }
.opts { display: grid; gap: 10px; margin-top: 8px; }
.opt { text-align: left; font: inherit; font-weight: 600; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; transition: border-color .2s, background .2s; line-height: 1.4; }
.opt:disabled { cursor: default; }
.opt.ok { border-color: var(--emerald); background: rgba(16, 185, 129, .08); }
.opt.bad { border-color: var(--red); background: rgba(220, 38, 38, .06); }
.opt.tick { position: relative; padding-left: 50px; }
.opt.tick::before { content: ""; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 7px; border: 2px solid #CBD5E1; background: #fff; }
.opt.tick.on { border-color: var(--copper-l); background: var(--copper-bg); }
.opt.tick.on::before { background: var(--copper); border-color: var(--copper); }
.opt.tick.on::after { content: ""; position: absolute; left: 23px; top: 50%; width: 8px; height: 4px; margin-top: -4px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.expl { margin-top: 16px; padding: 14px 16px; border-radius: 16px; font-size: .95rem; }
.expl.ok { background: rgba(16, 185, 129, .1); color: #065F46; }
.expl.bad { background: rgba(220, 38, 38, .08); color: #7F1D1D; }

/* Kalkulator */
.fields { display: grid; gap: 18px; margin: 14px 0 20px; }
.fld { display: block; font-weight: 600; color: var(--ink2); font-size: .95rem; }
.fld.rng { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.fld.rng input { grid-column: 1 / -1; }
.fld output { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.num { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.num input { flex: 1; font: inherit; font-weight: 700; font-size: 1.1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; min-width: 0; }
.num input:focus { outline: none; border-color: var(--copper-l); box-shadow: 0 0 0 4px rgba(224, 122, 46, .15); }
.num em { font-style: normal; font-weight: 700; color: var(--muted); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0; --fill: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--copper) var(--fill), #E2E8F0 var(--fill)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: #E2E8F0; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--copper); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; border: 2px solid var(--copper); box-shadow: 0 4px 10px rgba(15, 23, 42, .2); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--copper); }
.res { background: var(--alt); border-radius: 20px; padding: 18px 20px; border-left: 4px solid var(--copper-l); }
.r-l { margin: 0 0 2px; font-weight: 700; color: var(--muted); font-size: .9rem; }
.r-big { margin: 0 0 4px; font-family: var(--display); font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.r-big small { font-size: .95rem; color: var(--muted); letter-spacing: 0; }
.r-s { margin: 0; color: var(--ink2); font-variant-numeric: tabular-nums; }
.r-pay { margin: 12px 0 0; font-size: 1.15rem; color: var(--emerald-t); font-weight: 700; }
.r-warn { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: #FEF3C7; color: #92400E; font-weight: 600; font-size: .95rem; }

/* Sortowanie */
.sort { display: grid; gap: 12px; margin-top: 10px; }
.srow { border: 2px solid var(--line); border-radius: 18px; padding: 14px; transition: border-color .2s; }
.srow p { margin: 0 0 10px; font-weight: 600; }
.srow.ok { border-color: var(--emerald); }
.srow.bad { border-color: var(--red); }
.sbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sbtn { font: inherit; font-size: .88rem; font-weight: 700; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink2); cursor: pointer; }
.sbtn.on { border-color: var(--copper); background: var(--copper-bg); color: var(--copper-t); }
.sbtn:disabled { cursor: default; }
.swhy { margin: 10px 0 0 !important; font-size: .9rem; font-weight: 500 !important; color: var(--ink2); }

/* Koniec lekcji */
.f-wrap { text-align: center; padding-top: 50px; }
.f-badge { width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%; background: var(--emerald); color: #fff; font-size: 2.8rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(16, 185, 129, .15); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.f-key { text-align: left; background: #fff; border-radius: 24px; padding: 22px; box-shadow: var(--shadow); margin-top: 24px; }
.f-key h2 { font-size: 1.1rem; }
.f-key ul { margin: 0; padding-left: 1.2em; color: var(--ink2); }
.f-key li { margin-bottom: 8px; }
.f-wrap .eyebrow { justify-content: center; }

/* Raport */
.r-head { margin-bottom: 20px; }
.r-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.r-stat { background: #fff; border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.r-stat small { display: block; font-weight: 700; color: var(--muted); font-size: .82rem; }
.r-stat b { display: block; font-size: 1.7rem; letter-spacing: -.03em; line-height: 1.2; margin: 4px 0; font-variant-numeric: tabular-nums; }
.r-stat span { font-size: .85rem; color: var(--ink2); }
.r-stat.hi { background: var(--ink); color: #fff; }
.r-stat.hi small, .r-stat.hi span { color: #CBD5E1; }
.r-sec { background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 14px; }
.r-sec h2 { font-size: 1.15rem; }
.r-sec ul, .r-sec ol { margin: 0; padding-left: 1.2em; color: var(--ink2); }
.r-sec li { margin-bottom: 8px; }
.r-rec li b { display: block; color: var(--ink); }
.r-rec li span { display: block; font-size: .93rem; }
.r-cta { background: var(--copper-bg); border-radius: 24px; padding: 24px 22px; margin: 22px 0 14px; box-shadow: inset 0 0 0 1px #F3D3BD; }
.r-form { margin-top: 10px; }
.r-form > label:first-child { display: block; font-weight: 700; color: var(--ink2); margin-bottom: 12px; }
.r-form input[type=email] { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.r-form input.bad { border-color: var(--red); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.consent input { margin-top: 3px; width: 20px; height: 20px; flex: none; accent-color: var(--copper); }
.form-msg { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: var(--emerald-t); }
.form-msg.err { color: var(--red-t); }
.r-disc { font-size: .8rem; color: var(--muted); }

.a-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 26px 18px 40px; font-size: .85rem; }
.a-foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: .92rem; max-width: 90vw; z-index: 50; transition: opacity .3s, transform .3s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.preview-badge { position: fixed; right: 10px; bottom: 10px; z-index: 30; background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; font-size: .7rem; font-weight: 800; padding: 5px 10px; border-radius: 999px; }
.p-top ~ .preview-badge { display: none; }

@media (max-width: 600px) {
  .r-stats { grid-template-columns: 1fr; }
  .a-hero { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .p-card, .p-card.in { transition: none; transform: none; opacity: 1; }
  .f-badge { animation: none; }
}
@media print {
  body { background: #fff; font-size: 12pt; }
  .a-top, .a-foot, .no-print, .toast, .preview-badge { display: none !important; }
  .a-wrap { max-width: none; padding: 0; }
  .r-sec, .r-stat { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .r-stat.hi { background: #fff; color: var(--ink); }
  .r-stat.hi small, .r-stat.hi span { color: var(--ink2); }
}
