/* RegLearn CMI — Memory Layer styles. Scoped under #crl-root, id-level
   specificity so a host theme cannot flip colours (the failure mode that hit
   the core app). Both background AND colour are pinned on every surface. */
#crl-root .crlmem-strip{margin-top:18px;padding:14px;border:1px solid #E1DDD0;border-radius:14px;background:#FBFAF6 !important;}
#crl-root .crlmem-striphead{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap;}
#crl-root .crlmem-kicker{font-size:10.5px;font-weight:800;letter-spacing:1.4px;color:#17795A !important;}
#crl-root .crlmem-chip{background:#E8F3EE !important;color:#0B3D2E !important;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:700;}
#crl-root .crlmem-chip.small{font-size:10.5px;}
#crl-root .crlmem-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  background:#0B3D2E !important;color:#fff !important;border-radius:11px;padding:11px 13px;margin-bottom:10px;font-size:14px;}
#crl-root .crlmem-banner span{color:#fff !important;}
#crl-root .crlmem-banner.ghostbanner{background:#E8F3EE !important;}
#crl-root .crlmem-banner.ghostbanner span{color:#0B3D2E !important;}
#crl-root .crlmem-row{display:flex;flex-wrap:wrap;gap:8px;}
#crl-root .crlmem-tile{flex:1 1 46%;min-width:0;background:#fff !important;color:#1D2A25 !important;border:1px solid #D8E5DE;
  border-radius:11px;padding:12px 10px;font-size:13.5px;font-weight:700;cursor:pointer;text-align:center;line-height:1.3;}
#crl-root .crlmem-tile:hover{border-color:#17795A;}
#crl-root .crlmem-btn{background:#0F5A43 !important;color:#fff !important;border:none;border-radius:10px;
  padding:11px 16px;font-size:14px;font-weight:800;cursor:pointer;}
#crl-root .crlmem-btn:hover{background:#0B3D2E !important;color:#fff !important;}
#crl-root .crlmem-btn:disabled{opacity:.5;cursor:default;}
#crl-root .crlmem-btn.sm{padding:7px 12px;font-size:12.5px;}
#crl-root .crlmem-btn.ghost{background:#fff !important;color:#0F5A43 !important;border:1px solid #0F5A43;}
#crl-root .crlmem-more{margin-top:10px;}
#crl-root .crlmem-more summary{cursor:pointer;font-size:12.5px;font-weight:700;color:#0F5A43 !important;padding:6px 0;}
#crl-root .crlmem-concepts{margin-top:10px;}
#crl-root .crlmem-blabel{font-size:10.5px;font-weight:800;letter-spacing:1.1px;color:#17795A !important;margin-bottom:5px;}
#crl-root .crlmem-select,#crl-root .crlmem-input{width:100%;box-sizing:border-box;padding:11px;border:1px solid #CFDDD6;
  border-radius:10px;font-size:15px;background:#fff !important;color:#1D2A25 !important;}
#crl-root .crlmem-note{font-size:11.5px;color:#5B6E66 !important;margin:10px 0 0;}
/* session panel */
#crl-root .crlmem-panel{background:#fff !important;border:1px solid #E1DDD0;border-radius:16px;padding:16px;}
#crl-root .crlmem-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;}
#crl-root .crlmem-title{font-size:15px;font-weight:800;color:#0B3D2E !important;}
#crl-root .crlmem-x{background:transparent !important;color:#5B6E66 !important;border:none;font-size:18px;cursor:pointer;padding:4px 8px;}
#crl-root .crlmem-bar{height:5px;background:#E8F3EE;border-radius:99px;overflow:hidden;margin-bottom:5px;}
#crl-root .crlmem-bar i{display:block;height:100%;background:#17795A;}
#crl-root .crlmem-count{font-size:11.5px;color:#5B6E66 !important;margin-bottom:10px;}
#crl-root .crlmem-concept{font-size:11px;font-weight:800;letter-spacing:.6px;color:#17795A !important;text-transform:uppercase;margin-bottom:6px;}
#crl-root .crlmem-tricky{background:#FFF9E8 !important;color:#5C4A14 !important;border-radius:9px;padding:8px 10px;
  font-size:12.5px;font-weight:600;letter-spacing:0;text-transform:none;margin-top:6px;}
