:root{font-family:'DM Sans',system-ui,sans-serif;color:#263a35;background:#f6f7f3;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #d49a54;outline-offset:2px}#app{display:flex;min-height:100vh}aside{position:fixed;inset:0 auto 0 0;width:245px;background:#fff;border-right:1px solid #e6ebe5;padding:33px 20px;display:flex;flex-direction:column}.brand{display:flex;gap:10px;align-items:center;font-family:'DM Serif Display',serif;font-size:28px;line-height:1}.brandicon{display:grid;place-items:center;background:#2d6353;color:white;border-radius:10px;width:40px;height:40px;font-family:sans-serif;font-size:25px}.brand small,.asidebottom small{display:block;font:600 9px 'DM Sans',sans-serif;letter-spacing:1.4px;color:#93a29a;margin-top:5px}.navlabel{font-size:10px;font-weight:700;letter-spacing:1.5px;color:#a4b0a8;margin:56px 12px 14px}nav{display:grid;gap:5px}nav button{border:0;background:transparent;text-align:left;padding:13px 15px;border-radius:8px;color:#6c7f75;font-weight:600}nav button span{display:inline-block;width:29px;font-size:17px}nav button.active{color:#2c6552;background:#eaf3ec}.asidebottom{margin-top:auto;border-top:1px solid #edf0eb;padding-top:20px;display:flex;align-items:center;gap:10px;font-size:12px}.asidebottom small{letter-spacing:0;font-weight:400}.avatar{background:#e4eee6;border-radius:50%;width:36px;height:36px;display:grid;place-items:center;color:#3d725a;font-weight:bold}main{margin-left:245px;width:calc(100% - 245px);padding:39px 5% 70px;max-width:1700px}header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:32px}.eyebrow,.kicker{font-size:10px;font-weight:700;letter-spacing:1.8px;color:#9b7653}h1,h2,h3,p{margin-top:0}h1{font:36px 'DM Serif Display',serif;margin:8px 0;color:#203b32}header p{color:#87978e;margin:0}.headright{display:flex;gap:20px;align-items:center}.local{color:#70977b;font-size:12px;white-space:nowrap}.outline,.btn{border:1px solid #d7e3da;background:white;color:#356b58;padding:12px 17px;border-radius:8px;font-weight:700}.btn.primary{background:#316b57;color:white;border-color:#316b57}.btn.dark{background:#203f35;color:white;border-color:#203f35}.btn.warm{background:#eac593;border-color:#eac593;color:#3d4738}.btn.small{padding:8px 12px;font-size:12px}.btn:disabled{opacity:.5;cursor:not-allowed}.hero{background:#dcece0;border-radius:16px;padding:32px 36px;position:relative;overflow:hidden;min-height:240px;display:flex;justify-content:space-between;align-items:center}.hero:after{content:'✳';font-size:270px;line-height:1;color:#c5ddcc;position:absolute;right:22px;top:-30px;opacity:.65}.hero>div{position:relative;z-index:1;max-width:650px}.pill{display:inline-block;background:#f4faf4;color:#63866e;border-radius:20px;padding:7px 11px;font-size:10px;font-weight:700;letter-spacing:.7px}.hero h2{font:34px 'DM Serif Display',serif;line-height:1.1;margin:18px 0 10px}.hero p{color:#668071;line-height:1.65;max-width:470px}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.sectionhead{display:flex;align-items:center;justify-content:space-between;margin:34px 0 16px}.sectionhead h2{font:24px 'DM Serif Display',serif;margin:0}.muted{color:#8c9b91}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.card{background:#fff;border:1px solid #e8ece6;border-radius:13px;padding:23px;box-shadow:0 3px 14px #29453605}.card h3{font-size:15px;margin:12px 0 8px}.card p{font-size:13px;color:#8a9a90;line-height:1.6}.icon{width:39px;height:39px;border-radius:10px;background:#edf5ec;display:grid;place-items:center;color:#4c8065;font-size:18px}.icon.peach{background:#faf0e6;color:#b78150}.icon.blue{background:#e9f1f1;color:#648887}.cardlink{border:0;background:none;padding:0;color:#4b8064;font-weight:700;font-size:12px}.stat{font:30px 'DM Serif Display',serif;color:#345d4d}.statlabel{color:#93a096;font-size:12px}.split{display:grid;grid-template-columns:2fr 1fr;gap:18px}.wide{max-width:1000px}.label{font-size:11px;text-transform:uppercase;letter-spacing:1px;font-weight:700;color:#91a096}.question{font:26px 'DM Serif Display',serif;line-height:1.35;color:#243f35;margin:18px 0}.chunk{background:#eef5ee;padding:22px;border-radius:10px;font-size:19px;line-height:1.6;margin:18px 0}.controls{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}textarea,input,select{width:100%;border:1px solid #dbe4db;border-radius:8px;padding:11px;background:#fff;color:#263a35}textarea{min-height:105px;resize:vertical}label{display:block;font-weight:600;font-size:12px;margin:15px 0 7px}dialog{border:0;border-radius:14px;padding:0;width:min(650px,92vw);max-height:90vh;box-shadow:0 20px 60px #1a332745}dialog::backdrop{background:#182e25a0}#form{padding:28px}.formhead{display:flex;justify-content:space-between;align-items:center}.formhead h2{font:26px 'DM Serif Display',serif;margin:0}.close{border:0;background:#f1f4ef;border-radius:50%;width:32px;height:32px;font-size:20px}.formactions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.item{padding:18px 0;border-bottom:1px solid #eef1ed}.item:last-child{border-bottom:0}.item h3{margin:0 0 6px}.empty{padding:30px;color:#819188;text-align:center}.progress{height:7px;background:#e8eee8;border-radius:10px;overflow:hidden}.progress span{display:block;height:100%;background:#75a886}.badge{background:#f1f5ef;border-radius:20px;padding:6px 9px;color:#789281;font-size:11px}.notice{border-left:3px solid #c49358;background:#fcf6ee;padding:14px;color:#856c50;line-height:1.5;margin:16px 0}.sessionsteps{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.sessionsteps span{padding:8px 12px;border-radius:20px;background:#f1f4ef;color:#8b9c90;font-size:11px;font-weight:700}.sessionsteps span.on{background:#dceee0;color:#3b7756}#toast{position:fixed;bottom:25px;right:25px;background:#244b3d;color:white;border-radius:8px;padding:12px 16px;display:none;z-index:10}audio{width:100%;margin:10px 0}@media(max-width:950px){aside{width:190px}main{margin-left:190px;width:calc(100% - 190px);padding:30px}.grid{grid-template-columns:repeat(2,1fr)}.headright .local{display:none}}@media(max-width:650px){#app{display:block}aside{position:static;width:100%;padding:15px;display:block}.brand{font-size:22px}.brandicon{width:32px;height:32px}.navlabel,.asidebottom{display:none}nav{display:flex;overflow:auto;margin-top:15px}nav button{white-space:nowrap;padding:9px}nav button span{width:auto;margin-right:4px}main{margin:0;width:100%;padding:24px 17px}header{display:block}.headright{margin-top:15px}h1{font-size:30px}.grid,.split{grid-template-columns:1fr}.hero{padding:25px}.hero h2{font-size:28px}.hero:after{font-size:180px;right:-30px;top:15px}}

/* Legibilidade e navegação acessível */
:root{font-size:100%}
.brand small,.asidebottom small{font-size:.75rem;color:#52695c}
.navlabel{font-size:.75rem;color:#52695c}
nav button{color:#425b4c}
.eyebrow,.kicker{font-size:.75rem;color:#76532f}
header p,.muted{color:#52695c}
.local{font-size:.875rem;color:#3e6a4d}
.pill{font-size:.75rem;color:#355c43}
.hero p{color:#405b49}
.card h3{font-size:1rem}
.card p{font-size:.95rem;color:#52695c}
.cardlink{font-size:.875rem;color:#34634a}
.statlabel{font-size:.875rem;color:#52695c}
.label{font-size:.8rem;color:#536b5b}
label{font-size:.9rem}
.badge{font-size:.8rem;color:#425d4b}
.notice{color:#694f32}
.sessionsteps span{font-size:.8rem;color:#536b5b}
.sessionsteps span.on{color:#285b3c}
.btn.small{font-size:.875rem;min-height:2.75rem}
.empty{color:#52695c}
.skip-link{position:absolute;top:.5rem;left:.5rem;z-index:100;transform:translateY(-200%);background:#fff;color:#173b2e;padding:.75rem;border:2px solid #245b43;border-radius:.4rem}
.skip-link:focus{transform:translateY(0)}
@media(max-width:650px){nav button{min-height:2.75rem}}

/* Tipografia uniforme com fontes nativas, sem depender de carregamento externo. */
:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:100%}
body{line-height:1.5;text-rendering:optimizeLegibility}
.brand,.brand small,.asidebottom small,h1,.hero h2,.sectionhead h2,.stat,.question,.formhead h2{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
h1{font-weight:700;letter-spacing:-.025em;line-height:1.2}
.hero h2,.sectionhead h2,.formhead h2{font-weight:700;letter-spacing:-.02em}
.question{font-weight:650;letter-spacing:-.015em}
nav button{line-height:1.35}
.card h3{font-weight:650;line-height:1.4}
@media(min-width:651px){nav button{display:flex;align-items:center;gap:.5rem}nav button span{flex:0 0 1.4rem;width:1.4rem}}
.question-picker{border:1px solid #d5e1d8;border-radius:12px;padding:1rem;margin:1.3rem 0;min-width:0}.question-picker legend{font-weight:700;color:#203b32;padding:0 .4rem}.question-choice{display:flex;gap:.8rem;align-items:flex-start;border:1px solid #dce7dd;border-radius:9px;padding:.8rem;margin:.5rem 0;font-size:1rem;font-weight:400;line-height:1.5}.question-choice:has(input:checked){background:#edf5ee;border-color:#85ad92}.question-choice input{width:1.2rem;height:1.2rem;flex:none;margin:.2rem 0}.question-choice span{min-width:0;overflow-wrap:anywhere}.question-jump{border:1px solid #dbe7dc;border-radius:10px;padding:.8rem 1rem;margin:1rem 0}.question-jump .row{flex-wrap:wrap}.question-jump select{flex:1;min-width:min(100%,16rem)}

/* Piloto local: jornada de importação */
.import-pilot { --import-ink:#203b32; --import-muted:#425b4c; --import-border:#c7d8cb; --import-surface:#f5f9f5; }
.import-pilot h2 { color:var(--import-ink); margin-bottom:.5rem }
.import-pilot h3 { color:var(--import-ink); font-size:1.125rem; margin:0 0 .5rem }
.import-pilot p { color:var(--import-muted); font-size:1rem; line-height:1.55; margin-bottom:.75rem }
.import-steps { display:grid; gap:1rem; margin-top:1.5rem }
.import-steps > section { min-width:0; border:1px solid var(--import-border); border-radius:.75rem; padding:1.25rem; background:var(--import-surface) }
.import-pilot .btn { display:inline-flex; align-items:center; justify-content:center; min-height:2.75rem; text-decoration:none; text-align:center }
.import-pilot a:focus-visible, .import-pilot summary:focus-visible { outline:3px solid #a96008; outline-offset:3px }
.import-pilot summary { cursor:pointer; color:#285b3c; font-weight:700; padding:.5rem 0 }
.import-pilot textarea { min-height:12rem; background:#fff }
.import-pilot #file-status { margin:.75rem 0; overflow-wrap:anywhere }
.import-pilot .import-help { font-size:.925rem }
.import-pilot .notice { overflow-wrap:anywhere }
@media(max-width:650px){.import-steps > section {padding:1rem}.import-pilot .controls > * {width:100%}}

/* Sistema visual do piloto — identidade verde, legibilidade e estados. */
:root {
  --habla-text: #203b32;
  --habla-muted: #425b4c;
  --habla-primary: #316b57;
  --habla-primary-hover: #24503f;
  --habla-surface: #fff;
  --habla-border: #6a8070;
  --habla-focus: #a96008;
  --habla-radius: .5rem;
  --habla-space-2: .5rem;
  --habla-space-4: 1rem;
  --habla-space-6: 1.5rem;
  color: var(--habla-text);
}
/* A herança de fontes evita dependência de fontes externas e de regras inline legadas. */
.wide.card h2 { font-family: inherit !important; }
main, .wide, .card, .grid > *, .split > * { min-width: 0; }
.card, .question, .chunk, .notice, .item, #ostatus, #recordstatus { overflow-wrap: anywhere; }
.card p, header p, .muted { color: var(--habla-muted); }
label { font-size: 1rem; line-height: 1.45; }
textarea, input:not([type=range]):not([type=checkbox]):not([type=radio]), select {
  border-color: var(--habla-border);
  min-height: 2.75rem;
  max-width: 100%;
}
textarea { min-height: 6.5rem; }
.btn, .outline { min-height: 2.75rem; line-height: 1.35; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn:not(:disabled):hover, .outline:not(:disabled):hover { border-color: var(--habla-primary-hover); }
.btn.primary:not(:disabled):hover { background: var(--habla-primary-hover); color: #fff; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
a:focus-visible, summary:focus-visible { outline: 3px solid var(--habla-focus); outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
summary { cursor: pointer; }
aside { overflow-y: auto; }
@media (max-width: 650px) {
  aside { overflow: visible; }
  nav { max-width: 100%; overscroll-behavior-inline: contain; }
  .sectionhead { flex-wrap: wrap; gap: .75rem; }
  .formactions { flex-wrap: wrap; }
  .controls > .btn, .controls > a.btn { max-width: 100%; }
  #toast { max-width: calc(100vw - 2rem); right: 1rem; bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; }
  .btn, .outline, input, select, textarea { border: 1px solid ButtonText; }
}

/* Evolução integral: controles identificáveis e menu móvel sem itens ocultos. */
.btn:not(.primary):not(.dark):not(.warm), .outline { border-color: var(--habla-border); }
button, summary, .close { min-height: 44px; }
.close { min-width: 44px; }
summary { padding: .65rem .25rem; }
.model-answer { margin: 1rem 0; padding: .5rem 1rem; border: 1px solid var(--habla-border); border-radius: .75rem; background: #f5f9f5; }
.model-answer p { margin-top: .75rem; }
.chunk > span { display: block; font-size: .875rem; font-weight: 700; color: #425b4c; margin-bottom: .5rem; }
textarea::placeholder, input::placeholder { color: #52695c; opacity: 1; }
[role=status], [role=alert] { overflow-wrap: anywhere; }
@media (max-width:650px) {
  nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; gap:.35rem; }
  nav button { white-space:normal; min-width:0; display:flex; gap:.4rem; align-items:center; }
  nav button span { flex:0 0 1.25rem; }
  .controls > .btn { flex:1 1 10rem; }
  .question { font-size:clamp(1.2rem,5vw,1.625rem); }
  .chunk { padding:1rem; font-size:1.05rem; }
  #form { padding:1rem; }
}

/* Tema escuro padrão; tema claro preserva os estilos originais. */
html[data-theme="dark"] { color-scheme:dark; --habla-text:#e1eee6; --habla-muted:#b3c9bb; --habla-primary:#4d9b7b; --habla-primary-hover:#34775e; --habla-surface:#1c2d28; --habla-border:#789588; --habla-focus:#ffc77d; --import-surface:#1c2d28; --import-border:#789588; background:#101b18; color:var(--habla-text) }
html[data-theme="dark"] body,html[data-theme="dark"] main { background:#101b18; color:#e1eee6 }
html[data-theme="dark"] aside,html[data-theme="dark"] .card,html[data-theme="dark"] dialog { background:#1c2d28; color:#e1eee6; border-color:#40584c }
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] .question,html[data-theme="dark"] .question-picker legend { color:#e1eee6 }
html[data-theme="dark"] .card p,html[data-theme="dark"] header p,html[data-theme="dark"] .muted,html[data-theme="dark"] .label,html[data-theme="dark"] .statlabel { color:#b3c9bb }
html[data-theme="dark"] nav button {color:#bbd1c2} html[data-theme="dark"] nav button.active {background:#304d3e;color:#e5fae9}
html[data-theme="dark"] .btn:not(.primary):not(.dark):not(.warm),html[data-theme="dark"] .outline,html[data-theme="dark"] input:not([type=range]),html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .import-pilot textarea {background:#172721;color:#e6f4ea;border-color:#789588}
html[data-theme="dark"] .btn.primary {background:#347a5e;color:#fff;border-color:#76b898} html[data-theme="dark"] .btn.primary:hover {background:#28654d}
html[data-theme="dark"] .hero,html[data-theme="dark"] .chunk,html[data-theme="dark"] .model-answer,html[data-theme="dark"] .question-choice:has(input:checked) {background:#294437;color:#e3f2e7;border-color:#789588} html[data-theme="dark"] .hero:after {color:#436856} html[data-theme="dark"] .hero p,html[data-theme="dark"] .chunk>span {color:#c0d8c7}
html[data-theme="dark"] .badge,html[data-theme="dark"] .pill,html[data-theme="dark"] .sessionsteps span,html[data-theme="dark"] .icon,html[data-theme="dark"] .avatar,html[data-theme="dark"] .close {background:#30483b;color:#d5eadb} html[data-theme="dark"] .sessionsteps span.on {background:#416c50;color:#fff}
html[data-theme="dark"] .notice {background:#3b3022;color:#f5dbb5} html[data-theme="dark"] .item,html[data-theme="dark"] .asidebottom {border-color:#40584c} html[data-theme="dark"] .stat,html[data-theme="dark"] .cardlink {color:#a4ddbb}
html[data-theme="dark"] textarea::placeholder,html[data-theme="dark"] input::placeholder {color:#b3c9bb} html[data-theme="dark"] .progress {background:#40584c} html[data-theme="dark"] .skip-link {background:#172721;color:#fff}
