/* Wick web UI. Type: Wick Pixel only, at N×m px with line height N×m (SPEC §2). No em/rem/vw font sizes,
   no letter-spacing, no fractional transforms. Colors: CSS variables set from the active theme (js/color.js). */

/* ---------- type scale: one class per allowed size ---------- */
.f12 { font: 400 12px/12px "Wick Pixel 12"; }
.f14 { font: 400 14px/14px "Wick Pixel 14"; }
.f16 { font: 400 16px/16px "Wick Pixel 16"; }
.f18 { font: 400 18px/18px "Wick Pixel 18"; }
.f20 { font: 400 20px/20px "Wick Pixel 20"; }
.f22 { font: 400 22px/22px "Wick Pixel 22"; }
.f24 { font: 400 24px/24px "Wick Pixel 24"; }
.f28 { font: 400 28px/28px "Wick Pixel 28"; }
.f32 { font: 400 32px/32px "Wick Pixel 32"; }
.f48 { font: 400 48px/48px "Wick Pixel 24"; }
.f56 { font: 400 56px/56px "Wick Pixel 28"; }
.f64 { font: 400 64px/64px "Wick Pixel 32"; }
.f84 { font: 400 84px/84px "Wick Pixel 28"; }
.f96 { font: 400 96px/96px "Wick Pixel 32"; }
.f128 { font: 400 128px/128px "Wick Pixel 32"; }
.b { font-weight: 700; }

