/* ================= home page tiles (js/tiles.js) =================
   Desktop: 24 columns of 20px rows, each tile placed exactly at column --x, row --y, --w wide and --h tall (gaps allowed).
   Tablets (6 columns: --tx/--ty/--tw) and phones (2: --px/--py/--pw) get positions worked out by flowLayout() in tiles.js.
   Every tile is a size container (width and height), so what's inside adapts to the tile's own shape, not the screen's:
   see "fitting each tile's shape" below. */
.vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.hgrid{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));grid-auto-rows:20px;gap:12px;position:relative}
.ht{grid-column:var(--x)/span var(--w);grid-row:var(--y)/span var(--h);position:relative;min-width:0;min-height:0;display:flex;container-type:size;border-radius:12px}
.htb{flex:1;min-width:0;min-height:0;display:flex}
.htb>*{flex:1;min-width:0;min-height:0;margin:0}
.htb>.panel{overflow:hidden}
/* :where() keeps this general rule weak, so each tile's own layout (rows, grids) wins */
.htb>:where(.panel:not(.clock)){display:flex;flex-direction:column}
@media (max-width:1099px){.hcbar-in{grid-template-columns:auto auto}.hcbar-tip{display:none}.hcbar-in .row{justify-self:end}.hgrid{grid-template-columns:repeat(6,minmax(0,1fr))}.ht{grid-column:var(--tx)/span var(--tw);grid-row:var(--ty)/span var(--h)}}
@media (max-width:640px){.hgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ht{grid-column:var(--px)/span var(--pw);grid-row:var(--py)/span var(--h)}}
.page.enter .ht{animation:rise .34s var(--ease) backwards;animation-delay:calc(min(var(--i),16) * 22ms)}

/* the "Customise" button, and the bar that replaces it while customising */
.hcbar{display:flex;justify-content:flex-end;margin:-8px 0 6px}
.hcust{display:inline-flex;align-items:center;gap:6px;font-size:.84rem;padding:4px 10px;color:var(--muted)}
.hcust svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.hcust:hover{color:var(--sage-d)}
.hcbar.on .hcust{visibility:hidden}
.hcbar-in{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:50;width:min(980px,calc(100vw - 32px));translate:-50% 0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:10px 12px 10px 16px;border:1px solid var(--sage);border-radius:10px;
  background:color-mix(in srgb,var(--card) 94%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 14px 40px rgba(0,0,0,.35),0 0 18px var(--glow);animation:hcbIn .32s var(--ease)}
@keyframes hcbIn{from{opacity:0;transform:translateY(16px)}}
html.hedit #undobar{bottom:calc(96px + env(safe-area-inset-bottom,0px))}html.hedit .toast{bottom:calc(96px + env(safe-area-inset-bottom,0px))}
.hcbar-t{font-weight:700}
.hcbar-tip{min-width:0;color:var(--muted);font-size:.85rem}
.hcbar-in .row{gap:8px;flex-wrap:nowrap}
.hcbar-in button{padding:6px 14px;font-size:.88rem;white-space:nowrap}

/* customising: outline, toolbar, cover (catches the drag), resize corner */
.hgrid.editing{margin-bottom:180px;background-image:radial-gradient(circle,color-mix(in srgb,var(--sage) 45%,transparent) 1.1px,transparent 1.6px);background-size:calc((100% + 12px) / 24) 32px;background-position:-6px -6px}
@media (max-width:1099px){.hgrid.editing{background:none}}
.hgrid.editing .ht{outline:1px dashed color-mix(in srgb,var(--sage) 60%,transparent);outline-offset:3px}
.hgrid.editing .htb{transition:opacity .2s;opacity:.88}
.hte{position:absolute;top:7px;left:7px;right:7px;z-index:3;display:flex;align-items:center;gap:5px;pointer-events:none;opacity:0;translate:0 -3px;transition:opacity .16s ease,translate .2s var(--ease)}
.hte-rs{opacity:0;transition:opacity .16s ease}
.ht:hover>.hte,.ht:focus-within>.hte,.ht.hdrag>.hte,.ht:hover>.hte-rs,.ht:focus-within>.hte-rs,.ht.hrsz>.hte-rs{opacity:1;translate:0 0}
.hgrid.dragging .ht:not(.hdrag)>.hte,.hgrid.dragging .ht:not(.hdrag)>.hte-rs{opacity:0}
@media (hover:none){.hte,.hte-rs{opacity:1;translate:0 0}}
.hte>button{pointer-events:auto}
.hte-n,.hte-sz{min-width:0;padding:3px 8px;border-radius:5px;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);white-space:nowrap}
.hte-n{overflow:hidden;text-overflow:ellipsis;font:600 .78rem "Exo 2",sans-serif}
.hte-sz{flex:none;margin-right:auto;font:400 .72rem "Share Tech Mono",ui-monospace,monospace;color:var(--muted)}
.hte-b{flex:none;width:28px;height:28px;min-height:0!important;padding:0;display:grid;place-items:center;border-radius:6px;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);color:var(--ink);cursor:pointer}
.hte-b svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.hte-grip svg{fill:currentColor;stroke:none}
.hte-grip{cursor:grab;touch-action:none}
.hte-b:hover{border-color:var(--sage);color:var(--sage-d)}.hte-x:hover{border-color:var(--danger);color:var(--danger)}
.hte-cover{position:absolute;inset:0;z-index:2;border-radius:12px;cursor:grab;background:color-mix(in srgb,var(--paper) 14%,transparent)}
.hte-rs{position:absolute;right:-8px;bottom:-8px;z-index:4;width:34px;height:34px;min-height:0!important;padding:0;border:0;background:none;box-shadow:none;cursor:nwse-resize;touch-action:none;border-radius:8px}
.hte-rs::after{content:"";position:absolute;right:10px;bottom:10px;width:13px;height:13px;border-right:3px solid var(--sage);border-bottom:3px solid var(--sage);border-radius:0 0 5px 0;transition:transform .2s var(--spring)}
.hte-rs:hover::after,.ht.hrsz .hte-rs::after{transform:scale(1.2)}
.hte-rs:focus-visible{outline:2px solid var(--sage);outline-offset:-4px}
/* small tiles: just the buttons */
@container (max-width:200px){.hte-n{display:none}}
@container (max-width:130px){.hte-sz{display:none}}
.ht.hdrag{z-index:30;cursor:grabbing}
.ht.hdrag .htb{opacity:1;transform:scale(1.025) rotate(-.4deg);box-shadow:0 22px 50px rgba(0,0,0,.32);border-radius:12px;transition:transform .2s var(--ease),box-shadow .2s}
.ht.hdrag .hte-cover{cursor:grabbing}
.ht.hrsz{z-index:30}.ht.hrsz .htb{opacity:1}
.hgrid.dragging{user-select:none;-webkit-user-select:none}
/* where the dragged tile will land */
.hph{position:absolute;z-index:29;border:2px dashed var(--sage);border-radius:12px;background:color-mix(in srgb,var(--sage) 9%,transparent);pointer-events:none;
  transition:left .16s var(--ease),top .16s var(--ease),width .16s var(--ease),height .16s var(--ease)}
