/* KnowledgeEmpowers apps (online workbooks and exam packs)
   1. Top bar   2. One question at a time   3. Workbooks   4. Exam packs */

/* ===================== 1. Top bar ===================== */
/* reading size inside the workbooks and exam packs (A+ in a topic still makes it bigger again) */
html.ka-big{font-size:calc(21px * var(--scale,1))!important}
@media (min-width:1000px){html.ka-big{font-size:calc(clamp(22px,calc(14px + .62vw),25px) * var(--scale,1))!important}}

html.kb-html{padding-top:0!important}
body.kb-on{padding-top:64px!important}
body.kb-on #kehdr,body.kb-on .kh-wa,body.kb-on .fsbtn,body.kb-on .inkbtn{display:none!important}
#kbar{position:fixed;top:0;left:0;right:0;height:64px;z-index:90;display:flex;align-items:center;gap:16px;
  padding:0 clamp(14px,3vw,40px);background:rgba(251,248,244,.97);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border-bottom:1px solid #EAE3E3;font-family:'Public Sans',system-ui,-apple-system,'Segoe UI',sans-serif;color:#222;box-sizing:border-box}
#kbar *{box-sizing:border-box}
#kbar .kb-logo{display:flex;align-items:center;flex:none}
#kbar .kb-logo img{height:34px;width:auto;display:block}
#kbar .kb-sep{width:1px;height:28px;background:#EAE3E3;flex:none}
#kbar .kb-title{flex:1;min-width:0;display:block;background:none;border:0;padding:0;text-align:left;cursor:pointer;color:#222;
  font:600 18px/1.2 'Bitter',Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#kbar .kb-title small{font:400 14px 'Public Sans',system-ui,sans-serif;color:#5E5656;margin-left:10px}
#kbar .kb-acts{display:flex;align-items:center;gap:2px;flex:none}
#kbar .kb-b{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 12px;border:0;border-radius:8px;background:none;
  font:500 16px 'Public Sans',system-ui,sans-serif;color:#222;cursor:pointer;white-space:nowrap;text-decoration:none}
#kbar .kb-b:hover{background:#F6F0EF}
#kbar .kb-b:focus-visible,#kbar .kb-title:focus-visible{outline:2px solid #7A0000;outline-offset:2px}
#kbar .kb-b svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#kbar .kb-b.on{color:#7A0000;background:#F6F0EF}
#kbar .kb-b.minor{display:none}
#kbar .kb-user{display:flex;align-items:center;gap:12px;margin-left:8px;padding-left:16px;border-left:1px solid #EAE3E3;font-size:14px;color:#5E5656;white-space:nowrap;flex:none}
#kbar .kb-user b{color:#222;font-weight:600}
#kbar .kb-user button{border:0;background:none;padding:8px 0;color:#7A0000;font:600 14px 'Public Sans',system-ui,sans-serif;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.kb-menu{position:fixed;top:60px;right:10px;z-index:91;min-width:230px;display:flex;flex-direction:column;padding:6px;background:#fff;
  border:1px solid #EAE3E3;border-radius:12px;box-shadow:0 12px 32px rgba(40,10,10,.12);font-family:'Public Sans',system-ui,sans-serif}
