/* learning.css — Learning Assessment: playful, gamified, kid-friendly */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:   #F4581C;
  --purple-d: #D24310;
  --purple-l: #FFF3C4;
  --green:    #10B981;
  --green-l:  #D1FAE5;
  --orange:   #F59E0B;
  --orange-l: #FEF3C7;
  --pink:     #EC4899;
  --pink-l:   #FCE7F3;
  --blue:     #3B82F6;
  --blue-l:   #DBEAFE;
  --yellow:   #FBBF24;
  --text:     #14110E;
  --muted:    #6B655D;
  --radius:   20px;
  --shadow:   0 8px 30px rgba(20,17,14,0.10);
}

body {
  font-family: 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif;
  background: linear-gradient(160deg, #FFFBF2 0%, #FFF7E6 55%, #FFF4DC 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.screen {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  padding: 24px 20px 40px;
  gap: 20px;
}
.screen.active { display: flex; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 24px gap: back button was crowding the "About you" heading (QA round 2) */
.top-bar { display: flex; align-items: center; gap: 24px; font-weight: 700; font-size: 16px; }
/* 44px min tap target (QA round 2, items 5/17) + breathing room from the heading */
.back-btn { border: none; background: #fff; border-radius: 14px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; font-size: 18px; cursor: pointer; box-shadow: var(--shadow); flex: 0 0 auto; }

.brand { text-align: center; margin-top: 28px; }
.logo-mark { font-size: 64px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.brand h1 { font-size: 32px; margin-top: 6px; background: linear-gradient(90deg, var(--purple), var(--pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tagline { color: var(--muted); font-size: 14px; margin-top: 4px; font-weight: 600; }

.hero-text { text-align: center; }
.hero-text h2 { font-size: 27px; line-height: 1.25; }
.hero-text h2 em { color: var(--pink); font-style: normal; }
.hero-text p { color: var(--muted); margin-top: 10px; font-size: 15px; line-height: 1.65; }

/* 2×2 pill grid — symmetric instead of a 3+1 wrap (QA round 2, item 3) */
.section-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pill { background: #fff; border-radius: 999px; padding: 9px 15px; font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow); text-align: center; }

.btn-primary {
  border: none; background: linear-gradient(120deg, var(--purple), var(--pink));
  color: #fff; font-size: 18px; font-weight: 800; padding: 17px 24px;
  border-radius: var(--radius); cursor: pointer; width: 100%;
  box-shadow: 0 10px 26px rgba(124,58,237,0.4);
  transition: transform .12s;
}
.btn-primary:active { transform: scale(0.96); }
.fine-print { text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 600; }

.card { background: #fff; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.card h2 { font-size: 21px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.optional { color: var(--muted); font-weight: 500; }
input, select {
  border: 2.5px solid #E5E1F5; border-radius: 14px; padding: 14px;
  font-size: 16px; font-family: inherit; background: #FBFAFF; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--purple); }

.section-intro { text-align: center; margin: auto 0; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.section-emoji { font-size: 76px; animation: pop .5s cubic-bezier(.2,1.4,.5,1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.section-intro h2 { font-size: 27px; }
.section-intro p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 330px; }
.section-intro .btn-primary { margin-top: 8px; max-width: 300px; }
.sec-count { background: var(--purple-l); color: var(--purple-d); font-weight: 800; font-size: 13px; padding: 7px 16px; border-radius: 999px; }

.progress-wrap { display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 14px; background: #E9E4FA; border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.05); }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--purple), var(--pink)); border-radius: 999px; transition: width .4s cubic-bezier(.3,1,.4,1); }
.progress-count { font-size: 13px; font-weight: 800; color: var(--purple-d); white-space: nowrap; }

.q-card { background: #fff; border-radius: var(--radius); padding: 26px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; animation: fadeUp .35s ease; }
.q-kicker { font-size: 12.5px; font-weight: 800; color: var(--pink); text-transform: uppercase; letter-spacing: .05em; }
.q-card h2 { font-size: 20px; line-height: 1.45; }

.option-list { display: flex; flex-direction: column; gap: 11px; }
.option-btn {
  border: 2.5px solid #E9E4FA; background: #FBFAFF; border-radius: 16px;
  padding: 15px 16px; font-size: 15.5px; font-family: inherit; text-align: left;
  cursor: pointer; line-height: 1.4; transition: all .14s;
  display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.option-btn:hover { border-color: var(--purple); transform: translateX(3px); }
.option-btn.selected { border-color: var(--purple); background: var(--purple-l); transform: scale(1.02); }
.option-emoji { font-size: 30px; line-height: 1; }

/* fun emoji Likert row for short scales */
.likert-scale { display: flex; gap: 8px; justify-content: space-between; }
.likert-scale .option-btn { flex: 1; flex-direction: column; gap: 6px; text-align: center; padding: 14px 6px; font-size: 12.5px; }
.likert-scale .option-emoji { font-size: 34px; }

.junior .q-card h2 { font-size: 22px; }
.junior .option-btn { font-size: 17px; padding: 17px; }

/* cheer pop-up */
.cheer {
  position: fixed; top: 84px; left: 50%; transform: translate(-50%,0) scale(0);
  background: #fff; color: var(--purple-d); font-weight: 800; font-size: 22px;
  padding: 18px 30px; border-radius: 999px; box-shadow: var(--shadow); z-index: 50;
  pointer-events: none;
}
.cheer.show { animation: cheerPop 1s ease forwards; }
.cheer.milestone.show { animation: cheerPop 1.5s ease forwards; }
.cheer.milestone { font-size: 24px; padding: 18px 30px; color: #fff; background: linear-gradient(120deg, var(--purple), var(--pink)); box-shadow: 0 12px 34px rgba(20,17,14,0.25); }
@keyframes cheerPop {
  0% { transform: translate(-50%,0) scale(0); opacity: 0; }
  25% { transform: translate(-50%,0) scale(1.08); opacity: 1; }
  70% { transform: translate(-50%,0) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-14px) scale(.92); opacity: 0; }
}

/* confetti */
#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }


/* junior VARK: icon-fronted options, bigger touch targets */
.vark-junior { display: flex; align-items: center; gap: 14px; text-align: left; }
.vark-junior .option-emoji { font-size: 34px; flex: 0 0 auto; }
.junior .vark-junior { font-size: 18px; padding: 18px 16px; line-height: 1.35; }

/* ── GLOBAL BUG FIXES (team report, 2026-08-16) ─────────────────
   1/3/4/5: option tiles keep one height; the selected tick is absolutely
   positioned in reserved space so nothing reflows or shifts on selection.
   6: scrollbar gutter reserved so the card never shifts left/right.        */
html { scrollbar-gutter: stable; }
.screen { margin: 0 auto; }
.option-btn {
  position: relative;
  min-height: 62px;
  padding-right: 46px;          /* reserved slot for the tick */
  box-sizing: border-box;
}
.option-btn > .option-emoji { flex: 0 0 34px; width: 34px; text-align: center; }
.option-btn > .option-text   { flex: 1 1 auto; }
.option-tick {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  font-size: 20px; font-weight: 800; color: #10B981; line-height: 1;
  opacity: 0; transition: opacity .12s;
}
.option-btn.selected .option-tick { opacity: 1; }
/* compact 5-across likert row: tick sits in the corner, no reserved padding */
.likert-scale .option-btn { padding: 14px 6px; min-height: 96px; justify-content: center; }
.likert-scale .option-btn > .option-emoji { flex: 0 0 auto; width: auto; }
.likert-scale .option-tick { top: 5px; right: 6px; transform: none; font-size: 15px; }


/* ── vibe polish: info screen + brand (2026-08-23, consistency ruling) ── */
.top-bar{display:flex;align-items:center;gap:10px}
.tb-brand{margin-left:auto;font-family:'Bricolage Grotesque','Segoe UI',sans-serif;font-weight:800;font-size:14px;color:#14110E}
.tb-brand i{font-style:normal;color:#F4581C}
#screen-info .card{border:2.5px solid #14110E;border-radius:26px;box-shadow:8px 8px 0 #FFD93B;background:#fff}
.eyebrow-app{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#F4581C;margin:0 0 6px}
#screen-info .card .sub{font-size:13.5px;color:#6B655D;margin:4px 0 10px}
.hl2{background:#FFD93B;padding:0 .14em;border-radius:.14em;box-decoration-break:clone;-webkit-box-decoration-break:clone}
#screen-info .btn-primary{border-radius:999px;background:#F4581C;box-shadow:0 12px 28px -10px rgba(244,88,28,.55);font-weight:800;max-width:340px;margin:0 auto;display:block;width:100%;transition:transform .15s}
#screen-info .btn-primary:hover{background:#D24310;transform:translateY(-2px)}
#screen-info .card input:focus,#screen-info .card select:focus{border-color:#F4581C}
.trustrow{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;font-size:12.5px;font-weight:600;color:#6B655D;margin-top:2px}

/* back = marketing page; brand lockup consistent with site header */
.tb-brand{display:inline-flex;flex-direction:column;align-items:flex-end;gap:1px;line-height:1.05}
.tb-by{font:600 8.5px 'Inter','Segoe UI',sans-serif;color:#6B655D;display:inline-flex;align-items:center;gap:3px}
.tb-by img{display:block}

/* playful info form: class pills + live greeting */
.clsgrid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(52px,1fr));gap:8px;margin-top:8px}
.clspill{border:2px solid transparent;border-radius:14px;padding:10px 0;font-weight:800;font-size:15px;font-family:inherit;cursor:pointer;transition:all .12s}
.clspill:hover{transform:translateY(-2px)}
.clspill.sel{border-color:#14110E;box-shadow:4px 4px 0 #FFD93B;transform:scale(1.05)}
select.vhide{display:none}
#screen-info .card .sub.pop{animation:subpop .5s}
@keyframes subpop{0%{transform:scale(.92)}55%{transform:scale(1.03)}100%{transform:scale(1)}}

/* ── compact registration: one-screen form ── */
#screen-info.screen{gap:10px}
#screen-info .card{padding:18px 18px 16px}
#screen-info .card h2{font-size:19px;margin:2px 0}
#screen-info .card .sub{font-size:12px;margin:2px 0 4px}
.eyebrow-app{font-size:10px;margin:0 0 2px}
#screen-info .card label{font-size:13px;margin:9px 0 0;display:block}
#screen-info .card input,#screen-info .card select{padding:9px 12px;font-size:14.5px;border-radius:11px}
.clsgrid2{gap:6px;margin-top:6px}
.clspill{padding:7px 0;font-size:14px;border-radius:11px}
.optrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:11px}
.optrow input{flex:1 1 45%;min-width:130px}
#screen-info .btn-primary{margin-top:2px;padding:12px 18px;font-size:15px}
.trustrow{gap:10px;font-size:11px;margin-top:4px}

/* ── test screens: vibe + centering + motivation (2026-08-23) ── */
.grade-banner{background:#14110E!important;color:#FFD93B!important;box-shadow:0 2px 10px rgba(20,17,14,.28)!important}
.screen.active:has(.q-card),.screen.active:has(.options-grid){justify-content:center;min-height:calc(100dvh - 170px)}
@media(max-height:820px){
  #screen-info .card .sub{display:none}
  #screen-info .card{padding:14px 14px 12px}
  #screen-info .card label{margin:7px 0 0;font-size:12.5px}
  #screen-info .card input,#screen-info .card select{padding:8px 11px;font-size:14px}
  .clspill{padding:6px 0;font-size:13px}
  .optrow{margin-top:8px}
  #screen-info .btn-primary{padding:11px 16px}
  .trustrow{display:none}
}
.q-card,.screen:not(#screen-info):not(#screen-landing) .card{background:#fff;border:2.5px solid #14110E;border-radius:24px;box-shadow:8px 8px 0 #FFD93B;padding:24px}
.q-card h2{font-family:'Bricolage Grotesque','Segoe UI',sans-serif;letter-spacing:-.02em}
.option-btn,.options-grid button{border:2px solid #F2E4C8;border-radius:16px;background:#FFFDF7;transition:all .13s}
.option-btn:hover,.options-grid button:hover{border-color:#F4581C;transform:translateX(3px)}
.option-btn.selected,.options-grid button.selected{border-color:#F4581C;background:#FFF6F1;box-shadow:3px 3px 0 #FFD93B}
.progress-bar{background:#F2E4C8;border-radius:999px}
.progress-fill,[id$="-progress"]{background:linear-gradient(90deg,#F4581C,#FFD93B)!important;border-radius:999px}
.progress-count{font-weight:800;color:#D24310}
.moto{text-align:center;font-size:12.5px;font-weight:700;color:#6B655D;margin-top:12px;transition:opacity .3s}

/* ── section intro: brand, greeting, vibe button, countdown ── */
.btn-primary{background:#F4581C!important;background-image:none!important;box-shadow:0 12px 26px -10px rgba(244,88,28,.5)!important}
.btn-primary:hover{background:#D24310!important}
.si-brand{font-family:'Bricolage Grotesque','Segoe UI',sans-serif;font-weight:800;font-size:16px;color:#14110E}
.si-brand i{font-style:normal;color:#F4581C}
.si-brand .by{display:block;font:600 9px 'Inter','Segoe UI',sans-serif;color:#6B655D;letter-spacing:.02em;margin-top:1px}
.si-hi{font-weight:700;font-size:15px;color:#D24310;margin-top:6px}

/* ── question number chip (old-design personality) ── */
.qnum{display:inline-block;font-family:'Bricolage Grotesque','Segoe UI',sans-serif;font-weight:800;font-size:14px;color:#8A6A00;background:#FFF3C4;border:2px solid #14110E;border-radius:999px;padding:3px 13px;margin-bottom:10px}

.si-test{font:700 12.5px 'Inter','Segoe UI',sans-serif;color:#6B655D;margin-top:2px}
.si-inst{margin:14px auto 8px;max-width:430px;background:#fff;border:2px solid #F2E4C8;border-radius:16px;padding:12px 16px;text-align:left;display:flex;flex-direction:column;gap:6px}
.si-inst b{font:800 11px 'Inter','Segoe UI',sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#D24310}
.si-inst span{font:600 13px 'Inter','Segoe UI',sans-serif;color:#6B655D}

/* ── question screen v2: hierarchy variation + test header (2026-08-24) ── */
.q-card,.card:has(.options-grid){background:transparent;border:0;box-shadow:none;padding:0}
.q-card h2{font-size:clamp(20px,2.6vw,26px);margin:10px 0 18px;line-height:1.25}
.qnum{margin-bottom:2px}
.option-btn,.options-grid button{background:#fff;border:2.5px solid #14110E;border-radius:18px;box-shadow:4px 4px 0 #F2E4C8;padding:14px 16px;font-weight:600;text-align:left}
.option-btn:hover,.options-grid button:hover{box-shadow:4px 4px 0 #FFD93B;transform:translateY(-2px);border-color:#14110E}
.option-btn.selected,.options-grid button.selected{border-color:#F4581C;background:#FFF6F1;box-shadow:4px 4px 0 #FFD93B}
.option-list{counter-reset:opt}
.option-btn{counter-increment:opt;position:relative}
.option-btn:not(:has(.option-emoji)){padding-left:52px}
.option-btn:not(:has(.option-emoji))::before{content:counter(opt,upper-alpha);position:absolute;left:12px;top:50%;transform:translateY(-50%);width:26px;height:26px;display:flex;align-items:center;justify-content:center;font:800 13px 'Bricolage Grotesque','Segoe UI',sans-serif;color:#8A6A00;background:#FFF3C4;border:2px solid #14110E;border-radius:50%}
.test-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px}
.th-brand{font-family:'Bricolage Grotesque','Segoe UI',sans-serif;font-weight:800;font-size:14px;color:#14110E}
.th-brand i{font-style:normal;color:#F4581C}
.th-meta{font:700 12px 'Inter','Segoe UI',sans-serif;color:#6B655D}
.th-inst{flex-basis:100%;text-align:center;font:600 11.5px 'Inter','Segoe UI',sans-serif;color:#8A6A00;background:#FFF3C4;border-radius:999px;padding:4px 12px;margin:2px 0 0}

/* ── header card + calm green progress (2026-08-24) ── */
.test-head{background:#fff;border:2px solid #F2E4C8;border-radius:18px;padding:12px 14px 12px;margin-bottom:16px}
.test-head .progress-wrap{flex-basis:100%;width:100%;margin:8px 0 0;display:flex;align-items:center;gap:10px}
.th-inst{margin-top:6px}
.progress-fill,[id$="-progress"]{background:#188A5E!important;transition:width .35s ease}
.progress-count{color:#188A5E}

/* ── header v3: brand lockup, longest progress; instruction with question ── */
.th-brand{display:inline-flex;flex-direction:column;line-height:1.05;font-size:15px}
.th-by{font:600 8.5px 'Inter','Segoe UI',sans-serif;color:#6B655D;letter-spacing:.02em;margin-top:1px}
.th-meta{font:700 11.5px 'Inter','Segoe UI',sans-serif;color:#6B655D;text-align:right}
.th-inst{display:none}
.test-head .progress-wrap{margin-top:10px}
.test-head .progress-bar{flex:1}
.q-inst{display:inline-block;font:700 11px 'Inter','Segoe UI',sans-serif;color:#0F6B4F;background:#DFF3E9;border:2px solid #14110E;border-radius:999px;padding:3px 11px;margin:0 0 10px 8px;vertical-align:middle}
.moto{margin:16px 0 2px}
@media(max-width:520px){.q-inst{margin-left:0;display:block;width:max-content}}

/* ── declutter: quiet question label, no page instruction/moto (they live in the ready overlay) ── */
.qnum{background:none!important;border:0!important;padding:0!important;box-shadow:none!important;margin:0 0 6px!important;font:800 12px 'Inter','Segoe UI',sans-serif!important;letter-spacing:.09em;text-transform:uppercase;color:#D24310!important}
.q-inst,.moto{display:none!important}

/* ── cheers v2 (big, slower, emoji), neon select, clearer back ── */
.cheer{font-size:30px!important;padding:12px 22px!important}
.cheer.show{animation-duration:1.6s!important}
.cheer.milestone{font-size:22px!important}
#cheer{font-size:22px}
.option-btn.selected,.options-grid button.selected{animation:optpop .35s ease;box-shadow:0 0 0 3px #FFD93B,0 0 20px rgba(244,88,28,.45)!important}
@keyframes optpop{0%{transform:scale(.96)}55%{transform:scale(1.04)}100%{transform:scale(1)}}
.test-head .back-btn{width:34px;height:34px;border-radius:50%;border:2px solid #F2E4C8;background:#fff;font-size:16px;cursor:pointer}
.test-head .back-btn:hover{border-color:#F4581C;color:#D24310}

/* ── header meta as badges: name chip + class·assessment chip ── */
.th-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end;text-align:right}
.th-name{background:#FFF3C4;color:#8A6A00;border:2px solid #14110E;border-radius:999px;padding:3px 11px;font:800 11.5px 'Inter','Segoe UI',sans-serif;white-space:nowrap}
.th-test{border:2px solid #14110E;border-radius:999px;padding:3px 11px;font:800 11.5px 'Inter','Segoe UI',sans-serif;white-space:nowrap}

.th-assess{background:#fff;color:#14110E;border:2px solid #14110E;border-radius:999px;padding:3px 11px;font:800 11.5px 'Inter','Segoe UI',sans-serif;white-space:nowrap}
