/* NVR shape codes page. Prefix cd-. Palette: ink #0C1C2E, blue #1577E6, dark blue #0B4A9E, green #16A65A, sun #F0A92E, coral #E5604D. */
.cd-cell,.cd-stem{display:block;max-width:100%;height:auto;}
.cd-stem{width:100%;margin:0 auto;}
.cd-mini{display:block;flex:none;}
.article .cd-lab{font-size:12px;font-weight:900;letter-spacing:.6px;text-transform:uppercase;color:#8B9AA8;margin:16px 0 8px;line-height:1.2;}
.cd-oc{display:inline-flex;gap:5px;align-items:center;justify-content:center;}
.cd-oc i{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:#E7F1FE;border:2px solid #0B4A9E;font-style:normal;font-weight:900;font-size:19px;color:#0C1C2E;line-height:1;}
.cd-oc.st{flex-direction:column;gap:3px;}
.cd-oc.st i{width:30px;height:26px;font-size:17px;}

/* tile highlight in svg */
.cd-tl rect{transition:fill .3s ease;}
.cd-tl.cd-hl rect{fill:#FFE7A8;stroke:#F0A92E;}
.cd-tl.cd-hl{animation:cdpulse .7s ease 2;transform-box:fill-box;transform-origin:center;}
@keyframes cdpulse{50%{transform:scale(1.18);}}

/* list resets, because the article styles bullets and counters on every ul and ol */
.article ul.cd-cat,.article ul.cd-lay,.article ol.cd-rlist,.article ol.cd-hero-steps,.article ul.cd-why{padding:0;margin:0;font-size:inherit;line-height:1.35;}
.article ul.cd-cat li,.article ul.cd-lay li,.article ol.cd-rlist li,.article ol.cd-hero-steps li,.article ul.cd-why li{padding-left:0;margin-top:0;counter-increment:none;}
.article ul.cd-cat li::before,.article ul.cd-lay li::before,.article ol.cd-rlist li::before,.article ol.cd-hero-steps li::before,.article ul.cd-why li::before{content:none;display:none;}
.article ul.cd-why{margin-top:10px;}
.article ul.cd-why li{font-size:15px;line-height:1.45;font-weight:600;padding:6px 0;border-top:1px solid #E2E9F1;}
.article ul.cd-why li:first-child{border-top:0;}
.article ul.cd-why li b{font-weight:900;color:#0C1C2E;}

/* hero */
.cd-hero{margin:26px 0 0;border:1px solid #D6E6F8;border-radius:24px;padding:18px 16px 16px;background:linear-gradient(135deg,#EAF3FE,#F7FBFF 60%,#EAF8F0);}
.cd-hero-figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.cd-hero-low{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:12px;margin-top:10px;align-items:center;}
.cd-hc .cd-cell{width:100%;}
.cd-htab{background:#fff;border:1px solid #D6E6F8;border-radius:16px;padding:10px 12px;display:flex;flex-direction:column;gap:8px;min-width:0;}
.cd-hrow{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;}
.cd-hlab{flex:1 0 100%;font-size:12px;font-weight:900;letter-spacing:.4px;text-transform:uppercase;color:#8B9AA8;line-height:1.2;}
.cd-ent{display:inline-flex;align-items:center;gap:6px;background:#E7F1FE;border-radius:999px;padding:3px 12px 3px 5px;transition:opacity .4s,transform .4s;}
.cd-ent b{font-size:19px;font-weight:900;color:#0C1C2E;line-height:1;}
.cd-hero.is-armed:not(.done) .cd-ent:not(.on){opacity:.16;transform:scale(.92);}
.cd-hero-steps{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:14px 0 0;list-style:none;}
.cd-hero-steps li{display:inline-flex;align-items:center;gap:7px;background:#fff;border:1.5px solid #C9E0FB;border-radius:999px;padding:6px 12px 6px 7px;font-size:14.5px;font-weight:800;color:#0C1C2E;transition:opacity .4s,background .4s;}
.cd-hero-steps li b{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#1577E6;color:#fff;font-size:13px;font-weight:900;}
.cd-hero.is-armed:not(.done) .cd-hero-steps li{opacity:.35;}
.cd-hero.is-armed:not(.done) .cd-hero-steps li.on{opacity:1;background:#E7F1FE;}
.cd-replay{display:flex;margin:12px auto 0;}
.cd-replay[hidden]{display:none;}

/* step player: let each frame fill the stage */
.ck-step-stage{padding:4px;min-height:0;}
.ck-step-frame svg{width:100%;}
.article .ck-steps{padding:10px;}
.article .ck-step-cap,.article .ck-end-msg,.article .ck-q-prompt,.article .cd-status{font-size:16px;line-height:1.5;margin-top:10px;}
.article .ck-q-prompt{font-size:17px;}
@media(max-width:760px){
  .cd-hero{margin-top:12px;padding:12px 8px 12px;}
  .cd-hero-figs{gap:5px;}
  .cd-hero-low{grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr);gap:8px;}
  .cd-htab{padding:8px 8px;}
  .cd-ent{padding:2px 9px 2px 4px;}
}

/* catalogue and layouts */
.article ul.cd-cat,.article ul.cd-lay{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px;list-style:none;}
.article ul.cd-lay{grid-template-columns:repeat(4,minmax(0,1fr));}
.article ul.cd-cat li,.article ul.cd-lay li{background:#fff;border:1px solid #E2E9F1;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:4px;min-width:0;}
.cd-cat li b,.cd-lay li b{font-size:16px;font-weight:900;color:#0C1C2E;line-height:1.25;}
.cd-cat li span,.cd-lay li span{font-size:14px;font-weight:600;color:#46586C;line-height:1.4;}
.cd-catfig{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px;}
.cd-layfig{margin-bottom:6px;}
.cd-layfig .cd-cell{width:100%;max-width:120px;}
@media(max-width:1240px){.article ul.cd-lay{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:360px){.article ul.cd-cat,.article ul.cd-lay{grid-template-columns:minmax(0,1fr);}}
.cd-cat.armed:not(.in) li,.cd-lay.armed:not(.in) li,.cd-rlist.armed:not(.in) li,.cd-pairs.armed:not(.in) figure{opacity:0;transform:translateY(12px);}
.cd-cat li,.cd-lay li,.cd-rlist li,.cd-pairs figure{transition:opacity .5s ease,transform .5s cubic-bezier(.4,0,.2,1);transition-delay:calc(var(--i,0)*70ms);}

/* pair trick */
.cd-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0 0;}
.cd-pp{margin:0;background:#fff;border:1px solid #E2E9F1;border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0;}
.cd-ppc{display:flex;align-items:center;gap:6px;justify-content:center;}
.cd-ppc .cd-cell{flex:1 1 0;min-width:0;max-width:130px;}
.cd-arr{flex:none;}
.cd-pp figcaption b{display:block;font-size:16.5px;font-weight:900;color:#0B4A9E;}
.cd-pp figcaption span{display:block;font-size:14.5px;font-weight:600;color:#46586C;line-height:1.45;margin-top:3px;}
.cd-pp figcaption u{text-decoration:none;font-weight:900;color:#0C1C2E;background:#FFE7A8;border-radius:5px;padding:0 4px;}
@media(max-width:700px){.cd-pairs{grid-template-columns:minmax(0,1fr);}}

/* decoy */
.cd-decoy{display:flex;align-items:flex-start;justify-content:center;gap:6px;flex-wrap:nowrap;margin:22px 0 0;background:#fff;border:1px solid #E2E9F1;border-radius:18px;padding:14px 10px;}
.cd-decoy figure{margin:0;text-align:center;flex:1 1 0;min-width:0;}
.cd-decoy figure .cd-cell{width:100%;max-width:110px;margin:0 auto;}
.cd-decoy figcaption{font-size:13.5px;font-weight:900;color:#46586C;margin-top:4px;}
.cd-eq{align-self:center;font-weight:900;font-size:26px;color:#0B4A9E;flex:none;margin-top:-18px;}

/* why each option is wrong */
.cd-reasons{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start;margin:22px 0 0;background:#fff;border:1px solid #E2E9F1;border-radius:20px;padding:16px;}
.article ol.cd-rlist{display:flex;flex-direction:column;gap:8px;list-style:none;}
.cd-rlist li{display:grid;grid-template-columns:84px minmax(0,1fr);gap:12px;align-items:center;border-radius:14px;padding:8px 10px 8px 8px;background:#FDF4F2;border:1.5px solid #F6D3CD;}
.cd-rlist li.ok{background:#E2F6EC;border-color:#A9E0C3;}
.cd-rc{position:relative;display:flex;justify-content:center;padding:6px 0;}
.cd-mk{position:absolute;right:-4px;bottom:-4px;width:22px;height:22px;border-radius:50%;background:#E5604D;color:#fff;font-size:12px;font-weight:900;display:flex;align-items:center;justify-content:center;border:2px solid #fff;}
.cd-rlist li.ok .cd-mk{background:#16A65A;}
.cd-rlist b{font-size:14.5px;font-weight:900;color:#0C1C2E;}
.cd-rlist em{font-style:normal;font-size:12.5px;font-weight:900;color:#B8402F;margin-left:4px;}
.cd-rlist li.ok em{color:#0C8A48;}
.cd-rlist span{display:block;font-size:14px;font-weight:600;color:#46586C;line-height:1.4;margin-top:2px;}
@media(max-width:1240px){.cd-reasons{grid-template-columns:minmax(0,1fr);padding:12px;}}

/* tool shells */
.cd-tool{margin:22px 0 0;background:#fff;border:1px solid #D6E6F8;border-radius:22px;padding:18px;box-shadow:0 14px 34px -24px rgba(12,28,46,.4);}
.cd-two{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;align-items:start;margin:22px 0 0;}
.cd-two>.cd-tool{margin:0;}
.cd-worked{background:#F4F9FF;border:1px solid #D6E6F8;border-radius:18px;padding:16px 18px;}
.cd-worked h3{margin:0 0 6px;font-size:17px;}
.article .cd-worked p{font-size:16px;line-height:1.55;margin-top:8px;}
.article .cd-worked ol{font-size:16px;line-height:1.5;}
.article .cd-worked ol li{margin-top:8px;padding-left:34px;}
@media(max-width:1240px){.cd-two{grid-template-columns:minmax(0,1fr);}}

/* code table tool */
.cd-presets{margin:0 0 12px;}
.cd-tgrid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;}
.cd-tstem{max-width:360px;}
.cd-bank{display:flex;flex-wrap:wrap;gap:8px;}
.cd-chip{width:46px;height:46px;border-radius:12px;border:2px solid #0B4A9E;background:#E7F1FE;color:#0C1C2E;font:inherit;font-weight:900;font-size:21px;cursor:pointer;}
.cd-chip.sel{background:#FFE7A8;border-color:#F0A92E;box-shadow:0 0 0 3px #F0A92E55;}
.cd-chip.used{opacity:.45;}
.cd-chip:focus-visible,.cd-slot:focus-visible,.cd-abox:focus-visible{outline:3px solid #0C1C2E;outline-offset:2px;}
.article .cd-help{font-size:15px;font-weight:600;color:#46586C;line-height:1.45;margin:10px 0 0;}
.cd-slots{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;}
.cd-slot{display:flex;align-items:center;gap:8px;min-height:50px;border:2px dashed #9DBFEA;background:#fff;border-radius:12px;padding:5px 8px;font:inherit;cursor:pointer;text-align:left;color:#0C1C2E;}
.cd-slot.full{border-style:solid;border-color:#0B4A9E;background:#F4F9FF;}
.cd-slot.no{border-color:#E5604D;background:#FDF4F2;}
.cd-slot.ok{border-color:#16A65A;background:#E2F6EC;}
.cd-sn{flex:1 1 auto;font-size:13.5px;font-weight:800;line-height:1.2;color:#46586C;}
.cd-sv{flex:none;width:30px;height:30px;border-radius:9px;background:#fff;border:2px solid #0B4A9E;display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:18px;}
.cd-slot:not(.full) .cd-sv{border-style:dashed;border-color:#9DBFEA;}
.cd-ans{margin-top:6px;}
.cd-aboxes{display:flex;gap:8px;flex-wrap:wrap;}
.cd-aboxes.st{flex-direction:column;width:130px;}
.cd-abox{min-width:92px;min-height:66px;border:2px dashed #F0A92E;background:#FFF8E8;border-radius:14px;font:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#0C1C2E;padding:4px 8px;}
.cd-abox small{font-size:11.5px;font-weight:900;color:#9A6408;text-transform:uppercase;letter-spacing:.4px;}
.cd-abox b{font-size:24px;font-weight:900;line-height:1;}
.cd-abox.full{border-style:solid;background:#FFE7A8;}
.cd-abox.ok{border-color:#16A65A;background:#E2F6EC;}
.cd-status{font-size:15.5px;font-weight:800;line-height:1.4;color:#46586C;margin:10px 0 0;min-height:22px;}
.cd-status.ok{color:#0C8A48;}
.cd-status.no{color:#B8402F;}
.cd-twork .ck-controls{margin-top:12px;}
@media(min-width:900px){.cd-tgrid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);}}
@media(min-width:760px) and (max-width:1240px){.cd-tgrid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);}}

/* quiz text */
.cd-qwrap .ck-controls{margin:0 0 12px;}
.cd-lvl-lab{font-weight:800;font-size:14px;color:#46586C;}
.cd-qwrap .ck-q-opts{grid-template-columns:repeat(2,minmax(0,1fr));}
@media(min-width:560px){.cd-qwrap .ck-q-opts{grid-template-columns:repeat(3,minmax(0,1fr));}}
.cd-qwrap .ck-opt{padding:8px;min-height:70px;}
.cd-qwrap .ck-opt-n{top:8px;margin-top:0;left:8px;}
.cd-qwrap .ck-level-seg{flex-wrap:wrap;}

/* worksheet: screen preview */
.cd-sheet{display:flex;flex-direction:column;gap:16px;margin:18px 0 0;}
.cd-page{background:#fff;border:1px solid #D6E6F8;border-radius:12px;padding:18px;box-shadow:0 10px 26px -20px rgba(12,28,46,.45);}
.cd-ph{display:flex;justify-content:space-between;gap:12px;align-items:flex-end;flex-wrap:wrap;border-bottom:3px solid #0C1C2E;padding-bottom:8px;}
.cd-ph b{display:block;font-size:22px;font-weight:900;color:#0C1C2E;line-height:1.1;}
.cd-ph span{font-size:13px;font-weight:800;color:#46586C;}
.cd-name-line{font-size:13px;font-weight:800;color:#46586C;display:flex;gap:6px;align-items:flex-end;}
.cd-name-line i{display:inline-block;width:90px;border-bottom:1.5px solid #0C1C2E;height:14px;}
.article .cd-ins{font-size:14px;line-height:1.45;font-weight:600;margin:10px 0 0;}
.cd-qs,.cd-as{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;margin-top:12px;}
.cd-q,.cd-a{display:flex;gap:8px;align-items:flex-start;border:1.5px solid #E2E9F1;border-radius:12px;padding:8px;min-width:0;break-inside:avoid;}
.cd-qn{flex:none;width:24px;height:24px;border-radius:50%;background:#0C1C2E;color:#fff;font-size:13px;font-weight:900;display:flex;align-items:center;justify-content:center;}
.cd-qb,.cd-ab{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px;}
.cd-wopts{display:grid;grid-template-columns:repeat(3,max-content);gap:6px 12px;justify-content:start;}
.cd-wopts.n2{grid-template-columns:repeat(3,max-content);gap:6px 10px;}
@media screen and (max-width:420px){.cd-wopts,.cd-wopts.n2{grid-template-columns:repeat(2,max-content);}}
.cd-wo small{font-size:10px;font-weight:800;color:#8B9AA8;}
.cd-wo{display:inline-flex;align-items:center;gap:4px;}
.cd-wo>b{font-size:12px;font-weight:900;color:#46586C;}
.cd-wo .cd-oc i{width:22px;height:22px;font-size:14px;border-radius:6px;}
.cd-wo .cd-oc{gap:3px;}
.cd-wo .cd-oc.st i{height:20px;}
.cd-ab p{font-size:13px;line-height:1.4;font-weight:600;margin:0;}
.article .cd-ab p{font-size:13px;margin-top:0;line-height:1.4;}
.cd-foot{text-align:center;font-size:11px;font-weight:800;color:#8B9AA8;margin:12px 0 0;}
@media(max-width:760px){.cd-qs,.cd-as{grid-template-columns:minmax(0,1fr);}}
.article .cd-note{font-size:15px;color:#46586C;font-weight:600;}

/* sidebar tweaks */
.sidebar .toc{padding:16px 14px;}
.sidebar .toc a{padding:6px 10px;font-size:14px;}

@media (prefers-reduced-motion:reduce){
  .cd-cat li,.cd-lay li,.cd-rlist li,.cd-pairs figure,.cd-ent,.cd-hero-steps li{transition:none!important;}
  .cd-tl.cd-hl{animation:none;}
}

/* print: only the worksheet zone, two A4 pages */
@media print{
  @page{size:A4;margin:10mm;}
  html,body{background:#fff!important;}
  body>*:not(.post-wrap){display:none!important;}
  .post-wrap{padding:0!important;margin:0!important;max-width:none!important;}
  .post-layout{display:block!important;padding:0!important;}
  .sidebar,.related,.cd-noprint,.post-wrap>*:not(.post-layout){display:none!important;}
  .article{max-width:none!important;}
  .article>*:not(.cd-printzone){display:none!important;}
  .cd-printzone>*:not(.cd-sheet){display:none!important;}
  .cd-sheet{display:block;margin:0;}
  .cd-page{border:0;box-shadow:none;border-radius:0;padding:0;break-after:page;page-break-after:always;}
  .cd-page:last-child{break-after:auto;page-break-after:auto;}
  .cd-ph b{font-size:20pt;}
  .cd-ph span{font-size:10pt;}
  .cd-name-line{font-size:10pt;}
  .cd-name-line i{width:42mm;}
  .article .cd-ins{font-size:10.5pt;}
  .cd-qs,.cd-as{grid-template-columns:repeat(2,1fr);gap:5mm 6mm;margin-top:5mm;}
  .cd-q,.cd-a{padding:2.5mm;border:0.4mm solid #0C1C2E;border-radius:2mm;}
  .cd-qn{width:6.5mm;height:6.5mm;font-size:10pt;background:#0C1C2E!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .cd-ab p,.article .cd-ab p{font-size:9.5pt;}
  .cd-foot{font-size:7pt;margin:1.5mm 0 0;}
  .cd-qs,.cd-as{gap:4mm 5mm;margin-top:3mm;}
  .cd-q,.cd-a{padding:2mm;}
  .cd-ins{margin-top:2mm!important;}
  .cd-wo>b{font-size:9pt;}
  .cd-ab p,.article .cd-ab p{font-size:8.5pt;line-height:1.35;}
  .cd-as{gap:2.5mm 4mm;margin-top:2mm;}
  .cd-page:last-child .cd-foot{margin:0;line-height:1;}
  .cd-page:last-child{padding-bottom:0;}
  .cd-a{padding:1.5mm;}
  .cd-wopts.n2{gap:1mm 2.5mm;}
  .cd-wo small{font-size:7pt;}
  .cd-page svg,.cd-oc i{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}
