/* ========== HOJE · variante química "Síntese de hoje" (por cima de trilha.css) ========== */
.trq{background-image:radial-gradient(ellipse 55% 25% at 20% 0%,rgb(248 155 25 / .2),transparent 60%),radial-gradient(ellipse 50% 30% at 100% 100%,rgb(97 180 196 / .2),transparent 60%),var(--hex-claro),linear-gradient(170deg,#224B89,#0C1B33 55%)}

/* equação do dia na faixa */
.trq-eq{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:5px 6px;padding:8px 10px;border-radius:12px;background:rgb(42 19 0 / .14)}
.trq-eq em{font-style:normal;font-weight:800;font-size:15px;opacity:.6}
.trq-eq-el{display:grid;place-items:center;min-width:34px;height:30px;padding:0 6px;border-radius:7px;font-family:var(--f-display);font-weight:800;font-size:15px;border:2px dashed rgb(42 19 0 / .45);color:rgb(42 19 0 / .7)}
.trq-eq-el.ok{border:2px solid #0C1B33;background:#0C1B33;color:#7FD3E0;text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:rgb(127 211 224 / .6)}
.trq-eq-el.vez{border-style:solid;background:#fff;color:#C46A00}
.trq-eq-seta{font-size:20px!important;opacity:.85!important;margin:0 2px}
.trq-eq-prod svg{display:block}
.trq-eq-prod svg path,.trq-eq-prod svg circle{fill:none;stroke:rgb(42 19 0 / .55);stroke-width:4}
.trq-eq-prod.ok svg path,.trq-eq-prod.ok svg circle{stroke:#0C1B33}

/* cadeia */
.trq-linha{overflow:visible}
.trq-lig{stroke:rgb(255 255 255 / .2);stroke-width:5;stroke-linecap:round;stroke-dasharray:3 11}
.trq-lig.ativa{stroke:rgb(248 155 25 / .7);stroke-dasharray:3 11;animation:trq-flui 1s linear infinite}
@keyframes trq-flui{to{stroke-dashoffset:-14}}
.trq-lig.feita{stroke:#7FD3E0;stroke-dasharray:none;filter:drop-shadow(0 0 5px rgb(127 211 224 / .7))}
.trq-lig.d2{stroke-width:4}
.trq-seta{fill:none;stroke:#F89B19;stroke-width:3;stroke-linecap:round;stroke-dasharray:6 5;filter:drop-shadow(0 0 4px rgb(248 155 25 / .6))}

/* elemento */
.trq-p{height:150px;padding-top:4px}
.trq-el{all:unset;box-sizing:border-box;cursor:pointer;position:relative;display:grid;grid-template-rows:auto 1fr auto;justify-items:center;width:84px;height:88px;padding:6px 6px 7px;border-radius:14px;
  background:var(--g);color:var(--t);box-shadow:0 7px 0 var(--s),inset 0 0 0 2px rgb(255 255 255 / .18),inset 0 3px 0 rgb(255 255 255 / .2);transition:transform .12s ease,box-shadow .12s}
.trq-el:hover{transform:translateY(-2px);box-shadow:0 9px 0 var(--s),inset 0 0 0 2px rgb(255 255 255 / .25),inset 0 3px 0 rgb(255 255 255 / .2)}
.trq-el:active{transform:translateY(6px);box-shadow:0 1px 0 var(--s)}
.trq-el:focus-visible{outline:3px solid #7FD3E0;outline-offset:6px}
.trq-z,.trq-m{position:absolute;top:5px;font-size:10.5px;font-weight:700;line-height:1;opacity:.85}
.trq-z{left:7px}
.trq-m{right:7px;opacity:.6}
.trq-s{grid-row:2;align-self:center;font-family:var(--f-display);font-weight:800;font-size:34px;line-height:1;letter-spacing:-.01em;margin-top:8px}
.trq-n{grid-row:3;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;opacity:.85;white-space:nowrap}
.trq-p.prox .trq-el{--g:linear-gradient(180deg,#2A5590,#1B3D6E);--s:#0E2547;--t:#BFD3EA}
.trq-p.prox .trq-el:hover{--t:#fff}
.trq-p.atual .trq-el{--g:linear-gradient(180deg,#FFB547,#F28A00);--s:#A85800;--t:#2A1300}
.trq-p.feita .trq-el{--g:linear-gradient(180deg,#9EE3EC,#4FA9BA);--s:#256E80;--t:#0C1B33}
.trq-p.chefe .trq-el{width:100px;height:100px;border-radius:16px}
.trq-p.chefe .trq-s{font-size:40px}
.trq-p.chefe.prox .trq-el{--g:linear-gradient(180deg,#F4F8FB,#D6E4F2);--s:#7E98B8;--t:#224B89}
/* líquido subindo dentro do elemento (progresso da etapa) */
.trq-liq{position:absolute;left:0;right:0;bottom:0;border-radius:0 0 14px 14px;background:linear-gradient(180deg,rgb(127 211 224 / .55),rgb(97 180 196 / .8));pointer-events:none}
.trq-liq::before{content:"";position:absolute;left:0;right:0;top:-5px;height:10px;border-radius:50%;background:rgb(158 227 236 / .7)}
.trq-el>*:not(.trq-liq):not(.trq-orb){position:relative}
.trq-z,.trq-m{position:absolute!important}
/* órbita de elétrons ao redor da etapa da vez */
.trq-orb{position:absolute;left:50%;top:50%;width:132px;height:132px;margin:-66px 0 0 -66px;overflow:visible;pointer-events:none;animation:trq-gira 9s linear infinite}
.trq-orb ellipse{fill:none;stroke:rgb(255 181 71 / .55);stroke-width:2}
.trq-orb circle{fill:#FFE0A8;filter:drop-shadow(0 0 4px #F89B19)}
.trq-orb .e1{offset-path:path('M56 0 A56 20 0 1 1 -56 0 A56 20 0 1 1 56 0');animation:trq-e 2.4s linear infinite}
.trq-orb .e2{offset-path:path('M56 0 A56 20 0 1 1 -56 0 A56 20 0 1 1 56 0');transform:rotate(60deg);animation:trq-e 3.1s linear infinite reverse}
@keyframes trq-gira{to{transform:rotate(360deg)}}
@keyframes trq-e{to{offset-distance:100%}}
.trq-ok{position:absolute!important;right:-9px;top:-9px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--orange);color:#0C1B33;box-shadow:0 3px 0 #A85800}
.trq-p .trl-comece{top:-34px}

/* rótulos do lado de fora da cadeia */
.trq-rot{top:20px;width:180px}
.trq-rot.dir{left:calc(50% + 66px);text-align:left;right:auto}
.trq-rot.esq{right:calc(50% + 66px);text-align:right;left:auto}
.trq-p.chefe .trq-rot.dir{left:calc(50% + 66px)}
.trq-p.chefe .trq-rot.esq{right:calc(50% + 66px)}

/* com o balão aberto, o rótulo da etapa seguinte some para não brigar com ele */
.trq-p.aberta+.trq-p .trq-rot{opacity:0}

/* produto do dia: anel aromático */
.trq-prod{align-items:flex-start}
.trq-anel{all:unset;cursor:pointer;position:relative;display:grid;place-items:center;width:100px;height:100px;transition:transform .2s var(--mola)}
.trq-anel:hover{transform:scale(1.06) rotate(-6deg)}
.trq-anel:focus-visible{outline:3px solid #7FD3E0;outline-offset:4px;border-radius:50%}
.trq-anel svg{position:absolute;inset:4px;overflow:visible}
.trq-anel svg path{fill:#16305A;stroke:#5E7799;stroke-width:3.4;stroke-linejoin:round}
.trq-anel svg circle{fill:none;stroke:#5E7799;stroke-width:3;stroke-dasharray:4 5}
.trq-anel-txt{position:relative;font-family:var(--f-display);font-weight:800;font-size:22px;color:#8EA6C2}
.trq-prod.pronto .trq-anel svg{animation:trq-gira 14s linear infinite;filter:drop-shadow(0 0 16px rgb(248 155 25 / .8))}
.trq-prod.pronto .trq-anel svg path{fill:#F28A00;stroke:#FFC83D}
.trq-prod.pronto .trq-anel svg circle{stroke:#2A1300;stroke-dasharray:none}
.trq-prod.pronto .trq-anel-txt{color:#2A1300}
.trq-prod .trq-rot{top:34px}
.trq-prod.pronto .trq-rot b{color:#FFC83D}

/* mini-elementos: ontem e amanhã */
.trq-mini{flex:none;position:relative;display:grid;place-items:center;width:44px;height:46px;border-radius:9px;font-family:var(--f-display);font-weight:800;font-size:20px}
.trq-mini small{position:absolute;top:3px;left:5px;font-family:var(--f-mono);font-size:8.5px;font-weight:700}
.trq-mini.feita{background:linear-gradient(180deg,#9EE3EC,#4FA9BA);color:#0C1B33;box-shadow:0 4px 0 #256E80}
.trq-mini.tranc{width:54px;height:56px;background:#16305A;color:#5E7799;box-shadow:0 5px 0 #0A1A31;border:2px dashed rgb(94 119 153 / .5)}

.trq .trl-mascote.esq{left:calc(50% - 300px)}
.trq .trl-mascote.dir{right:calc(50% - 300px)}
@media (min-width:1101px){
  .trq .trl-balao{top:-34px}
  .trq .trl-balao::before{top:64px}
}

@media (max-width:760px){
  .trq .trq-p .trq-rot{top:104px;left:50%;right:auto;width:150px;transform:translateX(-50%);text-align:center}
  .trq-p.chefe .trq-rot.dir,.trq-p.chefe .trq-rot.esq{left:50%;top:110px}
  .trq-prod .trq-rot,.trq-prod .trq-rot.dir,.trq-prod .trq-rot.esq{top:104px;left:50%}
  .trq-eq{gap:4px;padding:7px 8px}
  .trq-eq em{font-size:12px}
  .trq-eq-el{min-width:27px;height:25px;padding:0 4px;font-size:12.5px}
  .trq-eq-prod svg{width:22px;height:22px}
  .trq-seta{display:none}
}
@media (max-width:420px){.trq-linha{transform:translateX(-50%) scaleX(.62)}.trq-p{transform:translateX(calc(var(--x) * .62))}.trq .trl-balao{transform:translateX(calc(-50% - var(--x) * .62))}.trq .trl-balao::before{left:calc(50% + var(--x) * .62)}}
@media (prefers-reduced-motion: reduce){.trq-orb,.trq-orb circle,.trq-lig.ativa,.trq-prod.pronto .trq-anel svg{animation:none}}

/* carbonos de passagem (C2, C4...) e numeração da cadeia */
.trq-c circle{fill:#16305A;stroke:rgb(255 255 255 / .35);stroke-width:2.5}
.trq-c text{font-family:var(--f-mono);font-size:11px;font-weight:700;fill:#8EA6C2;text-anchor:middle}
.trq-c.ok circle{fill:#7FD3E0;stroke:#E3F7FA;filter:drop-shadow(0 0 5px rgb(127 211 224 / .8))}
.trq-c.ok text{fill:#7FD3E0}
.trq-z{font-weight:800!important;opacity:1!important}
/* nome IUPAC da cadeia */
.trq-nome{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;background:#0C1B33;color:#E3EEFA;box-shadow:inset 0 0 0 1px rgb(127 211 224 / .25)}
.trq-nome-ic{flex:none}
.trq-nome-ic path{fill:none;stroke:#5E7799;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.trq-nome-ic path.ok{stroke:#7FD3E0}
.trq-nome>span{display:grid;min-width:0;flex:1}
.trq-nome small{font-family:var(--f-mono);font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8EA6C2}
.trq-nome b{font-family:var(--f-display);font-weight:800;font-size:19px;color:#7FD3E0;letter-spacing:.01em}
.trq-nome em{font-style:normal;font-size:11.5px;font-weight:700;color:#FFC83D;text-align:right;max-width:180px}
@media (max-width:760px){.trq-nome{flex-wrap:wrap}.trq-nome em{text-align:left;max-width:none;flex-basis:100%}.trq-nome b{font-size:17px}}

/* professor acompanhando a síntese */
.trq-prof{position:absolute;z-index:1;width:170px;display:grid;justify-items:center;pointer-events:none;transition:top .6s var(--mola)}
.trq-prof.esq{left:calc(50% - 320px)}
.trq-prof.dir{right:calc(50% - 320px)}
.trq-prof img{width:170px;height:auto;filter:drop-shadow(0 10px 18px rgb(0 0 0 / .5))}
.trq-fala{position:relative;margin-bottom:6px;padding:7px 11px;border-radius:12px;background:#fff;color:#0C1B33;font-size:12.5px;font-weight:800;line-height:1.25;text-align:center;box-shadow:0 4px 0 rgb(0 0 0 / .2);animation:trl-pula 2.2s ease-in-out infinite;--x:0px}
.trq-fala::after{content:"";position:absolute;left:50%;bottom:-7px;margin-left:-7px;border:7px solid transparent;border-top-color:#fff;border-bottom:0}
@keyframes trq-pula{50%{transform:translateY(-4px)}}
.trq-fala{animation-name:trq-pula}
@media (max-width:760px){.trq-prof{width:96px}.trq-prof img{width:96px}.trq-prof.esq{left:-4px}.trq-prof.dir{right:-4px}.trq-fala{display:none}}
@media (prefers-reduced-motion: reduce){.trq-fala{animation:none}}

/* ===== animação no estilo da tela de login ===== */
.trq-mapa{--mx:0;--my:0}
/* cena flutuante: mesmos ícones do login, com paralaxe do mouse */
.trq-cena{position:absolute;inset:0;pointer-events:none;z-index:0}
.trq-fl{opacity:.55}
.trq-fl .fl-in{opacity:1}
.trq-fl .tile-el b{font-size:17px}.trq-fl .tile-el em{display:none}
.trq-linha{z-index:1}
.trl-paradas{z-index:2}
/* elementos boiando, cada um no seu tempo */
.trq-el{animation:trq-boia 4.6s ease-in-out var(--dl) infinite}
@keyframes trq-boia{0%,100%{translate:0 0}50%{translate:0 -6px}}
.trq-el:hover{scale:1.12;rotate:-5deg;filter:drop-shadow(0 0 14px rgb(248 155 25 / .55))}
.trq-p.feita .trq-el:hover{filter:drop-shadow(0 0 14px rgb(127 211 224 / .7))}
.trq-el{transition:transform .12s ease,box-shadow .12s,scale .35s var(--mola),rotate .35s var(--mola),filter .3s}
/* clique: o elemento dá um giro, como os do login */
.trq-el.pop{animation:trq-pop .8s var(--mola),trq-boia 4.6s ease-in-out var(--dl) infinite}
@keyframes trq-pop{0%{scale:1;rotate:0deg}35%{scale:1.35;rotate:200deg}100%{scale:1;rotate:360deg}}
/* bolhas subindo dentro das etapas que já reagiram */
.trq-bolhas{position:absolute!important;inset:0;overflow:hidden;border-radius:14px;pointer-events:none}
.trq-bolhas i{position:absolute;bottom:-6px;width:6px;height:6px;border-radius:50%;background:rgb(255 255 255 / .75);animation:trq-bb 2.8s ease-in infinite}
.trq-bolhas i:nth-child(1){left:18%;animation-delay:-.2s}
.trq-bolhas i:nth-child(2){left:42%;width:4px;height:4px;animation-delay:-1.1s}
.trq-bolhas i:nth-child(3){left:66%;animation-delay:-1.9s;width:5px;height:5px}
.trq-bolhas i:nth-child(4){left:82%;width:3px;height:3px;animation-delay:-.7s}
@keyframes trq-bb{0%{transform:translateY(0);opacity:0}15%{opacity:.9}100%{transform:translateY(-90px);opacity:0}}
/* brilho passando nas etapas que ainda vão reagir */
.trq-brilho{position:absolute!important;inset:0;border-radius:14px;overflow:hidden;pointer-events:none}
.trq-brilho::before{content:"";position:absolute;top:-20%;bottom:-20%;width:40%;left:-60%;background:linear-gradient(100deg,transparent,rgb(255 255 255 / .22),transparent);transform:skewX(-18deg);animation:trq-luz 4.2s ease-in-out var(--dl) infinite}
@keyframes trq-luz{0%,60%{left:-60%}100%{left:130%}}
/* carbonos de passagem pulsando quando a dupla se forma */
.trq-c.ok circle{animation:trq-pulso 2.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes trq-pulso{50%{transform:scale(1.35)}}
/* anel do produto: o círculo aromático gira esperando */
.trq-prod:not(.pronto) .trq-anel svg circle{animation:trq-gira 10s linear infinite;transform-box:fill-box;transform-origin:center}
.trq-anel{animation:trq-boia 5.2s ease-in-out -1.3s infinite}
/* professor também flutua; no fim, pula de alegria */
.trq-prof img{animation:trq-boia 5s ease-in-out infinite}
.trq-prof.festa img{animation:trq-festa 1.4s var(--mola) infinite}
@keyframes trq-festa{0%,100%{translate:0 0;rotate:0deg}30%{translate:0 -14px;rotate:-4deg}60%{translate:0 0;rotate:3deg}}
@media (max-width:760px){.trq-cena{display:none}}
@media (prefers-reduced-motion: reduce){.trq-el,.trq-el.pop,.trq-bolhas i,.trq-brilho::before,.trq-c.ok circle,.trq-anel,.trq-prod .trq-anel svg circle,.trq-prof img,.trq-fl,.trq-fl *{animation:none!important}}


/* folga no topo para o balão e a fala da 1ª etapa */
.trq-mapa{--trq-off:44px;padding-top:calc(18px + var(--trq-off))}
.trq-mapa .trq-linha{top:calc(18px + var(--trq-off))}
@media (max-width:760px){.trq-mapa{--trq-off:0px}}
/* no celular não há lado livre para o professor sem cobrir as etapas */
@media (max-width:560px){.trq-prof{display:none}}

/* ===== peças de fundo interativas ===== */
.trq-fl{opacity:.6;transform:translate(-50%,-50%) translate(calc(var(--mx) * var(--d) + var(--px,0px)),calc(var(--my) * var(--d) + var(--py,0px)));transition:transform .5s cubic-bezier(.2,1.6,.4,1),opacity .25s}
.trq-fl.fuga{opacity:.95;transition:transform .22s cubic-bezier(.2,.9,.3,1.3),opacity .2s}
.trq-fl .fl-in{cursor:pointer}
.trq-fl .fl-in:hover > *{transform:scale(1.35) rotate(-10deg);filter:drop-shadow(0 0 14px rgb(248 155 25 / .7))}
/* toque: cada peça reage do seu jeito */
.trq-fl.acao{opacity:1}
.trq-fl.t-atomo.acao .fl-svg{animation:trq-tq-gira .9s cubic-bezier(.2,.8,.3,1.2)}
.trq-fl.t-atomo.acao .orb{animation-duration:.45s}
.trq-fl.t-benzeno.acao .fl-svg{animation:trq-tq-gira 1s cubic-bezier(.2,.8,.3,1.2)}
.trq-fl.t-tile.acao .tile-el{animation:trq-tq-vira .8s cubic-bezier(.2,.8,.3,1.2)}
.trq-fl.t-erlen.acao .fl-svg,.trq-fl.t-tubo.acao .fl-svg,.trq-fl.t-balao.acao .fl-svg{animation:trq-tq-agita .7s ease-in-out}
.trq-fl.t-erlen.acao .bb,.trq-fl.t-tubo.acao .bb,.trq-fl.t-balao.acao .bb{animation-duration:.5s}
.trq-fl.t-agua.acao .fl-svg{animation:trq-tq-mola .9s cubic-bezier(.2,.8,.3,1.4)}
@keyframes trq-tq-gira{0%{transform:scale(1) rotate(0)}40%{transform:scale(1.6) rotate(240deg)}100%{transform:scale(1) rotate(360deg)}}
@keyframes trq-tq-vira{0%{transform:perspective(300px) rotateY(0) scale(1)}50%{transform:perspective(300px) rotateY(180deg) scale(1.4)}100%{transform:perspective(300px) rotateY(360deg) scale(1)}}
@keyframes trq-tq-agita{0%,100%{transform:rotate(0)}15%{transform:rotate(-22deg) scale(1.2)}35%{transform:rotate(18deg) scale(1.25)}55%{transform:rotate(-12deg) scale(1.15)}75%{transform:rotate(8deg)}}
@keyframes trq-tq-mola{0%{transform:scale(1,1)}25%{transform:scale(1.5,.7)}50%{transform:scale(.8,1.35)}75%{transform:scale(1.15,.9)}100%{transform:scale(1)}}
/* faíscas que saem da peça tocada */
.trq-faisca{position:absolute;width:0;height:0;pointer-events:none;z-index:3}
.trq-faisca i{position:absolute;left:-4px;top:-4px;width:8px;height:8px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c);animation:trq-faisca .85s cubic-bezier(.1,.8,.3,1) forwards}
.trq-faisca i:nth-child(3n){width:5px;height:5px;left:-2.5px;top:-2.5px;background:#fff}
@keyframes trq-faisca{0%{transform:rotate(var(--a)) translateX(0) scale(1);opacity:1}100%{transform:rotate(var(--a)) translateX(var(--r)) scale(.2);opacity:0}}
@media (prefers-reduced-motion: reduce){.trq-fl.acao *,.trq-faisca i{animation:none!important}.trq-fl{transition:none}}
/* a lista de etapas ocupa a largura toda: deixa os cliques passarem para as peças do fundo, menos nos elementos e balões */
.trq-mapa .trl-paradas,.trq-mapa .trq-p{pointer-events:none}
.trq-mapa .trq-el,.trq-mapa .trl-balao,.trq-mapa .trq-anel{pointer-events:auto}
