/* PilotTrain: "Try a question from the book" (.ptq), a small console on a printed practice exam book's product page.
   New file; a theme asset beside pt-book.css (fold it in there when it goes live). Markup: snippet.html, written by
   build.py; behaviour: pt-book-try.js.

   How it fits the site
   - The markup sits in the product description, as the first block inside <div class="ptbk" data-ptbk="...">, so it
     shows right under the gallery and the summary. It has no <style> or <script>; this file and pt-book-try.js are
     loaded by inc/pt-book.php with pt-book.css and pt-book.js (or folded into them).
   - The section carries the hidden attribute. pt-book-try.js removes it, so without the script (or before the
     assets are deployed) the console is simply not there, and nothing on the page looks broken.
   - Every rule starts .ptq.ptq.ptq, which beats the description's resets (.ptbk.ptbk.ptbk :is(p,div,...)) and the
     theme's button styles without !important. It also stands alone, off the product page (bare.html).
   - Colours and type are pt-book.css's: Inter, navy #071320, ink #0a1a2b, blue #2f7bf0, gradient #5d8ce6 to
     #a9c8f5, lines #dde5ee, background #f6f8fb, amber for the light. */

.ptq.ptq.ptq{
  --ink:#0a1a2b; --text:#3d4c60; --muted:#5f6f83; --line:#dde5ee; --bg:#f6f8fb; --card:#fff; --table:#eef2f7;
  --blue:#2f7bf0; --blue-dk:#1f5fcc; --a:#5d8ce6; --b:#a9c8f5; --navy:#071320; --navy2:#0d2033;
  --ok:#16a34a; --ok-dk:#11803a; --ok-bg:#effaf3; --gold:#f5b301;
  --ease:cubic-bezier(.2,.7,.2,1);
  position:relative; margin:0; padding:0; min-width:0; overflow:hidden; scroll-margin-top:128px;
  background:var(--card); border:1px solid var(--line); border-radius:22px;
  box-shadow:0 1px 2px rgba(10,26,43,.06), 0 18px 44px rgba(10,26,43,.10);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:16px; line-height:1.55; color:var(--text); text-align:left; -webkit-font-smoothing:antialiased;
}
.ptq.ptq.ptq *, .ptq.ptq.ptq *::before, .ptq.ptq.ptq *::after{box-sizing:border-box;}
.ptq.ptq.ptq :is(div,p,h3,h4,ul,ol,li,figure,figcaption,picture){
  margin:0; padding:0; border:0; font:inherit; color:inherit; letter-spacing:normal; text-transform:none; list-style:none;
}
.ptq.ptq.ptq :is(h3,h4)::before, .ptq.ptq.ptq :is(h3,h4)::after{content:none;}
.ptq.ptq.ptq img{display:block; width:100%; max-width:none; height:auto; margin:0; border:0; border-radius:0; box-shadow:none;}
.ptq.ptq.ptq b, .ptq.ptq.ptq strong{font-weight:700; color:var(--ink);}
.ptq.ptq.ptq em, .ptq.ptq.ptq i{font-style:normal;}
.ptq.ptq.ptq button{
  -webkit-appearance:none; appearance:none; margin:0; padding:0; border:0; border-radius:0; background:none; box-shadow:none;
  font:inherit; line-height:inherit; letter-spacing:normal; text-transform:none; text-align:inherit; color:inherit; cursor:pointer;
  transition:none;
}
.ptq.ptq.ptq :is(button,a):focus-visible{outline:3px solid var(--blue); outline-offset:2px;}
.ptq.ptq.ptq .ptq-sr{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0);
  clip-path:inset(50%); white-space:nowrap;
}

