/* Fontes servidas pelo próprio site (licença aberta OFL): Nunito no texto e DM Serif Text nos títulos, as mesmas de antes da identidade nova (a pedido da LexWay) */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/nunito-variable.woff2") format("woff2"); }
/* DM Serif Text has a single weight: declaring the whole range stops the browser from faking a bold */
@font-face { font-family: "DM Serif Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/dmserif-regular.woff2") format("woff2"); }
@font-face { font-family: "DM Serif Text"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("/static/fonts/dmserif-italic.woff2") format("woff2"); }

:root {
  /* Paleta oficial (Manual da marca LexWay) */
  --lex-fucsia: #E31C79;
  --lex-ciano: #64CCC9;
  --lex-petroleo: #1A7F8F;
  --lex-verde-petroleo: #005555;
  --lex-areia: #EFEAE7;
  --lex-preto: #1A1A1A;
  /* papéis */
  --bg: var(--lex-areia);
  --card: #ffffff;
  --ink: var(--lex-preto);
  --muted: #55605F;            /* cinza com contraste AA sobre branco e areia */
  --line: #e2dad5;
  --brand: var(--lex-verde-petroleo);
  --brand-ink: #ffffff;
  --brand-soft: #e6f6f5;       /* ciano bem claro */
  --teal-light: var(--lex-ciano);
  --accent: var(--lex-fucsia);
  --accent-dark: #b3145e;
  /* retorno: verde = certo, vermelho = errado (fora da paleta, por decisão da escola) */
  --ok: #176B3A;
  --ok-soft: #E6F5EC;
  --bad: #B71C1C;
  --bad-soft: #FDECEA;
  --warn: #8A5600;
  --warn-soft: #FFF3DC;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(26,26,26,.04), 0 8px 24px rgba(26,26,26,.05);
  --display: "DM Serif Text", Georgia, serif;
  --serif: "DM Serif Text", Georgia, serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--body); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--brand); letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; color: var(--brand); }
h3 { font-size: 1.05rem; font-weight: 700; }
small, .muted { color: var(--muted); }