#crl-root .crlmem-strength{font-size:11px;color:#5B6E66 !important;margin-bottom:10px;}
#crl-root .crlmem-scenario{background:#F4FAF7 !important;color:#2C3A34 !important;border-radius:10px;padding:11px;font-size:13.5px;line-height:1.55;margin-bottom:10px;white-space:pre-wrap;}
#crl-root .crlmem-q{font-size:16px;font-weight:700;color:#1D2A25 !important;line-height:1.5;margin-bottom:12px;}
#crl-root .crlmem-opts{display:flex;flex-direction:column;gap:8px;}
#crl-root .crlmem-opt{background:#fff !important;color:#1D2A25 !important;border:1px solid #D8E5DE;border-radius:11px;
  padding:13px;font-size:14.5px;text-align:left;cursor:pointer;line-height:1.45;}
#crl-root .crlmem-opt.sel{background:#E8F3EE !important;color:#0B3D2E !important;border-color:#0F5A43;}
#crl-root .crlmem-matchrow{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
#crl-root .crlmem-mleft{flex:1 1 40%;font-size:13.5px;font-weight:700;color:#1D2A25 !important;}
#crl-root .crlmem-flashback{background:#F4FAF7 !important;color:#0B3D2E !important;border-radius:10px;padding:11px;font-size:14px;line-height:1.55;margin-top:8px;}
#crl-root .crlmem-verdict{margin-top:12px;font-weight:800;font-size:14.5px;}
#crl-root .crlmem-verdict.good{color:#0B3D2E !important;}
#crl-root .crlmem-verdict.bad{color:#B3462D !important;}
#crl-root .crlmem-verdict.neutral{color:#5B6E66 !important;}
#crl-root .crlmem-ans{margin-top:6px;font-size:14px;font-weight:700;color:#0B3D2E !important;}
#crl-root .crlmem-expl{margin-top:8px;font-size:13.5px;line-height:1.6;color:#1D2A25 !important;}
#crl-root .crlmem-prov{margin-top:6px;font-size:11.5px;color:#5B6E66 !important;}
#crl-root .crlmem-hook{margin-top:10px;background:#FFF9E8 !important;color:#5C4A14 !important;border-radius:9px;padding:9px 11px;font-size:13px;font-weight:600;}
#crl-root .crlmem-foot{margin-top:14px;display:flex;flex-direction:column;gap:8px;}
#crl-root .crlmem-conf{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
#crl-root .crlmem-conflabel{width:100%;font-size:12px;color:#5B6E66 !important;}
#crl-root .crlmem-score{font-size:34px;font-weight:800;color:#0B3D2E !important;}
#crl-root .crlmem-sub{font-size:13.5px;color:#5B6E66 !important;margin:6px 0 0;}
#crl-root .crlmem-recap,#crl-root .crlmem-review{margin-top:14px;background:#F4FAF7 !important;border-radius:11px;padding:12px;}
#crl-root .crlmem-recitem,#crl-root .crlmem-revitem{font-size:13.5px;color:#1D2A25 !important;line-height:1.55;padding:4px 0;}
.crlmem-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:26px;background:#0B3D2E;color:#fff;
  padding:11px 16px;border-radius:10px;font-size:13.5px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;z-index:99999;max-width:88vw;}
@media (max-width:480px){
  #crl-root .crlmem-tile{flex:1 1 100%;}
  #crl-root .crlmem-panel{padding:12px;}
  #crl-root .crlmem-banner{flex-direction:column;align-items:stretch;}
  #crl-root .crlmem-banner .crlmem-btn{width:100%;}
}

/* ---------- Phase 1 challenge screens (green/white reference design) ---------- */
#crl-root .crlmem-chalwrap{margin-top:14px;padding-top:12px;border-top:1px solid #E1DDD0;}
#crl-root .crlmem-tile.chal{flex:1 1 46%;background:#F4FAF7 !important;color:#0B3D2E !important;border:1px solid #D8E5DE;font-size:13px;}
#crl-root .crlmem-tile.chal:hover{background:#E8F3EE !important;border-color:#17795A;}
#crl-root .crlmem-battlehead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;}
#crl-root .crlmem-ring{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;
  border:3px solid #17795A;color:#0B3D2E !important;font-weight:800;font-size:13px;background:#fff !important;}
#crl-root .crlmem-battle{display:block;width:100%;text-align:center;background:#F4FAF7 !important;color:#0B3D2E !important;
  border:2px solid #D8E5DE;border-radius:14px;padding:20px 16px;cursor:pointer;}
