:root{--blue:#28548a;--ink:#243146;--muted:#6c7785;--border:#dce3eb;--cream:#f8f5ef}*{box-sizing:border-box}body{margin:0;background:#f8fafc;color:var(--ink);font:16px/1.65 Georgia,'Times New Roman',serif}.shell{max-width:1440px;padding:28px clamp(18px,4vw,64px) 18px;margin:auto}.top{display:flex;align-items:center;justify-content:space-between;gap:14px;font:600 12px/1.5 Arial,sans-serif;letter-spacing:.09em;color:var(--muted)}a{color:var(--blue)}.top a{text-decoration:none;font-size:13px;letter-spacing:0}.top a:hover{text-decoration:underline}.intro{margin:40px 0 30px}.eyebrow{font:600 11px Arial,sans-serif;letter-spacing:.16em;color:var(--blue)}h1{font-size:clamp(31px,3vw,43px);margin:7px 0 10px;font-weight:500;line-height:1.2}h1 span{font-size:.75em}.intro>p:last-child{max-width:750px;margin:0;color:#526070}.workspace{display:grid;grid-template-columns:minmax(280px,32%) minmax(0,1fr);border:1px solid var(--border);background:white;min-height:660px;box-shadow:0 9px 35px #2639520b}.notebook{display:flex;flex-direction:column;border-right:1px solid var(--border);min-width:0;padding:25px clamp(18px,2.2vw,35px)}.notebook-title,.canvas-top,.canvas-bottom{font:600 11px/1.5 Arial,sans-serif;letter-spacing:.09em;color:#697b90;display:flex;justify-content:space-between;gap:8px}.notebook-title{border-bottom:1px solid var(--border);padding-bottom:21px}.step-info{padding-top:25px;min-height:275px}.step-kicker{font:600 11px Arial,sans-serif;color:var(--blue);letter-spacing:.1em;margin:0 0 11px}.step-info h2{font-size:23px;line-height:1.3;font-weight:500;margin:0 0 12px}.step-info>p:not(.step-kicker){font-size:14px;line-height:1.65;color:#526070;margin:0 0 17px}.math-equations{min-height:68px}.math-line{padding:9px 12px;margin:7px 0;background:#f4f7fc;border-left:2px solid var(--blue);overflow-x:auto;white-space:nowrap;font:15px/1.6 'Cambria Math','STIX Two Math',Georgia,serif;color:#273e5b}.math-label{font:600 10px Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#62758b;margin-bottom:2px}.waiting{font-style:italic;color:#94a0aa;font-size:14px}.controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 27px}.controls button{padding:12px 10px;font:600 12px Arial,sans-serif;border:1px solid #cbd6e2;border-radius:4px;background:#fff;color:var(--blue);cursor:pointer}.controls button:disabled{opacity:.38;cursor:default}.controls button.primary{grid-column:1/-1;background:var(--blue);border-color:var(--blue);color:white;font-size:14px;min-height:46px}.controls button:not(:disabled):hover{filter:brightness(.94)}.controls button:focus-visible,a:focus-visible{outline:3px solid #81a9d4;outline-offset:3px}.history-area{border-top:1px solid var(--border);padding-top:16px}.history-area h3{margin:0 0 11px;font:600 12px Arial,sans-serif;text-transform:uppercase;letter-spacing:.08em;color:#52657b}.history-area ol{margin:0;padding-left:22px;font:13px/1.8 Arial,sans-serif;color:#485c6f}.history-area li.current{color:var(--blue);font-weight:700}.history-area .empty{list-style:none;margin-left:-22px;color:#9aa5b1;font-style:italic}.small-note{margin:auto 0 0;padding-top:24px;font-size:12px;line-height:1.6;color:#8a96a4}.canvas-side{min-width:0;display:flex;flex-direction:column;padding:25px clamp(10px,2.4vw,35px) 20px}.canvas-top{padding-bottom:19px}.plot-holder{flex:1;display:flex;align-items:center;justify-content:center;min-height:450px}.plot-holder svg{display:block;width:100%;max-height:670px;height:auto;overflow:visible}.canvas-bottom{border-top:1px solid var(--border);padding-top:13px;letter-spacing:0;text-transform:none;font-weight:400}footer{padding:25px 0;text-align:center;color:#87909b;font:12px Arial,sans-serif}@media(max-width:860px){.workspace{grid-template-columns:1fr}.canvas-side{grid-row:1;padding:18px}.notebook{grid-row:2;border-right:0;border-top:1px solid var(--border)}.plot-holder{min-height:0}.plot-holder svg{max-height:550px}.step-info{min-height:0}.intro{margin:30px 0 20px}}@media(max-width:440px){.shell{padding:16px 10px}.top span{font-size:9px;text-align:right}.notebook{padding:19px}.canvas-bottom{font-size:10px;flex-wrap:wrap}h1{font-size:29px}}@media(prefers-reduced-motion:reduce){.curve{animation:none!important}}
/* v34 — a warmer, playful sketchbook rather than a dashboard */
:root{--blue:#426c97;--ink:#39352f;--muted:#7b746b;--border:#e3d6c7;--cream:#fff7e9}
body{background:#f9f3e9;color:var(--ink)}
.shell{max-width:1410px}
.top{color:#89796b}
.intro{margin:38px 0 29px}
.intro h1{font-weight:500;letter-spacing:-.025em}
.intro>p:last-child{max-width:770px;color:#6c625a;font-size:16px}
.workspace{border:1px solid #dccab6;border-radius:15px;background:#fffaf2;box-shadow:0 14px 36px #8a684512;overflow:hidden}
.notebook{background:#fff5e6;border-right-color:#e0cfbb}
.canvas-side{background:#fffdf8}
.notebook-title,.canvas-top,.canvas-bottom{color:#8a7463}
.step-kicker{color:#96633c}
.step-info h2{color:#49382c}
.step-info>p:not(.step-kicker){color:#766454}
.math-line{background:#fffdf8;border-left:3px solid #b77e4b;color:#5d4534;border-radius:0 7px 7px 0}
.controls button{border-radius:22px;background:#fffbf4;color:#78583d;border-color:#ddc7b0}
.controls button.primary{background:#98653d;border-color:#98653d;color:#fff}
.history-area h3{color:#6d594a}
.history-area ol{color:#7a6553}
.history-area li.current{color:#98653d}
.small-note{color:#938273}
.canvas-bottom{color:#927f70}
.eyebrow{color:#a06e46}
@media(max-width:860px){.notebook{border-top-color:#e0cfbb}}

/* v35: freely selectable body parts; selected controls double as remove toggles. */
.parts-area{border-top:1px solid var(--border);padding-top:17px}
.parts-area h3{margin:0 0 13px;font:600 12px Arial,sans-serif;letter-spacing:.07em;text-transform:uppercase;color:#6d594a}
.part-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.part-choice{border:1px solid #d9c5b0;border-radius:12px;padding:11px 5px;min-height:43px;background:#fffcf6;color:#77573f;font:600 12px Arial,sans-serif;cursor:pointer;transition:background .15s,border-color .15s;position:relative}
.part-choice:hover{background:#f5e7d4}
.part-choice.selected{background:#ad7b51;border-color:#a36e45;color:white}
.part-choice.selected:before{content:'✓';margin-right:5px}
.part-choice.focused{outline:2px solid #6e8ca9;outline-offset:2px}
.part-choice:focus-visible{outline:3px solid #81a9d4;outline-offset:2px}
.choice-hint{font-size:12px;color:#8c7664;margin:12px 0 0;line-height:1.5}
.controls{display:block;margin:15px 0 25px}.controls button{width:100%}
.step-info{min-height:235px}
@media(max-width:400px){.part-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v36: one fixed-position interactive equation row per bear part. */
.panel-intro{margin:17px 0 16px;color:#806b59;font-size:13px;line-height:1.6}
.equation-rows{display:flex;flex-direction:column;gap:10px}
.equation-row{display:block;width:100%;min-width:0;text-align:left;border:1px solid #decab4;border-radius:11px;background:#fffcf7;color:#624c3b;padding:13px 14px;cursor:pointer;transition:background .15s,border-color .15s;box-shadow:0 2px 6px #8a684508}
.equation-row:hover{background:#f9ecdc;border-color:#be9b79}
.equation-row:focus-visible{outline:3px solid #81a9d4;outline-offset:2px}
.equation-row.selected{background:#fff7ec;border-color:#b77e4b}
.row-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.row-heading{font:600 14px/1.4 Arial,sans-serif}
.row-symbol{font:500 20px/1 Arial,sans-serif;color:#ad784e}
.row-maths{display:block;margin-top:12px;padding-top:11px;border-top:1px solid #ead9c8;min-width:0}
.row-maths[hidden]{display:none}
.row-kind{display:block;margin-bottom:7px;color:#9b704c;font:700 10px/1.5 Arial,sans-serif;letter-spacing:.07em}
.row-equation{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.6 'Cambria Math','STIX Two Math',Georgia,serif;color:#644b36;margin:4px 0}
.notebook .controls{margin:15px 0 0}
.notebook .controls button{width:100%}
@media(max-width:860px){.equation-rows{gap:9px}}

/* v37: fixed-size equation slots; no expanding accordion or status dashboard. */
.free-heading{font:500 24px/1.3 Georgia,'Times New Roman',serif;color:#49382c;margin:0 0 9px}
.free-intro{margin:0 0 23px;font:14px/1.65 Georgia,'Times New Roman',serif;color:#806b59}
.free-intro strong{color:#6d4b32}
.equation-rows{gap:12px}
.equation-row{display:grid;grid-template-columns:72px minmax(0,1fr) 16px;align-items:center;column-gap:10px;min-height:101px;height:101px;padding:10px 11px;overflow:hidden}
.row-top{display:contents}
.row-heading{grid-column:1;grid-row:1;font-size:13px}
.row-symbol{grid-column:3;grid-row:1;font-size:17px;justify-self:end}
.row-maths,.row-maths[hidden]{grid-column:2;grid-row:1;display:block;margin:0;padding:0;border:0;min-width:0;max-height:100%;overflow:auto;scrollbar-width:thin}
.row-maths[hidden]{visibility:hidden}
.row-kind{font-size:9px;line-height:1.4;margin:0 0 2px}
.row-equation{font-size:11.5px;line-height:1.45;margin:2px 0}
.notebook .controls{margin:16px 0 0}
@media(max-width:480px){.equation-row{grid-template-columns:62px minmax(0,1fr) 13px;column-gap:7px;padding:8px;height:108px;min-height:108px}.row-heading{font-size:12px}.row-equation{font-size:10.5px}.free-heading{font-size:22px}}

/* v38: greater emphasis on the mathematical notebook and compact graph. */
.intro>p:last-child{max-width:none;width:100%}
.workspace{grid-template-columns:minmax(0,48%) minmax(0,52%)}
.notebook{padding:25px clamp(18px,2vw,30px)}
.canvas-side{padding:25px clamp(12px,1.5vw,23px) 20px}
.plot-holder{min-height:0;flex:0 1 auto;align-items:flex-start;justify-content:center;padding:10px 0 0}
.plot-holder svg{width:100%;max-width:585px;max-height:none;height:auto}
.equation-row{grid-template-columns:86px minmax(0,1fr) 16px;column-gap:12px;height:124px;min-height:124px}
.row-equation{white-space:nowrap;overflow:visible;margin:4px 0 2px}
.row-equation img{display:block;width:auto;max-width:none;height:22px;object-fit:contain;object-position:left center}
.row-maths{overflow-x:auto;overflow-y:hidden}
.row-kind{font-size:10px}
@media(max-width:860px){.workspace{grid-template-columns:1fr}.plot-holder svg{width:100%;max-width:570px}.equation-row{height:118px;min-height:118px}}
@media(max-width:480px){.equation-row{grid-template-columns:65px minmax(0,1fr) 13px;height:120px;min-height:120px}.row-equation img{height:19px}}

/* v39: mathematics wrapped around the bear — nine fixed-position cards, no side notebook. */
.surrounded-workspace{display:block;min-height:0;padding:26px clamp(16px,2.5vw,36px);overflow:visible}
.play-intro{text-align:center;margin:0 auto 22px}
.play-intro h2{font:500 clamp(23px,2.4vw,30px)/1.25 Georgia,serif;color:#49382c;margin:0 0 6px}
.play-intro p{margin:0;color:#806b59;font-size:15px}
.play-intro strong{color:#6d4b32}
.bear-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,1.4fr) minmax(0,1fr);grid-template-rows:auto repeat(3,minmax(196px,auto));gap:16px;align-items:stretch}
.bear-slot{min-width:0;display:flex;align-items:stretch}
.slot-ears{grid-area:1/1}.slot-head{grid-area:1/2}.slot-eyes{grid-area:1/3}
.slot-arms{grid-area:2/1}.slot-nose{grid-area:2/3}
.slot-feet{grid-area:3/1}.slot-smile{grid-area:3/3}
.slot-body{grid-area:4/1}.slot-bow{grid-area:4/3}
.bear-plot{grid-area:2/2/5/3;min-width:0;display:flex;flex-direction:column;align-self:center;background:#fffdf8;border:1px solid #e7d6c3;border-radius:18px;padding:12px 11px;box-shadow:0 6px 24px #8a68450c}
.bear-plot .plot-holder{display:block;padding:0;min-height:0}
.bear-plot .plot-holder svg{max-width:none;width:100%;height:auto;display:block}
.bear-plot .canvas-bottom{gap:10px;flex-wrap:wrap;font-size:10px;line-height:1.6}
.bear-slot .equation-row{width:100%;height:100%;min-height:142px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:17px 16px;border-radius:15px;text-align:left;overflow:hidden}
.bear-slot .row-top{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px}
.bear-slot .row-heading{font-size:16px}
.bear-slot .row-symbol{font-size:20px}
.bear-slot .row-maths,.bear-slot .row-maths[hidden]{display:block;width:100%;max-height:none;margin:0;padding:0;border:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.bear-slot .row-maths[hidden]{visibility:hidden}
.bear-slot .row-kind{font-size:10px;line-height:1.45;margin-bottom:8px;white-space:normal}
.bear-slot .row-equation{margin:5px 0;display:block;overflow:visible}
.bear-slot .row-equation img{width:auto;max-width:none;height:23px;object-fit:contain;object-position:left center}
.play-actions{text-align:center;margin:20px 0 0}
.play-actions button{border-radius:30px;background:#fffaf3;color:#79583d;border:1px solid #ddc7b0;padding:11px 24px;font:600 13px Arial,sans-serif;cursor:pointer}
.play-actions button:disabled{opacity:.4;cursor:default}
.play-actions button:focus-visible{outline:3px solid #81a9d4;outline-offset:2px}
@media(max-width:1060px){
 .bear-stage{grid-template-columns:minmax(0,1fr) minmax(310px,1.45fr) minmax(0,1fr);gap:10px}
 .bear-slot .equation-row{padding:12px 10px}
 .bear-slot .row-heading{font-size:14px}
 .bear-slot .row-equation img{height:20px}
}
@media(max-width:800px){
 .bear-stage{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;gap:10px}
 .bear-plot{grid-area:auto;grid-column:1/-1;grid-row:1;max-width:560px;width:100%;justify-self:center}
 .bear-slot{grid-area:auto!important}
 .bear-slot .equation-row{min-height:145px}
 .surrounded-workspace{padding:18px 12px}
}
@media(max-width:480px){
 .bear-stage{grid-template-columns:1fr}
 .bear-plot{grid-column:1}
 .bear-slot .equation-row{min-height:108px}
 .bear-slot .row-equation img{height:22px}
 .play-intro p{font-size:14px}
}

/* v40 — Normalised TeX sizing: natural SVG ratios, not a uniform image height.
   A wide equation can shrink to its card, but never produces a horizontal scrollbar. */
.bear-slot .row-maths,.bear-slot .row-maths[hidden]{overflow-x:hidden;overflow-y:hidden}
.bear-slot .row-equation{width:100%;max-width:100%;white-space:normal;overflow:hidden;margin:6px 0}
.bear-slot .row-equation img{display:block;width:auto;height:auto;max-width:100%;object-fit:contain;object-position:left center}
@media(max-width:1060px){.bear-slot .row-equation img{height:auto;max-width:100%}}
@media(max-width:480px){.bear-slot .row-equation img{height:auto;max-width:100%}}

/* v41 — consistent displayed math scale across equation SVGs.
   Intrinsic SVG heights differed by formula; fixed display height removes that variance,
   while width remains proportional and may shrink to fit narrow cards. */
.bear-slot .row-equation img { width:auto; height:24px; max-width:100%; max-height:24px; object-fit:contain; object-position:left center; }
@media(max-width:1060px){.bear-slot .row-equation img{height:22px;max-height:22px}}
@media(max-width:480px){.bear-slot .row-equation img{height:22px;max-height:22px}}

/* v42 — Correct math typography: SVGs were all typeset at one 14 pt
   source size. Never normalise their image *height*, since doing so
   enlarges short formulae and shrinks tall fractions. Respect the
   original intrinsic SVG dimensions, limiting only the available width. */
.bear-slot .row-equation img,
.bear-slot .row-equation img[style] {
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:none;
  object-fit:contain;
  object-position:left center;
}
@media(max-width:1060px){.bear-slot .row-equation img{width:auto;height:auto;max-height:none;max-width:100%}}
@media(max-width:480px){.bear-slot .row-equation img{width:auto;height:auto;max-height:none;max-width:100%}}

/* v43: bring surrounding mathematics closer to its central plot.
   A defined desktop track height prevents formula cards stretching to
   fill excessive empty vertical space; the Cartesian plane fits the
   three-row opening without cutting off its axes. */
.intro>p:last-child{max-width:none;width:100%;margin:7px 0 0;color:#806b59;font-size:16px;line-height:1.6}
.intro>p strong{color:#6d4b32}
.play-intro{margin-bottom:16px}
.bear-stage{grid-template-rows:repeat(4,158px);gap:14px}
.bear-slot .equation-row{min-height:0;padding:14px 16px;gap:6px}
.bear-slot .row-kind{margin-bottom:5px}
.bear-slot .row-equation{margin:4px 0}
.bear-plot{align-self:stretch;min-height:0;padding:9px 10px}
.bear-plot .plot-holder{display:flex;min-height:0;flex:1;align-items:center;justify-content:center;overflow:hidden}
.bear-plot .plot-holder svg{height:100%;width:100%;max-width:100%;max-height:100%;display:block}
.bear-plot .canvas-bottom{flex-shrink:0}
@media(max-width:1060px) and (min-width:801px){
 .bear-stage{grid-template-rows:repeat(4,168px);gap:10px}
 .bear-slot .equation-row{padding:12px 10px}
}
@media(max-width:800px){
 .bear-stage{grid-template-rows:auto;gap:10px}
 .bear-plot{align-self:center;min-height:0}
 .bear-plot .plot-holder{display:block;overflow:visible}
 .bear-plot .plot-holder svg{width:100%;height:auto;max-height:none}
 .bear-slot .equation-row{min-height:145px;padding:12px 13px}
}
@media(max-width:480px){.bear-slot .equation-row{min-height:108px}}

/* v44 — compact creative experience header, matching the pub page's spatial hierarchy. */
.shell{max-width:none;padding:14px clamp(16px,2vw,36px) 16px}
.top{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;column-gap:16px;min-height:39px}
.top a{justify-self:start;font:600 15px/1.3 Georgia,serif;letter-spacing:0}
.top h1{margin:0;justify-self:center;text-align:center;font:600 clamp(20px,1.65vw,27px)/1.25 Georgia,serif;letter-spacing:0;color:#49382c}
.top span{justify-self:end;font:700 11px/1.35 Arial,sans-serif;letter-spacing:.09em;white-space:nowrap}
.experience-description{margin:9px 0 14px;color:#806b59;font:15px/1.5 Georgia,serif}
.experience-description strong{color:#6d4b32}
.surrounded-workspace{padding:14px clamp(12px,1.8vw,26px)}
.play-actions{margin-top:13px}
footer{padding:13px 0}
@media(max-width:700px){
 .top{grid-template-columns:minmax(0,1fr) auto;row-gap:6px}
 .top h1{grid-column:1/-1;grid-row:2;justify-self:start;text-align:left;font-size:24px}
 .top span{grid-column:2;grid-row:1;font-size:10px}
 .experience-description{font-size:14px;margin:10px 0 12px}
}

/* v45 — construction-first arrangement. Head + Body are the first two
   controls encountered, while the graph remains in the central bay.
   Remove the unnecessary outer workspace frame; retain every card border. */
.surrounded-workspace{
  border:0;
  border-radius:0;
  box-shadow:none;
  background:transparent;
  padding:0;
  overflow:visible;
}
.slot-head{grid-area:1/1}
.slot-body{grid-area:1/2}
.slot-ears{grid-area:1/3}
.slot-arms{grid-area:2/1}
.slot-eyes{grid-area:2/3}
.slot-feet{grid-area:3/1}
.slot-nose{grid-area:3/3}
.slot-bow{grid-area:4/1}
.slot-smile{grid-area:4/3}
@media(max-width:800px){
  .bear-slot{grid-area:auto!important}
  .surrounded-workspace{padding:0}
}


/* v46 — polish the copy and strengthen the plot footer without changing the surrounding geometry. */
.experience-description{font-size:16px;line-height:1.55;max-width:none}
.bear-plot{padding:8px 10px 7px}
.bear-plot .canvas-bottom{padding-top:9px;font-size:12px;line-height:1.35;align-items:flex-start}
.bear-plot .canvas-bottom span:last-child{font-size:13px;color:#7c5b40}
@media(max-width:700px){.experience-description{font-size:15px;line-height:1.5}}
@media(max-width:480px){.bear-plot .canvas-bottom{font-size:11px;line-height:1.35}.bear-plot .canvas-bottom span:last-child{font-size:12px}}

/* v47 — modestly tighter desktop geometry. Keep the entire SVG's aspect ratio
   (default preserveAspectRatio=xMidYMid meet) and the central plot aligned
   with the surrounding cards; do not crop or distort the mathematics. */
@media(min-width:1061px){
  .bear-stage{grid-template-rows:repeat(4,144px);gap:12px}
  .bear-slot .equation-row{padding:12px 15px;gap:5px}
  .bear-slot .row-kind{margin-bottom:4px}
  .bear-slot .row-equation{margin:3px 0}
}
@media(min-width:801px) and (max-width:1060px){
  .bear-stage{grid-template-rows:repeat(4,154px);gap:10px}
}

/* v48 — tighter surrounding controls; preserve native equation SVG scale and plot ratio. */
@media(min-width:1061px){
  .bear-stage{grid-template-rows:repeat(4,132px);gap:10px}
  .bear-slot .equation-row{padding:9px 13px;gap:3px}
  .bear-slot .row-kind{margin-bottom:2px;line-height:1.3}
  .bear-slot .row-equation{margin:2px 0}
}
@media(min-width:801px) and (max-width:1060px){
  .bear-stage{grid-template-rows:repeat(4,146px);gap:9px}
  .bear-slot .equation-row{padding:10px 11px;gap:4px}
  .bear-slot .row-kind{margin-bottom:3px}
  .bear-slot .row-equation{margin:3px 0}
}

/* v49 — constrain the central canvas to its allocated grid tracks.
   Grid tracks, not the SVG's intrinsic aspect ratio, determine the stage height. */
@media (min-width:1061px) {
  .bear-stage {grid-template-rows:repeat(4,minmax(0,132px)); align-items:stretch;}
  .bear-plot {align-self:stretch; min-height:0; min-width:0; height:100%; overflow:hidden;}
  .bear-plot .plot-holder {position:relative; flex:1 1 0; min-height:0; min-width:0; overflow:hidden;}
  .bear-plot .plot-holder svg {display:block; width:100%; height:100%; min-height:0; max-width:100%; max-height:100%;}
  .bear-slot {min-height:0;}
  .bear-slot .equation-row {min-height:0; max-height:100%;}
}
@media (min-width:801px) and (max-width:1060px) {
  .bear-stage {grid-template-rows:repeat(4,minmax(0,146px)); align-items:stretch;}
  .bear-plot {align-self:stretch; min-height:0; min-width:0; height:100%; overflow:hidden;}
  .bear-plot .plot-holder {flex:1 1 0; min-height:0; min-width:0; overflow:hidden;}
  .bear-plot .plot-holder svg {display:block;width:100%;height:100%;max-width:100%;max-height:100%;}
  .bear-slot {min-height:0;}
  .bear-slot .equation-row {min-height:0;max-height:100%;}
}

/* v50 — content-informed desktop row tracks, not four identical heights.
   The Nose receives the tallest row; the superellipses use the shortest.
   The plot remains constrained to the grid area defined by rows 2–4. */
@media (min-width:1061px) {
  .bear-stage { grid-template-rows: minmax(0,102px) minmax(0,126px) minmax(0,138px) minmax(0,118px); gap:10px; }
}
@media (min-width:801px) and (max-width:1060px) {
  .bear-stage { grid-template-rows: minmax(0,118px) minmax(0,145px) minmax(0,154px) minmax(0,139px); gap:9px; }
}


/* v51 — retain v50 layout while moving space from the shortened Nose row
   to the Bow tie row. Total desktop stage height does not change. */
@media(min-width:1061px){
  .bear-stage{grid-template-rows:minmax(0,102px) minmax(0,126px) minmax(0,116px) minmax(0,140px)}
}
@media(min-width:801px) and (max-width:1060px){
  .bear-stage{grid-template-rows:minmax(0,118px) minmax(0,145px) minmax(0,134px) minmax(0,159px)}
}


/* v52 — centre equation-card content in both directions while keeping the toggle at the top-right. */
.bear-slot .equation-row{
  position:relative;
  justify-content:center;
  align-items:center;
  text-align:center;
}
.bear-slot .row-top{
  position:static;
  width:100%;
  justify-content:center;
  align-items:center;
  text-align:center;
}
.bear-slot .row-heading{
  display:block;
  width:100%;
  text-align:center;
}
.bear-slot .row-symbol{
  position:absolute;
  top:12px;
  right:16px;
  line-height:1;
}
.bear-slot .row-maths,
.bear-slot .row-maths[hidden]{
  width:100%;
  text-align:center;
}
.bear-slot .row-kind{
  text-align:center;
}
.bear-slot .row-equation{
  display:flex;
  justify-content:center;
  align-items:center;
}
.bear-slot .row-equation img{
  margin-left:auto;
  margin-right:auto;
}
@media(max-width:1060px){
  .bear-slot .row-symbol{top:10px; right:12px}
}
@media(max-width:480px){
  .bear-slot .row-symbol{top:10px; right:11px}
}

/* v73: match the Creative project heading format and title size used by
   A Very British Day and Where's Ian?; retain the bear's own page styling. */
.top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;min-height:38px;letter-spacing:normal}
.top>a{justify-self:start;font-size:clamp(.87rem,1.1vw,1rem);white-space:nowrap;color:inherit}
.top .project-label{font:700 clamp(.98rem,1.35vw,1.28rem)/1.5 Georgia,'Times New Roman',serif;text-align:center;white-space:nowrap;color:var(--ink)}
.top .phase{justify-self:end;font:600 .7rem/1.5 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);white-space:nowrap}
@media(max-width:700px){
 .top{grid-template-columns:1fr auto;min-height:40px;gap:8px}
 .top>a{white-space:normal;overflow-wrap:break-word}
 .top .project-label{justify-self:end;font-size:.95rem;white-space:normal;text-align:right}
 .top .phase{display:none}
}


/* v74 - exact visual alignment with the British Day / Where's Ian? header. */
.top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;min-height:38px;letter-spacing:normal}
.top>a{justify-self:start;font:400 clamp(.87rem,1.1vw,1rem)/1.5 Georgia,'Times New Roman',serif;letter-spacing:normal;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.top .project-label{justify-self:center;font:700 clamp(.98rem,1.35vw,1.28rem)/1.5 Georgia,'Times New Roman',serif;letter-spacing:0;text-align:center;white-space:nowrap;color:var(--ink)}
.top .phase{justify-self:end;font:600 .7rem/1.5 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}
@media(max-width:700px){
 .top{grid-template-columns:1fr auto;min-height:40px;gap:8px}
 .top>a{white-space:normal;overflow-wrap:break-word}
 .top .project-label{justify-self:end;font-size:.95rem;white-space:normal;text-align:right}
 .top .phase{display:none}
}

/* v75 - match the actual Where's Ian? header position, not just its type.
   Keep the bear's content/workspace geometry untouched. */
@media (min-width:701px){
  .top{
    transform:translateY(-6px);
    margin-left:calc(clamp(10px,1.2vw,24px) - clamp(16px,2vw,36px));
    margin-right:calc(clamp(10px,1.2vw,24px) - clamp(16px,2vw,36px));
  }
}
