/* bootcamp theme — a playful, chunky, language-learning-app look for the footwear study site.
   Injected after each page's own styles by publish.py, so it re-skins whatever markup the pages render. */

:root {
  color-scheme: light dark; /* follows the phone or computer setting */
  --green: #58cc02;
  --green-shade: #58a700;
  --green-soft: light-dark(#d7ffb8, #1f3a12);
  --green-ink: light-dark(#58a700, #79d634);
  --blue: #1cb0f6;
  --blue-shade: #1899d6;
  --blue-soft: light-dark(#ddf4ff, #12324a);
  --blue-line: light-dark(#84d8ff, #3f85a7);
  --red: #ff4b4b;
  --red-shade: #ea2b2b;
  --red-soft: light-dark(#ffdfe0, #3d1c20);
  --red-ink: light-dark(#ea2b2b, #ff7878);
  --gold: #ffc800;
  --gold-shade: #e5a000;
  --orange: #ff9600;
  --orange-shade: #cd7900;
  --purple: #ce82ff;
  --purple-shade: #a568cc;
  --soft: light-dark(#f7f7f7, #202f36);
  --strong: light-dark(#3c3c3c, #ffffff);
  --faint: light-dark(#afafaf, #52656d);
  --radius: 16px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sidebar: 256px;
  --font: "Nunito", "Varela Round", ui-rounded, system-ui, -apple-system, sans-serif;

  /* The pages' own variable names, mapped onto the theme */
  --page: light-dark(#ffffff, #131f24);
  --surface: var(--page);
  --ink: light-dark(#4b4b4b, #f1f7fb);
  --muted: light-dark(#777777, #a3b5bf);
  --quiet: var(--muted);
  --line: light-dark(#e5e5e5, #37464f);
  --accent: var(--blue);
  --focus: var(--blue-line);
  --button: var(--green);
  --button-ink: #ffffff;
  --button-hover: #61e002;
  --notice: var(--soft);
  --shadow: none;

  font: 600 16px/1.5 var(--font);
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink); font: inherit; }
body :is(input, button, select, textarea) { font-family: var(--font); }
body a, body a:visited { color: var(--blue); font-weight: 800; text-decoration: none; }
body a:hover { text-decoration: underline; text-underline-offset: .18em; }
body :focus-visible { outline: 3px solid var(--blue-line); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--blue-soft); color: var(--strong); }
body :is(h1, h2, h3) { color: var(--strong); font-weight: 900; letter-spacing: -.01em; }
body h1 { font-size: clamp(28px, 4vw, 34px); line-height: 1.15; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ───────── Navigation: sidebar → icon rail → bottom tab bar ───────── */
body nav[aria-label="Footwear galleries"] {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  margin: 0 !important;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 2px solid var(--line);
  background: var(--page);
}
body nav[aria-label="Footwear galleries"]::before {
  content: "bootcamp";
  display: block;
  padding: 10px 16px 30px;
  color: var(--green);
  font: 900 31px/1 var(--font);
  letter-spacing: -.035em;
}
body nav[aria-label="Footwear galleries"] a {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  padding: 6px 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font: 800 15px/1.1 var(--font);
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .15s, transform .15s var(--spring);
}
body nav[aria-label="Footwear galleries"] a::before {
  content: "";
  flex: none;
  width: 34px;
  height: 34px;
  background: var(--icon) center / contain no-repeat;
  transition: transform .35s var(--spring);
}
body nav[aria-label="Footwear galleries"] a:hover { background: var(--soft); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  body nav[aria-label="Footwear galleries"] a:hover::before { transform: scale(1.14) rotate(-7deg); }
}
body nav[aria-label="Footwear galleries"] a:active { transform: scale(.96); }
body nav[aria-label="Footwear galleries"] a[aria-current="page"] {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-line);
  font-weight: 800;
}
nav[aria-label="Footwear galleries"] a[href="/"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 32 32'%3E%3Cpath d='M9.2 7.5H5.6a3.6 3.6 0 0 0 4.2 4.6M22.8 7.5h3.6a3.6 3.6 0 0 1-4.2 4.6' fill='none' stroke='%23e5a000' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath fill='%23ffc800' d='M8.5 3.5h15v7.8a7.5 7.5 0 0 1-15 0z'/%3E%3Crect x='14' y='17.5' width='4' height='5' fill='%23e5a000'/%3E%3Crect x='9.5' y='22' width='13' height='6' rx='2.4' fill='%23cd7900'/%3E%3Crect x='11.6' y='6' width='2.6' height='7.5' rx='1.3' fill='%23fff' opacity='.65'/%3E%3C/svg%3E");
}
nav[aria-label="Footwear galleries"] a[href="/kinggee-fxd-footwear"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='.8 1 32 32'%3E%3Cpath fill='%23ff9600' d='M8 3.5h10a2 2 0 0 1 2 2v9.2l6.3 2.1A4.2 4.2 0 0 1 29 20.8V24H6V5.5a2 2 0 0 1 2-2z'/%3E%3Cpath fill='%23cd7900' d='M6 3.5h3.5V24H6z' opacity='.55'/%3E%3Cpath fill='%23ffc800' d='M22.6 15.9l3.7 1.2A4.2 4.2 0 0 1 29 20.8V24h-6.8z'/%3E%3Crect x='4.5' y='23.5' width='26' height='5' rx='2.5' fill='%234b4b4b'/%3E%3Cpath d='M12.5 8.5h4.5M12.5 12.5h4.5' stroke='%23cd7900' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
nav[aria-label="Footwear galleries"] a[href="/footwear-gallery"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 1 32 32'%3E%3Cpath d='M11 13V9.5a5 5 0 0 1 10 0V13' fill='none' stroke='%23a568cc' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath fill='%23ce82ff' d='M5.5 11h21l-1.6 15.2a2.2 2.2 0 0 1-2.2 2H9.3a2.2 2.2 0 0 1-2.2-2z'/%3E%3Cpath fill='%23fff' opacity='.4' d='M9 14.5h2.6l-.4 10H9.8z'/%3E%3Ccircle cx='12' cy='15' r='1.6' fill='%23a568cc'/%3E%3Ccircle cx='20' cy='15' r='1.6' fill='%23a568cc'/%3E%3C/svg%3E");
}
nav[aria-label="Footwear galleries"] a[href="/footwear-study"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='10' y='3.5' width='17' height='22' rx='4' fill='%2358a700' transform='rotate(12 18.5 14.5)'/%3E%3Crect x='5' y='6' width='17' height='22' rx='4' fill='%2358cc02'/%3E%3Cpath d='M9.4 17.2l3.2 3.2 5.6-6.6' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
nav[aria-label="Footwear galleries"] a[href="/study-recap"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3.5' y='3.5' width='25' height='25' rx='7' fill='%231cb0f6'/%3E%3Crect x='3.5' y='22' width='25' height='6.5' rx='3' fill='%231899d6' opacity='.5'/%3E%3Crect x='8.5' y='15' width='4.2' height='9' rx='2.1' fill='%23fff'/%3E%3Crect x='14' y='9.5' width='4.2' height='14.5' rx='2.1' fill='%23fff'/%3E%3Crect x='19.5' y='12.5' width='4.2' height='11.5' rx='2.1' fill='%23ddf4ff'/%3E%3C/svg%3E");
}

/* ───────── Page frame (every page except the lesson) ───────── */
body:not(:has(#study-card)) {
  padding-left: var(--sidebar);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
}
body:not(:has(#study-card)) > main {
  flex: 0 1 640px;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 32px 0 96px;
}
body:has(#products) > main { flex-basis: 720px; }
body:has(.recap-panels) > main { flex-basis: 680px; }

.duo-rail {
  position: sticky;
  top: 0;
  flex: 0 0 340px;
  display: grid;
  gap: 20px;
  padding: 26px 0 40px;
}
.duo-topbar { display: none; }

/* ───────── Shared components ───────── */
.duo-btn,
body .primary-button,
body .study-profile-actions button {
  --c: var(--green);
  --s: var(--green-shade);
  --t: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 16px;
  background: var(--c);
  color: var(--t) !important;
  font: 800 15px/1 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: 0 4px 0 var(--s);
  cursor: pointer;
  user-select: none;
  transition: filter .12s, transform .08s, box-shadow .08s;
}
:is(.duo-btn, body .primary-button, body .study-profile-actions button):hover:not(:disabled) { filter: brightness(1.07); background: var(--c); }
:is(.duo-btn, body .primary-button, body .study-profile-actions button):active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--s); }
:is(.duo-btn, body .primary-button, body .study-profile-actions button):disabled { --c: var(--line); --s: transparent; --t: var(--faint); cursor: default; box-shadow: none; opacity: 1; }
.duo-btn.blue { --c: var(--blue); --s: var(--blue-shade); }
.duo-btn.red { --c: var(--red); --s: var(--red-shade); }
.duo-btn.white { --c: #fff; --s: rgb(0 0 0 / .16); --t: var(--green-shade); }
.duo-btn.ghost,
body .secondary-button,
body .study-profile-actions .study-profile-switch {
  --c: var(--page);
  --s: var(--line);
  --t: var(--blue);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  padding: 0 20px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--c);
  color: var(--t) !important;
  font: 800 15px/1 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 var(--line);
  cursor: pointer;
  transition: background-color .12s, transform .08s, box-shadow .08s;
}
:is(.duo-btn.ghost, body .secondary-button, body .study-profile-actions .study-profile-switch):hover:not(:disabled) { filter: none; background: var(--soft); border-color: var(--line); }
:is(.duo-btn.ghost, body .secondary-button, body .study-profile-actions .study-profile-switch):active:not(:disabled) { transform: translateY(2px); box-shadow: none; }

.duo-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
}

.duo-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 17px; white-space: nowrap; }
.duo-pill svg { width: 26px; height: 26px; flex: none; }
.duo-pill.flame { color: var(--orange); }
.duo-pill.flame svg { transform-origin: 50% 90%; animation: duo-flicker 1.6s ease-in-out infinite; }
.duo-pill.boot { color: var(--green-ink); }
.duo-pill.known { color: var(--green-ink); }
.duo-pill.idle { color: var(--faint); }
.duo-pill.idle svg { filter: grayscale(1); opacity: .5; animation: none; }

.duo-bar {
  position: relative;
  height: 16px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.duo-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value, 0%);
  min-width: 16px;
  border-radius: inherit;
  background: var(--bar, var(--green));
  transition: width .8s var(--spring), background-color .3s;
}
.duo-bar > span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  right: 8px;
  height: 4px;
  border-radius: 99px;
  background: rgb(255 255 255 / .3);
}
.duo-bar[data-empty] > span { min-width: 0; width: 0; }
.duo-bar.gold { --bar: var(--gold); }

/* ───────── Mascot: Stomp, an original cartoon work boot ───────── */
.mascot { display: inline-block; width: 120px; aspect-ratio: 1; flex: none; }
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot .m-body { transform-box: fill-box; transform-origin: 50% 100%; animation: duo-bob 2.8s ease-in-out infinite; }
.mascot .m-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: duo-blink 5.2s infinite; }
.mascot .m-pupils { transition: transform .18s ease-out; }
.mascot .m-shadow { transform-box: fill-box; transform-origin: center; animation: duo-shadow 2.8s ease-in-out infinite; }
.mascot :is(.m-open, .m-frown, .m-brows) { display: none; }
.mascot[data-mood="happy"] .m-body { animation: duo-jump .75s var(--spring); }
.mascot[data-mood="cheer"] .m-body { animation: duo-jump .9s var(--spring) infinite; }
.mascot:is([data-mood="happy"], [data-mood="cheer"]) .m-smile { display: none; }
.mascot:is([data-mood="happy"], [data-mood="cheer"]) .m-open { display: inline; }
.mascot:is([data-mood="happy"], [data-mood="cheer"]) .m-shadow { animation: duo-shadow-jump .9s var(--spring) infinite; }
.mascot[data-mood="sad"] .m-body { animation: duo-shake .55s ease-in-out; }
.mascot[data-mood="sad"] .m-smile { display: none; }
.mascot[data-mood="sad"] :is(.m-frown, .m-brows) { display: inline; }
.mascot[data-mood="sad"] .m-pupils { transform: translateY(2.5px) !important; }
.mascot:hover .m-body { animation: duo-jump .75s var(--spring); }

.duo-confetti { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
.duo-toast {
  position: fixed;
  left: 50%;
  top: 84px;
  z-index: 90;
  padding: 10px 20px;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 4px 0 var(--orange-shade);
  pointer-events: none;
  translate: -50% 0;
  animation: duo-toast 1.8s var(--spring) forwards;
}

.duo-reveal { opacity: 0; transform: translateY(18px) scale(.97); }
.duo-reveal.is-in { animation: duo-pop-in .55s var(--spring) both; animation-delay: var(--delay, 0ms); }

/* ───────── Right rail widgets ───────── */
.rail-stats { display: flex; justify-content: space-around; align-items: center; min-height: 48px; }
.rail-card { padding: 20px; }
.rail-card h2 { margin: 0; font-size: 20px; }
.rail-card p { margin: 0; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.rail-head a { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.rail-goal { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 14px; }
.rail-goal p { margin-bottom: 8px; color: var(--ink); font-weight: 800; }
.rail-card .rail-learning-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.rail-chest svg { display: block; width: 64px; height: 64px; }
.rail-chest.open svg { animation: duo-wiggle 1.2s var(--spring) infinite; }
.rail-goal .duo-bar { height: 18px; }
.rail-goal .duo-bar b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  mix-blend-mode: multiply;
}
.rail-promo { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 12px; }
.rail-promo .mascot { width: 96px; }
.rail-promo p { margin: 4px 0 14px; color: var(--muted); font-size: 15px; }
.rail-promo .duo-btn { width: 100%; min-height: 46px; padding-inline: 12px; }

/* ───────── Home: unit banner, learning path, model cards ───────── */
body > main > header:not(.study-header) {
  position: relative;
  padding: 22px 26px 20px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--green-shade);
  overflow: hidden;
}
body > main > header:not(.study-header)::before {
  content: "Unit 1 · Bestsellers";
  display: block;
  margin-bottom: 4px;
  color: rgb(255 255 255 / .82);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
body > main > header:not(.study-header)::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgb(255 255 255 / .1);
  box-shadow: -60px 110px 0 -30px rgb(255 255 255 / .07);
  pointer-events: none;
}
body > main > header:not(.study-header) h1 { position: relative; z-index: 1; margin: 0 0 8px; color: #fff; font-size: clamp(24px, 3.4vw, 30px); }
body > main > header:not(.study-header) p { position: relative; z-index: 1; margin: 6px 0 0; color: rgb(255 255 255 / .92); font-size: 15px; font-weight: 700; }
body > main > header:not(.study-header) p:first-of-type { font-size: 17px; font-weight: 800; color: #fff; }
body > main > header:not(.study-header) a { color: #fff; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .5); text-underline-offset: .2em; }
#model-gallery-status { color: var(--muted); font-weight: 800; }

.duo-path { margin: 26px 0 10px; }
.duo-path h2 { margin: 0 0 2px; font-size: 22px; text-align: center; }
.duo-path > p { margin: 0 0 6px; color: var(--muted); text-align: center; font-weight: 700; }
.path-stage { position: relative; }
.path-stage .mascot { position: absolute; right: 2%; top: 38%; width: 130px; }
.path-stage .mascot.left { right: auto; left: 2%; top: 8%; }
.path-list { list-style: none; margin: 0; padding: 24px 0 8px; display: grid; justify-items: center; gap: 28px; }
.path-row { position: relative; width: 100%; display: grid; justify-items: center; }
.path-row > .path-node, .path-row > .path-start { translate: var(--x) 0; }
.path-node {
  --c: var(--green);
  --s: var(--green-shade);
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 6px solid var(--c);
  border-radius: 50%;
  background: var(--s); /* the socket the centre presses into */
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s;
}
/* Progress ring around a boot you've started: an exact circle that stays put when the centre is pressed. */
.path-node::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: conic-gradient(var(--c) var(--ring, 0%), color-mix(in srgb, var(--c) 22%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.path-row[data-state="started"] .path-node::before { opacity: 1; }
/* The boot you're on breathes a soft ring outwards. */
.path-row:has(.path-start) .path-node::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 4px solid var(--c);
  border-radius: 50%;
  pointer-events: none;
  animation: node-pulse 2.2s cubic-bezier(.2, .7, .3, 1) infinite;
}
.path-node:hover { filter: brightness(1.05); }
.path-face {
  display: grid;
  place-items: center;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  transform: translateY(-3px);
  transition: transform .32s var(--spring);
}
.path-node:hover .path-face { transform: translateY(-4px); }
.path-node:active .path-face,
.path-node[aria-expanded="true"] .path-face { transform: translateY(2px); transition: transform .07s ease-out; }
@keyframes node-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.38); opacity: 0; } }
.path-face > img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.path-crop {
  --fit: 104%;
  position: relative;
  display: block;
  overflow: hidden;
  width: calc(var(--fit) * var(--crop-w));
  aspect-ratio: var(--crop-aspect);
  translate: 0 -2px;
}
.path-crop img {
  position: absolute;
  left: var(--image-left);
  top: var(--image-top);
  width: var(--image-width);
  max-width: none;
  height: auto;
  margin: 0;
  mix-blend-mode: multiply;
}
.path-crop[data-matte="grey"] img { filter: url("#footwear-matte-grey"); }
.path-crop[data-matte="white"] img { filter: url("#footwear-matte-white"); }
.path-row[data-state="done"] .path-node { --c: var(--gold); --s: var(--gold-shade); }
.path-row[data-state="locked"] .path-node { --c: var(--line); --s: light-dark(#d0d0d0, #24343c); }
.path-row[data-state="locked"] .path-face img { filter: grayscale(1); opacity: .55; }
.path-row[data-state="locked"] .path-crop[data-matte="grey"] img { filter: url("#footwear-matte-grey") grayscale(1); }
.path-row[data-state="locked"] .path-crop[data-matte="white"] img { filter: url("#footwear-matte-white") grayscale(1); }
.path-row[data-state="done"] .path-node::after {
  content: "";
  position: absolute;
  top: -22px;
  z-index: 1;
  width: 30px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 22'%3E%3Cpath fill='%23ffc800' stroke='%23e5a000' stroke-width='2' stroke-linejoin='round' d='M3 19 1.5 5l7.5 6L15 2l6 9 7.5-6L27 19z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.path-start {
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
  padding: 9px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--page);
  color: var(--green);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: duo-bounce-y 1.6s ease-in-out infinite;
}
.path-start::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 14px;
  height: 14px;
  translate: -50% 0;
  rotate: 45deg;
  background: var(--page);
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.path-pop {
  --c: var(--green);
  --s: var(--green-shade);
  position: absolute;
  z-index: 5;
  top: calc(100% + 18px);
  left: 50%;
  width: min(330px, 92vw);
  padding: 16px;
  border-radius: 16px;
  background: var(--c);
  color: #fff;
  translate: -50% 0;
  animation: duo-pop-in .35s var(--spring) both;
  transform-origin: top center;
}
.path-pop::before {
  content: "";
  position: absolute;
  top: -8px;
  left: calc(50% + var(--x));
  width: 18px;
  height: 18px;
  translate: -50% 0;
  rotate: 45deg;
  border-radius: 3px;
  background: var(--c);
}
.path-row[data-state="done"] .path-pop { --c: var(--gold); --s: var(--gold-shade); color: #4b3b00; }
.path-row[data-state="locked"] .path-pop { --c: var(--soft); color: var(--ink); border: 2px solid var(--line); }
.path-pop h3 { margin: 0 0 2px; color: inherit; font-size: 18px; }
.path-pop p { margin: 0 0 10px; font-weight: 800; opacity: .92; }
.path-pop .duo-bar { margin-bottom: 14px; background: rgb(0 0 0 / .14); }
.path-pop .duo-bar > span { --bar: #fff; }
.path-pop { --pop-ink: var(--s); }
.path-pop .duo-btn { width: 100%; --t: var(--pop-ink); }
.path-row[data-state="locked"] .path-pop .duo-btn { --c: var(--green); --s: var(--green-shade); --t: #fff; }
.path-pop .duo-btn span { opacity: .75; }
.path-actions { display: grid; gap: 10px; }
/* Second choice in the popup: an outlined button in the popup's own colour */
.path-pop .path-practice-all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 16px;
  box-shadow: 0 3px 0 color-mix(in srgb, currentColor 30%, transparent);
  color: inherit !important;
  font: 800 14px/1 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none !important;
  text-align: center;
  transition: background-color .12s, transform .08s, box-shadow .08s;
}
.path-pop .path-practice-all:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.path-pop .path-practice-all:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.path-pop .path-practice-all:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.path-row.open { z-index: 6; }

body > main > details:not(.study-profile) {
  margin: 30px 0 0;
  padding: 0;
  border: 0;
}
body > main > details:not(.study-profile) > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--purple);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 0 var(--purple-shade);
  list-style: none;
  cursor: pointer;
  transition: filter .15s, transform .08s, box-shadow .08s;
}
body > main > details:not(.study-profile):nth-of-type(2n) > summary { background: var(--blue); box-shadow: 0 4px 0 var(--blue-shade); }
body > main > details:not(.study-profile) > summary:active { transform: translateY(4px); box-shadow: none; }
body > main > details:not(.study-profile) > summary:hover { filter: brightness(1.05); }
body > main details > summary::-webkit-details-marker { display: none; }
body > main > details:not(.study-profile) summary span { font-weight: 800; opacity: .8; }
body > main > details:not(.study-profile) > summary::after,
body > main details details > summary::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: auto;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  border-radius: 2px;
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate .3s var(--spring), translate .3s var(--spring);
}
body > main details:not([open], .study-profile) > summary::after { rotate: -45deg; translate: -3px 0; }
body main details details { margin: 18px 0 0; padding: 0; }
body main details details > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 2px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}
body main details details > summary::before { content: ""; flex: 0 0 18px; height: 2px; background: var(--line); }
body main details details > summary::after { width: 10px; height: 10px; border-width: 3px; margin-left: 0; }
body main details details > summary span { margin-left: -6px; }

body .products { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
body .products > .model-card {
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  transition: border-color .2s;
}
body .products > li.flash { animation: duo-flash 1.6s ease-out; }
body .model-card > h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; }
body .model-card .model-photos { max-width: 470px; margin: 4px auto 14px; }
body .model-picture {
  aspect-ratio: 4 / 3;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: light-dark(#ffffff, #f1f1f1);
  box-shadow: 0 3px 0 var(--line);
}
body .model-picture:hover { outline: 0; border-color: var(--blue-line); }
body .rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 6px; color: var(--muted); font-size: 15px; font-weight: 700; }
body .rating strong { color: var(--strong); font-weight: 900; }
body .stars,
body .reviews .stars {
  margin: 0;
  font-size: 20px;
  letter-spacing: .04em;
  background: linear-gradient(90deg, var(--gold) var(--fill), var(--line) var(--fill));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body .memory-specs { margin: 14px 0 0; font-size: 15px; }
body .memory-specs h3,
body .reviews h3 { margin: 0 0 8px; color: var(--faint); font-size: 13px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
body .memory-specs dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; margin: 0 0 12px; }
body .memory-specs dl > div { padding: 8px 12px; border-radius: 12px; background: var(--soft); }
body .memory-specs dt { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
body .memory-specs dd { margin: 0; color: var(--strong); font-weight: 800; line-height: 1.35; }
body .memory-specs p { margin: 8px 0; }
body .memory-specs p:has(> strong) {
  position: relative;
  padding: 12px 14px 12px 50px;
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-weight: 700;
}
body .memory-specs p:has(> strong)::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 26px;
  height: 19px;
  border-radius: 6px;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 19'%3E%3Cpath fill='%23fff' d='M10 5.5v8l7-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body .memory-specs p > strong { color: var(--strong); font-weight: 900; }
body .spec-sources { color: var(--faint); font-size: 13px; }
body .spec-sources a { font-weight: 800; }
body .reviews { margin: 14px 0 0; font-size: 15px; }
body .reviews ul { margin: 0; padding: 0; list-style: none; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
body .reviews li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 10px 14px; color: var(--muted); font-weight: 700; }
body .reviews li + li { border-top: 2px solid var(--line); }
body .reviews li .rating { display: inline-flex; margin: 0; font-size: 14px; }
body .reviews li .stars { font-size: 16px; }

/* ───────── Catalogue galleries ───────── */
body > main > h1 { margin: 0 0 6px; }
body > main > h1 + p { margin: 0; color: var(--muted); font-weight: 700; }
body .controls { margin: 24px 0 12px; }
body .controls label { display: block; margin-bottom: 8px; color: var(--strong); font-size: 13px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
body .controls select {
  appearance: none;
  width: min(100%, 420px);
  min-height: 52px;
  margin: 0;
  padding: 0 48px 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23afafaf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 20px no-repeat;
  box-shadow: 0 2px 0 var(--line);
  color: var(--strong);
  font: 800 16px var(--font);
  cursor: pointer;
}
body .controls select:hover { background-color: var(--soft); }
body #count { color: var(--muted); font-weight: 800; }
body #products { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; align-items: start; }
body #products > li {
  min-width: 0;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  box-shadow: 0 2px 0 var(--line);
  transition: transform .25s var(--spring), border-color .15s;
}
body #products > li:hover { transform: translateY(-4px); border-color: var(--blue-line); box-shadow: 0 4px 0 var(--blue-line); }
body #products h2 { margin: 0 0 10px; font-size: 16px; line-height: 1.3; }
body #products .model-photos { margin: 0; padding: 4px 0 6px; }
body #products .model-photos a {
  display: block;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: light-dark(#ffffff, #f1f1f1);
  box-shadow: 0 3px 0 var(--line);
}
body #products .model-photos a:hover { outline: 0; border-color: var(--blue-line); }
body #products img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; margin: 0; border-radius: 0; background: transparent; transform: scale(1.3); }

/* ───────── Study recap ───────── */
body:not(:has(#study-card)) .study-header { margin: 0 0 22px; }
body:not(:has(#study-card)) .study-header h1 { margin: 0; }
body:not(:has(#study-card)) .study-header::after {
  content: "Tap a boot to see what you’ve nailed and what needs practice.";
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}
body .recap-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
body .recap-panel { padding: 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--page); box-shadow: none; }
body .recap-panel h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 22px; letter-spacing: 0; }
body .recap-panel h2::before { content: ""; width: 34px; height: 34px; flex: none; background: var(--icon) center / contain no-repeat; }
body .recap-panel:first-child h2 { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='.8 1 32 32'%3E%3Cpath fill='%23ff9600' d='M8 3.5h10a2 2 0 0 1 2 2v9.2l6.3 2.1A4.2 4.2 0 0 1 29 20.8V24H6V5.5a2 2 0 0 1 2-2z'/%3E%3Cpath fill='%23ffc800' d='M22.6 15.9l3.7 1.2A4.2 4.2 0 0 1 29 20.8V24h-6.8z'/%3E%3Crect x='4.5' y='23.5' width='26' height='5' rx='2.5' fill='%234b4b4b'/%3E%3C/svg%3E"); }
body .recap-panel:last-child h2 { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='13' fill='%23ce82ff'/%3E%3Cpath d='M12.3 12.4a3.8 3.8 0 1 1 5.6 3.4c-1.2.7-1.9 1.4-1.9 2.7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='16' cy='22.6' r='1.9' fill='%23fff'/%3E%3C/svg%3E"); }
body .recap-status { color: var(--muted); font-weight: 700; }
body #studied-boots { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
body #studied-boots > li + li { border: 0; margin: 0; }
body #studied-boots > li { border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 2px 0 var(--line); overflow: hidden; transition: border-color .15s; }
body #studied-boots > li:has(details[open]) { border-color: var(--blue-line); box-shadow: 0 2px 0 var(--blue-line); }
body #studied-boots summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  list-style: none;
  font-weight: 900;
  cursor: pointer;
}
body #studied-boots summary::-webkit-details-marker { display: none; }
body #studied-boots summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin-left: auto;
  border-right: 3px solid var(--faint);
  border-bottom: 3px solid var(--faint);
  rotate: -45deg;
  transition: rotate .3s var(--spring);
}
body #studied-boots details[open] summary::after { rotate: 45deg; }
body #studied-boots summary:hover { background: var(--soft); }
body #studied-boots summary:hover .boot-name { text-decoration: none; }
body .boot-summary-content { display: flex; align-items: center; gap: 12px; min-width: 0; inline-size: auto; }
body .boot-photos { gap: 0; padding-inline: 14px; }
body .boot-photos > * { margin-inline: -14px; }
body .boot-thumbnail { inline-size: 64px; border-radius: 10px; background: light-dark(#ffffff, #f1f1f1); border: 2px solid var(--line); }
body .boot-name { color: var(--strong); font-size: 17px; }
body .boot-question-results { padding: 4px 16px 16px; border-top: 2px solid var(--line); }
body .boot-question-results section { margin-top: 14px; }
body .boot-question-results h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
body .boot-question-results h3::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--badge) center / 14px no-repeat, var(--badge-bg);
}
body .boot-question-results section:nth-child(1) h3 { color: var(--green-ink); --badge-bg: var(--green); --badge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body .boot-question-results section:nth-child(2) h3 { color: var(--red-ink); --badge-bg: var(--red); --badge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 3.5l7 7M10.5 3.5l-7 7' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
body .boot-question-results section:nth-child(n+3) h3 { color: var(--muted); --badge-bg: var(--faint); --badge: none; }
body .boot-question-results ul,
body #question-groups ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
body .boot-question-results li,
body #question-groups li { padding: 8px 12px; border-radius: 10px; background: var(--soft); color: var(--ink); font-weight: 700; }
body .question-result-note { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 800; }
body #question-groups > * + * { margin-top: 18px; padding-top: 0; border: 0; }
body #question-groups h3 { margin: 0 0 8px; color: var(--purple-shade); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
body #question-groups > section:nth-child(2) h3 { color: var(--gold-shade); }
body #question-groups > section:nth-child(3) h3 { color: var(--red-ink); }

/* ───────── Study profile panel ───────── */
body .study-profile {
  width: 100%;
  margin: 0 0 22px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--line);
  overflow: hidden;
}
body .study-profile summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 12px 16px;
  color: var(--strong);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}
body .study-profile summary::-webkit-details-marker { display: none; }
body .study-profile summary::before {
  content: "";
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 1.5 34 34'%3E%3Ccircle cx='17' cy='13' r='6' fill='%23fff'/%3E%3Cpath d='M6.5 29a10.5 10.5 0 0 1 21 0z' fill='%23fff'/%3E%3C/svg%3E") center / cover no-repeat;
  box-shadow: inset 0 -3px 0 var(--blue-shade);
}
body .study-profile summary:hover { background: var(--soft); }
body .study-profile-current { margin: 0; color: var(--blue); font-size: inherit; font-weight: 900; }
body .study-profile-edit { margin-left: auto; color: var(--blue); font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
body .study-profile-form { display: grid; gap: 10px; margin: 0; padding: 4px 16px 16px; }
body .study-profile-form label { color: var(--strong); font-size: 20px; font-weight: 900; }
body .study-profile-form input,
body .answer-entry input,
body #answer-input {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  color: var(--strong);
  font: 800 18px var(--font);
  outline: none;
  transition: border-color .15s, background-color .15s;
}
:is(body .study-profile-form input, body #answer-input):focus { border-color: var(--blue-line); background: var(--page); }
:is(body .study-profile-form input, body #answer-input)::placeholder { color: var(--faint); font-weight: 700; opacity: 1; }
body .study-profile p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
body .study-profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
body .study-profile-status { padding: 0 16px 14px; }
body .study-profile-status:empty { display: none; }
/* First visit: the site asks for a name in a pop-up card */
body .study-profile[open]:not(:has(.study-profile-current:not([hidden]))) {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 50%;
  width: min(440px, calc(100vw - 32px));
  margin: 0;
  translate: -50% -50%;
  border-color: var(--line);
  box-shadow: 0 4px 0 var(--line), 0 0 0 100vmax rgb(0 0 0 / .45);
  animation: duo-pop-in .5s var(--spring) both;
}
body .study-profile[open]:not(:has(.study-profile-current:not([hidden]))) summary { padding: 18px 18px 6px; cursor: default; }
body .study-profile[open]:not(:has(.study-profile-current:not([hidden]))) summary:hover { background: transparent; }
body .study-profile[open]:not(:has(.study-profile-current:not([hidden]))) .study-profile-form { padding: 6px 18px 18px; }
body .study-profile[open]:not(:has(.study-profile-current:not([hidden]))) .study-profile-form label { font-size: 26px; }
body .study-profile[open]:not(:has(.study-profile-current:not([hidden]))) .study-profile-actions button { flex: 1; }

/* ───────── Lesson screen (flashcards) ───────── */
body:has(#study-card) nav[aria-label="Footwear galleries"] { display: none; }
body:has(#study-card) > main { max-width: 1040px; margin: 0 auto; padding: 0 24px 230px; }
body:has(#study-card) .study-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: block;
  margin: 0;
  padding: 24px 0 8px;
  background: var(--page);
}
body:has(#study-card) .study-header > h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.lesson-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px 16px; }
.lesson-close, .icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--faint) !important;
  cursor: pointer;
  transition: color .15s, background-color .15s, transform .2s var(--spring);
}
.lesson-close svg, .icon-button svg { width: 26px; height: 26px; }
.lesson-close:hover, .icon-button:hover { color: var(--muted) !important; background: var(--soft); }
.lesson-close:active, .icon-button:active { transform: scale(.86); }
.icon-button[aria-pressed="false"] .wave, .icon-button[aria-pressed="true"] .mute { display: none; }
.lesson-progress-wrap { position: relative; }
/* The boot name / "practice all cards" line is left out of the lesson to keep the top compact. */
body .study-header > .study-scope, .lesson-top > .study-scope { display: none !important; }
.lesson-progress { height: 18px; }
.lesson-progress.on-fire > span { background: linear-gradient(90deg, var(--orange), var(--gold)); }
.lesson-progress > span::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .6), transparent);
  transform: translateX(-120%) skewX(-20deg);
}
.lesson-progress.bump > span::before { animation: duo-shine .9s ease-out; }
.combo-label {
  position: absolute;
  left: 4px;
  bottom: calc(100% + 3px);
  margin: 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.combo-label.pop { animation: duo-toast 2.2s var(--spring) forwards; }
.lesson-top .duo-pill { font-size: 18px; }
body:has(#study-card) > main { position: relative; }
body:has(#study-card) .lesson-top { padding-right: 52px; }
body:has(#study-card) .study-profile:not([open]) {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 30;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 99px;
  box-shadow: none;
}
body:has(#study-card) .study-profile:not([open]) summary {
  height: 100%;
  padding: 0;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  font-size: 0;
}
body:has(#study-card) .study-profile:not([open]) summary > * { display: none; }
body:has(#study-card) .study-profile[open]:has(.study-profile-current:not([hidden])) {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 30;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 4px 0 var(--line), 0 18px 40px rgb(0 0 0 / .12);
  animation: duo-pop-in .35s var(--spring) both;
}
body:has(#study-card) .study-counts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  font-variant-numeric: tabular-nums;
}
body:has(#study-card) .study-counts > div { display: flex; align-items: baseline; gap: 6px; padding: 3px 12px; border: 2px solid var(--line); border-radius: 99px; }
body:has(#study-card) .study-counts dt { color: var(--faint); font-size: 12px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
body:has(#study-card) .study-counts dd { margin: 0; font-size: 15px; font-weight: 900; line-height: 1.3; }
body:has(#study-card) .study-counts > div:nth-child(1) dd { color: var(--blue); }
body:has(#study-card) .study-counts > div:nth-child(2) dd { color: var(--purple-shade); }
body:has(#study-card) .study-counts > div:nth-child(3) dd { color: var(--green-ink); }
body:has(#study-card) .study-counts dd span { display: inline-block; }
body:has(#study-card) .study-counts dd span.tick { animation: duo-tile-pop .45s var(--spring); }
body .storage-notice { max-width: 600px; margin: 12px auto 0; padding: 12px 16px; border: 2px solid var(--red); border-radius: 14px; background: var(--red-soft); color: var(--red-ink); font-weight: 800; }

body #study-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 620px;
  min-height: 0;
  margin: 28px auto 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
body #study-card[hidden] { display: none; }
body #study-card .question-panel { display: contents; }
body #study-card #question { order: 1; margin: 0; color: var(--strong); font-size: clamp(24px, 3.6vw, 32px); font-weight: 900; line-height: 1.2; letter-spacing: -.01em; outline: none; }
body #study-card .product {
  order: 2;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body #study-card #answer-form, body #study-card #choices { order: 3; }
.lesson-mascot { width: 124px; margin-bottom: -4px; }
.duo-bubble {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 500px;
  padding: 10px 14px 14px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--page);
}
.duo-bubble::before {
  content: "";
  position: absolute;
  left: -11px;
  bottom: 30px;
  width: 18px;
  height: 18px;
  background: var(--page);
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  border-radius: 0 0 0 4px;
  transform: rotate(45deg);
}
body #study-card .study-photos { margin: 4px 0; }
body #study-card .product-figure { aspect-ratio: 16 / 10; margin: 0; border-radius: 12px; background: transparent; }
body #study-card .product-figure:hover .product-crop { animation: duo-wiggle .6s var(--spring); }
body #study-card .product-name { margin: 6px 0 0; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.3; }
body #study-card .answer-entry { display: block; }
body #study-card .answer-entry input { min-height: 64px; font-size: 20px; }
body #study-card #answer-form[data-result="correct"] #answer-input { border-color: var(--green); background: var(--green-soft); color: var(--green-ink); animation: duo-tile-pop .45s var(--spring); }
body #study-card #answer-form[data-result="incorrect"] #answer-input { border-color: var(--red); background: var(--red-soft); color: var(--red-ink); animation: duo-tile-shake .45s ease-in-out; }

body #choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; counter-reset: choice; }
body #choices button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin: 0;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--page);
  color: var(--ink);
  font: 800 17px/1.3 var(--font);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--line);
  opacity: 1;
  cursor: pointer;
  animation: duo-pop-in .45s var(--spring) both;
  transition: background-color .12s, transform .08s, box-shadow .08s, border-color .12s, color .12s;
}
body #choices button:nth-child(2) { animation-delay: .05s; }
body #choices button:nth-child(3) { animation-delay: .1s; }
body #choices button:nth-child(4) { animation-delay: .15s; }
body #choices button:nth-child(n+5) { animation-delay: .2s; }
body #choices button::before {
  counter-increment: choice;
  content: counter(choice);
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 2px solid var(--line);
  border-radius: 9px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 900;
}
body #choices button:hover:not(:disabled) { background: var(--soft); border-color: var(--line); }
body #choices button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
body #choices button:disabled { cursor: default; opacity: 1; }
body #choices button:disabled:not([data-result]) { color: var(--faint); }
body #choices button[aria-pressed="true"], body #choices button.selected { border-color: var(--blue-line); background: var(--blue-soft); color: var(--blue); box-shadow: 0 2px 0 var(--blue-line); }
body #choices button[data-result="correct"] { border-color: var(--green); background: var(--green-soft); color: var(--green-ink); box-shadow: 0 2px 0 var(--green); text-decoration: none; animation: duo-tile-pop .45s var(--spring); }
body #choices button[data-result="incorrect"] { border-color: var(--red); background: var(--red-soft); color: var(--red-ink); box-shadow: 0 2px 0 var(--red); animation: duo-tile-shake .45s ease-in-out; }
body #choices button[data-result]::before { border-color: currentColor; color: currentColor; }

.lesson-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  border-top: 2px solid var(--line);
  background: var(--page);
  padding-bottom: env(safe-area-inset-bottom);
}
.lesson-footer::before {
  content: "";
  position: absolute;
  inset: -2px 0 0 0;
  z-index: -1;
  background: var(--panel, transparent);
  transform: translateY(102%);
  transition: transform .34s cubic-bezier(.2, .9, .25, 1);
}
.lesson-footer[data-result="correct"] { --panel: var(--green-soft); --accent: var(--green-ink); }
.lesson-footer[data-result="incorrect"] { --panel: var(--red-soft); --accent: var(--red-ink); }
.lesson-footer:is([data-result="correct"], [data-result="incorrect"])::before { transform: none; }
body:has(#empty-state:not([hidden])) .lesson-footer { visibility: hidden; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  max-width: 1040px;
  min-height: 140px;
  margin: 0 auto;
  padding: 22px 40px;
}
.footer-hint { margin: 0; color: var(--faint); font-weight: 800; }
.footer-hint kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border: 2px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; }
.lesson-footer:not([data-result="idle"]) .footer-hint { display: none; }
@media (hover: none) { .key-tip { display: none; } }
.footer-actions { flex: none; display: flex; align-items: center; gap: 12px; margin-left: auto; }
.footer-actions .primary-button { min-width: 150px; }
body:has(#answer-form[hidden]) .footer-actions .check-moved,
body:has(#answer-form[data-kind="rating"]) .footer-actions .check-moved,
.lesson-footer:not([data-result="idle"]) .footer-actions .check-moved { display: none; }

.lesson-footer #feedback {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 18px;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
}
.lesson-footer #feedback[hidden] { display: none; }
.lesson-footer #feedback > :not(.feedback-badge) { grid-column: 2; margin: 0; }
.feedback-badge {
  grid-row: 1 / span 6;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--page);
  color: var(--accent);
  animation: duo-tile-pop .6s var(--spring) .1s both;
}
.feedback-badge svg { width: 44px; height: 44px; }
.lesson-footer[data-result="correct"] .feedback-badge .no,
.lesson-footer[data-result="incorrect"] .feedback-badge .yes { display: none; }
.lesson-footer #feedback-title { color: inherit; font-size: 24px; font-weight: 900; line-height: 1.2; }
.lesson-footer #feedback-answer { font-size: 17px; font-weight: 900; }
.lesson-footer #feedback-note { font-size: 15px; font-weight: 700; }
.lesson-footer .feedback-schedule { color: inherit; font-size: 13px; font-weight: 800; opacity: .75; }
.lesson-footer .feedback-source { display: inline-block; margin: 0; color: inherit !important; font-size: 13px; text-decoration: underline; text-underline-offset: .2em; opacity: .85; }
.lesson-footer #feedback p:empty { display: none; }

.lesson-footer #advance-controls { display: flex; align-items: center; position: static; }
.lesson-footer #advance-controls[hidden] { display: none; }
.lesson-footer #next-card { min-width: 170px; margin: 0; }
.lesson-footer[data-result="incorrect"] #next-card { --c: var(--red); --s: var(--red-shade); }
.lesson-footer #next-card > span { display: none; }

body #empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 40px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
body #empty-state[hidden] { display: none; }
.complete-mascot { width: 170px; }
#empty-state[data-state="loading"] .complete-mascot { width: 120px; }
body #empty-title { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; }
#empty-state[data-state="complete"] #empty-title { color: var(--gold-shade); animation: duo-pop-in .6s var(--spring) both; }
#empty-state[data-state="loading"] #empty-title { color: var(--faint); font-size: 22px; }
body #empty-message { max-width: 460px; margin: 0; color: var(--muted); font-size: 17px; font-weight: 700; }
.complete-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; margin-top: 10px; }
.stat-tile { --tile: var(--gold); overflow: hidden; border: 2px solid var(--tile); border-radius: 16px; background: var(--tile); animation: duo-pop-in .55s var(--spring) both; }
.stat-tile:nth-child(2) { --tile: var(--green); animation-delay: .12s; }
.stat-tile:nth-child(3) { --tile: var(--orange); animation-delay: .24s; }
.stat-tile p { margin: 0; padding: 5px 4px 3px; white-space: nowrap; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.stat-tile strong { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--page); color: var(--tile); font-size: 22px; font-weight: 900; }
.stat-tile svg { width: 22px; height: 22px; }
.complete-actions { display: grid; gap: 12px; width: min(100%, 380px); margin-top: 14px; }
.complete-actions > * { width: 100%; }
.complete-actions > :nth-child(1) { animation: duo-pop-in .5s .3s var(--spring) backwards; }
.complete-actions > :nth-child(2) { animation: duo-pop-in .5s .4s var(--spring) backwards; }
.complete-actions > :nth-child(3) { animation: duo-pop-in .5s .5s var(--spring) backwards; }
#empty-state:not([data-state="complete"]) :is(.complete-stats, .complete-actions) { display: none; }

/* ───────── Colour variants: a fanned stack ─────────
   The first photo sits in front (in the middle when there are three); the other colours tuck in behind,
   slightly smaller and overlapping, so each photo can be bigger. Hover one to bring it forward. */
:is(body #study-card .study-photos, body .model-photos) {
  --w: 64%;
  --k: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  isolation: isolate;
}
:is(body #study-card .study-photos, body .model-photos):has(> :nth-child(2)) { --w: calc(100% / 1.58); --k: .42; }
:is(body #study-card .study-photos, body .model-photos):has(> :nth-child(3)) { --w: calc(100% / 2.16); }
:is(body #study-card .study-photos, body .model-photos):has(> :nth-child(4)) { --w: calc(100% / 2.5); --k: .5; }
/* Cut-out photos in the lesson have no frame, so they can overlap more */
body #study-card .study-photos:has(> :nth-child(2)) { --w: calc(100% / 1.42); --k: .58; }
body #study-card .study-photos:has(> :nth-child(3)) { --w: calc(100% / 1.9); --k: .55; }
body #study-card .study-photos:has(> :nth-child(4)) { --w: calc(100% / 2.2); --k: .6; }
:is(body #study-card .study-photos, body .model-photos) > * {
  flex: 0 0 var(--w);
  width: var(--w);
  max-width: none;
  min-width: 0;
  margin: 0 calc(var(--w) * var(--k) / -2);
}
:is(body #study-card .study-photos, body .model-photos, body .boot-photos) > * {
  position: relative;
  z-index: 5;
  order: 0;
  transform: translateY(var(--y, 0)) scale(var(--s, 1)) rotate(var(--r, 0deg));
  transition: transform .4s var(--spring);
}
:is(body #study-card .study-photos, body .model-photos, body .boot-photos) > :nth-child(2) { order: 1; z-index: 4; --s: .8; --r: 5deg; --y: 4%; }
:is(body #study-card .study-photos, body .model-photos, body .boot-photos) > :nth-child(3) { order: -1; z-index: 4; --s: .8; --r: -5deg; --y: 4%; }
:is(body #study-card .study-photos, body .model-photos, body .boot-photos) > :nth-child(4) { order: 2; z-index: 3; --s: .66; --r: 9deg; --y: 8%; }
:is(body #study-card .study-photos, body .model-photos, body .boot-photos) > :nth-child(n+5) { order: -2; z-index: 3; --s: .66; --r: -9deg; --y: 8%; }
:is(body #study-card .study-photos, body .model-photos) > :hover { z-index: 9; --s: 1.04; --r: 0deg; --y: -2%; }
:is(body #study-card .study-photos, body .model-photos) > :active { --s: .98; }

/* ───────── Motion ───────── */
@keyframes duo-pop-in {
  0% { opacity: 0; transform: translateY(18px) scale(.94); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.015); }
  100% { opacity: 1; transform: none; }
}
@keyframes duo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes duo-shadow { 0%, 100% { transform: scaleX(1); opacity: .09; } 50% { transform: scaleX(.88); opacity: .06; } }
@keyframes duo-shadow-jump { 0%, 100% { transform: scaleX(1); } 45% { transform: scaleX(.6); opacity: .04; } }
@keyframes duo-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes duo-jump {
  0% { transform: none; }
  18% { transform: translateY(0) scale(1.12, .86); }
  45% { transform: translateY(-26px) scale(.94, 1.08) rotate(-4deg); }
  72% { transform: translateY(0) scale(1.1, .9); }
  86% { transform: scale(.97, 1.03); }
  100% { transform: none; }
}
@keyframes duo-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px) rotate(-4deg); }
  40% { transform: translateX(8px) rotate(3deg); }
  60% { transform: translateX(-6px) rotate(-2deg); }
  80% { transform: translateX(4px); }
}
@keyframes duo-tile-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes duo-tile-pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 70% { transform: scale(.98); } 100% { transform: scale(1); } }
@keyframes duo-toast {
  0% { opacity: 0; transform: translateY(14px) scale(.6); }
  18% { opacity: 1; transform: translateY(0) scale(1.08); }
  28% { transform: scale(1); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-16px) scale(.96); }
}
@keyframes duo-bounce-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes duo-flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.06, .96) rotate(-3deg); } 60% { transform: scale(.97, 1.05) rotate(2deg); } }
@keyframes duo-shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(260%) skewX(-20deg); } }
@keyframes duo-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) scale(1.05); } 60% { transform: rotate(5deg) scale(1.05); } }
@keyframes duo-flash { 0%, 100% { border-color: var(--line); box-shadow: none; } 15%, 60% { border-color: var(--blue-line); box-shadow: 0 0 0 6px var(--blue-soft); } }

/* ───────── Responsive ───────── */
@media (max-width: 1180px) {
  .duo-rail { display: none; }
  body:not(:has(#study-card)) { flex-direction: column; align-items: stretch; gap: 0; }
  body:not(:has(#study-card)) > main { flex: none; width: 100%; max-width: 688px; margin-inline: auto; padding-inline: 24px; }
  body:has(#products) > main { max-width: 808px; }
  .duo-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: flex-end;
    gap: 22px;
    padding: 12px 24px;
    border-bottom: 2px solid var(--line);
    background: color-mix(in srgb, var(--page) 92%, transparent);
    backdrop-filter: blur(8px);
  }
}
@media (max-width: 1080px) {
  :root { --sidebar: 88px; }
  body nav[aria-label="Footwear galleries"] { padding-inline: 12px; align-items: center; }
  body nav[aria-label="Footwear galleries"]::before { content: "b"; padding: 6px 0 24px; font-size: 40px; text-align: center; }
  body nav[aria-label="Footwear galleries"] a { font-size: 0; letter-spacing: 0; padding: 6px 10px; justify-content: center; gap: 0; }
}
@media (max-width: 720px) {
  :root { --sidebar: 0px; }
  html { scroll-padding-top: 72px; }
  body nav[aria-label="Footwear galleries"] {
    inset: auto 0 0 0;
    width: auto;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px max(8px, env(safe-area-inset-left), env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom));
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    place-items: center;
    gap: 4px;
    border-right: 0;
    border-top: 2px solid var(--line);
  }
  body nav[aria-label="Footwear galleries"]::before { display: none; }
  body nav[aria-label="Footwear galleries"] a { width: 100%; min-width: 0; max-width: 76px; min-height: 50px; padding: 6px 0; }
  body nav[aria-label="Footwear galleries"] a::before { width: 32px; height: 32px; }
  body:not(:has(#study-card)) > main { padding: 20px 16px 110px; }
  .duo-topbar { justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; }
  .duo-topbar .duo-pill { gap: 3px; font-size: 15px; }
  .duo-topbar .duo-pill svg { width: 22px; height: 22px; }
  .duo-topbar::before { content: "bootcamp"; margin-right: auto; color: var(--green); font: 900 24px/1.25 var(--font); letter-spacing: -.035em; }
  .path-stage .mascot { width: 92px; right: -6px; }
  .path-stage .mascot.left { display: none; }

  body:has(#study-card) > main { padding: 0 16px 300px; }
  body:has(#study-card) .study-header { padding-top: 14px; }
  body:has(#study-card) .study-profile:not([open]) { top: 14px; right: 16px; }
  .lesson-top { gap: 6px 10px; }
  .lesson-mascot { width: 84px; }
  .duo-bubble { padding: 8px 10px 12px; }
  .footer-inner { flex-direction: column; align-items: stretch; min-height: 0; padding: 16px 16px 20px; gap: 14px; }
  .footer-actions, .lesson-footer #advance-controls { width: 100%; margin: 0; }
  .footer-actions > :not([hidden]), .lesson-footer #next-card { flex: 1; }
  .feedback-badge { width: 54px; height: 54px; }
  .feedback-badge svg { width: 32px; height: 32px; }
  .lesson-footer #feedback-title { font-size: 21px; }
  .footer-hint { text-align: center; }
  .complete-stats { gap: 8px; }
  .stat-tile strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .duo-reveal { opacity: 1; transform: none; }
}

/* ───────── Star rating slider (rating cards) ───────── */
body #study-card #answer-form:not([data-kind="rating"]) .star-slider { display: none; }
body #study-card #answer-form[data-kind="rating"] .answer-entry { display: none; }
.star-slider {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--page);
  box-shadow: 0 4px 0 var(--line);
  outline: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.star-slider:focus-visible { border-color: var(--blue-line); box-shadow: 0 4px 0 var(--blue-line); }
.star-row { position: relative; display: flex; gap: 6px; padding: 4px 6px; cursor: pointer; touch-action: none; }
.star { --size: clamp(44px, 13vw, 58px); position: relative; display: block; width: var(--size); height: var(--size); transition: transform .2s var(--spring); }
.star svg { display: block; width: var(--size); height: var(--size); overflow: visible; }
.star-base { filter: drop-shadow(0 3px 0 var(--line)); }
.star-base .star-body { fill: var(--line); stroke: var(--line); }
.star-body { stroke-width: 2.4; stroke-linejoin: round; }
.star-gold { position: absolute; inset: 0 auto -5px 0; width: 0; overflow: hidden; transition: width .12s ease-out; }
.star-gold svg { filter: drop-shadow(0 3px 0 var(--gold-shade)); }
.star-gold .star-body { fill: var(--gold); stroke: var(--gold); }
.star-shine { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; opacity: .6; }
.star[data-fill="half"] .star-gold { width: 50%; }
.star[data-fill="full"] .star-gold { width: 100%; }
.star-slider.previewing .star-gold { opacity: .5; }
.star-slider.dragging .star:not([data-fill="none"]) { transform: scale(1.08); }
.star.pop { animation: star-pop .38s var(--spring); }
.star-row.nudge { animation: duo-tile-shake .45s ease-in-out; }
.star-caption { margin: 0; color: var(--muted); font-size: 15px; font-weight: 800; }
.star-caption.chosen { color: light-dark(#cc8a00, var(--gold)); font-size: 19px; font-weight: 900; }
.star-slider[aria-disabled="true"] .star-row { cursor: default; }
body #study-card #answer-form[data-result="correct"] .star-slider { border-color: var(--green); background: var(--green-soft); box-shadow: 0 4px 0 var(--green); }
body #study-card #answer-form[data-result="correct"] .star:not([data-fill="none"]) { animation: star-cheer .5s var(--spring) both; animation-delay: calc(var(--i) * 70ms); }
body #study-card #answer-form[data-result="incorrect"] .star-slider { border-color: var(--red); background: var(--red-soft); box-shadow: 0 4px 0 var(--red); }
body #study-card #answer-form[data-result="incorrect"] .star-row { animation: duo-tile-shake .45s ease-in-out; }
@keyframes star-pop { 0% { transform: scale(.72); } 55% { transform: scale(1.24) rotate(-8deg); } 100% { transform: scale(1); } }
@keyframes star-cheer { 0%, 100% { transform: none; } 45% { transform: translateY(-9px) scale(1.15) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .star, .star.pop, .star-row.nudge, .star-gold { animation: none !important; transition: none; } }

/* ───────── Study recap: practice buttons under each boot ───────── */
body .boot-practice-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 2px solid var(--line);
  animation: duo-pop-in .35s var(--spring) both;
}
body .boot-practice-actions[hidden] { display: none; }
body .boot-practice-actions > :is(.primary-button, .secondary-button) { width: 100%; min-height: 48px; padding: 0 14px; font-size: 14px; }

/* ───────── Short feedback: just Correct! / Incorrect ─────────
   The footer stays one slim row; the right answer shows on the card (green choice, or the line below). */
.lesson-footer :is(#feedback-answer, #feedback-note, .feedback-schedule, .feedback-source) { display: none !important; }
.lesson-footer #feedback .feedback-badge { grid-row: 1; }
.lesson-footer:not([data-result="idle"]) .footer-inner { min-height: 0; padding-block: 18px; }
.lesson-footer #feedback-title { animation: feedback-title-in .4s var(--spring) both; }
@keyframes feedback-title-in { from { opacity: 0; transform: translateX(-10px) scale(.92); } }
body #study-card #answer-form .answer-reveal {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 2px solid var(--green);
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  animation: duo-pop-in .45s .12s var(--spring) both;
}
body #study-card #answer-form .answer-reveal[hidden] { display: none; }
body #study-card #answer-form .answer-reveal span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
body #study-card #answer-form:has(.answer-reveal:not([hidden])) .star-caption { display: none; }
@media (max-width: 720px) {
  .lesson-footer:not([data-result="idle"]) .footer-inner { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px 16px; }
  .lesson-footer:not([data-result="idle"]) #feedback { flex: 1; column-gap: 12px; }
  .lesson-footer:not([data-result="idle"]) .footer-actions { width: auto; flex: none; }
  .lesson-footer:not([data-result="idle"]) #advance-controls { width: auto; }
  .lesson-footer:not([data-result="idle"]) #next-card { min-width: 128px; }
  .lesson-footer .feedback-badge { width: 46px; height: 46px; }
  .lesson-footer .feedback-badge svg { width: 28px; height: 28px; }
  .lesson-footer #feedback-title { font-size: 22px; }
}
