/* Famiglot — design system and app styles */

:root {
  /* Petrol (Color Hunt 544) for tasks and progress, rose (1157) for the group.
     Colour follows context (Elliot & Maier): no red on tasks or answers; warm colours belong to people. */
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-sunk: #e3ebf0;
  --block: #eef4f7;
  --ink: #16161d;
  --ink-2: #474752;
  --ink-3: #696975;
  --line: #e2e6ec;
  --line-strong: #cbd2db;
  --brand: #086288;
  --brand-ink: #ffffff;
  --brand-soft: #e4f4fd;
  --brand-strong: #064a67;
  --solid: #086288;
  --sky: #97d7ff;
  --rose: #ff95a5;
  --rose-soft: #ffdcdc;
  --rose-ink: #8c2a3b;
  --gold: #d99a1e;
  --gold-soft: #ffefc4;
  --ok: #1f7a55;
  --ok-soft: #dcf1e6;
  --bad: #b3261e;
  --bad-soft: #f9e0de;
  --miss: #474752;
  --miss-soft: #eef0f3;
  --info: #35749f;
  --info-soft: #e1eef7;
  --violet: #5b4fb0;
  --violet-soft: #e9e6f8;
  --orange: #b4541a; --orange-soft: #fde4d2; --teal: #0d7a70; --teal-soft: #d6f1ec; --plum: #93306f; --plum-soft: #f5ddec; --olive: #5c7414; --olive-soft: #e8f1d0;
  --pa-g: #ffd98a; --pa-b: #ff95a5; --pa-o: #9fdcc3; --pa-i: #97d7ff;
  --shadow-1: 0 1px 2px rgb(22 22 29 / .06), 0 1px 1px rgb(22 22 29 / .04);
  --shadow-2: 0 6px 24px -8px rgb(22 22 29 / .16), 0 2px 6px rgb(22 22 29 / .06);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1418; --bg-elev: #162026; --bg-sunk: #0a0f12; --block: #162026;
    --ink: #eef3f6; --ink-2: #c3ccd3; --ink-3: #8d99a3;
    --line: #233039; --line-strong: #314150;
    --brand: #6cc3f0; --brand-ink: #04222f; --brand-soft: #12303f; --brand-strong: #97d7ff; --solid: #0a5a7c;
    --sky: #1d4a63; --rose: #ff95a5; --rose-soft: #3d2128; --rose-ink: #ffc2cc;
    --gold: #f0b54a; --gold-soft: #3a3018;
    --ok: #4cc08c; --ok-soft: #173327; --bad: #f06b6b; --bad-soft: #3a1c1c;
    --miss: #c3ccd3; --miss-soft: #1c262d;
    --info: #7db7e0; --info-soft: #162b3a; --violet: #a99bf0; --violet-soft: #252040;
    --orange: #f29a5c; --orange-soft: #3a2416; --teal: #5ccfbf; --teal-soft: #123430; --plum: #e48ac3; --plum-soft: #38182c; --olive: #b2cf5a; --olive-soft: #262f12;
    --pa-g: #7d6322; --pa-b: #8a3a48; --pa-o: #24664a; --pa-i: #285476;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 10px 30px -10px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1418; --bg-elev: #162026; --bg-sunk: #0a0f12; --block: #162026;
  --ink: #eef3f6; --ink-2: #c3ccd3; --ink-3: #8d99a3;
  --line: #233039; --line-strong: #314150;
  --brand: #6cc3f0; --brand-ink: #04222f; --brand-soft: #12303f; --brand-strong: #97d7ff; --solid: #0a5a7c;
  --sky: #1d4a63; --rose: #ff95a5; --rose-soft: #3d2128; --rose-ink: #ffc2cc;
  --gold: #f0b54a; --gold-soft: #3a3018;
  --ok: #4cc08c; --ok-soft: #173327; --bad: #f06b6b; --bad-soft: #3a1c1c;
  --miss: #c3ccd3; --miss-soft: #1c262d;
  --info: #7db7e0; --info-soft: #162b3a; --violet: #a99bf0; --violet-soft: #252040;
  --orange: #f29a5c; --orange-soft: #3a2416; --teal: #5ccfbf; --teal-soft: #123430; --plum: #e48ac3; --plum-soft: #38182c; --olive: #b2cf5a; --olive-soft: #262f12;
  --pa-g: #7d6322; --pa-b: #8a3a48; --pa-o: #24664a; --pa-i: #285476;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 10px 30px -10px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font: 800 clamp(1.7rem, 3.4vw, 2.3rem)/1.12 var(--font-display); letter-spacing: -.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.es { font-family: var(--font-display); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand) url(/img/mark.svg) center / 82% no-repeat; box-shadow: var(--shadow-1);
}
.welcome-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.welcome-hero h1 { margin-bottom: 0; }
.mascot { width: 96px; height: auto; flex: none; transform-origin: 50% 100%; animation: mascot-bob 3.2s ease-in-out infinite; }
@keyframes mascot-bob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }
@media (max-width: 480px) { .mascot { width: 64px; } .welcome-hero { gap: 12px; } }
.brand-mark.light { background-color: #fff; background-image: url(/img/mark-brand.svg); }
.brand-name { font: 800 1.25rem/1 var(--font-display); letter-spacing: -.02em; }
.brand-sub { display: block; font: 500 .7rem/1.2 var(--font); color: var(--ink-3); letter-spacing: .02em; margin-top: 3px; }
.lang-pick {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 0 0 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg-elev); cursor: pointer;
}
.flag { width: 21px; height: 14px; flex: none; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-strong); }
.lang-pick .flag { width: 24px; height: 16px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-strong); }
.lang-select {
  flex: 1; min-width: 0; padding: 8px 12px 8px 0; border: 0; background: transparent;
  color: var(--ink); font: 600 .9rem/1.2 var(--font); cursor: pointer;
}
.lang-pick.sm { margin: 0 0 0 auto; padding-left: 10px; }
.lang-pick.sm .flag { width: 21px; height: 14px; }
.lang-pick.sm .lang-select { padding: 6px 10px 6px 0; font-size: .85rem; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); font-weight: 520; font-size: .95rem; position: relative;
}
.nav-link:hover { background: var(--bg-sunk); text-decoration: none; color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--solid); color: #fff; font-weight: 700; }
.nav-link[aria-current="page"] .ico { color: #fff; }
.nav-link .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ico { width: 20px; height: 20px; flex: none; }
.main { min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 96px; }
.page { max-width: 1080px; margin: 0 auto; }
/* Every screen has the same width; long running text keeps a readable line. */
.page-narrow { max-width: 1080px; margin: 0 auto; }
.page-narrow > p, .page-narrow > div > p { max-width: 72ch; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.eyebrow { font-size: .85rem; font-weight: 600; color: var(--brand); margin-bottom: 4px; }

.bottom-nav { display: none; }
.topbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 16px 16px 108px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; position: sticky; top: 0; z-index: 20;
    background: var(--bg);
  }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 30;
    background: var(--bg); gap: 6px;
    box-shadow: 0 -1px 0 var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
    font-size: .72rem; font-weight: 600; color: var(--ink-3); border-radius: 16px; position: relative;
  }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a[aria-current="page"] { background: var(--solid); color: #fff; font-weight: 700; }
  .bottom-nav .ico { width: 22px; height: 22px; }
  .bottom-nav .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
}