* { box-sizing: border-box; font-synthesis: none; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: var(--edge, var(--bg, #1c1f23)); color: var(--fg, #f5eddc);
}
body {
  font: 400 14px/14px "Wick Pixel 14";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: none; text-size-adjust: none;
}
::selection { background: var(--sel); color: var(--sel-ink); }
button, input { font: inherit; color: inherit; }
#app { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }

.abs, .t { position: absolute; white-space: nowrap; }
.dim { color: var(--dim); }
.up { color: var(--up); }
.down { color: var(--down); }
.soft { opacity: .75; }
.upper { text-transform: uppercase; }
.hide { display: none !important; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; overflow: hidden; background: var(--bg); color: var(--fg); }
.vscroll { position: absolute; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vscroll::-webkit-scrollbar, .hscroll::-webkit-scrollbar { display: none; }
.hscroll { position: absolute; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.board { position: relative; }
.btn { position: absolute; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; color: var(--fg); }
.btn:focus-visible, .tile:focus-visible, .row:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.circ { display: block; }

/* group headers */
.group-h { position: absolute; white-space: nowrap; color: var(--fg); cursor: default; }

/* live tiles */
.tile { position: absolute; overflow: hidden; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile .spark { position: absolute; display: block; overflow: visible; }
.tile.add { background: var(--add-tile); color: var(--add-ink); }
.tile.press { filter: brightness(0.92); }
.chip { position: absolute; background: var(--bg); padding: 3px 4px 3px 3px; white-space: nowrap; }
.ring { position: absolute; border: 3px solid var(--fg); pointer-events: none; }
.ring.move { border-color: var(--accent); }

/* Metro app bar pieces: the "…" dots and menu rows (the phone's bar is the pivot strip, below) */
.dots { display: flex; width: 44px; height: 22px; justify-content: center; align-items: center; gap: 4px; }
.dots i { display: block; width: 4px; height: 4px; background: currentColor; }
.menu-row { position: absolute; left: 0; right: 0; height: 44px; cursor: pointer; }
.menu-row:hover, .mi:hover, .row:hover { background: var(--hover); }

/* panorama */
.pano { scroll-snap-type: x mandatory; }
.pano .sec { position: absolute; top: 0; bottom: 0; scroll-snap-align: start; }
.pano-title { position: absolute; white-space: nowrap; color: var(--fg); pointer-events: none; }
.pivot { position: absolute; white-space: nowrap; color: var(--dim); cursor: pointer; }
.pivot.on { color: var(--fg); font-weight: 700; }
.stat .k { color: var(--dim); }
canvas.chart { position: absolute; display: block; touch-action: none; cursor: crosshair; }
.hist-row { position: absolute; left: 0; right: 0; }

/* search */
.search-in {
  position: absolute; border: 0; border-radius: 0; outline: 0; padding: 0; margin: 0; background: transparent;
  color: var(--fg); caret-color: var(--accent); -webkit-appearance: none; appearance: none;
}
.search-in::placeholder { color: var(--dim); opacity: 1; }
.search-in::-webkit-search-cancel-button, .search-in::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.underline { position: absolute; height: 2px; background: var(--accent); }
.row { position: absolute; left: 0; right: 0; cursor: pointer; }
.row.sel { background: var(--hover); }
.badge { position: absolute; padding: 2px 4px; background: var(--badge); color: var(--fg); white-space: nowrap; }
.badge.bp { background: var(--accent); color: var(--accent-ink); }

/* overlays: theme flyout, tile menu, panels */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 20; }
.scrim.clear { background: transparent; }
.flyout { position: absolute; top: 0; bottom: 0; background: var(--chrome); z-index: 21; overflow: hidden; }
.fly-head { position: absolute; left: 0; right: 0; top: 0; background: var(--accent); color: var(--accent-ink); }
.swatch { position: absolute; overflow: hidden; cursor: pointer; }
.swatch i { display: block; }
.menu { position: absolute; background: var(--chrome); border: 2px solid var(--fg); z-index: 21; }
.mi { position: absolute; left: 0; right: 0; height: 44px; cursor: pointer; }
.toast { position: absolute; z-index: 30; background: var(--fg); color: var(--bg); padding: 8px; white-space: nowrap; }
.switch { position: absolute; width: 52px; height: 24px; border: 2px solid var(--fg); }
.switch i { position: absolute; top: 2px; width: 16px; height: 16px; background: var(--fg); }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on i { background: var(--accent-ink); }

/* the fold (desktop / iPad): the button rides the strip's top edge and turns; the tape under a hairline */
.fold { width: 44px; height: 44px; color: var(--dim); z-index: 2;
  transition: top 620ms cubic-bezier(0.1, 0.9, 0.2, 1), color 160ms; }
.fold:hover, .fold:focus-visible { color: var(--fg); }
.fold svg { display: block; transition: transform 620ms cubic-bezier(0.1, 0.9, 0.2, 1); }
.fold circle { fill: var(--bg); }
.fold.up svg { transform: rotate(180deg); }
.p-rule { position: absolute; height: 1px; background: var(--grid); opacity: 0; pointer-events: none; transition: opacity 420ms; }
.p-rule.on { opacity: 1; }
.tape-i { position: absolute; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tape-i > i { position: absolute; display: block; }
.tape-i::after { content: ''; position: absolute; left: 0; right: 0; top: 40px; height: 2px; background: transparent; transition: background 160ms; }
.tape-i:hover::after { background: var(--faint); }
.tape-i.focus::after { background: var(--fg); }
.tape-i.sel::after { background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .fold, .fold svg, .p-rule, .tape-i::after { transition: none; }
}

/* the phone's pivot strip and pages (SPEC §1): on the page background, a hairline on top, the accent bar on it */
.pager { scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.pager .page { position: absolute; top: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.strip-b { position: absolute; left: 0; right: 0; background: var(--bg); z-index: 5; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.strip-b > i { position: absolute; display: block; top: 0; }
.strip-b .rule { left: 0; right: 0; height: 1px; background: var(--grid); }
.strip-b .mark { height: 3px; background: var(--accent); }
.strip-b .mark.glide { transition: left 320ms cubic-bezier(0.1, 0.9, 0.2, 1), width 320ms cubic-bezier(0.1, 0.9, 0.2, 1); }
.strip-b .piv { position: absolute; white-space: nowrap; color: var(--dim); cursor: pointer; }
.strip-b .piv.on { color: var(--fg); }
.more-b { position: absolute; left: 0; right: 0; background: var(--chrome); z-index: 6; }
.more-b .lab { position: absolute; white-space: nowrap; color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .strip-b .mark.glide { transition: none; } }
