:root{
  color-scheme:light;
  --ground:#bfd4b2;
  --wood:#c99c66;--wood-edge:#a47945;--wood-dark:#6f4a2a;
  --ink:#17191c;--muted:#474b53;
  --bronze:#7c5a24;--red:#c8281f;--red-ink:#a8201a;
  --stone:#ffffff;--stone-side:#d6d1c9;--graphite:#1b1c1f;
  --glass:rgba(255,255,255,.72);--frost:blur(32px) saturate(.3);--hair:rgba(23,25,28,.14);
  --rim:rgba(255,255,255,.45);--lip:inset 0 1px #fff,inset 0 -1px rgba(36,84,66,.2),inset 0 16px 16px -16px #fff;
  --lift:0 1px rgba(36,84,66,.12),0 20px 32px -16px rgba(18,40,30,.34),0 48px 72px -36px rgba(18,40,30,.3);
  --display:'Cormorant Garamond',Georgia,serif;--text:'Hanken Grotesk',system-ui,sans-serif;
  --u:28px;
  /* seal: stone radius, gap to socket, centre y, ring radius. The socket's centre x, --sx, is set with the cards below. */
  --sr:28px;--sg:4px;--sc:calc(var(--sr) - 4px);--rr:640px;
  /* the header card's bottom plus 8px, measured again by stage.js */
  --head:100px;
}
@media (max-width:519px){:root{--head:126px}}
@media (max-width:639px){:root{--u:20px;--sr:22px;--rr:400px}}
@media (prefers-reduced-transparency:reduce){:root{--glass:#f4f7f9;--frost:none}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root{--glass:#f4f7f9}}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{overflow-x:clip}
:where(body,h1,h2,h3,p,figure,ul){margin:0}
:where(ul){padding:0;list-style:none}
img{display:block;max-width:100%;height:auto}
body{background:var(--ground);font:400 17px/28px var(--text);color:var(--ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
::selection{background:var(--red);color:#fff}

.page{position:relative;z-index:1;width:min(100% - 24px,720px);margin-inline:auto;padding:12px 0}
.page,main,.hero,.beat{pointer-events:none}
.hero{height:calc(100vh - var(--head) + 9px);height:calc(100svh - var(--head) + 9px)}
/* a beat is the gap between two cards, its piece set in the next card's socket */
.beat{height:48px}
:where(header.top,footer.foot,main>section:not(.hero,.beat),.play-bar,.prop-tip){pointer-events:auto;padding:32px;background:var(--glass);-webkit-backdrop-filter:var(--frost);backdrop-filter:var(--frost);border:1px solid var(--rim);border-radius:16px;box-shadow:var(--lip),var(--lift)}
/* a card after a beat carries that beat's piece in a socket cut through its top edge, so its glass moves to ::before to be masked */
.beat{position:relative}
.beat+section{position:relative;z-index:0;overflow:hidden;overflow:clip;padding-top:calc(2*var(--sr) + 16px);border-color:#0000;background:none;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:var(--lift);scroll-margin-top:24px}
.beat+section::before{
  --h:calc(var(--sr) + var(--sg));--c1:var(--sx) var(--sc);--c2:var(--sx) calc(var(--sc) + var(--sr)*10/92);
  content:"";position:absolute;inset:-1px;z-index:-1;border:1px solid var(--rim);border-radius:inherit;pointer-events:none;
  background:radial-gradient(circle at var(--c1),#2454422e calc(var(--h) + 1px),#fffe calc(var(--h) + 2px),#fff0 calc(var(--h) + 3px)),radial-gradient(circle at var(--c2),#2454422e calc(var(--h) + .5px),#fffe calc(var(--h) + 1.5px),#fff0 calc(var(--h) + 2.5px)),var(--glass);background-origin:border-box;
  -webkit-backdrop-filter:var(--frost);backdrop-filter:var(--frost);box-shadow:var(--lip);
  mask:radial-gradient(circle at var(--c1),#0000 var(--h),#000 calc(var(--h) + 1px)),radial-gradient(circle at var(--c2),#0000 calc(var(--h) - .5px),#000 calc(var(--h) + .5px));mask-composite:intersect
}
.seal .disc-wall{fill:var(--stone-side)}
.seal{position:absolute;z-index:1;left:calc(var(--sx) - var(--sr));top:calc(100% + var(--sc) - var(--sr));width:calc(2*var(--sr));aspect-ratio:92/97;overflow:visible}
:where(main>section:not(.hero,.beat))+:where(main>section:not(.hero,.beat)),main+footer.foot{margin-top:0;border-top-color:var(--hair);border-radius:0 0 16px 16px}
#contact{border-radius:16px 16px 0 0}
:where(main>section:not(.hero,.beat))>*+*{margin-top:var(--u)}
:where(main>section:not(.hero,.beat)) :is(h2,h3)+*{margin-top:16px}
:where(main>section:not(.hero,.beat)) :is(h2,h3)+.meta{margin-top:8px}
:where(header.top,footer.foot,main>section) p{max-width:62ch}
section{scroll-margin-top:16px}
#main:focus{outline:none}

h1,h2,h3{font-family:var(--display);font-variant-numeric:lining-nums;text-wrap:balance}
h2{font-size:56px;line-height:58px;font-weight:500;letter-spacing:-.015em}
h3{font-size:32px;line-height:36px;font-weight:600;letter-spacing:-.005em}
p{text-wrap:pretty}
a{border-radius:4px;color:var(--ink);text-decoration:underline 1px var(--bronze);text-underline-offset:4px}
a:focus-visible{color:var(--red);text-decoration-color:var(--red)}
:focus-visible{outline:2px solid var(--bronze);outline-offset:3px}

.vh,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:absolute;left:12px;top:12px;z-index:3;display:flex;align-items:center;min-height:44px;padding:0 20px;background:var(--stone);border:1px solid var(--hair);border-radius:10px;box-shadow:0 8px 24px rgba(23,25,28,.16);font-weight:600;text-decoration:none}

.cols{display:grid;gap:16px}
.prose>*+*{margin-top:16px}
.note,.fig figcaption{font-size:14px;line-height:20px;color:var(--muted)}
.meta{font-size:15px;line-height:24px;color:var(--muted)}

.fig-frame{position:relative;aspect-ratio:var(--ar,3/2);overflow:hidden;border:1px solid var(--hair);border-radius:10px;background:var(--hair)}
.fig-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.fig figcaption{margin-top:10px}


.links{display:flex;flex-wrap:wrap;column-gap:var(--u);font-size:15px;line-height:24px;font-weight:500}
.links a{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:44px}
.ico{flex:none;width:16px;height:16px;fill:currentColor}
.links a::before{content:"";position:absolute;inset:0 min(0px,(100% - 44px)/2)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:11px 22px;border:1px solid transparent;border-radius:10px;background:linear-gradient(rgba(255,255,255,.16),rgba(255,255,255,0) 50%) var(--red);color:#fff;font:600 16px/24px var(--text);text-align:center;text-decoration:none;cursor:pointer;box-shadow:inset 0 1px rgba(255,255,255,.35),inset 0 -1px rgba(100,12,8,.25),0 8px 16px -8px rgba(142,26,20,.5)}
.btn:focus-visible{color:#fff}
.btn--quiet{background:var(--glass);border-color:var(--hair);color:var(--ink);box-shadow:none}
.btn--quiet:focus-visible{color:var(--ink)}

.pc{color:var(--graphite)}
.pc--red{color:var(--red)}
.pc-body{fill:var(--stone);stroke:var(--stone-side)}
.pc-ring{fill:none;stroke:currentColor;stroke-opacity:.45}
.pc-body,.pc-ring{stroke-width:1px;vector-effect:non-scaling-stroke}

@media (hover:hover){
  a{transition:color .15s,text-decoration-color .15s}
  a:hover{color:var(--red);text-decoration-color:var(--red)}
  .btn{transition:background-color .15s,border-color .15s}
  .btn:hover{color:#fff;background-color:color-mix(in oklab,var(--red),#000 16%)}
  .btn--quiet:hover{color:var(--ink);background:var(--stone);border-color:var(--bronze)}
}

@media (min-width:480px){.cols{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:639px){
  h2{font-size:40px;line-height:42px}
  h3{font-size:26px;line-height:30px}
  :where(header.top,footer.foot,main>section:not(.hero,.beat)){padding:20px}
}
@media (prefers-reduced-motion:no-preference){
  html.js .beat:not(.in,:has(+:target)) .seal{opacity:0;transform:translateY(-24px) scale(1.1)}
  .drop .seal{transition:transform .5s cubic-bezier(.2,.6,.35,1),opacity .2s}
  /* as the stone lands, one ring of light spreads from it across its own card */
  .drop+section::after{content:"";position:absolute;z-index:-1;left:calc(var(--sx) - var(--rr));top:calc(var(--sc) - var(--rr));width:calc(2*var(--rr));aspect-ratio:1;border-radius:50%;background:radial-gradient(closest-side,#fff0 80%,rgba(255,255,255,.6) 92%,#fff0);opacity:0;pointer-events:none;animation:ring 1.2s .35s cubic-bezier(.2,.6,.35,1)}
}
@keyframes ring{from{transform:scale(.04);opacity:0}15%{opacity:1}to{transform:scale(1);opacity:0}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* ===== the cards: each chapter's piece sits in a socket at the middle of the top edge, then one big label, led by the highlight's pixel art where the chapter has one, then a standfirst with the facts and the logos of the organizations behind it ===== */
:root{--sx:50%}
.lead{display:flex;align-items:center;gap:20px}
.lead .art{flex:none;width:64px;height:64px;image-rendering:pixelated}
.lead h2{font-size:44px;line-height:48px}
.deck{max-width:none;font:500 22px/32px var(--display);font-variant-numeric:lining-nums;color:var(--ink);text-wrap:pretty}
.deck b{font-weight:600;color:var(--red-ink)}
.deck a{text-decoration-color:var(--bronze)}
/* the organizations behind a chapter, each logo a link to its site */
.orgs{display:flex;flex-wrap:wrap;align-items:center;gap:4px 28px;max-width:none}
.orgs a{display:inline-flex;align-items:center;gap:10px;min-height:44px;font:600 18px/1 var(--display);text-decoration:none}
.orgs img{flex:none;width:auto;height:24px}
.orgs .word{height:22px}
.orgs .px{height:28px;image-rendering:pixelated}
.orgs .sub{font:500 15px/24px var(--text);gap:8px}
@media (hover:hover){.orgs a{transition:opacity .15s}.orgs a:hover{opacity:.7}}
@media (max-width:639px){
  .lead{gap:14px}
  .lead .art{width:48px;height:48px}
  .lead h2{font-size:30px;line-height:34px}
  .deck{font-size:19px;line-height:28px}
  .orgs{column-gap:20px}
}

@property --b{syntax:'<length>';inherits:true;initial-value:0px}
@property --tx{syntax:'<length>';inherits:true;initial-value:0px}
@property --ty{syntax:'<length>';inherits:true;initial-value:0px}
@property --k{syntax:'<number>';inherits:true;initial-value:1}
@property --K{syntax:'<number>';inherits:true;initial-value:16}
@property --fx{syntax:'<number>';inherits:true;initial-value:4}
@property --fy{syntax:'<number>';inherits:true;initial-value:4.5}
@property --T{syntax:'<angle>';inherits:true;initial-value:50deg}
@property --x{syntax:'<number>';inherits:false;initial-value:0}
@property --y{syntax:'<number>';inherits:false;initial-value:0}

/* --b is one board cell, --a one art pixel (1/22 cell, whole from 44px up). The opening is centered between the header (--hd) and room for the scroll prompt (--hb): the grandfather, the board, and a strip of table on the viewer's side (--kv art pixels) that holds the viewer's plate and cup. */
.stage{
  --hb:calc(100svh - 56px);--kv:88;--hd:var(--head);
  --fit:min(calc((var(--hb) - var(--hd))/(var(--kv)/22 + 12.27)),7vw);
  --b:max(round(down,var(--fit),22px),min(round(down,var(--fit),1px),43px));
  --a:calc(var(--b)/22);
  --cx:round(50vw,1px);
  --cy:round(calc((var(--hd) + var(--hb) - var(--kv)*var(--a))/2 + 2.085*var(--b)),1px);
  --edge:calc(var(--cy) - 3.04*var(--b));
  /* the camera: the focus point (fx, fy) on the table lands on (tx, ty), seen from K cells away, tilted T. stage.js moves it to each piece stop. */
  --tx:var(--cx);--ty:var(--cy);--st:sin(var(--T));--ct:cos(var(--T));
  --cam:translate(var(--tx),var(--ty)) perspective(calc(var(--K)*var(--k)*var(--b))) rotateX(var(--T)) scale3d(var(--k),var(--k),var(--k)) translate(calc(var(--fx)*var(--b)*-1),calc(var(--fy)*var(--b)*-1));
  position:fixed;inset:0;z-index:0;overflow:hidden;background:#6c9a50
}
.stage img{position:absolute;max-width:none;image-rendering:pixelated}
.stage .bg{width:calc(960*var(--a));left:clamp(calc(100vw - 960*var(--a)),calc(var(--cx) - 480*var(--a)),0px);top:min(0px,round(calc(var(--edge) - 196*var(--a)),1px))}
/* the garden moves: glints drift downstream on the river, the near ones faster. The wind in the leaves and grass is drawn on the canvas by site.js. */
.stage .water{position:absolute;aspect-ratio:960/360;overflow:hidden;-webkit-mask:url(img/scene-bg-water.png) 0 0/100% 100%;mask:url(img/scene-bg-water.png) 0 0/100% 100%}
.stage .water i{position:absolute;left:calc(-480*var(--a));top:0;bottom:0;width:calc(100% + 480*var(--a));background:url(img/scene-bg-glint-far.png) 0 0/calc(480*var(--a)) 100% repeat-x;image-rendering:pixelated}
.stage .water .near{background-image:url(img/scene-bg-glint-near.png)}
.stage .wind{position:absolute;aspect-ratio:960/360;image-rendering:pixelated}
@media (prefers-reduced-motion:no-preference){
  .stage .water .far{animation:flow 96s linear infinite,shimmer 4.3s ease-in-out infinite alternate}
  .stage .water .near{animation:flow 54s linear infinite,shimmer 3.1s ease-in-out -1.4s infinite alternate}
}
@keyframes flow{to{transform:translateX(calc(480*var(--a)))}}
@keyframes shimmer{from{opacity:.55}to{opacity:1}}
.stage .spr--elder{width:calc(138*var(--a));left:calc(var(--cx) - 69*var(--a));top:round(calc(var(--edge) - 114*var(--a)),1px)}

/* Each flat part of the table is its own element under the same camera, so no browser has to sort 3D layers. Units are board cells, the board's far left point is 0 0. */
.stage .sf{position:absolute;left:0;top:0;transform-origin:0 0;transform:var(--cam) translate3d(calc(var(--x)*var(--b)),calc(var(--y)*var(--b)),calc(var(--z,0)*var(--b))) var(--r,);image-rendering:pixelated}
.stage .table{--x:-3.62;--y:-1.62;width:calc(15.24*var(--b));height:calc(14.84*var(--b));border-radius:calc(.2*var(--b));background:var(--wood) 0 0/calc(128*var(--a)) repeat;box-shadow:calc(.3*var(--b)) calc(-.2*var(--b)) calc(.8*var(--b)) rgba(28,48,20,.45),inset 0 var(--a) rgba(255,236,206,.7),inset 0 0 0 var(--a) rgba(90,52,22,.45)}
.stage .table::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgba(206,162,108,.3)}
.stage .table span{position:absolute;z-index:1;border-radius:50%}
.stage .shade{left:calc((var(--x) + 3.87 - var(--s))*var(--b));top:calc((var(--y) + 1.42 - var(--s)*.8)*var(--b));width:calc(2*var(--s)*var(--b));height:calc(1.6*var(--s)*var(--b));background:radial-gradient(closest-side,rgba(60,34,12,.42),rgba(60,34,12,0))}
.stage .table .slab-shadow{left:calc(3.22*var(--b));top:calc(.82*var(--b));width:calc(9.24*var(--b));height:calc(10.24*var(--b));border-radius:0;background:rgba(60,34,12,.3)}
.stage .apron{--x:-3.62;--y:13.22;--r:rotateX(-90deg);width:calc(15.24*var(--b));height:calc(.75*var(--b));background:var(--wood-edge) 0 0/calc(128*var(--a)) repeat;box-shadow:inset 0 0 0 999px rgba(70,40,16,.4),inset 0 var(--a) rgba(255,236,206,.5)}
.stage .slab-front{--x:-.62;--y:9.62;--z:.3;--r:rotateX(-90deg);width:calc(9.24*var(--b));height:calc(.3*var(--b));background:var(--wood-edge) 0 0/calc(64*var(--a)) repeat;box-shadow:inset 0 0 0 999px rgba(80,46,18,.32),inset 0 var(--a) rgba(255,236,206,.5)}
.stage .slab{--x:-.62;--y:-.62;--z:.3;width:calc(9.24*var(--b));height:calc(10.24*var(--b));background:var(--wood) 0 0/calc(64*var(--a)) repeat;box-shadow:inset 0 0 0 var(--a) rgba(255,240,214,.4)}
.stage .slab>*{position:absolute;left:0;top:0;width:100%;height:100%;margin:0}
.stage .lines{overflow:visible;fill:none;stroke:var(--wood-dark);stroke-width:3.4}
.stage .lines .hl{stroke:rgba(255,238,210,.55);transform:translate(2.4px,2.8px)}
.stage .lines .frame{stroke-width:5}
.stage .slab .name{display:flex;left:calc(.62*var(--b));top:calc(4.62*var(--b));width:calc(8*var(--b));height:var(--b);font:600 calc(.5*var(--b))/var(--b) var(--display);letter-spacing:.32em;color:var(--wood-dark);text-shadow:1px 1px rgba(255,238,210,.55)}
.stage .name span{flex:1;padding-left:.32em;text-align:center}
.stage .dots{overflow:visible}
.stage .dots path{fill:none;stroke:var(--red);stroke-width:7;stroke-linecap:round;stroke-dasharray:0 20;opacity:.7}
.stage .dots circle{fill:var(--red);opacity:.75}

/* Pieces and props are flat elements put where the camera projects their table point (x, y, z), q is the perspective scale there, --m fits the element to the table. */
.stage :is(.p,.prop){
  --X:calc(var(--x) - var(--fx));--Y:calc(var(--y) - var(--fy));
  --q:calc(var(--K)/(var(--K) - var(--Y)*var(--st) - var(--z)*var(--ct)));
  --v:calc(var(--Y)*var(--ct) - var(--z)*var(--st));
  position:absolute;left:0;top:0;
  transform:translate(calc(var(--tx) + var(--k)*var(--b)*var(--X)*var(--q)),calc(var(--ty) + var(--k)*var(--b)*var(--v)*var(--q))) var(--m)
}
.stage .prop{--z:0;--m:scale(calc(var(--k)*var(--q)));transform-origin:0 0}
/* --w is a drawing's width in cells and --t how far its table point sits below its top, both from img/scene.json */
.stage .prop img{width:calc(var(--w)*var(--b));left:calc(var(--w)*var(--b)/-2);top:calc(var(--t)*var(--b)*-1)}
.stage .prop .z{--w:var(--wz);--t:var(--tz);opacity:0}
/* the viewer's own plate and cup sit in front of the board, where the play bar goes */
.stage.play :is(.prop--near,.shade--near){opacity:0}
.stage.zoom .prop .z{opacity:1}
.stage.zoom .prop img:not(.z){opacity:0}

/* a stone disc: its side is a capsule under the face, raised by --h. --lz turns a height in cells into a local offset. */
.stage .p{
  --z:.3;--lz:calc(var(--b)*var(--st)/var(--ct)/var(--q));--h:calc(.26*var(--lz));
  --m:matrix(calc(var(--k)*var(--q)),0,calc(var(--k)*var(--X)*var(--q)*var(--q)*var(--st)/var(--K)),calc(var(--k)*var(--q)*(var(--ct) + var(--v)*var(--q)*var(--st)/var(--K))),0,0);
  width:calc(.86*var(--b));height:calc(.86*var(--b));margin:calc(-.43*var(--b)) 0 0 calc(-.43*var(--b))
}
.stage .p::before{content:"";position:absolute;inset:0;border-radius:50%;background:rgba(60,34,12,.34);transform:translate(16%,-12%)}
.stage .p-in{position:absolute;left:0;top:calc(-1*var(--h));width:100%;height:calc(100% + var(--h));border-radius:calc(.43*var(--b));background:linear-gradient(#e4dfd7,var(--stone-side) 55%,#b9b1a5)}
.stage .p-face{position:absolute;left:0;top:0;width:100%;height:auto;aspect-ratio:1;overflow:visible}
.stage .p-face .pc-cut{color:rgba(255,255,255,.9)}
.stage .p[data-hop=a] .p-in{animation:stage-hop-a .6s}
.stage .p[data-hop=b] .p-in{animation:stage-hop-b .6s}
@keyframes stage-hop-a{50%{transform:translateY(calc(-.7*var(--lz)))}}
@keyframes stage-hop-b{50%{transform:translateY(calc(-.7*var(--lz)))}}

/* piece stops: the camera pushes in, the far side drifts up, the props swap to their closer drawing */
.stage.zoom .spr--elder{transform:translateY(-30vh);opacity:0}
.stage.zoom .bg{transform:translateY(-15vh)}

@media (prefers-reduced-motion:no-preference){
  .stage{transition:--tx 1s var(--ease),--ty 1s var(--ease),--k 1s var(--ease),--K 1s var(--ease),--T 1s var(--ease),--fx 1s var(--ease),--fy 1s var(--ease);--ease:cubic-bezier(.3,.1,.2,1)}
  .stage :is(.spr--elder,.bg){transition:transform 1s var(--ease),opacity .6s}
  .stage .prop .z{transition:opacity 1s var(--ease)}
  .stage.zoom .prop img:not(.z){transition:opacity 0s 1s}
  .stage .p{transition:--x .6s cubic-bezier(.45,0,.4,1),--y .6s cubic-bezier(.45,0,.4,1)}
  .stage.jump .p{transition:none}
  html.js .stage.pre .p{visibility:hidden}
  /* --y does not inherit, so the row's delay is handed to the stone's parts as --d */
  .stage .p{--d:calc(var(--y)*80ms)}
  .stage.setup .p-in{animation:stage-land .45s cubic-bezier(.2,.6,.35,1) var(--d) both}
  .stage.setup .p::before{animation:stage-fade .45s var(--d) both}
}
@keyframes stage-land{from{visibility:hidden;transform:translateY(calc(-2.5*var(--lz)))}}
@keyframes stage-fade{from{opacity:0}}

/* play mode: the camera looks straight down, the page steps aside and a bar of controls takes its place */
.stage{-webkit-tap-highlight-color:transparent}
.hero{position:relative}
/* the game's opener reads as a highlight's heading, set in its tile in the highlights */
.play-start{padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.wins .play .art{padding:6px}
.stage .p.gone{visibility:hidden}
/* rings on the stones themselves: the last move, a piece that can be taken, the piece in hand */
.stage .p.last .p-in{box-shadow:0 0 0 calc(.06*var(--b)) rgba(23,25,28,.72)}
.stage .p.prey .p-in{box-shadow:0 0 0 calc(.03*var(--b)) var(--red),0 0 0 calc(.065*var(--b)) #fff,0 0 0 calc(.1*var(--b)) var(--red)}
.stage .p.sel .p-in{box-shadow:0 0 0 calc(.07*var(--b)) var(--red)}
.stage .dots :is(.was,.cur){fill:none;stroke:var(--ink);stroke-width:7;opacity:1}
.stage .dots .was{opacity:.72}
.stage .dots .cur{stroke-dasharray:16 12}
/* seen from above there is no horizon: the backdrop fades out and a lawn fades in over the plain green */
.stage::before{content:"";position:absolute;inset:0;background:0 0/calc(240*var(--a)) repeat;image-rendering:pixelated;opacity:0}
.stage.play::before{background-image:url(img/scene-lawn.png);opacity:1}
.stage.play .bg,.stage.bare :is(.prop,.shade){opacity:0}
/* the status always has its own row with room for two lines, so the bar keeps one height and the board is framed once */
.play-bar{position:fixed;z-index:2;left:max(24px,50vw - 360px);right:max(24px,50vw - 360px);bottom:24px;display:grid;gap:12px;padding:16px 24px 24px}
.play-bar[hidden]{display:none}
.play-status strong,.prop-tip strong{display:block;font:600 26px/30px var(--display);letter-spacing:-.005em}
.play-status p{min-height:48px;font-size:15px;line-height:24px;color:var(--muted)}
.play-tools{display:flex;flex-wrap:wrap;gap:8px}
.play-tools .btn{min-height:44px;padding:9px 16px;font-size:15px}
.play-tools .btn:disabled{opacity:.45;cursor:default}
@media (prefers-reduced-motion:no-preference){
  .stage .p.gone{transition:visibility 0s .5s}
  .stage :is(.prop,.shade){transition:opacity .3s}
  /* the lawn and the backdrop take turns: one is gone before the other shows */
  .stage::before{transition:opacity .2s}
  .stage.play::before{transition:opacity .4s .5s}
  .stage:not(.play) .bg{transition-delay:0s,.2s}
}
html.playing{overflow:hidden}
html.playing :is(.page,.skip){visibility:hidden}

/* a prop's card: the cards' glass, set above the prop by stage.js, and a ring around the prop when the keyboard asks */
.prop-tip{position:fixed;z-index:2;left:0;top:0;width:max-content;max-width:min(260px,100vw - 24px);padding:12px 16px 16px;pointer-events:none;opacity:0;transition:opacity .2s}
.prop-tip.on{opacity:1}
.prop-tip p{margin-top:4px;font-size:15px;line-height:24px;color:var(--muted)}
/* white between two dark rims, so the ring reads on the wood and on the board */
.prop-ring{position:fixed;z-index:2;box-sizing:content-box;margin:-4px;padding:3px;border:1px solid var(--ink);border-radius:8px;outline:2px solid #fff;box-shadow:0 0 0 3px var(--ink);pointer-events:none}
html.playing .tip-key{display:none}

header.top{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;column-gap:var(--u);padding-block:16px}
header.top a{position:relative;display:flex;align-items:center;min-height:44px;white-space:nowrap}
header.top a::before{content:"";position:absolute;inset:0 min(0px,(100% - 44px)/2)}
header.top a:not(:hover,:focus-visible){text-decoration-color:transparent}
header.top .mark{font:600 22px/1 var(--display);letter-spacing:-.005em}
header.top nav{display:flex;margin-right:-10px}
header.top nav a{padding-inline:10px;font-size:15px;line-height:24px;font-weight:500}

/* the scroll prompt at the foot of the first screen: white on a soft shadow and a faint dark glow, so it reads on the wood and on the grass */
.cue{position:absolute;left:0;right:0;bottom:4px;width:max-content;max-width:none;margin-inline:auto;padding:12px 32px;background:radial-gradient(closest-side,rgba(15,22,12,.3),rgba(15,22,12,0));font-size:14px;line-height:20px;font-weight:600;text-align:center;color:#fff;text-shadow:0 0 1px rgba(15,22,12,.9),0 0 3px rgba(15,22,12,.8),0 0 10px rgba(15,22,12,.4)}
.cue::after{content:"";display:block;width:7px;height:7px;margin:3px auto 0;border:solid;border-width:0 2px 2px 0;transform:rotate(45deg);filter:drop-shadow(0 0 2px rgba(15,22,12,.9))}
@media (prefers-reduced-motion:no-preference){.cue::after{animation:cue 2.4s ease-in-out infinite}}
@keyframes cue{50%{translate:0 3px}}


@media (max-width:519px){
  header.top{padding-block:8px}
  header.top nav{flex:1 0 100%;justify-content:space-between;margin-inline:-4px}
  header.top nav a{padding-inline:4px}
}

#work .sv-body{display:grid;gap:var(--u);container-type:inline-size;grid-template-columns:repeat(3,minmax(0,1fr))}
#work .sv-body>*{grid-column:1/-1}
#work .sv-body .fig-frame{aspect-ratio:2/1}
#work .sv-body img{object-position:35% 45%}
:is(#work .sv-text,#pyd,#planned) p:not(.meta,.links)+p{margin-top:16px}
:is(#work,#pyd) figcaption{text-wrap:balance}
#pyd .figs{grid-template-columns:minmax(0,1fr);gap:var(--u) 16px}
@container (min-width:480px) and (max-width:619.98px){
  #work .sv-body .fig{width:calc((100% - 2*var(--u))*2/3 + var(--u))}
  #work .sv-body .fig-frame{aspect-ratio:3/2}
}
@container (min-width:620px){
  #work .sv-body .sv-text{grid-column:span 2}
  #work .sv-body .fig{grid-column:auto;display:flex;flex-direction:column}
  #work .sv-body .fig-frame{flex:1;aspect-ratio:auto}
}
@media (min-width:640px){
  #pyd .figs{grid-template-columns:1176fr 728fr}
}

/* every post shows at once: one row each, picture beside the words from 480px up. The link is the whole row. */
#writing .posts{display:grid;gap:var(--u)}
#writing .posts li{display:grid;grid-template:auto auto 1fr/minmax(0,1fr)}
#writing .posts a{grid-area:1/1/-1/-1;display:grid;grid-template:subgrid/subgrid;border-radius:10px;text-decoration:none}
#writing .fig-frame{display:block;width:100%;--ar:3/2}
#writing h3{margin-top:16px;font-size:26px;line-height:30px}
/* placed by hand, over the link's own area, or the grid would push them into a column of their own */
#writing :is(.meta,.note){grid-area:3/1;margin-top:8px;pointer-events:none}
#writing .meta{grid-row:2}
#writing .posts a:focus-visible h3{color:var(--red)}
@media (hover:hover){
  #writing h3{transition:color .15s}
  #writing .posts a:hover h3{color:var(--red)}
}
@media (max-width:479px){
  #writing .posts li{grid-template-rows:auto auto auto 1fr}
  #writing .meta{grid-row:3}
  #writing .note{grid-row:4}
}
@media (min-width:480px){
  #writing .posts li{grid-template-columns:38% minmax(0,1fr);column-gap:24px}
  #writing .fig-frame{grid-row:1/-1}
  #writing :is(h3,.meta,.note){grid-column:2}
  #writing h3{margin-top:-4px}
}

#writing .feed{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));column-gap:24px;margin-bottom:calc(-1*var(--u))}
#writing .feed li{position:relative;display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0;margin-bottom:var(--u);padding:16px 20px 4px;border:1px solid var(--hair);border-radius:10px;background:rgba(255,255,255,.5)}
#writing .feed li:has(a:focus-visible){outline:2px solid var(--bronze);outline-offset:3px}
#writing .feed li:has(a:focus-visible) a{outline:none}
#writing .by{display:flex;align-items:center;gap:8px;font-size:14px;line-height:20px;font-weight:600}
#writing .by .ico{width:18px;height:18px}
#writing .by span{font-weight:400;color:var(--muted)}
#writing .feed :is(h3,.fig-frame){grid-area:auto}
#writing .feed h3{margin-top:12px;font-size:22px;line-height:26px}
#writing .body{margin-top:8px;font-size:15px;line-height:24px;color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden}
#writing .feed .fig-frame{width:auto;margin:16px -20px 0;border-width:1px 0;border-radius:0}
#writing .feed .links{margin-top:4px}
#writing .feed .links a{position:static;text-decoration:none}
#writing .feed a:focus-visible,#writing .feed li:has(a:focus-visible) h3{color:var(--red)}
@media (hover:hover){
  #writing .feed li:hover h3{color:var(--red)}
}

#club .fig-frame{--ar:7/3}
#club figcaption{text-wrap:balance}
#club p:not(.links){max-width:60ch}
@media (max-width:639px){#club .fig-frame{--ar:3/2}}

#contact .hook{max-width:24em;margin:12px 0 var(--u);font:500 26px/34px var(--display);text-wrap:balance}
/* flex would make each side of the <wbr> its own item, with a gap between */
#contact .btn{display:inline-block}
#contact .links{margin:12px 0 -10px}
#contact .btn .ico{margin-right:10px;vertical-align:-2px}
.foot{padding-block:18px;font-size:14px;line-height:20px;color:var(--muted)}
.foot .sig{color:var(--ink);font-weight:500}
.foot .sig+p{margin-top:2px}
.foot span{display:inline-block;text-wrap:balance}
@media (max-width:639px){#contact .hook{font-size:22px;line-height:30px}#contact .btn{padding-inline:16px}.foot{padding-block:14px}}
@media (max-width:359px){.links{column-gap:12px}.links a{gap:6px}}

/* highlights: pixel art drawn by tools/highlights, fixed on the side through the whole story. Full tiles where they fit beside the cards, the art alone on a narrower side, a dock at the bottom on phones. The one for the section in view is marked. */
.wins{position:fixed;z-index:3;pointer-events:none}
.wins>ul{display:flex;flex-direction:column;gap:10px}
.wins>ul>li{position:relative;display:grid;grid-template-columns:64px 1fr;align-items:center;gap:12px;padding:6px 16px 6px 6px;background:var(--glass);-webkit-backdrop-filter:var(--frost);backdrop-filter:var(--frost);border:1px solid var(--rim);border-radius:12px;box-shadow:var(--lip),var(--lift);cursor:pointer;pointer-events:auto}
.wins .art{display:block;width:64px;height:64px;image-rendering:pixelated}
.wins>ul>li>p{display:grid;gap:2px;max-width:none}
.wins>ul>li>p strong{font:600 20px/24px var(--display);font-variant-numeric:lining-nums;letter-spacing:-.005em;text-wrap:balance}
.wins>ul>li>p strong a{text-decoration:none}
.wins>ul>li:has(:is(a,button):focus-visible){outline:2px solid var(--red);outline-offset:2px}
.wins>ul>li.on{background:#fff;border-color:var(--red);box-shadow:0 0 0 1px var(--red),var(--lift)}
.wins>ul>li.on strong a{color:var(--red-ink)}
@media (hover:hover){
  .wins .art{transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
  .wins>ul>li{transition:border-color .15s,background-color .15s}
  .wins>ul>li:not(.on):hover{border-color:var(--bronze)}
  .wins>ul>li:hover .art{transform:translateY(-3px)}
  .wins>ul>li:hover strong :is(a,button){color:var(--red-ink)}
}
/* full tiles: the cards narrow to 640px below 1360px so the rail clears them */
@media (min-width:1280px){
  .wins{top:50%;right:max(16px,50% - 680px);width:280px;transform:translateY(-50%)}
}
@media (min-width:1280px) and (max-width:1359px){.page{width:640px}}
/* the art alone: the words show beside it on hover or focus */
@media (max-width:1279px){
  .wins>ul>li{display:block;padding:4px;background:none;border-color:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
  .wins .art{width:48px;height:48px}
  .wins>ul>li.on{background:#fff;border-color:var(--red);box-shadow:var(--lift)}
  .wins>ul>li>p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media (min-width:944px) and (max-width:1279px){
  .wins{top:50%;right:max(8px,(50% - 360px - 72px)/2);transform:translateY(-50%)}
  .wins>ul{gap:4px;padding:6px;background:var(--glass);-webkit-backdrop-filter:var(--frost);backdrop-filter:var(--frost);border:1px solid var(--rim);border-radius:14px;box-shadow:var(--lip),var(--lift);pointer-events:auto}
}
/* the dock: the art in a row at the bottom, the scene and the scroll prompt lifted above it */
@media (max-width:943px){
  .wins{left:0;right:0;bottom:10px;display:flex;justify-content:center}
  .wins>ul{flex-direction:row;gap:4px;padding:4px;background:var(--glass);-webkit-backdrop-filter:var(--frost);backdrop-filter:var(--frost);border:1px solid var(--rim);border-radius:14px;box-shadow:var(--lip),var(--lift);pointer-events:auto}
  .wins .more{display:none}
  .stage{--hb:calc(100svh - 56px - 76px)}
  .cue{bottom:80px}
  .page{padding-bottom:88px}
  html{scroll-padding-bottom:96px}
}
@media (prefers-reduced-motion:no-preference){
  .wins>ul>li{animation:win-in .5s calc(.35s + var(--i)*.09s) cubic-bezier(.2,.8,.3,1) backwards}
  .wins .art{animation:win-pop .45s calc(.55s + var(--i)*.09s) cubic-bezier(.3,1.6,.55,1) backwards}
}
@keyframes win-in{from{opacity:0;transform:translateY(10px)}}
@keyframes win-pop{from{opacity:0;transform:scale(.4)}}
/* the brief: a card beside the tile on hover or focus, its strongest facts and a way into the full story. The strip on its right edge bridges the gap so the pointer can reach Read more. */
.wins .more{position:absolute;top:50%;right:calc(100% + 12px);width:320px;padding:18px 20px 16px;background:#fff;border:1px solid var(--hair);border-radius:14px;box-shadow:var(--lift);cursor:auto;transform:translate(8px,-50%);opacity:0;visibility:hidden;transition:opacity .15s,transform .2s,visibility 0s .2s}
.wins .more::after{content:"";position:absolute;top:0;bottom:0;left:100%;width:14px}
.wins>ul>li:is(:hover,:focus-within) .more{transform:translate(0,-50%);opacity:1;visibility:visible;transition:opacity .15s,transform .2s}
.wins .more strong{display:block;font:600 22px/26px var(--display);text-wrap:balance}
.wins .more p{margin-top:8px;font-size:15px;line-height:23px;color:var(--muted);text-wrap:pretty}
.wins .more p b{font-weight:600;color:var(--red)}
.wins .more a{display:inline-flex;align-items:center;gap:6px;min-height:32px;margin-top:10px;font-weight:600;font-size:15px;color:var(--red);text-decoration-color:var(--red)}
.wins .more a::after{content:"→"}
@media (hover:none){.wins .more{display:none}}
.wins>ul>li.shut .more{visibility:hidden;opacity:0}
@media (max-height:660px){.wins>ul>li:first-child .more{top:0;transform:translate(8px,0)}.wins>ul>li:first-child:is(:hover,:focus-within) .more{transform:none}}
html:not(.js) .wins .play{display:none}
html.playing .wins{display:none}
/* the game needs 768px, so its tile goes below that */
@media (max-width:767px){.wins .play{display:none}}
