/* ================================================================
   UBQ SEO Pages — the ONE theme file (subject + topic templates)

   Palette/tokens sourced from public/questionArchiveV2/css/base.css;
   interaction language (pills, sticky jump bar, grow-underline, FAB)
   copied from the reviews wall (GlobalPaymentsV4/modules/reviews),
   the shared header, and the archive's corner FAB so these pages
   read as the same product family.

   Structural and compact on purpose. Every knob on :root.
   ================================================================ */

:root {
  /* Brand (base.css) */
  --brand:       #0072ff;
  --brand-hover: #005cd9;
  --brand-press: #0053B9;
  --brand-soft:  rgba(0, 114, 255, .08);

  /* Neutrals (base.css ink scale) */
  --ink-900: #0c0d0f;
  --ink-800: #1a1d24;
  --ink-600: #4a5068;
  --ink-500: #636b82;
  --ink-400: #8891a8;
  --ink-200: #d4d8e4;
  --ink-100: #eceef4;
  --ink-50:  #fafafa;
  --white:   #ffffff;

  /* Difficulty gradients — the archive's own (questionArchiveV2 cards.css
     .qa2-diff), verbatim. Hard is PURPLE, not red. */
  --diff-easy:   linear-gradient(135deg, #339933, #5cb85c);
  --diff-medium: linear-gradient(135deg, #e68a00, #ffad33);
  --diff-hard:   linear-gradient(135deg, #4a004a, #7a1a7a);

  /* Typography — archive convention: Unbounded display, Inter body */
  --font-display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;

  --fs-h1:    24px;
  --fs-h2:    16px;
  --fs-body:  15.5px;
  --fs-row:   14.5px;
  --fs-small: 13px;
  --fs-tag:   11px;

  /* Shape */
  --r-pill:  124px;
  --r-box:   14px;
  --r-tag:   64px;

  /* The signature ring shadow (base.css) */
  --shadow-ring: 0px 2px 3px -1px rgba(0,0,0,0.1), 0px 1px 0px 0px rgba(25,28,33,0.02), 0px 0px 0px 1px rgba(25,28,33,0.08);

  /* Motion (archive FAB timing) */
  --dur-morph: 340ms;
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --smooth:    ease;

  /* Layout (sp- content column; the chrome has its own --page-max below) */
  --sp-page-max: 800px;
  --page-pad: 20px;

  /* ── NN chrome tokens (components/header + footer) ────────────────
     header.min.css / footer.min.css consume these names with NO
     fallbacks — this is the standard NN token block from the component
     demos (components/header/header.html), verbatim. Do not rename. */
  --bg:           #fafbfc;
  --bg-elev:      #f3f5f7;
  --card:         #ffffff;
  --card-2:       #f7f9fb;
  --bg-tint:      #f0f6ff;
  --text:         #1a1a1a;
  --text-muted:   #6b6b6b;
  --text-faint:   #9aa0a6;
  --accent:       #0072ff;
  --accent-light: #e6f3ff;
  --accent-hover: #0056cc;
  --accent-soft:  rgba(0, 114, 255, 0.08);
  --border:       #e1e4e8;
  --border-soft:  #edf0f3;
  --shadow-card:  rgba(14, 63, 126, 0.06) 0px 0px 0px 1px,
                  rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px,
                  rgba(42, 51, 70, 0.04) 0px 2px 2px -1px,
                  rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px,
                  rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px,
                  rgba(42, 51, 70, 0.03) 0px 10px 10px -5px,
                  rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
  --radius-sm:    10px;
  --radius:       16px;
  --radius-card:  clamp(20px, 2.4vw, 28px);
  --radius-pill:  999px;
  --font-header:  'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ease-out-quart:   cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-hover:       ease;
  --dur-fast:         180ms;
  --dur-base:         240ms;
  --btn-gradient:     linear-gradient(180deg, #4c9aff 0%, var(--accent) 45%, var(--accent-hover) 100%);
  --btn-edge:         #00387e;
  --btn-shadow:       inset 0 -3px 0 var(--btn-edge), var(--shadow-card);
  --btn-shadow-float: inset 0 -3px 0 var(--btn-edge), 0 8px 20px rgba(0, 56, 126, 0.22);
  --page-max:     1180px;
  --page-pad-x:   clamp(20px, 4vw, 40px);
  --header-h:     70px;
}

@supports (corner-shape: squircle) {
  :root {
    --radius-sm:   20px;
    --radius:      32px;
    --radius-card: clamp(40px, 4.8vw, 56px);
  }
}

/* ─── Reset / base ──────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  background: var(--white);
  color: var(--ink-900);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
button { font-family: var(--font-ui); }

/* Links: never the browser default underline. Textual links opt into
   the grow-underline via .sp-ulink; question links stay plain brand. */
a { color: var(--brand); text-decoration: none; }

/* Grow-underline (header/reviews behavior): grows in from the left on
   hover, collapses out to the right. */
.sp-ulink {
  position: relative;
  transition: color var(--dur-fast) var(--ease-hover);
}
.sp-ulink::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--dur-fast) var(--ease-out-quart);
}
.sp-ulink:hover,
.sp-ulink:focus-visible { color: var(--accent); }
.sp-ulink:hover::after,
.sp-ulink:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.sp-wrap {
  max-width: var(--sp-page-max);
  margin: 0 auto;
  padding: 28px var(--page-pad) 64px;
}

/* ─── Breadcrumb ────────────────────────────────────────────────── */

.sp-crumbs {
  font-size: var(--fs-small);
  color: var(--ink-500);
  margin-bottom: 22px;
}
.sp-crumbs a { color: var(--ink-500); }
.sp-crumbs a:hover { color: var(--accent); }
.sp-crumbs .sp-crumb-sep { margin: 0 6px; color: var(--ink-200); }
.sp-crumbs .sp-crumb-here { color: var(--ink-800); font-weight: 600; }

/* ─── Hero ──────────────────────────────────────────────────────── */

.sp-hero { margin-bottom: 24px; }
.sp-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.sp-statline {
  font-size: var(--fs-small);
  color: var(--ink-500);
  margin-bottom: 14px;
}
.sp-statline strong { color: var(--ink-800); font-weight: 600; }
.sp-intro { max-width: 70ch; color: var(--ink-800); }
.sp-intro p + p { margin-top: 10px; }
.sp-countline { margin-top: 12px; }
.sp-countline strong { color: var(--ink-900); font-weight: 700; }

.sp-crosslink { margin-top: 12px; font-size: var(--fs-small); font-weight: 600; }

/* ─── Sections ──────────────────────────────────────────────────── */

.sp-section { margin-top: 34px; }
.sp-section > h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
}

/* ─── Info carousel (Where-it-shows-up · Related topics) ────────── */

/* The SHELL bleeds past the column so shadows and fades share one box;
   the track pads back in, keeping panels on the content column. */
.sp-caro-shell { position: relative; margin: 0 -8px; }
.sp-caro {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Snap aligns to the snapport, not the padding box — without this the
     snapped panel's ring shadow lands under the edge fade. */
  scroll-padding-inline: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px 14px;
}
.sp-caro::-webkit-scrollbar { display: none; }
.sp-panel {
  flex: 0 0 80%;
  min-width: 0;
  scroll-snap-align: start;
  background: var(--white);
  border-radius: var(--radius-card);
  corner-shape: squircle;
  box-shadow: var(--shadow-ring);
  padding: 24px 26px;
}
.sp-panel > h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
}
.sp-caro-shell::before,
.sp-caro-shell::after {
  content: '';
  position: absolute;
  top: 0; bottom: 6px;
  width: 28px;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transition: opacity var(--dur-fast) var(--smooth);
}
.sp-caro-shell::before { left: 0;  background: linear-gradient(90deg, var(--white), transparent); }
.sp-caro-shell::after  { right: 0; background: linear-gradient(270deg, var(--white), transparent); }
/* A fade only when there is content in that direction (JS-toggled) */
.sp-caro-shell.at-start::before { opacity: 0; }
.sp-caro-shell.at-end::after    { opacity: 0; }

