/* =========================================================
   Inglis – stil vesel, colorat, cu butoane „3D” și animații
   ========================================================= */

:root {
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #EEF1F8;
  --ink: #12172E;
  --ink-2: #4A5274;
  --ink-3: #858DAA;
  --line: #E1E5F0;
  --line-2: #D3D9E8;
  --primary: #3B5BFF;
  --primary-d: #2840C9;
  --primary-soft: #E6EBFF;
  --on-primary: #FFFFFF;
  --violet: #7B4DFF;
  --good: #12A863;
  --good-d: #0A8048;
  --good-soft: #E1F7EC;
  --bad: #EE3A4F;
  --bad-d: #BE2238;
  --bad-soft: #FFE7EA;
  --fire: #FF8A1F;
  --gold: #FFB020;
  --gold-soft: #FFF3D6;
  --shadow: 0 1px 2px rgba(18, 23, 46, .05), 0 12px 28px -16px rgba(18, 23, 46, .25);
  --r-xl: 26px;
  --r-lg: 20px;
  --r: 16px;
  --r-sm: 12px;
  --display: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --tabbar-h: 66px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1020;
    --surface: #151A2E;
    --surface-2: #1C2240;
    --ink: #EEF1FA;
    --ink-2: #B3BAD6;
    --ink-3: #7880A2;
    --line: #262D4B;
    --line-2: #313A5E;
    --primary: #5470FF;
    --primary-d: #3247C2;
    --primary-soft: rgba(84, 112, 255, .17);
    --good: #22C27A;
    --good-d: #11864F;
    --good-soft: rgba(34, 194, 122, .14);
    --bad: #FF5468;
    --bad-d: #C42840;
    --bad-soft: rgba(255, 84, 104, .14);
    --gold-soft: rgba(255, 176, 32, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 30px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1020;
  --surface: #151A2E;
  --surface-2: #1C2240;
  --ink: #EEF1FA;
  --ink-2: #B3BAD6;
  --ink-3: #7880A2;
  --line: #262D4B;
  --line-2: #313A5E;
  --primary: #5470FF;
  --primary-d: #3247C2;
  --primary-soft: rgba(84, 112, 255, .17);
  --good: #22C27A;
  --good-d: #11864F;
  --good-soft: rgba(34, 194, 122, .14);
  --bad: #FF5468;
  --bad-d: #C42840;
  --bad-soft: rgba(255, 84, 104, .14);
  --gold-soft: rgba(255, 176, 32, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 30px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- bază ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.025em; font-weight: 800; }
h1 { font-size: clamp(30px, 7vw, 44px); letter-spacing: -0.04em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; font-weight: 750; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }

.wrap { max-width: 800px; margin: 0 auto; padding: 20px 16px 48px; outline: none; transition: padding-bottom .25s var(--ease); }

/* intrarea în pagină: blocurile urcă pe rând */
.enter > * { animation: rise .5s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .05s; }
.enter > *:nth-child(3) { animation-delay: .1s; }
.enter > *:nth-child(4) { animation-delay: .15s; }
.enter > *:nth-child(5) { animation-delay: .2s; }
.enter > *:nth-child(6) { animation-delay: .25s; }
.enter > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- bara de sus ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1000px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: -0.045em; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 19px; color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--violet));
  box-shadow: 0 3px 0 var(--primary-d);
  transition: transform .4s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.topnav { display: none; position: relative; margin-left: 18px; gap: 4px; }
.topnav a { position: relative; z-index: 1; color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: 15px; padding: 8px 14px; border-radius: 999px; transition: background-color .15s, color .25s; }
.topnav a:hover { color: var(--ink); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.topnav a.active { color: var(--primary); }
.topnav a.active:hover { background: transparent; }
.nav-ind { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--primary-soft); opacity: 0; transition: transform .55s var(--spring), width .45s var(--ease), opacity .2s; }
.top-xp {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 750; font-size: 14px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 60%, var(--ink));
  font-variant-numeric: tabular-nums;
}
.top-xp svg { width: 16px; height: 16px; fill: var(--gold); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink-2);
  transition: transform .3s var(--spring);
}
.icon-btn:hover { transform: rotate(18deg); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- bara de jos (telefon) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { position: relative; z-index: 1; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-decoration: none; }
.tabbar svg { width: 48px; height: 30px; padding: 4px 13px; border-radius: 999px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: background-color .2s, transform .35s var(--spring); }
.tabbar a.active { color: var(--primary); }
.tabbar a.active svg { transform: translateY(-1px) scale(1.08); }
.tab-ind { position: absolute; left: 0; top: 0; width: 48px; height: 30px; border-radius: 999px; background: var(--primary-soft); opacity: 0; transition: transform .55s var(--spring), opacity .2s; }
.tab-ind.still { transition: none; }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .wrap { padding-top: 32px; }
}

/* ---------- butoane 3D ---------- */
.btn {
  --b: var(--surface); --bd: var(--line-2); --fg: var(--ink);
  position: relative;
  min-height: 52px; padding: 0 24px;
  border-radius: 14px; border: 0;
  background: var(--b); color: var(--fg);
  box-shadow: 0 4px 0 var(--bd);
  font-weight: 800; font-size: 16px; letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  transform: translateY(0);
  transition: transform .08s, box-shadow .08s, filter .15s;
  -webkit-user-select: none; user-select: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bd); }