.topbar { position: sticky; top: 0; z-index: 20; padding: .7rem 1rem 0; background: linear-gradient(var(--bg) 70%, rgba(239,234,231,0)); }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: .7rem 1.2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: rgba(255,255,255,.9); border: 2px solid rgba(229,220,216,.8); border-radius: 20px; backdrop-filter: blur(6px); }
.logo { display: flex; align-items: center; gap: .6rem; color: var(--brand); text-decoration: none !important; }
.logo img { height: 58px; width: auto; display: block; margin: -6px 0 -6px -8px; }
.logo .app { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--brand); border-left: 2px solid var(--line); padding-left: .6rem; line-height: 1.1; }
.logo span.mark { background: var(--brand); color: #fff; border-radius: 9px; width: 30px; height: 30px; display: grid; place-items: center; font-size: .95rem; }
.nav { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--brand); padding: .4rem .7rem; border-radius: 10px; font-weight: 600; font-size: 1rem; }
.nav a:hover, .nav a.active { background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.role-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.who form { margin: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 1.4rem 1rem 4rem; }
.narrow { max-width: 860px; }
.card { background: var(--card); border: 2px solid rgba(229,220,216,.8); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: .7rem; }

.stat { font-family: var(--display); font-size: 2.4rem; color: var(--brand); line-height: 1.1; }
.stat-label { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }

.btn { display: inline-flex; align-items: center; gap: .35rem; border: 2px solid #ddd3ce; border-bottom-width: 4px; background: #f7f3f1; color: var(--brand); padding: .45rem .95rem; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; background: #fff; border-color: #cfc3bd; }
.btn:active { border-bottom-width: 2px; transform: translateY(2px); }
.btn.primary { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.teal { background: var(--brand); border-color: #003d3d; color: #fff; }
.btn.big { padding: .75rem 1.4rem; font-size: 1.05rem; }
.btn.small { padding: .2rem .55rem; font-size: .85rem; border-radius: 8px; border-bottom-width: 3px; }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=datetime-local], select, textarea {
  font: inherit; width: 100%; padding: .5rem .65rem; border: 1px solid #d6d1c6; border-radius: 9px; background: #fff; color: var(--ink);
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(100,204,201,.35); border-color: var(--brand); }
.field { margin-bottom: .8rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.checks label { font-weight: 600; display: flex; gap: .35rem; align-items: center; background: #faf9f6; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; margin: 0; }

table.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: center; }

.badge { display: inline-block; padding: .08rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 800; background: #eee9df; color: #574f3f; white-space: nowrap; }
.badge.level { background: var(--brand-soft); color: var(--brand); border: 1px solid #bfeceb; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.flash { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 700; background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--bad-soft); color: var(--bad); }

.grade-pill { font-weight: 900; font-size: 1.05rem; padding: .15rem .6rem; border-radius: 9px; background: #eee9df; }
.grade-pill.hi { background: var(--ok-soft); color: var(--ok); }
.grade-pill.mid { background: var(--warn-soft); color: var(--warn); }
.grade-pill.lo { background: var(--bad-soft); color: var(--bad); }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 15% 10%, rgba(100,204,201,.25), transparent 40%), radial-gradient(circle at 90% 90%, rgba(227,28,121,.12), transparent 40%), var(--bg); }
.login-brand { text-align: center; margin-bottom: 1.2rem; }
.login-brand img { width: min(417px, 100%); height: auto; }
.login-brand h1 { font-size: 1.6rem; margin: .6rem 0 .1rem; }
.login-brand h1 em { color: var(--accent); }
.login-card { width: 100%; max-width: 380px; }

/* exercise cards (student) */
.ex-card { display: flex; flex-direction: column; gap: .5rem; }
.ex-card h3 { margin: 0; }
.ex-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* player */
.sheet-head { background: var(--brand); border: 0; color: #fff; border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.sheet-head .badge { background: rgba(255,255,255,.16); color: #fff; }
.sheet-head h1 { color: #fff; }
.q { position: relative; }
.q-head { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .7rem; }
.q-num { flex: none; font-family: var(--display); font-size: 1.1rem; background: var(--brand); color: #fff; font-weight: 900; border-radius: 10px; min-width: 32px; height: 32px; display: grid; place-items: center; }
.q-prompt { font-weight: 700; white-space: pre-wrap; }
.q-type { font-size: .78rem; color: var(--muted); font-weight: 700; }
.q-audio { display: block; width: 100%; max-width: 420px; margin: .2rem 0 .8rem; }
.q-img { max-width: 100%; max-height: 260px; border-radius: 10px; margin: .2rem 0 .8rem; display: block; }
.passage { white-space: pre-wrap; line-height: 2.3; font-size: 1.08rem; }
input.blank, .blank { display: inline-block; width: auto; min-width: 5ch; border: 0; border-bottom: 2px solid var(--brand); border-radius: 4px 4px 0 0; background: var(--brand-soft); padding: .05rem .35rem; font: inherit; font-weight: 700; color: var(--brand); text-align: center; line-height: 1.5; }
select.blank { text-align: left; cursor: pointer; }
.blank:focus { outline: 2px solid var(--brand); }

.options { display: grid; gap: .5rem; }
.option { display: flex; align-items: center; gap: .6rem; border: 2px solid var(--line); border-radius: 11px; padding: .6rem .8rem; cursor: pointer; font-weight: 600; margin: 0; }
.option:hover { border-color: #9edbd9; }
.option input { accent-color: var(--brand); width: 18px; height: 18px; }
.option.sel { border-color: var(--brand); background: var(--brand-soft); }

.tf-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.tf-row:last-child { border-bottom: 0; }
.tf-row > span:first-child { flex: 1 1 16rem; }
.tf-tr { display: block; margin-top: .15rem; font-size: .8rem; font-style: italic; color: var(--muted); }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; font: inherit; font-weight: 800; padding: .3rem .8rem; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 2px solid var(--line); }
.seg button.on.t { background: var(--ok-soft); color: var(--ok); }
.seg button.on.f { background: var(--bad-soft); color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 48px; padding: .5rem; border-radius: 11px; }
.chips.bank { background: #f3f1ec; }
.chips.answer { border: 2px dashed #9edbd9; background: #f4fdfc; }
.chip { user-select: none; border: 2px solid #d6d1c6; background: #fff; border-radius: 9px; padding: .3rem .7rem; font-weight: 800; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip.dragging { opacity: .4; }
.chip.picked { border-color: var(--accent); background: #fce4ef; }
.chips .placeholder { color: var(--muted); font-size: .9rem; align-self: center; }

.match { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 18%; }
.match svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.m-col { display: grid; gap: .55rem; align-content: start; }
.m-item { position: relative; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: .5rem .7rem; cursor: pointer; font-weight: 700; z-index: 1; }
.m-item:hover { border-color: #9edbd9; }
.m-item.active { border-color: var(--accent); background: #fce4ef; }
.m-item.linked { border-color: var(--brand); }
.m-item .dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); transform: translateY(-50%); }
.m-col.left .dot { right: -9px; }
.m-col.right .dot { left: -9px; }
.m-words { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.m-item.m-word { font: inherit; font-weight: 700; color: inherit; padding: .4rem .8rem; }
.m-pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.m-item.m-pic { font: inherit; color: inherit; padding: .4rem; display: flex; flex-direction: column; align-items: stretch; gap: .35rem; }
.m-item.m-pic img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 6px; }
.m-slot { font-weight: 700; font-size: .9rem; color: var(--muted); min-height: 1.3em; text-align: center; line-height: 1.3; }
.m-pics.f-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin: 0 auto; }
.m-item.f-pic { cursor: default; }
.m-item.f-pic input.blank { width: 100%; box-sizing: border-box; }
@media (max-width: 600px) { .m-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res-pic { height: 56px; width: auto; vertical-align: middle; border-radius: 6px; }

.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: .6rem; }
.group { border: 2px dashed #9edbd9; border-radius: 11px; min-height: 90px; background: #f4fdfc; cursor: pointer; }
.group h4 { margin: 0; padding: .4rem .6rem; background: var(--brand-soft); color: var(--brand); border-radius: 9px 9px 0 0; font-size: 1rem; font-family: var(--display); font-weight: 400; }
.group.over { background: var(--brand-soft); }
.group .chips { min-height: 50px; }

.wordcount { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.submit-bar { position: sticky; bottom: 0; background: rgba(239,234,231,.95); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: .8rem 0; margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* results */
.result-hero { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.big-grade { font-family: var(--display); font-size: 3.4rem; line-height: 1; }
.mark { font-weight: 900; }
.mark.ok { color: var(--ok); }
.mark.bad { color: var(--bad); }
.ans { display: inline-block; padding: 0 .35rem; border-radius: 6px; font-weight: 800; }
.ans.ok { background: var(--ok-soft); color: var(--ok); }
.ans.bad { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; text-decoration-thickness: 2px; }
.ans.fix { background: var(--ok-soft); color: var(--ok); margin-left: .2rem; }
.res-list { list-style: none; padding: 0; margin: 0; }
.res-list li { padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.res-list li:last-child { border-bottom: 0; }
.q-score { margin-left: auto; font-weight: 900; white-space: nowrap; }
.freebox { white-space: pre-wrap; background: #faf9f6; border: 1px solid var(--line); border-radius: 10px; padding: .7rem; }

/* builder */
.item-card { border-left: 6px solid var(--teal-light); }
.item-toolbar { display: flex; gap: .4rem; align-items: center; margin-bottom: .6rem; flex-wrap: wrap; }
.item-toolbar .title { font-weight: 900; margin-right: auto; }
.add-bar { display: flex; flex-wrap: wrap; gap: .4rem; }
.rows-editor .r { display: flex; gap: .4rem; margin-bottom: .4rem; align-items: center; }
.rows-editor .r input[type=text], .rows-editor .r select { flex: 1; }
.builder-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; align-items: start; }
.builder-layout .side { position: sticky; top: 70px; }
@media (max-width: 900px) { .builder-layout { grid-template-columns: 1fr; } .builder-layout .side { position: static; } }
.gb td.cell { text-align: center; }
.gb th.ex { max-width: 140px; font-size: .75rem; text-transform: none; letter-spacing: 0; }
@media (max-width: 600px) {
  .match { gap: .5rem 14%; }
  h1 { font-size: 1.4rem; }
}

/* LexWay extras */
.flash { border: 2px solid rgba(31,122,77,.15); }
.flash.error { border-color: rgba(192,38,75,.15); }
.hero-strip { background: var(--brand); color: #fff; border-radius: 12px; border: 0; padding: .7rem 1rem; margin-bottom: 1.2rem; text-align: center; font-weight: 600; }
.chips.answer { border-color: #9edbd9; background: #f4fdfc; }
.group { border-color: #9edbd9; background: #f4fdfc; }
.blank { border-bottom-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.option.sel { border-color: var(--brand); background: var(--brand-soft); }
.option input { accent-color: var(--brand); }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 1rem 2rem; }
.footer a { color: var(--brand); }
.link-box { font-family: monospace; word-break: break-all; background: var(--brand-soft); border: 2px dashed #9edbd9; border-radius: 12px; padding: .8rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .3rem; }

/* public course catalogue: course tabs + lesson menu */
.course-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; overflow-x: auto; }
.course-tabs a { padding: .55rem 1.2rem; border-radius: 999px; font-weight: 800; background: var(--card); border: 2px solid var(--line); color: var(--brand); white-space: nowrap; }
.course-tabs a:hover { text-decoration: none; border-color: var(--teal-light); }
.course-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.course-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; align-items: start; }
.course-layout > * { min-width: 0; }
.lesson-menu { padding: .6rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.lesson-menu-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .3rem .5rem .5rem; }
.lesson-menu a { display: flex; gap: .55rem; align-items: baseline; padding: .45rem .55rem; border-radius: 10px; color: var(--ink); font-size: .93rem; line-height: 1.25; }
.lesson-menu a:hover { background: var(--brand-soft); text-decoration: none; }
.lesson-menu a .n { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.lesson-menu a.empty { color: var(--muted); }
.lesson-menu a.active { background: var(--brand); color: #fff; }
.lesson-menu a.active .n { color: #fff; }
.lesson-pager { margin-top: .4rem; }
@media (max-width: 860px) {
  .course-layout { grid-template-columns: 1fr; }
  .lesson-menu { position: static; display: flex; gap: .3rem; overflow-x: auto; max-height: none; padding: .5rem; }
  .lesson-menu-title { display: none; }
  .lesson-menu a { flex: 0 0 auto; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .lesson-menu a .t { margin-left: .35rem; }
}

/* bilingual commands, examples, reading texts and speaking practice */
.q-translation { color: var(--muted); font-style: italic; margin-top: .1rem; white-space: pre-wrap; }
.q-example { background: var(--brand-soft); border: 1px dashed #9fdcd9; border-radius: 12px; padding: .5rem .8rem; margin: .1rem 0 .8rem; white-space: pre-wrap; }
.q-num.info { background: var(--teal-light); }
.reading { background: #fbf8f6; border-left: 4px solid var(--teal-light); border-radius: 10px; padding: .9rem 1.1rem; white-space: pre-wrap; font-size: 1.05rem; line-height: 1.65; }
.speak-row { border: 2px solid var(--line); border-radius: 14px; padding: .7rem .9rem; margin-bottom: .6rem; }
.speak-row.done { border-color: #a9dcc0; background: var(--ok-soft); }
.speak-row audio { display: block; width: 100%; max-width: 360px; margin-top: .5rem; height: 36px; }
.speak-text { font-size: 1.15rem; font-weight: 800; margin-bottom: .4rem; }
.speak-status { font-size: .88rem; color: var(--muted); }
.speak-heard { margin-top: .4rem; font-size: .92rem; font-weight: 700; }
.speak-heard.ok { color: var(--ok); }
.speak-heard.bad { color: var(--warn); }
.btn.rec { background: var(--bad); border-color: var(--bad); color: #fff; }
.warnbox { background: var(--warn-soft); color: var(--warn); padding: .5rem .8rem; border-radius: 10px; }

/* interactive video */
.v-stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.q-video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 12px; }
.v-stage .q-video { border-radius: 0; }
.v-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: .75rem;
  background: rgba(10, 30, 30, .72); overflow-y: auto; }
.v-card { background: var(--card, #fff); color: var(--text, #1d2b2b); border-radius: 12px; padding: .9rem 1rem; width: min(34rem, 100%);
  box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.v-q { font-weight: 700; margin-bottom: .2rem; }
.v-opts { display: grid; gap: .4rem; margin: .6rem 0 .7rem; }
.v-opt { text-align: left; padding: .55rem .75rem; border: 1.5px solid var(--line, #d5dede); border-radius: 10px; background: transparent;
  color: inherit; font: inherit; cursor: pointer; }
.v-opt:hover { border-color: var(--brand, #0f5e5e); }
.v-opt.sel { border-color: var(--brand, #0f5e5e); background: var(--brand-soft, #e3f5f3); font-weight: 600; }
.v-list { margin: .3rem 0 0; padding-left: 1.2rem; }
.v-list li { margin: .2rem 0; }
.v-list .linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand, #0f5e5e); cursor: pointer; text-align: left; }
.v-list .linklike:disabled { color: var(--muted, #6b7a7a); cursor: default; }
.badge.extra { background: #fce4ef; color: var(--accent-dark); }
.ex-card.extra { border: 2px dashed #f3a6c8; }
/* LexStart */
.progress { height: .55rem; background: var(--line); border-radius: 99px; overflow: hidden; margin: .3rem 0 .2rem; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.save-state { font-size: .82rem; color: var(--muted); }
.save-state.ok { color: var(--ok); }
.save-state.bad { color: var(--bad); font-weight: 700; }
.save-state button { font: inherit; font-size: .8rem; margin-left: .3rem; }
.lesson-menu a .lesson-done { margin-left: auto; color: var(--ok); font-weight: 900; }
@media (max-width: 700px) {
  .topbar .inner { gap: .5rem; }
  .topbar .nav { order: 3; flex-basis: 100%; gap: .1rem; }
  .topbar .nav a { padding: .3rem .5rem; font-size: .92rem; }
  .topbar .who { margin-left: auto; }
}

/* AI writing feedback and pronunciation scores */
.ai-fb { border: 2px solid #bfeceb; background: #f6fdfc; border-radius: 14px; padding: .9rem 1rem; margin: .8rem 0; }
.ai-fb h3 { margin: 0 0 .5rem; color: var(--brand); }
.ai-corrected { background: #fff; }
.ai-line { margin: .7rem 0 .2rem; }
.ai-list { margin: .2rem 0 0; padding-left: 1.3rem; }
.ai-list li { margin: .45rem 0; }
.ai-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .3rem 1rem; margin: .7rem 0; }
.ai-score { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-weight: 700; font-size: .92rem; }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.ai-dots i.on { background: var(--brand); }
.pron { margin-top: .5rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pron-score { flex: none; min-width: 2.6rem; text-align: center; font-weight: 900; border-radius: 10px; padding: .2rem .45rem; }
.pron-score.hi, .pw.hi { background: var(--ok-soft); color: var(--ok); }
.pron-score.mid, .pw.mid { background: var(--warn-soft); color: #8a5600; }
.pron-score.lo, .pw.lo { background: var(--bad-soft); color: var(--bad); }
.pron-words { line-height: 2; }
.pw { font-weight: 800; border-radius: 7px; padding: .1rem .4rem; }
.pw.miss { background: #eee9df; color: #574f3f; text-decoration: line-through; }
.pron-heard { font-size: .9rem; color: var(--muted, #555); }
.pron-note.bad { color: var(--bad); font-weight: 700; }
.pron-note { flex-basis: 100%; font-size: .9rem; color: var(--ink); }
.speak-row .btn.small { min-height: 40px; }

/* Identidade visual LexWay: respiro, sombras suaves, foco visível e áreas de toque confortáveis */
.card { box-shadow: var(--shadow); border-width: 1px; }
.btn { min-height: 44px; border-radius: var(--radius-sm); font-family: var(--body); font-weight: 700; }
.btn.small { min-height: 40px; padding: .3rem .8rem; }
.btn.primary { font-size: 1.19rem; }             /* fúcsia com texto branco: AA para texto grande */
.btn.primary.small, .btn.rec { background: var(--brand); border-color: #003d3d; font-size: .95rem; }
.btn.rec { background: var(--bad); border-color: #8f1515; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; }
.seg button { min-height: 44px; min-width: 64px; }
.chip { min-height: 44px; display: inline-flex; align-items: center; }
.option { min-height: 48px; }
.m-item { min-height: 44px; }
input.blank, select.blank { min-height: 36px; }
.course-tabs a, .lesson-menu a { min-height: 44px; align-items: center; }
a:focus-visible, button:focus-visible, .chip:focus-visible, .m-item:focus-visible, .option:focus-within { outline: 3px solid var(--lex-petroleo); outline-offset: 2px; }
.footer a { text-decoration: underline; }
.q-translation, .tf-tr { color: var(--muted); }
.role-tag { color: var(--accent-dark); }
.logo .app { letter-spacing: .01em; }
.sheet-head h1 { color: #fff; }
.login-brand h1 { font-family: var(--display); font-weight: 700; color: var(--brand); }
.err-page { text-align: center; padding: 3rem 1rem; }
.err-page img { width: min(320px, 80%); height: auto; }
@media (max-width: 700px) {
  .logo img { height: 46px; }
  .btn.primary.big { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .card, .option, .m-item, .chip { transition: border-color .15s ease, background-color .15s ease, transform .1s ease; }
}

/* caminho do aluno: próximo passo, trilha da aula, sequência de dias e conclusão */
.streak { display: inline-block; margin: .8rem 0 0; padding: .3rem .8rem; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .92rem; }
.streak b { font-family: var(--display); font-size: 1.1rem; }
.next-step { background: var(--brand-soft); border-radius: var(--radius-sm); padding: .7rem .9rem; display: grid; gap: .1rem; margin-top: .3rem; }
.next-step.done { background: var(--ok-soft); }
.next-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lex-petroleo); }
.next-step.done .next-label { color: var(--ok); }
.trail-card { padding: .9rem 1.1rem; }
.trail { list-style: none; display: flex; align-items: center; padding: 0; margin: .7rem 0 0; }
.trail li { flex: 1 1 0; display: flex; align-items: center; }
.trail li:last-child { flex: 0 0 auto; }
.trail li::after { content: ""; flex: 1; height: 3px; background: var(--line); margin: 0 4px; border-radius: 3px; }
.trail li:last-child::after { display: none; }
.trail li.done::after { background: var(--brand); }
.trail li a, .trail li > span { text-decoration: none; display: grid; place-items: center; }
.trail li span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700;
  background: #fff; border: 2px solid var(--line); color: var(--muted); }
.trail li a > span { width: 44px; height: 44px; }
.trail li.done span { background: var(--brand); border-color: var(--brand); color: #fff; }
.trail li.open span { border-color: var(--accent); color: var(--accent-dark); }
.trail.small { margin-top: .5rem; max-width: 320px; }
.trail.small li > span { width: 26px; height: 26px; font-size: .78rem; border-width: 2px; }
.next-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.celebrate { position: relative; overflow: hidden; background: var(--brand) url("/static/img/pattern-branco.png?v=1") center / 420px auto; background-blend-mode: soft-light; color: #fff;
  border-radius: var(--radius); padding: 1.5rem 1.4rem; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.celebrate::before { content: ""; position: absolute; inset: 0; background: rgba(0,85,85,.86); }
.celebrate > * { position: relative; }
.celebrate h2 { color: #fff; margin: .4rem 0 .3rem; }
.celebrate p { margin: 0; }
.celebrate-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--lex-ciano); color: var(--brand); border-radius: 999px; padding: .2rem .7rem; }
.celebrate .btn { background: #fff; border-color: #cfe9e8; color: var(--brand); }
@media (max-width: 600px) { .trail li span, .trail li a > span { width: 36px; height: 36px; } .next-card .btn, .celebrate .btn { width: 100%; justify-content: center; } }
@media (max-width: 600px) { .result-hero { flex-direction: column; align-items: flex-start; gap: .6rem; } .result-hero .stack { text-align: left !important; width: 100%; } }
