/* Strona matematykazdiego.pl — kolory motywu „morski” z packages/tokens, kroje jak w aplikacji (Baloo 2, Figtree).
   Przebudowa 26.10.2026: szeroki układ na komputer, prawdziwe ekrany aplikacji, jasny motyw domyślnie (ciemny według systemu). */
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('/fonts/Baloo2_800ExtraBold.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-display: swap; src: url('/fonts/Figtree_500Medium.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 700; font-display: swap; src: url('/fonts/Figtree_700Bold.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 800; font-display: swap; src: url('/fonts/Figtree_800ExtraBold.woff2') format('woff2'); }

:root {
  --bg: #F6FBFA; --bg-alt: #ECF7F4; --surface: #FFFFFF; --soft: #DDF3EE; --ink: #0F3D3E; --muted: #4E6E6D; --border: #D5E8E3;
  --primary: #0F7A72; --primary-deep: #0A5A54; --on-primary: #FFFFFF; --band: #0C4F4A; --band-ink: #E8F7F4; --band-muted: #A9D6CF;
  --accent: #6B4EFF; --accent-soft: #EEEAFF; --on-accent: #FFFFFF;
  --warn-bg: #FFF4D6; --warn-ink: #6B4A00; --warm: #F2A93B;
  --ok: #1F7A43; --ok-soft: #E3F4EA; --bad: #B3322A; --bad-soft: #FBE6E3;
  --shadow: 0 1px 2px rgba(15, 61, 62, .06), 0 12px 32px -12px rgba(15, 61, 62, .18);
  --shadow-lg: 0 2px 6px rgba(15, 61, 62, .08), 0 40px 80px -30px rgba(15, 61, 62, .35);
  --radius: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161B1D; --bg-alt: #1C2325; --surface: #222A2C; --soft: #1F3A38; --ink: #ECF2F1; --muted: #A7B4B2; --border: #34403F;
    --primary: #3CC4B6; --primary-deep: #23958A; --on-primary: #062E2B; --band: #0E3633; --band-ink: #E8F7F4; --band-muted: #8CC9C0;
    --accent: #A08CFF; --accent-soft: #2C2650; --on-accent: #140C3D;
    --warn-bg: #3D3217; --warn-ink: #F3D98B;
    --ok: #6BD49A; --ok-soft: #1D3B2C; --bad: #FF8A7A; --bad-soft: #462724;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -30px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.6 'Figtree', system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); font-weight: 700; }
a:focus-visible, button:focus-visible, summary:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

h1, h2, h3, h4 { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; line-height: 1.12; margin: 0 0 12px; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.05; }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: 23px; }
h4 { font-size: 19px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); }
.muted { color: var(--muted); }
.label { color: var(--primary); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }
.center { text-align: center; }
.math { font-family: 'Figtree', system-ui, sans-serif; font-weight: 700; white-space: nowrap; }

/* Nagłówek strony */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
header.top.scrolled { border-bottom-color: var(--border); }
header.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 22px/1 'Baloo 2', system-ui, sans-serif; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
nav.links { display: flex; gap: 26px; margin-left: auto; }
nav.links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .15s; }
nav.links a:hover { color: var(--ink); }
/* Na wąskim ekranie strona główna zostawia sam przycisk; podstrony (bez przycisku) zachowują swoje trzy odnośniki. */
@media (max-width: 960px) { header.top:has(.button) nav.links { display: none; } header.top .button.small { margin-left: auto; } }
@media (max-width: 420px) { .brand { font-size: 0; gap: 0; } nav.links { gap: 16px; } header.top .wrap { gap: 16px; } }

