/* =====================================================================
   Frases Express — Inglês com a Grazi
   Design tokens + estilos da aplicação
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* ---- Marca ---- */
  --coral: #F4674E;
  --coral-dark: #E0492F;
  --coral-soft: #FFE7E1;
  --teal: #1FA39B;
  --teal-dark: #16807A;
  --teal-soft: #D2F0EC;
  --sun: #FFC24B;
  --sun-soft: #FFF1D2;
  --ink: #2C2A4A;
  --ink-soft: #5B5876;

  /* ---- Neutros ---- */
  --cream: #FFF8F2;
  --paper: #FFFFFF;
  --line: #EFE6DD;
  --line-2: #E3D9CF;
  --muted: #8A8499;
  --muted-2: #B4AEC0;

  /* ---- Semânticos ---- */
  --bg: var(--cream);
  --surface: var(--paper);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --primary: var(--coral);
  --primary-press: var(--coral-dark);
  --accent: var(--teal);
  --ok: #22A06B;
  --ok-soft: #D7F0E4;
  --err: #E0492F;
  --err-soft: #FFE0D9;

  /* ---- Tipografia ---- */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  /* ---- Raios ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---- Sombras ---- */
  --sh-sm: 0 2px 6px rgba(44, 42, 74, 0.06);
  --sh-md: 0 10px 24px rgba(44, 42, 74, 0.10);
  --sh-lg: 0 24px 60px rgba(44, 42, 74, 0.16);
  --sh-coral: 0 12px 26px rgba(244, 103, 78, 0.32);

  /* ---- Espaço ---- */
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 3px solid rgba(31,163,155,.45); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* ===== Botões ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  padding: 14px 26px; border-radius: var(--r-pill);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-coral); }
.btn-primary:hover { background: var(--primary-press); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 12px 26px rgba(31,163,155,.30); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn-text { padding: 8px 6px; color: var(--ink-soft); }
.btn-text:hover { color: var(--ink); }
.btn-lg { padding: 18px 34px; font-size: 1.14rem; }
.btn-sm { padding: 10px 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ===== NAVBAR (landing) =================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h); display: flex; align-items: center;
  background: rgba(255,248,242,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 700; color: var(--ink-soft); font-size: .98rem; transition: color .15s; }
.nav-links a:hover { color: var(--coral); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* logo lockup */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--coral), var(--sun));
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  box-shadow: var(--sh-coral);
}
.logo-text { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; color: var(--ink); line-height: 1; }
.logo-text small { display: block; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin-top: 3px; }

/* ===== HERO ============================================== */
.hero { position: relative; padding: 70px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--coral-soft); color: var(--coral-dark);
  font-weight: 800; font-size: .82rem; letter-spacing: .04em;
  padding: 8px 16px; border-radius: var(--r-pill); margin-bottom: 22px;
  text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.5rem, 5vw, 3.9rem); font-weight: 700; }
.hero h1 .hl { color: var(--coral); position: relative; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 14px;
  background: var(--sun); opacity: .5; border-radius: 6px; z-index: -1;
}
.hero p.lead { font-size: 1.22rem; color: var(--text-soft); margin: 22px 0 32px; max-width: 30em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; }
.hero-stats .stat strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); display: block; }
.hero-stats .stat span { font-size: .9rem; color: var(--muted); font-weight: 700; }

.hero-art { position: relative; }
.hero-photo {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg);
  aspect-ratio: 4/5; background: var(--teal-soft);
  border: 6px solid #fff;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-md); padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: .95rem;
}
.hero-badge .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.hero-badge.b1 { top: 24px; left: -28px; }
.hero-badge.b2 { bottom: 30px; right: -26px; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; z-index: -1; }
.hero-blob.x1 { width: 320px; height: 320px; background: var(--sun-soft); top: -40px; right: -60px; }
.hero-blob.x2 { width: 260px; height: 260px; background: var(--teal-soft); bottom: -50px; left: -40px; }

