/* EduNote w przeglądarce. Układ strony głównej skopiowany z prawdziwej strony aplikacji tego samego rodzaju
   (Granola: notatki AI na Macu udostępniane linkiem): duży nagłówek i jeden przycisk po lewej, prawdziwe okno
   aplikacji na kafelkach po prawej, krótka lista zalet z cienkimi liniami, ciemny pas, kroki „przed, w trakcie
   i po” z prawdziwymi zrzutami, sekcja ceny na kafelku i stopka w kolumnach. Wszystko w stylu aplikacji EduNote:
   logo z ołówkiem i napis pisany ołówkiem, Archivo szerokie i grube w nagłówkach, mech, żółty zakreślacz
   jak na zrzutach w App Store. Strona notatki wygląda jak notatka w aplikacji. Tylko jasny wygląd. */

/* Archivo z własnego serwera (SIL Open Font License 1.1, fonts/OFL.txt), a nie z Google Fonts: strona nie wysyła
   adresów IP czytających do Google. Jeden plik zmiennej grubości na zakres znaków; polskie litery są w latin-ext. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 700 800; font-stretch: 125%; font-display: swap;
  src: url("fonts/archivo-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 700 800; font-stretch: 125%; font-display: swap;
  src: url("fonts/archivo-latin.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;
}

/* MARK: kolory. Jasny wygląd to kolory aplikacji (EduNote/App/Theme.swift). Ciemny jest tylko na stronie: grafitowy
   papier, jasny tusz i jaśniejszy mech, żeby tekst i przyciski miały kontrast co najmniej 4,5:1 (WCAG AA).
   Wygląd wybiera skrypt w <head> (data-theme="light"/"dark" na <html>); bez wyboru strona idzie za systemem.
   .light-scope i ramka telefonu zostają jasne także w ciemnym wyglądzie: pokazują jasną aplikację. */
:root, .light-scope, .iphone {
  --page: #F7F5EE;
  --canvas: #EFECE3;
  --paper: #FFFEFA;
  --paper-hover: #FFFFFF;
  --sunk: #F4F1E8;
  --ink: #2A2A22;
  --night: #1F211A;
  --on-night: #FFFEFA;
  --night-muted: #CFCCBF;
  --muted: #6E6B5F;
  --faint: #A29F92;
  --line: #E2DFD3;
  --line-strong: #D3CFC1;
  /* kreska rysunków i ramek „na szkicu” oraz twardy cień pod nimi */
  --stroke: #2A2A22;
  --hard: #2A2A22;
  --moss: #6B8131;
  /* mech pod tekstem przycisku: odrobinę ciemniejszy niż w aplikacji, żeby jasny napis miał 4,9:1 */
  --moss-fill: #63782D;
  --moss-press: #4E5F22;
  --moss-dark: #4E5F22;
  --on-moss: #FFFEFA;
  --mat: #E3E9CF;
  --mat-hover: #D8E0BE;
  --mat-text: #4E5F22;
  --brief: #E6ECD3;
  --mustard: #D6A12B;
  --sun: #F2C12E;
  --mustard-soft: #F6E7BF;
  --mustard-text: #6E5110;
  --marker: rgba(242, 193, 46, .5);
  --coral: #E2725B;
  --coral-soft: #F8DDD5;
  --coral-text: #A4402C;
  --sky: #3F7FBF;
  --plum: #6A3357;
  /* kolory symboli we wzorach i linii na wykresach (te same co w aplikacji) */
  --sym1: #6B8131; --sym2: #E2725B; --sym3: #3F7FBF; --sym4: #A97C14; --sym5: #6A3357;
  /* tła węzłów mapy pojęć */
  --tone1: #E3E9CF; --tone2: #FBF0C9; --tone3: #DCE8F5; --tone4: #F8DED7; --tone5: #ECE3EC;
  --dots: #AEBB8A;
  --overlay: rgba(42, 42, 34, .38);
  --wash: rgba(42, 42, 34, .035);
  --wash-press: rgba(42, 42, 34, .05);
  --chip: rgba(42, 42, 34, .07);
  --bar-bg: rgba(255, 254, 250, .86);
  --shot-line: rgba(42, 42, 34, .14);
  --sk-a: #EFECE3; --sk-b: #F8F6F0;
  --display: "Archivo", "SF Pro Display", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --bar-h: 64px;
  --shadow: 0 1px 2px rgba(42, 42, 34, .05), 0 18px 40px -22px rgba(42, 42, 34, .35);
  --lift: 0 1px 2px rgba(42, 42, 34, .05), 0 14px 30px -18px rgba(42, 42, 34, .3);
  --pop: 0 1px 2px rgba(42, 42, 34, .06), 0 22px 50px -18px rgba(42, 42, 34, .4);
  --bar-shadow: 0 8px 24px -16px rgba(42, 42, 34, .35);
  --tile-moss: #4E5F22;
  --shine: rgba(255, 255, 255, .75);
  /* ruch (motion.js i przejścia poniżej): wejście z długim, miękkim hamowaniem, zmiana stanu miękko w obie strony,
     wyjście z rozpędu, małe sprężyste „pyknięcie” przy naciśnięciu */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-move: cubic-bezier(.65, 0, .35, 1);
  --ease-exit: cubic-bezier(.5, 0, .75, 0);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
/* Ciemny wygląd: grafitowy papier zamiast kremowego, tusz jasny jak kreda. Skrypt w <head> zawsze ustawia
   data-theme (także przy „automatycznym”, według systemu), więc wystarcza jeden zestaw kolorów. */
:root[data-theme="dark"] {
  --page: #191A15;
  --canvas: #14150F;
  --paper: #23241E;
  --paper-hover: #292A23;
  --sunk: #1D1E18;
  --ink: #ECE8DC;
  --night: #10110C;
  --on-night: #F3F0E6;
  --night-muted: #B9B5A6;
  --muted: #ABA797;
  --faint: #858275;
  --line: #34352D;
  --line-strong: #4A4B41;
  --stroke: #DCD8CB;
  --hard: #0B0C08;
  --moss: #8DA64C;
  --moss-fill: #A3B95E;
  --moss-press: #B6CB72;
  --moss-dark: #B5CB7A;
  --on-moss: #161710;
  --mat: #2C3220;
  --mat-hover: #353C26;
  --mat-text: #C3D68A;
  --brief: #262B1C;
  --mustard: #D6A12B;
  --sun: #F2C12E;
  --mustard-soft: #3A3221;
  --mustard-text: #E8C772;
  --marker: rgba(242, 193, 46, .3);
  --coral: #E98A75;
  --coral-soft: #3E2620;
  --coral-text: #F2A493;
  --sky: #7FB2E5;
  --plum: #C58DB4;
  --sym1: #A8C06A; --sym2: #F08F79; --sym3: #7FB2E5; --sym4: #E2B54E; --sym5: #CF94BE;
  --tone1: #2C3220; --tone2: #3A3221; --tone3: #1F2B37; --tone4: #3E2620; --tone5: #33263A;
  --dots: #4E5A33;
  --overlay: rgba(0, 0, 0, .55);
  --wash: rgba(236, 232, 220, .05);
  --wash-press: rgba(236, 232, 220, .08);
  --chip: rgba(236, 232, 220, .09);
  --bar-bg: rgba(29, 30, 24, .84);
  --shot-line: rgba(236, 232, 220, .12);
  --sk-a: #23241E; --sk-b: #2D2E27;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -20px rgba(0, 0, 0, .7);
  --lift: 0 14px 30px -16px rgba(0, 0, 0, .65);
  --pop: 0 22px 50px -16px rgba(0, 0, 0, .75);
  --bar-shadow: 0 10px 28px -16px rgba(0, 0, 0, .8);
  --tile-moss: #3B4719;
  --shine: rgba(255, 255, 255, .07);
  color-scheme: dark;
}
/* przy zmianie wyglądu wszystko zmienia się naraz, bez przejść kolorów na każdym elemencie z osobna */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--moss-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--sky); outline-offset: 3px; border-radius: 8px; }
p { margin: 0 0 12px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }

h1, h2, .disp { font-family: var(--display); font-stretch: 125%; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(32px, 7vw, 44px); line-height: 1.04; margin: 6px 0 10px; }
h2 { font-size: clamp(26px, 4.4vw, 44px); line-height: 1.06; margin: 0 0 16px; }
h3 { font: 700 19px/1.3 var(--sans); margin: 0 0 6px; letter-spacing: -.01em; }
mark { color: inherit; background: linear-gradient(transparent 56%, var(--marker) 56%, var(--marker) 94%, transparent 94%) no-repeat 0 0 / 100% 100%; padding: 0 .04em; }