/* Chips (reviews pill styling), wrapping inside their panel */
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  corner-shape: squircle;
  background: var(--card);
  color: var(--text-muted);
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-hover),
              color var(--dur-fast) var(--ease-hover),
              background var(--dur-fast) var(--ease-hover),
              transform var(--dur-fast) var(--ease-out-quart);
}
.sp-chip:hover { border-color: var(--accent); color: var(--accent); }
.sp-chip:active { transform: scale(0.96); }
/* These chips navigate — same slide-in arrow as the NN CTA, sized down */
.sp-chip::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 14px;
  margin-left: 0;
  background-color: currentColor;
  /* stroke-width 3: at 14px the 24-unit viewBox scales strokes ~0.58x,
     so the CTA's stroke-2 arrow reads as a hairline at chip size */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  opacity: 0;
  transform: translateX(-6px);
  transition-property: width, margin-left, opacity, transform;
  transition-duration: var(--dur-base);
  transition-timing-function: var(--ease-out-quart);
}
.sp-chip:hover::after,
.sp-chip:focus-visible::after {
  width: 14px;
  margin-left: 7px;
  opacity: 1;
  transform: translateX(0);
}
/* ─── Where-it-appears icon list ────────────────────────────────── */

.sp-appears { list-style: none; }
.sp-appears li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: var(--fs-row);
}
.sp-appears-ic { width: 17px; height: 17px; color: var(--ink-400); flex: 0 0 auto; }
.sp-appears a { font-weight: 600; }
.sp-appears-meta { color: var(--ink-500); font-size: var(--fs-small); }

