:root{
  --navy:#071a3a;--navy-2:#0d2b59;--ink:#14233c;--muted:#617089;--line:#dbe4ef;
  --paper:#f4f7fb;--card:#fff;--profile:#145cff;--profile-soft:#eef4ff;--profile-rgb:20,92,255;
  --shadow:0 18px 50px rgba(7,26,58,.09)
}
html[data-profile="aluno"]{--profile:#24864a;--profile-soft:#eef8f1;--profile-rgb:36,134,74}
html[data-profile="professor"]{--profile:#0b7567;--profile-soft:#edf8f6;--profile-rgb:11,117,103}
html[data-profile="familia"]{--profile:#c65e1d;--profile-soft:#fff4ec;--profile-rgb:198,94,29}
html[data-profile="escola"]{--profile:#315f9c;--profile-soft:#eef4fb;--profile-rgb:49,95,156}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{min-height:100%;background:var(--paper)}
body{margin:0;min-width:320px;min-height:100vh;font-family:Nunito,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:linear-gradient(180deg,#f7f9fc 0%,#f2f6fa 100%);line-height:1.5}
a{color:inherit}button,textarea{font:inherit}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:focus-visible{outline:3px solid rgba(var(--profile-rgb),.35);outline-offset:3px}

.ia-shell{width:min(1040px,calc(100% - 28px));margin:0 auto;padding:14px 0 28px}
.ia-topbar{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.ia-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--navy)}
.ia-mark{width:42px;height:42px;flex:0 0 42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,var(--navy),var(--navy-2));color:#fff;font-size:18px;font-weight:900;box-shadow:0 7px 18px rgba(7,26,58,.15)}
.ia-brand strong,.ia-brand small{display:block}.ia-brand strong{font-size:17px;line-height:1}.ia-brand small{margin-top:4px;color:var(--muted);font-size:8.5px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.ia-profile-button{min-height:38px;border:1px solid var(--line);background:#fff;padding:8px 13px;border-radius:999px;color:var(--ink);font-weight:900;display:flex;align-items:center;gap:8px;cursor:pointer;box-shadow:0 4px 12px rgba(7,26,58,.04)}
.ia-profile-dot{width:8px;height:8px;border-radius:50%;background:var(--profile)}

.ia-tool{padding:clamp(18px,3vw,30px);border:1px solid #d9e2ec;border-radius:24px;background:#fff;box-shadow:var(--shadow)}
.ia-intro{max-width:760px;margin:0 auto 16px;text-align:center}
.ia-kicker{display:inline-block;color:var(--profile);font-size:9px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}
.ia-intro h1{margin:5px 0 4px;color:var(--navy);font-size:clamp(28px,4.4vw,44px);line-height:1.02;letter-spacing:-.035em;text-wrap:balance}
.ia-intro p{margin:0;color:var(--muted);font-size:13px;font-weight:700}

.ia-composer{width:min(100%,820px);margin:0 auto;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:8px;border:1px solid #cfdbe9;border-radius:18px;background:#fff;box-shadow:0 9px 24px rgba(7,26,58,.07)}
.ia-composer:focus-within{border-color:rgba(var(--profile-rgb),.55);box-shadow:0 0 0 4px rgba(var(--profile-rgb),.07),0 10px 26px rgba(7,26,58,.08)}
.ia-composer textarea{width:100%;min-height:46px;max-height:120px;resize:none;border:0;outline:0;padding:11px 13px;color:var(--ink);background:transparent;font-size:15px;line-height:1.4}
.ia-composer textarea::placeholder{color:#8b98aa}
.ia-composer button{width:46px;height:46px;border:0;border-radius:14px;background:linear-gradient(145deg,var(--profile),#6f42ff);color:#fff;font-size:18px;font-weight:900;cursor:pointer;box-shadow:0 7px 16px rgba(var(--profile-rgb),.2)}
.ia-composer button:disabled,.ia-composer textarea:disabled{opacity:.42;cursor:not-allowed}

.ia-quick-grid{width:min(100%,820px);margin:10px auto 0;display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.ia-quick-card{min-height:34px;padding:7px 11px;border:1px solid #d3deea;border-radius:999px;background:#fff;color:#29405f;text-align:center;cursor:pointer;transition:.15s ease}
.ia-quick-card:hover{border-color:rgba(var(--profile-rgb),.45);background:var(--profile-soft)}
.ia-quick-card strong{display:block;font-size:10.5px;line-height:1.15}.ia-quick-card span{display:none}

.ia-profile-grid{width:min(100%,700px);margin:14px auto 16px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ia-profile-card{min-height:68px;padding:11px 12px;border:1px solid #d7e1ec;border-radius:14px;background:#f8fafc;color:var(--ink);text-align:left;cursor:pointer;transition:.15s ease}
.ia-profile-card:hover{border-color:rgba(var(--profile-rgb),.4);background:var(--profile-soft)}
.ia-profile-card strong{display:block;font-size:12.5px}.ia-profile-card span{display:block;margin-top:3px;color:var(--muted);font-size:9.5px}

.ia-chat{width:min(100%,900px);margin:0 auto;overflow:visible}
.ia-messages{padding-top:16px;display:flex;flex-direction:column;gap:10px}
.ia-messages:empty{display:none}
.ia-message{max-width:min(88%,760px);padding:10px 13px;border-radius:15px;line-height:1.42;font-size:12.5px;white-space:pre-wrap}
.ia-message.bot{align-self:flex-start;background:var(--profile-soft);border:1px solid rgba(var(--profile-rgb),.15);border-bottom-left-radius:5px}
.ia-message.user{align-self:flex-end;background:var(--navy);color:#fff;border-bottom-right-radius:5px}
.ia-message small{display:block;margin-top:6px;color:var(--muted);font-size:9px;font-weight:800}
.ia-actions{align-self:stretch;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ia-resource{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:15px;background:#fff;color:var(--ink);text-decoration:none;box-shadow:0 4px 13px rgba(7,26,58,.04);transition:.15s ease}
.ia-resource:hover{transform:translateY(-1px);border-color:rgba(var(--profile-rgb),.4);box-shadow:0 8px 18px rgba(7,26,58,.07)}
.ia-resource strong{display:block;font-size:12.5px;line-height:1.25}.ia-resource span{display:block;margin-top:3px;font-size:10px;line-height:1.35;color:var(--muted)}.ia-resource b{color:var(--profile);font-size:17px}.ia-resource.is-primary{border-color:rgba(var(--profile-rgb),.28);background:var(--profile-soft)}
.ia-chips{align-self:flex-start;display:flex;flex-wrap:wrap;gap:7px}.ia-chip{border:1px solid #cdd9e9;background:#fff;color:#29405f;padding:7px 10px;border-radius:999px;font-weight:900;font-size:10px;cursor:pointer}.ia-chip:hover{border-color:rgba(var(--profile-rgb),.4);background:var(--profile-soft)}

.ia-dialog{border:0;padding:0;background:transparent}.ia-dialog::backdrop{background:rgba(3,15,34,.58);backdrop-filter:blur(3px)}
.ia-dialog-card{width:min(620px,calc(100vw - 28px));padding:20px;border-radius:22px;background:#fff;box-shadow:0 28px 80px rgba(0,0,0,.25)}
.ia-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.ia-dialog-head div{display:grid;gap:3px}.ia-dialog-head small{color:#60728b;font-size:9px;font-weight:900;letter-spacing:.12em}.ia-dialog-head strong{font-size:18px}.ia-dialog-head button{border:0;background:#edf2f8;width:36px;height:36px;border-radius:12px;cursor:pointer;font-size:20px}.ia-dialog .ia-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px;margin-bottom:0}

.hm-wrap{width:min(1180px,calc(100% - 40px));margin-inline:auto}.hm-footer{padding:19px 0 21px;background:#051226;color:#d7e3f3}.hm-footer-old{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center}.hm-footer-old p{margin:0;font-size:12px;font-weight:800}.hm-footer-old p a{color:#fff;text-decoration:none}.hm-footer-social{display:flex;gap:9px}.hm-footer-social a{width:30px;height:30px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:50%;color:#fff;text-decoration:none;transition:background .15s ease}.hm-footer-social a:hover,.hm-footer-social a:focus-visible{background:rgba(255,255,255,.09)}

@media(max-width:760px){
  .ia-shell{width:calc(100% - 18px);padding-top:9px}.ia-topbar{min-height:46px;margin-bottom:8px}.ia-brand small{display:none}.ia-mark{width:38px;height:38px;flex-basis:38px;border-radius:11px}.ia-brand strong{font-size:15px}.ia-profile-button{max-width:54vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ia-tool{padding:18px 14px;border-radius:20px}.ia-intro{margin-bottom:13px}.ia-intro h1{font-size:clamp(27px,7vw,36px)}.ia-intro p{font-size:12px}.ia-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ia-actions{grid-template-columns:1fr}.ia-message{max-width:96%}.ia-composer textarea{font-size:14px}.ia-quick-grid{justify-content:flex-start}.hm-wrap{width:calc(100% - 28px)}
}
@media(max-width:430px){
  .ia-profile-grid{grid-template-columns:1fr}.ia-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.ia-quick-card{width:100%}.ia-tool{padding:16px 12px}.ia-composer{border-radius:16px}.ia-composer button{width:44px;height:44px}.ia-message{font-size:12px}.hm-footer-social a{width:36px;height:36px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
