/* The tutor inside the site (tutor.js). Colours and fonts are the site's own variables (app.css), so light and dark follow by themselves. */
.tu-fab{position:fixed;left:14px;bottom:14px;z-index:35;display:inline-flex;align-items:center;gap:8px;height:52px;padding:0 18px 0 14px;border:0;border-radius:26px;
  background:linear-gradient(135deg,var(--primary),var(--primary-deep));color:var(--primary-ink);font-family:var(--fa);font-weight:700;font-size:.95rem;line-height:1;
  box-shadow:0 6px 20px rgba(15,118,110,.35),0 2px 6px rgba(16,40,36,.18);transition:transform .15s ease,box-shadow .15s ease,bottom .2s ease}
.tu-fab svg{width:24px;height:24px;flex:none}
.tu-fab:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(15,118,110,.4),0 3px 8px rgba(16,40,36,.2)}
.tu-fab:active{transform:scale(.96)}
/* on a lesson (a screen with its own bar at the bottom) the button is only the round icon, so it covers as little of the card as possible */
body.has-actionbar .tu-fab{width:50px;height:50px;padding:0;justify-content:center;border-radius:50%}
body.has-actionbar .tu-fab .tu-fab-t{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html.tu-aberto .tu-fab{visibility:hidden}
html.tu-aberto,html.tu-aberto body{overflow:hidden}
@media (max-width:380px){.tu-fab{padding:0 14px 0 12px;height:48px}}
@media (min-width:1100px){.tu-fab{left:24px}}
@media print{.tu-fab,.tu-wrap{display:none!important}}

.tu-wrap{position:fixed;top:0;left:0;right:0;height:100%;z-index:70;direction:ltr;display:flex;align-items:flex-end;justify-content:center;font-family:var(--fa)}
.tu-fundo{position:absolute;inset:0;background:rgba(10,22,20,.45);opacity:0;transition:opacity .18s ease;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.tu-box{position:relative;display:flex;flex-direction:column;width:100%;max-width:560px;height:calc(100% - 10px);background:var(--bg);color:var(--ink);border-radius:22px 22px 0 0;overflow:hidden;
  box-shadow:0 -8px 40px rgba(0,0,0,.25);transform:translateY(28px);opacity:0;transition:transform .2s cubic-bezier(.2,.8,.2,1),opacity .16s ease;direction:rtl}
.tu-wrap.on .tu-fundo{opacity:1}
.tu-wrap.on .tu-box{transform:none;opacity:1}
@media (min-width:720px){
  .tu-wrap{align-items:flex-end;justify-content:flex-start;padding:0 0 20px 24px;pointer-events:none}
  .tu-fundo{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;pointer-events:auto}
  .tu-box{width:410px;height:min(680px,calc(100% - 40px));border-radius:22px;pointer-events:auto;border:1px solid var(--line);box-shadow:0 18px 60px rgba(0,0,0,.28)}
}

.tu-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 8px;background:linear-gradient(135deg,var(--primary),var(--primary-deep));color:var(--primary-ink);flex:none}
.tu-av{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.18);flex:none}
.tu-av svg{width:22px;height:22px}
.tu-av.big{width:56px;height:56px;background:var(--primary-soft);color:var(--primary);margin:0 auto 10px}
.tu-av.big svg{width:30px;height:30px}
.tu-tt{flex:1;min-width:0}
.tu-tt h2{margin:0;font-size:1.02rem;font-weight:800;line-height:1.4}
.tu-tt p{margin:0;font-size:.74rem;opacity:.85;line-height:1.4}
.tu-ib{width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:inherit;display:grid;place-items:center;flex:none;transition:background .15s}
.tu-ib:hover{background:rgba(255,255,255,.16)}
.tu-ib svg{width:20px;height:20px}
.tu-ib.tu-x svg{width:22px;height:22px}
.tu-head :focus-visible{outline-color:var(--primary-ink)}