/* ---------- the bar: the console's bezel, with the title and the progress ---------- */
.ptq.ptq.ptq .ptq-bar{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 20px;
  padding:13px 16px 13px 22px; color:#cfdbe8;
  background:radial-gradient(120% 220% at 100% 0%, rgba(47,123,240,.30), rgba(47,123,240,0) 55%), var(--navy);
}
.ptq.ptq.ptq .ptq-title{
  display:flex; align-items:center; gap:10px; font-size:12.5px; font-weight:700; line-height:1.3;
  letter-spacing:.14em; text-transform:uppercase; color:var(--b);
}
.ptq.ptq.ptq .ptq-led{
  flex:none; width:9px; height:9px; border-radius:50%; background:var(--gold);
  box-shadow:0 0 0 3px rgba(245,179,1,.18), 0 0 12px rgba(245,179,1,.7); animation:ptq-blink 2.4s ease-in-out infinite;
}
.ptq.ptq.ptq.is-right .ptq-led{background:#3ee07a; box-shadow:0 0 0 3px rgba(62,224,122,.18), 0 0 12px rgba(62,224,122,.75);}
.ptq.ptq.ptq.is-wrong .ptq-led{background:var(--b); box-shadow:0 0 0 3px rgba(169,200,245,.18), 0 0 12px rgba(169,200,245,.7);}
@keyframes ptq-blink{0%,100%{opacity:1;}50%{opacity:.45;}}

.ptq.ptq.ptq .ptq-prog{display:flex; gap:6px;}
.ptq.ptq.ptq .ptq-prog button{
  display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:4px 12px 4px 5px; border-radius:999px;
  font-size:13px; font-weight:600; line-height:1.2; white-space:nowrap; color:#93a7bd;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12);
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.ptq.ptq.ptq .ptq-prog i{
  display:grid; place-items:center; flex:none; width:23px; height:23px; border-radius:50%;
  font-size:11.5px; font-weight:800; color:#cfdbe8; background:rgba(255,255,255,.10);
}
.ptq.ptq.ptq .ptq-prog :is(span,em){color:inherit; font:inherit;}
.ptq.ptq.ptq .ptq-prog button:not(:disabled):hover{color:#fff; border-color:rgba(255,255,255,.32);}
.ptq.ptq.ptq .ptq-prog button:disabled{cursor:default; opacity:.55;}
.ptq.ptq.ptq .ptq-prog button.is-done{color:#cfdbe8;}
.ptq.ptq.ptq .ptq-prog button.is-done i{color:transparent; background:rgba(169,200,245,.22) center/12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9c8f5' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");}
.ptq.ptq.ptq .ptq-prog button[aria-current="step"]{color:#fff; background:var(--blue); border-color:var(--blue);}
.ptq.ptq.ptq .ptq-prog button[aria-current="step"] i{color:#fff; background:rgba(255,255,255,.22);}

/* ---------- the screen ---------- */
.ptq.ptq.ptq .ptq-screen{
  padding:clamp(20px,3vw,34px);
  background:radial-gradient(70% 90% at 100% 0%, rgba(47,123,240,.06), rgba(47,123,240,0) 60%), var(--card);
}
.ptq.ptq.ptq .ptq-view{animation:ptq-in .32s var(--ease) both;}
@keyframes ptq-in{from{opacity:0; transform:translateY(6px);}to{opacity:1; transform:none;}}

/* the buttons */
.ptq.ptq.ptq .ptq-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:48px; padding:0 20px; border-radius:11px;
  font-size:15px; font-weight:700; line-height:1.2; text-align:center; text-decoration:none; color:#fff; background:var(--blue);
  border:1px solid transparent; transition:transform .16s ease, background .16s ease, border-color .16s ease;
}
.ptq.ptq.ptq .ptq-btn::after{
  content:""; flex:none; width:15px; height:15px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ptq.ptq.ptq .ptq-btn:hover{background:var(--blue-dk); color:#fff; transform:translateY(-1px); text-decoration:none;}
.ptq.ptq.ptq .ptq-btn--ghost{color:var(--ink); background:transparent; border-color:#c9d5e2;}
.ptq.ptq.ptq .ptq-btn--ghost:hover{color:var(--ink); background:var(--bg); border-color:var(--blue);}
.ptq.ptq.ptq .ptq-btn--ghost::after{display:none;}
.ptq.ptq.ptq .ptq-btn--back::before{
  content:""; flex:none; width:15px; height:15px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ptq.ptq.ptq .ptq-btn--again::before{
  content:""; flex:none; width:15px; height:15px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- 1. the question ---------- */
.ptq.ptq.ptq .ptq-ask{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.94fr); grid-template-rows:auto 1fr;
  grid-template-areas:"q opts" "res opts"; gap:0 clamp(24px,4vw,52px); align-items:start;
}
.ptq.ptq.ptq .ptq-qcol{grid-area:q;}
.ptq.ptq.ptq .ptq-opts{grid-area:opts;}
.ptq.ptq.ptq .ptq-result{grid-area:res;}
.ptq.ptq.ptq .ptq-src{
  display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:600; line-height:1.3; color:var(--muted);
}
.ptq.ptq.ptq .ptq-src::before{
  content:""; flex:none; width:16px; height:16px; background:var(--blue);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5z'/%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5z'/%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ptq.ptq.ptq .ptq-q{
  margin-top:12px; font-size:clamp(18px,1.75vw,21px); font-weight:600; line-height:1.5; letter-spacing:-.012em;
  color:var(--ink); max-width:44ch; text-wrap:pretty;
}
.ptq.ptq.ptq .ptq-q:focus{outline:none;}
.ptq.ptq.ptq .ptq-hint{margin-top:14px; font-size:14.5px; color:var(--muted);}
.ptq.ptq.ptq.is-answered .ptq-hint{display:none;}

/* the options: big buttons, a to d as the book lists them */
.ptq.ptq.ptq .ptq-opts{display:grid; gap:10px;}
.ptq.ptq.ptq .ptq-opt{
  display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:14px; width:100%; min-height:60px;
  padding:9px 14px 9px 10px; border:1.5px solid var(--line); border-radius:14px; background:#fff; color:var(--ink);
  font-size:17px; font-weight:600; line-height:1.3; text-align:left; box-shadow:0 1px 2px rgba(10,26,43,.05);
  transition:border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease, opacity .25s ease;
}
.ptq.ptq.ptq .ptq-opt b{
  display:grid; place-items:center; width:40px; height:40px; border-radius:10px; font-size:15px; font-weight:800;
  color:var(--ink); background:var(--table); transition:background .16s ease, color .16s ease;
}
.ptq.ptq.ptq .ptq-opt span{min-width:0; font-variant-numeric:tabular-nums;}
.ptq.ptq.ptq .ptq-opt em{
  font-size:11.5px; font-weight:700; line-height:1.2; letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; color:var(--muted);
}
.ptq.ptq.ptq .ptq-opt em:empty{display:none;}
.ptq.ptq.ptq:not(.is-answered) .ptq-opt:hover{
  border-color:var(--blue); background:#fff; transform:translateY(-1px); box-shadow:0 8px 20px rgba(47,123,240,.14);
}
.ptq.ptq.ptq:not(.is-answered) .ptq-opt:hover b{color:#fff; background:var(--blue);}
.ptq.ptq.ptq:not(.is-answered) .ptq-opt:active{transform:translateY(0) scale(.99);}
/* five options (a to e) sit a little closer */
.ptq.ptq.ptq .ptq-opts--many{gap:8px;}
.ptq.ptq.ptq .ptq-opts--many .ptq-opt{min-height:54px; padding-top:7px; padding-bottom:7px;}
.ptq.ptq.ptq .ptq-opts--many .ptq-opt b{width:36px; height:36px;}
/* after a pick: the book's answer goes green, a wrong pick stays as "Your pick", the rest step back */
.ptq.ptq.ptq.is-answered .ptq-opt{cursor:default; opacity:.5; box-shadow:none;}
.ptq.ptq.ptq.is-answered .ptq-opt.is-right{
  opacity:1; border-color:var(--ok); background:var(--ok-bg); box-shadow:0 0 0 3px rgba(22,163,74,.12);
}
.ptq.ptq.ptq.is-answered .ptq-opt.is-right b{color:#fff; background:var(--ok);}
.ptq.ptq.ptq.is-answered .ptq-opt.is-right em{display:inline-flex; align-items:center; gap:6px; color:var(--ok-dk);}
.ptq.ptq.ptq.is-answered .ptq-opt.is-right em::before{
  content:""; width:13px; height:13px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ptq.ptq.ptq.is-answered .ptq-opt.is-picked:not(.is-right){opacity:1; border-color:#c9d5e2; background:var(--bg); color:var(--muted);}
.ptq.ptq.ptq.is-answered .ptq-opt.is-picked:not(.is-right) b{color:var(--muted); background:#e3e9f1;}
.ptq.ptq.ptq.is-answered .ptq-opt.is-picked:not(.is-right) em{padding:4px 8px; border-radius:6px; background:#e8edf4;}

/* the result */
.ptq.ptq.ptq .ptq-result{margin-top:20px;}
.ptq.ptq.ptq .ptq-res strong{
  display:flex; align-items:center; gap:12px; font-weight:800; letter-spacing:-.03em; line-height:1.1; color:var(--ink);
}
.ptq.ptq.ptq .ptq-res strong::before{
  content:""; flex:none; width:38px; height:38px; border-radius:50%;
}
.ptq.ptq.ptq .ptq-res span{display:block; margin-top:8px; font-size:15.5px; line-height:1.5; color:var(--text);}
.ptq.ptq.ptq .ptq-res--ok strong{font-size:clamp(28px,2.9vw,36px); animation:ptq-pop .55s cubic-bezier(.2,1.6,.4,1) both;}
.ptq.ptq.ptq .ptq-res--ok strong::before{
  background:var(--ok) center/20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
  box-shadow:0 0 0 5px rgba(22,163,74,.14);
}
.ptq.ptq.ptq .ptq-res--no strong{font-size:clamp(21px,2vw,25px); animation:ptq-rise .4s var(--ease) both;}
.ptq.ptq.ptq .ptq-res--no strong::before{
  background:#eef4ff center/19px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7bf0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
  box-shadow:inset 0 0 0 1px #d7e4fb;
}
.ptq.ptq.ptq .ptq-res span{animation:ptq-rise .4s .12s var(--ease) both;}
.ptq.ptq.ptq .ptq-go{margin-top:20px; animation:ptq-rise .4s .22s var(--ease) both;}
@keyframes ptq-pop{0%{opacity:0; transform:scale(.6);}60%{opacity:1; transform:scale(1.07);}100%{transform:scale(1);}}
@keyframes ptq-rise{from{opacity:0; transform:translateY(8px);}to{opacity:1; transform:none;}}

/* the burst on a right answer (pt-book-try.js adds it; not with reduced motion) */
.ptq.ptq.ptq .ptq-burst{position:absolute; z-index:5; width:0; height:0; pointer-events:none;}
.ptq.ptq.ptq .ptq-burst i{
  position:absolute; left:-4px; top:-4px; width:8px; height:8px; border-radius:2px; opacity:0;
  animation:ptq-fly var(--t,.8s) cubic-bezier(.12,.75,.3,1) var(--w,0s) forwards;
}
.ptq.ptq.ptq .ptq-burst i.is-dot{border-radius:50%;}
.ptq.ptq.ptq .ptq-burst i.is-bar{width:4px; height:11px; left:-2px; top:-6px;}
@keyframes ptq-fly{
  0%{opacity:1; transform:translate(0,0) rotate(0) scale(.5);}
  75%{opacity:1;}
  100%{opacity:0; transform:translate(var(--x),var(--y)) rotate(var(--r)) scale(1);}
}

/* ---------- 2 to 4. what the book gives you ---------- */
.ptq.ptq.ptq .ptq-stage{
  display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); grid-template-rows:auto 1fr;
  grid-template-areas:"copy media" "ctl media"; gap:18px clamp(24px,3.6vw,48px); align-items:start;
}
.ptq.ptq.ptq .ptq-copy{grid-area:copy;}
.ptq.ptq.ptq .ptq-media{grid-area:media; min-width:0;}
.ptq.ptq.ptq .ptq-ctl{grid-area:ctl; align-self:end;}
.ptq.ptq.ptq .ptq-kick{
  display:flex; align-items:center; gap:9px; font-size:12px; font-weight:700; line-height:1.3;
  letter-spacing:.14em; text-transform:uppercase; color:var(--blue-dk);
}
.ptq.ptq.ptq .ptq-kick::before{content:""; flex:none; width:18px; height:2px; border-radius:2px; background:linear-gradient(90deg,var(--blue),var(--b));}
.ptq.ptq.ptq .ptq-h{
  margin-top:10px; font-size:clamp(23px,2.3vw,30px); font-weight:800; line-height:1.12; letter-spacing:-.03em; color:var(--ink);
}
.ptq.ptq.ptq .ptq-h:focus{outline:none;}
.ptq.ptq.ptq .ptq-copy p:not(.ptq-kick):not(.ptq-read){margin-top:10px; font-size:15.5px; line-height:1.55; color:var(--text); max-width:40ch;}
.ptq.ptq.ptq .ptq-nav{display:flex; flex-wrap:wrap; gap:10px; margin-top:18px;}
.ptq.ptq.ptq .ptq-media figcaption{margin-top:10px; font-size:13px; line-height:1.4; color:var(--muted);}

/* a crop from the book, in a frame */
.ptq.ptq.ptq .ptq-frame{
  position:relative; overflow:hidden; border-radius:14px; background:#fff; border:1px solid var(--line);
  box-shadow:0 1px 2px rgba(10,26,43,.06), 0 14px 34px rgba(10,26,43,.10);
}
.ptq.ptq.ptq .ptq-frame--table picture{
  display:block; -webkit-mask-image:linear-gradient(#000 80%, transparent 99%); mask-image:linear-gradient(#000 80%, transparent 99%);
}
/* the highlights sit over the crop, placed in % by pt-book-try.js from data-ptq-box / data-ptq-dot */
.ptq.ptq.ptq .ptq-band{
  position:absolute; border-radius:3px; background:rgba(47,123,240,.16); box-shadow:0 0 0 2px var(--blue);
  transform-origin:0 50%; transform:scaleX(0);
}
.ptq.ptq.ptq .ptq-ring{
  position:absolute; width:7.5%; aspect-ratio:1; border-radius:50%; transform:translate(-50%,-50%) scale(0);
  border:3px solid var(--blue); box-shadow:0 0 0 4px rgba(47,123,240,.22);
}
.ptq.ptq.ptq .ptq-cell{
  position:absolute; border-radius:4px; background:rgba(47,123,240,.14); transform:scale(0);
  box-shadow:0 0 0 3px var(--blue), 0 0 0 7px rgba(47,123,240,.22);
}
.ptq.ptq.ptq .is-on .ptq-band{animation:ptq-sweep .6s .3s var(--ease) forwards;}
.ptq.ptq.ptq .is-on .ptq-cell{animation:ptq-cell .45s .85s cubic-bezier(.2,1.5,.4,1) forwards, ptq-halo-c 1.8s 1.4s ease-in-out infinite;}
@keyframes ptq-cell{to{transform:scale(1);}}
@keyframes ptq-halo-c{0%,100%{box-shadow:0 0 0 3px var(--blue), 0 0 0 7px rgba(47,123,240,.22);}50%{box-shadow:0 0 0 3px var(--blue), 0 0 0 12px rgba(47,123,240,.08);}}
/* the readout: which row to look for */
.ptq.ptq.ptq .ptq-copy .ptq-read{
  display:inline-flex; align-items:stretch; margin-top:18px; border-radius:10px; overflow:hidden; background:var(--navy);
  font-size:13px; font-weight:700; line-height:1; letter-spacing:.04em; color:#cfdbe8; max-width:none;
}
.ptq.ptq.ptq .ptq-read span{display:flex; align-items:center; padding:10px 12px; border-right:1px solid rgba(255,255,255,.12);}
.ptq.ptq.ptq .ptq-read b{display:grid; place-items:center; min-width:40px; padding:0 12px; font-size:16px; font-weight:800; color:#fff; background:var(--blue);}
.ptq.ptq.ptq .is-on .ptq-ring{animation:ptq-ring .5s .85s cubic-bezier(.2,1.5,.4,1) forwards, ptq-halo 1.8s 1.4s ease-in-out infinite;}
@keyframes ptq-sweep{to{transform:scaleX(1);}}
@keyframes ptq-ring{to{transform:translate(-50%,-50%) scale(1);}}
@keyframes ptq-halo{0%,100%{box-shadow:0 0 0 4px rgba(47,123,240,.22);}50%{box-shadow:0 0 0 9px rgba(47,123,240,.10);}}

/* the feedback, set like the book's page */
.ptq.ptq.ptq .ptq-page{
  padding:16px 22px 20px; border-radius:14px; background:#fff; border:1px solid var(--line);
  box-shadow:0 1px 2px rgba(10,26,43,.06), 0 14px 34px rgba(10,26,43,.10); font-size:15.5px; line-height:1.55; color:#231f20;
}
.ptq.ptq.ptq .ptq-page-run{
  display:flex; justify-content:space-between; gap:12px; margin-bottom:14px; padding-bottom:8px; border-bottom:1px solid #b9bdc3;
  font-size:12px; color:#6b6f75;
}
.ptq.ptq.ptq .ptq-page > p:not(.ptq-page-run){margin-top:8px;}
.ptq.ptq.ptq .ptq-fb-lead{padding-left:30px; text-indent:-30px;}   /* "47." hangs in the margin, as in the book */
.ptq.ptq.ptq .ptq-fb-n{display:inline-block; width:30px; text-indent:0; font-weight:400; color:inherit;}
.ptq.ptq.ptq .ptq-fb-lead strong{
  color:inherit; background:linear-gradient(transparent 58%, rgba(22,163,74,.22) 58%) no-repeat 0 0 / 0 100%;
}
.ptq.ptq.ptq .is-on .ptq-fb-lead strong{animation:ptq-mark .7s .35s var(--ease) forwards;}
@keyframes ptq-mark{to{background-size:100% 100%;}}
.ptq.ptq.ptq .ptq-fb-conv, .ptq.ptq.ptq .ptq-fb-in, .ptq.ptq.ptq .ptq-fb-fig{padding-left:30px;}
.ptq.ptq.ptq .ptq-fb-conv{display:grid; gap:2px; font-variant-numeric:tabular-nums;}
.ptq.ptq.ptq .ptq-cv{display:flex; flex-wrap:wrap; column-gap:.9em; padding-left:1.1em;}
.ptq.ptq.ptq .ptq-cv span:nth-child(1){min-width:7.6em;}
.ptq.ptq.ptq .ptq-cv span:nth-child(2){min-width:7.4em;}
.ptq.ptq.ptq .ptq-fb-in:last-child, .ptq.ptq.ptq .ptq-fb-in:nth-last-child(2){padding-left:calc(30px + 1.1em);}
.ptq.ptq.ptq .ptq-fb-fig button{
  display:flex; align-items:center; gap:14px; width:100%; max-width:420px; padding:7px 14px 7px 7px; border-radius:12px;
  border:1px solid var(--line); background:var(--bg); font-size:14.5px; font-weight:700; line-height:1.3; color:var(--blue-dk);
  transition:border-color .16s ease, background .16s ease, transform .16s ease;
}
.ptq.ptq.ptq .ptq-fb-fig picture{flex:none; width:96px; overflow:hidden; border-radius:7px; border:1px solid var(--line); background:#fff;}
.ptq.ptq.ptq .ptq-fb-fig button span{display:flex; align-items:center; gap:8px;}
.ptq.ptq.ptq .ptq-fb-fig button span::after{
  content:""; flex:none; width:14px; height:14px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ptq.ptq.ptq .ptq-fb-fig button:hover{border-color:var(--blue); background:#fff; transform:translateY(-1px);}

/* the book's bullets (a hollow circle) and its equations, the = signs in a column */
.ptq.ptq.ptq .ptq-fb-bul, .ptq.ptq.ptq .ptq-fb-eq{position:relative; padding-left:calc(30px + 1.1em);}
.ptq.ptq.ptq .ptq-page > .ptq-fb-bul, .ptq.ptq.ptq .ptq-page > .ptq-fb-eq{margin-top:3px;}
.ptq.ptq.ptq .ptq-fb-bul::before, .ptq.ptq.ptq .ptq-fb-eq.is-bul::before{
  content:""; position:absolute; left:calc(30px + .1em); top:.62em; width:.42em; height:.42em; border-radius:50%;
  border:1.2px solid currentColor;
}
.ptq.ptq.ptq .ptq-fb-eq{display:grid; grid-template-columns:8.8em minmax(0,1fr); font-variant-numeric:tabular-nums;}
.ptq.ptq.ptq .ptq-fb-eq span:nth-child(even){padding-left:.1em;}
.ptq.ptq.ptq .ptq-page > .ptq-fb-fig:last-child{margin-top:12px;}

/* a wide figure (the diagram) gets the console's full width, under the intro and the steps */
@media (min-width:861px){
  .ptq.ptq.ptq .ptq-stage--diagram{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto auto; grid-template-areas:"copy ctl" "media media";
  }
  .ptq.ptq.ptq .ptq-stage--diagram .ptq-ctl{align-self:start;}
  .ptq.ptq.ptq .ptq-stage--diagram .ptq-copy p:not(.ptq-kick):not(.ptq-read){max-width:46ch;}
}
.ptq.ptq.ptq .ptq-fb-fig--diagram picture{width:150px;}

/* the working: the flight computer, a camera that moves from step to step */
.ptq.ptq.ptq .ptq-frame--fig{aspect-ratio:var(--ar, 3 / 2);}   /* --ar: the figure's own shape, set by the script */
.ptq.ptq.ptq .ptq-zoom{
  position:absolute; top:0; left:0; width:100%; aspect-ratio:var(--ar, 3 / 2); --s:1; transform-origin:0 0; will-change:transform;
  transition:transform .95s cubic-bezier(.45,.05,.2,1);
}
.ptq.ptq.ptq .ptq-zoom picture, .ptq.ptq.ptq .ptq-zoom img{width:100%; height:100%;}
.ptq.ptq.ptq .ptq-zoom img{object-fit:cover;}
.ptq.ptq.ptq .ptq-callout{
  position:absolute; border-radius:calc(5px / var(--s)); opacity:0;
  box-shadow:0 0 0 calc(3px / var(--s)) var(--blue), 0 0 0 calc(9px / var(--s)) rgba(47,123,240,.22);
  transition:opacity .3s ease, left .95s cubic-bezier(.45,.05,.2,1), top .95s cubic-bezier(.45,.05,.2,1);
}
.ptq.ptq.ptq .ptq-ring--step{
  width:6.5%; transform:translate(-50%,-50%) scale(.4); opacity:0; border-width:calc(3px / var(--s));
  box-shadow:0 0 0 calc(4px / var(--s)) rgba(47,123,240,.25);
  transition:opacity .3s ease, transform .35s ease, left .95s cubic-bezier(.45,.05,.2,1), top .95s cubic-bezier(.45,.05,.2,1);
}
.ptq.ptq.ptq .ptq-frame--fig.has-step .ptq-callout{opacity:1;}
.ptq.ptq.ptq .ptq-frame--fig.has-step.has-dot .ptq-ring--step{opacity:1; transform:translate(-50%,-50%) scale(1); animation:ptq-halo-s 1.6s .9s ease-in-out infinite;}
@keyframes ptq-halo-s{0%,100%{box-shadow:0 0 0 calc(4px / var(--s)) rgba(47,123,240,.25);}50%{box-shadow:0 0 0 calc(10px / var(--s)) rgba(47,123,240,.10);}}

.ptq.ptq.ptq .ptq-steps-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px;}
.ptq.ptq.ptq .ptq-steps-head .ptq-steps-tool{flex:none; margin:0;}
.ptq.ptq.ptq .ptq-steps-head .ptq-steps-title{font-size:12.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);}
.ptq.ptq.ptq .ptq-play{
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 13px 0 10px; border-radius:999px;
  font-size:13.5px; font-weight:700; white-space:nowrap; color:var(--blue-dk); background:#eef4ff; border:1px solid #d7e4fb;
  transition:background .16s ease, border-color .16s ease;
}
.ptq.ptq.ptq .ptq-play::before{
  content:""; flex:none; width:13px; height:13px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ptq.ptq.ptq .ptq-play.is-playing::before{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h4.5v16H6zM13.5 4H18v16h-4.5z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h4.5v16H6zM13.5 4H18v16h-4.5z'/%3E%3C/svg%3E");
}
.ptq.ptq.ptq .ptq-play:hover{background:#e3edfd; border-color:var(--b);}
.ptq.ptq.ptq .ptq-steps{display:grid; gap:4px;}
.ptq.ptq.ptq .ptq-steps button{
  display:grid; grid-template-columns:28px minmax(0,1fr); align-items:center; gap:12px; width:100%; min-height:44px;
  padding:7px 12px 7px 8px; border-radius:11px; border:1px solid transparent; font-size:15px; font-weight:500; line-height:1.35;
  color:var(--text); transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.ptq.ptq.ptq .ptq-steps b{
  display:grid; place-items:center; width:28px; height:28px; border-radius:50%; font-size:12.5px; font-weight:800;
  color:var(--muted); border:1.5px solid #c9d5e2; transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.ptq.ptq.ptq .ptq-steps button:hover{background:var(--bg);}
.ptq.ptq.ptq .ptq-steps button.is-done b{color:var(--blue-dk); background:#e8f0fd; border-color:transparent;}
.ptq.ptq.ptq .ptq-steps button[aria-current="step"]{background:#eef4ff; border-color:#d7e4fb; color:var(--ink); font-weight:600;}
.ptq.ptq.ptq .ptq-steps button[aria-current="step"] b{color:#fff; background:var(--blue); border-color:var(--blue);}

/* ---------- the end ---------- */
.ptq.ptq.ptq .ptq-end{display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:20px 40px; padding:6px 0;}
.ptq.ptq.ptq .ptq-big{font-size:clamp(32px,4vw,52px); font-weight:800; line-height:1.05; letter-spacing:-.035em; color:var(--ink);}
.ptq.ptq.ptq .ptq-big:focus{outline:none;}
.ptq.ptq.ptq .ptq-big span{background:linear-gradient(90deg,var(--blue),var(--a)); -webkit-background-clip:text; background-clip:text; color:transparent;}
.ptq.ptq.ptq .ptq-end-copy p{margin-top:12px; font-size:16.5px; line-height:1.55; color:var(--muted); max-width:52ch;}
.ptq.ptq.ptq .ptq-end-ctas{display:flex; flex-wrap:wrap; gap:10px;}
.ptq.ptq.ptq .ptq-btn--buy{min-height:54px; padding:0 26px; font-size:16px;}
.ptq.ptq.ptq .ptq-end-ctas .ptq-btn--again{min-height:54px;}

/* "Buy the book" lights up WooCommerce's add to cart button (pt-book.css has the same as .ptbk-pulse) */
@keyframes ptq-pulse{0%,100%{box-shadow:0 0 0 0 rgba(47,123,240,0);}40%{box-shadow:0 0 0 8px rgba(47,123,240,.35);}}
button.ptq-pulse, .single_add_to_cart_button.ptq-pulse{animation:ptq-pulse 1.4s ease-out 1;}

/* ---------- narrower ---------- */
@media (max-width:860px){
  .ptq.ptq.ptq .ptq-bar{flex-direction:column; align-items:stretch; padding:13px 14px 14px 18px;}
  .ptq.ptq.ptq .ptq-prog{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px;}
  .ptq.ptq.ptq .ptq-prog--3{grid-template-columns:repeat(3,minmax(0,1fr));}   /* a console without a working view */
  .ptq.ptq.ptq .ptq-prog button{justify-content:center; width:100%; padding:4px 6px; gap:6px; font-size:12.5px;}
  .ptq.ptq.ptq .ptq-ask{grid-template-columns:minmax(0,1fr); grid-template-rows:none; grid-template-areas:"q" "opts" "res"; gap:0;}
  .ptq.ptq.ptq .ptq-opts{margin-top:20px;}
  .ptq.ptq.ptq .ptq-q{max-width:none;}
  .ptq.ptq.ptq .ptq-stage{grid-template-columns:minmax(0,1fr); grid-template-areas:"copy" "media" "ctl"; grid-template-rows:none;}
  .ptq.ptq.ptq .ptq-copy p:not(.ptq-kick):not(.ptq-read){max-width:none;}
  .ptq.ptq.ptq .ptq-ctl{align-self:start;}
  .ptq.ptq.ptq .ptq-end{grid-template-columns:minmax(0,1fr);}
}
@media (max-width:560px){
  .ptq.ptq.ptq{border-radius:18px;}
  .ptq.ptq.ptq .ptq-title{font-size:12px; letter-spacing:.12em;}
  /* the progress: the step you are on spells itself out, the others are just their number (or tick) */
  .ptq.ptq.ptq .ptq-prog{display:flex; gap:5px;}
  .ptq.ptq.ptq .ptq-prog li{flex:none;}
  .ptq.ptq.ptq .ptq-prog li.is-current{flex:1 1 auto; min-width:0;}
  .ptq.ptq.ptq .ptq-prog button{justify-content:flex-start; width:auto; padding:4px;}
  .ptq.ptq.ptq .ptq-prog li.is-current button{width:100%; padding-right:12px;}
  .ptq.ptq.ptq .ptq-prog li:not(.is-current) span{
    position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
  }
  .ptq.ptq.ptq .ptq-screen{padding:20px 16px 22px;}
  .ptq.ptq.ptq .ptq-opt{min-height:56px; gap:12px; font-size:16.5px;}
  .ptq.ptq.ptq .ptq-opt b{width:36px; height:36px;}
  .ptq.ptq.ptq .ptq-opt{grid-template-columns:36px minmax(0,1fr); row-gap:3px;}
  .ptq.ptq.ptq.is-answered .ptq-opt:is(.is-right,.is-picked) b{grid-row:1 / span 2;}
  .ptq.ptq.ptq .ptq-opt em{grid-column:2; justify-self:start; font-size:10.5px; letter-spacing:.05em;}
  .ptq.ptq.ptq.is-answered .ptq-opt.is-picked:not(.is-right) em{padding:3px 7px;}
  /* the crops run to the console's edges, for every pixel of width */
  .ptq.ptq.ptq .ptq-frame, .ptq.ptq.ptq .ptq-page{margin:0 -16px; border-radius:0; border-left:0; border-right:0; box-shadow:none;}
  .ptq.ptq.ptq .ptq-media figcaption{margin-top:8px;}
  .ptq.ptq.ptq .ptq-page{padding:14px 16px 18px; font-size:15px;}
  .ptq.ptq.ptq .ptq-fb-lead{padding-left:26px; text-indent:-26px;}
  .ptq.ptq.ptq .ptq-fb-n{width:26px;}
  .ptq.ptq.ptq .ptq-fb-conv, .ptq.ptq.ptq .ptq-fb-in, .ptq.ptq.ptq .ptq-fb-fig{padding-left:26px;}
  .ptq.ptq.ptq .ptq-cv{padding-left:0; column-gap:.35em;}
  .ptq.ptq.ptq .ptq-cv span:nth-child(n){min-width:0;}
  .ptq.ptq.ptq .ptq-fb-conv{gap:6px;}
  .ptq.ptq.ptq .ptq-fb-in:last-child, .ptq.ptq.ptq .ptq-fb-in:nth-last-child(2){padding-left:26px;}
  .ptq.ptq.ptq .ptq-fb-fig{padding-left:0;}
  .ptq.ptq.ptq .ptq-fb-bul, .ptq.ptq.ptq .ptq-fb-eq{padding-left:calc(26px + 1em);}
  .ptq.ptq.ptq .ptq-fb-bul::before, .ptq.ptq.ptq .ptq-fb-eq.is-bul::before{left:26px;}
  .ptq.ptq.ptq .ptq-fb-eq{grid-template-columns:minmax(0,1fr);}
  .ptq.ptq.ptq .ptq-fb-eq span:nth-child(odd):empty{display:none;}
  .ptq.ptq.ptq .ptq-fb-eq span:nth-child(even){padding-left:1.7em; text-indent:-.8em;}   /* a long line wraps after its "=" */
  /* the wide diagram gets a taller frame on a phone, so the camera can come in close */
  .ptq.ptq.ptq .ptq-frame--diagram{aspect-ratio:8 / 5;}
  .ptq.ptq.ptq .ptq-fb-fig picture{width:72px;}
  .ptq.ptq.ptq .ptq-fb-fig--diagram picture{width:104px;}
  .ptq.ptq.ptq .ptq-fb-fig button{gap:12px; font-size:14px;}
  .ptq.ptq.ptq .ptq-nav .ptq-btn{flex:1 1 auto;}
  .ptq.ptq.ptq .ptq-end-ctas .ptq-btn{flex:1 1 100%;}
}

/* ---------- still, for those who ask for less motion ---------- */
@media (prefers-reduced-motion:reduce){
  .ptq.ptq.ptq *, .ptq.ptq.ptq *::before, .ptq.ptq.ptq *::after{animation:none !important; transition:none !important;}
  .ptq.ptq.ptq .is-on .ptq-band{transform:scaleX(1);}
  .ptq.ptq.ptq .is-on .ptq-ring{transform:translate(-50%,-50%) scale(1);}
  .ptq.ptq.ptq .is-on .ptq-cell{transform:scale(1);}
  .ptq.ptq.ptq .is-on .ptq-fb-lead strong{background-size:100% 100%;}
  button.ptq-pulse, .single_add_to_cart_button.ptq-pulse{animation:none;}
}

.ptq.ptq.ptq [hidden]{display:none;}