#crl-root .crlmem-battle:hover{border-color:#17795A;background:#E8F3EE !important;}
#crl-root .crlmem-battle b{display:block;font-size:26px;color:#0B3D2E !important;margin-bottom:8px;}
#crl-root .crlmem-battle span{display:block;font-size:15px;line-height:1.5;font-weight:600;color:#1D2A25 !important;}
#crl-root .crlmem-vs{width:40px;height:40px;line-height:40px;border-radius:50%;background:#0B3D2E !important;color:#fff !important;
  font-weight:800;font-size:13px;text-align:center;margin:-10px auto;position:relative;z-index:2;}
#crl-root .crlmem-snaptitle{font-size:17px;font-weight:800;color:#0B3D2E !important;margin:6px 0 8px;}
#crl-root .crlmem-snap{background:#F4FAF7 !important;color:#1D2A25 !important;border:1px solid #D8E5DE;border-radius:12px;
  padding:14px;font-size:14.5px;line-height:1.65;margin-bottom:10px;}
#crl-root .crlmem-timerchip{background:#0B3D2E !important;color:#fff !important;border-radius:999px;padding:4px 11px;font-size:12px;font-weight:800;}
#crl-root .crlmem-wrongstmt{background:#FBEFEA !important;color:#1D2A25 !important;border:1px solid #E8C4B6;border-radius:12px;
  padding:14px;font-size:15px;line-height:1.55;font-weight:600;margin-bottom:12px;}
#crl-root .crlmem-flip{background:#F4FAF7 !important;border:1px solid #D8E5DE;border-radius:16px;padding:34px 18px;
  text-align:center;cursor:pointer;min-height:150px;display:flex;flex-direction:column;justify-content:center;}
#crl-root .crlmem-flipfront{font-size:24px;font-weight:800;color:#0B3D2E !important;}
#crl-root .crlmem-fliphint{font-size:12.5px;color:#5B6E66 !important;margin-top:10px;}
#crl-root .crlmem-flipback{font-size:16px;line-height:1.6;color:#1D2A25 !important;}
#crl-root .crlmem-chip.crlmem-yes{background:#0F5A43 !important;color:#fff !important;}
#crl-root .crlmem-chip.crlmem-partly{background:#E8B21F !important;color:#3A2E05 !important;}
#crl-root .crlmem-chip.crlmem-no{background:#B3462D !important;color:#fff !important;}
@media (max-width:480px){
  #crl-root .crlmem-tile.chal{flex:1 1 100%;}
  #crl-root .crlmem-battle{padding:16px 12px;}
  #crl-root .crlmem-battle b{font-size:22px;}
}