.tu-ctx{display:flex;align-items:center;gap:6px;padding:7px 14px;background:var(--primary-soft);color:var(--primary-deep);font-size:.78rem;line-height:1.5;flex:none}
.tu-ctx svg{width:15px;height:15px;flex:none}
.tu-ctx span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.tu-conf{display:flex;align-items:center;gap:8px;padding:8px 14px;background:var(--warn-soft);color:var(--ink);font-size:.86rem;border-bottom:1px solid var(--warn-line);flex:none}
.tu-conf span{flex:1}
.tu-conf button{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:4px 14px;font-size:.84rem}
.tu-conf .sim{background:var(--accent);border-color:var(--accent);color:#fff}

.tu-list{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:14px 12px 10px;display:flex;flex-direction:column;gap:8px;scroll-behavior:smooth}
.tu-m{display:flex;flex-direction:column;max-width:86%}
.tu-m.eu{align-self:flex-start;align-items:flex-start}
.tu-m.ele{align-self:flex-end;align-items:flex-end}
.tu-b{position:relative;padding:9px 13px;border-radius:18px;font-size:.96rem;line-height:1.85;word-break:break-word;overflow-wrap:anywhere}
.tu-m.eu .tu-b{background:linear-gradient(135deg,var(--primary),var(--primary-deep));color:var(--primary-ink);border-bottom-right-radius:6px}
.tu-m.ele .tu-b{background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:6px;box-shadow:0 1px 2px rgba(16,40,36,.05)}
.tu-m.novo{animation:tu-in .22s ease both}
@keyframes tu-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.tu-h{font-size:.66rem;color:var(--muted);padding:1px 6px 0;font-family:var(--pt)}
.tu-ln{min-height:1em}
.tu-gap{height:.5em}
.tu-pt{font-family:var(--pt);direction:ltr;unicode-bidi:isolate;background:var(--primary-soft);color:var(--primary-deep);border-radius:7px;padding:1px 7px;font-weight:600;font-size:.94em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.tu-ptl{text-align:left;margin:3px 0}
.tu-ptl .tu-pt{display:inline-block;padding:4px 10px;border-radius:10px;font-size:1em;line-height:1.5}
.tu-m.eu .tu-pt{background:rgba(255,255,255,.2);color:inherit}
.tu-mut{color:var(--muted);font-size:.84rem}
.tu-vn{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:rgba(255,255,255,.2);float:left;margin:4px 8px 0 0}
.tu-vn svg{width:13px;height:13px}
.tu-m.eu .tu-mut{color:inherit;opacity:.85}
.tu-err{display:flex;align-items:center;gap:8px;font-size:.78rem;color:var(--accent);padding:2px 6px 0}
.tu-err button{border:0;background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:2px 12px;font-size:.78rem;font-weight:700}

.tu-dig{display:flex;gap:5px;align-items:center;padding:14px 16px}
.tu-dig i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:tu-dot 1.1s infinite ease-in-out}
.tu-dig i:nth-child(2){animation-delay:.15s}.tu-dig i:nth-child(3){animation-delay:.3s}
@keyframes tu-dot{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-5px);opacity:1}}

.tu-som{display:flex;align-items:center;gap:10px;min-width:210px;direction:ltr}
.tu-pl{width:38px;height:38px;border-radius:50%;border:0;background:var(--primary);color:var(--primary-ink);display:grid;place-items:center;flex:none}
.tu-pl svg{width:18px;height:18px;fill:currentColor}
.tu-pl:disabled{opacity:.45}
.tu-bar{flex:1;height:5px;border-radius:3px;background:var(--line);overflow:hidden;min-width:60px}
.tu-bar i{display:block;height:100%;width:0;background:var(--primary);border-radius:3px;transition:width .2s linear}
.tu-sl{font-size:.76rem;color:var(--muted);direction:rtl}
.tu-som.carrega .tu-bar i{width:40%;animation:tu-load 1.2s infinite ease-in-out}
@keyframes tu-load{from{transform:translateX(-100%)}to{transform:translateX(250%)}}
.tu-som.falhou .tu-bar{display:none}