/* MARK: przyciski: okrągłe jak w aplikacji, jeden główny (mech) na ekran */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font: 650 16.5px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .4s var(--ease-spring);
}
/* naciśnięcie szybkie, a powrót z małym sprężystym odbiciem */
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn svg { width: 19px; height: 19px; flex: none; transition: transform .35s var(--ease); }
.btn-primary { background: var(--moss-fill); color: var(--on-moss); }
.btn-primary:hover { background: var(--moss-press); }
.btn-secondary { background: var(--mat); color: var(--mat-text); }
.btn-secondary:hover { background: var(--mat-hover); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--faint); }
/* jasny przycisk na ciemnym pasie i na mchu: jasny w obu wyglądach */
.btn-light { background: #FFFEFA; color: #2A2A22; }
.btn-light:hover { background: #FFFFFF; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; gap: 7px; white-space: nowrap; }
.btn-sm svg { width: 17px; height: 17px; }
.btn-lg { min-height: 56px; font-size: 17px; padding: 0 28px; }
.btn-block { width: 100%; }
.link {
  font: 600 16px var(--sans); color: var(--moss-dark); background: none; border: 0; padding: 10px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
  -webkit-tap-highlight-color: transparent;
}
/* podkreślenie linków przygaszone, a pod kursorem nabiera koloru i odsuwa się od tekstu */
a, .link { transition: color .25s var(--ease), text-decoration-color .25s var(--ease), text-underline-offset .25s var(--ease); }
.link, .doc p a, .prose a { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.link:hover, .doc p a:hover, .prose a:hover { text-decoration-color: currentColor; text-underline-offset: 5px; }

/* MARK: marka jak w aplikacji: ikona z ołówkiem i napis pisany ołówkiem (logo.svg z PencilScript w EduNote/App/Ink.swift) */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); flex: none; }
.brand-icon { display: block; width: 34px; height: 34px; }
.brand .wordmark { display: block; width: auto; height: 34px; }

/* górny pasek: przyklejony, półprzezroczysty; po przewinięciu odrywa się od brzegów jak u Granoli */
.bar { position: sticky; top: 0; z-index: 20; padding: 8px var(--gutter) 0; }
.bar-in {
  max-width: 1200px; margin: 0 auto; height: calc(var(--bar-h) - 8px); display: flex; align-items: center; gap: 20px;
  padding: 0 8px 0 10px; border-radius: 999px; border: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.bar.stuck .bar-in, .note-page .bar-in { background: var(--bar-bg); border-color: var(--line); box-shadow: var(--bar-shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bar-in .btn { margin-left: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 15.5px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--moss-dark); }
@media (min-width: 761px) { .nav + .btn, .nav + .bar-tools { margin-left: 8px; } }
@media (max-width: 760px) { .nav { display: none; } }

/* MARK: strona główna */
.frame { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.home section { scroll-margin-top: calc(var(--bar-h) + 12px); }

.hero { display: grid; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(42px, 10.4vw, 74px); line-height: .98; letter-spacing: -.03em; margin: 0 0 22px; }
.hero-sub { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.45; margin: 0 0 28px; }
.platform { display: flex; align-items: center; gap: 9px; margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }
.platform svg { width: 20px; height: 20px; flex: none; }
@media (min-width: 1000px) { .hero { grid-template-columns: 1.12fr 1fr; gap: 48px; min-height: calc(100svh - var(--bar-h) - 40px); padding-top: 24px; } }

/* kolaż z prawdziwych zrzutów na kafelkach: tablica w kropki (jak w aplikacji), kafelek musztardowy */
.hero-art { position: relative; aspect-ratio: 1 / .92; width: 100%; max-width: 640px; margin: 0 auto; }
.tile { position: absolute; border-radius: 18px; }
.tile-dots { background: radial-gradient(var(--dots) 1.3px, transparent 1.5px) 0 0 / 20px 20px, var(--mat); }
.tile-mustard { background: radial-gradient(rgba(255, 255, 255, .35) 1.3px, transparent 1.5px) 0 0 / 20px 20px, var(--mustard); }
.tile-night { background: radial-gradient(rgba(255, 255, 255, .12) 1.3px, transparent 1.5px) 0 0 / 20px 20px, var(--night); }
.hero-art .tile-dots { left: 6%; top: 0; width: 70%; height: 74%; }
.hero-art .tile-mustard { right: 0; bottom: 4%; width: 46%; height: 52%; }
.shot { display: block; border-radius: 12px; border: 1px solid var(--shot-line); box-shadow: var(--shadow); background: var(--paper); }
.hero-art .shot-mac { position: absolute; left: 0; top: 14%; width: 84%; height: auto; }

/* zalety: lista z cienkimi liniami na całą szerokość i zrzut obok */
.feature { display: grid; gap: 36px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.points { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--line); }
.points li { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.points svg { width: 30px; height: 30px; flex: none; }
.feature .shot { width: 100%; height: auto; }
@media (min-width: 1000px) { .feature { grid-template-columns: .9fr 1.1fr; gap: 64px; } }

/* ciemny pas: jeden link dla całego roku i telefony z prawdziwą stroną notatki */
.band { background: var(--night); color: var(--on-night); padding: 80px 0; }
.band h2 { color: var(--on-night); max-width: 15em; }
.band .eyebrow { color: #C9D59E; }
.band-lead { color: var(--night-muted); max-width: 34em; font-size: 18px; margin-bottom: 36px; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: end; max-width: 980px; margin: 0 auto 36px; }
.phones figure { margin: 0; text-align: center; }
.phones figcaption { margin-top: 12px; font-size: 15px; color: var(--night-muted); }
.phones figcaption b { color: var(--on-night); }
@media (max-width: 760px) {
  .phones { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 6px; margin: 0 calc(-1 * var(--gutter)) 30px; }
  .phones figure { scroll-snap-align: center; }
}

/* przed, w trakcie i po: lista kroków z boku (przyklejona) i kroki ze zrzutami jeden pod drugim */
.phases { padding-top: 96px; padding-bottom: 40px; }
.phases-title { max-width: 14em; margin-bottom: 48px; }
.phases-grid { display: grid; gap: 40px; }
.phases-nav { display: none; }
.phase { padding-bottom: 56px; }
.phase .tag { display: inline-block; font-size: 13.5px; font-weight: 700; color: var(--mat-text); background: var(--mat); border-radius: 999px; padding: 3px 12px; margin-bottom: 12px; }
.phase h3 { font: 800 clamp(22px, 3vw, 28px)/1.15 var(--display); font-stretch: 125%; letter-spacing: -.015em; margin: 0 0 8px; }
.phase p { color: var(--muted); max-width: 36em; margin-bottom: 22px; }
.phase-shot { border-radius: 18px; padding: clamp(14px, 4vw, 44px); }
.phase-shot .shot { width: 100%; height: auto; }
@media (min-width: 1000px) {
  .phases-title { margin-left: calc(25% + 40px); }
  .phases-grid { grid-template-columns: 25% 1fr; }
  .phases-nav { display: flex; flex-direction: column; position: sticky; top: calc(var(--bar-h) + 40px); align-self: start; }
  .phases-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--faint); text-decoration: none; font-size: 15.5px; transition: color .4s var(--ease), border-color .4s var(--ease); }
  .phases-nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
}

/* cena na kafelku na całą szerokość */
.price { margin-top: 30px; }
.price-tile { border-radius: 24px; padding: clamp(40px, 8vw, 90px) clamp(22px, 6vw, 80px); text-align: center; color: var(--on-night); }
.price-tile h2 { color: var(--on-night); margin: 0 auto 14px; }
.price-tile p { color: #E8EDD8; max-width: 34em; margin: 0 auto 26px; font-size: 18px; }
.price-tile .tile-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.price-tile .btn-ghost { background: transparent; color: var(--on-night); border-color: rgba(255, 255, 255, .45); }
.price-tile .btn-ghost:hover { border-color: var(--on-night); }
.tile-moss { background: radial-gradient(rgba(255, 255, 255, .16) 1.3px, transparent 1.5px) 0 0 / 20px 20px, var(--tile-moss); }

/* pytania */
.faq-wrap { padding-top: 96px; display: grid; gap: 20px; }
@media (min-width: 1000px) { .faq-wrap { grid-template-columns: 1fr 1.4fr; gap: 64px; } }
details.faq { border-bottom: 1px solid var(--line); }
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary { cursor: pointer; font-weight: 650; list-style: none; padding: 18px 36px 18px 0; position: relative; transition: color .25s var(--ease); }
details.faq summary:hover { color: var(--moss-dark); }
details.faq summary::-webkit-details-marker { display: none; }
/* „+” z dwóch kresek: przy otwieraniu pionowa obraca się do poziomej i zostaje „–” (closing: od razu przy zwijaniu) */
details.faq summary::before, details.faq summary::after {
  content: ""; position: absolute; right: 5px; top: 31px; width: 14px; height: 2px; margin-top: -1px; border-radius: 1px;
  background: var(--muted); transition: transform .45s var(--ease);
}
details.faq summary::after { transform: rotate(90deg); }
details.faq[open]:not(.closing) summary::before, details.faq[open]:not(.closing) summary::after { transform: rotate(180deg); }
details.faq p { margin: 0 0 18px; color: var(--muted); }

/* stopka w kolumnach */
.foot { margin-top: 110px; border-top: 1px solid var(--line); padding: 44px 0 50px; font-size: 15px; color: var(--muted); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); }
.foot-grid .brand { margin-bottom: 10px; }
.foot-col b { display: block; color: var(--ink); margin-bottom: 10px; font-size: 14px; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; margin: 6px 0; }
.foot-col a:hover { color: var(--ink); }
.foot-first { grid-column: 1 / -1; }
.foot-copy { margin-top: 34px; font-size: 13.5px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .foot-first { grid-column: auto; } }
.note-page .foot { margin-top: 70px; padding: 26px 0 40px; }
.foot-in { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-in a { color: var(--muted); }

/* MARK: strona notatki, jak notatka w aplikacji */
.doc { max-width: 720px; margin: 0 auto; padding: 18px var(--gutter) 0; }
.sample-note { display: inline-block; font-size: 14px; font-weight: 600; color: var(--mustard-text); background: var(--mustard-soft); border-radius: 10px; padding: 7px 12px; margin: 6px 0 18px; }
.subject { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }
.subject::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--moss); flex: none; }
.doc h1 { font-size: clamp(32px, 7.4vw, 46px); }
.ai-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.ai-line .tag { flex: none; font-size: 11.5px; font-weight: 800; color: var(--mustard-text); background: var(--mustard-soft); border-radius: 6px; padding: 2px 7px; }

/* zakładki Notatka, Fiszki, Quiz: przyklejone pod paskiem, jak przełącznik w aplikacji */
.tabs { position: sticky; top: var(--bar-h); z-index: 10; display: flex; gap: 6px; margin: 22px calc(-1 * var(--gutter)) 0; padding: 10px var(--gutter); background: var(--page); border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 650 15.5px var(--sans); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: color .3s var(--ease), background-color .3s var(--ease), transform .4s var(--ease-spring);
}
.tabs button:hover { color: var(--ink); }
.tabs button:active { transform: scale(.96); transition-duration: .08s; }
.tabs button[aria-selected="true"] { background: var(--mat); color: var(--mat-text); }
.tabs .count { font-size: 12.5px; font-weight: 700; background: var(--chip); border-radius: 999px; padding: 1px 8px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.tabs button[aria-selected="true"] .count { background: var(--mat-hover); }
/* pigułka pod wybraną zakładką (motion.js) przesuwa się do nowej; bez skryptu tło ma sama zakładka */
.tab-pill {
  position: absolute; left: 0; top: 0; z-index: 0; border-radius: 999px; background: var(--mat); pointer-events: none; opacity: 0;
  transition: transform .5s var(--ease), width .5s var(--ease), height .5s var(--ease);
}
.tab-pill.on { opacity: 1; }
.tabs.has-pill button[aria-selected="true"] { background: transparent; }
#panel-note, #panel-cards, #panel-quiz { padding-top: 22px; scroll-margin-top: calc(var(--bar-h) + 64px); }
#quiz { scroll-margin-top: calc(var(--bar-h) + 70px); }

.brief { background: var(--brief); border-radius: 16px; padding: 16px 20px; }
.brief-label { display: inline-block; font-weight: 800; margin: 0 0 4px; background: linear-gradient(transparent 60%, var(--marker) 60%) no-repeat 0 0 / 100% 100%; }
.brief p:last-child { margin: 0; font-size: 17.5px; line-height: 1.55; }
.section h2, #body > section > h2 { font-size: 23px; margin: 34px 0 10px; }
.section p { margin: 0 0 12px; }
.own { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 18px 0 0; }
.concepts { display: grid; gap: 10px; }
@media (min-width: 640px) { .concepts { grid-template-columns: 1fr 1fr; } }
.concept { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.concept .term { font-weight: 700; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.concept .def { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.key-chip { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mat-text); background: var(--mat); border-radius: 6px; padding: 2px 7px; }
.exam { background: var(--brief); border-radius: 16px; padding: 16px 20px; margin-top: 34px; }
.exam-label { display: flex; align-items: center; gap: 9px; font-weight: 800; margin: 0 0 8px; }
.exam-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
ul.plain { margin: 0; padding-left: 20px; }
ul.plain li { margin-bottom: 6px; }
.questions { border-top: 1px solid var(--line); }
details.q { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.q summary { cursor: pointer; font-weight: 650; list-style: none; position: relative; padding-left: 24px; transition: color .25s var(--ease); }
details.q summary:hover { color: var(--moss-dark); }
details.q summary::-webkit-details-marker { display: none; }
/* ten sam „+”, który obraca się w „–”, co w pytaniach na stronie głównej */
details.q summary::before, details.q summary::after {
  content: ""; position: absolute; left: 1px; top: .82em; width: 11px; height: 2px; margin-top: -1px; border-radius: 1px;
  background: var(--muted); transition: transform .45s var(--ease);
}
details.q summary::after { transform: rotate(90deg); }
details.q[open]:not(.closing) summary::before, details.q[open]:not(.closing) summary::after { transform: rotate(180deg); }
details.q p { margin: 6px 0 0 24px; color: var(--muted); }

/* quiz */
.quiz-sub { margin: -6px 0 16px; font-size: 15px; }
.quiz-q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.quiz-q:first-child { padding-top: 0; }
.quiz-q:has(+ .quiz-result.hidden) { border-bottom: 0; padding-bottom: 0; }
.quiz-prompt { font-weight: 650; margin: 0 0 10px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; min-height: 52px;
  padding: 12px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .4s var(--ease-spring);
}
.quiz-option:hover:not(:disabled) { border-color: var(--faint); }
.quiz-option:active:not(:disabled) { transform: scale(.985); transition-duration: .08s; }
.quiz-option:disabled { cursor: default; }
.quiz-option:disabled:not(.right):not(.wrong) { color: var(--muted); }
.quiz-option.right { background: var(--mat); border-color: var(--moss); }
.quiz-option.wrong { background: var(--coral-soft); border-color: var(--coral); }
.qmark { margin-left: auto; font-weight: 800; font-size: 18px; line-height: 1; }
.right .qmark { color: var(--moss-dark); }
.wrong .qmark { color: var(--coral-text); }
.quiz-why { margin: 8px 0 0; font-size: 15px; }
.quiz-result { padding-top: 18px; }
.quiz-result p { margin: 0 0 4px; }
.quiz-score { font: 800 32px/1.1 var(--display); font-stretch: 125%; }
.quiz-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.quiz-actions .btn { min-height: 48px; font-size: 15px; padding: 0 8px; white-space: nowrap; }

/* fiszki w zakładce */
.study-intro { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px; display: flex; flex-direction: column; gap: 12px; }
.study-intro h2 { font-size: 26px; margin: 0; }
.study-intro p { margin: 0; }
.eyebrow { font-size: 13.5px; font-weight: 700; color: var(--moss-dark); letter-spacing: .02em; margin: 0 0 8px; }
.study-stage { min-height: calc(100svh - var(--bar-h) - 120px); display: flex; flex-direction: column; }
.study-box { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.study-box:focus { outline: none; }
.study-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.study-head .link { padding: 6px 0; }
.study-head .count { font-size: 15px; color: var(--muted); white-space: nowrap; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--moss); border-radius: 3px; transition: width .2s; }
.flash {
  flex: 1; min-height: 280px; width: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px;
  text-align: center; cursor: pointer; font: inherit; color: inherit; padding: 28px 22px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent; transition: border-color .3s var(--ease), transform .4s var(--ease-spring);
}
@media (hover: hover) { .flash:hover { border-color: var(--line-strong); } }
.flash:active { transform: scale(.99); transition-duration: .1s; }
.flash .front { font: 800 24px/1.25 var(--display); font-stretch: 125%; letter-spacing: -.01em; }
.flash .back { font-size: 18px; line-height: 1.5; color: var(--muted); }
/* przerywana linia nad odpowiedzią: rysuje się od środka (przy długich zadaniach od lewej), gdy odpowiedź się odkrywa */
.flash .back::before { content: ""; display: block; border-top: 1px dashed var(--faint); margin: 0 0 16px; transform-origin: 50% 0; }
.motion .flash .back::before { animation: draw .7s var(--ease) backwards; }
.flash .hint { font-size: 14px; color: var(--faint); }
.flash .again-tag { align-self: center; font-size: 12.5px; font-weight: 700; color: var(--mustard-text); background: var(--mustard-soft); border-radius: 999px; padding: 3px 11px; }
.grades { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grades .btn { min-height: 56px; }
.keys { font-size: 12.5px; color: var(--faint); text-align: center; margin: 0; }
@media (hover: none) { .keys { display: none; } }
.done { display: flex; flex-direction: column; gap: 12px; justify-content: center; flex: 1; text-align: center; }
.done h2 { margin: 0; font-size: 28px; }
.done p { margin: 0; color: var(--muted); }
.done .score { font: 800 19px/1.3 var(--display); font-stretch: 125%; color: var(--ink); }
.done .btn { width: 100%; }
.done-actions { display: flex; flex-direction: column; gap: 10px; }
.hard-box { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; }
.hard-box .label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 6px; }
.hard-list { margin: 0; padding-left: 18px; }
.hard-list li { margin: 3px 0; }
.done-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 24px; }
.done .saved { font-size: 13px; color: var(--faint); }
/* przykład w telefonie na stronie głównej */
.study-box.compact { gap: 10px; }
.compact .study-head { min-height: 0; justify-content: center; }
.compact .progress { height: 4px; }
.compact .flash { min-height: 0; padding: 18px 14px; border-radius: 20px; }
.compact .flash .front { font-size: 18px; }
.compact .flash .back { font-size: 15px; }
.compact .flash .back::before { margin-bottom: 12px; }
.compact .btn, .compact .grades .btn { min-height: 44px; font-size: 14.5px; padding: 0 10px; }
.compact .done h2 { font-size: 21px; }
.compact .done .score { font-size: 15px; }

/* zaproszenie na końcu notatki i stopka notatki */
.cta { margin-top: 56px; text-align: center; padding: 30px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; }
.cta-icon { display: block; width: 56px; height: 56px; margin: 0 auto 12px; }
.cta h2 { margin: 0 0 8px; font-size: 23px; }
.cta p { color: var(--muted); margin: 0 auto 20px; max-width: 30em; font-size: 16px; }
.cta-links, .closing-links { display: flex; flex-direction: column; align-items: center; margin: 12px 0 0 !important; }
.cta-links .link, .closing-links .link { font-size: 15.5px; padding: 8px 0; }
.note-foot { margin: 22px 0 0; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.note-foot a { color: var(--muted); }

/* okienko „Wyślij rokowi” (share.js), gdy przeglądarka nie ma systemowego udostępniania */
.sheet-back { position: fixed; inset: 0; z-index: 34; background: var(--overlay); }
.sheet {
  position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px; background: var(--page); border-radius: 26px 26px 0 0;
  padding: 22px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px -12px rgba(0, 0, 0, .35);
}
.sheet h2 { margin: 0; font-size: 22px; }
.sheet p { margin: 0; }
.sheet-text { width: 100%; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; resize: none; }
.sheet .link { align-self: center; padding: 6px 0; }
@media (min-width: 640px) { .sheet { left: 16px; right: 16px; bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 26px; padding: 26px; } }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 15px; z-index: 40; max-width: calc(100% - 32px); box-shadow: var(--shadow); }

/* wyjaśnienie wizualne (ten sam układ co w aplikacji) */
.slide { margin-top: 18px; }
.slide h3 { font-size: 17px; }
.sketch { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.formula { text-align: center; font-size: 1.45em; padding: 22px 12px; overflow-x: auto; }
.symbols { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin-top: 14px; align-items: baseline; }
.symbols .m { font-size: 1.1em; }
.graph svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.legend .sw { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.diagram { overflow-x: auto; }
.diagram svg { width: 100%; min-width: 560px; height: auto; display: block; }
.mapnode {
  box-sizing: border-box; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4px 10px; border: 1.6px solid var(--ink); border-radius: 14px 6px 12px 7px / 7px 12px 6px 14px;
  font-size: 14px; line-height: 1.2; color: var(--ink); overflow: hidden; background: var(--paper);
}
.mapnode small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stage { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 14px; line-height: 1.25; }
.stage.above { justify-content: flex-end; }
.stage.below { justify-content: flex-start; }
.stage small { font-size: 12px; color: var(--muted); margin-top: 3px; }
ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; margin-bottom: 14px; }
ol.steps li::before {
  content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--mat); color: var(--mat-text);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-top: 4px;
}
ol.steps .l { font-size: 1.15em; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
ol.steps .c { color: var(--muted); font-size: 15px; }

/* MARK: regulamin, polityka prywatności, zgłoszenia (stary układ: .wrap, .topbar) */
.wrap { max-width: 720px; margin: 0 auto; padding: 12px var(--gutter) 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; margin-bottom: 8px; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 15.5px; }
.topnav a { color: var(--ink); text-decoration: none; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.prose h1 { margin-bottom: 6px; }
.prose h2 { font-size: 21px; margin: 30px 0 8px; }
.prose h3 { font-size: 17px; margin: 22px 0 6px; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-strong); padding: 8px 10px 8px 0; min-width: 120px; }
@media (max-width: 600px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { display: none; }
  .prose tr { border-bottom: 1px solid var(--line-strong); padding: 10px 0; }
  .prose td { border: 0; padding: 2px 0; min-width: 0; }
  .prose td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; }
}
.form fieldset { border: 0; margin: 0; padding: 0; }
.form legend { font-weight: 650; margin: 18px 0 6px; padding: 0; }
.form label { display: block; font-weight: 650; margin: 18px 0 6px; }
.form .hint { font-weight: 400; font-size: 14px; color: var(--muted); }
.form input[type=text], .form input[type=email], .form textarea {
  width: 100%; min-height: 52px; font: inherit; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); color: var(--ink);
}
.form input:focus, .form textarea:focus { border-color: var(--moss); outline: 3px solid var(--mat); outline-offset: 0; }
.form textarea { min-height: 140px; resize: vertical; }
.form label.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.form .choice input { margin-top: 5px; flex: none; width: 18px; height: 18px; accent-color: var(--moss); }
.form-error { color: var(--coral-text); font-weight: 650; }
.wrap > footer { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 18px; }
.wrap > footer a { color: var(--muted); }

@media (max-width: 520px) {
  :root { --bar-h: 60px; }
  body { font-size: 16.5px; }
  .brand .wordmark { height: 30px; }
  .brand-icon { width: 30px; height: 30px; }
}
/* kto wyłączył animacje w systemie, dostaje wszystko od razu (motion.js też wtedy nic nie animuje) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.note-page .bar { background: var(--page); }
.exam-hint { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.note-foot .link { padding: 0; font: 500 14px var(--sans); color: var(--muted); text-decoration-thickness: 1px; }
.study-intro > .link { align-self: flex-start; padding: 4px 0; font-size: 15px; }
/* na telefonie zrzuty z Maca przycięte do samej notatki (bez paska bocznego), żeby dało się coś przeczytać */
@media (max-width: 600px) {
  .feature .shot { aspect-ratio: 1.15; object-fit: cover; object-position: 78% 0; }
  .phase-shot .shot { aspect-ratio: 1.15; object-fit: cover; object-position: 50% 0; }
  .hero-art .shot-mac { aspect-ratio: 1.12; object-fit: cover; object-position: 72% 0; width: 80%; }
}
/* wydruk i PDF: sama notatka, bez paska, zakładek, fiszek, quizu i zaproszeń */
@media print {
  .bar, .tabs, .tabs-anchor, #panel-cards, #panel-quiz, .cta, .foot, .sample-note, .note-foot button, #report, .toast, .sheet, .sheet-back { display: none !important; }
  #panel-note { display: block !important; padding-top: 8px; }
  body { background: #fff; font-size: 11.5pt; }
  .doc { max-width: none; padding: 0; }
  .brief, .exam, .concept, .slide, details.q { break-inside: avoid; }
  .concept, .sketch { box-shadow: none; }
}
/* pasek na wąskich telefonach (360–400 px): krótsze „Wyślij”, mniejsza marka, nic nie wystaje poza ekran */
.bar-in { min-width: 0; }
.brand { min-width: 0; }
@media (max-width: 400px) {
  #share-top svg { display: none; }
  .bar-in { gap: 10px; }
  .brand .wordmark { height: 27px; }
  .brand-icon { width: 27px; height: 27px; }
}
/* długie fiszki (zadania z liczbami): zwykły krój, do lewej; przyciski oceny zawsze w zasięgu kciuka */
.flash.long { text-align: left; justify-content: flex-start; }
.flash.long .front { font: 650 18px/1.45 var(--sans); letter-spacing: 0; }
.flash.long .back { font-size: 16.5px; }
.flash.long .back::before { transform-origin: 0 0; }
.flash.long .again-tag { align-self: flex-start; }
.study-box:not(.compact) > .grades, .study-box:not(.compact) > .btn-block {
  position: sticky; bottom: 0; z-index: 2; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--page);
}
.study-box:not(.compact) > .btn-block { padding: 0; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--moss-fill); }
.tabs .count.due { color: var(--mustard-text); background: var(--mustard-soft); }
.export { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 2px 0 0; }
.export .link { font-size: 15px; padding: 6px 0; }
/* cena w trzech krokach zamiast długiego akapitu */
.price-steps { list-style: none; padding: 0; margin: 0 auto 28px; max-width: 900px; display: grid; gap: 12px; text-align: left; }
.price-steps li { background: rgba(255, 254, 250, .1); border: 1px solid rgba(255, 254, 250, .22); border-radius: 16px; padding: 14px 16px; }
.price-steps b { display: block; color: var(--on-night); margin-bottom: 4px; }
.price-steps span { color: #E8EDD8; font-size: 16px; line-height: 1.5; }
@media (min-width: 900px) { .price-steps { grid-template-columns: repeat(3, 1fr); } }
.price-tile > p { margin-bottom: 18px; }
.quiz-retry:not(:empty) { margin: 0 0 14px; }
/* zakładki w jednej linii także z „3 do powtórki”; gdy mimo to brak miejsca, przewijają się w bok, a nie rozpychają strony */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; flex: none; }
@media (max-width: 400px) { .tabs { gap: 2px; } .tabs button { padding: 0 11px; font-size: 15px; } .tabs .count { padding: 1px 6px; } }
.back-note { margin: -4px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
/* strona główna bez Maca: co można zrobić dziś */
.today { padding-top: 24px; }
.today-in { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px 22px; }
.today-in h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 12px; }
.today-in ol { margin: 0 0 18px; padding-left: 22px; }
.today-in li { margin: 6px 0; }
.today-in .tile-row { display: flex; flex-wrap: wrap; gap: 10px; }
/* zapis na inne urządzenia (waitlist.js) */
.waitlist { margin-top: 18px; text-align: left; border-top: 1px solid var(--line); padding-top: 16px; }
.waitlist .waitlist-q { font-weight: 650; margin: 0 0 10px; color: var(--ink); font-size: 16px; max-width: none; }
.waitlist-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.waitlist-opts .btn { padding: 0 12px; }
.waitlist-opts .btn[aria-pressed="true"] { background: var(--mat); color: var(--mat-text); border-color: var(--moss); }
.waitlist-opts .btn[aria-pressed="true"]::before { content: "✓"; font-weight: 800; }
.waitlist-opts .btn:disabled { cursor: default; }
.waitlist-form { display: grid; gap: 12px; justify-items: start; }
.waitlist-form[hidden] { display: none; }
.waitlist-mail { display: grid; gap: 6px; width: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.waitlist input[type=email] { width: 100%; min-height: 46px; font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); }
.waitlist input[type=email]:focus { border-color: var(--moss); outline: 3px solid var(--mat); outline-offset: 0; }
.waitlist-status:not(:empty) { margin: 10px 0 0; font-weight: 600; color: var(--moss-dark); }
.waitlist .waitlist-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); max-width: none; }
.waitlist-note a { color: var(--muted); }
.cta .waitlist { margin-top: 22px; }
details.faq .waitlist { margin: 0 0 18px; }
/* iPhone z Dynamic Island (jak 15 Pro, naturalny tytan) w proporcjach prawdziwego telefonu: tytanowa krawędź 1,7%
   szerokości, czarna ramka ekranu 2,2%, rogi ekranu współśrodkowe z rogami obudowy, przyciski boczne, pasek stanu,
   wyspa i pasek „home”. Wymiary wewnątrz w cqw (procent szerokości obudowy), a nie w procentach rodzica: padding
   w procentach liczy się od szerokości rodzica, więc w szerokiej grafice na pierwszym ekranie ramka wychodziła trzy
   razy za gruba, a rogi ekranu nie pasowały do rogów obudowy. */
.iphone {
  position: relative; container-type: inline-size; aspect-ratio: 716 / 1466; border-radius: 16.8% / 8.2%;
  background: linear-gradient(145deg, #e4e1db 0%, #a29e97 14%, #d3cfc8 32%, #8d8a84 56%, #bdb9b2 78%, #ebe8e2 100%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .6), 0 0 0 .5px rgba(52, 49, 44, .5), 0 30px 60px -28px rgba(0, 0, 0, .5);
}
.iphone-screen {
  position: absolute; inset: 1.7cqw; overflow: hidden; display: flex; flex-direction: column;
  border: 2.2cqw solid #050505; border-radius: 15.1cqw; background: var(--page);
  box-shadow: 0 0 0 .3cqw rgba(48, 45, 40, .28);
}
.iphone-screen > img { display: block; width: 100%; height: auto; flex: none; }
.iphone-status { flex: none; height: 12.2cqw; display: flex; align-items: center; justify-content: space-between; padding: 1.2cqw 7cqw 0 8.6cqw; font: 600 4.1cqw/1 -apple-system, "SF Pro Text", system-ui, sans-serif; color: #000; letter-spacing: -.01em; }
.iphone-icons { display: inline-flex; align-items: center; gap: 1.5cqw; }
.iphone-icons svg { height: 2.9cqw; width: auto; fill: currentColor; color: #000; }
.iphone-icons svg:last-child { height: 3.1cqw; }
.iphone-island { position: absolute; top: 2.5cqw; left: 50%; transform: translateX(-50%); width: 29.5cqw; height: 8.6cqw; border-radius: 999px; background: #000; }
.iphone-screen::after { content: ""; position: absolute; left: 50%; bottom: 1.9cqw; transform: translateX(-50%); width: 31.5cqw; height: 1.2cqw; border-radius: 999px; background: rgba(0, 0, 0, .78); }
/* przyciski wystają z krawędzi o 0,9% szerokości, z tego samego tytanu */
.iphone-btn { position: absolute; width: .9cqw; background: linear-gradient(90deg, #8f8b85, #dedad4 55%, #a9a59e); }
.iphone-btn.action, .iphone-btn.vol-up, .iphone-btn.vol-down { left: -.9cqw; border-radius: .6cqw 0 0 .6cqw; }
.iphone-btn.power { right: -.9cqw; border-radius: 0 .6cqw .6cqw 0; background: linear-gradient(270deg, #8f8b85, #dedad4 55%, #a9a59e); }
.iphone-btn.action { top: 19%; height: 4.6%; }
.iphone-btn.vol-up { top: 26.5%; height: 7.6%; }
.iphone-btn.vol-down { top: 35.5%; height: 7.6%; }
.iphone-btn.power { top: 28%; height: 11.6%; }
.hero-art .iphone { position: absolute; right: 3%; bottom: 0; width: 30%; }
.phones .iphone { width: 100%; }
.phones .iphone-screen { background: var(--canvas); }
.iphone-app { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 2cqw 4cqw 8cqw; color: var(--ink); }
.iphone-app #demo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* zwinięte pojęcia na stronie notatki: nagłówek jak h2 działu, z liczbą definicji i „Pokaż” */
/* odstęp nad zwiniętym działem stoi na <details>, a nie na nagłówku, żeby rozwijanie (motion.js) liczyło wysokość bez skoku */
details.fold { margin-top: 34px; }
details.fold > summary { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 14px; margin: 0; padding-bottom: 10px; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "Pokaż"; grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 650; color: var(--moss-dark); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
details.fold > summary:hover::after { text-decoration-color: currentColor; }
details.fold[open]:not(.closing) > summary::after { content: "Zwiń"; }
.fold-title { font: 800 23px/1.2 var(--display); font-stretch: 125%; letter-spacing: -.02em; color: var(--ink); }
.fold-meta { grid-column: 1 / -1; font-size: 14.5px; color: var(--muted); }
/* gotowa prośba do prowadzącego (share.js) */
.today-more { margin: 10px 0 0; }
.today-more .link { font-size: 15.5px; padding: 6px 0; }
details.faq .faq-more { margin: -8px 0 16px; }
details.faq .faq-more .link { font-size: 15.5px; padding: 4px 0; }

/* Link do przedmiotu (/p/#KOD): powrót z notatki do listy, sąsiednie zajęcia, lista zajęć z kartą „Ucz się z całości”,
   wybór zajęć do nauki i PDF, tablice z zajęć z powiększaniem na cały ekran, wydruk wybranych zajęć */
.back-link { display: inline-block; font-size: 15px; font-weight: 650; color: var(--moss-dark); text-decoration: none; padding: 8px 0; margin: 2px 0; }
.back-link:hover { text-decoration: underline; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 40px 0 0; }
.lesson-nav a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent;
  transition: border-color .3s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
@media (hover: hover) { .lesson-nav a:hover { border-color: var(--line-strong); box-shadow: var(--lift); transform: translateY(-2px); } }
.lesson-nav a:active { transform: scale(.98); transition-duration: .08s; }
.lesson-nav .lesson-nav-next { text-align: right; }
.lesson-nav-label { font-size: 14px; font-weight: 700; color: var(--moss-dark); }
.lesson-nav-topic { font-size: 15px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.course-study { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px; margin: 22px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.course-study h2 { font-size: 24px; margin: 0; }
.course-study .eyebrow { margin: 0; }
.course-study > p { margin: 0; }
.scope-line { color: var(--muted); font-size: 15.5px; }
.scope-line .link { font-size: 15.5px; padding: 6px 0; }
.course-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.course-actions .btn { min-height: 52px; padding: 0 12px; }
.course-actions .btn:only-child { grid-column: 1 / -1; }
.course-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.course-links .link { font-size: 15px; padding: 8px 0; }
.picker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; max-height: 360px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15.5px; cursor: pointer; }
.pick input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--moss); }
.pick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-head { font-weight: 700; margin-top: 4px; }
.pick:not(.pick-head) { padding-left: 30px; }
.course-scope { margin: 22px 0 10px; }
.course-back { margin: 18px 0 0; }
.course-back .link { font-size: 15.5px; padding: 8px 0; }
.course-empty { padding: 30px 0; }
.lessons-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin: 32px 0 6px; }
.lessons-head h2 { font-size: 23px; margin: 0; }
/* zajęcia na liście: linie między nimi stoją na <li>, a sam link ma zaokrąglone podświetlenie i strzałkę, która
   pod kursorem odsuwa się w prawo */
.lessons { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lessons > li { border-bottom: 1px solid var(--line); }
.lesson {
  position: relative; display: flex; flex-direction: column; gap: 3px; margin: 4px -10px; padding: 10px 42px 10px 10px; border-radius: 14px;
  text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent; transition: background-color .3s var(--ease);
}
.lesson::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -5px;
  border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: rotate(45deg);
  transition: transform .4s var(--ease), border-color .3s var(--ease);
}
.lesson:active { background: var(--wash-press); transition-duration: .05s; }
@media (hover: hover) {
  .lesson:hover { background: var(--wash); }
  .lesson:hover .lesson-topic { color: var(--moss-dark); }
  .lesson:hover::after { transform: translateX(4px) rotate(45deg); border-color: var(--moss-dark); }
}
.lesson-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lesson-topic { font-size: 18px; font-weight: 650; line-height: 1.35; transition: color .3s var(--ease); }
/* pierwsze zdanie z „W skrócie”: najwyżej dwie linijki */
.lesson-sum { font-size: 15.5px; line-height: 1.45; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lesson-facts { font-size: 13.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.new-chip { font-size: 12px; font-weight: 800; color: var(--mustard-text); background: var(--mustard-soft); border-radius: 6px; padding: 1px 7px; }

figure.board { margin: 26px 0; }
.board-open { display: block; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #F7F5EE; cursor: zoom-in; transition: border-color .3s var(--ease), box-shadow .4s var(--ease); }
.board-open img { display: block; width: 100%; height: auto; transition: opacity .6s var(--ease), transform .7s var(--ease); }
@media (hover: hover) {
  .board-open:hover { border-color: var(--line-strong); box-shadow: var(--lift); }
  .board-open:hover img { transform: scale(1.012); }
}
.board figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.board-title { font-weight: 650; color: var(--ink); }
/* scrollbar-gutter: strona pod powiększeniem nie przesuwa się, gdy znika pasek przewijania (Windows) */
html.zoomed { overflow: hidden; scrollbar-gutter: stable; }
.zoom { position: fixed; inset: 0; z-index: 60; overflow: auto; -webkit-overflow-scrolling: touch; }
/* tło powiększenia osobną warstwą: rozjaśnia się i gaśnie samą przezroczystością (motion.js) */
.zoom-bg { position: fixed; inset: 0; z-index: -1; background: var(--page); }
.zoom-in { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 12px 24px; }
.zoom img { display: block; max-width: 100%; height: auto; cursor: zoom-in; }
/* w pełnej rozdzielczości ramka ma szerokość całej tablicy: pomniejszony na czas animacji obrazek nie zmniejsza
   obszaru przewijania, więc stuknięte miejsce zostaje pod palcem co do piksela */
.zoom.full .zoom-in { align-items: flex-start; justify-content: flex-start; width: max-content; min-width: 100%; }
.zoom.full img { max-width: none; cursor: zoom-out; }
.zoom-close { position: fixed; top: 12px; right: 12px; z-index: 61; box-shadow: var(--shadow); }

.print-area { display: none; }
@media print {
  html.print-all #course, html.print-all #loading, html.print-all #missing { display: none !important; }
  html.print-all .print-area { display: block; }
  .print-title { font-size: 26pt; margin: 0 0 4pt; }
  .print-sub { color: var(--muted); font-size: 10pt; margin: 0 0 16pt; }
  .print-note { break-before: page; }
  .print-note:first-of-type { break-before: auto; }
  .print-topic { font-size: 18pt; margin: 2pt 0 10pt; }
  .board-hint, .lesson-nav, .back-link, .zoom { display: none !important; }
  figure.board { break-inside: avoid; }
}
.zoom-hint { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; z-index: 61; font-size: 13.5px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; white-space: nowrap; pointer-events: none; }
/* na telefonie przyciski nauki jeden pod drugim: „Fiszki z całości” i „Quiz przed kolokwium” w jednej linii każdy */
@media (max-width: 520px) { .course-actions { grid-template-columns: 1fr; } }
/* tablica, zanim się wczyta: napis w zarezerwowanej ramce; wczytany obrazek (z własnym tłem) go zakrywa */
.board-open { position: relative; }
.board-open::before { content: "Wczytuję tablicę…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-size: 14.5px; color: var(--faint); }
.board-open img { position: relative; }
figure.board.failed .board-open::before { content: "Nie udało się wczytać tablicy. Odśwież stronę."; color: var(--muted); }
figure.board.failed img { visibility: hidden; }
@media print { .board-open::before { display: none; } }

/* MARK: ruch. Krzywe są w :root (--ease…), a motion.js robi to, czego nie da się samym CSS (pigułka zakładek,
   rozwijanie, wejścia po kolei, karta fiszki, tablica z miniatury). Klasę motion ustawia skrypt w <head>, gdy system
   nie prosi o mniej ruchu: pod nią są animacje przy wczytaniu strony, więc przy wyłączonych animacjach nic nie czeka. */
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes rise-far { from { opacity: 0; transform: translate3d(0, 44px, 0); } }
@keyframes tile-in { from { opacity: 0; transform: scale(.94); } }
@keyframes marker { from { background-size: 0% 100%; } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes mark-in { from { opacity: 0; transform: scale(.3) rotate(-25deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes sheet-up { from { transform: translate3d(0, 105%, 0); } }
@keyframes sheet-down { to { transform: translate3d(0, 105%, 0); } }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(calc(-50% + 16px)) scale(.97); } }
@keyframes sheet-unpop { to { opacity: 0; transform: translateY(calc(-50% + 10px)) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translate3d(-50%, -16px, 0) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translate3d(-50%, -10px, 0) scale(.98); } }

/* strona główna: pierwszy ekran wchodzi po kolei, kafelki i zrzuty wyrastają, a zakreślacz przeciąga się po „całego roku” */
html.smooth { scroll-behavior: smooth; }
.motion .hero h1, .motion .hero-sub, .motion .hero .btn-lg, .motion .hero .platform { animation: rise .9s var(--ease) backwards; }
.motion .hero-sub { animation-delay: .08s; }
.motion .hero .btn-lg { animation-delay: .16s; }
.motion .hero .platform { animation-delay: .24s; }
.motion .hero mark { animation: marker 1.1s var(--ease) .55s backwards; }
.motion .hero-art .tile { animation: tile-in 1.2s var(--ease) .12s backwards; }
.motion .hero-art .tile-mustard { animation-delay: .24s; }
.motion .hero-art .shot-mac { animation: rise-far 1.2s var(--ease) .22s backwards; }
.motion .hero-art .iphone { animation: rise-far 1.3s var(--ease) .38s backwards; }
/* strzałka „Pobierz” lekko w dół, ikona „Wyślij na grupę” lekko w górę */
#get:hover svg { transform: translateY(3px); }
#share-top:hover svg { transform: translateY(-2px); }

/* sekcje pod pierwszym ekranem pojawiają się przy przewijaniu (motion.js dodaje reveal tylko temu, czego jeszcze nie
   widać), a zdjęcia wczytywane później wyłaniają się w swojej ramce */
.motion .reveal { opacity: 0; transform: translate3d(0, 28px, 0); }
.motion .reveal.in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
.motion img.img-wait { transition: opacity .7s var(--ease); }
.motion img.img-wait:not(.img-in) { opacity: 0; }

/* notatka: zakreślacz pod „W skrócie” przy pierwszym wejściu (klasa entering na chwilę po wczytaniu) */
.motion #note.entering .brief-label { animation: marker .9s var(--ease) .45s backwards; }

/* zanim notatka się wczyta: szkic strony z połyskiem; pojawia się dopiero po chwili, więc przy szybkim wczytaniu nie mignie */
.skeleton { padding: 18px 0 0; animation: fade-in .5s ease .35s backwards; }
.sk {
  display: block; height: 14px; margin: 0 0 12px; border-radius: 8px;
  background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 50%, var(--sk-a) 75%) 0 0 / 300% 100%; animation: shimmer 1.6s ease-in-out infinite;
}
.sk-sub { width: 38%; height: 13px; margin-top: 8px; }
.sk-h1 { width: 88%; height: 34px; border-radius: 10px; margin-top: 16px; }
.sk-h1.short { width: 56%; }
.sk-tabs { width: 62%; height: 42px; border-radius: 999px; margin: 30px 0 26px; }
.sk-box { height: 132px; border-radius: 16px; margin-bottom: 28px; }
.sk-line.short { width: 70%; }

/* tablica, zanim się wczyta: połysk przesuwa się po ramce, a wczytany obrazek się z niej wyłania */
.motion figure.board:not(.ready):not(.failed) .board-open img { opacity: 0; }
.motion figure.board:not(.ready):not(.failed) .board-open::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, var(--shine) 50%, transparent 65%) 0 0 / 250% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* quiz i fiszki: znak ✓/✗ wskakuje z małym odbiciem, dopisek pod licznikiem wyłania się; odlatująca karta
   (motion.js: flying) nie powtarza swoich animacji */
.motion .qmark { animation: mark-in .5s var(--ease-spring) backwards; }
.motion .back-note { animation: fade-in .45s var(--ease) backwards; }
.flying, .flying *, .flying *::before, .flying *::after { animation: none !important; }

/* okienko „Wyślij na grupę”: na telefonie wysuwa się od dołu, na komputerze wyrasta na środku; znika tak samo */
.sheet-back { animation: fade-in .3s var(--ease) backwards; }
.sheet { animation: sheet-up .55s var(--ease) backwards; }
.sheet-back.leaving { animation: fade-out .28s var(--ease-exit) forwards; pointer-events: none; }
.sheet.leaving { animation: sheet-down .3s var(--ease-exit) forwards; pointer-events: none; }
@media (min-width: 640px) {
  .sheet { animation-name: sheet-pop; animation-duration: .45s; }
  .sheet.leaving { animation-name: sheet-unpop; animation-duration: .22s; }
}
.toast { animation: toast-in .5s var(--ease) backwards; }
.toast.leaving { animation: toast-out .32s var(--ease-exit) forwards; }

/* zapis na inne urządzenia: ptaszek wskakuje, napis o zapisie się wyłania */
.waitlist-opts .btn[aria-pressed="true"]::before { animation: mark-in .45s var(--ease-spring) backwards; }
.motion .waitlist-status:not(:empty) { animation: fade-in .45s var(--ease) backwards; }

/* przejście między stronami (lista zajęć → notatka → z powrotem): stara strona gaśnie, nowa się rozjaśnia, zamiast
   białego mignięcia (przeglądarki z View Transitions; pozostałe przechodzą zwyczajnie) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: .22s var(--ease-exit) both fade-out; }
::view-transition-new(root) { animation: .42s var(--ease) both fade-in; }

@media print {
  .reveal, img.img-wait, figure.board .board-open img { opacity: 1 !important; transform: none !important; }
  .board-open::after, .skeleton { display: none !important; }
}

/* MARK: pasek narzędzi w nagłówku: wygląd strony, udostępnianie, logowanie */
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.bar-in .bar-tools .btn { margin-left: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .4s var(--ease-spring);
}
.icon-btn:hover { background: var(--wash-press); }
.icon-btn:active { transform: scale(.94); transition-duration: .08s; }
.icon-btn svg { width: 21px; height: 21px; }
.theme-menu { position: relative; }
.theme-menu.open .theme-menu-btn { background: var(--wash-press); }
.theme-menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--pop);
}
.theme-menu-title { margin: 6px 10px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.theme-menu-item {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 2px 10px; width: 100%; min-height: 44px;
  padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 500 15.5px var(--sans);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s var(--ease);
}
.theme-menu-item:hover, .theme-menu-item:focus-visible { background: var(--wash-press); outline: none; }
.theme-menu-item svg { width: 20px; height: 20px; color: var(--muted); }
.theme-menu-hint { grid-column: 2; font-size: 13px; color: var(--muted); }
.theme-menu-item[aria-checked="true"] { color: var(--moss-dark); font-weight: 650; }
.theme-menu-item[aria-checked="true"] svg { color: var(--moss-dark); }
.theme-menu-item[aria-checked="true"]::after { content: ""; grid-column: 3; grid-row: 1; width: 10px; height: 6px; margin-top: -3px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.theme-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.theme-seg-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: 600 14.5px var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.theme-seg-btn svg { width: 18px; height: 18px; }
.theme-seg-btn:hover { color: var(--ink); }
.theme-seg-btn[aria-pressed="true"] { background: var(--mat); color: var(--mat-text); }
.motion .theme-menu-list:not([hidden]) { animation: menu-in .22s var(--ease) backwards; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* komunikat z „Cofnij” */
.toast-action { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.toast-btn { border: 0; border-radius: 999px; padding: 8px 14px; background: color-mix(in srgb, var(--paper) 18%, transparent); color: inherit; font: 650 14.5px var(--sans); cursor: pointer; }

/* MARK: Moja biblioteka (…/biblioteka/) */
.lib { max-width: 920px; margin: 0 auto; padding: 22px var(--gutter) 0; }
.lib-head h1 { font-size: clamp(34px, 7vw, 48px); margin: 4px 0 8px; }
.lib-sub { color: var(--muted); max-width: 34em; margin: 0 0 26px; }
.shelf-head h2, .lib-today h2 { font-size: 22px; margin: 0; }
.lib-today { background: var(--brief); border-radius: 20px; padding: 18px 20px 10px; margin-bottom: 30px; }
.lib-today h2 { margin-bottom: 6px; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li + li { border-top: 1px solid color-mix(in srgb, var(--moss) 18%, transparent); }
.today-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 0; color: var(--ink); text-decoration: none; }
.today-name { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-count { flex: none; font-size: 15px; font-weight: 650; color: var(--mat-text); }
.today-count::after { content: " →"; }
.today-item:hover .today-name { color: var(--moss-dark); }
.lib-shelf { margin-bottom: 30px; }
.shelf-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 680px) { .shelf { grid-template-columns: 1fr 1fr; } }
.shelf-item { position: relative; display: flex; }
.shelf-card {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 16px 52px 16px 18px; color: var(--ink); text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; -webkit-tap-highlight-color: transparent;
  transition: border-color .3s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
a.shelf-card:active { transform: scale(.985); transition-duration: .08s; }
@media (hover: hover) { a.shelf-card:hover { border-color: var(--line-strong); box-shadow: var(--lift); transform: translateY(-2px); } }
.shelf-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.shelf-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.shelf-title { font-size: 18.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; min-width: 0; overflow-wrap: anywhere; }
.shelf-kicker { font-size: 14px; font-weight: 650; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-meta { font-size: 14.5px; color: var(--muted); }
.shelf-latest { font-size: 15px; line-height: 1.45; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.shelf-latest-label { font-weight: 650; color: var(--ink); }
.shelf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; }
.shelf-foot:empty { display: none; }
.shelf-until { font-size: 13.5px; color: var(--muted); }
.shelf-until.soon { color: var(--coral-text); font-weight: 650; }
.chip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--chip); color: var(--ink); }
.chip-due { background: var(--mustard-soft); color: var(--mustard-text); }
.lib-remove { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; color: var(--faint); }
.lib-remove:hover { color: var(--ink); }
.lib-remove svg { width: 18px; height: 18px; }
.shelf-card.is-expired { background: transparent; border-style: dashed; color: var(--muted); }
.shelf-card.is-expired .shelf-title { font-size: 16.5px; font-weight: 650; }
#expired details.fold { margin-top: 0; }
#expired .shelf { margin-top: 12px; }
.lib-empty { text-align: center; padding: 18px 0 30px; max-width: 30em; margin: 0 auto; }
.lib-empty h2 { font-size: 26px; margin: 10px 0 8px; }
.lib-empty p { color: var(--muted); }
.lib-empty .btn { margin-top: 8px; }
.lib-empty-art { width: 220px; height: auto; color: var(--stroke); }
.fill-mat { fill: var(--mat); } .fill-sun { fill: var(--sun); } .fill-paper { fill: var(--paper); } .fill-coral { fill: var(--coral); }
.lib-paste { margin: 8px 0 18px; padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: 20px; }
.lib-paste label { display: block; font-weight: 650; margin-bottom: 10px; }
.lib-paste-row { display: flex; gap: 8px; }
.lib-paste input {
  flex: 1; min-width: 0; min-height: 50px; font: inherit; font-size: 16px; padding: 10px 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
}
.lib-paste input:focus { border-color: var(--moss); outline: 3px solid var(--mat); outline-offset: 0; }
.lib-paste .btn { min-height: 50px; padding: 0 22px; }
.lib-paste-error { margin: 10px 0 0; color: var(--coral-text); font-weight: 600; font-size: 15px; }
.lib-note { font-size: 13.5px; color: var(--muted); max-width: 40em; }

/* MARK: strona przedmiotu i notatki z linku: powrót do biblioteki, powitanie, nauka w jednym wierszu */
.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 15px; font-weight: 650; color: var(--moss-dark); text-decoration: none; }
.crumb::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 3px 0 2px; }
.crumb:hover { text-decoration: underline; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; min-height: 40px; font-size: 15px; }
.crumbs a { color: var(--moss-dark); font-weight: 650; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--faint); }
.course-by { font-size: 15.5px; font-weight: 600; color: var(--muted); margin: -2px 0 6px; }
.subject-page .doc h1 { margin-top: 2px; }
.welcome { display: flex; align-items: flex-start; gap: 6px; margin: 16px 0 2px; padding: 12px 6px 12px 16px; background: var(--brief); border-radius: 16px; }
.welcome-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.welcome p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.welcome-close { flex: none; width: 38px; height: 38px; margin-top: -4px; color: var(--muted); }
.welcome-close svg { width: 18px; height: 18px; }
.welcome .welcome-title { color: var(--ink); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.welcome .welcome-title::before { content: ""; width: 10px; height: 6px; border-left: 2.2px solid var(--moss); border-bottom: 2.2px solid var(--moss); transform: rotate(-45deg); margin: -3px 2px 0 1px; }
.subject-page .course-study { margin: 18px 0 6px; padding: 16px 16px 16px 18px; gap: 12px; }
.course-study-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.course-study-head h2 { font-size: 20px; margin: 2px 0 2px; }
.course-meta { margin: 0; font-size: 14px; color: var(--muted); }
.subject-page .course-actions { grid-template-columns: 1fr 1fr; margin-top: 0; }
.subject-page .course-actions .btn { min-height: 48px; }
@media (max-width: 520px) { .subject-page .course-actions { grid-template-columns: 1fr 1fr; } }
details.more { position: relative; flex: none; margin: -6px -6px 0 0; }
details.more > summary { list-style: none; color: var(--muted); }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { background: var(--wash-press); color: var(--ink); }
details.more > summary svg { width: 22px; height: 22px; }
.more-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 250px; padding: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--pop); display: grid;
}
.motion details.more[open] .more-list { animation: menu-in .22s var(--ease) backwards; }
.more-item {
  min-height: 44px; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--ink);
  font: 500 15.5px var(--sans); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.more-item:hover, .more-item:focus-visible { background: var(--wash-press); outline: none; }
.lessons-head { margin-top: 26px; }
.made-with { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.made-with p { margin: 0; font-size: 15px; color: var(--muted); max-width: 36em; }
.made-with .link { padding: 6px 0; font-size: 15px; }
.missing { padding: 40px 0; text-align: center; }
.missing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.tabs-hint { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.tabs-hint::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); transform: translateY(-1px); }
.motion .tabs-hint:not(.hidden) { animation: fade-in .5s var(--ease) .6s backwards; }
.note-page .subject { margin-top: 2px; }
/* strona główna: powrót do biblioteki dla kogoś, kto już otwierał linki od znajomych */
.lib-return { max-width: 1200px; margin: 10px auto 0; padding: 0 var(--gutter); }
.lib-return a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--brief); color: var(--ink);
  text-decoration: none; font-size: 15.5px; -webkit-tap-highlight-color: transparent; transition: background-color .25s var(--ease);
}
.lib-return a:hover { background: var(--mat-hover); }
.lib-return b { font-weight: 700; }
.lib-return .lib-return-go { margin-left: auto; flex: none; font-weight: 650; color: var(--mat-text); }
.lib-return .lib-return-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-theme { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.foot-theme > span { font-size: 14px; color: var(--muted); }
/* napis „EduNote” pisany ołówkiem: jasny tusz w ciemnym wyglądzie (logo-dark.svg) */
.wm-dark { display: none !important; }
:root[data-theme="dark"] .wm-light { display: none !important; }
:root[data-theme="dark"] .wm-dark { display: block !important; }
/* pasek stron „aplikacji” (biblioteka, notatki z linku) zawsze na tle, jak w notatce */
.app-page .bar-in { background: var(--bar-bg); border-color: var(--line); box-shadow: var(--bar-shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* MARK: „Skąd to wiemy?” (…/skad-to-wiemy/): zdania z aplikacji po kolei, każde z wyjaśnieniem i przepisami do rozwinięcia */
.info { padding-bottom: 20px; }
.info h1 { font-size: clamp(36px, 8vw, 54px); margin: 4px 0 14px; }
.info-lead { font-size: clamp(18px, 2.4vw, 20px); line-height: 1.5; max-width: 34em; }
.info-meta { font-size: 14px; color: var(--muted); margin: 0 0 26px; }
.info-tldr { margin: 0 0 30px; }
.info-tldr ul { margin: 6px 0 0; padding-left: 20px; }
.info-tldr li { margin: 0 0 8px; font-size: 16.5px; line-height: 1.5; }
.info-tldr li:last-child { margin-bottom: 0; }
.info-toc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0 10px; margin-bottom: 40px; }
.info-toc-title { font-size: 13.5px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.info-toc ol { margin: 0; padding-left: 22px; columns: 2 16em; column-gap: 32px; }
.info-toc li { margin: 0 0 6px; break-inside: avoid; font-size: 15.5px; }
.info-toc a { color: var(--ink); text-decoration-color: var(--line-strong); }
.info-toc a:hover { color: var(--moss-dark); text-decoration-color: currentColor; }
.claim { position: relative; padding: 0 0 34px; margin: 0 0 34px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--bar-h) + 16px); }
.claim:last-of-type { border-bottom: 0; }
.claim-num { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 0 0 10px; border-radius: 50%; background: var(--mat); color: var(--mat-text); font: 800 14px/1 var(--display); font-stretch: 125%; }
.claim h2 { font-size: clamp(22px, 3.6vw, 27px); line-height: 1.2; margin: 0 0 12px; }
.claim p { max-width: 38em; }
.claim .facts { margin: 4px 0 14px; padding-left: 20px; }
.claim .facts li { margin: 0 0 8px; max-width: 38em; }
details.law { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
details.law > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px;
  font-weight: 650; font-size: 15.5px; color: var(--mat-text); -webkit-tap-highlight-color: transparent;
}
details.law > summary::-webkit-details-marker { display: none; }
details.law > summary::before { content: "§"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--mat); font-size: 14px; }
details.law > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .35s var(--ease); }
details.law[open]:not(.closing) > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
details.law blockquote { margin: 0; padding: 4px 18px 14px; }
details.law blockquote + blockquote { border-top: 1px dashed var(--line); padding-top: 14px; }
details.law blockquote p { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; line-height: 1.55; color: var(--ink); }
details.law cite { font-style: normal; font-size: 13.5px; font-weight: 650; color: var(--muted); }
.law-note { margin: 0; padding: 0 18px 16px; font-size: 14.5px; color: var(--muted); }
.claim-plain h2 { margin-top: 2px; }
.claim ol.steps { margin: 6px 0 18px; }
.claim ol.steps .l { font-size: 16.5px; font-weight: 600; overflow: visible; }
.uni-table { display: grid; border-top: 1px solid var(--line); margin-top: 8px; }
.uni-row { display: grid; gap: 2px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; }
.uni-name { font-weight: 700; }
@media (min-width: 640px) { .uni-row { grid-template-columns: 13em 1fr; } }
.sources ul { padding-left: 20px; }
.sources li { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
/* łamanie akapitów bez wiszących pojedynczych słów tam, gdzie przeglądarka to umie */
p, li, .lesson-sum, .shelf-latest { text-wrap: pretty; }
/* strony informacyjne w starym układzie (.wrap): pasek z wyglądem i biblioteką po prawej */
.topbar .bar-tools { margin-left: auto; }
@media (max-width: 400px) { .topbar .bar-tools .btn { padding: 0 12px; } .topbar .brand .wordmark { height: 27px; } }

/* MARK: styl ręcznie rysowany, jak w aplikacji. Przycisk „plama i kreska” (EduNote/App/InkButtons.swift): nierówny
   kontur tuszem i plama koloru przesunięta w lewo w dół; po naciśnięciu plama wskakuje pod kreskę. Karta „na szkicu”:
   ten sam kontur i twardy cień, jak na rysunkach z powitania. Używane na stronie głównej; reszta stron ich nie ma. */
:root, .light-scope, .iphone { --hard-ink: #2A2A22; }
:root[data-theme="dark"] { --hard-ink: #3B4719; }
.ink-btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border: 2px solid var(--stroke); border-radius: 16px 13px 17px 12px / 13px 17px 12px 16px;
  background: transparent; color: var(--ink); font: 700 17px/1.2 var(--sans); text-decoration: none; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .45s var(--ease-spring);
}
.ink-btn::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; background: var(--blob, var(--paper));
  transform: translate(-5px, 4px); transition: transform .25s var(--ease);
}
.ink-btn:hover::before { transform: translate(-3px, 3px); }
.ink-btn:active { transform: scale(.98); transition-duration: .08s; }
.ink-btn:active::before { transform: none; transition-duration: .08s; }
.ink-btn svg { width: 19px; height: 19px; flex: none; }
.ink-btn.primary { --blob: var(--moss-fill); color: var(--on-moss); }
.ink-btn.soft { --blob: var(--mat); color: var(--mat-text); }
.ink-btn.small { min-height: 44px; padding: 0 18px; font-size: 15.5px; }
.sketch { background: var(--paper); border: 2px solid var(--stroke); border-radius: 20px 16px 22px 17px / 17px 22px 16px 20px; box-shadow: 5px 5px 0 var(--hard-ink); }
.sketch-shot { display: block; width: 100%; height: auto; border: 2px solid var(--stroke); border-radius: 14px 11px 15px 12px / 12px 15px 11px 14px; box-shadow: 5px 5px 0 var(--hard-ink); background: #FFFEFA; }
.ink-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 2px solid var(--stroke);
  border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; background: var(--sun); color: #2A2A22; font: 800 17px/1 var(--display); font-stretch: 125%;
}

/* MARK: strona główna (nowa): hasło i jeden przycisk, kroki na kartkach, biblioteka na ciemnym pasie, „Czy tak wolno?” */
.hero5 { display: grid; gap: 44px; align-items: center; padding-top: 44px; padding-bottom: 40px; }
.hero5 h1 { font-size: clamp(46px, 11vw, 92px); line-height: .98; letter-spacing: -.035em; margin: 0 0 22px; }
.hero5 h1 mark { padding: 0 .06em; }
.hero5-sub { font-size: clamp(18px, 2.3vw, 21px); line-height: 1.45; max-width: 26em; margin: 0 0 30px; color: var(--ink); }
.hero5-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.hero5-cta .link { font-size: 16.5px; }
.hero5 .platform { margin-top: 24px; }
.hero5-art { position: relative; width: 100%; max-width: 640px; margin: 0 auto; padding: 0 0 8% 0; }
.hero5-mac { width: 88%; aspect-ratio: 1.6; object-fit: cover; object-position: 0 0; }
.hero5-phone { position: absolute; right: 0; bottom: 0; width: 31%; }
/* na komputerze hasło na środku, a pod nim szeroko prawdziwe okno aplikacji i telefon (jak u Notion i Goodnotes) */
@media (min-width: 1000px) {
  .hero5 { justify-items: center; text-align: center; gap: 52px; padding-top: 56px; }
  .hero5-sub { margin-left: auto; margin-right: auto; }
  .hero5-cta, .hero5 .platform { justify-content: center; }
  .hero5-art { max-width: 1040px; }
  .hero5-mac { width: 84%; aspect-ratio: 1.75; }
  .hero5-phone { width: 24%; right: 2%; }
}
@media (max-width: 600px) { .hero5-mac { aspect-ratio: 1.05; object-position: 74% 0; width: 84%; } .hero5-phone { width: 36%; } }

.steps5 { padding-top: 70px; padding-bottom: 60px; }
.steps5 h2 { margin-bottom: 28px; }
.steps5-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
@media (min-width: 900px) { .steps5-list { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.step5 { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 0; overflow: hidden; }
.step5 h3 { font: 800 23px/1.15 var(--display); font-stretch: 125%; letter-spacing: -.015em; margin: 4px 0 0; }
.step5 p { margin: 0; color: var(--muted); }
.step5-shot { display: block; width: calc(100% + 22px); height: auto; max-width: none; margin: auto -22px 0 0; align-self: flex-end; border-top-left-radius: 12px; border: 1px solid var(--shot-line); border-right: 0; border-bottom: 0; aspect-ratio: 1.3; object-fit: cover; object-position: var(--crop, 78% 0); background: #FFFEFA; }
.step5-shot.step5-phone { width: 66%; margin: auto auto 0; aspect-ratio: .86; border-radius: 22px 22px 0 0; border: 1px solid var(--shot-line); border-bottom: 0; object-position: 50% 0; }
.step5 p { margin-bottom: 14px; }

.v5 .band { margin-top: 30px; }
.band-cta { text-align: center; }
.band .ink-btn { --blob: #FFFEFA; color: #2A2A22; border-color: #FFFEFA; }

.law5 { padding-top: 80px; }
.law5-in { max-width: 820px; margin: 0 auto; text-align: center; }
.law5-quote { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.5; margin: 0 auto 24px; max-width: 32em; }
.law5-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; }
.v5 .price { margin-top: 80px; }
.v5 .today-in { border-radius: 20px 16px 22px 17px / 17px 22px 16px 20px; }
.v5 .today-in .tile-row { align-items: center; gap: 12px 22px; }

/* MARK: logowanie (…/zaloguj/): jak w Claude, karta z Apple, Google i kodem z e-maila; na komputerze obok rysunek
   biurka z powitania w aplikacji. Przycisk Apple według zasad Apple (czarny, w ciemnym wyglądzie biały), przycisk
   Google rysuje sam Google. */
.login { min-height: 100svh; display: grid; }
@media (min-width: 1000px) { .login { grid-template-columns: 1fr minmax(420px, 44%); gap: 40px; padding: 28px 32px 32px 0; } }
.login-main { display: flex; flex-direction: column; min-width: 0; padding: 14px var(--gutter) 32px; }
.login-top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.login-center { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 22px 0; }
.login-title { font-size: clamp(32px, 7vw, 46px); line-height: 1.05; text-align: center; margin: 0; }
.login-sub { text-align: center; color: var(--muted); margin: 0 0 6px; }
.login-card { padding: 24px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.login-card h2 { font-size: 24px; margin: 0; }
.login-providers { display: flex; flex-direction: column; gap: 10px; }
.login-apple {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 18px; border: 0; border-radius: 999px;
  background: #000; color: #fff; font: 600 16.5px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .35s var(--ease-spring), opacity .2s var(--ease);
}
.login-apple svg { width: 17px; height: 20px; margin-top: -3px; flex: none; }
.login-apple:hover { opacity: .88; }
.login-apple:active { transform: scale(.98); transition-duration: .08s; }
:root[data-theme="dark"] .login-apple { background: #fff; color: #000; }
.login-google { display: flex; justify-content: center; min-height: 44px; }
/* okienko z przyciskiem Google ma jasny schemat: bez tego w ciemnym wyglądzie przeglądarka podkłada mu białe tło */
.login-google iframe { color-scheme: light; }
.login-google:empty { display: none; }
.login-or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--faint); font-size: 13.5px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 2px dashed var(--line); }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form label { font-size: 14px; font-weight: 650; color: var(--muted); }
.login-form input {
  min-height: 52px; padding: 0 16px; font: 500 17px var(--sans); color: var(--ink); background: var(--sunk);
  border: 2px solid var(--stroke); border-radius: 14px 12px 15px 12px / 12px 15px 12px 14px;
}
.login-form input:focus { outline: 3px solid var(--mat); outline-offset: 1px; }
#code { font: 700 26px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .5em; text-align: center; padding-left: .5em; }
.login-form .ink-btn { margin-top: 6px; }
.ink-btn.busy { opacity: .75; cursor: progress; }
.login-error { margin: 0; color: var(--coral-text); font-weight: 600; font-size: 15px; }
.login-hint { margin: 0; color: var(--muted); }
.login-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin: 0; }
.login-row .link { font-size: 15px; padding: 6px 0; }
.login-row .link:disabled { color: var(--faint); text-decoration: none; cursor: default; }
.login-legal { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.login-legal a { color: var(--muted); }
.login-inapp { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--mustard-soft); color: var(--mustard-text); font-size: 14.5px; line-height: 1.5; }
.login-inapp .link { color: inherit; font-size: inherit; padding: 0; }
.login-skip { align-self: center; font-size: 15px; color: var(--muted); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; padding: 6px 0; }
.login-skip:hover { color: var(--ink); }
.login-art { display: none; }
@media (min-width: 1000px) {
  .login-art {
    position: relative; display: block; overflow: hidden; color: var(--stroke); background: var(--mat);
    border: 2px solid var(--stroke); border-radius: 26px 22px 28px 24px / 24px 28px 22px 26px;
  }
  .login-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
}
.fill-sky { fill: var(--sky); } .fill-moss { fill: var(--moss); } .fill-desk { fill: var(--mustard); }
.stroke-moss { stroke: var(--moss); } .stroke-paper { stroke: var(--paper); } .stroke-coral { stroke: var(--coral); }
.login-art-note {
  position: absolute; left: 22px; bottom: 22px; margin: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--paper); border: 2px solid var(--stroke); border-radius: 16px 13px 18px 14px / 14px 18px 13px 16px;
  font-size: 13.5px; font-weight: 650; transform: rotate(-1.5deg);
}
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.motion .dot-live { animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
/* wąskie telefony (360–400 px): pasek się mieści; „Moja biblioteka” na stronie głównej jest wtedy w pasku nad hasłem */
@media (max-width: 480px) { #bar-lib { display: none !important; } }
@media (max-width: 400px) {
  .bar-tools { gap: 2px; }
  .bar-tools .btn-sm { padding: 0 12px; font-size: 14.5px; }
  .bar-tools .icon-btn { width: 38px; height: 38px; }
}

/* MARK: konto w pasku (inicjał w kółku z menu) i moje notatki w bibliotece */
.avatar {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; list-style: none;
  background: var(--sun); color: #2A2A22; border: 2px solid var(--stroke); font: 800 16px/1 var(--display); font-stretch: 125%;
  -webkit-tap-highlight-color: transparent;
}
.avatar::-webkit-details-marker { display: none; }
.account-menu { margin: 0; }
.account-menu .more-list { min-width: 260px; }
.account-who { margin: 6px 12px 8px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.lib-account { padding: 20px 22px; margin: 6px 0 22px; }
.lib-account h2 { font-size: 21px; margin: 0 0 6px; }
.lib-account p { color: var(--muted); max-width: 36em; }
.lib-account p:last-child { margin: 12px 0 0; }
.lib-view { padding: 0; max-width: 720px; }
.mine h1 { margin-top: 4px; }
.mine .course-study { margin-top: 18px; }
.mine .tabs { margin-top: 20px; }
.mine-panel { padding-top: 22px; }
.transcript { white-space: pre-wrap; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.mine .course-actions { grid-template-columns: 1fr 1fr; }

/* MARK: konto i ustawienia (…/konto/) */
.acct { padding-bottom: 20px; }
.acct h1 { margin: 4px 0 20px; }
.acct h2 { font-size: 21px; margin: 0 0 8px; }
.acct-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 34px; }
.acct-avatar { width: 54px; height: 54px; font-size: 21px; cursor: default; flex: none; }
.acct-who h2 { font-size: 15px; font-weight: 700; color: var(--muted); font-family: var(--sans); font-stretch: 100%; letter-spacing: 0; margin: 0; }
.acct-who { min-width: 0; }
.acct-who p { margin: 0; overflow-wrap: break-word; }
#who-email { font-size: 18px; font-weight: 650; }
.acct-sec { margin-bottom: 34px; }
.acct-list { list-style: none; margin: 0 0 10px; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.acct-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 15px; }
.acct-list li + li { border-top: 1px solid var(--line); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.btn-danger { background: transparent; color: var(--coral-text); border-color: var(--coral-text); }
.btn-danger:hover { background: var(--coral-soft); }
.btn-danger:disabled { opacity: .45; cursor: default; }
.sheet .btn-danger:not(:disabled) { background: var(--coral-text); color: var(--paper); }
.del-label { font-size: 15px; }
.del-input { min-height: 50px; font-weight: 700; letter-spacing: .08em; }
a.more-item { display: flex; align-items: center; text-decoration: none; }
/* „Zaloguj się” w pasku strony głównej: zwykły link obok jednego przycisku (jak u Notion i Goodnotes) */
.bar-login { font-size: 15.5px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 8px 6px; white-space: nowrap; }
.bar-login:hover { color: var(--moss-dark); }
@media (max-width: 760px) { .bar-login { display: none; } }
@media (max-width: 760px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
.welcome-save { margin-top: 10px; justify-self: start; }
.welcome .welcome-title.ask::before { display: none; }
/* wydruk w ciemnym wyglądzie: theme.js przełącza na jasny przed drukiem; to jest zapas, gdy przeglądarka nie da znać */
@media print {
  :root[data-theme="dark"] {
    --page: #FFFFFF; --paper: #FFFFFF; --ink: #2A2A22; --muted: #6E6B5F; --faint: #A29F92; --line: #E2DFD3;
    --brief: #E6ECD3; --mat: #E3E9CF; --mat-text: #4E5F22; --moss-dark: #4E5F22; --stroke: #2A2A22; color-scheme: light;
  }
}

/* MARK: profil studenta (…/u/#KOD) */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.profile-head h1 { margin: 0 0 2px; }
.profile-head .course-by { margin: 0; }
.profile-avatar { width: 58px; height: 58px; font-size: 23px; cursor: default; flex: none; }
.profile-shelf { margin-top: 6px; }
.profile-page .lessons-head { margin-top: 22px; }
.acct-profile { display: grid; gap: 10px; }
.acct-profile label[for], .acct-profile legend { font-size: 14px; font-weight: 650; color: var(--muted); }
.acct-profile input#nick { min-height: 50px; padding: 0 16px; font: 500 16.5px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.acct-profile input#nick:focus { border-color: var(--moss); outline: 3px solid var(--mat); outline-offset: 0; }
.acct-profile fieldset { border: 0; margin: 6px 0 0; padding: 0; }
.acct-checks { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; margin-top: 6px; }
.acct-checks .pick { padding-left: 0; }
.pick.is-disabled { color: var(--faint); cursor: default; }
.acct-sec, .acct-card { scroll-margin-top: calc(var(--bar-h) + 16px); }