/* tablets/phones: the bar showing where in the stack it will go */
.hins{position:absolute;z-index:31;border-radius:3px;background:var(--sage);box-shadow:0 0 12px var(--glow);pointer-events:none;transition:left .14s var(--ease),top .14s var(--ease)}
.hins.v{width:4px}.hins.h{height:4px}
/* will be pushed down when you let go */
.ht.hbump{outline-color:var(--blue)!important;outline-style:solid!important}.ht.hbump .htb{opacity:.6}
.ht.hflash .htb>*{animation:hflash 1.3s var(--ease)}
@keyframes hflash{0%,30%{box-shadow:0 0 0 3px var(--sage),0 0 34px var(--glow)}100%{box-shadow:0 0 0 0 transparent}}
@media (pointer:coarse){.hte-b{width:36px;height:36px}.hte-cover{cursor:default}.hte-rs{width:44px;height:44px;right:-10px;bottom:-10px}}

/* ---- tile contents ---- */
.page-home .panel{padding:12px 14px}
.page-home .panel h3{margin:0}
.page-home .panel .spread{align-items:center}
.page-home .panel .spread .btn{padding:4px 11px;font-size:.85rem}
/* greeting and headings sit on the page, not on a card */
.hgreet .lede{margin:0}
.ht.bare .htb{align-items:flex-end}
.hhead{margin:0 0 2px;font-size:1.3rem;align-self:flex-end}
.clock .cd b{color:var(--sage-d)}
/* stats and shortcuts fill their tile */
.hsc,.htool{padding:14px;overflow:hidden}.hsc h3,.htool h3{font-size:1.05rem;margin:10px 0 4px}.hsc p,.htool p{font-size:.84rem;line-height:1.4;margin:0}
.tool.ic-b .ic{background:var(--blue-l);color:var(--blue-ink)}
.htools .tools.small{flex:1;min-height:0;overflow:auto;margin-top:10px;grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr));gap:10px;align-content:start;padding:2px}
.htools .tools.small .tool{padding:12px}.htools .tools.small .tool h3{font-size:.95rem;margin:8px 0 0}
.hportals .pchips{margin-top:10px;overflow:auto;min-height:0;align-content:flex-start}
.hportals .pchip{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* quick commands: one line each once the tile's wide enough */
.page-home .qcmd{padding:6px 0}
@container (min-width:560px){.b-cmds .qcmd{padding:7px 0}.b-cmds .qcmd>div{display:flex;align-items:center;gap:10px;flex:1}.b-cmds .qcmd b{flex:0 0 46%;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.b-cmds code.qc{margin-top:0;flex:1;min-width:0}}
.page-home .pw{font-size:1.1rem;padding:12px}
.page-home .kv td{padding:4px}
.b-slow .fill,.b-week .fill{margin-top:6px}
/* task dashboard pieces on the home page */
.ht .dcard .dviz{flex:1;min-height:0;display:flex;flex-direction:column}
.ht .lc{flex:1;min-height:0;display:flex;flex-direction:column}.ht .lcp{flex:1;height:auto;min-height:50px}
.ht .dcols{min-height:50px}.ht .mchart{min-height:40px}.ht .dbars{overflow:hidden}
.ht .dcard.tv .dtable{flex:1;min-height:0;max-height:none}
.ht .dlist{min-height:0;overflow:hidden}
.ht .dcard>.spread{margin-bottom:8px}
/* notes */
.hnote{gap:6px}
.hnote-t{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;min-height:0!important;font:700 1.05rem "Exo 2",sans-serif;color:inherit}
.hnote-t:focus-visible{outline:none;box-shadow:0 1px 0 var(--sage)!important}
.hnote textarea{flex:1;min-height:0;resize:none;font-size:.92rem;line-height:1.5}
/* one build / script / reply / link / tool */
.hbuild{text-decoration:none;color:inherit;gap:6px}.hbuild:hover h3{color:var(--sage-d)}.hbuild .mini{flex:none;width:100%}
.hb-meta{color:var(--muted);font-size:.8rem}
.hbsteps{list-style:none;margin:0;padding:0;font-size:.88rem}.hbsteps li{padding:3px 0;border-bottom:1px solid var(--line)}.hbsteps li:last-child{border-bottom:0}
.hbsteps li::before{content:"○";margin-right:7px;color:var(--muted)}
.hscript .spread .row{gap:6px;flex-wrap:nowrap}
.hscript code.cmd{display:block;flex:1;min-height:0;overflow:auto;margin-top:8px;white-space:pre-wrap;word-break:break-all;font-size:.8rem}
.hreply pre{flex:1;min-height:0;overflow:hidden;margin:8px 0;white-space:pre-wrap;font:400 .85rem/1.5 "Exo 2",sans-serif;color:var(--muted);
  -webkit-mask-image:linear-gradient(#000 65%,transparent);mask-image:linear-gradient(#000 65%,transparent)}
.hreply .row,.hmini .row{gap:6px}
.hlink b{font-size:1rem}.hlink small{color:var(--muted);font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.hlink:hover b{color:var(--sage-d)}.hlink-a{color:var(--sage-d)}
.hmv-s{display:block;color:var(--muted);font-size:.8rem;margin-top:2px}
.hmiss .lede{margin:0;font-size:.88rem}.hmiss .btn{align-self:flex-start}
.hq .tdl{margin-top:4px}

/* ---- "＋ Home" buttons around the site ---- */
.hpin{font:600 .8rem "Exo 2",sans-serif;letter-spacing:0;text-transform:none;padding:4px 10px;white-space:nowrap;border-color:var(--line)}
.hpin.on{color:var(--sage-d);border-color:color-mix(in srgb,var(--sage) 60%,var(--line))}
.hcrumb{display:flex;justify-content:space-between;align-items:center;gap:10px}
.dcbtns{gap:6px;flex-wrap:nowrap;align-items:center}
.dk{position:relative}
.dkpin{position:absolute;top:6px;right:6px;opacity:0;transition:opacity .15s}
.dk:hover .dkpin,.dk:focus-within .dkpin,.dkpin:has(.on){opacity:1}
.dkpin .hpin{padding:2px 7px;font-size:.72rem;background:var(--card)}
@media (hover:none){.dkpin{opacity:1}}
.tkbar2 .hpin{flex:none}

/* ---- dialog: tile gallery and tile settings ---- */
.hdlg{width:min(760px,calc(100vw - 32px));max-width:none;max-height:min(82vh,780px);padding:0;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);
  box-shadow:0 28px 80px rgba(0,0,0,.45);overflow:hidden;display:flex;flex-direction:column;
  opacity:0;translate:0 16px;scale:.97;transition:opacity .2s ease,translate .3s var(--ease),scale .3s var(--ease),overlay .3s allow-discrete,display .3s allow-discrete}
.hdlg:not([open]){display:none}
.hdlg[open]{opacity:1;translate:0 0;scale:1}
@starting-style{.hdlg[open]{opacity:0;translate:0 16px;scale:.97}}
.hdlg::backdrop{background:rgb(0 0 0/0);transition:background .25s ease,overlay .3s allow-discrete,display .3s allow-discrete}
.hdlg[open]::backdrop{background:rgb(0 0 0/.45)}
@starting-style{.hdlg[open]::backdrop{background:rgb(0 0 0/0)}}
.hdlg-h{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px 12px 20px;border-bottom:1px solid var(--line)}
.hdlg-h h2{margin:0;font-size:1.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hdlg-x{width:36px;height:36px;padding:0;display:grid;place-items:center;flex:none}
.hdlg-x svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.hdlg-b{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:16px 20px 20px}
/* tiles that open a page when clicked */
.hgrid:not(.editing) .ht.hlink .htb>*{cursor:pointer;transition:border-color .15s,box-shadow .15s}
.hgrid:not(.editing) .ht.hlink:hover .htb>*{border-color:var(--sage);box-shadow:0 0 14px var(--glow)}
.hgrid:not(.editing) .ht :is(li,tr,.fd-vr):has(a[href],.fd-cve){cursor:pointer}
.hgal-q{width:100%}
.hgal-g{margin-top:16px}
.hgal-g h3{margin:0 0 8px;font:400 .74rem "Share Tech Mono",ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
/* the gallery: tile types down the right, cards on a 12-column grid (4 on phones) sized by each tile's best-fit shape */
/* a fixed height, so switching type (fewer or more tiles) never resizes and re-centres the dialog */
.hdlg.hdlg-wide{width:min(1080px,calc(100vw - 32px));height:min(82vh,780px)}
.hgw-main{min-height:100%}
.hgw{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:20px;align-items:start}


.hgw-main{min-width:0}
.hgw-nav{position:sticky;top:0;display:flex;flex-direction:column;gap:2px;padding:2px 0 2px 14px;border-left:1px solid var(--line)}
.hgw-c{display:flex;align-items:center;gap:9px;width:100%;min-height:0;padding:6px 8px;border:0;border-radius:8px;background:none;box-shadow:none;color:var(--ink);font:inherit;font-size:.86rem;text-align:left;cursor:pointer}
.hgw-c>span{flex:none;width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:var(--sage-l);color:var(--sage-d);font-size:.8rem;font-weight:700}
.hgw-c small{margin-left:auto;color:var(--muted);font-size:.72rem}
.hgw-c:hover{background:color-mix(in srgb,var(--sage) 10%,transparent)}
.hgw-c.on{background:var(--sage-l);color:var(--sage-d);font-weight:700}.hgw-c.on>span{background:var(--sage);color:var(--paper)}
.hgw-c:focus-visible{outline:2px solid var(--sage);outline-offset:1px}
.hgal-busy{margin:10px 0 0;font-size:.8rem;color:var(--muted)}
.hsw-l{margin:0 0 10px}
.hgal{display:grid;grid-template-columns:repeat(var(--gc,12),minmax(0,1fr));grid-auto-rows:4px;grid-auto-flow:row dense;gap:12px}
/* the off-screen stage tiles are drawn on to work out their best fit */
.hfit{position:fixed;left:-30000px;top:0;visibility:hidden;pointer-events:none;contain:layout style}
.hfit>.ht{position:relative}
/* gallery cards: a live miniature of the tile (drawn at desktop size, scaled down) over its name, like a phone's widget picker */
.hgi{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;background:var(--paper);overflow:hidden;transition:border-color .15s,box-shadow .15s,translate .2s var(--ease)}
.hgi:not(.off):hover,.hgi:has(.hgi-b:focus-visible){border-color:var(--sage);box-shadow:0 0 14px var(--glow);translate:0 -2px}
.hgi:has(.hgi-b:focus-visible){outline:2px solid var(--sage);outline-offset:2px}
.hgi.off{opacity:.55}
.hgp{position:relative;height:138px;overflow:hidden;pointer-events:none;user-select:none;-webkit-user-select:none;border-bottom:1px solid var(--line);
  background:radial-gradient(circle,color-mix(in srgb,var(--sage) 30%,transparent) 1px,transparent 1.5px) 0 0/14px 14px,var(--tile)}
.hgp>.ht{position:absolute;left:0;top:0;transform-origin:0 0;filter:drop-shadow(0 6px 14px rgba(0,0,0,.28))}
.hgp:empty::after{content:"";position:absolute;inset:24px 34px;border-radius:10px;background:color-mix(in srgb,var(--muted) 14%,transparent);animation:hgp-wait 1.1s ease-in-out infinite alternate}
@keyframes hgp-wait{to{opacity:.35}}
.hgi{cursor:pointer}.hgi.off{cursor:default}
.hgi-b{all:unset;box-sizing:border-box;display:block;height:58px;overflow:hidden;padding:9px 11px 10px;cursor:pointer;color:inherit}
.hgi-b::after{content:"";position:absolute;inset:0;border-radius:inherit}
.hgi-b:disabled{cursor:default}
.hgi-b b{display:block;font-size:.9rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hgi-b small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);font-size:.76rem;line-height:1.3;margin-top:2px}
.hgi-s{position:absolute;top:8px;right:8px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--sage-d);font-size:.7rem;font-weight:700;white-space:nowrap}
.hgi-s:empty{display:none}
/* one tile at each size: a swipeable strip, to scale, with a size picker under it */
.hgd{display:flex;flex-direction:column;gap:12px}
.hgd-back{align-self:flex-start;padding:4px 10px;font-size:.84rem}
.hgd-car{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;border:1px solid var(--line);border-radius:12px;
  background:radial-gradient(circle,color-mix(in srgb,var(--sage) 30%,transparent) 1px,transparent 1.5px) 0 0/14px 14px,var(--tile)}
.hgd-car::-webkit-scrollbar{display:none}
.hgd-car:focus-visible{outline:2px solid var(--sage);outline-offset:2px}
.hgd-s{flex:0 0 100%;min-width:0;scroll-snap-align:center;scroll-snap-stop:always}
.hgp-l{height:min(320px,40vh);background:none;border:0}
.hgd-dots{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.hgd-d{display:flex;align-items:center;gap:7px;padding:5px 11px;font-size:.82rem;border-radius:999px}
.hgd-d i{display:block;flex:none;width:calc(var(--pw) * 1.1px);height:calc(var(--ph) * 1.1px);max-height:16px;min-width:6px;border:1.5px solid currentColor;border-radius:2px;opacity:.7}
.hgd-d.on{border-color:var(--sage);background:var(--sage-l);color:var(--sage-d)}
.hgd-sz{margin:0;text-align:center;font:400 .74rem "Share Tech Mono",ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.hgd-desc{margin:0;text-align:center}
.hgd-f{justify-content:center;margin:0}
.hgd-d.best{border-color:color-mix(in srgb,var(--sage) 60%,var(--line))}
@media (max-width:640px){.hgp{height:150px}.hgp-l{height:min(250px,34vh)}
  /* phones: the types become a strip of chips pinned to the top */
  .hdlg.hdlg-wide{height:88vh;height:88dvh}
  .hgw{grid-template-columns:minmax(0,1fr);gap:8px}
  .hgw-nav{order:-1;top:-14px;z-index:2;flex-direction:row;overflow-x:auto;scrollbar-width:none;gap:6px;margin:-14px -14px 0;padding:10px 14px 8px;border-left:0;border-bottom:1px solid var(--line);background:var(--card)}
  .hgw-nav::-webkit-scrollbar{display:none}
  .hgw-c{flex:none;width:auto;padding:4px 10px 4px 4px;border:1px solid var(--line);border-radius:999px;white-space:nowrap}.hgw-c>span{width:22px;height:22px;border-radius:50%}.hgw-c small{display:none}}
@media (prefers-reduced-motion:reduce){.hgi{transition:none}.hgi:has(.hgi-b:hover:not(:disabled)){translate:none}.hgp:empty::after{animation:none}}
.hgal-none{margin-top:16px}
.hset{display:flex;flex-direction:column;gap:14px}
.hset .grid2{gap:12px}
.hset-h{margin:-6px 0 0;color:var(--muted);font-size:.8rem;font-weight:400}
label.f .hset-h{margin:0}
.hpre{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.hpre-b{display:flex;align-items:center;gap:8px;padding:6px 10px;font-size:.84rem}
.hpre-b i{display:block;flex:none;width:calc(var(--pw) * 1.3px);height:calc(var(--ph) * 1.3px);max-height:18px;min-width:6px;border:1.5px solid currentColor;border-radius:2px;opacity:.7}
.hpre-b.on{border-color:var(--sage);color:var(--sage-d)}
.hset-list{max-height:260px;overflow:auto;margin-top:6px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;display:flex;flex-direction:column;gap:2px}
.hset-f{justify-content:space-between;margin-top:4px}
/* phones: a bottom sheet */
@media (max-width:640px){
  .hdlg{width:100%;max-height:88vh;max-height:88dvh;margin:auto 0 0;border-radius:16px 16px 0 0;border-bottom:0;translate:0 100%;scale:1;padding-bottom:env(safe-area-inset-bottom)}
  .hdlg[open]{translate:0 0}
  @starting-style{.hdlg[open]{translate:0 100%}}
  .hdlg-b{padding:14px 14px 18px}
  .hset .grid2{grid-template-columns:minmax(0,1fr)}
  .hcbar-in{padding:8px;grid-template-columns:minmax(0,1fr)}.hcbar-t,.hcbar-tip{display:none}.hcbar-in .row{margin:0;justify-self:stretch}.hcbar-in .row button{flex:1;padding:6px 8px;font-size:.84rem}
  .hcbar-in{bottom:calc(var(--tabh,58px) + var(--safe-b,0px) + 10px);width:calc(100vw - 20px)}
  html.hedit #undobar,html.hedit .toast{bottom:calc(var(--tabh,58px) + var(--safe-b,0px) + 76px)}}
@media (prefers-reduced-motion:reduce){.hdlg,.hdlg::backdrop,.hph{transition:none}.page.enter .ht{animation:none}.ht.hdrag .htb{transform:none}}

/* ---- fitting each tile's shape ----
   Tiles query their own width (cqi) and height (cqh). Text scales with whichever is tighter, extras drop out as a tile
   gets small, and anything centred uses "safe" centring, so content that can't fit spills off the bottom (and is
   clipped there) rather than the top, where it would vanish. */
.htb>*{overflow:hidden}
/* nothing inside a tile scrolls sideways: lists and tables that scroll do so up and down only, and their content is
   made to fit the width instead (wrapping, "…", or dropping columns as the tile narrows) */
.ht :is(.tools.small,.pchips,code.cmd,.fd-scroll,.fd-ptb,.fd-tw,.dtable,.out,.tktw,.tkcp-b,.plist){overflow-x:hidden}
@container (max-height:130px){.htb>.panel{padding-top:8px;padding-bottom:8px}}
@container (max-width:240px){.htb>.panel{padding-left:10px;padding-right:10px}}
/* header rows: a narrow tile keeps its title and the main button; secondary buttons go */
@container (max-width:340px){.htb .spread>.row>.btn:not(.primary),.htb .spread>.row>.chip{display:none}}
@container (max-width:230px){.htb .spread>.row{display:none}.htb .spread>a.btn,.htb .spread>.btn{display:none}}
.htb .spread>h3{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* greeting */
.hgreet{display:flex;flex-direction:column;justify-content:center;justify-content:safe center}
.hgreet h1{font-size:clamp(1rem,min(5.4cqi,34cqh),3rem);min-height:1.05em;margin:0 0 4px}
@container (max-width:460px) and (min-height:115px){.hgreet h1{min-height:2.1em}}
@container (max-height:95px){.hgreet .lede{display:none}.hgreet h1{margin:0}}
/* headings */
.hhead{font-size:clamp(.85rem,min(7cqi,62cqh),1.6rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* clock: the time scales to fit; date lines drop as it gets short, and narrow tiles stack the date under the time */
.ht .clock{justify-content:space-between;justify-content:safe space-between}
.ht .clock .tm{font-size:clamp(.9rem,min(12.5cqi,58cqh),3rem)}
@container (max-width:420px) and (min-height:120px){.ht .clock{flex-direction:column;align-items:flex-start;justify-content:center;justify-content:safe center;text-align:left;gap:4px}.ht .clock .tm{font-size:clamp(.9rem,min(17cqi,30cqh),3rem)}}
@container (max-height:150px){.ht .clock .cd small:nth-child(n+3){display:none}}
@container (max-height:110px){.ht .clock .cd small:nth-child(n+2){display:none}}
@container (max-height:80px),(max-width:420px) and (max-height:119.9px){.ht .clock .cd{display:none}.ht .clock{justify-content:center}}
/* headline numbers (build stats, task numbers, counters) */
.hstat{display:flex!important;flex-direction:column;justify-content:center;justify-content:safe center;padding:9px 12px;min-height:0}
.hstat strong{font-size:clamp(1rem,min(13cqi,46cqh),2.6rem);line-height:1.05}.hstat span{font-size:.83rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ht .dk{justify-content:center;justify-content:safe center;cursor:pointer;min-height:0}
.ht .dk strong{font-size:clamp(1rem,min(13cqi,36cqh),2.8rem)}
@container (max-height:120px){.ht .dk .dks{display:none}}
/* very short: number and label on one line */
@container (max-height:72px){.hstat,.ht .dk{flex-direction:row!important;align-items:center;justify-content:flex-start;gap:10px;padding-top:4px;padding-bottom:4px}
  .hstat strong,.ht .dk strong{font-size:clamp(.95rem,min(10cqi,58cqh),1.6rem)}.ht .dk .dkl{order:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
/* shortcuts and tools */
@container (max-height:150px){.hsc p,.htool p{display:none}}
@container (max-height:100px){.hsc,.htool{display:flex!important;align-items:center;gap:10px;padding:8px 12px!important}.hsc h3,.htool h3{margin:0!important;font-size:.95rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@container (max-width:130px){.hsc h3,.htool h3{display:none}.hsc,.htool{display:flex!important;align-items:center;justify-content:center}}
/* lists and their extras */
@container (max-height:290px){.td-home .td-addrow,.td-home .td-parse{display:none}}
@container (max-height:220px){.td-home .td-sum,.a-bench .bfoot{display:none}}
@container (max-height:110px){.td-home .tdl,.a-bench .blist,.upc,.hact-l{display:none}}
@container (max-width:300px){.upc .ud small,.td-home .td-due{display:none}}
@container (max-width:280px){.b-cmds code.qc{display:none}}
/* quick lookup and password */
@container (max-height:280px){.a-look>.lede{display:none}}
@container (max-height:180px){.a-look .qbtns{display:none}}
@container (max-height:220px){.a-pw .row button:not(.primary){display:none}}
@container (max-height:150px){.a-pw .pw{margin:4px 0!important;padding:6px 8px;font-size:.95rem}.a-pw .spread{display:none}}
/* charts: subtitle, legend and axis labels drop as the tile shrinks */
@container (max-height:300px){.ht .dcard .dsub{display:none}}
@container (max-height:230px){.ht .lcleg,.ht .lcx,.ht .dcol small,.ht .mcol small,.ht .mcol b{display:none}.ht .dcard>.spread{margin-bottom:4px}}
@container (max-height:140px){.ht .dcard>.spread,.ht .b-months>.spread{display:none}.ht .lcp,.ht .dcols,.ht .mchart{min-height:16px}.ht .mchart{margin-top:0}}
@container (max-width:300px){.ht .dtbl{display:none}}
/* mini tools, notes, replies, links */
.hmv{margin-top:6px;font-size:clamp(.85rem,min(7cqi,24cqh),1.5rem);color:var(--sage-d);word-break:break-all;line-height:1.25;overflow:hidden}
@container (max-height:120px){.hmini .row,.hmini .hmv-s{display:none}.hreply pre{display:none}}
@container (max-height:90px){.hmini .spread .btn{display:none}.hnote .hnote-t{display:none}}
.hlink{justify-content:center;justify-content:safe center;text-decoration:none;color:inherit;gap:2px}
@container (max-height:70px){.hlink small{display:none}.hlink b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
.hmiss{justify-content:center;justify-content:safe center;gap:6px}
@container (max-height:110px){.hmiss .lede,.hmiss .btn{display:none}}

/* ---- live tiles ---- */
.hlive{display:flex;flex-direction:column;justify-content:center;justify-content:safe center;gap:3px;text-decoration:none;color:inherit;min-height:0}
.hcnt-l{font:400 .72rem "Share Tech Mono",ui-monospace,monospace;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hbig{display:block;font-size:clamp(1rem,min(11cqi,34cqh),2.6rem);line-height:1.1;font-weight:700;color:var(--sage-d);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hbig.bad{color:var(--danger)}
.hlive small{color:var(--muted);font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
a.hlive:hover .hbig{text-shadow:0 0 16px var(--glow)}
.hlive.urgent .hbig{color:var(--danger);animation:hpulse 1.6s ease-in-out infinite}
@keyframes hpulse{50%{opacity:.6}}
.hcnt{justify-content:flex-start}
.hcnt-h{display:flex;align-items:center;gap:8px;min-width:0}
.hcnt-ic{flex:none;width:24px;height:24px;display:grid;place-items:center;border-radius:6px;background:var(--sage-l);color:var(--sage-d);font:800 .7rem "Exo 2",sans-serif}
.hcnt-v{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-top:2px;min-width:0}
.hcnt-v strong{font-size:clamp(1.1rem,min(12cqi,30cqh),2.8rem);line-height:1.05;color:var(--sage-d);font-variant-numeric:tabular-nums}
.hcnt-v small{color:var(--muted);font-size:.8rem}.hcnt-v .up{color:var(--sage-d)}.hcnt-v .down{color:var(--blue-ink)}
.hspark{flex:1;min-height:0;display:flex;align-items:flex-end;gap:3px;margin-top:8px}
.hspark i{flex:1;min-width:2px;max-width:22px;border-radius:2px 2px 0 0;background:color-mix(in srgb,var(--sage) 45%,var(--line));transition:height .6s var(--ease)}
.hspark i.now{background:var(--sage);box-shadow:0 0 10px var(--glow)}
@container (max-height:130px){.hspark{display:none}.hcnt{justify-content:center;justify-content:safe center}}
@container (max-height:78px){.hcnt{flex-direction:row;align-items:center;gap:10px}.hcnt-h{order:2;min-width:0;flex:1}.hcnt-h .hcnt-ic{display:none}.hcnt-v{margin:0;flex:none}.hcnt-v small{display:none}}
.htoday-g{flex:1;min-height:0;display:grid;grid-template-columns:repeat(var(--tc,3),minmax(0,1fr));gap:8px;margin-top:8px;align-content:start}
.htd{display:flex;flex-direction:column;padding:6px 8px;border:1px solid var(--line);border-radius:6px;min-width:0}
.htd b{font-size:clamp(1rem,min(6cqi,12cqh),1.7rem);color:var(--sage-d);font-variant-numeric:tabular-nums}.htd span{font-size:.74rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.htd.zero b{color:var(--muted)}
@container (max-width:330px){.htoday-g{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container (max-height:150px){.htoday-g{grid-template-columns:repeat(var(--tn,6),minmax(0,1fr));gap:4px}.htd{padding:2px 4px;border:0}.htd span{font-size:.66rem}}
@container (max-height:150px) and (max-width:520px){.htoday-g{grid-template-columns:repeat(3,minmax(0,1fr))}.htd:nth-child(n+4){display:none}}
@container (max-height:90px){.htoday .spread{display:none}.htoday-g{margin-top:0}}
.hsla-t,.hcd-t{font-weight:600;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hsla-b{color:var(--danger);font-size:.8rem;font-weight:600}
@container (max-height:120px){.hsla-t,.hsla-b,.hlive small{display:none}}
@container (max-height:80px){.hlive:not(.hcnt) .hcnt-l{display:none}}
.hstreak{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:center}
.hst{display:flex;flex-direction:column;gap:2px;min-width:0}.hst span{font-size:.82rem;color:var(--muted);line-height:1.3}
@container (max-height:110px){.hst span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.74rem}}
@container (max-width:300px){.hstreak{grid-template-columns:1fr}.hst:nth-child(2){display:none}}
.hact-l{list-style:none;margin:6px 0 0;padding:0;font-size:.86rem}
.hact-l li{display:flex;align-items:center;gap:8px;padding:4px 0;border-bottom:1px solid var(--line);min-width:0}.hact-l li:last-child{border-bottom:0}
.hact-l a,.hact-l li>span:not(.hact-ic):not(.hact-t),.hm-go{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;text-decoration:none}
.hact-l a:hover,.hm-go:hover{color:var(--sage-d)}
.hm-go{text-align:left;padding:0;border:0;background:none;font:inherit;min-height:0!important}
.hact-ic{flex:none;width:22px;height:22px;display:grid;place-items:center;border-radius:5px;background:var(--sage-l);color:var(--sage-d);font:800 .62rem "Exo 2",sans-serif;overflow:hidden}
.hact-t{flex:none;color:var(--muted);font:400 .74rem "Share Tech Mono",ui-monospace,monospace}
.hm-n{flex:none;font:600 .82rem "Share Tech Mono",ui-monospace,monospace;color:var(--sage-d)}
@container (max-width:300px){.hact-t{display:none}}
.hsync .hsy{display:flex;align-items:center;gap:8px;font-weight:600;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hsync .syncdot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--danger)}.hsync.ok .syncdot{background:var(--sage)}.hsync.busy .syncdot{background:var(--blue)}
.hsync button{align-self:flex-start;font-size:.8rem;padding:3px 10px}
@container (max-height:110px){.hsync button{display:none}}
@media (prefers-reduced-motion:reduce){.hlive.urgent .hbig{animation:none}}
/* ---- live tiles keep their graphics small: sizes come from the space actually left (tile minus padding and the
   other lines still showing), so a short or narrow tile still gets the biggest digits that fit ---- */
/* clock: time beside the date / time alone / date stacked under the time */
.ht .clock .tm{font-size:clamp(.9rem,min(calc((100cqi - 190px) / var(--cw,4.8)),calc((100cqh - 22px) * .9)),4.5rem)}
@container (max-height:80px),(max-width:420px) and (max-height:119.9px){.ht .clock .tm{font-size:clamp(.9rem,min(calc((100cqi - 26px) / var(--cw,4.8)),calc((100cqh - 14px) * .92)),5rem)}}
@container (max-width:420px) and (min-height:120px){.ht .clock .tm{font-size:clamp(.9rem,min(calc((100cqi - 26px) / var(--cw,4.8)),calc((100cqh - 92px) * .9)),4.5rem)}}
@container (max-height:110px){.ht .clock{padding-top:6px;padding-bottom:6px}}
/* countdowns and big numbers */
.hlive .hbig{font-size:clamp(1rem,min(calc((100cqi - 28px) / 5.2),calc((100cqh - var(--ex,96px)) * .9)),4.4rem)}
@container (max-height:120px){.hlive .hbig{font-size:clamp(.95rem,min(calc((100cqi - 28px) / 5.2),calc((100cqh - 38px) * .88)),3.4rem)}}
@container (max-height:80px){.hlive .hbig{font-size:clamp(.9rem,min(calc((100cqi - 24px) / 5.2),calc((100cqh - 14px) * .88)),3.4rem)}.hlive{padding-top:4px!important;padding-bottom:4px!important}}
.hstreak .hbig{font-size:clamp(1rem,min(14cqi,calc((100cqh - var(--ex,64px)) * .9)),4.4rem)}
@container (max-height:110px){.hstreak .hbig{font-size:clamp(.95rem,min(14cqi,calc((100cqh - 36px) * .9)),3rem)}}
@container (max-height:70px){.hstreak .hst{flex-direction:row;align-items:center;gap:8px}.hstreak .hbig{font-size:clamp(.9rem,calc((100cqh - 12px) * .85),2rem)}}
/* counter: when short it goes side by side, number and label on the left, the 14-day trend on the right */
@container (max-height:130px){
  .htb>.hcnt{display:grid;grid-template-columns:minmax(0,auto) minmax(50px,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"h s" "v s";column-gap:14px;row-gap:0;align-items:center}
  .hcnt .hcnt-h{grid-area:h}.hcnt .hcnt-v{grid-area:v;margin:0}.hcnt .hspark{display:flex;grid-area:s;height:100%;margin:0;align-self:stretch}
  .hcnt-v strong{font-size:clamp(1rem,min(12cqi,calc((100cqh - 46px) * .95)),2.6rem)}}
@container (max-height:78px){
  .htb>.hcnt{grid-template-columns:auto minmax(0,auto) minmax(40px,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"v h s"}
  .hcnt .hcnt-h{order:0;flex:none}.hcnt .hcnt-h .hcnt-ic{display:none}.hcnt-h .hcnt-l{display:block}
  .hcnt-v strong{font-size:clamp(.95rem,calc((100cqh - 14px) * .9),2rem)}}
/* ---- heading and greeting: position (3×3, data-al) and size (--k) ---- */
.t-heading .htb,.t-greet .htb{align-items:stretch}
.hhead-w,.hgreet{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%}
:is(.hhead-w,.hgreet)[data-al^="t"]{justify-content:flex-start}
:is(.hhead-w,.hgreet)[data-al^="m"]{justify-content:center;justify-content:safe center}
:is(.hhead-w,.hgreet)[data-al^="b"]{justify-content:flex-end;justify-content:safe flex-end}
:is(.hhead-w,.hgreet)[data-al$="l"]{align-items:flex-start;text-align:left}
:is(.hhead-w,.hgreet)[data-al$="c"]{align-items:center;text-align:center}
:is(.hhead-w,.hgreet)[data-al$="r"]{align-items:flex-end;text-align:right}
/* the heading fills the tile's height (times the chosen size), never wider than the tile */
.hhead-w .hhead{align-self:auto;margin:0;line-height:1.15;max-width:100%;font-size:clamp(.8rem,min(calc((100cqh - 6px) * .78 * var(--k,1)),calc(100cqi / (var(--n,8) * .64))),8rem)}
.hgreet h1{font-size:clamp(1rem,calc(min(5.4cqi,34cqh) * var(--k,1)),4.2rem);max-width:100%}
.t-greet.hp-sub .hgreet h1{font-size:clamp(1rem,calc(min(5.4cqi,64cqh) * var(--k,1)),4.6rem)}
.halign{display:grid;grid-template-columns:repeat(3,34px);gap:4px;margin-top:6px}
.halign-b{width:34px;height:28px;min-height:0!important;padding:0;display:flex;border-radius:4px;padding:5px}
.halign-b i{display:block;width:10px;height:6px;border-radius:2px;background:currentColor;opacity:.45}
.halign-b[data-hset$="l"]{justify-content:flex-start}.halign-b[data-hset$="c"]{justify-content:center}.halign-b[data-hset$="r"]{justify-content:flex-end}
.halign-b[data-hset^="al:t"]{align-items:flex-start}.halign-b[data-hset^="al:m"]{align-items:center}.halign-b[data-hset^="al:b"]{align-items:flex-end}
.halign-b.on{border-color:var(--sage);color:var(--sage-d)}.halign-b.on i{opacity:1}
.hset-parts{max-height:220px}

/* ---- when details are hidden, the rest takes the room ---- */
/* clock with only the time: it fills the tile */
.ht .clock.solo{justify-content:center}.ht .clock.solo .cd{display:none}
.ht .clock.solo .tm{font-size:clamp(.9rem,min(calc((100cqi - 26px) / var(--cw,4.8)),calc((100cqh - 14px) * .92)),8rem)}
/* numbers without their label or trend grow */
.t-tkpi.hp-label .dk strong,.t-bstat.hp-label .hstat strong{font-size:clamp(1rem,min(26cqi,calc((100cqh - 22px) * .8)),7rem)}
.t-tkpi.hp-label.hp-sub .dk,.t-bstat.hp-label .hstat{align-items:center;text-align:center}
.t-counter.hp-trend .hcnt{justify-content:center;justify-content:safe center}
.t-counter.hp-trend .hcnt-v strong{font-size:clamp(1.1rem,min(26cqi,calc((100cqh - 60px) * .9)),6rem)}
.t-counter.hp-label.hp-icon .hcnt-h{display:none}
.t-counter.hp-label.hp-icon.hp-trend .hcnt-v strong{font-size:clamp(1.1rem,min(28cqi,calc((100cqh - 34px) * .9)),7rem)}
/* Today: fewer numbers, bigger numbers */
.htd b{font-size:clamp(1rem,min(calc(30cqi / var(--tc,3)),calc((100cqh - 70px) / var(--tr,2) * .6)),4rem)}
.t-today.hp-title.hp-date .htoday .spread{display:none}.t-today.hp-title.hp-date .htoday-g{margin-top:0}
/* one streak instead of two */
.t-streak:is(.hp-breach,.hp-run) .hstreak{grid-template-columns:1fr}
.t-streak:is(.hp-breach,.hp-run) .hbig{font-size:clamp(1rem,min(26cqi,calc((100cqh - var(--ex,64px)) * .9)),6rem)}
/* ---- clocks laid out by fitClock() (tiles.js): data-fit = row / stack / solo, data-lines = which date lines show,
   --tf = the time's size. These win over the size-only rules above once it has run. ---- */
.ht .clock[data-fit]{gap:14px}
.ht .clock[data-fit="row"]{flex-direction:row;align-items:center;justify-content:space-between;text-align:right}
.ht .clock[data-fit="stack"]{flex-direction:column;align-items:flex-start;justify-content:center;justify-content:safe center;text-align:left;gap:4px}
.ht .clock[data-fit="solo"]{flex-direction:row;align-items:center;justify-content:center}
.ht .clock[data-fit] .tm{font-size:var(--tf)!important}
.ht .clock[data-fit] .cd{display:block}.ht .clock[data-fit="solo"] .cd{display:none}
.ht .clock[data-fit] .cd small{display:none!important}
.ht .clock[data-lines~="d"] .cd .cd-d,.ht .clock[data-lines~="w"] .cd .cd-w,.ht .clock[data-lines~="u"] .cd .cd-u,.ht .clock[data-lines~="z"] .cd .cd-z{display:block!important}

/* ---- counters keep their 14-day trend at small sizes (it only goes below 110px wide) ----
   short + wide: number left, trend right · short + narrow: number and label on top, trend across the bottom ·
   very short: one line, the trend taking at least 30% */
@container (max-height:130px){.htb>.hcnt{grid-template-columns:minmax(0,max-content) minmax(40%,1fr)}.hcnt .hcnt-l{overflow:hidden;text-overflow:ellipsis}}
@container (max-height:130px) and (max-width:259.9px) and (min-height:70.1px){
  .htb>.hcnt{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"v h" "s s";row-gap:4px;column-gap:8px;align-items:center}
  .hcnt .hcnt-h .hcnt-ic,.hcnt .hcnt-v small{display:none}.hcnt .hspark{margin:0}
  .hcnt-v strong{font-size:clamp(1rem,min(14cqi,calc((100cqh - 40px) * .5)),2rem)}}
@container (max-height:70px){.htb>.hcnt{grid-template-columns:auto minmax(0,max-content) minmax(30%,1fr)}}
@container (max-width:110px){.hcnt .hspark{display:none!important}}
/* ---- layout pieces: lines and spacers ---- */
.t-hline .htb,.t-vline .htb,.t-spacer .htb{align-items:stretch}
.hline,.vline{--lc:var(--line);display:flex;width:100%;height:100%;min-width:0;min-height:0}
:is(.hline,.vline)[data-col="sage"]{--lc:var(--sage)}:is(.hline,.vline)[data-col="blue"]{--lc:var(--blue)}:is(.hline,.vline)[data-col="ink"]{--lc:color-mix(in srgb,var(--ink) 70%,transparent)}
.hline{align-items:center;gap:12px}.hline[data-pos="t"]{align-items:flex-start}.hline[data-pos="b"]{align-items:flex-end}
.hline::before,.hline::after{content:"";flex:1;min-width:0;border-top:var(--lw) solid var(--lc)}
.hline[data-la="l"]::before{flex:0 0 14px}.hline[data-la="r"]::after{flex:0 0 14px}
.hline:not(:has(.hline-l))::after{display:none}
.hline-l{flex:none;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1;font:400 clamp(.7rem,calc(100cqh * .55),1rem) "Share Tech Mono",ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.hline:has(.hline-l){align-items:center}/* a label sits on the line, so a labelled line is always centred */
.vline{justify-content:center}.vline[data-pos="l"]{justify-content:flex-start}.vline[data-pos="r"]{justify-content:flex-end}
.vline::before{content:"";height:100%;border-left:var(--lw) solid var(--lc)}
:is(.hline,.vline)[data-st="dashed"]::before,:is(.hline,.vline)[data-st="dashed"]::after{border-style:dashed}
:is(.hline,.vline)[data-st="dotted"]::before,:is(.hline,.vline)[data-st="dotted"]::after{border-style:dotted}
/* fading / glowing: drawn as a gradient bar instead of a border */
:is(.hline,.vline):is([data-st="fade"],[data-st="glow"])::before,:is(.hline,.vline):is([data-st="fade"],[data-st="glow"])::after{border:0;background:var(--lc)}
.hline:is([data-st="fade"],[data-st="glow"])::before,.hline:is([data-st="fade"],[data-st="glow"])::after{height:var(--lw)}
.vline:is([data-st="fade"],[data-st="glow"])::before{width:var(--lw)}
.hline[data-st="fade"]::before{background:linear-gradient(90deg,transparent,var(--lc))}.hline[data-st="fade"]::after{background:linear-gradient(90deg,var(--lc),transparent)}
.hline[data-st="fade"]:not(:has(.hline-l))::before{background:linear-gradient(90deg,transparent,var(--lc) 20%,var(--lc) 80%,transparent)}
.vline[data-st="fade"]::before{background:linear-gradient(180deg,transparent,var(--lc) 20%,var(--lc) 80%,transparent)}
:is(.hline,.vline)[data-st="glow"]{--lc:var(--sage)}
:is(.hline,.vline)[data-st="glow"]::before,:is(.hline,.vline)[data-st="glow"]::after{box-shadow:0 0 10px var(--glow),0 0 2px var(--lc);border-radius:2px}
/* spacers are invisible, except as a dashed box while customising */
.hspacer{width:100%;height:100%}
.hgrid.editing .hspacer{border:1px dashed color-mix(in srgb,var(--muted) 50%,transparent);border-radius:8px;background:repeating-linear-gradient(45deg,transparent 0 8px,color-mix(in srgb,var(--muted) 8%,transparent) 8px 16px)}
/* tablets and phones stack the tiles, so there's nowhere sensible for these */
@media (max-width:1099px){.ht.t-vline,.ht.t-spacer{display:none}}
/* customising very narrow or very short tiles (lines): the buttons stack / sit just above */
@container (max-width:100px){.hte{flex-direction:column;align-items:flex-start;right:auto}}
@container (max-height:40px){.hte{top:-6px}}
/* ---- more live tiles ---- */
.hspark>svg{display:block;width:100%;height:100%}
.hln-a{fill:color-mix(in srgb,var(--sage) 16%,transparent)}.hln-l{fill:none;stroke:var(--sage);stroke-width:2;stroke-linejoin:round}
.worse{color:var(--danger)}.better{color:var(--sage-d)}
/* heatmap: square cells sized from the tile's height; the newest weeks stay in view and older ones fall off the left */
.hheat{--cs:clamp(6px,calc((100cqh - 82px) / 7.5),24px)}
.hh-g{flex:1;min-height:0;display:grid;grid-auto-flow:column;grid-template-rows:repeat(7,var(--cs));grid-auto-columns:var(--cs);gap:3px;justify-content:end;align-content:center;overflow:hidden;margin-top:6px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 28px);mask-image:linear-gradient(90deg,transparent,#000 28px)}
.hh-g i,.hh-k i{display:block;border-radius:2px;background:var(--ch-track)}
.hh-g i.l1,.hh-k i.l1{background:color-mix(in srgb,var(--sage) 30%,var(--ch-track))}.hh-g i.l2,.hh-k i.l2{background:color-mix(in srgb,var(--sage) 55%,var(--ch-track))}
.hh-g i.l3,.hh-k i.l3{background:color-mix(in srgb,var(--sage) 78%,var(--ch-track))}.hh-g i.l4,.hh-k i.l4{background:var(--sage);box-shadow:0 0 6px var(--glow)}
.hh-g i.now{outline:1.5px solid var(--ink);outline-offset:-1px}.hh-g i.fut{background:none}
.hh-k{display:flex;align-items:center;justify-content:flex-end;gap:3px;margin-top:6px}.hh-k i{width:10px;height:10px}
@container (max-height:150px){.hheat{--cs:clamp(5px,calc((100cqh - 30px) / 7.5),24px)}.hheat>.spread,.hh-k{display:none}.hh-g{margin-top:0}}
/* goal and SLA performance: ring beside the numbers; stacked when the tile is tall; ring alone when tiny */
.hgoal{display:flex;flex-direction:row;align-items:center;gap:14px;text-decoration:none;color:inherit}
.hring{position:relative;flex:none;height:min(calc(100cqh - 24px),46cqi);aspect-ratio:1;display:grid;place-items:center}
.hring svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.hr-t{fill:none;stroke:var(--ch-track);stroke-width:3.4}.hr-v{fill:none;stroke:var(--sage);stroke-width:3.4;stroke-linecap:round;transition:stroke-dasharray .8s var(--ease)}
.hring.warn .hr-v{stroke:var(--blue)}.hring.bad .hr-v{stroke:var(--danger)}.hring.hit .hr-v{filter:drop-shadow(0 0 3px var(--glow))}
.hring-n{position:relative;font-size:clamp(.7rem,calc(min(100cqh - 24px,46cqi) * .24),2.4rem);color:var(--sage-d)}
.hring.bad .hring-n{color:var(--danger)}
.hg-t{display:flex;flex-direction:column;gap:2px;min-width:0;max-width:100%}.hg-t>*{max-width:100%}
.hg-n{font-size:clamp(.9rem,min(8cqi,22cqh),1.9rem);line-height:1.1;color:var(--muted);white-space:nowrap}.hg-n b{font-weight:400}
.hg-l{font-size:.8rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@container (aspect-ratio < 1.15){.hgoal{flex-direction:column;justify-content:center;justify-content:safe center;text-align:center;gap:8px}.hg-t{align-items:center}.hring{height:min(calc(100cqh - 90px),calc(100cqi - 30px))}}
@container (aspect-ratio < 1.15) and (max-height:160px){.hg-t{display:none}.hring{height:min(calc(100cqh - 20px),calc(100cqi - 24px))}}
@container (max-height:80px){.hg-l,.hgoal .hcnt-l{display:none}}
@container (max-width:150px){.hg-t{display:none}.hgoal{justify-content:center}}
/* priority mix */
.hmix{display:flex;flex-direction:column;justify-content:center;justify-content:safe center;gap:8px;text-decoration:none;color:inherit}
.hmix-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.hmix-t{font-size:clamp(1rem,min(8cqi,26cqh),2rem);line-height:1}
.hmix-bar{display:flex;gap:2px;height:clamp(8px,calc(100cqh - 76px),40px);border-radius:4px;overflow:hidden;background:var(--ch-track)}
.hmix-bar i{display:block;min-width:4px}.hmix-bar i.none{flex:1;background:none}
.hmix-bar i.p1,.hmix-k i.p1{background:var(--danger)}.hmix-bar i.p2,.hmix-k i.p2{background:var(--blue)}.hmix-bar i.p3,.hmix-k i.p3{background:var(--sage)}.hmix-bar i.p4,.hmix-k i.p4{background:var(--skip)}
.hmix-k{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.8rem;color:var(--muted)}.hmix-k span{display:flex;align-items:center;gap:5px;white-space:nowrap}.hmix-k i{width:8px;height:8px;border-radius:2px}.hmix-k b{color:var(--ink);font-weight:600}
@container (max-height:100px){.hmix-k{display:none}.hmix-bar{height:clamp(8px,calc(100cqh - 46px),40px)}}
@container (max-height:62px){.hmix-h{display:none}.hmix-bar{height:calc(100cqh - 18px)}}
/* stopwatch */
.htm-b{gap:6px;margin-top:6px;flex-wrap:nowrap}.htm-b button{padding:5px 14px}
.htimer.on .hbig{text-shadow:0 0 14px var(--glow)}
@container (max-height:120px){.htm-b{margin-top:2px}.htm-b button{padding:3px 10px;font-size:.82rem}}
@container (max-height:84px){.htimer{flex-direction:row!important;align-items:center;justify-content:space-between!important;gap:10px}.htimer .hcnt-l{display:none}.htm-b{margin:0}}
/* due timeline */
.htl-track{position:relative;flex:1;min-height:30px;margin:8px 0 0 0;border-bottom:2px solid var(--line)}
.htl-now{position:absolute;left:0;bottom:-20px;font:400 .7rem "Share Tech Mono",ui-monospace,monospace;color:var(--sage-d)}
.htl-track::before{content:"";position:absolute;left:0;top:0;bottom:-6px;width:2px;background:var(--sage);box-shadow:0 0 8px var(--glow)}
.htl-tk{position:absolute;bottom:-20px;translate:-50% 0;font:400 .7rem "Share Tech Mono",ui-monospace,monospace;color:var(--muted);white-space:nowrap}
.htl-tk::before{content:"";position:absolute;left:50%;bottom:16px;width:1px;height:6px;background:var(--line)}
.htl-tk.past,.htl-m.past{display:none}
.htl-m{position:absolute;bottom:calc(4px + var(--lane,0) * 13px);translate:-50% 0;display:block;width:12px;height:12px;border-radius:50%;background:var(--skip);box-shadow:0 0 0 2px var(--card);transition:transform .2s var(--spring)}
.htl-m:hover{transform:scale(1.4)}.htl-m.p1{background:var(--danger)}.htl-m.p2{background:var(--blue)}.htl-m.p3{background:var(--sage)}
.htl{padding-bottom:26px!important}
@container (max-height:120px){.htl>.spread{display:none}.htl-track{margin-top:2px}}

/* ---- the same kind of thing looks the same on every tile ----
   Type, colour and spacing only: sizes, layouts and each tile's own colours (breached red, the main number…) keep
   their own rules, because :where() makes these the weakest rules in play */
/* small uppercase labels */
.ht :where(.hcnt-l,.dkl,.mlabel,.hh-k){font-family:"Share Tech Mono",ui-monospace,monospace;font-weight:400;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
/* headline numbers: the site's monospace digits, in the accent colour */
.ht :where(.stat strong,.hbig,.hcnt-v strong,.htd b,.hg-n b,.hmix-t,.hring-n,.hst .hbig){font-family:"Share Tech Mono",ui-monospace,Consolas,monospace;font-weight:400;font-variant-numeric:tabular-nums;letter-spacing:.01em;color:var(--sage-d)}
/* the line of detail under a number */
.ht :where(.hstat span,.htd span,.hst span,.dks,.hlive small,.hb-meta,.hg-l,.hcnt-v small,.hh-tot,.htl-s,.bitem .meta){color:var(--muted);font-size:.8rem}
/* list rows */
.ht :where(.hact-l li,.upc li,.drow,.brecent,.qcmd,.hbsteps li){font-size:.88rem}
/* times and ages in lists */
.ht :is(.hact-t,.upc .ud small,.drs,.brecent small){font-family:"Share Tech Mono",ui-monospace,monospace;font-size:.74rem;letter-spacing:.02em;color:var(--muted)}
/* little icon badges */
.ht :where(.hcnt-ic,.hact-ic){border-radius:6px;background:var(--sage-l);color:var(--sage-d)}
/* headings on list-style tiles */
.ht :where(.panel>h3,.panel>.spread>h3,.panel>.spread>div>h3){font-size:1.08rem;line-height:1.2;letter-spacing:.01em}

/* tiles that are links never underline their numbers and labels */
a.hcnt,a.hcnt *{text-decoration:none;color:inherit}a.hcnt .hcnt-v strong{color:var(--sage-d)}
/* a short stopwatch: the time sizes itself around the buttons beside it */
@container (max-height:84px){.htimer .hbig{font-size:clamp(.85rem,min(calc((100cqi - 150px) / 5),calc((100cqh - 14px) * .85)),2.6rem)!important}}
@container (max-height:84px) and (max-width:300px){.htimer [data-tm=reset]{display:none}.htimer .hbig{font-size:clamp(.85rem,min(calc((100cqi - 100px) / 5),calc((100cqh - 14px) * .85)),2.6rem)!important}}