.kb-menu[hidden]{display:none}
.kb-menu .kb-who{padding:10px 12px 8px;font-size:14px;color:#5E5656;border-bottom:1px solid #EAE3E3;margin-bottom:4px}
.kb-menu .kb-who b{color:#222}
.kb-menu button{display:flex;align-items:center;gap:10px;height:46px;padding:0 12px;border:0;border-radius:8px;background:none;text-align:left;font:500 15px 'Public Sans',system-ui,sans-serif;color:#222;cursor:pointer}
.kb-menu button:hover{background:#F6F0EF}
.kb-menu button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kb-menu .kb-out{color:#7A0000;font-weight:600}
@media (max-width:980px){
  #kbar .kb-b span{display:none}
  #kbar .kb-b{padding:0 11px}
  #kbar .kb-user{display:none}
  #kbar .kb-title small{display:none}
}
@media (max-width:480px){
  #kbar{gap:8px;padding:0 8px 0 14px}
  #kbar .kb-sep{display:none}
  #kbar .kb-logo img{height:28px}
  #kbar .kb-title{font-size:15px}
  #kbar .kb-b{padding:0 9px}
}
@media print{#kbar,.kb-menu{display:none!important}body.kb-on{padding-top:0!important}}

/* ===================== 2. One question at a time ===================== */
.kq-hide{display:none!important}
.kq-cur{border-top:0!important;padding-top:1.2rem!important}
.kq-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin:1.8rem 0 .2rem;font-family:'Public Sans',system-ui,sans-serif}
.kq-lab{font-size:.9rem;font-weight:600;color:#222;white-space:nowrap}
.kq-lab span{color:#5E5656;font-weight:400}
.kq-dots{display:flex;flex-wrap:wrap;gap:6px}
.kq-dot{width:32px;height:32px;border-radius:50%;border:1px solid #D8CECE;background:#fff;padding:0;cursor:pointer;
  font:600 12px 'Public Sans',system-ui,sans-serif;color:#5E5656;display:inline-flex;align-items:center;justify-content:center}
.kq-dot:hover{border-color:#222;color:#222}
.kq-dot.ok{background:#EEF5F0;border-color:#9CC4AB;color:#2E6B47}
.kq-dot.rev{background:#FBF5E8;border-color:#DDC28E;color:#8A5A00}
.kq-dot.on{background:#7A0000;border-color:#7A0000;color:#fff}
.kq-bar{flex-basis:100%;height:3px;background:#EAE3E3;border-radius:2px;overflow:hidden}
.kq-bar i{display:block;height:100%;background:#7A0000;transition:width .25s}
.kq-nav{display:flex;align-items:center;gap:12px;margin:2.2rem 0 1rem;padding-top:1.4rem;border-top:1px solid #EAE3E3}
.kq-nav button{min-height:50px;padding:0 1.5rem;border-radius:999px;cursor:pointer;font:600 1rem 'Public Sans',system-ui,sans-serif}
.kq-prev{background:#fff;border:1px solid #D8CECE;color:#222}
.kq-prev:hover{border-color:#222}
.kq-next{margin-left:auto;background:#7A0000;border:0;color:#fff}
.kq-next:hover{background:#5C0000}
@media (max-width:600px){.kq-dots{display:none}.kq-nav button{padding:0 1rem;white-space:nowrap;font-size:.95rem}}
/* a space to work beside the question on big screens (the pen in the top bar writes on it) */
@media (min-width:1100px){
  .kq-cur.kq-work{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(300px,.72fr);column-gap:3rem;align-items:start}
  .kq-cur.kq-work>*{grid-column:1}
  .kq-cur.kq-work::after{content:"Working out";grid-column:2;grid-row:1/span 30;align-self:stretch;min-height:260px;border-radius:12px;
    padding:12px 16px;background:#fff repeating-linear-gradient(0deg,transparent 0 27px,#F1EAE6 27px 28px);border:1px solid #EAE3E3;
    font:600 11px 'Public Sans',system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#B3A8A6}
}
@media print{.kq-hide{display:block!important}.kq-head,.kq-nav{display:none!important}}

/* ===================== 3. Workbooks ===================== */
/* topic shelf */
#shell.wide{max-width:none;padding:0 clamp(20px,5vw,96px) 72px}
.ks-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin:2.6rem 0 0}
#shell .ks-head h1{margin:0}
#shell .ks-head .sub{margin:.4rem 0 0}
.ks-cont{display:flex;flex-wrap:wrap;align-items:center;gap:16px 32px;margin:2rem 0 .4rem;padding:24px 28px;background:#fff;border-left:3px solid #7A0000}
.ks-cont .ks-c-txt{flex:1;min-width:220px}
.ks-cont .ks-eb{font-size:.72rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#8A6A35}
#shell .ks-cont h2{margin:.25rem 0 .2rem;font-size:1.45rem}
.ks-cont p{margin:0;color:#5E5656;font-size:.9rem}
.ks-cont .ks-c-bar{height:4px;background:#EAE3E3;border-radius:2px;overflow:hidden;margin-top:.7rem;max-width:360px}
.ks-cont .ks-c-bar i{display:block;height:100%;background:#7A0000}
.ks-go{font:600 1rem 'Public Sans',system-ui,sans-serif;min-height:52px;padding:0 1.8rem;border:0;border-radius:999px;background:#7A0000;color:#fff;cursor:pointer}
.ks-go:hover{background:#5C0000}
#shell .ks-term{display:flex;align-items:baseline;gap:14px;margin:2.8rem 0 1.1rem;padding-bottom:.6rem;border-bottom:1px solid #EAE3E3}
#shell .ks-term h2{margin:0;font-size:1.3rem}
#shell .ks-term span{font-size:.85rem;color:#5E5656}
.ks-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15.5rem,1fr));gap:clamp(16px,2vw,28px)}
#shell .kcard{font:inherit;color:#222;text-align:left;display:flex;flex-direction:column;gap:.35rem;min-height:9.5rem;padding:18px 20px 16px;
  background:#fff;border:1px solid #EAE3E3;border-radius:4px;cursor:pointer;transition:border-color .15s,box-shadow .15s}
#shell .kcard:hover{border-color:#7A0000;box-shadow:0 6px 20px rgba(60,20,20,.06)}
#shell .kcard .kc-no{font-size:.75rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#8A6A35}
#shell .kcard .kc-t{font-family:'Bitter',Georgia,serif;font-weight:600;font-size:1.12rem;line-height:1.3}
#shell .kcard .kc-g{font-size:.85rem;color:#5E5656}
#shell .kcard .kc-p{margin-top:auto;padding-top:.8rem;font-size:.82rem;color:#5E5656}
#shell .kcard .kc-p i{display:block;height:3px;background:#EAE3E3;border-radius:2px;overflow:hidden;margin-top:.35rem}
#shell .kcard .kc-p i b{display:block;height:100%;background:#7A0000}
#shell .kcard .kc-p.done{color:#2E6B47;font-weight:600}
#shell .kcard .kc-p.open{color:#7A0000;font-weight:600}
#shell .kcard.off{cursor:default;background:#F5F0EB}
#shell .kcard.off:hover{border-color:#EAE3E3;box-shadow:none}
#shell .kcard.off .kc-t{color:#A99E9E}
#shell .ks-foot{margin-top:2.8rem}
#shell.wide .report{max-width:1000px}

/* a topic: the engine's own header and pen bar are replaced by the top bar */
#topicHost .top,#topicHost #penbar{display:none!important}
body.kw-topic{padding-bottom:48px!important}
#topicHost .wrap{max-width:1240px;padding:0 clamp(20px,5vw,72px)}
#topicHost .stages{top:64px}
#topicHost .timer{top:76px}
#topicHost h1{margin-top:.2rem}
/* topic home: the path from Diagnose to Master */
.kw-home{display:grid;grid-template-columns:minmax(0,1fr);gap:0 clamp(40px,6vw,96px);padding-top:2.4rem}
@media (min-width:1000px){.kw-home{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}.kw-intro{position:sticky;top:96px;align-self:start}}
.kw-intro h1{font-size:2.6rem!important;margin:.2rem 0 .4rem!important}
.kw-intro .sub{margin:0 0 1.2rem!important}
.kw-intro .kw-meter{display:flex;align-items:center;gap:14px;margin:1.4rem 0 .2rem;font-size:.9rem;color:#5E5656}
.kw-intro .kw-meter .bar{flex:1;max-width:280px;height:4px}
.kw-intro .rowbtns{margin:1.6rem 0 1.4rem}
.kw-intro .btn{min-height:52px;padding:.7rem 1.8rem;font-size:1rem}
.kw-path{list-style:none;margin:0;padding:0;position:relative}
.kw-path::before{content:"";position:absolute;left:17px;top:26px;bottom:26px;width:2px;background:#EAE3E3}
.kw-path li{position:relative}
.kw-path button{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:.1rem 1.1rem;align-items:center;width:100%;text-align:left;
  background:none;border:0;border-radius:10px;padding:.85rem .6rem .85rem 0;cursor:pointer;font:inherit;color:#222}
.kw-path button:hover{background:#FAF6F5}
.kw-dot{grid-row:1/span 2;position:relative;z-index:1;width:36px;height:36px;border-radius:50%;border:2px solid #D8CECE;background:#fff;
  display:flex;align-items:center;justify-content:center;font:600 13px 'Public Sans',system-ui,sans-serif;color:#5E5656}
.kw-path .done .kw-dot{background:#7A0000;border-color:#7A0000;color:#fff}
.kw-path .now .kw-dot{border-color:#7A0000;color:#7A0000;box-shadow:0 0 0 4px rgba(122,0,0,.1)}
.kw-path .kw-t{font-family:'Bitter',Georgia,serif;font-weight:600;font-size:1.08rem;line-height:1.3}
.kw-path .kw-m{grid-column:2;font-size:.84rem;color:#5E5656}
.kw-path .kw-s{grid-row:1/span 2;grid-column:3;font-size:.82rem;color:#5E5656;text-align:right;min-width:4.5rem}
.kw-path .done .kw-s{color:#2E6B47;font-weight:600}
.kw-path .now .kw-s{color:#7A0000;font-weight:600}
.kw-path .kw-grp{margin:1.2rem 0 .3rem 52px;font-size:.72rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#8A6A35}
.kw-path .kw-grp:first-child{margin-top:0}

/* ===================== 4. Exam packs ===================== */
body.kx{background:#FBF8F4;--bg:#FBF8F4;--mute:#5E5656}
body.kx .top,body.kx .menuBtn,body.kx .sidebtn{display:none!important}
body.kx .wrap{max-width:none!important;padding:28px clamp(18px,4vw,64px) 80px!important;gap:clamp(28px,3vw,56px)!important}
@media (min-width:901px){body.kx .wrap{grid-template-columns:300px minmax(0,1fr)!important}body.kx.noside .wrap{grid-template-columns:minmax(0,1fr)!important}}
body.kx nav.side{top:88px!important;max-height:calc(100vh - 108px)!important;border-right:1px solid #EAE3E3;padding-right:18px}
body.kx nav.side a{border-radius:6px}
@media (max-width:900px){body.kx nav.side{inset:64px 0 0 0!important;padding-top:16px;max-height:none!important;border-right:0}}
body.kx .card{background:none;border:0;border-top:1px solid #EAE3E3;border-radius:0;box-shadow:none;padding:28px 0;margin:0}
body.kx main>.card:first-child,body.kx main>.kx-cont+.card,body.kx main>.kq-head+.card{border-top:0}
body.kx .hero{background:none;padding:6px 0 26px}
body.kx .hero .badge{display:none}
body.kx .hero h1{font-family:'Bitter',Georgia,serif;font-weight:600;color:#222;font-size:2.6rem;line-height:1.12;margin:0 0 .3rem}
body.kx .hero .sub{letter-spacing:0;text-transform:none;font-weight:400;font-size:1rem;color:#5E5656}
body.kx .hero .line{font-weight:500;font-style:italic;color:#7A0000}
body.kx h1,body.kx h2,body.kx h3,body.kx h4{font-weight:600;color:#222}
body.kx .hero h1{font-size:clamp(2rem,4vw,2.6rem)}
body.kx nav.side a.on{background:#F6F0EF;color:#7A0000;font-weight:600}
body.kx nav.side a.on .mini i{color:#7A0000}
body.kx .grid{grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:clamp(14px,1.8vw,24px)}
body.kx .tile{border-radius:4px;box-shadow:none;padding:16px 18px;border-color:#EAE3E3}
body.kx .tile:hover{border-color:#7A0000}
body.kx .tile b{color:#222}
body.kx .bar{height:3px;border-radius:2px;background:#EAE3E3}
body.kx .btn{border-radius:999px;padding:10px 22px;font-weight:600}
body.kx .seg{border-radius:999px}
body.kx .ideas,body.kx .rules,body.kx .we{border-radius:0}
body.kx .ideas{background:#fff}
body.kx .rules{border-width:0 0 0 2px}
body.kx .we{border-left-width:2px;background:none}
body.kx .memo{border-radius:4px}
body.kx .qid{font-family:'Bitter',Georgia,serif;font-size:1.5rem;line-height:1;font-weight:600}
body.kx .qhead{gap:16px}
body.kx .fb{border-radius:4px}
body.kx .ans input{border-radius:10px}
body.kx .timer{top:76px!important;border-radius:6px}
@media (max-width:700px){body.kx .timer{top:auto!important;border-radius:0}}
body.kx .toast{top:80px}
.kx-cont{display:flex;flex-wrap:wrap;align-items:center;gap:14px 28px;margin:0 0 8px;padding:22px 26px;background:#fff;border-left:3px solid #7A0000}
.kx-cont div{flex:1;min-width:200px}
.kx-cont small{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#8A6A35}
.kx-cont b{display:block;font-family:'Bitter',Georgia,serif;font-size:1.3rem;font-weight:600;color:#222;margin:.2rem 0}
.kx-cont span{font-size:.88rem;color:#5E5656}
.kx-cont a{display:inline-flex;align-items:center;min-height:50px;padding:0 1.7rem;border-radius:999px;background:#7A0000;color:#fff;text-decoration:none;font-weight:600}
.kx-cont a:hover{background:#5C0000}
@media (max-width:600px){#shell.wide .gpick{flex-wrap:nowrap;overflow-x:auto;margin-right:-20px;padding-right:20px;scrollbar-width:none}#shell.wide .gpick::-webkit-scrollbar{display:none}#shell.wide .gpick button{flex:none}}

/* ===================== 5. Easy on the eyes ===================== */
/* a soft off-white page (like the website) instead of bright white; darker grey and gold for small text */
html.ka-big{--paper:#FBF8F4;--soft:#5E5656}
html.ka-big body{background:#FBF8F4!important}
html.ka-big #topicHost .stages{background:rgba(251,248,244,.96)!important}
html.ka-big #topicHost .vis{background:#F3ECE6}
html.ka-big .rep-eb{color:#8A6A35}
html.ka-big #shell .small,html.ka-big #shell .sub,html.ka-big #shell .kcard .kc-g{color:#5E5656}
html.ka-big .rep-sum div{background:#fff}