.btn-primary { --b: var(--primary); --bd: var(--primary-d); --fg: var(--on-primary); }
.btn-good { --b: var(--good); --bd: var(--good-d); --fg: #fff; }
.btn-bad { --b: var(--bad); --bd: var(--bad-d); --fg: #fff; }
.btn-ghost { --b: var(--surface); --bd: var(--line-2); --fg: var(--ink); border: 2px solid var(--line-2); }
.btn-white { --b: #fff; --bd: rgba(0, 0, 0, .22); --fg: #1C2550; }
.btn-danger { --b: var(--surface); --bd: color-mix(in srgb, var(--bad) 55%, var(--line)); --fg: var(--bad); border: 2px solid color-mix(in srgb, var(--bad) 55%, var(--line)); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn[disabled]:active { transform: none; box-shadow: 0 4px 0 var(--bd); }
.link { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 700; font-size: 15px; text-decoration: none; background: none; border: 0; padding: 6px 0; }
.back:hover { color: var(--ink); }
.x-btn {
  width: 42px; height: 42px; flex: none;
  border-radius: 999px; border: 0;
  background: var(--surface-2); color: var(--ink-2);
  display: grid; place-items: center;
  font-size: 0; text-decoration: none;
  transition: transform .25s var(--spring), background-color .15s;
}
.x-btn:hover { transform: rotate(90deg); background: var(--line); }
.x-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- insigna capitolului ---------- */
.tb {
  --tc: var(--primary);
  flex: none;
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  background: var(--tc);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 65%, #000), inset 0 -10px 18px -10px rgba(0, 0, 0, .25);
  position: relative;
  overflow: hidden;
}
.tb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .28), transparent 50%); }
.tb.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; box-shadow: 0 3px 0 color-mix(in srgb, var(--tc) 65%, #000); }
.tb.lg { width: 76px; height: 76px; border-radius: 22px; font-size: 22px; }
.tb.long { font-size: 12.5px; }
.tb.lg.long { font-size: 17px; }
.tb.sm.long { font-size: 10.5px; letter-spacing: -0.04em; }
.tb { white-space: nowrap; }
.tb svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }

/* ---------- plăcuțe (capitole) ---------- */
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .tgrid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  --tc: var(--primary);
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px 14px 15px;
  text-align: left;
  border-radius: var(--r-lg);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .2s var(--spring), border-color .15s, background-color .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tc) 40%, var(--line)); }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.tile .tn { font-family: var(--display); font-weight: 750; font-size: 15.5px; line-height: 1.2; letter-spacing: -0.015em; }
.tile .td { font-size: 13px; color: var(--ink-3); line-height: 1.35; margin-top: -6px; }
.tile .tick {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--tc); color: #fff;
  transform: scale(0); transition: transform .3s var(--spring);
}
.tile .tick svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.tile[aria-pressed="true"] { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, var(--surface)); box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 55%, var(--line)); }
.tile[aria-pressed="true"] .tick { transform: scale(1); }
.tile.all { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; }
.tile.all .td { margin-top: 2px; }
.tile .meter { width: 100%; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: auto; }
.tile .meter i { display: block; height: 100%; border-radius: 999px; background: var(--tc); transform-origin: left; animation: growx .9s .2s var(--ease) both; }
.tile .mtxt { font-size: 12.5px; color: var(--ink-3); font-weight: 650; margin-top: -4px; }

/* ---------- chips ---------- */
.field { margin-top: 26px; }
.field > .label { display: block; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 0 15px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
  color: var(--ink-2);
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .2s var(--spring), background-color .15s, border-color .15s, color .15s;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.chip[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); box-shadow: 0 3px 0 color-mix(in srgb, var(--primary) 45%, var(--line)); }
.chip .n { font-size: 12px; font-weight: 750; opacity: .75; }

.switch {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
  cursor: pointer;
}
.switch input { appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .3s var(--spring); }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(20px); }
.switch b { font-weight: 750; }
.switch small { display: block; color: var(--ink-3); font-size: 14px; }

.cta-bar {
  position: sticky;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  margin-top: 28px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 5;
}
@media (min-width: 860px) { .cta-bar { bottom: 16px; } }
.avail { color: var(--ink-2); font-size: 14.5px; text-align: center; }
.avail b { color: var(--ink); }
.warn-text { color: var(--bad); font-weight: 650; }

.seg-ctl { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface-2); margin-bottom: 20px; }
.seg-ctl a { padding: 9px 18px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 750; font-size: 15px; transition: background-color .2s, color .2s; }
.seg-ctl a.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--line-2); }

.page-head { margin-bottom: 18px; }
.page-head p { color: var(--ink-2); margin-top: 8px; max-width: 60ch; font-size: 16.5px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.sec-head h2 { font-size: 20px; }
.sec-head span, .sec-head a { font-size: 14px; color: var(--ink-3); font-weight: 650; }
.sec-head a { color: var(--primary); text-decoration: none; }

/* ---------- întrebarea ---------- */
.qcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px 18px 22px;
  box-shadow: var(--shadow);
}
@media (min-width: 600px) { .qcard { padding: 28px 30px 30px; } }
.q-in { animation: qin .45s var(--ease) both; }
.q-out { animation: qout .18s ease-in both; }
@keyframes qin { from { opacity: 0; transform: translateX(28px) scale(.98); } }
@keyframes qout { to { opacity: 0; transform: translateX(-28px) scale(.98); } }

