/* Focal Point Photoclass 2026 · Unit 9: Exploration
   Rebuilt outside Rise. Brand tokens match thefocalpointhub.com. */

:root {
  --mag: #9F217E;
  --mag-deep: #82196a;
  --teal: #5BAAB5;
  --off: #FFFCF6;
  --ink: #1a1a1a;
  --u: 10px;      /* Rise text-size unit: "2rem" in Rise copy = 20px here */
  --pad: 10px;    /* Rise block padding unit */
  --col: 920px;   /* reading column */
  --col-wide: 1000px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}
@media (max-width: 760px) {
  :root { --u: 8.6px; --pad: 7px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: calc(2 * var(--u));
  line-height: 1.9;
  background: var(--mag);
  color: var(--off);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { opacity: .8; }
strong { font-weight: 800; }
button { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--off); outline-offset: 3px; }
.on-light :focus-visible { outline-color: var(--ink); }

/* ---------- blocks ---------- */
.block { width: 100%; padding-left: 20px; padding-right: 20px; }
.on-dark { color: var(--off); }
.on-light { color: #000; }
.wrap { max-width: var(--col); margin: 0 auto; }
.wrap.wide { max-width: var(--col-wide); }
.wrap.narrow { max-width: 600px; }
.wrap.center { text-align: center; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li p { margin: 0; }
.prose em { font-style: italic; }

.t-heading {
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-size: calc(2.4 * var(--u));
}
.t-heading p { margin: 0; }
.t-sub { margin: 0 0 .4em; font-weight: 800; line-height: 1.3; font-size: calc(2.4 * var(--u)); color: var(--teal); }   /* subheaders: teal on dark, magenta on light */
[data-theme="light"] .t-sub { color: var(--mag); }
.t-sub p { margin: 0; }

.bullets { padding-left: 1.2em; margin: 0; }
.bullets li { margin-bottom: .5em; }
.bullets li::marker { color: currentColor; }

/* statement (Rise impact "c") */
.statement { font-size: calc(3.4 * var(--u)); line-height: 1.5; }
@media (max-width: 760px) { .statement p { margin-left: 0 !important; } }

/* note */
.note {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  background: var(--mag); color: var(--off);
  border-radius: 22px; padding: 22px 32px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.note-icon { flex: 0 0 44px; color: #fff; }
.note-icon svg { width: 44px; height: 44px; display: block; }

/* hero image */
.hero { width: 100%; cursor: zoom-in; }

/* Inspire: text + image split */
.split { display: grid; grid-template-columns: 0.8fr 1fr; gap: 40px; align-items: center; }
.split-text { color: #000; line-height: 2; }
.split-img { border-radius: 25px; box-shadow: 0 4px 4px rgba(0,0,0,.25); cursor: zoom-in; width: 100%; aspect-ratio: auto; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* accordion */
.accordion { max-width: 760px; margin: 0 auto; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.acc-item { background: var(--mag-deep); border-bottom: 1px solid rgba(255,255,255,.12); }
.acc-item:last-child { border-bottom: 0; }
.acc-h { margin: 0; }
.acc-btn {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 34px; color: var(--off);
  font-size: calc(1.8 * var(--u)); font-weight: 800; line-height: 1.4;
}
.acc-btn:focus-visible { outline: 3px solid var(--off); outline-offset: -3px; }
.acc-icon { position: relative; width: 14px; height: 14px; flex: 0 0 14px; opacity: .7; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; background: currentColor; left: 0; right: 0; top: 6px; height: 2px; transition: transform .2s; }
.acc-icon::after { transform: rotate(90deg); }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: rotate(0); }
.acc-panel { padding: 4px 34px 30px; color: var(--off); }
.acc-panel img { margin: 0 0 18px; cursor: zoom-in; }
.acc-panel .prose p { margin-bottom: .9em; }

/* Try Something New: starting points */
.pills { list-style: none; margin: 0 auto; padding: 0; max-width: 950px; display: grid; gap: 20px; }
.pills li {
  background: rgba(159,33,126,.49);
  border: 3px solid var(--teal);
  border-radius: 100px;
  box-shadow: 0 4px 4px rgba(0,0,0,.25);
  padding: 36px 64px;
  color: #fff; font-size: calc(2.3 * var(--u)); line-height: 1.5;
}
@media (max-width: 760px) { .pills li { border-radius: 40px; padding: 26px 30px; } }

/* assignment tl;dr */
.tldr {
  background: rgba(255,252,246,.15);
  border: 3px solid var(--teal);
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  padding: 36px 40px;
  color: var(--off);
  font-size: calc(3.2 * var(--u)); line-height: 1.6;
}
.tldr p { margin: 0; }
.tldr ol { margin: 0; padding-left: 1.4em; }
@media (max-width: 760px) { .tldr { font-size: calc(2.4 * var(--u)); padding: 26px 24px; } }

/* process (assignment parts) */
.process { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 30px; }
.proc-track { position: relative; }
.step {
  position: relative; background: #fff; color: #000;
  padding: 50px 40px 46px; box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.step-label {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  background: var(--mag); color: #fff; border-radius: 8px;
  padding: 6px 20px; font-weight: 800; font-size: calc(1.8 * var(--u)); line-height: 1.6; white-space: nowrap;
}
.step-title { margin: 0 0 .7em; font-weight: 800; font-size: calc(2.8 * var(--u)); line-height: 1.3; }
.step .prose li::marker { color: #000; }
.proc-nav {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: #000; color: #fff; display: grid; place-items: center; padding: 0;
}
.proc-nav svg { width: 26px; height: 26px; }
.proc-nav:disabled { background: rgba(0,0,0,.25); cursor: default; }
@media (max-width: 760px) {
  .process { grid-template-columns: 1fr 1fr; gap: 16px; }
  .proc-track { grid-column: 1 / -1; grid-row: 1; }
  .proc-prev { justify-self: start; } .proc-next { justify-self: end; }
  .step { padding: 44px 24px 36px; }
}

/* continue */
.btn-continue {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: #fff; color: var(--mag);
  border: 4px solid var(--mag); border-radius: 20px;
  padding: 16px 40px; font-weight: 800; font-size: 18px; letter-spacing: .06em;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  transition: transform .15s, box-shadow .15s;
}
.btn-continue:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.25); }

.spacer { height: 20px; }


/* ---------- audio ---------- */
.audio { border-bottom: 1px solid currentColor; padding-bottom: 18px; }
.audio-bar { display: flex; align-items: center; gap: 14px; }
.audio button {
  background: none; border: 0; color: inherit; cursor: pointer; padding: 6px;
  font-size: 13px; font-weight: 700; border-radius: 6px;
}
.audio button:hover { background: rgba(255,255,255,.15); }
.on-light .audio button:hover { background: rgba(0,0,0,.08); }
.audio-play svg { width: 24px; height: 24px; fill: currentColor; display: block; }
.audio-play .i-pause { display: none; }
.audio.playing .i-pause { display: block; }
.audio.playing .i-play { display: none; }
.audio-seek { flex: 1; accent-color: currentColor; min-width: 60px; }
.audio-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; }
.audio-caption { font-size: 14px; margin: 6px 0 0; }
.audio-transcript {
  margin-top: 16px; max-height: 320px; overflow: auto;
  font-size: 15px; line-height: 1.7;
  background: rgba(255,255,255,.12); border-radius: 10px; padding: 18px 20px;
}
.on-light .audio-transcript { background: rgba(255,255,255,.35); }

/* ---------- constraint generator ---------- */
.cg { color: #1A1A1A; padding: 20px 0; }
.cg-intro { font-size: 20px; line-height: 1.6; margin-bottom: 36px; max-width: 700px; }
.cg-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.cg-left, .cg-right { display: flex; flex-direction: column; gap: 16px; }
.cg-card {
  background: rgba(255,252,246,.22); border-radius: 8px; padding: 36px 32px;
  min-height: 200px; display: flex; flex-direction: column; justify-content: center;
}
.cg-card-label { font-size: 13px; font-weight: 700; opacity: .6; margin-bottom: 14px; }
.cg-text, .cg-empty { font-size: 20px; line-height: 1.6; margin: 0; transition: opacity .18s ease, transform .18s ease; }
.cg-text.fade-out { opacity: 0; transform: translateY(-5px); }
.cg-empty { opacity: .4; }
.cg-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cg-primary {
  background: var(--mag); color: var(--off); border: 0; border-radius: 6px;
  padding: 14px 28px; font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .15s;
}
.cg-primary:hover { opacity: .88; }
.cg-primary:active { transform: scale(.97); }
.cg-secondary {
  background: transparent; border: 1.5px solid rgba(26,26,26,.3); border-radius: 6px;
  padding: 13px 24px; font-size: 15px; color: #1A1A1A; cursor: pointer;
}
.cg-secondary:hover { border-color: rgba(26,26,26,.6); }
.cg-count { font-size: 20px; opacity: .5; margin: 0; }
.cg-saved-empty {
  background: rgba(255,252,246,.12); border-radius: 8px; padding: 36px 32px; min-height: 200px;
  display: flex; align-items: center;
}
.cg-saved-empty p { font-size: 20px; opacity: .35; margin: 0; }
.cg-saved { display: flex; flex-direction: column; gap: 8px; }
.cg-item {
  background: rgba(255,252,246,.22); border-radius: 6px; padding: 18px 20px;
  font-size: 20px; line-height: 1.6; display: flex; gap: 14px; align-items: flex-start;
  animation: cgIn .2s ease;
}
.cg-num {
  font-size: 11px; font-weight: 700; color: var(--off); background: var(--mag);
  border-radius: 3px; padding: 3px 8px; flex-shrink: 0; margin-top: 6px; line-height: 1.4;
}
.cg-download { width: 100%; }
@keyframes cgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .cg-layout { grid-template-columns: 1fr; } }

/* ---------- lesson menu ---------- */
.menu-toggle {
  position: fixed; left: 20px; bottom: 20px; z-index: 265;   /* bottom left, beside the theme toggle; stays above the open menu so it also closes it */
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--off);
  display: grid; place-items: center; padding: 0; box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.menu-toggle svg { width: 18px; height: 18px; }
.menu {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 260; width: 300px; max-width: 85vw;   /* above the site header (200) on the hub */
  background: #1a0a24; color: var(--off); padding: 28px 24px 84px; overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.1);
}
.menu-head { font-weight: 800; font-size: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.menu-list { list-style: none; margin: 8px 0 0; padding: 0; }
.menu-list a {
  display: flex; gap: 12px; align-items: baseline; padding: 12px 8px; border-radius: 8px;
  text-decoration: none; color: rgba(255,252,246,.75); font-weight: 600; font-size: 15px; line-height: 1.4;
}
.menu-list a:hover { background: rgba(255,255,255,.07); color: var(--off); opacity: 1; }
.menu-list a[aria-current="page"] { color: var(--off); background: rgba(159,33,126,.45); }
.menu-list a { align-items: center; }
.menu-ring { width: 20px; height: 20px; flex: 0 0 20px; transform: rotate(-90deg); }
.menu-ring circle { fill: none; stroke-width: 3; }
.ring-track { stroke: rgba(255,252,246,.18); }
.ring-fill { stroke: var(--teal); stroke-linecap: round; stroke-dasharray: 50.27; stroke-dashoffset: 50.27; transition: stroke-dashoffset .3s ease; }
.menu-scrim { position: fixed; inset: 0; z-index: 255; background: rgba(0,0,0,.5); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 280; background: rgba(10,4,14,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff;
  font-size: 40px; line-height: 1; cursor: pointer;
}

/* ---------- entrance ---------- */
.js .block > * { transition: opacity .6s ease, transform .6s ease; }
.js .block.pre > * { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .block > *, .js .block.pre > * { transition: none; opacity: 1; transform: none; }
}


/* Ko-fi donation */
.donate { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.donate-text p { margin: 0; }
.donate-title { font-weight: 800; }
.donate-btn {
  flex: 0 0 auto; min-width: 160px; text-align: center; text-decoration: none;
  background: #fff; color: var(--teal); border: 2px solid var(--teal); border-radius: 99px;
  padding: 10px 40px; font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0,0,0,.2); transition: transform .15s, box-shadow .15s;
}
.donate-btn:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.25); }
@media (max-width: 760px) { .donate { flex-direction: column; align-items: flex-start; gap: 20px; } }


/* floating audio player */
.audio-dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: flex; align-items: center; gap: 4px;
  background: rgba(40,15,55,.72); color: var(--off);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 99px;
  padding: 4px 8px 4px 4px; box-shadow: 0 6px 20px rgba(0,0,0,.3);
  animation: dockIn .25s ease;
}
.audio-dock[hidden] { display: none; }
.audio-dock button { background: none; border: 0; color: inherit; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 700; padding: 4px; border-radius: 99px; }
.dock-play { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; background: var(--mag) !important; }
.dock-play svg { width: 15px; height: 15px; fill: currentColor; }
.dock-play .i-pause { display: none; }
.audio-dock.playing .i-pause { display: block; }
.audio-dock.playing .i-play { display: none; }
@keyframes dockIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .audio-dock { animation: none; } }

/* =====================================================================
   DARK THEME
   Near-black ground, teal-to-magenta gradients used as outlines, lines,
   accents and heading text. The gradients drift slowly; motion stops for
   anyone who has reduced motion turned on.
   ===================================================================== */
:root {
  --ground: #0e0618;
  --box: #170b22;
  --box-2: #1d0d2b;
  --ow: 2px;                                   /* outline width */
  --grad: linear-gradient(135deg, #5BAAB5, #9F217E, #5BAAB5);
  --grad-h: linear-gradient(90deg, #5BAAB5, #9F217E, #5BAAB5);
  --grad-text: linear-gradient(90deg, #5BAAB5, #C2389C, #5BAAB5); /* lighter magenta so text stays readable */
  --hairline: rgba(255,252,246,.12);
}
@keyframes fpShift  { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }
@keyframes fpShift1 { from { background-position: 0% 50%; }      to { background-position: 100% 50%; } }

html, body { background: var(--ground); }
body { color: var(--off); }
.on-dark, .on-light, .split-text, .step, .cg, .tldr, .note { color: var(--off); }

/* shared looks */
.note, .pills li, .cg-card, .step, .tldr, .b-statement:not(.b-journal) .statement,
.btn-continue, .donate-btn, .menu-toggle, .audio-dock, .acc-item:has(.acc-btn[aria-expanded="true"]) {
  border: var(--ow) solid transparent;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%;
  animation: fpShift 6s ease-in-out infinite alternate;
}
.hero, .split-img {
  border: var(--ow) solid transparent;
  background: var(--grad) border-box;
  background-size: 200% 200%;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.cg-primary, .proc-nav:not(:disabled), .audio-play, .dock-play, .cg-num, .step-label {
  background: var(--grad) !important;
  background-size: 200% 200% !important;
  animation: fpShift1 6s ease-in-out infinite alternate;
  color: var(--off);
}

/* headings: gradient text with a line the full width of the heading */
.t-heading {
  display: table; margin: 0 auto; padding-bottom: 14px; position: relative;
  background: var(--grad-text); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
/* the rule under a heading is the same length on every heading, wider than the text, and fades out at both ends */
.t-heading::after {
  content: ""; position: absolute; left: 50%; bottom: 0; height: 3px; border-radius: 3px;
  width: min(calc(var(--col-wide) + 240px), calc(100vw - 24px)); transform: translateX(-50%);
  background: var(--grad-h); background-size: 200% 200%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  animation: fpShift1 6s ease-in-out infinite alternate;
}

/* accent words in statements */
.accent {
  font-weight: 800;
  background: var(--grad-text); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.statement .accent strong { color: transparent; }

/* statement callouts */
.b-statement:not(.b-journal) .statement { border-radius: 28px; padding: 44px 52px; }
.b-statement:not(.b-journal) .statement p { margin-left: 0 !important; }
@media (max-width: 760px) { .b-statement:not(.b-journal) .statement { padding: 28px 26px; } }

/* full-width gradient divider lines */
.b-audio, .b-donate { position: relative; }
.b-audio .audio { border-bottom: 0; }
.b-audio::after, .b-donate::before {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: var(--grad-h); background-size: 200% 200%;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.b-audio::after { bottom: 0; }
.b-donate::before { top: 0; }

/* audio */
.audio-seek { accent-color: var(--teal); }
.audio button:hover, .on-light .audio button:hover { background: rgba(255,252,246,.08); }
.audio-play { border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; }
.audio-transcript, .on-light .audio-transcript { background: var(--box); border: 1px solid var(--hairline); }

/* note */
.note { box-shadow: none; }
.note-icon { color: var(--teal); }

/* images inside accordions */
.acc-panel img { border-radius: 10px; }

/* accordion: separate rounded rows, the open one gets the gradient outline */
.accordion { display: flex; flex-direction: column; gap: 10px; box-shadow: none; }
.acc-item { background: var(--box); border: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; }
.acc-item:last-child { border-bottom: 1px solid var(--hairline); }
.acc-item:has(.acc-btn[aria-expanded="true"]) { background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box; background-size: 100% 100%, 200% 200%; }
.acc-btn { padding: 18px 28px; }
.acc-icon { color: var(--teal); opacity: 1; }
.acc-panel { padding: 0 28px 28px; }

/* starting-point pills */
.pills li { box-shadow: none; color: var(--off); border-radius: 999px; }
@media (max-width: 760px) { .pills li { border-radius: 36px; } }

/* constraint generator */
.cg { color: var(--off); }
.cg-card { border-radius: 14px; background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box; background-size: 100% 100%, 200% 200%; }
.cg-card-label, .cg-empty, .cg-count { color: var(--off); }
.cg-secondary { color: var(--off); border-color: rgba(255,252,246,.3); }
.cg-secondary:hover { border-color: rgba(255,252,246,.6); }
.cg-saved-empty { background: var(--box); border: 1px solid var(--hairline); }
.cg-saved-empty p { color: var(--off); opacity: .45; }
.cg-item { background: var(--box); border: 1px solid var(--hairline); color: var(--off); }
.cg-primary { border-radius: 10px; }

/* assignment parts */
.step { border-radius: 20px; box-shadow: none; background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box; background-size: 100% 100%, 200% 200%; }
.step .prose li::marker { color: var(--off); }
.proc-nav { color: var(--off); }
.proc-nav:disabled { background: var(--box); border: 1px solid var(--hairline); color: rgba(255,252,246,.35); }

/* tl;dr */
.tldr { box-shadow: none; }

/* continue + Ko-fi */
.btn-continue { color: var(--off); border-radius: 18px; box-shadow: none; }
.btn-continue:hover { box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.donate-btn { color: var(--off); background: linear-gradient(var(--ground), var(--ground)) padding-box, var(--grad-h) border-box; background-size: 100% 100%, 200% 200%; }

/* chrome */
.menu-toggle { border-radius: 50%; border-width: 1px; }   /* matches the theme toggle beside it */
.menu { background: #120819; }
.audio-dock { box-shadow: 0 8px 24px rgba(0,0,0,.5); border-width: 1px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* links in course copy: moving gradient text, gradient-tinted underline */
.prose a, .statement a, .split-text a, .tldr a, .note a {
  font-weight: 700;
  background: var(--grad-text); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: underline; text-decoration-color: #C2389C; text-underline-offset: 3px;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.prose a:hover, .statement a:hover, .split-text a:hover, .tldr a:hover, .note a:hover { opacity: 1; text-decoration-color: var(--teal); }

/* ---------- theme toggle (bottom left) ---------- */
.theme-toggle {
  position: fixed; left: 70px; bottom: 20px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--off);
  border: 1px solid transparent;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%;
  animation: fpShift 6s ease-in-out infinite alternate;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* =====================================================================
   LIGHT THEME (learner opt-in via the toggle)
   Off-white ground, white boxes, same gradient outlines. Gradient text uses a
   darker teal so it stays readable on light; links are magenta.
   ===================================================================== */
[data-theme="light"] {
  --ground: #FFFCF6;
  --box: #FFFFFF;
  --box-2: #FBF5F9;
  --off: #1A1220;                 /* body text colour in light mode */
  --grad-text: linear-gradient(90deg, #2E7F8A, #9F217E, #2E7F8A);
  --hairline: rgba(26,18,32,.12);
}
[data-theme="light"] .cg-primary, [data-theme="light"] .proc-nav:not(:disabled), [data-theme="light"] .audio-play,
[data-theme="light"] .dock-play, [data-theme="light"] .cg-num, [data-theme="light"] .step-label { color: #fff; }
[data-theme="light"] .b-statement:not(.b-journal) .statement, [data-theme="light"] .step,
[data-theme="light"] .tldr, [data-theme="light"] .btn-continue { box-shadow: 0 10px 30px rgba(159,33,126,.08); }
[data-theme="light"] .btn-continue { color: var(--mag); }
[data-theme="light"] .note-icon { color: #2E7F8A; }
[data-theme="light"] .acc-icon { color: var(--mag); }
[data-theme="light"] .audio button:hover { background: rgba(26,18,32,.06); }
[data-theme="light"] .cg-secondary { border-color: rgba(26,18,32,.3); }
[data-theme="light"] .cg-secondary:hover { border-color: rgba(26,18,32,.6); }
[data-theme="light"] .proc-nav:disabled { color: rgba(26,18,32,.3); }
[data-theme="light"] .audio-dock, [data-theme="light"] .theme-toggle { box-shadow: 0 8px 24px rgba(26,18,32,.15); }
[data-theme="light"] .menu { background: #FFFFFF; border-right-color: var(--hairline); }
[data-theme="light"] .menu-head { border-bottom-color: var(--hairline); }
[data-theme="light"] .menu-list a { color: rgba(26,18,32,.7); }
[data-theme="light"] .menu-list a:hover { background: rgba(26,18,32,.05); color: var(--off); }
[data-theme="light"] .menu-list a[aria-current="page"] { background: rgba(159,33,126,.1); color: var(--off); }
[data-theme="light"] .ring-track { stroke: rgba(26,18,32,.15); }
[data-theme="light"] .menu-scrim { background: rgba(26,18,32,.3); }
[data-theme="light"] .prose a, [data-theme="light"] .statement a, [data-theme="light"] .split-text a,
[data-theme="light"] .tldr a, [data-theme="light"] .note a {
  background: none; color: var(--mag); text-decoration-color: var(--mag); animation: none;
}
[data-theme="light"] .prose a:hover, [data-theme="light"] .statement a:hover, [data-theme="light"] .split-text a:hover,
[data-theme="light"] .tldr a:hover, [data-theme="light"] .note a:hover { color: #7a1860; text-decoration-color: #7a1860; }

/* =====================================================================
   Components added for Getting Started (shared by every unit)
   ===================================================================== */
/* button stack: text on the left, outlined link button on the right */
.link-rows { display: flex; flex-direction: column; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--hairline); }
.link-row:first-child { padding-top: 0; }
.link-row:last-child { border-bottom: 0; padding-bottom: 0; }
.link-btn {
  flex: 0 0 auto; min-width: 180px; text-align: center; text-decoration: none; color: var(--off);
  border: var(--ow) solid transparent; border-radius: 99px;
  background: linear-gradient(var(--ground), var(--ground)) padding-box, var(--grad-h) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
  padding: 10px 28px; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  transition: transform .15s;
}
.link-btn:hover { opacity: 1; transform: translateY(-2px); }
@media (max-width: 760px) { .link-row { flex-direction: column; align-items: flex-start; gap: 16px; } }

/* image gallery (2/3/4 columns) */
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 28px; align-items: start; }
.gallery-item { margin: 0; }
.gallery-item img {
  width: 100%; cursor: zoom-in; border-radius: 16px;
  border: var(--ow) solid transparent; background: var(--grad) border-box; background-size: 200% 200%;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.gallery-item figcaption { margin-top: 14px; font-size: 16px; line-height: 1.7; }
.gallery-item figcaption p { margin-bottom: .6em; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* side-by-side header/body cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  border: var(--ow) solid transparent; border-radius: 20px; padding: 28px 30px;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.card-title {
  margin: 0 0 10px; font-size: calc(2.4 * var(--u)); font-weight: 800; line-height: 1.3;
  background: var(--grad-text); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fpShift1 6s ease-in-out infinite alternate;
}

/* dialogue bubbles, alternating sides */
.dialogue { display: flex; flex-direction: column; gap: 18px; }
.bubble {
  max-width: 78%; border: var(--ow) solid transparent; border-radius: 24px; padding: 22px 30px;
  font-size: calc(2.2 * var(--u)); line-height: 1.6;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.bubble p { margin: 0; }
.bubble:nth-child(odd) { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble:nth-child(even) { align-self: flex-end; border-bottom-right-radius: 6px; }
@media (max-width: 760px) { .bubble { max-width: 92%; } }

/* embedded videos */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.video p { margin: 14px 0 0; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  border: var(--ow) solid transparent; background: var(--grad) border-box; background-size: 200% 200%;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 14px; }

[data-theme="light"] .card, [data-theme="light"] .bubble { box-shadow: 0 10px 30px rgba(159,33,126,.08); }

/* ---------- fixes found on Getting Started ---------- */
/* transparent PNGs: keep the gradient on the frame only, the ground shows through inside */
.hero, .split-img {
  background: linear-gradient(var(--ground), var(--ground)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%;
  animation: fpShift 6s ease-in-out infinite alternate;
}
/* gallery images (usually cut-out portraits) sit without a frame */
.gallery-item img { border: 0; background: none; border-radius: 0; animation: none; }
/* room for the "Part 1" tab when the block above sits close */
.b-process .process { margin-top: 28px; }

/* cut-out images (transparent background, marked "floating" by the converter): no frame */
img.floating, .hero.floating, .split-img.floating {
  border: 0; background: none; border-radius: 0; box-shadow: none; animation: none;
}

/* ---------- accent words: bold text inside boxed callouts ----------
   Dark: moving gradient. Light: solid magenta (same as links). */
.tldr strong, .note strong, .bubble strong, .card .prose strong, .statement strong {
  font-weight: 800;
  background: var(--grad-text); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
[data-theme="light"] .accent, [data-theme="light"] .accent strong,
[data-theme="light"] .tldr strong, [data-theme="light"] .note strong, [data-theme="light"] .bubble strong,
[data-theme="light"] .card .prose strong, [data-theme="light"] .statement strong {
  background: none; color: var(--mag); animation: none;
}

/* light mode: outlined buttons use magenta text */
[data-theme="light"] .link-btn, [data-theme="light"] .donate-btn, [data-theme="light"] .btn-continue { color: var(--mag); }

/* assignment parts: a sliding strip. Both cards move together inside a clipped frame,
   one ease for the whole move, and the frame's height glides to fit the new card. */
.proc-track {
  display: grid; overflow: hidden; overflow: clip;
  padding: 20px 0 6px;                   /* room for the "Part N" tab inside the clip */
  transition: height .52s cubic-bezier(.65, 0, .35, 1);
}
.proc-track > .step { grid-area: 1 / 1; align-self: start; }
.step.slide-in-r  { animation: stepSlideInR  .52s cubic-bezier(.65, 0, .35, 1) both; }
.step.slide-in-l  { animation: stepSlideInL  .52s cubic-bezier(.65, 0, .35, 1) both; }
.step.slide-out-l { animation: stepSlideOutL .52s cubic-bezier(.65, 0, .35, 1) both; pointer-events: none; }
.step.slide-out-r { animation: stepSlideOutR .52s cubic-bezier(.65, 0, .35, 1) both; pointer-events: none; }
@keyframes stepSlideInR  { from { transform: translateX(calc(100% + 48px)); } to { transform: none; } }
@keyframes stepSlideInL  { from { transform: translateX(calc(-100% - 48px)); } to { transform: none; } }
@keyframes stepSlideOutL { from { transform: none; } to { transform: translateX(calc(-100% - 48px)); } }
@keyframes stepSlideOutR { from { transform: none; } to { transform: translateX(calc(100% + 48px)); } }
@media (prefers-reduced-motion: reduce) { .proc-track { transition: none; } }
[data-theme="light"] .proc-track { padding-bottom: 34px; margin-bottom: -28px; }   /* keep the soft shadow inside the clip */

/* =====================================================================
   Components added for Unit 1 (shared by every unit)
   ===================================================================== */

/* ---------- custom-canvas layouts (rows / columns) ---------- */
.mflow { display: flex; flex-direction: column; gap: 32px; }
.mrow { display: grid; grid-template-columns: var(--cols, 1fr); gap: 32px; align-items: center; }
.mrow:not(:has(.mfig)) { align-items: start; }
.mcols { display: grid; grid-template-columns: var(--cols, 1fr); gap: 32px; align-items: start; }
.mcol { display: flex; flex-direction: column; gap: 28px; }
.mtext.panel {
  border: var(--ow) solid transparent; border-radius: 20px; padding: 28px 32px;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.mtext .prose p:last-child { margin-bottom: 0; }
.mfig { margin: 0; }
.mfig .hero { width: 100%; }
.mfig figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; text-align: center; opacity: .8; }
.mcaps { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
.tldr .card-title { margin-bottom: 8px; }
@media (max-width: 760px) {
  .mrow, .mcols { grid-template-columns: 1fr; }
  .mcaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- single video ---------- */
.videos.single { grid-template-columns: 1fr; }

/* ---------- image beside text ---------- */
.split.img-left { grid-template-columns: 1fr 0.8fr; }
.split.img-left .split-img { order: -1; }
@media (max-width: 760px) { .split.img-left { grid-template-columns: 1fr; } }

/* ---------- labeled graphic ---------- */
.lg-stage { position: relative; overflow: hidden; border-radius: 16px; }
.lg-img { display: block; }
.lg-dot {
  position: absolute; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: var(--grad) !important; background-size: 200% 200% !important; animation: fpShift1 6s ease-in-out infinite alternate;
  box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 4px 14px rgba(0,0,0,.35);
}
.lg-dot:hover { box-shadow: 0 0 0 6px rgba(255,255,255,.45), 0 4px 14px rgba(0,0,0,.35); }
/* unvisited dots pulse to draw the eye: two rings ripple out from the dot. The pulse stops once a dot has been opened. */
.lg-dot::before, .lg-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
  border: 3px solid #fff; opacity: 0; animation: lgRipple 2.2s ease-out infinite;
}
.lg-dot::after { border-color: #C2389C; animation-delay: 1.1s; }
.lg-dot.seen::before, .lg-dot.seen::after, .lg-dot[aria-expanded="true"]::before, .lg-dot[aria-expanded="true"]::after { animation: none; opacity: 0; }
@keyframes lgRipple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.3); opacity: 0; } }
/* reduced motion: no ripple, just a soft glow that breathes */
@keyframes lgGlow { 0%, 100% { opacity: 0; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: reduce) {
  .lg-dot::before { animation: lgGlow 2.4s ease-in-out infinite; transform: scale(1.35); }
  .lg-dot::after { display: none; }
}
.lg-plus { position: relative; width: 14px; height: 14px; }
.lg-plus::before, .lg-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.lg-plus::after { transform: rotate(90deg); }
.lg-dot[aria-expanded="true"] .lg-plus { transform: rotate(45deg); }
/* visited: once a note has been opened its dot goes dark with a gradient ring and a tick */
.lg-dot.seen:not([aria-expanded="true"]) {
  background: linear-gradient(rgba(23,11,34,.85), rgba(23,11,34,.85)) padding-box, var(--grad) border-box !important;
  border: 2px solid transparent; box-shadow: 0 0 0 3px rgba(255,255,255,.22), 0 2px 10px rgba(0,0,0,.35);
}
.lg-dot.seen:not([aria-expanded="true"]):hover { box-shadow: 0 0 0 4px rgba(255,255,255,.3), 0 2px 10px rgba(0,0,0,.35); }
.lg-dot.seen:not([aria-expanded="true"]) .lg-plus::before { left: 1px; right: auto; width: 6px; top: 8px; transform: rotate(45deg); }
.lg-dot.seen:not([aria-expanded="true"]) .lg-plus::after { left: 4px; right: auto; width: 11px; top: 6px; transform: rotate(-50deg); }
.lg { position: relative; }
/* the note opens beside its dot (unit.js places it); below the image if scripts are off */
.lg-panels { position: static; }
.lg-panel {
  position: absolute; z-index: 6; width: min(380px, 46%); box-shadow: 0 12px 34px rgba(0,0,0,.45);
  border: var(--ow) solid transparent; border-radius: 18px; padding: 20px 24px;
  background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
@media (max-width: 760px) { .lg-dot { width: 28px; height: 28px; } }

/* ---------- tabs: a boxed panel with the tabs as blocks across its full top edge ---------- */
.tabs {
  border: var(--ow) solid transparent; border-radius: 18px; overflow: hidden;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.tab-list { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--hairline); }
.tab-list [role="tab"] {
  background: var(--box-2); border: 0; border-left: 1px solid var(--hairline); color: var(--off); cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1.3; padding: 18px 14px; text-align: center;
  transition: background-color .2s, color .2s;
}
.tab-list [role="tab"]:first-child { border-left: 0; }
.tab-list [role="tab"]:hover { background: color-mix(in srgb, var(--box-2) 80%, var(--mag)); }
.tab-list [role="tab"][aria-selected="true"] {
  color: #fff; background: var(--grad); background-size: 200% 200%; animation: fpShift1 6s ease-in-out infinite alternate;
}
.tab-list [role="tab"]:focus { outline: none; }
.tab-list [role="tab"]:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }
.tab-panel { padding: 26px 32px 30px; }
.tab-panel ul { padding-left: 1.3em; }
@media (max-width: 560px) { .tab-list [role="tab"] { font-size: 14px; padding: 14px 8px; } .tab-panel { padding: 22px 20px; } }

/* ---------- Storyline embeds ---------- */
.storyline-frame {
  position: relative; border-radius: 16px; overflow: hidden;
  border: var(--ow) solid transparent; background: var(--grad) border-box; background-size: 200% 200%;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
.storyline-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; border-radius: 14px; }

/* ---------- questions (knowledge check, check-in) ---------- */
.quiz-stem { margin-bottom: 16px; }
.quiz-options { border: 0; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 18px; background: var(--box);
  transition: border-color .15s;
}
.quiz-opt:hover { border-color: var(--teal); }
.quiz-opt input { margin-top: 6px; accent-color: var(--mag); width: 18px; height: 18px; flex: 0 0 18px; }
.quiz-opt .prose p { margin: 0; }
.quiz-opt:has(input:checked) { border-color: var(--mag); }
.quiz-opt.ok { border: 2px solid var(--teal); }
.quiz-opt.no { border: 2px solid var(--mag); opacity: .85; }
.quiz-opt.missed { border: 2px dashed var(--teal); }
.quiz-match { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.quiz-match-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: center; border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 16px; background: var(--box); }
.quiz-match-row label { font-weight: 800; }
.quiz-match-row select {
  font: inherit; font-size: 16px; color: var(--off); background: var(--box-2); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 10px 12px; width: 100%;
}
.quiz-match-row select.ok { border: 2px solid var(--teal); }
.quiz-match-row select.no { border: 2px solid var(--mag); }
@media (max-width: 560px) { .quiz-match-row { grid-template-columns: 1fr; } }
.quiz-submit, .check-submit { margin-top: 4px; }
.quiz-submit:disabled, .check-submit:disabled { opacity: .45; cursor: default; }
.quiz-feedback, .check-fb {
  margin-top: 18px; border-radius: 14px; padding: 16px 20px; background: var(--box-2); border: 1px solid var(--hairline);
}
.quiz-verdict { margin: 0 0 6px; font-weight: 800; color: #E06AB8; }
.quiz-feedback.is-right .quiz-verdict { color: #8fd0d9; }
[data-theme="light"] .quiz-verdict { color: var(--mag); }
[data-theme="light"] .quiz-feedback.is-right .quiz-verdict { color: #2E7F8A; }
.quiz-next { margin-top: 18px; }
.quiz-count { text-align: center; opacity: .75; font-size: 14px; margin: 18px 0 0; }
.quiz-result { text-align: center; margin-top: 24px; }
.quiz-result .card-title { font-size: calc(3 * var(--u)); }
.quiz-cont { margin-top: 28px; }
.b-quiz .t-heading { margin-bottom: 8px; }
button.btn-continue { font-family: inherit; cursor: pointer; }

/* ---------- reflection ---------- */
.refl-q { margin-bottom: 18px; }
.refl-q label { display: block; }
.refl textarea {
  width: 100%; font: inherit; font-size: 17px; line-height: 1.6; color: var(--off); background: var(--box-2);
  border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; resize: vertical;
}
.refl textarea:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.refl-download { width: 100%; }

/* ---------- image hotspot question ---------- */
.hs-stage { position: relative; cursor: crosshair; margin: 8px 0 14px; }
.hs-stage img { width: 100%; border-radius: 12px; }
.hs-mark { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%); pointer-events: none; animation: hsPop .25s ease-out; }
.hs-mark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
@keyframes hsPop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.hs-fb:empty { display: none; }
.hs-fb, .hs-done { border-radius: 14px; padding: 14px 18px; background: var(--box-2); border: 1px solid var(--hairline); margin-top: 10px; }
.hs-done { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hs-done[hidden] { display: none !important; }

/* ---------- before / after slider ---------- */
.cmp { position: relative; overflow: hidden; border-radius: 16px; --pos: 50%; }
.cmp img { display: block; width: 100%; }
.cmp-b { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--pos)); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; transform: translateX(-50%); background: var(--grad); background-size: 200% 200%; pointer-events: none; }
.cmp-handle {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%);
  display: grid; place-items: center; color: #fff;
  border-radius: 50%; background: var(--grad); background-size: 200% 200%; box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(0,0,0,.4);
}
.cmp-handle svg { width: 24px; height: 24px; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.cmp-range:focus-visible + * { outline: 3px solid var(--off); }

/* the reveal button disappears once used */
.b-reveal[hidden] { display: none !important; }

/* ---------- instruction lines ("Click each 'i'…") sit centred, right above their interaction ---------- */
.b-instruct .prose { text-align: center; }
.b-instruct .prose p { margin: 0; }
.block.b-instruct { padding-bottom: 14px !important; }
.block.b-instruct + .block { padding-top: 0 !important; }
.lg-panel .card-title { margin-bottom: 6px; }
.lg-panel .prose p:last-child { margin-bottom: 0; }
.lg-panel.lg-below { position: static; width: 100%; margin-top: 14px; box-shadow: none; }

/* photos saved with transparent margins: framed, margins cropped (converter: image_shape) */
.pad-frame { display: block; position: relative; overflow: hidden; width: 100%; }
.pad-frame .pad-img {
  position: absolute; max-width: none; height: auto; display: block;
  border: 0; border-radius: 0; background: none; box-shadow: none; animation: none; cursor: zoom-in;
}
/* cut-outs with their empty margins cropped: never taller than 560px */
.pad-frame.floating { max-width: min(100%, calc(560px * var(--ar, 1))); margin-inline: auto; }

/* =====================================================================
   Hand-built layouts (used by rebuild-overrides/ in a unit; shared so every unit can use them)
   ===================================================================== */

/* text shown on a camera's own LCD screen */
.lcd { position: relative; container-type: inline-size; max-width: 1000px; margin-inline: auto; }
.lcd-cam { max-width: none !important; }
.lcd-screen {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  display: flex; align-items: center; padding: 4.5cqw 4cqw; color: #fff;
  font-size: clamp(12px, 2.05cqw, 22px); line-height: 1.5;
  background: radial-gradient(120% 90% at 30% 20%, rgba(91,170,181,.16), rgba(159,33,126,.08) 55%, transparent 80%);
}
.lcd-screen p { margin: 0; }
.lcd-screen strong { font-weight: 800; background: var(--grad-text); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: fpShift1 6s ease-in-out infinite alternate; }
@container (max-width: 560px) {
  .lcd-screen { position: static; width: auto; height: auto; padding: 18px 4px 0; background: none; color: var(--off); font-size: 17px; }
}
[data-theme="light"] .lcd-screen { color: #fff; }
@container (max-width: 560px) { [data-theme="light"] .lcd-screen { color: var(--off); } }

/* lists of links grouped into panels (resources, software) */
.linkpanels { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 24px; align-items: start; }
.linkpanel {
  border: var(--ow) solid transparent; border-radius: 20px; padding: 26px 28px 18px;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.linkpanel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.linkpanel-head .card-title { margin: 0; background: none; color: var(--off); -webkit-text-fill-color: currentColor; animation: none; }
.tag-pill {
  font-size: 13px; font-weight: 800; color: #fff;
  padding: 5px 12px; border-radius: 999px; background: var(--grad); background-size: 200% 200%;
  animation: fpShift1 6s ease-in-out infinite alternate; white-space: nowrap;
}
.tag-pill.alt { background: none; color: var(--off); border: 1px solid var(--hairline); animation: none; }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-top: 1px solid var(--hairline); }
.linklist li:first-child { border-top: 0; }
.linklist a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px;
  font-weight: 700; text-decoration: none;
}
.linklist a > span:first-child {
  background: var(--grad-text); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: fpShift1 6s ease-in-out infinite alternate;
}
.linklist a::after { content: "↗"; flex: 0 0 auto; font-weight: 800; color: #C2389C; transition: transform .15s; }
.linklist a:hover { opacity: 1; }
.linklist a:hover::after { transform: translate(2px, -2px); color: var(--teal); }
.linklist .li-note { display: block; font-size: 14px; font-weight: 400; color: var(--off); opacity: .75; margin-top: 2px; }
[data-theme="light"] .linklist a > span:first-child { background: none; color: var(--mag); animation: none; }
[data-theme="light"] .linklist a::after { color: var(--mag); }
.linkpanels.masonry { display: block; columns: var(--cols, 3); column-gap: 24px; }
.linkpanels.masonry .linkpanel { break-inside: avoid; margin-bottom: 24px; }
@media (max-width: 900px) { .linkpanels.masonry { columns: 2; } }
@media (max-width: 620px) { .linkpanels.masonry { columns: 1; } }
.linklist .sub { font-size: 15px; font-weight: 800; opacity: .8; padding: 18px 2px 6px; border-top: 0; }
.linkpanel .prose { margin-top: 4px; }
@media (max-width: 900px) { .linkpanels { grid-template-columns: repeat(min(var(--cols, 2), 2), minmax(0, 1fr)); } }
@media (max-width: 620px) { .linkpanels { grid-template-columns: 1fr; } }

/* a list of benefits: name on the left, explanation on the right */
.benefits { border: var(--ow) solid transparent; border-radius: 20px; overflow: hidden;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate; }
.benefit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: 28px; padding: 24px 32px; border-top: 1px solid var(--hairline); }
.benefit:first-child { border-top: 0; }
.benefit .card-title { margin: 0; }
.benefit .prose p:last-child { margin-bottom: 0; }
@media (max-width: 680px) { .benefit { grid-template-columns: 1fr; gap: 8px; padding: 20px 22px; } }

/* film strip: full width with each camera's name under its frame */
.filmstrip { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.filmstrip-inner { min-width: 760px; }
.filmstrip .pad-frame { max-width: none !important; }
.filmstrip-caps { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 10px 0.9% 0; }
.filmstrip-caps span { text-align: center; font-size: 15px; font-weight: 700; opacity: .85; }

/* two pictures shown at the same height, side by side */
.figpair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.figpair figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.figpair .pad-frame { height: clamp(150px, 26vw, 340px); width: auto !important; max-width: 100% !important; }
.figpair figcaption { margin-top: 12px; font-size: 15px; text-align: center; opacity: .85; }
.figpair + .mtext { margin-top: 32px; }

/* captions written inside a graphic (positions set per caption) */
.capstage { position: relative; container-type: inline-size; }
.capstage .pad-frame { max-width: none !important; }
.capstage-cap {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  display: grid; place-items: center; text-align: center; color: #fff; font-weight: 700;
  font-size: clamp(11px, 1.75cqw, 19px); line-height: 1.35;
}
[data-theme="light"] .capstage-cap { color: #fff; }

/* a picture with an interaction (or text) beside it */
.pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.pair > figure { margin: 0; }
.pair .refl { margin: 0; }
.pair-intro { max-width: 760px; margin: 0 auto 28px; }
@media (max-width: 860px) { .pair { grid-template-columns: 1fr; } }

/* picture beside long text: the picture stays in view while the text scrolls */
.mrow > .mfig { position: sticky; top: calc(50vh - 180px); }
@media (max-width: 760px) { .mrow > .mfig { position: static; } }
.pair .wrap { max-width: none; padding: 0; margin: 0; }
.b-filmstrip { overflow: hidden; }
.block.lg-open { position: relative; z-index: 30; }
@container (max-width: 520px) { .capstage-cap { top: calc(var(--y) - 4%); height: calc(var(--h) + 5%); font-size: 10.5px; } }
/* graphics drawn for the dark page keep a dark plate under them in light mode */
.on-ink { background: #0e0618; border-radius: 20px; }
[data-theme="light"] .on-ink { padding: 18px; }
/* hotspot questions: the instruction sits centred above the picture */
.hs > .quiz-stem { text-align: center; }
/* picture takes 80% of the row, the interaction 20% */
.pair.pair-80 { grid-template-columns: minmax(0, 4fr) minmax(250px, 1fr); gap: 28px; }
.pair.pair-80 .refl .quiz-stem { font-size: 16px; }
@media (max-width: 860px) { .pair.pair-80 { grid-template-columns: 1fr; } }

/* text and picture side by side at 70 / 30 (add "split-70" to the section) */
.split-70 .split { align-items: center; }
.split-70 .split:not(.img-left) { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
.split-70 .split.img-left { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }
@media (max-width: 760px) { .split-70 .split:not(.img-left), .split-70 .split.img-left { grid-template-columns: 1fr; } }

/* labeled-graphic notes: pop in gently, with a way to step to the next dot */
.lg-panel.pop { animation: lgPop .26s cubic-bezier(.2, .8, .2, 1) both, fpShift 6s ease-in-out infinite alternate; }
@keyframes lgPop { from { opacity: 0; transform: translate(var(--from-x, 0), 6px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lg-panel.pop { animation: lgFade .2s ease-out both; } @keyframes lgFade { from { opacity: 0; } to { opacity: 1; } } }
.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.lg-count { font-size: 13px; font-weight: 700; opacity: .7; }
.lg-next {
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; color: #fff; border: 0; border-radius: 999px; padding: 8px 16px;
  background: var(--grad); background-size: 200% 200%; animation: fpShift1 6s ease-in-out infinite alternate;
}
.lg-next:hover { filter: brightness(1.1); }
.lg-prev { font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; color: var(--off); background: transparent; border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 15px; }
.lg-prev:hover { border-color: var(--teal); }
[data-theme="light"] .lg-prev:hover { border-color: var(--mag); }
.lg-prev:focus-visible, .lg-next:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.figpair-text { max-width: 760px; margin: 28px auto 0; text-align: center; }

/* ---------- in-lesson knowledge check (one question) ---------- */
.kc-wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 36px; align-items: center; }
.kc-fig { margin: 0; }
.kc-fig img { width: 100%; max-height: 640px; object-fit: contain; }
.kc .kc-again { margin-top: 16px; }
@media (max-width: 760px) { .kc-wrap { grid-template-columns: 1fr; } .kc-fig img { max-height: 420px; } }

/* ---------- The Reciprocal Rule (Unit 2): shutter speed vs focal length vs hand shake ---------- */
.recip {
  border: var(--ow) solid transparent; border-radius: 20px; padding: 28px;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
  --safe: #5BAAB5; --unsafe: #E06AB8;
}
[data-theme="light"] .recip { --safe: #2E7F8A; --unsafe: var(--mag); }
.recip-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.recip-panel { display: flex; flex-direction: column; }
.recip-label { font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.recip-scene { position: relative; border-radius: 14px; overflow: hidden; background: #1c2733; aspect-ratio: 3 / 2; }
.recip-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 44% 48%; will-change: transform, filter; }
.recip-caption { font-size: 14px; line-height: 1.5; opacity: .8; margin: 8px 0 0; min-height: 42px; }
.recip-meter { margin-top: 24px; }
.recip-meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.recip-meter-value { font-weight: 700; font-size: 14px; }
.recip-track { position: relative; height: 36px; border-radius: 10px; overflow: hidden; background: var(--box-2); border: 1px solid var(--hairline); }
.recip-safe { position: absolute; top: 0; bottom: 0; right: 0; background: color-mix(in srgb, var(--safe) 28%, transparent); transition: left .15s ease; }
.recip-ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 700; opacity: .6; pointer-events: none; }
.recip-needle { position: absolute; top: 3px; bottom: 3px; width: 6px; border-radius: 4px; background: var(--unsafe); transform: translateX(-50%); transition: left .12s ease, background .12s ease; box-shadow: 0 0 0 3px color-mix(in srgb, var(--unsafe) 25%, transparent); }
.recip-needle.safe { background: var(--safe); box-shadow: 0 0 0 3px color-mix(in srgb, var(--safe) 25%, transparent); }
.recip-meter-caption { font-size: 15px; line-height: 1.55; margin: 10px 0 0; }
.recip-controls { margin-top: 26px; display: grid; gap: 18px; }
.recip-control { background: var(--box-2); border: 1px solid var(--hairline); border-radius: 14px; padding: 16px 18px 18px; }
.recip-control-head { display: flex; justify-content: space-between; align-items: baseline; }
.recip-control-name { font-weight: 800; font-size: 16px; }
.recip-control-value { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; background: var(--grad-text); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .recip-control-value { background: none; color: var(--mag); }
.recip-control-desc { font-size: 14px; line-height: 1.55; opacity: .8; margin: 4px 0 14px; }
.recip input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--grad-h); background-size: 200% 200%; outline: none; margin: 6px 0 4px; }
.recip input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--mag); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.recip input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--mag); cursor: pointer; }
.recip input[type="range"]:focus-visible { outline: 3px solid var(--teal); outline-offset: 6px; }
.recip-tick-row { display: flex; justify-content: space-between; font-size: 12px; opacity: .55; padding: 0 2px; }
.recip-seg { display: flex; gap: 6px; margin-top: 6px; }
.recip-seg input { position: absolute; opacity: 0; pointer-events: none; }
.recip-seg label { flex: 1; text-align: center; padding: 10px 8px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--hairline); background: var(--box); transition: background .15s, color .15s; }
.recip-seg input:checked + label { color: #fff; border-color: transparent; background: var(--grad); background-size: 200% 200%; animation: fpShift1 6s ease-in-out infinite alternate; }
.recip-seg input:focus-visible + label { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 720px) { .recip { padding: 18px; } .recip-panels { grid-template-columns: 1fr; } }

/* ---------- a picture with labels pointing at parts of it (e.g. Unit 2's histogram) ---------- */
.annot-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.annot { margin: 0; }
.annot-top, .annot-bottom { display: flex; font-weight: 700; font-size: 15px; }
.annot-top { justify-content: space-between; margin-bottom: 14px; }
.annot-bottom { justify-content: center; margin-top: 14px; }
.annot-label { position: relative; max-width: 46%; line-height: 1.35; }
.annot-right { text-align: right; }
.annot-mid { text-align: center; }
/* small gradient ticks pointing from each label to its part of the picture */
.annot-label::after { content: ""; position: absolute; width: 3px; height: 12px; border-radius: 2px; background: var(--grad); background-size: 200% 200%; }
.annot-top .annot-label::after { top: calc(100% + 1px); }
.annot-left::after { left: 10%; }
.annot-right::after { right: 10%; }
.annot-mid::after { bottom: calc(100% + 1px); left: calc(50% - 1.5px); }
.annot-text { font-size: 19px; }
@media (max-width: 760px) { .annot-row { grid-template-columns: 1fr; gap: 24px; } }
.kc-fig img { width: auto; max-width: 100%; margin-inline: auto; display: block; }
.step .step-img { display: block; width: 100%; margin: 6px 0 22px; }
.tab-panel .tab-img { display: block; width: 100%; margin: 0 0 20px; }
.quiz-q .quiz-img { display: block; width: 100%; max-height: 520px; object-fit: contain; margin-bottom: 18px; }

/* =====================================================================
   Components added for Unit 3 (shared by every unit)
   ===================================================================== */

/* ---------- "Reveal the answer" ---------- */
.reveal {
  border: var(--ow) solid transparent; border-radius: 20px; padding: 26px 30px;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.reveal-answer { display: flex; gap: 22px; align-items: center; }
.reveal-answer[hidden] { display: none !important; }
.reveal-answer.pop { animation: lgPop .3s cubic-bezier(.2, .8, .2, 1) both; }
.reveal-media { flex: 0 0 110px; margin: 0; }
.reveal-media img { display: block; width: 110px; height: 110px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.06); }
.reveal-label { margin: 0 0 8px; font-weight: 800; font-size: calc(2.6 * var(--u)); line-height: 1.2;
  background: var(--grad-text); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .reveal-label { background: none; color: var(--mag); }
.reveal-copy .prose p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .reveal-answer { flex-direction: column; align-items: flex-start; } }

/* ---------- HSL editor (like the colour panel in editing software) ---------- */
.hsl { display: flex; border-radius: 16px; overflow: hidden; border: var(--ow) solid transparent;
  background: linear-gradient(#1c1c1c, #1c1c1c) padding-box, var(--grad) border-box; background-size: 100% 100%, 200% 200%;
  animation: fpShift 6s ease-in-out infinite alternate; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.hsl-image { flex: 1 1 62%; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 12px; background: #1c1c1c; }
.hsl-image canvas { display: block; width: 100%; height: auto; border-radius: 4px; }
.hsl-panel { flex: 0 0 270px; background: #2b2b2b; color: #d8d8d8; padding: 18px 16px; border-left: 1px solid #111; font-size: 13px; }
.hsl-title { font-weight: 800; font-size: 15px; text-align: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #444; color: #eee; }
.hsl-row { display: grid; grid-template-columns: 12px 64px 1fr 34px; gap: 8px; align-items: center; padding: 6px 0; }
.hsl-row .sw { width: 10px; height: 10px; border-radius: 50%; }
.hsl-row label { color: #a8a8a8; }
.hsl-row output { text-align: right; color: #a8a8a8; font-variant-numeric: tabular-nums; }
.hsl input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: #555; border-radius: 2px; outline: none; margin: 0; }
.hsl input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #eee; border: 1px solid #999; cursor: pointer; }
.hsl input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #eee; border: 1px solid #999; cursor: pointer; }
.hsl input[type="range"]:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.hsl-reset { display: block; margin: 14px auto 0; font: inherit; font-size: 13px; font-weight: 700; color: #ccc; background: none; border: 1px solid #555; border-radius: 6px; padding: 6px 16px; cursor: pointer; }
.hsl-reset:hover { color: #fff; border-color: #888; }
@media (max-width: 760px) { .hsl { flex-direction: column; } .hsl-panel { flex: none; border-left: 0; border-top: 1px solid #111; } }

/* ---------- colour wheel (complementary / analogous / monochromatic) ---------- */
.wheel {
  display: flex; align-items: center; gap: 40px; padding: 30px 34px; border-radius: 20px;
  border: var(--ow) solid transparent; background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.wheel.wheel-flip { flex-direction: row-reverse; }
.wheel-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wheel-side canvas { display: block; width: 340px; height: 340px; max-width: 100%; cursor: crosshair; border-radius: 50%; }
.wheel-side canvas:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.wheel-hint { margin: 0; font-size: 15px; opacity: .7; text-align: center; }
.wheel-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.wheel-sel { min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.wheel-sel-name { font-weight: 800; font-size: 18px; }
.wheel-sel-hex { font-family: ui-monospace, Menlo, monospace; font-size: 13px; opacity: .6; letter-spacing: .03em; }
.wheel-sel-placeholder { opacity: .55; }
.wheel-rule { width: 44px; height: 3px; border-radius: 3px; background: var(--grad-h); background-size: 200% 200%; }
.wheel-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wheel-swatch { display: flex; flex-direction: column; gap: 6px; }
.wheel-chips { display: flex; height: 52px; border-radius: 10px; overflow: hidden; border: 1px solid var(--hairline); }
.wheel-chips span { flex: 1; }
.wheel-swatch-label { font-size: 15px; opacity: .75; }
.wheel-palette-label { font-size: 14px; font-weight: 700; opacity: .75; }
.wheel-strip { display: flex; height: 44px; border-radius: 10px; overflow: hidden; border: 1px solid var(--hairline); }
.wheel-strip span { flex: 1; }
.wheel-hexes { display: flex; }
.wheel-hexes span { flex: 1; text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; opacity: .6; }
@media (max-width: 760px) {
  .wheel, .wheel.wheel-flip { flex-direction: column; padding: 22px; gap: 24px; }
  .wheel-side canvas { width: 280px; height: 280px; }
}

/* =====================================================================
   Components added for Unit 4 (shared by every unit)
   ===================================================================== */

/* ---------- Photo lab (editing demos) ---------- */
.lab {
  border: var(--ow) solid transparent; border-radius: 20px; padding: 22px;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box;
  background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate;
}
.lab-view { position: relative; overflow: hidden; border-radius: 12px; background: #111; touch-action: none; user-select: none; -webkit-user-select: none; }
.lab-view.lab-placing { cursor: crosshair; }
.lab-stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.lab-stage canvas { display: block; width: 100%; height: 100%; transform-origin: center; }
.lab-vig { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.lab-vig.dark { background: radial-gradient(circle, transparent 35%, #000 135%); mix-blend-mode: multiply; }
.lab-vig.light { background: radial-gradient(circle, transparent 35%, #fff 135%); mix-blend-mode: screen; }
.lab-cropbox { position: absolute; border: 1.5px solid #FFFCF6; box-shadow: 0 0 0 9999px rgba(17,17,17,.55); cursor: move; touch-action: none; }
.lab-cropbox[hidden] { display: none !important; }
.lab-cropbox::before, .lab-cropbox::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.lab-cropbox::before { border-left: 1px solid rgba(255,255,255,.35); border-right: 1px solid rgba(255,255,255,.35); left: 33.33%; right: 33.33%; }
.lab-cropbox::after { border-top: 1px solid rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.35); top: 33.33%; bottom: 33.33%; }
.lab-handle { position: absolute; width: 18px; height: 18px; background: #FFFCF6; border: 3px solid var(--mag); border-radius: 50%; touch-action: none; }
.lab-handle.nw { left: -9px; top: -9px; cursor: nwse-resize; } .lab-handle.ne { right: -9px; top: -9px; cursor: nesw-resize; }
.lab-handle.sw { left: -9px; bottom: -9px; cursor: nesw-resize; } .lab-handle.se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.lab-mask-outline { position: absolute; pointer-events: none; }
.lab-mask-outline[hidden] { display: none !important; }
.lab-mask-outline { inset: 0; overflow: hidden; }
.lab-mask-outline > div { position: absolute; }
.lab-mask-outline > div[hidden] { display: none; }
/* feather falloff: tinted while the mask is being placed or resized, then fades away */
.lab-mask-tint { inset: 0; opacity: 0; transition: opacity .5s ease; }
.lab-mask-outline.tinting .lab-mask-tint { opacity: 1; transition-duration: .15s; }
/* inner ring = full strength; outer dashed ring = where the effect fades out */
.lab-mask-outline.radial .lab-mask-inner { border: 2px solid rgba(255,252,246,.95); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.35); }
.lab-mask-outline.radial .lab-mask-outer { border: 2px dashed rgba(255,252,246,.75); border-radius: 50%; }
.lab-mask-outline.linear .lab-mask-inner { border-top: 2px solid rgba(255,252,246,.95); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.lab-mask-outline.linear .lab-mask-outer { border-top: 2px dashed rgba(255,252,246,.75); }
.lab-mask-centre { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #FFFCF6; border: 3px solid var(--mag); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.lab-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin: 14px 0 4px; }
.lab-bar .lab-left { margin-right: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.lab-btn, .lab-reset {
  font: inherit; font-size: 14px; font-weight: 800; border-radius: 999px; padding: 8px 18px; cursor: pointer;
}
.lab-btn { color: #fff; border: 0; background: var(--grad); background-size: 200% 200%; animation: fpShift1 6s ease-in-out infinite alternate; }
.lab-reset { color: var(--off); background: none; border: 1.5px solid var(--hairline); }
.lab-reset:hover { border-color: var(--teal); }
[data-theme="light"] .lab-reset { color: var(--mag); border-color: var(--mag); }
.lab-toggle { display: inline-flex; border: 1.5px solid var(--hairline); border-radius: 999px; overflow: hidden; }
.lab-toggle button { font: inherit; font-size: 14px; font-weight: 700; color: var(--off); background: none; border: 0; padding: 8px 16px; cursor: pointer; }
.lab-toggle button.active { color: #fff; background: var(--grad); background-size: 200% 200%; }
.lab-hint { margin: 6px 2px 4px; font-size: 15px; opacity: .8; }
.lab-label { margin: 18px 2px 4px; font-weight: 800; font-size: 15px; opacity: .85; }
.lab-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 30px; margin-top: 6px; }
.lab-slider { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 8px 0; }
.lab-slider label { font-weight: 700; font-size: 15px; }
.lab-slider output { font-variant-numeric: tabular-nums; font-size: 14px; opacity: .8; min-width: 3ch; text-align: right; }
.lab-slider input { grid-column: 1 / -1; }
.lab-slider.is-off { opacity: .45; }
.lab input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 999px; background: var(--grad-h); background-size: 200% 200%; outline: none; margin: 10px 0 2px; }
.lab input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--mag); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.lab input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--mag); cursor: pointer; }
.lab input[type="range"]:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
.lab input[type="range"]:disabled { cursor: not-allowed; }
.lab-curve-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.lab-curve { width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; touch-action: none; }
.lab-curve svg { width: 100%; height: 100%; display: block; border-radius: 10px; cursor: ns-resize; }
.lab-curve circle { cursor: grab; }
.lab-curve circle:focus { outline: none; }
.lab-curve circle:focus-visible { stroke: var(--teal); stroke-width: 4; }
.lab.lab-split .lab-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 22px; align-items: center; }
.lab-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 6px; }
.lab-tabs [role="tab"] { font: inherit; font-size: 14px; font-weight: 700; color: var(--off); background: var(--box-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.lab-tabs [role="tab"][aria-selected="true"] { color: #fff; border-color: transparent; background: var(--grad); background-size: 200% 200%; }
.lab-panel-title { font-weight: 800; font-size: 18px; margin: 12px 2px 0; }
.lab-mask-controls[hidden] { display: none !important; }
@media (max-width: 640px) { .lab { padding: 14px; } .lab-sliders { grid-template-columns: 1fr; } .lab.lab-split .lab-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .lab[data-crop="start"] .lab-view { position: sticky; top: 8px; z-index: 5; } }

/* ---------- checklist (tickable, nothing saved) ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist label { display: flex; gap: 16px; align-items: flex-start; padding: 12px 6px; cursor: pointer; border-radius: 12px; transition: background .2s; }
.checklist label:hover { background: rgba(255,252,246,.04); }
.checklist input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { flex: none; width: 26px; height: 26px; margin-top: .25em; border-radius: 8px; border: 2px solid transparent;
  background: linear-gradient(var(--ground, #0e0716), var(--ground, #0e0716)) padding-box, var(--grad) border-box; position: relative; transition: background .2s; }
.check-box::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.checklist input:checked + .check-box { background: var(--grad) border-box; }
.checklist input:checked + .check-box::after { transform: rotate(45deg) scale(1); }
.checklist input:checked ~ .check-text { opacity: .6; }
.checklist input:focus-visible + .check-box { outline: 3px solid var(--off); outline-offset: 3px; }
.check-text { transition: opacity .2s; }

/* ---------- rebuilt software window (e.g. Lightroom export), readable at any size ---------- */
.b-export .prose { margin-bottom: 28px; }
.xs { margin: 0; font-size: 14px; line-height: 1.3; color: var(--off); border-radius: 16px; overflow: hidden;
  border: var(--ow, 2px) solid transparent; background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box; }
.xs-title { padding: 10px 16px; font-weight: 700; font-size: 13px; letter-spacing: .02em; background: rgba(255,252,246,.06); border-bottom: 1px solid var(--hairline); }
.xs-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 4px; }
.xs-main { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 10px 16px 0; }
.xs-cap { margin: 0 0 6px; font-size: 12px; opacity: .6; }
.xs-side { display: flex; flex-direction: column; }
.xs-presets { list-style: none; margin: 0; padding: 8px 10px; flex: 1; border: 1px solid var(--hairline); border-radius: 8px; background: rgba(0,0,0,.2); }
.xs-presets li { padding: 4px 0; }
.xs-presets li:not(.grp) { padding-left: 16px; }
.xs-sidebtns { display: flex; gap: 6px; margin-top: 8px; } .xs-sidebtns .xs-btn { flex: 1; text-align: center; }
.xs-panel { border: 1px solid var(--hairline); border-radius: 8px; padding: 0 0 6px; background: rgba(0,0,0,.2); overflow: hidden; }
.xs-panel > .xs-cap { padding: 8px 12px 0; }
.xs-sec { margin-top: 4px; }
.xs-head { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-weight: 700; background: rgba(255,252,246,.07); }
.xs-tri { width: 12px; font-size: 12px; opacity: .8; }
.xs-note { margin-left: auto; font-weight: 400; font-size: 12px; opacity: .65; }
.xs-body { padding: 8px 12px 6px; }
.xs-row { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.xs-label { text-align: right; opacity: .85; }
.xs-ctrls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.xs-select, .xs-field { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 6px; border: 1px solid rgba(255,252,246,.22); background: rgba(255,252,246,.05); width: var(--w, auto); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xs-select[style*="100%"], .xs-field[style*="100%"] { flex: 1; min-width: 10em; }
.xs-select { padding-right: 28px; position: relative; }
.xs-select::after { content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: .7; }
.xs-field { background: rgba(0,0,0,.25); }
.xs-check { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.xs-check i { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid rgba(255,252,246,.45); position: relative; flex: none; }
.xs-check.on i { background: var(--grad); border-color: transparent; }
.xs-check.on i::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.is-off { opacity: .4; }
.xs-path { opacity: .8; }
.xs-grow { flex: 1; }
.xs-inline { opacity: .85; }
.xs-slider { position: relative; width: 150px; height: 4px; border-radius: 4px; background: var(--grad); }
.xs-slider b { position: absolute; right: -2px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #FFFCF6; border: 3px solid var(--mag); }
.xs-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 16px; }
.xs-btn { display: inline-block; padding: 5px 16px; border-radius: 999px; border: 1px solid rgba(255,252,246,.3); font-weight: 600; font-size: 13px; }
.xs-btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.xs-link { text-decoration: underline; text-underline-offset: 2px; opacity: .8; font-size: 13px; }
[data-theme="light"] .xs-panel, [data-theme="light"] .xs-presets { background: rgba(26,18,32,.03); }
[data-theme="light"] .xs-select, [data-theme="light"] .xs-field { border-color: rgba(26,18,32,.22); background: #fff; }
[data-theme="light"] .xs-head, [data-theme="light"] .xs-title { background: rgba(26,18,32,.05); }
[data-theme="light"] .xs-check i { border-color: rgba(26,18,32,.4); }
[data-theme="light"] .xs-btn { border-color: rgba(26,18,32,.3); }
[data-theme="light"] .xs-btn.primary { border-color: transparent; }
[data-theme="light"] .check-box { background: linear-gradient(var(--ground), var(--ground)) padding-box, var(--grad) border-box; }
@media (max-width: 760px) {
  .xs { font-size: 13px; }
  .xs-main { grid-template-columns: 1fr; }
  .xs-side { display: none; }
  .xs-row { grid-template-columns: 1fr; gap: 4px; }
  .xs-label { text-align: left; }
  .xs-label:empty { display: none; }
}

/* accordion whose label is only a prompt ("Learn about this photo"): the prompt hides once it's open, the − stays to close it */
.acc-hide-open[aria-expanded="true"] .acc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acc-item:has(.acc-hide-open) { position: relative; }
.acc-hide-open[aria-expanded="true"] { position: absolute; top: 0; right: 0; width: auto; padding: 22px 28px; }
.acc-item:has(.acc-hide-open[aria-expanded="true"]) .acc-panel { padding-top: 18px; padding-right: 64px; }

/* question list: a question and its prompt side by side, rows divided by a hairline (no boxes) */
.qrows { border-top: 1px solid var(--hairline); }
.qrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px 40px; padding: 26px 0; border-bottom: 1px solid var(--hairline); }
.qrow-q { margin: 0; font-size: calc(2.2 * var(--u)); font-weight: 800; line-height: 1.3; color: var(--teal); }
[data-theme="light"] .qrow-q, [data-theme="light"] .pdaf-card .card-title { color: var(--mag); }
@media (max-width: 760px) { .qrow { grid-template-columns: 1fr; padding: 20px 0; } }

/* ---------- hand-built camera demos (Unit 6: focus and lighting); the box, sliders and toggles are the photo lab's ---------- */
.dm-instruct { text-align: center; font-style: italic; margin: 0 auto 18px; max-width: var(--col); }
.dm-narrow { max-width: 560px; margin: 0 auto; }
.dm-screen { position: relative; overflow: hidden; border-radius: 12px; background: #111; touch-action: none; user-select: none; -webkit-user-select: none; }
.dm-screen canvas { display: block; width: 100%; height: 100%; }
.dm-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: flex-end; margin: 14px 0 2px; }
.dm-bar.dm-center { justify-content: center; }
.dm .lab-toggle { flex-wrap: wrap; justify-content: center; }
.lab-sliders.dm-one { grid-template-columns: 1fr; }
.dm-status { font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--hairline); }
.dm-status.ok { border-color: var(--teal); color: var(--teal); }
.dm-status:empty { display: none; }
.dm-corner { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(255,255,255,.7); pointer-events: none; }
.dm-corner.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.dm-corner.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.dm-corner.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.dm-corner.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }
.dm-hud { position: absolute; font: 12px/1 "Share Tech Mono", ui-monospace, Menlo, monospace; letter-spacing: 1px; color: #fff; text-shadow: 0 0 2px #000, 0 1px 4px rgba(0,0,0,.9); pointer-events: none; }
.dm-hud.top { top: 18px; left: 0; right: 0; text-align: center; }
.dm-hud.bl { left: 46px; bottom: 15px; }
.dm-hud.dm-status { border: 0; padding: 4px 7px; border-radius: 4px; background: rgba(0,0,0,.55); text-shadow: none; font-weight: 400; color: #EACC28; bottom: 10px; }
.dm-hud.dm-status.ok { color: #5BAAB5; }
/* live view: a camera back around the screen */
.dm-camera { background: #1b1b1f; border-radius: 18px; padding: 10px 14px 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 8px 24px rgba(0,0,0,.35); }
.dm-camtop { display: flex; justify-content: center; padding: 2px 0 10px; font: 11px/1 "Share Tech Mono", ui-monospace, monospace; letter-spacing: 2px; color: rgba(255,255,255,.5); }
.dm-zoombox { position: absolute; border: 2px solid #EACC28; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); opacity: 0; transition: opacity .3s; pointer-events: none; }
.dm-zoombox.show { opacity: 1; }
.dm-badge { position: absolute; top: 14px; right: 16px; font: 700 12px/1 var(--font); color: #fff; background: var(--mag); padding: 5px 9px; border-radius: 6px; }
.dm-badge[hidden] { display: none; }
.dm-focusrow[hidden] { display: none; }
/* Bahtinov: a round eyepiece */
.dm-eyepiece { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 10px #1b1b1f, 0 0 0 11px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.5); }
.dm-eyepiece canvas { display: block; width: 100%; height: 100%; }
.dm-eyestatus { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); white-space: nowrap; border: 0; padding: 0; font: 13px/1 "Share Tech Mono", ui-monospace, monospace; color: #EACC28; }
.dm-eyestatus.ok { color: #5BAAB5; }
.dm-narrow .dm-eyepiece { margin-top: 14px; margin-bottom: 18px; }
.dm-legend { display: flex; justify-content: center; gap: 24px; margin-top: 8px; font-size: 14px; opacity: .85; }
.dm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.dm-legend i { width: 22px; height: 3px; border-radius: 3px; display: inline-block; }
/* colour swatches */
.dm-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.dm-swlabel { font-weight: 700; font-size: 15px; margin-right: 4px; }
.dm-swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--sw); box-shadow: 0 0 0 2px rgba(255,255,255,.18); transition: box-shadow .15s, transform .15s; }
.dm-swatch:hover { transform: scale(1.08); }
.dm-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--box), 0 0 0 5px var(--teal); }
.dm-swatch:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.dm-bulbs .dm-swatches { grid-column: 1 / -1; }
/* tilt-shift: two panels */
.dm-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dm-ptitle { margin: 0; font-weight: 800; font-size: calc(2.2 * var(--u)); color: var(--teal); }
[data-theme="light"] .dm-ptitle { color: var(--mag); }
.dm-psub { margin: 0 0 8px; font-size: 15px; opacity: .75; }
.dm-pdesc { margin: 0 0 12px; font-size: 15px; font-style: italic; }
/* practical lighting */
.dm-stage { cursor: none; }
.dm-lamp { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .2s;
  --bulb: rgb(255,160,60); background: radial-gradient(circle, #fff 0 25%, var(--bulb) 60%); box-shadow: 0 0 14px 4px var(--bulb), 0 0 0 2px rgba(255,255,255,.8); }
.dm-lamp.show { opacity: 1; }
.dm-statusline { margin: 12px 2px 0; font-size: 15px; font-weight: 700; min-height: 1.6em; }
@media (max-width: 560px) { .dm .lab-toggle { display: grid; grid-template-columns: 1fr 1fr; border-radius: 18px; width: 100%; } .dm .lab-toggle button { padding: 10px 8px; } .dm-badge { top: auto; bottom: 12px; right: 12px; } }
@media (max-width: 760px) { .dm-panels { grid-template-columns: 1fr; } .dm-hud.top { top: 12px; font-size: 10px; } .dm-hud.bl { left: 38px; bottom: 13px; font-size: 10px; } }

/* the audio bar ends in a full-width rule; Rise often put the next block flush against it (top padding 0-2), so give that block room */
.b-audio + .block[style*="padding-top:calc(0 *"], .b-audio + .block[style*="padding-top:calc(1 *"], .b-audio + .block[style*="padding-top:calc(2 *"] { padding-top: calc(5 * var(--pad)) !important; }

/* a diagram with two explanations under it, each labelled with the figures it covers */
.pdaf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.pdaf-card { padding: 22px 26px; border-radius: 20px; border: var(--ow) solid transparent;
  background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box; background-size: 100% 100%, 200% 200%; animation: fpShift 6s ease-in-out infinite alternate; }
.pdaf-card .card-title { margin: 0 0 8px; font-size: calc(2 * var(--u)); background: none; animation: none; color: var(--teal); -webkit-text-fill-color: currentColor; }
.pdaf-card .card-title span { color: var(--off); }
.pdaf-card .card-title span { font-weight: 600; opacity: .65; }
.pdaf-card .prose p { margin: 0; }
@media (max-width: 640px) { .pdaf-cards { grid-template-columns: 1fr; } }

/* bulleted list blocks: no plain dots; each point sits on its own row with a small gradient diamond, rows split by a hairline (no accent bars) */
.prose ul.bullets { list-style: none; padding: 0; margin: 0; }
.prose ul.bullets > li { position: relative; padding: 12px 0 12px 44px; }
.prose ul.bullets > li + li { border-top: 1px solid var(--hairline); }
.prose ul.bullets > li::before {
  content: ""; position: absolute; left: 17px; top: calc(12px + .95em); width: 11px; height: 11px; margin-top: -5.5px;
  transform: rotate(45deg); border-radius: 2px; background: var(--grad); background-size: 200% 200%;
  box-shadow: 0 0 10px rgba(194,56,156,.55);
}

/* numbered list blocks: same rows, with the number in a small gradient circle */
.prose ol.bullets { list-style: none; counter-reset: fpn; padding: 0; margin: 0; }
.prose ol.bullets > li { position: relative; counter-increment: fpn; padding: 12px 0 12px 52px; }
.prose ol.bullets > li + li { border-top: 1px solid var(--hairline); }
.prose ol.bullets > li::before {
  content: counter(fpn); position: absolute; left: 6px; top: calc(12px + .95em); margin-top: -13px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; background: var(--grad); background-size: 200% 200%;
}

/* big-text callouts written as plain paragraphs (text 4× or larger): bold words match the statements, gradient on dark, magenta on light */
.b-paragraph :is(span[style*="calc(4"], span[style*="calc(5"], span[style*="calc(6"], span[style*="calc(7"], span[style*="calc(8"]) strong {
  background: var(--grad-text); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fpShift1 6s ease-in-out infinite alternate;
}
[data-theme="light"] .b-paragraph :is(span[style*="calc(4"], span[style*="calc(5"], span[style*="calc(6"], span[style*="calc(7"], span[style*="calc(8"]) strong {
  background: none; color: var(--mag); animation: none;
}

/* stepped reflection: one question at a time in one box, download at the end */
.refl-steps .refl-count { margin: 0 0 12px; font-size: 14px; font-weight: 700; opacity: .7; }
.refl-steps .refl-q.pop, .refl-steps .refl-end.pop { animation: reflIn .3s ease; }
@keyframes reflIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.refl-steps .refl-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.refl-steps .refl-nav .refl-next { margin-left: auto; }
.refl-steps .refl-end .refl-download { margin-top: 14px; width: auto; display: inline-flex; }
@media (prefers-reduced-motion: reduce) { .refl-steps .refl-q.pop, .refl-steps .refl-end.pop { animation: none; } }

/* Unit 8 demos: two panels side by side (diagram + photo), result line, studio light cards, overlay picture, gamut chart */
.dm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.dm-two .dm-psub { margin: 0 0 8px; font-weight: 700; opacity: .8; }
.dm-fit canvas { display: block; width: 100%; height: auto; }
.dm-photo { aspect-ratio: 4 / 3; }
.dm-photo img, .dm-photo canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-photo canvas { pointer-events: none; }
.dm-result { display: flex; align-items: flex-start; gap: 14px; margin-top: 16px; }
.dm-result p { margin: 0; }
.dm-badge2 { flex: none; display: inline-block; font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 999px; color: var(--off); border: 1.5px solid var(--hairline); white-space: nowrap; }
.dm-badge2.teal { background: var(--teal); border-color: transparent; color: #fff; }
.dm-badge2.mag { background: var(--mag); border-color: transparent; color: #fff; }
.dm-badge2.yellow { background: #EACC28; border-color: transparent; color: #1A1A1A; }
.dm-on-photo { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.55); color: #fff; border-color: transparent; }
.st-two { grid-template-columns: 1.1fr 1fr; }
.st-cards { display: grid; gap: 10px; margin-top: 12px; }
.st-empty { margin: 0; opacity: .7; font-size: 15px; }
.st-card { border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 14px 4px; background: var(--box-2); }
.st-top { display: flex; align-items: center; gap: 10px; }
.st-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.st-name { font-weight: 800; }
.st-mod { margin-left: auto; font: inherit; font-size: 14px; color: var(--off); background: var(--box); border: 1px solid var(--hairline); border-radius: 8px; padding: 4px 8px; }
.st-remove { font: inherit; font-size: 20px; line-height: 1; color: var(--off); background: none; border: 0; cursor: pointer; opacity: .7; padding: 0 4px; }
.st-remove:hover { opacity: 1; }
.st .lab-slider { padding: 4px 0; }
.st-info { margin: 12px 2px 0; font-size: 15px; }
.lab-btn:disabled { opacity: .45; cursor: not-allowed; }
.gs-scene img { display: block; width: 100%; height: auto; }
.gs-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gs-ov { opacity: 0; transition: opacity .35s ease; }
.gs-ov.on { opacity: 1; }
.gm-chart svg { display: block; width: 100%; height: auto; }
.gm-chart polygon, .gm-chart text { transition: opacity .3s; }
.gm-desc { text-align: center; font-weight: 400; }
[data-theme="light"] .gm-chart { background: #170b22; border-radius: 14px; }
@media (max-width: 760px) { .dm-two, .st-two { grid-template-columns: 1fr; } .dm-result { flex-direction: column; gap: 8px; } }
.dm-two, .dm-screen { -webkit-user-select: none; user-select: none; }
.gs-desc { text-align: center; font-weight: 400; }

/* hotspot notes: a close button in the top corner */
.lg-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--box); color: var(--off); line-height: 0; cursor: pointer; display: grid; place-items: center; padding: 0; }
.lg-close:hover { border-color: var(--teal); }
.lg-close:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.lg-panel .card-title { padding-right: 34px; }
.lg-panel.lg-below { position: relative; }

/* worksheets (Unit 10): one step at a time in one box, then a summary to save as PDF */
.ws-title { margin: 0 0 6px; font-size: calc(2.6 * var(--u)); font-weight: 800; color: var(--teal); }
[data-theme="light"] .ws-title { color: var(--mag); }
.ws-intro { margin: 0 0 18px; opacity: .9; }
.ws-progress { height: 6px; border-radius: 6px; background: var(--hairline); overflow: hidden; }
.ws-progress i { display: block; height: 100%; width: 0; background: var(--grad); background-size: 200% 200%; border-radius: 6px; transition: width .35s ease; }
.ws-progress-label { margin: 8px 0 18px; font-size: 14px; font-weight: 700; opacity: .7; }
.ws-step.pop, .ws-summary.pop { animation: reflIn .3s ease; }
.ws-step-title { margin: 0 0 4px; font-size: calc(2.2 * var(--u)); font-weight: 800; }
.ws-step-desc { margin: 0 0 14px; }
.ws-label { display: block; margin: 14px 0 6px; font-size: 15px; font-weight: 700; }
.ws textarea, .ws input[type="number"], .ws input[type="date"] { width: 100%; font: inherit; color: var(--off); background: var(--box); border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; }
.ws textarea:focus, .ws input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(91,170,181,.25); }
.ws input[type="date"] { max-width: 240px; color-scheme: dark; }
[data-theme="light"] .ws input[type="date"] { color-scheme: light; }
.ws-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ws-nav { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.ws-nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.ws-skip { font: inherit; font-size: 14px; font-weight: 700; color: var(--off); opacity: .7; background: none; border: 0; cursor: pointer; padding: 6px; }
.ws-skip:hover { opacity: 1; }
.ws-next:disabled { opacity: .4; cursor: not-allowed; }
/* single and multiple choice */
.ws-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-choice { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; font-size: 16px; color: var(--off); background: var(--box); border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.ws-choice i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--hairline); }
.ws-choice[aria-pressed="true"] { border-color: transparent; background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.ws-choice[aria-pressed="true"] i { border: 0; background: var(--grad); box-shadow: inset 0 0 0 4px var(--box-2); }
.ws-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-chip { font: inherit; font-size: 15px; font-weight: 600; color: var(--off); background: var(--box); border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.ws-chip[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--grad); background-size: 200% 200%; }
.ws-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ws-opt { position: relative; display: block; text-align: left; font: inherit; color: var(--off); background: var(--box); border: 2px solid var(--hairline); border-radius: 14px; padding: 16px 44px 16px 16px; cursor: pointer; }
.ws-opt i { position: absolute; top: 16px; right: 14px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--hairline); }
.ws-opt[aria-pressed="true"] { border-color: transparent; background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box; }
.ws-opt[aria-pressed="true"] i { border: 0; background: var(--grad); }
.ws-opt[aria-pressed="true"] i::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ws-opt:disabled { opacity: .45; cursor: not-allowed; }
.ws-opt-title { display: block; font-weight: 800; margin-bottom: 4px; }
.ws-opt-desc { display: block; font-size: 15px; opacity: .85; line-height: 1.5; }
.ws-commit-item { padding: 16px 0; border-top: 1px solid var(--hairline); }
.ws-commit-item:first-child { border-top: 0; padding-top: 0; }
.ws-commit-item .ws-opt-title { margin: 0; font-size: 18px; }
.ws-choice:focus-visible, .ws-chip:focus-visible, .ws-opt:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
/* summary */
.ws-sum-title { margin: 0 0 4px; font-size: calc(2.2 * var(--u)); font-weight: 800; }
.ws-sum-items { margin-top: 14px; }
.ws-sum-section { margin: 20px 0 4px; font-weight: 800; color: var(--teal); }
[data-theme="light"] .ws-sum-section { color: var(--mag); }
.ws-sum-row { padding: 12px 0; border-top: 1px solid var(--hairline); }
.ws-sum-q { margin: 0 0 2px; font-size: 14px; font-weight: 800; opacity: .75; }
.ws-sum-a { margin: 0; }
.ws-sum-a.empty { opacity: .5; font-style: italic; }
.ws-sum-sub { display: block; font-size: 14px; opacity: .7; margin-top: 4px; }
.ws-tag { display: inline-block; font-size: 14px; font-weight: 700; padding: 4px 12px; margin: 2px 6px 2px 0; border-radius: 999px; border: 1px solid var(--hairline); }
.ws-sum-box { margin-top: 18px; padding: 18px 20px; border-radius: 16px; border: var(--ow) solid transparent; background: linear-gradient(var(--box), var(--box)) padding-box, var(--grad) border-box; }
.ws-sum-boxlabel { margin: 0 0 4px; font-weight: 800; }
.ws-sum-box p:last-child { margin: 0; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 640px) { .ws-two, .ws-choices, .ws-options { grid-template-columns: 1fr; } }

/* idea decks (Final Project): filter chips, a random pick, and an even grid of idea cards */
.ideas-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ideas-label { font-weight: 800; font-size: 15px; }
.ideas-bar .ideas-pick { margin-left: auto; }
.ideas-count { margin: 12px 2px 10px; font-size: 14px; font-weight: 700; opacity: .7; }
.ideas-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.idea { display: flex; flex-direction: column; padding: 18px 20px; border-radius: 16px; background: var(--box); border: 1px solid var(--hairline); transition: box-shadow .25s, transform .25s; }
.idea[hidden] { display: none; }
.idea-title { margin: 0 0 6px; font-weight: 800; font-size: calc(1.9 * var(--u)); line-height: 1.3; }
.idea-desc { margin: 0 0 14px; font-size: 15px; line-height: 1.6; opacity: .9; }
.idea-tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.idea-tag { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--teal); }
[data-theme="light"] .idea-tag { color: var(--mag); }
.idea.picked { border: var(--ow) solid transparent; background: linear-gradient(var(--box-2), var(--box-2)) padding-box, var(--grad) border-box; box-shadow: 0 0 0 6px rgba(194,56,156,.18), 0 12px 30px rgba(0,0,0,.35); transform: translateY(-2px); }
.ideas-empty { opacity: .7; }
@media (max-width: 900px) { .ideas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ideas-grid { grid-template-columns: 1fr; } .ideas-bar .ideas-pick { margin-left: 0; } }
