/* ===================================
   SMART QUIZ NEXT: FRONTEND CSS
   =================================== */

/* ── Two edges every template can be trusted to show ─────────────────────────
   A CONTROL'S OWN OUTLINE IS NOT --sqp-sp-ans-bdr, and neither is a panel's.
   That variable is the Style panel's "Answer border", and a template is entitled
   to set it `transparent`: modern does, because its answer cards are edged by
   their shadow instead. The moment it does, every rule that wrote
   `border: 1px solid var(--sqp-sp-ans-bdr, <a grey>)` loses its border outright,
   because a variable that IS defined never reaches the fallback beside it.

   What that took out on modern was not decoration. It was the tick box, the
   matrix tick, the rating circles, the free-text "Other" field, the recap's
   second button and the analysis screen's prompt buttons: seven controls whose
   only visible edge was that border, several of them white on white. The letter
   badge hit this first and was fixed by deriving its edge from the answer's own
   ink; these are the same fix, named once instead of seven times.

   Ink, not a literal, for the reason that note gives: the ink is by definition
   already readable on the surface the template put the control on, so a hairline
   mixed from it lands on a dark card as readily as a light one. Answer ink for
   what sits on an answer, title ink for what sits on the card around it. */
.sqp-quiz-container {
  --sqp-ctl-edge:  color-mix(in srgb, var(--sqp-sp-ans-text, #1a1a2e) 32%, transparent);
  --sqp-card-edge: color-mix(in srgb, var(--sqp-sp-title-color, #0f2e47) 16%, transparent);
}

/* Container */
/* INTER IS THE BASE, NOT THE RAW SYSTEM STACK. It matters only under Template
   default, where no blanket font rule is written and each template styles the
   elements it cares about: its titles, its descriptions. Everything it does NOT
   name inherits from here, and buttons are the visible one - measured on classic,
   modern and elegant, the card read Merriweather over Inter with a Segoe UI
   button sitting under it. Inter and Merriweather are enqueued for every quiz
   unconditionally (see SQP_Shortcode::render), so this asks for nothing that is
   not already on the page. A quiz that picks a face is unaffected: that rule is
   scored (1,0,0) and still wins over this and over the templates alike. */
.sqp-quiz-container { font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; color:#333; line-height:1.5; box-sizing:border-box; max-width:var(--sqp-sp-tmpl-w, 700px); margin-left:auto; margin-right:auto; overflow:hidden; position:relative; }
/* BORDER-BOX, AND A THEME DOES NOT GET TO TAKE IT AWAY.
   The class is repeated to reach (0,2,0). At (0,1,0) this lost to any theme rule
   of the shape `.something div`, which is (0,1,1) - Thrive Architect ships
   exactly that, `.thrv_wrapper div { box-sizing: content-box }`. The damage is
   not cosmetic: every answer width here is `calc(100% / n)`, which only adds up
   while padding and border are counted inside it. On content-box a two-column
   answer measured 295px inside a 560px column instead of 273, the pair no
   longer fit on a row, and the grid the author chose - and still saw in the
   editor, where no theme is loaded - rendered one per line on the live page.
   Reported by the second developer as "admin side showing two answer per line
   but in the frontend it showing one answer per question". */
.sqp-quiz-container.sqp-quiz-container *,
.sqp-quiz-container.sqp-quiz-container *::before,
.sqp-quiz-container.sqp-quiz-container *::after { box-sizing:border-box; }
/* Full-screen mode: breaks the quiz out of the theme's content column so the
   frame runs edge-to-edge. --sqp-vw is the viewport width without the scrollbar
   (set by sqpSyncViewportWidth in sqp-frontend.js); plain 100vw counts the
   scrollbar and would push out a horizontal scrollbar of its own. */
.sqp-quiz-container.sqp-fullscreen { max-width:var(--sqp-vw, 100vw); width:var(--sqp-vw, 100vw); position:relative; left:50%; transform:translateX(-50%); }
/* A BUTTON-ONLY START SCREEN DOES NOT BREAK OUT. Button Only draws that screen with
   the classic template (it is the only one that implements it), so on a full-screen
   template the result was a 700px classic card adrift in a 1920px edge-to-edge band -
   an empty white strip with one button in the middle of it. The breakout is held back
   until the engine adds .sqp-quiz-started, so the QUESTIONS still run edge to edge,
   which is the layout cinematic and lumen are for. `unset` rather than a literal, so
   the value the container would otherwise have had is restored rather than guessed. */
.sqp-quiz-container.sqp-fullscreen.sqp-btnonly-start:not(.sqp-quiz-started) {
  max-width:var(--sqp-sp-tmpl-w-static, 700px); width:auto;
  left:auto; transform:none; margin-left:auto; margin-right:auto;
}
/* ...and the screen inside it, which .sqp-fullscreen uncaps and squares off two rules
   up. Without this the container narrows but the screen still paints a band across
   whatever the theme wrapper gives it. */
.sqp-quiz-container.sqp-fullscreen.sqp-btnonly-start:not(.sqp-quiz-started) .sqp-screen {
  max-width:var(--sqp-sp-tmpl-w-static, 700px); margin-left:auto; margin-right:auto;
}
/* THE FRAME BEHIND A BUTTON-ONLY START SCREEN PAINTS NOTHING.
   Button Only draws that screen with the CLASSIC template, and classic owns its card
   (.sqp-classic-card carries the background, border, radius and padding). The frame
   around it is still the QUIZ's template though, and every template except classic
   paints a card of its own there - so the button came out inside two boxes, a white
   one from cinematic and the real one from classic.
   !important for the same reason it is load-bearing below: the frame background
   is emitted at id level by the style system and no class selector can outrank it. */
.sqp-btnonly-start:not(.sqp-quiz-started) .sqp-screen-start {
  background:transparent !important; border:none !important; box-shadow:none !important;
}
/* AND NOTHING AROUND IT PAINTS EITHER (owner, 2026-09-17: "In case of button only no
   need to show background just button"). BUTTON ONLY IS A BUTTON, at the end of this
   file, strips the card; the QUIZ's own background and its full-screen height went on
   showing behind it, so on lumen the button sat in a 100vh coloured band. Only until
   the engine adds .sqp-quiz-started, which is when the questions need all of it back.
   The Start tab's preview root paints the same background, so it goes there too. */
.sqp-quiz-container.sqp-btnonly-start:not(.sqp-quiz-started) {
  background:transparent !important; background-image:none !important;
  border:none !important; box-shadow:none !important;
  min-height:0 !important; padding:0 !important;
}
.sqp-quiz-container.sqp-btnonly-start:not(.sqp-quiz-started)::before,
.sqp-quiz-container.sqp-btnonly-start:not(.sqp-quiz-started)::after { display:none !important; }
.sqp-btnonly-start:not(.sqp-quiz-started) .sqp-screen-start {
  min-height:0 !important; padding:0 !important;
}
.sqp-live-preview.sqp-lp-start:has(.sqp-start-tpl.sqp-btn-only) {
  background:transparent !important; background-image:none !important;
  border:none !important; box-shadow:none !important;
}
.sqp-live-preview.sqp-lp-start:has(.sqp-start-tpl.sqp-btn-only)::before,
.sqp-live-preview.sqp-lp-start:has(.sqp-start-tpl.sqp-btn-only)::after { display:none !important; }

/* EDITOR PREVIEW ONLY: give a full-screen template a height to be 100% OF.
   .sqp-live-preview is the preview root (EditablePreview.vue) and exists nowhere on
   a visitor's page. On the live page a full-screen template measures itself against
   the viewport - cinematic's split panel is
   `min-height:var(--sqp-sp-tmpl-h, ...)` and that variable is 100vh. In the preview
   the same variable is 100%, because 100vh inside a 520px panel previews nothing -
   but a percentage height needs a DEFINITE height on every ancestor, and the chain
   (.sqp-preview-quiz, .sqp-screen) is auto. So the panel resolved to its own content
   and drew a short band with the rest of the canvas empty under it.
   Handing the chain the canvas height is what makes the percentage mean the same
   thing the viewport unit means on the page. */
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz,
.sqp-live-preview.sqp-fullscreen .sqp-screen { height:100%; }
/* ...AND CONTENT ALIGN, WHICH THAT HEIGHT SWITCHED OFF. The frame above fills the
   canvas, so the canvas's own centring (EditablePreview's align-items) has no spare
   room left to centre anything in, and a short screen sat at the top of a tall
   tinted panel (owner, 2026-09-16: "it should show on center not on top").
   On the live page Content Align is honoured by `#sqp-quiz-N.sqp-fullscreen
   .sqp-screen { display:flex; flex-direction:column; justify-content:safe center }`
   (SQP_Renderer::buildStyleCSS), and the preview has no .sqp-screen: the template
   root sits straight in .sqp-preview-quiz. So that element takes the screen's column,
   and the choice is read from --sqp-sp-content-mt (auto = Center, 0 = Top), the var
   both the renderer and styleLive.js already emit, so the Customizer toggle moves
   the preview live.
   Two auto margins on empty pseudo-elements rather than justify-content: the
   setting is a var, not a class, and auto margins are the SAFE centring - they
   share out spare height when there is some and collapse to 0 when the screen is
   taller than the canvas, so a long question starts at the top and scrolls instead
   of losing its heading above the scroller. A template that fills the frame itself
   (cinematic's split, elegant's outer, lumen's growing column) leaves no spare
   height, so the margins resolve to 0 and nothing about it moves. */
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz { display:flex; flex-direction:column; }
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz::before,
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz::after { content:''; flex:none; }
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz::before { margin-top:var(--sqp-sp-content-mt, 0); }
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz::after { margin-bottom:var(--sqp-sp-content-mt, 0); }
/* The two full-screen templates whose FRAME is the design fill the canvas instead.
   On the page, elegant's photo panel is `flex:1 1 auto` in a viewport-tall column
   (SQP_Renderer::buildStyleCSS) and cinematic's split is min-height 100vh, so the
   picture runs to the bottom of the window and the content centres inside it. Their
   Start, Outcome and Lead Gen roots have no such rule in the preview (the question
   roots already take height:100%), so the panel stopped at its 331-400px floor at the
   top of the canvas with blank sheet under it. Growing the root restores the page's
   shape; each template then centres its own content (align-items:safe center on
   elegant's outer, the split's own panes on cinematic). */
.sqp-live-preview.sqp-template-elegant.sqp-fullscreen .sqp-preview-quiz > :is(.sqp-start-tpl6-outer, .sqp-oc-tpl6-outer, .sqp-lg-tpl6-outer),
.sqp-live-preview.sqp-template-cinematic.sqp-fullscreen .sqp-preview-quiz > :is(.sqp-start-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) { flex:1 0 auto; }
/* EDITOR PREVIEW ONLY: A FULL-SCREEN CINEMATIC SPLIT IS AS TALL AS THE CANVAS, NOT TALLER
   (#30, owner 2026-09-17: "why it showing scrollbar on backend"). On the page the
   split is bounded by the window: start is min-height 100vh, and question, result and
   opt-in are height 100vh with the content pane scrolling. The preview broke that
   in two places, so the split ran past the canvas with the Start button below the fold:
   1. .sqp-live-preview is `flex:1 0 auto` (EditablePreview.vue), so it never gets
      smaller than its content. The 100% chain above then resolved against a box that
      had already grown to fit the card. On Questions at 1920x869 that meant a 925px
      split in a 481px canvas, with the page's own pane scroller never used.
      Basis 0 plus min-height:0 makes it exactly the canvas height.
   2. styleLive.js writes `min-height:<Min Height>px !important` on every tpl9 root,
      and `<Height>px` on the root and both panes, WHETHER OR NOT Full Screen is on.
      The renderer only feeds those values to the var fallback, so the page ignores them
      in full screen. Here they won: at 1366x768, the default 400 alone beat a
      380px canvas, and a larger Min Height (the slider goes to 800) made the owner's
      screenshot. The override needs !important and more specificity to beat that rule.
   The start root still grows when its content can't fit (flex:1 0 auto above), so
   the canvas scrolls just as the page would. The other three keep the page's pane
   scroller. Not the phone preview: that screen is a fixed 390x760 box scaled to the
   canvas (EditablePreview.vue), so it keeps its own height.
   position:relative on the pane holds the Next button's absolutely positioned
   .sqp-sr-only label inside the pane. Without it the label is placed against
   .sqp-live-preview, below the canvas, and brings the outer scrollbar back.
   The selectors name .sqp-ep-stage (2026-09-17). 8e6cfef put that wrapper between
   .sqp-ep-body and .sqp-live-preview (the phone's on-screen box, display:contents on
   desktop), so `.sqp-ep-body > .sqp-live-preview` stopped matching and all three rules
   were dead: at 1536x674 on quiz 1029 the Questions split was 1141px in a 333px
   canvas again. sqp-builder.css names the stage for the same reason. */
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-cinematic.sqp-fullscreen { flex:1 1 0; min-height:0; }
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-cinematic.sqp-fullscreen .sqp-preview-quiz > :is(.sqp-start-tpl9, .sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9),
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-cinematic.sqp-fullscreen .sqp-preview-quiz > :is(.sqp-start-tpl9, .sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) > :is(.sqp-tpl9-left, .sqp-tpl9-right) { min-height:0 !important; }
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-cinematic.sqp-fullscreen .sqp-preview-quiz > :is(.sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) > .sqp-tpl9-right { position:relative; }
/* EDITOR PREVIEW ONLY: A FULL-SCREEN ELEGANT PHOTO STAYS THE CANVAS'S SIZE AND THE CARD
   SCROLLS INSIDE IT (owner, 2026-09-17: "answer are overlaping with button ... make
   background full screen ... dont based on answer increase the background height").
   On the page the photograph is on .sqp-screen, which is capped at the window and is
   itself the scroller (SQP_Renderer::buildStyleCSS, "FULL SCREEN MEANS THE WINDOW HOLDS
   STILL"): the picture never grows, and the card keeps its content height and scrolls.
   The preview has no .sqp-screen; the photo is on the template's own outer box. Three
   things differed:
   1. .sqp-live-preview is `flex:1 0 auto`, so it grew past the canvas and the whole
      sheet scrolled, photo and all. Basis 0 + min-height:0 holds it to the canvas, as
      cinematic above.
   2. The outer box is not a scroller (styleLive.js writes overflow:hidden), so nothing
      inside the photo could move. It scrolls now, like the page's screen does.
   3. The card was held to the outer's height and the question inside it shrank
      (`flex:0 1 auto; min-height:0` in the fullscreen elegant block below), while the
      answer list cannot shrink (the ONE SCROLL block), so answers drew past the card's
      lower edge and over the Next button. In the preview the card and its chain take
      their content height instead, and the outer scrolls them.
   Not the phone preview: that screen is a fixed box that scrolls itself. */
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-elegant.sqp-fullscreen { flex:1 1 0; min-height:0; }
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-elegant.sqp-fullscreen .sqp-preview-quiz { min-height:0; }
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-elegant.sqp-fullscreen .sqp-preview-quiz :is(.sqp-q-tpl6-outer, .sqp-start-tpl6-outer, .sqp-oc-tpl6-outer, .sqp-lg-tpl6-outer) {
  flex:1 1 0; height:100%; min-height:0 !important; max-height:100%;
  overflow-x:hidden !important; overflow-y:auto !important;
  position:relative; scrollbar-width:thin;
}
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-elegant.sqp-fullscreen :is(.sqp-q-tpl6, .sqp-start-tpl6, .sqp-oc-tpl6, .sqp-lg-tpl6) {
  flex:none; height:auto; max-height:none; align-self:safe center;
}
.sqp-ep-body:not(.sqp-ep-mobile) > .sqp-ep-stage > .sqp-live-preview.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6 :is(.sqp-q-tpl-slot, .sqp-fe-question) { flex:none; }
/* EDITOR PREVIEW ONLY: THE NEXT BUTTON SITS BELOW "+ ADD ANSWER", NOT ON TOP OF IT
   (#31, owner 2026-09-17). Full-screen modern and lumen pin .sqp-fe-nav with
   `position:sticky; bottom:0` (the ONE SCROLL block below) so the page never scrolls
   the button away. In the editor the nearest scroller is the preview canvas, so the
   button stuck to the canvas's bottom edge and covered whatever was scrolled
   under it: the last answers and the editor's "+ Add answer" row, which is not on
   the page at all. The canvas is a picture of the page, so the nav goes back into
   the flow after the list. */
.sqp-live-preview.sqp-fullscreen .sqp-preview-quiz .sqp-fe-nav { position:static; }
/* EDITOR PREVIEW ONLY: aurora's result and opt-in cards sit in the middle.
   Both roots take `max-width:var(--sqp-sp-tmpl-w)` from the base block of their
   template and `margin:0` from the card override further down it. On the page that
   pair is invisible, because the frame around them is capped at the same width. The
   preview has no such frame, so the root stopped at 620px against the LEFT edge of a
   1000px canvas while Start and Questions (width:100%, no cap) filled it (owner,
   2026-09-16: "outcome showing random after switching template to Aurora"). */
.sqp-live-preview .sqp-preview-quiz > :is(.sqp-oc-tpl-au, .sqp-lg-tpl-au) { margin-left:auto; margin-right:auto; }
.sqp-fullscreen .sqp-screen, .sqp-fullscreen .sqp-questions-wrap .sqp-screen-question { max-width:none; border-radius:0; }
/* Full screen pins the backdrop to the viewport, but that rule CANNOT live here.
   Both background paths in SQP_Renderer::buildStyleCSS() write a `background:`
   SHORTHAND on an id-scoped selector (#sqp-quiz-N .sqp-screen), and a shorthand
   resets background-attachment to its initial `scroll`. A class rule in this file
   loses to that on specificity, so it would be dead. It is emitted from the
   renderer instead, after those rules. See the fullscreen block there. */
/* AURORA IS A CARD, AND NOTHING ELSE. The container used to be the design -
   a photograph under a dark overlay, with every screen transparent so the
   artwork showed through. That made it an atmosphere, and an atmosphere is the
   one thing three of these templates already were. Now the container is nothing
   but space around the card, and the card itself is
   drawn by templates/aurora/*.php, which is where the design now lives.
   The image and overlay variables are still read, so a quiz that set its own
   keeps it; the DEFAULTS are what changed. */
.sqp-template-aurora {
  background-color:var(--sqp-sp-au-bg, transparent);
  background-image:var(--sqp-sp-au-bgimg, none);
  background-size:cover; background-position:center; background-repeat:no-repeat;
  min-height:auto; border-radius:0;
  /* Room for the card's shadow to fall, not a band of color. */
  padding:clamp(16px, 3vw, 40px) clamp(12px, 3vw, 32px);
}
/* The bar keeps running - it is the source of the percentage the card's own
   underline reads - but it is not drawn outside the card. */
.sqp-quiz-container.sqp-template-aurora.sqp-on-question .sqp-progress-wrap,
.sqp-quiz-container.sqp-template-aurora .sqp-progress-wrap { display:none; }
/* The admin bar height, for anything measuring itself against the viewport. Only
   set while the bar is on the page, so the fallback in each calc() is what a
   logged-out visitor gets. */
/* MANY ANSWERS SCROLL THE LIST, NOT THE PAGE. On a full-screen split the picture
   is half the design, and a long answer list used to push the whole layout past
   the viewport: the page scrolled, and the image scrolled away with it, so the
   template lost the half it exists for exactly when the question was longest.
   Bounding the screen to the frame height is what makes the existing overflow-y
   on the content side do anything - without a height to overflow, auto scrolls
   nothing. min-height:0 on the flex children is the other half: a flex item
   defaults to min-height:auto and refuses to shrink below its content, which is
   what kept the panel growing instead of scrolling.
   The list scrolls rather than the whole panel, so the question stays put and
   only the options move. */
.sqp-template-cinematic.sqp-fullscreen .sqp-screen-question { height:var(--sqp-sp-tmpl-h, 100vh); }
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 { height:100%; min-height:0; }
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-tpl9-left { height:100%; }
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-tpl9-right { height:100%; min-height:0; overflow:hidden; }
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-fe-question { display:flex; flex-direction:column; min-height:0; max-height:100%; }
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-fe-answers { flex:0 1 auto; min-height:0; overflow-y:auto; }
/* THE SAME BOUNDS FOR THE RESULT AND THE OPT-IN. Every rule above is scoped to
   .sqp-q-tpl9, the QUESTION card, so the outcome and opt-in cards had no height and
   no scroller: a long result simply grew past the navy panel and went on drawing over
   the page background underneath it, with nothing to scroll. Reported on quiz 219,
   where the closing paragraphs of a category report sat outside the panel entirely.
   The split is the same shape on all three screens, so it takes the same treatment:
   the card fills the screen, the media half holds its height, and the content half
   scrolls. min-height:0 at each step or the flex default stops the panel shrinking
   and the overflow never gets a height to work against. */
.sqp-template-cinematic.sqp-fullscreen .sqp-screen-outcome,
.sqp-template-cinematic.sqp-fullscreen .sqp-screen-leadgen { height:var(--sqp-sp-tmpl-h, 100vh); }
.sqp-template-cinematic.sqp-fullscreen .sqp-oc-tpl9,
.sqp-template-cinematic.sqp-fullscreen .sqp-lg-tpl9 { height:100%; min-height:0; }
.sqp-template-cinematic.sqp-fullscreen .sqp-oc-tpl9 .sqp-tpl9-left,
.sqp-template-cinematic.sqp-fullscreen .sqp-lg-tpl9 .sqp-tpl9-left { height:100%; }
/* AI-written outcome copy on cinematic's dark result panel. Its section headings and
   scale labels carry the quiz's secondary as an inline color, which IS this panel's
   color, so they vanished (navy on navy). Only headings that name the secondary inline,
   and only the scale-label rows, so a white card inside the copy keeps its own ink. */
.sqp-template-cinematic .sqp-oc-tpl9 .sqp-tpl9-right h3[style*="--sqp-secondary"] { color:var(--sqp-secondary-text, #fff) !important; }
.sqp-template-cinematic .sqp-oc-tpl9 .sqp-tpl9-right div[style*="justify-content:space-between"][style*="margin:0 0 8px"] { color:var(--sqp-secondary-text, #fff) !important; opacity:.78; }
.sqp-template-cinematic.sqp-fullscreen .sqp-oc-tpl9 .sqp-tpl9-right,
.sqp-template-cinematic.sqp-fullscreen .sqp-lg-tpl9 .sqp-tpl9-right { height:100%; min-height:0; overflow-y:auto; }
/* STACKED, THE PICTURE IS A BAND, NOT A SECOND SCREEN (#32). Under 768px the split
   becomes a column, but the `height:100%` above still applied to both panes. The
   picture took the whole screen and the form got what was left: at 375x740 the Lead Gen
   picture was 740px and the form pane 64px, scrolling 324px of fields in a slot.
   Found through the editor's phone preview, and the live page does the same.
   In the column the picture keeps the 200px floor the templates give it, and the content pane
   takes the rest (flex:1 1 auto, from the templates' own mobile block).
   The band is a HEIGHT of 200px, not the templates' min-height:200px. The picture inside is
   absolute in a height:100% box, and 100% of an auto height is nothing, so on a
   390px phone the Start picture measured 0px tall: an empty 200px band. (#39) */
@media (max-width:768px) {
  .sqp-template-cinematic :is(.sqp-start-tpl9, .sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) > .sqp-tpl9-left { height:200px; flex:0 0 auto; }
  .sqp-template-cinematic.sqp-fullscreen :is(.sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) .sqp-tpl9-left { height:200px; }
  .sqp-template-cinematic.sqp-fullscreen :is(.sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) .sqp-tpl9-right { height:auto; }
}
/* THE SPLIT IS THE SCREEN'S HEIGHT, WHATEVER IS IN IT (#39, owner 2026-09-17: "height
   always be max as screen height it not change based on content"). Every screen root
   asked for `min-height:var(--sqp-sp-tmpl-h, var(--sqp-sp-tpl9-min-h, ...))` (start.php,
   questions.php, outcome.php, leadgen.php). A floor lets the split grow, so a long title
   stretched both halves: the page scrolled and the photograph was re-cropped taller
   with every line. Question, result and opt-in were already bounded in full screen
   (height:100% above). Start and every boxed screen were not.
   As a HEIGHT, the frame is the window in full screen (100vh on the page, 100% of the
   canvas in the editor preview), and the author's Height, otherwise Min Height, when
   boxed. The text half scrolls inside it. The media half keeps its crop
   (.sqp-tpl9-img is absolute + object-fit:cover). max() keeps a 240px frame if a value
   ever resolves to nothing. Side by side only: stacked under 768px the screen keeps
   flowing, and the media band keeps its fixed 200px. */
@media (min-width:769px) {
  .sqp-template-cinematic :is(.sqp-start-tpl9, .sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) {
    height:max(var(--sqp-sp-tmpl-h, var(--sqp-sp-tpl9-min-h, 400px)), 240px);
  }
  .sqp-template-cinematic :is(.sqp-start-tpl9, .sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) > .sqp-tpl9-right {
    min-height:0; overflow-y:auto;
  }
  .sqp-template-cinematic .sqp-interstitial {
    height:max(var(--sqp-sp-tmpl-h, var(--sqp-sp-tpl9-min-h, 480px)), 240px); overflow-y:auto;
  }
}
/* Not in a popup. The box is the frame there, the split is already stacked
   (.sqp-popup-box rules below), and the modal scrolls as one. */
.sqp-popup-box .sqp-template-cinematic :is(.sqp-start-tpl9, .sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9),
.sqp-popup-box .sqp-template-cinematic .sqp-interstitial { height:auto; }
/* THE SCROLLING PANE HOLDS ITS OWN HIDDEN LABELS (issue #29). The Next button's
   .sqp-sr-only label is position:absolute, and with no positioned ancestor inside
   the pane it was placed against .sqp-screen instead - at its static spot at the
   foot of the pane's CONTENT, below the frame. The pane's overflow clips only what
   it contains, so that 1px label stretched the screen's own scroller: measured at
   900x678, a 678px screen scrolling to 778. One wheel over the photo scrolled the
   whole split up and left a 100px empty band with the chevrons sitting in it.
   The editor preview already carries this for the same reason (see the
   .sqp-ep-body rules near the top of this file); the page never did. */
.sqp-template-cinematic.sqp-fullscreen :is(.sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) > .sqp-tpl9-right { position:relative; }
/* ...and pins them to the pane's corner. Left at their static spot they still
   lengthened the PANE's scroll by the height of its bottom padding (705 -> 739 at
   900x560): blank space after the last answer. A 1px clipped label reads the same
   from anywhere. */
.sqp-template-cinematic .sqp-tpl9-right .sqp-sr-only { top:0; left:0; }

/* AND THE SAME BOUND FOR MODERN, which was the one full-screen template without it.
   The symptom people report is "I have to scroll for the Next button, and there is
   empty space right there". Both halves are true and they are the same fault. The
   container is locked to the window in full screen and pads 6vh top and bottom
   OUTSIDE the screen that scrolls, so on a laptop the screen gets about three
   quarters of the window and the rest is a band of background nothing can ever
   reach. The question inside was an ordinary block, so a picture at its full height
   pushed the title, the options and finally the nav past the fold, and what showed
   below the fold line was that unreachable band. Measured on this build: the Next
   button was outside the screen at EVERY window height from 440px to 700px.

   The inset drops to something a locked frame can afford, and the question becomes
   a column bounded by the screen with the parts that can yield doing so in order:
   the picture first, then the option list, and the nav never. That is the same
   arrangement cinematic and lumen use above; only the yielding picture is new, and
   it is new because modern is the template that puts one there. Boxed modern keeps
   the full 6vh: nothing is locked there, so the padding is real breathing room. */
.sqp-template-modern.sqp-fullscreen { padding-top:clamp(12px,2.5vh,32px); padding-bottom:clamp(12px,2.5vh,32px); }
.sqp-template-modern.sqp-fullscreen .sqp-q-tpl8 { display:flex; flex-direction:column; min-height:0; max-height:100%; }
.sqp-template-modern.sqp-fullscreen .sqp-q-tpl8 .sqp-fe-question { display:flex; flex-direction:column; flex:0 1 auto; min-height:0; max-height:100%; width:100%; }
/* The picture yields first and keeps its frame while it does: fixed box, cropped
   fill. Letting the <img> itself shrink would letterbox it inside a box that is
   still full height, which moves nothing. The floor stops it collapsing to a
   sliver on a short window, at which point the option list takes over. */
.sqp-template-modern.sqp-fullscreen .sqp-fe-q-image {
  flex:1 1 auto; min-height:96px; max-height:var(--sqp-sp-el-imgh, 280px);
  /* No el_imgw cap here any more. It held the picture to 400px inside a 744px
     column, so the one element meant to carry the question was narrower than the
     options under it. The column is the measure; the picture fills it. */
  width:100%; margin-left:auto; margin-right:auto;
  overflow:hidden; border-radius:8px;
}
.sqp-template-modern.sqp-fullscreen .sqp-fe-q-image img { display:block; width:100%; height:100%; max-height:none; object-fit:cover; border-radius:8px; }
.sqp-template-modern.sqp-fullscreen .sqp-fe-answers { flex:0 1 auto; min-height:0; overflow-y:auto; }
.sqp-template-modern.sqp-fullscreen .sqp-fe-nav { flex:0 0 auto; }

/* The same bound for lumen, which fills the screen without a picture beside it.
   The list is the only part that should move: the question stays where it is and
   long option sets scroll under it rather than growing the page. Each step of the
   chain needs min-height:0 or the default min-height:auto stops it shrinking and
   the overflow-y below never gets a height to overflow. */
.sqp-template-lumen.sqp-fullscreen .sqp-q-tpl-lm { display:flex; flex-direction:column; min-height:0; max-height:100%; }
.sqp-template-lumen.sqp-fullscreen .sqp-fe-question { display:flex; flex-direction:column; min-height:0; max-height:100%; }
.sqp-template-lumen.sqp-fullscreen .sqp-fe-answers { flex:0 1 auto; min-height:0; overflow-y:auto; }

/* THE SAME INSET AT THE BOTTOM AS AT THE TOP, for elegant.
   The outer pads by min(69px, 6vh) on both ends, and that top inset is the gap you
   see between the window and the card. The bottom one only appears if the card
   FITS: `align-items:safe center` answers an overflow by falling back to
   flex-start, and the first thing that costs is the padding-bottom, so the card
   ran to the window edge and the inset was simply absent. Measured logged in at
   870px: an 838px frame, 64px of screen padding, 64px of outer padding, 710px of
   room, and a 716px card. Six pixels was the whole difference.
   Bounding the card and letting the ANSWER LIST take up the slack is what cinematic
   and lumen already do, two rules above.

   .sqp-q-tpl-slot IS THE PART THAT MATTERS. The question is not a child of the
   card: the card holds a progress slot and this slot, and the engine mounts the
   screen inside the slot. An earlier version of this rule set the card and the
   question and skipped the slot in between, so the chain of min-height:0 broke
   there: the slot kept its content height, the question never shrank, and the
   whole thing overflowed the card with the Next button ending up outside it.
   Every step from the frame down to the scrolling list has to be in the chain or
   none of it works.

   THE CAP IS A CALC, NOT max-height:100%. Both were measured: the percentage
   computes to "100%" and then does nothing, because neither `flex:1 1 auto` nor
   `height:100%` on the outer gives Chrome a containing block it will resolve a
   child's percentage max-height against here: the card stayed 736px in a 710px
   box under both. The calc states the same figure in terms that always resolve:
   the frame (--sqp-sp-tmpl-h, which the renderer already publishes as
   `calc(100vh - the admin bar)`), less the screen's own 32px inset top and bottom,
   less the outer's padding twice.

   The three `flex:0 1 auto` are shrink-WITHOUT-grow on purpose. With `1 1 auto`
   the card fills the cap even when its content does not need to, which pushed it
   from 716 to 736 and made the two insets 64/38 instead of matching. Shrink-only
   leaves a short question its natural height and still lets a long one give.

   Measured logged in, both symmetric: at 870px, 64 above / 64 below with the list
   scrolling 21px; at 1012px, 122 / 122 with nothing scrolling at all. */
.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6-outer { height:100%; min-height:0; }
/* NO max-height HERE ANY MORE, and it has to go together with the ONE SCROLL block
   below. That block made the answer list flex:0 0 auto / overflow-y:visible on this
   template - the list is deliberately not a scroller, the whole screen scrolls - so
   nothing inside this card can give. Capping the card to the viewport while its
   content cannot shrink does not bound anything: the content simply draws outside the
   card, which is overflow:visible. Measured on quiz 208 at a 760px viewport: the last
   answer 31px past the card s lower edge and the Next button 115px past it, both
   sitting on the page background outside the panel.
   The card now takes its content s height and the screen wrapper scrolls, which is
   the arrangement the ONE SCROLL block describes. */
.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6 {
  display:flex; flex-direction:column; min-height:0;
}
.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6 .sqp-q-tpl-slot { display:flex; flex-direction:column; flex:0 1 auto; min-height:0; }
.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6 .sqp-fe-question { display:flex; flex-direction:column; flex:0 1 auto; min-height:0; }
.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6 .sqp-fe-answers { flex:0 1 auto; min-height:0; overflow-y:auto; }

/* ─────────────────────────────────────────────────────────────────────────
   ONE SCROLL, NOT TWO. The question and its answers move together.

   The four rules above each made .sqp-fe-answers its own scroller, so a long
   option set scrolled INSIDE a box while the question sat still above it. The
   reasoning was sound on a wide split, keep the picture and the question fixed,
   but the box it leaves on a phone is tiny: measured on quiz 106 (cinematic) at
   320x568, the answer list was squeezed to 53px of visible height with 244px of
   content in it. A 53px window onto four options reads as broken, not as scrollable.

   So the scroll moves UP to the element that holds the question and the answers,
   and the answer list stops being a scroller at all. Long questions now scroll as
   one piece, which is what a reader expects.

   flex:0 0 auto on the list is the other half. It was 0 1 auto, free to shrink
   below its content: that shrinking is what produced the 53px box, and removing
   the overflow without removing the shrink would just clip the options instead.

   THE NAV IS PINNED WHERE IT SITS INSIDE THE SCROLLER. Measured: .sqp-fe-nav is
   inside .sqp-fe-question on lumen and modern, outside it on cinematic. Where it is
   inside, scrolling the question would carry the Next button off screen and
   reintroduce "I have to scroll for the Next button": the exact report the
   full-screen bounds were added to fix. position:sticky keeps it on the screen
   while the content behind it moves.
   ───────────────────────────────────────────────────────────────────────── */
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-tpl9-right { overflow-y:auto; }
.sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-fe-answers,
.sqp-template-modern.sqp-fullscreen .sqp-fe-answers,
.sqp-template-lumen.sqp-fullscreen .sqp-fe-answers,
.sqp-template-elegant.sqp-fullscreen .sqp-q-tpl6 .sqp-fe-answers {
  flex:0 0 auto; min-height:auto; overflow-y:visible;
}
/* NO SCROLLER ON THE CENTRED COLUMN. An earlier pass put overflow-y:auto on
   .sqp-fe-question for these three so the question and answers would scroll as one.
   That is right for cinematic, whose panel is a genuine half of a split screen and
   reaches the window edge, and wrong for these, whose question is a narrow centred
   column: measured on the imported quiz 471, .sqp-fe-question is 800px wide with its
   right edge at 1360 in a 1920 window, so its scrollbar drew a track down the MIDDLE
   of the page instead of at the window edge. Reported as "why is the scrollbar inside
   the container area".
   The screen wrapper above is already overflow-y:auto at the full window width, so
   removing this leaves exactly one scrollbar, on the right where it belongs. The
   answers still do not scroll separately: that part of the change stands. */
.sqp-template-modern.sqp-fullscreen .sqp-fe-nav,
.sqp-template-lumen.sqp-fullscreen .sqp-fe-nav {
  position:sticky; bottom:0; z-index:2;
  background:var(--sqp-sp-tmpl-bg, inherit);
}

/* ─────────────────────────────────────────────────────────────────────────
   THE INDICATOR IS ALWAYS ON THE LEFT, whatever the label does.

   Reported with a screenshot: with centred answer text the A/B/C/D badge drifts
   into the middle of the card, sitting wherever the centred label happens to start,
   so the letters no longer form a column down the left edge and stop reading as a
   list you can scan. The same applies to the radio/checkbox indicator.

   The answer is a flex row, so centring the content centres the badge WITH the
   label as one group. Pinning the badge means keeping the row packed from the
   start and letting the label take the leftover width: the label's own text-align
   then centres it inside that space, which is the effect being asked for: letters
   in a left-hand column, text centred beside them.

   order:-1 is deliberate. .sqp-fe-answer::before (the radio and the checkbox) and
   the letter badge come from different places in the markup, and a template is free
   to reorder its children; without it the indicator can end up after the label,
   which is the "radio shows on the right side" half of the report.

   This does NOT set an alignment of its own. Whatever text-align the template or
   the author applies still governs the label; only the indicator's position is
   fixed.

   SPECIFICITY: scoped through .sqp-quiz-container .sqp-fe-answers to reach (0,3,0).
   At (0,1,0) these rules did not apply at all on the modern template, measured on
   the imported quiz 471, the answer still computed justify-content:center and the
   label still computed flex:0 1 auto, leaving the badge 48px inside the card with
   dead space to its left. The templates set their own alignment at (0,2,0)+, so a
   bare .sqp-fe-answer rule loses. Measured, not assumed. */
.sqp-quiz-container .sqp-fe-answers .sqp-fe-answer { justify-content:flex-start; }
.sqp-quiz-container .sqp-fe-answers .sqp-fe-answer > .sqp-fe-answer-letter,
.sqp-quiz-container .sqp-fe-answers .sqp-fe-answer::before { flex:0 0 auto; order:-1; }
.sqp-quiz-container .sqp-fe-answers .sqp-fe-answer > .sqp-fe-answer-text { flex:1 1 auto; min-width:0; }

body.admin-bar { --sqp-adminbar-h: 32px; }
@media screen and (max-width:782px) { body.admin-bar { --sqp-adminbar-h: 46px; } }
.sqp-template-aurora.sqp-fullscreen { min-height:calc(100vh - var(--sqp-adminbar-h, 0px)); border-radius:0; }
/* CINEMATIC FILLS THE WINDOW ON EVERY SCREEN, not only on a question.
   The only height it had was `.sqp-screen-question { height:100vh }`, so the
   question screen ran edge to edge and every other one was as tall as its own
   content: the break screens stop at the interstitial's 480px floor and the
   outcome at whatever the result happens to be. What that draws is a full-bleed
   quiz that suddenly ends part way down the window with the page showing beneath
   it, which is what it was reported as - "break screens show empty space below
   and others show full screen".
   Same declaration aurora and modern already carry, for the same reason. */
.sqp-template-cinematic.sqp-fullscreen { min-height:calc(100vh - var(--sqp-adminbar-h, 0px)); }
.sqp-template-aurora::before {
  content:''; position:absolute; inset:0; z-index:0;
  background:var(--sqp-sp-au-overlay, none);
  pointer-events:none; border-radius:inherit;
}
.sqp-template-aurora > * { position:relative; z-index:1; }
/* Screens are IN FLOW so the container can grow to fit them.
   They used to be `position:absolute; inset:0`, stacked over the container's own
   background, with the comment "so container height never collapses during
   transition". The collapse it guarded against is already handled for every
   template by `.sqp-screen-leaving` (below), which parks the OUTGOING screen out
   of flow, so the blanket absolute bought nothing and cost a great deal: an
   out-of-flow screen contributes nothing to the container's height, so the
   container sat at its min-height (tmpl_h) forever and clipped anything taller.
   Measured on the reference quiz: an outcome carrying a Result Page is 928px tall
   and was rendered inside 620px, cutting 154px off the top AND bottom at once:
   the visitor got the middle of their result with the heading and footer gone.
   In flow, that same outcome grows the container to 932px and clips nothing.
   min-height keeps tmpl_h as the FLOOR it was always meant to be. */
.sqp-template-aurora .sqp-screen {
  position:relative; width:100%; min-height:0;
  display:flex; align-items:center; justify-content:center;
}
/* The question screen is the one screen that must NOT grow: a long answer list
   scrolls inside the card instead of stretching it (see .sqp-fe-answers in
   templates/aurora/questions.php). That needs a DEFINITE height, not a
   max-height: the body caps itself with `max-height:100%`, and a percentage
   cannot resolve against an auto or merely max-constrained height. With
   max-height here the body went uncapped and the list grew to 1044px inside a
   620px screen, which is the very clipping this block exists to end. */
.sqp-template-aurora .sqp-screen-question { height:auto; }
.sqp-template-aurora .sqp-start-tpl-au,
.sqp-template-aurora .sqp-q-tpl-au,
.sqp-template-aurora .sqp-oc-tpl-au,
.sqp-template-aurora .sqp-lg-tpl-au {
  background:transparent !important; background-image:none !important;
  min-height:auto;
}
.sqp-template-aurora .sqp-start-tpl-au .sqp-au-overlay,
.sqp-template-aurora .sqp-q-tpl-au .sqp-au-overlay,
.sqp-template-aurora .sqp-oc-tpl-au .sqp-au-overlay,
.sqp-template-aurora .sqp-lg-tpl-au .sqp-au-overlay { display:none; }

/* The width of the FRAME a template actually paints, published on the container so
   anything sitting outside the template (the progress bar) can line up with it.
   Several templates constrain themselves well inside .sqp-quiz-container's 1200px:
   cinematic paints 900, so a full-width bar overhung the visible card by 150px a side.
   KEEP THESE IN STEP with the `max-width:var(--sqp-sp-tmpl-w, Npx)` fallback in that
   template's own screen files: the templates read this var first, so this is the
   value that wins; the literal there is only a safety net if the class is missing.
   Templates with no frame of their own (classic, modern, lumen) set nothing and keep
   filling the container. */
.sqp-quiz-container.sqp-template-cinematic { --sqp-frame-w: 900px; }
.sqp-quiz-container.sqp-template-aurora    { --sqp-frame-w: 1100px; }
.sqp-quiz-container.sqp-template-elegant   { --sqp-frame-w: 1020px; }

/* CINEMATIC: the bar belongs ON the panel, not above it. Stacked over a full-bleed
   split screen the stock wrap sat on the page background with a "Progress" label and
   a percentage beside it - a strip of admin furniture above the artwork. Here it is a
   hairline pinned to the top edge: legible against both halves, and it takes no height
   from the composition. The label and the number go, because at 4px the fill IS the
   reading and the question counter already says which one this is.
   Pinned across the FULL width rather than the content half on purpose - the picture
   can sit on either side (tpl9_position), and a bar that jumped sides with it would be
   the odd thing on the screen. */
.sqp-template-cinematic { position:relative; }
.sqp-template-cinematic .sqp-progress-wrap { position:absolute; top:0; left:0; right:0; z-index:6; margin:0; padding:0; width:auto; }
.sqp-template-cinematic .sqp-progress-info { display:none; }
/* THE PER-CATEGORY BAR BRINGS ITS OWN BAND. Cinematic's indicator is a 4px
   hairline pinned across the WHOLE screen, over the photograph as much as the
   content panel, fine for a bare bar, and nowhere to put a section name: no
   single ink reads on an arbitrary photo (measured 1.1:1 against this template's
   own image). The names are the reading of a per-category bar, so instead of
   dropping them the strip becomes a shallow band in the panel's own colour and
   the names sit on that at full contrast.
   Scoped to .sqp-progress-cats, so the plain bar keeps the hairline it was
   designed as. */
.sqp-template-cinematic .sqp-progress-wrap.sqp-progress-cats {
  background:var(--sqp-sp-tpl9-right-bg, #0d1b2a);
  padding:9px 18px 11px;
}
.sqp-template-cinematic .sqp-progress-cats .sqp-progress-catname { color:rgba(255,255,255,.6); }
.sqp-template-cinematic .sqp-progress-cats .sqp-progress-cat--active .sqp-progress-catname { color:#fff; }
.sqp-template-cinematic .sqp-progress { height:4px; border-radius:0; background:rgba(0,0,0,.22); }
.sqp-template-cinematic .sqp-progress-bar { border-radius:0; }

/* Progress Bar */
.sqp-progress-wrap {
  width:100%; margin:0 auto 16px; padding:0;
  font-family:'Inter',-apple-system,sans-serif;
  /* Match the template's frame, not the raw container. An author-set template width
     (--sqp-sp-tmpl-w) wins, then the template's own frame, then full width. */
  max-width:var(--sqp-sp-tmpl-w, var(--sqp-frame-w, none));
}
.sqp-progress-info {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:6px;
}
/* #6c757d MISSED AA ON EVERY TEMPLATE, not just the tinted ones - 12px is small
   text, so it needs 4.5:1, and the shipped grey gave 3.86 on modern's pink page,
   3.99 on lumen's, 4.14 on cinematic, 4.36 on classic and 4.28 on the host grey
   most quizzes actually sit on. Only the two white pages cleared it, at 4.69.
   Four points darker on each channel is the first value that clears 4.5 against
   all of them (worst 4.53, on modern) while staying a step quieter than the
   percentage beside it, which is what the pair is for. */
.sqp-progress-label { font-size:12px; font-weight:600; color:#616a72; }
.sqp-progress-pct { font-size:12px; font-weight:700; color:#212529; }
.sqp-progress { width:100%; height:6px; background:#e9ecef; position:relative; overflow:hidden; border-radius:3px; }
/* --sqp-progress-color is the site-wide bar color (Settings > Design). It is only
   emitted when set, so with no setting the bar keeps following the quiz's primary. */
.sqp-progress-bar { height:100%; background:var(--sqp-progress-color, var(--sqp-primary, #2ecc71)); transition:width .4s ease; border-radius:3px; }
.sqp-progress-wrap { display:none; }
/* The bar is a fraction OF THE QUESTIONS, so it belongs on the question screens
   and nowhere else. It used to be gated on `.sqp-quiz-started`, which the engine
   only ever ADDS, so pressing Start put it up for the rest of the quiz - above an
   opt-in screen shown before the questions it was measuring, reading 1 of N with
   nothing answered. `.sqp-on-question` is toggled by showProgressIndicators(),
   the same call that reveals the counter, so the two halves of one setting come
   and go together. */
.sqp-quiz-container.sqp-on-question .sqp-progress-wrap { display:block; }

/* ── Question Counter (5 styles) ── */
.sqp-qcount-wrap { max-width:800px; margin:0 auto; padding:8px 12px 4px; }
/* Below the question the padding has to flip: 8px above / 4px below reads as
   attached to whatever comes NEXT, and at the bottom there is nothing next. */
.sqp-qcount-wrap.sqp-qcount-at-bottom { padding:4px 12px 10px; }

/* 01: Dot Stepper */
/* WRAPS. One dot per question with no wrap runs off a narrow screen as soon as the
   quiz is long enough: measured on quiz 35 (every question type) at 320px, the row
   ran left:36 to right:336 and took the document 16px wider than the viewport. The
   pills variant below has always had flex-wrap; dots and segments were simply never
   given it. Nothing detected this until the harness started walking to the question
   screens: the counter is not on the start screen. */
.sqp-qc-dots { display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap; }
.sqp-qc-d { width:10px; height:10px; border-radius:99px; background:#dde1e6; transition:all .3s cubic-bezier(.4,0,.2,1); }
.sqp-qc-d--done { background:var(--sqp-primary, #f05451); }
.sqp-qc-d--active { width:28px; background:var(--sqp-primary, #f05451); box-shadow:0 2px 8px rgba(240,84,81,.3); }

/* 02, Segmented Bar */
/* Same wrap reasoning as the dot stepper above: one segment per question overruns
   a narrow screen on a long quiz. */
.sqp-qc-segs { display:flex; gap:4px; flex-wrap:wrap; }
.sqp-qc-sg { flex:1; height:6px; border-radius:99px; background:#e9ecef; transition:background .3s; }
.sqp-qc-sg--fill { background:var(--sqp-primary, #f05451); }

/* 03: Fraction Badge */
.sqp-qc-frac { display:flex; align-items:center; justify-content:center; }
.sqp-qc-frac { display:inline-flex; gap:2px; margin:0 auto; background:#fff; border:2px solid var(--sqp-primary, #f05451); border-radius:12px; padding:6px 18px; font-weight:800; font-size:18px; font-variant-numeric:tabular-nums; }
.sqp-qc-fc { color:var(--sqp-primary, #f05451); font-size:22px; }
.sqp-qc-fs { color:#ccc; margin:0 3px; font-weight:400; }
.sqp-qc-ft { color:#495057; font-size:22px; }
.sqp-qcount-wrap:has(.sqp-qc-frac) { text-align:center; }

/* 04: Step Pills */
.sqp-qc-pills { display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap; }
.sqp-qc-pl { width:30px; height:30px; border-radius:50%; border:2px solid #dde1e6; font-size:12px; font-weight:700; color:#adb5bd; display:flex; align-items:center; justify-content:center; transition:all .25s; background:#fff; }
.sqp-qc-pl--done { background:var(--sqp-primary, #f05451); border-color:var(--sqp-primary, #f05451); color:#fff; }
.sqp-qc-pl--active { border-color:var(--sqp-primary, #f05451); color:var(--sqp-primary, #f05451); background:rgba(240,84,81,.06); box-shadow:0 0 0 3px rgba(240,84,81,.12); }

/* 05: Inline Text + Track */
.sqp-qc-trk { text-align:center; }
.sqp-qc-trk-txt { font-size:13px; font-weight:500; color:#8c939a; display:block; margin-bottom:4px; }
.sqp-qc-trk-txt strong { font-weight:700; color:#495057; }
.sqp-qc-trk-bar { height:4px; background:#e9ecef; border-radius:99px; overflow:hidden; }
.sqp-qc-trk-fill { height:100%; background:var(--sqp-primary, #f05451); border-radius:99px; transition:width .4s cubic-bezier(.4,0,.2,1); }

/* Screen Management */

/* .25s and an ease-out curve: the slide should arrive decisively and settle, not drift.
   Kept in step with `duration` in showScreen(), if the JS is shorter than this, the
   outgoing screen is display:none'd while it is still visibly moving. */
.sqp-screen { transition:transform .25s cubic-bezier(.22,.61,.36,1), opacity .25s ease; position:relative; background:#fff; border:1px solid #e2e8f0; border-radius:10px; box-shadow:0 2px 12px rgba(0,0,0,.06); margin-top:4px; text-align:center; overflow:hidden; }

/* Top Gradient Border (opt-out per template) */
.sqp-screen::before { content:''; display:block; height:4px; background:linear-gradient(90deg, #f05451, #24a0f6, #2dd4bf, #f59e0b); }
.sqp-no-top-border .sqp-screen::before { display:none; }
/* Modern/Cinematic/Elegant templates manage their own containers */
.sqp-template-modern .sqp-screen,
.sqp-template-cinematic .sqp-screen,
.sqp-template-elegant .sqp-screen,
.sqp-template-aurora .sqp-screen { flex-direction:column; }
/* Classic paints its own card (.sqp-classic-card: background, border, radius, shadow,
   padding), so the screen around it must not paint a second one. The screen is WIDER
   than that card whenever an Inner Width is set, 700 against 620 on the reference,
   so the base rule's white fill and drop shadow showed as a grey edge above and around
   the cream card, reading as a border rather than as depth.
   The renderer stops emitting these two at ID level for classic; this is the base
   stylesheet's own copy, which that change uncovered. Both halves are needed.

   NOT on the full-width template. There the page backdrop is derived from the quiz's
   own Background, so it is the SAME cream as the card: a transparent screen makes the
   two merge and the design goes edge to edge, which is a different look and not the one
   this template is set up for. It keeps the white screen, and the card reads as a card
   against it. Same `body:not(.sqp-fw)` guard the logo rules below use. */
body:not(.sqp-fw) .sqp-template-classic .sqp-screen { background:transparent; box-shadow:none; }
.sqp-template-classic .sqp-screen::before,
.sqp-template-elegant .sqp-screen::before,
.sqp-template-modern .sqp-screen::before,
.sqp-template-cinematic .sqp-screen::before,
.sqp-template-aurora .sqp-screen::before { display:none; }
.sqp-template-aurora .sqp-screen { background:transparent; border:none; box-shadow:none; border-radius:0; }
.sqp-template-aurora .sqp-questions-wrap .sqp-screen-question { background:transparent; border:none; box-shadow:none; border-radius:0; max-width:none; }
.sqp-template-aurora .sqp-questions-wrap { background:transparent; border:none; box-shadow:none; }

/* ── Aurora Progress Bar (4 types) ── */
.sqp-au-pbar { max-width:1100px; margin:0 auto 14px; padding:0; background:transparent; border:none; box-shadow:none; }
.sqp-au-pbar .sqp-progress-info { display:none; }
.sqp-au-pbar .sqp-progress { background:transparent; border-radius:0; overflow:visible; height:auto; padding:0; }
/* Line */
.sqp-au-pbar--line .sqp-progress { height:4px; background:rgba(255,255,255,.12); border-radius:0; overflow:hidden; }
.sqp-au-pbar--line .sqp-progress-bar { height:100%; background:var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); transition:width .4s cubic-bezier(.4,0,.2,1); }
/* Glow */
.sqp-au-pbar--glow .sqp-progress { height:6px; background:rgba(255,255,255,.1); border-radius:99px; overflow:visible; }
.sqp-au-pbar--glow .sqp-progress-bar { height:100%; background:var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); border-radius:99px; box-shadow:0 0 14px var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))), 0 0 4px var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); transition:width .4s cubic-bezier(.4,0,.2,1); }
/* Segmented */
.sqp-au-pbar--segmented { padding:10px 0; }
.sqp-au-pbar--segmented .sqp-progress { display:flex; gap:6px; height:5px; background:transparent; }
.sqp-au-pbar--segmented .sqp-progress-bar { display:none; }
.sqp-au-pbar--segmented .sqp-au-seg { flex:1; height:100%; background:rgba(255,255,255,.15); border-radius:3px; transition:background .3s ease, box-shadow .3s ease; }
.sqp-au-pbar--segmented .sqp-au-seg.sqp-au-seg--fill { background:var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); box-shadow:0 0 10px var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); }
/* Dots */
.sqp-au-pbar--dots { padding:12px 0; }
.sqp-au-pbar--dots .sqp-progress { display:flex; gap:12px; justify-content:center; background:transparent; height:auto; }
.sqp-au-pbar--dots .sqp-progress-bar { display:none; }
.sqp-au-pbar--dots .sqp-au-dot { width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.22); transition:background .3s ease, transform .3s ease, box-shadow .3s ease; }
.sqp-au-pbar--dots .sqp-au-dot.sqp-au-dot--done { background:var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); }
.sqp-au-pbar--dots .sqp-au-dot.sqp-au-dot--active { background:var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); transform:scale(1.5); box-shadow:0 0 10px var(--sqp-progress-color, var(--sqp-sp-au-accent, var(--sqp-primary, #00d4a8))); }
/* AN UNDERLINE CANNOT HOLD SECTIONS. Aurora hides the outer bar (line 84) because
   its progress is drawn as a fill on the card header's own rule: one continuous
   line by construction, which is exactly what a per-category bar is not. A quiz
   asking for that bar is asking for the run broken into named parts, so on this
   template alone the wrap comes back out, above the card and in aurora's idiom.
   Matched to the card's frame, not .sqp-au-pbar's own 1100px, so the tracks line
   up with the card rather than overhanging it. */
.sqp-quiz-container.sqp-template-aurora .sqp-progress-wrap.sqp-au-pbar.sqp-progress-cats {
  display:block;
  max-width:var(--sqp-sp-tmpl-w, var(--sqp-frame-w, 640px));
  margin:0 auto 14px;
  /* ON THE CARD'S OWN SURFACE, and that is load-bearing rather than decorative.
     The section names take --sqp-sp-title-color / --sqp-sp-desc-color, which are
     derived to read on the CARD; out here on the page they are inks for a surface
     that is not behind them. An aurora quiz still carrying a dark style row (card
     #1c1917, title #f6f5f4) painted near-white names on a #f1f5f9 page. Giving
     the bar the card's surface makes the pair agree by construction, whatever
     palette the quiz is on, and it reads as the top of the card stack. */
  background:var(--sqp-sp-tmpl-bg, #ffffff);
  border-radius:var(--sqp-sp-bdr-r, 10px);
  padding:11px 18px 13px;
}
/* ...and the card's own fill stands down while they are drawn, so the quiz shows
   ONE progress indicator instead of the same figure twice. The 3px rule itself
   stays: it is the header's divider, and only the fill on it was the bar. */
.sqp-quiz-container.sqp-template-aurora:has(.sqp-progress-cats) .sqp-q-tpl-au .sqp-au-rule-fill {
  display:none;
}
/* Per-category tracks on aurora. The line type's track is rgba(255,255,255,.12),
   picked for the dark canvas this template no longer has: one bar at 12% white
   on #f9fafb is a bar you cannot see, and a ROW of them is a row of nothing that
   happens to have names over it. Tinted from the template's own derived answer
   border instead, so it follows the palette like everything else here. */
.sqp-au-pbar.sqp-progress-cats .sqp-progress-track {
  height:4px; border-radius:99px; overflow:hidden;
  background:var(--sqp-sp-ans-bdr, rgba(22,32,43,.16));
}
.sqp-au-pbar.sqp-progress-cats .sqp-progress-bar { border-radius:99px; }
/* Right-to-left animation */
.sqp-screen-enter-rl { opacity:0; transform:translateX(30px); }
.sqp-screen-exit-rl { opacity:0; transform:translateX(-30px); }
/* Top-to-bottom animation */
.sqp-screen-enter-tb { opacity:0; transform:translateY(-30px); }
.sqp-screen-exit-tb { opacity:0; transform:translateY(30px); }
/* Shared active state */
.sqp-screen-enter-active { opacity:1; transform:translate(0,0); }
/* The arriving screen must paint ABOVE the one being replaced for the whole of its
   animation. Relying on DOM order would be a coin toss: the outgoing screen is often
   the later sibling, and losing that toss puts the old screen over the new one. */
.sqp-slide-in-rl, .sqp-slide-in-tb,
.sqp-screen-enter-active { position:relative; z-index:1; }
/* DEFAULT transition: an OPAQUE SLIDE. Owner's choice, 2026-08-11, after rejecting two
   fade-based attempts.
   Nothing here touches opacity, and that is the point. A crossfade has to make one of
   the screens see-through, which either shows the container behind it (the black gap)
   or shows the OTHER question through it (a double image). A slide keeps both screens
   solid and simply moves them: at any instant the two occupy different horizontal
   space, so they never stack and there is never a gap.
   The direction names match the editor's own two choices exactly (Display tab →
   Animation Direction), so the setting an author picks is the class that runs.
   Right to Left: the new screen comes in from the right, the old leaves to the left.
   Top to Bottom: both travel downward, the new one drops in from above, which is the
   same direction the legacy -30px nudge moved in. */
.sqp-slide-in-rl  { transform:translateX(100%); }
.sqp-slide-out-rl { transform:translateX(-100%); }
.sqp-slide-in-tb  { transform:translateY(-100%); }
.sqp-slide-out-tb { transform:translateY(100%); }
/* The container must clip while two screens are side by side, or the one sliding out
   spills past the card and can widen the page. Applied ONLY for the swap: a permanent
   overflow:hidden would also clip things that legitimately escape the box, such as the
   phone field's country dropdown. */
.sqp-quiz-container.sqp-swapping { overflow:hidden; }
/* The screen being replaced. It keeps full opacity and only leaves the FLOW, so the
   incoming screen can animate in over the top of it without the two stacking and
   without a gap where the container's own background (black, on cinematic) shows
   through. z-index keeps it underneath; pointer-events stop it swallowing a click
   aimed at the screen arriving above it. */
.sqp-screen-leaving { position:absolute; left:0; right:0; top:0; z-index:0; pointer-events:none; }
/* Aurora already positions every screen absolutely, so it only needs the stacking. */
.sqp-template-aurora .sqp-screen-leaving { position:absolute; inset:0; }
/* Kept for anything still asking for an explicit no-op. Not used by showScreen. */
.sqp-screen-enter-none { opacity:1; }
.sqp-screen-exit-none { }
/* Someone who has asked their system for less motion gets the change, not the
   journey, matching how animateScrollTo() treats the same preference. */
@media (prefers-reduced-motion: reduce) {
  .sqp-screen { transition:none; }
  .sqp-slide-in-rl, .sqp-slide-in-tb { opacity:1; transform:none; }
  .sqp-slide-out-rl, .sqp-slide-out-tb { opacity:1; transform:none; }
}

/* Question Layout */
.sqp-fe-question { padding:24px 28px; text-align:left; }
.sqp-fe-q-image { margin-bottom:var(--sqp-sp-img-mb, 16px); text-align:center; }
/* ── PER-QUESTION IMAGE SIZE ──
   Written by question-slot.php as a marker class plus a custom property, and only
   when the author actually set a number - so a question with neither matches none of
   this and keeps the quiz-wide behaviour above.

   WHY !important, WHEN ALMOST NOTHING ELSE IN THIS FILE USES IT. The property alone
   would not do the job: five of the six templates clamp this picture themselves, at a
   FIXED ceiling rather than a variable one (classic `min(var(--sqp-sp-el-imgh),256px)`,
   elegant `min(var(--sqp-sp-el-imgh),22vh)`, and so on). Those rules are (0,2,1) and
   live in a <style> block that the browser sees AFTER this stylesheet, so an equally
   specific rule here loses the tie on document order. The alternative was editing the
   same clamp in six template files and keeping them in step forever.
   The ceilings exist for a good reason - a tall picture pushing the answers off the
   screen - so the guard is KEPT, just moved to the viewport: 70vh still refuses to
   fill the window, while a number the author typed on purpose is honoured on every
   template instead of being silently reduced on five of them. */
.sqp-fe-q-image.sqp-q-img-w {
  width:var(--sqp-q-img-w) !important;
  max-width:100% !important;
  margin-left:auto; margin-right:auto;
}
/* THE HEIGHT GOES ON THE WRAPPER, NOT THE PICTURE. Putting it on the img looked
   right and was not: this wrapper is `overflow:hidden` on several templates and a
   flex item on modern, so a 500px img inside a 280px box was CLIPPED to the box.
   The visible picture stayed the old size, and because the img s layout rect still
   claimed 500px while only the top of it was painted, the answers below ended up
   over the rest of it - which is why dragging inside the picture hit the answer
   list instead. Sizing the wrapper makes the flow account for the new height, and
   the img simply fills it. `flex:0 0 auto` is needed for modern, whose own rule
   makes this element `flex:1 1 auto` and would otherwise stretch it back. */
.sqp-fe-q-image.sqp-q-img-h {
  height:var(--sqp-q-img-h) !important;
  max-height:min(var(--sqp-q-img-h), 70vh) !important;
  flex:0 0 auto !important;
}
.sqp-fe-q-image.sqp-q-img-h img {
  height:100% !important;
  max-height:100% !important;
}
/* WHICH PART OF A CROPPED PICTURE SHOWS. object-fit:cover on the img above means
   anything that is not the frame s ratio loses its edges, and it always lost them
   symmetrically because object-position defaults to centre. This is the focal
   point the Media panel sets and the preview drags. !important for the same reason
   as the two rules above: modern sets object-position on this element itself. */
.sqp-fe-q-image.sqp-q-img-pos img { object-position:var(--sqp-q-img-pos) !important; }
/* HOW THE PICTURE FILLS THE FRAME. Everything above sizes the box; this decides what
   a photograph of a different shape does inside it. `contain` shows all of it and
   leaves space at the sides, so the wrapper s own background shows through - which is
   correct, and why this is offered rather than made the default. */
.sqp-fe-q-image.sqp-q-img-fit img { object-fit:var(--sqp-q-img-fit) !important; }
/* A QUESTION IMAGE MUST NOT PUSH THE QUESTION OFF THE SCREEN. This rule capped the
   WIDTH and left the height to the picture, so a portrait photo rendered at the
   full column width and however tall that made it. Measured on lumen, whose column
   is 960px: a 1227px-tall image, the question title at y=1337 and the first answer
   at y=1442, both far below a 748px viewport. What a taker saw was a photograph and
   an arrow, with no question and nothing to choose - reported, reasonably, as the
   quiz being stuck.

   Only classic capped it, in its own file. That is five templates carrying the same
   defect, so the cap belongs HERE, once, and 340px is the largest that still leaves
   a question and its first answers on a laptop screen.

   max-height with width:auto rather than object-fit: the picture scales down whole
   and stays centred (the wrapper is text-align:center). object-fit:cover would keep
   the box and crop the image instead, which is what classic asks for on purpose and
   still gets - its own rules are more specific and win. */
/* THE SAME FLOOR FOR THE OTHER TWO PICTURE SCREENS. There is no shared rule for
   either of these - every template writes its own - so a template that forgets a
   cap gets whatever the picture is. Aurora forgot both: measured at a 748px
   viewport, a 427px opt-in image left 1 of 2 fields reachable and put the submit
   button at y=827, and a 466px outcome image pushed the title to y=659 with the
   description and button below the fold entirely.

   A floor, not a policy: every template that caps these on purpose says so in its
   own file at higher specificity and still wins - classic 200/256, elegant 200,
   cinematic 180 - so this only reaches the ones that said nothing. */
.sqp-lg-media-image img,
.sqp-oc-image img {
  /* THE FLOOR YIELDS TO A STATED HEIGHT. This cap is right for a template that
     never sized these pictures, and wrong for one that did: the Image panel
     writes el_imgh, the renderer emits it id-scoped as height:280px, and
     max-height clamps a height no matter how specific that height is or whether
     it carries !important - so a flat cap here silently resized five of the six
     templates. Measured on a 748px laptop: a stated 280 rendered at 239.

     --sqp-sp-el-imgh is the SAME el_imgh, already published per quiz, so this
     reads the author back rather than guessing. Aurora seeds it 0, and 0 is
     falsy in the emitter, so aurora publishes no var and keeps the fallback -
     which is exactly the template the cap was written for, the one whose 427px
     opt-in picture left 1 of 2 fields reachable. */
  max-height:var(--sqp-sp-el-imgh, min(280px, 32vh));
}
.sqp-fe-q-image img {
  /* FILL THE COLUMN. This was width:auto under a max-height, so a picture taller
     than the cap was scaled DOWN by its aspect ratio and the width came out
     wherever it landed: measured on the demo set, a 680px column holding a 255px
     image on lumen, a 450px column holding 340px on aurora, and 400px inside a
     744px one on modern. The wrapper was full width the whole time; only the img
     was not, so the picture read as a small centred thumbnail with the answers
     running wide underneath it.
     width:100% with object-fit:cover fills the column and crops vertically instead,
     which is what the split templates already do with their media panels. The height
     is the author's Image Height setting, and max-height keeps the viewport guard
     below so a short window still leaves something to choose in view. */
  width:100%; max-width:100%;
  height:var(--sqp-sp-el-imgh, 240px);
  object-fit:cover;
  /* min(), because a fixed cap is only half the problem: 340px leaves the answers
     below the fold on the templates that also carry deep outer padding - measured
     on elegant at 748px, 0 of 3 answers reachable without scrolling, and aurora at
     2 of 3. Tying it to the viewport as well means a short screen gets a shorter
     picture and keeps something to choose in view, while a tall one still gets the
     full 340. */
  max-height:var(--sqp-sp-q-img-max-h, min(340px, 38vh));
  border-radius:8px;
}
.sqp-fe-q-title { font-size:var(--sqp-sp-title-fs, 22px); font-weight:var(--sqp-sp-title-fw, 700); color:var(--sqp-sp-title-color, var(--sqp-secondary, #1a2b3c)); margin-bottom:var(--sqp-sp-title-mb, 8px); line-height:var(--sqp-sp-title-lh, 1.4); }
/* HEADINGS WRAP BETWEEN WORDS, AND BREAK ONE ONLY WHEN IT CANNOT FIT AT ALL (issue #33).
   A word is split only if it is wider than the whole line on its own; everything else
   moves to the next line intact. Never word-break:break-all, which splits ordinary
   words to fill a line. No hyphens:auto either: display type is not hyphenated, and in
   a narrow split-screen column it would chop words that fit perfectly well one line
   down. Sizes are the real fix; this only stops a very long word spilling out of its
   column. Colors and sizes stay with the template and the Title settings. */
.sqp-start-title, .sqp-fe-q-title, .sqp-lg-title, .sqp-oc-title,
.sqp-interstitial-title, .sqp-personalize-title, .sqp-tpl-title { overflow-wrap:break-word; word-break:normal; }
.sqp-fe-q-desc { font-size:var(--sqp-sp-desc-fs, 14px); font-weight:var(--sqp-sp-desc-fw, 400); color:var(--sqp-sp-desc-color, #666); margin-bottom:var(--sqp-sp-desc-mb, 20px); line-height:var(--sqp-sp-desc-lh, 1.6); }
/* The "What You Get" tick list a question carries over from the old builder's
   blocks (SQP_SQB_Migrator::question_block), ticked in the quiz's primary colour.
   Headings in a description are styled with the other copy blocks further down. */
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-desc ul.sqp-list-check { list-style:none; margin:6px 0 10px; padding:0; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-desc ul.sqp-list-check li { position:relative; margin:6px 0; padding-left:26px; list-style:none; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-desc ul.sqp-list-check li::before { content:''; position:absolute; left:0; top:.2em; width:16px; height:16px; border-radius:50%; background:var(--sqp-primary, #f05451); }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-desc ul.sqp-list-check li::after { content:''; position:absolute; left:5.5px; top:calc(.2em + 3px); width:4px; height:8px; border:solid var(--sqp-primary-text, #fff); border-width:0 2px 2px 0; transform:rotate(45deg); }

/* A question with no description ran its answers straight into the title: the
   only thing between them was the title's own 8px margin, where a described
   question gets the description's 20px. Give the undescribed case the same
   breathing room, off the same variable, so both read alike.
   Sibling margins collapse to the larger of the two, so this value has to
   clear --sqp-sp-title-mb to have any effect: it is the gap, not an addition
   to it. Cinematic solves the same thing on .sqp-q-tpl9 and keeps its own
   larger figure, since its rule is more specific than this one. */
/* The image now sits between the words and the options (question-slot.php), so it
   can be the element directly before the answers when a question has no description.
   Without this the gap collapsed on exactly those questions. */
.sqp-fe-q-title + .sqp-fe-answers,
.sqp-fe-q-image + .sqp-fe-answers { margin-top:var(--sqp-sp-desc-mb, 20px); }

/* Answer Grid Layouts */
.sqp-fe-answers { display:flex; flex-wrap:wrap; gap:var(--sqp-sp-ans-gap, 10px); margin-bottom:20px; }
.sqp-fe-layout-col1 .sqp-fe-answer { width:100%; }
/* min-width is a FLOOR, not a layout change. A column count is the author's choice, so
   at a normal card width nothing here moves: five across in a 556 column is 104px, and
   the floor is 88. It only bites where a tile would become unreadable: a five-across
   grid on a phone card is ~60px, and because the wrapper already wraps, those options
   drop onto another row instead of squeezing. col2 is left at 0: two across is wide
   enough to never need it, and a floor there could force a wrap on a narrow card where
   two columns still read fine. */
.sqp-fe-layout-col2 .sqp-fe-answer { width:calc((100% - 1 * var(--sqp-sp-ans-gap, 10px)) / 2); min-width:0; }
.sqp-fe-layout-col3 .sqp-fe-answer { width:calc((100% - 2 * var(--sqp-sp-ans-gap, 10px)) / 3); min-width:var(--sqp-ans-minw, 88px); }
.sqp-fe-layout-col4 .sqp-fe-answer { width:calc((100% - 3 * var(--sqp-sp-ans-gap, 10px)) / 4); min-width:var(--sqp-ans-minw, 88px); }
.sqp-fe-layout-col5 .sqp-fe-answer { width:calc((100% - 4 * var(--sqp-sp-ans-gap, 10px)) / 5); min-width:var(--sqp-ans-minw, 88px); }
/* A GRID FOLLOWS THE WIDTH IT IS GIVEN, NOT THE WINDOW'S (#32). The column count is
   the author's, but the width those columns share depends on the template. Cinematic
   puts the answers in half the screen, so four image answers at a 1024px window were
   88px cards with their labels cut off mid-word ("ally th", "sk each t"). The
   one-column phone rule below asks the viewport, which was still wide.
   The answers are their own container, so the grid answers for its own width: three to
   five columns become two under 600px, and every grid becomes one column under 360px.
   (0,4,0), which clears the templates' (0,3,0) column widths. It is also placed before
   the phone rule, which has the same specificity and so still wins below 768px.
   width:100% because inline-size containment ignores content: a grid that was
   shrink-to-fit would otherwise collapse. */
.sqp-fe-answers[class*="sqp-fe-layout-col"]:not(.sqp-fe-layout-col1) { container:sqp-answers / inline-size; width:100%; }
@container sqp-answers (max-width:600px) {
  .sqp-fe-question .sqp-fe-answers:is(.sqp-fe-layout-col3, .sqp-fe-layout-col4, .sqp-fe-layout-col5) > .sqp-fe-answer {
    width:calc((100% - var(--sqp-sp-ans-gap, 10px)) / 2); min-width:0;
  }
}
@container sqp-answers (max-width:360px) {
  .sqp-fe-question .sqp-fe-answers[class*="sqp-fe-layout-col"] > .sqp-fe-answer { width:100%; min-width:0; }
}
/* And a label wraps inside its card rather than being cut. Modern sizes its label to
   the text (flex:0 1 auto) and centres it in a card with overflow:hidden, so a word
   longer than the card lost both ends. min-width:0 lets the label narrow, and
   overflow-wrap breaks a word that still does not fit. */
.sqp-fe-answers[class*="sqp-fe-layout-col"] .sqp-fe-answer-text { min-width:0; overflow-wrap:anywhere; }

/* Answer Cards */
/* line-height is STATED, not inherited. Nothing in the plugin set it, so an answer
   took whatever the host theme put on body: 1.5 (27px at 18px) on this one, and the
   same quiz spaced its answers differently from theme to theme. That is most visible
   in a grid, where a label wraps: five across at 18px gave two lines 54px tall inside
   a 126px tile, with the two words pushed apart.
   1.25 suits what these actually hold: short labels of a word or three, not prose.
   Exposed as a var like every other answer property, so it can be overridden per quiz
   without editing this file. */
.sqp-fe-answer { display:flex; align-items:center; gap:10px; padding:12px 16px; background:var(--sqp-sp-ans-bg, #f1f5f9); border:var(--sqp-sp-ans-bdrw, 1.5px) solid var(--sqp-sp-ans-bdr, #e2e8f0); border-radius:var(--sqp-sp-bdr-r, 8px); cursor:pointer; transition:all .2s ease; font-size:var(--sqp-sp-ans-fs, 14px); line-height:var(--sqp-sp-ans-lh, 1.25); color:var(--sqp-sp-ans-text, #333); user-select:none; }
.sqp-fe-answer:hover { border-color:var(--sqp-sp-ans-bdrhv, var(--sqp-primary, #f05451)); background:var(--sqp-sp-ans-hvbg, #f8fafc); color:var(--sqp-sp-ans-hvtxt, var(--sqp-sp-ans-text, #333)); }
/* The selected tint must be OPAQUE. It was rgba(240,84,81,.06), which only reads as a
   pale pink while the answer sits on WHITE: it REPLACES the base rule's solid
   background, so on a template whose panel is dark or colored (cinematic's tan,
   aurora's navy) the panel showed through and the selected answer looked transparent
   with unreadable text. color-mix keeps the tint following --sqp-primary, and if a
   browser does not support it the whole declaration is dropped and the answer simply
   keeps its solid base background, still legible, just untinted. */
.sqp-fe-answer.sqp-selected { border-color:var(--sqp-sp-ans-selbdr, var(--sqp-sp-ans-bdrhv, var(--sqp-primary, #f05451))); background:var(--sqp-sp-ans-selbg, var(--sqp-sp-ans-hvbg, color-mix(in srgb, var(--sqp-primary, #f05451) 8%, #ffffff))); color:var(--sqp-sp-ans-seltxt, var(--sqp-sp-ans-hvtxt, var(--sqp-sp-ans-text, #333))); box-shadow:0 0 0 2px rgba(240,84,81,.15); }
/* "Other (free text)" field, revealed when its answer is selected. The answer is
   a flex ROW, so the field wraps onto its own line (flex-basis:100%) instead of
   squeezing the option's label. `cursor:text` and `user-select` undo what the
   answer card sets, or the field would look unusable and refuse selection. */
.sqp-fe-answer.sqp-fe-has-other { flex-wrap:wrap; }
.sqp-fe-other-input {
  flex:0 0 100%; width:100%; margin-top:8px; padding:9px 12px;
  border:1px solid var(--sqp-ctl-edge); border-radius:6px;
  background:#fff; color:inherit; font:inherit; font-size:.95em;
  cursor:text; user-select:text; box-sizing:border-box;
}
.sqp-fe-other-input:focus { outline:none; border-color:var(--sqp-sp-ans-bdrhv, var(--sqp-primary, #f05451)); }
/* .sqp-fe-answer.sqp-correct / .sqp-incorrect were ALSO defined here, in a different
   green and red and with translucent backgrounds. They were dead: the pair further
   down carries !important and always won, but a second definition of the same state
   is how the two ends of a file drift apart, and it is probably why that pair needed
   !important at all. One definition now; see "Correct answer highlight" below. */

/* ── Selection indicator ─────────────────────────────────────────────────────
   Per-question `ans_indicator`, emitted as .sqp-fe-ind-* on the answers wrapper.
   See docs/plans/2026-08-11-answer-selection-indicator.md.

   `auto` means letters, on every question type. It used to be the pre-setting
   behaviour: a box on multi, letters everywhere else, but that made it the only
   mode drawing two indicators at once. A box is now something you opt into with
   `check`. The other three let an author choose for ANY choice question,
   which also closes a gap: `sqp-fe-badge-hidden` is only emitted for image answers,
   so a text-only list previously had no way to drop its letters. */
/* `auto` no longer draws a box on multi: it is letters for every type now, and a box
   is what `check` is for. It used to be the ONE mode showing two indicators at once
   (the box AND the letter), which is what crowded a grid tile: five across gave a
   checkbox, a badge and the label in ~100px. The three explicit modes are unchanged,
   so an author who wants boxes picks `check` and gets exactly one indicator.
   Nothing keys off data-qtype here any more; the setting alone decides. */
/* The box IS its border: there is nothing else to see when it is unticked, so it
   takes the control edge rather than the answer border a template may have set
   transparent. Choosing Checkbox on modern drew an invisible tick box. */
.sqp-fe-ind-check .sqp-fe-answer::before { content:''; display:inline-block; width:18px; height:18px; border:2px solid var(--sqp-ctl-edge); border-radius:4px; flex-shrink:0; transition:all .2s; background:#fff; }
/* check: the box replaces the letter rather than joining it. */
.sqp-fe-answers.sqp-fe-ind-check .sqp-fe-answer-letter { display:none; }
/* letter: badge only, suppress the box even on multi. */
.sqp-fe-ind-letter .sqp-fe-answer::before { content:none; }
/* none: neither. The selected background and border carry the state on their own. */
.sqp-fe-ind-none .sqp-fe-answer::before { content:none; }
.sqp-fe-answers.sqp-fe-ind-none .sqp-fe-answer-letter { display:none; }
/* No letter badge from THREE columns up. The badge costs a fixed 32px plus its gap, and
   a tile only gets narrower as columns are added: at five across in a 556 column that
   is 42 of ~100px spent on an A/B/C, leaving too little for the label, which then
   overflowed and was clipped mid-word ("Just start", "Thre mon").
   One and two columns keep theirs: those tiles are wide enough for the badge to be a
   useful marker rather than a tax on the label.
   This wins over an explicit `ans_indicator: letter` deliberately, the setting says
   WHICH marker, this says there is no room for one. A checkbox is unaffected: it is a
   ::before on the answer, not this element, and costs 18px rather than 32.
   Prefixed with .sqp-fe-answers for (0,3,0), or the classic template's
   `.sqp-q-tpl4 .sqp-fe-answer-letter { display:flex }`, (0,2,0) but emitted later,
   would win the tie, as it has for every other rule that hides this badge. */
.sqp-fe-answers:is(.sqp-fe-layout-col3, .sqp-fe-layout-col4, .sqp-fe-layout-col5) .sqp-fe-answer-letter { display:none; }
/* The tick must be scoped exactly like the box above it. Left on the old
   `[data-qtype="multi"]` alone, `ind-check` on a single-choice question would draw a
   box that never ticks: the affordance without the feedback. */
.sqp-fe-ind-check .sqp-fe-answer.sqp-selected::before { background:var(--sqp-primary, #f05451); border-color:var(--sqp-primary, #f05451); background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L6.6 9.6l5.3-5.3a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E"); background-size:12px; background-position:center; background-repeat:no-repeat; }

/* ── Letter badge (A / B / C) ────────────────────────────────────────────────
   .sqp-fe-answer-letter is emitted on EVERY choice answer by the shortcode, but it
   had no base rule at all: only classic and aurora styled it and lumen hides it, so
   on modern, elegant and cinematic it rendered as a bare unstyled character sitting
   against the answer text, which reads as a typo, not an affordance.

   This is the base chip. It is DELIBERATELY low specificity (one class) so every
   template that already styles the badge keeps winning: classic's square chip and
   aurora's own treatment are untouched, and only the three that never styled it
   change. Verified by grepping each template for the selector before adding this.

   Color comes from the answer's own tokens rather than a literal, so the chip
   inherits whatever surface the template puts the answer on: the mistake that made
   modern's white-on-white answers unreadable was a literal that assumed one surface. */
.sqp-fe-answer-letter {
  flex-shrink:0; width:26px; height:26px;
  display:inline-flex; align-items:center; justify-content:center;
  /* NOT --sqp-sp-ans-bdr: a template is entitled to set that transparent, and
     modern does - the answer cards there are edged by their shadow. That left
     the badge with no border at all. Drawn from the answer ink instead, which
     is a hairline on any surface because it is the color already readable on
     it. And no opacity: .75 of the ink measured 2.84:1, so the letter it exists
     to show could not be read. */
  border:1.5px solid #cbd5e1;
  /* THE ANSWER INK AT 40%, where supported (owner, 2026-09-17: "A, B, C, D border
     color is not visible"). The fixed #cbd5e1 vanished on a pale tinted answer, the
     pink card on a red cinematic panel. A mix of the ink the letter is already
     written in is a visible edge on any surface that ink is readable on. */
  border-color:color-mix(in srgb, var(--sqp-sp-ans-text, #333) 40%, transparent);
  border-radius:6px;
  font-size:11px; font-weight:700; line-height:1;
  color:var(--sqp-sp-ans-text, #333);
  transition:background .2s, border-color .2s, color .2s;
}
/* THE BADGE IS WRITTEN IN THE SAME INK AS THE LABEL BESIDE IT. This rule only
   raised the opacity, so the letter kept --sqp-sp-ans-text while the label moved to
   --sqp-sp-ans-hvtxt. That was invisible for as long as no template hovered to a
   FILL: the moment one does, the row goes dark, the label goes light and the letter
   stays at the resting ink. Measured on elegant hovering to secondary, the badge was
   #333333 on #0f2e47: 1.11:1, i.e. gone, on the one element whose whole job is to
   show a letter.
   A no-op on every template whose hover ink equals its resting ink, which is most of
   them. The pale border is left alone: on a dark fill it reads as a chip edge, which
   is what classic already draws deliberately. */
.sqp-fe-answer:hover .sqp-fe-answer-letter { opacity:1; color:var(--sqp-sp-ans-hvtxt, var(--sqp-sp-ans-text, #333)); }
.sqp-fe-answer.sqp-selected .sqp-fe-answer-letter {
  background:var(--sqp-primary, #f05451);
  border-color:var(--sqp-primary, #f05451);
  color:var(--sqp-primary-text, #fff); opacity:1;
}
/* Shape override, per quiz (badge_shape). 'auto' emits no class and leaves the
   template's own look alone, which is why these are separate from the base.

   Carries .sqp-quiz-container as well as the modifier: (0,3,0), ON PURPOSE.
   classic styles the badge with `.sqp-q-tpl4 .sqp-fe-answer-letter` (0,2,0) and
   aurora likewise, and every template's <style> block is emitted inline AFTER this
   stylesheet, so a two-class selector here would LOSE on source order and the
   setting would silently do nothing on exactly the two templates that already have
   a badge worth reshaping. An author's explicit choice must outrank the template's
   default; the base rule above is left low so the reverse holds there. */
.sqp-quiz-container.sqp-badge-square .sqp-fe-answer-letter { border-radius:4px; }
.sqp-quiz-container.sqp-badge-circle .sqp-fe-answer-letter { border-radius:50%; }

/* Rating Scale */
.sqp-fe-rating { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px; justify-content:center; }
/* The words at each end of a rating, under its first and last button (question-slot.php). */
.sqp-fe-rating-ends { display:flex; justify-content:space-between; gap:12px; width:calc(var(--n, 5) * 56px - 8px); max-width:100%; margin:-12px auto 20px; font-size:13px; line-height:1.3; color:var(--sqp-sp-desc-color, #64748b); }
.sqp-fe-rating-ends span:last-child { text-align:right; }
/* padding:0 because this is a <button> and the THEME gets to it first. The rule
   asks for a 48x48 circle and says nothing about padding, so whatever the theme
   puts on `button` survives: Astra's 15px 30px measured here, and with
   box-sizing:border-box that forces the content box wider than the 48 asked for:
   63x48, an oval rather than a circle, and the more numbers in the scale the more
   obvious the drift. The glyph is centred by the flexbox, so there is nothing for
   padding to do on this control anyway. */
.sqp-fe-rating-btn { display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; padding:0; border-radius:50%; border:2px solid var(--sqp-ctl-edge); background:var(--sqp-sp-ans-bg, #fff); color:var(--sqp-sp-ans-text, #333); font-size:16px; font-weight:700; cursor:pointer; transition:all .2s; font-family:inherit; }
.sqp-fe-rating-btn:hover { border-color:var(--sqp-sp-ans-bdrhv, var(--sqp-primary, #f05451)); background:var(--sqp-sp-ans-hvbg, #f8fafc); color:var(--sqp-sp-ans-hvtxt, var(--sqp-sp-ans-text, #333)); transform:scale(1.1); }
.sqp-fe-rating-btn.sqp-selected { background:var(--sqp-primary, #f05451); color:var(--sqp-primary-text, #fff); border-color:var(--sqp-primary, #f05451); transform:scale(1.15); box-shadow:0 2px 10px rgba(0,0,0,.15); }

/* Dropdown */
.sqp-fe-dropdown-wrap { margin-bottom:20px; }
.sqp-fe-dropdown-label { display:block; font-size:14px; font-weight:600; color:var(--sqp-sp-desc-color, #555); margin-bottom:6px; }
.sqp-fe-dropdown { display:block; width:100%; max-width:400px; padding:12px 16px; font-size:15px; font-family:inherit; color:var(--sqp-sp-ans-text, #333); background:var(--sqp-sp-field-bg, var(--sqp-sp-ans-bg, #fff)); border:var(--sqp-sp-field-bdrw, var(--sqp-sp-ans-bdrw, 1.5px)) solid var(--sqp-sp-field-bdr, var(--sqp-sp-ans-bdr, #e2e8f0)); border-radius:var(--sqp-sp-field-r, var(--sqp-sp-bdr-r, 8px)); cursor:pointer; transition:border-color .2s; appearance:none; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23666' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:16px;
  /* !important, reluctantly, and only on this one declaration. The chevron is a
     background-image sitting 12px from the right edge, so the field has to keep
     that space clear or the selected option runs underneath it. Themes reach for
     `select { padding-right: … !important }` - Neve ships exactly that at 20px -
     and a plugin rule cannot outrank it however specific it is. Nothing else here
     is defended this way; a theme is welcome to restyle the rest of the field. */
  padding-right:36px !important; }
.sqp-fe-dropdown:focus { border-color:var(--sqp-primary, #f05451); outline:none; box-shadow:0 0 0 3px rgba(240,84,81,.1); }

/* Themes normalise form controls with a fixed `height` -- 40px is the common one --
   and these fields are sized by padding instead: 12px top and bottom around a 24px
   line, plus 1.5px of border each side, needs 50px. Held to 40 with `overflow:clip`
   the selected option was sliced through, which is what "the text is cut off" looks
   like. Declaring the initial value is enough to win: a theme sets this from a bare
   `select`/`input` selector, which a class outranks, so nothing here needs
   !important the way padding-right above does.
   The textarea is left alone: it is given a taller fixed height and scrolls. */
.sqp-fe-dropdown,
.sqp-fe-text-input,
.sqp-fe-fib-input { height:auto; }

/* Fill in Blank */
.sqp-fe-fib-wrap { margin-bottom:20px; }
.sqp-fe-fib-input { display:block; width:100%; max-width:500px; padding:12px 16px; font-size:15px; font-family:inherit; color:#333; background:var(--sqp-sp-field-bg, #fff); border:var(--sqp-sp-field-bdrw, var(--sqp-sp-ans-bdrw, 1.5px)) solid var(--sqp-sp-field-bdr, var(--sqp-sp-ans-bdr, #e2e8f0)); border-radius:var(--sqp-sp-field-r, var(--sqp-sp-bdr-r, 8px)); transition:border-color .2s; }
.sqp-fe-fib-input:focus { border-color:var(--sqp-primary, #f05451); outline:none; box-shadow:0 0 0 3px rgba(240,84,81,.1); }
.sqp-fe-fib-input.sqp-fib-correct { border-color:#10b981; background:rgba(16,185,129,.04); }
.sqp-fe-fib-input.sqp-fib-incorrect { border-color:#f05451; background:rgba(240,84,81,.04); }
.sqp-fe-fib-feedback { font-size:13px; font-weight:600; margin-top:6px; padding:4px 0; }
.sqp-fe-fib-feedback.sqp-fib-correct { color:#10b981; }
.sqp-fe-fib-feedback.sqp-fib-incorrect { color:#f05451; }

/* Input-Only Types (text, email, name, date, numerical_text, phone_number) */
.sqp-fe-input-wrap { margin-bottom:20px; }
/* FULL WIDTH, like every other way of answering. A 500px cap sat this field 134px
   short of the answer column on a 700px card, so a typed answer looked narrower than
   the multiple-choice options directly above it on the previous question: the same
   question, in the same card, in two different widths. Nothing about a single line of
   text needs a reading measure the options do not. The phone row already overrode this
   to `none` for its own layout, which is the same objection made once already. */
.sqp-fe-text-input { display:block; width:100%; max-width:100%; padding:12px 16px; font-size:15px; font-family:inherit; color:#333; background:var(--sqp-sp-field-bg, #fff); border:var(--sqp-sp-field-bdrw, var(--sqp-sp-ans-bdrw, 1.5px)) solid var(--sqp-sp-field-bdr, var(--sqp-sp-ans-bdr, #e2e8f0)); border-radius:var(--sqp-sp-field-r, var(--sqp-sp-bdr-r, 8px)); transition:border-color .2s; }
.sqp-fe-text-input::placeholder, .sqp-fe-fib-input::placeholder { color:var(--sqp-sp-field-placeholder, #a0aec0); }
.sqp-fe-text-input:focus { border-color:var(--sqp-primary, #f05451); outline:none; box-shadow:0 0 0 3px rgba(240,84,81,.1); }
.sqp-fe-text-input.sqp-input-error { border-color:#f05451; background:rgba(240,84,81,.04); }
.sqp-fe-date-input { max-width:280px; }

/* THE FIELDS PANEL, MADE TO STICK ON A REAL THEME.
   Every rule above targets the input by ONE class, which is specificity (0,1,0),
   and a theme styling its own forms writes `input[type="text"]` - (0,1,1), which
   wins. Astra does exactly that, and so does most of the catalogue, so the Style
   panel's Field Background, border and radius moved the editor preview (no theme
   there) and changed nothing on the live page. That is the whole of "design
   issue for color not showing same as in the admin" for form fields.
   Restated here through .sqp-quiz-container to reach (0,2,0), which clears a
   theme's attribute selectors without resorting to !important, and repeated for
   the select and the fill-in-the-blank input, which are styled by tag just as
   often. Paint only: widths, padding and layout stay where they are declared. */
.sqp-quiz-container .sqp-fe-text-input,
.sqp-quiz-container .sqp-fe-fib-input,
.sqp-quiz-container .sqp-fe-dropdown,
.sqp-quiz-container .sqp-fe-textarea,
/* The editor preview has the same problem from the other side: it is not inside
   a .sqp-quiz-container, and wp-admin/css/forms.css styles input[type="text"]
   with a white background and near-black text at the same (0,1,1). Without
   these three the fix would only have moved the mismatch, leaving the live page
   right and the preview wrong. */
.sqp-preview-quiz .sqp-fe-text-input,
.sqp-preview-quiz .sqp-fe-fib-input,
.sqp-preview-quiz .sqp-fe-dropdown,
.sqp-preview-quiz .sqp-fe-textarea {
  color:var(--sqp-sp-field-text, #333);
  background-color:var(--sqp-sp-field-bg, #fff);
  border-color:var(--sqp-sp-field-bdr, var(--sqp-sp-ans-bdr, #e2e8f0));
  border-width:var(--sqp-sp-field-bdrw, var(--sqp-sp-ans-bdrw, 1.5px));
  border-style:solid;
  border-radius:var(--sqp-sp-field-r, var(--sqp-sp-bdr-r, 8px));
}
.sqp-quiz-container .sqp-fe-text-input::placeholder,
.sqp-quiz-container .sqp-fe-fib-input::placeholder,
.sqp-quiz-container .sqp-fe-textarea::placeholder,
.sqp-preview-quiz .sqp-fe-text-input::placeholder,
.sqp-preview-quiz .sqp-fe-fib-input::placeholder,
.sqp-preview-quiz .sqp-fe-textarea::placeholder {
  color:var(--sqp-sp-field-placeholder, #a0aec0);
}
/* The error state is a warning and has to survive the block above. */
.sqp-quiz-container .sqp-fe-text-input.sqp-input-error {
  border-color:#f05451; background-color:rgba(240,84,81,.04);
}
/* Numerical with prefix/suffix */
/* align-items:STRETCH, not center: the addon and the input are two halves of ONE
   control, and they do not share a font-size or padding, so centring left the addon
   visibly shorter than the field it is attached to. Stretch makes both exactly the
   height of the row whatever their content metrics are. */
/* 200, not 320. This holds a number - usually one or two digits - and a short
   suffix, and at 320 the suffix sat a long way from the digits with a stretch of
   empty box between them, which reads as a field waiting for a sentence.
   The input keeps flex:1, so the suffix stays hard against it and the box grows
   only as far as it is allowed. */
.sqp-fe-numerical-row { display:flex; align-items:stretch; gap:0; max-width:200px; }
/* Border matched to the INPUT's, which means the FIELD variables, not the answer ones.
   The previous version read --sqp-sp-ans-bdrw and its comment claimed that was what the
   input read too. It is not: the input takes the shared `.sqp-fe-text-input` border, so
   on any quiz whose answer border differs from its field border the join drew as a step
   (measured 1.6px input against 0.8px addon on a classic quiz). Same fallback as the
   shared input rule, so an unstyled quiz keeps both sides identical. */
.sqp-fe-num-addon { display:flex; align-items:center; padding:0 14px; font-size:15px; font-weight:600; color:var(--sqp-sp-ans-text, #64748b); background:var(--sqp-sp-ans-bg, #f1f5f9); border:var(--sqp-sp-field-bdrw, 2px) solid var(--sqp-sp-field-bdr, #e2e8f0); white-space:nowrap; }
.sqp-fe-num-prefix { border-right:none; border-radius:var(--sqp-sp-bdr-r, 8px) 0 0 var(--sqp-sp-bdr-r, 8px); }
.sqp-fe-num-suffix { border-left:none; border-radius:0 var(--sqp-sp-bdr-r, 8px) var(--sqp-sp-bdr-r, 8px) 0; }
.sqp-fe-numerical-row .sqp-fe-num-input { max-width:none; flex:1; }
/* Square ONLY the edges an addon actually covers, and state it at (0,3,0).
   `border-radius:0` here was (0,2,0) and lost to the template rules that restyle
   `.sqp-fe-text-input` (aurora, lumen, modern each set their own radius, and a
   template's <style> comes after this file), so the input kept rounded corners on the
   side where the addon butts against it and the pair read as two separate boxes with a
   notch between them. The :not() pseudo-classes carry the extra weight; the outer
   corners are still left to the first/last-child rules below. */
.sqp-fe-numerical-row .sqp-fe-num-input:not(:first-child) { border-top-left-radius:0; border-bottom-left-radius:0; }
.sqp-fe-numerical-row .sqp-fe-num-input:not(:last-child) { border-top-right-radius:0; border-bottom-right-radius:0; }
/* Round whichever edge is actually on the OUTSIDE. `:only-child` was the only rule
   restoring any radius, and it cannot match once an addon exists, so a field with a
   suffix but no prefix (the common case) drew square left corners against nothing.
   first/last-child states the real rule: an addon rounds its own outer edge, and the
   input rounds any edge an addon is not covering. */
.sqp-fe-numerical-row .sqp-fe-num-input:first-child { border-top-left-radius:var(--sqp-sp-bdr-r, 8px); border-bottom-left-radius:var(--sqp-sp-bdr-r, 8px); }
.sqp-fe-numerical-row .sqp-fe-num-input:last-child { border-top-right-radius:var(--sqp-sp-bdr-r, 8px); border-bottom-right-radius:var(--sqp-sp-bdr-r, 8px); }
/* Phone with country code */
/* The dial code and the number are ONE field, so the chip must be cut from the same
   cloth as the input beside it. It was not: it styled itself from the ANSWER tokens
   while the field is painted by the `.sqp-fe-text-input` rule further down this file,
   which sets literals, not tokens, and wins on source order. So the two halves met
   with mismatched border widths, greys and corner sizes, and `align-items:center` left
   the chip at its content height (47px against the input's 54), stepping the seam.
   The shared look now lives in ONE declaration with `.sqp-fe-text-input` (search
   "Dial-code chip"); only the geometry that is genuinely the chip's own is set here.
   max-width matches the text input's 500 so a phone question lines up with every other
   typed answer, and `stretch` keeps the chip exactly as tall as the input. */
.sqp-fe-phone-row { display:flex; align-items:stretch; gap:0; max-width:500px; }
/* Square off only the edge that meets the chip, by zeroing the two left corners rather
   than restating a radius, so the field's own corner size stays the single source and
   these cannot drift from it. `border-left:none` removes the double line at the seam;
   the chip supplies that edge. */
/* Both class names, deliberately: that is what carries this to (0,3,0). A template
   is free to restyle `.sqp-fe-text-input`, and aurora, lumen and modern all do, each
   setting its own border and border-radius. Those rules are (0,2,0), the same weight
   this rule used to be, and a template's <style> is emitted AFTER the stylesheet, so
   they won on source order and put the input's rounded left corners and its own left
   border straight back: the chip ended up butted against a rounded, double-bordered
   edge. Nothing about the intent changed; only the weight. */
.sqp-fe-phone-row .sqp-fe-text-input.sqp-fe-phone-input { border-top-left-radius:0; border-bottom-left-radius:0; border-left:none; max-width:none; flex:1; }
/* Hide number input spinners */
.sqp-fe-num-input::-webkit-outer-spin-button, .sqp-fe-num-input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.sqp-fe-num-input { -moz-appearance:textfield; }

/* Slider */
/* No 500px cap. The slider is the answer control, so it should use the same measure
   as every other one: a hardcoded 500 inside a 556 content column left it stopping
   56px short of the question above it, with the end label and the Next button past
   its right edge. Anything narrower is what the Answer list width setting is for. */
.sqp-fe-slider-wrap { margin-bottom:20px; }
.sqp-fe-slider { -webkit-appearance:none; appearance:none; width:100%; height:6px; border-radius:3px; background:#e2e8f0; outline:none; cursor:pointer; }
.sqp-fe-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:22px; height:22px; border-radius:50%; background:var(--sqp-primary, #f05451); cursor:pointer; border:2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.2); transition:transform .15s; }
.sqp-fe-slider::-webkit-slider-thumb:hover { transform:scale(1.15); }
.sqp-fe-slider::-moz-range-thumb { width:22px; height:22px; border-radius:50%; background:var(--sqp-primary, #f05451); cursor:pointer; border:2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.2); }
.sqp-fe-slider-labels { display:flex; justify-content:space-between; align-items:center; margin-top:8px; font-size:13px; color:var(--sqp-sp-desc-color, #64748b); }
.sqp-fe-slider-value { font-weight:700; font-size:18px; color:var(--sqp-primary, #f05451); }

/* Matrix.
   The header cells used to be white-space:nowrap, so the grid could not wrap
   its way down to the width it had: a 3-option matrix ran off the edge of the
   card, half of it reachable only through a scrollbar most takers never notice.
   Two layouts from ONE set of markup now: a table while there is room for a
   grid, a stacked list of choices when there is not. Which one applies is
   MEASURED by the engine (setupMatrixFit), not keyed to a viewport breakpoint,
   because the quiz frame is routinely far narrower than the window: a
   template's own padding can leave ~270px of usable width on a 1400px desktop,
   where a @media query would still say "desktop, show the grid". */
.sqp-fe-input-matrix { min-width:0; }
/* WHY THERE IS NO SCROLL CUE HERE. A grid wider than its card scrolls sideways -
   the sizing below is intrinsic on purpose - and nothing on screen says so, which
   is a real gap: a five-column matrix in a narrow panel shows four columns and a
   clean edge, so the fifth option looks like it does not exist.

   The usual fix is the scroll-shadow trick: two opaque layers painted over each
   end that scroll WITH the content, cancelling two fixed shadow layers. It was
   tried and reverted, because those layers have to be painted in the color of
   whatever is behind the table, and that differs per template and per screen -
   cinematic puts its matrix on a dark panel, so a light surface layer left a pale
   block sitting under the last row. A cue that is wrong on half the templates is
   worse than no cue, and there is no way to ask CSS what color is behind you.

   Worth solving properly: the engine already measures whether the grid fits (see
   --sqp-mx-colw), so it is the right place to add a class when it does not, and
   a cue keyed to that class can take its color from the template. */
.sqp-fe-matrix-scroll { overflow-x:auto; max-width:100%; margin-bottom:20px; }
/* THE CUE, ONLY WHEN THERE IS SOMEWHERE TO SCROLL. .sqp-mx-overflows and
   --sqp-mx-surface are both set by evenMatrixColumns() in sqp-frontend.js, which
   has just measured the columns and so is the one place that knows whether they
   fit - and which reads the real color behind the table rather than guessing it.
   That is the part a stylesheet cannot do, and getting it wrong is what left a
   pale block under the last row when this was first attempted.

   The two `local` layers are that surface, painted over each end and scrolling
   WITH the content, so they cover the shadow when there is nothing more that way.
   The two `scroll` layers are the shadow, fixed to the box. They cancel at the
   ends and show in the middle, so the hint appears and fades on its own. */
.sqp-fe-matrix-scroll.sqp-mx-scroll {
  background:
    /* --sqp-mx-cue-h is the TABLE's height, set in fitMatrix. 100% is the wrap's,
       and the wrap is taller: it carries the horizontal scrollbar and a few px of
       padding below the grid. The cue was painting its surface color down that
       strip too, which on a translucent card showed as a grey tail hanging below
       the last row. Falls back to 100% where the variable has not been set. */
    linear-gradient(to right, var(--sqp-mx-surface, #fff) 42%, transparent) left top / 32px var(--sqp-mx-cue-h, 100%) no-repeat local,
    linear-gradient(to left,  var(--sqp-mx-surface, #fff) 42%, transparent) right top / 32px var(--sqp-mx-cue-h, 100%) no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15,23,42,.34), transparent) left top / 18px var(--sqp-mx-cue-h, 100%) no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15,23,42,.34), transparent) right top / 18px var(--sqp-mx-cue-h, 100%) no-repeat scroll;
}
/* Intrinsic sizing, deliberately: a table refuses to squeeze narrower than its
   longest WORD, so "does the grid fit" is a question the browser answers
   exactly and the engine only has to read. A fixed layout with a guessed
   per-column minimum got it wrong in both directions: it broke "Strongly"
   into "Strong / ly" while still claiming the grid fitted. For the same reason
   nothing here may set overflow-wrap:break-word: that would let a column
   shrink through its own words and hide the overflow the measurement needs. */
.sqp-fe-matrix { width:100%; border-collapse:collapse; border-spacing:0; border:0; margin:0; font-size:14px; }
/* The THEME's table rules (Astra: `table, td, th { border:1px solid }`) leaked into the grid: a
   frame on two sides only and a line on every cell. Reset here; the grid's own lines below win. */
.sqp-fe-matrix th, .sqp-fe-matrix td { border:0; }
/* Option headers NEVER wrap, in every mode. Letting them break at spaces is what
   produced "Not / at / all" stacked three deep beside a single-line "Rarely": a
   ragged header that is harder to scan than any amount of scrolling, and it happened
   most at WIDE viewports, where the table technically fitted so nothing intervened.
   The row label is deliberately left wrapping: it has a column of its own and a long
   statement there should use it. */
.sqp-fe-matrix th { padding:10px 12px; font-weight:600; font-size:13px; color:var(--sqp-secondary, #0f2e47); text-align:center; border-bottom:2px solid #e2e8f0; white-space:nowrap; }
.sqp-fe-matrix td { padding:10px 12px; text-align:center; }

/* Even option columns. --sqp-mx-colw is MEASURED by the engine as the widest option
   label, then applied to every option column, so a one-word option gets the same width
   as a three-word one instead of each shrinking to its own content. Without it the grid
   reads as randomly spaced, because a table sizes each column independently. */
.sqp-fe-matrix th:not(:first-child),
.sqp-fe-matrix td:not(:first-child) { min-width:var(--sqp-mx-colw, auto); }

/* Grid lines. There were none between columns and the row rule was #f1f5f9, which is
   almost invisible on a white card and completely invisible on a tinted one, so a
   10-column grid was a field of loose circles with nothing tying each to its row or its
   heading. Kept faint: they are there to guide the eye across a row, not to draw a
   spreadsheet. currentColor at low alpha so they hold up on dark templates too, where a
   fixed grey either disappears or glares. */
.sqp-fe-matrix tbody td { border-bottom:1px solid rgba(128,128,128,.22); }
.sqp-fe-matrix tbody tr:last-child td { border-bottom:none; }
.sqp-fe-matrix th + th,
.sqp-fe-matrix td + td { border-left:1px solid rgba(128,128,128,.16); }
.sqp-fe-matrix-row-label { text-align:left !important; font-weight:500; color:var(--sqp-sp-ans-text, #333); }
.sqp-fe-matrix tbody tr:hover { background:#f8fafc; }
/* 22, not 28. At 28 with a 2px ring these read as buttons rather than radios and
   sat heavier than the row labels beside them. */
.sqp-fe-matrix-cell { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0; border-radius:50%; border:2px solid #b9c2d0; border-color:color-mix(in srgb, var(--sqp-sp-ans-text, #333) 38%, transparent); background:#fff; cursor:pointer; transition:all .2s; }
/* ::before is the inner dot; ::after carries the option's name for the stacked
   layout, where there is no header row to read it from. */
.sqp-fe-matrix-cell::before { content:''; display:block; width:7px; height:7px; border-radius:50%; background:transparent; }
.sqp-fe-matrix-cell::after { content:attr(data-col-text); display:none; }
/* THE WHOLE CELL IS THE TARGET, not the 22px circle inside it. The button IS the
   circle, so a table cell several times its size was mostly dead space and the
   answer only took if you hit the ring. The hit area is widened in the engine
   (a click on the td is forwarded to its button) rather than by stretching the
   button, which would mean rebuilding the circle out of a pseudo-element and
   redoing the selected and hover states with it. This is the cursor half. */
.sqp-fe-matrix tbody td:has(> .sqp-fe-matrix-cell) { cursor:pointer; }
.sqp-fe-matrix tbody td:has(> .sqp-fe-matrix-cell):hover .sqp-fe-matrix-cell:not(.sqp-selected) { border-color:var(--sqp-primary, #f05451); }
.sqp-fe-matrix-cell:hover { border-color:var(--sqp-primary, #f05451); background:rgba(240,84,81,.06); }
.sqp-fe-matrix-cell.sqp-selected { background:var(--sqp-primary, #f05451); border-color:var(--sqp-primary, #f05451); }
.sqp-fe-matrix-cell.sqp-selected::before { background:#fff; }

/* Scrolling grid: the middle setting between "it fits" and "give up and stack".
   A 10-point scale is a real thing to ask, and stacking it turns 5 rows into 50
   full-width choices: a page of near-identical buttons with no scale to read
   them against. Kept as a grid, scrolled sideways, with the row label PINNED so
   you can always see which row you are answering.

   Nothing here sets a per-column min-width. The block above explains why: the
   table is measured by its own intrinsic width, and a guessed minimum got the
   fit wrong in both directions. A 10-column numeric scale still fits outright
   and never reaches this mode.

   width:max-content lets the table take its natural width and overflow the
   wrapper, which is what produces the scrollbar; min-width:100% stops a table
   narrower than the wrapper from sitting in a short column when it gets here. */
.sqp-fe-matrix-scroll.sqp-mx-scroll { overflow-x: auto; padding-bottom: 4px; }
.sqp-mx-scroll .sqp-fe-matrix { width: max-content; min-width: 100%; }
/* (Header nowrap now lives on `.sqp-fe-matrix th` itself: it applies in every mode,
   because the wrapping showed up mostly in the FITTING one. See the base rule above.) */
.sqp-mx-scroll .sqp-fe-matrix th:first-child,
.sqp-mx-scroll .sqp-fe-matrix-row-label {
  position: sticky; left: 0; z-index: 2;
  /* --sqp-mx-sticky-bg is MEASURED by the engine off the nearest opaque
     ancestor, not taken from a style token. The cell has to be opaque or the
     scrolled columns show straight through it, and the surface behind it is
     whatever the template paints: cream on classic, dark on aurora, so a
     literal white would be wrong on most of them. */
  background: var(--sqp-mx-sticky-bg, #fff);
  box-shadow: 1px 0 0 rgba(0, 0, 0, .08);
}
/* The row-hover tint is painted on the <tr>, which the sticky cell covers, so
   without this the pinned column is the one part of the row that never lights up. */
.sqp-mx-scroll .sqp-fe-matrix tbody tr:hover .sqp-fe-matrix-row-label { background: #f8fafc; }

/* The scrollbar is the affordance, so it is drawn rather than left to the OS:
   macOS overlay scrollbars are invisible until you are already scrolling, which
   is too late to tell you there is more to see. Giving it a height opts into a
   classic always-visible bar. */
.sqp-mx-scroll { scrollbar-width: thin; scrollbar-color: #b6c0cc transparent; }
.sqp-mx-scroll::-webkit-scrollbar { height: 10px; }
.sqp-mx-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, .05); border-radius: 5px; }
.sqp-mx-scroll::-webkit-scrollbar-thumb { background: #b6c0cc; border-radius: 5px; }
.sqp-mx-scroll::-webkit-scrollbar-thumb:hover { background: var(--sqp-primary, #f05451); }
/* Stacked: one block per row, its options as full-width choices. The table
   ELEMENTS are kept and re-laid-out as blocks rather than swapped for divs, so
   bindMatrix()'s closest('tr') lookup for the row label keeps working. */
.sqp-fe-matrix-scroll.sqp-mx-stacked { overflow-x:visible; }
.sqp-mx-stacked .sqp-fe-matrix { display:block; border:0; }  /* the grid's frame drew a stray line down the left of the stacked list */
.sqp-mx-stacked .sqp-fe-matrix thead { display:none; }
.sqp-mx-stacked .sqp-fe-matrix tbody { display:block; }
.sqp-mx-stacked .sqp-fe-matrix tbody tr { display:block; margin-bottom:18px; }
.sqp-mx-stacked .sqp-fe-matrix tbody tr:last-child { margin-bottom:0; }
.sqp-mx-stacked .sqp-fe-matrix tbody tr:hover { background:none; }
/* break-word is safe here and forbidden in the table above: nothing competes
   for the width, so a single unbreakably long label wraps instead of running
   off the card. */
/* border:0 also clears the grid lines, and min-width:0 releases the measured column
   width: there are no columns left to keep even here, and a 120px minimum on a block
   cell would push the list off a narrow card. */
.sqp-mx-stacked .sqp-fe-matrix td { display:block; padding:0; border:0; min-width:0; text-align:left; overflow-wrap:break-word; }
.sqp-mx-stacked .sqp-fe-matrix th { white-space:normal; }
/* !important beats the author's inline width %, which would squeeze the label
   into a column that no longer exists. */
.sqp-mx-stacked .sqp-fe-matrix-row-label { width:auto !important; min-width:0 !important; font-weight:600; margin-bottom:8px; }
.sqp-mx-stacked .sqp-fe-matrix-cell {
  display:flex; justify-content:flex-start; gap:10px; width:100%; height:auto;
  padding:9px 12px; margin-bottom:6px; border-radius:var(--sqp-sp-bdr-r, 8px);
  font:inherit; font-size:14px; color:var(--sqp-sp-ans-text, #333); text-align:left;
  /* The same card as an ordinary answer, not the grid circle's 2px grey ring blown up
     to a box (owner review, 2026-10-07). */
  border:var(--sqp-sp-ans-bdrw, 1.5px) solid var(--sqp-sp-ans-bdr, #e2e8f0); background:var(--sqp-sp-ans-bg, #fff);
}
.sqp-mx-stacked .sqp-fe-matrix-cell::before { flex:none; box-sizing:border-box; width:16px; height:16px; border:2px solid var(--sqp-ctl-edge); background:#fff; }
.sqp-mx-stacked .sqp-fe-matrix-cell::after { display:block; }
.sqp-mx-stacked .sqp-fe-matrix-cell.sqp-selected { background:rgba(240,84,81,.06); border-color:var(--sqp-primary, #f05451); }
.sqp-mx-stacked .sqp-fe-matrix-cell.sqp-selected::before { background:var(--sqp-primary, #f05451); border-color:var(--sqp-primary, #f05451); box-shadow:inset 0 0 0 3px #fff; }

/* Matching Text */
.sqp-fe-match-sentence { font-size:16px; line-height:2; margin-bottom:16px; color:#333; }
.sqp-fe-match-blank { display:inline-block; min-width:80px; padding:4px 12px; border-bottom:2px dashed var(--sqp-primary, #f05451); color:var(--sqp-primary, #f05451); font-weight:600; text-align:center; vertical-align:baseline; min-height:28px; transition:all .2s; cursor:pointer; }
.sqp-fe-match-blank.sqp-drag-over { background:rgba(240,84,81,.08); border-color:var(--sqp-primary, #f05451); border-style:solid; }
.sqp-fe-match-words { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.sqp-fe-match-word { display:inline-block; padding:6px 14px; background:var(--sqp-sp-ans-bg, #f1f5f9); border:1.5px solid var(--sqp-sp-ans-bdr, #e2e8f0); border-radius:20px; font-size:14px; font-weight:500; color:var(--sqp-sp-ans-text, #333); cursor:grab; user-select:none; transition:all .2s; }
.sqp-fe-match-word:hover { border-color:var(--sqp-primary, #f05451); background:#fff; }
.sqp-fe-match-word.sqp-dragging { opacity:.4; }
.sqp-fe-match-word.sqp-word-active { border-color:var(--sqp-primary, #f05451); background:rgba(240,84,81,.06); box-shadow:0 0 0 2px rgba(240,84,81,.15); }

/* Ranking */
.sqp-fe-ranking-list { margin-bottom:20px; }
/* THE ONE ANSWER ROW THAT NEVER SAID HOW BIG ITS TEXT WAS. This takes every other
   answer token - background, border, radius - but had no font-size, so the label
   inherited whatever wrapped it. On this site that is 16px and looks fine; under a
   theme with a larger base it renders far bigger than the options on every other
   question, which is what a reader notices. Same token .sqp-fe-answer uses, so it
   now follows Style bar -> Answer -> Font Size like the rest of them. */
.sqp-fe-ranking-item { display:flex; align-items:center; gap:10px; padding:12px 14px; font-size:var(--sqp-sp-ans-fs, 14px); background:var(--sqp-sp-ans-bg, #fff); border:var(--sqp-sp-ans-bdrw, 1.5px) solid var(--sqp-sp-ans-bdr, #e2e8f0); border-radius:var(--sqp-sp-bdr-r, 8px); margin-bottom:6px; cursor:grab; user-select:none; transition:all .2s; }
.sqp-fe-ranking-item:hover { border-color:var(--sqp-sp-ans-bdrhv, var(--sqp-primary, #f05451)); background:var(--sqp-sp-ans-hvbg, #f8fafc); }
.sqp-fe-ranking-item.sqp-dragging { opacity:.4; }
.sqp-fe-ranking-item.sqp-rank-lifted { border-color:var(--sqp-primary, #f05451); border-style:dashed; box-shadow:0 2px 8px rgba(0,0,0,.12); cursor:grabbing; }
.sqp-fe-ranking-item.sqp-drag-over { border-color:var(--sqp-primary, #f05451); border-style:dashed; }
.sqp-fe-ranking-handle { color:var(--sqp-sp-ans-text, #64748b); font-size:16px; flex-shrink:0; cursor:grab; }
.sqp-fe-ranking-pos { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:var(--sqp-primary, #f05451); color:#fff; font-size:13px; font-weight:700; flex-shrink:0; }
.sqp-fe-ranking-text { font-weight:500; color:var(--sqp-sp-ans-text, #333); }

/* File Upload */
.sqp-fe-file-label { display:flex; align-items:center; gap:12px; cursor:pointer; margin-bottom:6px; }
.sqp-fe-file-input { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.sqp-fe-file-btn { display:inline-flex; align-items:center; padding:10px 20px; background:var(--sqp-primary, #f05451); color:var(--sqp-primary-text, #fff); border-radius:var(--sqp-sp-bdr-r, 8px); font-size:14px; font-weight:600; transition:opacity .2s; cursor:pointer; }
.sqp-fe-file-btn:hover { opacity:.9; }
.sqp-fe-file-name { font-size:14px; color:#64748b; }
.sqp-fe-file-error { font-size:13px; color:#f05451; font-weight:500; margin-top:4px; }
.sqp-fe-file-hint { font-size:12px; color:var(--sqp-sp-desc-color, #64748b); margin-top:4px; }

/* Weight & Height */
.sqp-fe-wh-group { margin-bottom:14px; }
.sqp-fe-wh-label { display:block; font-size:14px; font-weight:600; color:var(--sqp-sp-desc-color, #555); margin-bottom:6px; }
.sqp-fe-wh-row { display:flex; gap:10px; }
.sqp-fe-wh-row .sqp-fe-wh-input { max-width:160px; }
.sqp-fe-wh-error { font-size:13px; color:#f05451; font-weight:500; margin-top:4px; }
/* Number Input range message: same treatment as the weight/height one. */
.sqp-fe-num-error { font-size:13px; color:#f05451; font-weight:500; margin-top:4px; }
/* The generic "why the screen refused" line, created by the engine on demand
   (see showFieldError). Sized and colored to match the three per-type error
   lines above, so a required-field refusal and a min/max refusal read the
   same. --sqp-red is not used: this is quiz chrome, and the frontend has no
   admin token here. */
.sqp-fe-req-error { font-size:13px; color:#f05451; font-weight:500; margin:8px 0 0; text-align:left; }
/* Keyboard reordering and word matching: these are spans and divs the engine
   promotes to role=button, so they need a focus ring of their own. */
.sqp-fe-match-word:focus-visible,
.sqp-fe-match-blank:focus-visible,
.sqp-fe-ranking-item:focus-visible { outline:2px solid var(--sqp-primary, #f05451); outline-offset:2px; }

/* Lead-gen refusals. The form used to reject with a red border and no words,
   which reads as a broken button rather than as something the visitor can fix. */
.sqp-quiz-container .sqp-lg-error {
  font-size:13px; color:#f05451; font-weight:500; margin-top:8px; text-align:center;
}
.sqp-quiz-container .sqp-lg-consent-error { outline:1px solid #f05451; outline-offset:3px; border-radius:4px; }

/* Answer Image */
.sqp-fe-answer-img { flex-shrink:0; overflow:hidden; border-radius:6px; }
/* Image side (list layout only: the grid layouts stack the image above the text,
   where there is no side to pick). Order alone moves the image past the text; the
   auto margin is what pins it to the card's far edge, since the text ahead of it
   is not wide enough to push it there on its own.
   margin-right:0 because classic spaces its picture from the label with a
   margin-right of 12px; on the right that margin lands between the picture and the
   card's edge instead, and the picture sat 12px further in than the row's padding. */
.sqp-fe-imgpos-right.sqp-fe-layout-col1 .sqp-fe-answer-img { order:100; margin-left:auto; margin-right:0; }
.sqp-fe-answer-img img { width:100%; height:100%; display:block; }
/* A grid tile stacks, but the LETTER BADGE belongs beside the label, not on a line of
   its own. `flex-direction:column` put all three children: image, badge, label, on
   separate rows, so a tile read as three stacked blocks with the badge marooned in the
   middle. `row wrap` plus a full-width image gives the same stack for the image while
   letting the badge and the label share the row beneath it.
   The label is `flex:0 1 auto` (it is `1 1 0` in a list, where it should fill): at
   `1 1 0` in a row it would eat the free space and shove the badge off centre. */
/* Left-aligned, matching the single-column list. This is hardcoded for now: there is no
   left/centre/right setting for answer content anywhere in the plugin (logo_align,
   analyzing_align, tmpl_align and content_valign all align OTHER things), and adding
   one means an admin control, which is on hold.
   See docs/plans/2026-08-18-answer-content-alignment.md, when that setting lands, this
   pair of declarations becomes its `left` case rather than the only behaviour. */
.sqp-fe-layout-col2 .sqp-fe-answer, .sqp-fe-layout-col3 .sqp-fe-answer, .sqp-fe-layout-col4 .sqp-fe-answer, .sqp-fe-layout-col5 .sqp-fe-answer { flex-flow:row wrap; justify-content:flex-start; align-items:center; text-align:left; padding:16px 10px; }
/* Prefixed with .sqp-fe-answers to reach (0,3,0). `:is()` takes the specificity of its
   most specific argument, so the bare form was (0,2,0): an exact tie with the classic
   template's `.sqp-q-tpl4 .sqp-fe-answer-text { flex:1 1 0 }`, whose inline <style> is
   emitted after this file and therefore won. The label then still grew to fill the row
   and pushed the badge onto its own line on the narrower tiles. Same tie that had been
   defeating the letter-badge rules further up. */
.sqp-fe-answers:is(.sqp-fe-layout-col2, .sqp-fe-layout-col3, .sqp-fe-layout-col4, .sqp-fe-layout-col5) .sqp-fe-answer-img { flex:0 0 100%; }
/* `1 1 0`, not `0 1 auto`. With an auto basis the label's natural width is its flex base
   size, so a label wider than the space left beside the box got pushed onto a new line
   BEFORE flex would shrink it: short labels sat next to the box and long ones dropped
   under it, in the same grid. A zero basis never forces that wrap: the label takes
   whatever room is left and wraps its own text instead, exactly as it does in a
   single-column list.
   `min-width:0` because a flex item's automatic minimum is its min-content width, which
   would stop it shrinking and let a long word push the tile wide. */
.sqp-fe-answers:is(.sqp-fe-layout-col2, .sqp-fe-layout-col3, .sqp-fe-layout-col4, .sqp-fe-layout-col5) .sqp-fe-answer-text { flex:1 1 0; min-width:0; }
/* A GRID CARD IS NOT A STACKED PILL, so it does not want the same corner.
   `bdr_r` is one value for every layout: 40px reads as the pill the reference
   designs use for a full-width row, and the same 40px on a 191px card rounds the
   corners so hard that a square photo inside pokes out past them.
   `bdr_r_grid` is the author's own control for the grid case (emitted by
   buildStyleCSS like every other style key). Unset, it falls back to whichever is
   SMALLER: their radius, or 14px, so an author who has chosen a modest radius
   keeps exactly what they chose and only the pill-sized values are brought in.
   overflow:hidden makes the image clip to that corner instead of overhanging it. */
.sqp-fe-layout-col2 .sqp-fe-answer,
.sqp-fe-layout-col3 .sqp-fe-answer,
.sqp-fe-layout-col4 .sqp-fe-answer,
.sqp-fe-layout-col5 .sqp-fe-answer {
  border-radius:var(--sqp-sp-bdr-r-grid, min(var(--sqp-sp-bdr-r, 8px), 14px));
  overflow:hidden;
}
/* The column flip above lives in the Answer Image section and exists so a picture can
   sit ABOVE its label, but the selector is not scoped to image lists, so it also
   applies to a plain text grid. On a MULTI question that turned the checkbox (a
   ::before, therefore the first flex item) into its own stacked line, giving three
   centred rows per option:  ☐ / A / Bolivia.
   Restored to a horizontal row for that case only. Deliberately narrow: a grid WITH
   images keeps its stack: there the stacking is the point, so `:not([class*="imgsize"])`
   excludes them.
   Scoped to wherever a BOX is actually drawn, not to the question type: once
   `ans_indicator: check` can put one on a single-choice question, that question would
   stack in a grid too. The two halves of this selector are the same pair that draws
   the box above, so they cannot drift apart. */
.sqp-fe-ind-check:not([class*="imgsize"]):is(.sqp-fe-layout-col2, .sqp-fe-layout-col3, .sqp-fe-layout-col4, .sqp-fe-layout-col5) .sqp-fe-answer {
  flex-direction:row; align-items:center; text-align:left; padding:12px 14px;
}
.sqp-fe-answer-text { font-weight:500; }

/* ── Image Size ────────────────────────────── */
/* col1 (list) sizes.
   KNOWN LIMITATION, QA sheet TPL-18: on a SINGLE-COLUMN answer list the Answer Image
   aspect-ratio setting has no effect. A fixed width plus a fixed height makes
   `aspect-ratio` inert, so square / 4:3 / 16:9 all render at the size below while the
   .sqp-fe-aspect-* rule further down correctly declares 1/1, 4/3, 16/9. It works in
   col2-5, where the grid rules leave height:auto, which is why TPL-17 passed (that
   quiz uses col2).
   Removing the height HERE is not sufficient and was tried: the height is pinned in
   three places: this block, `.sqp-q-tpl4 .sqp-fe-answer-img` in
   templates/classic/questions.php, and lumen's own col1 rules in
   templates/lumen/questions.php. Dropping only this one lets the template's value take
   over (measured 80x48 instead of 80x64), which is a visible change with no benefit.
   Making the aspect setting outrank every template's deliberate answer-image sizing is
   a cross-template design decision, so it is left for the owner rather than forced. */
/* A LIST THUMBNAIL SITS INSIDE THE ROW'S PADDING (owner, 2026-09-17: "the text is
   touching the edges"). On 2026-08-28 the picture was made to meet the row's edges by
   zeroing the row's top, bottom and left padding. Two things went wrong with that:
   - the zeroing was on EVERY row of an image list, so an answer with no picture in the
     same question ("None of the above") lost its padding too and its label started on
     the card's border - 22px tall on elegant, text 0px from the left edge;
   - the picture ended up hard against the border with a squared corner, which reads
     as clipped rather than as a design, and on lumen (whose thumbnail has a fixed
     height) it sat in the top-left corner with a strip of card underneath.
   So nothing here touches the row's padding any more: each template's own answer
   padding applies to an image row exactly as it does to a text row (base 12x16,
   classic 15x17 less its border, modern 16x18/24, aurora 13x15, lumen 12x16, the
   popups' own), and the picture keeps the template's own small corner (base 6px,
   classic 4, aurora 5, lumen 8). An imageless answer in the same list is then an
   ordinary padded row, its label on the same left edge as the pictures above it.
   Lumen's LARGE size is the one deliberate exception, and it is lumen's own rule:
   that card bleeds its picture to the card's edge with a negative margin equal to the
   row's padding. With the padding zeroed that margin pushed the picture 16px past
   the edge and clipped it; with the padding back it lands on the edge as designed.
   The height stays a MINIMUM and the picture stretches with the row, so a label that
   wraps to several lines still gets a picture as tall as the text beside it rather
   than a short one with a gap above and below. */
.sqp-fe-imgsize-small.sqp-fe-layout-col1 .sqp-fe-answer-img { width:48px; min-height:40px; height:auto; align-self:stretch; }
.sqp-fe-imgsize-medium.sqp-fe-layout-col1 .sqp-fe-answer-img { width:80px; min-height:64px; height:auto; align-self:stretch; }
.sqp-fe-imgsize-large.sqp-fe-layout-col1 .sqp-fe-answer-img { width:120px; min-height:96px; height:auto; align-self:stretch; }
/* col2-5 (grid) sizes */
.sqp-fe-imgsize-small:not(.sqp-fe-layout-col1) .sqp-fe-answer-img { width:64px; height:64px; margin:0 auto; }
.sqp-fe-imgsize-medium:not(.sqp-fe-layout-col1) .sqp-fe-answer-img { width:100%; height:auto; }
.sqp-fe-imgsize-medium:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img { height:120px; }
.sqp-fe-imgsize-large:not(.sqp-fe-layout-col1) .sqp-fe-answer-img { width:100%; height:auto; }
.sqp-fe-imgsize-large:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img { height:200px; }

/* ── Image Fit ─────────────────────────────── */
.sqp-fe-imgfit-cover .sqp-fe-answer-img img { object-fit:cover; }
.sqp-fe-imgfit-contain .sqp-fe-answer-img img { object-fit:contain; }

/* ── Aspect Ratio ──────────────────────────── */
.sqp-fe-aspect-square .sqp-fe-answer-img { aspect-ratio:1/1; }
/* landscape / portrait are the names the EDITOR stores. They had no rule here, so
   two of the three ratios the editor offered were inert on the live quiz while its
   own preview showed them working. 4-3 and 16-9 stay as the frontend's own spellings
   so anything already storing them keeps rendering. */
.sqp-fe-aspect-landscape .sqp-fe-answer-img { aspect-ratio:4/3; }
.sqp-fe-aspect-portrait .sqp-fe-answer-img { aspect-ratio:3/4; }
.sqp-fe-aspect-4-3 .sqp-fe-answer-img { aspect-ratio:4/3; }
.sqp-fe-aspect-16-9 .sqp-fe-answer-img { aspect-ratio:16/9; }
.sqp-fe-aspect-auto .sqp-fe-answer-img { aspect-ratio:auto; }
/* When aspect is set, let height follow the ratio.
   Covers the LIST layout, where nothing else sets a height on the img. */
.sqp-fe-aspect-square .sqp-fe-answer-img img,
.sqp-fe-aspect-landscape .sqp-fe-answer-img img,
.sqp-fe-aspect-portrait .sqp-fe-answer-img img,
.sqp-fe-aspect-4-3 .sqp-fe-answer-img img,
.sqp-fe-aspect-16-9 .sqp-fe-answer-img img { height:100%; }

/* A STATED RATIO BEATS A SIZE PRESET'S FIXED HEIGHT. The preset rules pin the image
   at 120px (medium) or 200px (large) and they carry :not(), whose argument counts
   toward specificity - so at (0,3,0) they outranked the (0,2,0) height:100% above and
   a picture asked to be 16:9 stayed 120px tall inside a 16:9 box. The wrapper keeps
   its ratio, so the image simply fills it.

   Height auto on the WRAPPER too: medium and large both set height:auto already, but
   small states 64px, and a stated ratio should win over that as well. */
.sqp-fe-aspect-square:not(.sqp-fe-layout-col1) .sqp-fe-answer-img,
.sqp-fe-aspect-landscape:not(.sqp-fe-layout-col1) .sqp-fe-answer-img,
.sqp-fe-aspect-portrait:not(.sqp-fe-layout-col1) .sqp-fe-answer-img,
.sqp-fe-aspect-4-3:not(.sqp-fe-layout-col1) .sqp-fe-answer-img,
.sqp-fe-aspect-16-9:not(.sqp-fe-layout-col1) .sqp-fe-answer-img { width:100%; height:auto; }
.sqp-fe-aspect-square:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-landscape:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-portrait:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-4-3:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-16-9:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img { width:100%; height:100%; }
/* The GRID layouts need the same thing at matching specificity. The size rules above
   are `.sqp-fe-imgsize-large:not(.sqp-fe-layout-col1) … img { height:200px }`, (0,3,0),
   because :not() contributes its argument's specificity, so the (0,2,0) rule above
   lost and the image kept its fixed height inside a wrapper that had taken the
   author's aspect ratio. Measured on a portrait card: a 325px box holding a 200px
   image, i.e. 125px of empty card under every picture. These are (0,3,0) too and come
   later, so the ratio wins, which is what choosing one is asking for. */
.sqp-fe-aspect-square:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-landscape:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-portrait:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-4-3:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img,
.sqp-fe-aspect-16-9:not(.sqp-fe-layout-col1) .sqp-fe-answer-img img { height:100%; }

/* ── Label Position ────────────────────────── */
/* Below (default): no extra rules needed, text flows after image */
/* Overlay: text positioned over the image bottom.
   The label is a SIBLING of the image wrapper, not a child, so it cannot be
   positioned inside the image; it is absolute against the ANSWER. That only lands
   on the picture if the picture reaches the answer's edges, and in a grid the
   answer carries `padding:16px 10px`, so `bottom:0` put the label BELOW the photo,
   straddling the card's border where it read as cut off rather than as a caption.
   Dropping the padding in overlay mode is what makes the image fill the card, and
   is why this mode needs it: the picture IS the card here. */
.sqp-fe-labelpos-overlay .sqp-fe-answer { position:relative; padding:0; overflow:hidden; }
.sqp-fe-labelpos-overlay .sqp-fe-answer-img { width:100%; }
.sqp-fe-labelpos-overlay .sqp-fe-answer-text {
  position:absolute; bottom:0; left:0; right:0;
  padding:8px 10px; margin:0;
  background:linear-gradient(transparent, rgba(0,0,0,.7));
  color:#fff; font-size:13px; text-align:center;
  /* Square: the ANSWER now clips to its own radius (overflow above), so repeating
     a fixed 6px here only rounded the label INSIDE an already-rounded card and
     left a sliver of card color showing through the corners. */
  border-radius:0;
}
.sqp-fe-answers.sqp-fe-labelpos-overlay .sqp-fe-answer-letter { display:none; }
/* Hidden: no text or badge, image only */
.sqp-fe-answers.sqp-fe-labelpos-hidden .sqp-fe-answer-text { display:none; }
.sqp-fe-answers.sqp-fe-labelpos-hidden .sqp-fe-answer-letter { display:none; }

/* ── Hide Letter Badge ─────────────────────── */
.sqp-fe-answers.sqp-fe-badge-hidden .sqp-fe-answer-letter { display:none; }

/* Navigation Buttons */
.sqp-fe-nav { display:flex; gap:10px; margin-top:16px; justify-content:flex-end; }
/* ONE SIZE FOR THE WHOLE NAV ROW. font-size was a flat 14px here while the Next
   button alone picked up the author s button size, so Back and Next sat side by side
   at 14px and 16px - measured on quizzes 200, 210, 214 and 219 - which reads as two
   unrelated controls rather than one control with two directions. Skip had the same
   problem. The token is the author s Button Font Size setting, and 16px is its
   fallback rather than the old flat 14 - 16 is what the renderer s own shared button
   rule falls back to, so with no size set the pair now agrees instead of splitting
   14/16. A template that pins its own nav size still wins; lumen s back chevron keeps
   its font-size:0 for the same reason. */
.sqp-fe-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:12px 24px; border-radius:var(--sqp-sp-bdr-r, 8px); border:none; font-size:var(--sqp-sp-btn-fs, 16px); font-weight:600; cursor:pointer; transition:all .2s; font-family:inherit; }
.sqp-btn-hidden { display:none !important; }
/* TAP TARGET on touch. 12px padding either side of 14px text lands at 40px tall,
   under the 44x44 floor (WCAG 2.5.5 / Apple HIG). Measured: sqp-fe-btn-back at
   186x40 on the question screen. min-height rather than more padding, so an author
   who has set their own button padding keeps it: this only raises the floor.
   Coarse pointers only; the desktop button keeps its 40px. */
@media (pointer: coarse) {
  .sqp-fe-btn { min-height: 44px; }
  /* Form controls too. Measured across the catalogue at 320px: sqp-fe-text-input and
     sqp-fe-dropdown both render 40px tall (and sqp-fe-fib-input, sqp-fe-date-input,
     sqp-fe-num-input share their padding), under the same 44x44 floor. These are the
     controls a phone user actually has to hit, on the screens that ask for a name,
     an email or a phone number. min-height only: an author's own padding still
     applies, this just raises the floor. */
  .sqp-fe-text-input,
  .sqp-fe-dropdown,
  .sqp-fe-fib-input,
  .sqp-fe-date-input,
  .sqp-fe-num-input,
  .sqp-fe-phone-input,
  .sqp-fe-phone-code { min-height: 44px; }
  /* The answer row is THE tap target of a quiz. 12px padding either side of 14px
     text lands at 43px: one pixel under, which is still under. Measured on quiz 35
     at 320px: sqp-fe-answer 280x43. */
  .sqp-fe-answer { min-height: 44px; }
}
.sqp-fe-btn-next { background:var(--sqp-sp-btn-next-bg, var(--sqp-primary, #f05451)); color:var(--sqp-sp-btn-next-text, var(--sqp-primary-text, #fff)); }
.sqp-fe-btn-next:hover { background:var(--sqp-sp-btn-next-hvbg, var(--sqp-sp-btn-next-bg, var(--sqp-primary, #f05451))); color:var(--sqp-sp-btn-next-hvtext, var(--sqp-sp-btn-next-text, var(--sqp-primary-text, #fff))); opacity:.9; transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.15); }
.sqp-fe-btn-back { background:var(--sqp-sp-btn-back-bg, #e2e8f0); color:var(--sqp-sp-btn-back-text, #333); }
.sqp-fe-btn-back:hover { background:var(--sqp-sp-btn-back-hvbg, #cbd5e1); color:var(--sqp-sp-btn-back-hvtext, var(--sqp-sp-btn-back-text, #333)); }
/* Per-question Skip. The btn_skip_* customizer keys already existed and were
   emitted by buildStyleCSS with nothing on the page carrying the class. This is
   the markup they were always written for. Muted by default so it reads as the
   secondary way out rather than competing with Next; an author who sets a skip
   color overrides both here and via the id-level rules. */
.sqp-fe-btn-skip { background:var(--sqp-sp-btn-skip-bg, #e2e8f0); color:var(--sqp-sp-btn-skip-text, #333); }
.sqp-fe-btn-skip:hover { background:var(--sqp-sp-btn-skip-hvbg, var(--sqp-sp-btn-skip-bg, #cbd5e1)); color:var(--sqp-sp-btn-skip-hvtext, var(--sqp-sp-btn-skip-text, #333)); opacity:.92; }
/* BACK GOES LEFT, WHATEVER ELSE IS IN THE ROW. The nav is justify-content:flex-end,
   so with Next hidden - which is what "Show Next Button" off leaves behind - the only
   control on the screen was a back arrow parked in the bottom RIGHT corner, where the
   eye reads "carry on". Measured on quiz 214 at 1920 wide: the nav ran 1267..1765 and
   Back sat at 1689, hard against the right edge.
   margin-right:auto sends it to the far left in every arrangement - alone, beside Next,
   or with a Skip between them, which is all this rule used to do while it was scoped to
   .sqp-fe-nav-has-skip. Aurora is the one template that draws the question counter in
   this row, and that counter already claims the left with an auto margin of its own -
   two autos would split the free space and leave Back stranded mid-row (measured at
   1549), so the counter gives its margin up below and Back sits beside it.
   It is withheld from the proxy: that is the clipped stand-in the chevrons click, and
   it must take no part in the layout.
   No RTL companion is needed. .sqp-rtl sets direction:rtl AND row-reverse on this row,
   and the two cancel, so the main axis still runs left to right. */
.sqp-fe-nav .sqp-fe-btn-back:not(.sqp-fe-btn-back-proxy) { margin-right:auto; }
/* Nav Style: Arrows Only, compact square */
.sqp-nav-arrows .sqp-fe-btn { padding:10px 16px; min-width:0; }
.sqp-nav-arrows .sqp-fe-btn svg { display:block; }

/* Nav Style: Text + Arrows */
.sqp-nav-text_arrows .sqp-fe-btn { display:inline-flex; align-items:center; gap:6px; }
.sqp-nav-text_arrows .sqp-fe-btn svg { flex-shrink:0; }

/* Nav Style: Left/Right Arrows */
.sqp-nav-circle .sqp-fe-btn { padding:10px 16px; min-width:0; }
.sqp-nav-circle .sqp-fe-btn svg { display:block; flex-shrink:0; }

.sqp-fe-btn-retake { background:var(--sqp-secondary, #0f2e47); color:#fff; margin-top:16px; }
.sqp-fe-btn-retake:hover { opacity:.9; }

/* Retake wrapper */
.sqp-fe-retake { text-align:center; padding:16px 0; }

/* Start Screen Button */
.sqp-quiz-container .sqp-start-btn { cursor:pointer; }
.sqp-quiz-container .sqp-start-btn:hover { opacity:.9; transform:translateY(-2px); box-shadow:0 4px 14px rgba(0,0,0,.15); transition:all .25s; }

/* Keyboard focus. The engine makes the template's <div> controls focusable;
   they need a visible ring or "reachable" is not the same as usable. :focus-visible
   so a mouse click does not leave a ring behind. */
.sqp-quiz-container .sqp-start-btn:focus-visible,
.sqp-quiz-container .sqp-fe-answer:focus-visible,
.sqp-quiz-container .sqp-fe-btn-next:focus-visible,
.sqp-quiz-container .sqp-fe-btn-back:focus-visible,
.sqp-quiz-container .sqp-fe-btn-skip:focus-visible,
.sqp-quiz-container .sqp-lg-btn:focus-visible,
.sqp-quiz-container .sqp-oc-btn:focus-visible,
.sqp-quiz-container .sqp-fe-retake:focus-visible,
.sqp-quiz-container .sqp-lg-field:focus-within,
/* The editor preview is not inside a .sqp-quiz-container, so it restates the field
   ring: the input no longer carries wp-admin's own (see sqp-layout.css). */
.sqp-preview-quiz .sqp-lg-field:focus-within {
  /* 2px in the BRAND color, not 3px of --sqp-secondary. Secondary is the darkest
     color a quiz owns (it is the card background on the dark templates), so on a
     light template the ring painted a heavy near-black box around whatever you had
     just clicked. The brand color reads as part of the quiz and still marks focus. */
  outline:2px solid var(--sqp-primary, #f05451);
  outline-offset:2px;
}

/* A HOST THEME'S INPUT FOCUS STYLE OUTRANKS OURS BY LOAD ORDER, NOT BY WEIGHT.
   Neve ships `input:read-write:focus { box-shadow:0 0 3px var(--nv-secondary-accent) }`.
   That is (0,2,1): exactly the weight of `.sqp-fe-text-input:focus`, and the theme
   stylesheet is enqueued AFTER this one, so the tie breaks the theme's way and the
   quiz loses its own focus indication on every text field. Two visible symptoms: a
   blue glow appeared INSIDE the ring `.sqp-lg-field:focus-within` paints, so a focused
   opt-in field showed two nested rings in two unrelated colors; and on free-text,
   fill-in-the-blank and dropdown inputs the brand ring never rendered at all: their
   border stayed at the resting grey while the theme drew the glow.
   Re-stating the rules one level up (container-scoped, (0,3,1)) beats any theme rule
   written against bare `input`, whatever the load order, and does it without
   !important so a template can still style its own fields. */
.sqp-quiz-container .sqp-fe-dropdown:focus,
.sqp-quiz-container .sqp-fe-fib-input:focus,
.sqp-quiz-container .sqp-fe-text-input:focus {
  border-color:var(--sqp-primary, #f05451); outline:none;
  box-shadow:0 0 0 3px color-mix(in srgb, var(--sqp-primary, #f05451) 12%, transparent);
}
/* Lead-gen fields are a wrapper plus a bare input: the WRAPPER owns the focus ring
   (`.sqp-lg-field:focus-within` above, and every template paints its own there), so
   the input must not carry a second one: the theme's or anybody's. In the editor
   preview "anybody" is wp-admin's forms.css, whose input:focus draws a 1px blue
   ring at (0,2,1); the preview-scoped copy is (0,3,1) and clears it. */
.sqp-quiz-container .sqp-lg-field input:focus,
.sqp-quiz-container .sqp-lg-field select:focus,
.sqp-quiz-container .sqp-lg-field textarea:focus,
.sqp-preview-quiz .sqp-lg-field input:focus,
.sqp-preview-quiz .sqp-lg-field select:focus,
.sqp-preview-quiz .sqp-lg-field textarea:focus { box-shadow:none; }

/* JUST BUTTON, a form's opt-in layout (see SQP_Renderer::render): the image, the
   words and the button. Every field, custom ones included, and the small print go,
   as they did in the old plugin. Consent boxes stay if the author added them. */
.sqp-lg-just-button .sqp-lg-field,
.sqp-lg-just-button .sqp-lg-privacy { display:none !important; }

/* THE DIAL CODE IS PART OF THE FIELD, NOT A SECOND BOX IN IT. The chip is styled for
   the phone QUESTION, where it is a bordered, filled half joined to a bordered
   input. A lead-gen phone field reuses the same span inside a .sqp-lg-field wrapper
   that already owns the border and the surface, so the chip drew its own filled,
   bordered block inside the field while the input beside it stayed bare. Inside the
   wrapper it keeps only a hairline divider, in the field's own ink. (0,3,0) so a
   template's `.sqp-template-X .sqp-fe-phone-code` border (lumen) cannot re-box it. */
.sqp-lg-field .sqp-fe-phone-row .sqp-fe-phone-code {
  background:transparent; border:0; border-radius:0;
  border-right:1px solid color-mix(in srgb, currentColor 25%, transparent);
  padding:2px 10px 2px 0; align-self:center;
}
.sqp-rtl .sqp-lg-field .sqp-fe-phone-row .sqp-fe-phone-code {
  border-right:0; border-left:1px solid color-mix(in srgb, currentColor 25%, transparent);
  padding:2px 0 2px 10px; margin-left:0;
}

/* Lead Gen Form */
.sqp-quiz-container .sqp-lg-field input { pointer-events:auto !important; }
/* The box a person SEES is the wrapper (it owns the border and ~10px of
   padding); the input inside it is only as tall as one line of text. Left alone,
   the top and bottom of every field are dead to a tap: you aim at the box, miss
   the input and get no keyboard. Stretch fills the wrapper's content height, and
   the engine forwards a click on the padding itself to the input. */
.sqp-quiz-container .sqp-lg-field { cursor:text; }
.sqp-quiz-container .sqp-lg-field input { align-self:stretch; }
@media (max-width:600px) {
  /* iOS Safari zooms the whole page whenever a focused input is under 16px, which
     rescales the quiz mid-form. Every template sets its own 13.5-14px with a
     `.sqp-lg-tplN .sqp-lg-field input` selector, which outranks anything scoped to
     the container, so this floor has to be !important to be a floor at all. Same
     precedent as the pointer-events rule above. Phones only. */
  .sqp-quiz-container .sqp-lg-field input,
  .sqp-quiz-container .sqp-fe-text-input,
  .sqp-quiz-container .sqp-fe-input { font-size:16px !important; }
}
.sqp-quiz-container .sqp-lg-btn { cursor:pointer; transition:opacity .2s; }
.sqp-quiz-container .sqp-lg-btn:hover { opacity:.9; transform:translateY(-1px); }
.sqp-lg-spinner { display:inline-block; width:20px; height:20px; border:3px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:sqpSpin .6s linear infinite; vertical-align:middle; }
/* Auto-submit sending the lead (setAutoSubmitBusy): the screen it took over stops
   taking clicks, and the button pressed shows the spinner in its own text colour,
   since a Next or Start button is not always white-on-colour like the form's. */
.sqp-quiz-container.sqp-autosubmit-busy { cursor:progress; }
.sqp-quiz-container.sqp-autosubmit-busy .sqp-screen { pointer-events:none; }
.sqp-quiz-container.sqp-autosubmit-busy [aria-busy="true"] { opacity:.85; }
.sqp-quiz-container.sqp-autosubmit-busy [aria-busy="true"] .sqp-lg-spinner {
  width:18px; height:18px; border-width:2.5px;
  border-color:color-mix(in srgb, currentColor 30%, transparent); border-top-color:currentColor;
}
@keyframes sqpSpin { to { transform:rotate(360deg); } }
.sqp-quiz-container .sqp-lg-terms input, .sqp-quiz-container .sqp-lg-gdpr input { pointer-events:auto !important; }
.sqp-quiz-container .sqp-lg-skip { cursor:pointer; }

/* Timer, Shared */
.sqp-timer { margin:0 auto 8px; }
.sqp-timer-warning { animation:sqpPulse 1s infinite; }
@keyframes sqpPulse { 0%,100%{opacity:1;} 50%{opacity:.7;} }

/* ── WHERE THE CLOCK STANDS ───────────────────────────────────────────────────
   The countdown is built in JavaScript and re-homed on every screen change by
   placeTimer(): into the .sqp-timer-slot the question markup gives every
   template (question-slot.php), into aurora's own .sqp-au-timerslot where that
   template claims it first, and otherwise at the top of the screen that is
   showing. Two classes for the two homes, so a template can place the clock
   without having to restyle it.

   It used to be dropped in as the CONTAINER's first child and left there, which
   is what the owner reported: a clock over the page background, above the logo
   and the section bar, part of no screen at all. On modern and cinematic it
   landed ON the bar and covered the section names; on elegant it stood outside
   the photograph the card is built on; on aurora, whose header chip styling is
   written for a 620px header row, it read as a bare line of text.

   These are single-class rules on purpose, so a template that dresses its own
   clock still outranks them, and the template stylesheets are inline in the
   page, which puts them after this file on any tie. */
.sqp-timer-slot { display:flex; justify-content:center; }
/* The slot is rendered only for a quiz that HAS a countdown, but it is still
   empty for the moment between the page arriving and the engine starting the
   clock, and it stays empty on every screen the taker has not reached. It must
   take no room in either state: inside a flex column even an empty box is a gap. */
.sqp-timer-slot:empty { display:none; }
/* In a card the clock is the first thing in it, so the space under it is the
   card's own rhythm rather than the 8px a loose clock carries. */
.sqp-timer-slotted { margin:0 0 var(--sqp-sp-title-mb, 16px); }
/* No slot (an interlude, an ad): the clock stands at the top of the screen it
   belongs to, centred over the card, and hides with that screen. */
.sqp-timer-loose { margin:0 auto 16px; }

/* ── 1. Flip Card ── */
.sqp-timer-flip { display:flex; align-items:center; justify-content:center; gap:0; padding:16px 24px; max-width:320px; background:var(--sqp-timer-bg, #fff); border:1px solid #e9ecef; border-radius:16px; box-shadow:0 2px 12px rgba(0,0,0,.06); }
.sqp-timer-flip .sqp-timer-group { display:flex; align-items:center; gap:6px; }
.sqp-timer-flip .sqp-timer-sep { font-size:32px; font-weight:800; color:var(--sqp-timer-digit, #1a1a2e); margin:0 8px; line-height:1; padding-bottom:18px; }
/* THE TILE FOLLOWS THE QUIZ. Its default tint was the old coral primary written
   out as a literal while the digit on it takes --sqp-primary, so every quiz that
   is not coral put blue (or green, or purple) figures on a pink tile. Mixed from
   the same variable the digit uses, the two agree whatever the palette is. The
   flat declaration first is the fallback: a browser without color-mix keeps the
   panel's own surface and simply loses the tint. */
.sqp-timer-flip .sqp-timer-digit { width:48px; height:56px; display:flex; align-items:center; justify-content:center; background:var(--sqp-timer-cell, rgba(240,84,81,.08)); background:var(--sqp-timer-cell, color-mix(in srgb, var(--sqp-primary, #f05451) 8%, transparent)); border-radius:10px; font-size:32px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--sqp-timer-digit, var(--sqp-primary, #f05451)); font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif; }
.sqp-timer-flip .sqp-timer-lbl { display:flex; gap:6px; margin-top:4px; }
.sqp-timer-flip .sqp-timer-lbl span { width:48px; text-align:center; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:var(--sqp-timer-label, #adb5bd); }
.sqp-timer-flip .sqp-timer-col { display:flex; flex-direction:column; align-items:center; }
.sqp-timer-flip.sqp-timer-warning { border-color:var(--sqp-primary, #f05451); background:#fff5f5; }

/* ── 2. Pill + Progress Bar ── */
.sqp-timer-pill { display:flex; flex-direction:column; align-items:center; gap:8px; max-width:240px; padding:14px 28px; background:var(--sqp-tp-bg, #1e293b); border-radius:50px; }
.sqp-tp-digits { font-family:'Courier New',monospace; font-size:28px; font-weight:700; color:var(--sqp-tp-digit, #fff); letter-spacing:3px; font-variant-numeric:tabular-nums; }
.sqp-tp-track { width:100%; height:5px; background:var(--sqp-tp-track, #334155); border-radius:3px; overflow:hidden; }
.sqp-tp-bar { height:100%; background:var(--sqp-tp-bar, #eab308); border-radius:3px; transition:width .3s linear; }
.sqp-timer-pill.sqp-timer-warning .sqp-tp-bar { background:#f05451; }

/* ── 3. Circle Arcs ── */
.sqp-timer-circles { display:flex; align-items:center; justify-content:center; gap:16px; max-width:320px; padding:12px 20px; }
.sqp-tc-ring { position:relative; width:80px; height:80px; text-align:center; }
.sqp-tc-ring svg { width:100%; height:100%; transform:rotate(-90deg); }
.sqp-tc-track { fill:none; stroke:var(--sqp-tc-track, #e2e8f0); stroke-width:6; }
.sqp-tc-arc { fill:none; stroke-width:6; stroke-linecap:round; transition:stroke-dasharray .3s linear; }
.sqp-tc-arc-h { stroke:var(--sqp-tc-h, #f05451); }
.sqp-tc-arc-m { stroke:var(--sqp-tc-m, #3b82f6); }
.sqp-tc-arc-s { stroke:var(--sqp-tc-s, #10b981); }
.sqp-tc-val { position:absolute; top:50%; left:50%; transform:translate(-50%,-55%); font-size:20px; font-weight:800; color:var(--sqp-tc-digit, #1e293b); font-variant-numeric:tabular-nums; }
.sqp-tc-lbl { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); font-size:8px; font-weight:700; letter-spacing:1px; color:var(--sqp-tc-digit, #94a3b8); text-transform:uppercase; }

/* ── 4. Bold Editorial ── */
.sqp-timer-editorial { display:flex; align-items:flex-start; justify-content:center; gap:0; max-width:320px; padding:20px 30px; background:var(--sqp-te-bg, #fff); border-radius:16px; box-shadow:0 2px 12px rgba(0,0,0,.04); }
.sqp-te-block { text-align:center; }
.sqp-te-num { font-family:Georgia,'Times New Roman',serif; font-size:52px; font-weight:700; line-height:1; color:var(--sqp-te-num, #0f172a); font-variant-numeric:tabular-nums; }
.sqp-te-label { display:inline-block; margin-top:6px; padding:3px 10px; border-radius:50px; background:#f1f5f9; font-size:10px; font-weight:700; letter-spacing:1px; color:var(--sqp-te-label, #94a3b8); text-transform:uppercase; }
.sqp-te-sep { font-family:Georgia,serif; font-size:42px; font-weight:700; color:var(--sqp-te-sep, #f05451); margin:0 8px; line-height:1; }
.sqp-timer-editorial.sqp-timer-warning .sqp-te-num { color:#f05451; }

/* ── 5. Dark Luxury ── */
.sqp-timer-luxury { max-width:300px; border-radius:16px; overflow:hidden; }
.sqp-tl-inner { display:flex; align-items:center; justify-content:center; gap:0; padding:22px 32px; background:var(--sqp-tl-bg, #0f172a); border-top:3px solid var(--sqp-tl-accent, #d4a853); }
.sqp-tl-block { text-align:center; }
.sqp-tl-num { font-size:40px; font-weight:800; color:var(--sqp-tl-digit, #fff); font-variant-numeric:tabular-nums; letter-spacing:2px; line-height:1; }
.sqp-tl-label { font-size:10px; font-weight:600; letter-spacing:2px; color:var(--sqp-tl-label, #94a3b8); text-transform:uppercase; margin-top:4px; }
.sqp-tl-sep { font-size:32px; font-weight:700; color:var(--sqp-tl-accent, #d4a853); margin:0 12px; line-height:1; }
.sqp-timer-luxury.sqp-timer-warning .sqp-tl-inner { border-top-color:#f05451; }
.sqp-timer-luxury.sqp-timer-warning .sqp-tl-sep { color:#f05451; }

/* ── 6. Minimal Text ── */
/* FLEX AND fit-content, NOT inline-flex. `margin:0 auto` cannot centre an inline
   box: it is placed by whatever text-align it inherits, so this was the one
   style of the six that stood at the left edge of every card the other five sat
   in the middle of. Shrink-to-fit keeps the pill exactly as wide as it looks. */
.sqp-timer-minimal { display:flex; width:fit-content; align-items:center; gap:6px; padding:8px 18px; background:var(--sqp-tm-bg, #f1f5f9); border-radius:50px; max-width:180px; }
.sqp-tm-icon { font-size:16px; line-height:1; }
.sqp-tm-time { font-size:18px; font-weight:700; color:var(--sqp-tm-color, #1e293b); font-variant-numeric:tabular-nums; letter-spacing:1px; }
.sqp-timer-minimal.sqp-timer-warning { background:#fef2f2; }
.sqp-timer-minimal.sqp-timer-warning .sqp-tm-time { color:#f05451; }

/* ── The clock on a phone ─────────────────────────────────────────────────────
   THE CARD PAYS FOR ITS OWN PADDING NOW. The clock stands inside the question
   card rather than above the whole quiz, so on a 360px screen it has roughly
   290px to stand in, and three 80px rings (320px) or four 48px tiles (300px)
   do not fit: the card would be pushed wider than the window and the page would
   scroll sideways. Each style gives back what it can afford to lose, and none of
   them is retyped - only the measurements that decide the width change. */
@media (max-width:600px) {
  .sqp-timer-flip { padding:12px 14px; }
  .sqp-timer-flip .sqp-timer-digit { width:40px; height:48px; font-size:26px; }
  .sqp-timer-flip .sqp-timer-lbl span { width:40px; }
  .sqp-timer-flip .sqp-timer-sep { font-size:26px; margin:0 4px; padding-bottom:16px; }
  .sqp-timer-circles { gap:8px; padding:8px 4px; }
  .sqp-tc-ring { width:64px; height:64px; }
  .sqp-tc-val { font-size:16px; }
  .sqp-tc-lbl { bottom:6px; }
  .sqp-timer-editorial { padding:16px 18px; }
  .sqp-te-num { font-size:40px; }
  .sqp-te-sep { font-size:32px; margin:0 5px; }
  .sqp-timer-luxury .sqp-tl-inner { padding:18px 22px; }
}

/* Speed Timer (per-question) */
.sqp-speed-wrap { width:100%; height:6px; background:var(--sqp-st-bg2, #e2e8f0); border-radius:3px; margin-bottom:12px; overflow:hidden; box-shadow:0 0 var(--sqp-sp-shd-blur, 0) var(--sqp-st-shadow, transparent); }
.sqp-speed-bar { height:100%; background:var(--sqp-st-bg, var(--sqp-primary, #f05451)); border-radius:3px; width:100%; }
.sqp-speed-bar.sqp-speed-warn { background:#f05451; }

/* Blocked Message */
.sqp-blocked-msg { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:40px 20px; }
.sqp-blocked-img img { display:block; max-width:min(240px, 100%); height:auto; border-radius:var(--sqp-sp-bdr-r, 8px); }
.sqp-blocked-inner p:first-child { margin-top:0; } .sqp-blocked-inner p:last-child { margin-bottom:0; }
.sqp-blocked-inner { text-align:center; font-size:16px; font-weight:600; color:var(--sqp-secondary, #0f2e47); padding:24px; border:1.5px solid #e2e8f0; border-radius:var(--sqp-sp-bdr-r, 8px); background:#f8fafc; }

/* Timer Expired Overlay */
.sqp-timer-expired { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.92); z-index:10; border-radius:inherit; }
.sqp-timer-expired-msg { font-size:24px; font-weight:700; color:var(--sqp-primary, #f05451); text-align:center; padding:24px; }

/* Responsive */
@media (max-width:768px) {
  .sqp-quiz-container { max-width:100%; }
  .sqp-fe-question { padding:20px 16px; }
  /* ONE COLUMN ON MOBILE, ALWAYS: no answer grid survives below this width.
     This rule used to read `.sqp-fe-layout-col2 .sqp-fe-answer, ...` at (0,2,0) and
     it lost, silently, to the templates' own grids:
       classic/questions.php:171  .sqp-q-tpl4 .sqp-fe-layout-col2 .sqp-fe-answer   (0,3,0)
       lumen/questions.php:172    .sqp-template-lumen .sqp-fe-layout-col2 .sqp-fe-answer
     Specificity beats source order and media queries alike, so on a 320px phone
     classic still rendered two 102px columns, lumen two 133px columns, and a col4
     grid sat at its 88px min-width two-per-row. Measured across the catalogue:
     5 quizzes rendering multi-column on iPhone SE while this rule was "in force".
     Scoped through .sqp-quiz-container and the layout class as an attribute to reach
     (0,4,0), which clears the template rules with room to spare. min-width:0 is
     required too: --sqp-ans-minw defaults to 88px and would otherwise re-establish
     columns on its own. The attribute selector covers col1..col5 in one line, so a
     new column count cannot be added later and quietly miss this. */
  /* .sqp-live-preview is the editor's phone preview (#32), which has no .sqp-quiz-container:
     utils/phoneViewport.js turns this query on for the phone, and the selector has to match there too. */
  .sqp-quiz-container .sqp-fe-answers[class*="sqp-fe-layout-col"] .sqp-fe-answer,
  .sqp-live-preview .sqp-fe-answers[class*="sqp-fe-layout-col"] .sqp-fe-answer {
    width:100%; min-width:0; flex:0 0 100%; flex-direction:row;
  }
  .sqp-fe-q-title { font-size:18px; }
  /* BACK AND NEXT STAY ON ONE LINE. This block used to stack them
     (flex-direction:column) and blow each one out to width:100%, which on a phone
     produced two full-width slabs one above the other - the Back button as visually
     loud as the Next it sits under, and the pair eating the bottom third of the
     screen. Owner-reported in popup, corner popup and in-page alike, which is why
     the fix is here rather than in a popup-specific rule: every display mode routes
     through .sqp-fe-nav below 768px.
     Row, with Back pushed to the left edge and Next to the right, each at its natural
     width - measured at 80px on a 320px phone, well past the 44px touch floor and far
     from the full-width slabs this produced before.
     space-between rather than stretching them to equal halves on purpose: a template
     rule overrides .sqp-fe-btn's flex (measured: computed flex stays 0 0 auto however
     this rule is written), so sizing them here would be a specificity fight that the
     stylesheet loses. Positioning the row is enough, and it is what was asked for. */
     align-items:stretch, not center, so Back and Next end up the same height - centred
     left Back at 44px against a 48px Next, a visible step between two buttons that sit
     side by side.
     min-width:44px because width:auto lets an icon-only Back shrink to its arrow: the
     harness measured it at 32x44 on two aurora quizzes straight after this change. The
     old width:100% hid that by making every button full width.

     Scoped through .sqp-quiz-container .sqp-fe-nav to reach (0,3,0): a plain
     .sqp-fe-btn rule here is (0,1,0) and loses to the templates' own button rules -
     measured, the button's computed flex stayed 0 0 auto and its min-width was
     ignored until this selector was widened. */
  .sqp-quiz-container .sqp-fe-nav { flex-direction:row; flex-wrap:nowrap; align-items:stretch; justify-content:space-between; }
  .sqp-quiz-container .sqp-fe-nav .sqp-fe-btn, .sqp-live-preview .sqp-fe-nav .sqp-fe-btn { width:auto; min-width:44px; justify-content:center; }
  /* Corner popup goes full-width on mobile */
  .sqp-popup-corner { left:10px !important; right:10px !important; bottom:10px; }
  .sqp-popup-box-corner { width:auto; }
  /* The SHELL is handled at its own declaration further down, NOT here. A
     `.sqp-popup-corner .sqp-popup-shell` rule in this block is (0,2,0) and the
     shell's own rule is (0,2,0) too but comes LATER in the file, so it wins and
     an override here silently does nothing. Fixed at source instead. */
  /* Overlay popup full-width on mobile */
  .sqp-popup-overlay .sqp-popup-box { width:96%; max-height:90vh; border-radius:10px; }
}

/* ── Pagination ── */

/* Page groups */
.sqp-page-group { animation:sqpFadeInPage .3s ease; }
@keyframes sqpFadeInPage { from { opacity:0; } to { opacity:1; } }
/* The question wrapper paints NOTHING. Every questions.php already draws its
   own card, .sqp-classic-card has a border, radius and shadow of its own,
   so giving this element a background and shadow too framed one card inside
   another, and under .sqp-fullscreen (which forces max-width:none) the outer
   one spread the full viewport behind a 700px inner one. Aurora had already
   opted out of exactly this a few hundred lines up; now nobody opts in.
   The wrapper's whole job here is rhythm and the state fade. */
.sqp-questions-wrap .sqp-screen-question {
  position:relative;
  background:transparent; border:none; box-shadow:none; border-radius:0;
  margin:0 auto 18px;
  transition:opacity .35s ease;
}
.sqp-page-group .sqp-screen-question { display:block !important; margin-bottom:6px; }

/* ── One-page (progressive) question states ──────────────────────────
   Three states, all readable off classes the engine already sets:

     current   .sqp-screen-question with no .sqp-q-disabled
     answered  .sqp-q-disabled that holds a .sqp-selected answer
     upcoming  .sqp-q-disabled that does not

   The old treatment stacked a 30% white veil on top of opacity .35, which
   put upcoming questions below reading contrast: they looked broken rather
   than pending. Opacity alone now carries the recession.

   The answered test keys on .sqp-selected, not on :checked: there is no real
   <input> anywhere in a question. Answers are divs carrying aria-checked and
   .sqp-selected, so :has(input:checked) matches nothing at all.

   Types that record an answer without marking a .sqp-selected option: a
   slider, a free-text field, keep the upcoming look once answered. Harmless,
   since they have been scrolled past; separating them needs a class from
   the engine. */

/* Opacity is the whole state read, and it belongs on the wrapper so it fades
   the template's card and everything in it as one object. */
.sqp-q-disabled { position:relative; opacity:.62; pointer-events:none; }
.sqp-questions-wrap .sqp-q-disabled:has(.sqp-selected) { opacity:.78; }

/* Elevation goes on the card the TEMPLATE draws, not on the wrapper, so the
   lift reads on the 700px card the reader is actually looking at.
   .sqp-q-tpl is the shared hook in five of the six questions.php files;
   elegant names its outer box .sqp-q-tpl6-outer instead. */
.sqp-questions-wrap .sqp-screen-question .sqp-q-tpl,
.sqp-questions-wrap .sqp-screen-question .sqp-q-tpl6-outer {
  transition:box-shadow .35s ease;
}
.sqp-questions-wrap .sqp-screen-question:not(.sqp-q-disabled) .sqp-q-tpl,
.sqp-questions-wrap .sqp-screen-question:not(.sqp-q-disabled) .sqp-q-tpl6-outer {
  box-shadow:0 2px 4px rgba(16,24,40,.05), 0 18px 40px -12px rgba(16,24,40,.20);
}

/* Aurora deliberately runs with no card at all (see its override above), so
   there is nothing to lift. Opacity alone carries the state there. */
.sqp-template-aurora .sqp-questions-wrap .sqp-screen-question .sqp-q-tpl { box-shadow:none; }

@media (prefers-reduced-motion:reduce) {
  .sqp-questions-wrap .sqp-screen-question,
  .sqp-questions-wrap .sqp-screen-question .sqp-q-tpl,
  .sqp-questions-wrap .sqp-screen-question .sqp-q-tpl6-outer { transition:none; }
}

/* Slider question */
.sqp-fe-slider-wrap { padding:20px 0; }
.sqp-fe-slider-labels { display:flex; justify-content:space-between; align-items:center; margin-bottom:0; }
.sqp-fe-slider-label-start,
.sqp-fe-slider-label-end { font-size:13px; font-weight:600; color:var(--sqp-sp-desc-color, #64748b); }
.sqp-fe-slider-value { font-size:22px; font-weight:800; color:var(--sqp-sp-title-color, var(--sqp-primary, #f05451)); min-width:50px; text-align:center; }
/* The fill follows the VALUE. It was a hard 50% with nothing to update it, so the
   colored part stopped in the middle of the track whatever the slider said: on a
   0–10 scale defaulting to 4 the fill ran to 50% while the thumb sat at 40%, which
   reads as the dot being out of line with its own track.
   --sqp-slider-pct is written by bindSliders()/the input handler in sqp-frontend.js;
   the 50% here is only the value before the engine has run. */
.sqp-fe-slider {
  -webkit-appearance:none; appearance:none;
  width:100%; height:8px; border-radius:4px;
  background:linear-gradient(to right, var(--sqp-primary, #f05451) var(--sqp-slider-pct, 50%), #e2e8f0 var(--sqp-slider-pct, 50%));
  outline:none; cursor:pointer;
}
/* Chrome does NOT centre an `appearance:none` thumb on its track: it aligns the
   thumb's TOP edge with the track's top, so any thumb taller than the track hangs below
   the line. With no margin-top the 24px thumb sat 11px low on the 8px track, which is
   the dot looking off-centre.
   box-sizing is stated so the border counts INSIDE the 24 (a pseudo-element does not
   match the container's `*` reset and box-sizing is not inherited, so it was really
   24+3+3 = 30 and the offset depended on a value nobody had written down). With that
   pinned, the correction is simply (track − thumb) / 2 = (8 − 24) / 2 = −8px.
   Firefox centres its own thumb, so ::-moz-range-thumb must NOT get this margin. */
.sqp-fe-slider::-webkit-slider-thumb {
  -webkit-appearance:none; appearance:none; box-sizing:border-box;
  width:24px; height:24px; border-radius:50%;
  margin-top:-8px;
  background:var(--sqp-primary, #f05451); border:3px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.2); cursor:pointer;
}
/* Same 24px as the webkit thumb. It was 18, so the identical control rendered a
   different size depending on the browser. */
.sqp-fe-slider::-moz-range-thumb {
  box-sizing:border-box;
  width:24px; height:24px; border-radius:50%;
  background:var(--sqp-primary, #f05451); border:3px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.2); cursor:pointer;
}
.sqp-fe-slider::-webkit-slider-runnable-track { height:8px; border-radius:4px; }
.sqp-fe-slider::-moz-range-track { height:8px; border-radius:4px; background:#e2e8f0; }

/* THE THUMB KEEPS THE QUIZ'S COLOUR ON A REAL THEME.
   `.sqp-fe-slider::-webkit-slider-thumb` is (0,1,1). A theme styling its own
   range inputs writes `input[type="range"]::-webkit-slider-thumb`, which is
   (0,1,2) and wins - Astra paints it #0274be - so the live quiz drew a stock
   blue dot on a coral track while the editor preview, with no theme loaded,
   drew the coral one the author chose. Reported by the second developer as
   "both in the admin and frontend quiz range slider design looking different".
   Repeated through the container to (0,2,1), which clears it. The preview root
   is included for the same reason the field rules are: wp-admin styles range
   inputs too, and the two sides have to agree. */
.sqp-quiz-container .sqp-fe-slider,
.sqp-preview-quiz .sqp-fe-slider {
  -webkit-appearance:none; appearance:none;
  height:8px; border-radius:4px; outline:none; cursor:pointer;
  background:linear-gradient(to right, var(--sqp-primary, #f05451) var(--sqp-slider-pct, 50%), #e2e8f0 var(--sqp-slider-pct, 50%));
}
.sqp-quiz-container .sqp-fe-slider::-webkit-slider-thumb,
.sqp-preview-quiz .sqp-fe-slider::-webkit-slider-thumb {
  -webkit-appearance:none; appearance:none; box-sizing:border-box;
  width:24px; height:24px; border-radius:50%; margin-top:-8px;
  background:var(--sqp-primary, #f05451); border:3px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.2); cursor:pointer;
}
.sqp-quiz-container .sqp-fe-slider::-moz-range-thumb,
.sqp-preview-quiz .sqp-fe-slider::-moz-range-thumb {
  box-sizing:border-box;
  width:24px; height:24px; border-radius:50%;
  background:var(--sqp-primary, #f05451); border:3px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.2); cursor:pointer;
}
.sqp-quiz-container .sqp-fe-slider::-webkit-slider-runnable-track,
.sqp-preview-quiz .sqp-fe-slider::-webkit-slider-runnable-track { height:8px; border-radius:4px; background:transparent; }
/* The Firefox track keeps the grey it has always had here; only the specificity
   changes, so nothing about how it renders is being guessed at from a browser
   that is not in front of me. */
.sqp-quiz-container .sqp-fe-slider::-moz-range-track,
.sqp-preview-quiz .sqp-fe-slider::-moz-range-track { height:8px; border-radius:4px; background:#e2e8f0; }

/* Matrix question: styled once, further up. A second block used to sit here
   with its own `.sqp-fe-matrix-wrap` / `-label` / `-radio` classes, which no
   markup has ever carried, but its th/td rules DID override the live ones,
   so the real block could not be fixed from where it is defined. */

/* Text input question
   NOTE: this rule, not the token-based one near the top of the file, is what actually
   paints every field - it is later, so it wins. The dial-code chip is styled from HERE
   for that reason: matching the tokens instead left it visibly different from the
   input it is joined to.

   It used to set LITERALS, and being the rule that wins it imposed them everywhere:
   a white field with dark text on aurora's navy card, which is a bright slab in the
   middle of a dark screen and text that cannot be read on it. The literals are now
   fallbacks behind the same tokens the top rule uses, so a template that states its
   field colors gets them and one that states none is unchanged. */
.sqp-fe-text-input-wrap { padding:16px 0; }
.sqp-fe-text-input,
.sqp-fe-phone-code {
  width:100%; padding:14px 18px; border-radius:10px;
  border:2px solid var(--sqp-sp-field-bdr, #e2e8f0);
  font-size:15px; font-family:inherit;
  color:var(--sqp-sp-ans-text, #1e293b);
  background:var(--sqp-sp-field-bg, #f8fafc);
  outline:none; transition:border-color .2s; box-sizing:border-box;
}
/* Dial-code chip: only what is genuinely its own, it hugs its text instead of filling
   the row, centres the code vertically, and squares off the edge that meets the input.
   The two right corners are zeroed rather than a radius restated, so the shared value
   above stays the only place a corner size is written. */
.sqp-fe-phone-code {
  /* COLOUR COMES FROM THE FIELD, NOT THE ANSWER PALETTE. The shared block above sets
     color:var(--sqp-sp-ans-text) for the chip and the text input together, but the
     renderer emits an INLINE color:#333 on the phone input (buildLeadgenCustomFields),
     and an inline style beats any stylesheet - so the input stayed dark while the chip
     kept following the answer colour. On any template whose answers sit on a dark
     panel that colour is white, and the chip paints white text on its own near-white
     field background: measured on reference-3, chip color rgb(255,255,255) against
     background rgb(248,250,252). The dial code was rendering, and invisible.
     Owner-reported as "see how phone number is showing": an empty box beside the
     number. --sqp-sp-field-text does not exist yet; naming it here gives authors a
     hook without inventing behaviour, and the fallback matches the input beside it. */
  color:var(--sqp-sp-field-text, #333) !important;
  /* MATCH THE INPUT'S HEIGHT. The chip inherits padding:14px and border:2px from the
     block above, while the phone input renders at padding:12px and border:1px - so the
     chip stood 54.5px against a 44px input, a 10.5px step in the middle of one
     control, on every viewport (measured on reference-3 at 320 and at 834).
     .sqp-fe-phone-row is align-items:stretch, so the row only needs the chip to stop
     dictating its own height: with the vertical padding removed it stretches to the
     input instead, and min-height:44px (set for touch above) still holds the floor.
     The border is matched too, or the seam between them steps by a pixel. */
  padding-top:0; padding-bottom:0; border-width:1px;
  width:auto; display:flex; align-items:center; white-space:nowrap;
  font-weight:600; color:var(--sqp-sp-ans-text, #64748b);
  border-top-right-radius:0; border-bottom-right-radius:0;
}
.sqp-fe-text-input:focus { border-color:var(--sqp-primary, #f05451); background:var(--sqp-sp-field-bg, #fff); }
.sqp-fe-text-input::placeholder { color:var(--sqp-sp-field-placeholder, #94a3b8); }

/* Complete the sentence (matching_text) question */
.sqp-fe-mt-wrap { padding:16px 0; }
.sqp-fe-mt-sentence { font-size:16px; line-height:2.6; color:#1e293b; }
.sqp-fe-mt-blank {
  display:inline-block; min-width:100px; padding:6px 16px; margin:0 4px;
  border:2px dotted #94a3b8; border-radius:8px; background:#fff;
  font-size:14px; font-weight:700; color:#1e293b;
  text-align:center; outline:none; cursor:pointer; transition:all .2s;
  vertical-align:middle;
}
.sqp-fe-mt-blank.sqp-drop-hover { border-color:var(--sqp-primary, #f05451); background:rgba(0,166,81,.04); transform:scale(1.04); box-shadow:0 0 0 3px rgba(0,166,81,.1); }
.sqp-fe-mt-blank.sqp-filled { border-style:solid; border-color:#1e293b; background:#fff; }
.sqp-fe-mt-blank.sqp-correct { border-color:#22c55e; border-style:solid; color:#16a34a; background:#f0fdf4; }
.sqp-fe-mt-blank.sqp-incorrect { border-color:#ef4444; border-style:solid; color:#dc2626; background:#fef2f2; }
.sqp-fe-mt-bank {
  display:flex; flex-wrap:wrap; gap:12px; margin-top:24px;
  padding:0;
}
.sqp-fe-mt-word {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:100px; padding:10px 24px;
  background:#fff; border:2px dotted #94a3b8; border-radius:8px;
  font-size:14px; font-weight:700; color:#1e293b;
  cursor:grab; user-select:none; transition:all .2s;
}
.sqp-fe-mt-word:hover { border-color:#475569; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.sqp-fe-mt-word:active, .sqp-fe-mt-word.sqp-dragging { cursor:grabbing; opacity:.6; transform:scale(.95); box-shadow:0 4px 16px rgba(0,0,0,.12); }
.sqp-fe-mt-word.sqp-used { opacity:.25; pointer-events:none; border-style:dashed; }

/* File upload question */
.sqp-fe-file-upload-wrap { padding:16px 0; }
/* FLEX, AND MEANT THIS TIME. The rule further up declares display:flex with
   align-items:center and a gap - and this one, being later, quietly replaced it with
   block. So the two children fell back to sitting on a text baseline: the button at
   vertical-align:baseline and the name chip at middle, 41px against 42px, the chip
   landing 5px lower than the button beside it.

   wrap, so the long-name case the chip was designed for still works: a name too wide
   for the line drops onto its own row as one piece rather than being squeezed. */
.sqp-fe-file-label { display:flex; align-items:center; flex-wrap:wrap; gap:12px; cursor:pointer; }
.sqp-fe-file-drop {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  padding:32px 20px; border:2px dashed #cbd5e1; border-radius:12px; background:#f8fafc;
  transition:all .2s;
}
.sqp-fe-file-drop:hover { border-color:var(--sqp-primary, #f05451); background:#f0fdf4; }
.sqp-fe-file-text { font-size:14px; font-weight:600; color:#475569; }
.sqp-fe-file-hint { font-size:12px; color:var(--sqp-sp-desc-color, #64748b); }
/* A LONG FILE NAME HAS TO STOP SOMEWHERE. This is a padded, bordered chip on an
   INLINE box, so a name too long for the line wrapped - and an inline box that
   wraps breaks its own background and border across both lines, leaving the
   second half hanging outside the control with a torn edge. Uploading a file
   with a descriptive name is normal, so this was easy to hit.

   inline-block keeps a short name beside the Choose File button and moves a
   long one onto its own line as ONE chip; the ellipsis then does the rest. The
   full name stays in the title attribute, so nothing is actually lost.
   min-width:0 matters if the label is ever laid out as flex - without it a flex
   item refuses to shrink below its content and the ellipsis never appears. */
.sqp-fe-file-name {
  display:inline-block; vertical-align:middle;
  max-width:100%; min-width:0; box-sizing:border-box;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  /* No margin-top: the row is flex now and the gap does that job. The 10px was
     what tilted the chip below the button. */
  padding:10px 14px;
  background:var(--sqp-sp-field-bg, #ffffff);
  border:1px solid var(--sqp-sp-field-bdr, var(--sqp-sp-ans-bdr, #e2e8f0));
  border-radius:8px; font-size:13px; font-weight:600;
  color:var(--sqp-sp-desc-color, #64748b);
}
/* GREEN MEANS A FILE, not an empty slot. The chip wore its success colors from the
   moment the screen rendered, so "No file chosen" arrived in the same green a
   completed upload does - the one state that should look settled announcing the one
   state that is not. The engine raises .sqp-has-file when a name is actually set. */
.sqp-fe-file-name.sqp-has-file {
  background:color-mix(in srgb, #22c55e 12%, var(--sqp-sp-field-bg, #ffffff));
  border-color:color-mix(in srgb, #22c55e 38%, var(--sqp-sp-field-bg, #ffffff));
  color:var(--sqp-sp-ans-text, #166534);
}

/* Weight & Height question */
.sqp-fe-wh-wrap { padding:16px 0; }
.sqp-fe-wh-row { display:flex; gap:16px; }
.sqp-fe-wh-field { flex:1; }
.sqp-fe-wh-label { display:block; font-size:13px; font-weight:700; color:var(--sqp-sp-desc-color, #475569); margin-bottom:6px; }

/* Date input.

   The visible field is a TEXT box so the author's Date Format can be honoured -
   a native date control always prints the browser's locale and cannot be told
   otherwise. The native picker is still there: .sqp-fe-date-native is a real
   date input the engine opens with showPicker(), which is what a phone needs,
   and .sqp-fe-date-open is the calendar affordance that replaces the one the
   native control used to draw for itself.

   The native input has to stay in the layout rather than display:none, because
   a hidden input cannot be given a picker in Chrome; it is a 1px box pinned to
   the field's right edge, under the calendar button that sits on top of it. */
.sqp-fe-input-date { position:relative; max-width:280px; }
.sqp-fe-date-input { cursor:pointer; padding-right:42px; }
.sqp-fe-date-open {
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; padding:0;
  border:0; border-radius:6px; background:transparent; cursor:pointer;
  color:var(--sqp-sp-field-placeholder, #94a3b8);
}
.sqp-fe-date-open:hover { color:var(--sqp-primary, #f05451); background:rgba(240,84,81,.08); }
/* Scoped through the wrapper, not left at .sqp-fe-date-native on its own: the
   theme-facing input rules in this file and in the templates are (0,2,0) or
   better and were sizing it back up to a full-width 280x40 box. */
.sqp-fe-input-date .sqp-fe-date-native {
  position:absolute; right:14px; bottom:0;
  width:1px; min-width:0; height:1px; min-height:0;
  padding:0; margin:0; border:0;
  opacity:0; pointer-events:none;
}

/* Page number navigation */
/* ONE ROW, ONE HEIGHT (issue #43). Prev rendered 60x33 at 13px beside a 96x44 Next,
   and the page numbers were 62x36 ovals: .sqp-page-prev lost to .sqp-nav-arrows
   .sqp-fe-btn (10px 16px), Next took the Button panel's shape from the per-quiz id
   rule, and a theme's own `button` padding (15px 30px on this install) stretched
   the numbers sideways.
   Prev now reads the SAME --sqp-sp-btn-* variables and fallbacks the renderer's
   button-shape rule gives Next (class-sqp-renderer.php, btnFamilySel), so the pair
   cannot drift apart, and keeps its own secondary colours.
   The numbers are circles one button tall: --sqp-pn-h is that button's height worked
   out from the same variables, which is why the row pins line-height to 1.25 for
   all three. 10+ grows into a pill at the same height. aspect-ratio against a
   stretched row was tried first and does not size the width in Chrome (measured 40x44).
   (0,3,0) to beat the nav-style rules (0,2,0) and lumen's pinned header chevron,
   which is also a .sqp-fe-btn-back and would otherwise fly Prev to the top corner. */
.sqp-page-nav {
  --sqp-pn-h: calc(var(--sqp-sp-btn-pad, 14px) * 2 + var(--sqp-sp-btn-fs, 16px) * 1.25 + var(--sqp-sp-btn-bdrw, 0px) * 2);
  display:flex; align-items:center; justify-content:center; gap:8px; padding:16px 0; flex-wrap:wrap;
}
.sqp-quiz-container .sqp-page-nav .sqp-page-num {
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; flex:0 0 auto;
  width:auto; min-width:var(--sqp-pn-h); height:var(--sqp-pn-h); min-height:0; margin:0;
  padding:0 calc(var(--sqp-sp-btn-fs, 16px) * .5); border-radius:999px; border:1.5px solid #e2e8f0; background:#fff; box-shadow:none;
  font-family:inherit; font-size:var(--sqp-sp-btn-fs, 16px); font-weight:600; line-height:1; letter-spacing:0; text-transform:none;
  color:var(--sqp-secondary, #0f2e47); cursor:pointer; transition:background-color .2s, border-color .2s, color .2s;
}
.sqp-quiz-container .sqp-page-nav .sqp-page-num:hover { border-color:var(--sqp-primary, #f05451); color:var(--sqp-primary, #f05451); background:#fff; }
.sqp-quiz-container .sqp-page-nav .sqp-page-num.sqp-page-active { background:var(--sqp-primary, #f05451); color:var(--sqp-primary-text, #fff); border-color:var(--sqp-primary, #f05451); cursor:default; }
.sqp-quiz-container .sqp-page-nav .sqp-page-prev,
.sqp-quiz-container .sqp-page-nav .sqp-page-next { box-sizing:border-box; flex:0 0 auto; line-height:1.25; min-height:0; margin:0; }
.sqp-quiz-container .sqp-page-nav .sqp-page-prev {
  position:static; inset:auto; z-index:auto; width:auto; height:auto; min-width:0;
  padding:var(--sqp-sp-btn-pad, 14px) 30px; border-radius:var(--sqp-sp-btn-r, 8px);
  border:var(--sqp-sp-btn-bdrw, 0) solid transparent; box-shadow:none;
  font-size:var(--sqp-sp-btn-fs, 16px); font-weight:600;
  background-image:none; color:var(--sqp-sp-btn-back-text, #333);
}
/* On page one there is nowhere to go back to: same size, just quieter. */
.sqp-quiz-container .sqp-page-nav .sqp-page-prev:has(+ .sqp-page-active) { opacity:.5; cursor:default; transform:none; box-shadow:none; }
/* A PHONE KEEPS THE ROW ON ONE LINE. At 390px, 30px sides put Prev + three circles +
   Next at 367px and Next wrapped under the numbers on four of six templates. Narrower
   sides on both buttons, same height. !important only because Next's sides come from
   the id-scoped button rule; an author's own mobile padding (m_btn_pad, id-scoped
   !important) still wins over this. */
@media (max-width: 480px) {
  .sqp-page-nav { gap:6px; }
  .sqp-quiz-container .sqp-page-nav .sqp-page-prev,
  .sqp-quiz-container .sqp-page-nav .sqp-page-next { padding-left:18px !important; padding-right:18px !important; }
}

/* Category headers.

   THE BAND PAINTS ITS OWN SURFACE. These stand OUTSIDE the template's card, one
   heading above the group of questions the category owns, so they cannot borrow
   the card's ink the way .sqp-fe-q-title can. The per-template color block far
   below used to hand them --sqp-sp-title-color, which is chosen to read on a
   DARK card, while the band itself was painted on nothing: on cinematic, modern
   and aurora that put near-white text straight onto the host page. Measured on
   aurora, the name was #f6f5f4 on #f1f5f9 and the only thing left to say a
   category had started was the primary underline.

   It carries a light card, secondary ink and a primary edge now, the same way
   .sqp-page-num paints the page numbers that sit in this same out-of-card band.
   That reads on all six templates without needing to know which one is under it. */
.sqp-cat-header {
  background:#fff;
  border:1px solid #e2e8f0;
  border-left:4px solid var(--sqp-primary, #f05451);
  border-radius:10px;
  box-shadow:0 1px 3px rgba(16,24,40,.06);
  padding:13px 18px;
  margin:20px 0 14px;
  font-size:17px; font-weight:700; line-height:1.35;
  color:var(--sqp-secondary, #0f2e47);
}
.sqp-page-group .sqp-cat-header:first-child,
.sqp-page-group .sqp-cat-steps + .sqp-cat-header { margin-top:0; }

/* Category strip over category pages: "Part 2 of 5", then a tab per category. A light
   card of its own, like .sqp-cat-header, so it reads over every template's backdrop.
   Current: the secondary, filled. Done: a primary tint with a tick. To come: plain. */
/* Capped and centred: on the full-width templates (modern) the page is the whole screen,
   and a strip from edge to edge sat flush against the window while the questions under it
   kept to a centred column. */
.sqp-cat-steps { width:100%; max-width:900px; box-sizing:border-box; margin:0 auto 14px; align-self:center; }
/* The strip says where the taker is, so the progress bar would only repeat it. */
.sqp-quiz-container.sqp-has-cat-steps .sqp-progress-wrap { display:none !important; }
.sqp-cat-steps-part {
  display:inline-block; margin:0 0 8px; padding:3px 12px; border-radius:99px; background:#fff;
  box-shadow:0 1px 3px rgba(16,24,40,.08); font-size:13px; font-weight:700; letter-spacing:.02em;
  color:var(--sqp-secondary, #0f2e47);
}
.sqp-cat-steps-tabs {
  display:flex; flex-wrap:wrap; overflow:hidden;
  background:#fff; border:1px solid #e2e8f0; border-radius:12px;
  box-shadow:0 1px 3px rgba(16,24,40,.06);
}
.sqp-cat-step {
  flex:1 1 120px; padding:12px 10px; text-align:center;
  font-size:14px; font-weight:700; line-height:1.3; color:var(--sqp-secondary, #0f2e47);
}
.sqp-cat-step + .sqp-cat-step { border-left:1px solid #e2e8f0; }
.sqp-cat-step.is-done { background:color-mix(in srgb, var(--sqp-primary, #f05451) 10%, #fff); color:var(--sqp-primary, #f05451); }
.sqp-cat-step.is-done::before { content:'\2713\00a0'; }
.sqp-cat-step.is-current { background:var(--sqp-secondary, #0f2e47); color:var(--sqp-secondary-text, #fff); }
@media (max-width: 480px) {
  .sqp-cat-step { flex-basis:45%; font-size:13px; padding:10px 8px; }
  /* A gutter like the answer cards': on modern the page runs to the screen edge. */
  .sqp-cat-steps { padding:0 8px; }
}

/* Category anchor links */
.sqp-cat-links { display:flex; gap:8px; flex-wrap:wrap; padding:8px 0 14px; margin-bottom:6px; border-bottom:1px solid #e2e8f0; }
.sqp-cat-link { font-size:13px; font-weight:600; text-decoration:none; padding:4px 12px; border-radius:16px; background:#f1f5f9; transition:all .2s; }
.sqp-cat-link:hover { background:rgba(240,84,81,.08); }

/* Same-page nav */
.sqp-sp-nav { justify-content:center; padding:16px 0; }

/* ── Popup / Display Mode ── */

/* Full-screen overlay (exit, button click, time, scroll) */
.sqp-popup-overlay { position:fixed; top:0; left:0; width:100%; height:100%; z-index:999999; display:flex; align-items:center; justify-content:center; }
.sqp-popup-backdrop { position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(15,46,71,.55); backdrop-filter:blur(3px); }
/* The shell carries the SIZE the box used to carry, so the close button has
   something the box's width to hang off without being clipped by its overflow. */
.sqp-popup-overlay .sqp-popup-shell { position:relative; width:92%; max-width:680px; }
.sqp-popup-overlay .sqp-popup-box { position:relative; width:100%; max-height:85vh; overflow-y:auto; background:#fff; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.25); animation:sqpPopIn .3s ease; }
@keyframes sqpPopIn { from { opacity:0; transform:scale(.95) translateY(12px); } to { opacity:1; transform:scale(1) translateY(0); } }

/* Corner popup */
.sqp-popup-corner { position:fixed; z-index:999999; bottom:20px; }
.sqp-popup-corner-right { right:20px; }
.sqp-popup-corner-left { left:20px; }
/* The SHELL carries the width now, so the close button has an edge to hang off
   that the box's overflow-y cannot clip - the same arrangement as the overlay. */
/* 380px is the design width, but it was unconditional, so on a 320px phone the
   shell stayed 380px inside the 300px container the mobile block creates and hung
   70px off the right edge: the close button ended up at right=402 on a 320px
   screen, i.e. entirely off it. Clamped to the viewport here rather than overridden
   in the mobile block, because a `.sqp-popup-corner .sqp-popup-shell` rule up there
   carries the same (0,2,0) specificity as this one and would lose to it on order.
   calc(100vw - 20px) matches the 10px inset that block sets on each side. */
.sqp-popup-corner .sqp-popup-shell { position:relative; width:min(380px, calc(100vw - 20px)); }
.sqp-popup-box-corner { width:100%; max-height:70vh; overflow-y:auto; background:#fff; border-radius:14px; box-shadow:0 8px 40px rgba(0,0,0,.2); animation:sqpSlideUp .35s ease; }
@keyframes sqpSlideUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }

/* SHORT VIEWPORT, PICTURE-ONLY WIDGET. Measured on iPhone SE landscape (568x320):
   .sqp-popup-box-corner is 224px tall (max-height:70vh) but the start image alone
   is 280px (an authored height, max-height:none) - taller than the whole box, so
   the widget shows a picture and nothing else: no title, no description, no
   button, until the visitor scrolls inside it. Gated on max-height, not
   max-width, because the trigger is a short viewport, not a narrow one - a
   landscape phone is plenty wide. Popup and corner only: an in-page quiz has no
   such ceiling and is untouched. Routed through --sqp-popup-img-max-h (default
   30vh) rather than a bare number, so an author can still override it; max-height
   rather than height, so the authored size stays authoritative until it would
   exceed the cap. */
@media (max-height:560px) {
  .sqp-popup-overlay .sqp-start-image img,
  .sqp-popup-overlay .sqp-oc-image img,
  .sqp-popup-corner .sqp-start-image img,
  .sqp-popup-corner .sqp-oc-image img {
    max-height: var(--sqp-popup-img-max-h, 30vh);
    object-fit: cover;
  }
}

/* A CORNER WIDGET IS ONE COLUMN, whatever the question asked for.
   The shell above is 380px, so two across is a ~165px tile and five across is ~60px:
   a picture answer's label wraps to three lines and a word like "Freelance" hyphenates.
   A column count is a choice the author made for a full-width card, and this container
   cannot honour it - the same call the 768px breakpoint already makes for a phone, made
   here for the same reason and with the same rule.
   Width only. flex-flow, the image stacking and the padding stay as the grid layouts set
   them, so a picture answer keeps its picture-over-text card and simply gets the row.
   .sqp-fe-answers is in the selector for SPECIFICITY, not for reach - it is the element
   the layout class already sits on. classic and lumen each emit their own column widths
   from templates/<tpl>/questions.php at (0,3,0), inline and therefore after this file,
   so an equal-weight rule here would lose on source order. (0,4,0) wins on its own. */
.sqp-popup-corner .sqp-fe-answers.sqp-fe-layout-col2 .sqp-fe-answer,
.sqp-popup-corner .sqp-fe-answers.sqp-fe-layout-col3 .sqp-fe-answer,
.sqp-popup-corner .sqp-fe-answers.sqp-fe-layout-col4 .sqp-fe-answer,
.sqp-popup-corner .sqp-fe-answers.sqp-fe-layout-col5 .sqp-fe-answer { width:100%; min-width:0; }

/* NO FIELD INSET IN THE CORNER.
   aurora pads its container to leave the card shadow somewhere to fall -
   clamp(16px, 3vw, 40px) clamp(12px, 3vw, 32px) - and lumen keeps 14px under its
   card. Both are measured in vw against the VIEWPORT, not this 380px shell, so on
   a desktop they spend 40px top and bottom and 32px a side of a widget that only
   has 380 to give, and the card reads as a small thing floating in a white frame.
   The card keeps its OWN padding (aurora head and body are 24px each), so nothing
   here pushes text against the edge - what goes is the frame around the frame. */
/* border-radius:0 for the same reason, one layer out: lumen rounds its field to 24px
   while .sqp-popup-box-corner rounds to 14px, so the tinted panel curved away INSIDE
   the white box and left a white crescent at each corner - which reads as a border the
   design never asked for. The box already clips to its own radius (it has overflow-y),
   so the container squares off and lets the box own the corner. */
.sqp-popup-corner .sqp-quiz-container { padding:0; border-radius:0; }

/* MODERN RE-FLOWS THE DEFAULT COLUMN INTO TWO, AND KEYS IT TO THE WINDOW.
   templates/modern/questions.php turns .sqp-fe-layout-col1 into a two-column GRID
   inside @media (min-width:560px) - its own comment says "Below 560px they stack,
   because two 150px cards are worse than one readable one", which is exactly this
   widget's case, except the query asks the viewport and the viewport is 1440.
   The one-column rule further up does not catch it twice over: the layout class is
   col1, not col2-5, and a grid ignores a width on the item anyway. So the column
   count is reset where it is actually set. */
.sqp-popup-corner .sqp-q-tpl8 .sqp-fe-answers.sqp-fe-layout-col1 { grid-template-columns:1fr; }
/* And the same vw trap aurora had, one element in: modern insets its screen and its
   progress bar by clamp(16px,4vw,40px), which is 40px on any desktop - 80px of a
   380px widget. 16px is the floor modern itself chose for a narrow container. */
.sqp-popup-corner .sqp-template-modern .sqp-screen,
.sqp-popup-corner .sqp-template-modern .sqp-progress-wrap {
  padding-left:16px; padding-right:16px;
}

/* AURORA IS ALREADY BUILT FOR A NARROW CARD - THE RULE JUST NEVER FIRES HERE.
   templates/aurora/questions.php ends with an @media (max-width:600px) block that
   takes the head and body in from 24px to 18px. A media query asks the VIEWPORT,
   and this shell is 380px on a 1440px desktop, so the widget renders at the full
   card inset inside a third of the width it was drawn for. Same shape of problem
   as the vw padding above, same answer: state the narrow-container values here,
   keyed to the container instead of the window.
   The numbers are aurora own, lifted from that block rather than invented, so the
   widget and a phone agree. Padding only - the block also drops two font sizes,
   left alone because type was not what was asked for. */
.sqp-popup-corner .sqp-q-tpl-au .sqp-au-head { padding:18px 18px 14px; }
.sqp-popup-corner .sqp-q-tpl-au .sqp-au-body { padding:0; }
/* The nav margin was -18px to cancel the body side padding so the footer rule could
   reach the card edge. With the body at 0 that pull has nothing to cancel: it would
   hang the nav 18px past the card on each side (clipped by .sqp-au-card overflow) and
   sit the button hard against the edge. Zeroed to match the body. */
.sqp-popup-corner .sqp-q-tpl-au .sqp-fe-nav  { margin:16px 0 0; padding:14px 0; }

/* ELEGANT PUTS FOUR FRAMES INSIDE THE 380px SHELL, AND THREE OF THEM ARE THE SAME FRAME.
   Measured on the question screen before this: .sqp-screen inset 24px, .sqp-q-tpl6-outer
   another 24, the card .sqp-q-tpl another 32, and .sqp-fe-question another 28 - 108px of
   padding on each side, which leaves the title, the description and every answer 164px of
   a 380px widget to live in. "Which best describes you?" took two lines, every one of the
   four answers took two, and the card started 104px down the box.

   None of those numbers is wrong for the page this template was drawn for, and the plugin
   already knows what they should be in a narrow container - it just asks the wrong thing.
   buildStyleCSS emits both outer paddings a second time inside @media (max-width:600px),
   as min(24px,16px), and the inner card as min(32px,18px); .sqp-fe-question has 20px 16px
   in this file's own @media (max-width:768px) block. All three ask the VIEWPORT, which is
   1440 on a desktop, so the widget renders at full page scale. The values below are those
   blocks' own figures, restated against the container instead of the window.

   The one number not lifted from them is .sqp-q-tpl6-outer, which goes to 0 rather than to
   16. That padding exists so the background PHOTOGRAPH shows around the card - it is what
   this template is - and buildStyleCSS already unsets bg_img for a popup, so in here it
   frames nothing but the screen's own fill. Same call, and the same reason, as the
   container padding aurora and lumen lost further up: what goes is the frame around the
   frame. The screen keeps its 16px so the card is not pressed into the box's own radius.
   It is set as the VARIABLE rather than as padding, on the screen, because each of the
   four screens has its own wrapper class (.sqp-q-tpl6-outer, .sqp-start-tpl6-outer,
   .sqp-lg-tpl6-outer, .sqp-oc-tpl6-outer) and all four read --sqp-sp-tpl6-outer-p. The
   declaration sits on a DESCENDANT of the container, which is how it beats the same
   variable set at #sqp-quiz-N without needing any weight of its own.

   !important on the two paddings, and only on those two: buildStyleCSS writes them as
   `#sqp-quiz-N .sqp-screen` and `#sqp-quiz-N .sqp-q-tpl`, so no selector made of classes
   can outrank them. Everything else in this block wins on ordinary specificity. */
.sqp-popup-corner .sqp-template-elegant .sqp-screen {
  /* 0, not 16: elegant's card is a tinted panel and the box behind it is white, so
     an inset here is not breathing room - it draws a white frame around the card, which
     at 380px reads as a border the widget was never given. The card carries its own
     18px, so nothing touches the edge, and the box's 14px radius clips the corners now
     that the two meet. */
  padding:0 !important;
  --sqp-sp-tpl6-outer-p:0px;
}
.sqp-popup-corner .sqp-template-elegant .sqp-start-tpl,
.sqp-popup-corner .sqp-template-elegant .sqp-lg-tpl,
.sqp-popup-corner .sqp-template-elegant .sqp-oc-tpl,
.sqp-popup-corner .sqp-template-elegant .sqp-q-tpl { padding:18px !important; }
/* The question inside the card is the fourth inset and the only one this file owns
   outright. The progress slot has to move with it: templates/elegant/questions.php pads
   the slot by 28 to line the bar up with .sqp-fe-question's 28, and says in its own
   comment that a template re-padding the question has to re-pad this too. */
.sqp-popup-corner .sqp-q-tpl6 .sqp-fe-question { padding:20px 16px; }
.sqp-popup-corner .sqp-q-tpl6 .sqp-progress-slot { padding:0 16px; }

/* AND THEN THE VERTICAL RHYTHM, which was picked against a 700px card and reads as drift
   in a 380px one. The description held 24px off the answers (--sqp-sp-desc-mb), and the
   answer list held another 20 off the nav, which then adds its own 16 - 36px of nothing
   between the last option and the Next button, inside a box capped at 70vh. The answers'
   bottom margin goes entirely rather than shrinking, because .sqp-fe-nav already states
   the gap it wants from whatever sits above it; two margins stacking is what made it 36.
   The adjacent-sibling rule gets the same 16 so a question with no description keeps the
   same gap as one that has it. */
.sqp-popup-corner .sqp-q-tpl6 .sqp-fe-q-desc { margin-bottom:16px; }
.sqp-popup-corner .sqp-q-tpl6 .sqp-fe-q-title + .sqp-fe-answers,
.sqp-popup-corner .sqp-q-tpl6 .sqp-fe-q-image + .sqp-fe-answers { margin-top:16px; }
.sqp-popup-corner .sqp-q-tpl6 .sqp-fe-answers { margin-bottom:0; }

/* THE OLD PLUGIN HANGS IT OFF THE CORNER, on a white disc: .close_Side_Popup is
   34px, border-radius:100%, at right:-14px/top:-18px. Ours sat inside the card on
   the reasoning that a corner popup is already against the screen edge - but the
   container is inset 20px, so outside lands 8px in, not off-screen, and the old
   site proves it by doing exactly this at an inset of 15px. */
.sqp-popup-corner .sqp-popup-close {
  top:-12px; right:-12px; width:34px; height:34px; padding:0;
  background:#fff; color:#989898; border-radius:50%;
  font-size:24px; line-height:34px; text-align:center;
  box-shadow:0 0 4px rgba(0,0,0,.35);
}
.sqp-popup-corner .sqp-popup-close:hover { color:#fff; background:#333; }
/* Close button: hung off the box for the corner popup, above it for the overlay. */
/* min-width/min-height:44px is the WCAG 2.5.5 / Apple HIG tap-target floor. The
   glyph stayed 28px and stayed at top:8px/right:10px - only the hit area grew -
   and since min-width/min-height are separate properties they still apply even
   where a more specific rule below (corner's 34px circle, overlay's 40px) sets
   its own width/height; the used value is clamped up to 44 regardless. Flex
   centering replaces line-height centering now that the box can be taller than
   the glyph. */
.sqp-popup-close { position:absolute; top:8px; right:10px; z-index:10; background:none; border:none; font-size:28px; line-height:1; color:#94a3b8; cursor:pointer; padding:4px 8px; border-radius:6px; transition:all .15s; min-width:44px; min-height:44px; display:flex; align-items:center; justify-content:center; }
.sqp-popup-close:hover { color:#f05451; background:rgba(240,84,81,.08); }
/* On the overlay it sits ABOVE the white box, on the backdrop, so it never covers the
   quiz's own top-right corner and cannot be scrolled away with the content. White
   against the dimmed backdrop rather than the grey that read on white, and a hit area
   big enough to be a target in its own right now that nothing else is near it. */
.sqp-popup-overlay .sqp-popup-close {
  top:-46px; right:0; font-size:34px; color:#fff; opacity:.85;
  width:40px; height:40px; padding:0; display:flex; align-items:center; justify-content:center;
}
.sqp-popup-overlay .sqp-popup-close:hover { color:#fff; opacity:1; background:rgba(255,255,255,.16); }
/* No room above the box on a short screen, so it comes back inside rather than
   sitting off the top of the viewport. */
@media (max-height:560px) {
  .sqp-popup-overlay .sqp-popup-close { top:6px; right:8px; color:#94a3b8; opacity:1; font-size:28px; }
  .sqp-popup-overlay .sqp-popup-close:hover { color:#f05451; background:rgba(240,84,81,.08); }
}

/* Quiz container inside popup */
/* min-height:0 belongs in this list too. modern's field is a full-window sheet -
   .sqp-template-modern carries min-height:calc(100vh - adminbar) - and aurora and
   lumen have floors of their own. A 900px floor inside a box capped at 70vh (630px)
   does not make the box taller, it makes it SCROLL, and a start screen with 184px of
   content came out as a tall panel with the words stranded in the middle of it. The
   popup box is the frame now; the quiz inside it should be as tall as it is. */
.sqp-popup-box .sqp-quiz-container { max-height:none; min-height:0; overflow:visible; max-width:100%; }
.sqp-popup-box .sqp-screen { border:none; box-shadow:none; border-radius:0; margin-top:0; overflow:visible; }
.sqp-popup-box .sqp-screen::before { display:none; }

/* The progress bar inside a popup.

   The bar is a CONTAINER-level element, so in a popup it is the first thing in
   the box, and the box has no padding of its own. Left alone it ran edge to
   edge through the box's 14px rounded corners, its label sat on the very top
   line, and the percentage (which is right-aligned) landed underneath the close
   button. Measured on a 680px box: the percentage spanned 1282-1300 and the
   close button 1258-1290, so they overlapped outright.

   Padding here rather than on .sqp-popup-box, because the screens below want to
   keep painting to the box's own edges: each template owns its card padding. */
.sqp-popup-box .sqp-progress-wrap { padding:18px 20px 0; margin-bottom:14px; }
/* Keeps the percentage clear of the close button (10px inset + 32px wide). */
.sqp-popup-box .sqp-progress-info { padding-right:34px; }

/* CLASSIC'S CARD USED TO NEED A FLOOR HERE, and an even frame on the outcome, and
   then a pair of rules zeroing both again in the corner widget. All three are gone,
   because all three were treating the symptom.
   The card was inset 30px left and right in the modal and flush top and bottom, so
   it read as cut off; the fix was to give it the two missing edges. But the inset
   itself was never wanted. It came from the renderer capping the container at the
   author's template width - 620px, chosen for a column on a page - inside a 680px
   box that had already decided how wide the quiz was. In the 380px corner the same
   cap did nothing, so the 30px matched no sides at all and showed as white bands.
   The cap is now skipped in a popup (see the classic width block in
   class-sqp-renderer.php, and --sqp-sp-tmpl-w: 100% beside it), the card fills the
   box on every screen the way elegant, aurora, cinematic and lumen already did, and
   there is nothing left for a margin to correct. */

/* MODERN'S OPT-IN SPENT A THIRD OF THE POPUP ON FRAME. Three layers of padding
   stack on this screen, each reasonable on a full-width page and written without
   knowing about the others: the container pads 54px 0, the screen 0 40px, and the
   card adds margin 0 40px on top of its own padding 40px 36px. Measured in a 680px
   box that is 120px of inset EACH SIDE and 94px above the heading, which left the
   form exactly 440px, and the form's max-width is 440, so it was pinned against
   its own ceiling with no room to give.
   Same reasoning as .sqp-popup-corner .sqp-quiz-container above: what goes is the
   frame around the frame, and the card keeps its own padding so nothing is pushed
   against an edge. The form's cap is lifted with them, or the fields stay 440 wide
   and the space simply moves from padding to margin without looking any different.
   Scoped to modern, which is the template that stacks all three. */
/* ELEGANT FILLS THE POPUP. Its card is a translucent scrim, drawn to sit ON the
   template's photograph, so in a popup, where there is no photograph behind it,
   a white frame around it reads as a grey box inside a white box rather than as
   an inset. Two layers were paying for that frame: the screen puts the outer 24px
   in and .sqp-q-tpl6-outer pads another 24, so the card sat 48px off every edge.
   Both go, and the card squares its corners off because the box already clips to
   its own 14px radius (it has overflow-y): the same arrangement as
   .sqp-popup-corner .sqp-quiz-container above. The card keeps its own 32px
   padding, so nothing is pushed against an edge. */
.sqp-popup-box .sqp-template-elegant .sqp-screen,
.sqp-popup-box-corner .sqp-template-elegant .sqp-screen { padding:0; }
.sqp-popup-box .sqp-template-elegant .sqp-q-tpl6-outer,
.sqp-popup-box-corner .sqp-template-elegant .sqp-q-tpl6-outer { padding:0; }
.sqp-popup-box .sqp-template-elegant .sqp-q-tpl6,
.sqp-popup-box-corner .sqp-template-elegant .sqp-q-tpl6 { border-radius:0; }

/* AURORA FILLS THE POPUP TOO. Its container pads clamp(16px,3vw,40px):
   "room for the card's shadow to fall", which is right on a page and dead space
   in a modal, where the box is already the frame and paints the ground the card
   would cast onto. Measured at 680: 40px above the card and 32 either side, with
   the card then capped at 620 inside what was left.
   The cap goes with the padding for the same reason it did on elegant: remove
   one without the other and the space moves from padding to margin, unchanged to
   look at. The card squares its corners because the box clips to its own 14px
   radius, so the box owns the corner.
   Class-level rules, unlike elegant's: aurora's frame is set in this stylesheet
   rather than emitted id-scoped by the renderer, so specificity is enough. */
.sqp-popup-box .sqp-template-aurora,
.sqp-popup-box-corner .sqp-template-aurora { padding:0; }
.sqp-popup-box .sqp-template-aurora .sqp-au-card,
.sqp-popup-box .sqp-template-aurora .sqp-fe-answer-review,
.sqp-popup-box-corner .sqp-template-aurora .sqp-au-card,
.sqp-popup-box-corner .sqp-template-aurora .sqp-fe-answer-review { max-width:none; border-radius:0; }
/* The SCREEN WRAPPERS carry the same cap and were missed the first time: only the
   question screen's wrapper is uncapped, so lifting it on .sqp-au-card alone left
   start, opt-in and outcome at 620 inside a 680 box: 30px of white down each
   side, on those three screens only. */
.sqp-popup-box .sqp-template-aurora .sqp-start-tpl,
.sqp-popup-box .sqp-template-aurora .sqp-lg-tpl,
.sqp-popup-box .sqp-template-aurora .sqp-oc-tpl,
.sqp-popup-box .sqp-template-aurora .sqp-fe-answer-review,
.sqp-popup-box-corner .sqp-template-aurora .sqp-start-tpl,
.sqp-popup-box-corner .sqp-template-aurora .sqp-lg-tpl,
.sqp-popup-box-corner .sqp-template-aurora .sqp-oc-tpl,
.sqp-popup-box-corner .sqp-template-aurora .sqp-fe-answer-review { max-width:none; }

/* THE ANSWER ROW'S CHROME COMES DOWN WITH ITS TYPE. buildStyleCSS() scales the
   font in a popup (0.9 in the box, 0.8 in the corner) but the row's padding and
   its A/B/C badge are fixed pixels, so they did not follow: measured in the
   corner widget, a 62px row carrying one line of 12px text, because classic sets
   the badge to 32x32 and the badge alone is 34px of content height. A row five
   times the height of the text in it reads as an oversized button, and in a 380px
   widget three of them fill the box before the question is answered.
   Sized against the type rather than picked: the badge lands near the row's line
   box, and the padding keeps the same ratio to it that the full-size row has.
   Specificity is 0,3,0 on purpose - the templates set the badge at 0,2,0 from
   markup that loads after this file, so 0,2,0 here would lose the tie. */
.sqp-popup-box .sqp-quiz-container .sqp-fe-answer { padding:12px 14px; }
.sqp-popup-box .sqp-quiz-container .sqp-fe-answer-letter {
  width:26px; height:26px; font-size:12px;
}
.sqp-popup-corner .sqp-quiz-container .sqp-fe-answer { padding:10px 12px; gap:8px; }
.sqp-popup-corner .sqp-quiz-container .sqp-fe-answer-letter {
  width:22px; height:22px; font-size:11px;
}

.sqp-popup-box .sqp-quiz-container.sqp-template-modern { padding:28px 0; }
.sqp-popup-box .sqp-template-modern .sqp-screen-leadgen { padding:0 24px; }
.sqp-popup-box .sqp-template-modern .sqp-lg-tpl8 { margin:0 auto; max-width:none; }
.sqp-popup-box .sqp-template-modern .sqp-lg-form { max-width:none; }

/* THE CARD NEEDS A FLOOR TO STAND ON. The progress bar above pays for the top
   inset and each template's card carries its own left and right margin, measured
   on classic in an overlay popup: 30px each side, 14px under the progress bar, and
   ZERO at the bottom. So the card ran flat into the box's edge, which does two
   things at once: it reads as the card being cut off, and it hides the card's own
   8px corner behind the box's 14px one, so the bottom corners look wrong rather
   than merely tight.
   On the BOX rather than on each template's card: the box is the thing whose edge
   is being met, this is the one place that knows it, and a card is free to keep
   painting to its own edges everywhere else.
   The scroll container honours end padding, so a popup long enough to scroll keeps
   the same floor once it reaches the bottom. */

/* LUMEN'S CONTENT COLUMN IS WIDER THAN THE BOX IT IS IN, AND TWO THINGS RIDE ON IT.
   --sqp-lm-col is --sqp-sp-inner-w, 720px on this template, while the box is 680
   (modal) or 380 (corner). The column drives BOTH the progress bar's width and the
   back button's position: templates/lumen/questions.php anchors that button to the
   column's left edge with left:calc(50% - var(--sqp-lm-col)/2). At 720px inside a
   380px shell that is -170px - the button is off-screen, clipped by the box - while
   .sqp-progress-wrap goes on reserving 56px of left padding to clear it. What that
   draws is a bar shoved in from the left with nothing in the space it made.
   Capping the column at the box puts the column edge on the box edge: the button
   resolves to 0 and the reserve has its button back. */
.sqp-popup-box .sqp-template-lumen { --sqp-lm-col: 100%; }

/* THE MODAL NEEDS THE SAME THREE FIXES THE CORNER GOT. The note below says the
   680px modal "has the room lumen's own numbers were chosen for", measured, it
   does not, and for the same reason: --sqp-lm-col:100% resolves the button's
   left:calc(50% - col/2) to 0, so it sits hard against the box edge inside its
   14px radius and is clipped. 20px puts it on the content's own measure.

   THE BAR THEN GETS THE SAME INSET ON BOTH SIDES. lumen reserves 56px on the left
   for that button and 20px on the right, which is invisible on the wide card it
   was written for and lopsided here, and on the start screen and Q1, where there
   is no back button, it is 56px of nothing. 56px both sides is the smallest
   symmetric inset that still clears a button occupying 20–48.

   AND THE STICKY NAV GETS A SOLID BACKGROUND. The card is taller than the box, so
   the box scrolls and the nav: position:sticky, bottom:0, floats over the list,
   which is what keeps Next reachable and is correct. What is not correct is that
   its background is a gradient running from TRANSPARENT at 0% to the card colour
   at 18%: the top fifth of the bar shows whatever is beneath it, so the last
   option reads as if the button were sitting on top of it. Measured, the two
   overlap by 3px. Solid, the bar masks what it covers and the overlap stops being
   visible: the option is still reachable by scrolling, as it was.
   (Bounding the card to the box was tried first and does nothing: max-height:100%
   on the screen resolves against a container whose own height is a max-height, not
   a definite one, so the chain never gets a height to shrink into. Same trap as
   .sqp-template-elegant further up.) */
.sqp-popup-box .sqp-template-lumen .sqp-fe-btn-back { left:20px; }
.sqp-popup-box .sqp-template-lumen .sqp-progress-wrap { padding-left:56px; padding-right:56px; }
.sqp-popup-box .sqp-template-lumen .sqp-fe-nav { background:var(--sqp-sp-frame-bg, var(--sqp-sp-tmpl-bg, #f5f6f8)); }
/* THE BACK BUTTON, WHICH THIS FILE BROKE TWICE ON THE WAY HERE.
   It is absolutely positioned, so two of the rules above moved it without meaning to:
     - --sqp-lm-col:100% put left:calc(50% - col/2) at 0, i.e. hard against the card
       edge. lumen's own answer for a narrow container is a flat left:20px, but that
       lives in an @media (max-width:520px) block and the viewport here is 1440.
     - .sqp-popup-corner .sqp-quiz-container{padding:0} took away lumen's 16px top,
       which the flow content sits under but the button - positioned against the
       PADDING box, which padding does not move - does not. The bar rose 16px and the
       button stayed, so it dropped out of its row and into the heading.
   padding-top comes back, which re-aligns the pair and lifts the bar off the top edge.
   The button then shrinks to 24px and sits at left:6px: 6-30, clear of the 36px the
   progress bar and the answers both start at, and vertically centred on the bar's row
   (16px padding + (28 - 24) / 2 = 18). 20px would have been lumen's own number but it
   was chosen against a 56px bar inset, and this widget's bar starts at 36. */
.sqp-popup-corner .sqp-template-lumen { padding-top:16px; }
.sqp-popup-corner .sqp-template-lumen .sqp-fe-btn-back {
  left:6px; top:18px;
  width:24px; height:24px; min-width:24px;
  background-size:14px;
}
/* AND THE RESERVE GETS THE SAME AMOUNT BACK ON THE OTHER SIDE.
   lumen pads this 56px left / 20px right: the left is a slot for the back button,
   which is absolutely positioned at the column edge and sits in this row. That
   lopsidedness is invisible on a 700px card and obvious in a 380px one, and on the
   start screen and Q1 - where there is no back button to fill it - it reads as the
   bar having simply been pushed off centre.
   It cannot be symmetric at the content measure (20px): the button occupies 0-28px,
   so a bar starting at 20 would run underneath it. 36px is the smallest symmetric
   inset that clears the button, and it is also exactly where the answers now start
   (.sqp-fe-question 20px + .sqp-fe-answers 16px), so the bar and the answer column
   share an edge instead of each having their own.
   Corner only - the 680px modal has the room lumen's own numbers were chosen for. */
.sqp-popup-corner .sqp-template-lumen .sqp-progress-wrap { padding-left:36px; padding-right:36px; }
/* The answers come in off the question's own measure. .sqp-fe-question pads 20px a
   side, so in a 380px shell an answer is 340px of unbroken chip - wider than the
   heading needs to be readable and, stacked five deep in one column, the widest thing
   in the widget. 16px more each side takes them to ~308px and leaves the heading on
   the full measure, so the eye has an edge to run down. Corner only: at 680px the
   modal already has the proportion this is trying to recover. */
.sqp-popup-corner .sqp-template-lumen .sqp-fe-answers { padding-left:16px; padding-right:16px; gap:8px; }
/* AND THE CHIP ITSELF STOPS BEING A BUTTON THE SIZE OF A CARD ROW.
   lumen gives an answer min-height:64px with 12px/16px padding and a 14px gap. That
   is a generous target on a 700px card; in a 380px widget four of them are 4x64 plus
   3x14 = 298px of a box that is capped at 70vh, so the answers alone crowd out the
   question above them and the button below.
   44px is not an arbitrary shrink - it is what one line actually needs here: 15px
   type at line-height 1.375 is ~21px, plus 10px padding twice, plus the 1.6px border
   twice. So the chip now fits its content instead of padding out to a fixed target,
   and a two-line answer still grows past it. Radius comes 16 -> 12 to stay in
   proportion with the smaller box. Saves ~98px, which is a whole extra answer.
   Corner only, and lumen only - modern is the other template with a min-height (60px)
   and will want the same treatment when someone looks at its widget. */
.sqp-popup-corner .sqp-template-lumen .sqp-fe-answer {
  min-height:44px; padding:10px 14px; border-radius:12px;
}

/* Button click trigger (inline start screen) */
.sqp-popup-trigger { cursor:pointer; }
.sqp-popup-trigger .sqp-start-btn { cursor:pointer; }
/* A BUTTON-CLICK TRIGGER IS A BUTTON ON SOMEBODY'S PAGE, NOT A QUIZ CARD.

   Button Only already hides everything except the button, so what is left is a
   bordered, padded, background-painted card wrapped around one control - chrome
   with nothing in it. Scoped to the trigger, so an in-page Button Only quiz
   (where the card IS the quiz) keeps its own.

   !important is load-bearing here and not laziness: the card's background comes
   from the style system, which emits it at id level (#sqp-popup-ph-N .sqp-start-tpl
   so the trigger is styled like the rest of the quiz), and no class selector can
   outrank an id. */
.sqp-popup-trigger .sqp-start-tpl.sqp-btn-only {
  background:none !important; border:none !important; box-shadow:none !important;
  padding:0 !important; border-radius:0 !important;
}
.sqp-popup-trigger .sqp-start-tpl.sqp-btn-only::before { display:none !important; }

/* ── Phone country-code picker ── */
/* The panel is absolutely positioned inside the question screen, and FOUR rules
   clip that screen: .sqp-quiz-container, .sqp-screen and
   .sqp-questions-wrap .sqp-screen-question below, plus the renderer's own
   id-level copy per template. The 141-country list is 279px tall against a card
   that is often ~210px, so it was cut off and only the search box and ONE row
   showed: the picker read as broken rather than as scrollable. The clip is
   wanted for the screen transition and for a template frame's rounded corners,
   so it is lifted only WHILE the picker is open (.sqp-cc-open, set by the
   engine). !important because the renderer's rule is id-level and outranks any
   class selector we could write here. */
.sqp-quiz-container.sqp-cc-open,
.sqp-quiz-container.sqp-cc-open .sqp-screen,
.sqp-quiz-container.sqp-cc-open .sqp-questions-wrap .sqp-screen-question { overflow: visible !important; }
.sqp-phone-cc-btn { cursor: pointer; user-select: none; white-space: nowrap; }
/* The caret has to read as a caret. At 10px and .6 opacity, next to a 15px 600-weight
   dial code, it rendered as a hyphen: the chip looked like the text "+1 -" rather
   than a control you can open, so nothing indicated the country was changeable.
   12px at .75 is still quiet against the code but is legibly a triangle on a phone.
   The chip's tap height is handled with the other form controls above
   (.sqp-fe-phone-code gets min-height:44px on coarse pointers: the engine adds
   .sqp-phone-cc-btn to that same span, see plantPicker in sqp-frontend.js). */
.sqp-phone-cc-btn::after { content: '▾'; font-size: 12px; margin-left: 6px; opacity: .75; line-height: 1; }
.sqp-phone-cc-btn:hover { color: var(--sqp-primary, #f05451); }
.sqp-phone-cc-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
  width: 260px; max-width: 90vw; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 46, 71, .12); padding: 8px;
}
.sqp-phone-cc-search {
  width: 100%; box-sizing: border-box; padding: 7px 10px; margin-bottom: 6px;
  border: 1.5px solid #e2e8f0; border-radius: 7px; font-size: 13px; outline: none;
}
.sqp-phone-cc-search:focus { border-color: var(--sqp-primary, #f05451); }
.sqp-phone-cc-list { max-height: 220px; overflow-y: auto; }
.sqp-phone-cc-item {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.sqp-phone-cc-item:hover { background: #f1f5f9; }
.sqp-phone-cc-name { color: #334155; }
.sqp-phone-cc-dial { color: #94a3b8; font-weight: 700; }
.sqp-phone-cc-none { padding: 10px; font-size: 12.5px; color: #94a3b8; text-align: center; }

/* ── RTL mode (Settings → General, old sqb_rtl_mode parity) ── */
.sqp-rtl { direction: rtl; text-align: right; }
.sqp-rtl .sqp-fe-answer { text-align: right; }
.sqp-rtl .sqp-fe-nav { flex-direction: row-reverse; }
.sqp-rtl .sqp-progress-wrap { direction: ltr; }        /* bars still fill left→right */
.sqp-rtl .sqp-fe-phone-code { margin-left: 8px; margin-right: 0; }
.sqp-rtl input, .sqp-rtl textarea, .sqp-rtl select { text-align: right; direction: rtl; }

/* Poll: pre-vote results preview + thank-you */
.sqp-poll-preview-link { display:inline-block; margin:10px 0 0; font-size:13px; font-weight:600; color:var(--sqp-primary, #f05451); text-decoration:underline; cursor:pointer; }
.sqp-poll-preview-box { margin-top:10px; padding:12px; background:rgba(0,0,0,.03); border-radius:10px; }
.sqp-mt-poll-thanks { font-size:15px; font-weight:700; margin-bottom:10px; color:var(--sqp-secondary, #0f2e47); }

/* A POLL VOTED ON THE SAME SCREEN (sqp-frontend.js setupSameScreenPoll). The results
   take the answers' place under the question, and a footer carries the vote count,
   the text links (Change Vote, View Results, Back to poll) and the Vote button, with
   a status line above it for a poll that is not open. [hidden] is forced because the
   answer list and the buttons set their own display. */
.sqp-screen-question .sqp-fe-answers[hidden],
.sqp-poll-inplace[hidden],
.sqp-poll-foot [hidden] { display:none !important; }
.sqp-poll-inplace { margin:0 0 16px; }
.sqp-poll-inplace .sqp-mt-poll-thanks { text-align:center; margin:6px 0 14px; }
.sqp-poll-inplace .sqp-mt-poll-results { margin:0; }
.sqp-poll-inplace .sqp-mt-poll-q { margin:0; }
.sqp-poll-inplace .sqp-mt-poll-bar-row { flex-wrap:wrap; gap:6px 10px; margin-bottom:14px; }
.sqp-poll-inplace .sqp-mt-poll-bar-row:last-child { margin-bottom:0; }
.sqp-poll-inplace .sqp-mt-poll-label { flex:1 1 0; min-width:0; font-size:14px; color:var(--sqp-secondary, #0f2e47); text-align:left; white-space:normal; overflow-wrap:anywhere; }
.sqp-poll-inplace .sqp-mt-bar-value { flex:0 0 auto; order:2; font-size:13px; color:var(--sqp-secondary, #0f2e47); text-align:right; }
.sqp-poll-inplace .sqp-mt-bar-track { flex:1 1 100%; order:3; height:12px; }
.sqp-poll-inplace > .sqp-lg-spinner { display:block; margin:12px auto; }
.sqp-poll-foot { margin-top:16px; }
.sqp-poll-msg { margin:0 0 12px; padding:10px 14px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; color:var(--sqp-secondary, #0f2e47); font-size:14px; font-weight:600; text-align:center; }
.sqp-poll-foot-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; }
.sqp-poll-total { font-size:14px; font-weight:700; color:var(--sqp-secondary, #0f2e47); }
.sqp-poll-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px 18px; margin-left:auto; }
.sqp-poll-link { padding:0; border:0; background:none; font:inherit; font-size:14px; font-weight:600; color:var(--sqp-primary, #f05451); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.sqp-poll-link:hover { opacity:.8; }
.sqp-poll-vote:disabled { opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }
.sqp-rtl .sqp-poll-actions { margin-left:0; margin-right:auto; }

/* [SCORE_GAUGE]: thermometer / traffic light. The band colors are set inline by
   the engine (they come from the Display tab's tier settings); everything here is
   just the shape. Text inherits, so it reads on a light or dark result card. */
.sqp-mt-gauge { text-align:center; margin:18px 0; color:inherit; }
.sqp-mt-gauge-val { font-size:26px; font-weight:800; line-height:1.2; margin-top:8px; font-variant-numeric:tabular-nums; }
.sqp-mt-gauge-tier { font-size:12px; text-transform:uppercase; letter-spacing:.6px; opacity:.65; }
/* Thermometer: a tube that fills from the bottom, with the bulb below it. */
.sqp-mt-gauge-therm .sqp-mt-gauge-tube {
  width:26px; height:120px; margin:0 auto; border-radius:99px;
  background:rgba(127,127,127,.18); overflow:hidden;
  display:flex; align-items:flex-end;
}
.sqp-mt-gauge-therm .sqp-mt-gauge-fill { width:100%; border-radius:99px; transition:height .6s ease; }
.sqp-mt-gauge-therm .sqp-mt-gauge-bulb {
  width:38px; height:38px; border-radius:50%; margin:-8px auto 0; position:relative; z-index:1;
}
/* Traffic light: three lamps, the taker's band lit and the others dimmed so the
   scale still reads. */
.sqp-mt-gauge-lamps {
  display:inline-flex; flex-direction:column; gap:7px; padding:10px;
  border-radius:14px; background:rgba(127,127,127,.14);
}
.sqp-mt-gauge-lamp { width:26px; height:26px; border-radius:50%; opacity:.22; transition:opacity .4s ease; }
.sqp-mt-gauge-lamp.sqp-on { opacity:1; box-shadow:0 0 12px currentColor; }

/* [ANSWER_BENCHMARK]: the taker's answer against everyone else's. Reads as one
   block of the result, so it borrows the quiz's own colors rather than bringing
   a palette: the taker's own bar is the primary, the rest are a quiet grey. */
/* Text INHERITS. --sqp-secondary is a brand color an author can set to anything
   (white, on several templates), and using it here painted the labels invisible
   against the result card. Inheriting means the block reads like the description
   it sits inside, on a light or a dark template. */
.sqp-mt-abm { text-align:left; margin:18px 0; color:inherit; }
.sqp-mt-abm-q { font-size:15px; font-weight:700; color:inherit; margin-bottom:2px; }
.sqp-mt-abm-n { font-size:12px; color:inherit; opacity:.6; margin-bottom:12px; }
.sqp-mt-abm-row { margin-bottom:10px; }
.sqp-mt-abm-lbl { display:flex; align-items:center; gap:8px; margin-bottom:4px; font-size:13.5px; color:inherit; }
.sqp-mt-abm-txt { flex:1; }
/* Tabular numerals so the column of percentages lines up down the block. */
.sqp-mt-abm-pct { font-weight:700; font-variant-numeric:tabular-nums; }
.sqp-mt-abm-you {
  font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.5px;
  padding:2px 7px; border-radius:99px;
  background:var(--sqp-primary, #f05451); color:var(--sqp-primary-text, #fff);
}
/* Neutral greys as translucent currentColor for the same reason: a fixed #eef1f5
   track disappears on a light card and glares on a dark one. */
.sqp-mt-abm-track { height:8px; border-radius:99px; background:rgba(127,127,127,.18); overflow:hidden; }
.sqp-mt-abm-fill { height:100%; border-radius:99px; background:rgba(127,127,127,.5); transition:width .5s ease; }
.sqp-mt-abm-mine .sqp-mt-abm-fill { background:var(--sqp-primary, #f05451); }
.sqp-mt-abm-mine .sqp-mt-abm-txt { font-weight:700; }

/* Social Share Buttons */
.sqp-fe-share { text-align:center; padding:16px 0; }
.sqp-fe-share-label { display:block; font-size:13px; font-weight:700; color:#64748b; margin-bottom:10px; text-transform:uppercase; letter-spacing:.5px; }
.sqp-fe-share-btns { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.sqp-fe-share-btn { display:inline-flex; align-items:center; justify-content:center; padding:8px 16px; border-radius:6px; font-size:12px; font-weight:600; text-decoration:none; color:#fff; transition:opacity .2s; }
.sqp-fe-share-btn:hover { opacity:.85; color:#fff; }
.sqp-fe-share-fb { background:#1877f2; }
.sqp-fe-share-tw { background:#0f1419; }
.sqp-fe-share-li { background:#0a66c2; }
.sqp-fe-share-wa { background:#25d366; }
.sqp-fe-share-em { background:#64748b; }
.sqp-fe-share-cp { background:var(--sqp-secondary, #0f2e47); }
.sqp-fe-share-copied { background:#16a34a; }

/* Share-to-unlock gate (old-SQB "Share Screen") */
.sqp-fe-share-gate { text-align:center; padding:40px 24px; }
.sqp-fe-share-gate .sqp-fe-share-label { font-size:18px; text-transform:none; letter-spacing:0; color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47)); }
.sqp-fe-share-gate-msg { min-height:20px; margin:14px 0 4px; font-size:13.5px; font-weight:600; }
.sqp-fe-share-gate-msg.sqp-gate-success { color:#16a34a; }
.sqp-fe-share-gate-msg.sqp-gate-error { color:var(--sqp-primary, #f05451); }
.sqp-fe-share-gate-next { margin-top:12px; }
.sqp-fe-share-gate-next.sqp-gate-locked { pointer-events:auto; cursor:not-allowed; opacity:.55; }

/* ── Told, not just tinted ──────────────────────────────────────────────
   Every message the taker gets: a question they skipped, an address the
   opt-in refused, a share that registered, was a line of colored text with
   nothing around it, which reads as a caption rather than as something that
   happened. They are boxes now: white ground, a 1px edge and text in the same
   color, so the message is an object on the screen instead of a tint on it.

   ERROR IS RED, NOT THE BRAND COLOUR. The share gate drew its failures in
   --sqp-primary, which is red only by accident on a coral quiz; the same code
   on the teal one announced a failure in cheerful teal. Refusal and success
   are the two things on a quiz that must not be themeable, because their
   color IS their meaning.

   :not(:empty) is load-bearing on the share gate: its message element is
   always in the DOM holding a min-height, so an unconditional border would
   draw an empty box above the button on arrival. */
.sqp-quiz-container .sqp-fe-req-error:not(:empty),
.sqp-quiz-container .sqp-lg-error:not(:empty),
.sqp-quiz-container .sqp-fe-share-gate-msg.sqp-gate-error:not(:empty),
.sqp-quiz-container .sqp-fe-share-gate-msg.sqp-gate-success:not(:empty) {
  display:block; background:#fff; border:1px solid currentColor; border-radius:8px;
  padding:11px 16px; margin-top:12px; font-size:13.5px; font-weight:600;
  line-height:1.45; text-align:center; box-sizing:border-box;
}
.sqp-quiz-container .sqp-fe-req-error:not(:empty),
.sqp-quiz-container .sqp-lg-error:not(:empty),
.sqp-quiz-container .sqp-fe-share-gate-msg.sqp-gate-error:not(:empty) { color:#dc2626; }
.sqp-quiz-container .sqp-fe-share-gate-msg.sqp-gate-success:not(:empty) { color:#16a34a; }

/* ── Gamification / Celebration Overlay ── */
.sqp-celebration { position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; flex-direction:column; opacity:0; animation:sqpCelebFadeIn .3s forwards; }
.sqp-celebration-text { font-size:22px; font-weight:800; color:#fff; text-align:center; padding:20px; z-index:2; text-shadow:0 2px 8px rgba(0,0,0,.4); }
@keyframes sqpCelebFadeIn { to { opacity:1; } }
@keyframes sqpCelebFadeOut { to { opacity:0; } }

@keyframes sqpTrophyScale { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

/* Template 4: Golden */
.sqp-celeb-classic { background:linear-gradient(135deg,#E5B25D,#F5D78E,#E5B25D) !important; }
.sqp-celeb-classic .sqp-celeb-emoji { font-size:60px; animation:sqpTrophyScale 1s ease-in-out infinite; }
.sqp-celeb-classic .sqp-celebration-text { color:#5a3e0a; text-shadow:none; }

/* Custom template */
.sqp-celeb-custom .sqp-celeb-custom-img { max-width:280px; max-height:200px; border-radius:12px; z-index:2; }

/* Confetti: the author's backdrop color with the message on a card, and paper
   falling over it. The card is what makes the message readable on a strong color
   the author picked, so it carries its own dark ink rather than the white the
   overlay sets by default. The border draws itself in, which is the beat the old
   plugin's matching design ends on. */
.sqp-celeb-confetti .sqp-celeb-card { position:relative; z-index:2; margin:0 16px; max-width:min(560px, calc(100vw - 32px)); background:#fff; border-radius:10px; box-shadow:0 18px 50px rgba(0,0,0,.28); padding:6px; }
.sqp-celeb-confetti .sqp-celebration-text { position:relative; color:#1a2b3c; text-shadow:none; padding:26px 40px; font-size:26px; line-height:1.25; }
.sqp-celeb-confetti .sqp-celebration-text::before,
.sqp-celeb-confetti .sqp-celebration-text::after { content:''; position:absolute; left:0; right:0; height:0; border-bottom:4px solid var(--sqp-primary, #f05451); transform:scaleX(0); animation:sqpCelebBorder .9s ease-out .15s forwards; }
.sqp-celeb-confetti .sqp-celebration-text::before { top:0;    transform-origin:left; }
.sqp-celeb-confetti .sqp-celebration-text::after  { bottom:0; transform-origin:right; }
@keyframes sqpCelebBorder { to { transform:scaleX(1); } }

/* Fireworks: the author's backdrop color with bursts over it. */
.sqp-celeb-fireworks .sqp-celebration-text { font-size:28px; }
.sqp-firework { position:absolute; border-radius:50%; opacity:0; z-index:1; animation:sqpFireworkBurst 1.6s ease-out infinite; }
@keyframes sqpFireworkBurst {
  0%   { transform:scale(.2); opacity:0; }
  25%  { transform:scale(1);  opacity:1; }
  100% { transform:scale(2.4); opacity:0; }
}

/* Confetti pieces */
.sqp-confetti { position:absolute; width:8px; height:8px; border-radius:2px; top:-10px; animation:sqpConfettiFall linear forwards; z-index:1; }
@keyframes sqpConfettiFall { 0%{transform:translateY(0) rotate(0deg);opacity:1} 100%{transform:translateY(100vh) rotate(720deg);opacity:0} }

/* Nobody asked for a celebration that moves. Reduced motion keeps the message
   and the color and drops the paper, the bursts and the drawing border. */
@media (prefers-reduced-motion: reduce) {
  .sqp-confetti, .sqp-firework { display:none; }
  .sqp-celeb-confetti .sqp-celebration-text::before,
  .sqp-celeb-confetti .sqp-celebration-text::after { animation:none; transform:scaleX(1); }
  .sqp-celeb-classic .sqp-celeb-emoji { animation:none; }
}

/* Correct answer highlight.
   The TEXT color has to be pinned too. A selected answer takes its color from
   `--sqp-sp-ans-hvtxt` (the Answer style panel's hover color), which is white on
   several templates, and these two states force their own pale green/red
   background, so white-on-pale left the answer unreadable the moment it was marked.
   The backgrounds are OPAQUE for the same reason the foreground is pinned: they were
   rgba(...,.08), so whatever the template paints behind them mixed straight in: on
   cinematic's tan panel the green read as olive and the red as brown, and the pinned
   dark-green/dark-red text lost its contrast against them. Opaque means these two
   states look identical on every template and on any quiz palette, which is the whole
   point of a right/wrong signal. The values are the tint flattened onto white, and
   deliberately the SAME green-50/red-50 the feedback box below uses, so the answer and
   the message that explains it read as one pair. */
.sqp-fe-answer.sqp-correct { border-color:#22c55e !important; background:#f0fdf4 !important; color:#166534 !important; }
.sqp-fe-answer.sqp-incorrect { border-color:#ef4444 !important; background:#fef2f2 !important; color:#b3261e !important; }
.sqp-fe-answer.sqp-correct .sqp-fe-answer-letter,
.sqp-fe-answer.sqp-correct .sqp-fe-answer-text { color:inherit !important; }
.sqp-fe-answer.sqp-incorrect .sqp-fe-answer-letter,
.sqp-fe-answer.sqp-incorrect .sqp-fe-answer-text { color:inherit !important; }

/* ── Correct Answer Feedback (after each question) ──
   Sized down deliberately: this is a note confirming what just happened, not a panel.
   It sat at 14px in 12/16 padding and, with the explanation's spacing below, took more
   vertical room than the answers it was commenting on. */
.sqp-fe-correct-feedback { margin:10px 0 2px; padding:9px 12px; border-radius:7px; font-size:13px; line-height:1.45; }
/* Authored copy arrives as HTML, so its paragraphs bring browser default margins with
   them. Only `p:last-child` was reset, which left the FIRST paragraph's ~1em top
   margin stacking on top of the explanation's own margin+padding: that is the wide
   empty band between the verdict line and the reasoning. */
.sqp-fe-correct-feedback p { margin:0 0 6px; }
.sqp-fe-correct-feedback p:last-child { margin-bottom:0; }
/* White ground, a full-strength edge, text in the same color: the same object the
   other messages are. The tinted version washed both states out: #bbf7d0 on #f0fdf4 is a pale
   edge on a pale fill, so the verdict registered as a faint block rather than as an
   answer coming back, and the two states differed only in hue rather than in weight. */
.sqp-fe-correct-feedback.sqp-feedback-correct { background:#fff; border:1px solid #16a34a; color:#16a34a; }
.sqp-fe-correct-feedback.sqp-feedback-incorrect { background:#fff; border:1px solid #dc2626; color:#dc2626; }
.sqp-feedback-icon { font-weight:700; margin-right:4px; }

/* ── Outcome template wrappers: flex column ensures answer review stays at bottom ── */
.sqp-oc-tpl, .sqp-oc-body, .sqp-classic-body { display:flex; flex-direction:column; align-items:center; }
/* Cinematic two-panel layout uses flex-row: override the generic column rule */
.sqp-oc-tpl.sqp-oc-tpl9 { flex-direction:row; align-items:stretch; }

/* AN EMPTY BLOCK STILL SPENDS ITS MARGIN. The outcome card has slots the screen data
   does not always fill: `content` is separate from `description` and every migrated
   outcome leaves it blank, because the old plugin had one body field, not two. The
   templates give each slot a bottom margin unconditionally, so a blank one reserved
   24px of nothing at the foot of the card, read as mysterious padding under the last
   paragraph. Hidden slots already cost nothing (display:none drops the box); only the
   ones that render empty need this. Scoped one level up so it clears the per-template
   margins, and :empty is exact: a slot with so much as a <br> in it is real content
   and keeps its spacing. */
/* HEADINGS THE AUTHOR TYPED, STYLED BY THE QUIZ THEY SIT IN.
   Every rich-text field here accepts headings - the outcome description, a break
   screen s body, a question s description, the start and opt-in copy - and not one
   of them was styled, so an <h3> fell through to whatever the WordPress THEME gives
   headings. Measured on quiz 200: `Section by section` came out 22px at weight 400 in
   the theme s ink, sitting between a 16px paragraph and a 16px <strong> at weight 700,
   so the heading was the LIGHTEST thing in its own section and read as a stray line of
   large text rather than a heading.
   Sized from the description rather than a literal, so a quiz that sets 22px copy gets
   a proportionally larger heading; weight 700 and the TITLE ink, which is the pair the
   templates already use for every heading they draw themselves. Family is left to
   inherit: the copy block already carries the quiz s own face, and the title face is
   set per template on the title ELEMENTS rather than in a variable this could read.
   :is() keeps one rule instead of thirty; its specificity is that of its most specific
   argument, so this lands at (0,2,1) - above a theme s bare h3 and below anything a
   template chooses to say about these headings later. */
.sqp-quiz-container :is(.sqp-oc-desc, .sqp-interstitial-desc, .sqp-fe-q-desc, .sqp-start-desc, .sqp-lg-subtitle) :is(h1, h2, h3, h4, h5, h6) {
  font-size:calc(var(--sqp-sp-desc-fs, 15px) * 1.25);
  font-weight:700;
  line-height:1.3;
  color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47));
  margin:1.1em 0 .45em;
}
/* A heading that opens the block has nothing above it to be spaced from, and the
   block already carries its own top margin. */
.sqp-quiz-container :is(.sqp-oc-desc, .sqp-interstitial-desc, .sqp-fe-q-desc, .sqp-start-desc, .sqp-lg-subtitle) :is(h1, h2, h3, h4, h5, h6):first-child { margin-top:0; }
/* A step down for h4-h6, so a subheading reads under its heading rather than as a
   second heading of the same size (the old builder's Heading / Subheading blocks
   migrate as h3 / h4). Same specificity, later, so it wins for these three. */
.sqp-quiz-container :is(.sqp-oc-desc, .sqp-interstitial-desc, .sqp-fe-q-desc, .sqp-start-desc, .sqp-lg-subtitle) :is(h4, h5, h6) { font-size:calc(var(--sqp-sp-desc-fs, 15px) * 1.1); font-weight:600; }

.sqp-quiz-container .sqp-oc-content:empty,
.sqp-quiz-container .sqp-oc-desc:empty,
.sqp-quiz-container .sqp-oc-meta:empty { margin:0; padding:0; border:0; }

/* The old editor closed rich text with a stray <br> after the final </p>: every
   outcome that came through the migrator carries one. It can never mean anything
   (there is nothing after it to break) but it still renders a full empty line, which
   at a 20px description is ~26px of blank added to the bottom of the card. Hidden
   rather than stripped: it is the author's stored content and this is a display
   decision, so nothing is rewritten and the markup stays exactly as saved. Only the
   LAST one goes: <br>s between paragraphs are deliberate spacing. */
.sqp-quiz-container .sqp-oc-desc > br:last-child,
.sqp-quiz-container .sqp-oc-content > br:last-child { display:none; }

/* Paragraph spacing belongs BETWEEN paragraphs. The last one in a block has nothing
   to separate itself from, so its bottom margin lands on top of the block's own margin
   and the card's padding and reads as the card not knowing where to stop.
   :last-of-type rather than :last-child so the hidden trailing <br> above does not
   shield the real final paragraph from this. */
.sqp-quiz-container .sqp-oc-desc > p:last-of-type,
.sqp-quiz-container .sqp-oc-content > p:last-of-type { margin-bottom:0; }

/* ── Answer Review on Outcome Screen ── */
.sqp-fe-answer-review { margin-top:28px; padding-top:24px; border-top:2px solid rgba(0,0,0,.08); width:100%; box-sizing:border-box; text-align:left; order:9999; }

/* Top Bar */
.sqp-ar-topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.sqp-ar-title { font-size:20px; font-weight:600; color:#1a1a2e; }
.sqp-ar-score-badge { font-size:13px; font-weight:600; padding:5px 14px; border-radius:99px; background:#eaf3de; color:#27500a; border:1px solid #c0dd97; }

/* Progress Bar */
.sqp-ar-prog-track { height:6px; background:#e8eaed; border-radius:99px; margin-bottom:6px; overflow:hidden; }
.sqp-ar-prog-fill { height:100%; border-radius:99px; background:#639922; transition:width .8s cubic-bezier(.4,0,.2,1); }
.sqp-ar-prog-meta { display:flex; justify-content:space-between; font-size:11px; color:#888; margin-bottom:20px; }

/* Stats Grid */
.sqp-ar-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:24px; }
.sqp-ar-stat { padding:14px 16px; border-radius:12px; border:1px solid #e2e6ea; background:#fff; }
.sqp-ar-stat-num { font-size:26px; font-weight:600; line-height:1; }
.sqp-ar-stat-lbl { font-size:11px; font-weight:500; margin-top:4px; }
.sqp-ar-stat--total .sqp-ar-stat-num { color:#1a1a2e; }
.sqp-ar-stat--total .sqp-ar-stat-lbl { color:#888; }
.sqp-ar-stat--correct { background:#f4fbea; border-color:#c0dd97; }
.sqp-ar-stat--correct .sqp-ar-stat-num { color:#27500a; }
.sqp-ar-stat--correct .sqp-ar-stat-lbl { color:#3b6d11; }
.sqp-ar-stat--missed { background:#fff4f4; border-color:#f7c1c1; }
.sqp-ar-stat--missed .sqp-ar-stat-num { color:#791f1f; }
.sqp-ar-stat--missed .sqp-ar-stat-lbl { color:#a32d2d; }

/* Question Card */
.sqp-ar-stack { display:flex; flex-direction:column; gap:8px; }
.sqp-ar-card { border-radius:12px; border:1px solid #e2e6ea; background:#fff; overflow:hidden; }
.sqp-ar-card--correct { border-color:#c0dd97; }
.sqp-ar-card--missed { border-color:#f09595; }

/* Card Header */
.sqp-ar-card-head { display:flex; align-items:center; gap:10px; padding:13px 16px; border-bottom:1px solid #f0f0f0; }
.sqp-ar-card--correct .sqp-ar-card-head { background:#f7fdf0; }
.sqp-ar-card--missed .sqp-ar-card-head { background:#fff8f8; }
.sqp-ar-icon { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sqp-ar-icon--correct { background:#eaf3de; }
.sqp-ar-icon--missed { background:#fcebeb; }
.sqp-ar-icon svg { width:14px; height:14px; }
.sqp-ar-q-meta { display:flex; flex-direction:column; flex:1; gap:1px; }
.sqp-ar-q-num { font-size:11px; font-weight:500; color:#aaa; }
.sqp-ar-q-name { font-size:14px; font-weight:600; color:#1a1a2e; }
.sqp-ar-pill { font-size:11px; font-weight:600; padding:3px 10px; border-radius:99px; white-space:nowrap; }
.sqp-ar-pill--correct { background:#eaf3de; color:#3b6d11; }
.sqp-ar-pill--missed { background:#fcebeb; color:#a32d2d; }

/* Card Body */
.sqp-ar-card-body { padding:14px 16px 14px 54px; }
.sqp-ar-ans-grid { display:flex; gap:10px; }
.sqp-ar-ans-block { flex:1; min-width:0; }
.sqp-ar-ans-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:#555; margin-bottom:5px; }
.sqp-ar-ans-val { font-size:13px; font-weight:600; padding:10px 14px; border-radius:8px; display:block; width:100%; }
.sqp-ar-ans-val--your-correct { background:#eaf3de; color:#1a3d06; }
.sqp-ar-ans-val--your-wrong { background:#fcebeb; color:#6b1515; text-decoration:line-through; }
.sqp-ar-ans-val--correct { background:#eaf3de; color:#1a3d06; }

/* Feedback Note */
/* Left, like every other line in the card. This note is the question's own
   feedback - "Sorry, that's incorrect. The correct answer is..." - so it is a
   SENTENCE sitting under left-aligned labels and answers, and centring it broke
   the column the rest of the card reads down. Short notes looked deliberate;
   anything that wrapped to two lines did not. */
.sqp-ar-note { font-size:12px; color:#444; margin-top:10px; padding:9px 14px; background:#f8f9fa; border-radius:8px; border-left:2px solid #c0dd97; text-align:left; }
.sqp-ar-note--missed { border-left-color:#f09595; background:#fff8f8; }

@media(max-width:480px) {
  .sqp-ar-topbar { flex-direction:column; align-items:flex-start; gap:8px; }
  .sqp-ar-stats { grid-template-columns:1fr; }
  .sqp-ar-ans-grid { flex-direction:column; }
  .sqp-ar-card-body { padding-left:16px; }
}

/* ── PDF / Certificate Download Buttons ── */
.sqp-fe-download-wrap { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; padding:16px 20px; }
.sqp-fe-download-btn { display:inline-flex; align-items:center; gap:8px; padding:11px 22px; border-radius:var(--sqp-sp-bdr-r, 8px); border:1.5px solid var(--sqp-secondary, #0f2e47); font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; font-family:inherit; background:#fff; color:var(--sqp-secondary, #0f2e47); }
.sqp-fe-download-btn:hover { background:var(--sqp-secondary, #0f2e47); color:#fff; }
.sqp-fe-download-btn svg { flex-shrink:0; }

/* ── Content Recommendation / Ads Interstitial ── */
.sqp-interstitial { padding:28px 24px; text-align:center; animation:sqpFadeInPage .3s ease; }
/* THE WRAPPER NEEDS A WIDTH OF ITS OWN. Several templates make this card a CENTRED
   flex column (align-items:center), which makes every child shrink to its content -
   and the img inside asks for width:100%, so it was resolving against a parent whose
   width was itself waiting on the content. Measured on cinematic: a wrapper reporting
   0px inside a 900px measure, with the picture drawing at whatever the circularity
   happened to settle on. Stretching the wrapper gives the img a real basis, and is a
   no-op on the templates whose card is a plain block. */
.sqp-interstitial-img { margin-bottom:16px; align-self:stretch; width:100%; }
/* FILL THE CARD, like the question and outcome pictures. height:auto under a
   max-height meant a tall picture was scaled DOWN by its aspect ratio and the width
   landed wherever it landed - a 240px-wide photo centred in a 900px break screen,
   with the copy under it running the full width. Cropping to a height instead keeps
   the picture the width of the card it sits on. */
.sqp-interstitial-img img { width:100%; max-width:100%; height:260px; border-radius:10px; object-fit:cover; }
/* THE QUIZ'S OWN TYPE SCALE, like the other four screens. These were flat
   numbers, so a quiz whose start, question, opt-in and outcome all ran at 30/16
   put 20/15 on the screens between the questions: a fifth treatment nobody
   chose, on a screen that reads as a full stop in the middle of the run. Same
   reasoning, and the same var names, as the leadgen block further down.
   The old numbers survive as the fallback for a quiz that sets none. */
.sqp-interstitial-title { font-size:min(var(--sqp-sp-title-fs, 20px), 6vw); font-weight:var(--sqp-sp-title-fw, 700); color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47)); margin-bottom:10px; line-height:var(--sqp-sp-title-lh, 1.4); }
.sqp-interstitial-desc { font-size:var(--sqp-sp-desc-fs, 15px); font-weight:var(--sqp-sp-desc-fw, 400); color:var(--sqp-sp-desc-color, #555); line-height:var(--sqp-sp-desc-lh, 1.7); margin-bottom:20px; }
.sqp-interstitial-btn { display:inline-flex; align-items:center; justify-content:center; padding:12px 32px; border-radius:var(--sqp-sp-bdr-r, 8px); border:none; font-size:var(--sqp-sp-btn-fs, 14px); font-weight:600; cursor:pointer; transition:all .2s; font-family:inherit; background:var(--sqp-sp-btn-next-bg, var(--sqp-primary, #f05451)); color:var(--sqp-sp-btn-next-text, var(--sqp-primary-text, #fff)); }
.sqp-interstitial-btn:hover { opacity:.9; transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.15); }
.sqp-interstitial-label { display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--sqp-primary, #f05451); background:rgba(240,84,81,.08); padding:4px 12px; border-radius:20px; margin-bottom:14px; }

/* ── Ad layouts (per-ad `ad_layout`, chosen in the question editor) ──
   Deliberately in the BASE stylesheet, not in templates/<template>/interstitial.php:
   the layout is picked per ad and is independent of the quiz's template, so
   every template has to honour all three. Templates own the palette and the
   idiom (radius, borders, fonts); these classes only rearrange.
   `sqp-i-layout-top` is the default and needs no rules: it IS the base above.

   --sqp-i-pad is the interstitial's own horizontal padding, which differs per
   template; each templates/<template>/interstitial.php sets it to match, so full-bleed
   can cancel it out without hardcoding a number per template. */
.sqp-interstitial { --sqp-i-pad:24px; }

/* Image left: image beside the copy instead of above it. Grid rather than
   flex because label/title/desc/button are flat siblings, not a wrapped block:
   the image spans the rows, the copy stacks in the second column.

   :has() guards the whole thing because the image is OPTIONAL: showInterstitial()
   omits it when the ad has none, and a bare two-column grid would then indent the
   copy against an empty column. It doubles as the graceful fallback: where :has()
   is unsupported nothing matches and the ad simply stays stacked.

   A percentage column, not a fixed 240px: the column this sits in varies a lot by
   template (Lumen caps its content at 460px), and a fixed image width would leave
   the copy in a sliver there. */
@media (min-width: 601px) {
  .sqp-interstitial.sqp-i-layout-left:has(.sqp-interstitial-img) {
    display:grid;
    grid-template-columns:minmax(0, 38%) minmax(0, 1fr);
    /* One row per element the copy column can hold. They must be declared:
       `span N` on the image would CREATE N tracks, and any beyond the copy's own
       would sit there empty and stretch (a template like Lumen gives this a
       full-height box), shoving the image away from the copy. Rows a card does
       not use are `auto` and collapse to nothing.
       SEVEN, NOT THE AD'S FOUR. This was written when an ad was the only thing
       wearing these classes, and an ad holds exactly label, title, desc, button.
       An interlude adds three more siblings: the recap table or the analysis
       block, the bullet list, and the recap's second button, and `grid-row:1/-1`
       counts only EXPLICIT lines, so the extras landed in implicit rows outside
       the image's span. */
    grid-template-rows:repeat(7, auto);
    column-gap:24px;
    align-items:center;
    align-content:center;   /* park the block, don't spread it down a tall box */
    text-align:left;
  }
  /* EVERY RULE BELOW CARRIES THE GRID S OWN GUARD. They were scoped to the bare
     layout class while the grid that gives them meaning is
     .sqp-i-layout-left:has(.sqp-interstitial-img) - so a card set to image-left with
     NO image got grid-column and justify-self declarations with no grid to act in
     (harmless) and, less harmlessly, margin-left:0 on the tick list, which killed the
     auto margins that centre it in a stacked card. Measured on quiz 219: ticks at
     x=363 while the title and button centred at 922. A card that is not drawing the
     two-column layout should look like the stacked one it actually is. */
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-img {
    grid-column:1;
    grid-row:1 / -1;        /* all four rows: no implicit ones to stretch */
    width:100%;
    margin:0;
  }
  /* THE PICTURE COVERS ITS COLUMN. The wrapper already spans every row of the grid,
     but the img inside only ever cropped to a fixed height, so on a tall card it sat
     as a small letterboxed rectangle floating in the middle of an otherwise empty
     column while the copy beside it ran the full height. Filling the wrapper and
     cropping to it is what the split templates do with their media panels, and it is
     what an image-left layout is asking for.
     The wrapper needs a height to fill, which in a grid row it only has once it is
     told to stretch - align-self is normally stretch, but height:100% on the child
     needs the parent to have resolved one, so the wrapper gets it too. */
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-img { align-self:stretch; height:100%; overflow:hidden; }
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-img img { width:100%; height:100%; max-height:none; object-fit:cover; }
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-label,
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-title,
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-desc,
  /* The interlude's own blocks, for the same reason as the row count above:
     unlisted, they auto-placed into column 1 UNDERNEATH the image, so a Break
     Screen with a bullet list came out as a photo with ticks below it and the
     title stranded alongside. */
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interlude-bullets,
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-recap,
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-analysis,
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-btn { grid-column:2; }
  /* The list centres itself with auto margins in the stacked layouts (it is
     display:table, see below); beside an image the column is left-aligned and
     the auto margin would push it off the text edge. */
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interlude-bullets { margin-left:0; }
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-label,
  .sqp-i-layout-left:has(.sqp-interstitial-img) .sqp-interstitial-btn { justify-self:start; }
}
/* Below 600px there is no room for two columns: fall back to the stacked
   default rather than crushing the image into a sliver. */

/* Full-bleed: image runs to the screen's edges; the copy keeps its padding.
   Cancels the template's own horizontal padding via --sqp-i-pad.

   Selectors are deliberately over-qualified with .sqp-interstitial: templates
   style .sqp-interstitial-img at the same specificity as a bare layout class
   would, and their CSS is inlined AFTER this stylesheet, so on a tie they win
   and the "full-bleed" image keeps its rounded corners. The extra class puts
   the layout ahead, which is the intended precedence: layout is chosen per ad,
   the template only supplies the idiom. */
.sqp-interstitial.sqp-i-layout-fullbleed .sqp-interstitial-img {
  margin-left:calc(-1 * var(--sqp-i-pad, 24px));
  margin-right:calc(-1 * var(--sqp-i-pad, 24px));
  /* Templates are free to centre their copy column (cinematic uses a centring
     flex column). An item in one of those sits at its intrinsic width, so the
     negative margins alone just shift it sideways instead of widening it:
     stretch first, then bleed. Ignored where the column isn't flex. */
  align-self:stretch;
  /* …and templates are equally free to cap the image (cinematic holds it to
     420px). A cap survives the stretch and silently shortens the bleed. */
  max-width:none;
  border-radius:0;
  /* A frame around an image that runs to the edges contradicts itself (classic
     hairlines its ad image). */
  border:0;
  overflow:hidden;
}
.sqp-interstitial.sqp-i-layout-fullbleed .sqp-interstitial-img img {
  width:100%;
  max-width:none;
  max-height:320px;
  border-radius:0;
}

/* ═══ Interludes ═══════════════════════════════════════════════════════════
   The author's own screens between the questions. They wear the ad card's
   element classes (see SQP_Renderer::interludeHtml) so every template already
   frames them; only what is genuinely different is styled here.

   Nothing below re-states padding, radius, colour or type for the shared parts.
   That is the point of borrowing the classes: a template that restyles its ad
   card restyles these with it, and there is no second look to keep in step. */

/* The bullet list under an insight card: the "here is what that buys you" run of
   ticks. Marker drawn in CSS rather than shipped as a character so it follows the
   quiz's own primary the way every other accent does. */
/* display:table, not inline-block. The card centres its children with text-align,
   which an inline-block list obeys, but so does the button after it, and the two
   then flow onto the SAME line with the button beside the last tick. `table` is
   block-level (so nothing follows it inline) and still shrink-to-fit (so auto
   margins centre the list rather than stretching it to the card). */
.sqp-interlude-bullets {
  list-style:none; margin:4px auto 18px; padding:0; text-align:left;
  display:table;
}
/* Body copy, so it is sized like body copy. A flat 14 sat a step under the
   description directly above it, which is the same run of prose broken into
   ticks. See the note on .sqp-interstitial-title for why these follow the
   quiz's Description setting rather than a number of their own. */
.sqp-interlude-bullets li {
  position:relative; padding:5px 0 5px 26px;
  /* --sqp-sp-desc-fs, NOT --sqp-recap-fs. That variable belongs to the recap TABLE
     and is declared on .sqp-recap; these ticks live on a plain break screen and are
     never inside one, so the reference resolved to nothing. A var() with no fallback
     and no value makes the whole declaration invalid at computed-value time, which
     means font-size falls back to INHERIT - measured 22px on quiz 200, the theme s
     size, against the 16px description directly above it in the same card.
     These ticks are the same run of copy as that description, so they take the same
     size. Reported as the break screen using a different font. */
  font-size:var(--sqp-sp-desc-fs, 14px); font-weight:var(--sqp-sp-desc-fw, 400);
  line-height:var(--sqp-sp-desc-lh, 1.6);
  /* --sqp-sp-desc-color, NOT a fixed slate. Every colour below follows the same
     rule and for the same reason: this block was written and looked at on the
     light templates only, where a hardcoded slate reads fine. On cinematic the
     card is #0d1b2a and these ticks came out one shade off the background. The
     derived tokens are chosen per template to read on that template's own card,
     which is the whole reason they exist. */
  color:var(--sqp-sp-desc-color, #475569);
}
.sqp-interlude-bullets li::before {
  content:''; position:absolute; left:2px; top:11px;
  width:11px; height:6px; border-left:2px solid var(--sqp-primary, #f05451);
  border-bottom:2px solid var(--sqp-primary, #f05451);
  transform:rotate(-45deg);
}

/* The recap's second button. Quieter than the confirm beside it because it is
   the exit, not the answer: a taker who agrees should not have to read two
   equally loud buttons to find out which one agrees. */
/* --sqp-secondary IS THE CANVAS ON HALF THE TEMPLATES. Cinematic's is #0d1b2a
   and it paints the card this button sits on, so "Let me change an answer" was
   drawn in the background colour: a full-width outlined button with no label in
   it. --sqp-sp-title-color is the same ink the card's heading uses and is
   derived per template to read on that card. */
.sqp-interlude-btn-alt {
  background:transparent !important;
  color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47)) !important;
  border:1px solid var(--sqp-card-edge) !important;
  margin-top:8px;
}
.sqp-interlude-btn-alt:hover { background:rgba(0,0,0,.03) !important; box-shadow:none; }
/* Both buttons on their own line, full width on the card. Stacked rather than
   side by side: the pair is "yes" and "no, take me back", which is a decision
   and a way out, not two equal choices. */
/* The Button Panel s width governs this pair too. It was a flat 100%, so on a quiz
   that had set a Button Width the recap s two buttons still stretched the card while
   Next sized to its label - three different widths on one quiz from three different
   places. --sqp-sp-btn-w is only emitted when an author sets one, so the old 100%
   stays as the fallback and a quiz that never touched the setting is unchanged. */
.sqp-interlude--recap .sqp-interstitial-btn { display:flex; width:var(--sqp-sp-btn-w, 100%); }
/* "FULL WIDTH ON THE CARD" NEEDS A CARD. On cinematic the interstitial IS the
   screen - a full-bleed panel with no measure of its own - so width:100% put a
   1900px button under a 460px table, two controls the width of the window with
   the content they belong to floating in the middle of them.
   The table and the buttons are given the same measure so they line up as one
   block. Scoped to cinematic: every other template's interstitial is already a
   card, where 100% is the card and the rule reads exactly as it was written. */
.sqp-template-cinematic .sqp-interlude--recap .sqp-recap,
.sqp-template-cinematic .sqp-interlude--recap .sqp-interstitial-btn { width:100%; max-width:520px; }

/* ── Recap rows: the taker's own answers, played back ── */
/* THE TABLE CANNOT HANG ITS STRUCTURE ON --sqp-sp-ans-bdr.
   Modern sets ans_bdr to `transparent` on purpose (its answer cards are told
   apart by fill, not by a line), and a variable that IS defined as transparent
   never reaches the fallback written beside it. So the frame, every row divider
   and every chip outline vanished at once and the recap came out as an
   unbounded grey slab with square corners, on the one screen whose whole job is
   to look like a tidy summary.
   The lines are derived from the card's own TITLE ink instead, which every
   template defines to read against this card, so they follow a dark template as
   readily as a light one. The radius is a literal for the same class of reason:
   --sqp-sp-bdr-r is the TEMPLATE FRAME's radius (0 on modern, whose frame is
   the whole page) and was never a card's. */
.sqp-recap {
  /* One definition, up at the container: see the note beside --sqp-card-edge. */
  --sqp-recap-line: var(--sqp-card-edge);
  /* THE TABLE SITS ON A SURFACE OF ITS OWN. It used to be background:transparent,
     so on a tinted screen the summary was an outline floating on the page rather
     than a card: the one screen whose whole job is to look like a tidy summary.
     The surface is the ANSWER background, not a literal white: every template
     already defines that to read against its own card, so a cream-on-navy template
     gets a cream table instead of a white slab punched into a dark screen. On the
     light templates it resolves to white, which is what was asked for.
     --sqp-recap-bg is named so an author can override the surface alone. */
  --sqp-recap-bg: var(--sqp-sp-ans-bg, #fff);
  /* A SUMMARY IS NOT A DESCRIPTION. Both rows used --sqp-sp-desc-fs straight, which is
     the quiz DESCRIPTION size - 18px on the imported quiz - and at that size four
     question/answer pairs read as body copy rather than as a table you scan. Scaled
     from the same value so it still follows the template (a quiz that sets 14px gets a
     smaller table, one that sets 22px a larger one), with a 13px floor so it never
     becomes unreadable. --sqp-recap-fs overrides the lot.
     Derived rather than hardcoded because the description size IS an author setting;
     replacing it with a literal would throw that choice away.
     0.9 off a 15px floor, not 0.82 off 13: the steeper scale put a 16px description
     next to a 13.12px table - measured on quiz 219 - which was smaller than anything
     else on the screen. A table should read a step under the prose, not two, so 16
     now gives 15 and an 18px description gives 16.2. */
  --sqp-recap-fs: max(15px, calc(var(--sqp-sp-desc-fs, 14px) * 0.9));
  text-align:left; margin:6px 0 22px;
  border:1px solid var(--sqp-recap-line); border-radius:14px;
  background:var(--sqp-recap-bg); overflow:hidden;
  /* A hairline lift rather than a drop shadow: enough to separate the card from
     the screen tint without turning a summary into a dialog. */
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.sqp-recap-row {
  display:flex; align-items:center; gap:14px;
  padding:14px 16px; border-bottom:1px solid var(--sqp-recap-line);
}
.sqp-recap-row:last-child { border-bottom:0; }

/* A THUMBNAIL, NOT A GLYPH. The field takes whatever the author picks in the
   media library, and a photograph letterboxed into 20px is a smear. Cropped to
   fill a rounded square it reads as the picture it is, and a flat icon still
   sits happily inside the same box. */
.sqp-recap-icon {
  width:36px; height:36px; flex:0 0 36px;
  object-fit:cover; border-radius:8px;
  border:1px solid var(--sqp-recap-line);
}
/* THE INK THAT READS ON THE TABLE, which is not the ink that reads on the screen.
   This took --sqp-sp-title-color, chosen back when the table was transparent and sat
   directly on the card. The table now has a surface of its own - the ANSWER
   background - and on a dark template the title ink is white while that surface is
   pale: measured on quiz 219, white #ffffff on #fddfd8, a contrast of 1.26 against
   the 4.5 this size needs. The whole left column was invisible.
   --sqp-sp-ans-text is the ink each template already derives to read on exactly that
   surface, and it is what the value chip beside it uses, so the two columns now match
   as well as being legible. The title ink stays as the fallback for a quiz whose row
   predates the answer tokens. */
.sqp-recap-label { flex:1 1 auto; min-width:0; line-height:1.35; font-size:var(--sqp-recap-fs); font-weight:600; color:var(--sqp-sp-ans-text, var(--sqp-sp-title-color, #0f2e47)); }
/* The value is pushed right and allowed to wrap; the label never is. A long
   answer ("Between jobs / Career switcher") has to be readable, and the label
   beside it is short by construction. */
/* EVERY CHIP THE SAME WIDTH. Shrink-to-fit gave each row its own left edge, so
   four answers of four different lengths drew a ragged staircase down the middle
   of the card. A fixed share of the row aligns both edges and still wraps. */
.sqp-recap-value {
  /* LEFT ALIGNED. Right-aligning the chip text put the ragged edge in the middle
     of the card, next to the label it belongs to, so the eye had to jump a gap of
     variable width to find the start of each answer. Both columns now start on a
     straight line. The chip keeps a fixed share of the row so its own edges stay
     aligned: that part was right. */
  flex:0 0 46%; margin-left:auto; text-align:left;
  line-height:1.35;
  font-size:var(--sqp-recap-fs); font-weight:var(--sqp-sp-desc-fw, 400);
  /* The ANSWER tokens, because that is what this chip is: the option the taker
     picked, played back. It gets the surface and ink the option itself wore on
     the question screen, so a template whose answers are cream-on-navy gets a
     cream-on-navy chip rather than a white slab punched into a dark card. */
  color:var(--sqp-sp-ans-text, #475569);
  /* A QUIETER FILL THAN THE TABLE IT SITS ON. The chip used to take the answer
     background, which is now the table's own surface too, so the chip and the card
     were the same colour and only its outline separated them. A tint mixed from the
     card's line colour reads as a soft secondary surface on a light template and
     stays legible on a dark one, because it is derived from the same ink the borders
     are. The flat declaration first is the fallback: a browser without color-mix
     keeps the answer background and simply loses the tint. */
  /* A WHITE FIELD, so the chip reads as one on every template. It was a 14% mix of
     the card s line colour into the TABLE s own surface, which is a difference of one
     part in seven from the thing behind it: on cinematic, a pale chip on a pale table
     with only its outline separating them, and the answer looked like part of the row
     rather than the value in it. White is what the light templates were already
     landing on through that mix, so this changes cinematic and aurora and leaves the
     others where they were. */
  background:#ffffff;
  border:1px solid var(--sqp-recap-line);
  border-radius:8px; padding:8px 12px;
  word-break:break-word;
}
/* ON A PHONE THE ROW STACKS. The chip is flex:0 0 46% of the row, which is a
   workable half on a desktop and about 120px on a 320px screen - a column too
   narrow for an answer like "They would guess, and probably guess wrong", which
   wrapped to four or five lines beside a label doing the same. Stacked, the label
   reads as a heading and the answer gets the full width under it. The thumbnail
   stays on the label line rather than becoming a third row. */
@media (max-width:600px) {
  .sqp-recap-row { flex-wrap:wrap; gap:8px 12px; padding:12px 14px; }
  /* basis 0, not auto: at auto the label measures its own text first and will not
     share the line with the 30px thumbnail, so the icon was stranded on a row of its
     own above it. */
  .sqp-recap-label { flex:1 1 0; min-width:0; }
  .sqp-recap-value { flex:1 1 100%; margin-left:0; }
  .sqp-recap-icon { width:30px; height:30px; flex:0 0 30px; }
}
.sqp-recap-value:empty { display:none; }
/* On a phone the chip's 46% is four words to a line. The row breaks instead and
   the answer takes the width, which is the only thing on it worth reading. */
@media (max-width:560px) {
  .sqp-recap-row { flex-wrap:wrap; }
  .sqp-recap-value { flex:1 1 100%; margin-left:0; text-align:left; }
}

/* ── Analysis: the "working on it" screen ── */
.sqp-analysis { text-align:left; margin:4px 0 8px; }
.sqp-analysis-step { margin-bottom:16px; }
.sqp-analysis-step:last-child { margin-bottom:0; }
.sqp-analysis-step-head {
  display:flex; justify-content:space-between; align-items:baseline;
  margin-bottom:7px; font-size:var(--sqp-sp-desc-fs, 14px);
}
/* The step not reached yet takes the card's BODY ink, and the step in hand takes
   its TITLE ink: the same two-step the card already makes between its heading
   and its copy. It was a flat #94a3b8 against whatever card it landed on, which
   measured between 1.6:1 and 2.5:1 on five of the six templates: a list of what
   is being worked on that could not be read until its turn came. */
.sqp-analysis-step-name { font-weight:600; color:var(--sqp-sp-desc-color, #94a3b8); transition:color .3s; }
.sqp-analysis-step-pct { font-weight:700; color:var(--sqp-sp-desc-color, #94a3b8); font-variant-numeric:tabular-nums; }
/* The step in hand and the steps behind it read as live; the ones ahead stay
   grey. Without this every step looks equally active and the screen says only
   "something is happening" rather than "this part is happening now". */
.sqp-analysis-step--active .sqp-analysis-step-name,
.sqp-analysis-step--active .sqp-analysis-step-pct,
.sqp-analysis-step--done .sqp-analysis-step-name,
.sqp-analysis-step--done .sqp-analysis-step-pct { color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47)); }
.sqp-analysis .sqp-progress { height:5px; border-radius:99px; }
.sqp-analysis .sqp-progress-bar { border-radius:99px; transition:width .12s linear; }

/* The testimonial that runs under the bars. It is the reason the wait is worth
   staging at all, so it gets the room a quote needs rather than a caption. */
.sqp-analysis-quotes { margin-top:26px; }
/* A panel inside the card, so it takes the answer surface for the same reason
   the recap chip does: a flat #fff was a white slab on the dark templates. */
.sqp-analysis-quote {
  margin:0; padding:16px 18px; border:1px solid var(--sqp-card-edge);
  border-radius:var(--sqp-sp-bdr-r, 12px); background:var(--sqp-sp-ans-bg, #fff);
  animation:sqpFadeInPage .35s ease;
}
.sqp-analysis-quote blockquote {
  margin:0 0 10px; padding:0; border:0;
  font-size:var(--sqp-sp-desc-fs, 14px); font-weight:var(--sqp-sp-desc-fw, 400);
  line-height:1.65; color:var(--sqp-sp-ans-text, #334155); font-style:normal;
}
/* The attribution stays small print, the way .sqp-lg-privacy does: it is who
   said it, not what they said, and it is the one line here that should not
   grow with the quiz's body setting. */
.sqp-analysis-quote figcaption { font-size:12.5px; color:#64748b; }
.sqp-analysis-quote-name { font-weight:700; color:var(--sqp-sp-ans-text, var(--sqp-secondary, #0f2e47)); }
.sqp-analysis-stars { display:flex; gap:3px; margin-bottom:9px; }
/* Drawn, not typed. A ★ glyph is a different shape and weight in every system
   font stack the six templates use, and half of them centre it badly. */
.sqp-analysis-stars .sqp-star {
  width:15px; height:15px; background:#f5a623;
  clip-path:polygon(50% 0, 61.8% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 38.2% 35%);
}

/* ── The prompt that interrupts the analysis screen ── */
/* Absolute inside the screen, not fixed to the viewport: the quiz may be one
   block on a long page, and a viewport-fixed dialog would darken the whole
   article around it for a question about the quiz. */
.sqp-iprompt {
  position:absolute; inset:0; z-index:20;
  display:flex; align-items:center; justify-content:center;
  padding:20px; background:rgba(15,23,36,.55);
  animation:sqpFadeInPage .18s ease;
}
/* The dialog is its own surface floating over a dimmed card, so it takes the
   answer surface rather than a flat white: same reason as the quote panel. Its
   type stays at dialog sizes: a modal that grew with the quiz's body setting
   would outgrow the 380px box it lives in. */
.sqp-iprompt-box {
  width:100%; max-width:380px; background:var(--sqp-sp-ans-bg, #fff);
  border-radius:var(--sqp-sp-bdr-r, 14px); padding:22px;
  box-shadow:0 18px 48px rgba(15,23,36,.28);
}
.sqp-iprompt-text {
  margin:0 0 18px; font-size:16px; font-weight:700; line-height:1.45;
  color:var(--sqp-sp-ans-text, var(--sqp-secondary, #0f2e47)); text-align:left;
}
.sqp-iprompt-actions { display:flex; gap:10px; }
.sqp-iprompt-btn {
  flex:1; padding:11px 16px; border-radius:var(--sqp-sp-bdr-r, 10px);
  font-size:14px; font-weight:600; font-family:inherit; cursor:pointer;
  border:1px solid var(--sqp-card-edge); background:var(--sqp-sp-ans-bg, #fff);
  color:var(--sqp-sp-ans-text, var(--sqp-secondary, #0f2e47));
  transition:all .18s;
}
.sqp-iprompt-yes {
  border-color:transparent;
  background:var(--sqp-sp-btn-next-bg, var(--sqp-primary, #f05451));
  color:var(--sqp-sp-btn-next-text, var(--sqp-primary-text, #fff));
}
.sqp-iprompt-btn:hover { opacity:.92; }
/* The dialog is positioned against the SCREEN, so the screen has to be a
   containing block. Scoped to the interlude screen only, .sqp-screen is shared
   with the questions, and giving all of them a position would move anything a
   template had absolutely positioned inside one. */
.sqp-screen-interlude { position:relative; }

/* ═══ Per-category progress bar ════════════════════════════════════════════
   One track per section instead of one bar for the whole run, and every section
   named above its own track: the names ARE the shape of the quiz, and a taker
   who can see "Challenges" and "Personalization" still to come is reading the
   run rather than watching a number climb. */
/* Equal tracks regardless of how many questions each section holds. A section
   with nine questions drawn nearly twice as wide as one with five would say the
   quiz is longer in the middle, which is true of the questions and beside the
   point of the bar: what it reports is which section you are in and how far
   through it you are. */
/* GRID, NOT A FLEX ROW, because the number of sections is the author's and a
   nine-section quiz is a real one: "Boost Psychological Safety" nine across a
   620px bar is 57px a name. `auto-fit` + `minmax` keeps one row while the names
   have room and wraps to a second when they do not, and because every column is
   1fr the tracks stay the SAME WIDTH on every row, which they must, since a
   track's width is the claim that all sections are drawn equally. A trailing row
   leaves empty columns rather than stretching its few cells to fill.
   Three sections still land on one row: auto-fit collapses the columns it does
   not need, so the three that remain share the full width exactly as before.

   flex:1 1 auto INHERITS THE JOB THE SINGLE BAR USED TO DO. Several templates
   make .sqp-progress-wrap a flex row and hand the growth to `.sqp-progress`
   (lumen: `flex:1`, next to a 56px gutter for the back chevron). With the tracks
   in a row of their own, THIS is the wrap's flex item, and without a grow it
   shrank to its content: lumen's bar came out about 200px wide inside a 384px
   slot, which squeezed "Personalization" onto two lines and dropped its track
   below the other two. */
/* ONE ROW THAT SCROLLS, NOT A GRID THAT WRAPS.
   As a wrapping grid this was fine at three or four sections and fell apart past
   that: ten sections came out two rows deep on elegant and lumen and THREE on
   aurora, where 123px of section headings sat above a 620px card and the last row
   held two lonely tracks. A progress indicator that is taller than it is
   informative has stopped doing its job.

   flex with `1 0 <col>` gets both behaviours out of one rule and needs no
   measuring: while the sections fit, grow shares the width exactly as the grid did
   (three sections on a 620px card are still ~200px each, unchanged). Once they
   cannot fit, the basis holds each at its readable width and the row overflows into
   a scroller instead of wrapping. The engine keeps the live section in view - see
   updateCatProgress in sqp-frontend.js - so the taker always sees where they are
   plus the sections either side of it.

   No visible scrollbar: this is an indicator, not a control, and a scrollbar under
   the tracks would read as a second progress bar. */
.sqp-progress-tracks {
  display:flex; flex-wrap:nowrap;
  overflow-x:auto; overscroll-behavior-x:contain;
  scrollbar-width:none; -ms-overflow-style:none;
  gap:10px 6px; align-items:stretch;
  flex:1 1 auto; width:100%; min-width:0;
  /* NO scroll-behavior HERE, AND NO `behavior:'smooth'` IN THE SCROLL CALLS.
     Both were tried and both are inert on this element in the quiz page: measured,
     scrollBy/scrollTo with 'smooth' left scrollLeft at 0 while the identical call
     with 'auto' moved it, and once CSS smooth was set even a plain `scrollLeft =
     300` stopped working. So the row is animated frame by frame in the engine
     (animateCatScroll), which only ever assigns scrollLeft and cannot be ignored. */
}
.sqp-progress-tracks::-webkit-scrollbar { width:0; height:0; }
/* The row and its two arrows. This is the flex item of .sqp-progress-wrap now, so it
   carries the grow the tracks used to. */
.sqp-progress-catnav { display:flex; align-items:stretch; gap:4px; flex:1 1 auto; min-width:0; }
/* HIDDEN UNTIL THERE IS SOMETHING TO SCROLL TO. A quiz with three sections shows the
   row exactly as before, with no controls attached to it. The engine puts --scroll on
   the strip when it overflows, so :has() reads that one flag rather than the arrows
   having to measure anything themselves. */
.sqp-progress-catnav-btn { display:none; }
.sqp-progress-catnav:has(.sqp-progress-tracks--scroll) .sqp-progress-catnav-btn {
  display:flex; align-items:center; justify-content:center;
  flex:0 0 auto; align-self:flex-end;
  width:22px; height:22px; padding:0; margin-bottom:-2px;
  border:0; border-radius:50%; cursor:pointer;
  background:transparent;
  /* Same ink as a section not in hand, so the controls sit at the quiet end of the
     bar rather than competing with the name of the live one. */
  color:var(--sqp-sp-desc-color, #64748b);
  transition:color .2s, opacity .2s;
}
.sqp-progress-catnav-btn svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.sqp-progress-catnav-btn:hover { color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47)); }
/* At either end there is nothing that way. Faded and unclickable rather than removed,
   so the row does not change width as it scrolls and the tracks stop shifting under
   the taker. */
.sqp-progress-catnav-btn[disabled] { opacity:.25; cursor:default; }
/* Cinematic paints this bar on its own dark panel, where the derived inks are for the
   card, not for navy. Matches what the section names already do there. */
.sqp-template-cinematic .sqp-progress-catnav-btn { color:rgba(255,255,255,.6); }
.sqp-template-cinematic .sqp-progress-catnav-btn:hover { color:#fff; }
/* Only while it actually scrolls: a fade at both ends says there is more of the run
   off the edge. Applied under a class the engine sets rather than always, because on
   a template wide enough to hold every section this would dim the first and last
   names for no reason. */
.sqp-progress-tracks--scroll {
  -webkit-mask-image:linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image:linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
/* The cell owns a name and a track. `justify-content:flex-end` bottom-aligns the
   track inside it, so a name that wraps to two lines pushes its own label up and
   leaves the tracks on that row in one straight line, which they must be, since
   together they read as a single indicator. */
.sqp-progress-cat {
  /* THREE AT A TIME, whatever the template is wide enough for. A fixed 104px column
     let each template show however many happened to fit - five on a 620px card, ten
     on a full-bleed one - so the same quiz gave a different reading of how far along
     the run was depending on the layout. A third of the strip makes the window the
     same everywhere: the section in hand plus the one either side of it.

     Sized off the strip rather than a pixel figure, so it follows the card. The
     subtraction is the column gaps between the three (two of them at 6px).

     `flex-grow:1` still matters for the short runs: a quiz with two sections has
     spare room, and grow spreads them across it instead of leaving a third of the
     bar empty. With more than three the basis overflows, there is no free space to
     distribute, and the row becomes the scroller. */
  flex:1 0 calc((100% - (var(--sqp-cat-visible, 3) - 1) * 6px) / var(--sqp-cat-visible, 3));
  min-width:0;
  display:flex; flex-direction:column; justify-content:flex-end; gap:6px;
}
.sqp-progress-cat .sqp-progress-track { flex:0 0 auto; width:100%; }
/* Centred over its own track, and allowed to wrap rather than truncate: a
   section heading clipped to "Personaliz…" has stopped being a heading, and the
   bar is drawn once at the top of the run so a taller row costs no reflow later. */
.sqp-progress-catname {
  display:block; text-align:center;
  font-size:13px; font-weight:600; letter-spacing:.1px; line-height:1.25;
  overflow-wrap:anywhere;
  /* The sections you are not in are still legible, just quieter, so the eye
     lands on the one in hand without the others going dark. Both inks are
     derived per template: --sqp-secondary alone is the CANVAS on cinematic,
     aurora and lumen, which is how the old single heading came to be painted
     in the background colour on the templates that did show it. */
  color:var(--sqp-sp-desc-color, #64748b);
  transition:color .25s;
}
/* Weight does not change with the state. It would re-wrap a name that sits on
   the edge of its cell, so the bar would twitch as the run moved between
   sections; colour carries it on its own. */
.sqp-progress-cat--active .sqp-progress-catname {
  color:var(--sqp-sp-title-color, var(--sqp-secondary, #0f2e47));
}
/* A finished section reads full but calm, so the eye lands on the one moving. */
.sqp-progress-track--done .sqp-progress-bar { opacity:.55; }
/* THE SECTION YOU ARE IN HAS TO BE OBVIOUS. This was a 1px ring at 4% black - about
   one part in twenty-five against the track it outlines, and invisible on a tinted
   screen. With the section barely started its bar is a few pixels wide too, so there
   was nothing at all saying where the run had got to; the only real cue was the name
   changing colour. A 2px ring mixed from the quiz s primary reads on any palette,
   light or dark, and matches the colour the bar itself fills with. */
.sqp-progress-track--active {
  box-shadow:0 0 0 2px color-mix(in srgb, var(--sqp-primary, #f05451) 45%, transparent);
}

/* ── Charts ── */
/* WIDTH IS LOAD-BEARING HERE, and its absence is why the charts read as missing.
   Several templates lay the outcome screen out with flex, which makes this block a
   flex ITEM: with no width it shrink-wraps to its content and the whole section
   rendered 256px wide inside a 1399px screen, with two 98px charts in it. Stated
   rather than left to inherit, so it does not depend on which template is in use. */
/* NOTHING ON A RESULT SCREEN SHRINKS. On a full-screen quiz the outcome screen is a
   fixed-height flex column that scrolls, and its children shrank to share that height
   instead: a long result page was squeezed to a sliver with the charts and Retake drawn
   over it, and the pay-after card cut off its own unlock button. At full size they stack
   and the screen scrolls, as it already does for a tall question. */
.sqp-screen-outcome > * { flex-shrink:0; }
/* As wide as the charts, not the screen: on a full-screen quiz the top rule otherwise
   ran edge to edge across the background picture, a stray line beside the result card. */
.sqp-charts-section { width:100%; max-width:900px; flex:0 0 auto; align-self:stretch; box-sizing:border-box; padding:24px 20px 8px; text-align:center; border-top:1px solid #e2e8f0; margin:16px auto 0; }
/* pre-line, because the engine writes these with textContent (they are author
   copy, and innerHTML here would be an injection surface for nothing). A newline
   in the stored value is therefore the ONLY way an author's line break can reach
   the screen, and without this it renders as a space. */
.sqp-chart-heading, .sqp-chart-msg { white-space:pre-line; }
.sqp-chart-heading { font-size:14px; font-weight:700; color:#64748b; margin-bottom:16px; text-transform:uppercase; letter-spacing:.5px; }
/* The same heading once it has moved up to sit under an inline chart: it is body
   copy there, in the middle of the result, not a section label above a panel. */
.sqp-chart-heading.sqp-chart-heading-inline {
  text-transform:none; letter-spacing:normal; font-size:15px; font-weight:600;
  text-align:left; margin:14px 0 18px; padding:12px 16px;
  background:rgba(0,0,0,.03); border-radius:8px;
}
.sqp-chart-loader { padding:32px 0; }
/* auto-fit, not a fixed pair: with ONE chart enabled a `1fr 1fr` grid left it at
   half width beside an empty column. This gives one chart the full 600px, two a
   column each, and collapses on its own when the quiz is narrow. */
/* CHARTS IN A ROW SHARE IT. A grid of auto-fit columns made three columns at this width, so two
   charts took two thirds and left the third empty: a spider chart 237px wide. Wrapping flex items
   grow to fill their row, two side by side or one across, and the wide question chart takes a
   row of its own. */
.sqp-charts-grid { display:flex; flex-wrap:wrap; gap:20px; max-width:860px; margin:0 auto; }
.sqp-chart-wrap { flex:1 1 300px; min-width:0; box-sizing:border-box; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:16px; }
.sqp-chart-wrap.sqp-chart-wide { flex-basis:100%; }
.sqp-chart-canvas { max-width:100%; max-height:280px; }
/* A spider chart spends its box on the labels around it: held to 280px the web itself was
   about 140px across, its 25/50/75/100% marks stacked on top of each other. */
.sqp-chart-canvas[data-chart-type="radar"] { max-height:400px; }
/* The pie is held to its Pie Width (inline max-width), which left it against the box's left edge. */
.sqp-chart-canvas[data-chart-type="pie"] { margin:0 auto; }
.sqp-chart-msg { font-size:13px; font-weight:600; color:#475569; margin-bottom:8px; }
@media (max-width:768px) {
  .sqp-chart-wrap { flex-basis:100%; }   /* one column below 600px, whatever the chart count */
  .sqp-charts-section { padding:20px 12px 8px; }
}

/* ═══════════════════════════════════════
   Score Dashboard
   ═══════════════════════════════════════ */

.sqp-sd { width:100%; max-width:600px; margin:0 auto 24px; padding:28px 24px; background:#fff; border-radius:16px; border:1px solid #e8ecf1; text-align:center; order:-1; }

/* Header */
.sqp-sd-header { display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:6px; flex-wrap:wrap; }
.sqp-sd-heading { font-size:20px; font-weight:700; color:#1e293b; margin:0; line-height:1.3; }
.sqp-sd-tier-badge { font-size:11px; font-weight:700; padding:4px 14px; border-radius:20px; border:1px solid; letter-spacing:.3px; }

/* Report emailed message */
.sqp-sd-report-msg { display:flex; align-items:center; justify-content:center; gap:6px; font-size:13px; color:#64748b; margin-bottom:16px; padding:8px 16px; background:#f8fafc; border-radius:8px; }
.sqp-sd-report-msg svg { flex-shrink:0; color:#94a3b8; }

/* Chart area */
.sqp-sd-chart-area { padding:20px 0 16px; display:flex; justify-content:center; }

/* Donut */
.sqp-sd-donut { display:block; }
.sqp-sd-pct-num { font-size:28px; font-weight:800; fill:#1e293b; font-family:inherit; }
.sqp-sd-pct-label { font-size:11px; font-weight:600; fill:#94a3b8; text-transform:uppercase; letter-spacing:.5px; font-family:inherit; }
.sqp-sd-seg, .sqp-sd-ring { transform-origin:center; }

/* Gauge */
.sqp-sd-gauge { display:block; }
.sqp-sd-needle { transform-origin:100px 105px; }

/* Number only */
.sqp-sd-number-only { padding:20px 0; }
.sqp-sd-big-num { font-size:56px; font-weight:800; color:#1e293b; line-height:1; }
.sqp-sd-big-label { font-size:12px; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:.5px; margin-top:6px; }

/* Tier Legend */
.sqp-sd-legend { display:flex; align-items:center; justify-content:center; gap:18px; margin-bottom:4px; flex-wrap:wrap; }
.sqp-sd-legend-item { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:#64748b; }
.sqp-sd-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }

/* Divider */
.sqp-sd-divider { height:1px; background:#e8ecf1; margin:18px 0; }

/* Category heading */
.sqp-sd-cats-heading { font-size:14px; font-weight:600; color:#475569; margin-bottom:14px; }

/* Category tab navigation */
.sqp-sd-cat-tabs { display:flex; justify-content:center; gap:4px; margin-bottom:14px; flex-wrap:wrap; }
.sqp-sd-cat-tab { padding:6px 16px; border-radius:20px; border:1.5px solid #e2e8f0; background:#fff; font-size:12px; font-weight:600; color:#64748b; cursor:pointer; transition:all .2s; font-family:inherit; }
.sqp-sd-cat-tab:hover { border-color:#cbd5e1; background:#f8fafc; }
.sqp-sd-cat-tab--on { border-color:var(--sqp-primary, #3b82f6); background:rgba(59,130,246,.06); color:var(--sqp-primary, #3b82f6); }

/* Category card */
.sqp-sd-cat-card { text-align:left; padding:14px 16px; background:#f8fafc; border:1px solid #e8ecf1; border-radius:12px; margin-bottom:8px; }
.sqp-sd-cat-card:last-child { margin-bottom:0; }
.sqp-sd-cat-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.sqp-sd-cat-name { font-size:14px; font-weight:700; color:#1e293b; }
.sqp-sd-cat-tier { font-size:10px; font-weight:700; padding:3px 10px; border-radius:20px; border:1px solid; text-transform:uppercase; letter-spacing:.4px; }
.sqp-sd-cat-bar-wrap { height:8px; background:#e5e7eb; border-radius:99px; overflow:hidden; margin-bottom:6px; }
.sqp-sd-cat-bar { height:100%; border-radius:99px; width:0; transition:width .8s cubic-bezier(.4,0,.2,1); }
.sqp-sd-cat-meta { display:flex; justify-content:space-between; }
.sqp-sd-cat-score { font-size:12px; font-weight:500; color:#94a3b8; }
.sqp-sd-cat-pct { font-size:13px; font-weight:700; }

/* Dynamic CTA */
.sqp-sd-cta { padding-top:16px; }
.sqp-sd-cta-btn { display:inline-block; padding:12px 32px; border-radius:8px; font-size:14px; font-weight:700; color:#fff; text-decoration:none; cursor:pointer; transition:opacity .2s, transform .2s; }
.sqp-sd-cta-btn:hover { opacity:.9; transform:translateY(-1px); }

/* Re-engagement */
.sqp-sd-reengage { display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; color:#94a3b8; margin-top:16px; font-style:italic; }
.sqp-sd-reengage svg { flex-shrink:0; }

/* Responsive */
@media (max-width:480px) {
  .sqp-sd { padding:20px 16px; }
  .sqp-sd-heading { font-size:18px; }
  .sqp-sd-big-num { font-size:42px; }
  .sqp-sd-legend { gap:10px; }
  .sqp-sd-legend-item { font-size:11px; }
  .sqp-sd-cat-tabs { gap:4px; }
  .sqp-sd-cat-tab { padding:5px 12px; font-size:11px; }
}

/* ═══════════════════════════════════════
   Category presentation: charts, layouts,
   badge, peer comparison, key areas
   ═══════════════════════════════════════ */

/* Radar (spider) */
.sqp-sd-radar { display:block; max-width:100%; height:auto; }
.sqp-sd-radar-label { font-size:10.5px; font-weight:600; fill:#64748b; font-family:inherit; }
.sqp-sd-radar-poly { transition:opacity .8s ease; }

/* Pie */
.sqp-sd-pie { display:block; max-width:100%; height:auto; }
.sqp-sd-pie-empty { font-size:20px; font-weight:800; fill:#94a3b8; font-family:inherit; }

/* Thermometer */
.sqp-sd-therm { display:block; }
.sqp-sd-therm-fill { transition:y .9s cubic-bezier(.4,0,.2,1), height .9s cubic-bezier(.4,0,.2,1); }
.sqp-sd-therm-num { font-size:14px; font-weight:800; fill:#fff; font-family:inherit; }
.sqp-sd-therm-tick { font-size:9px; font-weight:600; fill:#94a3b8; font-family:inherit; }

/* Traffic light */
.sqp-sd-traffic { display:block; }
.sqp-sd-traffic-num { font-size:17px; font-weight:800; fill:#1e293b; font-family:inherit; }
.sqp-sd-lamp-on { filter:drop-shadow(0 0 6px currentColor); }

/* Shared category extras */
.sqp-sd-cat-icon { width:20px; height:20px; border-radius:5px; object-fit:cover; margin-right:8px; vertical-align:-4px; }
.sqp-sd-cat-desc { font-size:12.5px; color:#64748b; line-height:1.5; margin-bottom:10px; }
.sqp-sd-peer { display:inline-block; margin-left:8px; font-size:11px; font-weight:600; }
.sqp-sd-peer--up { color:#16a34a; }
.sqp-sd-peer--down { color:#dc2626; }
.sqp-sd-peer--same { color:#94a3b8; }

/* Layout: list */
.sqp-sd-cats--list .sqp-sd-crow { display:flex; align-items:center; justify-content:space-between; gap:16px; text-align:left; padding:14px 16px; border:1px solid #e8ecf1; border-radius:12px; margin-bottom:8px; background:#fff; }
.sqp-sd-cats--list .sqp-sd-crow:last-child { margin-bottom:0; }
.sqp-sd-crow-main { min-width:0; }
.sqp-sd-crow-name { font-size:14px; font-weight:700; color:#1e293b; }
.sqp-sd-crow-desc { font-size:12px; color:#64748b; margin-top:3px; line-height:1.45; }
.sqp-sd-crow-side { text-align:right; flex-shrink:0; }
.sqp-sd-crow-cap { font-size:10px; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:.4px; }
.sqp-sd-crow-val { font-size:24px; font-weight:800; line-height:1.1; }
.sqp-sd-crow-tier { display:inline-block; margin-top:4px; padding:2px 10px; border-radius:5px; font-size:10px; font-weight:700; color:#fff; text-transform:uppercase; letter-spacing:.4px; }
.sqp-sd-crow-peer { margin-top:4px; }
.sqp-sd-crow-peer .sqp-sd-peer { margin-left:0; }

/* Layout: report */
.sqp-sd-anchors { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-bottom:16px; }
.sqp-sd-anchor { padding:5px 14px; border-radius:20px; border:1.5px solid #e2e8f0; background:#fff; font-size:12px; font-weight:600; color:#64748b; cursor:pointer; font-family:inherit; transition:all .2s; }
.sqp-sd-anchor:hover { border-color:#cbd5e1; background:#f8fafc; }
.sqp-sd-anchor--on { border-color:var(--sqp-primary,#3b82f6); color:var(--sqp-primary,#3b82f6); }
.sqp-sd-creport { text-align:left; padding:18px 20px; border:1px solid #e8ecf1; border-radius:12px; margin-bottom:12px; background:#fff; scroll-margin-top:16px; }
.sqp-sd-creport:last-child { margin-bottom:0; }
.sqp-sd-creport-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.sqp-sd-creport-title { display:flex; align-items:center; gap:10px; font-size:16px; font-weight:700; color:#1e293b; }
.sqp-sd-creport-icon { width:32px; height:32px; border-radius:8px; object-fit:cover; flex-shrink:0; }
.sqp-sd-creport-badge { font-size:11px; font-weight:700; padding:4px 12px; border-radius:20px; border:1px solid; white-space:nowrap; }
.sqp-sd-creport-body { font-size:13.5px; color:#475569; line-height:1.65; margin-top:12px; }

/* Layout: tiles */
.sqp-sd-tilegrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:8px; }
.sqp-sd-tile { text-align:left; padding:12px 14px; border:1px solid; border-radius:10px; }
.sqp-sd-tile-name { font-size:12px; font-weight:600; color:#475569; }
.sqp-sd-tile-val { font-size:20px; font-weight:800; margin-top:3px; }
.sqp-sd-tilekey { margin-top:14px; text-align:left; padding:12px 14px; background:#f8fafc; border-radius:10px; }
.sqp-sd-tilekey-hd { font-size:11px; font-weight:700; color:#475569; text-transform:uppercase; letter-spacing:.4px; margin-bottom:7px; }
.sqp-sd-tilekey-row { display:flex; align-items:center; gap:7px; font-size:12px; color:#64748b; margin-bottom:4px; }
.sqp-sd-tilekey-row:last-child { margin-bottom:0; }

/* Category badge ("you are a X") */
.sqp-sd-badge { display:flex; align-items:center; gap:16px; text-align:left; padding:18px 20px; border:1.5px solid; border-radius:14px; margin-bottom:4px; }
.sqp-sd-badge-icon { width:56px; height:56px; border-radius:12px; object-fit:cover; flex-shrink:0; }
.sqp-sd-badge-cap { font-size:13px; color:#64748b; }
.sqp-sd-badge-name { font-size:26px; font-weight:800; line-height:1.15; }
.sqp-sd-badge-desc { font-size:13px; color:#475569; line-height:1.55; margin-top:6px; }

/* Pre-quiz key areas block (start screen) */
.sqp-ka { text-align:left; margin:18px 0; }
.sqp-ka-title { font-size:14px; font-weight:700; color:#334155; margin-bottom:12px; text-align:center; }
.sqp-ka-items { display:grid; gap:10px; }
.sqp-ka--grid .sqp-ka-items { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.sqp-ka--row .sqp-ka-items { grid-auto-flow:column; grid-auto-columns:minmax(120px,1fr); }
.sqp-ka--list .sqp-ka-items { grid-template-columns:1fr; }
.sqp-ka-item { padding:12px 14px; border:1px solid #e8ecf1; border-radius:10px; background:rgba(255,255,255,.6); }
.sqp-ka-icon { width:32px; height:32px; border-radius:8px; object-fit:cover; margin-bottom:8px; display:block; }
.sqp-ka-name { font-size:13px; font-weight:700; color:#1e293b; }
.sqp-ka-desc { font-size:12px; color:#64748b; line-height:1.5; margin-top:4px; }

/* Category gate wrapper, layout-neutral by design: it may hold anything. */
.sqp-fe-catgate { display:block; }

/* An outcome screen carrying a score dashboard must be able to SCROLL.
   The template frame is a fixed-height overflow:hidden box, so a dashboard taller
   than the frame lost everything below the fold with no way to reach it. Scoped to
   .sqp-oc-has-sd (added by the engine only when a dashboard is injected) so no
   other outcome screen's layout is touched. The frame keeps min-height:100% so a
   SHORT dashboard still fills the frame and the template's background is unbroken.
   Both the screen and the frame are column flex boxes with justify-content:center.
   Centring content TALLER than its box overflows in both directions, and a scroll
   container cannot scroll to a negative offset, so the heading and the top of the
   chart were unreachable by any means (measured: dashboard top 259px above its own
   screen). justify-content:flex-start + margin:auto on the frame keeps the centring
   whenever the dashboard fits and clamps it to the top the moment it does not. */
.sqp-screen-outcome.sqp-oc-has-sd { overflow-y:auto; justify-content:flex-start; }
.sqp-screen-outcome.sqp-oc-has-sd .sqp-oc-tpl {
  overflow:visible; height:auto; min-height:100%;
  justify-content:flex-start; margin-top:auto; margin-bottom:auto;
}

@media (max-width:600px) {
  .sqp-sd-cats--list .sqp-sd-crow { flex-direction:column; align-items:flex-start; gap:10px; }
  .sqp-sd-crow-side { text-align:left; }
  .sqp-sd-badge { flex-direction:column; align-items:flex-start; gap:12px; }
  .sqp-sd-badge-name { font-size:22px; }
  .sqp-sd-creport-head { flex-direction:column; align-items:flex-start; gap:8px; }
  /* A row of columns cannot fit a phone; fall back to stacking. */
  .sqp-ka--row .sqp-ka-items { grid-auto-flow:row; grid-auto-columns:auto; grid-template-columns:1fr; }
}

/* ═══════════════════════════════════════
   Merge Tag Styles
   ═══════════════════════════════════════ */

/* Tables */
/* A MERGE-TAG TABLE IS QUIZ CONTENT, SO IT WEARS THE QUIZ'S COLOURS.
   These were fixed slate greys and a grey gradient header, which is a table
   borrowed from a different design: dropped onto a coloured outcome card it
   reads as a screenshot of somebody else's report, and on the dark templates the
   #475569 body text lands on a near-black card. Everything below is derived from
   the card's own title and body ink, with the old greys kept as the fallback for
   anywhere the style variables are not defined (an email client, a bare
   preview). */
.sqp-mt-table {
  --sqp-mt-line: var(--sqp-card-edge);
  width:100%; border-collapse:separate; border-spacing:0; margin:20px 0; font-size:13px; text-align:left;
  border:1px solid var(--sqp-mt-line); border-radius:12px; overflow:hidden;
}
.sqp-mt-table th {
  background:color-mix(in srgb, var(--sqp-sp-title-color, #334155) 7%, transparent);
  font-weight:700; color:var(--sqp-sp-title-color, #334155);
  padding:12px 18px; border-bottom:1px solid var(--sqp-mt-line);
  font-size:11px; text-transform:uppercase; letter-spacing:.5px;
}
.sqp-mt-table td { padding:11px 18px; border-bottom:1px solid var(--sqp-mt-line); color:var(--sqp-sp-desc-color, #475569); font-weight:500; }
.sqp-mt-table tr:last-child td { border-bottom:none; }
.sqp-mt-table tr:hover td { background:color-mix(in srgb, var(--sqp-sp-title-color, #334155) 4%, transparent); }
/* The score is the reason anyone reads the row, so it keeps the heading's ink
   and its own tabular figures: 3 / 6 under 12 / 18 should line up on the slash. */
.sqp-mt-table td:last-child { font-weight:700; color:var(--sqp-sp-title-color, #334155); font-variant-numeric:tabular-nums; }

/* Category Breakdown Bars */
/* A SURFACE OF ITS OWN, ON EVERY TEMPLATE. This was background:transparent, so the
   chart had whatever was behind it showing through: on elegant that is a marble
   photograph read straight through the bars and the numbers. Its sibling charts
   below (.sqp-mt-barchart, .sqp-mt-piechart-wrap) have always had a fixed light
   surface with fixed dark ink for exactly this reason, and this block is the one
   that never got it.
   Fixed white and fixed inks rather than palette tokens, and the two go together:
   the label and value took --sqp-sp-title-color, which is the ink chosen to read on
   the SCREEN. On a dark template that is white, so painting the surface white while
   leaving those tokens in place would have hidden the text instead of the chart -
   the same fault the recap table had. A chart with a fixed surface needs fixed ink. */
.sqp-mt-cat-breakdown {
  margin:20px 0; padding:16px; background:#ffffff; border-radius:12px; border:1px solid #e2e8f0;
}
.sqp-mt-cat-row { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.sqp-mt-cat-row:last-child { margin-bottom:0; }
/* Room for a real category name. At a flat 100px with nowrap, anything longer
   than "Communication" was cut mid-word, and the label is the only thing on the
   row that says what the bar is about. */
.sqp-mt-cat-label { flex:0 0 30%; min-width:84px; max-width:170px; font-size:13px; font-weight:600; color:#334155; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sqp-mt-cat-bar-wrap { flex:1; height:20px; background:#e5e7eb; border-radius:10px; overflow:hidden; }
/* The gradient's far end used to be a literal #60a5fa, so every bar on every
   quiz faded from the brand colour into the same blue. It is a lightened mix of
   the brand instead, which is the same shape of gradient on any palette. */
.sqp-mt-cat-bar { height:100%; background:linear-gradient(90deg, var(--sqp-primary, #3b82f6), color-mix(in srgb, var(--sqp-primary, #3b82f6) 62%, #ffffff)); border-radius:10px; transition:width .6s ease; min-width:4px; }
.sqp-mt-cat-val { flex:0 0 70px; font-size:12px; font-weight:700; color:#334155; font-variant-numeric:tabular-nums; }

/* Bar Chart (CSS) */
.sqp-mt-barchart { margin:20px 0; padding:16px; background:#f8fafc; border-radius:12px; border:1px solid #e2e8f0; }
.sqp-mt-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.sqp-mt-bar-row:last-child { margin-bottom:0; }
.sqp-mt-bar-label { flex:0 0 80px; font-size:12px; font-weight:600; color:#334155; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sqp-mt-bar-track { flex:1; height:22px; background:#e5e7eb; border-radius:11px; overflow:hidden; }
.sqp-mt-bar-fill { height:100%; border-radius:11px; transition:width .6s ease; min-width:4px; }
.sqp-mt-bar-value { flex:0 0 55px; font-size:12px; font-weight:700; color:#475569; }

/* Pie Chart */
.sqp-mt-piechart-wrap { text-align:center; margin:24px 0; padding:20px; background:#f8fafc; border-radius:12px; border:1px solid #e2e8f0; }
.sqp-mt-piechart { display:inline-block; width:200px; height:200px; border-radius:50%; box-shadow:0 4px 12px rgba(0,0,0,.08); }
.sqp-mt-pie-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:10px 20px; margin-top:16px; }
.sqp-mt-pie-leg-item { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:#334155; }
.sqp-mt-pie-dot { width:12px; height:12px; border-radius:50%; display:inline-block; flex-shrink:0; }

/* Spider Chart */
.sqp-mt-spider-wrap { text-align:center; margin:24px 0; padding:20px; background:#f8fafc; border-radius:12px; border:1px solid #e2e8f0; }
.sqp-mt-spider-wrap svg { max-width:320px; width:100%; height:auto; overflow:visible; }

/* QA Chart: Question Performance */
.sqp-mt-qa-chart { margin:20px 0; border-radius:16px; overflow:hidden; }

/* Summary header with gauge */
.sqp-mt-qa-summary { display:flex; align-items:center; gap:20px; padding:24px 28px; background:linear-gradient(135deg,#fef9ee,#fdf4e3); border-radius:16px 16px 0 0; }
.sqp-mt-qa-gauge { flex-shrink:0; }
.sqp-mt-qa-stats { flex:1; }
.sqp-mt-qa-stats-title { font-size:18px; font-weight:800; color:#1e293b; margin-bottom:8px; letter-spacing:-.3px; }
.sqp-mt-qa-badges { display:flex; flex-wrap:wrap; gap:8px; }
.sqp-mt-qa-badge { display:inline-block; padding:4px 14px; border-radius:20px; font-size:12px; font-weight:700; }
.sqp-mt-qa-badge-correct { background:#dcfce7; color:#166534; }
.sqp-mt-qa-badge-incorrect { background:#fee2e2; color:#991b1b; }
.sqp-mt-qa-badge-total { background:#f1f5f9; color:#475569; }

/* Question list */
.sqp-mt-qa-list { background:#fff; border:1px solid #e5e7eb; border-top:none; border-radius:0 0 16px 16px; }
.sqp-mt-qa-row { display:flex; align-items:center; gap:12px; padding:14px 20px; border-bottom:1px solid #f1f5f9; transition:background .15s; }
.sqp-mt-qa-row:last-child { border-bottom:none; }
.sqp-mt-qa-row:hover { background:#fafbfc; }
.sqp-mt-qa-rnum { font-size:12px; font-weight:800; color:#94a3b8; flex-shrink:0; min-width:28px; }
.sqp-mt-qa-rdot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.sqp-mt-qa-rtext { flex:1; font-size:14px; font-weight:700; color:#1e293b; line-height:1.4; }
.sqp-mt-qa-rans { font-size:13px; color:#64748b; font-weight:500; flex-shrink:0; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sqp-mt-qa-rscore { font-size:13px; font-weight:800; flex-shrink:0; min-width:36px; text-align:right; }
.sqp-mt-qa-sc-correct { color:#16a34a; }
.sqp-mt-qa-sc-incorrect { color:#dc2626; }

@media(max-width:560px) {
  .sqp-mt-qa-summary { flex-direction:column; text-align:center; padding:20px 16px; }
  .sqp-mt-qa-badges { justify-content:center; }
  .sqp-mt-qa-row { flex-wrap:wrap; gap:6px; padding:12px 14px; }
  .sqp-mt-qa-rtext { flex-basis:100%; order:2; }
  .sqp-mt-qa-rans { max-width:none; order:3; flex-basis:calc(100% - 80px); margin-left:48px; }
  .sqp-mt-qa-rscore { order:1; }
}

/* Tag Pills */
.sqp-mt-tags { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin:12px 0; }
.sqp-mt-tag-pill { display:inline-block; padding:6px 16px; border-radius:20px; background:color-mix(in srgb, var(--sqp-primary, #f05451) 10%, transparent); color:var(--sqp-primary, #f05451); font-size:12px; font-weight:700; }

/* [CategoryRank] - a CARD per category.

   It used to be a one-line strip: name, then `20% (4/20)`. What it replaces (and
   what a migrated quiz's author wrote it for) is a grid of cards, each carrying
   the category's own description, a meter filled to the score in its band color,
   and the band's name. The description is the point of the block - it is where a
   result screen explains what the competency IS - and there was nowhere for it.

   The column count and the gap come from the shortcode, as inline style: they are
   per-instance, so a stylesheet cannot know them. */
.sqp-mt-catrank { display:grid; margin:20px 0; text-align:left; }
.sqp-mt-catrank-item {
  display:flex; flex-direction:column; justify-content:space-between;
  background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:20px;
}
.sqp-mt-catrank-title { margin:0 0 10px; font-size:17px; font-weight:700; line-height:1.3; }
.sqp-mt-catrank-desc { font-size:14px; line-height:1.55; }
.sqp-mt-catrank-desc p { margin:0 0 8px; }
.sqp-mt-catrank-desc p:last-child { margin-bottom:0; }
/* Pushed to the foot of the card so meters line up across a row whose
   descriptions are different lengths - which they always are. */
.sqp-mt-catrank-meter { margin-top:16px; }
.sqp-mt-catrank-track { height:8px; border-radius:99px; background:#e9ecef; overflow:hidden; }
.sqp-mt-catrank-fill { height:100%; border-radius:99px; transition:width .5s ease; }
.sqp-mt-catrank-info { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-top:6px; font-size:13px; }
.sqp-mt-catrank-band { font-weight:700; }

/* Poll Results */
.sqp-mt-poll-results { margin:20px 0; padding:16px; background:#f8fafc; border-radius:12px; border:1px solid #e2e8f0; }
.sqp-mt-poll-q { margin-bottom:20px; }
.sqp-mt-poll-q:last-child { margin-bottom:0; }
.sqp-mt-poll-q-title { font-size:14px; font-weight:700; color:#1e293b; margin-bottom:8px; }
.sqp-mt-poll-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.sqp-mt-poll-label { flex:0 0 100px; font-size:12px; font-weight:600; color:#475569; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sqp-mt-poll-chart { max-width:360px; margin:0 auto; }
.sqp-mt-poll-closed { margin:20px 0; padding:16px; background:#fff7ed; border:1px solid #fed7aa; border-radius:12px; color:#9a3412; font-size:14px; font-weight:600; text-align:center; }

/* No Data */
.sqp-mt-no-data { font-size:13px; color:#9ca3af; font-style:italic; text-align:center; padding:20px 0; }
/* Hide merge tag placeholders until JS populates them */
.sqp-mt-pending { display:none !important; }

/* Download buttons inside merge tags */
.sqp-mt-downloadpdf .sqp-fe-download-btn,
.sqp-mt-downloadcert .sqp-fe-download-btn { margin:8px auto; }

@media (max-width:768px) {
  .sqp-mt-cat-label { flex:0 0 70px; font-size:12px; }
  .sqp-mt-bar-label { flex:0 0 50px; font-size:11px; }
  .sqp-mt-poll-label { flex:0 0 60px; }
  .sqp-mt-catrank { grid-template-columns:1fr !important; }
  .sqp-mt-catrank-item { padding:16px; }
  .sqp-mt-catrank-title { font-size:16px; }
  .sqp-mt-piechart { width:160px; height:160px; }
}

/* ── Personalization Screen ── */
/* THE ONE SCREEN WITH NO CARD. Start, question, outcome and opt-in are each painted
   onto a card by their template; nothing paints this one, so it arrived naked on the
   page background: a title, a field and a small button floating on grey, between two
   screens that both sit in a white card. It read as a page that had failed to load
   rather than as the next step.
   The card is built from the frame vars the templates already set, not from classic's
   literals, so a dark template gets its own surface and border instead of a white box
   punched into it. Nothing here is template-specific, because no template has ever
   claimed this screen. */
/* No horizontal padding: it capped the card at 660 against the 700 its neighbours
   draw, which is the wobble this was meant to remove. The standalone wrapper already
   keeps the quiz off the screen edges on small viewports. */
/* GIVE IT THE ROOM A GREETING NEEDS. This is the handshake before the quiz starts:
   one question, asked once, and it was drawn at the density of a settings row: a
   250px card adrift near the top of a 900px viewport. The card now stands to a real
   height and sits in the middle of the space rather than at the top of it, so the
   screen reads as a moment rather than as a form that lost its page.
   min-height is in px, not vh: this screen also renders inside a shortcode embed,
   where a viewport-relative height would size the card to the visitor's browser
   rather than to the block it was placed in. */
.sqp-personalize { display:flex; align-items:center; justify-content:center; min-height:460px; padding:48px 0; }
/* Standalone only. On its own page there is nothing else to share the screen with, so
   the card sits in the middle of it instead of near the top with half a screen of grey
   underneath. Scoped to the body class the standalone renderer sets, because the same
   height inside a shortcode embed would size the card to the visitor's browser rather
   than to the block the author placed it in. */
body.sqp-standalone .sqp-personalize { min-height:calc(100vh - 120px); }
/* EDITOR PREVIEW ONLY. .sqp-lp-personalize is put on the preview container by
   EditablePreview ('sqp-lp-' + screenType) and exists nowhere on a visitor's page.
   The 460px above is breathing room on a real screen; inside a preview panel it is
   just 150px of empty canvas that pushes the card out of view and makes the panel
   scroll. The card itself is what the author is editing. */
.sqp-lp-personalize .sqp-personalize { min-height:0; padding:16px 0; }
.sqp-personalize-inner {
  /* 700 to match the card the screens either side of it draw. At 520 the frame
     visibly shrank and grew again as you moved start -> name -> first question,
     which reads as the layout wobbling rather than as three steps of one thing. */
  text-align:center; max-width:700px; width:100%; box-sizing:border-box;
  background:var(--sqp-sp-bg, #fff);
  /* THE CARD, NOT THE FRAME. This used to read --sqp-sp-tmpl-bdrw/-bdrs/-bdrc and
     --sqp-sp-bdr-r, which describe the FRAME around a screen - and it is the only
     element in the whole frontend that draws its own card out of them. That is wrong
     in both directions:

       - On classic the frame is never drawn at all (the template paints
         .sqp-classic-card: 1px #dee2e6, 8px radius). Classic's own template defaults
         for those frame keys are 4px / the quiz's PRIMARY color / 0 radius, so as
         soon as a quiz had a seeded style row this one card turned into a thick coral
         square while every other screen in the same quiz drew a grey hairline.
       - On the templates that DO draw the frame, .sqp-screen already has that exact
         border, so this drew a second identical one nested a few pixels inside it.

     The neutral hairline is what the other screens draw, so the name screen now
     matches them. Background still follows --sqp-sp-bg like every other card. */
  border:1px solid #dee2e6;
  border-radius:12px;
  box-shadow:0 4px 20px rgba(16,24,40,.07);
  padding:64px 56px;
}
/* The type carries the step up, not just the padding: at 22px the question sat level
   with its own input, so nothing led. 26, not 28 (issue #33): six points over the 20px
   input is still a clear lead, and it now sits inside the 26-30 range the templates'
   own headings use instead of above most of them. min() with 6vw matches the renderer's
   clamp on the other headings, so a phone gets ~23px rather than the desktop size. */
.sqp-personalize-title { font-size:min(26px, 6vw); font-weight:700; margin-bottom:32px; color:var(--sqp-secondary, #0f2e47); line-height:1.3; letter-spacing:-.2px; }
/* THE FIELD IS THE SUBJECT OF THIS SCREEN, so it is sized like one. Typing your name
   into a 16px box is filling in a form; typing it into this is answering someone. */
.sqp-personalize-input { width:100%; padding:14px 20px; font-size:20px; border:2px solid var(--sqp-sp-field-bdr, #e2e8f0); border-radius:12px; outline:none; text-align:center; transition:border-color .2s, box-shadow .2s; box-sizing:border-box; }
.sqp-personalize-input::placeholder { color:#a0aec0; font-size:18px; }
.sqp-personalize-input:focus { border-color:var(--sqp-primary, #f05451); box-shadow:0 0 0 4px color-mix(in srgb, var(--sqp-primary, #f05451) 12%, transparent); }
/* Full width, like the field it belongs to and like the start button on the screen
   before it. A 100px "OK" centred under a full-width field reads as unrelated to it,
   and is the smallest tap target in the whole quiz. */
.sqp-personalize-btn { display:block; width:100%; margin:18px 0 0; padding:18px 24px; font-size:17px; font-weight:700; letter-spacing:.3px; border:none; border-radius:10px; background:var(--sqp-primary, #f05451); color:var(--sqp-primary-text, #fff); cursor:pointer; transition:opacity .2s, transform .15s, box-shadow .2s; }
.sqp-personalize-btn:hover { opacity:.92; transform:translateY(-1px); box-shadow:0 6px 16px color-mix(in srgb, var(--sqp-primary, #f05451) 30%, transparent); }

/* ── Analyzing Screen ── */
/* ── Analyzing Screen: Base ── */
.sqp-analyzing { padding:60px 20px; min-height:200px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
/* The template's own card values come from templates/*/interstitial.php, where
   .sqp-analyzing is now listed beside .sqp-interstitial on the card rule: same
   width, padding, background and radius, kept in the one place they are defined
   rather than copied here to drift. Those selectors carry two classes and so win
   over the padding above.
   Lumen is the exception and needs nothing: it ships no card rule of its own and
   takes the base .sqp-interstitial look, which is what this block already is. */
.sqp-analyzing-text { font-size:18px; font-weight:600; color:var(--sqp-secondary, #0f2e47); margin-bottom:24px; }

/* ── Template: Progress Bar ── */
.sqp-analyzing-bar-wrap { width:100%; max-width:400px; height:8px; background:#e2e8f0; border-radius:4px; overflow:hidden; }
.sqp-analyzing-bar { height:100%; width:0; border-radius:4px; }
.sqp-analyzing-smooth { animation:sqpAnalyzeSmooth var(--sqp-analyzing-duration, 3s) ease-in-out forwards; }
@keyframes sqpAnalyzeSmooth { 0% { width:0; } 100% { width:100%; } }
.sqp-analyzing-pulse { animation:sqpAnalyzePulse var(--sqp-analyzing-duration, 3s) ease-in-out forwards; }
@keyframes sqpAnalyzePulse { 0% { width:0; opacity:1; } 25% { width:30%; opacity:.6; } 50% { width:55%; opacity:1; } 75% { width:80%; opacity:.6; } 100% { width:100%; opacity:1; } }
.sqp-analyzing-stepped { animation:sqpAnalyzeStepped var(--sqp-analyzing-duration, 3s) steps(5) forwards; }
@keyframes sqpAnalyzeStepped { 0% { width:0; } 100% { width:100%; } }

/* ── Template: Circular ── */
.sqp-az-circular { position:relative; width:120px; height:120px; margin-bottom:20px; }
.sqp-az-circle-svg { width:100%; height:100%; transform:rotate(-90deg); }
.sqp-az-circle-track { fill:none; stroke:#e2e8f0; stroke-width:6; }
.sqp-az-circle-fill { fill:none; stroke-width:6; stroke-linecap:round; transition:stroke-dashoffset 0.1s linear; }
.sqp-az-circle-pct { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:24px; font-weight:800; color:var(--sqp-secondary, #0f2e47); }
.sqp-analyzing-tpl--circular .sqp-analyzing-text { margin-bottom:0; }

/* ── Template: Dots ── */
.sqp-az-dots { display:flex; gap:14px; margin-bottom:20px; }
.sqp-az-dot { width:16px; height:16px; border-radius:50%; animation:sqpDotBounce 1.2s ease-in-out infinite; }
.sqp-az-dot:nth-child(2) { animation-delay:0.2s; }
.sqp-az-dot:nth-child(3) { animation-delay:0.4s; }
@keyframes sqpDotBounce {
  0%, 80%, 100% { transform:scale(0.6); opacity:0.4; }
  40% { transform:scale(1); opacity:1; }
}
.sqp-analyzing-tpl--dots .sqp-analyzing-text { margin-bottom:0; }

/* ── Template: Brain ── */
.sqp-az-brain { width:80px; height:80px; margin-bottom:16px; animation:sqpBrainPulse 1.5s ease-in-out infinite; }
.sqp-az-brain svg { width:100%; height:100%; }
@keyframes sqpBrainPulse {
  0%, 100% { transform:scale(1); opacity:0.8; }
  50% { transform:scale(1.08); opacity:1; }
}
.sqp-az-brain-bar { width:100%; max-width:280px; height:4px; background:#e2e8f0; border-radius:2px; overflow:hidden; margin-top:16px; }
.sqp-az-brain-fill { height:100%; width:0; border-radius:2px; animation:sqpAnalyzeSmooth var(--sqp-az-duration, 3s) ease-in-out forwards; }
.sqp-analyzing-tpl--brain .sqp-analyzing-text { margin-bottom:8px; font-size:15px; }

/* ── Template: Checklist ── */
.sqp-az-checklist { width:100%; max-width:320px; display:flex; flex-direction:column; gap:12px; }
.sqp-az-check-item { display:flex; align-items:center; gap:12px; opacity:0.4; transition:all 0.4s ease; }
.sqp-az-check-item.sqp-az-checked { opacity:1; }
.sqp-az-check-icon { width:24px; height:24px; flex-shrink:0; color:#cbd5e1; transition:color 0.3s; }
.sqp-az-check-icon svg { width:100%; height:100%; }
.sqp-az-checked .sqp-az-check-icon { color:var(--sqp-az-check-color, #007bff); }
.sqp-az-checked .sqp-az-check-icon svg rect { fill:var(--sqp-az-check-color, #007bff); fill-opacity:0.12; stroke:var(--sqp-az-check-color, #007bff); }
.sqp-az-checked .sqp-az-check-icon svg::after { content:''; }
.sqp-az-check-label { font-size:15px; font-weight:500; color:var(--sqp-secondary, #0f2e47); }
.sqp-az-checked .sqp-az-check-label { color:var(--sqp-secondary, #0f2e47); }
/* Checkmark appears on checked */
.sqp-az-checked .sqp-az-check-icon svg { background:none; }
.sqp-az-check-item.sqp-az-checked .sqp-az-check-icon::after {
  content:'✓'; position:absolute; font-size:13px; font-weight:700; color:var(--sqp-az-check-color, #007bff);
  width:24px; height:24px; display:flex; align-items:center; justify-content:center;
}
.sqp-az-check-icon { position:relative; }
.sqp-az-check-item:not(.sqp-az-checked) .sqp-az-check-icon::after { display:none; }
.sqp-analyzing-tpl--checklist .sqp-analyzing-text { margin-bottom:0; font-size:14px; color:#94a3b8; }

/* ── Template: Radar ── */
.sqp-az-radar { width:130px; height:130px; margin-bottom:16px; }
.sqp-az-radar svg { width:100%; height:100%; }
.sqp-az-radar-sweep { transform-origin:60px 60px; animation:sqpRadarSweep 1.5s linear infinite; }
@keyframes sqpRadarSweep {
  0% { transform:rotate(0deg); }
  100% { transform:rotate(360deg); }
}
.sqp-analyzing-tpl--radar .sqp-analyzing-text { margin-bottom:0; }

/* ── Answer explanation (Phase 4) ──
   The "why", under the correct/incorrect verdict and in the answer-review table.
   Quiet on purpose: the verdict is the headline, this is the reading. */
.sqp-fe-explanation {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 400;
  opacity: .92;
}
/* BOTH ends, not just the last one. A default <p> brings a top margin as well as a
   bottom one, and leaving the top in place put a full line of empty space between the
   rule above and the first word of the reasoning. */
.sqp-fe-explanation p { margin: 0 0 6px; }
.sqp-fe-explanation p:first-child { margin-top: 0; }
.sqp-fe-explanation p:last-child { margin-bottom: 0; }

.sqp-mt-answers-table .sqp-mt-verdict { white-space: nowrap; font-weight: 600; }
.sqp-mt-answers-table .sqp-mt-verdict-ok { color: #15803d; }
.sqp-mt-answers-table .sqp-mt-verdict-no { color: #b91c1c; }
.sqp-mt-answers-table .sqp-mt-verdict-na { color: #94a3b8; font-weight: 400; }
.sqp-mt-answers-table .sqp-mt-explanation { font-size: 13px; line-height: 1.55; }

/* ── Paid Quiz System: pay-before paywall ─────────────────────────────────── */
.sqp-pw-wrap { display: flex; justify-content: center; padding: 24px 16px; }
.sqp-pw-card {
  width: 100%; max-width: 460px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 16px; box-shadow: 0 6px 24px rgba(15,23,42,.06); padding: 32px 28px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.sqp-pw-head { text-align: center; margin-bottom: 22px; }
.sqp-pw-lock {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sqp-primary, #f05451); color: #fff;
}
.sqp-pw-lock svg { width: 22px; height: 22px; }
.sqp-pw-title { font-size: 20px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.sqp-pw-price { font-size: 28px; font-weight: 800; color: var(--sqp-primary, #f05451); margin: 4px 0; }
.sqp-pw-sub { font-size: 14px; color: #64748b; margin: 4px 0 0; }
.sqp-pw-form { display: flex; flex-direction: column; gap: 12px; }
.sqp-pw-row2 { display: flex; gap: 12px; }
.sqp-pw-row2 .sqp-pw-field { flex: 1; }
.sqp-pw-field { display: flex; flex-direction: column; gap: 5px; }
.sqp-pw-field span { font-size: 12.5px; font-weight: 600; color: #334155; }
.sqp-pw-field input {
  width: 100%; box-sizing: border-box; padding: 11px 13px; font-size: 15px;
  border: 1px solid #d1d5db; border-radius: 9px; background: #fff; color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
}
.sqp-pw-field input:focus {
  outline: none; border-color: var(--sqp-primary, #f05451);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sqp-primary, #f05451) 18%, transparent);
}
.sqp-pw-note { font-size: 13px; color: #64748b; min-height: 0; }
.sqp-pw-note.sqp-pw-err { color: #b91c1c; }
.sqp-pw-btn {
  margin-top: 4px; width: 100%; padding: 13px 16px; font-size: 15.5px; font-weight: 700;
  color: #fff; background: var(--sqp-primary, #f05451); border: none; border-radius: 10px;
  cursor: pointer; transition: filter .15s, opacity .15s;
}
.sqp-pw-btn:hover { filter: brightness(1.06); }
.sqp-pw-btn:disabled { opacity: .6; cursor: default; }
.sqp-pw-checkout { margin-top: 18px; }
.sqp-pw-msg { text-align: center; font-size: 14px; padding: 12px 0; }
.sqp-pw-err { color: #b91c1c; }
.sqp-pw-confirming { text-align: center; padding: 28px 0; color: #475569; font-size: 15px; }
.sqp-pw-spinner {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid #e5e7eb; border-top-color: var(--sqp-primary, #f05451);
  animation: sqp-pw-spin .8s linear infinite;
}
@keyframes sqp-pw-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .sqp-pw-row2 { flex-direction: column; } .sqp-pw-card { padding: 26px 20px; } }

/* ── Paid Quiz System: pay-after preview + unlock panel, one card ──────────────
   The preview used to be loose text on the page with a small bar under it. Now the
   preview, a fade standing in for what is still locked, and the unlock action share
   one card; the inline checkout opens inside it too. Brand color from --sqp-primary. */
.sqp-unlock-wrap {
  max-width: 560px; margin: 8px auto 0; text-align: center; overflow: hidden;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15,23,42,.08);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.sqp-unlock-wrap > .sqp-prepay { padding: 34px 34px 6px; color: #0f172a; }
.sqp-unlock-wrap > .sqp-prepay :is(h1, h2, h3, h4) { margin: 0 0 10px; font-size: 22px; line-height: 1.3; font-weight: 700; color: #0f172a; }
.sqp-unlock-wrap > .sqp-prepay p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: #475569; }
.sqp-unlock-wrap > .sqp-prepay ul { list-style: none; margin: 0 0 10px; padding: 0; }
.sqp-unlock-wrap > .sqp-prepay li { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: #475569; }
.sqp-unlock-wrap > .sqp-prepay li::before { content: '\2713'; margin-right: 8px; color: var(--sqp-primary, #f05451); font-weight: 700; }
.sqp-unlock-wrap > .sqp-prepay > :last-child { margin-bottom: 0; }

.sqp-unlock-bar { margin: 0; }
.sqp-unlock-fade { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 18px 48px 0; }
.sqp-unlock-fade span { display: block; width: 100%; height: 10px; border-radius: 6px; background: #e9edf3; }
.sqp-unlock-fade span:nth-child(2) { width: 86%; }
.sqp-unlock-fade span:nth-child(3) { width: 62%; }
.sqp-unlock-fade::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,.2), #fff 92%); }
.sqp-unlock-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 34px 30px; }
.sqp-unlock-lock {
  position: relative; width: 48px; height: 48px; margin-top: -10px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--sqp-primary, #f05451); background: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--sqp-primary, #f05451) 12%, #fff), 0 4px 12px rgba(15,23,42,.08);
}
.sqp-unlock-lock svg { width: 22px; height: 22px; }
.sqp-unlock-title { margin-top: 10px; font-size: 18px; font-weight: 700; color: #0f172a; }
.sqp-unlock-txt { max-width: 400px; font-size: 14px; line-height: 1.55; color: #64748b; }
.sqp-unlock-btn {
  width: 100%; max-width: 360px; margin-top: 8px; padding: 14px 20px; font-size: 16px; font-weight: 700;
  color: #fff; border: none; border-radius: 12px; cursor: pointer; background: var(--sqp-primary, #f05451);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--sqp-primary, #f05451) 28%, transparent);
  transition: filter .15s, transform .15s;
}
.sqp-unlock-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
/* Themes style every <button> on hover and focus. Astra's `button:hover` (0,1,1) beat
   `.sqp-unlock-btn` (0,1,0) and turned the unlock button the theme's blue under the
   cursor, so the buttons in this card restate their own colors one class deeper. */
.sqp-unlock-wrap .sqp-unlock-btn,
.sqp-unlock-wrap .sqp-unlock-btn:hover,
.sqp-unlock-wrap .sqp-unlock-btn:focus { background: var(--sqp-primary, #f05451); color: #fff; }
.sqp-unlock-wrap .sqp-pw-btn:hover,
.sqp-unlock-wrap .sqp-pw-btn:focus { background: var(--sqp-primary, #f05451); color: #fff; }
.sqp-unlock-wrap .sqp-pw-method:hover,
.sqp-unlock-wrap .sqp-pw-method:focus { background: #fff; color: #334155; }
.sqp-unlock-wrap .sqp-pw-method.sqp-on:hover,
.sqp-unlock-wrap .sqp-pw-method.sqp-on:focus { color: var(--sqp-primary, #f05451); }
.sqp-unlock-wrap .sqp-uf-cancel,
.sqp-unlock-wrap .sqp-uf-cancel:hover,
.sqp-unlock-wrap .sqp-uf-cancel:focus { background: none; border: 0; box-shadow: none; }
.sqp-unlock-wrap .sqp-uf-cancel:hover,
.sqp-unlock-wrap .sqp-uf-cancel:focus { color: #64748b; }
.sqp-unlock-secure { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; color: #94a3b8; }
.sqp-unlock-secure svg { width: 14px; height: 14px; }
/* The inline checkout opens inside the same card, under a hairline, not as a card in a card. */
.sqp-unlock-wrap .sqp-uf-inline {
  max-width: none; margin: 18px 0 0; border: 0; border-top: 1px solid #eef0f4; border-radius: 0;
  box-shadow: none; padding: 26px 30px 28px; text-align: left;
}
@media (max-width: 520px) {
  .sqp-unlock-wrap { border-radius: 14px; }
  .sqp-unlock-wrap > .sqp-prepay { padding: 26px 20px 4px; }
  .sqp-unlock-fade { padding: 16px 28px 0; }
  .sqp-unlock-inner { padding: 0 20px 24px; }
  .sqp-unlock-wrap .sqp-uf-inline { padding: 22px 18px 24px; }
}
.sqp-pw-modal {
  position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center;
  justify-content: center; padding: 18px; background: rgba(15,23,42,.55);
  overflow-y: auto;
}
.sqp-pw-modal-card { position: relative; margin: auto; }
.sqp-pw-modal-x {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: none;
  background: transparent; font-size: 24px; line-height: 1; color: #94a3b8; cursor: pointer;
}
.sqp-pw-modal-x:hover { color: #475569; }
.sqp-pw-or { display: flex; align-items: center; text-align: center; color: #94a3b8; font-size: 13px; margin: 6px 0; }
.sqp-pw-or::before, .sqp-pw-or::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.sqp-pw-or span { padding: 0 12px; }
.sqp-pw-paypal { margin-top: 4px; }
/* Card Element (number/expiry/cvc only) container */
.sqp-pw-card-el { padding: 12px 13px; border: 1px solid #d1d5db; border-radius: 9px; background: #fff; margin: 2px 0 4px; }
.sqp-pw-card-el.StripeElement--focus { border-color: var(--sqp-primary, #f05451); box-shadow: 0 0 0 3px rgba(240,84,81,.15); }
.sqp-pw-card-el.StripeElement--invalid { border-color: #b91c1c; }
/* Payment method chooser (Stripe card vs PayPal) */
.sqp-pw-methods { display: flex; gap: 8px; margin: 2px 0 4px; }
.sqp-pw-method { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid #d1d5db; border-radius: 9px; background: #fff; color: #334155; transition: border-color .12s, color .12s; }
.sqp-pw-method svg { width: 17px; height: 17px; }
.sqp-pw-method.sqp-on { border-color: var(--sqp-primary, #f05451); color: var(--sqp-primary, #f05451); box-shadow: 0 0 0 1px var(--sqp-primary, #f05451) inset; }
.sqp-pw-redirect { font-size: 13.5px; color: #475569; line-height: 1.6; text-align: center; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 9px; padding: 12px 14px; margin: 2px 0 10px; }
/* Per-field validation errors + PayPal click guard */
.sqp-pw-ferr { display: block; font-size: 12px; color: #b91c1c; margin-top: 4px; }
.sqp-pw-ferr:empty { display: none; }
.sqp-pw-field input.sqp-pw-input-err, .sqp-uf-form input.sqp-pw-input-err { border-color: #b91c1c; }
.sqp-pw-field input.sqp-pw-input-err:focus, .sqp-uf-form input.sqp-pw-input-err:focus { box-shadow: 0 0 0 3px rgba(185,28,28,.15); }
.sqp-pw-paypal-wrap { position: relative; }
.sqp-pw-paypal-guard { position: absolute; inset: 0; z-index: 3; cursor: pointer; background: transparent; }
.sqp-pw-paypal-guard.sqp-off { display: none; }
/* Guard override: disable the PayPal button until fields are valid (reliable vs an
   overlay, since pointer-events:none stops the iframe from receiving the click). */
.sqp-pw-paypal-wrap.sqp-pw-guarded { cursor: pointer; }
.sqp-pw-paypal-wrap.sqp-pw-guarded .sqp-pw-paypal,
.sqp-pw-paypal-wrap.sqp-pw-guarded .sqp-uf-paypal { pointer-events: none; opacity: .5; }
/* Pay-after unlock rendered INLINE (not a popup), matching the pay-before paywall */
.sqp-uf-inline { max-width: 460px; margin: 18px auto 0; text-align: left; }
.sqp-uf-inline .sqp-pw-head { text-align: center; }
.sqp-uf-cancel { display: block; margin: 12px auto 0; background: none; border: none; color: #94a3b8; font-size: 13px; cursor: pointer; text-decoration: underline; }
.sqp-uf-cancel:hover { color: #64748b; }

/* Visually hidden, but still read aloud. Used by the engine's live region, which
   announces each screen change: every screen is mounted at once and toggled with
   `display`, so a screen reader has no other way to notice the quiz moved on.
   `clip-path` plus a 1px box rather than display:none or visibility:hidden, both
   of which remove the element from the accessibility tree and silence it. */
.sqp-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A START DESCRIPTION THAT IS A DOCUMENT READS AS ONE.
   Every start template centres its card, and .sqp-start-desc inherits that. For
   the one-line tagline the templates were designed around, centred is right. But
   the migrator puts the WHOLE of an old start screen's body in here, and that is
   routinely several paragraphs and a bulleted list: centred, the prose loses its
   left edge and the bullets detach from their text, sitting far from the words
   they belong to. The old plugin's own templates left-align this copy, so a
   migrated quiz did not look like the quiz it came from.
   Only rich content is realigned, so a plain tagline keeps the centred treatment
   its template intends. The list rules stand alone as the fallback anywhere :has()
   does not run, since a centred list is the worst of the two symptoms.

   A LONE <p> IS NOT RICH CONTENT, and testing for one made this fire on everything.
   The old editor is a TinyMCE, which wraps whatever it is given in <p>: a
   four-character description came across as "<p>TEST</p>", so the tagline the
   escape hatch was written for never had a chance to take it. Every migrated start
   description in the library tripped the rule and not one was centred, while the
   fifteen written in this plugin's own editor all were: it stores what you type as
   plain text. The split was never rich against plain, it was imported against
   authored, and two quizzes with the same sentence in them rendered differently
   depending on which editor typed it.
   `p + p` is the test the prose case actually needs: two paragraphs, not one, and
   lists, headings and quotes stand on their own as before.
   Scoped through .sqp-start-tpl, which every start template's root carries, purely
   for WEIGHT: three of them set text-align:center on their own .sqp-start-desc
   from a template style block, and a bare .sqp-start-desc:has(...) loses to that
   on specificity. This reads (0,2,1) against their (0,2,0). */
.sqp-start-tpl .sqp-start-desc:has(ul, ol, h1, h2, h3, h4, blockquote, p + p) { text-align: left; }
.sqp-start-tpl .sqp-start-desc ul,
.sqp-start-tpl .sqp-start-desc ol { text-align: left; padding-left: 1.35em; margin: 0 0 1em; }
.sqp-start-tpl .sqp-start-desc li { margin-bottom: .35em; }

/* Start screen subtitle: a new block, so it ships with a quiet shared default
   rather than nothing. Each template already owns its own .sqp-start-title and
   .sqp-start-desc styling and can override this freely; sitting between the two,
   it reads as a lead-in: larger than the description, lighter than the title. */

/* ═══════════════════════════════════════════════════════════════════════════
   TYPEFORM-STYLE CHROME
   Brand logo, chevron navigation, keyboard hints and the inline question number.
   All opt-in: nothing here renders unless the quiz turned the matching setting on,
   so every existing quiz is byte-identical to before.
   See docs/plans/2026-08-11-typeform-reference-templates.md.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Brand logo ──────────────────────────────────────────────────────────────
   Container level, a sibling of the progress bar, so ONE implementation puts it on
   every screen and no template file carries it. Width is capped by the inline
   max-width the shortcode emits (clamped 40–400px there). */
/* INSIDE the card, not stacked above it. The logo is a sibling of the screens, so
   in flow it pushed the card down and read as a stray image on the page. The
   full-width page template already pinned it over the card; that rule lived in the
   template, so an ordinary page or an embedded quiz did not get it. It lives here
   now, and page-fullwidth.php no longer repeats it.
   left/right:0 with the same max-width and auto margins as the box had in flow is
   what lines it up with a CENTRED card: the container is full width, so a plain
   `left: 34px` would sit far outside the card on any page that is not full-bleed. */
.sqp-quiz-logo {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  /* The horizontal inset the logo used to get from the page; as an overlay it has
     to supply its own so it does not touch the card edge. */
  padding: 0 22px;
  /* Matches the template's own frame rather than the raw container, the same way
     .sqp-progress-wrap does, otherwise the logo sits outside the visible card on
     cinematic (900px) and elegant (1020px). */
  max-width: var(--sqp-sp-tmpl-w, var(--sqp-frame-w, none));
  margin: 0 auto;
  /* Never swallow a click meant for the screen underneath. The logo is decorative
     and covers the top strip of the card, which on a split template is the photo
     and on others is the heading. */
  pointer-events: none;
}
/* Cap the ANSWER LIST and scroll it, rather than letting a long list stretch the
   card. The Height control is a min-height, so it cannot do this.
   Deliberately the list and not the card: scrolling the whole screen would carry
   the question title and the Next button out of view, which is worse than a tall
   card. Here the question stays put and only the options move.
   Unset resolves to `none`, so overflow-y has nothing to scroll and every quiz
   that never sets it is untouched. Safe to leave overflow on: the phone country
   picker and the other controls that dislike a clipping ancestor live in
   .sqp-fe-input-wrap, not in the answer list. */
.sqp-fe-answers {
  max-height: var(--sqp-sp-ans-maxh, none);
  overflow-y: auto;
  /* Reserve the gutter so the row widths do not jump when the bar appears, but ONLY
     for a list that can actually scroll. This was a flat `stable`, which reserves the
     space unconditionally, so every quiz paid 15px on the right for a scrollbar that
     could never appear (max-height resolves to `none` unless an author sets a cap).
     That is what made the options stop short of the Next button, which sits outside
     this box and reaches the full width: measured 541 against 556.
     The comment above claimed "every quiz that never sets it is untouched"; this line
     was the reason that was not true.
     --sqp-ans-gutter is emitted as `stable` by buildStyleCSS beside the max-height, so
     the reservation arrives with the cap that makes it necessary. */
  scrollbar-gutter: var(--sqp-ans-gutter, auto);
}

/* TWO TEMPLATES CANNOT TAKE THE OVERLAY on an ordinary page. Measured at 1440
   with a logo occupying 42–75px: classic starts its title at 61px and lumen at
   60px, both hard against the card's top edge, so the logo would sit on the
   heading. cinematic (116px), modern (191), elegant (492) and aurora (225) all
   have room. Those two keep the logo in flow above the card instead.
   Scoped to pages that are NOT the full-width template: there the card is
   full-height and the same two have plenty of headroom, which is why the
   reference pages built on classic and lumen look right with it overlaid. */
body:not(.sqp-fw) .sqp-template-classic .sqp-quiz-logo,
body:not(.sqp-fw) .sqp-template-lumen   .sqp-quiz-logo {
  position: static;
  padding: 0 0 14px;
  pointer-events: auto;
}

.sqp-quiz-logo-left   { justify-content: flex-start; }
.sqp-quiz-logo-center { justify-content: center; }
.sqp-quiz-logo-right  { justify-content: flex-end; }
.sqp-quiz-logo img { display: block; height: auto; }

/* ── Chevron navigation ──────────────────────────────────────────────────────
   Pinned bottom-right of the container, which is already position:relative.
   Hidden until the engine has a screen to navigate (it removes the inline
   display:none once bound), so it cannot flash before the quiz is interactive. */
.sqp-quiz-chevrons {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 1px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.sqp-chev {
  width: 42px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
  background: var(--sqp-primary, #f05451);
  color: var(--sqp-primary-text, #fff);
  transition: filter .18s, opacity .18s;
}
/* TAP TARGET. The painted chevron is 42x34, and the @media (max-width:600px) rule
   further down shrinks it to 38x32: smaller on exactly the devices that are
   touched rather than clicked. Both are under the 44x44 floor in WCAG 2.5.5 /
   Apple HIG. Measured across 20 quizzes: 22 chevrons at 38x32.
   Sized rather than padded with a pseudo-element, deliberately: a ::after overlay
   would enlarge the hit area but leave getBoundingClientRect() at 38x32, so the
   fix would be unverifiable by measurement and would read as still-broken forever.
   Coarse pointers only: a mouse is precise and the desktop design keeps its 42x34.
   The SVG inside is unchanged, so the glyph does not grow with the button. */
@media (pointer: coarse) {
  .sqp-chev { min-width: 44px; min-height: 44px; }
}
.sqp-chev:hover:not(:disabled) { filter: brightness(1.1); }
/* A chevron with nowhere to go is disabled rather than hidden: a control that
   vanishes and reappears moves the other one under the pointer mid-quiz. */
.sqp-chev:disabled { opacity: .4; cursor: default; }
.sqp-chev svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Chevrons-only replaces the QUESTION nav, never the start / opt-in / outcome
   buttons: those are the calls to action, and the references keep them.
   visibility, not display:none: the chevrons forward their click to these very
   buttons, and keeping them laid out means the question card does not change
   height when the mode is switched. */
.sqp-nav-chevrons .sqp-screen-question .sqp-fe-nav { visibility: hidden; height: 0; margin: 0; padding: 0; overflow: hidden; }

/* The back button rendered ONLY so the up chevron has something to click. Clipped
   rather than display:none: a display:none button is not focusable and some
   browsers skip its click handlers, and the engine still binds keyboard controls
   to it. This is the standard visually-hidden recipe, with pointer-events kept so
   a programmatic .click() from the chevron still lands.

   !important on the box properties is load-bearing rather than lazy: every template
   styles .sqp-fe-btn from its own inline <style>, emitted AFTER this file and at
   higher specificity (.sqp-q-tpl4 .sqp-fe-btn is 0,2,0). Measured without it, the
   padding survived and left a 50x21 absolutely-positioned box: invisible, but able
   to swallow a click meant for whatever sat beneath it. */
.sqp-fe-btn-back-proxy {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; border: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Keyboard hints ──────────────────────────────────────────────────────────
   Only ever rendered when the shortcuts are actually enabled (the shortcode gates
   the hint on BOTH settings), so these never label a key that does nothing. */
.sqp-start-kbd-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  opacity: .7;
}
/* PAGE CHROME: the keyboard hint, the progress label and the progress percentage
   all sit OUTSIDE the template frame, on the page, and all three take the
   container's own ink. That is correct for every template today - measured against
   each one's resolved page color on the default palette:

     classic    #f7f7f0   11.74      cinematic  #f5f0eb   11.16
     elegant    #ffffff   12.63      aurora     transparent -> host   12.63
     modern     #fde3e3   10.39      lumen      #fde8e8   10.76

   DO NOT PIN THIS TO A TEMPLATE NAME. There was an override here forcing these to
   --sqp-secondary-text, and it has been wrong three times in one week, each time
   because the template it named stopped being the dark one:

     on aurora, while aurora painted the container dark
     aurora became a white card (82283bf)              -> white on white, 1.00:1
     moved to modern, while modern bg was --use-secondary--
     modern bg became --use-primary-l94-- (aea6b2e)    -> white on pink, 1.22:1

   The rule keeps outliving its reason because it hard-codes WHICH template is dark
   instead of asking what the page is actually painted. If a template takes a dark
   page again, the fix is an ink derived from the resolved bg - the style system
   already measures ink direction rather than assuming it (resolveOn in
   styleDefaults.js) - not another template name here. */
.sqp-start-kbd-hint kbd {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
  line-height: 1.3;
}
/* The letter badge doubles as the keyboard shortcut when they are on. */
.sqp-kbd-on .sqp-fe-answer-letter { cursor: pointer; }

/* ── "Choose as many as you like" ───────────────────────────────────────────── */
.sqp-fe-multi-hint {
  font-size: 13px;
  /* The card's own caption color, not the container's inherited #333. This
     line lives INSIDE the frame, so on a colored card the inherited grey is
     whatever the page happened to set - measured 1.38:1 on aurora's navy,
     which is invisible. Falls back to the old grey where no frame sets one. */
  /* No opacity. It silently reduced whatever color was set - including one
     chosen to clear a contrast bar - and nothing measuring `color` can see it.
     The color alone decides now. */
  color: var(--sqp-sp-desc-color, #333333);
  margin: -6px 0 10px;
}

/* ── Inline question number ("2 →") ─────────────────────────────────────────── */
.sqp-fe-q-num {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-right: 8px;
  /* Deliberately smaller and quieter than the title it prefixes: it is a position
     marker, not part of the question. */
  font-size: .62em;
  font-weight: 600;
  opacity: .55;
  vertical-align: baseline;
}
.sqp-fe-q-num-arrow { font-size: .9em; }

@media (max-width: 600px) {
  /* Bottom-right is where a thumb rests on a phone, so the chevrons stay, but
     they shrink, and the logo bar tightens up. */
  .sqp-quiz-chevrons { right: 10px; bottom: 10px; }
  .sqp-chev { width: 38px; height: 32px; }
  .sqp-quiz-logo { padding-bottom: 10px; }
}

/* ---------------------------------------------------------------------------
   Breathing room around a quiz that owns its whole page.

   `.sqp-quiz-page` is the wrapper the classic page templates put around the
   content (templates/page/quiz-full-width.php), and it had no inset at all: the
   card sat hard against the header above it and the viewport edges either side.

   PADDING, not margin, for two reasons: adjoining margins collapse through a
   wrapper that has no border or padding of its own, so the top gap would
   silently merge with whatever the header leaves behind; and any background a
   theme paints on the wrapper should extend under the gap, not stop short of it.

   One value on all four sides, scaled to the viewport so a phone does not spend
   40px of a 375px screen on empty margin. `--sqp-page-inset` is the override.

   The `/quiz/{slug}/` route is deliberately NOT changed to match: it sets its
   own `.sqp-quiz-route-main` inset, and that wrapper also carries the author's
   prose above and below the quiz, so it wants a different rhythm.
--------------------------------------------------------------------------- */
.sqp-quiz-page {
  box-sizing: border-box;
  padding: var(--sqp-page-inset, clamp(20px, 3vw, 40px));

  /* Vertical centring is NOT done here. Making this a flex container looked like
     the obvious answer and quietly broke the layout: .sqp-quiz-container centres
     itself with `margin: 0 auto`, and auto cross-axis margins DISABLE stretch, so
     as a flex item it collapsed to shrink-to-fit: the card went 620px wide to 403.
     The engine centres it by growing this padding instead (sqpFitQuizPage), which
     leaves block layout, and therefore every child width, exactly as it was. */
}

/* ---------------------------------------------------------------------------
   No progress indicator on the result screen.

   Both indicators are now gated ON the question phase instead (`.sqp-on-question`,
   see showProgressIndicators), which already covers the result screen. This rule
   stays as the belt to that pair of braces: `.sqp-quiz-ended` is set at the TOP of
   showScreen(), before the transition runs, so the indicators go the instant the
   result is on its way rather than when it lands.

   `!important` earns its place here, which is rare: the counter carries an
   INLINE display (the markup ships `style="display:none"` and the engine writes
   to `wrap.style.display` directly), and an inline style beats any selector.
--------------------------------------------------------------------------- */
.sqp-quiz-container.sqp-quiz-ended .sqp-progress-wrap,
.sqp-quiz-container.sqp-quiz-ended .sqp-qcount-wrap {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   A result page brings its own background, so the quiz card stands down.

   An outcome built in the result-page builder paints `.sqp-rp-page`, and the
   template was still painting its own screen behind it. Two page surfaces in
   slightly different creams (modern: #f5f3ef card under a #f7f7f0 result page),
   which reads as a stray frame around the result rather than as one design.

   Safe to remove unconditionally here because the result page's background is
   never absent: `--sqp-rp-page-bg` is emitted for every render and falls back to
   #ffffff, so there is always something opaque underneath.

   `:has()` keeps this to outcomes that ACTUALLY use a builder page: a plain
   outcome screen still gets the template's card, which is what it has nothing
   else to sit on.

   !important because the renderer writes the screen's background at ID level
   (`#sqp-quiz-N .sqp-screen { … }`, emitted per template), and an id selector
   outranks any class rule this file can write.

   border-radius is deliberately KEPT: `.sqp-screen` is overflow:hidden, so the
   corners it defines now round the result page instead, which is why the result
   still reads as part of the card rather than a square slab dropped into it.
--------------------------------------------------------------------------- */
.sqp-screen-outcome:has(.sqp-rp-page) {
  background: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* A full-screen quiz gets no page inset. The padding above exists to keep a
   contained card off the viewport edges; a quiz whose whole point is to fill the
   screen wants none of it, and with it the page scrolled by exactly the padding
   it added (measured 84px on a 900px viewport), so "full screen" arrived with a
   scrollbar. */
.sqp-quiz-page:has(.sqp-quiz-container.sqp-fullscreen) { padding: 0; }
/* The PREVIEW wrapper needs the same, and did not have it: ?sqp_quiz= renders the
   quiz inside .sqp-standalone-wrap, which pads 24px 16px. A full-screen quiz was
   therefore edge to edge on a real page and inset by 24px top and bottom on the one
   address anyone actually checks it on. Same reasoning as the max-width that was
   removed from that wrapper: the preview must not show margins the page never has. */
.sqp-standalone-wrap:has(.sqp-quiz-container.sqp-fullscreen) { padding: 0; }
/* And the screen loses its 4px top margin. `.sqp-screen` carries one so a card does
   not butt against whatever is above it, but on a screen that is exactly 100vh tall
   it is 4px of guaranteed scrollbar: the same trap the full-width page template
   already documents. */
.sqp-fullscreen .sqp-screen { margin-top: 0; }

/* ── Cinematic: elements that read --sqp-secondary but SIT ON IT ─────────────
   On every other template the secondary color is an ink or an accent painted on a
   surface that is something else. On cinematic it is the content panel itself
   (tpl9_right_bg is --use-secondary--), so a shared rule that fills or inks an
   element with --sqp-secondary paints it in the exact color of the panel it is
   standing on. Ten shared rules do that; these are the ones whose element actually
   lands inside the panel. They were invisible before this too - navy on navy rather
   than brown on brown - which is why it survived: it only shows on slider and matrix
   questions, the outcome screen and interstitials.

   Scoped to this template on purpose. The same rules are correct everywhere else,
   and rewriting them globally would break them: on modern, title_color resolves to
   --use-secondary-text-- (white), so a retake button keyed to it would be white on
   white.

   TEXT takes the panel's own ink, the color already chosen to be read on it.
   BUTTONS take primary, like every other action button on the template. */
/* TEXT with no fill of its own: color == surface, so it is simply not there.
   It takes the surface's own ink, the color already chosen to be read on it. */
/* .sqp-analyzing-text and .sqp-az-check-label join this list now that the
   analyzing screen renders INSIDE the template's card: on these three that card is
   the secondary color, and both of them read --sqp-secondary. Standing on the page
   background they were fine, which is why they were not in the first pass. */
.sqp-template-cinematic .sqp-fe-matrix th,
.sqp-template-cinematic .sqp-mt-poll-thanks,
.sqp-template-cinematic .sqp-analyzing-text,
.sqp-template-cinematic .sqp-az-check-label,
.sqp-template-cinematic .sqp-az-circle-pct,
.sqp-template-cinematic .sqp-interstitial-title { color:var(--sqp-sp-title-color, #fbe4e0); }

.sqp-template-modern .sqp-fe-matrix th,
.sqp-template-modern .sqp-mt-poll-thanks,
.sqp-template-modern .sqp-analyzing-text,
.sqp-template-modern .sqp-az-check-label,
.sqp-template-modern .sqp-az-circle-pct,
.sqp-template-modern .sqp-interstitial-title,
.sqp-template-aurora .sqp-fe-matrix th,
.sqp-template-aurora .sqp-mt-poll-thanks,
.sqp-template-aurora .sqp-analyzing-text,
.sqp-template-aurora .sqp-az-check-label,
.sqp-template-aurora .sqp-az-circle-pct,
.sqp-template-aurora .sqp-interstitial-title { color:var(--sqp-sp-title-color, #ffffff); }

/* BUTTONS FILLED with the surface color. Their label stays readable (it is white
   either way) but the button itself vanishes into the panel, so what the visitor
   sees is a floating word. They take primary, like every other action button. */
.sqp-template-cinematic .sqp-fe-btn-retake,
.sqp-template-cinematic .sqp-fe-share-cp,
.sqp-template-modern .sqp-fe-btn-retake,
.sqp-template-modern .sqp-fe-share-cp,
.sqp-template-aurora .sqp-fe-btn-retake,
.sqp-template-aurora .sqp-fe-share-cp {
  background:var(--sqp-sp-btn-next-bg, var(--sqp-primary, #f05451));
  color:var(--sqp-sp-btn-next-text, var(--sqp-primary-text, #ffffff));
}

/* NOT .sqp-fe-download-btn, and that is deliberate. It looks like a member of this
   set - border and text are both --sqp-secondary - but it carries `background:#fff`
   of its own, so those sit on white and are perfectly legible whatever the panel is.
   An earlier pass did rewrite it and made its text the panel ink: cream on a white
   button, 1.1:1. Left alone. */


/* The question count in the nav row. Rendered on every template because the
   numbers are known at render time and a server-rendered count cannot fall out
   of step with the screen it sits on - but only aurora, which draws a footer
   band, has anywhere to put it. */
.sqp-fe-nav-count { display:none; }
.sqp-template-aurora .sqp-fe-nav-count { display:inline; }


/* The aurora card's entrance. Defined here rather than in one template file
   because five screens use it and a screen must not depend on another screen's
   style block being in the page. */
@keyframes sqpAuCardIn {
  from { opacity:0; transform:translateY(7px); }
  to   { opacity:1; transform:none; }
}


/* ── THE OPT-IN SCREEN, ONE DESIGN FOR EVERY TEMPLATE ──────────────────────────
   Six templates had six versions of this screen and they disagreed about all of
   it: the sub-heading ran 15px to 17px, the privacy line 12px to 13px, and each
   picked its own literal grey - so the same sentence was a different size and a
   different color depending on which template a quiz happened to use, and none
   of them followed the quiz's palette.

   Scoped to `.sqp-quiz-container .sqp-screen-leadgen` (0,3,0) so it outranks the
   per-template `.sqp-lg-tplN .sqp-lg-x` rules (0,2,0) wherever they disagree,
   whatever order the stylesheets load in. A template that wants something else
   still can - it just has to say so at the same weight, deliberately.

   GREY, NOT THE PALETTE. Small print in an accent color reads as a link nobody
   can click, and the sub-heading above a two-field form is not the place for the
   brand. Deriving it from the template's own ink does not work either: lumen's
   heading IS the accent, so a muted version of it is only faded purple.

   So: neutral greys, with one override for the templates whose opt-in panel can
   be dark, where grey would sink into it. Those two are named rather than
   detected, because a stylesheet cannot ask how light a surface is. */
/* THE SAME SCALE AS THE OTHER THREE SCREENS. These were flat numbers, so a quiz whose
   start, question and outcome ran at 30/16 put 24/15 above its opt-in form - a fourth
   treatment nobody chose, on the screen that asks for something. They read the quiz's
   own Title and Description settings now; the old numbers survive as the fallback for
   a quiz that has none.

   The gaps come from the same pair, so the space under the heading matches the space
   under a question heading rather than being its own 8 and 22. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-title {
  font-size:var(--sqp-sp-title-fs, 24px);
  font-weight:var(--sqp-sp-title-fw, 700);
  line-height:var(--sqp-sp-title-lh, 1.3);
  letter-spacing:-.016em;
  margin-bottom:var(--sqp-sp-title-mb, 8px);
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-subtitle {
  font-size:var(--sqp-sp-desc-fs, 15px);
  font-weight:var(--sqp-sp-desc-fw, 400);
  line-height:var(--sqp-sp-desc-lh, 1.55);
  margin-bottom:var(--sqp-sp-desc-mb, 22px);
  color:#4b5563;
}
/* Small print, and sized like it. 13px on a line nobody needs to read twice was
   competing with the form above it. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-privacy {
  font-size:12px; font-weight:400; line-height:1.5;
  margin-top:14px;
  color:#5b6472;
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr {
  font-size:12.5px; line-height:1.45;
  color:#525b6b;
}

/* The form is a stack with one gap, rather than each field carrying its own
   margin - which is how the spacing ended up uneven once a template added a
   custom field or a consent box between them. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-form {
  display:flex; flex-direction:column; gap:12px;
}
/* THE ROW IS THE HEIGHT, NOT THE INPUT. Some templates make the WRAPPER the
   field - it carries the border, the background and an icon, with a bare input
   inside it - and others leave the wrapper empty and style the input. Padding
   the input therefore stacked on top of the wrapper's own on the first kind:
   lumen's row measured 73px, a 47px input inside a wrapper already 56px tall.

   So the ROW states the height once and the vertical padding comes off both,
   which lands every template on the same size whichever way it is built. The
   horizontal padding stays on the input: a wrapper that carries an icon needs
   its own inset, and one that does not still has to keep the text off the edge. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-field {
  margin:0; min-height:48px;
  padding-top:0; padding-bottom:0;
  display:flex; align-items:center;
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-field input,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-form select,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-form textarea {
  width:100%; box-sizing:border-box;
  align-self:stretch;
  padding:0 15px; font-size:15px; line-height:1.4;
  border-radius:var(--sqp-sp-field-r, 8px);
}
/* A textarea has no single line to centre, so it keeps real padding. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-form textarea {
  padding:12px 15px; min-height:88px;
}
/* EDITOR PREVIEW: THE SAME FIELD HEIGHT AS THE PAGE (owner, 2026-09-17: "input field
   is too big ... height is bigger in backend"). The three rules above are scoped to
   .sqp-quiz-container .sqp-screen-leadgen, and the preview has neither: its template
   root sits straight in .sqp-preview-quiz. So the preview kept each template's own
   wrapper padding AND picked up wp-admin's input rules (min-height:30px,
   line-height:2), and every row came out taller than a visitor's 48px. The
   preview's own ancestors state the same three things here. */
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-form { display:flex; flex-direction:column; gap:12px; }
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-field {
  margin:0; min-height:48px;
  padding-top:0; padding-bottom:0;
  display:flex; align-items:center;
}
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-field input,
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-form select {
  width:100%; box-sizing:border-box; align-self:stretch;
  min-height:0; height:auto; margin:0;
  padding:0 15px; font-size:15px; line-height:1.4;
  border-radius:var(--sqp-sp-field-r, 8px); box-shadow:none;
}
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-form textarea {
  width:100%; box-sizing:border-box; min-height:88px; padding:12px 15px; line-height:1.4;
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-cta { margin-top:6px; }
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-btn {
  padding:14px 30px; font-size:15px; font-weight:600;
  border-radius:var(--sqp-sp-btn-r, 8px);
}
/* A consent box and its sentence sit on one line, aligned at the top so a
   sentence that wraps does not drag the box down the page with it. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms label,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr label {
  display:flex; align-items:flex-start; gap:9px; text-align:left;
}
/* A REAL CHECKBOX, NOT THE BROWSER ONE. accent-color was the whole of the styling
   here, and a native box is around 13px and cannot be resized - so the one control
   on this screen that a visitor must actively agree to was the smallest thing on it,
   and the hardest to hit.

   appearance:none and draw it, rather than hiding the input behind a styled span:
   the input stays the input, so the label association, keyboard focus, and the
   required gate all keep working untouched. The tick is a clip-path on ::before,
   painted in the primary TEXT color because the box it sits on is primary.
   17px against a 12.5px sentence at 1.45 line-height sits square with the first
   line without dragging on it. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms input,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr input {
  appearance:none; -webkit-appearance:none;
  flex:none; margin:1px 0 0; padding:0;
  width:17px; height:17px; box-sizing:border-box;
  display:grid; place-content:center;
  border:1.5px solid var(--sqp-sp-field-bdr, var(--sqp-sp-ans-bdr, #c3cbd8));
  border-radius:5px;
  background:var(--sqp-sp-field-bg, #fff);
  cursor:pointer;
  transition:background-color .15s ease, border-color .15s ease;
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms input::before,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr input::before {
  content:''; width:10px; height:10px;
  transform:scale(0); transition:transform .12s ease-in-out;
  background:var(--sqp-primary-text, #fff);
  clip-path:polygon(14% 44%, 0 65%, 40% 100%, 100% 16%, 82% 0%, 37% 62%);
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms input:checked,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr input:checked {
  background:var(--sqp-primary, #f05451);
  border-color:var(--sqp-primary, #f05451);
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms input:checked::before,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr input:checked::before { transform:scale(1); }
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms input:hover:not(:checked),
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr input:hover:not(:checked) {
  border-color:var(--sqp-primary, #f05451);
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms input:focus-visible,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr input:focus-visible {
  outline:2px solid var(--sqp-primary, #f05451); outline-offset:2px;
}
/* The sentence is part of the control, so it takes the pointer too. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-terms label,
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-gdpr label { cursor:pointer; }
/* The skip link. Each template colored it separately and two of them landed on
   white against a pale panel - 2.56:1, a way out of the form that could not be
   seen. Underlined as well as colored, because a link that only differs by
   shade is not obviously a link. */
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-skip {
  margin-bottom:14px;
  background:none; padding:0; border:0; box-shadow:none;
}
.sqp-quiz-container .sqp-screen-leadgen .sqp-lg-skip span {
  font-size:13px; color:#5b6472; text-decoration:underline;
  text-underline-offset:2px; cursor:pointer;
}
/* The skip link, missed when the subtitle, privacy and consent lines above were
   moved off a literal white. Same fault and the same fix: the white is only right
   while the card behind it is dark, which is a property of the style row rather
   than of the template: on a light aurora it measured 1.03:1, white on
   near-white, so "Skip for now" was there and unreadable. The white stays as the
   fallback, so a dark aurora and cinematic are unchanged. */
.sqp-quiz-container.sqp-template-aurora .sqp-screen-leadgen .sqp-lg-skip span,
.sqp-quiz-container.sqp-template-cinematic .sqp-screen-leadgen .sqp-lg-skip span {
  color:var(--sqp-sp-desc-color, rgba(255,255,255,.66));
}
/* The same link in the EDITOR preview, which has neither .sqp-quiz-container nor
   .sqp-screen-leadgen above it, so none of the three rules above reached it: the
   text took the style row's skip-button white and, with the button fill painted
   behind it, drew as a grey bar across the card (owner, 2026-09-18: "design
   messed up in backend if Skip optin is there"). */
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-skip {
  margin-bottom:14px; background:none; padding:0; border:0; box-shadow:none;
}
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-skip span {
  font-size:13px; color:#5b6472; text-decoration:underline;
  text-underline-offset:2px; cursor:pointer;
}
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-tpl-au .sqp-lg-skip span,
.sqp-live-preview.sqp-lp-leadgen .sqp-preview-quiz .sqp-lg-tpl9 .sqp-lg-skip span {
  color:var(--sqp-sp-desc-color, rgba(255,255,255,.66));
}

@media (max-width:600px) {
  .sqp-quiz-container .sqp-screen-leadgen .sqp-lg-title { font-size:21px; }
  .sqp-quiz-container .sqp-screen-leadgen .sqp-lg-subtitle { font-size:14px; margin-bottom:18px; }
}

/* Aurora paints its card from Secondary and cinematic paints its panel the same
   way, so both can be dark - and the greys above would disappear into them. Same
   type scale, ink running the other way.

   THE INK IS THE DESCRIPTION COLOUR, NOT A LITERAL WHITE. These three rules held
   rgba(255,255,255,...) outright, which is only correct while the card behind them
   is dark, and "aurora is dark" is a property of the shipped STYLE ROW, not of the
   template: aurora's own CSS fallbacks have always been light. Recolour that row
   and the opt-in screen kept white type on a near-white card, so "You can
   unsubscribe at any time." was invisible. The white stays as the fallback, so a
   quiz that never sets desc_color is unchanged, and cinematic, whose default
   desc_color is the light #e7b3aa, is unchanged too.

   The three tiers were .72 / .55 / .66 of white, and those ratios are NOT carried
   over as-is. White is a pure ink being faded toward the card; desc_color is
   already the result of a contrast walk (--use-*-soft-- stops at 5.1:1), so fading
   it a further 24% undershoots the bar, measured 3.6:1 on the privacy line, which
   is where this first went wrong. The subtitle and the consent line take the token
   outright and the privacy note keeps a small 12% step, which lands it just above
   4.5:1. The tiering that is left comes from the type sizes, which already differ
   by four points. */
.sqp-quiz-container.sqp-template-aurora .sqp-screen-leadgen .sqp-lg-subtitle,
.sqp-quiz-container.sqp-template-cinematic .sqp-screen-leadgen .sqp-lg-subtitle {
  color:var(--sqp-sp-desc-color, rgba(255,255,255,.72));
}
.sqp-quiz-container.sqp-template-aurora .sqp-screen-leadgen .sqp-lg-privacy,
.sqp-quiz-container.sqp-template-cinematic .sqp-screen-leadgen .sqp-lg-privacy {
  color:color-mix(in srgb, var(--sqp-sp-desc-color, rgba(255,255,255,.72)) 88%, transparent);
}
.sqp-quiz-container.sqp-template-aurora .sqp-screen-leadgen .sqp-lg-terms,
.sqp-quiz-container.sqp-template-aurora .sqp-screen-leadgen .sqp-lg-gdpr,
.sqp-quiz-container.sqp-template-cinematic .sqp-screen-leadgen .sqp-lg-terms,
.sqp-quiz-container.sqp-template-cinematic .sqp-screen-leadgen .sqp-lg-gdpr {
  color:var(--sqp-sp-desc-color, rgba(255,255,255,.72));
}


/* The answer badge's edge, decided in one place. Each template set it from
   --sqp-sp-ans-bdr, which is the border of the answer ROW - on a light card that
   measured 1.07:1 against the row it sits inside, so the badge had no edge worth
   the name. Derived from the answer ink instead, which is a hairline on any
   surface because it is the color already proven readable there. */
.sqp-quiz-container .sqp-fe-answer .sqp-fe-answer-letter {
  border-color:color-mix(in srgb, var(--sqp-sp-ans-text, #333) 34%, transparent);
}

/* ── Scrollbars ─────────────────────────────────────────────────────────────
   The native bar is a 17px chrome-grey channel with arrow buttons on it, drawn
   in the middle of a quiz that has just been given a photograph and a type
   pairing. Three things wanted fixing: it should be quiet until it is needed,
   it should be the width of a scrollbar rather than of a button, and its color
   should come from the quiz rather than from the operating system.

   The track stays reserved at all times - the thumb is what fades. Hiding the
   whole bar and revealing it on hover would reflow the content sideways under
   the pointer every time, which is worse than the bar.

   .sqp-popup-box IS IN THESE LISTS AND IS NOT INSIDE .sqp-quiz-container - it is the
   container's PARENT. The popup boxes are what actually scroll in a popup (the quiz
   inside them is set to overflow:visible a few hundred lines up), so a list scoped to
   the container missed the one bar a popup ever shows: the corner widget drew the raw
   17px OS channel down its right edge.
   One consequence to know about: --sqp-sp-ans-text is emitted on #sqp-quiz-N, a CHILD
   of the box, and custom properties do not inherit upwards - so on the box itself the
   fallback #334155 is what paints. That is correct rather than lucky: both popup boxes
   are background:#fff whatever the template, so a slate thumb is right on all six. */
.sqp-quiz-container .sqp-screen,
.sqp-quiz-container .sqp-fe-answers,
.sqp-quiz-container .sqp-fe-matrix-scroll,
.sqp-popup-box {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color .2s ease;
}
.sqp-quiz-container .sqp-screen:hover,
.sqp-quiz-container .sqp-fe-answers:hover,
.sqp-quiz-container .sqp-fe-matrix-scroll:hover,
.sqp-popup-box:hover,
.sqp-quiz-container .sqp-screen:focus-within,
.sqp-quiz-container .sqp-fe-answers:focus-within,
.sqp-quiz-container .sqp-fe-matrix-scroll:focus-within,
.sqp-popup-box:focus-within {
  /* ans_text is the template's own ink, so this reads on a dark panel and on a
     light one without either being named here. */
  scrollbar-color: color-mix(in srgb, var(--sqp-sp-ans-text, #334155) 38%, transparent) transparent;
}
/* WebKit ignores scrollbar-color, so the same thing again in its own dialect. */
.sqp-quiz-container .sqp-screen::-webkit-scrollbar,
.sqp-quiz-container .sqp-fe-answers::-webkit-scrollbar,
.sqp-quiz-container .sqp-fe-matrix-scroll::-webkit-scrollbar,
.sqp-popup-box::-webkit-scrollbar { width:10px; height:10px; }
.sqp-quiz-container .sqp-screen::-webkit-scrollbar-track,
.sqp-quiz-container .sqp-fe-answers::-webkit-scrollbar-track,
.sqp-quiz-container .sqp-fe-matrix-scroll::-webkit-scrollbar-track,
.sqp-popup-box::-webkit-scrollbar-track { background:transparent; }
/* border + background-clip is how a 10px-wide bar draws a 4px-wide thumb: the
   border is transparent and the paint stops inside it, which also keeps the
   thumb off the very edge of the panel. */
.sqp-quiz-container .sqp-screen::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-fe-answers::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-fe-matrix-scroll::-webkit-scrollbar-thumb,
.sqp-popup-box::-webkit-scrollbar-thumb {
  background:transparent; border-radius:999px;
  border:3px solid transparent; background-clip:content-box;
  transition:background-color .2s ease;
}
.sqp-quiz-container .sqp-screen:hover::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-fe-answers:hover::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-fe-matrix-scroll:hover::-webkit-scrollbar-thumb,
.sqp-popup-box:hover::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-screen:focus-within::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-fe-answers:focus-within::-webkit-scrollbar-thumb,
.sqp-quiz-container .sqp-fe-matrix-scroll:focus-within::-webkit-scrollbar-thumb,
.sqp-popup-box:focus-within::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--sqp-sp-ans-text, #334155) 38%, transparent);
  background-clip:content-box;
}
.sqp-quiz-container .sqp-screen::-webkit-scrollbar-thumb:hover,
.sqp-quiz-container .sqp-fe-answers::-webkit-scrollbar-thumb:hover,
.sqp-quiz-container .sqp-fe-matrix-scroll::-webkit-scrollbar-thumb:hover,
.sqp-popup-box::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--sqp-sp-ans-text, #334155) 62%, transparent);
  background-clip:content-box;
}
/* The corner square where two bars meet, which otherwise draws as OS grey. */
.sqp-quiz-container .sqp-screen::-webkit-scrollbar-corner,
.sqp-quiz-container .sqp-fe-answers::-webkit-scrollbar-corner,
.sqp-quiz-container .sqp-fe-matrix-scroll::-webkit-scrollbar-corner,
.sqp-popup-box::-webkit-scrollbar-corner { background:transparent; }

/* THE OPT-IN SUBTITLE IS COPY, NOT ACCENT.
   buildStyleCSS() paints four slots from one desc_color - .sqp-start-desc,
   .sqp-oc-desc, .sqp-fe-q-desc and .sqp-lg-subtitle - and on lumen that colour is
   the --use-secondary-ink95-soft-- token, a purple. Under a question it reads as a
   supporting line, which is what it is. On the opt-in it is the sentence doing the
   reassuring ("Straight to a person, not a ticket queue"), and coloured type there
   reads as a link the visitor is failing to click.
   !important because the rule it overrides is emitted at #sqp-quiz-N - specificity
   (1,1,0) - and no selector available to a stylesheet can outrank an id.
   lumen ONLY. cinematic's desc is #e7b3aa over a dark panel and elegant's is #666 on
   a photograph; a flat dark grey would be unreadable on the first and pointless on
   the second. If this turns out to be wanted everywhere it belongs in the renderer as
   its own colour key, not as five more of these. */
.sqp-template-lumen .sqp-lg-subtitle { color:#555555 !important; }

/* MODERN'S START SCREEN IN THE CORNER: THE BUTTON, THE MEASURE AND THE DEAD SPACE.
   Three faults on one screen, all of them a page-scale number left unchanged in a
   380px shell.

   The button carries an inline width from the Start tab's Width slider - 700px here -
   guarded by max-width:100%. The guard cannot fire: .sqp-start-tpl8-cta is a flex item
   with min-width:auto and no max-width, so it is dragged out to the button's 700px and
   100% then resolves against 700. Bounding the WRAPPER is what restores the guard;
   min-width:0 lets the flex item shrink below its min-content, max-width:100% caps it
   at the body, and the button's own max-width finally has something to cap against.
   (Inverting the button's pair to width:100%/max-width:700px looks like the same fix
   and is not - see the note at class-sqp-renderer.php, it collapses the button to its
   label at every width.)

   The measure: .sqp-start-tpl8 pads 56px a side, which of 348px leaves 236px for the
   title and the sentence under it - two thirds of the widget spent on margin. 16px
   matches what the screen either side of it now uses.

   The dead space: the same rule's 48px top, plus the screen's own clamp(32px,6vh,72px)
   which is 54px on a 900px window. 102px of nothing above a title, in a box whose
   content is short enough that the widget looked bottom-weighted rather than centred. */
.sqp-popup-box .sqp-start-tpl8-cta { min-width:0; max-width:100%; }
/* min-height:560px (templates/modern/start.php:28) against 184px of content is the
   dead space itself: the card centres its body in 560px, so ~190px of nothing sits
   above the title, and the box is pushed past its 70vh cap into scrolling a start
   screen. That floor is there to give a full-page start screen presence; a widget
   that is 380px wide has none to give. The template's own narrow variant (420px, in
   an  that never fires here) is still far taller than this box, so the floor
   goes entirely and the card takes the height of what is in it. */
/* All three of modern's screen cards are padded for a page, not for a widget:
   start 48/56, leadgen 40/36, outcome 48/40. On top of the screen's own 16px that
   spent 104px of a 380px box on the opt-in alone, leaving a 276px measure for a form.
   One inset for all three, so the four screens of a quiz do not each sit at a
   different distance from the edge as the visitor moves through them. */
.sqp-popup-corner .sqp-start-tpl8,
.sqp-popup-corner .sqp-lg-tpl8,
.sqp-popup-corner .sqp-oc-tpl8 { padding:20px 16px 16px; min-height:0; }
.sqp-popup-corner .sqp-template-modern .sqp-screen-start { padding-top:16px; padding-bottom:16px; }

/* CINEMATIC IS A SPLIT SCREEN, AND A 380px WIDGET HAS NO HALVES TO SPLIT.
   The template puts a picture in one half and the question in the other, which is the
   whole idea of it at 1100px. In the corner each half is 190px, and the right one
   spends 64px of that on padding: measured, the question title came out 70px wide and
   97px tall - a word per line - the answer list ran to 352px, the card to 737px inside
   a box capped at 630, and the Next button was pushed outside the box altogether. The
   audit could not walk this template past its first question for exactly that reason;
   it was not the walker.

   Everything below is cinematic's own @media (max-width:768px) block, which says the
   same thing and never fires here because it asks the viewport rather than the box.
   Its reasoning applies verbatim - including why the reverse variant also becomes a
   plain column: row-reverse on a column flex box would put the media UNDER the
   question and lose the picture below the fold, on the one size where the picture is
   most likely to be why someone keeps reading.

   The media band is 160px rather than its 200: 200 is fine on a phone that has the
   whole window, but this box is capped at 70vh and the same content has to fit inside
   it, so the picture gives back the 40px rather than the answers doing it.

   The right panel's padding is the last of it. The four screens ship 36/32, 40/36 and
   32/28 - all page numbers - and they are brought onto the one inset the other
   templates now use in this widget, so a visitor moving start -> question -> opt-in
   does not watch the text shift sideways under them. */
.sqp-popup-box .sqp-template-cinematic .sqp-start-tpl9,
.sqp-popup-box .sqp-template-cinematic .sqp-q-tpl9,
.sqp-popup-box .sqp-template-cinematic .sqp-lg-tpl9,
.sqp-popup-box .sqp-template-cinematic .sqp-oc-tpl9 { flex-direction:column; min-height:0; }
.sqp-popup-box .sqp-template-cinematic .sqp-tpl9-left,
.sqp-popup-box .sqp-template-cinematic .sqp-tpl9-right { width:100%; }
/* A DEFINITE height, not just a floor. .sqp-tpl9-video is height:100% and the picture
   inside it is position:absolute inset:0, so the whole chain hangs off this element
   having a resolved height. In the split it did - the row stretched it to the text
   panel. Stacked, min-height alone leaves height:auto, 100% of auto resolves to
   nothing, and the band paints its background colour over an image with no box. */
.sqp-popup-box .sqp-template-cinematic .sqp-tpl9-left { height:160px; min-height:160px; flex:none; }
.sqp-popup-corner .sqp-template-cinematic .sqp-tpl9-right { padding:20px 16px; overflow:visible; }
/* The right panel now owns the inset, so the question block inside it stops adding a
   second one - 16 + 28 put the text 44px in, further than any other template in this
   widget. */
.sqp-popup-corner .sqp-template-cinematic .sqp-fe-question { padding:0; }
/* And no 400px floor under the card. cinematic sets
   min-height:var(--sqp-sp-tmpl-h, var(--sqp-sp-tpl9-min-h, 400px)) on each screen root
   to give a full-page card presence. tmpl_h is already zeroed for popups, so the 400px
   fallback is what lands - and on a short screen (160px of picture plus ~200px of
   panel) the card keeps 40px it has nothing to put in. Because the CARD is white and
   the panel inside it is the dark one, that surplus painted as a white band along the
   bottom of the widget, under the dark design, which is what it looked like. */
.sqp-popup-box .sqp-template-cinematic .sqp-start-tpl9,
.sqp-popup-box .sqp-template-cinematic .sqp-q-tpl9,
.sqp-popup-box .sqp-template-cinematic .sqp-lg-tpl9,
.sqp-popup-box .sqp-template-cinematic .sqp-oc-tpl9 { min-height:0; }
/* ROOM FOR THE CHEVRONS, WHICH ARE PINNED AND SO CANNOT MAKE THEIR OWN.
   .sqp-quiz-chevrons is position:absolute, bottom:16 right:16, z-index:5, pinned to
   the CONTAINER rather than to a screen - 85x34 of control floating over whatever
   happens to be underneath. On a page there is margin to spare and it lands on empty
   card; in a 380px widget it came down on the last answer, overlapping it by 10px, so
   the option looked like it had a button stamped on it.
   The panel reserves the strip instead: 34 of chevron + 16 of inset + 8 of gap. The
   chevrons keep their position and their behaviour - they are the only navigation on
   a quiz whose author turned the Next button off, so hiding them here would strand
   that visitor - and the answers simply stop above them. */
.sqp-popup-box .sqp-template-cinematic .sqp-tpl9-right { padding-bottom:58px; }
/* THE MODAL STACKS FOR THE SAME REASON THE WIDGET DOES, JUST LESS SEVERELY.
   cinematic's own rule is @media (max-width:768px) - "below this, stack" - and the
   modal box is 680px. It asks the viewport, which is 1440 here, so the split survived
   into a container narrower than the number the template itself nominates. Measured in
   the modal: each half is 340px, the text half spends 64px of that on padding, and the
   question title got a 220px measure where classic gets 554. That is the same fault as
   the corner, two thirds of the way down.
   The band stays at the corner's 160px. 200 is cinematic's own figure and the modal has
   more height to spend, but measured it pushed three of the five question screens past
   the 85vh cap into scrolling, where 160 leaves only the picture question scrolling -
   which it did before any of this. The wider measure is kept and the scrolling is not. */

/* ── AI-WRITTEN RESULT ──────────────────────────────────────────────────────────
   The screen a quiz in AI mode ends on (SQP_AI_Results, showAiResult() in the engine).
   It is not drawn through the quiz template, so it brings its own white card: that
   keeps the result readable on the dark templates too. Colour comes only from the
   quiz's own --sqp-primary / --sqp-secondary, and everything is scoped under .sqp-air
   so a theme's generic heading and list rules cannot reach in. */
.sqp-air { box-sizing:border-box; width:100%; max-width:720px; margin:0 auto; text-align:left; }
.sqp-air *, .sqp-air *::before, .sqp-air *::after { box-sizing:border-box; }
.sqp-air-loading,
.sqp-air-card {
  background:#fff; color:#3b4d5c; border:1px solid #e3e8ed; border-radius:16px;
  box-shadow:0 1px 2px rgba(15,46,71,.05), 0 8px 24px rgba(15,46,71,.06);
  padding:32px;
}
@media (max-width:520px) { .sqp-air-loading, .sqp-air-card { padding:20px; } }

.sqp-air-loading { display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center; }
.sqp-air-ring { position:relative; width:120px; height:120px; }
.sqp-air-ring svg { display:block; width:100%; height:100%; transform:rotate(-90deg); }
.sqp-air-ring-track { fill:none; stroke:rgba(15,46,71,.08); stroke-width:8; }
.sqp-air-ring-fill { fill:none; stroke:var(--sqp-primary,#f05451); stroke-width:8; stroke-linecap:round; transition:stroke-dashoffset .25s linear; }
.sqp-air-ring-pct { position:absolute; inset:0; display:grid; place-items:center; font-size:26px; font-weight:800; color:var(--sqp-secondary,#0f2e47); font-variant-numeric:tabular-nums; }
.sqp-air .sqp-air-loading-title { margin:6px 0 0; font-size:20px; line-height:1.3; font-weight:800; color:var(--sqp-secondary,#0f2e47); }
.sqp-air .sqp-air-loading-sub { margin:0; font-size:14px; line-height:1.5; color:#6b7c8a; }
.sqp-air .sqp-air-steps { list-style:none; margin:8px 0 0; padding:0; width:100%; max-width:420px; display:flex; flex-direction:column; gap:6px; }
.sqp-air .sqp-air-step { display:flex; align-items:center; gap:12px; margin:0; padding:9px 14px; border:1px solid transparent; border-radius:10px; font-size:14.5px; line-height:1.4; text-align:left; color:#b3bec7; transition:color .2s, background-color .2s; }
.sqp-air-step-ic { position:relative; width:20px; height:20px; flex:none; border-radius:6px; background:rgba(15,46,71,.06); }
.sqp-air .sqp-air-step.is-done { color:#8696a3; }
.sqp-air-step.is-done .sqp-air-step-ic { background:color-mix(in srgb, var(--sqp-primary,#f05451) 16%, #fff); }
.sqp-air-step.is-done .sqp-air-step-ic::after { content:""; position:absolute; left:7px; top:4px; width:5px; height:9px; border:solid var(--sqp-primary,#f05451); border-width:0 2px 2px 0; transform:rotate(45deg); }
.sqp-air .sqp-air-step.is-active { color:var(--sqp-secondary,#0f2e47); font-weight:600; background:#f5f8fa; border-color:#e3e8ed; }
.sqp-air-step.is-active .sqp-air-step-ic { border-radius:50%; background:none; border:2px solid var(--sqp-primary,#f05451); border-right-color:transparent; animation:sqp-air-spin .8s linear infinite; }
@keyframes sqp-air-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) {
  .sqp-air-step.is-active .sqp-air-step-ic { animation:none; }
  .sqp-air-ring-fill { transition:none; }
}

.sqp-air-card { display:flex; flex-direction:column; gap:16px; font-size:15px; line-height:1.6; }
.sqp-air .sqp-air-eyebrow { font-size:12px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--sqp-primary,#f05451); }
.sqp-air .sqp-air-headline { margin:0; font-size:clamp(22px,4vw,30px); line-height:1.15; font-weight:800; color:var(--sqp-secondary,#0f2e47); text-wrap:balance; }
.sqp-air .sqp-air-lead,
.sqp-air .sqp-air-text { margin:0; }
.sqp-air .sqp-air-lead { font-weight:500; color:var(--sqp-secondary,#0f2e47); }
.sqp-air-items { display:flex; flex-direction:column; }
.sqp-air-item { display:flex; flex-direction:column; gap:10px; padding:18px 0; border-top:1px solid rgba(15,46,71,.1); }
.sqp-air-item:last-child { border-bottom:1px solid rgba(15,46,71,.1); }
.sqp-air-item-head { display:flex; align-items:flex-start; gap:12px; }
.sqp-air-num { width:32px; height:32px; flex:none; display:grid; place-items:center; border-radius:8px; background:var(--sqp-secondary,#0f2e47); color:#fff; font-size:15px; font-weight:700; }
.sqp-air-names { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; min-width:0; padding-top:3px; }
.sqp-air .sqp-air-name { margin:0; font-size:18px; line-height:1.3; font-weight:700; color:var(--sqp-secondary,#0f2e47); }
.sqp-air-cat { font-size:13px; color:#6b7c8a; }
.sqp-air-body { display:flex; flex-direction:column; gap:14px; padding-left:44px; }
@media (max-width:520px) { .sqp-air-body { padding-left:0; } }
.sqp-air-label { margin-bottom:4px; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--sqp-primary,#f05451); }
.sqp-air-tags { display:flex; flex-wrap:wrap; gap:6px; }
.sqp-air-tag { padding:2px 9px; border-radius:6px; font-size:13px; line-height:1.4; color:var(--sqp-secondary,#0f2e47); border:1px solid color-mix(in srgb, var(--sqp-primary,#f05451) 35%, transparent); }
.sqp-air .sqp-air-bullets { margin:0; padding-left:18px; list-style:disc; }
.sqp-air .sqp-air-bullets li { margin:0 0 5px; }
.sqp-air .sqp-air-bullets li::marker { color:var(--sqp-primary,#f05451); }
.sqp-air .sqp-air-closing { margin:0; font-weight:700; color:var(--sqp-secondary,#0f2e47); }
.sqp-air-actions { display:flex; flex-wrap:wrap; gap:10px; }
.sqp-air .sqp-air-btn { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:11px 20px; border:1px solid var(--sqp-primary,#f05451); border-radius:9px; background:var(--sqp-primary,#f05451); color:#fff; font-size:15px; font-weight:600; line-height:1.2; text-decoration:none; }
.sqp-air .sqp-air-btn:hover { filter:brightness(.95); color:#fff; }
.sqp-air .sqp-air-btn-ghost { background:transparent; color:var(--sqp-secondary,#0f2e47); border-color:rgba(15,46,71,.2); }
.sqp-air .sqp-air-btn-ghost:hover { color:var(--sqp-secondary,#0f2e47); }
/* Download PDF (2026-09-15). A <button>, not a link like the author's buttons, so it
   brings the resets a theme's button rules would otherwise win (font, margin, cursor). */
.sqp-air button.sqp-air-btn { -webkit-appearance:none; appearance:none; margin:0; gap:8px; font-family:inherit; cursor:pointer; }
.sqp-air .sqp-air-btn svg { width:18px; height:18px; flex:none; }
/* downloadFile()'s spinner is white, drawn for a filled button; on the ghost it vanished. */
.sqp-air .sqp-air-btn-ghost .sqp-lg-spinner { width:16px; height:16px; border-width:2px; border-color:rgba(15,46,71,.2); border-top-color:var(--sqp-secondary,#0f2e47); }
.sqp-air .sqp-air-retry { align-self:flex-start; min-height:44px; padding:10px 18px; border:1px solid rgba(15,46,71,.2); border-radius:9px; background:#fff; color:var(--sqp-secondary,#0f2e47); font:inherit; font-size:14.5px; font-weight:600; cursor:pointer; }
.sqp-air .sqp-air-btn:focus-visible,
.sqp-air .sqp-air-retry:focus-visible { outline:2px solid var(--sqp-primary,#f05451); outline-offset:2px; }

/* Result display (the AI result panel's Display tab). Colours arrive as custom properties
   set on .sqp-air, so every rule above follows them without being repeated here. */
.sqp-air-plain .sqp-air-card,
.sqp-air-plain .sqp-air-loading { background:transparent; border:0; box-shadow:none; padding:4px 0; }
.sqp-air-size-s .sqp-air-card { font-size:14px; }
.sqp-air-size-l .sqp-air-card { font-size:17px; }
.sqp-air-size-l .sqp-air-headline { font-size:clamp(26px,4.6vw,36px); }
.sqp-air-score,
.sqp-air-ranks { display:flex; flex-direction:column; gap:8px; padding:16px 18px; border-radius:12px; background:color-mix(in srgb, var(--sqp-primary,#f05451) 7%, transparent); }
.sqp-air-score-row { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 14px; }
.sqp-air-score-num { font-size:32px; line-height:1; font-weight:800; color:var(--sqp-secondary,#0f2e47); font-variant-numeric:tabular-nums; }
.sqp-air-score-pct { font-size:16px; font-weight:700; color:var(--sqp-primary,#f05451); font-variant-numeric:tabular-nums; }
.sqp-air-pass { padding:2px 10px; border-radius:99px; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.sqp-air-pass.is-pass { background:#dcfce7; color:#166534; }
.sqp-air-pass.is-fail { background:#fee2e2; color:#991b1b; }
.sqp-air-meter { height:8px; border-radius:99px; background:rgba(15,46,71,.1); overflow:hidden; }
.sqp-air-meter i { display:block; height:100%; border-radius:99px; background:var(--sqp-primary,#f05451); }
.sqp-air-rank { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; align-items:center; }
.sqp-air-rank-name { font-weight:600; color:var(--sqp-secondary,#0f2e47); }
.sqp-air-rank-pct { font-weight:700; color:var(--sqp-primary,#f05451); font-variant-numeric:tabular-nums; }
.sqp-air-rank .sqp-air-meter { grid-column:1 / -1; }
.sqp-air-extras { max-width:720px; margin:16px auto 0; }

/* ── Live single-page calculator ─────────────────────────────────────────────
   Inputs and results share one screen; the engine recomputes as they change.
   Scoped to .sqp-single-calc so nothing here touches a normal step-through quiz. */
.sqp-single-calc .sqp-screen-start,
.sqp-single-calc .sqp-screen-leadgen,
.sqp-single-calc .sqp-screen-outcome,
.sqp-single-calc .sqp-screen-personalize,
.sqp-single-calc .sqp-screen-interstitial { display:none !important; }
.sqp-single-calc .sqp-screen-question { display:block !important; }
.sqp-single-calc .sqp-fe-nav,
.sqp-single-calc .sqp-progress,
.sqp-single-calc .sqp-fe-progress,
.sqp-single-calc .sqp-quiz-progress { display:none !important; }

/* STANDARD two-card layout for any live calculator (EMI, discount, …): an inputs
   card and a results card side by side, stacking on mobile. Driven by the quiz's
   primary/secondary colours. One design, every calculator. */
.sqp-single-calc {
  display:flex; flex-wrap:wrap; gap:24px; align-items:stretch;
  max-width:960px; width:100%; margin:0 auto;
  background:none; border:none; box-shadow:none; padding:0;
}
.sqp-single-calc .sqp-lc-inputs,
.sqp-single-calc .sqp-lc-results {
  flex:1 1 320px; min-width:290px; box-sizing:border-box;
  background:#fff; border:1px solid rgba(15,42,71,.12); border-radius:16px;
  box-shadow:0 4px 20px rgba(15,42,71,.06); padding:26px 28px;
}
/* Results BELOW the inputs (full width) instead of beside them. */
.sqp-single-calc.sqp-calc-stacked { flex-direction:column; }
.sqp-single-calc.sqp-calc-stacked .sqp-lc-inputs,
.sqp-single-calc.sqp-calc-stacked .sqp-lc-results { flex-basis:auto; width:100%; }
.sqp-single-calc.sqp-calc-stacked .sqp-lc-panel { flex-direction:row; flex-wrap:wrap; align-items:flex-start; gap:28px 40px; }
.sqp-single-calc.sqp-calc-stacked .sqp-lc-content { flex:1 1 320px; }
/* Inputs: strip the per-question card chrome; clean uppercase labels; full-width fields. */
.sqp-single-calc .sqp-screen-question { margin:0 0 20px; }
.sqp-single-calc .sqp-screen-question:last-child { margin-bottom:0; }
.sqp-single-calc .sqp-q-tpl { border:none !important; box-shadow:none !important; background:transparent !important; padding:0 !important; margin:0 !important; }
.sqp-single-calc .sqp-fe-q-title {
  text-align:left !important; font-size:12px !important; font-weight:700 !important;
  text-transform:uppercase; letter-spacing:.04em; color:#5b6b7b !important;
  margin:0 0 7px !important; line-height:1.3 !important;
}
.sqp-single-calc .sqp-fe-numerical-row,
.sqp-single-calc .sqp-fe-text-input,
.sqp-single-calc .sqp-fe-num-input,
.sqp-single-calc .sqp-fe-dropdown { width:100%; box-sizing:border-box; }
.sqp-single-calc .sqp-fe-slider-wrap { padding:8px 0 4px !important; }
/* Results card: content rows + optional donut below. */
.sqp-lc-panel { display:flex; flex-direction:column; gap:20px; }
.sqp-lc-content > p, .sqp-lc-content > div {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  margin:0; padding:15px 2px; border-bottom:1px solid rgba(15,42,71,.08);
  color:#3a4a5b; font-size:15px; line-height:1.35;
}
.sqp-lc-content > *:last-child { border-bottom:none; }
.sqp-lc-content .sqp-mt-formula {
  font-weight:700; font-size:1.2em; color:var(--sqp-secondary,#0f2e47);
  white-space:nowrap; font-variant-numeric:tabular-nums;
}
/* The LAST result line is the headline figure (Final Price / Total amount), so it
   reads as a highlighted pill in the quiz's primary colour. */
.sqp-lc-content > p:last-child, .sqp-lc-content > div:last-child {
  border-bottom:none; margin-top:8px; padding:16px 18px; border-radius:12px;
  background:var(--sqp-primary,#0d9488); color:#fff; font-weight:600;
}
.sqp-lc-content > p:last-child .sqp-mt-formula,
.sqp-lc-content > div:last-child .sqp-mt-formula { color:#fff; }
.sqp-lc-content > p > strong { font-weight:700; }
.sqp-lc-chart { width:200px; height:200px; align-self:center; }
@media (max-width:760px){ .sqp-single-calc { gap:18px; } }
/* ── A DROPDOWN CUSTOM FIELD ON THE OPT-IN (owner, 2026-09-17: "dropdown is not
   showing correctly") ──────────────────────────────────────────────────────────
   It carried an inline color:#333, unreadable on a dark panel, no arrow of its own
   (the row is borderless and transparent), and in the editor preview it is disabled,
   which Chrome greys out further. It takes the field's placeholder ink, the same as
   the text fields beside it, loses the native arrow, and gets a chevron in that ink.
   The open list keeps the browser's own light menu, so its options stay dark on
   white. */
.sqp-lg-field.sqp-lg-field-select { position:relative; }
.sqp-lg-field .sqp-lg-select {
  -webkit-appearance:none; appearance:none;
  color:var(--sqp-sp-field-placeholder, var(--sqp-sp-field-text, #4a3a28));
  -webkit-text-fill-color:currentColor; opacity:1;
  padding-right:32px !important; cursor:pointer; min-width:0; text-overflow:ellipsis;
}
.sqp-lg-field .sqp-lg-select:disabled { cursor:default; }
.sqp-lg-field .sqp-lg-select option { color:#1f2937; -webkit-text-fill-color:#1f2937; background:#fff; }
.sqp-lg-field.sqp-lg-field-select::after {
  content:''; position:absolute; right:18px; top:50%;
  width:7px; height:7px; pointer-events:none;
  border-right:1.8px solid currentColor; border-bottom:1.8px solid currentColor;
  transform:translateY(-70%) rotate(45deg);
  color:var(--sqp-sp-field-placeholder, var(--sqp-sp-field-text, #4a3a28));
}
.sqp-rtl .sqp-lg-field.sqp-lg-field-select::after { right:auto; left:18px; }
.sqp-rtl .sqp-lg-field .sqp-lg-select { padding-right:15px !important; padding-left:32px !important; }

/* ── CUSTOM FIELDS ON THE OPT-IN (owner, 2026-09-18: "check in frontend it is not
   working") ─────────────────────────────────────────────────────────────────────
   The controls carry no inline styling any more (SQP_Renderer::
   buildLeadgenCustomFields): each template's `.sqp-lg-field input/select/textarea`
   rule styles them exactly as it styles Name and Email. This is only the floor
   for a control a template's rule does not name. */
.sqp-lg-field-custom :is(input, select, textarea) {
  flex:1; min-width:0; border:none; outline:none; background:transparent; font-family:inherit;
}
/* A paragraph field has no single line to centre on: the icon sits by its first line. */
.sqp-lg-form .sqp-lg-field.sqp-lg-field-custom.sqp-lg-cf-textarea { align-items:flex-start; }
.sqp-lg-form .sqp-lg-field.sqp-lg-field-custom.sqp-lg-cf-textarea > svg { margin-top:14px; }
.sqp-lg-field-custom textarea { resize:vertical; }

/* Radio, checkbox group and single tick. Not a box: a question on the panel, its
   answers as small chips drawn from the Design > Field colors, the picked one in
   the quiz's primary. (0,4,0) so it outranks every template's `.sqp-lg-field` box
   and the page/preview row rules above. */
.sqp-lg-form .sqp-lg-field.sqp-lg-field-custom.sqp-lg-field-choice {
  display:block; min-height:0; padding:2px 0; margin-bottom:4px;
  border:0; background:none; box-shadow:none; outline:none;
  text-align:left; cursor:default;
  color:var(--sqp-sp-field-text, currentColor);
}
.sqp-lg-choice-label { font-size:14px; font-weight:600; line-height:1.4; margin:0 0 8px; }
.sqp-lg-choices { display:flex; flex-wrap:wrap; gap:8px; }
.sqp-lg-choice {
  display:inline-flex; align-items:center; gap:8px; margin:0;
  padding:9px 14px; font-size:14px; line-height:1.3; cursor:pointer;
  background:var(--sqp-sp-field-bg, #ffffff);
  border:var(--sqp-sp-field-bdrw, 1px) solid var(--sqp-sp-field-bdr, #dfe3ea);
  border-radius:var(--sqp-sp-field-r, 8px);
  transition:border-color .15s ease;
}
/* The field's ink, not the theme's: themes color every `label` (Astra's
   `label, legend` painted the answers navy on cinematic's navy panel). */
.sqp-lg-form .sqp-lg-choice { color:inherit; }
.sqp-lg-choice:has(input:checked) { border-color:var(--sqp-primary, #f05451); }
/* The browser's own box and dot, whatever else styles inputs. wp-admin's forms.css
   (the editor preview) and many themes set appearance:none and draw the control
   with a border, and the field rules above take borders off every input in a row,
   which left no box at all. Native appearance draws it regardless, in the primary. */
.sqp-lg-form .sqp-lg-field.sqp-lg-field-custom .sqp-lg-choice input {
  -webkit-appearance:auto; appearance:auto;
  flex:none; width:16px; height:16px; min-height:0; margin:0; padding:0; opacity:1;
  border:0; background:none; box-shadow:none;
  accent-color:var(--sqp-primary, #f05451); align-self:center; cursor:pointer;
}
.sqp-lg-form .sqp-lg-field.sqp-lg-field-custom .sqp-lg-choice input::before { content:none; }
/* A single tick reads as a consent line, not a chip. */
.sqp-lg-field-choice > .sqp-lg-choice {
  display:flex; align-items:flex-start; padding:4px 0; border:0; background:none; font-size:13.5px;
}
.sqp-lg-field-choice > .sqp-lg-choice input { margin-top:1px !important; }

/* A REQUIRED FIELD LEFT EMPTY SHOWS WHICH ONE. The engine used to paint the INPUT's
   border red, and on every template but aurora the input has no border (the row is
   the box), so the message said "fill in the required fields" and nothing pointed
   at one. The class goes on the row; `> input` covers aurora's Name and Email,
   where the input is the box. */
.sqp-lg-field.sqp-lg-invalid,
.sqp-lg-field.sqp-lg-invalid > input { border-color:#f05451 !important; }
.sqp-lg-field-choice.sqp-lg-invalid .sqp-lg-choice-label,
.sqp-lg-field-choice.sqp-lg-invalid > .sqp-lg-choice { color:#f05451; }
.sqp-lg-field-choice.sqp-lg-invalid .sqp-lg-choice { border-color:#f05451; }

/* The editor names a hidden field where it sits, since the page never shows it. */
.sqp-lg-cf-hidden-note {
  padding:8px 12px; font-size:12px; line-height:1.45; text-align:left;
  border:1px dashed color-mix(in srgb, currentColor 35%, transparent); border-radius:8px; opacity:.8;
}

/* ── BUTTON ONLY IS A BUTTON (owner, 2026-09-17: "why you are adding background in
   only button? you just need to show button") ────────────────────────────────────
   The start card kept its fill, border, shadow and padding with nothing left in it
   but the button, so the button sat on a coloured slab. Only the popup trigger had
   this stripped (above); it now applies wherever Button Only is drawn, the editor
   preview included. !important for the same reason as the trigger rule: the card's
   background is emitted at id level by the style system. */
.sqp-start-tpl.sqp-btn-only,
.sqp-live-preview .sqp-preview-quiz .sqp-start-tpl.sqp-btn-only {
  background:none !important; border:none !important; box-shadow:none !important;
  padding:0 !important; border-radius:0 !important; min-height:0 !important;
}
.sqp-start-tpl.sqp-btn-only::before,
.sqp-start-tpl.sqp-btn-only::after { display:none !important; }
.sqp-live-preview .sqp-preview-quiz:has(> .sqp-start-tpl.sqp-btn-only) {
  background:none !important; border:none !important; box-shadow:none !important;
}

/* ── CINEMATIC ON A PHONE SCROLLS ITS CONTENT (owner, 2026-09-17: "in preview mobile
   scroll not working and it cutting from bottom") ─────────────────────────────────
   Stacked, the picture is a 200px band and the content pane was height:auto inside a
   split held to the screen's height: it grew past the split and the split clipped it,
   so the last answers and the Next button were below an edge nothing could scroll.
   The content pane now takes what the band leaves and scrolls inside it. */
@media (max-width:768px) {
  .sqp-template-cinematic.sqp-fullscreen :is(.sqp-q-tpl9, .sqp-oc-tpl9, .sqp-lg-tpl9) > .sqp-tpl9-right {
    flex:1 1 0; min-height:0; height:auto; overflow-y:auto; -webkit-overflow-scrolling:touch;
  }
  .sqp-template-cinematic.sqp-fullscreen .sqp-q-tpl9 .sqp-fe-question { max-height:none; }
}

/* ── THE FRAME CONTROLS REACH EACH TEMPLATE'S OWN FRAME (owner, 2026-09-17) ─────────
   Border, Shadow, corner radius and Background Color were painted by the editor on
   its preview wrapper, while on the page every template draws its own frame and
   ignored them. The variables come from SQP_Renderer::frameVarDeclarations (and
   styleLive.js on the editor side), which emits each one only when the author has
   moved that control off the template's own default. So these rules change nothing
   on an untouched quiz: each fallback below is exactly what that template drew
   before. The class is doubled to outrank the template files' own (0,2,0) rules. */

/* Classic: the card IS the frame. Card and Top bar keep their hairline and soft
   shadow, Minimal its bare look; Cover and Accent are designed frames and are left
   alone, as the editor has always left them. */
.sqp-template-classic.sqp-template-classic :is(.sqp-start-tpl4, .sqp-q-tpl4, .sqp-lg-tpl4, .sqp-oc-tpl4).sqp-classic-card,
.sqp-template-classic.sqp-template-classic .sqp-interstitial,
.sqp-template-classic.sqp-template-classic .sqp-analyzing {
  border:var(--sqp-sp-frame-bdr, 1px solid #dee2e6);
  border-radius:var(--sqp-sp-frame-r, 8px);
  box-shadow:var(--sqp-sp-frame-shd, 0 1px 3px rgba(0,0,0,.06));
}
.sqp-template-classic.sqp-template-classic :is(.sqp-start-tpl4, .sqp-q-tpl4, .sqp-lg-tpl4, .sqp-oc-tpl4).sqp-classic-topbar {
  border:var(--sqp-sp-frame-bdr, none);
  border-radius:var(--sqp-sp-frame-r, 8px);
  box-shadow:var(--sqp-sp-frame-shd, 0 1px 3px rgba(0,0,0,.06));
}
.sqp-template-classic.sqp-template-classic :is(.sqp-start-tpl4, .sqp-q-tpl4, .sqp-lg-tpl4, .sqp-oc-tpl4).sqp-classic-minimal {
  border:var(--sqp-sp-frame-bdr, 0);
  border-radius:var(--sqp-sp-frame-r, 0);
  box-shadow:var(--sqp-sp-frame-shd, none);
}

/* Aurora: the card on every screen. Its border was the answer-border hairline and
   it drew no shadow. */
.sqp-template-aurora.sqp-template-aurora .sqp-au-card,
.sqp-template-aurora.sqp-template-aurora .sqp-interstitial {
  border:var(--sqp-sp-frame-bdr, 1px solid var(--sqp-sp-ans-bdr, #d5dde7));
  box-shadow:var(--sqp-sp-frame-shd, none);
}

/* Lumen: the panel is the quiz container itself (the editor's preview root carries
   the same class). Background Color paints it once it differs from the panel's own
   colour; the sticky footer's fade follows so it does not show a seam. */
.sqp-template-lumen.sqp-template-lumen {
  background:var(--sqp-sp-frame-bg, var(--sqp-sp-tmpl-bg, #f5f6f8));
  border:var(--sqp-sp-frame-bdr, 0);
  border-radius:var(--sqp-sp-frame-r, 24px);
  box-shadow:var(--sqp-sp-frame-shd, none);
}

/* ── TAG AND CATEGORY PANELS (owner, 2026-09-17: "wire them up") ─────────────────────
   Design > TAG styles each tag content block ([SHOWALLUSERTAGS], [SHOWTAGCONTENT]),
   Design > Category the category result blocks. Every variable is emitted only when
   the author set it, and there is deliberately NO fallback: an undefined var() makes
   the declaration behave as unset, which is inherit for the type and initial (none,
   0, transparent) for the box, i.e. exactly how these blocks drew before. */
.sqp-mt-tag {
  color:var(--sqp-sp-tag-color); background:var(--sqp-sp-tag-bg);
  font-size:var(--sqp-sp-tag-fs); font-weight:var(--sqp-sp-tag-fw);
  padding:var(--sqp-sp-tag-pad); border-radius:var(--sqp-sp-tag-radius);
}
.sqp-mt-category-total, .sqp-mt-category-total-percent, .sqp-mt-category-only-percent,
.sqp-mt-category-breakdown-pct, .sqp-mt-category-breakdown-num, .sqp-mt-categoryrank {
  box-sizing:border-box;
  max-width:var(--sqp-sp-cat-width);
  margin-left:var(--sqp-sp-cat-ml); margin-right:var(--sqp-sp-cat-mr);
  background:var(--sqp-sp-cat-bg); border:var(--sqp-sp-cat-border);
  border-radius:var(--sqp-sp-cat-bdrr); padding:var(--sqp-sp-cat-pad);
  box-shadow:var(--sqp-sp-cat-shadow);
}
/* A Button Only start screen shows the button alone, the start video included. */
.sqp-start-tpl.sqp-btn-only .sqp-start-video { display:none !important; }
/* Auto-submit: the author's "Message while it submits", under the busy button. */
.sqp-quiz-container .sqp-autosubmit-msg { margin:12px 0 0; text-align:center; font-size:14px; line-height:1.4; color:inherit; opacity:.85; }

/* Question video (Media > Video): 16:9 frame in the picture's place, with the
   optional "click to unmute" pill over its top-left corner while it plays muted. */
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-video { position:relative; margin:12px 0 18px; border-radius:var(--sqp-sp-bdr-r, 8px); overflow:hidden; background:#000; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-video-frame { position:relative; aspect-ratio:16 / 9; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-video-frame iframe,
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-video-frame video { position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-unmute { position:absolute; top:12px; left:12px; z-index:2; display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:0; border-radius:999px; background:rgba(0,0,0,.72); color:#fff; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-unmute[hidden] { display:none; }
:is(.sqp-quiz-container, .sqp-preview-quiz) .sqp-fe-q-unmute:hover { background:rgba(0,0,0,.86); }

/* A theme's own table rules (Astra: `table, td, th { border:1px solid }`) put a line on every
   cell of the score tables. One class beats the theme's bare td/th and loses to every
   `.sqp-mt-table td` line of our own, whatever order the files load in. */
.sqp-mt-table :where(th, td) { border:0; }