/* ---------- Surfaces ---------- */
.card {
  background: var(--block); border: 0; border-radius: 24px;
  padding: 20px; box-shadow: none;
}
.card.flat { box-shadow: none; }
.card.sunk { background: var(--bg-sunk); box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
a.card { color: inherit; display: block; transition: background .15s; }
a.card.row { display: flex; flex-wrap: nowrap; }
a.card:hover { text-decoration: none; background: color-mix(in srgb, var(--block) 85%, var(--ink)); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
section + section { margin-top: 32px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-title h2 { margin: 0; }

.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: clamp(22px, 4vw, 34px);
  background: var(--solid); color: #fff;
}
.hero h1 { color: #fff; margin-bottom: 6px; }
.hero p { color: rgb(255 255 255 / .88); max-width: 56ch; }
.hero .btn { background: #fff; color: #16161d; border-color: #fff; font-weight: 800; }
.hero .btn.ghost { background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .35); }
.hero-deco { display: none; position: absolute; right: -10px; bottom: -34px; font: 700 9rem/1 var(--font-display); color: rgb(255 255 255 / .09); pointer-events: none; user-select: none; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .08s ease, background .15s, box-shadow .15s, border-color .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 800; }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 82%, var(--bg)); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bg-sunk); }
.quiet-line { gap: 4px; }
.quiet-line .btn.sm { padding: 2px 6px; color: var(--brand); }
.btn.sm { padding: 7px 14px; font-size: .85rem; border-radius: 999px; }
.btn.lg { padding: 15px 24px; min-height: 56px; font-size: 1.06rem; border-radius: 999px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.icon { padding: 9px; border-radius: 999px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.input, .textarea, .select {
  width: 100%; padding: 13px 16px; border-radius: 18px; border: 2px solid var(--line);
  background: var(--bg-elev); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }

.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px;
  border-radius: 22px; border: 2px solid var(--line); background: var(--bg-elev); cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
}
.choice:hover { border-color: var(--line-strong); background: var(--bg-sunk); }
.choice:active { transform: scale(.995); }
.choice .key {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; background: var(--bg-sunk); color: var(--ink-2); border: 1px solid var(--line);
}
.choice.selected { border-color: var(--brand); background: var(--brand-soft); }
.choice.correct { border-color: var(--solid); background: var(--solid); color: #fff; }
.choice.correct .key { background: #fff; color: var(--solid); border-color: #fff; }
.choice.wrong { border-color: var(--ink); border-style: dashed; background: var(--bg-elev); }
.choice.wrong .key { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.choice[disabled] { cursor: default; }
.choice .big { font-size: 1.6rem; }
.choice b { display: block; }

/* ---------- Badges, chips, progress ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 650; background: var(--bg-sunk); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.badge > .ico { width: 14px; height: 14px; }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.badge.gold { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 60%, var(--ink)); border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.level-pill {
  display: inline-grid; place-items: center; min-width: 46px; height: 28px; padding: 0 10px; border-radius: 9px;
  font: 700 .85rem/1 var(--font); background: var(--ink); color: var(--bg);
}
.bar { height: 12px; border-radius: 99px; background: var(--bg-sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.bar.ok > i { background: var(--ok); }
.bar.gold > i { background: var(--gold); }
/* Two layers: seen (light) under learnt for good (full colour). */
.bar.layered { position: relative; }
.bar.layered > i { position: absolute; inset: 0 auto 0 0; }
.bar.layered > i.seen { opacity: .55; }
.ring { --p: 0; --size: 72px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--bg-sunk) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-elev); }
.ring span { position: relative; font-weight: 700; font-size: .95rem; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .num { font: 800 1.8rem/1.1 var(--font-display); letter-spacing: -.02em; }
.stat .lbl { font-size: .8rem; color: var(--ink-3); font-weight: 550; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat-card { padding: 16px 18px; }
.stat-card .ico-bubble { margin-bottom: 10px; }
.ico-bubble { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; flex: none; }
.ico-bubble.gold { background: var(--gold-soft); color: var(--gold); }
.ico-bubble.ok { background: var(--ok-soft); color: var(--ok); }
.ico-bubble.info { background: var(--info-soft); color: var(--info); }
.ico-bubble.violet { background: var(--violet-soft); color: var(--violet); }
.ico-bubble.rose { background: var(--rose-soft); color: var(--rose-ink); }
.ico-bubble.orange { background: var(--orange-soft); color: var(--orange); }
.ico-bubble.teal { background: var(--teal-soft); color: var(--teal); }
.ico-bubble.plum { background: var(--plum-soft); color: var(--plum); }
.ico-bubble.olive { background: var(--olive-soft); color: var(--olive); }
.emoji-tile { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: var(--bg-sunk); flex: none; }

.spark { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.spark i { flex: 1; min-height: 3px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--brand) 30%, var(--bg-sunk)); }
.spark i.on { background: var(--brand); }
.spark i.today { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
a.list-item { color: inherit; border-radius: 10px; padding-inline: 10px; }
a.list-item:hover { background: var(--bg-sunk); text-decoration: none; }

.check {
  width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line-strong);
  display: grid; place-items: center; background: var(--bg-elev); cursor: pointer; transition: all .15s; color: transparent;
}
.check.working { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.check.done { border-color: var(--solid); background: var(--solid); color: #fff; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--block); flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--solid); color: #fff; }

/* ---------- Words (practice), as the K2 board: sky question card, 2×2 tiles, vanilla answer ---------- */
.word-page { gap: 16px; }
.word-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin-left: -8px; }
.word-top .btn.icon { width: 44px; height: 44px; color: var(--ink); }
.word-count { font-size: .875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.word-card { background: var(--sky); color: var(--ink); border-radius: 28px; padding: 26px 22px; display: grid; gap: 14px; }
.word-card .tiny { color: var(--ink-2); }
.word-card .muted { color: var(--ink-2); }
.word-q { margin: 0; font-weight: 600; font-size: .95rem; }
.word-big { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.word-big .flash-word { min-width: 0; overflow-wrap: anywhere; }
.word-options.check-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.word-options .check-opt { min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; font-size: 1.08rem; font-weight: 600; overflow-wrap: anywhere; }
.word-options .check-opt .ico { width: 24px; height: 24px; }
.word-options .check-opt.right { font-weight: 800; }
.opt-key { font-size: .72rem; font-weight: 700; color: var(--ink-3); }
.word-result { display: grid; gap: 12px; padding: 18px; border-radius: 24px; background: var(--gold-soft); color: var(--ink); }
.word-result > b { font-size: 1.06rem; font-weight: 800; }
/* After the answer: the right option mint (palette pastel), the wrong pick pale gold; the result takes the same tint. */
.word-options.answered .check-opt { min-height: 64px; }
.word-options.answered .check-opt:only-child { grid-column: 1 / -1; }
.word-options .check-opt.right { background: var(--pa-o); border-color: var(--pa-o); color: var(--ink); }
.word-options .check-opt.wrong { background: var(--gold-soft); border: 2px solid var(--gold); color: var(--ink); }
.word-result.ok { background: var(--ok-soft); }
.word-result.miss { background: var(--gold-soft); }
/* Next sits in the result's first line, so it is on screen even when the example and the note run long. */
.word-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.word-result-head .btn { flex: 0 0 auto; min-width: 180px; }
/* One screen on a phone and on a short laptop or tablet: a tighter card and lower tiles. */
@media (max-width: 600px), (max-height: 820px) {
  .word-page { gap: 12px; }
  .word-card { padding: 18px 18px; gap: 10px; }
  .word-card .flash-word { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .word-options .check-opt { min-height: 64px; padding: 10px; font-size: 1rem; }
  .word-result { padding: 14px 16px; gap: 10px; }
}
@media (max-width: 600px) {
  .word-result-head { flex-wrap: wrap; }
  .word-result-head .btn { flex: 1 1 100%; }
  .word-options .opt-key { display: none; }
}
@media (max-height: 700px) {
  .word-page { gap: 10px; }
  .word-card { padding: 14px 16px; gap: 8px; }
  .word-card .flash-word { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .word-options .check-opt { min-height: 56px; padding: 8px; }
}
.word-result .word-big .flash-word { font-size: 1.6rem; }
.word-result .flash-ex, .word-result .flash-note { margin-inline: 0; }
.word-result .flash-note { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.bad-text { color: var(--miss); font-weight: 600; }
.flash-word { font: 800 clamp(2rem, 8vw, 2.7rem)/1.08 var(--font-display); letter-spacing: -.02em; }
.flash-tr { font-size: 1.25rem; font-weight: 700; }
.flash-ex { color: var(--ink-2); max-width: 52ch; }
.flash-note { font-size: .88rem; padding: 10px 14px; border-radius: 16px; background: var(--gold-soft); max-width: 52ch; text-align: left; }
.dots { display: inline-flex; gap: 5px; flex: none; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; }
.dots i.on { background: currentColor; }
.grammar-dots { color: var(--violet); line-height: 0; }
.word-row.grammar-row { grid-template-columns: minmax(0, 1fr) auto; }
.word-list { display: grid; gap: 6px; }
.word-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; }
.word-row .es { font-weight: 600; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg.you { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 13px 16px; border-radius: 22px; background: var(--block); }
.msg.ai .bubble { border-bottom-left-radius: 6px; }
.msg.you .bubble { background: var(--solid); color: #fff; border-bottom-right-radius: 6px; }
.msg.you .bubble .tr { color: rgb(255 255 255 / .8); }
.bubble .es { font-size: 1.08rem; }
.bubble .tr { font-size: .86rem; color: var(--ink-3); margin-top: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg-sunk); font-size: 1.1rem; overflow: hidden; }
.avatar.c0 { background: var(--solid); color: #fff; font-weight: 800; }
.avatar.c1 { background: var(--rose); color: #16161d; font-weight: 800; }
.avatar.c2 { background: var(--ink); color: var(--bg); font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.fix { align-self: flex-end; max-width: 86%; font-size: .88rem; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px dashed color-mix(in srgb, var(--gold) 50%, transparent); }
.fix.good { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
/* ---------- Tutor: a lesson in steps, not chat bubbles ---------- */
.lesson { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); }
.step p { margin: 0; line-height: 1.55; }
.step.aside { border-left-color: var(--line-strong); color: var(--ink-2); }
.step-ex { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); }
.step-ex .es { font-size: 1.12rem; font-weight: 600; }
.step-ex .tr { font-size: .86rem; color: var(--ink-3); margin-top: 2px; }
.step-q { font-weight: 600; }
.step-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.said { align-self: flex-end; max-width: 80%; display: flex; gap: 6px; align-items: baseline; padding: 8px 14px; border-radius: 14px;
  background: var(--bg-sunk); color: var(--ink-2); white-space: pre-wrap; }
.said .ico { flex: none; width: 14px; height: 14px; color: var(--ink-3); }
.composer {
  position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 12px;
  background: var(--bg); border: 0; border-radius: 0; margin-top: 16px;
}
.composer textarea { flex: 1; border: 0; background: var(--block); border-radius: 26px; resize: none; min-height: 52px; max-height: 160px; padding: 14px 18px; outline: none; }
.composer .btn.icon { width: 52px; height: 52px; flex: none; }
.composer .btn.icon.primary, .composer .btn.primary { background: var(--ink); color: var(--bg); }
@media (max-width: 900px) { .composer { bottom: 84px; } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.mic.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Prose (AI explanations) ---------- */
.prose { line-height: 1.65; }
.prose p { margin: 0 0 .8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 .9em; }
.prose li { margin: .25em 0; }
.prose h3, .prose h4 { margin: 1.1em 0 .4em; }
.prose code { background: var(--bg-sunk); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prose strong { font-weight: 650; }
.prose h3 { font-size: 1.15rem; }
.prose h4 { font-size: 1rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.prose blockquote { margin: 0 0 .9em; padding: 12px 16px; background: var(--gold-soft); border-radius: 14px; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 .9em; }
.prose .table-wrap table.simple { min-width: 32rem; line-height: 1.45; }
.prose .table-wrap th { white-space: nowrap; }
/* On a phone each row of a model's table becomes a small card: the first cell as its title, the rest labelled. */
@media (max-width: 640px) {
  .prose .table-wrap table.simple { min-width: 0; }
  .prose .table-wrap thead { display: none; }
  .prose .table-wrap tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .prose .table-wrap td { display: block; padding: 2px 0; border: 0; }
  .prose .table-wrap td:first-child { font-weight: 650; padding-bottom: 4px; }
  .prose .table-wrap td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: .85em; }
}

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--info-soft); color: var(--ink); }
.callout.warn { background: var(--gold-soft); }
.callout.ok { background: var(--ok-soft); }
.callout.bad { background: var(--bad-soft); }
.callout .ico { color: var(--info); margin-top: 2px; }

.speak { border: 0; background: var(--ink); width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; color: var(--bg); flex: none; vertical-align: middle; }
.speak .ico { width: 18px; height: 18px; }
.speak:hover { background: var(--brand); color: #fff; }
.speak.big { width: 52px; height: 52px; }
.speak.big .ico { width: 26px; height: 26px; }
.speak.is-speaking { background: var(--brand); color: #fff; }
.btn.is-speaking { background: var(--brand-soft); color: var(--brand); }
.speak-pair { display: inline-flex; align-items: center; gap: 4px; flex: none; }

.dropzone { display: block; border: 2px dashed var(--line-strong); border-radius: 16px; padding: 22px; text-align: center; background: var(--bg-sunk); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs figure { margin: 0; position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }

.diff del { background: var(--miss-soft); color: var(--ink-3); text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.diff ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* Stage path */
.stages { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.stage-chip {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 22px;
  border: 0; background: var(--block); color: var(--ink); cursor: pointer; min-width: 150px; text-align: left;
}
.stage-chip b { font-weight: 600; }
.stage-chip[aria-selected="true"] { background: var(--solid); color: #fff; }
.stage-chip[aria-selected="true"] small { color: rgb(255 255 255 / .8); }
.stage-chip .lvl { font: 700 .8rem/1 var(--font); padding: 6px 7px; border-radius: 8px; color: #fff; }
.stage-chip small { display: block; color: var(--ink-3); font-size: .74rem; }

/* Login */
.login {
  min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login-art {
  position: relative; overflow: hidden; padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--solid);
}
.login-art h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); max-width: 14ch; }
.login-art p { color: rgb(255 255 255 / .85); max-width: 42ch; font-size: 1.05rem; }
.login-words { display: none; position: absolute; inset: 0; pointer-events: none; font-family: var(--font-display); color: rgb(255 255 255 / .1); }
.login-words span { position: absolute; font-size: var(--s); left: var(--x); top: var(--y); transform: rotate(var(--r)); }
/* The form starts near the top, by the headline, not in the middle: with Google and Apple buttons it is tall and centring pushed it down. */
.login-panel { display: grid; justify-items: center; align-items: start; padding: clamp(24px, 5vh, 56px) 20px 32px; }
.login-box { width: 100%; max-width: 380px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 56px; padding: 13px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg-elev); font-weight: 700; cursor: pointer; color: var(--ink); }
.gbtn:hover { text-decoration: none; border-color: var(--ink); }
/* Sign in with Apple: black on light, white on dark (Apple's button rules); ink/bg swap with the theme. */
.gbtn.abtn { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; color: rgb(255 255 255 / .92); }
.features li span:first-child { width: 30px; height: 30px; border-radius: 9px; background: rgb(255 255 255 / .16); display: grid; place-items: center; flex: none; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-art { padding: 32px 20px; min-height: 0; }
}
.login-now { font-size: .95rem !important; padding: 10px 14px; border-radius: 12px; background: rgb(255 255 255 / .12); }
.lp-tour { margin-top: 18px; background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .35); }
.lp-tour:hover { background: rgb(255 255 255 / .22); border-color: #fff; }

/* The first screens (start.js, welcome.js): a band in the brand colour with the greeting and polaroids to pick from
   (js/polaroid.js), the picked one's form on a card below. The photo paper keeps the light palette in both themes. */
.hello { min-height: 100dvh; background: var(--bg); }
.hello-band {
  position: relative; overflow: hidden; color: #fff; padding: 28px 16px 64px;
  background: radial-gradient(circle at 88% 8%, rgb(151 215 255 / .38), transparent 42%),
    radial-gradient(circle at 6% 96%, rgb(255 149 165 / .3), transparent 46%),
    radial-gradient(circle at 55% 120%, rgb(255 217 138 / .22), transparent 40%), var(--solid);
}
.hello-in { max-width: 760px; margin: 0 auto; }
/* Nothing picked yet: the band fills the screen instead of leaving an empty half. */
.hello:not(:has(.hello-card)) .hello-band { min-height: 100dvh; }
.hello-brand .brand-name { color: #fff; }
.hello-band h1 { color: #fff; font-size: clamp(2rem, 5.4vw, 3.2rem); max-width: 24ch; margin: 26px 0 10px; text-wrap: balance; }
.hello-band p { color: rgb(255 255 255 / .86); max-width: 48ch; font-size: 1.05rem; margin: 0; }
.hello-step { display: flex; align-items: center; gap: 10px; margin-top: 24px; font-weight: 700; font-size: .9rem; color: rgb(255 255 255 / .9); }
.hello-step i { display: block; width: 72px; height: 8px; border-radius: 99px; background: rgb(255 255 255 / .25); overflow: hidden; }
.hello-step i::before { content: ""; display: block; height: 100%; width: var(--done, 50%); border-radius: inherit; background: #ffd98a; }
.polas { display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 3.5vw, 30px); margin-top: 30px; padding-top: 12px; }
.pola {
  --r: 0deg; --y: 0px;
  position: relative; display: flex; flex-direction: column; flex: none; width: clamp(100px, 27vw, 196px); padding: 8px 8px 0;
  appearance: none; border: 0; border-radius: 3px; background: #fbfaf6; color: #16161d; font: inherit; text-align: center; cursor: pointer;
  box-shadow: 0 1px 1px rgb(0 0 0 / .14), 0 14px 30px -10px rgb(0 0 0 / .5);
  transform: rotate(var(--r)) translateY(var(--y)); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s ease, filter .3s ease;
  animation: pola-in .6s cubic-bezier(.2, .9, .3, 1.2) both;
}
.pola:nth-child(1) { --r: -6deg; --y: 8px; }
.pola:nth-child(2) { --r: 4deg; --y: -4px; animation-delay: .08s; }
.pola:nth-child(3) { --r: -2deg; --y: 12px; animation-delay: .16s; }
@keyframes pola-in { from { transform: rotate(calc(var(--r) * 3)) translateY(40px) scale(.9); } }
.pola::before { /* tape */
  content: ""; position: absolute; top: -9px; left: 50%; width: 38%; height: 18px; transform: translateX(-50%) rotate(-3deg);
  background: rgb(255 248 220 / .65); box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}
.pola:hover { --y: -6px; }
.pola:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.pola.picked { --r: 0deg; --y: -14px; z-index: 2; box-shadow: 0 2px 2px rgb(0 0 0 / .14), 0 26px 44px -12px rgb(0 0 0 / .6); }
.pola.picked { transform: rotate(0deg) translateY(-14px) scale(1.06); }
.pola.picked::after {
  content: "✓"; position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: #1f7a55; color: #fff; font-weight: 800; box-shadow: 0 4px 10px rgb(0 0 0 / .3);
}
.pola-photo {
  --pa-g: #ffd98a; --pa-b: #ff95a5; --pa-o: #9fdcc3; --pa-i: #97d7ff; --ink: #16161d;
  position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 2px; container-type: inline-size;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06);
}
.pola-photo.tone-g { background: #ffd98a; } .pola-photo.tone-b { background: #ffb3be; }
.pola-photo.tone-o { background: #9fdcc3; } .pola-photo.tone-i { background: #97d7ff; }
.pola-big { display: grid; place-items: center; width: 54cqi; height: 54cqi; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px -6px rgb(0 0 0 / .25); }
.pola-big .pict { width: 34cqi; height: 34cqi; color: #16161d; }
.pola-small .pict { position: absolute; width: 17cqi; height: 17cqi; color: #16161d; }
.pola-small .pict:nth-child(1) { top: 9cqi; left: 9cqi; transform: rotate(-12deg); }
.pola-small .pict:nth-child(2) { bottom: 9cqi; right: 9cqi; transform: rotate(10deg); }
.pola-small .pict:nth-child(3) { top: 9cqi; right: 10cqi; transform: rotate(8deg); }
.pola-faces { position: absolute; bottom: 7cqi; display: flex; gap: 3cqi; }
.pola-faces b, .pola-faces i { display: grid; place-items: center; width: 15cqi; height: 15cqi; border-radius: 50%; font: 800 7.5cqi/1 var(--font-display); font-style: normal; }
.pola-faces b { background: #086288; color: #fff; }
.pola-faces i { border: .9cqi dashed #16161d; color: #16161d; }
.pola-code { position: absolute; bottom: 8cqi; padding: 2.5cqi 5cqi; border-radius: 99px; background: #fff; font: 800 8cqi/1 var(--font-display); letter-spacing: .08em; }
.pola-cap { padding: 10px 2px 13px; font: 800 clamp(.78rem, 2.5vw, 1rem)/1.2 var(--font-display); color: #16161d; text-wrap: balance; }
.pola-sub { margin: -8px 0 12px; font-size: clamp(.68rem, 2vw, .8rem); line-height: 1.3; color: #474752; text-wrap: balance; }
.hello-panel { position: relative; max-width: 620px; margin: -34px auto 0; padding: 0 16px 40px; display: grid; gap: 16px; }
.hello-card { box-shadow: var(--shadow-2); border-top: 6px solid var(--pa-i); animation: hello-card-in .35s ease both; }
.hello-card.tone-g { border-top-color: #ffd98a; } .hello-card.tone-b { border-top-color: #ff95a5; } .hello-card.tone-o { border-top-color: #9fdcc3; }
.hello-card h2 { margin: 0; }
@keyframes hello-card-in { from { transform: translateY(10px); } }
.lang-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lang-tile {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--bg-elev); font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.lang-tile:hover { border-color: var(--line-strong); }
.lang-tile input { position: absolute; opacity: 0; pointer-events: none; }
.lang-tile .flag { width: 30px; height: 20px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.lang-tile .tiny { margin-left: auto; }
.lang-tile:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.02); }
.lang-tile:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.code-input { font: 800 1.2rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .pola, .hello-card { animation: none; transition: none; } }

/* Polaroids of the app in the login hero (js/snaps.js). Photo paper and the screens inside keep the light palette
   in both themes: they are pictures of the app, not part of the page. Sizes inside follow the card (cqi). */
.snaps { position: relative; display: flex; justify-content: center; padding: 8px 0 4px; }
.snap {
  --ink: #16161d; --ink-2: #474752; --ink-3: #696975; --pa-g: #ffd98a; --pa-b: #ff95a5; --pa-o: #9fdcc3; --pa-i: #97d7ff;
  position: relative; container-type: inline-size; flex: none; width: clamp(150px, 23.5%, 230px); margin: 0 .5%; padding: 9px 9px 0;
  background: #fbfaf6; border-radius: 3px; color: var(--ink);
  box-shadow: 0 1px 1px rgb(0 0 0 / .12), 0 14px 30px -10px rgb(0 0 0 / .45);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0)); transition: transform .25s ease, box-shadow .25s ease;
}
.snap:nth-child(1) { --r: -6deg; --y: 10px; z-index: 1; }
.snap:nth-child(2) { --r: 3deg; --y: -6px; z-index: 2; }
.snap:nth-child(3) { --r: -2deg; --y: 14px; z-index: 3; }
.snap:nth-child(4) { --r: 5deg; --y: -2px; z-index: 2; }
.snap::before { /* tape */
  content: ""; position: absolute; top: -9px; left: 50%; width: 34%; height: 18px; transform: translateX(-50%) rotate(-3deg);
  background: rgb(255 248 220 / .6); box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}
.snap:hover { transform: rotate(0deg) translateY(-8px) scale(1.05); z-index: 5; box-shadow: 0 2px 2px rgb(0 0 0 / .12), 0 24px 44px -12px rgb(0 0 0 / .5); }
.snap-screen {
  aspect-ratio: 9 / 12; overflow: hidden; border-radius: 2px; background: #fff; font: 500 5.6cqi/1.25 var(--font);
  display: flex; flex-direction: column; gap: 5cqi; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06);
}
.snap figcaption {
  font: 600 10.5cqi/1.1 "Caveat", "Segoe Print", "Bradley Hand", cursive; color: #2b2b36; text-align: center;
  padding: 4cqi 2cqi 6cqi; min-height: 26cqi; display: grid; place-items: center; text-wrap: balance;
}
.snaps-note { position: relative; margin: 10px 0 0 !important; font-size: .82rem !important; text-align: center; max-width: none !important; color: rgb(255 255 255 / .7) !important; }
.snap .pict { color: var(--ink); }
.sn-sm { font-size: 5cqi; color: var(--ink-2); }
.sn-sm b { color: var(--ink); font-weight: 600; }
.sn-h { font: 800 7cqi/1.15 var(--font-display); color: var(--ink); }
.sn-band { background: #97d7ff; padding: 7cqi 6cqi 8cqi; border-radius: 0 0 9cqi 9cqi; display: grid; gap: 3cqi; }
.sn-band .sn-sm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sn-chips { display: flex; justify-content: flex-end; gap: 2.5cqi; }
.sn-chips span { background: rgb(255 255 255 / .55); border-radius: 99px; padding: 1.6cqi 3.4cqi; font-weight: 700; font-size: 4.8cqi; }
.sn-hi { font: 800 8.4cqi/1.05 var(--font-display); letter-spacing: -.01em; }
.sn-now { margin: 0 5cqi; padding: 6cqi; border-radius: 8cqi; background: #086288; display: grid; gap: 2.5cqi; }
.sn-now .sn-sm, .sn-now .sn-h { color: #fff; }
.sn-go { margin-top: 2cqi; background: #fff; border-radius: 99px; padding: 3.4cqi; text-align: center; font-weight: 800; font-size: 5.4cqi; }
.sn-tabs { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1cqi; padding: 3cqi; border-top: 1px solid #e2e6ec; font-size: 4.2cqi; text-align: center; color: var(--ink-3); }
.sn-tabs b { background: #16161d; color: #fff; border-radius: 99px; padding: 1.6cqi 0; }
.sn-tabs span { padding: 1.6cqi 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-card { margin: 6cqi 5cqi 0; padding: 7cqi 6cqi; border-radius: 8cqi; background: #97d7ff; display: grid; gap: 3cqi; }
.sn-word { font: 800 10.5cqi/1 var(--font-display); letter-spacing: -.02em; }
.sn-dots { display: flex; gap: 1.6cqi; }
.sn-dots i { width: 3.4cqi; height: 3.4cqi; border-radius: 50%; border: .7cqi solid #16161d; }
.sn-dots i.on { background: #16161d; }
.sn-opts { margin: 0 5cqi; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqi; }
.sn-opts span { border: .8cqi solid #e2e6ec; border-radius: 6cqi; padding: 5cqi 2cqi; text-align: center; font-weight: 600; overflow-wrap: anywhere; }
.sn-opts .ok { border-color: #1f7a55; background: #dcf1e6; color: #1f7a55; }
.sn-toast { margin: auto 5cqi 5cqi; padding: 3.4cqi 4cqi; border-radius: 99px; background: #dcf1e6; color: #1f7a55; font-weight: 700; text-align: center; font-size: 4.8cqi; }
.sn-fire { margin: 6cqi 5cqi 0; padding: 6cqi; border-radius: 8cqi; background: #eef4f7; display: flex; gap: 4cqi; align-items: center; }
.sn-tile { flex: none; width: 15cqi; height: 15cqi; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 9cqi; }
.sn-fire .sn-sm { font-size: 4.4cqi; }
.sn-week { margin: 0 5cqi; padding: 6cqi; border-radius: 8cqi; background: #eef4f7; display: grid; gap: 2cqi; }
.sn-week .sn-h { margin-bottom: 1.5cqi; }
.sn-row { display: flex; justify-content: space-between; font-size: 5cqi; }
.sn-bar { height: 3cqi; border-radius: 99px; background: #dde6ec; overflow: hidden; }
.sn-bar i { display: block; height: 100%; border-radius: inherit; background: #086288; }
.sn-bar.light { background: rgb(255 255 255 / .35); }
.sn-bar.light i { background: #fff; }
.sn-stage { margin: 6cqi 5cqi 0; padding: 6cqi; border-radius: 8cqi; background: #35749f; display: grid; gap: 4cqi; }
.sn-stage .sn-h { color: #fff; font-size: 6cqi; }
.sn-goal { margin: 0 5cqi; display: flex; gap: 3.4cqi; align-items: center; font-size: 4.8cqi; font-weight: 600; }
.sn-goal span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sn-dot { flex: none; width: 11cqi; height: 11cqi; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: .8cqi dashed #696975; color: #696975; }
.sn-goal.done .sn-dot { border: 0; background: #eef0f3; color: #16161d; }
.sn-goal.now { color: #086288; }
.sn-goal.now .sn-dot { border: 0; background: #086288; color: #fff; box-shadow: 0 0 0 1.4cqi #c9e6f5; }
.sn-goal:not(.done):not(.now) { color: var(--ink-3); }
@media (max-width: 900px) {
  /* A row to swipe through on a phone, running out to the hero's edges. */
  .snaps { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 18px 20px 26px; gap: 18px; scrollbar-width: none; }
  .snaps::-webkit-scrollbar { display: none; }
  .snap { width: min(46vw, 210px); margin: 0; scroll-snap-align: center; }
  .snap:hover { transform: rotate(var(--r)) translateY(var(--y, 0)); }
}
@media (prefers-reduced-motion: reduce) { .snap { transition: none; } }

/* One-pager below the login hero: tokens only, so both themes hold. */
.lp { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; display: grid; gap: 64px; }
.lp-sec { scroll-margin-top: 20px; }
.lp h2 { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--font-display); letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
.lp h3 { font-size: 1.05rem; margin: 0 0 6px; }
.lp p { margin: 0; color: var(--ink-2); }
.lp-lead { margin: -8px 0 20px !important; max-width: 60ch; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: none; }
.lp-steps li { display: flex; gap: 14px; align-items: flex-start; }
.lp-num { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 1.1rem/1 var(--font-display); color: var(--bg); background: var(--ink); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lp-card { padding: 22px; border-radius: 24px; background: var(--block); }
.lp-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); font-size: 1.25rem; margin-bottom: 12px; }
.lp-who { padding: 18px 20px; border-radius: var(--radius); background: var(--rose-soft); }
.lp-langs { display: grid; gap: 12px; }
.lp-lang { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.lp-lang .badge { justify-self: start; }
.lp-faq { display: grid; gap: 10px; max-width: 760px; }
.lp-faq details { padding: 16px 20px; border-radius: 22px; background: var(--block); }
.lp-faq summary { cursor: pointer; font-weight: 600; }
.lp-faq details p { margin-top: 8px; }
.lp-cta { text-align: center; padding: 40px 20px; border-radius: 28px; background: var(--rose-soft); display: grid; gap: 12px; justify-items: center; }
.lp-cta h2 { margin: 0; }
@media (max-width: 600px) {
  .lp { gap: 48px; padding-inline: 16px; }
  .lp-lang { grid-template-columns: 1fr; gap: 8px; }
}

/* Toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .toasts { left: 16px; bottom: 96px; } }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); font-size: .92rem; font-weight: 520; animation: rise .25s ease; max-width: 420px; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Sheet (mobile "more" menu) and modal */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 50; animation: fade .2s; }
.sheet { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 51; background: var(--bg-elev); border-radius: 22px; padding: 10px; box-shadow: var(--shadow-2); animation: rise .25s ease; }
.sheet .nav-link { padding: 14px; }
@keyframes fade { from { opacity: 0; } }
dialog.ask { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: 28px;
  background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-2); animation: rise .2s ease; }
dialog.ask::backdrop { background: rgb(0 0 0 / .45); animation: fade .2s; }
dialog.ask p { line-height: 1.5; color: var(--ink-2); }
.ask-actions { justify-content: flex-end; gap: 8px; margin-top: 6px; }

.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--bg-sunk), var(--line), var(--bg-sunk)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; gap: 12px; padding: 48px 16px; color: var(--ink-3); text-align: center; }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty .emoji-tile { margin: 0 auto 12px; }

details.disclosure { border: 0; border-radius: 22px; background: var(--block); }
details.disclosure > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: "▾"; margin-left: auto; color: var(--ink-3); transition: transform .2s; }
details.disclosure[open] > summary::after { transform: rotate(180deg); }
details.disclosure > .body { padding: 0 16px 16px; }
/* A scene's phrases: the vanilla panel of the design. */
details.disclosure.phrases { background: var(--gold-soft); }

table.simple { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.simple th, table.simple td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple th { font-size: .82rem; color: var(--ink-3); font-weight: 650; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 700px) { .hide-sm { display: none; } }
.split { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .side { position: sticky; top: 20px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split > .side { position: static; } }
input[type=range], input[type=checkbox] { accent-color: var(--brand); }
button.list-item { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.divider { display: flex; align-items: center; gap: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Rhythm: 14-day calendar of the group (members × days) */
.rhythm-cal { max-width: 560px; display: grid; grid-template-columns: minmax(0, 72px) repeat(14, minmax(0, 1fr)); gap: 3px; align-items: center; }
.rhythm-cal .who { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 4px; }
.rhythm-cal .dh { font-size: .62rem; text-align: center; color: var(--ink-3); }
.rhythm-cal .dh.mon { font-weight: 700; }
.rhythm-cal i { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--bg-sunk); }
.rhythm-cal i.met { background: var(--solid); }
.rhythm-cal i.frozen { background: color-mix(in srgb, var(--info) 55%, var(--bg-sunk)); }
.rhythm-cal i.missed { background: color-mix(in srgb, var(--rose) 45%, var(--bg-sunk)); }
.rhythm-cal i.pending { background: transparent; border: 2px dashed var(--line-strong, var(--line)); }
.rhythm-cal i.out { background: transparent; }
.rhythm-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.rhythm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rhythm-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

[hidden] { display: none !important; }

/* Home: the group comes first. Seats around the shared fire, each ring is that person's minimum today. */
.hero-group { padding-right: clamp(22px, 4vw, 40px); }
.hero-fire { position: absolute; top: clamp(18px, 3vw, 28px); right: clamp(18px, 3vw, 28px); display: grid; justify-items: center; color: #fff; text-align: center; line-height: 1.05; }
.hero-fire .ico { width: 30px; height: 30px; color: var(--gold); }
.hero-fire b { font: 800 2.4rem/1 var(--font-display); margin-top: 2px; }
.hero-fire span { font-size: .72rem; opacity: .85; }
.hero-group h1, .hero-group > .eyebrow, .hero-group > p { padding-right: 84px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 16px; }
.seats { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.hero-row.solo { flex-wrap: nowrap; }
.hero-row.solo .hero-actions { flex: 1; min-width: 0; }
/* Next steps can be long (a grammar topic, a writing prompt): they wrap, and stack on a phone. */
.hero-actions { min-width: 0; max-width: 100%; }
.hero-actions .btn { white-space: normal; text-align: left; max-width: 100%; }
@media (max-width: 560px) { .hero-actions { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; } .hero-actions .btn { justify-content: flex-start; padding-inline: 14px; } }
.seat { display: grid; justify-items: center; align-content: start; gap: 2px; color: #fff; text-decoration: none; min-width: 64px; }
.seat b { font-size: .9rem; }
.seat-who { display: grid; justify-items: center; align-content: start; gap: 2px; color: inherit; text-decoration: none; }
.seat-who > span:last-child { font-size: .72rem; opacity: .85; }
.seat-nudge { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 10px 3px 7px; border: 0; border-radius: 999px; background: #fff; color: var(--solid); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.seat-nudge .pict { width: 16px; height: 16px; }
.seat-nudge:hover { background: var(--rose); color: #16161d; }
.seat-nudge:disabled { background: rgb(255 255 255 / .2); color: #fff; cursor: default; padding-left: 10px; }
.nudge-note { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: rgb(255 255 255 / .16); max-width: 60ch; }
.nudge-note .pict { width: 30px; height: 30px; flex: none; }
.seat-ring { position: relative; padding: 4px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgb(255 255 255 / .22) 0); }
.seat.met .seat-ring { background: var(--gold); }
.seat.frozen .seat-ring { background: rgb(255 255 255 / .55); }
.seat-ring .avatar { border: 3px solid var(--solid); }
.seat-ok { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; border: 2px solid var(--solid); }
.seat-ok .ico { width: 13px; height: 13px; }
.week-card { color: inherit; text-decoration: none; }
.week-rows { display: grid; grid-template-columns: minmax(0, max-content) 1fr auto; gap: 8px 12px; align-items: center; }
.week-dots { display: flex; gap: 5px; }
.week-dots i { flex: 1; max-width: 34px; height: 10px; border-radius: 5px; background: var(--bg-sunk); }
.week-dots i.on { background: var(--solid); }

/* Pictograms (picts.js): line in the text colour over an off-register patch of colour. */
.pict { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; color: var(--ink); overflow: visible; }
.pict-a { fill: var(--pa)}
.pa-g { --pa: var(--pa-g); } .pa-b { --pa: var(--pa-b); } .pa-o { --pa: var(--pa-o); } .pa-i { --pa: var(--pa-i); }
.pict-txt { font: 700 6.4px/1 var(--font); fill: currentColor; stroke: none; letter-spacing: .02em; }
.emoji-tile .pict { width: 62%; height: 62%; }
.avatar .pict { width: 70%; height: 70%; }
.choice .big .pict { width: 1.5em; height: 1.5em; }
.hero .pict { color: #fff; }
.hero-deco .pict { color: rgb(255 255 255 / .1); }
.hero-deco .pict-a { fill: rgb(255 255 255 / .05); }
.hero-fire .pict { width: 34px; height: 34px; color: #fff; }
.lp-ico .pict { width: 26px; height: 26px; }
/* Line icons (ui.js icon) where the pictograms used to be: inline in text, and in the same tiles. */
.ico.in { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.emoji-tile > .ico { width: 50%; height: 50%; color: var(--brand); }
.avatar > .ico { width: 58%; height: 58%; }
.choice .big .ico { width: 1.3em; height: 1.3em; color: var(--brand); }
.hero-deco .ico { width: 1em; height: 1em; color: rgb(255 255 255 / .12); }
.lp-ico .ico { width: 24px; height: 24px; }
.band-stat .ico { width: 18px; height: 18px; }
.seat-nudge .ico { width: 16px; height: 16px; }
.nudge-line .ico { width: 24px; height: 24px; flex: none; }
.sn-tile .ico { width: 55%; height: 55%; }
/* "Skąd biorą się punkty?" next to the daily minimum. */
.points-help { font-size: .82rem; color: var(--ink-2); }
.points-help summary { cursor: pointer; color: var(--brand); font-weight: 600; width: fit-content; }
.points-help p { margin: 8px 0; max-width: 72ch; }
.points-help ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 20px; max-width: 760px; }
.points-help li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.points-help li b { white-space: nowrap; color: var(--ink); }

.flash-deck { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash-deck .pict { width: 18px; height: 18px; }

/* "Teraz" / "Dalej": the suggested next step */
.next-step { gap: 16px; flex-wrap: nowrap; background: var(--solid); color: #fff; }
.next-step .eyebrow, .next-step .muted { color: rgb(255 255 255 / .85); }
a.next-step:hover { background: color-mix(in srgb, var(--solid) 86%, #000); }
.next-step .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.next-step .eyebrow { margin: 0; }
.next-step b { font-size: 1.1rem; }
.next-alt { gap: 8px 12px; justify-content: space-between; padding: 0 4px; }
.next-alt .select { width: auto; max-width: 220px; }

/* Grammar (views/grammar-topic.js) */
.rule summary { cursor: pointer; list-style: none; display: flex; gap: 6px; align-items: baseline; }
.rule summary::-webkit-details-marker { display: none; }
.rule summary::before { content: '▸'; color: var(--ink-3); transition: transform .15s; }
.rule[open] summary::before { transform: rotate(90deg); }
.rule[open] { display: grid; gap: 10px; }
.conj-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.conj { padding: 10px 12px; border-radius: 12px; background: var(--bg-sunk); }
.conj table { border-collapse: collapse; margin-top: 4px; width: 100%; }
.conj td { padding: 2px 8px 2px 0; vertical-align: baseline; }
.conj td:first-child { font-size: .75rem; width: 1%; white-space: nowrap; }
.ex-sentence { font-size: 1.35rem; line-height: 1.7; }
.ex-sentence .speak { vertical-align: middle; margin-left: 6px; }
.ex-sentence .gap { display: inline-block; margin: 0 4px; min-width: 3.5em; padding: 0 6px; border-bottom: 2px solid var(--brand); font-weight: 650; text-align: center; }
.ex-sentence .gap.ok { color: var(--ok); border-color: var(--ok); }
.ex-sentence .gap.bad { color: var(--miss); border-color: var(--miss); border-bottom-style: dashed; }
.feedback { padding: 16px 18px; border-radius: 24px; display: grid; gap: 4px; }
.feedback.ok { background: var(--ok-soft); }
.feedback.ok b { color: var(--ink); }
.feedback.bad { background: var(--bad-soft); }
.feedback.bad b { color: var(--ink); }
.feedback.gold { background: var(--gold-soft); }

/* Letters with accents under a field (ui.js letters) */
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--ink); font: inherit; font-size: 1.05rem; cursor: pointer; }
.letters button:hover { border-color: var(--line-strong); background: var(--bg-sunk); }
.letters button:active { transform: scale(.94); }
.word-card .letters { justify-content: center; }

/* ---------- Dziś: the day's plan (views/home.js), as the K2 board ---------- */
/* Sky band with the group's faces, a petrol "Teraz" block, plain step rows, the group in rose. */
.today-band { background: var(--sky); color: var(--ink); border-radius: 28px; padding: 22px 22px 20px; display: grid; gap: 12px; }
.today-band h1 { margin: 0; color: var(--ink); font-size: clamp(1.9rem, 6vw, 2.4rem); }
.band-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.band-faces { display: flex; text-decoration: none; }
.band-faces:hover { text-decoration: none; }
.band-face + .band-face { margin-left: -10px; }
.band-face .avatar { border: 3px solid var(--sky); box-sizing: border-box; }
.band-face.pending .avatar { background: var(--sky); color: var(--ink); border: 3px dashed var(--ink); }
.band-face .band-more { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: .7rem; letter-spacing: 1px; }
.band-stats { display: flex; gap: 6px; }
.band-stat { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--ink); font-variant-numeric: tabular-nums; font-size: .9rem; text-decoration: none; }
.band-stat:hover { text-decoration: none; background: var(--bg); }
.band-stat .pict { width: 18px; height: 18px; color: var(--ink); }
.band-stat span { opacity: .75; }
.band-line { font-size: .95rem; }
/* The band in the colour of the learner's stage (the path's palette), with white text. */
.today-band.staged { color: #fff; background: radial-gradient(circle at 92% 0%, rgb(255 255 255 / .12), transparent 45%),
  radial-gradient(circle at 0% 100%, rgb(255 217 138 / .25), transparent 50%), var(--sc); }
.today-band.staged h1 { color: #fff; }
.today-band.staged .band-stat { background: rgb(255 255 255 / .18); color: #fff; }
.today-band.staged .band-stat:hover { background: rgb(255 255 255 / .3); }
.today-band.staged .band-stat .pict { color: #fff; }
.band-line b { font-weight: 600; }
@media (max-width: 900px) {
  .today-band { margin: -16px -16px 0; border-radius: 0 0 28px 28px; padding: 18px 20px 22px; }
}
.now-block { background: var(--solid); color: #fff; border-radius: 24px; padding: 20px; display: grid; gap: 12px; }
.now-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.now-head { display: grid; gap: 4px; min-width: 0; }
.now-label { font-size: .875rem; font-weight: 600; }
.now-head b { font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.now-pts { flex: none; background: var(--gold-soft); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: .875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.now-why { font-size: .95rem; color: rgb(255 255 255 / .9); }
.now-btn.btn { background: #fff; color: #16161d; border-color: #fff; font-weight: 800; }
.now-btn.btn:hover { background: var(--sky); border-color: var(--sky); }
.plan-steps { display: grid; }
.plan-step { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.plan-step:first-child { border-top: 0; }
.plan-step:hover { text-decoration: none; }
.plan-step:hover b { text-decoration: underline; }
.plan-step .grow { display: grid; gap: 1px; }
.plan-step b { font-size: 1rem; font-weight: 600; }
.plan-dot { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.plan-dot .ico { width: 24px; height: 24px; }
.plan-dot.done { background: var(--solid); color: #fff; }
.plan-step.later { color: var(--ink-3); }
.plan-step.later b { color: var(--ink-3); }
.plan-step.later:hover b { text-decoration: none; }
.plan-step.later .plan-dot { opacity: .55; }
.plan-step.later .grow a { justify-self: start; margin-top: 2px; font-weight: 600; }
.plan-pts { font-size: .875rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.today-points { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.today-points .bar.ok > i { background: var(--solid); }
.btn.block { width: 100%; justify-content: center; white-space: normal; text-align: center; }
.intro-loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.intro-loop > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.intro-loop > div > span:last-child { display: grid; gap: 2px; }
.group-mini { background: var(--rose-soft); color: var(--ink); border-radius: 24px; padding: 18px 20px; }
.group-mini > .row a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.group-mini .seats { gap: 12px 16px; }
.group-mini .seat, .group-mini .seat-who { color: var(--ink); text-decoration: none; }
.group-mini .seat-who > span:last-child { color: var(--ink-2); opacity: 1; }
.group-mini .seat-ring { background: conic-gradient(var(--solid) calc(var(--p) * 1%), color-mix(in srgb, var(--bg) 70%, transparent) 0); }
.group-mini .seat.met .seat-ring { background: var(--solid); }
.group-mini .seat.frozen .seat-ring { background: var(--sky); }
.group-mini .seat-ring .avatar { border-color: var(--rose-soft); }
.group-mini .seat-ok { background: var(--solid); color: #fff; border-color: var(--rose-soft); }
.group-mini .seat-nudge { background: var(--rose); color: #16161d; }
.group-mini .seat-nudge:hover { background: var(--ink); color: var(--bg); }
.group-mini .seat-nudge:disabled { background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--ink-2); }
.nudge-line { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; background: color-mix(in srgb, var(--bg) 60%, transparent); font-size: .9rem; }
.nudge-line .pict { width: 26px; height: 26px; flex: none; }
.next-step .ico-bubble { background: rgb(255 255 255 / .16); color: #fff; }

/* Ćwicz (views/tools.js) */
.tool-card { display: flex; gap: 14px; align-items: flex-start; color: inherit; text-decoration: none; }
.tool-card:hover { text-decoration: none; }
.tool-card .grow { display: grid; gap: 4px; min-width: 0; }

/* A lesson's parts, after an activity and on the path (next.js lessonChips, progressCard) */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--bg-sunk); color: var(--ink-2); }
.chip .ico { width: 13px; height: 13px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.cur { background: var(--brand-soft); color: var(--brand-strong); }
.progress-row { display: grid; gap: 6px; }
.ok-text { color: var(--ok); font-weight: 600; }
.lesson-item.now { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); border-radius: 12px; margin-inline: -8px; padding-inline: 8px; }

/* A lesson's check (views/check.js) */

.check-text { padding: 10px 12px; border-radius: 12px; background: var(--bg-sunk); }
.check-options { display: grid; gap: 8px; }
.check-opt { text-align: left; padding: 12px 16px; border-radius: 22px; border: 2px solid var(--line); background: var(--bg-elev); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.check-opt:hover:not(:disabled) { border-color: var(--brand); }
.check-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.check-opt.right { border-color: var(--solid); background: var(--solid); color: #fff; }
.check-opt.wrong { border-color: var(--ink); border-style: dashed; background: var(--bg-elev); }
.check-opt:disabled { cursor: default; }

/* Ścieżka: the stage on top, then its lessons as a trail of dots, the stage test last. */
.path-page { gap: 18px; }
.stage-head { --sc: var(--solid); background: var(--sc); color: #fff; border-radius: 24px; padding: 18px 20px; display: grid; gap: 10px; }
.stage-head b { font-size: 1rem; }
.stage-head small { font-size: .8rem; opacity: .92; }
.stage-head .bar { background: rgb(255 255 255 / .3); }
.stage-head .bar > i { background: #fff; }
.trail { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: relative; }
.trail-node { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; padding: 6px 0; position: relative; }
.trail-node:nth-child(even) .trail-dot { transform: translateX(22px); }
.trail-node:nth-child(even) .trail-body { padding-left: 22px; }
.trail-dot { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 800 1.05rem/1 var(--font);
  background: var(--bg); color: var(--ink-2); border: 2px dashed var(--ink-3); cursor: pointer; padding: 0; text-decoration: none; }
.trail-dot .ico { width: 22px; height: 22px; }
.trail-node.done .trail-dot { background: var(--solid); color: #fff; border: 0; }
.trail-node.cur .trail-dot { background: var(--solid); color: #fff; border: 0; outline: 4px solid var(--sky); }
.trail-dot.flag { background: var(--gold-soft); color: var(--ink); border: 0; }
.trail-body { display: grid; gap: 5px; padding-top: 6px; min-width: 0; }
.trail-title { all: unset; cursor: pointer; font-weight: 600; line-height: 1.35; color: var(--ink); }
.trail-title:focus-visible, .trail-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.trail-node.cur .trail-title { color: var(--brand-strong); }
.trail-body .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.trail-open { display: grid; gap: 10px; padding: 16px; background: var(--block); border-radius: 22px; }
/* The path as stepping stones: every module a stone (its icon), joined by one dotted winding line; the goals beside it. */
.stream { position: relative; }
.stream-bed { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stream-bed .hops { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 9; }
.stream-rows { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.plesson { padding: 20px 0 6px; }
.stream-rows > .plesson:first-child { padding-top: 6px; }
/* Full width, the dotted line runs on underneath: the same tint as a block, a little see-through. */
.plesson-text { display: grid; gap: 8px; background: color-mix(in srgb, var(--block) 84%, transparent); border-radius: 18px; padding: 10px 14px 12px; }
/* The module's name on each stone's row, as a tag in the module's colours (the same as its icon, see .ico-bubble). */
.mod-tag { justify-self: start; font: 750 .68rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); }
.mod-tag.info { background: var(--info-soft); color: var(--info); }
.mod-tag.violet { background: var(--violet-soft); color: var(--violet); }
.mod-tag.gold { background: var(--gold-soft); color: var(--gold); }
.mod-tag.rose { background: var(--rose-soft); color: var(--rose-ink); }
.mod-tag.orange { background: var(--orange-soft); color: var(--orange); }
.mod-tag.teal { background: var(--teal-soft); color: var(--teal); }
.mod-tag.plum { background: var(--plum-soft); color: var(--plum); }
.mod-tag.olive { background: var(--olive-soft); color: var(--olive); }
.plesson-head { all: unset; cursor: pointer; display: grid; gap: 4px; padding: 4px 2px; }
.plesson-head b { font-weight: 500; line-height: 1.4; color: var(--ink); }
.plesson-head:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.plesson.now .pstep-kind { color: var(--brand); }
.pstep-kind { font: 700 .7rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.pstep a { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px 0; color: inherit; text-decoration: none; position: relative;
  width: min(100%, 420px); margin-inline: auto; }
.pstep a:hover b { text-decoration: underline; }
.pstep .pstep-pic { margin-left: var(--x, 0); box-shadow: 0 0 0 4px var(--bg); }
.pstep-pic { width: 52px; height: 52px; position: relative; }
.pstep-pic > .ico { width: 24px; height: 24px; }
.pstep-tick { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--solid); color: #fff;
  display: grid; place-items: center; border: 2px solid var(--bg); }
.pstep-tick .ico { width: 13px; height: 13px; }
.pstep.done .pstep-body b { color: var(--ink-2); }
.pstep.cur .pstep-pic { outline: 3px solid var(--solid); outline-offset: 3px; }
.pstep.cur .pstep-body b { color: var(--ink); }
.pstep-body { display: grid; gap: 3px; min-width: 0; }
.pstep-body b { font-weight: 600; line-height: 1.3; }
.pstep-body small { color: var(--ink-3); font-size: .8rem; }
/* Ćwicz: groups of rows instead of tiles. */
.tool-group { font: 650 .85rem/1.2 var(--font); color: var(--ink-3); margin: 0; }
.tool-group + .card.list { padding: 2px 14px; }
.tool-row { color: inherit; text-decoration: none; padding: 12px 0; gap: 14px; }
.tool-row:hover { text-decoration: none; }
.tool-row .grow { display: grid; gap: 2px; }
.tool-row > .ico { color: var(--ink-3); flex: none; }
/* The same size as the stones on Ścieżka (.pstep-pic). */
.tool-row .ico-bubble, .ico-bubble.lg { width: 52px; height: 52px; }
.tool-row .ico-bubble > .ico, .ico-bubble.lg > .ico { width: 24px; height: 24px; }