/* ===== SECTIONS ========================================== */
section.band { padding: 76px 0; }
.section-head { text-align: center; max-width: 40em; margin: 0 auto 48px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.section-head p { font-size: 1.12rem; color: var(--text-soft); margin-top: 14px; }

/* fórmula dos 7 passos */
.formula { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.formula .chip {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  padding: 14px 18px; min-width: 116px; box-shadow: var(--sh-sm);
}
.formula .chip b { font-family: var(--font-display); font-size: 1.05rem; }
.formula .chip span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.formula .plus { align-self: center; color: var(--muted-2); font-weight: 800; font-size: 1.3rem; }

/* grade dos passos */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.step-card {
  background: #fff; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm);
  border: 1px solid var(--line); position: relative; transition: transform .16s ease, box-shadow .2s ease;
  overflow: hidden;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.step-card .scard-num {
  position: absolute; top: 16px; right: 18px; font-family: var(--font-display);
  font-size: 3.4rem; font-weight: 700; opacity: .12; line-height: 1;
}
.step-card .scard-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; }
.step-card h3 { font-size: 1.3rem; }
.step-card .en { color: var(--muted); font-weight: 700; font-size: .9rem; margin: 2px 0 10px; }
.step-card p { font-size: .98rem; color: var(--text-soft); margin: 0; }

/* feature de método */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feat {
  background: #fff; border-radius: var(--r-lg); padding: 30px; box-shadow: var(--sh-sm);
  border: 1px solid var(--line);
}
.feat .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 18px; }
.feat h3 { font-size: 1.25rem; margin-bottom: 8px; }
.feat p { color: var(--text-soft); margin: 0; }

/* about Grazi */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 50px; align-items: center; }
.about-photo { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); border: 6px solid #fff; aspect-ratio: 1; background: var(--teal-soft); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 8px; }
.about .sig { color: var(--teal); font-weight: 800; margin-bottom: 18px; }
.about p { color: var(--text-soft); }
.about ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.about li { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; color: var(--ink); }
.about li svg { color: var(--ok); flex: none; margin-top: 3px; }

/* CTA final */
.cta-band { background: linear-gradient(135deg, var(--ink), #423f6e); color: #fff; border-radius: var(--r-xl); padding: 60px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.cta-band p { color: rgba(255,255,255,.82); font-size: 1.18rem; max-width: 34em; margin: 16px auto 30px; }
.cta-band .blob { position: absolute; border-radius: 50%; opacity: .22; }
.cta-band .blob.a { width: 340px; height: 340px; background: var(--coral); top: -120px; left: -80px; }
.cta-band .blob.b { width: 280px; height: 280px; background: var(--teal); bottom: -120px; right: -60px; }

/* footer */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--line); margin-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 1rem; margin-bottom: 14px; }
.footer a { display: block; color: var(--text-soft); font-weight: 600; padding: 5px 0; font-size: .96rem; }
.footer a:hover { color: var(--coral); }
.footer .copy { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ===== AUTH ============================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: linear-gradient(150deg, var(--coral), #ff8a5b 55%, var(--sun)); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.14); }
.auth-art .blob.a { width: 320px; height: 320px; top: -80px; right: -60px; }
.auth-art .blob.b { width: 220px; height: 220px; bottom: 40px; left: -70px; }
.auth-art .pitch { position: relative; z-index: 1; }
.auth-art h2 { color: #fff; font-size: 2.5rem; line-height: 1.05; }
.auth-art p { color: rgba(255,255,255,.9); font-size: 1.12rem; margin-top: 14px; max-width: 22em; }
.auth-art .quote { position: relative; z-index: 1; font-size: 1.05rem; font-weight: 700; background: rgba(255,255,255,.16); padding: 20px 22px; border-radius: var(--r-lg); backdrop-filter: blur(4px); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-form { width: min(420px, 100%); }
.auth-form h1 { font-size: 2.1rem; margin-bottom: 6px; }
.auth-form .sub { color: var(--text-soft); margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: 7px; color: var(--ink); }
.input {
  width: 100%; padding: 14px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-2);
  background: #fff; font-family: var(--font-body); font-size: 1rem; color: var(--ink); transition: border .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.input.bad { border-color: var(--err); box-shadow: 0 0 0 4px var(--err-soft); }
.auth-err { background: var(--err-soft); color: var(--err); font-weight: 700; padding: 11px 15px; border-radius: var(--r-md); margin-bottom: 16px; font-size: .94rem; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--text-soft); font-weight: 600; }
.auth-alt button { color: var(--coral); font-weight: 800; }
.demo-hint { margin-top: 20px; text-align: center; font-size: .86rem; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-weight: 700; font-size: .85rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line-2); flex: 1; }

/* ===== APP SHELL (plataforma) ============================ */
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-head { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.sidebar-nav { padding: 16px 14px; overflow-y: auto; flex: 1; }
.sidebar-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--muted-2); padding: 14px 12px 8px; }

.step-link {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: var(--r-md); transition: background .14s; margin-bottom: 2px; color: var(--ink);
}
.step-link:hover { background: var(--cream); }
.step-link.active { background: var(--coral-soft); }
.step-link .num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .95rem; flex: none; }
.step-link .lbl { flex: 1; min-width: 0; }
.step-link .lbl b { display: block; font-size: .98rem; font-weight: 800; }
.step-link .lbl span { font-size: .78rem; color: var(--muted); }
.step-link .check { color: var(--ok); flex: none; }
.step-link .lock { color: var(--muted-2); flex: none; }

.sidebar-foot { padding: 16px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: var(--r-md); }
.user-chip .av { width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; flex: none; }
.user-chip .u-name { font-weight: 800; font-size: .94rem; line-height: 1.1; }
.user-chip .u-mail { font-size: .78rem; color: var(--muted); }