/* ─── Sticky jump bar (reviews filterbar pattern) ───────────────── */

.sp-jumpbar {
  position: sticky;
  top: calc(var(--header-h, 70px) + 12px);
  z-index: 40;
  display: flex;
  justify-content: center;
  margin: 34px 0 4px;
  pointer-events: none;
}
.sp-jumps {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  corner-shape: squircle;
  transition: background-color var(--dur-base) var(--ease-hover),
              box-shadow var(--dur-base) var(--ease-hover);
}
.sp-jumpbar.is-stuck .sp-jumps {
  background: rgba(250, 251, 252, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      inset 0 0 0 1px rgba(255, 255, 255, 0.45),
      var(--shadow-card);
}
.sp-jump {
  padding: 11px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  corner-shape: squircle;
  background: var(--card);
  color: var(--text-muted);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-hover),
              color var(--dur-fast) var(--ease-hover),
              background var(--dur-fast) var(--ease-hover),
              transform var(--dur-fast) var(--ease-out-quart);
}
.sp-jump:active { transform: scale(0.96); }
.sp-jump:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-jump:hover { border-color: var(--accent); color: var(--accent); }
.sp-jump.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sp-jumps-label {
  align-self: center;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-500);
  padding-right: 2px;
}
.sp-jump--n { padding: 11px 17px; font-variant-numeric: tabular-nums; }

.sp-subhead {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 600;
  margin: 18px 0 6px;
  color: var(--ink-600);
}

/* ─── Shared card surface (panels, question/quiz cards) ─────────── */

.sp-surface {
  background: var(--white);
  border-radius: var(--radius-card);
  corner-shape: squircle;
  box-shadow: var(--shadow-ring);
  padding: 26px 28px;
}

/* ─── Jump targets (sticky-bar landing offset) ──────────────────── */

.sp-jumptarget { scroll-margin-top: calc(var(--header-h, 70px) + 76px); }

/* ─── Question list (difficulty pill inline with the stem) ──────── */

.sp-qlist {
  list-style: none;
  /* Stems are click-only: no highlighting, no drag-select (the copy
     event is also blocked in JS). Crawlers read the DOM regardless. */
  -webkit-user-select: none;
  user-select: none;
}
.sp-qlist li {
  padding: 9px 0;
  font-size: var(--fs-row);
  line-height: 1.75;
}
.sp-qlist a { color: var(--brand); }
.sp-qlist a:hover { color: var(--brand-hover); }

.sp-pill {
  display: inline-block;
  font-size: var(--fs-tag);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-tag);
  corner-shape: squircle;
  padding: 2px 10px;
  margin-right: 9px;
  color: var(--white);
  background: var(--ink-500); /* fallback: an unresolved diff class must never render invisible */
  vertical-align: 1px;
}
.sp-pill-beginner     { background: var(--diff-easy); }
.sp-pill-intermediate { background: var(--diff-medium); }
.sp-pill-advanced     { background: var(--diff-hard); }

.sp-more {
  margin-top: 14px;
  font-size: var(--fs-row);
  font-weight: 600;
}

.sp-empty {
  font-size: var(--fs-small);
  color: var(--ink-500);
  background: var(--ink-50);
  border-radius: var(--r-box);
  padding: 12px 14px;
}

/* ─── Quiz list ─────────────────────────────────────────────────── */

.sp-quizlist { list-style: none; }
.sp-quizlist li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
  font-size: var(--fs-row);
}
.sp-quizlist li:last-child { border-bottom: none; }
.sp-quiz-name { font-weight: 600; color: var(--ink-800); }
.sp-quiz-meta { color: var(--ink-500); font-size: var(--fs-small); }
.sp-quiz-go { margin-left: auto; white-space: nowrap; font-weight: 600; }

/* ─── Floating formula sheet (archive corner-FAB pattern) ───────── */

