/* V4.28 — Minha Evolução is the deliberate gamification space. */
#evolution{
  --evo-cyan:#5ed8e7;--evo-gold:#ebc76c;--evo-violet:#ab92ff;
  --evo-green:#69dca1;--evo-panel:rgba(13,22,46,.84)
}
#evolution .evo-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:4px 0 16px}
#evolution .evo-heading h3{font-size:28px;margin:4px 0 5px;letter-spacing:-.025em}
#evolution .evo-heading p{margin:0;color:var(--muted);max-width:720px}
#evolution .evo-kicker{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9px;letter-spacing:.16em;color:#91a9e8;text-transform:uppercase}
#evolution .evo-hero-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,3fr);gap:14px;align-items:stretch}
#evolution .evo-level-panel,#evolution .evo-panel{position:relative;padding:20px;border-radius:12px;border-color:rgba(122,162,255,.2);background:var(--evo-panel);box-shadow:none}
#evolution .evo-level-panel::before,#evolution .evo-panel::before{content:"";position:absolute;top:-1px;left:-1px;width:13px;height:13px;border-top:2px solid #83a5f0;border-left:2px solid #83a5f0;pointer-events:none}
#evolution .evo-level-panel::after,#evolution .evo-panel::after{content:"";position:absolute;right:-1px;bottom:-1px;width:13px;height:13px;border-right:2px solid #83a5f0;border-bottom:2px solid #83a5f0;pointer-events:none}
#evolution .evo-level-panel{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:18px 22px;background:
  linear-gradient(125deg,rgba(63,100,163,.2),rgba(96,69,139,.08)),
  var(--evo-panel)}
#evolution .evo-level-badge{flex:none;display:grid;place-items:center;gap:3px;min-width:102px;min-height:112px;border:2px solid rgba(171,146,255,.5);outline:1px solid rgba(171,146,255,.14);outline-offset:4px;border-radius:3px;background:rgba(171,146,255,.07);font-family:ui-monospace,monospace}
#evolution .evo-level-badge small{font-size:10px;letter-spacing:.15em;color:#c3b3fc}
#evolution .evo-level-badge strong{font-size:46px;line-height:1;letter-spacing:-.05em}
#evolution .evo-level-main{flex:1;min-width:0}
#evolution .evo-level-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
#evolution .evo-level-main h4{margin:5px 0 11px;font-size:20px}
#evolution .evo-streak{flex:0 0 174px;padding:12px 14px;text-align:center;border:1px solid rgba(255,138,0,.45);border-radius:12px;background:radial-gradient(ellipse at 50% 0,rgba(255,106,0,.2),transparent 80%),rgba(255,138,0,.035);box-shadow:0 0 24px rgba(255,106,0,.08)}
#evolution .evo-streak-score{display:flex;align-items:center;justify-content:center;gap:9px}
#evolution .evo-streak strong{font:800 42px ui-monospace,monospace;line-height:1;color:#ffb44b;font-variant-numeric:tabular-nums}
#evolution svg.evo-streak-flame{width:28px;height:36px;stroke:none;filter:drop-shadow(0 0 8px rgba(255,106,0,.35))}
#evolution .evo-flame-outer{fill:#ff7318}
#evolution .evo-flame-inner{fill:#ffd574}
#evolution .evo-streak.is-active .evo-streak-flame{animation:evoStreakGlow 3s ease-in-out infinite}
#evolution .evo-streak-label{display:block;margin-top:5px;font-size:10px;font-weight:700;color:#ffc66c}
#evolution .evo-streak p{margin:7px 0 0;font-size:10px;line-height:1.4;color:#d4c4b4}
#evolution .evo-streak.is-starting{box-shadow:none;border-color:rgba(255,138,0,.22)}
#evolution .evo-hero-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0;padding:16px 0 0;border-top:1px solid rgba(255,138,0,.18)}
#evolution .evo-hero-stats>div{min-width:0}
#evolution .evo-hero-stats dt{font-size:9px;color:var(--muted);line-height:1.5}
#evolution .evo-hero-stats dd{margin:5px 0 0;font:700 19px ui-monospace,monospace;font-variant-numeric:tabular-nums}
#evolution .evo-hero-stats small{display:block;margin-top:5px;font-size:9px;line-height:1.4;color:var(--muted)}
@keyframes evoStreakGlow{0%,100%{filter:drop-shadow(0 0 5px rgba(255,106,0,.25))}50%{filter:drop-shadow(0 0 11px rgba(255,106,0,.5))}}
#evolution .evo-note{margin:8px 0 0;font-size:11px;color:var(--muted)}
#evolution svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:square;stroke-linejoin:miter}

