/* turma. · tokens e peças compartilhadas pela landing e pelo app */
:root {
  --paper: #F3F0EA;
  --paper-2: #ECE8E0;
  --paper-3: #E3DED4;
  --card: #FBFAF7;
  --white: #FFFFFF;
  --ink: #15120F;
  --ink-2: #3D3833;
  --muted: #827B72;
  --faint: #ABA49A;
  --line: rgba(21, 18, 15, 0.09);
  --line-2: rgba(21, 18, 15, 0.16);
  --accent: #3E46FF;
  --accent-ink: #2A30D6;
  --accent-soft: rgba(62, 70, 255, 0.10);
  --good: #1F9D5B;
  --good-soft: rgba(31, 157, 91, 0.12);
  --warn: #D98A14;
  --warn-soft: rgba(217, 138, 20, 0.14);
  --bad: #E0452B;
  --bad-soft: rgba(224, 69, 43, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(21, 18, 15, 0.03), 0 10px 30px -14px rgba(21, 18, 15, 0.18);
  --shadow-lg: 0 1px 0 rgba(21, 18, 15, 0.04), 0 24px 60px -24px rgba(21, 18, 15, 0.35);
  --sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
::selection { background: var(--accent); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* Tipografia */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .num {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--ink-2);
}
.eyebrow.accent { color: var(--accent); }
.eyebrow svg { width: 14px; height: 14px; flex: none; }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* Botões: press com escala, como nas libs de micro-interação */
.btn {
  --b: var(--ink);
  --c: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: var(--b);
  color: var(--c);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(21, 18, 15, .2);
}
.btn:hover { --b: #2A2622; }
.btn:active { transform: scale(.96); }
.btn.accent { --b: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px -6px rgba(62, 70, 255, .55); }
.btn.accent:hover { --b: var(--accent-ink); }
.btn.ghost { --b: transparent; --c: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { --b: rgba(21, 18, 15, .04); }
.btn.soft { --b: var(--paper-2); --c: var(--ink); box-shadow: none; }
.btn.soft:hover { --b: var(--paper-3); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.plain::before { display: none; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: #B06D07; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.dark { background: var(--ink); color: #fff; }

.kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 var(--line-2);
  color: var(--muted);
}

/* Faixa de graduação desenhada em CSS */
.belt {
  --c: #F4F2EC;
  --bd: rgba(21, 18, 15, .18);
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 12px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px var(--bd), 0 1px 1px rgba(21, 18, 15, .12);
  overflow: hidden;
  flex: none;
}
.belt .tip {
  position: absolute;
  right: 6px;
  top: 0;
  bottom: 0;
  width: 14px;
  background: #15120F;
  display: flex;
  gap: 2px;
  align-items: stretch;
  justify-content: center;
  padding: 0 2px;
}
.belt.preta .tip { background: #C0392B; }
.belt .tip i { width: 2px; background: #fff; }
.belt.lg { width: 72px; height: 18px; border-radius: 4px; }
.belt.lg .tip { width: 22px; right: 9px; gap: 3px; }
.belt.lg .tip i { width: 3px; }

/* Fundo pontilhado do memo */
.dots {
  background-image: radial-gradient(rgba(21, 18, 15, .13) 1px, transparent 1.2px);
  background-size: 22px 22px;
}

/* Toast: mesma pílula escura do dock */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}
/* Pilha de toasts (bencho toast-stack): os antigos ficam atrás, menores; hover abre a pilha */
.toast + .toast { margin-top: -30px; }
.toasts:hover .toast + .toast { margin-top: 0; }
.toast:nth-last-child(2) { transform: scale(.95); opacity: .8; }
.toast:nth-last-child(3) { transform: scale(.9); opacity: .55; }
.toasts:hover .toast { transform: none; opacity: 1; }
.toast { transition: transform .35s var(--spring), opacity .3s, margin .35s var(--spring); }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: #1C1916;
  color: #F3F0EA;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .06);
  animation: toastIn .45s var(--spring) both;
  pointer-events: auto;
  max-width: min(560px, calc(100vw - 32px));
}
.toast .ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  flex: none;
}
.toast .ic svg { width: 13px; height: 13px; color: #fff; }
.toast.good .ic { background: var(--good); }
.toast.whats .ic { background: #25D366; }
.toast .tx { margin-left: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: rgba(243, 240, 234, .6); display: grid; place-items: center; flex: none; transition: background .2s, color .2s; }
.toast .tx:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.toast .tx svg { width: 12px; height: 12px; }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Contador rolante (bencho rolling-counter) */
.dg { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; line-height: 1; }
.dg .col { display: flex; flex-direction: column; transition: transform 1.3s var(--spring); }
.dg .col span { display: block; height: 1em; line-height: 1; }

/* Slide para confirmar (bencho slide to confirm) */
.slide {
  position: relative;
  height: 56px;
  border-radius: 999px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.slide .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 56px; border-radius: 999px; background: var(--accent-soft); }
.slide .lbl { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--muted); padding-left: 40px; pointer-events: none; background: linear-gradient(90deg, var(--muted) 40%, var(--ink) 50%, var(--muted) 60%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 2.4s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.slide .knob {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: grab;
  box-shadow: 0 6px 16px -6px rgba(62, 70, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.slide .knob:active { cursor: grabbing; }
.slide .knob svg { width: 18px; height: 18px; }
.slide.back .knob, .slide.back .fill { transition: transform .45s var(--spring), width .45s var(--spring); }
.slide.done .lbl { animation: none; -webkit-text-fill-color: var(--accent); }