/* ---------- Phases 2-4 screens ---------- */
#crl-root .crlmem-vsgrid{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0;}
#crl-root .crlmem-vscol{flex:1 1 46%;min-width:0;background:#F4FAF7 !important;color:#1D2A25 !important;border:1px solid #D8E5DE;border-radius:12px;padding:12px;font-size:13.5px;line-height:1.55;}
#crl-root .crlmem-rule{background:#F4FAF7 !important;color:#1D2A25 !important;border:1px solid #D8E5DE;border-radius:12px;padding:14px;font-size:16px;line-height:1.7;font-weight:600;margin-bottom:12px;}
#crl-root .crlmem-wordbank{display:flex;flex-wrap:wrap;gap:8px;}
#crl-root .crlmem-word{background:#fff !important;color:#0B3D2E !important;border:1px solid #CFDDD6;border-radius:999px;padding:9px 15px;font-size:14px;font-weight:700;cursor:pointer;}
#crl-root .crlmem-word.sel{background:#0F5A43 !important;color:#fff !important;border-color:#0F5A43;}
#crl-root .crlmem-orderlist{display:flex;flex-direction:column;gap:8px;margin:10px 0;}
#crl-root .crlmem-orderrow{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#fff !important;color:#1D2A25 !important;border:1px solid #D8E5DE;border-radius:11px;padding:12px;font-size:14px;cursor:pointer;}
#crl-root .crlmem-orderrow.sel{background:#E8F3EE !important;border-color:#0F5A43;}
#crl-root .crlmem-orderrow.ok{background:#F4FAF7 !important;cursor:default;}
#crl-root .crlmem-ordnum{flex:0 0 26px;height:26px;line-height:26px;text-align:center;border-radius:50%;background:#0B3D2E !important;color:#fff !important;font-size:12px;font-weight:800;}
#crl-root .crlmem-casebox{background:#0B3D2E !important;color:#fff !important;border-radius:12px;padding:13px;font-size:14px;line-height:1.55;margin-bottom:10px;}
#crl-root .crlmem-casebox b{color:#C9A227 !important;}
#crl-root .crlmem-casebadge{display:inline-block;background:#0F5A43 !important;color:#fff !important;border-radius:999px;padding:7px 16px;font-size:12px;font-weight:800;letter-spacing:1px;margin-bottom:10px;}
#crl-root .crlmem-ladderrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #EEE9DC;}
#crl-root .crlmem-laddername{flex:1 1 100%;font-size:13.5px;font-weight:700;color:#0B3D2E !important;}
#crl-root .crlmem-dots{display:flex;gap:4px;flex:1 1 auto;}
#crl-root .crlmem-dot{width:11px;height:11px;border-radius:50%;background:#E1DDD0;display:inline-block;}
#crl-root .crlmem-dot.on{background:#17795A;}
#crl-root .crlmem-ladderlvl{font-size:11.5px;color:#5B6E66 !important;}
#crl-root .crlmem-bossbadge{font-size:20px;font-weight:800;color:#0B3D2E !important;margin-bottom:6px;}
#crl-root .crlmem-bossgrid{display:flex;gap:8px;margin:12px 0;}
#crl-root .crlmem-bosscell{flex:1;background:#F4FAF7 !important;border:1px solid #D8E5DE;border-radius:11px;padding:11px;text-align:center;}
#crl-root .crlmem-bossval{font-size:17px;font-weight:800;color:#0B3D2E !important;}
#crl-root .crlmem-three{display:flex;flex-direction:column;gap:9px;margin:10px 0;}
#crl-root .crlmem-threeitem{display:flex;align-items:center;gap:10px;background:#F4FAF7 !important;color:#1D2A25 !important;border-radius:11px;padding:12px;font-size:14px;line-height:1.5;}
#crl-root .crlmem-textarea{width:100%;box-sizing:border-box;border:1px solid #CFDDD6;border-radius:11px;padding:12px;font-size:15px;line-height:1.55;background:#fff !important;color:#1D2A25 !important;font-family:inherit;margin:8px 0;}
#crl-root .crlmem-cover{display:flex;flex-direction:column;gap:5px;margin:10px 0;}
#crl-root .crlmem-covhit{color:#0B3D2E !important;font-size:13.5px;font-weight:700;}
#crl-root .crlmem-covmiss{color:#B3462D !important;font-size:13.5px;font-weight:700;}
@media (max-width:480px){
  #crl-root .crlmem-vscol{flex:1 1 100%;}
  #crl-root .crlmem-bossgrid{flex-direction:column;}
}

/* ---------- confidence controls: unmistakable, thumb-sized, mobile-first ---------- */
#crl-root .crlmem-conflabel{width:100%;font-size:13.5px;color:#1D2A25 !important;margin-bottom:8px;line-height:1.5;}
#crl-root .crlmem-conflabel b{color:#0B3D2E !important;}
#crl-root .crlmem-chip.conf{flex:1 1 30%;min-height:48px;background:#fff !important;color:#0B3D2E !important;
  border:2px solid #CFDDD6;border-radius:12px;font-size:14px;font-weight:700;cursor:pointer;padding:12px 8px;}
#crl-root .crlmem-chip.conf:hover{border-color:#17795A;}
#crl-root .crlmem-chip.conf.chosen{background:#0F5A43 !important;color:#fff !important;border-color:#0F5A43;}
#crl-root .crlmem-conf{gap:8px;}
/* result breakdown */
#crl-root .crlmem-breakdown{margin-top:14px;display:flex;flex-direction:column;gap:7px;}
#crl-root .crlmem-brline{font-size:13.5px;line-height:1.5;padding:10px 12px;border-radius:10px;}
#crl-root .crlmem-brline.good{background:#F4FAF7 !important;color:#0B3D2E !important;}
#crl-root .crlmem-brline.warn{background:#FFF9E8 !important;color:#5C4A14 !important;}
#crl-root .crlmem-brline.bad{background:#FBEFEA !important;color:#7A2E1B !important;}
@media (max-width:480px){ #crl-root .crlmem-chip.conf{flex:1 1 100%;} }