/* Small decorative lab elements stay inside Evolution's existing panels. */
#evolution .evo-level-panel>svg.evo-lab-illustration{position:absolute;right:22px;bottom:14px;width:180px;height:90px;color:var(--evo-gold);opacity:.065;pointer-events:none}
#evolution .evo-level-panel>div,#evolution .evo-hero-stats{position:relative;z-index:1}
#evolution .evo-heading-icon{display:inline-flex;vertical-align:middle;margin-right:8px;color:var(--evo-cyan)}
#evolution .evo-heading-icon svg{width:21px;height:21px}
#evolution .evo-chewe-stage{display:flex;flex-direction:column;gap:14px;min-width:0;min-height:280px}
#evolution .evo-chewe-stage .chewe-stage-top{position:relative;z-index:1;display:flex;flex:1;align-items:center;justify-content:center;min-height:100px}
#evolution .evo-chewe-stage .chewe-stage-copy{position:relative;z-index:1;flex:none;min-width:0;text-align:center;width:100%}
#evolution .evo-chewe-stage .chewe-stage-copy small{font-size:9px;letter-spacing:.1em}
#evolution .evo-chewe-stage .chewe-sprite-wrap{width:100px;height:100px;flex:0 0 100px}
#evolution .evo-chewe-stage .chewe-sprite{transform:scale(1.5)}
#evolution .evo-chewe-stage>svg.evo-molecule-illustration{position:absolute;right:10px;top:12px;width:80px;height:80px;color:var(--evo-cyan);opacity:.09;pointer-events:none}
#evolution .evo-chewe-stage .chewe-bubble{position:relative;left:auto;right:auto;bottom:auto;top:auto;width:100%;margin:0;overflow-wrap:anywhere;flex:none;text-align:center}
#evolution .evo-chewe-stage .chewe-bubble::before{left:calc(50% - 4px)}