.q-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { --tc: var(--primary); font-size: 13px; font-weight: 750; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 13%, transparent); color: color-mix(in srgb, var(--tc) 85%, var(--ink)); }
.tag-k { background: var(--surface-2); color: var(--ink-2); }
.q-instr { color: var(--ink-2); font-size: 15px; margin-bottom: 8px; font-weight: 550; }
.q-instr b { color: var(--ink); }
.q-text { font-family: var(--display); font-size: clamp(20px, 5vw, 25px); font-weight: 650; line-height: 1.42; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.blank { display: inline-block; min-width: 3.4em; height: 1.05em; vertical-align: -0.14em; margin: 0 .12em; border-radius: 8px; background: var(--primary-soft); border-bottom: 3px solid var(--primary); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { border-bottom-color: color-mix(in srgb, var(--primary) 35%, transparent); } }

.opts { display: grid; gap: 10px; margin-top: 20px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px;
  padding: 10px 14px;
  text-align: left;
  font-size: 17px; font-weight: 650;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 4px 0 var(--line);
  transition: transform .1s, box-shadow .1s, border-color .15s, background-color .15s, opacity .3s;
}
.opt:hover:not(:disabled) { border-color: var(--line-2); background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.opt .key { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--ink-3); border: 2px solid var(--line); transition: background-color .15s, color .15s, border-color .15s; }
.opt:disabled { cursor: default; }
.opt.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 4px 0 color-mix(in srgb, var(--primary) 55%, var(--line)); }
.opt.is-selected .key { background: var(--primary); border-color: var(--primary); color: #fff; }
.opt.is-right { border-color: var(--good); background: var(--good-soft); box-shadow: 0 4px 0 var(--good-d); animation: pop .45s var(--spring); }
.opt.is-right .key { background: var(--good); border-color: var(--good); color: #fff; }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); box-shadow: 0 4px 0 var(--bad-d); animation: shake .4s; }
.opt.is-wrong .txt { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--bad); }
.opt.is-wrong .key { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.is-dim { opacity: .45; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.seg-line { line-height: 2.55; margin-top: 4px; }
.seg {
  display: inline; font: inherit; font-weight: 650;
  padding: 4px 5px 2px; margin: 0 1px;
  border: 0; border-bottom: 3px solid var(--line-2);
  border-radius: 8px 8px 2px 2px;
  background: var(--surface-2);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-color .15s, border-color .15s;
}
.seg:hover:not(:disabled) { background: var(--primary-soft); border-bottom-color: var(--primary); }
.seg sup { font-family: var(--font); font-size: 11.5px; font-weight: 800; color: var(--ink-3); margin-left: 4px; vertical-align: .7em; line-height: 0; }
.seg:disabled { cursor: default; }
.seg.is-selected { background: var(--primary-soft); border-bottom-color: var(--primary); }
.seg.is-error { background: var(--bad-soft); border-bottom-color: var(--bad); animation: shake .4s; }
.seg.is-error .st { text-decoration: line-through; text-decoration-thickness: 2.5px; text-decoration-color: var(--bad); }
.seg.is-picked { opacity: .6; }
.fix {
  display: inline-block;
  font-family: var(--display); font-weight: 750; font-size: .9em;
  color: var(--good-d);
  background: var(--good-soft);
  border-radius: 8px;
  padding: 0 8px;
  margin: 0 3px;
  line-height: 1.6;
  animation: pop .5s var(--spring);
}
:root[data-theme="dark"] .fix { color: var(--good); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fix { color: var(--good); } }

.type-form { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.tr-prefix { flex-basis: 100%; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); }
.tr-prefix::after { content: ' …'; color: var(--ink-3); }
.type-in {
  flex: 1 1 220px; min-width: 0; min-height: 56px;
  padding: 0 16px;
  font-size: 18px; font-weight: 600;
  border-radius: var(--r);
  border: 2px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.type-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.type-in.is-right { border-color: var(--good); background: var(--good-soft); animation: pop .45s var(--spring); }
.type-in.is-wrong { border-color: var(--bad); background: var(--bad-soft); text-decoration: line-through; text-decoration-color: var(--bad); animation: shake .4s; }
.type-form .btn { flex: 0 0 auto; }
@media (max-width: 440px) { .type-form .btn { flex: 1 1 100%; } }
.shake { animation: shake .4s; }

/* ---------- panoul de feedback (jos) ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  transform: translateY(110%);
  transition: transform .42s var(--ease);
  padding: 0 0 env(safe-area-inset-bottom);
  pointer-events: none;
}
.sheet.show { transform: translateY(0); pointer-events: auto; }
.sh-in {
  max-width: 800px; margin: 0 auto;
  padding: 18px 18px 18px;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  border-top: 4px solid var(--line);
  box-shadow: 0 -18px 40px -18px rgba(0, 0, 0, .35);
  max-height: 72vh;
  display: flex; flex-direction: column;
}
@media (min-width: 860px) { .sheet { bottom: 16px; } .sh-in { border-radius: 26px; border: 1px solid var(--line); border-top-width: 4px; } }
.sheet.ok .sh-in { border-top-color: var(--good); background: linear-gradient(var(--good-soft), var(--good-soft)), var(--surface); }
.sheet.no .sh-in { border-top-color: var(--bad); background: linear-gradient(var(--bad-soft), var(--bad-soft)), var(--surface); }
.sh-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sh-ico { width: 46px; height: 46px; flex: none; border-radius: 999px; display: grid; place-items: center; color: #fff; animation: popin .5s var(--spring) both; }
.sheet.ok .sh-ico { background: var(--good); box-shadow: 0 3px 0 var(--good-d); }
.sheet.no .sh-ico { background: var(--bad); box-shadow: 0 3px 0 var(--bad-d); }
.sh-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.sh-ico path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .4s .18s var(--ease) forwards; }
.sh-ico path + path { animation-delay: .32s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes popin { from { transform: scale(0) rotate(-30deg); } }
.sh-title { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; line-height: 1.1; }
.sheet.ok .sh-title { color: var(--good-d); }
.sheet.no .sh-title { color: var(--bad-d); }
:root[data-theme="dark"] .sheet.ok .sh-title { color: var(--good); }
:root[data-theme="dark"] .sheet.no .sh-title { color: var(--bad); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet.ok .sh-title { color: var(--good); } :root:not([data-theme="light"]) .sheet.no .sh-title { color: var(--bad); } }
.xp-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 13px; font-weight: 800; color: color-mix(in srgb, var(--gold) 55%, var(--ink)); background: var(--gold-soft); padding: 2px 9px; border-radius: 999px; animation: popin .5s .25s var(--spring) both; }
.xp-chip svg { width: 13px; height: 13px; fill: var(--gold); }
.sh-body { overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.sh-ans { font-size: 16px; margin-bottom: 6px; }
.sh-exp { color: var(--ink-2); font-size: 16px; }
.sh-exp b, .sh-ans b { color: var(--ink); }
.sh-actions { margin-top: 14px; display: grid; gap: 12px; }
.sh-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- sesiunea de exersare ---------- */
.run-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.run-head .grow { flex: 1; min-width: 0; }
.run-filter { color: var(--ink-3); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line);
  white-space: nowrap;
}
.stat-chip svg { width: 18px; height: 18px; }
.stat-chip.fire svg { fill: var(--line-2); transition: fill .3s; }
.stat-chip.fire.on { color: var(--fire); border-color: color-mix(in srgb, var(--fire) 40%, var(--line)); }
.stat-chip.fire.on svg { fill: var(--fire); animation: flicker 1.2s ease-in-out infinite; transform-origin: 50% 90%; }
.stat-chip.good { color: var(--good); }
.stat-chip.good svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes flicker { 50% { transform: scale(1.1) rotate(-4deg); } }
.run-foot { margin-top: 18px; display: flex; gap: 10px; }
.run-foot .btn { flex: 1; }
.empty-in { text-align: center; padding: 18px 4px; }
.empty-in h2 { margin-bottom: 8px; }
.empty-in p { color: var(--ink-2); margin: 0 auto 18px; max-width: 42ch; }

/* ---------- acasă ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  padding: 22px 20px 20px;
  color: #fff;
  background: linear-gradient(135deg, #3B5BFF 0%, #6A45F5 55%, #9B3FE0 100%);
  box-shadow: 0 6px 0 #2B2FA8, 0 20px 40px -20px rgba(59, 91, 255, .7);
}
.hero-deco i { position: absolute; border-radius: 999px; background: rgba(255, 255, 255, .12); animation: float 9s ease-in-out infinite; }
.hero-deco i:nth-child(1) { width: 180px; height: 180px; right: -50px; top: -70px; }
.hero-deco i:nth-child(2) { width: 90px; height: 90px; right: 90px; bottom: -40px; animation-delay: -3s; animation-duration: 11s; }
.hero-deco i:nth-child(3) { width: 56px; height: 56px; left: -18px; bottom: 30%; animation-delay: -6s; animation-duration: 7s; }
@keyframes float { 50% { transform: translate(-10px, 12px) scale(1.06); } }
.hero > *:not(.hero-deco) { position: relative; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hero-hi { font-weight: 700; font-size: 15px; opacity: .85; margin-bottom: 4px; }
.hero h1 { font-size: clamp(28px, 7.4vw, 40px); }
.hero-sub { margin-top: 8px; font-size: 15px; opacity: .88; max-width: 44ch; }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .rt { stroke: rgba(255, 255, 255, .22); }
.ring .rv { stroke: #FFD45A; stroke-linecap: round; animation: ring 1.2s .3s var(--ease) both; }
@keyframes ring { from { stroke-dashoffset: var(--c); } }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring-txt b { font-family: var(--display); font-size: 24px; font-weight: 800; }
.ring-txt small { font-size: 11.5px; font-weight: 700; opacity: .85; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hs { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 14px; font-weight: 700; }
.hs svg { width: 17px; height: 17px; }
.hs .fl { fill: #FFB547; }
.hs .st { fill: #FFD45A; }
.lvl { margin-top: 16px; }
.lvl-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FFD45A, #FFB020); transform-origin: left; animation: growx 1.1s .35s var(--ease) both; }
.lvl-txt { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; opacity: .9; margin-top: 6px; }
.hero .btn-white { margin-top: 18px; }
@keyframes growx { from { transform: scaleX(0); } }

.tiles3 { display: grid; gap: 12px; margin-top: 26px; }
@media (min-width: 640px) { .tiles3 { grid-template-columns: repeat(3, 1fr); } }
.mtile {
  --tc: var(--primary);
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .2s var(--spring), border-color .15s;
}
@media (min-width: 640px) { .mtile { flex-direction: column; align-items: flex-start; padding: 18px; } }
.mtile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tc) 45%, var(--line)); }
.mtile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.mtile h3 { font-size: 18px; }
.mtile p { color: var(--ink-3); font-size: 14px; line-height: 1.4; margin-top: 2px; }
.mtile .chev { margin-left: auto; color: var(--ink-3); transition: transform .2s; }
@media (min-width: 640px) { .mtile .chev { display: none; } }
.mtile:hover .chev { transform: translateX(3px); }
.mtile .chev svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .tile { flex: 0 0 150px; scroll-snap-align: start; }

/* ---------- teorie ---------- */
.ch-hero {
  --tc: var(--primary);
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  padding: 20px;
  background: color-mix(in srgb, var(--tc) 11%, var(--surface));
  border: 2px solid color-mix(in srgb, var(--tc) 25%, var(--line));
}
.ch-hero::after { content: ''; position: absolute; width: 200px; height: 200px; right: -70px; top: -90px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 14%, transparent); animation: float 10s ease-in-out infinite; }
.ch-hero > * { position: relative; z-index: 1; }
.ch-hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ch-hero .tb { animation: popin .6s .1s var(--spring) both; }
.ch-hero p { color: var(--ink-2); font-size: 16.5px; max-width: 62ch; }
.ch-hero .meta { margin-top: 10px; font-size: 14px; font-weight: 700; color: color-mix(in srgb, var(--tc) 75%, var(--ink)); }
.ch-nav {
  position: sticky; top: 60px; z-index: 10;
  margin: 14px -16px 0; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.ch-nav::-webkit-scrollbar { display: none; }
.ch-nav button { flex: none; white-space: nowrap; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 700; color: var(--ink-2); transition: border-color .15s, color .15s, background-color .15s; }
.ch-nav button:hover, .ch-nav button.on { color: color-mix(in srgb, var(--tc) 85%, var(--ink)); border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, var(--surface)); }
.th-sec { --tc: var(--primary); margin-top: 18px; scroll-margin-top: 130px; padding: 20px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.th-sec h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.th-sec h2::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--tc); flex: none; transform: rotate(45deg); }
.th-sec > p, .th-sec li { font-size: 16.5px; }
.th-sec > p { max-width: 68ch; }
.th-sec > p + * { margin-top: 10px; }
.formula {
  font-weight: 750; font-size: 16px; line-height: 1.6;
  padding: 11px 14px; margin: 0 0 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tc) 10%, var(--surface));
  border-left: 4px solid var(--tc);
  overflow-wrap: anywhere;
}
.uses { margin: 8px 0 10px; padding-left: 0; list-style: none; }
.uses li { margin: 6px 0; padding-left: 22px; position: relative; }
.uses li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 999px; background: var(--tc); }
.markers { font-size: 15.5px; color: var(--ink-2); margin: 10px 0; }
.markers b { color: var(--ink); }
.ex { margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 650; font-size: 16.5px; }
.ex p { color: color-mix(in srgb, var(--tc) 70%, var(--ink)); }
.ex p::before { content: '“ '; opacity: .5; }
.ex p + p { margin-top: 4px; }
.en { font-style: normal; font-weight: 650; color: color-mix(in srgb, var(--tc) 70%, var(--ink)); }
.obs { margin: 12px 0; padding: 12px 14px 13px; border-radius: 14px; background: var(--gold-soft); font-size: 16px; border: 1.5px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.obs-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: #8A5A00; background: color-mix(in srgb, var(--gold) 35%, transparent); padding: 1px 9px; border-radius: 999px; margin-right: 8px; }
:root[data-theme="dark"] .obs-tag { color: #FFD27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .obs-tag { color: #FFD27A; } }
.tbl-wrap { overflow-x: auto; margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.tbl th { text-align: left; background: color-mix(in srgb, var(--tc) 12%, var(--surface)); font-weight: 800; padding: 10px 12px; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.ch-actions { margin-top: 22px; padding: 22px 20px; border-radius: var(--r-xl); background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); text-align: center; }
.ch-actions h2 { margin-bottom: 4px; }
.ch-actions p { color: var(--ink-3); margin-bottom: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { flex: 1 1 200px; }
.ch-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 15px; }
.ch-pager a { text-decoration: none; font-weight: 750; }

/* ---------- test ---------- */
.t-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pbar { flex: 1; height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar span { display: block; height: 100%; min-width: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--good), #3FD98E); transition: width .45s var(--spring); position: relative; }
.pbar span::after { content: ''; position: absolute; left: 7px; right: 7px; top: 3px; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .35); }
.t-timer { font-variant-numeric: tabular-nums; }
.t-timer.low { color: var(--bad); border-color: var(--bad); animation: bump 1s infinite; }
.t-count { font-size: 14px; font-weight: 750; color: var(--ink-3); margin: 6px 0 12px; }
.t-foot { display: flex; gap: 10px; margin-top: 18px; }
.t-foot .btn { flex: 1; }
.t-pal { margin-top: 22px; }
.t-pal summary { cursor: pointer; font-weight: 750; color: var(--ink-2); padding: 6px 0; }
.pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin-top: 10px; }
.pal button { height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line); font-weight: 800; font-size: 14px; color: var(--ink-2); }
.pal button.done { background: var(--primary); border-color: var(--primary); box-shadow: 0 3px 0 var(--primary-d); color: #fff; }
.pal button.cur { outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: 1px; }
.t-finish { margin-top: 16px; }

.result-hero {
  position: relative; overflow: hidden;
  text-align: center;
  padding: 26px 20px 22px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 0 5px 0 var(--line);
}
.result-hero .score { position: relative; width: 170px; height: 170px; margin: 0 auto 10px; }
.result-hero .score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.result-hero .score circle { fill: none; stroke-width: 9; }
.result-hero .score .rt { stroke: var(--surface-2); }
.result-hero .score .rv { stroke: var(--sc, var(--good)); stroke-linecap: round; animation: ring 1.4s .2s var(--ease) both; }
.score-txt { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1; }
.score-txt b { font-family: var(--display); font-weight: 800; font-size: 48px; letter-spacing: -0.04em; color: var(--sc, var(--good)); }
.score-txt small { font-size: 13px; font-weight: 750; color: var(--ink-3); margin-top: 4px; }
.result-hero h1 { font-size: clamp(26px, 6vw, 34px); }
.result-hero p { color: var(--ink-2); margin-top: 6px; font-size: 16px; }
.result-hero .timeup { color: var(--bad); font-weight: 700; }

.block { margin-top: 28px; }
.block > h2 { margin-bottom: 12px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

.rev { border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rev + .rev { margin-top: 8px; }
.rev summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 30px 1fr 30px; gap: 10px; align-items: center; padding: 12px 14px; }
.rev summary::-webkit-details-marker { display: none; }
.rev .num { font-weight: 800; color: var(--ink-3); font-size: 14px; }
.rev .sum-q { font-size: 15.5px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rev .mark { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; color: #fff; }
.rev .mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.rev.ok .mark { background: var(--good); }
.rev.no .mark { background: var(--bad); }
.rev.no { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.rev-body { padding: 0 14px 14px 54px; font-size: 15.5px; }
.rev-body p + p { margin-top: 6px; }
.rev-body .lbl { color: var(--ink-3); font-weight: 600; }
.rev-body .yours-no { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 2px; }
.rev-body .exp { color: var(--ink-2); }
@media (max-width: 480px) { .rev-body { padding-left: 14px; } }

/* ---------- statistici ---------- */
.lvl-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #FF8A1F, #F5476B 60%, #B83EE0);
  box-shadow: 0 6px 0 #B3332E, 0 20px 40px -22px rgba(245, 71, 107, .8);
  display: flex; align-items: center; gap: 16px;
}
.lvl-card .hero-deco i { background: rgba(255, 255, 255, .13); }
.lvl-card > *:not(.hero-deco) { position: relative; }
.lvl-badge { width: 74px; height: 74px; flex: none; border-radius: 22px; display: grid; place-content: center; text-align: center; background: rgba(255, 255, 255, .2); line-height: 1; animation: popin .7s .15s var(--spring) both; }
.lvl-badge small { font-size: 11px; font-weight: 800; opacity: .9; }
.lvl-badge b { font-family: var(--display); font-size: 34px; font-weight: 800; }
.lvl-card .lvl { margin-top: 8px; flex: 1; }
.lvl-card h2 { font-size: 22px; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 4px 0 var(--line); }
.kpi-v { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.kpi-v svg { width: 24px; height: 24px; flex: none; }
.kpi-l { font-size: 13.5px; color: var(--ink-3); font-weight: 650; margin-top: 3px; }
.kpi .fl { fill: var(--fire); }
.kpi .ok { fill: none; stroke: var(--good); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.kpi .bo { fill: var(--gold); }
.kpi .tg { fill: none; stroke: var(--primary); stroke-width: 2.4; }

.panel { padding: 18px 16px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.chart-cap { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; font-weight: 600; }
.chart { position: relative; height: 160px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 2px solid var(--line); }
.chart-max { position: absolute; left: 0; right: 0; top: 0; border-top: 1.5px dashed var(--line); font-size: 12px; color: var(--ink-3); font-weight: 700; }
.chart-max span { position: absolute; top: -10px; right: 0; background: var(--surface); padding-left: 6px; }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 6px; }
.col:hover .bar-v, .col:focus-visible .bar-v { filter: brightness(1.15); }
.bar-v { width: 100%; max-width: 26px; background: var(--primary); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: growy .8s var(--ease) both; }
.bar-v.today { background: linear-gradient(180deg, #FFB020, #FF8A1F); }
.bar-v.zero { height: 3px !important; background: var(--line-2); border-radius: 2px; animation: none; }
@keyframes growy { from { transform: scaleY(0); } }
.chart-x { display: flex; gap: 2px; margin-top: 6px; }
.chart-x span { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-x span.today-x { color: var(--ink); font-weight: 800; }
@media (max-width: 480px) { .chart-x span:nth-child(even):not(.today-x) { visibility: hidden; } }

.hrows { display: grid; gap: 16px; }
.hrow { --tc: var(--primary); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; }
.hrow .tb { grid-row: 1 / span 2; }
.tb-btn { position: relative; grid-row: 1 / span 2; padding: 0; border: 0; background: none; border-radius: 12px; line-height: 0; transition: transform .25s var(--spring); }
.tb-btn:hover { transform: scale(1.06); }
.tb-btn:active { transform: scale(.96); }
.tb-btn:active .tb { box-shadow: 0 1px 0 color-mix(in srgb, var(--tc) 65%, #000); }
.hrow .nm { font-weight: 750; font-size: 15.5px; }
.hrow .vl { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hrow .vl b { color: var(--ink); }
.hrow .trk { grid-column: 2 / -1; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hrow .trk i { display: block; height: 100%; background: var(--tc); border-radius: 999px; transform-origin: left; animation: growx .9s .15s var(--ease) both; }
.hrow .act { grid-column: 2 / -1; font-size: 14px; margin-top: -2px; }
.hrow.untried .nm { color: var(--ink-3); }
.hrow.notb { grid-template-columns: 1fr auto; }
.hrow.notb .trk, .hrow.notb .act { grid-column: 1 / -1; }

.goal-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.goal-row p { color: var(--ink-2); font-size: 15px; }

.tests { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 58px 1fr; gap: 2px 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); }
.trow .g { grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 17px; color: #fff; background: var(--gc, var(--good)); box-shadow: 0 3px 0 color-mix(in srgb, var(--gc, var(--good)) 60%, #000); }
.trow .t1 { font-weight: 750; font-size: 15px; }
.trow .t2 { font-size: 13.5px; color: var(--ink-3); }

.empty { text-align: center; padding: 44px 20px; border: 2px dashed var(--line-2); border-radius: var(--r-xl); background: var(--surface); }
.empty .tb { margin: 0 auto 14px; animation: popin .6s var(--spring) both; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin: 0 auto 20px; max-width: 40ch; }

.danger-zone { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.danger-zone p { color: var(--ink-3); font-size: 14px; max-width: 46ch; }

/* tooltip, toast, dialog, confetti */
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.4; padding: 7px 10px; border-radius: 10px; transform: translate(-50%, -100%); white-space: nowrap; font-weight: 600; }
.toast {
  position: fixed; left: 50%; top: 74px; z-index: 70;
  transform: translate(-50%, -20px) scale(.9); opacity: 0;
  padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #FF8A1F, #F5476B);
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 0 #B3332E, 0 14px 30px -10px rgba(245, 71, 107, .6);
  pointer-events: none;
  transition: transform .4s var(--spring), opacity .25s;
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(8, 12, 28, .5); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 400px; background: var(--surface); border-radius: var(--r-xl); padding: 24px 20px 20px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); animation: popin .4s var(--spring); }
.modal h2 { font-size: 21px; margin-bottom: 8px; }
.modal p { color: var(--ink-2); margin-bottom: 20px; }
.modal .btn-row .btn { flex: 1 1 120px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- tranziții între pagini ---------- */
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
#app { view-transition-name: page; }
::view-transition-group(page) { animation-duration: 0s; }
::view-transition-old(page) { animation: vtOut .2s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(page) { animation: vtIn .45s cubic-bezier(.2, .8, .2, 1) both; }
html.vt-fwd::view-transition-old(page) { animation-name: vtOutL; }
html.vt-fwd::view-transition-new(page) { animation-name: vtInR; }
html.vt-back::view-transition-old(page) { animation-name: vtOutR; }
html.vt-back::view-transition-new(page) { animation-name: vtInL; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: blur(3px); } }
@keyframes vtIn { from { opacity: 0; transform: scale(1.015); filter: blur(3px); } }
@keyframes vtOutL { to { opacity: 0; transform: translateX(-56px); filter: blur(3px); } }
@keyframes vtInR { from { opacity: 0; transform: translateX(56px); filter: blur(3px); } }
@keyframes vtOutR { to { opacity: 0; transform: translateX(56px); filter: blur(3px); } }
@keyframes vtInL { from { opacity: 0; transform: translateX(-56px); filter: blur(3px); } }
/* schimbarea temei: cerc care pornește din buton */
html.vt-theme .topbar, html.vt-theme .tabbar, html.vt-theme #app { view-transition-name: none; }
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* rezervă pentru browserele fără View Transitions */
.wrap.leave { opacity: 0; transform: scale(.985); transition: opacity .15s ease-in, transform .15s ease-in; }
.wrap.leave.leave-l { transform: translateX(-36px); }
.wrap.leave.leave-r { transform: translateX(36px); }

/* ---------- animația de deschidere ---------- */
@property --hole { syntax: '<length>'; inherits: false; initial-value: 0px; }
.splash {
  --hole: 0px;
  --r: min(40vw, 210px);
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255, 255, 255, .16), transparent 70%),
    linear-gradient(160deg, #3B5BFF 0%, #5A3FF0 50%, #9B3FE0 100%);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 1px));
  mask: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 1px));
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.splash::before, .splash::after { content: ''; position: absolute; border-radius: 999px; background: rgba(255, 255, 255, .1); animation: float 6s ease-in-out infinite; }
.splash::before { width: 46vmax; height: 46vmax; right: -16vmax; top: -18vmax; }
.splash::after { width: 30vmax; height: 30vmax; left: -12vmax; bottom: -10vmax; animation-delay: -3s; }
.splash.skip { display: none; }
.brand-mark { cursor: pointer; }
.splash.out { animation: spHole .85s cubic-bezier(.7, 0, .25, 1) forwards; pointer-events: none; }
@keyframes spHole { 0% { --hole: 0px; opacity: 1; } 80% { opacity: 1; } 100% { --hole: 120vmax; opacity: 0; } }

.sp-center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 0 16px; }
.splash.out .sp-center { animation: spShrink .4s ease-in forwards; }
@keyframes spShrink { to { transform: scale(.82); opacity: 0; } }
.sp-mark {
  position: relative;
  width: 86px; height: 86px; border-radius: 26px;
  display: grid; place-items: center;
  background: #fff; color: #3B5BFF;
  font-family: var(--display); font-weight: 800; font-size: 50px; line-height: 1;
  box-shadow: 0 6px 0 rgba(25, 12, 90, .35), 0 24px 44px -12px rgba(25, 12, 90, .55);
  animation: spPop .75s .08s var(--spring) both;
  margin-bottom: 6px;
}
.sp-mark::after {
  content: ''; position: absolute; right: -12px; top: -12px; width: 26px; height: 26px;
  background: #FFD45A;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: spSpark .7s .75s var(--spring) both, spin 6s 1.4s linear infinite;
}
@keyframes spPop { from { transform: scale(0) rotate(-25deg); } }
@keyframes spSpark { from { transform: scale(0) rotate(-120deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.sp-word { display: flex; overflow: hidden; padding: 2px 8px 10px; font-family: var(--display); font-weight: 800; font-size: clamp(46px, 13vw, 64px); letter-spacing: -0.05em; line-height: 1; }
.sp-word i { font-style: normal; display: inline-block; animation: spLetter .65s calc(.32s + var(--i) * .06s) var(--spring) both; }
@keyframes spLetter { from { transform: translateY(115%) rotate(14deg); opacity: 0; } }
.sp-tag { position: absolute; left: 0; right: 0; bottom: calc(12% + 26px + env(safe-area-inset-bottom)); padding: 0 20px; text-align: center; font-weight: 700; font-size: 15px; opacity: .9; animation: rise .6s .85s var(--ease) both; }
.splash.out .sp-tag { animation: spShrink .3s ease-in forwards; }
.sp-bar { position: absolute; left: 50%; bottom: calc(12% + env(safe-area-inset-bottom)); width: 120px; height: 6px; margin-left: -60px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.sp-bar i { display: block; height: 100%; border-radius: 999px; background: #FFD45A; transform-origin: left; animation: growx 1.5s .15s cubic-bezier(.5, 0, .3, 1) both; }
.splash.out .sp-bar { opacity: 0; transition: opacity .2s; }
.sp-b {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  animation: spFly .95s var(--d) var(--spring) both;
}
.sp-b b {
  width: 100%; height: 100%; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--tc);
  font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -0.03em; white-space: nowrap;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 60%, #000), 0 12px 24px -10px rgba(0, 0, 0, .45);
  animation: spBob 2.6s calc(var(--d) + .9s) ease-in-out infinite;
}
.sp-b b.sm { font-size: 13px; }
@keyframes spFly {
  from { transform: translate(0, 0) scale(0) rotate(-70deg); opacity: 0; }
  to { transform: translate(calc(var(--x) * var(--r)), calc(var(--y) * var(--r))) scale(1) rotate(var(--rot)); opacity: 1; }
}
@keyframes spBob { 50% { transform: translateY(-7px); } }
.splash.out .sp-b { animation: spFlyOut .55s ease-in forwards; }
@keyframes spFlyOut {
  from { transform: translate(calc(var(--x) * var(--r)), calc(var(--y) * var(--r))) scale(1) rotate(var(--rot)); opacity: 1; }
  to { transform: translate(calc(var(--x) * var(--r) * 2.6), calc(var(--y) * var(--r) * 2.6)) scale(.6) rotate(calc(var(--rot) * 4)); opacity: 0; }
}
/* bara de sus și cea de jos intră după deschidere */
html.reveal .topbar { animation: dropIn .6s .3s var(--ease) both; }
html.reveal .tabbar { animation: riseIn .6s .35s var(--ease) both; }
@keyframes dropIn { from { transform: translateY(-100%); opacity: 0; } }
@keyframes riseIn { from { transform: translateY(100%); opacity: 0; } }

/* ---------- mișcare redusă ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .sh-ico path { stroke-dashoffset: 0; }
  .sheet { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .splash { display: none; }
}
