/* next-e, round 3 (chat #358): a thin header, then two 9:16 panes side by side (~18:16).
   Left: text pages, each one 9:16 of calm prose, in a vertical feed of their own. Right: the
   post feed (feed.css). Narrower than 18:16, the panes become two full-screen phone panes.
   Hand-written; how it works: the design notes (next-e/design/ on the household shelf). */
*{box-sizing:border-box}
/* Charis SIL (SIL Open Font License), a Charter derivative, latin only, ~44 KB: what Windows and Android read the
   paper pages in, so they look like the Charter Rupert approved on Apple devices, which keep their own (review-b 12) */
@font-face{font-family:"Charis Web";font-style:normal;font-weight:400;font-display:swap;src:url(media/fonts/charis-400.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Charis Web";font-style:italic;font-weight:400;font-display:swap;src:url(media/fonts/charis-400i.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Charis Web";font-style:normal;font-weight:500 700;font-display:swap;src:url(media/fonts/charis-700.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{
  --hd:40px; --gap:16px;
  --paper:#fbfaf7; --ground:#efece5; --ink:#1d1c1a; --soft:#6f6a61; --rule:#e4dfd5; --link:#24477a;
  --read:Charter,"Bitstream Charter","Charis Web",Georgia,serif;
  --ui:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --ph:calc(100vh - var(--hd) - var(--gap)); --ph:calc(100dvh - var(--hd) - var(--gap));
  --pw:calc(var(--ph) * 9 / 16);
}
html,body{margin:0;height:100%}
body{background:var(--ground);color:var(--ink);font:400 17px/1.5 var(--read);overflow:hidden;-webkit-text-size-adjust:100%}
html:not(.js) body{overflow:auto}
a{color:var(--link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--link) 30%,transparent);text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{text-decoration-color:currentColor}

/* ---------- the header (chat #375): the name in the middle, held to the content's width at every window
   shape; on the left a back button that names where it goes (or Text, on a phone's feed pane); Feed on
   the right where it applies. "R.H. Deese" when the full name would crowd the buttons (feed.js measures). */
.hd{height:var(--hd);width:calc(var(--pw) * 2 + var(--gap));margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;gap:10px;position:relative;z-index:10;transition:background .3s,color .3s}
.hd a{color:inherit;text-decoration:none}
.rhd{font:600 16px/1 var(--read);letter-spacing:.005em;white-space:nowrap;padding:6px 2px;position:relative}
.rhd .short{position:absolute;left:2px;top:6px;visibility:hidden}
.hd.tight .rhd .full{visibility:hidden;position:absolute;left:2px;top:6px}
.hd.tight .rhd .short{position:static;visibility:visible}
.hd nav{display:grid;align-items:center;min-width:0}
.hd .hd-l{justify-items:start}.hd .hd-r{justify-items:end}
/* the buttons: quiet pills in the page's own colours, with drawn arrows; 44px tall to the finger */
.hd nav a{grid-area:1/1;max-width:100%;height:30px;display:inline-flex;align-items:center;gap:3px;padding:0 12px 0 7px;border-radius:999px;
  font:600 13.5px/1 var(--ui);letter-spacing:.005em;white-space:nowrap;color:var(--ink);
  background:var(--paper);box-shadow:inset 0 0 0 1px var(--rule),0 1px 2px rgba(40,30,10,.06);
  opacity:0;visibility:hidden;position:relative;transition:opacity .2s,visibility .2s,background .2s,box-shadow .2s,transform .3s cubic-bezier(.2,1.6,.4,1)}
.hd nav a::after{content:"";position:absolute;inset:-7px -4px}
.hd nav a.hd-feed{padding:0 7px 0 12px}
.hd nav a span{overflow:hidden;text-overflow:ellipsis;min-width:0}
.hd nav svg{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s cubic-bezier(.2,1.6,.4,1)}
.hd nav a:hover{background:#fff;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 22%,transparent),0 2px 6px rgba(40,30,10,.08)}
.hd-back:hover svg,.hd-text:hover svg{transform:translateX(-2px)}
.hd-feed:hover svg{transform:translateX(2px)}
.hd nav a:active{transform:scale(.95)}
.hd nav a:focus-visible{outline:2px solid var(--link);outline-offset:2px}
body.can-back .hd-back{opacity:1;visibility:visible}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---------- the stage: two 9:16 panes, centred, letterboxed ---------- */
.stage{display:flex;justify-content:center;gap:var(--gap);height:calc(100% - var(--hd));padding-bottom:var(--gap)}
.left,.right{flex:none;width:var(--pw);height:var(--ph);position:relative}
.left{background:var(--paper);border-radius:18px;overflow:hidden;box-shadow:0 1px 0 rgba(0,0,0,.04),0 20px 50px -30px rgba(40,30,10,.35)}
html:not(.js) .left{overflow-y:auto}

/* the text feed: one slide per page of the deck, snapping like the post feed */
.tfeed{height:100%;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior-y:contain;scrollbar-width:none}
html:not(.js) .tfeed{height:auto;overflow:visible}
.tfeed::-webkit-scrollbar{display:none}
.slide{height:100%;scroll-snap-align:start;scroll-snap-stop:always;container-type:size;display:flex;justify-content:center;overflow:hidden}
html:not(.js) .slide{height:var(--ph)}
/* One 9:16 page, the same at every size: type scales with the page, not the window. */
.first{width:min(100%,56.25cqh);height:100%;display:flex;flex-direction:column;
  font-size:min(4.15cqw,2.33cqh);line-height:1.48;--pt:2.1em;--px:1.75em;padding:var(--pt) var(--px) 1.5em}
/* one type scale on every page (round 5, review-b 1); a long title steps down instead */
.first>*{margin:0}
.first h1,.lh h1{font:600 2.05em/1.06 var(--read);letter-spacing:-.012em;margin:0 0 .45em;text-wrap:balance}
.first h1.lt2,.lh h1.lt2{font-size:1.6em}
.first .lede{font-size:1.12em;line-height:1.38;margin-bottom:.6em}
/* the home page opens on a band: him under the storm's shelf cloud, a 4-tone dither whose edges fade to the
   paper (chat #415), the pane's full width, the line under it rising into the fade */
.band{margin:calc(-1 * var(--pt)) calc(-1 * var(--px)) 0!important;flex:none}
.band img{display:block;width:100%;height:auto}
.band+.lede{margin-top:-.4em}
.first p{margin:0 0 .7em}
.meta{font:500 .8em/1.4 var(--ui);color:var(--soft);margin-bottom:.35em!important;letter-spacing:.005em}
.meta b{color:var(--ink);font-weight:600}
.where{color:var(--soft);font-size:.92em}
.first .footage{color:var(--soft);font-size:.78em;line-height:1.4}
.first .footage a{color:inherit}
.stat{font-size:1.14em;line-height:1.32;font-weight:600;padding:.15em 0 .15em .8em;border-left:2px solid var(--ink);margin:.35em 0 .8em!important;text-wrap:pretty}
.pts{list-style:none;padding:0;margin:0 0 .6em}
.pts li{position:relative;padding-left:1em;margin:0 0 .5em;font-size:.95em;line-height:1.42}
.pts li::before{content:"";position:absolute;left:0;top:.68em;width:.42em;height:1px;background:var(--soft)}
.links{font:500 .82em/1.5 var(--ui);color:var(--soft);margin-top:.2em!important}
.links a{color:var(--ink)}
.y{font:500 .78em/1 var(--ui);color:var(--soft);font-variant-numeric:tabular-nums;white-space:nowrap}

/* lists: the home page's sections, a list page's items, the CV's roles */
.list,.rows{list-style:none;padding:0;margin:.3em 0 .9em;border-top:1px solid var(--rule)}
.list li,.rows li{display:flex;align-items:baseline;gap:.8em;border-bottom:1px solid var(--rule);padding:.44em 0}
.list li>a{flex:1;min-width:0;color:var(--ink);text-decoration:none;display:flex;flex-direction:column;gap:.08em}
.list a b{font-weight:600;line-height:1.25}
.list a span{font-size:.84em;line-height:1.3;color:var(--soft)}
.list li.one{padding:.36em 0}
.list .b{flex:1;min-width:0;display:flex;flex-direction:column;gap:.08em}
.list .b>b{font-weight:600;line-height:1.25}
.list .b>span{font-size:.84em;line-height:1.3;color:var(--soft)}
.list .b a{color:var(--ink)}
.list a:hover b{text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:.18em}
.rows li{flex-wrap:wrap;column-gap:.5em;font-size:.94em}
.rows li>a{color:var(--ink);font-weight:600;text-decoration:none}
.rows li>a:hover{text-decoration:underline;text-decoration-color:var(--rule)}
.rows li>span:not(.y):not(.b){color:var(--soft);flex:1}
.rows li>span.b{flex:1}
.rows .y{margin-left:auto}

/* the foot: More (the long form) or Open (the full thing), pinned to the bottom of the page */
.foot{margin-top:auto!important;padding-top:.6em;display:flex;align-items:center;gap:.9em;flex-wrap:wrap}
.foot .alt{font:500 .8em/1.4 var(--ui);color:var(--soft)}
.foot .alt a{color:inherit}
.more{font:600 .86em/1 var(--ui);display:inline-flex;align-items:center;gap:.35em;text-decoration:none;color:var(--ink);
  border:1.5px solid var(--ink);border-radius:999px;padding:.62em 1.15em;transition:transform .3s cubic-bezier(.2,1.6,.4,1),background .2s}
.more:hover{background:var(--ink);color:var(--paper)}
.more:active{transform:scale(.94)}
.more.open{background:var(--ink);color:var(--paper)}

/* the long form: slides up over the page inside the same pane; ← back closes it */
.long{border-top:1px solid var(--rule);background:var(--paper)}
html.js .long{position:absolute;inset:0;z-index:4;overflow-y:auto;overscroll-behavior:contain;border:0;
  transform:translate3d(0,102%,0);visibility:hidden;transition:transform .5s cubic-bezier(.16,1,.3,1),visibility 0s .5s}
html.js .left.long-open .long{transform:none;visibility:visible;transition:transform .5s cubic-bezier(.16,1,.3,1)}
.lw{max-width:34em;margin:0 auto;padding:1.6em 1.6em 3em;font-size:min(16.5px,4.1vw);line-height:1.55;container-type:inline-size}
.lw h2{font:600 1.3em/1.2 var(--read);margin:1.4em 0 .4em}
.lw h2.lt{font-size:1.6em;margin-top:.2em}
.lw>p:first-child{margin-top:.2em}
.lw h3{font:600 1em/1.3 var(--read);margin:1.2em 0 .2em}
.lw h4{font:500 .82em/1.4 var(--ui);color:var(--soft);margin:.2em 0 .5em}
.lw p{margin:.55em 0}
.lw ul{padding-left:1.1em;margin:.4em 0}
.lw li{margin:.35em 0}
.lw .plain{list-style:none;padding:0}
.lw .plain li{display:flex;justify-content:space-between;align-items:baseline;gap:1em;border-bottom:1px solid var(--rule);padding:.3em 0;margin:0}
.lw .plain a{color:var(--ink);text-decoration:none}
.lw .plain a:hover{text-decoration:underline;text-decoration-color:var(--rule)}
.lw h2 a{color:inherit;text-decoration:none}
.lw .note{color:var(--soft);font-size:.9em}
.lw .pts{padding-left:0}
.lw .pts li{font-size:1em}
/* the long form opens with its page's own title block, same size and place (review-b 3) */
.lh{line-height:1.48}
.lh p{margin:0 0 .7em}
/* earlier versions, quiet, on a made thing's page (chat #386 D) */
.earlier{font:500 .8em/1.45 var(--ui);color:var(--soft);margin-top:.2em!important}
.earlier a{color:var(--ink)}
.first .earlier{opacity:1;transform:none;white-space:normal}   /* feed.css's card rule (hidden until the card is on) must not hide it here */
/* the household harness, live: its numbers */
.hb{border-collapse:collapse;width:100%;margin:.2em 0 .9em;font:500 .8em/1.3 var(--ui);font-variant-numeric:tabular-nums}
.hb th,.hb td{text-align:right;padding:.42em 0;border-bottom:1px solid var(--rule)}
.hb th:first-child{text-align:left;font-weight:500;color:var(--soft)}
.hb thead th{font-weight:600;color:var(--soft);font-size:.9em}
.hb td{font-weight:600;color:var(--ink);padding-left:1em}

/* a deck swap (another list): both feeds fade out and back in */
.tfeed,.feed{transition:opacity .17s}
.stage.swap .tfeed,.stage.swap .feed{opacity:0}

/* the right pane holds the feed; feed.css styles it */
.right{border-radius:18px}

/* ---------- phone, or any window narrower than 18:16: one column, two panes, swipe between ----------
   The column is one 9:16 (never narrower than a phone, up to 430px), centred; the header keeps to the
   same width, so its buttons sit on the content's edges, not the window's (chat #375 point 2b).
   Sideways movement is feed.js's (touch-action: pan-y), so a vertical swipe never turns sideways. */
@media (max-aspect-ratio: 9/8){
  :root{--hd:44px;--ph:calc(100vh - var(--hd) - env(safe-area-inset-top)); --ph:calc(100dvh - var(--hd) - env(safe-area-inset-top));
    --cw:max(min(100vw,calc(var(--ph) * 9 / 16)),min(100vw,430px))}
  .hd{width:var(--cw);padding:env(safe-area-inset-top) 8px 0;background:var(--paper);height:calc(var(--hd) + env(safe-area-inset-top))}
  .hd{background:linear-gradient(90deg,var(--paper) calc((1 - var(--sx,0)) * 100%),#000 0);transition:none;
    color:color-mix(in srgb,#fff calc(clamp(0,(var(--sx,0) - .4) * 5,1) * 100%),var(--ink))}
  .hd .rhd{background:linear-gradient(90deg,var(--ink) var(--bx,9999px),#fff 0);-webkit-background-clip:text;background-clip:text;color:transparent}
  .hd nav a.hd-text{color:#fff;background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
  .hd nav a.hd-text:hover{background:rgba(255,255,255,.2)}
  .hd nav a.hd-text{visibility:visible;opacity:clamp(0,(var(--sx,0) - .8) * 5,1)}
  .hd nav a.hd-feed{visibility:visible;opacity:clamp(0,1 - var(--sx,0) * 5,1)}
  body.can-back .hd-back{opacity:clamp(0,(1 - var(--sx,0)) * 5,1)}
  body.on-feed .hd-back,body.on-feed .hd-feed,body:not(.on-feed) .hd-text{pointer-events:none}
  .stage{justify-content:flex-start;gap:0;padding:0;width:var(--cw);margin:0 auto;height:calc(100% - var(--hd) - env(safe-area-inset-top));
    overflow:hidden;touch-action:pan-y pinch-zoom}
  .feed,.tfeed,.long,.card{touch-action:pan-y pinch-zoom}
  .left,.right{width:var(--cw);height:100%;border-radius:0;box-shadow:none}
  .left{transition:translate .45s cubic-bezier(.16,1,.3,1)}
  .stage.pulling .left{transition:none}
  .right{background:#000}
  .first{width:100%;--pt:1.5em;--px:1.45em;padding:var(--pt) var(--px) max(1.2em,env(safe-area-inset-bottom))}
}
/* swipe right on the text pane = back: the pane follows the finger and a pill names where it goes */
.pull{position:fixed;left:max(10px,calc(50vw - var(--cw,100vw) / 2 + 10px));top:50%;z-index:20;display:flex;align-items:center;gap:4px;
  padding:9px 14px 9px 9px;border-radius:999px;background:var(--ink);color:var(--paper);font:600 14px/1 var(--ui);pointer-events:none;
  opacity:0;translate:-24px -50%;transition:opacity .2s,translate .3s cubic-bezier(.16,1,.3,1),scale .3s cubic-bezier(.2,1.6,.4,1)}
.pull svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.pull.on{opacity:calc(.35 + var(--k,0) * .65);translate:calc(var(--k,0) * 24px - 24px) -50%}
.pull.arm{scale:1.08;opacity:1}
@media (prefers-reduced-motion: reduce){
  html.js .long,html.js .left.long-open .long,.hd,.hd nav a,.hd nav svg,.left,.pull{transition:none}
}

/* ---------- credits (DB-0202/1 B, 2026-10-13): staff work carries one of three credits and a † mark. The words
   and the mark are one tap target (a <details>) that opens a one-line note linking to the staff page. ---------- */
.first .credit{font:500 .8em/1.4 var(--ui);color:var(--soft);margin:-.5em 0 .3em}
.credit summary{display:inline-block;padding:.45em 0;cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent}
.credit summary::-webkit-details-marker{display:none}
.credit summary::marker{content:""}
.credit .dag{font-size:1.05em;line-height:0;margin-left:.15em;color:var(--ink)}
.credit[open] .dag{color:var(--link)}
.credit summary:focus-visible{outline:2px solid var(--link);outline-offset:2px;border-radius:3px}
.first .credit .cnote{margin:0 0 .3em;padding:.5em .75em;background:var(--ground);border-radius:6px;color:var(--ink);font:400 1em/1.45 var(--ui)}
.cfoot{display:none}
/* The site's own credit (hb-3txa) closes every page's foot row; its note opens above the row. */
.foot{position:relative}
.first .foot .sitecr{margin:0 0 0 auto;font:500 .72em/1.4 var(--ui);color:var(--soft)}
.first .foot .sitecr .cnote{position:absolute;left:0;right:0;bottom:100%;z-index:2;margin:0 0 .5em;box-shadow:0 4px 16px rgba(0,0,0,.12);font-size:1.1em}
/* On paper: the page on screen, plain, with the credit's note at its foot. */
@media print{
  html,body{height:auto;overflow:visible;background:#fff}
  .hd,.right,.sheet,.toast,.pull,.long,.foot,.credit .cnote{display:none!important}
  .stage{display:block;height:auto;width:auto;padding:0;margin:0;overflow:visible}
  .left{width:auto;height:auto;box-shadow:none;border-radius:0;translate:none;background:#fff}
  .tfeed{height:auto;overflow:visible}
  html.js .slide:not(.on){display:none}
  .slide{height:auto;container-type:normal;display:block;overflow:visible}
  .first{width:auto;height:auto;font-size:12pt;padding:0;display:flex;flex-direction:column}
  .first .cfoot{display:block;order:99;margin-top:2.5em;padding-top:.6em;border-top:1px solid #999;font:400 9pt/1.4 var(--ui);color:#333}
  .first .cfoot~.cfoot{margin-top:.3em;padding-top:0;border-top:0}
}