.app-main { background: var(--bg); min-width: 0; }

/* topbar */
.topbar { height: 64px; background: rgba(255,248,242,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 20; }
.crumbs { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); font-size: .94rem; }
.crumbs b { color: var(--ink); }
.topbar .menu-btn { display: none; }

/* ===== DASHBOARD ========================================= */
.dash { padding: 36px 32px 60px; max-width: 1080px; margin: 0 auto; }
.dash-hero { background: linear-gradient(135deg, var(--teal), #2bbcb2); color: #fff; border-radius: var(--r-xl); padding: 36px 40px; display: flex; justify-content: space-between; align-items: center; gap: 30px; position: relative; overflow: hidden; }
.dash-hero h1 { color: #fff; font-size: 2.1rem; }
.dash-hero p { color: rgba(255,255,255,.9); margin: 8px 0 0; max-width: 30em; }
.dash-hero .blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); width: 240px; height: 240px; top: -90px; right: -40px; }
.ring { --p: 0; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(#fff calc(var(--p)*1%), rgba(255,255,255,.28) 0); position: relative; z-index: 1; }
.ring .ring-inner { width: 92px; height: 92px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; text-align: center; }
.ring .ring-inner b { font-family: var(--font-display); font-size: 1.7rem; color: #fff; line-height: 1; }
.ring .ring-inner span { font-size: .68rem; color: rgba(255,255,255,.85); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.dash-section-title { display: flex; align-items: center; justify-content: space-between; margin: 40px 0 18px; }
.dash-section-title h2 { font-size: 1.5rem; }

/* trilha */
.trail { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.trail-card { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-sm); overflow: hidden; cursor: pointer; transition: transform .16s ease, box-shadow .2s ease; text-align: left; display: flex; flex-direction: column; }
.trail-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.trail-card .tc-top { padding: 20px 22px; display: flex; align-items: center; gap: 14px; position: relative; }
.trail-card .tc-ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.trail-card .tc-title b { font-family: var(--font-display); font-size: 1.18rem; display: block; line-height: 1.1; }
.trail-card .tc-title span { font-size: .86rem; color: var(--muted); font-weight: 700; }
.trail-card .tc-body { padding: 0 22px 18px; }
.trail-card .tc-body p { font-size: .92rem; color: var(--text-soft); margin: 0 0 14px; }
.trail-card .tc-foot { margin-top: auto; padding: 14px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.mini-bar { height: 8px; border-radius: 99px; background: var(--line); flex: 1; overflow: hidden; margin-right: 14px; }
.mini-bar i { display: block; height: 100%; border-radius: 99px; transition: width .5s ease; }
.tc-pages { font-size: .82rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.tc-done-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-weight: 800; font-size: .82rem; }

/* ===== STEP PAGE (lição) ================================= */
.lesson { display: grid; grid-template-columns: 220px 1fr; gap: 0; }
.lesson-nav { border-right: 1px solid var(--line); padding: 26px 16px; position: sticky; top: 64px; height: calc(100vh - 64px); }
.page-link { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); width: 100%; text-align: left; font-weight: 800; color: var(--ink-soft); margin-bottom: 4px; transition: background .14s, color .14s; }
.page-link:hover { background: var(--cream); color: var(--ink); }
.page-link.active { background: var(--ink); color: #fff; }
.page-link .pl-ic { flex: none; }
.page-link .pl-check { margin-left: auto; color: var(--ok); }
.page-link.active .pl-check { color: #fff; }

.lesson-body { padding: 36px 44px 80px; max-width: 860px; }
.lesson-head { margin-bottom: 26px; }
.lesson-head .step-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; padding: 6px 14px; border-radius: var(--r-pill); margin-bottom: 12px; }
.lesson-head h1 { font-size: 2.3rem; }
.lesson-head .lead { color: var(--text-soft); font-size: 1.1rem; margin-top: 8px; }

/* video */
.video-card { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); background: #000; aspect-ratio: 16/9; margin-bottom: 30px; }
.video-card iframe { width: 100%; height: 100%; border: 0; display: block; }

/* bloco de seção dentro da lição */
.block { margin-bottom: 36px; }
.block-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 16px; color: var(--ink); }
.block-title .bt-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }

.theory-text p { font-size: 1.08rem; color: var(--text); margin-bottom: 14px; }
.callout { display: flex; gap: 14px; background: var(--sun-soft); border: 1.5px solid #F3DCA0; border-radius: var(--r-lg); padding: 18px 20px; font-weight: 700; color: #7a5b16; align-items: flex-start; }
.callout svg { color: var(--sun); flex: none; margin-top: 2px; }

/* flashcards */
.flash-intro { color: var(--text-soft); margin-bottom: 18px; }
.flash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.flash {
  perspective: 1000px; height: 124px; cursor: pointer;
}
.flash-inner { position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.flash.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; text-align: center; box-shadow: var(--sh-sm); border: 1px solid var(--line); }
.flash-front { background: #fff; }
.flash-front .fw { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.flash-front .hint { font-size: .72rem; color: var(--muted-2); font-weight: 700; margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }
.flash-front .flip-tip { position: absolute; bottom: 10px; font-size: .68rem; color: var(--muted-2); display: flex; align-items: center; gap: 4px; }
.flash-back { color: #fff; transform: rotateY(180deg); }
.flash-back .bw { font-family: var(--font-display); font-weight: 500; font-size: 1.18rem; }

/* ===== EXERCÍCIOS ======================================== */
.exercise { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-sm); padding: 26px 28px; margin-bottom: 28px; }
.ex-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ex-head .ex-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.ex-head h3 { font-size: 1.3rem; }
.ex-sub { color: var(--muted); font-weight: 700; font-size: .9rem; margin-bottom: 20px; }

/* typing */
.type-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.type-row:last-child { border-bottom: none; }
.type-row .tr-prompt { width: 42%; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.type-row .tr-prompt .qn { width: 26px; height: 26px; border-radius: 8px; background: var(--cream); display: grid; place-items: center; font-size: .82rem; color: var(--muted); font-weight: 800; flex: none; }
.type-row .tr-input { flex: 1; position: relative; }
.type-row .input { padding: 11px 40px 11px 14px; }
.type-row .tr-status { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.input.ok { border-color: var(--ok); background: var(--ok-soft); }
.input.no { border-color: var(--err); background: var(--err-soft); }
.type-foot { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.score-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 800; padding: 9px 16px; border-radius: var(--r-pill); }

/* drag & match */
.drag-area { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.drag-col-label { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.chip-bank { display: flex; flex-direction: column; gap: 10px; }
.drag-chip {
  background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--r-md); padding: 12px 16px;
  font-weight: 800; font-family: var(--font-display); color: var(--ink); cursor: grab; box-shadow: var(--sh-sm);
  transition: transform .1s, box-shadow .15s, opacity .15s; user-select: none; display: flex; align-items: center; gap: 8px;
}
.drag-chip:active { cursor: grabbing; }
.drag-chip.dragging { opacity: .4; }
.drag-chip.placed { display: none; }
.drop-row { display: flex; align-items: center; gap: 12px; }
.drop-target {
  flex: none; width: 150px; min-height: 50px; border: 2px dashed var(--line-2); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; padding: 6px; transition: border .15s, background .15s; background: var(--cream);
}
.drop-target.over { border-color: var(--teal); background: var(--teal-soft); }
.drop-target.correct { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.drop-target.wrong { border-style: solid; border-color: var(--err); background: var(--err-soft); }
.drop-target .placed-chip { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.drop-pt { font-weight: 700; color: var(--ink); flex: 1; }

/* completion banner */
.done-banner { display: flex; align-items: center; gap: 16px; background: var(--ok-soft); border: 1.5px solid #A8DFC4; border-radius: var(--r-lg); padding: 20px 24px; margin-top: 10px; }
.done-banner .db-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.done-banner h4 { font-size: 1.15rem; color: var(--ink); }
.done-banner p { margin: 2px 0 0; color: var(--ink-soft); font-weight: 600; font-size: .92rem; }

/* footer nav da lição */
.lesson-foot { display: flex; justify-content: space-between; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* toast */
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--ink); color: #fff; font-weight: 700; padding: 13px 22px; border-radius: var(--r-pill); box-shadow: var(--sh-lg); display: flex; align-items: center; gap: 10px; animation: toastIn .3s ease; }
.toast svg { color: var(--sun); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* loading */
.loading-screen { min-height: 100vh; display: grid; place-items: center; gap: 16px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--coral-soft); border-top-color: var(--coral); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== responsivo ======================================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .feat-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .lesson { grid-template-columns: 1fr; }
  .lesson-nav { position: static; height: auto; display: flex; gap: 8px; border-right: none; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .page-link { margin-bottom: 0; white-space: nowrap; }
  .lesson-body { padding: 26px 20px 70px; }
  .drag-area { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--sh-lg); }
  .sidebar.open { transform: translateX(0); }
  .topbar .menu-btn { display: inline-flex; }
  .scrim { position: fixed; inset: 0; background: rgba(44,42,74,.4); z-index: 70; }
  .dash { padding: 24px 18px 50px; }
  .dash-hero { flex-direction: column; text-align: center; }
}
@media (max-width: 540px) {
  .type-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .type-row .tr-prompt { width: 100%; }
  .hero-stats { gap: 22px; }
  .cta-band { padding: 40px 24px; }
}
