/* Adaptação do visual de referência Stitch. Os dados e regras ficam em app.js. */
@font-face{font-family:Lexend;src:url('fonts/lexend-latin.woff2') format('woff2');font-style:normal;font-weight:400 700;font-display:swap}
:root{--surface:#faf8ff;--surface-soft:#f2f3ff;--surface-mid:#eaedff;--ink:#131b2e;--muted:#434655;--line:#c3c6d7;--blue:#004ac6;--blue-bright:#2563eb;--blue-soft:#dbe1ff;--green:#006e2d;--amber:#8a4a00;font-family:Lexend,Arial,sans-serif;color:var(--ink);background:var(--surface);font-size:18px;line-height:1.62}
body{background:var(--surface);color:var(--ink)}
button,input,select,textarea{font:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--blue-bright)!important;outline-offset:3px!important}
.topbar{min-height:80px;padding:9px max(24px,calc((100vw - 1320px)/2));background:#fff;color:var(--ink);border-bottom:1px solid var(--line);gap:24px}
.brand{flex:none;max-width:290px;color:var(--blue);font-size:21px;line-height:1.22;font-weight:700;letter-spacing:-.02em}
.brand strong{font-size:inherit;font-weight:700}
.top-actions{gap:14px;justify-content:flex-end;flex-wrap:wrap}
.header-context{display:flex;align-items:center;gap:3px;margin-right:auto;font-size:15px;line-height:1.3}
.header-progress,.header-skill{display:flex;align-items:center;min-height:52px;padding:8px 14px;background:var(--surface-soft);border:1px solid var(--line);border-radius:11px}
.header-progress{color:var(--blue);font-weight:700;max-width:145px}
.header-skill{max-width:320px;gap:6px}.header-skill strong{font-weight:650}
.header-tools{display:flex;gap:5px;align-items:center;border-right:1px solid var(--line);padding-right:12px}
.header-tools button{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:#30384e;font-size:25px;font-weight:650;line-height:1}
.header-tools button:hover,.header-tools button[aria-pressed="true"]{background:var(--blue-soft);color:var(--blue)}
.top-actions .header-pause,.top-actions .header-exit{background:#fff;color:var(--ink);border:1.5px solid var(--line);border-radius:11px;padding:7px 13px;min-height:48px;font-size:15px;font-weight:600}
.header-pause:hover,.header-exit:hover{background:var(--surface-soft)}
.header-user{font-size:13px;color:var(--muted);max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.instructions-panel{position:absolute;right:max(24px,calc((100vw - 1320px)/2));top:75px;z-index:10;max-width:340px;padding:17px;background:#fff;border:2px solid var(--blue-bright);border-radius:12px;box-shadow:0 6px 18px #131b2e18;font-size:15px}
.instructions-panel[hidden]{display:none}.instructions-panel p{margin:6px 0 0}
main{width:min(1368px,100%);padding:26px 24px 60px}
footer{background:var(--surface-soft);border-top:1px solid var(--line);color:var(--ink);padding:30px max(24px,calc((100vw - 1320px)/2));font-size:14px;text-align:left}
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.footer-inner strong{font-weight:600}.footer-inner span{color:var(--muted)}
h1,h2,h3{color:var(--ink);letter-spacing:-.02em}h1{font-size:clamp(30px,3vw,42px)}h2{font-size:clamp(24px,2.4vw,30px)}h3{font-size:21px}
.eyebrow{color:var(--blue);letter-spacing:.09em}.lead{color:var(--muted)}.form-note,.muted{color:var(--muted)}
.panel,.card{background:#fff;border:1.5px solid var(--line);border-radius:16px;box-shadow:none}
.card:hover{border-color:var(--blue-bright)}
.btn{min-height:52px;padding:10px 18px;border-radius:11px;background:var(--blue-bright);border:2px solid var(--blue-bright);color:#fff;font-weight:650;box-shadow:none}
.btn:hover{background:var(--blue);border-color:var(--blue)}
.btn.secondary,.btn.quiet{background:#fff;color:var(--ink);border-color:var(--line)}
.btn.secondary:hover,.btn.quiet:hover{background:var(--surface-soft);border-color:var(--blue-bright)}
.btn.warn{background:#fff;border-color:var(--line);color:var(--ink)}.btn.warn:hover{background:var(--surface-soft);border-color:var(--blue-bright)}
.btn.small{min-height:46px;padding:8px 13px;font-size:14px}
.btn:disabled{opacity:.5;cursor:not-allowed}.btn:disabled:hover{background:var(--blue-bright);border-color:var(--blue-bright)}
.field input,.field select,.admin-editor input,.admin-editor select,.admin-editor textarea{border:2px solid var(--line);border-radius:10px;color:var(--ink);background:#fff;min-height:52px}
.field input:focus,.field select:focus{border-color:var(--blue-bright)}
.pill{background:var(--blue-soft);color:var(--blue);border-radius:8px;font-size:13px;padding:5px 10px}.pill.amber{background:#fff1dc;color:var(--amber)}
.notice{background:var(--surface-soft);border-left-color:var(--blue-bright)}.notice.warning,.alert{background:#fff4e3;border-color:#cc8a2e}
.time-note{display:flex;gap:9px;align-items:center;padding:13px 16px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);font-size:13px;line-height:1.4;color:var(--ink)}.time-note span{color:var(--green)}

/* Tela de questão: áudio horizontal, problema à esquerda e escolha à direita. */
.exercise-shell{max-width:1320px;margin:0 auto}
.exercise-context{display:none;align-items:center;gap:10px;margin:0 0 16px;color:var(--muted);font-size:14px}
.audio-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 24px;padding:15px;background:#fff;border:1.5px solid var(--line);border-radius:15px}
.audio-main-actions,.audio-extra-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.audio-bar .btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:8px 15px;white-space:nowrap}.audio-bar .btn svg{width:21px;height:21px;flex:none}
.audio-bar .audio-primary{background:var(--blue-bright);border-color:var(--blue-bright);color:#fff}.audio-bar .audio-primary:hover{background:var(--blue)}
.audio-bar .quiet{background:var(--surface-mid)}.audio-bar .audio-extra-actions>.quiet{background:#fff}
.audio-rate{display:flex;align-items:center;gap:3px;padding:3px 4px 3px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);font-size:14px}
.audio-rate span{padding-right:5px}.audio-rate button{min-height:40px;padding:5px 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font-size:14px;cursor:pointer}
.audio-rate button[aria-pressed="true"]{background:var(--blue-bright);border-color:var(--blue-bright);color:#fff}
.exercise-grid{display:grid;grid-template-columns:minmax(0,1.38fr) minmax(380px,1fr);gap:24px;align-items:start}
.exercise-grid>.panel,.answer-column>.panel{min-width:0}
.exercise-prompt{padding:clamp(24px,2.8vw,40px);min-height:700px}
.question-tags{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 26px}.question-tags span{display:inline-flex;align-items:center;min-height:32px;padding:4px 12px;border-radius:6px;background:var(--surface-mid);color:#283044;font-size:13px;font-weight:600}.question-tags span+span{background:var(--surface-soft);color:var(--blue)}
.exercise-prompt .question-title{max-width:none;margin:0;font-size:clamp(27px,2.35vw,36px);line-height:1.43;letter-spacing:-.02em;font-weight:650}
.question-number{color:var(--blue);font-weight:700}.question-divider{height:2px;background:var(--surface-mid);margin:28px 0 20px}
.visual-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:13px;font-size:17px}.visual-heading strong{font-weight:650}.visual-heading strong span{color:var(--blue);font-size:23px;vertical-align:-2px;margin-right:6px}
.exercise-prompt .figure{display:block;min-height:300px;margin:0;padding:20px;background:var(--surface-soft);border:1.5px solid var(--line);border-radius:15px;text-align:center}
.figure-art{width:100%;min-height:190px;display:grid;place-items:center}.figure-art svg,.figure-art img{width:100%;max-width:650px;max-height:300px;height:auto;display:block;margin:auto}
.figure-caption{margin:15px auto 0;max-width:580px;color:var(--muted);font-size:15px;line-height:1.5;text-align:center}
.exercise-answer{padding:24px 25px}.answer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}.answer-heading h2{margin:0;font-size:19px;line-height:1.35}.answer-heading span{font-size:13px;white-space:nowrap;color:var(--muted)}
.exercise-answer .alternatives{display:grid;grid-template-columns:1fr;gap:12px;margin:16px 0 0}
.exercise-answer .choice{display:flex;align-items:center;gap:18px;width:100%;min-height:78px;padding:12px 23px;border:2px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);text-align:left;font-size:23px;font-weight:500;line-height:1.3}
.exercise-answer .choice:hover{background:var(--surface-soft);border-color:var(--blue-bright)}
.exercise-answer .choice.selected{border-color:var(--blue);outline:2px solid var(--blue);outline-offset:2px;background:var(--surface-soft);color:var(--blue);font-weight:650}
.choice-letter{flex:none;display:grid;place-items:center;width:43px;height:43px;border-radius:50%;background:var(--blue-soft);color:var(--blue);font-size:19px;font-weight:700}.choice.selected .choice-letter{background:var(--blue);color:#fff}
.choice-text{flex:1;min-width:0;overflow-wrap:anywhere}.choice-radio{flex:none;width:28px;height:28px;border:2px solid #737686;border-radius:50%;background:#fff}.choice.selected .choice-radio{border:8px solid var(--blue)}
.exercise-controls{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:15px;margin:25px 0 15px}.help-control .btn{width:100%;background:#fff;color:var(--ink);border-color:var(--line)}.help-control .btn:hover{border-color:var(--blue-bright);background:var(--surface-soft)}.help-control .btn span{color:var(--blue);font-size:22px;margin-right:5px}.help-control small{display:block;margin-top:8px;color:var(--muted);font-size:12px;line-height:1.45}.confirm-answer{width:100%;min-height:58px}.confirm-answer span{font-size:22px;margin-left:6px}
.proof-skip{width:100%;margin:0 0 13px}.exercise-bottom{display:flex;justify-content:flex-end;margin-top:17px}.exercise-bottom .btn{font-size:14px;min-height:43px}

/* Mesmos tokens nas demais telas do aluno, professor e página de entrada. */
.skill-card,.student-progress-card{border:1.5px solid var(--line);border-radius:15px;background:#fff;color:var(--ink)}.skill-card:hover{border-color:var(--blue-bright);background:var(--surface-soft)}
.diagnostic-intro-panel,.diagnostic-banner,.dashboard-hero,.grade-reference{background:var(--surface-soft);border:1.5px solid var(--line);border-radius:16px}
.diagnostic-banner strong,.dashboard-hero strong,.grade-reference strong{color:var(--ink)}.diagnostic-banner p,.dashboard-hero p{color:var(--muted)}
.diagnostic-track,.grade-bar{background:var(--blue-soft)}.diagnostic-track span,.grade-bar i{background:var(--blue-bright)}
.diagnostic-skill{background:#fff;border-color:var(--line);color:var(--ink)}.diagnostic-skill b{background:var(--blue-soft);color:var(--blue)}.diagnostic-skill.is-done{background:#ecf8f0;border-color:#97c5a5}.diagnostic-skill.is-done b{background:var(--green)}
.diagnostic-finish-mark{background:var(--blue-soft);color:var(--blue)}.teacher-summary-grid>div,.metric,.empty,.activity-box{background:var(--surface-soft)}.teacher-summary-grid strong,.code{color:var(--blue)}
.dashboard-kicker{color:var(--blue)}.dashboard-number{border:1px solid var(--line)}.level-track span{background:var(--blue-soft)}.level-track span.filled{background:var(--blue-bright)}
.teacher-tabs [aria-current="page"],.sidebar button.active{background:var(--blue);border-color:var(--blue);color:#fff}.sidebar button{border-color:var(--line);color:var(--ink)}
.admin-editor input[type=checkbox]{accent-color:var(--blue-bright)}.editor-figure,.table-wrap{border-color:var(--line)}th{background:var(--surface-soft)}td,th{border-bottom-color:var(--line)}
.activity-box{border-color:var(--line)}.notice.warning{background:#fff4e3}
.landing{gap:64px}.landing-hero{min-height:590px;background:linear-gradient(118deg,#fff 0%,#f7f8ff 52%,#e9edff 100%);border-color:var(--line);border-radius:25px}.landing-hero::before,.landing-hero::after{border-color:#dbe1ff}.landing-label{color:var(--blue);border-color:var(--line);background:var(--surface-soft)}.landing-label span{color:var(--blue-bright)}
.landing-copy h1,.landing-section-heading h2,.landing-benefit h3,.landing-closer h2{color:var(--ink)}.landing-copy h1 em{color:var(--blue)}.landing-lead,.landing-section-heading>p,.landing-benefit p{color:var(--muted)}
.landing-primary{background:var(--blue-bright);border-color:var(--blue-bright);box-shadow:none}.landing-primary:hover{background:var(--blue);border-color:var(--blue)}.landing-secondary{background:#fff;border-color:var(--line);color:var(--ink)}.landing-secondary:hover{background:var(--surface-soft)}.landing-entry-note{color:var(--muted)}.landing-entry-note span{color:var(--green)}
.landing-showcase::before{background:#dbe1ff}.showcase-card,.landing-highlights{border-color:var(--line);box-shadow:none}.showcase-stage,.showcase-brand-icon,.showcase-progress i:first-child,.showcase-caption span{background:var(--blue-soft);color:var(--blue)}.showcase-top,.showcase-card h2,.landing-highlights strong{color:var(--ink)}.showcase-small,.showcase-help{color:var(--blue)}.showcase-figure{background:var(--surface-soft);border-color:var(--line)}.showcase-group{border-color:var(--blue-bright)}.showcase-group i{background:var(--blue-bright);border-color:var(--blue)}.showcase-plus{color:var(--blue)}.showcase-answers span{border-color:var(--line);color:var(--ink)}.showcase-caption{border-color:var(--line);color:var(--ink)}
.highlight-icon,.landing-highlights>div:nth-child(2) .highlight-icon,.landing-highlights>div:nth-child(3) .highlight-icon{background:var(--blue-soft);color:var(--blue)}
.landing-benefit,.landing-benefit:nth-child(2),.landing-benefit:nth-child(3){background:var(--surface-soft);border-color:var(--line)}.benefit-icon,.landing-benefit:nth-child(2) .benefit-icon,.landing-benefit:nth-child(3) .benefit-icon{border-color:var(--line);color:var(--blue)}.benefit-drawing-one span{border-color:var(--blue-bright);color:var(--blue)}.benefit-drawing-two span{border-color:var(--blue-soft);color:var(--blue)}.benefit-drawing-three span{background:#91a6ef}
.landing-teacher{background:var(--blue);border-radius:24px}.landing-teacher-label{color:#dbe1ff}.landing-teacher p:not(.landing-teacher-label){color:#eef1ff}.landing-teacher-button{color:var(--blue)}.landing-teacher-button:hover{background:var(--surface-soft);border-color:var(--surface-soft);color:var(--blue)}.teacher-preview{box-shadow:none}.teacher-preview-badge,.teacher-preview-foot{background:var(--blue-soft);color:var(--blue)}.teacher-preview-chart span{background:#b4c5ff}.teacher-preview-chart span:last-child{background:var(--blue-bright)}.teacher-preview-row strong{color:var(--blue)}
.landing-closer{background:var(--surface-soft);border-color:var(--line)}.landing-footnote{color:var(--muted)}

body.high-contrast{--surface:#fff;--surface-soft:#e9efff;--surface-mid:#d8e2ff;--ink:#000;--muted:#202020;--line:#283044;--blue:#00399b;--blue-bright:#004ac6;--blue-soft:#d8e2ff}
body.high-contrast .topbar,body.high-contrast .panel,body.high-contrast .audio-bar,body.high-contrast .choice{border-color:#283044}
body.large-text{font-size:20px}body.large-text .question-title{font-size:clamp(31px,2.8vw,40px)}body.large-text .choice{font-size:26px}body.large-text .form-note,body.large-text .figure-caption,body.large-text .time-note{font-size:17px}

@media(max-width:1250px){.topbar{gap:12px}.brand{max-width:220px;font-size:18px}.header-context{font-size:13px}.header-skill{max-width:245px}.header-user{display:none}.exercise-grid{grid-template-columns:minmax(0,1.2fr) minmax(355px,1fr)}}
@media(max-width:1000px){.header-context{display:none}.exercise-context{display:flex}.exercise-grid{grid-template-columns:1fr}.exercise-prompt{min-height:0}.answer-column{max-width:none}.audio-bar{align-items:flex-start}.exercise-answer .alternatives{grid-template-columns:repeat(2,minmax(0,1fr))}.exercise-answer .choice{min-height:75px}}
@media(max-width:700px){.topbar{padding:11px 18px;align-items:flex-start}.brand{font-size:17px;max-width:185px}.top-actions{margin-left:auto}.header-tools{border:0;padding:0}.header-tools button{width:44px;height:44px;font-size:21px}.top-actions .header-pause,.top-actions .header-exit{font-size:13px;min-height:44px}.instructions-panel{top:70px;right:18px;left:18px;max-width:none}main{padding:20px 16px 44px}.footer-inner{display:grid;gap:7px}.audio-bar{padding:12px}.audio-main-actions,.audio-extra-actions{width:100%}.audio-bar .btn{flex:1}.audio-rate{width:100%;justify-content:space-between}.exercise-grid{gap:16px}.exercise-prompt,.exercise-answer{padding:20px}.exercise-prompt .question-title{font-size:26px}.exercise-prompt .figure{padding:12px}.exercise-answer .alternatives{grid-template-columns:1fr}.exercise-answer .choice{min-height:69px;font-size:21px}.exercise-controls{grid-template-columns:1fr}.help-control small{text-align:center}.answer-heading{align-items:flex-start;flex-direction:column}.answer-heading span{white-space:normal}}
@media(max-width:430px){.topbar{display:grid;grid-template-columns:1fr auto}.top-actions{justify-content:flex-end}.header-pause{order:2}.header-exit{order:3}.brand{max-width:170px}.audio-main-actions .audio-primary{flex-basis:100%}.audio-extra-actions>.quiet{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Ajustes de fidelidade para a tela Stitch em notebook. */
@media(min-width:1251px){
  .topbar{height:80px;min-height:80px;padding-top:0;padding-bottom:0}
  .brand{width:310px;max-width:310px;font-size:26px;line-height:1.48}
  .top-actions{width:952px;gap:13px;flex-wrap:nowrap;margin-left:auto}
  .header-context{flex:none;margin:0;gap:0;font-size:17px}
  .header-progress{width:170px;max-width:none;font-size:18px}
  .header-skill{width:368px;max-width:none;justify-content:center;gap:6px;text-align:center}
  .header-tools{flex:none;width:177px;justify-content:center;gap:9px;padding-right:16px}
  .top-actions .header-pause{width:210px;min-height:63px;font-size:19px;line-height:1.4}
  .audio-bar{min-height:92px;padding:15px}
  .audio-bar .btn{min-height:59px;font-size:19px}
  .audio-rate{font-size:17px}.audio-rate button{font-size:17px}
  .exercise-grid{grid-template-columns:minmax(0,760px) minmax(0,535px);gap:25px}
  .exercise-prompt{min-height:750px}
  .exercise-answer{padding:25px}
  .exercise-answer .choice{font-size:25px}
  .exercise-controls{margin-top:35px}
  .help-control .btn,.confirm-answer{min-height:66px;font-size:20px}
  .figure-art svg,.figure-art img{max-height:360px}
}
.audio-bar{margin-bottom:25px}
.question-tags{margin-bottom:27px}
.question-tags span{font-size:16px;min-height:36px;padding:4px 13px}
.visual-heading{font-size:18px}
.exercise-prompt .figure{padding:22px 19px 24px}
.figure-caption{font-size:17px;line-height:1.65}
.answer-heading h2{font-size:20px}
.answer-heading span{font-size:16px}
.exercise-answer .alternatives{gap:13px}
.help-control .btn{display:flex;align-items:center;justify-content:center;gap:10px}
.help-control .btn svg{width:23px;height:23px;color:var(--blue)}
.help-control small{font-size:14px}
.confirm-answer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-left:24px;padding-right:19px;line-height:1.28;text-align:center}
.confirm-label{flex:1}.confirm-answer .confirm-arrow{flex:none;font-size:28px;line-height:1;margin:0}
.time-note{font-size:14px}
.showcase-figure{min-height:205px;padding:12px}
.showcase-figure svg{display:block;width:100%;height:185px}
.showcase-answers .showcase-selected{border-color:var(--blue);background:var(--surface-soft);color:var(--blue)}
.landing-teacher h2{color:#fff}
.landing-teacher .landing-teacher-button{background:#fff;border-color:#fff;color:var(--blue)}
.landing-teacher .landing-teacher-button:hover{background:var(--surface-soft);border-color:var(--surface-soft);color:var(--blue)}
.footer-inner{display:grid;grid-template-columns:1.45fr .55fr 1fr;align-items:start;gap:40px;max-width:1320px;margin:0 auto;font-size:18px;line-height:1.55}
.footer-inner strong{max-width:580px;color:var(--ink)}
.footer-inner span{color:var(--ink)}
@media(max-width:1000px){.footer-inner{grid-template-columns:1fr 1fr;font-size:15px;gap:12px}}
@media(max-width:700px){.footer-inner{grid-template-columns:1fr;font-size:14px;gap:7px}.showcase-figure svg{height:165px}}
@media(max-width:520px){.landing-actions .btn,.landing-closer .btn{display:flex;align-items:center;justify-content:center;gap:10px;white-space:nowrap;font-size:15px;padding-left:10px;padding-right:10px}.landing-primary span{margin-left:0}}

/* Cores pedagógicas: objetos vivos sobre superfícies calmas e sem movimento. */
.exercise-prompt .figure{background:linear-gradient(145deg,#f0f5ff 0%,#f7f4ff 62%,#fff6ee 100%);border-color:#9eaee0}
.figure-art{min-height:250px}
.generated-scene{width:100%;margin-bottom:14px;padding:10px;border:1px solid #c8d7e6;border-radius:14px;background:#fff}
.generated-scene img{display:block;width:100%;max-height:220px;object-fit:contain}
.generated-scene small{display:block;margin-top:5px;color:#45566b;font-size:13px;font-weight:700;text-align:center}
.figure-art svg{max-height:430px;filter:drop-shadow(0 2px 2px #14213d12)}
.figure-caption{max-width:none;margin:18px 0 0;padding:13px 16px;border:1px solid #c6d1f2;border-left:5px solid #2563eb;border-radius:9px;background:#fff;color:#24314e;text-align:left;font-size:16px;line-height:1.55}
.visual-heading .pill{background:#dbeafe;color:#1245a8}
.question-tags span:first-child{background:#e8e5ff;color:#3d2c9d}
.question-tags span+span{background:#dcf7ee;color:#075f49}
body.high-contrast .exercise-prompt .figure{background:#fff;border-color:#283044}
body.high-contrast .figure-caption{border-color:#283044;color:#000}
@media(max-width:700px){.figure-art{min-height:210px}.figure-art svg{max-height:360px}.figure-caption{font-size:15px}}