.tu-ola{text-align:center;padding:22px 14px 6px}
.tu-ola h3{margin:0 0 6px;font-size:1.08rem;font-weight:800}
.tu-ola p{margin:0 0 6px;font-size:.92rem;line-height:1.9;color:var(--ink)}
.tu-ola p.tu-mut{color:var(--muted);font-size:.82rem}
.tu-sug{display:flex;flex-direction:column;gap:8px;padding:8px 6px}
.tu-sug button{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:14px;padding:11px 14px;text-align:start;font-size:.92rem;line-height:1.6;box-shadow:0 1px 2px rgba(16,40,36,.04);transition:border-color .15s,transform .1s,background .15s}
.tu-sug button:hover{border-color:var(--primary);background:var(--primary-soft)}
.tu-sug button:active{transform:scale(.985)}
.tu-priv{margin:auto 8px 2px;padding-top:12px;font-size:.72rem;line-height:1.8;color:var(--muted);text-align:center}
.tu-priv a{color:var(--primary);font-weight:700}
.tu-sk{display:flex;flex-direction:column;gap:10px;padding:8px 4px}
.tu-sk i{display:block;height:44px;border-radius:16px;background:linear-gradient(90deg,var(--surface-2),var(--surface),var(--surface-2));background-size:200% 100%;animation:tu-sh 1.2s infinite linear;width:62%}
.tu-sk i:nth-child(2){align-self:flex-end;width:74%}.tu-sk i:nth-child(3){width:48%}
@keyframes tu-sh{from{background-position:200% 0}to{background-position:-200% 0}}

.tu-comp,.tu-rec{display:flex;align-items:flex-end;gap:8px;padding:8px 10px calc(10px + env(safe-area-inset-bottom,0px));background:var(--surface);border-top:1px solid var(--line);flex:none}
.tu-in{flex:1;min-width:0;resize:none;border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:22px;padding:10px 16px;font:inherit;font-size:1rem;line-height:1.6;max-height:120px;outline:none;transition:border-color .15s,box-shadow .15s}
.tu-in:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}
.tu-in::placeholder{color:var(--muted)}
.tu-rb{width:44px;height:44px;border-radius:50%;border:0;display:grid;place-items:center;flex:none;transition:transform .1s,opacity .15s,background .15s}
.tu-rb svg{width:22px;height:22px}
.tu-rb:active{transform:scale(.92)}
.tu-rb:disabled{opacity:.45}
.tu-send{background:linear-gradient(135deg,var(--primary),var(--primary-deep));color:var(--primary-ink)}
.tu-mic{background:var(--primary-soft);color:var(--primary-deep)}
.tu-comp .tu-send{display:none}
.tu-comp.tem .tu-send{display:grid}
.tu-comp.tem .tu-mic{display:none}
.tu-rec{align-items:center}
.tu-rx{background:var(--accent-soft);color:var(--accent)}
.tu-onda{flex:1;height:40px;display:flex;align-items:center;gap:3px;direction:ltr;overflow:hidden;min-width:0}
.tu-onda i{flex:1;min-width:2px;max-width:5px;height:10%;border-radius:3px;background:var(--primary);transition:height .08s linear}
.tu-rl{position:absolute;inset-inline:64px;bottom:calc(env(safe-area-inset-bottom,0px) + 54px);text-align:center;font-size:.74rem;color:var(--muted);pointer-events:none}
.tu-rec{position:relative;padding-top:22px}
.tu-rl{top:2px;bottom:auto}
.tu-ou{display:inline-flex;align-items:center;gap:5px;margin:3px 2px 0;padding:3px 12px 3px 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--primary-deep);font-size:.78rem;font-weight:700;line-height:1.6;transition:background .15s,border-color .15s}
.tu-ou svg{width:12px;height:12px;fill:currentColor}
.tu-ou:hover{background:var(--primary-soft);border-color:var(--primary)}
.tu-ir{display:flex;align-items:center;gap:8px;max-width:100%;margin:5px 0 0;padding:9px 12px;border:1px solid var(--primary);border-radius:14px;background:var(--primary-soft);color:var(--primary-deep);font-size:.88rem;font-weight:700;line-height:1.6;text-align:start;transition:transform .1s,background .15s}
.tu-ir svg{width:18px;height:18px;flex:none}
.tu-ir span{min-width:0;flex:1}
.tu-ir .tu-ir-s{width:16px;height:16px;opacity:.7}
.tu-ir:hover{background:var(--surface)}
.tu-ir:active{transform:scale(.98)}
