/* theGuide hub · extras: top bar, style accordion, today strip, wipe, motifs, quick actions, idle screen.
   Hub-side rules are scoped to #hub / #hubfx; top-bar rules are scoped to #topbar under body[data-view="nave"]. */

/* ═══ the shell's old idle look is retired inside the hub; its top-bar dimming too ═══ */
#vigil{display:none!important}
body.vigil #topbar{opacity:1!important}
body[data-view="nave"] #tb-missive{display:none!important}

/* ═══ top bar: breadcrumb, app chips, search, quick, inbox ═══ */
body[data-view="nave"] #topbar{gap:12px}
body[data-view="nave"] #topbar .tb-home{display:inline-flex;align-items:center;white-space:nowrap}
body[data-view="nave"] #topbar .crumb{cursor:pointer;border-bottom:2px solid transparent;padding:1px 1px}
body[data-view="nave"] #topbar .crumb:hover{border-bottom-color:var(--hink,#0d0b09)}
body[data-view="nave"] #topbar .tb-home i{font-style:normal;margin:0 7px;opacity:.5}
body[data-view="nave"] #topbar .tb-home b{font-weight:700;opacity:.65}
#topbar .brz-row{gap:6px;margin-left:6px}
#topbar .hchip{display:inline-flex;align-items:center;gap:6px;border:2px solid var(--hink,var(--hair));border-radius:var(--hrp,999px);padding:2px 9px 2px 3px;font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;color:var(--hink,var(--ink2));background:transparent;transition:background .2s,color .2s}
#topbar .hchip b{display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;border-radius:50%;background:var(--bc);color:#0d0b09;font-size:10px;opacity:.55}
#topbar .hchip i{font-style:normal}
#topbar .hchip:hover,#topbar .hchip:focus-visible{background:var(--hink,var(--ink2));color:var(--hbg,var(--bg));outline:none}
#topbar .hchip.lit b{opacity:1}
#topbar .hchip.lit{border-width:3px;padding:1px 8px 1px 2px}
#topbar .hchip.active{background:var(--hink,var(--ink2));color:var(--hbg,var(--bg))}
#topbar .hchip.pin{border-style:double;border-width:4px}
#topbar .tbx{display:inline-flex;align-items:center;gap:7px;border:2px solid var(--hink,var(--hair));border-radius:var(--hrp,999px);padding:3px 11px;font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;color:var(--hink,var(--ink2));white-space:nowrap;transition:background .2s,color .2s}
#topbar .tbx:hover,#topbar .tbx:focus-visible{background:var(--hink,var(--ink2));color:var(--hbg,var(--bg));outline:none}
#topbar .tbx kbd{font-family:inherit;opacity:.6;font-size:9px}
#topbar .tbx em{font-style:normal;background:var(--hink,var(--ink));color:var(--hbg,var(--bg));border-radius:999px;padding:0 6px;margin-left:2px}
#topbar .tbx.has{border-width:3px}
@media (max-width:980px){#topbar .hchip i,#topbar #tb-quick .lbl{display:none}#topbar .hchip{padding:2px 3px}}


/* ═══ header: page tabs sit beside Roll and Style; the in-page tab bar is retired ═══ */
#hub .tabs{display:none}
#hub .htabs{display:flex;flex-wrap:wrap;gap:6px 8px;margin-left:10px}
#hub .htabs .tabx{padding:3px 12px;min-height:34px;font-size:13px;border-width:3px}
#hub .rhead{padding-bottom:6px}

/* ═══ today strip on the house ═══ */
#hub .today{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
#hub .tdy{font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace;font-size:11px;letter-spacing:.06em;text-transform:uppercase;padding:6px 12px;margin:0;background:transparent;cursor:pointer}
#hub span.tdy{cursor:default}
#hub .tdy b{opacity:.6;margin-right:4px;font-weight:700}
#hub button.tdy:hover{background:var(--ink);color:var(--hi)}

/* ═══ style panel: accordion ═══ */
#hubfx .pn[data-ready]>div{animation:none}
#hubfx .accs{margin-top:14px}
#hubfx .acc{border-top:3px solid var(--ink)}
#hubfx .acc:last-child{border-bottom:3px solid var(--ink)}
#hubfx .acc summary{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:12px 2px;cursor:pointer;list-style:none}
#hubfx .acc summary::-webkit-details-marker{display:none}
#hubfx .acc summary:focus-visible{outline:4px solid var(--ink);outline-offset:-4px}
#hubfx .acc .at{font-weight:800;font-size:21px;text-transform:uppercase;letter-spacing:-.02em}
#hubfx .acc .at::before{content:"▸";display:inline-block;width:1.1em;transition:transform .2s}
#hubfx .acc[open] .at::before{transform:rotate(90deg)}
#hubfx .acc .as{opacity:.7;font-size:11px;text-align:right;overflow-wrap:anywhere}
#hubfx .acc .ab{padding:0 2px 18px}
#hubfx .hint{line-height:1.6;margin:4px 0 10px;opacity:.85}
#hubfx .how{margin:6px 0 12px;padding-left:20px;font-size:15px;line-height:1.5;font-weight:500}
#hubfx .opt{display:flex;gap:10px;align-items:flex-start;margin:10px 0;font-size:15px;line-height:1.4;cursor:pointer}
#hubfx .opt input[type=checkbox]{width:18px;height:18px;margin-top:2px;accent-color:var(--ink);flex:none}
#hubfx .opt.sel{align-items:center;justify-content:space-between;gap:14px}
#hubfx select{border:3px solid var(--ink);border-radius:var(--rt);background:var(--paper);padding:6px 10px;font:inherit;font-size:14px;font-weight:700;color:var(--ink)}
#hubfx .bld{display:flex;gap:14px;flex-wrap:wrap;margin:10px 0}
#hubfx .bld label{display:flex;flex-direction:column;gap:6px}
#hubfx .bld input[type=color]{width:70px;height:46px;padding:0;border:3px solid var(--ink);background:none;cursor:pointer;border-radius:var(--rt)}
#hubfx .swstrip.big{height:52px;border:3px solid var(--ink);border-radius:var(--rt);overflow:hidden}
#hubfx .swx{display:block;width:100%;border:0;border-top:2px solid var(--ink);background:transparent;padding:4px 10px;text-align:left;cursor:pointer;font-size:10px;letter-spacing:.08em;text-transform:uppercase}
#hubfx .swx:hover{background:var(--ink);color:var(--hi)}
#hubfx .pill[disabled]{opacity:.45;cursor:not-allowed}
#hubfx .keys{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px 14px}
#hubfx .keys div{display:flex;gap:10px;align-items:center;font-size:15px}
#hubfx kbd{font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace;border:2px solid var(--ink);padding:1px 8px;min-width:34px;text-align:center;font-size:12px;font-weight:700;flex:none}

/* ═══ page wipe: four world colours slide away like a reel ═══ */
#hubfx .wipe{position:fixed;inset:42px 0 0 0;display:flex;z-index:380;pointer-events:none}
#hubfx .wipe i{flex:1;display:block;border-right:3px solid var(--ink)}

/* ═══ room motifs ═══ */
#hubmotif{position:fixed;right:-4vmin;bottom:-6vmin;width:min(80vmin,780px);aspect-ratio:1;opacity:.17;contain:strict;pointer-events:none;z-index:1}
#hubmotif svg{width:100%;height:100%;display:block;overflow:visible}
#hubmotif svg :is(line,path,circle){stroke:var(--ink);fill:none;stroke-width:2;vector-effect:non-scaling-stroke}
#hubmotif .spin{transform-origin:200px 200px;animation:hxspin 160s linear infinite}
#hubmotif .spin.slow{animation-duration:220s}
#hubmotif .drift{animation:hxdrift 40s ease-in-out infinite alternate}
#hubmotif .drift2{animation:hxdrift 52s ease-in-out infinite alternate-reverse}
#hubmotif .breathe{transform-origin:200px 200px;animation:hxbreathe 18s ease-in-out infinite alternate}
@keyframes hxspin{to{transform:rotate(360deg)}}
@keyframes hxdrift{from{transform:translate(-8px,6px)}to{transform:translate(10px,-8px)}}
@keyframes hxbreathe{from{transform:scale(.97)}to{transform:scale(1.05)}}

/* ═══ draggable plates ═══ */
#hub .shape{translate:calc(var(--mx) * var(--d) * -1px + var(--dx,0px)) calc(var(--my) * var(--d) * -1px + var(--dy,0px));cursor:grab;touch-action:manipulation}
#hub .shape.dragging{cursor:grabbing;transition:none;z-index:6;box-shadow:12px 12px 0 var(--ink)}

/* ═══ quick actions ═══ */
#hubfx .hq{position:fixed;top:50px;right:12px;width:min(380px,94vw);border:3px solid var(--ink);border-radius:var(--rb);background:var(--paper);color:var(--ink);box-shadow:6px 6px 0 var(--ink);padding:14px;z-index:395;pointer-events:auto}
#hubfx .hq .hqt{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#hubfx .hq .hqt .pill{padding:4px 12px;min-height:34px;font-size:11px}
#hubfx .hq .hqt .lbb{margin-left:auto;padding:4px 12px;min-height:34px}
#hubfx .hq .hqf{display:flex;flex-direction:column;gap:8px;margin-top:12px}
#hubfx .hq .hqf input,#hubfx .hq .hqf textarea{width:100%;border:3px solid var(--ink);border-radius:var(--rp);background:#fff;padding:10px 14px;font:inherit;font-weight:600;font-size:17px;resize:vertical}
#hubfx .hq .hqf textarea{border-radius:var(--rt)}
#hubfx .hq .hqf .cta{align-self:flex-start}

/* ═══ the idle screen ═══ */
#hubfx .hv{--vbg:var(--main);--vfg:var(--ink);position:fixed;inset:0;z-index:390;background:var(--vbg);color:var(--vfg);display:flex;flex-direction:column;justify-content:space-between;padding:26px 34px;pointer-events:auto;animation:hxfade .8s ease both;cursor:pointer;overflow:hidden}
#hubfx .hv.night{--vbg:var(--ink);--vfg:var(--paper)}
@keyframes hxfade{from{opacity:0}to{opacity:1}}
#hubfx .hv-top{display:flex;justify-content:space-between;gap:12px;align-items:center;position:relative;z-index:2}
#hubfx .hv-top i{display:inline-block;width:9px;height:9px;border-radius:50%;border:2px solid var(--vfg);margin-left:6px}
#hubfx .hv-top i.on{background:var(--vfg)}
#hubfx .hv-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;position:relative;z-index:1;min-height:0;animation:hxfade 1.2s ease both}
#hubfx .hv-clock{font-weight:800;font-size:clamp(96px,24vw,380px);line-height:.8;letter-spacing:-.06em;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;background-size:cover;background-position:center;padding:0 .08em 0 0;filter:drop-shadow(8px 8px 0 var(--vfg));animation:hxfloat 90s ease-in-out infinite alternate}
#hubfx .hv.night .hv-clock{filter:drop-shadow(8px 8px 0 var(--main))}
@keyframes hxfloat{from{transform:translate(-14px,-8px)}to{transform:translate(14px,10px)}}
#hubfx .hv-date{opacity:.85;font-size:14px;letter-spacing:.16em}
#hubfx .hv-cap{opacity:.8;letter-spacing:.16em}
#hubfx .hv-candles{display:flex;flex-wrap:wrap;gap:22px;justify-content:center;max-width:980px}
#hubfx .hv .note{color:#0d0b09;min-width:200px;max-width:260px;padding:16px;box-shadow:6px 6px 0 var(--vfg);border-color:var(--vfg)}
#hubfx .hv-cn{font-weight:800;font-size:24px;line-height:.95;text-transform:uppercase;letter-spacing:-.03em;margin-top:6px;overflow-wrap:anywhere}
#hubfx .hv-plates{display:flex;flex-wrap:wrap;gap:30px;justify-content:center;align-items:flex-end}
#hubfx .hv-plates figure{margin:0;width:min(26vw,300px);animation:hxfloat 40s ease-in-out infinite alternate;animation-delay:calc(var(--k) * -8s)}
#hubfx .hv-plates img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;border:3px solid var(--vfg);border-radius:var(--rb);box-shadow:8px 8px 0 var(--vfg)}
#hubfx .hv-plates figure:nth-child(2) img{border-radius:50%;aspect-ratio:1}
#hubfx .hv-plates figcaption{margin-top:10px;text-align:center;opacity:.85}
#hubfx .hv-contours{position:absolute;inset:0;width:100%;height:100%;opacity:.55}
#hubfx .hv-contours path{fill:none;stroke:var(--vfg);stroke-width:2;vector-effect:non-scaling-stroke}
#hubfx .hv-contours .hvb{transform-origin:300px 200px;animation:hxbreathe 14s ease-in-out infinite alternate}
#hubfx .hv-foot{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap;position:relative;z-index:2}
#hubfx .hv .cta{background:var(--vfg);color:var(--vbg);border-color:var(--vfg);box-shadow:5px 5px 0 var(--hi)}
@media (prefers-reduced-motion:reduce){#hubmotif :is(.spin,.drift,.drift2,.breathe),#hubfx .hv-clock,#hubfx .hv-plates figure,#hubfx .hv-contours .hvb{animation:none}}

/* ═══ visitor rooms: lanes, art covers, the edition ledger ═══ */
#hub .rb-lane{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 16px;margin:38px 0 16px;border-top:3px solid var(--ink);padding-top:10px}
#hub .rb-lane:first-child{margin-top:0}
#hub .rb-lane h2{margin:0;font-size:clamp(26px,3vw,40px);line-height:1;letter-spacing:-.03em}
#hub .rb-lane p{margin:0 0 0 auto;max-width:430px;font-size:15px;line-height:1.4}
#hub .rb-feature+.rb-lane{margin-top:44px}
#hub .rb-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
#hub .rb-grid-2 .rb-card-cover{height:clamp(180px,22vw,270px)}
#hub .rb-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
#hub .rb-grid-4 .rb-card-cover{height:150px}
#hub .rb-grid-4 .rb-card-copy h3{font-size:22px}
@media (max-width:1180px){#hub .rb-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:700px){#hub .rb-grid-2,#hub .rb-grid-4{grid-template-columns:1fr}#hub .rb-lane p{margin-left:0}}
#hub .rb-card-lab{background:var(--ink);color:var(--paper);justify-content:center}
#hub .rb-card-lab .rb-card-copy{display:flex;flex-direction:column;height:100%;gap:2px}
#hub .rb-card-lab .rb-status{align-self:flex-start;background:var(--hi);color:var(--ink);border-color:var(--hi);margin:10px 0}
#hub .rb-card-lab .rb-small-link{background:var(--hi);color:var(--ink)}
#hub .rb-cover-art{background-size:cover;background-position:center;justify-content:flex-end;align-items:flex-start}
#hub .rb-cover-art b{display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:var(--rd);background:var(--ink);color:var(--hi);font-size:30px;letter-spacing:0;line-height:1;border:3px solid var(--paper)}
#hub .rb-ledger{background:var(--paper);color:var(--ink);border:3px solid var(--ink);border-radius:var(--rb);box-shadow:8px 8px 0 var(--ink);overflow:hidden}
#hub .rb-ledger-row{display:grid;grid-template-columns:minmax(200px,1.1fr) minmax(190px,.9fr) minmax(0,1.7fr) auto;gap:10px 26px;align-items:start;padding:20px 24px;border-top:3px solid var(--ink)}
#hub .rb-ledger-row:first-child{border-top:0}
#hub .rb-ledger-row h3{margin:6px 0 0;font-size:24px;line-height:1.05;letter-spacing:-.02em}
#hub .rb-ledger-row p{margin:0;font-size:15px;line-height:1.45}
#hub .rb-ledger-s b{display:block;margin-top:6px;font-size:16px;line-height:1.3}
@media (max-width:980px){#hub .rb-ledger-row{grid-template-columns:1fr 1fr}#hub .rb-ledger-row p{grid-column:1/-1}}
@media (max-width:560px){#hub .rb-ledger-row{grid-template-columns:1fr}}

/* ═══ the Altar's shelf, and guide pages on a world colour ═══ */
#hub .altar-work-grid{grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr))}
#hub .altar-work-card h3{font-size:clamp(26px,2.6vw,38px);overflow-wrap:anywhere;hyphens:auto}
#hub.is-product .rb-product{max-width:1180px;margin:0 auto}

/* ═══ transitions: the container, then each way across ═══ */
#hubfx .wipe.abs{display:block;overflow:hidden}
#hubfx .wipe.abs i{position:absolute;display:block;border:0}
#hubfx .wipe.abs i:not(.band):not(.tile):not(.half):not(.bar):not(.ring):not(.full){left:0;width:100%}
#hubfx .wipe .full{inset:0}
#hubfx .wipe .band{top:-5%;bottom:-5%;border-left:3px solid var(--ink);border-right:3px solid var(--ink)}
#hubfx .wipe .tile{box-shadow:inset 0 0 0 2px var(--ink)}
#hubfx .wipe .half{top:0;bottom:0;width:50.3%;border:3px solid var(--ink)}
#hubfx .wipe .bar{top:0;bottom:0;border-left:2px solid var(--ink);border-right:2px solid var(--ink)}
#hubfx .wipe .ring{width:0;height:0;border:4px solid var(--ink);border-radius:50%;transform:translate(-50%,-50%);background:transparent}

/* ═══ deeper backgrounds ═══ */
#hubbg{position:fixed;inset:42px 0 0 0;z-index:0;pointer-events:none;overflow:hidden}
#hubbg[data-depth="subtle"] .bg-cont{opacity:.06}
#hubbg .bg-cont{position:absolute;inset:-4%;opacity:.12;}
#hubbg .bg-cont svg{width:100%;height:100%;display:block}
#hubbg .bg-cont path{fill:none;stroke:var(--ink);stroke-width:1.6;vector-effect:non-scaling-stroke}
@keyframes hxpan{from{transform:scale(1.04) translate(-1.5%,-1%)}to{transform:scale(1.14) translate(1.5%,1%)}}
@keyframes hxblob{from{transform:translate(-3vmax,2vmax) scale(.95)}to{transform:translate(4vmax,-3vmax) scale(1.08)}}
#hub[data-s="splash"] 
/* ═══ pointer-led life ═══ */
#hub .tilting{will-change:transform}
body.hcur #hubcur{display:block}
#hubcur{display:none;position:fixed;left:0;top:0;width:34px;height:34px;border:2px solid #fff;border-radius:50%;pointer-events:none;z-index:500;mix-blend-mode:difference;transition:width .2s,height .2s,margin .2s,background .2s}
#hubcur.hot{width:60px;height:60px;margin:-13px 0 0 -13px;background:rgba(255,255,255,.35)}

/* ═══ progress, back to top, footer rail, sticky header ═══ */
#hubprog{position:fixed;left:0;top:42px;height:4px;width:100%;background:var(--ink);transform-origin:0 50%;transform:scaleX(0);z-index:30;pointer-events:none}
#hubtop{position:fixed;right:22px;bottom:22px;width:48px;height:48px;border-radius:var(--rd);border:3px solid var(--ink);background:var(--hi);color:var(--ink);font-weight:800;font-size:22px;cursor:pointer;z-index:30;box-shadow:4px 4px 0 var(--ink);opacity:0;transform:translateY(14px);pointer-events:none;transition:opacity .25s,transform .25s}
#hubtop.on{opacity:1;transform:none;pointer-events:auto}
#hubtop:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink)}
#hub .hfoot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 20px;margin:36px 34px 0;padding:16px 0 26px;border-top:3px solid var(--ink);opacity:.85;position:relative;z-index:3}
#hub .hfoot nav{display:flex;gap:16px;flex-wrap:wrap}
#hub .hfoot :is(a,button){background:none;border:0;padding:2px 0;font:inherit;color:inherit;cursor:pointer;border-bottom:2px solid transparent;text-transform:inherit;letter-spacing:inherit}
#hub .hfoot :is(a,button):hover{border-bottom-color:var(--ink)}
@media (max-width:640px){#hub .hfoot{margin:30px 16px 0}}
@media (pointer:coarse){#hub .hfoot :is(a,button){padding:9px 6px;min-height:40px;display:inline-flex;align-items:center}}
/* ═══ the strip: one Roll, one Settings, glyph-only app chips ═══ */
body[data-view="nave"] #topbar #tb-tips{display:none}
body[data-view="nave"] #topbar #tb-inbox:not(.has){display:none}
#topbar .hchip i{display:none}
#topbar .hchip.active i{display:inline}
#topbar .hchip{padding:2px 3px}
#topbar .hchip.active{padding:2px 9px 2px 3px}
#topbar #tb-settings.pinned::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--hink,currentColor);margin-left:1px}
@media (max-width:760px){#topbar .tbx .lbl{display:none}#topbar .tbx{padding:3px 9px}}
@media (max-width:640px){#topbar .brz-row{display:none}body[data-view="nave"] #topbar{gap:6px;padding-left:8px;padding-right:8px}body[data-view="nave"] #topbar .tb-home{min-width:0;flex:1 1 0;overflow:hidden;text-overflow:ellipsis;font-size:10px}body[data-view="nave"] #topbar .tb-home i{margin:0 4px}#topbar .tbx{padding:3px 7px;flex:none}}

body.hsticky #hub #hdr{position:sticky!important;top:0;z-index:6!important;background:var(--bg);transition:none}
body.hsticky #hub #hdr::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--ink);opacity:0;transition:opacity .2s}
#hubfx .hq .hqx{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
#hubfx .hq .hqx .pill{padding:4px 12px;min-height:34px;font-size:11px}

/* ═══ calm mode: stop everything ═══ */
body[data-calm="1"] :is(#hub,#hubfx,#hubmotif,#hubbg) *,body[data-calm="1"] :is(#hub,#hubfx,#hubmotif,#hubbg){animation:none!important;transition:none!important}