/* Przyciski */
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--primary); color: var(--on-primary); text-decoration: none; font: 800 17px/1 'Figtree', system-ui, sans-serif; box-shadow: 0 4px 0 var(--primary-deep);
  transition: transform .15s ease-out, box-shadow .15s ease-out, background-color .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--primary-deep); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-deep); }
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.button.small { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 13px; box-shadow: 0 3px 0 var(--primary-deep); }
.button.secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--border); box-shadow: none; }
.button.secondary:hover { border-color: var(--primary); }
.button.light { background: #FFFFFF; color: #0A5A54; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.button.store { background: var(--ink); color: var(--bg); box-shadow: none; cursor: default; padding: 0 22px 0 18px; }
.button.store svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.button.store > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 17px; }
.button.store small { font: 700 12px/1 'Figtree', system-ui, sans-serif; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.button.store:hover, .button.store:active { transform: none; box-shadow: none; }

/* 1. Nagłówek z urządzeniami */
.hero { padding: 48px 0 96px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 700; margin-bottom: 22px; box-shadow: var(--shadow); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hl { color: var(--primary); }
.hero .lead { max-width: 560px; }
.hero-devices { position: relative; padding: 0 0 48px 64px; margin-right: -24px; }
.glow { position: absolute; inset: -12% -20% -10% 0; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 28%, transparent), transparent 70%), radial-gradient(closest-side at 80% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); filter: blur(10px); z-index: -1; }
.hero-devices .hero-ipad { margin: 0; }
.hero-devices .hero-iphone { position: absolute; left: 0; bottom: 0; width: 27%; margin: 0; z-index: 1; }
@media (max-width: 960px) {
  .hero { padding: 24px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-devices { padding: 0 0 32px 48px; max-width: 680px; }
}
@media (max-width: 600px) {
  .hero-devices { padding: 0 0 24px 32px; }
  .hero-devices .hero-iphone { width: 34%; }
  .actions .button { flex: 1 1 100%; }
}

/* 2. Liczby */
.numbers { background: var(--band); color: var(--band-ink); padding: 88px 0; }
.numbers .label { color: var(--band-muted); }
.numbers-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: 48px; }
.numbers-head .label, .numbers-head h2 { grid-column: 1; }
.numbers-head h2 { margin: 0; }
.numbers-head p:last-child { grid-column: 2; grid-row: 1 / span 2; margin: 0; color: var(--band-muted); font-size: 19px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: color-mix(in srgb, var(--band-ink) 16%, transparent); border-radius: var(--radius); overflow: hidden; }
.stats li { background: var(--band); padding: 28px 30px; display: flex; flex-direction: column; gap: 8px; }
.stats b { font: 800 clamp(48px, 5vw, 68px)/1 'Baloo 2', system-ui, sans-serif; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.stats span { color: var(--band-muted); font-size: 16px; }
.stats b span { font: inherit; color: inherit; }
@media (max-width: 960px) {
  .numbers { padding: 64px 0; }
  .numbers-head { grid-template-columns: 1fr; }
  .numbers-head p:last-child { grid-column: 1; grid-row: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) { .stats li { padding: 20px 18px; } .stats span br { display: none; } }

/* 3. Jak liczymy plan */
section { padding: 104px 0; }
@media (max-width: 960px) { section { padding: 72px 0; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.methods-title { font-size: clamp(24px, 2.4vw, 30px); margin: 96px 0 28px; max-width: 760px; }
.methods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.methods li { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.methods p { color: var(--muted); font-size: 15px; flex: 1; }
.methods cite { font-style: normal; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; }
.ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--soft); color: var(--primary); margin-bottom: 14px; flex: none; }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { .methods { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) { .methods-title { margin-top: 64px; } }
@media (max-width: 700px) { .methods { grid-template-columns: 1fr; } }

/* 4. Jedno zadanie */
.try { background: var(--bg-alt); }
.try-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.quiz { padding: 28px; }
.quiz-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin-bottom: 14px; }
.quiz-top span:last-child { color: var(--muted); }
.quiz-q { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.quiz-q .math { font-size: 22px; }
.quiz-q .wrap6 { white-space: normal; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-options button { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface); color: var(--ink);
  font: 700 20px/1 'Figtree', system-ui, sans-serif; cursor: pointer; text-align: left; transition: border-color .15s, background-color .15s, transform .15s; }
.quiz-options button b { color: var(--muted); font-size: 16px; }
.quiz-options button:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); }
.quiz-options button:disabled { cursor: default; }
.quiz-options button.correct { border-color: var(--ok); background: var(--ok-soft); }
.quiz-options button.wrong { border-color: var(--bad); background: var(--bad-soft); }
.quiz-hint { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-size: 15px; }
.quiz-result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.quiz-verdict { font-weight: 800; font-size: 18px; }
.quiz-verdict.ok { color: var(--ok); }
.quiz-verdict.bad { color: var(--bad); }
.quiz-steps { margin: 0; padding-left: 22px; color: var(--muted); }
.quiz-steps li { margin-bottom: 6px; }
.quiz-steps .math { color: var(--ink); white-space: normal; }
@media (max-width: 960px) { .try-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 420px) { .quiz { padding: 20px; } .quiz-options { grid-template-columns: 1fr; } }

/* 5. Funkcje — siatka kafelków */
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center, .pricing .section-head { margin-left: auto; margin-right: auto; text-align: center; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.tile { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; }
.tile p { color: var(--muted); margin: 0; }
.tile-text { position: relative; z-index: 1; max-width: 460px; }
.tile img { border-radius: 14px; }
.t-notebook { grid-column: span 8; grid-row: span 2; background: linear-gradient(160deg, var(--soft), var(--surface) 55%); }
.t-notebook img { margin-top: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.t-ai { grid-column: span 4; grid-row: span 2; background: linear-gradient(170deg, var(--accent-soft), var(--surface) 60%); }
/* Zrzut w kafelku nie wpływa na jego wysokość: wypełnia resztę miejsca i jest ucięty u dołu. */
.shot { position: relative; flex: 1; min-height: 0; margin: 24px -28px -28px; }
.shot img { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 72%; max-width: 340px; border-radius: 30px; border: 7px solid #0E1416; box-shadow: var(--shadow-lg); }
.t-lesson, .t-papers { min-height: 500px; }
.t-lesson { grid-column: span 5; }
.t-papers { grid-column: span 7; }
.t-papers .shot img { left: 40px; transform: none; width: 820px; max-width: none; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.t-small { grid-column: span 4; padding: 24px; }
.t-small h3 { font-size: 20px; margin-bottom: 6px; }
.t-small p { font-size: 15px; }
.t-diego img { width: 64px; height: 64px; margin: -4px 0 10px -4px; border-radius: 0; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; margin-bottom: 10px; }
@media (max-width: 1100px) {
  .t-notebook { grid-column: span 12; grid-row: auto; }
  .t-ai { grid-column: span 6; grid-row: auto; min-height: 560px; }
  .t-lesson { grid-column: span 6; }
  .t-papers { grid-column: span 12; }
  .t-small { grid-column: span 6; }
}
@media (max-width: 700px) {
  .bento { gap: 14px; }
  .tile { padding: 22px; }
  .t-ai, .t-lesson, .t-small { grid-column: span 12; }
  .t-ai, .t-lesson { min-height: 560px; }
  .t-papers { min-height: 440px; }
  .t-papers .shot img { left: 22px; width: 640px; }
}

/* 6. Cennik */
.pricing { background: var(--bg-alt); }
.price-grid { display: grid; grid-template-columns: 1fr 1fr 1.05fr; gap: 18px; align-items: stretch; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.price-card .button { margin-top: auto; }
.price-card.featured { border: 2px solid var(--accent); background: linear-gradient(170deg, var(--accent-soft), var(--surface) 55%); }
.price { font: 800 52px/1 'Baloo 2', system-ui, sans-serif; margin: 6px 0 18px; }
.price small { font: 700 15px/1 'Figtree', system-ui, sans-serif; color: var(--muted); }
.badge { position: absolute; top: -13px; right: 24px; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; }
ul.ticks { list-style: none; padding: 0; margin: 0 0 26px; }
ul.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
ul.ticks li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F7A72' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.compare { background: var(--band); color: var(--band-ink); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.compare .label { color: var(--band-muted); margin: 0; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.bar-row span { font-weight: 700; }
.bar-row b { font: 800 26px/1 'Baloo 2', system-ui, sans-serif; color: #FFFFFF; grid-column: 2; grid-row: 1; }
.bar { grid-column: 1 / -1; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--band-ink) 14%, transparent); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.bar .tutor { width: 100%; background: #F2A93B; }
.bar .pro { width: 7.1%; min-width: 14px; background: #A08CFF; }
.compare .small { font-size: 14px; color: var(--band-muted); margin: 0; }
@media (max-width: 1000px) { .price-grid { grid-template-columns: 1fr 1fr; } .compare { grid-column: 1 / -1; } }
@media (max-width: 640px) { .price-grid { grid-template-columns: 1fr; } .price-card, .compare { padding: 26px; } }

/* 7. Dla rodziców */
.parents-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.parents-grid > div p:not(.label) { color: var(--muted); font-size: 19px; }
.parent-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.parent-points li { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; color: var(--muted); box-shadow: var(--shadow); }
.parent-points b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }
@media (max-width: 960px) { .parents-grid { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) { .parent-points { grid-template-columns: 1fr; } }

/* 8. Pytania */
.faq { background: var(--bg-alt); }
.faq h2 { text-align: center; margin-bottom: 32px; }
.more { text-align: center; margin-top: 24px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 22px; margin-bottom: 12px; }
details summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font: 800 24px/1 'Figtree', system-ui, sans-serif; color: var(--primary); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
details p { color: var(--muted); }

/* 9. Na koniec */
.final { padding: 88px 0 104px; }
.final-box { display: flex; align-items: center; gap: 40px; background: linear-gradient(120deg, var(--primary-deep), var(--primary) 55%, #2E8F86); color: #FFFFFF; border-radius: 32px; padding: 48px 56px; box-shadow: var(--shadow-lg); }
@media (prefers-color-scheme: dark) { .final-box { background: linear-gradient(120deg, #0B3F3B, #13665F 60%, #1B7A72); } }
.final-box img { width: 180px; flex: none; }
.final-box h2 { color: #FFFFFF; }
.final-box p { font-size: 19px; opacity: .9; }
@media (max-width: 700px) { .final-box { flex-direction: column; text-align: center; padding: 36px 24px; gap: 16px; } .final-box img { width: 130px; } }

/* Podstrony (pomoc, prywatność, regulamin, 404) */
.doc { padding-top: 32px; padding-bottom: 32px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); }
.doc h2 { font-size: 26px; margin-top: 36px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--border); }
.doc th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.table-scroll { overflow-x: auto; }
.draft { background: var(--warn-bg); color: var(--warn-ink); border-radius: 16px; padding: 14px 18px; margin: 8px 0 24px; font-size: 15px; }
.todo { background: var(--warn-bg); color: var(--warn-ink); padding: 0 4px; border-radius: 4px; }
.doc details summary { padding: 14px 0; }

footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
footer a { color: var(--muted); }

/* Wejście sekcji przy przewijaniu (strona.js); bez JS i przy ograniczonym ruchu wszystko widać od razu. */
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease-out, transform .6s cubic-bezier(.2, .7, .2, 1); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .methods li.reveal:nth-child(2), .motion .bento .reveal:nth-child(2) { transition-delay: .06s; }
.motion .methods li.reveal:nth-child(3), .motion .bento .reveal:nth-child(3) { transition-delay: .12s; }
.motion .methods li.reveal:nth-child(4), .motion .bento .reveal:nth-child(4) { transition-delay: .18s; }
.motion .methods li.reveal:nth-child(5) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } .button { transition: none; } }

/* ===== Obudowy urządzeń (26.10.2026; wymiary jak devices.css, MIT — iPhone 14 Pro 428×868, ramka 19 px) =====
   Wszystko w cqw samej obudowy: procentowy padding liczyłby się od rodzica i ramka wychodziła za gruba. */
.frame { position: relative; isolation: isolate; container-type: inline-size; background: #050506; margin: 0;
  box-shadow: 0 0 0 1px #2A2D31, 0 2px 4px rgba(15, 40, 40, .12), 0 30px 60px -20px rgba(10, 40, 40, .35), 0 70px 120px -40px rgba(10, 40, 40, .45); }
/* Metalowa obwódka z odblaskiem, jak tytan iPhone'a i aluminium iPada. */
.frame::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 1.2cqw #4A4D52, inset 0 0 .9cqw .5cqw rgba(255, 255, 255, .28); }
.frame .screen { position: absolute; overflow: hidden; background: #F2FAF8; }
.frame.iphone { aspect-ratio: 428 / 882; border-radius: 15.9% / 7.7%; }
.frame.iphone .screen { inset: 4.44cqw; border-radius: 11.4cqw; }
.frame.iphone::after { content: ''; position: absolute; top: 6.6cqw; left: 50%; width: 28cqw; height: 8.2cqw; border-radius: 99px; background: #050506; transform: translateX(-50%); z-index: 3; }
.frame.ipad { aspect-ratio: 1240 / 880; border-radius: 4.6% / 6.5%; }
.frame.ipad::before { box-shadow: inset 0 0 0 .55cqw #9DA2A8, inset 0 0 .5cqw .25cqw rgba(255, 255, 255, .35); }
.frame.ipad .screen { inset: 2.42cqw; border-radius: 2.2cqw; }
.frame.ipad::after { content: ''; position: absolute; top: 1.05cqw; left: 50%; width: .45cqw; aspect-ratio: 1; border-radius: 50%; background: #1C2630; transform: translateX(-50%); z-index: 3; }
.frame > .screen > img { width: 100%; height: auto; border-radius: 0; }
@media (prefers-color-scheme: dark) { .frame { box-shadow: 0 0 0 1px #3A3D42, 0 30px 60px -20px rgba(0, 0, 0, .6), 0 70px 120px -40px rgba(0, 0, 0, .7); } }

/* Pasek stanu wewnątrz ekranu (zrzuty z przeglądarki go nie mają). */
.statusbar { display: flex; justify-content: space-between; align-items: center; font: 700 15px/1 -apple-system, 'Figtree', system-ui, sans-serif; color: #0F3D3E; padding: 0 26px; height: 30px; }
.sb-icons { display: flex; gap: 6px; align-items: center; }
.sb-icons i { display: block; background: #0F3D3E; }
.sb-icons .sig { width: 17px; height: 11px; clip-path: polygon(0 100%, 0 70%, 22% 70%, 22% 45%, 44% 45%, 44% 22%, 66% 22%, 66% 0, 88% 0, 88% 100%); }
.sb-icons .wifi { width: 15px; height: 11px; clip-path: polygon(50% 100%, 0 30%, 15% 12%, 50% 0, 85% 12%, 100% 30%); }
.sb-icons .bat { width: 24px; height: 11px; border-radius: 3px; background: linear-gradient(90deg, #0F3D3E 78%, #9FB3B2 78%); }

/* ===== Scena: zeszyt i ocena AI ===== */
.scene { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1.5fr); gap: 48px; align-items: center; margin-bottom: 56px; }
.scene-text h3 { font-size: clamp(24px, 2.4vw, 32px); }
.scene-text p { color: var(--muted); }
.scene-text .replay { margin-top: 8px; }
.scene-text .replay svg { width: 18px; height: 18px; }
.scene-stage { position: relative; }
.scene-stage .frame.iphone { width: min(340px, 86vw); margin: 0 auto; }
@media (max-width: 960px) { .scene { grid-template-columns: 1fr; gap: 28px; } }

/* Odtworzony ekran aplikacji: stałe płótno w punktach (iPad 1180×820, iPhone 390×844), skalowane w sceny.js. */
.app { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); transform: scale(var(--s, 1)); transform-origin: 0 0;
  background: #F2FAF8; color: #0F3D3E; font: 500 16px/1.45 'Figtree', system-ui, sans-serif; }
.app p { margin: 0; }
.app .tex { font-family: 'Times New Roman', Georgia, serif; font-style: italic; }
.app-task { position: absolute; display: flex; flex-direction: column; gap: 16px; }
.app-label { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #0F7A72; display: flex; justify-content: space-between; align-items: center; }
.app-chip { background: #DDF3EE; border-radius: 99px; padding: 3px 10px; font-size: 11px; letter-spacing: .02em; text-transform: none; }
.app-title { font-weight: 800; font-size: 21px; line-height: 1.35; }
.app-row { display: flex; gap: 10px; }
.app-btn { flex: 1; display: flex; align-items: center; justify-content: center; height: 44px; border: 2px solid #CFE5E0; border-radius: 14px; background: #fff; font-weight: 800; font-size: 15px; color: #0F3D3E; white-space: nowrap; }
.app-grade { flex: none; height: 52px; transition: transform .15s, background-color .2s, border-color .2s; position: relative; }
.app-grade.press { transform: scale(.96); background: #EEEAFF; border-color: #6B4EFF; }
.app-grade .g-busy { display: none; color: #6B4EFF; }
.app-grade.busy .g-idle { display: none; }
.app-grade.busy .g-busy { display: inline; }
.app-grade .g-busy i { font-style: normal; animation: blink 1s infinite; }
.app-grade .g-busy i:nth-child(2) { animation-delay: .2s; }
.app-grade .g-busy i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .15; } }
.app-src { font-size: 12px; color: #4E6E6D; }
.app-notebook { position: absolute; background: #fff; border: 2px solid #CFE5E0; border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; }
.nb-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 16px 4px; }
.nb-head > div:first-child { display: flex; flex-direction: column; font-size: 11px; color: #4E6E6D; }
.nb-head b { font-size: 12px; color: #0F3D3E; text-transform: uppercase; letter-spacing: .06em; }
.nb-head-icons { display: flex; gap: 14px; }
.app .ic { width: 22px; height: 22px; fill: none; stroke: #0F3D3E; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app .ic.dim { stroke: #A9BDBB; }
.nb-tools { display: flex; justify-content: space-between; align-items: center; padding: 6px 16px; }
.nb-tools .tool { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.nb-tools .tool.on { box-shadow: inset 0 0 0 2px #0F7A72; background: #fff; }
.nb-tools .tool.on .ic { stroke: #0F7A72; }
.nb-colors { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px 10px; border-bottom: 1px solid #E6EEF0; }
.nb-colors .dots { display: flex; gap: 10px; }
.nb-colors .dots b { width: 22px; height: 22px; border-radius: 50%; background: var(--c); }
.nb-colors .dots b.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0F3D3E; }
.nb-colors .sizes { display: flex; gap: 10px; align-items: center; }
.nb-colors .sizes i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.nb-colors .sizes i::after { content: ''; width: var(--d); height: var(--d); border-radius: 50%; background: #23333E; }
.nb-colors .sizes i.on { box-shadow: inset 0 0 0 2px #0F7A72; }
.nb-foot { display: flex; align-items: center; gap: 14px; padding: 8px 16px; border-top: 1px solid #E6EEF0; font-size: 12px; font-weight: 700; color: #4E6E6D; }
.nb-foot .toggle { display: flex; align-items: center; gap: 6px; }
.nb-foot .toggle i { width: 34px; height: 20px; border-radius: 99px; background: #D5DFDE; position: relative; }
.nb-foot .toggle i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.nb-foot .tool { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #0F7A72; }
.nb-foot .tool .ic { width: 18px; height: 18px; stroke: #0F7A72; }
.nb-foot .zoom { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nb-foot .zoom .ic { width: 16px; height: 16px; stroke: #4E6E6D; }
.nb-foot .zoom em { font-style: normal; color: #A9BDBB; }
.app.portrait .nb-tools .tool { width: 34px; height: 34px; }
.app.portrait .nb-tools .ic { width: 19px; height: 19px; }
.app.portrait .nb-colors .sizes, .app.portrait .nb-foot .zoom em { display: none; }
.nb-paper { flex: 1; width: 100%; display: block; background: linear-gradient(#E3ECEE 1.2px, transparent 1.2px) 0 0 / 28px 28px, linear-gradient(90deg, #E3ECEE 1.2px, transparent 1.2px) 0 0 / 28px 28px, #fff; }
.nb-paper .printed { font: italic 34px 'Times New Roman', Georgia, serif; fill: #2B4A7A; }
.app-sheet { position: absolute; background: #fff; border: 2px solid #CFE5E0; display: flex; flex-direction: column; gap: 14px; padding: 22px; transition: transform .65s cubic-bezier(.2, .8, .2, 1), opacity .4s; box-shadow: 0 20px 50px -20px rgba(15, 61, 62, .35); }
.app-sheet > * { opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.graded .sheet-grade > *, .sheet-formulas > *, .sheet-calc > * { opacity: 1; transform: none; }
.graded .sheet-grade > :nth-child(2) { transition-delay: .35s; }
.graded .sheet-grade > :nth-child(3) { transition-delay: .7s; }
.graded .sheet-grade > :nth-child(4) { transition-delay: 1.3s; }
.graded .sheet-grade > :nth-child(5) { transition-delay: 1.9s; }
.sh-head { display: flex; flex-direction: column; }
.sh-head b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.sh-head span { font-size: 13px; color: #4E6E6D; }
.sh-points { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #0F7A72; }
.sh-diego { display: flex; gap: 12px; align-items: center; }
.sh-diego img { width: 64px; height: 64px; flex: none; }
.sh-diego p { border: 2px solid #CFE5E0; border-radius: 16px; padding: 10px 12px; font-weight: 700; font-size: 15px; }
.sh-box { border-radius: 16px; padding: 12px 14px; border: 2px solid; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.sh-box b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.sh-box.ok { background: #E3F4EA; border-color: #2E9A57; }
.sh-box.ok b { color: #1F7A43; }
.sh-box.bad { background: #FBE6E3; border-color: #D1453B; }
.sh-box.bad b { color: #B3322A; }
.sh-box small { color: #4E6E6D; font-size: 12px; }
.sh-step { font-weight: 800; }

/* iPad poziomo: zadanie po lewej, zeszyt po prawej; ocena wysuwa się na miejsce zadania. */
.app.landscape .statusbar { height: 28px; padding: 0 30px; font-size: 14px; }
.app.landscape .app-task { left: 28px; top: 48px; width: 440px; bottom: 28px; }
.app.landscape .app-notebook { left: 492px; right: 24px; top: 40px; bottom: 24px; }
.app.landscape .app-sheet { left: 20px; top: 40px; width: 456px; bottom: 24px; border-radius: 24px; transform: translateX(-108%); }
.app.landscape.graded .sheet-grade, .app.landscape.open-formulas .sheet-formulas, .app.landscape.open-calc .sheet-calc { transform: none; }
/* iPhone pionowo: zadanie u góry, zeszyt niżej; ocena wysuwa się od dołu jak w aplikacji. */
.app.portrait .statusbar { height: 54px; padding: 8px 34px 0 40px; }
.app.portrait .app-task { left: 18px; right: 18px; top: 64px; gap: 10px; }
.app.portrait .app-title { font-size: 18px; }
.app.portrait .app-src { display: none; }
.app.portrait .app-row .app-btn { height: 38px; font-size: 14px; }
.app.portrait .app-grade { height: 46px; font-size: 14px; }
.app.portrait .app-notebook { left: 14px; right: 14px; top: 262px; bottom: 22px; }
.app.portrait .app-sheet { left: 0; right: 0; bottom: 0; height: 80%; border-radius: 28px 28px 0 0; gap: 10px; padding: 20px 18px; transform: translateY(105%); }
.app.portrait .sh-diego img { width: 52px; height: 52px; }
.app.portrait .sh-diego p, .app.portrait .sh-box { font-size: 14px; }
.app.portrait.graded .sheet-grade, .app.portrait.open-formulas .sheet-formulas, .app.portrait.open-calc .sheet-calc { transform: none; }
.app.portrait::after { content: ''; position: absolute; inset: 0; background: rgba(15, 61, 62, .25); opacity: 0; transition: opacity .5s; pointer-events: none; z-index: 1; }
.app.portrait.graded::after, .app.portrait.open-formulas::after, .app.portrait.open-calc::after { opacity: 1; }
.app.portrait .app-sheet { z-index: 2; }

/* Kursor myszy, który „klika” przycisk oceny, gdy nikt nie kliknie sam. */
.cursor { position: absolute; left: 0; top: 0; width: 26px; height: 26px; pointer-events: none; opacity: 0; z-index: 5;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 10-7 1.5L8.5 21z' fill='%230F3D3E' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform 1s cubic-bezier(.45, 0, .2, 1), opacity .3s; }
.cursor.show { opacity: 1; }
.cursor.tap { width: 34px; height: 34px; margin: -4px; border-radius: 50%; background: rgba(107, 78, 255, .35); }

/* Zrzut w obudowie: pasek stanu nad obrazem, w jednostkach szerokości ekranu. */
.frame .screen:has(> img) { display: flex; flex-direction: column; container-type: inline-size; }
.frame .screen > img { flex: none; }
.sb { flex: none; display: flex; justify-content: space-between; align-items: center; background: #F2FAF8; color: #0F3D3E; font: 700 2.6cqw/1 -apple-system, 'Figtree', system-ui, sans-serif; height: 4.6cqw; padding: 0 3.6cqw; }
.iphone .sb { font-size: 3.9cqw; height: 13.85cqw; padding: 2.6cqw 8.5cqw 0 10cqw; }
.ipad .sb { font-size: 1.15cqw; height: 2.03cqw; padding: 0 2.4cqw; }
.sb .sb-icons { gap: 1.2cqw; }
.sb .sig { width: 4.2cqw; height: 2.8cqw; }
.sb .wifi { width: 3.8cqw; height: 2.8cqw; }
.sb .bat { width: 6cqw; height: 2.8cqw; border-radius: .8cqw; }
.ipad .sb .sig { width: 1.4cqw; height: .95cqw; }
.ipad .sb .wifi { width: 1.3cqw; height: .95cqw; }
.ipad .sb .bat { width: 2cqw; height: .95cqw; border-radius: .3cqw; }
.ipad .sb .sb-icons { gap: .5cqw; }
.app-solution { margin-top: auto; height: 52px; border-radius: 16px; background: #0F7A72; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 #0A5A54; }
.app.portrait .app-solution { display: none; }

/* ===== Nagrania lekcji i arkusza: telefon z filmem i rozdziały ===== */
.scene-pair { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px; }
.video-tile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 32px; align-items: center; padding: 36px; }
.video-tile.vt-ipad { grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); }
.vt-stage .frame.ipad { width: 100%; }
.vt-text h3 { font-size: clamp(22px, 2vw, 28px); }
.vt-text > p { color: var(--muted); font-size: 15px; }
.vt-stage .frame.iphone { width: min(260px, 100%); margin: 0 auto; }
.vt-stage video { display: block; width: 100%; height: auto; background: #F2FAF8; }
.chapters { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.chapters button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 1px; width: 100%; padding: 9px 12px 9px 16px; border-radius: 12px; position: relative; transition: background-color .2s; }
.chapters button::before { content: ''; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.chapters button::after { content: ''; position: absolute; left: 4px; top: 10px; width: 3px; height: 0; border-radius: 3px; background: var(--primary); }
.chapters li.on button { background: var(--soft); }
.chapters li.on button::after { height: calc((100% - 20px) * var(--p, 0)); }
.chapters li.done button::after { height: calc(100% - 20px); }
.chapters b { font-size: 15px; }
.chapters span { font-size: 13px; color: var(--muted); }
.chapters button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) { .video-tile, .video-tile.vt-ipad { grid-template-columns: 1fr; padding: 22px; } .vt-stage { order: -1; } .vt-stage .frame.iphone { width: min(280px, 82%); } }

/* ===== „Jak liczymy plan” przy przewijaniu (sceny.js ustawia data-active) ===== */
.plan-scroll { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; }
.plan-intro { margin-bottom: 8vh; }
.pstep { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; padding-left: 64px; position: relative; opacity: .35; transition: opacity .4s; }
.pstep.on { opacity: 1; }
.pstep h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 6px; }
.pstep p { color: var(--muted); font-size: 19px; margin: 0; }
.pnum { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--primary); font: 800 22px/1 'Baloo 2', system-ui, sans-serif; transition: background-color .3s, color .3s; }
.pstep.on .pnum { background: var(--primary); color: var(--on-primary); }
.plan-sticky { position: relative; }
.pstage { position: sticky; top: calc(50vh - 230px); height: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden; }
.pane { position: absolute; inset: 0; padding: 32px; display: flex; flex-direction: column; gap: 22px; opacity: 0; transform: translateY(16px); transition: opacity .45s, transform .5s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.pane.on { opacity: 1; transform: none; }
.pane-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin: 0; font-weight: 800; }
.pane-top span { font: 800 22px/1.2 'Baloo 2', system-ui, sans-serif; }
.pane-top b { font-size: 14px; color: var(--muted); font-weight: 700; }
.pane-big { margin: auto 0 0; display: flex; flex-direction: column; }
.pane[data-pane="3"] .pane-big { margin: 0; }
.pane[data-pane="3"] .pane-big b { font-size: clamp(40px, 4vw, 56px); }
.pchart { max-height: 150px; }
.pane-big b { font: 800 clamp(48px, 5vw, 72px)/1 'Baloo 2', system-ui, sans-serif; color: var(--accent); }
.pane-big small { color: var(--muted); font-size: 15px; font-weight: 700; }
.pdots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pdots i { aspect-ratio: 1; border-radius: 16px; border: 2px solid var(--border); background: var(--bg); transition: background-color .3s, border-color .3s; transition-delay: calc(var(--i) * 110ms + .2s); position: relative; }
.pane.on .pdots i.ok { background: var(--ok-soft); border-color: var(--ok); }
.pane.on .pdots i.no { background: var(--bad-soft); border-color: var(--bad); }
.pdots i::after { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 22px; font-style: normal; opacity: 0; transition: opacity .2s; transition-delay: inherit; }
.pdots i.ok::after { content: '✓'; color: var(--ok); }
.pdots i.no::after { content: '✕'; color: var(--bad); }
.pane.on .pdots i::after { opacity: 1; }
.pmap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.pmap i { aspect-ratio: 1; border-radius: 6px; background: var(--border); transition: background-color .4s; transition-delay: calc(var(--i) * 12ms + .2s); }
.pane.on .pmap i.m1 { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.pane.on .pmap i.m2 { background: color-mix(in srgb, var(--primary) 60%, var(--surface)); }
.pane.on .pmap i.m3 { background: var(--primary); }
.pane-legend { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin: 0; }
.pane-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; background: var(--border); }
.pane-legend i.m1 { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.pane-legend i.m2 { background: color-mix(in srgb, var(--primary) 60%, var(--surface)); }
.pane-legend i.m3 { background: var(--primary); }
.pbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pbars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-weight: 700; }
.pbars b { color: var(--primary); }
.pbars i { grid-column: 1 / -1; height: 12px; border-radius: 99px; background: var(--soft); position: relative; overflow: hidden; }
.pbars i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--primary); border-radius: 99px; transition: width .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 140ms + .2s); }
.pane.on .pbars i::after { width: var(--w); }
.pchart { width: 100%; height: auto; overflow: visible; }
.pchart .target { stroke: var(--muted); stroke-dasharray: 6 6; stroke-width: 1.5; }
.pchart text { fill: var(--muted); font: 700 14px 'Figtree', sans-serif; }
.pchart .curve { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s cubic-bezier(.45, 0, .2, 1) .3s; }
.pane.on .pchart .curve { stroke-dashoffset: 0; }
.pchart .goal { fill: var(--surface); stroke: var(--accent); stroke-width: 4; opacity: 0; transition: opacity .3s 1.5s; }
.pane.on .pchart .goal { opacity: 1; }
.pane-note { margin: 0; color: var(--muted); }
.pane-note b { color: var(--ink); }
.plegend { display: flex; gap: 6px; align-items: center; font-size: 12px !important; }
.plegend i, .pweek .stack i { display: inline-block; border-radius: 4px; }
.plegend i { width: 10px; height: 10px; }
.plegend .x { opacity: 0; transition: opacity .3s; } .plegend .xl { opacity: 0; transition: opacity .3s; }
.pane.on.phase2 .plegend .x, .pane.on.phase2 .plegend .xl { opacity: 1; }
.l { background: var(--primary); } .p { background: color-mix(in srgb, var(--primary) 45%, var(--surface)); } .s { background: var(--accent); } .x { background: var(--warm); }
.pweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 220px; }
.pweek .day { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; font-weight: 700; color: var(--muted); font-size: 14px; }
.pweek .stack { width: 100%; display: flex; flex-direction: column-reverse; gap: 3px; }
.pweek .stack i { width: 100%; height: calc(var(--m) * 4.4px); transform: scaleY(0); transform-origin: bottom; transition: transform .5s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--n) * 90ms + .2s); }
.pane.on .pweek .stack i { transform: none; }
.pweek .stack i.x { transform: scaleY(0) !important; }
.pane.on.phase2 .pweek .stack i.x { transform: none !important; transition-delay: .2s; }
.pane.on.phase2 .pweek .missed .stack { opacity: .25; }
.pweek .missed .stack { transition: opacity .4s; }
.pchip { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; font-size: 15px; opacity: 0; transition: opacity .4s .3s; }
.pane.on.phase2 .pchip { opacity: 1; }
@media (max-width: 960px) {
  .plan-scroll { grid-template-columns: 1fr; gap: 0; }
  .plan-sticky { order: -1; position: sticky; top: 76px; z-index: 2; margin-bottom: 16px; }
  .plan-intro { order: -2; margin-bottom: 20px; }
  .plan-steps { display: contents; }
  .pstage { position: relative; top: 0; height: 330px; }
  .pane { padding: 20px; gap: 14px; }
  /* Karta przykleja się u góry, więc krok jest aktywny niżej na ekranie (sceny.js) i tam stoi jego tekst. */
  .pstep { min-height: 60vh; padding-left: 56px; justify-content: flex-end; padding-bottom: 12vh; }
  .pstep .pnum { top: auto; bottom: 12vh; transform: none; }
  .pchart { max-height: 96px; }
  .pane-note { font-size: 14px; }
  .pane-big b { font-size: 44px; }
  .plegend { flex-basis: 100%; flex-wrap: wrap; }
  .pweek { height: 150px; }
  .pweek .stack i { height: calc(var(--m) * 3px); }
  .pbars { gap: 10px; }
  .pdots { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .pane, .pane *, .pane *::after { transition: none !important; } }

/* Karta wzorów i kalkulator w scenie zeszytu — jak w aplikacji (karta w kolumnie zadania na iPadzie). */
.app-btn.press { transform: scale(.95); background: #DDF3EE; border-color: #0F7A72; }
.app-btn { transition: transform .15s, background-color .2s, border-color .2s; }
.tool-card { gap: 12px; }
.app.landscape .tool-card { left: 22px; width: 452px; top: 196px; bottom: 96px; border-radius: 24px; transform: translateY(14px); opacity: 0; box-shadow: none; }
.app.landscape.open-formulas .sheet-formulas, .app.landscape.open-calc .sheet-calc { opacity: 1; transform: none; }
.app.portrait .tool-card { height: 66%; }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; }
.tc-head p { display: flex; flex-direction: column; }
.tc-head b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.tc-head span { font-size: 13px; color: #4E6E6D; }
.tc-head .ic { width: 24px; height: 24px; stroke: #4E6E6D; }
.fm-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #F2FAF8; border-radius: 14px; padding: 4px; font-weight: 800; font-size: 14px; text-align: center; }
.fm-tabs span { padding: 10px 6px; border-radius: 11px; border: 2px solid transparent; color: #0F3D3E; transition: all .2s; }
.fm-tabs span.on { background: #fff; border-color: #0F7A72; color: #0F7A72; }
.sheet-formulas:not(.search) .fm-tabs span:first-child { background: #fff; border-color: #0F7A72; color: #0F7A72; }
.sheet-formulas:not(.search) .fm-tabs span.on { background: transparent; border-color: transparent; color: #0F3D3E; }
.fm-view { display: none; flex-direction: column; gap: 8px; }
.sheet-formulas:not(.search) [data-view="toc"], .sheet-formulas.search:not(.section) [data-view="search"], .sheet-formulas.section [data-view="section"] { display: flex; }
.fm-h { font: 800 24px/1.15 'Baloo 2', system-ui, sans-serif; }
.fm-sub { font-size: 13px; color: #4E6E6D; }
.fm-li { display: grid; grid-template-columns: 34px 1fr auto; padding: 9px 4px; font-weight: 700; font-size: 15px; }
.fm-li b { color: #0F7A72; }
.fm-li small { color: #4E6E6D; font-weight: 700; }
.fm-input { border: 2px solid #2463CE; border-radius: 14px; padding: 10px 14px; font-weight: 700; display: flex; align-items: center; gap: 2px; }
.caret { width: 2px; height: 18px; background: #2463CE; animation: blink 1s infinite; }
.fm-results { display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity .3s; }
.sheet-formulas.found .fm-results { opacity: 1; }
.fm-res { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; background: #F2FAF8; border-radius: 14px; padding: 14px; font-weight: 700; font-size: 16px; transition: background-color .2s; }
.fm-res b { color: #0F7A72; }
.fm-res i { font-style: normal; color: #4E6E6D; font-size: 20px; }
.fm-res.press { background: #DDF3EE; }
.fm-back { color: #0F7A72; font-weight: 800; font-size: 14px; }
.fm-text { font-size: 16px; line-height: 1.5; }
.fm-formula { background: #E7F5F1; border-radius: 14px; padding: 12px 16px; font: italic 26px 'Times New Roman', Georgia, serif; }
.fm-pdf { margin-top: auto !important; color: #0F7A72; font-weight: 800; font-size: 14px; }
.calc-display { border-radius: 16px; background: #F2FAF8; border: 2px solid #CFE5E0; padding: 10px 16px; min-height: 72px; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; }
.calc-display small { font: 600 15px 'Figtree', sans-serif; color: #4E6E6D; min-height: 18px; }
.calc-display b { font: 800 30px/1.1 'Figtree', sans-serif; color: #0F3D3E; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-keys i { font-style: normal; display: grid; place-items: center; height: 46px; border-radius: 14px; background: #fff; border: 2px solid #CFE5E0; box-shadow: 0 3px 0 #CFE5E0; font-weight: 800; font-size: 19px; color: #0F3D3E; transition: transform .12s, background-color .12s; }
.calc-keys i.m { height: 34px; font-size: 13px; }
.calc-keys i.op { background: #DDF3EE; color: #0F7A72; }
.calc-keys i.eq { background: #0F7A72; border-color: #0A5A54; box-shadow: 0 3px 0 #0A5A54; color: #fff; }
.calc-keys i.hit { transform: translateY(2px); box-shadow: 0 1px 0 #CFE5E0; background: #DDF3EE; }
.calc-note { font-size: 12px; color: #4E6E6D; }
.app.portrait .calc-keys i { height: 38px; }
.app.portrait .calc-keys i.m { height: 28px; }
.app.portrait .fm-li:nth-child(n+5) { display: none; }

/* Dotknięcie w odtworzonym ekranie (sceny.js, tap) */
.tap-ring { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(107, 78, 255, .35); pointer-events: none; animation: tap .5s ease-out forwards; z-index: 4; }
@keyframes tap { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

/* Diego: dwa nagrania obok siebie */
.vt-duo { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; padding: 36px; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
.vt-duo h3 { font-size: clamp(22px, 2vw, 28px); }
.vt-duo .vt-text > p { color: var(--muted); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.duo-item .frame.iphone { width: min(250px, 100%); }
.duo-item video { display: block; width: 100%; height: auto; background: #F2FAF8; }
.duo-item figcaption { text-align: center; display: flex; flex-direction: column; gap: 2px; max-width: 250px; }
.duo-item figcaption span { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .vt-duo { grid-template-columns: 1fr; padding: 22px; } }
@media (max-width: 560px) { .duo { grid-template-columns: 1fr; } }

/* Scena zeszytu w nagłówku (27.10.2026) */
.hero-scene { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0 -24px 0 0; grid-template-columns: none; }
.hero-scene .scene-stage { width: 100%; }
.hero-scene .replay { align-self: center; }
@media (max-width: 960px) { .hero-scene { margin: 0; } }

/* Zalety w nagłówku (27.10.2026) */
.perks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; max-width: 560px; }
.perks li { position: relative; padding-left: 34px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.perks li b { color: var(--ink); }
.perks li::before { content: ''; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F7A72' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.hero .actions { margin-top: 24px; }

/* „Jak liczymy plan”: etapy testu i rytm nauki (27.10.2026) */
.pstages { display: grid; gap: 12px; }
.pstages small { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.pstages .pdots { grid-template-columns: repeat(10, 1fr); gap: 6px; }
.pstages .pdots i { border-radius: 8px; border-width: 1.5px; transition-delay: calc(var(--i) * 45ms + .2s); }
.pstages .pdots i::after { font-size: 13px; }
.prhythm { display: grid; gap: 12px; }
.pr-label { margin: 0; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pr-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pr-days i { font-style: normal; display: grid; place-items: center; height: 42px; border-radius: 12px; border: 2px solid var(--border); font-weight: 800; font-size: 14px; color: var(--muted); background: var(--bg); transition: background-color .3s, border-color .3s, color .3s; transition-delay: calc(var(--i) * 90ms + .2s); }
.pane.on .pr-days i.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pr-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); }
.pr-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); }
.pr-ic svg { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pr-row p { margin: 0; display: flex; flex-direction: column; }
.pr-row p b { font-size: 15px; }
.pr-row p span { font-size: 13px; color: var(--muted); }
.pr-time { font: 800 20px/1 'Figtree', system-ui, sans-serif; color: var(--primary); }
.pr-switch { width: 42px; height: 24px; border-radius: 99px; background: var(--border); position: relative; transition: background-color .3s .9s; }
.pr-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s .9s; }
.pane.on .pr-switch { background: var(--primary); }
.pane.on .pr-switch::after { transform: translateX(18px); }
@media (max-width: 960px) { .pr-row { padding: 7px 10px; } .pr-days i { height: 34px; } .prhythm { gap: 8px; } .pr-row:last-child { display: none; } .pstages { gap: 6px; } }