.sp-formulax {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Collapsed: 52px icon circle; label grows from the right edge on
   hover/focus (copy of qa2-search-fab, hover-gated to fine pointers). */
.sp-fab {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 52px;
  width: 52px;
  padding: 0;
  border: none;
  border-radius: var(--r-pill);
  corner-shape: squircle;
  background: var(--white);
  color: var(--ink-600);
  box-shadow: var(--shadow-ring), 0 8px 22px rgba(12, 13, 15, .10);
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition: width var(--dur-morph) var(--ease-out),
              gap var(--dur-morph) var(--ease-out),
              padding var(--dur-morph) var(--ease-out),
              background-color var(--dur-fast) var(--smooth),
              color var(--dur-fast) var(--smooth),
              box-shadow var(--dur-fast) var(--smooth);
}
.sp-fab-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0 15px;
  transition: margin var(--dur-morph) var(--ease-out);
}
.sp-fab-label {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: -.01em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--dur-fast) var(--smooth), transform var(--dur-morph) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .sp-fab:hover {
    width: 148px;
    padding-right: 18px;
    color: var(--ink-900);
    box-shadow: inset 0 0 0 1.5px rgba(0, 114, 255, .35), var(--shadow-ring), 0 10px 26px rgba(0, 114, 255, .14);
  }
  .sp-fab:hover .sp-fab-icon { margin-right: 10px; }
  .sp-fab:hover .sp-fab-label { opacity: 1; transform: none; }
}
.sp-fab:focus-visible {
  width: 148px;
  padding-right: 18px;
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1.5px rgba(0, 114, 255, .35), var(--shadow-ring), 0 10px 26px rgba(0, 114, 255, .14);
}
.sp-fab:focus-visible .sp-fab-icon { margin-right: 10px; }
.sp-fab:focus-visible .sp-fab-label { opacity: 1; transform: none; }
.sp-fab:active { transform: scale(.96); }

/* Open: FAB swaps out for the panel */
.sp-formulax.is-open .sp-fab { display: none; }
.sp-formulax-panel {
  display: none;
  /* Shrink to the widest formula row; the min() only caps runaways */
  width: fit-content;
  min-width: 200px;
  max-width: min(340px, calc(100vw - 44px));
  background: var(--white);
  border-radius: var(--radius);
  corner-shape: squircle;
  box-shadow: var(--shadow-ring), 0 12px 32px rgba(12, 13, 15, 0.10);
  overflow: hidden;
}
.sp-formulax.is-open .sp-formulax-panel { display: block; }
.sp-formulax-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-800);
  background: var(--white);
  border: none;
  padding: 11px 14px;
  cursor: pointer;
}
.sp-formulax-head:hover { color: var(--accent); }
.sp-formulax-chev { width: 14px; height: 14px; }

.sp-formulas { list-style: none; padding: 0 14px 10px; max-height: 44vh; overflow-y: auto; }
.sp-formulas li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ink-100);
}
.sp-formulas li:last-child { border-bottom: none; }
.sp-formula-tex { font-size: 15px; }
.sp-formula-label { color: var(--ink-500); font-size: var(--fs-tag); }

/* ─── Outro: divider, centered pitch, the NN glossy button ──────── */

.sp-outro { margin-top: 44px; }
/* Dark fluid-shader cell (the reviews-page pattern verbatim): solid
   dark base, shader canvas absolute behind, content promoted above. */
.sp-outro-card {
  position: relative;
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-card);
  corner-shape: squircle;
  background: #101418;
  overflow: hidden;
  box-shadow: var(--shadow-ring);
}
.sp-outro-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  corner-shape: inherit;
}
.sp-outro-inner { position: relative; z-index: 1; }
.sp-outro-copy {
  max-width: 56ch;
  margin: 0 auto 18px;
  color: rgba(245, 247, 250, 0.78);
  font-size: var(--fs-body);
}

.sp-btn {
  --arrow-w: 15px;
  --arrow-gap: 8px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  corner-shape: squircle;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: var(--btn-gradient);
  box-shadow: var(--btn-shadow-float);
  transition-property: background, transform, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: var(--ease-out-quart);
}
.sp-btn::after {
  content: '';
  display: inline-block;
  width: 0;
  height: var(--arrow-w);
  margin-left: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  opacity: 0;
  transform: translateX(-6px);
  transition-property: width, margin-left, opacity, transform;
  transition-duration: var(--dur-base);
  transition-timing-function: var(--ease-out-quart);
}
.sp-btn:hover::after,
.sp-btn:focus-visible::after {
  width: var(--arrow-w);
  margin-left: var(--arrow-gap);
  opacity: 1;
  transform: translateX(0);
}
.sp-btn:hover {
  background: linear-gradient(180deg, #5ba4ff 0%, #1a80ff 45%, var(--accent-hover) 100%);
  transform: translateY(-1px);
  box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -1px 1px rgba(0, 40, 90, 0.45),
      0 2px 4px rgba(0, 40, 90, 0.2),
      0 8px 20px rgba(0, 114, 255, 0.34);
}
.sp-btn:active { transform: scale(0.96); }
.sp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── Responsive ────────────────────────────────────────────────── */

@media (max-width: 640px) {
  :root { --fs-h1: 21px; --fs-h2: 15px; }
  .sp-panel { flex-basis: 88%; }
  .sp-jump { padding: 9px 18px; font-size: var(--fs-small); }
  .sp-formulax { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .sp-quizlist li { flex-wrap: wrap; }
  .sp-quiz-go { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sp-fab, .sp-fab-icon, .sp-fab-label, .sp-ulink::after, .sp-chip, .sp-jump { transition-duration: 1ms; }
}
