:root{--ink:#172a3a;--muted:#637586;--teal:#0ea5a8;--teal-deep:#087b80;--orange:#ff8b4b;--yellow:#ffc84d;--violet:#8b6fe8;--danger:#dd5d62;--success:#24a56a;--shadow:0 24px 70px rgba(42,88,100,.14)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;color:var(--ink);font-family:"Manrope",sans-serif;background:#fff url("logic-lab-light.png") center top/cover fixed no-repeat;overflow-x:hidden}body:before{content:"";position:fixed;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(255,255,255,.86),rgba(255,255,255,.57) 48%,rgba(255,255,255,.38))}button,input{font:inherit}button{cursor:pointer}[hidden]{display:none!important}
.ambient{position:fixed;z-index:-1;border-radius:50%;filter:blur(3px);opacity:.45}.ambient-one{width:420px;height:420px;background:#c8f3ed;top:-160px;left:-130px}.ambient-two{width:320px;height:320px;background:#ffe3ba;right:-90px;bottom:-110px}
.topbar{width:min(1240px,calc(100% - 48px));height:88px;margin:auto;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(34,102,111,.12)}.lab-status{display:flex;align-items:center;gap:11px;padding:8px 11px 8px 9px;border:1px solid rgba(14,165,168,.12);border-radius:16px;background:rgba(255,255,255,.68);box-shadow:0 8px 24px rgba(39,90,98,.06);backdrop-filter:blur(10px)}.system-light{width:12px;height:12px;border:3px solid #d8f4ea;border-radius:50%;background:#2fc77b;box-shadow:0 0 0 4px rgba(47,199,123,.08),0 0 14px rgba(47,199,123,.45);animation:systemPulse 2s ease-in-out infinite}.lab-status-copy{display:grid;gap:1px}.lab-status-copy small{color:var(--teal-deep);font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.lab-status-copy strong{font:700 12px/1.25 "Comfortaa",sans-serif}.lab-count{margin-left:6px;padding:7px 10px;border-radius:10px;color:#536b77;background:#edf7f5;font-size:10px;font-weight:800;letter-spacing:.03em}@keyframes systemPulse{50%{transform:scale(.84);opacity:.75}}.top-actions{display:flex;align-items:center;gap:12px}.sound-button{width:42px;height:42px;border:1px solid #d9e9e7;border-radius:14px;background:rgba(255,255,255,.8);color:var(--teal-deep)}.student-chip{display:flex;align-items:center;gap:9px;padding:7px 14px 7px 7px;border-radius:99px;background:rgba(255,255,255,.88);box-shadow:0 8px 28px rgba(39,90,98,.08);font-size:13px;font-weight:700}.student-avatar{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#fff;background:var(--orange)}
main{width:min(1240px,calc(100% - 48px));margin:auto}.welcome{min-height:calc(100vh - 88px);display:grid;grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr);align-items:center;gap:48px;padding:52px 0 72px}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--teal-deep);font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.eyebrow span{color:var(--orange)}h1,h2{font-family:"Comfortaa",sans-serif}.hero-copy>h1{max-width:760px;margin:18px 0 16px;font-size:clamp(42px,5.2vw,72px);line-height:1.07;letter-spacing:-.045em}h1 em{color:var(--teal);font-style:normal}.hero-lead{max-width:620px;margin:0;color:var(--muted);font-size:17px;line-height:1.7}.feature-row{display:flex;gap:32px;margin:30px 0}.feature{display:flex;gap:10px;align-items:center}.feature b{color:var(--orange);font:700 28px/1 "Comfortaa",sans-serif}.feature span{color:#506474;font-size:11px;font-weight:700;line-height:1.25;text-transform:uppercase;letter-spacing:.06em}
.register-card{max-width:720px;padding:22px;border:1px solid rgba(20,132,135,.13);border-radius:26px;background:rgba(255,255,255,.93);box-shadow:var(--shadow);backdrop-filter:blur(14px)}.form-heading{display:flex;align-items:center;gap:13px;margin-bottom:18px}.form-heading h2{margin:0 0 3px;font-size:17px}.form-heading p{margin:0;color:var(--muted);font-size:12px}.step-badge{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:14px;color:var(--teal-deep);background:#e3f5f1;font-weight:800}.form-grid{display:grid;grid-template-columns:1fr 1fr 88px 155px;gap:10px;align-items:end}label span{display:block;margin:0 0 7px 4px;color:#526674;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}input{width:100%;height:48px;padding:0 14px;border:1px solid #d7e4e2;border-radius:13px;outline:0;color:var(--ink);background:#fbfefd;transition:.2s}input:focus{border-color:var(--teal);box-shadow:0 0 0 4px rgba(14,165,168,.11)}input::placeholder{color:#a3afb7}.primary-button{height:48px;display:flex;justify-content:space-between;align-items:center;padding:0 10px 0 17px;border:0;border-radius:14px;color:#fff;background:linear-gradient(135deg,#ff9c56,#ff774c);font-weight:800;box-shadow:0 10px 22px rgba(255,126,72,.26);transition:.2s}.primary-button:hover{transform:translateY(-2px);box-shadow:0 13px 25px rgba(255,126,72,.32)}.primary-button b{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.2)}.primary-button:disabled{opacity:.65;cursor:wait;transform:none}.privacy-note,.form-message{margin:10px 0 0;font-size:11px}.privacy-note{color:#81909a}.form-message{color:var(--danger);font-weight:700}
.hero-art{min-height:610px;position:relative;display:grid;place-items:center}.hero-art:before{content:"";position:absolute;width:470px;height:470px;border-radius:50%;background:radial-gradient(circle,#fff 0 45%,rgba(191,238,234,.5) 60%,transparent 72%)}.hero-art img{position:relative;z-index:1;width:min(100%,520px);max-height:650px;object-fit:contain;mix-blend-mode:multiply;filter:drop-shadow(0 24px 26px rgba(69,103,111,.13))}.orbit{position:absolute;z-index:2;display:grid;place-items:center;border-radius:50%;color:#fff;font:700 22px "Comfortaa",sans-serif;box-shadow:0 14px 28px rgba(75,104,116,.18)}.orbit-one{width:64px;height:64px;left:4%;top:20%;background:var(--violet);transform:rotate(-12deg)}.orbit-two{width:52px;height:52px;right:3%;bottom:20%;background:var(--teal);transform:rotate(8deg)}.speech-bubble{position:absolute;z-index:3;right:1%;top:22%;padding:13px 18px;border-radius:18px 18px 18px 5px;background:#fff;box-shadow:0 18px 36px rgba(44,92,104,.16)}.speech-bubble span{display:block;color:var(--orange);font-size:9px;font-weight:900;letter-spacing:.16em}.speech-bubble b{font:700 14px/1.35 "Comfortaa",sans-serif}
.quest-app{padding:48px 0 80px}.quest-header{display:flex;justify-content:space-between;align-items:end;gap:30px}.quest-header h1{margin:10px 0 6px;font-size:clamp(34px,4vw,52px)}.quest-header p{margin:0;color:var(--muted)}.score-card{min-width:180px;display:grid;grid-template-columns:1fr auto;align-items:center;padding:15px 18px;border-radius:20px;background:rgba(255,255,255,.93);box-shadow:var(--shadow)}.score-card span{font-size:11px;font-weight:800;text-transform:uppercase;color:var(--muted)}.score-card strong{grid-row:span 2;color:var(--orange);font:700 42px/1 "Comfortaa",sans-serif}.score-card small{color:var(--teal-deep);font-weight:700}.progress-shell{margin:28px 0;padding:15px 19px;border:1px solid rgba(20,132,135,.12);border-radius:18px;background:rgba(255,255,255,.84)}.progress-label{display:flex;justify-content:space-between;margin-bottom:8px;font-size:12px;font-weight:800}.progress-label b{color:var(--teal-deep)}.progress-track{height:10px;border-radius:10px;background:#dfede9;overflow:hidden}.progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--teal),#54c7bd,var(--yellow));transition:width .6s cubic-bezier(.2,.8,.2,1)}
.portal-layout{display:grid;grid-template-columns:390px minmax(0,1fr);gap:24px;align-items:start}.portal-map{display:grid;gap:10px}.portal-card{width:100%;display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:13px;padding:13px 15px;border:1px solid rgba(55,105,113,.12);border-radius:18px;text-align:left;background:rgba(255,255,255,.92);box-shadow:0 9px 25px rgba(58,101,109,.06);transition:.2s}.portal-card:hover:not(:disabled),.portal-card.active{transform:translateX(5px);border-color:var(--portal-color);box-shadow:0 12px 28px color-mix(in srgb,var(--portal-color) 18%,transparent)}.portal-card:disabled{opacity:.55;cursor:not-allowed}.portal-number{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;color:var(--portal-color);background:color-mix(in srgb,var(--portal-color) 13%,white);font:700 15px "Comfortaa",sans-serif}.portal-card h3{margin:0 0 3px;font:700 13px/1.25 "Comfortaa",sans-serif}.portal-card small{color:var(--muted);font-size:11px}.portal-status{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;color:#fff;background:var(--portal-color);font-size:12px}.challenge-panel{min-height:520px;border:1px solid rgba(43,112,119,.13);border-radius:28px;background:rgba(255,255,255,.95);box-shadow:var(--shadow);overflow:hidden}.challenge-empty{min-height:520px;display:grid;place-content:center;justify-items:center;padding:40px;text-align:center}.mini-bit{width:70px;height:70px;display:grid;place-items:center;margin-bottom:14px;border-radius:24px;color:#fff;background:linear-gradient(135deg,var(--teal),#62cbc2);font-size:28px;box-shadow:0 16px 30px rgba(14,165,168,.25)}.challenge-empty h2{margin:0 0 8px;font-size:24px}.challenge-empty p{max-width:440px;margin:0;color:var(--muted);line-height:1.6}
.challenge-content{padding:28px}.challenge-top{display:flex;justify-content:space-between;align-items:center;gap:18px;padding-bottom:20px;border-bottom:1px solid #e7efee}.challenge-kicker{color:var(--teal-deep);font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.challenge-top h2{margin:6px 0 0;font-size:22px}.task-tabs{display:flex;gap:7px}.task-tab{width:34px;height:34px;border:1px solid #d9e6e4;border-radius:11px;color:var(--muted);background:#fff;font-weight:800}.task-tab.active{color:#fff;border-color:var(--teal);background:var(--teal)}.task-tab.done{color:var(--success);border-color:#bde6d1;background:#ebfaf2}.task-prompt{margin:28px 0 20px;padding:22px;border-radius:18px;color:#183746;background:linear-gradient(135deg,#f0faf8,#fff9ed);font:600 18px/1.55 "Comfortaa",sans-serif}.option-list{display:grid;gap:10px}.option-button{display:flex;align-items:center;gap:12px;min-height:54px;padding:10px 14px;border:1px solid #dbe7e5;border-radius:15px;text-align:left;color:var(--ink);background:#fff;transition:.18s}.option-button:hover{border-color:var(--teal);transform:translateY(-1px)}.option-button:disabled{opacity:.65}.option-letter{width:32px;height:32px;display:grid;place-items:center;flex:none;border-radius:10px;color:var(--teal-deep);background:#eaf6f3;font-weight:900}.feedback{margin-top:18px;padding:15px 17px;border-radius:15px;line-height:1.5}.feedback.correct{color:#146a45;background:#eaf8f0}.feedback.wrong{color:#9c4046;background:#fff0ef}.feedback b{display:block;margin-bottom:3px;font-family:"Comfortaa",sans-serif}.task-meta{display:flex;justify-content:space-between;gap:15px;margin-top:18px;color:var(--muted);font-size:11px;font-weight:700}.complete-card{min-height:520px;display:grid;place-content:center;justify-items:center;padding:40px;text-align:center}.complete-card .crystal{font-size:68px;filter:drop-shadow(0 12px 20px rgba(14,165,168,.22))}.complete-card h2{margin:14px 0 8px;font-size:28px}.complete-card p{max-width:460px;color:var(--muted);line-height:1.6}.toast{position:fixed;right:24px;bottom:24px;z-index:10;max-width:330px;padding:13px 17px;border-radius:14px;color:#fff;background:var(--ink);box-shadow:0 15px 35px rgba(29,54,67,.22);opacity:0;transform:translateY(15px);pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:980px){.welcome{grid-template-columns:1fr;padding-top:40px}.hero-art{order:-1;min-height:340px}.hero-art img{max-height:380px}.speech-bubble{right:10%}.form-grid{grid-template-columns:1fr 1fr 90px}.primary-button{grid-column:1/-1}.portal-layout{grid-template-columns:1fr}.portal-map{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.topbar,main{width:min(100% - 28px,1240px)}.topbar{height:72px}.lab-status{padding:7px 9px}.lab-count{display:none}.lab-status-copy strong{font-size:10px}.welcome{min-height:calc(100vh - 72px);padding:24px 0 48px}.hero-art{min-height:280px}.hero-art img{max-height:310px}.hero-copy>h1{font-size:38px}.feature-row{gap:15px;justify-content:space-between}.feature{display:block}.feature b{display:block;margin-bottom:5px}.form-grid{grid-template-columns:1fr}.register-card{padding:17px}.class-field,.primary-button{grid-column:auto}.quest-header{align-items:stretch;flex-direction:column}.score-card{width:100%}.portal-map{grid-template-columns:1fr}.challenge-content{padding:20px}.challenge-top{align-items:flex-start;flex-direction:column}.top-actions .sound-button{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* Quest cockpit: the page itself never scrolls while a student is solving. */
body.quest-active{height:100dvh;overflow:hidden}.quest-active .topbar{height:64px}.quest-active main{height:calc(100dvh - 64px)}.quest-active .quest-app{height:100%;padding:12px 0 14px;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:9px}.quest-active .quest-header{align-items:center}.quest-active .quest-header h1{margin:4px 0 2px;font-size:30px}.quest-active .quest-header p{font-size:12px}.quest-active .score-card{min-width:164px;padding:9px 13px;border-radius:16px}.quest-active .score-card strong{font-size:32px}.quest-active .progress-shell{margin:0;padding:9px 14px;border-radius:14px}.quest-active .progress-track{height:7px}.quest-active .portal-layout{height:100%;min-height:0;grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:12px}.quest-active .portal-map{min-height:0;grid-template-columns:1fr;grid-template-rows:repeat(7,minmax(0,1fr));gap:5px}.quest-active .portal-card{min-height:0;padding:5px 9px;border-radius:13px;grid-template-columns:34px 1fr auto;gap:9px}.quest-active .portal-number{width:34px;height:34px;border-radius:10px;font-size:12px}.quest-active .portal-card h3{font-size:11px}.quest-active .portal-card small{font-size:9px}.quest-active .portal-status{width:21px;height:21px}.quest-active .challenge-panel{height:100%;min-height:0;overflow:auto;border-radius:22px}.quest-active .challenge-content{min-height:100%;padding:16px 18px;display:flex;flex-direction:column}.quest-active .challenge-top{padding-bottom:9px}.quest-active .challenge-top h2{margin-top:3px;font-size:17px}.quest-active .task-prompt{margin:10px 0;padding:12px 15px;border-radius:14px;font-size:14px;line-height:1.42}.quest-active .task-meta{margin-top:auto;padding-top:8px}.quest-active .feedback{margin-top:8px;padding:10px 13px;font-size:12px}.quest-active .option-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.quest-active .option-button{min-height:44px;padding:7px 10px}.quest-active .option-letter{width:27px;height:27px}.interaction-zone{display:grid;gap:8px}.check-button,.secondary-button{min-height:39px;padding:0 16px;border-radius:12px;font-weight:800}.check-button{justify-self:end;border:0;color:#fff;background:linear-gradient(135deg,var(--teal),#39bdb1);box-shadow:0 8px 18px rgba(14,165,168,.2)}.secondary-button{border:1px solid #d7e5e3;color:var(--muted);background:#fff}.submit-row{display:flex;justify-content:flex-end;gap:8px}

.classify-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.classify-item{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:54px;padding:8px 10px;border:1px solid #dce9e6;border-radius:13px;background:#fff}.classify-item>span{font-size:12px;font-weight:700}.classify-item>div{display:flex;flex-direction:column;gap:3px}.classify-item button{padding:3px 7px;border:1px solid #d7e5e3;border-radius:7px;color:var(--muted);background:#f8fbfa;font-size:9px;font-weight:800}.classify-item button.selected{color:#fff;border-color:var(--teal);background:var(--teal)}
.sequence-answer{min-height:46px;display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px dashed #a9d7d1;border-radius:12px;background:#f3fbf9}.sequence-answer span{color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase}.sequence-answer b{padding:5px 7px;border-radius:8px;color:var(--teal-deep);background:#fff;font-size:11px}.sequence-pool{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.sequence-pool button{min-height:42px;border:1px solid #d9e6e4;border-radius:11px;color:var(--ink);background:#fff;font-weight:800}.sequence-pool button:disabled{opacity:.35}
.bit-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.bit-grid.truth{grid-template-columns:repeat(4,minmax(0,1fr))}.bit-grid.gates{grid-template-columns:repeat(3,minmax(0,1fr))}.bit-cell{min-height:67px;display:grid;place-items:center;gap:4px;padding:7px;border:1px solid #d9e7e5;border-radius:13px;color:var(--ink);background:#fff}.bit-cell span{font-size:11px;font-weight:800;text-align:center}.bit-cell small{display:block;color:var(--muted);font-size:9px}.bit-cell b{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;color:#fff;background:#9aaeb4}.bit-cell.is-one{border-color:var(--teal);background:#f0fbf8}.bit-cell.is-one b{background:var(--teal)}
.input-answer{display:flex;justify-content:center;gap:8px}.input-answer input{max-width:230px}.match-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.match-grid label{display:grid;gap:6px;padding:9px;border:1px solid #dbe8e6;border-radius:12px;background:#fff}.match-grid label>span{margin:0;color:var(--ink);font-size:10px;line-height:1.3;text-transform:none;letter-spacing:0}.match-grid select{width:100%;height:34px;border:1px solid #d4e4e1;border-radius:9px;color:var(--teal-deep);background:#f7fbfa;font-size:10px;font-weight:800}
.hardware-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:8px}.hardware-gallery figure{min-width:0;margin:0;display:grid;grid-template-columns:76px 1fr;align-items:center;gap:8px;padding:6px;border:1px solid #dce9e6;border-radius:12px;background:#fff}.hardware-gallery img{width:76px;height:52px;object-fit:cover;border-radius:8px}.hardware-gallery figcaption{display:grid;gap:2px}.hardware-gallery figcaption b{font:700 10px "Comfortaa",sans-serif}.hardware-gallery figcaption span{color:var(--muted);font-size:8px;line-height:1.25}

@media(max-width:760px){body.quest-active{overflow:hidden}.quest-active .topbar{height:58px}.quest-active main{height:calc(100dvh - 58px)}.quest-active .quest-app{padding:7px 0 9px;gap:6px}.quest-active .quest-header p,.quest-active .score-card span,.quest-active .score-card small{display:none}.quest-active .quest-header h1{font-size:22px}.quest-active .score-card{min-width:52px;width:auto;padding:5px 9px}.quest-active .score-card strong{font-size:28px}.quest-active .portal-layout{grid-template-columns:1fr;grid-template-rows:43px minmax(0,1fr);gap:7px}.quest-active .portal-map{grid-template-columns:repeat(7,minmax(38px,1fr));grid-template-rows:1fr;gap:4px}.quest-active .portal-card{display:grid;grid-template-columns:1fr;padding:3px}.quest-active .portal-card>span:nth-child(2),.quest-active .portal-status{display:none}.quest-active .portal-number{width:100%;height:34px}.classify-grid,.match-grid{grid-template-columns:1fr}.hardware-gallery figure{grid-template-columns:1fr}.hardware-gallery img{width:100%;height:42px}.hardware-gallery figcaption span{display:none}}
@media(max-height:720px){.quest-active .quest-header p,.quest-active .eyebrow{display:none}.quest-active .quest-header h1{font-size:23px}.quest-active .task-prompt{margin:7px 0;padding:9px 12px}.hardware-gallery img{height:42px}.hardware-gallery figure{grid-template-columns:64px 1fr}.hardware-gallery img{width:64px}.quest-active .challenge-content{padding:12px 15px}}

/* Large horizontal topic tabs and an age-appropriate workspace. */
.quest-active .portal-layout{grid-template-columns:1fr;grid-template-rows:78px minmax(0,1fr);gap:10px}.quest-active .portal-map{grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:1fr;gap:7px;overflow-x:auto;overflow-y:hidden}.quest-active .portal-card{height:100%;min-width:145px;padding:9px 10px;grid-template-columns:38px minmax(0,1fr) 22px;gap:8px;border-radius:15px}.quest-active .portal-card:hover:not(:disabled),.quest-active .portal-card.active{transform:translateY(-3px)}.quest-active .portal-number{width:38px;height:38px;font-size:13px}.quest-active .portal-card h3{font-size:13px;line-height:1.15}.quest-active .portal-card small{margin-top:4px;font-size:10px}.quest-active .challenge-panel{border-radius:24px}.quest-active .challenge-content{padding:20px 24px}.quest-active .challenge-top{padding-bottom:12px}.quest-active .challenge-top h2{font-size:21px}.quest-active .challenge-kicker{font-size:12px}.quest-active .task-prompt{margin:12px 0 14px;padding:15px 18px;font-size:17px;line-height:1.5}.quest-active .option-button{min-height:54px;padding:10px 14px;font-size:15px}.quest-active .option-letter{width:32px;height:32px}.quest-active .task-meta{font-size:12px}.check-button,.secondary-button{min-height:46px;padding:0 20px;font-size:14px}.classify-item{min-height:68px;padding:11px 13px}.classify-item>span{font-size:14px}.classify-item button{padding:5px 9px;font-size:10px}.sequence-pool{grid-template-columns:repeat(auto-fit,minmax(92px,1fr))}.sequence-pool button{min-height:48px;font-size:15px}.sequence-answer{min-height:54px;flex-wrap:wrap}.sequence-answer b{font-size:13px}.bit-cell{min-height:84px}.bit-cell span{font-size:14px}.bit-cell small{font-size:11px}.bit-cell b{width:34px;height:34px;font-size:16px}.match-grid label{padding:12px}.match-grid label>span{font-size:13px}.match-grid select{height:42px;font-size:12px}.input-answer input{height:50px;font-size:16px}.multi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:9px}.multi-grid button{min-height:52px;display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid #d6e5e2;border-radius:13px;color:var(--ink);background:#fff;text-align:left}.multi-grid button b{font-size:14px}.multi-check{width:25px;height:25px;display:grid;place-items:center;flex:none;border-radius:8px;color:transparent;background:#edf3f2}.multi-grid button.selected{border-color:var(--teal);background:#eefaf7}.multi-grid button.selected .multi-check{color:#fff;background:var(--teal)}.hardware-gallery figure{grid-template-columns:105px 1fr;padding:8px}.hardware-gallery img{width:105px;height:68px}.hardware-gallery figcaption b{font-size:13px}.hardware-gallery figcaption span{font-size:10px}

@media(max-width:900px){.quest-active .portal-layout{grid-template-rows:70px minmax(0,1fr)}.quest-active .portal-map{grid-template-columns:repeat(7,145px)}.quest-active .portal-card{min-width:145px}.quest-active .challenge-content{padding:16px}.quest-active .task-prompt{font-size:15px}.hardware-gallery figure{grid-template-columns:70px 1fr}.hardware-gallery img{width:70px;height:54px}}
@media(max-width:600px){.quest-active .portal-layout{grid-template-rows:58px minmax(0,1fr)}.quest-active .portal-map{grid-template-columns:repeat(7,118px)}.quest-active .portal-card{min-width:118px;grid-template-columns:31px 1fr;padding:6px}.quest-active .portal-card>span:nth-child(2){display:block}.quest-active .portal-status{display:none}.quest-active .portal-number{width:31px;height:31px}.quest-active .portal-card h3{display:block;font-size:11px}.quest-active .portal-card small{display:none}.quest-active .option-list,.classify-grid,.match-grid{grid-template-columns:1fr}.quest-active .task-prompt{font-size:14px}.bit-grid,.bit-grid.truth,.bit-grid.gates{grid-template-columns:repeat(2,minmax(0,1fr))}.hardware-gallery{grid-template-columns:repeat(3,1fr)}.hardware-gallery figure{grid-template-columns:1fr}.hardware-gallery img{width:100%;height:44px}.hardware-gallery figcaption span{display:none}}

/* V5: stronger colour, open topic tabs, larger workspace and distinct task mechanics. */
body:before{background:linear-gradient(90deg,rgba(255,255,255,.72),rgba(255,255,255,.36) 48%,rgba(255,255,255,.18))}
.hero-art img{width:min(112%,720px);max-height:540px}.hero-art:before{background:radial-gradient(circle,#fff 0 36%,rgba(52,211,194,.34) 58%,rgba(255,159,77,.2) 69%,transparent 73%)}
.quest-active .quest-app{padding:10px 0 12px;gap:10px}.quest-active .quest-header h1{font-size:34px;color:#102b40}.quest-active .quest-header p{font-size:14px;color:#405d70}.quest-active .score-card{border:2px solid #ffd8bd;background:#fff7ee;box-shadow:0 10px 28px rgba(244,117,54,.14)}
.quest-active .progress-shell{border:1px solid #8edfd7;background:rgba(245,255,252,.95)}.quest-active .progress-label{font-size:13px}.quest-active .progress-track{height:9px;background:#cfece7}.quest-active .progress-track span{background:linear-gradient(90deg,#02aeb2,#36c887,#ffc02e,#ff7d43)}
.quest-active .portal-layout{grid-template-rows:96px minmax(0,1fr);gap:12px}.quest-active .portal-map{gap:9px}.quest-active .portal-card{min-width:158px;padding:12px;grid-template-columns:44px minmax(0,1fr) 25px;border:2px solid color-mix(in srgb,var(--portal-color) 42%,white);background:color-mix(in srgb,var(--portal-color) 13%,white);box-shadow:0 8px 20px color-mix(in srgb,var(--portal-color) 17%,transparent);opacity:1}.quest-active .portal-card:hover,.quest-active .portal-card.active{transform:translateY(-4px);border-color:var(--portal-color);background:color-mix(in srgb,var(--portal-color) 23%,white);box-shadow:0 13px 28px color-mix(in srgb,var(--portal-color) 30%,transparent)}.quest-active .portal-card.active{background:linear-gradient(145deg,color-mix(in srgb,var(--portal-color) 90%,#163a5a),var(--portal-color));color:#fff}.quest-active .portal-card.active small{color:rgba(255,255,255,.88)}.quest-active .portal-number{width:44px;height:44px;color:#fff;background:var(--portal-color);font-size:15px;box-shadow:0 5px 13px color-mix(in srgb,var(--portal-color) 35%,transparent)}.quest-active .portal-card h3{font-size:15px;line-height:1.2}.quest-active .portal-card small{font-size:11px;color:#486171}.quest-active .portal-status{width:25px;height:25px;font-size:13px}
.quest-active .challenge-panel{border:2px solid #b9e3df;background:rgba(255,255,255,.98);box-shadow:0 18px 46px rgba(22,104,119,.16)}.quest-active .challenge-content{padding:22px 28px}.quest-active .challenge-top{padding-bottom:13px;border-bottom:2px solid #d9efec}.quest-active .challenge-top h2{font-size:26px;color:#15364d}.quest-active .challenge-kicker{font-size:13px;color:#008e93}.task-tab{width:42px;height:42px;font-size:15px;border:2px solid #b9d8d4}.task-tab.active{background:linear-gradient(135deg,#00a5aa,#27c2ad);box-shadow:0 7px 16px rgba(0,165,170,.24)}
.task-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);align-items:stretch;gap:12px;margin:13px 0}.quest-active .task-prompt{height:100%;margin:0;padding:17px 20px;border:2px solid #caebe6;background:linear-gradient(135deg,#eafbf7,#fff4da);font-size:19px;line-height:1.5}
.mentor-card{min-height:92px;display:flex;align-items:center;gap:13px;padding:8px 13px 8px 6px;border:2px solid color-mix(in srgb,var(--mentor-color) 38%,white);border-radius:17px;background:color-mix(in srgb,var(--mentor-color) 10%,white);overflow:hidden}.mentor-avatar{width:76px;height:76px;flex:none;border-radius:15px;background-image:url("logic-mentors.png");background-repeat:no-repeat;background-size:300% 100%;filter:drop-shadow(0 5px 7px rgba(21,59,74,.16))}.mentor-avatar.analyst{background-position:0 50%}.mentor-avatar.engineer{background-position:50% 50%}.mentor-avatar.robot{background-position:100% 50%}.mentor-card>span:last-child{display:grid;gap:2px}.mentor-card b{font:700 14px "Comfortaa",sans-serif;color:#17384f}.mentor-card small{color:var(--mentor-color);font-size:10px;font-weight:900;text-transform:uppercase}.mentor-card em{color:#405a69;font-size:11px;line-height:1.3;font-style:normal}
.interaction-zone{flex:1;min-height:0;display:flex;flex-direction:column;gap:11px}.interaction-zone>.check-button{align-self:flex-end}.quest-active .task-meta{font-size:13px;color:#536b7c}.check-button,.secondary-button{min-height:48px;padding:0 22px;font-size:15px}.check-button{background:linear-gradient(135deg,#009fa5,#24c5ad);box-shadow:0 9px 20px rgba(0,159,165,.24)}
.classify-grid{flex:1;grid-template-rows:repeat(3,minmax(72px,1fr));gap:11px}.classify-item{min-height:76px;padding:13px 15px;border:2px solid #d4e9e6;background:linear-gradient(135deg,#fff,#f7fcfb)}.classify-item>span{font-size:16px;line-height:1.35}.classify-item>div{flex-direction:row;gap:7px}.classify-item button{padding:9px 11px;border:2px solid #cce1de;font-size:12px}.classify-item button:hover{border-color:#09a6a9}.classify-item button.selected{box-shadow:0 5px 12px rgba(14,165,168,.2)}
.truth-workbench{flex:1;display:grid;place-items:center}.truth-workbench table{width:min(720px,100%);border-collapse:separate;border-spacing:0;overflow:hidden;border:2px solid #7064d8;border-radius:18px;background:#fff;box-shadow:0 12px 28px rgba(112,100,216,.15)}.truth-workbench th{padding:13px;color:#fff;background:#7064d8;font-size:14px}.truth-workbench td{padding:9px 16px;border-top:1px solid #e1def7;text-align:center;font-size:15px;font-weight:700}.truth-toggle{width:58px;height:40px;border:2px solid #c9c3f1;border-radius:11px;color:#6255c5;background:#f4f2ff;font-size:18px;font-weight:900}.truth-toggle.is-one{color:#fff;background:#7064d8}
.logic-flow{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;padding:18px;border:2px solid #ffca8e;border-radius:18px;background:linear-gradient(135deg,#fff9ed,#fff)}.logic-flow .bit-cell{min-width:125px;min-height:112px;border:2px solid #f3b46a;background:#fff}.flow-arrow{color:#ec873d;font-size:25px;font-weight:900}
.expression-tree{flex:1;display:grid;place-content:center;justify-items:center;gap:13px;padding:15px;border:2px solid #a991ec;border-radius:18px;background:linear-gradient(180deg,#f7f3ff,#fff)}.expression-branches{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:11px}.expression-tree .bit-cell{min-height:82px;border:2px solid #bba9eb}.tree-join{color:#7055ba;font-size:12px;font-weight:900;text-transform:uppercase}.expression-result{width:180px;background:#ede7ff!important}
.circuit-board{flex:1;display:flex;align-items:center;justify-content:center;gap:12px;padding:22px;border:2px solid #37ba8a;border-radius:20px;background-color:#edfdf6;background-image:linear-gradient(rgba(45,184,137,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(45,184,137,.1) 1px,transparent 1px);background-size:24px 24px}.gate-node{min-width:135px;min-height:112px;display:grid;place-items:center;gap:4px;padding:12px;border:3px solid #28aa78;border-radius:19px;color:#174d3c;background:#fff;box-shadow:0 8px 0 #bdebd9}.gate-node small{color:#18815d;font-weight:900}.gate-node span{font-size:14px;font-weight:800}.gate-node b{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:#fff;background:#91aaa1;font-size:18px}.gate-node.is-one{background:#dcfaeb}.gate-node.is-one b{background:#20b77d}.wire{color:#f08a3f;font-size:25px;font-weight:900}
.adder-lab{flex:1;display:grid;grid-template-columns:1fr 220px 1fr;align-items:center;gap:25px;padding:24px;border:2px solid #4d96df;border-radius:20px;background:linear-gradient(135deg,#edf7ff,#fff)}.adder-inputs,.adder-outputs{display:flex;justify-content:center;gap:14px}.adder-inputs span{width:80px;height:80px;display:grid;place-items:center;border:2px solid #78afe4;border-radius:16px;color:#356d9f;background:#fff;font-weight:900}.adder-inputs b{font-size:26px}.adder-chip{min-height:130px;display:grid;place-content:center;text-align:center;border:3px solid #386fa8;border-radius:24px;color:#fff;background:linear-gradient(145deg,#3c88cc,#245584);box-shadow:0 11px 0 #bed8ef}.adder-chip small{font-size:10px;font-weight:900;letter-spacing:.12em}.adder-chip b{font-size:27px}.adder-outputs .bit-cell{width:120px;min-height:100px;border:2px solid #72a9de}
.trigger-timeline{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:12px;align-items:center;padding:20px;border:2px solid #e66c7a;border-radius:20px;background:linear-gradient(180deg,#fff3f5,#fff)}.clock-step{position:relative;display:grid;gap:7px;padding:15px;border:2px solid #f0acb4;border-radius:16px;background:#fff}.clock-step:not(:last-child):after{content:"→";position:absolute;right:-19px;top:50%;z-index:2;color:#d85265;font-size:22px;font-weight:900}.clock-step small{color:#d85265;font-weight:900;text-transform:uppercase}.clock-step span{font-size:14px;font-weight:800}.clock-step button{height:54px;display:flex;align-items:center;justify-content:center;gap:10px;border:2px solid #ef9da8;border-radius:12px;color:#9e3f4d;background:#fff3f5}.clock-step button i{font-style:normal;font-weight:900}.clock-step button b{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:#fff;background:#a7aeb4}.clock-step button.is-one{background:#ffe1e5}.clock-step button.is-one b{background:#df5b6c}
.bit-cell.is-one b{background:var(--teal)}
@media(max-width:980px){.task-intro{grid-template-columns:1fr}.mentor-card{min-height:72px}.mentor-avatar{width:58px;height:58px}.expression-branches{grid-template-columns:repeat(2,1fr)}.logic-flow,.circuit-board{overflow-x:auto;justify-content:flex-start}.adder-lab{grid-template-columns:1fr 150px 1fr}.trigger-timeline{grid-template-columns:repeat(4,minmax(145px,1fr));overflow-x:auto}}
@media(max-height:720px){.quest-active .portal-layout{grid-template-rows:78px minmax(0,1fr)}.task-intro{grid-template-columns:minmax(0,1fr) 300px;margin:7px 0}.mentor-card{min-height:64px}.mentor-avatar{width:54px;height:54px}.mentor-card em{display:none}.classify-grid{grid-template-rows:repeat(3,minmax(58px,1fr))}.classify-item{min-height:58px;padding:8px 11px}}

/* V6: readable topic tabs. */
.quest-active .portal-layout{grid-template-rows:106px minmax(0,1fr)}
.quest-active .portal-card{position:relative;display:block;min-width:158px;padding:11px 12px;text-align:left}.quest-active .portal-card>span:nth-child(2){display:block;min-width:0}.quest-active .portal-number{position:absolute;left:12px;bottom:10px;width:36px;height:34px;border-radius:10px}.quest-active .portal-card h3{min-height:34px;margin:0 0 8px;font-size:14px;line-height:1.2;overflow-wrap:normal;word-break:normal}.quest-active .portal-card small{display:block;margin-left:45px;padding-right:20px;font-size:10px;line-height:1.2;white-space:nowrap}.quest-active .portal-status{position:absolute;right:9px;bottom:11px}.quest-active .portal-status:empty{display:none}

/* Three-variable truth table with intermediate columns. */
.truth-matrix{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:8px}.truth-matrix table{width:min(900px,100%);margin:auto;border-collapse:separate;border-spacing:0;border:2px solid #6c61d9;border-radius:17px;overflow:hidden;background:#fff;box-shadow:0 11px 26px rgba(108,97,217,.14)}.truth-matrix th{height:36px;padding:5px 12px;color:#fff;background:#665bd3;font-size:13px}.truth-matrix th:nth-child(n+4){background:#4f43bd}.truth-matrix td{height:34px;padding:3px 10px;border-top:1px solid #e5e1ff;border-right:1px solid #eeeaff;text-align:center;font-size:14px;font-weight:800}.truth-matrix .given-bit{color:#17384d;background:#f7fbff}.truth-matrix button{width:44px;height:28px;border:2px solid #c5bff4;border-radius:8px;color:#6257c9;background:#f5f3ff;font-weight:900}.truth-matrix button.is-one{color:#fff;border-color:#6559d1;background:#6559d1}.matrix-legend{display:flex;justify-content:center;gap:20px;color:#607385;font-size:10px}.matrix-legend b{color:#6257c9}

/* Real 74HC logic-lab presentation: packages, standard symbols, probes and LED. */
.real-circuit-lab{flex:1;min-height:205px;display:grid;grid-template-columns:135px minmax(0,1fr) 90px;grid-template-rows:auto 1fr;gap:10px;padding:12px;border:2px solid #1daf7c;border-radius:20px;background-color:#effcf7;background-image:linear-gradient(rgba(29,175,124,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(29,175,124,.08) 1px,transparent 1px);background-size:22px 22px}.lab-supply{grid-column:1/-1;display:flex;align-items:center;gap:16px;padding:7px 12px;border:1px solid #a7ddc9;border-radius:11px;background:#fff}.lab-supply span{color:#167955;font-size:10px;font-weight:900;letter-spacing:.12em}.lab-supply b{font-size:12px}.lab-supply i{margin-left:auto;color:#168b60;font-size:10px;font-style:normal;font-weight:800}.input-bank{display:grid;grid-template-columns:repeat(2,1fr);align-content:center;gap:9px}.input-switch{display:grid;place-items:center;gap:4px;padding:7px;border:2px solid #8dcfb7;border-radius:12px;background:#fff}.input-switch small{font-size:9px;font-weight:900}.input-switch b{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:#fff;background:#8ca19a}.input-switch b.on{background:#1ab77e;box-shadow:0 0 0 4px #d9f8eb}.component-flow{min-width:0;display:grid;grid-template-columns:repeat(7,minmax(18px,1fr));align-items:center;gap:5px}.logic-component{height:100%;min-width:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 32px 38px auto auto;align-items:center;gap:2px;padding:7px;border:2px solid #51bd95;border-radius:14px;color:#174b3a;background:#fff;box-shadow:0 6px 0 #c7ebdd}.logic-component:nth-of-type(1){grid-column:1}.logic-component:nth-of-type(2){grid-column:3}.logic-component:nth-of-type(3){grid-column:5}.logic-component:nth-of-type(4){grid-column:7}.copper-wire{color:#f18438;font-size:20px;font-weight:900;text-align:center}.component-heading{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center}.component-heading>b{color:#087e56;font-size:11px}.component-heading small{color:#5c7169;font-size:9px;font-weight:900}.dip-chip{position:relative;width:72px;height:26px;display:grid;place-items:center;justify-self:center;border-radius:4px;color:#fff;background:#273638;box-shadow:inset 0 0 0 2px #0d1718;font-style:normal}.dip-chip:before{content:"";position:absolute;top:-1px;width:9px;height:5px;border-radius:0 0 5px 5px;background:#effcf7}.dip-chip em{font-size:8px;font-style:normal;font-weight:900;letter-spacing:.03em}.pins{position:absolute;left:5px;right:5px;height:5px;background:repeating-linear-gradient(90deg,#aeb9b7 0 3px,transparent 3px 9px)}.pins.top{top:-5px}.pins.bottom{bottom:-5px}.gate-svg{width:64px;height:36px;justify-self:center}.gate-shape{fill:#e9fff6;stroke:#087e56;stroke-width:2.5}.gate-wire{fill:none;stroke:#f18438;stroke-width:2.5}.signal-path{grid-column:1/-1;font-size:9px;font-weight:900}.probe-point{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:5px;padding:3px;border-radius:8px;color:#536b62;background:#edf6f2;font-size:8px;font-weight:800}.probe-point i{color:#ef7932;font-style:normal}.probe-point b{width:23px;height:23px;display:grid;place-items:center;border-radius:7px;color:#fff;background:#8da49b;font-size:13px}.logic-component.is-one{border-color:#079e69;background:#e3faef;box-shadow:0 6px 0 #94ddc0}.logic-component.is-one .probe-point b{background:#13ad75;box-shadow:0 0 0 3px #c5f1df}.output-led{display:grid;place-content:center;justify-items:center;gap:7px;border:2px solid #ef9d62;border-radius:14px;background:#fff}.output-led>span{color:#b85d22;font-weight:900}.output-led>i{width:38px;height:38px;border:5px solid #b6c0bc;border-radius:50%;background:#68766f;box-shadow:inset 0 0 0 4px #87958f}.output-led.on>i{border-color:#ffd38d;background:#ff9d25;box-shadow:0 0 19px #ffad37,inset 0 0 0 4px #ffc45f}.output-led small{font-size:8px;font-weight:800}

.switchboard-grid{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.switch-config{position:relative;min-height:190px;display:grid;grid-template-rows:auto 1fr auto;gap:8px;padding:11px;border:2px solid #a9d9c8;border-radius:16px;color:#173a4d;background:linear-gradient(160deg,#fff,#eefaf6)}.switch-config:hover,.switch-config.selected{border-color:#13aa78;box-shadow:0 9px 20px rgba(19,170,120,.16)}.switch-config.selected{background:#ddf8ed}.config-check{position:absolute;right:8px;top:8px;width:24px;height:24px;display:grid;place-items:center;border-radius:7px;color:transparent;background:#e6eeeb}.switch-config.selected .config-check{color:#fff;background:#16ad78}.physical-switches{display:flex;justify-content:center;gap:12px}.physical-switches i{display:grid;justify-items:center;gap:2px;font-style:normal}.physical-switches small{font-size:9px;font-weight:900}.physical-switches b{width:29px;height:29px;display:grid;place-items:center;border-radius:8px;color:#fff;background:#879b94}.physical-switches b.on{background:#15ad77}.mini-real-schematic{display:flex;align-items:center;justify-content:center;gap:4px}.mini-real-schematic>span{display:grid;justify-items:center;gap:7px}.mini-real-schematic .dip-chip{width:62px;height:24px}.mini-real-schematic .gate-svg{width:54px;height:32px}.mini-real-schematic strong{color:#f18438}.unknown-led{display:flex;align-items:center;justify-content:center;gap:7px}.unknown-led i{width:22px;height:22px;border:3px solid #c3aaa0;border-radius:50%;background:#7d8985}.unknown-led b{font-size:11px}
@media(max-width:1050px){.real-circuit-lab{grid-template-columns:110px minmax(760px,1fr) 80px;overflow-x:auto}.switchboard-grid{grid-template-columns:repeat(4,minmax(220px,1fr));overflow-x:auto}.truth-matrix table{min-width:700px}}
@media(max-height:720px){.quest-active .portal-layout{grid-template-rows:88px minmax(0,1fr)}.real-circuit-lab{min-height:215px}.logic-component{grid-template-rows:auto 30px 34px auto auto}.dip-chip{height:24px}.gate-svg{height:34px}.switch-config{min-height:165px}.truth-matrix td{height:29px}.truth-matrix th{height:31px}}

/* V8: a half-adder is a circuit of XOR and AND, not a fictional single chip. */
.half-adder-lab{flex:1;min-height:215px;display:grid;grid-template-rows:auto 1fr;border:2px solid #398dd2;border-radius:20px;overflow:hidden;background:#f1f8ff;box-shadow:0 10px 24px rgba(42,119,180,.12)}.half-adder-heading{display:flex;align-items:center;gap:18px;padding:9px 15px;color:#164f7d;background:#dcefff;border-bottom:1px solid #a7cfea}.half-adder-heading span{font-size:9px;font-weight:900;letter-spacing:.13em}.half-adder-heading b{font-size:12px}.half-adder-body{display:grid;grid-template-columns:130px 190px minmax(0,1fr);align-items:stretch;gap:15px;padding:14px;background-image:linear-gradient(rgba(57,141,210,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(57,141,210,.07) 1px,transparent 1px);background-size:22px 22px}.half-inputs{display:grid;align-content:center;gap:12px}.half-inputs>span{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border:2px solid #84b9df;border-radius:12px;background:#fff}.half-inputs small{font-size:10px;font-weight:900}.half-inputs b{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;color:#fff;background:#8598a5;font-size:17px}.half-inputs b.on{background:#168fc3;box-shadow:0 0 0 4px #d9f1fc}.signal-split{position:relative;display:grid;grid-template-rows:1fr auto 1fr;align-items:center;justify-items:center;color:#bc642a}.signal-split i{width:100%;height:2px;background:#ef833f}.signal-split i:first-child{transform:rotate(-16deg);transform-origin:right}.signal-split i:last-child{transform:rotate(16deg);transform-origin:right}.signal-split b{padding:5px 7px;border-radius:8px;color:#9b5528;background:#fff4e9;font-size:9px;line-height:1.25;text-align:center}.adder-branches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.adder-branch{position:relative;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 58px auto;align-items:center;gap:4px;padding:10px 13px;border:2px solid #77acda;border-radius:16px;color:#17415f;background:#fff;box-shadow:0 6px 0 #c4def1}.adder-branch:hover{border-color:#287fbd}.branch-title{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between}.branch-title small{color:#54748b;font-size:9px;font-weight:900;text-transform:uppercase}.branch-title strong{padding:4px 8px;border-radius:7px;color:#fff;background:#357fb6;font-size:11px}.adder-branch .gate-svg{width:92px;height:54px}.adder-branch .gate-shape{fill:#e8f6ff;stroke:#2377ae}.adder-branch .gate-wire{stroke:#ef833f}.adder-branch em{font-size:15px;font-style:normal;font-weight:900}.branch-led{width:30px;height:30px;justify-self:end;border:4px solid #abb9c2;border-radius:50%;background:#6d7d87}.adder-branch>b{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;color:#fff;background:#81939e;font-size:18px}.adder-branch>i{position:absolute;right:10px;bottom:11px;color:#557487;font-size:9px;font-style:normal;font-weight:900}.adder-branch.is-one{border-color:#129c70;background:#e9fbf4;box-shadow:0 6px 0 #9fdac5}.adder-branch.is-one .branch-led{border-color:#a8e7ce;background:#21c487;box-shadow:0 0 16px #37d99e}.adder-branch.is-one>b{background:#16a978}.xor-line{fill:none!important}
@media(max-width:950px){.half-adder-body{grid-template-columns:110px 130px minmax(600px,1fr);overflow-x:auto}.adder-branches{grid-template-columns:repeat(2,280px)}}
@media(max-height:720px){.half-adder-lab{min-height:185px}.half-adder-body{padding:9px}.adder-branch{grid-template-rows:auto 45px auto;padding:7px 10px}.adder-branch .gate-svg{height:44px}.half-adder-heading{padding:6px 12px}}

/* V9: the challenge workspace always fits; no nested scrollbars. */
.quest-active .challenge-panel{overflow:hidden}.quest-active .challenge-content{position:relative;height:100%;min-height:0;overflow:hidden;padding:14px 20px}.quest-active .challenge-top{flex:none;padding-bottom:8px}.quest-active .challenge-top h2{font-size:22px}.quest-active .task-intro{flex:none;grid-template-columns:minmax(0,1fr) minmax(260px,320px);gap:9px;margin:8px 0}.quest-active .task-prompt{padding:11px 15px;font-size:16px;line-height:1.35}.mentor-card{min-height:68px;padding:5px 10px 5px 4px}.mentor-avatar{width:58px;height:58px}.mentor-card em{font-size:9px}.interaction-zone{flex:1;min-height:0;overflow:hidden;gap:7px}.interaction-zone>*:first-child{min-height:0}.quest-active .task-meta{flex:none;margin-top:3px;padding-top:4px;font-size:10px}.check-button,.secondary-button{min-height:40px;font-size:13px}.hardware-gallery{flex:none;gap:6px;margin-bottom:5px}.hardware-gallery figure{grid-template-columns:72px 1fr;gap:6px;padding:5px}.hardware-gallery img{width:72px;height:46px}.hardware-gallery figcaption b{font-size:10px}.hardware-gallery figcaption span{font-size:8px}.half-adder-lab,.real-circuit-lab,.truth-matrix,.switchboard-grid{flex:1;min-height:0}.half-adder-heading{padding:6px 12px}.half-adder-body{min-height:0;padding:8px 11px}.adder-branch{min-height:0;grid-template-rows:auto 42px auto;padding:6px 9px}.adder-branch .gate-svg{height:42px}.half-inputs>span{padding:5px 8px}.half-inputs b{width:30px;height:30px}.real-circuit-lab{padding:8px;gap:6px}.lab-supply{padding:4px 9px}.input-switch{padding:4px}.logic-component{padding:5px;box-shadow:0 4px 0 #c7ebdd}.switch-config{min-height:0;padding:7px}.truth-matrix td{height:27px;padding:2px 8px}.truth-matrix th{height:29px}.truth-matrix button{height:24px}.quest-active #feedback:not(:empty){position:absolute;right:20px;bottom:30px;z-index:6;width:min(520px,calc(100% - 40px));margin:0;box-shadow:0 14px 32px rgba(25,66,80,.22)}
@media(max-width:1050px){.real-circuit-lab{grid-template-columns:85px minmax(0,1fr) 62px;overflow:hidden}.component-flow{grid-template-columns:repeat(7,minmax(12px,1fr))}.component-heading small,.signal-path{display:none}.dip-chip{width:54px}.gate-svg{width:50px}.output-led>i{width:30px;height:30px}.switchboard-grid{grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.mini-real-schematic .dip-chip{width:45px}.mini-real-schematic .gate-svg{width:42px}.half-adder-body{grid-template-columns:95px 110px minmax(0,1fr);overflow:hidden}.adder-branches{grid-template-columns:repeat(2,minmax(0,1fr))}.signal-split b{font-size:8px}}
@media(max-height:760px){.quest-active .quest-header p,.mentor-card em,.hardware-gallery figcaption span{display:none}.quest-active .portal-layout{grid-template-rows:78px minmax(0,1fr)}.quest-active .portal-card{padding:7px 10px}.quest-active .portal-card h3{min-height:26px;font-size:12px}.quest-active .portal-number{height:28px;bottom:6px}.quest-active .portal-card small{font-size:8px}.quest-active .challenge-content{padding:9px 15px}.quest-active .task-intro{margin:5px 0}.mentor-card{min-height:52px}.mentor-avatar{width:44px;height:44px}.hardware-gallery img{height:38px}.truth-matrix td{height:23px}.truth-matrix th{height:25px}.task-tab{width:34px;height:34px}}

/* V10: topic tabs without decorative sequence numbers. */
.quest-active .portal-layout{grid-template-rows:82px minmax(0,1fr)}.quest-active .portal-card{display:flex;flex-direction:column;justify-content:center;padding:10px 13px}.quest-active .portal-card>span:first-child{width:100%}.quest-active .portal-card h3{min-height:0;margin:0 0 8px;font-size:14px}.quest-active .portal-card small{margin:0;padding:0;font-size:10px}.quest-active .portal-status{right:10px;bottom:10px}
@media(max-height:760px){.quest-active .portal-layout{grid-template-rows:66px minmax(0,1fr)}.quest-active .portal-card h3{min-height:0;margin-bottom:5px}}

/* V11: compact cockpit header; more height belongs to the task. */
.quest-active .topbar{height:48px}.quest-active main{height:calc(100dvh - 48px)}.quest-active .topbar{border-bottom-color:rgba(34,102,111,.18)}.quest-active .lab-status{padding:4px 8px;border-radius:12px}.quest-active .lab-status-copy small{font-size:8px}.quest-active .lab-status-copy strong{font-size:10px}.quest-active .lab-count{padding:5px 8px;font-size:9px}.quest-active .student-chip{padding:4px 10px 4px 4px;font-size:11px}.quest-active .student-avatar{width:26px;height:26px}.quest-active .quest-app{padding:5px 0 8px;grid-template-rows:auto minmax(0,1fr);gap:6px}.quest-active .quest-header{display:grid;grid-template-columns:auto minmax(240px,1fr) 145px;align-items:center;gap:14px;min-height:38px}.quest-active .quest-header .eyebrow,.quest-active .quest-header p{display:none}.quest-active .quest-header h1{margin:0;font-size:21px;white-space:nowrap}.quest-active .quest-header .progress-shell{width:100%;margin:0;padding:5px 10px;border-radius:11px}.quest-active .quest-header .progress-label{margin-bottom:3px;font-size:9px}.quest-active .quest-header .progress-track{height:5px}.quest-active .score-card{min-width:0;height:38px;padding:5px 9px;border-radius:12px}.quest-active .score-card span{font-size:8px}.quest-active .score-card strong{font-size:24px}.quest-active .score-card small{font-size:9px}.quest-active .portal-layout{grid-template-rows:62px minmax(0,1fr);gap:6px}.quest-active .portal-card{padding:7px 11px;border-radius:13px}.quest-active .portal-card h3{margin-bottom:5px;font-size:13px}.quest-active .portal-card small{font-size:9px}.quest-active .portal-status{width:21px;height:21px;right:7px;bottom:7px}

/* Always-visible, compact explanations for the logic laboratory. */
.real-circuit-lab{grid-template-rows:auto auto minmax(0,1fr)}.circuit-legend{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,1fr);gap:5px}.circuit-legend span{padding:3px 5px;border:1px solid #b9dfd1;border-radius:7px;color:#516d63;background:rgba(255,255,255,.9);font-size:7px;text-align:center}.circuit-legend b{color:#087e56;font-size:8px}.input-switch em{color:#6c8079;font-size:7px;font-style:normal}.component-help{grid-column:1/-1;display:grid;align-content:center;gap:1px;padding:3px 4px;border-radius:7px;background:#f1faf6}.component-help>b{color:#126d50;font-size:8px}.component-help small{color:#5c7169;font-size:7px;line-height:1.15}.logic-component{grid-template-rows:auto 27px 32px auto minmax(25px,1fr) auto}.probe-point span{font-size:7px}.output-led>b{font-size:8px}.output-led small{max-width:58px;text-align:center}.switchboard-guide{flex:none;display:flex;align-items:center;justify-content:center;gap:7px;padding:5px 8px;border:1px solid #9fd5c2;border-radius:10px;color:#47675c;background:#eefaf6;font-size:8px}.switchboard-guide>b{color:#087e56}.switchboard-guide i{color:#ef833f;font-style:normal;font-weight:900}.mini-real-schematic small{color:#5f766d;font-size:7px;font-weight:700}
@media(max-width:900px){.quest-active .lab-count{display:none}.quest-active .quest-header{grid-template-columns:auto 1fr 110px;gap:8px}.quest-active .quest-header h1{font-size:17px}.quest-active .score-card span{display:none}.circuit-legend{grid-template-columns:repeat(5,minmax(90px,1fr))}}
@media(max-height:700px){.quest-active .topbar{height:42px}.quest-active main{height:calc(100dvh - 42px)}.quest-active .quest-header h1{font-size:18px}.quest-active .portal-layout{grid-template-rows:54px minmax(0,1fr)}.quest-active .portal-card small{display:none}.quest-active .portal-card h3{margin:0}.circuit-legend span{padding:2px;font-size:6px}}

/* V12: feedback is temporary and never blocks task controls. */
.quest-active #feedback:not(:empty){position:fixed;left:22px;right:auto;bottom:20px;z-index:100;width:min(470px,calc(100vw - 44px));margin:0;padding:12px 15px;pointer-events:none;box-shadow:0 14px 34px rgba(25,66,80,.25);animation:feedbackIn .18s ease-out}.quest-active #feedback.feedback.correct{border:1px solid #9ed9b9}.quest-active #feedback.feedback.wrong{border:1px solid #f0b8b8}@keyframes feedbackIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

/* V13: guided half-adder lesson instead of an unexplained schematic. */
.half-adder-teaching{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;padding:9px;border:2px solid #4b98d4;border-radius:18px;background:#eef7ff}.adder-given{display:flex;align-items:center;justify-content:center;gap:12px;padding:7px 12px;border-radius:11px;color:#244f70;background:#dcefff}.adder-given>span{font-size:9px;font-weight:900;letter-spacing:.12em}.adder-given>b{padding:5px 12px;border:2px solid #78b4df;border-radius:9px;background:#fff;font-size:16px}.adder-given>i{color:#ef833f;font-size:20px;font-style:normal;font-weight:900}.adder-given>em{margin-left:12px;font-size:11px;font-style:normal}.adder-given strong{color:#196ea8}.adder-rule-grid{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.adder-rule{min-height:0;display:grid;grid-template-rows:auto 1fr auto auto;gap:7px;padding:10px 13px;border:2px solid #9dc8e7;border-radius:14px;background:#fff}.adder-rule header{display:flex;align-items:center;justify-content:space-between}.adder-rule header span{color:#527188;font-size:10px;font-weight:900;text-transform:uppercase}.adder-rule header>b{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:#fff;background:#367fb5;font-size:17px}.rule-main{min-height:0;display:grid;grid-template-columns:95px 1fr;align-items:center;gap:12px}.rule-main .gate-svg{width:90px;height:56px}.rule-main strong{color:#175b88;font-size:14px}.rule-main p{margin:5px 0 0;color:#466274;font-size:11px;line-height:1.35}.rule-example{display:flex;align-items:center;justify-content:space-between;padding:6px 9px;border-radius:9px;background:#edf6fc}.rule-example span{font-size:9px;font-weight:800}.rule-example b{font-size:16px}.adder-choice{display:flex;align-items:center;justify-content:flex-end;gap:7px}.adder-choice>span{margin-right:auto;color:#385c75;font-size:11px;font-weight:900}.adder-choice button{width:52px;height:38px;border:2px solid #91bddc;border-radius:10px;color:#256b9d;background:#fff;font-size:17px;font-weight:900}.adder-choice button:hover{border-color:#247fb9}.adder-choice button.selected{color:#fff;border-color:#1786be;background:#1786be;box-shadow:0 5px 12px rgba(23,134,190,.24)}.carry-rule{border-color:#8fcfb7}.carry-rule header>b,.carry-rule .adder-choice button.selected{border-color:#16986b;background:#16986b}.carry-rule .rule-main strong{color:#167453}.carry-rule .rule-example{background:#eef9f5}.adder-result{display:flex;align-items:center;justify-content:center;gap:13px;padding:6px 12px;border-radius:11px;color:#425f73;background:#fff}.adder-result>span,.adder-result>em{font-size:9px;font-style:normal}.adder-result>b{font-size:15px}.adder-result i{display:inline-grid;place-items:center;width:25px;height:25px;margin-left:3px;border-radius:7px;color:#fff;background:#78909e;font-style:normal}.adder-result i:first-child{background:#16986b}.adder-result i:last-child{background:#1786be}
@media(max-width:900px){.rule-main{grid-template-columns:65px 1fr}.rule-main .gate-svg{width:64px}.adder-given>em{display:none}}
@media(max-height:700px){.half-adder-teaching{gap:5px;padding:6px}.adder-given{padding:4px 9px}.adder-given>b{padding:3px 9px}.adder-rule{gap:4px;padding:6px 9px}.rule-main .gate-svg{height:40px}.rule-main p{font-size:9px}.rule-example{padding:3px 7px}.adder-choice button{height:31px}.adder-result{padding:3px 9px}}

/* V14: the RS trigger is shown as two cross-coupled NOR gates. */
.rs-trigger-lab{flex:1;min-height:0;display:grid;grid-template-columns:minmax(310px,38%) minmax(0,1fr);gap:10px}.rs-device,.rs-steps{min-height:0;border:2px solid #dd7480;border-radius:16px;background:#fff7f8}.rs-device{display:grid;grid-template-rows:auto minmax(110px,1fr) auto;padding:8px}.rs-device>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 6px}.rs-device>header b{color:#a84250;font-size:12px}.rs-device>header span{color:#6d7980;font-size:8px}.rs-latch-svg{width:100%;height:100%;min-height:105px}.rs-wires path{fill:none;stroke:#ef7d3d;stroke-width:3;stroke-linejoin:round}.rs-gates path,.rs-gates circle{fill:#fff;stroke:#c84f60;stroke-width:3}.rs-labels text{fill:#923b48;font:700 13px "Manrope",sans-serif}.rs-labels text:nth-last-child(-n+3){font-size:9px}.rs-rules{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.rs-rules span{display:grid;gap:1px;padding:5px 7px;border-radius:8px;color:#355f52;background:#eaf8f2}.rs-rules b{font-size:9px}.rs-rules em{font-size:8px;font-style:normal}.rs-rules .forbidden{color:#93424d;background:#ffeaed}.rs-steps{display:grid;grid-template-rows:auto minmax(0,1fr);gap:7px;padding:9px}.rs-instruction{padding:6px 9px;border-radius:9px;color:#654d52;background:#ffecef;font-size:9px}.rs-instruction b{color:#a84250}.trigger-step-grid{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.trigger-step{min-height:0;display:grid;grid-template-rows:auto 1fr auto;gap:4px;padding:8px 10px;border:1px solid #e5a1aa;border-radius:11px;background:#fff}.trigger-step header{display:flex;align-items:center;justify-content:space-between}.trigger-step header span{color:#c04c5b;font-size:9px;font-weight:900;text-transform:uppercase}.trigger-step header b{font-size:12px}.trigger-step p{margin:0;color:#667880;font-size:9px}.trigger-step>div{display:flex;align-items:center;justify-content:flex-end;gap:6px}.trigger-step>div span{margin-right:auto;color:#8d3f4b;font-size:10px;font-weight:900}.trigger-step button{width:43px;height:32px;border:2px solid #e4a1aa;border-radius:9px;color:#a64250;background:#fff2f4;font-size:14px;font-weight:900}.trigger-step button.selected{color:#fff;border-color:#d45667;background:#d45667;box-shadow:0 4px 10px rgba(212,86,103,.22)}
@media(max-width:900px){.rs-trigger-lab{grid-template-columns:280px minmax(0,1fr)}.rs-device>header span{display:none}}
@media(max-height:700px){.rs-trigger-lab{grid-template-columns:minmax(270px,35%) minmax(0,1fr)}.rs-device{grid-template-rows:auto minmax(85px,1fr) auto;padding:5px}.rs-latch-svg{min-height:82px}.rs-rules span{padding:3px 5px}.rs-steps{padding:6px}.trigger-step{padding:5px 7px}.trigger-step button{height:27px}}

/* V16: readable type throughout the quest without reintroducing scrolling. */
.quest-active .lab-status-copy small{font-size:10px}.quest-active .lab-status-copy strong{font-size:12px}.quest-active .lab-count{font-size:10px}.quest-active .student-chip{font-size:13px}.quest-active .quest-header h1{font-size:23px}.quest-active .quest-header .progress-label{font-size:11px}.quest-active .score-card span{font-size:10px}.quest-active .score-card small{font-size:11px}.quest-active .portal-card h3{font-size:15px}.quest-active .portal-card small{font-size:11px}.quest-active .challenge-kicker{font-size:12px}.quest-active .challenge-top h2{font-size:24px}.quest-active .task-prompt{font-size:17px}.mentor-card b{font-size:14px}.mentor-card small{font-size:11px}.mentor-card em{font-size:11px}.quest-active .task-meta{font-size:12px}.check-button,.secondary-button{font-size:14px}.hardware-gallery figcaption b{font-size:12px}.hardware-gallery figcaption span{font-size:10px}
.circuit-legend span{font-size:10px}.circuit-legend b{font-size:11px}.input-switch small{font-size:10px}.input-switch b{font-size:18px}.input-switch em{font-size:9px}.component-flow{grid-template-columns:minmax(145px,1fr) 24px minmax(145px,1fr) 24px minmax(145px,1fr) 24px minmax(145px,1fr);gap:7px}.copper-wire{font-size:25px}.component-heading>b{font-size:13px}.component-heading small{font-size:11px}.dip-chip em{font-size:9px}.signal-path{font-size:11px}.component-help{padding:6px}.component-help>b{font-size:11px}.component-help small{font-size:10px;line-height:1.3}.probe-point{font-size:10px}.probe-point span{font-size:10px}.probe-point b{width:29px;height:29px;font-size:16px}.output-led>span{font-size:16px}.output-led>b{font-size:11px}.output-led small{max-width:72px;font-size:10px}.lab-supply span{font-size:11px}.lab-supply b{font-size:12px}.lab-supply i{font-size:10px}
.switchboard-guide{font-size:11px}.physical-switches small{font-size:11px}.unknown-led b{font-size:12px}.mini-real-schematic small{font-size:9px}.matrix-legend{font-size:11px}.truth-matrix th{font-size:14px}.truth-matrix td{font-size:15px}.classify-item>span{font-size:16px}.classify-item button{font-size:12px}.match-grid label>span{font-size:14px}.match-grid select{font-size:13px}.bit-cell span{font-size:14px}.multi-grid button b{font-size:14px}
.adder-given>span{font-size:11px}.adder-given>em{font-size:12px}.adder-rule header span{font-size:12px}.rule-main strong{font-size:15px}.rule-main p{font-size:12px}.rule-example span{font-size:11px}.adder-choice>span{font-size:13px}.adder-result>span,.adder-result>em{font-size:11px}
.rs-device>header b{font-size:14px}.rs-device>header span{font-size:10px}.rs-rules b{font-size:11px}.rs-rules em{font-size:10px}.rs-instruction{font-size:11px}.trigger-step header span{font-size:11px}.trigger-step header b{font-size:14px}.trigger-step p{font-size:11px}.trigger-step>div span{font-size:12px}
@media(max-width:1050px){.component-flow{grid-template-columns:minmax(120px,1fr) 18px minmax(120px,1fr) 18px minmax(120px,1fr) 18px minmax(120px,1fr)}.component-heading small{display:block}.signal-path{display:block}.dip-chip{width:62px}.gate-svg{width:58px}.quest-active .portal-card h3{font-size:14px}.quest-active .portal-card small{font-size:10px}}
@media(max-height:700px){.quest-active .task-prompt{font-size:15px}.mentor-card em{display:none}.component-help small{font-size:9px}.rs-rules em{font-size:9px}.rule-main p{font-size:10px}}

/* V17: session exit, final-only grade, failure limit and raster RS-latch artwork. */
.logout-button{min-height:36px;padding:0 14px;border:1px solid #f0b7a0;border-radius:12px;color:#a34f2d;background:#fff7f2;font-size:12px;font-weight:800}.logout-button:hover{color:#fff;border-color:#e87848;background:#e87848}.logout-button:disabled{opacity:.55;cursor:wait}.task-tab.failed{color:#fff;border-color:#dd5d62;background:#dd5d62}.portal-card.has-failure .portal-status{background:#dd5d62}.task-closed{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;border:1px solid #9ed9b9;border-radius:11px;color:#146a45;background:#eaf8f0;font-size:12px}.task-closed.failed{border-color:#f0b8b8;color:#9c4046;background:#fff0ef}.task-closed b{font-family:"Comfortaa",sans-serif}.rs-latch-svg{display:block;width:100%;height:100%;object-fit:contain;object-position:center;min-height:105px}
@media(max-height:700px){.logout-button{min-height:30px;padding:0 10px}.task-closed{padding:5px 9px;font-size:10px}}

/* V18: explicit two-stage signal tracing for the 74HC04 + 74HC32 task. */
.switchboard-lab{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px}.switchboard-route{display:grid;grid-template-columns:1fr 28px 1fr;align-items:center;gap:8px}.switchboard-route>i{color:#ef833f;font-size:26px;font-style:normal;font-weight:900;text-align:center}.switchboard-route section{min-height:72px;display:grid;grid-template-columns:30px 70px 62px minmax(0,1fr);align-items:center;gap:8px;padding:7px 10px;border:1px solid #8fd1b8;border-radius:13px;background:#f1faf6}.switchboard-route section:last-child{border-color:#78b9e4;background:#f0f8ff}.switchboard-route .dip-chip{width:68px}.switchboard-route .gate-svg{width:58px}.route-step{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;color:#fff;background:#16a978;font-size:14px;font-weight:900}.switchboard-route section:last-child .route-step{background:#367fb5}.switchboard-route section div{display:grid;gap:3px}.switchboard-route section b{font-size:13px}.switchboard-route section small{color:#577068;font-size:10px;line-height:1.25}.switch-truth-table{width:100%;height:100%;border-collapse:separate;border-spacing:0;border:2px solid #72c6a5;border-radius:15px;overflow:hidden;background:#fff}.switch-truth-table th{height:42px;padding:5px 10px;color:#245b49;background:#dff5ec;font-size:13px}.switch-truth-table th:nth-last-child(-n+2){background:#dfefff}.switch-truth-table th span{display:block;margin-bottom:2px;color:#51776a;font-size:9px;text-transform:uppercase}.switch-truth-table td{height:46px;padding:4px 10px;border-top:1px solid #dceae5;text-align:center}.given-switch b{width:36px;height:34px;display:inline-grid;place-items:center;border-radius:9px;color:#fff;background:#85999c;font-size:18px}.given-switch b.on{background:#13ad7c}.stage-cell{width:min(100%,150px);height:36px;display:inline-flex;align-items:center;justify-content:center;gap:10px;border:2px solid #79bde6;border-radius:10px;color:#23668e;background:#f3f9fd}.stage-cell small{font-size:11px;font-weight:800}.stage-cell b{width:25px;height:25px;display:grid;place-items:center;border-radius:7px;color:#fff;background:#7c949f;font-size:15px}.stage-cell.is-one{border-color:#18aa7a;color:#117b58;background:#ecfaf5}.stage-cell.is-one b{background:#18aa7a}.stage-cell.final{border-color:#7e9ee8;background:#f3f5ff}.stage-cell.final.is-one{border-color:#6c67df;color:#514bb8;background:#f0efff}.stage-cell.final.is-one b{background:#6c67df}.switchboard-reminder{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:10px;color:#4d665e;background:#fff6df;font-size:11px}.switchboard-reminder b{flex:none;color:#9a641b}
@media(max-height:700px){.switchboard-route section{min-height:58px;padding:4px 7px}.switchboard-route section small{font-size:9px}.switch-truth-table th{height:34px}.switch-truth-table td{height:38px}.stage-cell{height:31px}.switchboard-reminder{padding:4px 7px;font-size:9px}}

/* V19: plain-language four-step logic circuit, without DD/G/TP designators. */
.circuit-legend.simple{grid-template-columns:repeat(3,minmax(0,1fr))}.circuit-legend.simple span{display:flex;align-items:center;justify-content:center;gap:5px;padding:5px 8px;font-size:10px}.circuit-legend.simple b{font-size:11px}.logic-component .component-heading>b{color:#087e56;font-size:14px}.logic-component .component-heading small{font-size:10px}.logic-component .signal-path{padding:4px 6px;border-radius:7px;color:#173f55;background:#eaf5ff;font-size:12px;font-weight:900;text-align:center}.logic-component .probe-point i{font-size:9px}.logic-component .probe-point span{font-size:10px}
@media(max-height:700px){.circuit-legend.simple span{padding:3px 5px;font-size:9px}.logic-component .signal-path{font-size:10px}.logic-component .component-heading>b{font-size:12px}}

/* V20: compact score card with no text leaking underneath the topic tabs. */
.quest-active .score-card{overflow:hidden}.quest-active .score-card span,.quest-active .score-card small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quest-active .score-card strong{padding-left:6px;white-space:nowrap}

/* V21: visible quest description and rules on the registration screen. */
.quest-description{max-width:760px;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);gap:14px;margin:22px 0;padding:16px;border:1px solid #bce4dc;border-radius:20px;background:rgba(255,255,255,.88);box-shadow:0 12px 32px rgba(42,88,100,.08)}.description-main{padding:3px 5px}.description-label{color:#087b80;font-size:10px;font-weight:900;letter-spacing:.14em}.description-main h2{margin:5px 0 8px;font-size:17px}.description-main p{margin:0;color:#526a78;font-size:13px;line-height:1.55}.description-rules{padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#eefaf7,#fff7e8)}.description-rules>b{color:#176b63;font-size:13px}.description-rules ul{display:grid;gap:5px;margin:8px 0 0;padding-left:18px}.description-rules li{color:#4f6572;font-size:11px;line-height:1.35}.description-rules li::marker{color:#f28a50}.quest-active .quest-description{display:none}
@media(max-width:720px){.quest-description{grid-template-columns:1fr}.description-main p{font-size:12px}}