:is(#evolution,.course-domain-summary) .evo-meter-group{margin-top:10px;min-width:0}
:is(#evolution,.course-domain-summary) .evo-meter-label{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted);margin-bottom:7px;flex-wrap:wrap}
:is(#evolution,.course-domain-summary) .evo-meter-label b{font-family:ui-monospace,monospace;color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
:is(#evolution,.course-domain-summary) .evo-meter{--meter-color:var(--evo-violet);height:11px;position:relative;overflow:hidden;border:1px solid rgba(171,146,255,.25);background:rgba(255,255,255,.045);border-radius:2px}
:is(#evolution,.course-domain-summary) .evo-meter-progress{--meter-color:var(--evo-cyan);border-color:rgba(94,216,231,.25)}
:is(#evolution,.course-domain-summary) .evo-meter-performance{--meter-color:#789bfa;border-color:rgba(120,155,250,.25)}
:is(#evolution,.course-domain-summary) .evo-meter::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(5% - 2px),#111d32 calc(5% - 2px),#111d32 5%)}
:is(#evolution,.course-domain-summary) .evo-meter>span{display:block;height:100%;overflow:hidden}
:is(#evolution,.course-domain-summary) .evo-meter i{display:block;height:100%;background:var(--meter-color);transform-origin:left;animation:evoFill .65s ease-out both}
#evolution .evo-level-panel .evo-meter i{animation:evoFill .65s ease-out both,evoXpGlow 4s ease-in-out infinite}

#evolution .evo-game-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:14px;margin:14px 0}
#evolution .evo-panel>.section-head{margin:0 0 16px}
#evolution .evo-panel>.section-head h3{margin:3px 0 5px;font-size:19px}
#evolution .evo-panel>.section-head p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
#evolution .evo-level-path{display:grid;grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr auto;align-items:center;margin:24px 4px 28px}
#evolution .evo-level-path>i{height:2px;background:linear-gradient(90deg,rgba(94,216,231,.5),rgba(171,146,255,.25))}
#evolution .evo-level-node{display:grid;justify-items:center;gap:6px;min-width:52px}
#evolution .evo-level-node>span{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(122,162,255,.22);background:#111b35;border-radius:3px;font:700 14px ui-monospace,monospace;color:#8290ae}
#evolution .evo-level-node small{font:8px ui-monospace,monospace;letter-spacing:.08em;color:#697894}
#evolution .evo-level-node.is-done>span{border-color:rgba(94,216,231,.38);color:var(--evo-cyan);background:rgba(94,216,231,.06)}
#evolution .evo-level-node.is-current>span{border:2px solid rgba(171,146,255,.72);outline:1px solid rgba(171,146,255,.2);outline-offset:3px;color:#fff;background:rgba(171,146,255,.12);box-shadow:0 0 20px rgba(171,146,255,.12)}
#evolution .evo-level-node.is-current small{color:#c4b6ff}
#evolution .evo-subhead{display:flex;align-items:end;justify-content:space-between;margin:0 0 10px;padding-top:16px;border-top:1px solid var(--border)}
#evolution .evo-subhead h4{margin:3px 0 0;font-size:15px}
#evolution .evo-missions{display:grid;gap:8px}
#evolution .evo-mission{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:11px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.016)}
#evolution .evo-mission-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(94,216,231,.2);color:var(--evo-cyan);background:rgba(94,216,231,.05);border-radius:4px}
#evolution .evo-mission-main b{font-size:12px}
#evolution .evo-mission-main p{margin:3px 0 0;color:var(--muted);font-size:10px;line-height:1.4}
#evolution .evo-mission-main .evo-meter-group{margin-top:8px}
#evolution .evo-mission-main .evo-meter{height:8px}

#evolution .evo-achievements{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#evolution .evo-achievement-card{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;position:relative;padding:11px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.015);min-height:72px}
#evolution .evo-achievement-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(255,255,255,.09);border-radius:3px;color:#6f7b93}
#evolution .evo-achievement-card b{display:block;font-size:11px}
#evolution .evo-achievement-card small{display:block;color:var(--muted);font-size:9px;line-height:1.35;margin-top:3px;padding-right:4px}
#evolution .evo-achievement-card>span{position:absolute;right:7px;top:6px;font:7px ui-monospace,monospace;letter-spacing:.07em;color:#65728c}
#evolution .evo-achievement-card.is-unlocked{border-color:rgba(235,199,108,.25);background:linear-gradient(145deg,rgba(235,199,108,.055),rgba(171,146,255,.025))}
#evolution .evo-achievement-card.is-unlocked .evo-achievement-icon{color:var(--evo-gold);border-color:rgba(235,199,108,.32);box-shadow:0 0 14px rgba(235,199,108,.08)}
#evolution .evo-achievement-card.is-unlocked>span{color:#bcae7d}
#evolution .evo-achievement-card.is-locked{opacity:.68}

#evolution .evo-record-panel{margin:14px 0}
#evolution .evo-records{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:9px}
#evolution .evo-record{padding:13px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.015);min-width:0}
#evolution .evo-record small{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.07em}
#evolution .evo-record strong{display:block;font:700 20px ui-monospace,monospace;margin-top:6px;color:#dfe9ff;font-variant-numeric:tabular-nums}
#evolution .evo-record span{display:block;color:#8391ad;font-size:9px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

#evolution .evo-courses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#evolution .evo-course{padding:14px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.015)}
#evolution .evo-course-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
#evolution .evo-course-heading h4{margin:3px 0 0;min-width:0;font-size:13px;overflow-wrap:anywhere}
#evolution .evo-course-status{font:8px ui-monospace,monospace;letter-spacing:.1em;color:#7182a2}
#evolution .evo-course-bars{display:grid;grid-template-columns:1fr 1fr;gap:16px}
#evolution .evo-course-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin-top:11px}
#evolution .evo-course-foot b{color:var(--text);font-variant-numeric:tabular-nums}
#evolution .evo-achievement{display:flex;align-items:center;gap:5px;font-size:9px;color:var(--evo-gold);flex:none}
#evolution .evo-achievement svg{animation:evoMedalGlow 4s ease-in-out infinite}
#evolution .evo-course-complete{border-color:rgba(235,199,108,.25);background:linear-gradient(145deg,rgba(235,199,108,.04),rgba(255,255,255,.012))}

#evolution .evolution-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:14px;margin:14px 0 0}
#evolution .evolution-grid>.card{min-width:0}
#evolution .evo-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:6px}
#evolution .evo-table-wrap:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
#evolution .evo-ranking{width:100%;border-collapse:collapse;font-size:11px;font-variant-numeric:tabular-nums}
#evolution .evo-ranking th,#evolution .evo-ranking td{padding:10px 9px;text-align:left;border-bottom:1px solid var(--border)}
#evolution .evo-ranking thead{background:rgba(122,162,255,.06);color:var(--muted);font-size:9px}
#evolution .evo-ranking td{white-space:nowrap}
#evolution .evo-ranking tbody th{min-width:85px;overflow-wrap:anywhere;font-weight:500}
#evolution .evo-ranking tr:last-child td,#evolution .evo-ranking tr:last-child th{border-bottom:0}
#evolution .evo-ranking small{display:block;color:#aac1ff;font-size:9px;margin-top:3px}
#evolution .evo-you{background:rgba(122,162,255,.09);box-shadow:inset 3px 0 #83a5f0}
#evolution .evo-position{display:flex;align-items:center;gap:5px;font-family:ui-monospace,monospace;color:var(--muted)}
#evolution .evo-place-1{color:var(--evo-gold)}
#evolution .evo-place-2{color:#c9d8e6}
#evolution .evo-place-3{color:#d7a07d}
#evolution .evo-course-ranks{display:grid;gap:8px}
#evolution .evo-course-rank{display:flex;align-items:center;gap:12px;border:1px solid var(--border);padding:10px;border-radius:6px;min-width:0;background:rgba(255,255,255,.012)}
#evolution .evo-course-rank>div{min-width:0}
#evolution .evo-course-rank b{font-size:11px;overflow-wrap:anywhere}
#evolution .evo-course-rank small{display:block;color:var(--muted);font-size:9px;margin-top:3px}
#evolution .evo-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

#evolution *,#evolution *::before,#evolution *::after{animation-play-state:paused!important}
#evolution.evolution-live *,#evolution.evolution-live *::before,#evolution.evolution-live *::after{animation-play-state:running!important}
@keyframes evoFill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes evoXpGlow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.18)}}
@keyframes evoMedalGlow{0%,100%{opacity:.8}50%{opacity:1;filter:drop-shadow(0 0 3px rgba(235,199,108,.35))}}

@media(max-width:1100px){
  #evolution .evo-hero-grid,#evolution .evo-game-grid,#evolution .evolution-grid{grid-template-columns:1fr}
  #evolution .evo-chewe-stage{min-height:280px}
}
@media(max-width:760px){
  #evolution .evo-heading{align-items:flex-start}
  #evolution .evolution-strip,#evolution .evo-records{grid-template-columns:1fr 1fr}
  #evolution .evo-courses{grid-template-columns:1fr}
  #evolution .evo-achievements{grid-template-columns:1fr}
  #evolution .evo-level-path{grid-template-columns:auto 1fr auto 1fr auto;margin-left:0;margin-right:0}
  #evolution .evo-level-node:nth-of-type(1),#evolution .evo-level-node:nth-of-type(5),
  #evolution .evo-level-path>i:nth-of-type(1),#evolution .evo-level-path>i:nth-of-type(4){display:none}
}
@media(max-width:650px){
  #evolution .evo-heading{display:grid;gap:10px}
  #evolution .evo-heading h3{font-size:24px}
  #evolution .evo-level-panel,#evolution .evo-panel{padding:16px}
  #evolution .evo-level-panel{gap:16px}
  #evolution .evo-level-badge{min-width:72px;min-height:88px}
  #evolution .evo-level-badge strong{font-size:34px}
  #evolution .evo-level-top{display:block}
  #evolution .evo-streak{margin:0 0 8px}
  #evolution .evo-course-bars{grid-template-columns:1fr;gap:0}
  #evolution .evo-ranking th,#evolution .evo-ranking td{padding:9px 7px}
  #evolution .evo-position svg{width:15px;height:15px}
}
@media(max-width:390px){
  #evolution .evolution-strip,#evolution .evo-records{grid-template-columns:1fr}
  #evolution .evo-level-panel{align-items:flex-start}
  #evolution .evo-level-path{transform:scale(.94);transform-origin:left center}
  #evolution .evo-meter-label{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  #evolution *,#evolution *::before,#evolution *::after{animation:none!important;transition:none!important}
}

#evolution .evo-ranking-disclosure{align-self:start}
#evolution .evo-ranking-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;list-style:none;border-radius:6px}
#evolution .evo-ranking-disclosure>summary::-webkit-details-marker{display:none}
#evolution .evo-ranking-disclosure>summary>span:first-child{min-width:0}
#evolution .evo-ranking-title{display:block;margin:4px 0 6px;font-size:19px;font-weight:700}
#evolution .evo-ranking-brief{display:block;font-size:12px;color:var(--muted)}
#evolution .evo-disclosure-chevron{color:var(--brand);font-size:25px;transition:transform .18s ease}
#evolution .evo-ranking-disclosure[open] .evo-disclosure-chevron{transform:rotate(180deg)}
#evolution .evo-ranking-disclosure>summary:focus-visible{outline:2px solid var(--brand);outline-offset:6px}
#evolution .evo-ranking-body{margin-top:16px}
#evolution .evo-ranking-body>.evo-note{margin-bottom:12px}
.course-domain-summary{--evo-cyan:#5ed8e7;--evo-violet:#ab92ff}
#evolution .evo-mobile-disclosure{align-self:start;min-width:0}
#evolution .evo-mobile-disclosure>summary{position:relative;list-style:none;cursor:pointer}
#evolution .evo-mobile-disclosure>summary::-webkit-details-marker{display:none}
#evolution .evo-mobile-disclosure>summary .section-head{margin:0;padding-right:26px}
#evolution .evo-mobile-disclosure>summary h3{margin:3px 0 5px;font-size:19px}
#evolution .evo-mobile-disclosure>summary p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
#evolution .evo-mobile-disclosure>summary>.evo-disclosure-chevron{position:absolute;right:0;top:10px}
#evolution .evo-mobile-disclosure[open]>summary>.evo-disclosure-chevron{transform:rotate(180deg)}
#evolution .evo-mobile-disclosure>summary:focus-visible{outline:2px solid var(--brand);outline-offset:6px;border-radius:6px}
#evolution .evo-mobile-disclosure .evo-level-path{grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr auto;margin:24px 0 0}
#evolution .evo-mobile-disclosure .evo-level-node{min-width:32px}
#evolution .evo-mobile-disclosure .evo-level-node>span{width:32px;height:36px}
#evolution .evo-mobile-disclosure .evo-level-node:nth-of-type(1),#evolution .evo-mobile-disclosure .evo-level-node:nth-of-type(5){display:grid}
#evolution .evo-mobile-disclosure .evo-level-path>i:nth-of-type(1),#evolution .evo-mobile-disclosure .evo-level-path>i:nth-of-type(4){display:block}
#evolution .evo-mobile-disclosure>.evo-disclosure-content{margin-top:20px}
.course-domain-summary-bars{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:760px){#evolution .evo-level-top{flex-wrap:wrap}#evolution .evo-streak{flex:1 1 160px}#evolution .evo-hero-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){
  #evolution .evo-level-panel{grid-template-columns:72px minmax(0,1fr);align-items:start;gap:16px}
  #evolution .evo-level-main h4{font-size:17px}
  #evolution .evo-streak{margin:10px 0 12px;width:100%}
  #evolution .evo-streak strong{font-size:36px}
  #evolution .evo-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .course-domain-summary-bars{grid-template-columns:1fr;gap:4px}
}

/* Compact level summary: the two retained metrics sit directly below the level. */
#evolution .evo-hero-grid{align-items:start}
#evolution .evo-level-panel{grid-template-columns:minmax(110px,.32fr) minmax(0,1fr);align-items:start;gap:18px}
#evolution .evo-level-summary{display:grid;align-content:start;gap:18px;min-width:0}
#evolution .evo-hero-stats{grid-template-columns:1fr;gap:12px;padding:0;border:0}
#evolution .evo-hero-stats dt{font-size:11px}
#evolution .evo-hero-stats dd{font-size:22px;margin-top:3px}
@media(max-width:560px){
  #evolution .evo-level-panel{grid-template-columns:100px minmax(0,1fr);gap:14px}
  #evolution .evo-level-badge{min-width:0;min-height:94px}
  #evolution .evo-level-main h4{font-size:16px}
  #evolution .evo-streak{padding:10px 8px}
  #evolution .evo-streak p{font-size:10px}
  #evolution .evo-ranking th:nth-child(3),#evolution .evo-ranking th:nth-child(4){white-space:normal;min-width:72px}
}

#evolution .evo-level-title{grid-column:1/-1;text-align:center;position:relative;z-index:1;margin:0;line-height:1.6}
#evolution .evo-level-top{justify-content:center}
#evolution .evo-level-top:empty{display:none}
