/* wallaceos.nz · one stylesheet, mobile first. Dark (default) and light via html[data-theme].
   Fronts: html.front-two-doors (default) · html.front-counter-top · html.front-shelf-bench. System fonts only. */
:root, [data-theme="dark"] {
  --bg:#08090b; --bg2:#0e1014; --card:#13161b; --line:#242932; --line2:#343b47;
  --ink:#f3f1ec; --dim:#bcb7ac; --dim2:#8f897d; --gold:#e2b857; --gold2:#f3d48e;
  --btn:#e2b857; --btn-ink:#1a1305; --btn-hover:#f3d48e; --focus:#f3d48e;
  --paper:#f3eee3; --paper-ink:#17140f; --paper-dim:#4f483b; --paper-line:#d9d0bd; --paper-gold:#7d5f1b; --paper-card:#fffdf8;
  --err:#ffb4a8; --ok:#7fd3a0; --shadow:0 18px 50px rgba(0,0,0,.45);
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --mono:ui-monospace,"Cascadia Mono",Consolas,"SFMono-Regular",Menlo,monospace;
  color-scheme:dark;
}
[data-theme="light"] {
  --bg:#f6f2e9; --bg2:#efe9dc; --card:#fffdf8; --line:#e0d8c6; --line2:#cbc0a8;
  --ink:#17140f; --dim:#4a4337; --dim2:#655d50; --gold:#7d5f1b; --gold2:#5e4712;
  --btn:#7d5f1b; --btn-ink:#ffffff; --btn-hover:#5e4712; --focus:#5e4712;
  --paper:#fffdf8; --paper-card:#f6f2e9;
  --err:#a3271b; --ok:#1d6b3f; --shadow:0 14px 40px rgba(80,60,20,.14);
  color-scheme:light;
}
*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; scroll-padding-top:16px; scroll-padding-bottom:88px; }
body { margin:0; background:var(--bg); color:var(--ink); font:17px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
img, video { display:block; max-width:100%; height:auto; }
a { color:var(--gold2); text-underline-offset:3px; }
[data-theme="light"] a { color:var(--gold); }
h1, h2, h3 { line-height:1.12; letter-spacing:-.02em; margin:0 0 12px; text-wrap:balance; }
h1 { font-size:clamp(32px, 7.4vw, 60px); font-size:clamp(32px, 7.4cqi, 60px); letter-spacing:-.035em; }
h2 { font-size:clamp(26px, 5.2vw, 40px); font-size:clamp(26px, 5.2cqi, 40px); letter-spacing:-.03em; }
h3 { font-size:19px; }
p { margin:0 0 14px; }
em { font-style:normal; color:var(--gold); }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; border-radius:6px; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip { position:absolute; left:12px; top:-60px; z-index:99; background:var(--btn); color:var(--btn-ink); padding:10px 14px; border-radius:10px; font-weight:700; }
.skip:focus { top:10px; }
.wrap { max-width:1160px; margin:0 auto; padding:0 18px; }
.narrow { max-width:760px; }
.wrap.narrow { max-width:1160px; }
.wrap.narrow > * { max-width:760px; }
.wrap.narrow > h2:not(:first-child) { margin-top:34px; }

/* ---------- navigation (v2, 16 Nov): one list of five places, two shapes ----------
   Phone held upright: a slim top line (the mark, the light/dark switch) that scrolls away, and the five places in a bar
   across the bottom, in thumb reach. Wide enough (760 px) or turned sideways (560 px landscape): a left sidebar, open by
   default, foldable to an 84 px rail of icons with their words; html[data-nav="rail"] is the folded state (cookie `nav`).
   html[data-bar="wide"] keeps the bottom bar on a computer too, as a floating dock (site.config.json nav.bottomBarOnWide). */
:root { --side-w:244px; --bar-h:68px; }
.sprite { position:absolute; width:0; height:0; overflow:hidden; }
.i { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.i .fill { fill:currentColor; stroke:none; }
.ic { display:grid; place-items:center; flex:none; }
.brand { display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none; font-weight:850; font-size:18px; letter-spacing:-.3px; margin-right:auto; min-height:44px; border-radius:10px; }
[data-theme="light"] .brand { color:var(--ink); }
.brand-t { display:flex; flex-direction:column; line-height:1.15; }
.brand-c { display:none; font-size:13px; font-weight:600; letter-spacing:0; color:var(--dim2); font-variant-numeric:tabular-nums; }
.mk { width:32px; height:32px; border-radius:9px; display:grid; place-items:center; font-weight:900; font-size:16px; color:var(--gold); border:2px solid var(--gold); background:var(--bg2); flex:none; }
.theme-switch { color:var(--dim); text-decoration:none; }
.ts-top { width:44px; height:44px; display:grid; place-items:center; border-radius:12px; }
.ts-top .i { width:22px; height:22px; }
.ts-top:hover { background:var(--card); color:var(--ink); }
.side-head { display:flex; align-items:center; gap:8px; height:60px; padding:0 max(14px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); border-bottom:1px solid var(--line); }
.side-foot, .dock.dock-wide { display:none; }
.sub { display:none; }

/* the bottom bar (phone held upright) */
.dock { position:fixed; z-index:50; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(5, 1fr);
  padding:5px max(4px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  background:color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter:blur(14px) saturate(1.2); -webkit-backdrop-filter:blur(14px) saturate(1.2);
  border-top:1px solid var(--line); }
.dock a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-height:58px; min-width:0;
  color:var(--dim); text-decoration:none; font-size:12px; font-weight:700; letter-spacing:.01em; border-radius:14px; -webkit-tap-highlight-color:transparent; }
.dock .ic { width:56px; height:30px; border-radius:999px; transition:background-color .2s, color .2s; }
.dock a:hover { color:var(--ink); }
.dock a[aria-current="page"] { color:var(--ink); font-weight:800; }
.dock a[aria-current="page"] .ic { background:color-mix(in srgb, var(--gold) 26%, transparent); color:var(--gold2); }
[data-theme="light"] .dock a { color:var(--dim2); }
[data-theme="light"] .dock a[aria-current="page"] { color:var(--ink); }
[data-theme="light"] .dock a[aria-current="page"] .ic { color:#fff; background:var(--gold); }
.dock a:focus-visible, .side-foot a:focus-visible, .brand:focus-visible, .ts-top:focus-visible { outline-offset:-3px; }
.page { padding-bottom:calc(var(--bar-h) + env(safe-area-inset-bottom)); }
main, .foot { container-type:inline-size; }

/* shared pieces */
.eyebrow, .kick { font-size:13px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); margin:0 0 10px; text-wrap:balance; }
.lede { font-size:19px; color:var(--dim); max-width:62ch; text-wrap:pretty; }
.fine { font-size:14px; color:var(--dim2); }
.note { color:var(--dim); font-size:15px; margin-top:8px; max-width:70ch; }
.tag { display:inline-block; font-size:11.5px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; padding:2px 7px; border-radius:6px; border:1px solid currentColor; opacity:.8; vertical-align:2px; }
.row { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:50px; padding:0 20px; border-radius:13px; font:inherit; font-weight:760; font-size:17px; text-decoration:none; border:0; cursor:pointer; }
.btn.gold { background:var(--btn); color:var(--btn-ink); }
.btn.gold:hover { background:var(--btn-hover); }
.btn.gold[disabled] { background:var(--card); color:var(--dim2); border:1px dashed var(--line2); cursor:not-allowed; }
.btn.line { border:1px solid var(--line2); color:var(--ink); background:transparent; }
.btn.line:hover { border-color:var(--gold); }
.btn.ink { background:var(--paper-ink); color:#fff; }
.btn.line-ink { border:1px solid #b9ad95; color:var(--paper-ink); background:transparent; }
.btn.big { width:100%; min-height:56px; font-size:17px; }
.btn .price { opacity:.85; font-weight:650; }
.chips { list-style:none; padding:0; margin:18px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.chips li { font-size:14px; font-weight:650; color:var(--dim); border:1px solid var(--line2); border-radius:999px; padding:5px 12px; }
.meta { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:14px; color:var(--dim); margin:14px 0 0; }
.meta b { color:var(--ink); font-weight:700; }
.live::before { content:""; display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--ok); margin-right:7px; vertical-align:1px; animation:blink 1.8s infinite; }
@keyframes blink { 50% { opacity:.25; } }
.s { padding:52px 0; border-top:1px solid var(--line); }
.head { padding:44px 0 28px; }
.prose h2 { font-size:24px; margin-top:30px; }
.prose p, .prose li { color:var(--dim); }
.plain { padding-left:20px; color:var(--dim); }

/* identity */
.identity { padding:38px 0 30px; }
.identity h1 { max-width:17ch; }
.identity .lede { margin-top:4px; }

/* two doors */
.doors { display:flex; flex-direction:column; }
.door { position:relative; overflow:hidden; display:flex; padding:34px 18px 34px; }
.door-in { position:relative; z-index:2; max-width:560px; }
.door-work { background:var(--paper); color:var(--paper-ink); }
.door-work .kick, .door-work em { color:var(--paper-gold); }
.door-work h2 { color:var(--paper-ink); }
.door-work p { color:var(--paper-dim); }
.door-games { background:#000; color:#f3f1ec; min-height:520px; align-items:flex-end; }
/* real play fills the door: a poster picture first (phones keep it), the muted loop over it on a wide screen (site.js) */
.door-games .door-poster, .door-games .door-video { position:absolute; inset:0; width:100%; height:100%; max-width:none; object-fit:cover; }
.door-games .door-video:not([src]) { display:none; }
.door-games::after { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.2) 32%, rgba(0,0,0,.8) 62%, rgba(0,0,0,.94) 100%); }
.door-games h2 { color:#fff; max-width:14ch; text-shadow:0 2px 16px rgba(0,0,0,.6); }
.door-games h2 em { color:#e2b857; }
.door-games .kick { color:#e2b857; text-shadow:0 1px 3px #000, 0 0 14px rgba(0,0,0,.9); }
.door-games .tagline, .door-games .meta { text-shadow:0 1px 3px rgba(0,0,0,.85); }
.door-games .meta { color:#c9c4b8; } .door-games .meta b { color:#fff; }
.door-games .btn.line { color:#f3f1ec; border-color:rgba(255,255,255,.35); background:rgba(0,0,0,.35); }
.door-games .btn.gold { background:#e2b857; color:#1a1305; }
.door-games .tagline { font-size:17px; color:#ece8df; max-width:36ch; }
.logo-h { margin:6px 0 8px; line-height:0; }
.logo-h img { width:min(340px, 82%); filter:drop-shadow(0 4px 18px rgba(0,0,0,.55)); }
/* the game's name in text while its new logo is made (Wrackline renamed Kaputnik, 19 Nov 2026) */
.logo-h.logo-text { line-height:1; font-size:clamp(2.4rem, 7vw, 4.2rem); font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  text-shadow:0 4px 18px rgba(0,0,0,.55); }
[data-theme="light"] .game-logo img, [data-theme="light"] .ct-logo img { filter:drop-shadow(0 2px 2px rgba(0,0,0,.85)) drop-shadow(0 0 22px rgba(0,0,0,.55)); }

/* the sample listing pipeline */
.pipe { margin:18px 0 0; background:var(--paper-card); border:1px solid var(--paper-line); border-radius:16px; padding:14px 16px; color:var(--paper-ink); max-width:440px; box-shadow:0 12px 34px rgba(80,60,20,.1); }
.pipe figcaption { font-size:13px; font-weight:800; color:var(--paper-dim); margin-bottom:8px; }
.pipe ol { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.pipe li { position:relative; padding-left:28px; font-size:15px; color:var(--paper-ink); transition:opacity .35s; }
.pipe li::before { content:""; position:absolute; left:0; top:3px; width:16px; height:16px; border-radius:50%; border:2px solid var(--paper-gold); background:var(--paper-gold); box-shadow:inset 0 0 0 3px var(--paper-card); }
.pipe.js li { opacity:.62; } /* 19 Nov: .42 drew the waiting steps at 2.7:1; .62 is above 4.5:1 and still reads as "not yet" */ .pipe.js li::before { background:transparent; }
.pipe.js li.on { opacity:1; } .pipe.js li.on::before { background:var(--paper-gold); }
.pipe.js li.now { -webkit-text-stroke:.4px currentColor; } /* bolder without getting wider: no line jumps as the sample walks */

/* sections */
.cards { display:grid; gap:12px; margin-top:22px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px; }
.card p { color:var(--dim); font-size:15px; margin:0; }
/* /work: the clients and the portfolio are lists of cards (WallaceOSSitePublicOnly) */
ul.cards { list-style:none; padding:0; }
.card .kind { color:var(--gold); font-size:13px; letter-spacing:.06em; text-transform:uppercase; margin-bottom:6px; }
.card .built { margin-top:10px; font-size:14px; }
.card h3 a { color:inherit; }
.more-link { margin-top:18px; }
.case-grid, .tease-grid, .talk-grid { display:grid; gap:26px; }
.case .pipe { align-self:start; }
.others { margin-top:18px; } .others ul { padding-left:20px; color:var(--dim); }
.steps4 { list-style:none; counter-reset:st; padding:0; margin:22px 0 6px; display:grid; gap:12px; }
.steps4 li { counter-increment:st; background:var(--bg2); border:1px solid var(--line); border-radius:16px; padding:16px 16px 16px 60px; position:relative; color:var(--dim); font-size:15px; }
.steps4 li::before { content:counter(st); position:absolute; left:16px; top:16px; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:var(--btn); color:var(--btn-ink); font-weight:900; font-size:15px; }
.steps4 b { display:block; color:var(--ink); font-size:17px; }
/* a phone's first screen: four pictures of play and the way to the games, in place of the chips (WallaceOSSiteV3) */
.id-games { display:grid; gap:8px; margin:16px 0 0; padding:10px; border:1px solid var(--line2); border-radius:16px; background:var(--card); color:var(--ink); text-decoration:none; }
.id-games:hover { border-color:var(--gold); }
.idg-pics { display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; }
.idg-pics img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; }
.idg-t { font-size:15px; color:var(--dim); padding:0 2px; }
.idg-t b { color:var(--ink); }
.idg-t > span { color:var(--gold); font-weight:800; }
.identity:has(.id-games) .chips { display:none; }
/* the front page's games shelf (WallaceOSSiteV3): a phone swipes a row of pictures; wider, a grid of three */
.shelf-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px 20px; margin-bottom:18px; }
.shelf-head h2 { margin:0; }
.gshelf { list-style:none; margin:0 -18px; padding:4px 18px 10px; display:grid; grid-auto-flow:column; grid-auto-columns:78%; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:thin; }
.gshelf li { scroll-snap-align:start; min-width:0; }
.gshelf a { display:flex; flex-direction:column; gap:4px; height:100%; color:var(--ink); text-decoration:none; background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; padding-bottom:14px; transition:border-color .15s, transform .15s; }
.gshelf a:hover { border-color:var(--gold); transform:translateY(-2px); }
.gshelf a:focus-visible { outline-offset:-3px; }
.sh-pic { position:relative; display:block; aspect-ratio:16/9; background:#000; margin-bottom:8px; }
.sh-pic img { width:100%; height:100%; object-fit:cover; }
.sh-state { position:absolute; left:10px; top:10px; font-size:13px; font-weight:800; line-height:1; padding:6px 9px; border-radius:8px; background:rgba(8,9,11,.82); color:#f3f1ec; }
.sh-state.early { background:#e2b857; color:#1a1305; }
.sh-name { padding:0 14px; font-size:19px; font-weight:800; line-height:1.25; }
.sh-line { padding:0 14px; font-size:15px; color:var(--dim); line-height:1.4; }
.shelf-s .fine { margin:10px 0 0; }
.tease-shot { position:relative; display:block; border-radius:18px; overflow:hidden; border:1px solid var(--line2); background:#000; }
.tease-shot img { width:100%; aspect-ratio:16/9; object-fit:cover; }
.play { position:absolute; left:50%; top:50%; width:64px; height:64px; margin:-32px 0 0 -32px; border-radius:50%; background:rgba(0,0,0,.55); border:2px solid #e2b857; }
.play::after { content:""; position:absolute; left:25px; top:19px; border-style:solid; border-width:13px 0 13px 20px; border-color:transparent transparent transparent #e2b857; }

/* forms */
.form { display:grid; gap:6px; background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px; }
.form p { margin:0 0 6px; }
.form label { display:block; font-size:14px; font-weight:750; color:var(--dim); margin-bottom:4px; }
.form label small { font-weight:500; color:var(--dim2); }
.form input[type="email"], .form input:not([type]), .form textarea { width:100%; font:inherit; font-size:16px; color:var(--ink); background:var(--bg); border:1px solid var(--line2); border-radius:11px; padding:12px 13px; min-height:50px; }
.form textarea { min-height:120px; resize:vertical; }
.form input:focus, .form textarea:focus { border-color:var(--gold); outline:none; box-shadow:0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
.form [aria-invalid="true"] { border-color:var(--err); }
.form .check { display:flex; gap:10px; align-items:flex-start; font-weight:500; font-size:15px; color:var(--dim); margin:8px 0 6px; cursor:pointer; }
.form .check input { width:22px; height:22px; flex:none; margin:1px 0 0; accent-color:var(--btn); }
.form .btn { width:100%; margin-top:6px; }
.form .two { display:grid; gap:0 12px; }
.err { color:var(--err); font-size:15px; font-weight:650; display:block; margin:4px 0; }
.hp { position:absolute !important; left:-9999px; width:1px; height:1px; overflow:hidden; }
.big-mail .btn { width:100%; }

/* the games room */
.game-hero { padding:30px 0 40px; }
.game-hero .logo-h img { width:min(420px, 90%); }
.game-grid { display:grid; gap:20px; margin-top:20px; }
.tv video { width:100%; aspect-ratio:16/9; background:#000; border-radius:16px; border:1px solid var(--line2); }
.tv .fine { margin-top:8px; }
.buybox { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px; }
.buybox h2 { font-size:22px; margin:22px 0 10px; }
.buybox .form { padding:0; border:0; background:none; }
.status { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:14px; color:var(--dim); margin-bottom:12px; }
.status b { color:var(--gold); }
.stills { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.stills figure { margin:0; }
.stills img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:12px; border:1px solid var(--line2); }
.stills figcaption { font-size:13px; color:var(--dim2); margin-top:5px; line-height:1.35; }
.thanks { padding:70px 0; }

/* footer */
.foot { border-top:1px solid var(--line); padding:26px 0 40px; color:var(--dim2); font-size:15px; }
.foot-in { display:grid; gap:8px; }
.foot b { color:var(--ink); }
.foot nav { display:flex; flex-wrap:wrap; gap:4px 16px; }
.foot nav a { color:var(--dim); }
.foot p { margin:0; }

/* ---------- Counter Top ---------- */
.counter { padding:10px 0 40px; }
.signs { display:flex; gap:14px; margin:0 0 18px; }
.sign { position:relative; display:inline-block; padding:10px 22px; font-weight:900; letter-spacing:.16em; text-transform:uppercase; text-decoration:none; color:var(--ink); background:var(--card); border:2px solid var(--line2); border-radius:10px; margin-top:16px; }
.sign::before { content:""; position:absolute; left:50%; top:-18px; width:2px; height:16px; background:var(--line2); }
.sign:nth-child(1) { transform:rotate(-1.5deg); } .sign:nth-child(2) { transform:rotate(1.2deg); }
.sign.on, .sign:hover { border-color:var(--gold); color:var(--gold); }
.ct-panel { display:grid; gap:18px; background:var(--card); border:1px solid var(--line); border-radius:20px; padding:20px; margin-bottom:16px; }
@supports selector(:has(a)) {
  .ct-panels .ct-panel { display:none; }
  .ct-panels:not(.js) .ct-panel:target, .ct-panels:not(.js):not(:has(.ct-panel:target)) #c-work { display:grid; }
  .ct-panels.js .ct-panel.shown { display:grid; }
}
.docket { background:var(--paper); color:var(--paper-ink); border-radius:6px; padding:16px 16px 18px; font-family:var(--mono); font-size:14px; position:relative; box-shadow:var(--shadow);
  -webkit-mask:radial-gradient(circle 6px at 50% 0, transparent 5.5px, #000 6px) top/14px 100% repeat-x; mask:radial-gradient(circle 6px at 50% 0, transparent 5.5px, #000 6px) top/14px 100% repeat-x; }
.docket .fine, .docket p { color:var(--paper-dim); }
.docket-h { font-weight:700; margin-top:8px; }
.docket dl { display:grid; grid-template-columns:auto 1fr; gap:3px 12px; margin:10px 0; }
.docket dt { color:var(--paper-dim); } .docket dd { margin:0; font-weight:700; }
.docket-steps { list-style:none; display:flex; gap:6px; padding:0; margin:10px 0; }
.docket-steps li { flex:1; text-align:center; border:1px solid var(--paper-line); border-radius:6px; padding:4px 0; font-size:13px; color:var(--paper-dim); }
.docket-steps li.on { background:var(--paper-ink); color:#fff; border-color:var(--paper-ink); }
.docket .ticks { padding-left:18px; margin:8px 0; color:var(--paper-ink); }
.docket-price { font-size:22px; font-weight:800; color:var(--paper-ink); margin:8px 0 4px; }
.ct-logo img { width:min(320px, 80%); }

/* ---------- Shelf & Bench ---------- */
.front-shelf-bench h1, .front-shelf-bench h2, .front-shelf-bench h3 { font-family:var(--serif); font-weight:600; letter-spacing:-.01em; }
.front-shelf-bench .identity h1 { font-size:clamp(34px, 7.6vw, 64px); max-width:18ch; }
.ticker { background:#0b0b0a; color:#e9e4d8; font-family:var(--mono); font-size:13px; border-bottom:2px solid #e2b857; }
.ticker .wrap { display:flex; flex-wrap:wrap; gap:4px 22px; padding-top:7px; padding-bottom:7px; }
.ticker span + span::before { content:"·"; margin-right:22px; color:#8f897d; }
.sb { padding:8px 0 44px; }
.sb-grid { display:grid; gap:30px; }
.bench, .shelf { background:var(--paper); color:var(--paper-ink); border:1px solid var(--paper-line); border-radius:6px; padding:22px 20px 20px; position:relative; }
.bench .kick, .shelf .kick, .bench em { color:var(--paper-gold); }
.bench h2 { color:var(--paper-ink); } .bench p { color:var(--paper-dim); }
.plank { height:16px; margin:16px -20px 0; background:linear-gradient(180deg,#a8743b,#7a4f22 70%,#5b3a17); box-shadow:0 6px 10px rgba(60,35,10,.35); }
.job { background:#fffef9; border:1px solid var(--paper-line); border-radius:6px; padding:12px 14px; box-shadow:2px 3px 0 #e6dcc6; transform:rotate(-.6deg); }
.job-h { font-weight:700; color:var(--paper-ink) !important; margin-bottom:6px; }
.job ol { margin:0; padding-left:22px; color:var(--paper-dim); font-size:15px; }
.job li.on { color:var(--paper-ink); font-weight:700; }
.job li.on::marker { color:var(--paper-gold); }
.boxes { display:grid; grid-template-columns:1.4fr 1fr; gap:12px; align-items:end; }
.box { position:relative; display:block; border-radius:4px; overflow:hidden; text-decoration:none; color:#fff; box-shadow:4px 6px 0 rgba(60,35,10,.25); }
.box img { width:100%; aspect-ratio:2/3; object-fit:cover; }
.box .sash { position:absolute; bottom:14px; left:0; right:0; text-align:center; background:#e2b857; color:#1a1305; font-size:12px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; padding:5px 0; box-shadow:0 2px 8px rgba(0,0,0,.4); }
.box.empty { aspect-ratio:2/3; border:2px dashed #b9ad95; display:grid; place-content:center; text-align:center; color:var(--paper-dim); box-shadow:none; padding:10px; font-family:var(--serif); }
.box.empty small { font-family:inherit; font-size:13px; }

@container (max-width:640px) {
  .ticker { font-size:12px; }
  .ticker .wrap { flex-wrap:nowrap; white-space:nowrap; overflow:hidden; gap:0 14px; }
  .ticker span + span::before { margin-right:14px; }
  .ticker span:nth-child(3) { display:none; }
}

/* ---------- the smallest phones (320-380 px): the brand keeps its mark, its name stays for screen readers ---------- */
@media (max-width:380px) {
  .brand-n { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .dock { padding-left:max(2px, env(safe-area-inset-left)); padding-right:max(2px, env(safe-area-inset-right)); }
  .dock a { font-size:11.5px; }
  .dock .ic { width:50px; }
}

/* ---------- the content's own width (beside the sidebar it is narrower than the screen): container queries on main ---------- */
@container (min-width:640px) {
  .cards { grid-template-columns:1fr 1fr; }
  .form .two { grid-template-columns:1fr 1fr; }
  .stills { grid-template-columns:repeat(3, 1fr); }
}
@container (min-width:700px) {
  .wrap { padding:0 32px; }
  .identity { padding:56px 0 40px; }
  .s { padding:72px 0; }
  .door { padding:48px 40px; }
  .steps4 { grid-template-columns:1fr 1fr; }
  .foot-in { grid-template-columns:1fr auto; align-items:center; }
  .foot .fine { grid-column:1 / -1; }
  /* the band that says what we are becomes one compact strip, and the two doors sit side by side from here, so an iPad
     on its side (with the sidebar open) still has both doors on the first screen */
  .identity { padding:34px 0 28px; }
  .identity .wrap { display:grid; grid-template-columns:1.05fr 1fr; column-gap:36px; align-items:end; }
  .identity .eyebrow { grid-column:1 / -1; }
  .identity h1 { grid-row:2 / span 2; font-size:clamp(34px, 4.9cqi, 54px); max-width:15ch; margin:0; }
  .front-shelf-bench .identity h1 { font-size:clamp(36px, 5.1cqi, 58px); }
  .identity .lede { font-size:17px; margin:0; }
  .identity .chips { margin-top:12px; }
  .id-games { display:none; }
  .identity:has(.id-games) .chips { display:flex; }
  .identity .chips li { font-size:13px; padding:4px 10px; }
  .doors { flex-direction:row; min-height:520px; }
  /* two equal halves (19 Nov: the Games door's picture filled only part of its half; the Work door was a narrow 357 px) */
  .door { flex:1 1 0; min-width:0; transition:flex .5s cubic-bezier(.22,.9,.32,1); }
  .gshelf { margin:0; padding:4px 0 0; grid-auto-flow:row; grid-auto-columns:auto; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; overflow:visible; }
  .doors:hover .door:hover { flex:1.18; }
  .door-work { align-items:center; }
  .door-games { min-height:0; }
  .case-grid { grid-template-columns:1.2fr 1fr; align-items:start; }
  .tease-grid { grid-template-columns:1fr 1fr; align-items:center; }
  .talk-grid { grid-template-columns:1fr 1.1fr; align-items:start; }
  .game-grid { grid-template-columns:1.5fr 1fr; align-items:start; }
  .ct-panel { grid-template-columns:1.4fr 1fr; padding:30px; align-items:center; }
  .sb-grid { grid-template-columns:1fr 1fr; }
}
@container (min-width:900px) {
  /* the band that says what we are stays one compact strip, so both doors are on the first screen */
  .identity { padding:40px 0 32px; }
  .identity .wrap { grid-template-columns:1.1fr 1fr; column-gap:56px; }
  .identity h1 { font-size:clamp(38px, 4.6cqi, 54px); }
  .front-shelf-bench .identity h1 { font-size:clamp(40px, 4.8cqi, 58px); }
  .identity .lede { font-size:17px; }
  .identity .chips { margin-top:14px; }
  .identity .chips li { font-size:14px; padding:5px 12px; }
  .doors { min-height:540px; }
  .door { padding:52px 48px; }
  .cards { grid-template-columns:repeat(4, 1fr); }
  .steps4 { grid-template-columns:repeat(4, 1fr); }
}

/* ---------- the left sidebar: wide enough, or a phone turned sideways ---------- */
@media (min-width:760px), (orientation:landscape) and (min-width:560px) {
  .frame { display:grid; grid-template-columns:var(--side-w) minmax(0, 1fr); transition:grid-template-columns .28s cubic-bezier(.22,.9,.32,1); }
  html[data-nav="rail"] { --side-w:88px; }
  .side { position:sticky; top:0; height:100vh; height:100dvh; z-index:40; display:flex; flex-direction:column; min-width:0;
    overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin;
    padding:14px 12px 12px max(12px, env(safe-area-inset-left)); background:var(--bg2); border-right:1px solid var(--line); }
  .side-head { height:auto; padding:2px 4px 18px; border:0; }
  .ts-top { display:none; }
  .brand-c { display:block; }
  .dock { position:static; display:flex; flex-direction:column; gap:2px; padding:0; background:none; backdrop-filter:none; -webkit-backdrop-filter:none; border:0; }
  .dock a, .side-foot a { position:relative; flex-direction:row; justify-content:flex-start; gap:12px; min-height:48px; padding:7px 12px; font-size:16px; font-weight:650; color:var(--dim); border-radius:12px; text-decoration:none; display:flex; align-items:center; }
  .dock .ic, .side-foot .ic { width:24px; height:24px; background:none !important; border-radius:0; }
  .t { display:flex; flex-direction:column; min-width:0; line-height:1.2; }
  .l { white-space:nowrap; }
  .dock a:hover, .side-foot a:hover { background:var(--card); color:var(--ink); }
  /* you are here: the same gold-tinted pill as the bar, the rail and the dock, with a gold edge inside it */
  .dock a[aria-current="page"] { background:color-mix(in srgb, var(--gold) 17%, transparent); color:var(--ink); font-weight:800; }
  .dock a[aria-current="page"]::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:4px; border-radius:0 4px 4px 0; background:var(--gold); }
  .dock a[aria-current="page"] .ic { color:var(--gold2); }
  [data-theme="light"] .dock a[aria-current="page"] { background:color-mix(in srgb, var(--gold) 15%, transparent); }
  [data-theme="light"] .dock a[aria-current="page"] .ic { color:var(--gold); background:none !important; }
  .side-foot { display:flex; flex-direction:column; gap:2px; margin-top:auto; padding-top:12px; border-top:1px solid var(--line); }
  .side-foot a { min-height:44px; font-size:15px; }
  .fold .i { transition:transform .28s; }
  .page { padding-bottom:0; min-width:0; }

  /* folded to the rail: icons with their word under them (never icons alone) */
  html[data-nav="rail"] .side { padding:14px 8px 12px max(8px, env(safe-area-inset-left)); }
  html[data-nav="rail"] .brand-t { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  html[data-nav="rail"] .side-head { justify-content:center; padding:2px 0 16px; }
  html[data-nav="rail"] .brand { margin:0; }
  html[data-nav="rail"] .dock a, html[data-nav="rail"] .side-foot a { flex-direction:column; justify-content:center; gap:4px; padding:7px 2px; min-height:60px; font-size:11.5px; font-weight:700; text-align:center; }
  html[data-nav="rail"] .dock .ic { width:52px; height:30px; border-radius:999px; }
  html[data-nav="rail"] .dock a[aria-current="page"] { background:none; box-shadow:none; }
  html[data-nav="rail"] .dock a[aria-current="page"] .ic { background:color-mix(in srgb, var(--gold) 26%, transparent) !important; color:var(--gold2); }
  html[data-theme="light"][data-nav="rail"] .dock a[aria-current="page"] .ic { background:var(--gold) !important; color:#fff; }
  html[data-nav="rail"] .dock a[aria-current="page"]::before { display:none; }
  html[data-nav="rail"] .sub { display:none !important; }
  html[data-nav="rail"] .fold .i { transform:scaleX(-1); }
}
/* tall enough: each place says what it is under its name */
@media (min-width:760px) and (min-height:640px), (orientation:landscape) and (min-width:560px) and (min-height:640px) {
  .dock .sub { display:block; font-size:13px; font-weight:500; color:var(--dim2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
  .dock a { min-height:56px; }
  .dock a[aria-current="page"] .sub { color:var(--dim); }
}
/* a phone on its side is short: the sidebar's foot becomes one row of three, each still with its word */
@media (orientation:landscape) and (min-width:560px) and (max-height:500px) {
  :root { --side-w:212px; }   /* a narrower open sidebar: the page keeps three quarters of a short, wide screen */
  .side { padding-top:10px; padding-bottom:8px; }
  .side-head { padding-bottom:10px; }
  .dock a { min-height:44px; }
  .side-foot { flex-direction:row; gap:2px; padding-top:6px; }
  .side-foot a { flex:1; min-width:0; flex-direction:column; justify-content:center; gap:2px; min-height:48px; padding:4px 2px; font-size:11px; text-align:center; }
  .side-foot .l { white-space:normal; line-height:1.1; }
}
/* the open question: the bottom bar kept on a computer as a floating dock beside the sidebar (nav.bottomBarOnWide) */
@media (min-width:760px) and (min-height:600px) {
  html[data-bar="wide"] .dock-wide { display:flex; position:fixed; z-index:45; bottom:max(14px, env(safe-area-inset-bottom)); left:calc((100% + var(--side-w)) / 2); right:auto; width:max-content; transform:translateX(-50%);
    flex-direction:row; gap:2px; padding:5px; border-radius:22px; background:color-mix(in srgb, var(--bg2) 86%, transparent);
    backdrop-filter:blur(16px) saturate(1.2); -webkit-backdrop-filter:blur(16px) saturate(1.2); border:1px solid var(--line2); box-shadow:var(--shadow);
    transition:left .28s cubic-bezier(.22,.9,.32,1); }
  html[data-bar="wide"] .dock-wide a { flex-direction:column; justify-content:center; gap:3px; min-width:78px; min-height:56px; padding:4px 6px; font-size:12px; font-weight:700; }
  html[data-bar="wide"] .dock-wide a::before { display:none; }
  html[data-bar="wide"] .dock-wide a[aria-current="page"] { background:none; box-shadow:none; }
  html[data-bar="wide"] .dock-wide .ic { width:52px; height:28px; border-radius:999px; }
  html[data-bar="wide"] .dock-wide a[aria-current="page"] .ic { background:color-mix(in srgb, var(--gold) 26%, transparent) !important; color:var(--gold2); }
  html[data-bar="wide"] .dock-wide .sub { display:none !important; }
  html[data-bar="wide"] .page { padding-bottom:96px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; }
}
/* Wrackline page: the last three stills behind a fold (WallaceOSSiteVotes: keeps the phone's first view in budget) */
.more-stills { margin-top:10px; }
.more-stills summary { cursor:pointer; font-weight:700; min-height:44px; display:flex; align-items:center; }
.more-stills .stills { margin-top:6px; }
