*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #00c26f;
  --green-dark: #009955;
  --green-light: #e6fff4;
  --orange: #ff6b2b;
  --orange-light: #fff3ee;
  --ink: #0f1a0f;
  --ink2: #2a3a2a;
  --muted: #6b7f6b;
  --border: #d8e8d8;
  --bg: #f7fdf7;
  --white: #ffffff;
  --yellow: #ffd23f;
  --purple: #7c5cbf;
  --blue: #2563eb;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 60px;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px;
  color: var(--green); letter-spacing: -0.5px; text-decoration: none;
}
.nav-logo span { color: var(--orange); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: #c8d8c8; font-size: 14px; font-weight: 500; text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--green); }
.nav-cta {
  background: var(--green); color: var(--ink);
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 14px; padding: 8px 20px; border-radius: 6px;
  text-decoration: none; transition: background .2s;
}
.nav-cta:hover { background: #00d97a; }
.nav-user { display: flex; align-items: center; gap: 14px; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 15px;
}
.nav-user a.painel-link { color: #c8d8c8; font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-user a.painel-link:hover { color: var(--green); }

/* ── HERO ── */
.hero { background: var(--ink); padding: 80px 5vw 0; overflow: hidden; position: relative; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,194,111,.12); border: 1px solid rgba(0,194,111,.3);
  color: var(--green); font-size: 12px; font-weight: 500; letter-spacing: .5px;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 28px;
  text-transform: uppercase; animation: fadeUp .6s ease both;
}
.hero-tag::before { content: ''; width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(44px, 7vw, 90px); font-weight: 800; line-height: 1.0; color: var(--white); animation: fadeUp .7s .1s ease both; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero h1 .accent { color: var(--orange); }
.hero-sub { margin-top: 24px; font-size: 18px; line-height: 1.7; color: #8aaa8a; max-width: 560px; animation: fadeUp .7s .2s ease both; }
.hero-actions { display: flex; align-items: center; gap: 16px; margin-top: 36px; flex-wrap: wrap; animation: fadeUp .7s .3s ease both; }
.btn-primary { background: var(--green); color: var(--ink); font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; padding: 14px 32px; border-radius: 8px; text-decoration: none; transition: transform .15s, background .2s; display: inline-block; }
.btn-primary:hover { transform: translateY(-2px); background: #00d97a; }
.btn-secondary { color: #8aaa8a; font-size: 15px; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color .2s; }
.btn-secondary:hover { color: var(--white); }
.btn-secondary::before { content: '▶'; width: 36px; height: 36px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 50%; display: grid; place-items: center; font-size: 10px; padding-left: 2px; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.08); animation: fadeUp .7s .4s ease both; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: var(--white); }
.stat-label { font-size: 13px; color: #6a7a6a; margin-top: 2px; }
.hero-code-preview { margin-top: 56px; background: #1a2a1a; border-radius: 16px 16px 0 0; border: 1px solid rgba(255,255,255,.06); border-bottom: none; padding: 20px 24px 0; animation: fadeUp .7s .5s ease both; }
.code-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.code-dots span { width: 12px; height: 12px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
.code-body { font-family: 'DM Mono', 'Courier New', monospace; font-size: 14px; line-height: 2; padding-bottom: 24px; }
.c-green { color: #00c26f; }
.c-orange { color: #ff6b2b; }
.c-yellow { color: #ffd23f; }
.c-muted { color: #4a6a4a; }
.c-white { color: #d8e8d8; }
.c-purple { color: #b09be8; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── SECTION SHARED ── */
section { padding: 88px 5vw; }
.section-tag { font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--green-dark); margin-bottom: 12px; }
.section-title { font-family: 'Syne', sans-serif; font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.1; color: var(--ink); }
.section-title em { font-style: normal; color: var(--green-dark); }

/* ── TRILHAS ── */
.trilhas { background: var(--white); }
.trilhas-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; gap: 24px; flex-wrap: wrap; }
.trilhas-sub { font-size: 17px; color: var(--muted); max-width: 500px; line-height: 1.6; margin-top: 12px; }
.see-all { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--green-dark); text-decoration: none; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.trilhas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.trilha-card { border: 1.5px solid var(--border); border-radius: 16px; padding: 28px; background: var(--white); transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.trilha-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.08); border-color: var(--green); }
.trilha-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; margin-bottom: 18px; }
.trilha-level { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
.level-iniciante { background: #e6fff4; color: #009955; }
.level-intermediario { background: #fff3ee; color: #cc4400; }
.level-avancado { background: #f0eaff; color: #5b3fa3; }
.trilha-card h3 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.trilha-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.trilha-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }

/* ── COMO FUNCIONA ── */
.como { background: var(--bg); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin-top: 52px; }
.step { padding: 32px; border-right: 1px solid var(--border); position: relative; }
.step:last-child { border-right: none; }
.step-num { font-family: 'Syne', sans-serif; font-size: 52px; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: 12px; }
.step h3 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.step-arrow { position: absolute; top: 32px; right: -12px; width: 24px; height: 24px; background: var(--green); border-radius: 50%; display: grid; place-items: center; color: white; font-size: 11px; z-index: 2; }
.step:last-child .step-arrow { display: none; }

/* ── AULAS ── */
.aulas { background: var(--ink); color: var(--white); }
.aulas .section-tag { color: var(--green); }
.aulas .section-title { color: var(--white); }
.aulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.aula-item { background: #1a2a1a; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 20px 24px; display: flex; align-items: center; gap: 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.aula-item:hover { border-color: var(--green); background: #1f321f; }
.aula-num { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: #4a6a4a; min-width: 28px; }
.aula-info { flex: 1; }
.aula-title { font-size: 15px; font-weight: 500; color: var(--white); margin-bottom: 3px; }
.aula-dur { font-size: 12px; color: #4a6a4a; }
.aula-badge { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; }
.badge-free { background: rgba(0,194,111,.15); color: var(--green); }
.badge-lock { background: rgba(255,255,255,.06); color: #4a6a4a; }
.play-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(0,194,111,.15); border: 1px solid rgba(0,194,111,.3); display: grid; place-items: center; font-size: 10px; color: var(--green); flex-shrink: 0; padding-left: 2px; }

/* ── DEPOIMENTOS ── */
.depos { background: var(--white); }
.depos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 48px; }
.depo-card { border: 1.5px solid var(--border); border-radius: 16px; padding: 28px; }
.depo-stars { color: var(--yellow); font-size: 14px; margin-bottom: 14px; }
.depo-text { font-size: 15px; line-height: 1.7; color: var(--ink2); font-style: italic; margin-bottom: 20px; }
.depo-author { display: flex; align-items: center; gap: 12px; }
.depo-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 16px; color: white; flex-shrink: 0; }
.depo-name { font-weight: 500; font-size: 14px; }
.depo-loc { font-size: 12px; color: var(--muted); }

/* ── CTA FINAL ── */
.cta-section { background: var(--green); text-align: center; padding: 100px 5vw; }
.cta-section h2 { font-family: 'Syne', sans-serif; font-size: clamp(32px, 5vw, 60px); font-weight: 800; color: var(--ink); line-height: 1.1; margin-bottom: 20px; }
.cta-section p { font-size: 18px; color: var(--ink2); margin-bottom: 40px; }
.btn-dark { background: var(--ink); color: var(--green); font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; padding: 16px 40px; border-radius: 10px; text-decoration: none; display: inline-block; transition: transform .15s; }
.btn-dark:hover { transform: translateY(-2px); }

/* ── FOOTER ── */
footer { background: var(--ink); padding: 52px 5vw; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; border-top: 1px solid rgba(255,255,255,.06); }
footer .nav-logo { font-size: 20px; }
footer p { font-size: 13px; color: #4a6a4a; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: #4a6a4a; text-decoration: none; }
.footer-links a:hover { color: var(--green); }

/* ── MODAL ── */
.lesson-modal { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.75); align-items: center; justify-content: center; }
.lesson-modal.open { display: flex; }
.modal-box { background: var(--white); border-radius: 20px; width: min(640px, 92vw); max-height: 80vh; overflow-y: auto; padding: 36px; }
.modal-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.modal-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); padding: 4px; }
.modal-code { background: var(--ink); border-radius: 12px; padding: 24px; margin-bottom: 24px; font-family: 'Courier New', monospace; font-size: 14px; line-height: 2; }
.modal-text { font-size: 15px; line-height: 1.7; color: var(--ink2); margin-bottom: 20px; }
.modal-run { background: var(--green); border: none; border-radius: 8px; padding: 12px 28px; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--ink); width: 100%; transition: background .2s; }
.modal-run:hover { background: #00d97a; }
.modal-output { margin-top: 16px; background: #1a2a1a; border-radius: 8px; padding: 16px; font-family: monospace; font-size: 14px; color: var(--green); display: none; }

/* ===================================================================
   PÁGINAS INTERNAS (login, cadastro, painel, trilha, curso, aula)
   =================================================================== */
.page-wrap { max-width: 1080px; margin: 0 auto; padding: 48px 5vw 80px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--green-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.page-title { font-family: 'Syne', sans-serif; font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.1; }
.page-lead { font-size: 17px; color: var(--muted); margin-top: 12px; line-height: 1.6; max-width: 680px; }

/* Auth (login/cadastro) */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--ink); }
.auth-card { background: var(--white); border-radius: 20px; width: min(440px, 100%); padding: 40px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.auth-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 26px; color: var(--green); text-decoration: none; display: inline-block; margin-bottom: 8px; }
.auth-logo span { color: var(--orange); }
.auth-card h1 { font-family: 'Syne', sans-serif; font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink2); }
.field input { width: 100%; height: 50px; padding: 0 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-family: inherit; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--green); }
.btn-full { width: 100%; height: 52px; background: var(--green); color: var(--ink); border: none; border-radius: 10px; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; cursor: pointer; transition: background .2s; }
.btn-full:hover { background: #00d97a; }
.btn-full:disabled { opacity: .6; cursor: default; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--green-dark); font-weight: 500; text-decoration: none; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; display: none; }
.alert.show { display: block; }
.alert-error { background: #ffeaea; color: #b42318; }
.alert-success { background: var(--green-light); color: var(--green-dark); }

/* Cards de curso (trilha/painel) */
.cursos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 32px; }
.curso-card { border: 1.5px solid var(--border); border-radius: 16px; padding: 26px; background: var(--white); text-decoration: none; color: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; display: block; }
.curso-card:hover { transform: translateY(-4px); border-color: var(--green); box-shadow: 0 16px 40px rgba(0,0,0,.07); }
.curso-card h3 { font-family: 'Syne', sans-serif; font-size: 19px; margin-bottom: 8px; }
.curso-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.progress-bar { background: var(--border); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--green); transition: width .4s; }

/* Lista de aulas (curso) */
.aula-lista { margin-top: 28px; border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--white); }
.aula-row { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; transition: background .15s; }
.aula-row:last-child { border-bottom: none; }
.aula-row:hover { background: var(--bg); }
.aula-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 13px; color: #fff; flex-shrink: 0; }
.aula-check.done { background: var(--green); border-color: var(--green); }
.aula-row .t { flex: 1; }
.aula-row .t .nome { font-weight: 500; font-size: 15px; }
.aula-row .t .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Botões genéricos */
.btn { display: inline-block; background: var(--green); color: var(--ink); border: none; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; padding: 12px 28px; border-radius: 10px; cursor: pointer; text-decoration: none; transition: background .2s, transform .15s; }
.btn:hover { background: #00d97a; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--ink2); }
.btn-outline:hover { border-color: var(--green); background: var(--bg); }

/* Painel */
.painel-hero { background: var(--ink); color: var(--white); padding: 48px 5vw; }
.painel-hero h1 { font-family: 'Syne', sans-serif; font-size: 30px; }
.painel-hero p { color: #8aaa8a; margin-top: 6px; }
.empty-box { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-box .big { font-size: 46px; margin-bottom: 16px; }

/* Visualização da aula */
.aula-view { display: grid; grid-template-columns: 1fr; gap: 24px; }
.aula-conteudo { background: var(--white); border: 1.5px solid var(--border); border-radius: 16px; padding: 32px; font-size: 16px; line-height: 1.8; color: var(--ink2); }
.aula-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ===================================================================
   ADMIN
   =================================================================== */
.admin-nav { background: #0f1a0f; }
.admin-nav .nav-links a.active { color: var(--green); }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 5vw 80px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.admin-head h1 { font-family: 'Syne', sans-serif; font-size: 30px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 40px; }
.stat-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; padding: 22px; }
.stat-card .n { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: var(--green-dark); }
.stat-card .l { font-size: 13px; color: var(--muted); margin-top: 2px; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table th { background: var(--bg); font-family: 'Syne', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink2); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .acoes { display: flex; gap: 8px; }
.btn-sm { font-size: 13px; padding: 6px 14px; border-radius: 8px; text-decoration: none; cursor: pointer; border: none; font-family: 'DM Sans', sans-serif; font-weight: 500; }
.btn-edit { background: var(--green-light); color: var(--green-dark); }
.btn-del { background: #ffeaea; color: #b42318; }
.tag { display:inline-block; font-size:11px; padding:2px 9px; border-radius:20px; }
.tag-on { background: var(--green-light); color: var(--green-dark); }
.tag-off { background: #eee; color: #888; }
.tag-ex { background: #fff8e1; color: #9a6a00; }

.admin-form { background: var(--white); border: 1.5px solid var(--border); border-radius: 16px; padding: 28px; margin-bottom: 36px; }
.admin-form h2 { font-family: 'Syne', sans-serif; font-size: 20px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.admin-form label { display:block; font-size:13px; font-weight:500; margin-bottom:6px; color: var(--ink2); }
.admin-form input[type=text], .admin-form input[type=number], .admin-form input[type=url],
.admin-form select, .admin-form textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s;
}
.admin-form textarea { resize: vertical; min-height: 80px; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { border-color: var(--green); }
.admin-form .code-area { font-family: 'Courier New', monospace; font-size: 13px; }
.check-row { display:flex; align-items:center; gap:8px; }
.check-row input { width:auto; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; background: var(--green-light); color: var(--green-dark); }
.fieldset-ex { border: 1.5px dashed var(--border); border-radius: 12px; padding: 18px; margin-top: 8px; }
.fieldset-ex legend { font-size: 12px; font-weight: 700; color: var(--green-dark); padding: 0 8px; text-transform: uppercase; letter-spacing: .5px; }

/* ===================================================================
   EXERCÍCIO INTERATIVO (aula)
   =================================================================== */
.exercicio { background: var(--ink); border-radius: 16px; padding: 24px; margin-top: 8px; }
.exercicio h3 { font-family: 'Syne', sans-serif; color: var(--green); font-size: 18px; margin-bottom: 8px; }
.exercicio .enunciado { color: #c8d8c8; font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
.editor-toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
.editor-toolbar .dot { width: 11px; height: 11px; border-radius: 50%; }
.editor-toolbar .dot:nth-child(1){background:#ff5f57;} .editor-toolbar .dot:nth-child(2){background:#febc2e;} .editor-toolbar .dot:nth-child(3){background:#28c840;}
.editor-toolbar .lang { margin-left:auto; font-size:11px; color:#4a6a4a; text-transform:uppercase; letter-spacing:1px; }
.code-editor {
  width: 100%; min-height: 160px; background: #1a2a1a; color: #d8e8d8; border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 16px; font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.7;
  resize: vertical; outline: none; margin-top: 10px; tab-size: 2;
}
.code-editor:focus { border-color: var(--green); }
.exercicio-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn-run { background: rgba(255,255,255,.08); color: #d8e8d8; border:1px solid rgba(255,255,255,.14); }
.btn-run:hover { background: rgba(255,255,255,.14); }
.btn-check { background: var(--green); color: var(--ink); }
.btn-check:hover { background: #00d97a; }
.console-out {
  margin-top: 16px; background: #0c140c; border-radius: 10px; padding: 16px; min-height: 48px;
  font-family: 'Courier New', monospace; font-size: 14px; color: #9fe6c0; white-space: pre-wrap; line-height: 1.6;
}
.console-out .err { color: #ff8a8a; }
.resultado { margin-top: 14px; padding: 14px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; display: none; }
.resultado.show { display: block; }
.resultado.ok { background: rgba(0,194,111,.15); color: #aef0cf; border: 1px solid rgba(0,194,111,.3); }
.resultado.no { background: rgba(255,107,43,.12); color: #ffc7ad; border: 1px solid rgba(255,107,43,.3); }
.dica-toggle { color: var(--green); font-size: 13px; cursor: pointer; background:none; border:none; margin-top:12px; text-decoration: underline; }
.dica-box { display:none; margin-top:10px; color:#c8d8c8; font-size:13px; background:rgba(255,255,255,.05); padding:12px 14px; border-radius:8px; }

/* ===================================================================
   CERTIFICADO
   =================================================================== */
.cert-page { background: var(--bg); padding: 40px 20px; min-height: 100vh; }
.cert {
  max-width: 900px; margin: 0 auto; background: #fff; border-radius: 8px;
  border: 2px solid var(--green); padding: 60px 64px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}
.cert::before {
  content: ''; position: absolute; inset: 14px; border: 1px solid var(--border); border-radius: 4px; pointer-events: none;
}
.cert-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.cert-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 26px; color: var(--green); }
.cert-logo span { color: var(--orange); }
.cert-seal { width: 70px; height: 70px; border-radius: 50%; background: var(--green); color:#fff; display:grid; place-items:center; font-size:30px; }
.cert h1 { font-family: 'Syne', sans-serif; font-size: 16px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); text-align: center; }
.cert .aluno { font-family: 'Syne', sans-serif; font-size: 42px; font-weight: 800; color: var(--ink); text-align: center; margin: 18px 0; }
.cert .linha { width: 60%; margin: 0 auto 24px; border-bottom: 2px solid var(--border); }
.cert .texto { text-align: center; font-size: 16px; color: var(--ink2); line-height: 1.7; max-width: 620px; margin: 0 auto; }
.cert .texto strong { color: var(--green-dark); }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 50px; font-size: 13px; color: var(--muted); }
.cert-foot .codigo { font-family: 'Courier New', monospace; }
.cert-actions { max-width: 900px; margin: 24px auto 0; display: flex; gap: 12px; justify-content: center; }
@media print {
  nav, .cert-actions, footer { display: none !important; }
  .cert-page { padding: 0; background: #fff; }
  .cert { border: 2px solid #00c26f; box-shadow: none; }
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .cert { padding: 36px 24px; }
  .cert .aluno { font-size: 30px; }
  .nav-links { display: none; }
  .aulas-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
  .step-arrow { display: none !important; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  footer { flex-direction: column; text-align: center; }
}
