/* NVR analogies page. Prefix an-. Palette: ink #0C1C2E, blue #1577E6, dark blue #0B4A9E, green #16A65A, sun #F0A92E, coral #E5604D. */
.an-cell,.an-stem,.an-row,.an-opts{display:block;max-width:100%;height:auto;}
.an-stem{width:min(100%,300px);margin:0 auto;}
.article .an-lab{font-size:12px;font-weight:900;letter-spacing:.6px;text-transform:uppercase;color:#8B9AA8;margin:18px 0 8px;line-height:1.2;}

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

/* hero */
.an-hero{margin:26px 0 0;border:1px solid #D6E6F8;border-radius:24px;padding:18px 16px 16px;background:linear-gradient(135deg,#EAF3FE,#F7FBFF 60%,#EAF8F0);}
/* 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;}
/* the article styles every p at 19px and 1.78 line height, which the kit text inherits; reset it for kit text */
.article .ck-step-cap,.article .ck-end-msg,.article .ck-q-prompt,.article .an-status{font-size:16px;line-height:1.5;margin-top:10px;}
.article .ck-q-prompt{font-size:17px;}
/* phone: tighten the gap under the header so the answer line and the top of the hero visual sit above the fold */
@media(max-width:760px){
  .an-hero{margin-top:12px;padding:12px 8px 12px;}
}
.an-hero-grid{display:grid;grid-template-columns:auto 44px auto;gap:10px 6px;justify-content:center;align-items:center;}
.an-hc{position:relative;width:110px;}
.an-hc .an-cell{width:110px;height:110px;}
.an-tg{position:absolute;left:10px;top:7px;font-size:13px;font-weight:900;color:#8B9AA8;line-height:1;}
.an-hero .an-arr{width:44px;height:24px;display:block;}
.an-hero.is-armed:not(.done) .an-arr{opacity:.18;transition:opacity .4s;}
.an-hero.is-armed:not(.done) .an-arr.on{opacity:1;}
.an-hero-steps{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:14px 0 0;list-style:none;}
.an-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;}
.an-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;}
.an-hero.is-armed:not(.done) .an-hero-steps li{opacity:.35;}
.an-hero.is-armed:not(.done) .an-hero-steps li.on{opacity:1;background:#E7F1FE;}
.an-replay{display:flex;margin:12px auto 0;}
.an-replay[hidden]{display:none;}

/* catalogue of changes */
.article ul.an-cat{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:22px;}
.article ul.an-cat li{background:#fff;border:1px solid #E2E9F1;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:4px;min-width:0;}
.an-cat li b{font-size:16px;font-weight:900;color:#0C1C2E;line-height:1.25;}
.an-cat li span{font-size:14px;font-weight:600;color:#46586C;line-height:1.4;}
.an-pair{display:flex;align-items:center;gap:2px;margin-bottom:6px;}
.an-pair .an-cell{flex:1 1 0;min-width:0;width:auto;}
.an-pair .an-arr{flex:none;width:22px;height:20px;}
@media(max-width:760px){.article ul.an-cat{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}}
@media(max-width:360px){.article ul.an-cat{grid-template-columns:minmax(0,1fr);}}
.an-cat.armed:not(.in) li,.an-odd.armed:not(.in) li,.an-rlist.armed:not(.in) li{opacity:0;transform:translateY(12px);}
.an-cat li,.an-odd li,.an-rlist li{transition:opacity .5s ease,transform .5s cubic-bezier(.4,0,.2,1);transition-delay:calc(var(--i,0)*70ms);}

/* turn or flip */
.an-tf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0 0;}
.an-tfp{margin:0;background:#fff;border:1px solid #E2E9F1;border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;}
.an-tfc .an-cell{width:130px;height:130px;max-width:100%;}
.an-tfp figcaption b{display:block;font-size:17px;font-weight:900;color:#0C1C2E;}
.an-tfp figcaption span{display:block;font-size:14.5px;font-weight:600;color:#46586C;line-height:1.45;margin-top:3px;}
.an-tfp[data-tf=t] figcaption b{color:#0B4A9E;}
.an-tfp[data-tf=f] figcaption b{color:#0C8A48;}
.an-tfp .mv{transform-box:view-box;transform-origin:0 0;}
@media(max-width:700px){.an-tf{grid-template-columns:minmax(0,1fr);}.an-tfp{flex-direction:row;text-align:left;gap:14px;}.an-tfc{flex:none;}.an-tfc .an-cell{width:104px;height:104px;}}

/* why each option is wrong */
.an-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.an-rlist{display:flex;flex-direction:column;gap:8px;list-style:none;}
.an-rlist li{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:center;border-radius:14px;padding:6px 10px 6px 6px;background:#FDF4F2;border:1.5px solid #F6D3CD;}
.an-rlist li.ok{background:#E2F6EC;border-color:#A9E0C3;}
.an-rc{position:relative;width:76px;height:76px;}
.an-rc .an-cell{width:76px;height:76px;}
.an-mk{position:absolute;right:-2px;bottom:-2px;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;}
.an-rlist li.ok .an-mk{background:#16A65A;}
.an-rlist b{font-size:14.5px;font-weight:900;color:#0C1C2E;}
.an-rlist em{font-style:normal;font-size:12.5px;font-weight:900;color:#B8402F;margin-left:4px;}
.an-rlist li.ok em{color:#0C8A48;}
.an-rlist span{display:block;font-size:14px;font-weight:600;color:#46586C;line-height:1.4;margin-top:2px;}
@media(max-width:1240px){.an-reasons{grid-template-columns:minmax(0,1fr);padding:12px;}}

/* odd pair */
.article ul.an-odd{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:22px;list-style:none;}
.an-odd li{position:relative;display:flex;align-items:center;gap:2px;background:#fff;border:1.5px solid #E2E9F1;border-radius:16px;padding:22px 8px 8px;min-width:0;}
.an-odd li.odd{border-color:#F0A92E;background:#FFF8E8;}
.an-on{position:absolute;left:8px;top:5px;font-size:12.5px;font-weight:900;color:#8B9AA8;}
.an-odd li.odd .an-on{color:#9A6408;}
.an-odd .an-cell{flex:1 1 0;min-width:0;width:auto;}
.an-odd .an-arr{flex:none;width:16px;height:20px;}
@media(max-width:700px){.article ul.an-odd{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* tool shells */
.an-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);}
.an-tool-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin:0 0 4px;}
.an-two{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;align-items:start;margin:22px 0 0;}
.an-two>.an-tool{margin:0;}
.an-worked{background:#F4F9FF;border:1px solid #D6E6F8;border-radius:18px;padding:16px 18px;}
.an-worked h3{margin:0 0 6px;font-size:17px;}
.article .an-worked p{font-size:16px;line-height:1.55;margin-top:8px;}
.article .an-worked ol{font-size:16px;line-height:1.5;}
.article .an-worked ol li{margin-top:8px;padding-left:34px;}
@media(max-width:1240px){.an-two{grid-template-columns:minmax(0,1fr);}}

.an-pairrow{display:flex;align-items:flex-start;gap:6px;justify-content:flex-start;}
.an-pairrow figure{margin:0;text-align:center;}
.an-pairrow figcaption{font-size:13px;font-weight:900;color:#8B9AA8;margin-top:3px;}
.an-pairrow .an-arr{flex:none;margin-top:36px;}
.an-pairrow.big{justify-content:center;gap:10px;}
.an-pairrow.big .an-arr{margin-top:46px;}

/* recorder */
.an-presets{margin:12px 0 0;}
.an-rec-grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:20px;margin:16px 0 0;align-items:start;}
.an-rec-pairs{display:flex;flex-direction:column;gap:14px;}
.an-rec-pairs .an-cell{width:96px;height:96px;}
.an-recipe{display:flex;flex-wrap:wrap;gap:6px;list-style:none;min-height:34px;}
.an-recipe li{display:inline-flex;align-items:center;gap:7px;background:#E7F1FE;color:#0B4A9E;border-radius:999px;padding:5px 12px 5px 6px;font-size:14px;font-weight:800;}
.an-recipe li b{width:22px;height:22px;border-radius:50%;background:#1577E6;color:#fff;font-size:12.5px;display:inline-flex;align-items:center;justify-content:center;font-weight:900;}
.an-recipe li.empty{background:transparent;color:#8B9AA8;padding-left:0;font-weight:700;}
.an-live{display:flex;gap:14px;align-items:center;margin:14px 0 0;}
.an-live figure{margin:0;text-align:center;flex:none;}
.an-live .an-cell{width:96px;height:96px;}
.an-live figcaption{font-size:12.5px;font-weight:800;color:#8B9AA8;margin-top:3px;}
.an-status{font-size:15.5px;font-weight:800;line-height:1.4;color:#46586C;margin:0;}
.an-status.ok{color:#0C8A48;}
.an-status.no{color:#B8402F;}
.an-status2{font-size:15px;font-weight:800;margin:10px 0 0;min-height:22px;color:#46586C;}
.an-status2.ok{color:#0C8A48;}
.an-status2.no{color:#B8402F;}
.an-palette,.an-chipgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;}
.an-pal,.an-chipb{min-height:44px;border:2px solid #C9E0FB;background:#fff;color:#0B4A9E;border-radius:12px;font:inherit;font-weight:800;font-size:14.5px;padding:6px 10px;cursor:pointer;line-height:1.2;text-align:left;}
.an-pal:hover:not(:disabled),.an-chipb:hover:not(:disabled){background:#E7F1FE;border-color:#1577E6;}
.an-pal:disabled,.an-chipb:disabled{opacity:.4;cursor:not-allowed;}
.an-pal:focus-visible,.an-chipb:focus-visible{outline:3px solid #0C1C2E;outline-offset:1px;}
.an-rec-work .ck-controls{margin-top:14px;}
.an-streak{font-weight:800;font-size:15px;color:#46586C;}
.an-streak b{color:#0B4A9E;font-size:18px;}
@media(max-width:760px){.an-rec-grid{grid-template-columns:minmax(0,1fr);}.an-rec-pairs{flex-direction:row;flex-wrap:wrap;gap:14px 22px;}}
@media(max-width:420px){.an-rec-pairs .an-cell{width:84px;height:84px;}.an-palette,.an-chipgrid{grid-template-columns:repeat(2,minmax(0,1fr));}}

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

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

/* sidebar tweaks: keep the sticky column short enough for a laptop */
.sidebar .toc{padding:16px 14px;}
.sidebar .toc a{padding:6px 10px;font-size:14px;}

/* odd bits of article text */
.article .an-eg{font-weight:800;color:#0B4A9E;}

@media (prefers-reduced-motion:reduce){
  .an-cat li,.an-odd li,.an-rlist li,.an-hero .an-arr,.an-hero-steps li{transition:none!important;}
}

/* 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,.an-noprint,.post-wrap>*:not(.post-layout){display:none!important;}
  .article{max-width:none!important;}
  .article>*:not(.an-printzone){display:none!important;}
  .an-printzone>*:not(.an-sheet){display:none!important;}
  .an-sheet{display:block;margin:0;}
  .an-page{border:0;box-shadow:none;border-radius:0;padding:0;break-after:page;page-break-after:always;}
  .an-page:last-child{break-after:auto;page-break-after:auto;}
  .an-ph b{font-size:20pt;}
  .an-ph span{font-size:10pt;}
  .an-name-line{font-size:10pt;}
  .an-name-line i{width:42mm;}
  .article .an-ins{font-size:10.5pt;}
  .an-qs,.an-as{grid-template-columns:repeat(2,1fr);gap:5mm 6mm;margin-top:5mm;}
  .an-q,.an-a{padding:2.5mm;border:0.4mm solid #0C1C2E;border-radius:2mm;}
  .an-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;}
  .an-ab p,.article .an-ab p{font-size:9.5pt;}
  .an-foot{font-size:8pt;}
  .an-page svg{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}
