/* Heks Design - components. Loaded after tokens.css; every colour here is a token or a mix of tokens.
   Layers: FOUNDATION (any Heks product) first, then TRAINING DOMAIN, then HEKSLOG, and last HEKSLOG's frame and screens -
   every look the app draws, so the sheets beside its screens only lay out. */

/* ================= FOUNDATION ================= */

/* ---- derived values: mixes the token grammar cannot hold ---- */
:root, [data-theme]{
  --aurora: radial-gradient(75% 34% at 5% 0%, var(--aurora-sea), transparent 70%),
            radial-gradient(75% 36% at 100% 8%, var(--aurora-sky), transparent 70%),
            radial-gradient(70% 30% at 30% 100%, color-mix(in srgb, var(--aurora-sea) 42%, transparent), transparent 70%);
}
:root, :is(.screen,.hk,.soon,.over){
  /* the act: tinted glass in the accent, lit from above - never a flat fill; mixed into raised so the rim never shows through */
  --act-face: linear-gradient(180deg, color-mix(in srgb, var(--accent) 40%, var(--raised)), color-mix(in srgb, var(--accent) 20%, var(--raised)));
  --act-rim: color-mix(in srgb, var(--accent) 70%, var(--ink));
  --sheet-face: linear-gradient(180deg, color-mix(in srgb, var(--raised) 96%, var(--accent)), var(--raised));
  --sheet-light: inset 0 1px 0 rgba(255,255,255,.14);
  --act-light: inset 0 1px 0 rgba(255,255,255,.16);
  --grab: rgba(255,255,255,.22);
  --knob: #d6d8de;
  /* the axis's green is the done badge's rim (kept-edge over the badge's tint), made opaque, so a line and the badge it reaches are one colour */
  --axis-kept: color-mix(in srgb, var(--kept) 63%, var(--well));
}
[data-theme="light"], [data-theme="white"], :is([data-theme="light"],[data-theme="white"]) :is(.screen,.hk,.soon,.over){
  --act-face: linear-gradient(180deg, color-mix(in srgb, var(--accent) 24%, var(--raised)), color-mix(in srgb, var(--accent) 12%, var(--raised)));
  --act-rim: color-mix(in srgb, var(--accent) 55%, transparent);
  --sheet-face: var(--raised);
  --sheet-light: inset 0 1px 0 #fff;
  --act-light: inset 0 1px 0 rgba(255,255,255,.7);
  --grab: rgba(14,27,40,.18);
  --knob: #ffffff;
  --axis-kept: color-mix(in srgb, var(--kept) 55%, var(--well));
}
:root, :is(.screen,.hk,.soon,.over){
  --prog: linear-gradient(90deg in oklch, var(--accent), var(--kept));
  --tone: var(--tone-h65);
  /* ACTIVE IS A LIGHT OF ITS TONE, NEVER A FLAT GROUND, shaped by the layout the thing stands in: an item of a vertical
     list is lit from its left edge, an item of a horizontal run from its top edge, a mark alone (a tab) by a radial light */
  --lit-head: color-mix(in srgb, var(--accent) 24%, transparent);
  --lit-left: linear-gradient(90deg, var(--lit-head), transparent);
  --lit-top: linear-gradient(180deg, var(--lit-head), transparent);
  --lit-mark: radial-gradient(closest-side, var(--lit-head), transparent);
  --lit-top-edge: inset 0 var(--ring) 0 var(--accent-edge);
  /* A LIGHTER TRAINING IS HATCHED, an overlay on whatever ground it has: amber where its colour is free, the ink's
     where the surface already speaks in a colour of its own */
  --hatch-deload: repeating-linear-gradient(135deg, var(--accent-2-tint) 0 var(--edge), transparent var(--edge) 8px);
  --hatch-quiet: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 9%, transparent) 0 var(--edge), transparent var(--edge) 8px);
  /* the path's axis ahead of the person: opaque, so it never shows what lies behind it */
  --axis-track: color-mix(in srgb, var(--ink) 11%, var(--ground));
}

/* ---- the app states (set on the screen or the root): the end of a rest is seen across the room ---- */
/* ---- the plain grounds: themes black and white, for people who find the aurora too colourful ----
   Their ground and glass come from tokens.css; here only the aurora goes, while nothing happens.
   The rest's soon and over states still bring their warm light: on a flat ground the signal is even larger. */
[data-theme="black"], [data-theme="white"]{ --aurora: linear-gradient(transparent, transparent); }
:is([data-theme="black"],[data-theme="white"]) .current, :is([data-theme="black"],[data-theme="white"]) .day::before{ background: linear-gradient(160deg, var(--accent-tint), transparent); }
:is([data-theme="black"],[data-theme="white"]) .day.off-today::before{ background: linear-gradient(160deg, var(--accent-2-tint), transparent); }

/* the last seconds of a rest: warm light comes up from the foot of the screen - a layer of its own over the aurora, so it rises
   over `m-dawn` instead of switching on; a gradient cannot be eased from one to another */
.over{ --accent: var(--accent-2); --accent-lit: var(--accent-2);
       --accent-tint: var(--accent-2-tint); --accent-edge: var(--accent-2-edge);
       --prog-start: color-mix(in oklch, var(--accent-2) 70%, var(--refused));
       --aurora: radial-gradient(80% 36% at 5% 0%, color-mix(in srgb, var(--aurora-warm) 80%, transparent), transparent 70%),
                 radial-gradient(80% 38% at 100% 8%, color-mix(in srgb, var(--accent-2) 32%, transparent), transparent 70%),
                 radial-gradient(80% 34% at 40% 100%, color-mix(in srgb, var(--aurora-warm) 55%, transparent), transparent 70%); }
.over{ --on-act: #fff8e6; }
:is([data-theme="light"],[data-theme="white"]) .over{ --on-act: #4a3200; }

/* ---- a screen: ground + aurora; everything else sits on it ---- */
.screen{position:relative;overflow:hidden;color:var(--ink);font:400 14px/1.4 var(--font-sans);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;
  background:var(--aurora), var(--ground);isolation:isolate}
.screen::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(100% 48% at 50% 100%, var(--aurora-warm), transparent 72%);
  opacity:0;transition:opacity var(--m-dawn,1s) var(--ease-move,ease)}
.screen.soon::before{opacity:1}
@media (prefers-reduced-motion:reduce){.screen::before{transition:none}}
/* ---- a page: the body of a document that scrolls with the window, on the same ground + aurora ----
   The aurora is held to the viewport: a gradient sized to a tall page would stretch to nothing. The body is isolated
   so the aurora lies over its ground: once html is painted (the frame below paints html, body), the body's ground no
   longer passes to the canvas and would cover a layer behind it. */
.aurora{background:var(--ground);isolation:isolate}
.aurora::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--aurora),var(--ground)}
.screen *, .hk *{box-sizing:border-box}
.hk{color:var(--ink);font:400 14px/1.4 var(--font-sans);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
:where(.screen,.hk) :where(button,input,textarea){font:inherit;color:inherit;background:none;border:0;margin:0}
:where(.screen,.hk) :where(button,input[type="checkbox"],input[type="radio"]){cursor:pointer}
/* a control that is off answers nothing under the pointer: no pointer cursor, no hover, no press */
:where(.screen,.hk) :where(button,input,select,textarea,[role="button"]):is(:disabled,[aria-disabled="true"]){pointer-events:none;cursor:default}
/* a control answers every tap: two quick ones on a key are two keys, never the browser's double-tap zoom */
:where(.screen,.hk) :where(button,a,label,input,.keypad){touch-action:manipulation}
:where(.screen,.hk) :where(input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="tel"],input[type="number"],textarea){cursor:text}
:where(.screen,.hk) :where(h1,h2,h3,p,ul){margin:0;padding:0}
:where(.screen,.hk) svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:where(.screen,.hk) :focus-visible{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
:where(.screen,.hk) .row:focus-visible{border-radius:var(--r-inner)}
/* a control whose own input is hidden (a file picker behind a row) shows the ring the input cannot */
:where(.screen,.hk) :is(.row,.chip):has(> input.vh:focus-visible){outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
/* a focused row at a group's top or bottom follows the group's corner, so its edge is never clipped */
.group > .row:first-child:focus-visible{border-top-left-radius:var(--r-group);border-top-right-radius:var(--r-group)}
.group > .row:last-child:focus-visible{border-bottom-left-radius:var(--r-group);border-bottom-right-radius:var(--r-group)}

/* ---- scrollbars: one quiet bar on every surface that scrolls - a thin pill in ink, no track ----
   The colour is inherited, so a surface inside a screen needs nothing; the width is set on each scroller.
   WebKit without scrollbar-color draws the same pill from its pseudo-elements, a little stronger under the pointer. */
:where(.screen,.hk){--scroll-thumb:color-mix(in srgb,var(--ink) 20%,transparent);--scroll-thumb-on:color-mix(in srgb,var(--ink) 40%,transparent);scrollbar-color:var(--scroll-thumb) transparent}
:where(.screen,.hk), :where(.screen,.hk) *{scrollbar-width:thin}
@supports not (scrollbar-color:auto){
  :where(.screen,.hk) ::-webkit-scrollbar, :where(.screen,.hk)::-webkit-scrollbar{width:10px;height:10px;background:transparent}
  :where(.screen,.hk) ::-webkit-scrollbar-thumb, :where(.screen,.hk)::-webkit-scrollbar-thumb{background:var(--scroll-thumb);background-clip:padding-box;border:3px solid transparent;border-radius:var(--r-pill)}
  :where(html:not(.ag-picking)) :where(.screen,.hk) ::-webkit-scrollbar-thumb:hover,:where(html:not(.ag-picking)) :where(.screen,.hk)::-webkit-scrollbar-thumb:hover{background-color:var(--scroll-thumb-on);border-width:2px}
  :where(.screen,.hk) ::-webkit-scrollbar-track, :where(.screen,.hk) ::-webkit-scrollbar-corner{background:transparent}
}

/* ---- text roles (sizes match the type styles) ---- */
/* a figure from the last time, wherever a number stands: a chip, an empty field, the sets ahead. Drawn dots, not a text decoration: a dotted underline is drawn finer in a field than in text, and one digit takes two dots */
/* a line of figures (`45 kg: 3 × 5`): the numbers in ink and weight, units and joins quiet */
.figs{color:var(--ink-quiet);font-variant-numeric:tabular-nums}
.figs b{color:var(--ink);font-weight:600}
.was{display:inline-block;min-width:max(12px,calc(var(--d,0) * 1ch + 2px));line-height:1;text-align:center;padding-bottom:6px;margin-bottom:-6px;background:radial-gradient(circle,var(--ink-faint) 0 1px,transparent 1.3px) center bottom/4px 2px repeat-x}
/* a field's figure is centred on its line: the dots stand as far under it (4px below the em box) as under a figure in text, and as wide, both sized by --d */
input.was{display:block;margin:0;padding-bottom:0;background-position:center calc(50% + 13px)}
.meta{font-size:13px;line-height:1.35;color:var(--ink-quiet)}
.label{font-size:11px;line-height:1.25;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-quiet)}
/* the colours of a line stand after the text roles, so `.meta.acc` and `.meta.dif` keep their colour */
.quiet{color:var(--ink-quiet)} .acc{color:var(--accent)} .dif{color:var(--accent-2)}

/* ---- layout blocks: a screen arranges its parts one under another (Stack), side by side (Line) or in as many columns as
   its width holds (Grid), with the scale's named gaps - a row by default, a gap-* class for another; a flex or grid rule of a
   screen's own is only for a composition's own shape ---- */
.stack{display:flex;flex-direction:column;gap:var(--gap-row)}
.line{display:flex;align-items:center;gap:var(--gap-row)}
.line.atop{align-items:flex-start}
.grid-fit{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:var(--gap-row)}
.gap-line{gap:var(--gap-line)} .gap-head{gap:var(--gap-head)} .gap-block{gap:var(--gap-block)}

/* ---- surfaces ---- */
/* glass: a card in scrolling content - no blur (the aurora is static, blur would cost while scrolling) */
.glass{background:var(--glass);border:1px solid var(--glass-edge);background-clip:padding-box;border-radius:var(--r-group)}
/* float: only layers over moving content */
/* -webkit-backdrop-filter goes BEFORE backdrop-filter, wherever both stand: the build's minifier (Lightning CSS) reads
   the later one as overriding the earlier and keeps only it, and Chrome on Android reads only the plain one */
.float{background:var(--float);border:1px solid var(--glass-edge);background-clip:padding-box;-webkit-backdrop-filter:blur(var(--blur));backdrop-filter:blur(var(--blur));box-shadow:var(--lift-float)}
.current{background:linear-gradient(160deg,var(--accent-tint),color-mix(in srgb,var(--aurora-sea) 22%,transparent));border:1px solid var(--accent-edge);border-radius:var(--r-group)}

/* ---- buttons ---- */
.btn{text-decoration:none;height:var(--tap);padding:0 18px;border-radius:var(--r-card);font-size:14px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--glass);border:1px solid var(--glass-edge);background-clip:padding-box;color:var(--ink);white-space:nowrap}
.btn svg{width:var(--mk);height:var(--mk);flex:none}
.btn.act{background:var(--act-face);border-color:var(--act-rim);color:var(--on-act);font-weight:600;box-shadow:var(--act-light),var(--glow)}
.btn.small{height:36px;padding:0 14px;font-size:13px}
.btn.ghost{background:none;border-color:transparent;color:var(--ink-quiet)}
.btn.grave{background:var(--glass);border-color:var(--accent-2-edge);color:var(--accent-2);box-shadow:none}
.btn[disabled]{opacity:var(--o-off);cursor:default;box-shadow:none}
/* a control whose act is under way and has been for a moment (aria-busy): it breathes between full and aside. A
   place where something is on its way (.waits - an answer being written) breathes alike; it is no control, so it takes
   no progress cursor and says nothing of a region being rewritten */
[aria-busy="true"], .waits{animation:busy-breathe 1.1s var(--ease-move,ease) infinite alternate}
[aria-busy="true"]{cursor:progress}
@keyframes busy-breathe{to{opacity:var(--o-aside)}}
@media (prefers-reduced-motion:reduce){[aria-busy="true"], .waits{animation:none;opacity:var(--o-aside)}}
.ib[disabled]{opacity:var(--o-off);cursor:default}
.ib{width:var(--tap);height:var(--tap);border-radius:50%;display:inline-grid;place-items:center;color:var(--ink-quiet);flex:none}
.ib svg{width:20px;height:20px}
/* A HOVER IS A LAYER OVER THE STATE, never in its place: each state's own edge is kept under the lift, a row's light stays
   over it (a ground colour, under the row's image), and what is off does not answer */
/* every hover look stands under :where(html:not(.ag-picking)): while Wskaż is on nothing on the screen presses, so
   nothing may look as if it would - a new hover rule takes the same guard, which adds no weight */
@media (hover:hover) and (pointer:fine){
  :where(html:not(.ag-picking)) :is(.btn,.ib):not([disabled]):hover{box-shadow:inset 0 0 0 999px var(--lift)}
  :where(html:not(.ag-picking)) .btn.act:not([disabled]):hover{box-shadow:var(--act-light),var(--glow),inset 0 0 0 999px var(--lift)}
  :where(html:not(.ag-picking)) .chip:is(button,a,label):not([disabled]):hover{box-shadow:inset 0 0 0 1px var(--field-edge),inset 0 0 0 999px var(--lift)}
  :where(html:not(.ag-picking)) .chip[aria-pressed="true"]:is(button,a,label):not([disabled]):hover{box-shadow:inset 0 0 0 1px var(--accent-edge),inset 0 0 0 999px var(--lift)}
  :where(html:not(.ag-picking)) .row.press:hover{background-color:var(--lift)}
}
@media (pointer:fine){ .btn{height:var(--tap-fine)} .ib{width:var(--tap-fine);height:var(--tap-fine)} }
.btn:active,.ib:active,.chip:is(button,a,label):active{transform:translateY(var(--press))}
/* A PRESS IS SEEN UNDER A FINGER, which has no hover: the control darkens the moment it is pressed and the shade fades as it is let go.
   Each control's own edge and light stay under the shade; :where keeps the shade below each control's own rules */
:where(.btn,.ib,.chip:is(button,a,label),.row.press,.glass.press,.keypad .grid button,.keypad .sg button,.set button.v,.path :is(.ex,.it),.tcard.other){--pressed:var(--shade);transition:box-shadow var(--m-state,160ms) var(--ease-out,ease),transform var(--m-state,160ms) var(--ease-out,ease)}
:where(.btn,.ib,.row.press,.keypad .grid button,.keypad .sg button,.set button.v,.path :is(.ex,.it),.tcard.other):active{box-shadow:inset 0 0 0 999px var(--pressed);transition-duration:0s}
.btn.act:active{box-shadow:var(--act-light),var(--glow),inset 0 0 0 999px var(--pressed)}
.chip:is(button,a,label):active{box-shadow:inset 0 0 0 1px var(--field-edge),inset 0 0 0 999px var(--pressed);transition-duration:0s}
.keypad .grid button:active,.keypad .sg button:active{transform:scale(.94)}
@media (prefers-reduced-motion:reduce){.keypad .grid button:active,.keypad .sg button:active{transform:none}}

/* ---- choices ---- */
.chip{height:36px;min-width:40px;padding:0 12px;border-radius:var(--r-pill);font-size:13px;font-weight:500;background:var(--field);box-shadow:inset 0 0 0 1px var(--field-edge);color:var(--ink-quiet);display:inline-flex;align-items:center;justify-content:center;gap:6px}
.chip[aria-pressed="true"]{background:var(--lit-top);color:var(--ink);font-weight:600;box-shadow:inset 0 0 0 1px var(--accent-edge)}
/* the value the plan asks: in a row of chips holding one, only that chip keeps a ground - a neutral raised one, as a planned day's
   cell in the week grid, so it reads as offered rather than pressed; the others are ghosts. The chosen chip keeps its look */
:where(.rir-band,.keypad .rir,.entry-pop .rir):has(> .chip.goal) > .chip:not(.goal):not([aria-pressed="true"]){background:none;box-shadow:none}
:where(.rir-band,.keypad .rir,.entry-pop .rir) > .chip.goal:not([aria-pressed="true"]){background:var(--glass-strong)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) :where(.rir-band,.keypad .rir,.entry-pop .rir):has(> .chip.goal) > .chip:not(.goal):not([aria-pressed="true"]):hover{box-shadow:inset 0 0 0 999px var(--lift)} }
.chip.small{height:var(--tap-tight);font-size:12px}
.chip b{color:var(--ink);font-weight:600}
.chip svg{width:14px;height:14px;flex:none}
/* a chip that can be taken away: its words in a span, then its x; the x's reach is a finger's, past its 14px */
.chip:has(> .x){max-width:100%}
.chip:has(> .x) > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chip > .x{position:relative;display:inline-grid;place-items:center;flex:none;padding:0;margin-right:-4px;color:var(--ink-quiet)}
.chip > .x::after{content:'';position:absolute;inset:-9px}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .chip > .x:hover{color:var(--ink)} }
.chips{display:flex;gap:var(--gap-line);flex-wrap:wrap}
/* UNDER A FINGER EVERY CONTROL IS A TAP TALL: the smaller chips and buttons are drawn for a pointer */
@media (pointer:coarse){ .chip,.btn.small,.choice-menu .cm-at{min-height:var(--tap)} }
.seg{display:flex;padding:4px;border-radius:var(--r-pill);background:var(--sink)}
.seg button{flex:1;height:36px;border-radius:var(--r-pill);font-size:13px;font-weight:500;color:var(--ink-quiet)}
.seg button[aria-pressed="true"]{background:var(--lit-top);color:var(--ink);box-shadow:inset 0 0 0 1px var(--accent-edge)}
/* the chosen light, gliding: where one option of several is lit (Segmented, the tab bar, the rail, a list with one row
   chosen) the container carries one mark (.glide, set by the app's glide action) that wears the chosen look and moves to the
   option chosen on the spring; the option's own look steps aside. Placed without motion (.still) when it first finds
   its option and when its container changes size */
.glides{isolation:isolate}
.glides:is(.seg,.group,.rail){position:relative}
.glide{position:absolute;left:0;top:0;z-index:-1;pointer-events:none;
  transition:translate var(--m-spring) var(--ease-spring),opacity var(--m-state) var(--ease-out)}
.glide.still{transition:none}
@media (prefers-reduced-motion:reduce){.glide{transition:none}}
.seg > .glide{border-radius:var(--r-pill);background:var(--lit-top);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.seg.glides > button[aria-pressed="true"]{background:none;box-shadow:none}
.tabbar > .glide{border-radius:var(--r-pill);background:var(--lit-mark);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.tabbar.glides > a[aria-current="page"]{background:none;box-shadow:none}
.rail > .glide{border-radius:var(--r-pill);background:var(--lit-left);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.rail.glides > a[aria-current="page"]{background:none;box-shadow:none}
.group > .glide{background:var(--lit-left)}
.group.glides > .row.sel{background:none;box-shadow:none}
.choice-list > .glide{border-radius:var(--r-inner);background:var(--lit-left)}
.choice-list.glides > button[aria-checked="true"]{background:none}
/* toggle: off is a recessed track with a quiet knob; on is the act's lit glass with a white knob - the same light as the main act, small */
.toggle{width:48px;height:28px;flex:none;border-radius:var(--r-pill);position:relative;background:var(--sink);box-shadow:inset 0 0 0 1px var(--glass-edge);
  transition:background-color var(--m-state,160ms) var(--ease-move,ease),box-shadow var(--m-state,160ms) var(--ease-move,ease)}
.toggle::after{content:'';position:absolute;left:3px;top:3px;width:22px;height:22px;border-radius:50%;
  background:color-mix(in srgb,var(--ink-quiet) 70%,transparent);box-shadow:0 1px 2px rgba(0,0,0,.25);
  transition:translate var(--m-state,160ms) var(--ease-move,ease),background-color var(--m-state,160ms)}
.toggle[aria-checked="true"]{background:var(--act-face);box-shadow:inset 0 0 0 1px var(--act-rim),var(--act-light)}
.toggle[aria-checked="true"]::after{translate:20px 0;background:var(--knob);box-shadow:0 1px 3px rgba(0,0,0,.35)}
/* on a light ground the act's glass is too pale under a white knob: the toggle takes the accent lit from above */
:is([data-theme="light"],[data-theme="white"]) .toggle[aria-checked="true"]{background:linear-gradient(180deg,var(--accent-lit),var(--accent));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 80%,#000),inset 0 1px 0 rgba(255,255,255,.35)}
:is([data-theme="light"],[data-theme="white"]) .toggle:not([aria-checked="true"])::after{background:color-mix(in srgb,var(--ink-quiet) 55%,transparent)}
.toggle[disabled]{opacity:var(--o-off)}
@media (prefers-reduced-motion:reduce){.toggle,.toggle::after{transition:none}}
/* a toggle is drawn smaller than a finger: its target reaches past its track to the tap's height */
.toggle::before{content:'';position:absolute;inset:calc((var(--tap) - 28px) / -2) 0}

/* ---- fields ---- */
/* ---- field: the name above, the box, a note under it; the box is as wide as its value, never the name ---- */
.field{display:inline-flex;flex-direction:column;gap:var(--gap-line);min-width:0;vertical-align:top}
.field.wide{display:flex}
.field .name{font-size:13px;font-weight:500;line-height:1.25;color:var(--ink-quiet);white-space:nowrap}
.field .input{display:flex;align-items:center;gap:4px;height:var(--tap);padding:0 12px;border-radius:var(--r-card);background:var(--field-in);box-shadow:inset 0 0 0 1px var(--field-in-edge);cursor:text}
.field .input input{flex:1;min-width:0;width:100%;height:100%;font:500 16px/1 var(--font-sans);font-variant-numeric:tabular-nums;outline:0}
.field .input input::placeholder{color:var(--ink-faint);font-weight:400}
.field .unit{flex:none;font-size:14px;line-height:1;color:var(--ink-quiet);position:relative;top:1px}
/* a number: the box fits --d digits and the unit; the value stands right, against its unit, so stacked figures line up */
.field.num .input{align-self:flex-start}
.field.num .input input{flex:none;width:calc(var(--d,4) * 1ch + 2px);padding:0;text-align:right}
/* a count with no unit (reps, RIR) stands in the middle of its box */
.field.num .input:not(:has(.unit)) input{text-align:center}
.field .note{contain:inline-size;min-width:100%;font-size:13px;line-height:1.35;color:var(--ink-faint)}
.field.on .input,.field .input:focus-within{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
/* a number box in a labelled field stands under its name, never narrower than a few figures */
.field > .nbox{align-self:flex-start;min-width:6.5rem}
.field .input input:focus-visible,.search input:focus-visible{outline:0}
/* A FIELD ONE OCCASION ANSWERED FOR ITSELF (a training's own sets against its routine's): its
   figure in the second accent, its box edged in it, and under it what it stands against. */
.field.own .input input{color:var(--accent-2)}
.field.own .input{box-shadow:inset 0 0 0 1px var(--accent-2-edge)}
.field .from{margin:0 2px;font-size:11px;color:var(--ink-faint)}
.field.bad .input{box-shadow:inset 0 0 0 1.5px var(--refused)}
.note.bad,.field.bad .note{display:flex;gap:6px;align-items:flex-start;color:var(--refused)}
.note.bad svg,.field.bad .note svg{flex:none;width:var(--mk-s);height:var(--mk-s);margin-top:1px}
.field[aria-disabled="true"]{opacity:var(--o-off)}
/* fields side by side: their notes go under the row, full width, and name the field they are about */
/* a one-time code: one field (pasted or filled by the system), large spaced digits in the middle - never six boxes */
.field.code .input{height:64px}
.field.code .input input{font-size:28px;font-weight:600;letter-spacing:.24em;text-align:center;text-indent:.24em}
.fields{display:flex;flex-wrap:wrap;gap:var(--gap-head) var(--gap-row);align-items:flex-start}
.fields > .note{flex-basis:100%;font-size:13px;line-height:1.35;color:var(--ink-faint);margin-top:calc(var(--gap-line) - var(--gap-head))}
.fields > .note.bad{color:var(--refused)}
@media (pointer:fine){ .field .input{height:var(--tap-fine)} }
.search:focus-within{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.search{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;border-radius:var(--r-pill);background:var(--field-in);box-shadow:inset 0 0 0 1px var(--field-in-edge);color:var(--ink-quiet)}
.search svg{width:var(--mk);height:var(--mk)}
.search input{flex:1;min-width:0;font:400 16px/1 var(--font-sans);cursor:text;outline:0}
.search input::placeholder{color:var(--ink-faint)}
kbd{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 5px;margin-right:4px;border-radius:var(--r-mark);background:var(--sink);box-shadow:inset 0 0 0 1px var(--glass-edge);font:600 11px/1 var(--font-sans);color:var(--ink-quiet)}
.keys{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--ink-faint)}
.keys b{color:var(--ink);font-weight:600}
/* THE TRAINING'S KEYS, under ? : the groups as labelled lists, each key a cap at the row's end. */
.key-sheet{display:flex;flex-direction:column;gap:var(--gap-block)}
.key-sheet .label{display:block;margin:0 4px var(--gap-line)}
.key-sheet .row .ks{display:inline-flex;gap:4px;flex:none}
.key-sheet .row kbd{margin:0}
/* THE FIRST STOP OF TAB on a screen with one place to be: unseen until it has the focus, then a
   floating button at the top. */
.skip-to{position:fixed;z-index:var(--z-tip);top:12px;left:50%;transform:translateX(-50%);height:36px;padding:0 16px;border-radius:var(--r-card);background:var(--float);box-shadow:var(--lift-float);font-size:13px;font-weight:500;color:var(--ink)}
.skip-to:not(:focus-visible){width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---- lists ---- */
.group{border-radius:var(--r-group);overflow:hidden}
.row{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px var(--pad-row);border-top:1px solid var(--hairline)}
.group > .row:first-child, .group > .roll > .row:first-child{border-top:0}
button.row{width:100%;text-align:left}
.row.sel{background:var(--lit-left)}
/* a row waiting on the person's act - a leave to ask, an install - lit in the accent's tint */
.row.due{background:var(--accent-tint);box-shadow:inset 0 0 0 1px var(--accent-edge)}
/* a row that holds its own acts names its way in by the title alone */
.row a.t-name{color:inherit;text-decoration:none}
.row.due .t-name{color:var(--accent)}
/* a row that depends on the one above it - its switch means nothing while that one is off - hangs under it: no hairline between them, no icon, its name under the parent's name */
.row.sub{border-top:0;padding-left:calc(var(--pad-row) + 44px)}
/* rows waiting side by side are one lit block: the edge goes round the run, and between them the row's own hairline */
.row.due:has(+ .row.due){box-shadow:inset 1px 0 0 var(--accent-edge),inset -1px 0 0 var(--accent-edge),inset 0 1px 0 var(--accent-edge)}
.row.due + .row.due{box-shadow:inset 1px 0 0 var(--accent-edge),inset -1px 0 0 var(--accent-edge),inset 0 -1px 0 var(--accent-edge)}
.row.due + .row.due:has(+ .row.due){box-shadow:inset 1px 0 0 var(--accent-edge),inset -1px 0 0 var(--accent-edge)}
/* its edge is drawn inside the row, so at the group's ends it follows the group's corners rather than be cut by them */
.group > .row.due:first-child{border-top-left-radius:var(--r-group);border-top-right-radius:var(--r-group)}
.group > .row.due:last-child{border-bottom-left-radius:var(--r-group);border-bottom-right-radius:var(--r-group)}
.row .t{flex:1;min-width:0}
.row .t > b{display:block;font-size:15px;font-weight:500;line-height:1.25}
.row.sel .t > b{font-weight:600}
.row .t p{margin-top:2px}
.row .v{font-size:13px;color:var(--ink-quiet);text-align:right}
/* a chevron: the way on to what the page does not show */
.ch{width:var(--mk);height:var(--mk);flex:none;color:var(--ink-faint)}
.row .ic{width:32px;height:32px;flex:none;border-radius:var(--r-inner);display:grid;place-items:center;background:var(--sink);color:var(--ink-quiet)}
.row .ic svg{width:17px;height:17px}
/* a chosen row's check: a tinted disc at the row's end */
.row .sel-ic{width:24px;height:24px;flex:none;border-radius:50%;display:grid;place-items:center;color:var(--accent);background:var(--accent-tint);box-shadow:inset 0 0 0 1.5px var(--accent-edge)}
.row .sel-ic svg{width:var(--mk-s);height:var(--mk-s);stroke-width:3}

/* ---- marks: colour + shape, never colour alone ---- */
.done-mark{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--kept);background:var(--kept-tint);box-shadow:inset 0 0 0 1.5px var(--kept-edge);flex:none}
/* the check in whole pixels, its circle's size less an even number, so it sits on the pixel grid and is drawn even;
   a share of the circle would land it between pixels, one arm sharper than the other */
.done-mark svg{width:12px;height:12px;stroke-width:2.6}
.done-mark.small{width:22px;height:22px}
.done-mark.small svg{width:10px;height:10px}
.differs{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:var(--r-pill);font-size:12px;font-weight:500;color:var(--accent-2);box-shadow:inset 0 0 0 1px var(--accent-2-edge)}
/* an image over whatever ground the element has, so glass keeps its glass under the hatch */
.stripes{background-image:var(--hatch-deload)}
.status{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--ink-quiet)}
.status i{width:7px;height:7px;border-radius:50%;background:var(--ink-quiet)}
.status.kept i{background:var(--kept)} .status.pending i{background:var(--pending)}
.status.refused{color:var(--refused)} .status.refused i{background:var(--refused)}
.notice{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:var(--r-card);font-size:13px;line-height:1.4}
.notice svg{width:var(--mk);height:var(--mk);flex:none;margin-top:1px}
.notice.refused{color:var(--ink);background:color-mix(in srgb,var(--refused) 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--refused) 45%,transparent)}
.notice.refused svg{color:var(--refused)}
.notice.differs-n{color:var(--ink);background:var(--accent-2-tint);box-shadow:inset 0 0 0 1px var(--accent-2-edge)}
.notice.differs-n svg{color:var(--accent-2)}
/* the app speaking inside a conversation: a line among the rows, no box round it */
.notice.quiet{padding:0;border-radius:0;color:var(--ink-quiet)}
.notice.quiet svg{color:var(--ink-faint)}

/* ---- progress: always blue, the gradient pinned to the track ---- */
.bar{height:6px;border-radius:var(--r-pill);background:var(--track);overflow:hidden;container-type:inline-size}
.bar > i{display:block;height:100%;border-radius:var(--r-pill);background:var(--prog);background-size:100cqw 100%}
/* ---- the ring: the bar's sweep around a circle. --p is the share done, 0-100 (a number, no %).
   Round ends: the arc is a conic sweep masked to a band, the start cap is drawn at the top, the end cap is the same dot
   turned by --p. No ground inside: what stands behind the ring shows through. ---- */
.ring.ring,.rail .timer{--w:4px;--from:var(--accent);--to:var(--kept);position:relative;isolation:isolate;display:inline-grid;place-items:center;border-radius:50%;font-variant-numeric:tabular-nums}
:is(.ring.ring,.rail .timer)::before,:is(.ring.ring,.rail .timer)::after{content:'';position:absolute;inset:0;z-index:-1;border-radius:50%;pointer-events:none;
  --q:var(--p,50);--cap:calc(var(--w) / 2 * min(1, var(--q), 100 - var(--q)))}
:is(.ring.ring,.rail .timer)::before{
  background:radial-gradient(circle at 50% calc(var(--w) / 2),var(--from) calc(var(--cap) - .5px),transparent var(--cap)),
             conic-gradient(in oklch,var(--from),color-mix(in oklch,var(--from),var(--to) calc(var(--q) * 1%)) calc(var(--q) * 1%),var(--track) 0);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - var(--w) - .5px),#000 calc(100% - var(--w)));
          mask:radial-gradient(farthest-side,transparent calc(100% - var(--w) - .5px),#000 calc(100% - var(--w)))}
:is(.ring.ring,.rail .timer)::after{rotate:calc(var(--q) * 3.6deg);
  background:radial-gradient(circle at 50% calc(var(--w) / 2),color-mix(in oklch,var(--from),var(--to) calc(var(--q) * 1%)) calc(var(--cap) - .5px),transparent var(--cap))}
/* the count inside: done large, the total smaller; up to two digits each (13/14 fits a 40px ring) */
.ring .of{font-size:.8em;font-weight:500;color:var(--ink-quiet)}
/* time is not work: a rest's ring runs sea to blue and ends in the rest's amber, never green */
.rail .timer,.ring.time{--from:var(--prog-start);--to:var(--accent)}
/* done: the ring becomes the DoneMark - the same badge as a done set, a done exercise, a done day.
   Over m-state the arc closes, then fades while the badge's tint and edge come in; the count gives way to the check. */
.ring.ring{transition:background-color var(--m-state,160ms) var(--ease-move,ease),box-shadow var(--m-state,160ms) var(--ease-move,ease),color var(--m-state,160ms)}
:is(.ring.ring)::before,:is(.ring.ring)::after{transition:opacity var(--m-state,160ms) var(--ease-move,ease)}
.ring.ring.done{--p:100;color:var(--kept);background-color:var(--kept-tint);box-shadow:inset 0 0 0 clamp(1.5px,calc(var(--w) / 2),2px) var(--kept-edge)}
.ring.ring.done::before,.ring.ring.done::after{opacity:0}
.ring.ring.done svg{width:46%;height:46%;stroke-width:2.6}
@media (prefers-reduced-motion:reduce){.ring.ring,:is(.ring.ring)::before,:is(.ring.ring)::after{transition:none}}
.bar.done > i{width:100%;background:var(--kept)}

/* ---- tiles ---- */
.tiles{display:grid;grid-template-columns:repeat(var(--n,3),1fr);gap:6px}
.tile{border-radius:var(--r-card);padding:10px 12px}
.tile b{display:block;font-size:18px;font-weight:600;line-height:1.2;margin-top:4px}
.tile b small{font-size:11px;color:var(--ink-quiet);font-weight:400}
.tile .d{font-size:11px;color:var(--ink-quiet);margin-top:2px}
/* ---- line chart (single series: accent; background bands for context; one axis) ---- */
.chart svg{display:block;width:100%;overflow:visible}
.chart svg rect,.chart svg text{stroke:none}
.chart .ax text{font:400 11px var(--font-sans);fill:var(--ink-faint)}
.chart .ax line{stroke:var(--hairline);stroke-width:1}
.chart .band rect{fill:color-mix(in srgb,var(--accent) 7%,transparent)}
.chart .band rect.alt{fill:color-mix(in srgb,var(--ink) 3%,transparent)}
.chart .band text{font:600 11px var(--font-sans);fill:var(--ink-quiet);letter-spacing:.04em}
.chart .ln{fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round}
.chart .pt{fill:var(--accent);stroke:var(--well);stroke-width:2}
.chart .pr{fill:var(--well);stroke:var(--accent);stroke-width:2.5}
.chart .lb{font:600 11px var(--font-sans);fill:var(--ink)}
.chart .x{stroke:var(--ink-faint);stroke-width:1;stroke-dasharray:3 3}
.tip{padding:10px 12px;border-radius:var(--r-card);font-size:12px;color:var(--ink-quiet);min-width:170px}
.tip b{display:block;color:var(--ink);font-size:13px;font-weight:600;margin-bottom:4px}
.tip p{display:flex;justify-content:space-between;gap:12px;white-space:nowrap}
.tip p span:last-child{color:var(--ink)}

/* ---- layers ---- */
/* a layer stands at the top of its frame (Layer.svelte): where it was written it draws nothing, and at the frame's
   end it stays out of the frame's flow - a box there would take a cell of a grid frame or a gap of a flex one */
.layer-at{display:contents}
.layer-top{position:absolute;width:0;height:0}
.scrim{position:absolute;inset:0;background:var(--scrim)}
.sheet{position:absolute;left:0;right:0;bottom:0;z-index:var(--z-sheet);border-radius:var(--r-sheet) var(--r-sheet) 0 0;padding:10px 16px 28px;background:var(--sheet-face);backdrop-filter:blur(var(--blur));box-shadow:var(--sheet-light),var(--shadow-sheet)}
.grab{width:40px;height:5px;border-radius:var(--r-pill);background:var(--grab);margin:0 auto 10px}
.sheet .sh{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.sheet .sh .t{flex:1}
/* what leads a head - a mark saying whose the sheet or the panel is - stands before its title */
:is(.sheet,.panel) .sh > .lead{flex:none;display:grid;place-items:center;font-size:26px;line-height:1}
:is(.sheet,.panel) .sh > .lead > svg{width:1em;height:1em}
.sheet .acts{display:flex;gap:8px;margin-top:16px}
.sheet .acts .btn{flex:1}

/* ---- toasts: what ARRIVED, said at the frame's foot and gone again ---- */
/* ONE QUEUE, NEWEST NEAREST THE EDGE - the column is reversed, so the one that came last stands lowest and the older
   ones ride up above it. A toast says something that arrived and leaves by itself; a .notice band says a condition
   that STANDS and waits to be answered, and the two are never the same thing drawn twice.
   It is the held word's layer (z-tip), the topmost of the four, so a toast is read over a sheet as well as over the
   page - and it is modal for nothing: the queue itself answers no press, only the toasts in it do. */
.toasts{position:absolute;z-index:var(--z-tip);left:14px;right:14px;bottom:var(--toast-at);display:flex;flex-direction:column-reverse;align-items:stretch;gap:var(--gap-row);pointer-events:none;
  --toast-at:calc(var(--bar-at) + var(--bar) + var(--s2) + env(safe-area-inset-bottom,0px))}
.toasts > *{pointer-events:auto}
/* in an app's frame the queue is fixed to the window, as the sheet and the bar it stands over are */
:is(.app,.hk) .toasts{position:fixed}
/* ON A PHONE IT STANDS OVER THE FLOATING TAB BAR, and over whatever is already there: the drawer while it is out, and
   the agent's bubble while it speaks at the foot (--ag-line-h is that bubble's own measured height; with a sheet open
   the bubble leaves the corner for the top of the screen, so the queue takes the corner back) */
.app:has(> .drawer) .toasts{--toast-at:calc(var(--bar-at) + var(--bar) + var(--drawer) + var(--s2) + env(safe-area-inset-bottom,0px))}
.app:has(> .ag-line):not(:has(section.sheet)) .toasts{--toast-at:calc(var(--bar-at) + var(--bar) + var(--ag-line-h,0px) + 2 * var(--s2) + env(safe-area-inset-bottom,0px))}
/* BESIDE A RAIL the queue stands in the frame's bottom right corner, clear of the rail, and a toast is a card of its
   own rather than a band across the width */
.app.rail-l .toasts{left:calc(var(--rail) + var(--s3));right:var(--s3);--toast-at:var(--s3)}
.app.rail-w .toasts{left:calc(var(--rail-wide) + var(--s3));right:var(--s3);--toast-at:var(--s3)}
.app:is(.rail-l,.rail-w) .toasts{align-items:flex-end}
.app:is(.rail-l,.rail-w) .toast{max-width:360px}
/* ONE TOAST: an optional mark, the words, the way out at the end, and an act under them on the right edge (.askacts,
   the answer row). Every child names its column, so a toast with no mark still reads from the left. */
.toast{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:start;column-gap:var(--gap-row);row-gap:var(--gap-line);padding:var(--s3) var(--s4);border-radius:var(--r-card);box-shadow:var(--lift-float),inset 0 0 0 1px color-mix(in srgb,var(--ink) 16%,transparent)}
.toast > svg{grid-column:1;grid-row:1;align-self:center;width:var(--mk);height:var(--mk);flex:none;color:var(--ink-quiet)}
.toast > .t{grid-column:2;grid-row:1;align-self:center;min-width:0;font-size:14px;line-height:1.3;color:var(--ink)}
.toast > .t b{display:block;font-weight:600}
.toast > .t span{display:block;color:var(--ink-quiet);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.toast > .toast-x{grid-column:4;grid-row:1;align-self:center;margin-right:calc(-1 * var(--s2))}
/* the act stands beside what it answers, not under it: one row reads as one notice, and a column with a lone
   button in its corner reads as a card somebody left half-built */
.toast > .askacts{grid-column:3;grid-row:1;align-self:center}
/* a toast whose news is a refusal of something the person started takes the refusal's edge and its mark's colour; a
   refusal that needs an answer is no toast at all - it is a .notice.refused where the act was, or a question */
.toast.refused{box-shadow:var(--lift-float),inset 0 0 0 1px color-mix(in srgb,var(--refused) 45%,transparent)}
.toast.refused > svg{color:var(--refused)}

/* ---- navigation: phone tab bar (floating), tablet icon rail, desktop labelled rail ---- */
.tabbar{position:absolute;z-index:var(--z-sticky);left:14px;right:14px;bottom:var(--bar-at);height:var(--bar);border-radius:var(--r-pill);display:grid;grid-template-columns:repeat(var(--n,4),1fr);padding:6px}
.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:var(--r-pill);color:var(--ink-faint);text-decoration:none;font-size:11px;font-weight:500}
.tabbar a svg{width:var(--mk-l);height:var(--mk-l)}
.tabbar a[aria-current="page"]{color:var(--ink);background:var(--lit-mark);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.tabbar a[aria-current="page"] svg{color:var(--accent)}
/* one round act after the bar (.tabbar-end, its act a .float of its own): the bar, and the drawer over it, narrow to
   leave it room */
.tabbar-end{position:absolute;z-index:var(--z-sticky);right:14px;bottom:var(--bar-at);width:var(--bar);height:var(--bar)}
.tabbar-end > :is(button,a){position:relative;width:100%;height:100%;border-radius:50%;display:grid;place-items:center;padding:0;color:var(--ink-faint);font:inherit}
:is(.tabbar,.drawer):has(~ .tabbar-end){right:calc(14px + var(--bar) + var(--s2))}
/* narrowed, equal columns leave the longest word the least room: each column is its word plus an equal share of what
   is left, so every word has the same room either side */
.tabbar:has(~ .tabbar-end){grid-template-columns:repeat(var(--n,4),auto)}
/* under 240px of bar (226px inside its edge and padding) not even that leaves a word room: the tabs are their icons,
   the words kept for a screen reader */
.tabbar{container:tabbar / inline-size}
@container tabbar (max-width:225.98px){
  .tabbar .tab-word{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
.fade-under{position:absolute;z-index:1;left:0;right:0;bottom:0;height:130px;pointer-events:none;background:linear-gradient(transparent,color-mix(in srgb,var(--ground) 90%,transparent) 60%)}
.rail{display:flex;flex-direction:column;gap:6px;width:var(--rail-wide);padding:16px 12px;overflow:hidden;border-right:1px solid var(--glass-edge);background:color-mix(in srgb,var(--ground) 35%,transparent);backdrop-filter:blur(var(--blur));transition:width var(--m-layer,240ms) var(--ease-move,ease)}
/* the mark stands on its own, in ink and large: no tile; its centre sits on the icons' axis (36px in) */
.rail .brand{display:flex;align-items:center;gap:var(--s2);height:48px;padding:0 4px;margin-bottom:14px;font-size:15px;font-weight:600;white-space:nowrap}
.rail .brand i{width:40px;height:40px;flex:none;display:grid;place-items:center;color:var(--ink)}
.rail .brand i .hl-mark{font-size:40px}
.rail a{display:flex;align-items:center;gap:12px;width:100%;height:48px;padding:0 13px;overflow:hidden;white-space:nowrap;border-radius:var(--r-pill);color:var(--ink-quiet);text-decoration:none;font-weight:500;transition:width var(--m-layer,240ms) var(--ease-move,ease)}
.rail a svg{width:var(--mk-l);height:var(--mk-l);flex:none}
.rail a[aria-current="page"]{color:var(--ink);background:var(--lit-left);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.rail a[aria-current="page"] svg{color:var(--accent)}
.rail .status{padding-left:20px;white-space:nowrap}
.rail .status i{flex:none}
/* Collapsed: the same rail cut narrower. Every icon keeps its place on one axis (36px in), each pill shrinks to its own height and becomes a circle; the words only fade, so nothing changes axis and the collapse is one width transition. */
.rail :is(.brand,a:not(.account)) > span:not(.timer){transition:opacity var(--m-state,160ms)}
.rail.icons{width:var(--rail)}
.rail.icons a{width:48px}
.rail.icons :is(.brand,a:not(.account)) > span:not(.timer){opacity:0}
.rail.icons .status{color:transparent}
.rail .timer{width:22px;height:22px;flex:none;--w:3px}
/* the panes fill the frame's height and each scrolls on its own, so the line between them runs top to bottom */
.panes{display:grid;grid-template-columns:var(--pane-list) minmax(0,1fr);height:100%;min-height:0}
.panes > * + *{border-left:1px solid var(--glass-edge)}
/* blocks side by side in a pane: two columns while the pane holds them, one under the other when it does not - the pane's width decides, never the window's */
.pane-cols{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;align-items:start}
@container (max-width:680px){.pane-cols{grid-template-columns:minmax(0,1fr)}}

/* ================= TRAINING DOMAIN ================= */
/* a routine's letter in its plan's tone; hollow = planned, filled = done */
.rt{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:var(--r-inner);font-size:13px;font-weight:600;flex:none;
  background:color-mix(in oklch,var(--tone) 22%,transparent);box-shadow:inset 0 0 0 1px color-mix(in oklch,var(--tone) 60%,transparent);color:var(--ink)}
.rt.hollow{background:none;box-shadow:inset 0 0 0 1.5px var(--tone)}
.rt.off{background:var(--sink);box-shadow:none;color:var(--ink-quiet)}
/* a lighter training is amber - ring, letter and hatch - whichever plan it belongs to, so it reads at a glance at any size */
.rt.light:not(.off){color:var(--accent-2);box-shadow:inset 0 0 0 1.5px var(--accent-2);background-image:var(--hatch-deload)}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--tone);flex:none}
.dot.hollow{background:none;box-shadow:inset 0 0 0 1.5px var(--tone)}
.dot.free{background:var(--ink-quiet)}

/* ================= HEKSLOG ================= */
/* ---- week strip: seven days; a stage's start and end only, as a frame in the plan's tone fading toward the stage's inside ---- */
.week{position:relative;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--gap,5px)}
.day{position:relative;z-index:1;height:var(--day-h);border-radius:var(--r-cell);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid transparent}
.day .w{font-size:11px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.04em}
.day .n{font-size:16px;font-weight:500;line-height:1;color:var(--ink-quiet)}
.day .ds{display:flex;gap:3px;height:7px}
.day .ds .dot{width:7px;height:7px}
.day .ok{position:absolute;top:-4px;right:-3px;width:16px;height:16px;border-radius:50%;display:grid;place-items:center;color:var(--kept);background:color-mix(in srgb,var(--kept) 22%,var(--ground));box-shadow:inset 0 0 0 1.5px var(--kept-edge),0 0 0 2px var(--ground)}
.day .ok svg{width:9px;height:9px;stroke-width:4}
/* begun, not done: the same check, with no green in it at all */
.day .ok.begun{color:var(--ink-faint);background:color-mix(in srgb,var(--ink) 8%,var(--ground));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink-faint) 70%,transparent),0 0 0 2px var(--ground)}
/* the read day's highlight is a layer of its own, so it can arrive on the spring without the figures:
   it springs in on the day read, and leaves the day it was on the way it came, without a bounce */
.day::before{content:"";position:absolute;inset:-1px;z-index:-1;border-radius:inherit;pointer-events:none;border:1px solid var(--accent-edge);background:linear-gradient(160deg,var(--accent-tint),color-mix(in srgb,var(--aurora-sea) 30%,transparent));box-shadow:var(--glow);opacity:0;transform:scale(.8);transition:opacity var(--m-state) var(--ease-in),transform var(--m-state) var(--ease-in)}
.day.sel::before{opacity:1;transform:none;transition:opacity var(--m-tap) var(--ease-out),transform var(--m-spring) var(--ease-spring)}
.day.sel.stripes{background-image:var(--hatch-quiet)}
/* every day but today wears its highlight in amber, as `dziś`'s way back says it - a property of the day,
   not of being read, so the highlight leaves in the colour it arrived in */
.day.off-today::before{border-color:var(--accent-2-edge);background:linear-gradient(160deg,var(--accent-2-tint),color-mix(in srgb,var(--aurora-warm) 30%,transparent));box-shadow:var(--glow-2)}
@media (prefers-reduced-motion: reduce){.day::before,.day.sel::before{transition:opacity var(--m-tap) linear}}
.day.sel .n,.day.sel .w{color:var(--ink)}
/* today, while another day is read: a dashed ring in the ink */
.day.today:not(.sel){border:1px dashed color-mix(in srgb,var(--ink) 70%,transparent)}
/* a stage's frame stands --out outside its days, its corner concentric with theirs */
.band{--out:3px;position:absolute;top:calc(-1 * var(--out));bottom:calc(-1 * var(--out));z-index:0;pointer-events:none;border-radius:calc(var(--r-cell) + var(--out));
  left:calc((100% - 6*var(--gap,5px))/7*(var(--c) - 1) + var(--gap,5px)*(var(--c) - 1) - var(--out));
  width:calc((100% - 6*var(--gap,5px))/7*var(--n) + var(--gap,5px)*(var(--n) - 1) + 2 * var(--out));
}
/* the frame is a ring cut out of a gradient, with no edge on the open side: it fades to nothing, no last pixel left standing */
.band.start{margin-left:2px}
.band.start{border-top-right-radius:0;border-bottom-right-radius:0;--to-open:90deg;background:linear-gradient(90deg,color-mix(in oklch,var(--tone) 8%,transparent),transparent)}
.band.end{margin-left:-2px}
.band.end{border-top-left-radius:0;border-bottom-left-radius:0;--to-open:270deg;background:linear-gradient(270deg,color-mix(in oklch,var(--tone) 8%,transparent),transparent)}
.band::before{content:'';position:absolute;inset:0;border-radius:inherit;border:1.5px solid transparent;
  background:linear-gradient(var(--to-open,90deg),color-mix(in oklch,var(--tone) 40%,transparent) 20%,transparent) border-box;
  -webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
          mask:linear-gradient(#000 0 0) padding-box exclude,linear-gradient(#000 0 0)}
.band.start::before{border-right-width:0}
.band.end::before{border-left-width:0}

/* ---- training card ---- */
.tcard{padding:12px 6px 12px 12px;display:flex;align-items:center;gap:12px}
.tcard .t{flex:1;min-width:0}
.tcard .tm{text-align:right;font-size:13px}
.tcard .tm span{display:block;font-size:11px;color:var(--ink-quiet)}
.tcard .tm{min-width:72px}
.tcard .tm .bar{width:72px;margin:6px 0 0 auto}
/* a narrow card gives its line the whole width: how far the training is goes under it, the count beside a bar as wide as the line */
.tcard{flex-wrap:wrap;container-type:inline-size}
@container (max-width:380px){
  .tcard .tm{order:1;flex-basis:100%;display:flex;align-items:center;gap:8px;min-width:0;margin:-4px 6px 0 42px;text-align:left}
  .tcard .tm span{display:inline;white-space:nowrap}
  .tcard .tm .bar{flex:1;width:auto;margin:0}
}

/* ---- exercise path: one axis through the nodes; lit up to where the person is ---- */
.path{position:relative;display:flex;flex-direction:column;gap:var(--path-gap);padding-left:var(--path-in);--path-gap:8px;--node-left:calc(-1 * var(--path-in));--node-top:10px;--open-pad:12px;--open-edge:1px;--sets-top:10px}
/* The axis is drawn in pieces, one from each node down to the next, running from the colour of one node to the colour of the next: green (done), blue (where you are), track (ahead). */
.path .step::before{content:'';position:absolute;left:calc(var(--node-left) + var(--node) / 2 - 1px);top:calc(var(--node-top) + var(--node) / 2);width:2px;height:calc(100% + var(--path-gap));border-radius:1px;background:linear-gradient(var(--from),var(--to))}
.path .step{--from:var(--axis-track);--to:var(--axis-track)}
.path .step:has(> .node.done){--from:var(--axis-kept)}
.path .step:has(> .node.ring.begun:not(.done)){--from:var(--accent)}
.path .step:has(+ .step > .node.done){--to:var(--axis-kept)}
.path .step:has(+ .step > .node.ring.begun:not(.done)){--to:var(--accent)}
/* an exercise begun and open draws its ring in green, and its node gives the axis that green on both its sides */
.path .step:has(> .ex-fold > .open):has(> .node.ring.begun:not(.done)){--from:var(--axis-kept)}
.path .step:has(+ .step > .ex-fold > .open):has(+ .step > .node.ring.begun:not(.done)){--to:var(--axis-kept)}
.path .step:last-child::before{content:none}
/* the open exercise: the step's piece runs as track to the next node, and what is lit is drawn over it - by the head, from the node
   down to the first set's mark, and by the sets, from mark to mark. The head is the one part whose height follows its content (a name
   on two lines), so its piece is measured off its own box: the rest of the way is the set rows' fixed geometry. It starts at the
   node's foot - drawn after the node, it would cross it - and the last exercise's axis ends on its last set's mark */
.path .step:has(.sets > .set)::before{background:var(--axis-track)}
.path .step:has(.sets > .set) .open > :first-child{position:relative}
.path .step:has(.sets > .set) .open > :first-child::before{content:'';position:absolute;width:2px;border-radius:1px;
  left:calc(var(--node-left) + var(--node) / 2 - var(--open-edge) - var(--open-pad) - 1px);
  top:calc(var(--node-top) + var(--node) - var(--open-edge) - var(--open-pad));
  height:calc(100% - var(--node-top) - var(--node) + var(--open-edge) + var(--open-pad) + var(--sets-top) + var(--set-row) / 2);
  background:linear-gradient(var(--from),var(--first,var(--axis-track)))}
.path .step:last-child:has(.sets > .set)::before{content:none}
.path .step:last-child .sets .set:last-child::before{content:none}
.path .step:has(.sets > .set:first-child.done){--first:var(--axis-kept)}
.path .step:has(.sets > .set:first-child.now){--first:var(--accent)}
.path .step{position:relative}
.path .node{position:absolute;left:var(--node-left);top:var(--node-top);width:var(--node);height:var(--node);border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:600;color:var(--ink-quiet);box-shadow:inset 0 0 0 2px var(--track)}
.path .node{background:var(--well)}
.path .node.done{color:var(--kept);background:color-mix(in srgb,var(--kept) 18%,var(--well));box-shadow:inset 0 0 0 2px var(--axis-kept)}
.path .node.done svg{width:46%;height:46%;stroke-width:2.6}
.path .node.ring:not(.done){box-shadow:none;color:var(--ink)} /* the well under a ring on the path hides the path line, nothing else; a done ring is the done node */
/* a ring on the path is drawn as thin as the nodes around it; the exercise open counts its sets done in the green of the axis and the done nodes */
.path .node.ring{--w:2px}
.path .step:has(> .ex-fold > .open) > .node.ring{--from:var(--axis-kept);--to:var(--axis-kept)}
.path .node.together{box-shadow:none;background:var(--well);outline:2px dashed color-mix(in srgb,var(--together) 60%,transparent);outline-offset:-4px}
.path .ex{padding:11px 6px 11px 14px;display:flex;align-items:center;gap:10px}
/* the 6px end leaves room for a trailing icon button's own inset; a row that ends in text or a bar stands as far from its edge as it starts */
.path .ex:not(:has(> :is(button,.ib):last-child)){padding-right:14px}
.path .ex .t{flex:1;min-width:0}
.path .ex .t b{display:block;font-size:15px;font-weight:500;line-height:1.25}
.path .ex.done .t b{color:var(--ink-quiet)}
.path .open{padding:var(--open-pad);border-width:var(--open-edge)}
.path .open .t b{font-weight:600}

/* ---- set row: the set's state sits on the path axis (--ax = axis centre from the row's left edge: the node's centre, less the
   open card's padding and edge the row stands in) ---- */
.sets{display:flex;flex-direction:column;gap:var(--sets-gap);margin-top:var(--sets-top,10px);--sets-gap:5px}
.set{--ax:calc(var(--node-left,calc(-1 * var(--path-in))) + var(--node) / 2 - var(--open-pad,12px) - var(--open-edge,1px));position:relative;display:grid;grid-template-columns:28px 1fr 1fr;gap:8px;align-items:center;height:var(--set-row);padding:0 10px 0 var(--pad-row);border-radius:var(--r-inner);background:var(--field)}
.set .n{font-size:12px;color:var(--ink-faint);font-weight:600}
/* each figure stands in the middle of its column, as the boxes of the set being entered hold theirs, so a column reads down the rows */
.set .v{font-weight:600;font-size:16px;text-align:center}
.set .v small{color:var(--ink-quiet);font-weight:400;font-size:12px;margin-left:2px}
/* the set's piece of the axis runs to the next set, from its node's colour to the next one's; the last fades into the track the step draws on,
   down past the open card's foot and the gap to the next node's top. Nothing clips the open card: a clip would cut what hangs off it (the entry
   popover) and stop its blur from reaching what lies behind */
.sets .set{--from:var(--axis-track);--to:var(--axis-track)}
.sets .set.done{--from:var(--axis-kept)}
.sets .set.now{--from:var(--accent)}
.sets .set:has(+ .set.done){--to:var(--axis-kept)}
.sets .set:has(+ .set.now){--to:var(--accent)}
.sets .set::before{content:'';position:absolute;left:calc(var(--ax) - 1px);top:50%;width:2px;height:calc(50% + var(--sets-gap) + var(--set-row) / 2);background:linear-gradient(var(--from),var(--to))}
.sets .set:last-child::before{height:calc(var(--set-row) / 2 + var(--open-pad,12px) + var(--open-edge,1px) + var(--path-gap,8px) + var(--node-top,10px) + 3px);background:linear-gradient(var(--from),var(--axis-track))}
.set .axis{position:absolute;left:var(--ax);top:50%;transform:translate(-50%,-50%);width:14px;height:14px;border-radius:50%;display:grid;place-items:center;background:var(--well);box-shadow:inset 0 0 0 1.5px var(--ink-faint);color:transparent}
.set .axis svg{width:12px;height:12px;stroke-width:3.2}
.set.done .axis{width:22px;height:22px;background:color-mix(in srgb,var(--kept) 18%,var(--well));color:var(--kept);box-shadow:inset 0 0 0 1.5px var(--kept-edge),0 0 0 3px var(--well)}
.set.warm{background:none;border:1px dashed var(--glass-edge)}
.set.warm .v{color:var(--ink-quiet);font-weight:500}
.set.next .v{color:var(--ink-faint);font-weight:500}
/* a set not open yet stands on no ground of its own, so what can be written is told from what cannot at a glance */
.set.next{background:none}
/* the set being entered stands out by its ground, never by its height: a row that grew as it became the one entered would push
   every row below it */
.set.now{background:var(--lit-left),var(--field)}
.set.now .n{color:var(--accent)}
/* ---- number box (NumberBox): the one box a number is written in - a set's field, a warm-up's, a measurement, any count.
   The figure and its unit are one group in the middle, the input as wide as what it shows (--d), so the unit never moves;
   last time's figure stands dotted (.was) and quiet (.pre) until a key; .whole and .caret say what the next key does ---- */
.nbox{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;height:40px;padding:0 10px;border-radius:var(--r-inner);background:var(--field-in);box-shadow:inset 0 0 0 1px var(--field-in-edge);cursor:text}
.nbox:has(input.focus),.nbox:has(input:focus-visible){outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.nbox input{flex:1;min-width:0;width:100%;height:100%;padding:0;border:0;background-color:transparent;color:inherit;text-align:center;font:600 16px/1 var(--font-sans);cursor:text;outline:0}
.nbox:has(.unit) input{flex:none;width:calc(var(--d,4) * 1ch + 2px)}
.nbox .unit{flex:none;font-size:12px;line-height:1;color:var(--ink-quiet);position:relative;top:1px}
.nbox input::placeholder{color:var(--ink-faint)}
/* the field the next key writes into says what that key will do: the figure it replaces is drawn selected in the
   accent (.whole - under a precise pointer it is selected for real too, and the browser's own highlight steps aside),
   and while a keypad's field, which has no caret, is typed into, a caret blinks after its figure (.caret) */
.nbox input::selection{background:color-mix(in srgb,var(--accent) 40%,transparent);color:var(--ink)}
.nbox input.whole::selection{background:transparent}
.nbox input.pre::selection{background:transparent}
/* the field is as wide as its figure, so the selection is the field's own ground: a rounded tint as tall as the
   figure and a little more, reaching 3px past it on either side by two shadows, so neither the figure nor its unit moves -
   which holds while the figure stands where it stood unmarked, in the middle of its field */
.nbox input.whole{height:26px;color:var(--ink);background:var(--pick);border-radius:var(--r-mark);box-shadow:-3px 0 0 var(--pick),3px 0 0 var(--pick);--pick:color-mix(in srgb,var(--accent) 32%,transparent)}
/* the caret stands in the gap between the figure and its unit, so the figure does not move to make room for it */
.nbox:has(input.caret) .unit::before{content:"";position:absolute;left:-3px;top:50%;width:2px;height:18px;translate:0 -50%;border-radius:1px;background:var(--accent);animation:set-caret 1s steps(1) infinite}
@keyframes set-caret{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.nbox:has(input.caret) .unit::before{animation:none}}
/* now: a state, not a button - the set counts as done when its reps are entered, and only then does the next one open */
.set.now .axis{width:22px;height:22px;box-shadow:inset 0 0 0 2px var(--accent),0 0 0 3px var(--well)}
/* RIR, as the person's setting asks it: off (nothing anywhere, the exercise's line drops its RIR), the last set (.rir-band under the sets) or each set: then it is part of the set, entered with the reps on the keypad and shown beside them (.rir). Reps or RIR - either one alone makes the set. */
.set .rir{margin-left:8px;font-size:12px;font-weight:600;color:var(--ink-quiet);letter-spacing:.02em}
.set.next .rir{color:var(--ink-faint);font-weight:500}
.nbox.pair .rir{flex:none;margin:0 0 0 4px}
.rir-band{display:flex;align-items:center;gap:6px;margin-top:8px;padding:6px 6px 6px 12px;border-radius:var(--r-inner);background:var(--sink);transition:background-color var(--m-state,160ms),box-shadow var(--m-state,160ms)}
.rir-band .label{flex:none;width:34px;color:var(--ink-faint)}
/* the reserve asked once opens with the exercise's last set, and stands as the sets not open yet do until then */
.rir-band.locked{background:none;box-shadow:none}
.rir-band.locked .chip{opacity:var(--o-off)}
/* the reserve asked once is a stop of its own on the keypad: the band it answers is drawn as a field it types into is, and the keypad holds its chips and the key that moves on across the row */
.rir-band.focus{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.keypad .grid.band-keys button.next{grid-column:1 / -1}
.rir-band .chip{flex:1;min-width:0;height:var(--tap-tight);padding:0}
@media (pointer:coarse){ .rir-band .chip{height:var(--tap)} }
.rir-keys{display:none;margin:8px 4px 0}
.rir-band:has(.chip:focus-visible) + .rir-keys{display:flex}
/* THE END OF A TRAINING under its path: what is still missing, and the summary as the act. */
.training-end{display:flex;flex-direction:column;gap:var(--gap-row)}
.training-end .label{margin:0 4px}
.training-end > .btn{width:100%}
/* the beat before a complete exercise folds: what opens next, and a line draining over the beat; a press goes there now */
.fold-beat{position:relative;display:flex;align-items:center;gap:6px;width:100%;margin-top:8px;padding:9px 10px 11px 12px;border-radius:var(--r-inner);background:var(--sink);font-size:13px;color:var(--ink-quiet);text-align:left;overflow:hidden}
.fold-beat span{flex:1;min-width:0}
.fold-beat svg{flex:none;width:16px;height:16px}
.fold-beat i{position:absolute;left:0;bottom:0;width:100%;height:2px;background:var(--accent);transform-origin:left;animation:fold-beat var(--beat,2.5s) linear forwards}
@keyframes fold-beat{to{transform:scaleX(0)}}
@media (prefers-reduced-motion:reduce){.fold-beat i{animation:none;opacity:.5}}
/* what is still to fill stands in amber: the reserve owed, the keypad's reserve still to choose, a training's missing lines */
.rir-band.owed{background:var(--accent-2-tint);box-shadow:inset 0 0 0 1px var(--accent-2-edge)}
.rir-band.owed .label{color:var(--accent-2)}
.rir-band.flash{animation:rir-flash var(--m-layer,240ms) var(--ease-out,ease) 2}
@keyframes rir-flash{50%{box-shadow:inset 0 0 0 1px var(--accent-2),var(--glow)}}
@media (prefers-reduced-motion:reduce){.rir-band{transition:none}.rir-band.flash{animation:none}}

/* ---- set keypad (touch only): suggestions for the focused field, digits, step modifiers; replaces the tab bar while open ---- */
.keypad{position:absolute;left:0;right:0;bottom:0;z-index:var(--z-sheet);padding:8px 10px 22px;border-radius:var(--r-sheet) var(--r-sheet) 0 0;background:var(--sheet-face);backdrop-filter:blur(var(--blur));box-shadow:var(--sheet-light),var(--shadow-sheet)}
/* ---- choice menu: a setting changed where it acts - a quiet trigger naming the setting by its icon (.choice-menu),
   opening a short list of its answers, the one in force checked (.choice-list). The list stands at the page's top level,
   fixed by its trigger (right edge aligned, below it or, .up, above it): inside a layer that blurs its backdrop - the
   keypad, a popover - its own blur would see only that layer and the page would show through sharp. The float's tint
   laid over the ground, so it is opaque: the figures behind it never read through its words ---- */
.choice-menu{display:inline-flex}
.choice-menu .cm-at{display:inline-flex;align-items:center;gap:1px;height:32px;padding:0 6px 0 9px;border-radius:var(--r-pill);background:var(--sink);color:var(--ink-quiet)}
.choice-menu .cm-at svg{width:18px;height:18px}
.choice-menu .cm-at .cv{width:14px;height:14px}
.choice-menu .cm-at[aria-expanded="true"]{color:var(--ink);box-shadow:inset 0 0 0 1px var(--accent-edge)}
/* ---- a time on a drum (TimeDrum): a glass popover by its row, two columns turned under a band in the accent - the band is
   the pick; a column shows five figures and fades towards its ends; snaps to a figure as it comes to rest ---- */
.drum{position:fixed;z-index:var(--z-tip);width:200px;padding:10px;border-radius:var(--r-group);background:color-mix(in srgb,var(--float) 60%,transparent);border:1px solid var(--glass-edge);-webkit-backdrop-filter:blur(var(--blur)) saturate(1.4);backdrop-filter:blur(var(--blur)) saturate(1.4);box-shadow:var(--lift-float);color:var(--ink);font-family:var(--font-sans);--drum-row:36px}
.drum,.drum *{box-sizing:border-box}
/* drawn outside a screen, so the screen's resets are given here: no browser frame on its buttons */
:where(.drum) button{appearance:none;margin:0;border:0;font:inherit;color:inherit;cursor:pointer}
.drum .cols{position:relative;display:flex;align-items:center;gap:4px}
.drum .cols::before{content:'';position:absolute;left:0;right:0;top:calc(50% - var(--drum-row) / 2);height:var(--drum-row);border-radius:var(--r-inner);background:var(--accent-tint);box-shadow:inset 0 0 0 1px var(--accent-edge);pointer-events:none}
.drum .c{position:relative;flex:1;height:calc(var(--drum-row) * 5);overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;padding-block:calc(var(--drum-row) * 2);border-radius:var(--r-inner);outline:0;
  -webkit-mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent);mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent)}
.drum .c::-webkit-scrollbar{display:none}
.drum .c:focus-visible{box-shadow:inset 0 0 0 var(--ring) var(--focus)}
.drum .c button{appearance:none;display:grid;place-items:center;width:100%;height:var(--drum-row);margin:0;padding:0;border:0;background:none;scroll-snap-align:center;font:500 17px/1 var(--font-sans);font-variant-numeric:tabular-nums;color:var(--ink-quiet);cursor:pointer}
.drum .c button.on{color:var(--ink);font-weight:600}
.drum .sep{position:relative;font-weight:600;color:var(--ink-quiet)}
.drum .ft{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.choice-list{position:fixed;z-index:var(--z-tip);width:max-content;min-width:230px;max-width:290px;padding:6px;border-radius:var(--r-group);background:linear-gradient(var(--float),var(--float)),var(--ground);border:1px solid var(--glass-edge);box-shadow:var(--lift-float);transform-origin:right top;font-family:var(--font-sans);font-size:14px;color:var(--ink)}
.choice-list.up{transform-origin:right bottom}
.choice-list .cm-h{padding:6px 10px 4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}
/* outside the screen nothing has reset its buttons, so the list does */
.choice-list button{appearance:none;border:0;margin:0;background:none;font:inherit;cursor:pointer;display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:6px 10px;border-radius:var(--r-inner);text-align:left;color:var(--ink)}
.choice-list button .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.choice-list button .meta{font-size:12px;color:var(--ink-quiet)}
.choice-list button[aria-checked="true"]{background:var(--lit-left)}
.choice-list button svg{flex:none;width:18px;height:18px;color:var(--accent)}
@media (hover:hover) and (pointer:fine){:where(html:not(.ag-picking)) .choice-list button:hover{box-shadow:inset 0 0 0 999px var(--lift)}}

/* dragged by its head, the keypad follows the pointer and settles back on the layer's curve once let go (.dragging while held) */
.keypad{transition:transform var(--m-layer,240ms) var(--ease-out,ease)}
/* the number pad stands over a sheet, which stands on it: the sheet's foot moves with the pad's room (`.app .sheet`'s transition) */
.keypad.numpad{z-index:calc(var(--z-sheet) + 1);translate:0 var(--sheet-dy,0px);transition:transform var(--m-layer,240ms) var(--ease-out,ease),translate var(--m-layer,240ms) var(--ease-out,ease)}
.app:has(.sheet.dragging) .keypad.numpad{transition:none}
/* a sheet stands at the end of its frame, after the pad: the pad's layer must outrank the frame's own rule for every
   keypad (.app .keypad, app.css), or the sheet would cover the pad it stands on */
.app .keypad.numpad{z-index:calc(var(--z-sheet) + 1)}
/* under a drawer the pad casts only a light shadow on the drawer behind it */
.app:has(.sheet.pads:not(.dialog)) .keypad.numpad{box-shadow:var(--sheet-light),0 -6px 20px rgba(0,0,0,.22)}
:is([data-theme="light"],[data-theme="white"]) .app:has(.sheet.pads:not(.dialog)) .keypad.numpad{box-shadow:var(--sheet-light),0 -4px 16px rgba(14,27,40,.08)}
/* and runs down behind it: the pad's height is room under what the sheet holds */
.sheet{padding-bottom:calc(28px + var(--numpad-h,0px))}
.keypad.dragging{transition:none}
@media (prefers-reduced-motion:reduce){.keypad,.keypad.numpad{transition:none}}
/* the pad takes the focus only to be read out as it opens; it is no control to ring */
.keypad:focus{outline:0}
/* a pad's or a drawer's handle is pressed and swiped as well as seen: a target far wider and taller than the bar it draws */
:is(.keypad,.sheet) .grab{position:relative;cursor:grab}
/* the pad's own way out where it floats as a card: no edge to be dragged off, so the head carries a close like a popup's */
.keypad .shut{display:none}
.app.rail-w .keypad .grab{display:none}
.app.rail-w .keypad .shut{display:inline-grid}
.app .keypad.handed{z-index:calc(var(--z-sheet) + 1)}
/* the head is the keypad's own to drag: a pan on it left to the browser is a pull that reloads the page */
.keypad :is(.grab,.kh){touch-action:none}
:is(.keypad,.sheet) .grab::before{content:"";position:absolute;inset:-12px -40px}
.keypad .kh{display:flex;align-items:center;gap:10px;padding:2px 4px 8px 6px;font-size:13px;color:var(--ink-quiet)}
.keypad .kh .t{flex:1}
.keypad .kh b{color:var(--ink);font-weight:600}
/* suggestions for the focused field: as many as the app has, scrolled sideways; the last one is cut by the edge so the row reads as more */
.keypad .sg{display:flex;gap:6px;margin:0 -10px;padding:0 10px 8px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 10px;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
.keypad .sg::-webkit-scrollbar{display:none}
.keypad .sg :is(button,.move){flex:0 0 auto;min-width:calc((100% - 32px) / 3.35);padding:0 12px;white-space:nowrap;scroll-snap-align:start;height:48px;border-radius:var(--r-inner);background:var(--glass);border:1px solid var(--glass-edge);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:15px;font-weight:600}
.keypad .sg :is(button,.move) span{display:block;font-size:11px;font-weight:400;color:var(--ink-quiet)}
/* a move of the load with no figure: said in amber on no ground, nothing to take */
.keypad .sg .move{background:none;border-color:var(--accent-2-edge);color:var(--accent-2)}
.keypad .sg button.picked{box-shadow:inset 0 0 0 var(--ring) var(--focus)}
.keypad .sg button.on{border-color:var(--accent-edge);background:var(--lit-top)}
.keypad .rir{display:flex;align-items:center;gap:6px;padding:0 0 8px}
.keypad .rir .label{width:38px;padding-left:6px}
.keypad .rir .chip{flex:1;height:var(--tap);padding:0}
/* the reserve still to choose, once the figure beside it is written: the row is ringed in amber and breathes twice */
.keypad .rir{border-radius:var(--r-inner);transition:background-color var(--m-state,160ms),box-shadow var(--m-state,160ms)}
:is(.keypad,.entry-pop) .rir.cue{margin:0 -4px 8px;padding:4px;background:var(--accent-2-tint);box-shadow:inset 0 0 0 1px var(--accent-2-edge);animation:rir-flash var(--m-layer,240ms) var(--ease-out,ease) 2}
:is(.keypad,.entry-pop) .rir.cue .label{color:var(--accent-2)}
@media (prefers-reduced-motion:reduce){:is(.keypad,.entry-pop) .rir.cue{animation:none}}
/* the rest reaches the keypad as it does the screen whose foot it covers: in its last seconds a light warm glow rises from
   the foot, and once it is over the glow goes and the accent is amber (.over) */
.keypad{isolation:isolate}
.keypad::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background:radial-gradient(100% 70% at 50% 100%,var(--aurora-warm),transparent 72%);opacity:0;transition:opacity var(--m-dawn,1s) var(--ease-move,ease)}
.keypad.soon::before{opacity:.6}
@media (prefers-reduced-motion:reduce){.keypad::before{transition:none}}
/* digits, and one column of keys that know the field: its step up and down, delete; the last key moves on */
.keypad .grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--key);gap:6px}
.keypad .grid button{border-radius:var(--r-inner);background:var(--glass-strong);font-size:22px;font-weight:500}
.keypad .grid button.mod{background:var(--sink);font-size:17px;font-weight:600;font-variant-numeric:tabular-nums}
.keypad .grid button.fn{background:var(--sink);color:var(--ink-quiet)}
.keypad .grid button.next{grid-column:span 2;background:var(--sink);color:var(--ink-quiet)}
.keypad .grid svg{width:22px;height:22px;margin:auto}
.keypad .grid button[disabled]{visibility:hidden}

/* ---- rest: a bar and a state of the app, never a screen of its own ---- */
/* the fill drains on its own between the moments the product redraws the time (a second apart): a registered number the bar eases
   to linearly over that second, so the edge of the fill never steps */
@property --rest-fill{syntax:'<number>';inherits:false;initial-value:60}
.rest{position:relative;z-index:var(--z-sticky);height:var(--bar);border-radius:var(--r-pill);display:flex;align-items:center;gap:10px;padding:0 8px 0 10px;
  --rest-fill:var(--p,60);transition:--rest-fill 1s linear;
  background:linear-gradient(90deg,var(--accent-tint),color-mix(in srgb,var(--accent) 28%,transparent) calc(var(--rest-fill) * 1%),transparent calc(var(--rest-fill) * 1%)),var(--float);
  border:1px solid var(--accent-edge);backdrop-filter:blur(var(--blur));box-shadow:var(--lift-float)}
.rest .t{flex:1;min-width:0;text-align:center}
.rest b{display:block;font-size:22px;font-weight:600;line-height:1}
.rest .t span{display:block;font-size:11px;color:var(--ink-quiet);margin-top:3px}
.rest .s{height:44px;min-width:46px;padding:0 8px;border-radius:var(--r-card);background:var(--glass);border:1px solid var(--glass-edge);background-clip:padding-box;font-size:13px;font-weight:500}
/* the bar's last act is an icon - skip while it runs, the next set once it is over - on a round key as tall as the bar's row */
.rest .k{flex:none;width:48px;height:48px;padding:0;display:grid;place-items:center;border-radius:var(--r-pill);background:var(--act-face);color:var(--on-act);box-shadow:inset 0 0 0 1px var(--act-rim)}
.rest .k svg{width:var(--mk-s);height:var(--mk-s);stroke-width:2.4}
.rest.done{box-shadow:var(--lift-float),var(--glow);background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 30%,transparent),var(--accent-tint)),var(--float)}
.rest.done b{color:var(--accent)}
/* once over, the line under the time is the signal's words, in ink rather than quiet */
.rest.done .t span{color:var(--ink)}
/* collapsed into the tab bar: the Trening tab becomes a ring with the time */
/* ---- the phone's foot: the tab bar, which never gives way, and behind it the drawer with what is under way, one thing
   at a time. The drawer has the bar's width and its foot is shaped as the bar's, so it runs down behind the whole bar and its
   outline meets the bar's; its row above the bar (--drawer tall) is where it speaks. The product slides it out from behind
   the bar and back. ---- */
.drawer{position:absolute;z-index:calc(var(--z-sticky) - 1);left:14px;right:14px;bottom:var(--bar-at);height:calc(var(--drawer) + var(--bar));
  border-radius:var(--r-sheet) var(--r-sheet) calc(var(--bar) / 2) calc(var(--bar) / 2);overflow:hidden;isolation:isolate;color:var(--ink);
  --tuck:0px}
/* the same on a wider screen, in the rest card's place (`rest-card` wide): a floating pill `bar` tall */
.now-card{height:var(--bar);border-radius:var(--r-pill);overflow:hidden;isolation:isolate;color:var(--ink)}
.now-card .under-way{height:100%}
/* the training under way in the drawer: its routine's mark, the exercise being worked with the coming set and that set
   last time, the time since the first set and the sets done of those asked */
.drw-tr{position:relative;display:flex;align-items:center;gap:10px;width:100%;height:100%;padding:0 16px 0 12px;text-align:left;color:var(--ink)}
.drw-tr .rt{flex:none}
.drw-tr .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.drw-tr .t b{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drw-tr .t span{font-size:12px;color:var(--ink-quiet);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drw-tr .m{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.drw-tr .m b{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.drw-tr .m span{font-size:12px;color:var(--ink-quiet)}
/* a sync in trouble in the drawer: what is wrong in the pending colour, how much waits on this phone, and the one act
   that helps where there is one (.k, a button or a link) */
.drw-sy{display:flex;align-items:center;gap:10px;width:100%;height:100%;padding:0 10px 0 14px;text-align:left;color:var(--ink)}
.drw-sy .ic{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:var(--pending);background:color-mix(in srgb,var(--pending) 16%,transparent)}
.drw-sy .ic svg{width:18px;height:18px}
.drw-sy .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.drw-sy .t b{font-size:14px;font-weight:600}
.drw-sy .t span{font-size:12px;color:var(--ink-quiet);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drw-sy .k{flex:none;display:inline-flex;align-items:center;height:44px;padding:0 16px;border-radius:var(--r-card);background:var(--act-face);color:var(--on-act);font-weight:600;text-decoration:none;box-shadow:inset 0 0 0 1px var(--act-rim)}
/* the trouble's close, after its act: on a tile the act takes its own row below, and the close stays by the words */
.drw-sy .x svg{width:18px;height:18px}
/* the rest in the drawer or the card: the holder's own row, its fill draining with the time */
:is(.drawer,.now-card,.rail-now) .rest{position:static;height:100%;gap:9px;padding:0 6px 0 8px;border:0;border-radius:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
.drawer .rest b{font-size:20px}
.drawer .rest .s{height:40px}
.drawer .rest .k{width:44px;height:44px}
:is(.drawer,.now-card,.rail-now) .rest:not(.done){background:linear-gradient(90deg,var(--accent-tint),color-mix(in srgb,var(--accent) 28%,transparent) calc(var(--rest-fill) * 1%),transparent calc(var(--rest-fill) * 1%))}
@media (prefers-reduced-motion:reduce){.rest{transition:none}}
:is(.drawer,.now-card,.rail-now) .rest.done{background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 34%,transparent),var(--accent-tint))}
:is(.drawer,.now-card,.rail-now):has(.rest.done){box-shadow:var(--lift-float),var(--glow)}
:is(.drawer,.now-card,.rail-now):has(.rest:not(.done)){border-color:var(--accent-edge)}
/* what the drawer holds runs down behind the bar, so its ground - the rest's fill - reaches the bar's rounded corners;
   it slides in and out masked at the bar's foot (--tuck, nought), so it never shows below the bar;
   what it says stands in the row above the bar */
.drawer .under-way{height:100%}
.drawer .under-way > *{padding-bottom:var(--bar)}
/* in a labelled rail, a tile in its free space above the account, one column wide: the rest's time over its three acts,
   the training's mark and exercise over its minutes and sets, a sync's word over its act. A group's surface, the rest's
   fill draining across the whole tile */
.rail-now{border-radius:var(--r-group);overflow:hidden;isolation:isolate;color:var(--ink);background:var(--glass);border:1px solid var(--glass-edge);background-clip:padding-box}
.rail-now .rest{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;height:auto;padding:12px}
.rail-now .rest .t{grid-column:1 / -1;padding-left:2px;text-align:start}
.rail-now .rest .s,.rail-now .rest .k{min-width:0;width:auto;height:40px;padding:0}
.rail-now .rest .k{width:40px;justify-self:center}
.rail-now .drw-tr{flex-wrap:wrap;row-gap:8px;padding:12px}
.rail-now .drw-tr .m{flex-basis:100%;flex-direction:row;justify-content:space-between;align-items:baseline}
.rail-now .drw-sy{flex-wrap:wrap;row-gap:10px;padding:12px}
.rail-now .drw-sy .k{flex-basis:100%;justify-content:center;width:auto;height:40px;padding:0 16px;color:var(--on-act);order:1}
/* a tab with something wrong behind it (a sync in trouble on Profil): a dot in the pending colour by its mark */
.tabbar a{position:relative}
.tab-dot{position:absolute;top:6px;left:calc(50% + 6px);width:8px;height:8px;border-radius:50%;background:var(--pending);box-shadow:0 0 0 2px var(--float)}
@media (prefers-reduced-motion:reduce){.rail,.rail a,.account.account,.account .t,.rail :is(.brand,a:not(.account)) > span:not(.timer){transition:none}}

/* ---- plan week grid: a row a week, the number inside it; a training day is its routine's mark in the plan's tone, a day off a dot and
   no cell - nothing is drawn as a field. The week being read is a lit row, its number in the accent; today's weekday is in the accent and
   today's day is ringed in it and glows ---- */
.wgrid{display:flex;flex-direction:column;gap:4px}
.wgrid .wk{display:grid;grid-template-columns:20px repeat(7,minmax(0,1fr));column-gap:2px;align-items:center;padding:0 12px}
.wgrid .wk.days{padding-bottom:6px}
.wgrid .wk.days span{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;text-align:center;color:var(--ink-faint)}
.wgrid .wk.days .now{color:var(--accent)}
.wgrid .wk.now{background:var(--accent-tint);border-radius:var(--r-inner)}
.wgrid .rl{height:var(--tap);display:flex;align-items:center;padding:0;font-size:13px;font-weight:600;color:var(--ink-quiet)}
.wgrid .wk.now .rl{color:var(--accent)}
.wgrid .c{height:var(--tap);display:grid;place-items:center;padding:0}
.wgrid .cell{width:36px;height:36px;display:grid;place-items:center;border-radius:var(--r-inner)}
.wgrid .c.now .cell{box-shadow:inset 0 0 0 var(--ring) var(--accent),var(--glow)}
.wgrid .off{width:4px;height:4px;border-radius:50%;background:var(--ink-faint);opacity:.5}

/* ---- set entry under a precise pointer: no keypad, the fields are typed on the keyboard; what the keypad adds besides digits rides in a popover on the set being entered ---- */
.set:is(.now,.edit):has(.entry-pop){position:relative}
.entry-pop{position:absolute;z-index:var(--z-pop);bottom:calc(100% + 10px);left:0;right:0;padding:12px;border-radius:var(--r-group);background:var(--float);border:1px solid var(--glass-edge);-webkit-backdrop-filter:blur(var(--blur));backdrop-filter:blur(var(--blur));box-shadow:var(--lift-float);
  transform-origin:var(--ar,30%) 100%}
/* it stands above the set being entered, so the sets after it stay in view; where there is no room above it (the first set at the top
   of what scrolls) it hangs below instead (.below) */
.entry-pop.below{bottom:auto;top:calc(100% + 10px);transform-origin:var(--ar,30%) 0}
/* its point stands at the focused field (--ar, set by the app from the field's centre) and slides when focus moves on */
.entry-pop::before{content:'';position:absolute;bottom:-7px;left:calc(var(--ar,30%) - 6px);width:12px;height:12px;rotate:45deg;background:var(--float);border-right:1px solid var(--glass-edge);border-bottom:1px solid var(--glass-edge);transition:left var(--m-layer,240ms) var(--ease-move,ease)}
.entry-pop.below::before{bottom:auto;top:-7px;border:0;border-left:1px solid var(--glass-edge);border-top:1px solid var(--glass-edge)}
.entry-pop .eh{display:flex;align-items:center;gap:8px;margin:0 2px 10px;font-size:13px;color:var(--ink-quiet)}
.entry-pop .eh b{color:var(--ink);font-weight:600}
.entry-pop .eh .st{margin-left:auto;display:flex;gap:4px}
.entry-pop .eh .st button{width:40px;height:26px;border-radius:var(--r-mark);background:var(--sink);font-size:12px;font-weight:600;color:var(--ink-quiet)}
/* suggestions read as a list: the value, then its whole description - a description is never cut; more of them make the list longer (up to six, then it scrolls) */
.entry-pop .sl{display:flex;flex-direction:column;gap:4px;max-height:calc(6 * 40px + 10px);overflow-y:auto}
.entry-pop .sl :is(button,.move){display:flex;align-items:baseline;gap:12px;min-height:38px;padding:8px 10px;border-radius:var(--r-inner);text-align:left;color:var(--ink-quiet);font-size:13px;line-height:1.3;background:var(--glass);box-shadow:inset 0 0 0 1px var(--glass-edge)}
.entry-pop .sl :is(button,.move) b{flex:none;min-width:40px;color:var(--ink);font-size:15px;font-weight:600}
.entry-pop .sl button.on{background:var(--lit-left);box-shadow:inset 0 0 0 1px var(--accent-edge);color:var(--ink)}
.entry-pop .sl .move{background:none;box-shadow:inset 0 0 0 1px var(--accent-2-edge)}
.entry-pop .sl .move b{color:var(--accent-2)}
.entry-pop .sl :is(button,.move).picked{color:var(--ink);box-shadow:inset 0 0 0 var(--ring) var(--focus)}
@media (hover:hover) and (pointer:fine){:where(html:not(.ag-picking)) .entry-pop .sl button:hover{box-shadow:inset 0 0 0 1px var(--glass-edge),inset 0 0 0 999px var(--lift)}:where(html:not(.ag-picking)) .entry-pop .sl button.on:hover{box-shadow:inset 0 0 0 1px var(--accent-edge),inset 0 0 0 999px var(--lift)}}
.entry-pop .rir{display:flex;align-items:center;gap:6px;margin-top:8px}
.entry-pop .rir .label{width:34px;padding-left:2px}
.entry-pop .rir .chip{flex:1;min-width:0;height:var(--tap-tight);padding:0}
.entry-pop .keys{margin:10px 2px 0}
/* the keys a legend names are a keyboard's: under a finger there is none to press them on */
@media (pointer:coarse){ .keys,.rir-band:has(.chip:focus-visible) + .rir-keys{display:none} }
@media (prefers-reduced-motion:reduce){.entry-pop::before{transition:none}}

/* the account at the rail's foot: a pill like the tabs above it - the person's initial, their name and the sync state in words; the state's dot sits on the initial so it stays when the rail collapses; it opens Konto */
.account.account{display:flex;align-items:center;gap:10px;width:100%;height:auto;min-height:48px;padding:7px 12px 7px 8px;border-radius:var(--r-pill);color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;transition:width var(--m-layer,240ms) var(--ease-move,ease)}
.account .av{position:relative;flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--ink) 9%,var(--well));box-shadow:inset 0 0 0 1px var(--glass-edge);font-size:14px;font-weight:600}
.account .av i{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:var(--ink-faint);box-shadow:0 0 0 2px var(--ground)}
.account.kept .av i{background:var(--kept)} .account.pending .av i{background:var(--pending)}
.account .t{min-width:0;display:flex;flex-direction:column;gap:1px;transition:opacity var(--m-state,160ms)}
.account .t b{font-size:14px;font-weight:500;overflow:hidden;text-overflow:clip}
.account .t span{font-size:12px;color:var(--ink-quiet)}
@media (hover:hover) and (pointer:fine){:where(html:not(.ag-picking)) .account.account:hover{box-shadow:inset 0 0 0 999px var(--lift)}}
.rail.icons .account.account{width:50px;padding:7px 8px}
.rail.icons .account .t{opacity:0}

/* the HeksLog mark (assets/brand/hekslog-mark.svg): a dumbbell through an open ring. Drawn in the current colour, so it takes the ink or the accent of where it stands; never smaller than 16px - below that the ring's strokes go under a pixel */
.hl-mark{display:inline-block;flex:none;width:1em;height:1em;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='172 172 693 693' fill='none'%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='76' y='76' width='884' height='884'%3E%3Crect x='386.094' y='800.936' width='585.658' height='223.95' transform='rotate(-45 386.094 800.936)' fill='%23fff'/%3E%3Crect x='77.5071' y='490.91' width='584.64' height='223.95' transform='rotate(-45 77.5071 490.91)' fill='%23fff'/%3E%3C/mask%3E%3Cg fill='%23fff'%3E%3Crect x='397.3' y='397.3' width='50.2' height='229.4' rx='9.5'/%3E%3Crect x='589.3' y='397.3' width='50.2' height='229.4' rx='9.5'/%3E%3Crect x='666.1' y='448.5' width='37.4' height='127' rx='9.5'/%3E%3Crect x='333.3' y='448.5' width='37.4' height='127' rx='9.5'/%3E%3Crect x='428' y='486' width='180' height='52' rx='1'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='51.2' stroke-linecap='round'%3E%3Cpath d='M204.8 832L294.4 742.4'/%3E%3Cpath d='M832 204.8L742.4 294.4'/%3E%3Cpath mask='url(%23m)' d='M356.078 765.417L529.403 813.358C571.056 824.879 615.687 813.113 646.246 782.554L782.554 646.246C813.113 615.687 824.879 571.056 813.358 529.403L765.195 355.272C753.949 314.617 722.183 282.851 681.528 271.605L505.202 222.835C464.728 211.64 421.347 222.417 390.817 251.25L256.698 377.918C224.715 408.125 211.825 453.41 223.106 495.932L272.081 680.532C283.014 721.739 314.989 754.052 356.078 765.417Z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='172 172 693 693' fill='none'%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='76' y='76' width='884' height='884'%3E%3Crect x='386.094' y='800.936' width='585.658' height='223.95' transform='rotate(-45 386.094 800.936)' fill='%23fff'/%3E%3Crect x='77.5071' y='490.91' width='584.64' height='223.95' transform='rotate(-45 77.5071 490.91)' fill='%23fff'/%3E%3C/mask%3E%3Cg fill='%23fff'%3E%3Crect x='397.3' y='397.3' width='50.2' height='229.4' rx='9.5'/%3E%3Crect x='589.3' y='397.3' width='50.2' height='229.4' rx='9.5'/%3E%3Crect x='666.1' y='448.5' width='37.4' height='127' rx='9.5'/%3E%3Crect x='333.3' y='448.5' width='37.4' height='127' rx='9.5'/%3E%3Crect x='428' y='486' width='180' height='52' rx='1'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='51.2' stroke-linecap='round'%3E%3Cpath d='M204.8 832L294.4 742.4'/%3E%3Cpath d='M832 204.8L742.4 294.4'/%3E%3Cpath mask='url(%23m)' d='M356.078 765.417L529.403 813.358C571.056 824.879 615.687 813.113 646.246 782.554L782.554 646.246C813.113 615.687 824.879 571.056 813.358 529.403L765.195 355.272C753.949 314.617 722.183 282.851 681.528 271.605L505.202 222.835C464.728 211.64 421.347 222.417 390.817 251.25L256.698 377.918C224.715 408.125 211.825 453.41 223.106 495.932L272.081 680.532C283.014 721.739 314.989 754.052 356.078 765.417Z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}

/* ================= HEKSLOG: THE FRAME AND THE SCREENS =================
   What the app's frame and screens draw of their own. A sheet beside a screen only lays out (log/scripts/checks/looks.mjs),
   so its look stands here, under the screen's own selectors. */

/* ---- the frame (laid out by log/app/src/styles/app.css) ---- */
html, body{background:var(--ground)}
/* the foot goes down off the screen as the set keypad comes up over it - quicker, on the leaving curve - and comes back up on the layer's curve */
.app > :is(.tabbar,.tabbar-end,.drawer){transition:translate var(--m-layer) var(--ease-out),opacity var(--m-layer) var(--ease-out)}
.app > .away{transition-duration:var(--m-state);transition-timing-function:var(--ease-in)}
@media (prefers-reduced-motion:reduce){ .app > :is(.tabbar,.tabbar-end,.drawer){transition:opacity var(--m-tap) linear} }
.app .back .t{font-size:13px;color:var(--ink-quiet)}
/* the way back is the whole row, its word included: the first control's target is stretched over the row (which the
   app's sheet places, position: relative), and the acts at its end stand above that */
.app .back > :is(a,button):first-child::after{content:'';position:absolute;inset:0}
.app .back > :is(a,button):not(:first-child){position:relative;z-index:1}
/* the stretched target holds still under the press: a transform on the control makes the control
   itself the containing block, so the target would snap back to the icon the moment it is pressed
   and the pointer would be off the link before the click landed - the inset darkening says it instead */
.app .back > :is(a,button):first-child:active{transform:none}
.app .sec h2{font-size:16px;font-weight:600;line-height:1.2}
.app .row .t-name{font-weight:500}
.app .row.sel .t-name{font-weight:600}
.app .note-line{font-size:13px;color:var(--ink-quiet)}
/* a row whose act takes something away, red as a whole */
.app .row.bad{color:var(--refused)}
/* the sheet comes up from the foot and leaves a little way down, fading; held by a finger, it is where the finger put it */
/* a frame drawn inside a page (a phone on the landing page) holds its layers: without layout containment its fixed
   scrim and sheet would stand on the window and show only where the window's foot crosses the picture */
.hk .screen{contain:layout}
/* A LAYER IN AN APP OR A PAGE: the scrim and the sheet are fixed to the window over everything the frame holds. With
   the number pad up the sheet runs down behind it (--under) and what it holds stands above the pad; it is a column
   whose rows scroll and whose head and acts stay */
:is(.app,.hk) .scrim{position:fixed;z-index:var(--z-sheet)}
:is(.app,.hk) .sheet{position:fixed;bottom:var(--under,0px);max-height:calc(100% - var(--s5) - var(--s4) - var(--under,0px));display:flex;flex-direction:column;overflow:hidden}
:is(.app,.hk) .sheet > .rows{overflow-y:auto;min-height:0;margin:0 calc(-1 * var(--s4));padding:0 var(--s4);display:flex;flex-direction:column;gap:var(--gap-head)}
/* a drawer of a size of its own (`size`): half its frame, or the whole of it - square, clear of the safe area at the
   top - its rows taking what the head and the acts leave. The frame's height is the window's above the keys (--under) */
:is(.app,.hk) .sheet.half:not(.dialog){height:calc((100% - var(--under,0px)) * .56)}
:is(.app,.hk) .sheet.full:not(.dialog){height:calc(100% - var(--under,0px));max-height:none;border-radius:0;padding-top:calc(10px + env(safe-area-inset-top,0px))}
:is(.app,.hk) .sheet:is(.half,.full):not(.dialog) > .rows{flex:1}
/* what a sheet holds stands a head's gap apart and owns no margin of its own; a label stands a block's gap under what
   is above it and a line over what it names, and a note a line under what it speaks of; an act keeps its own width */
:is(.app,.hk) .sheet > .rows > *{flex:none;margin-block:0}
:is(.app,.hk) .sheet > .rows > :is(.label,.lb2,.ph){margin-bottom:calc(var(--gap-line) - var(--gap-head))}
:is(.app,.hk) .sheet > .rows > :is(.label,.lb2,.ph):not(:first-child){margin-top:calc(var(--gap-block) - var(--gap-head))}
:is(.app,.hk) .sheet > .rows > * + p.meta:not(.lb2){margin-top:calc(var(--gap-line) - var(--gap-head))}
:is(.app,.hk) .sheet > .rows > :is(.btn,.chip){align-self:flex-start}
:is(.app,.hk) .layer{outline:0}
:is(.app,.hk) .sheet .hold{touch-action:none;cursor:grab}
:is(.app,.hk) .sheet .sheet-x{flex:none;margin:calc(-1 * var(--gap-line)) calc(-1 * var(--s2)) calc(-1 * var(--gap-line)) 0}
:is(.app,.hk) .sheet .sheet-x.alone{position:absolute;top:var(--s2);right:var(--s3);margin:0}
/* a phone's or a dialog's by the width of the frame the sheet stands in, not the window's (Sheet.svelte sets .dialog):
   a drawer is closed by a swipe, the ground behind it and Escape, its close button kept for a screen reader and drawn
   only while a keyboard has it */
:is(.app,.hk) .sheet:not(.dialog) .sheet-x:not(:focus-visible){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
:is(.app,.hk) .sheet.dialog .hold{cursor:auto;touch-action:auto}
/* words for a screen reader alone */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.app .sheet.arriving{animation:sheet-in var(--m-layer) var(--ease-out)}
.app .sheet.leaving{animation:sheet-out var(--m-state) var(--ease-in) forwards}
.app .sheet:not(.dragging){transition:transform var(--m-layer) var(--ease-out),padding-bottom var(--m-layer) var(--ease-out)}
/* from half to full and back it grows and shrinks on the layer's curve */
@media (prefers-reduced-motion:no-preference){
  .app .sheet:is(.half,.full):not(.dragging,.dialog){transition:transform var(--m-layer) var(--ease-out),padding-bottom var(--m-layer) var(--ease-out),
    height var(--m-layer) var(--ease-out),border-radius var(--m-layer) var(--ease-out),padding-top var(--m-layer) var(--ease-out)}
}
.app .scrim{animation:fade-in var(--m-layer) var(--ease-out)}
.app .scrim.leaving{animation:fade-out var(--m-state) var(--ease-in) forwards}
@keyframes sheet-in{from{transform:translateY(100%)}}
@keyframes sheet-out{to{transform:translateY(24px);opacity:0}}
@keyframes fade-in{from{opacity:0}}
@keyframes fade-out{to{opacity:0}}
/* in a frame from 600px wide the sheet stands in the middle as a dialog, without its grip */
.app .sheet.dialog{left:50%;right:auto;bottom:auto;top:50%;width:min(560px,90%);transform:translate(-50%,-50%);border-radius:var(--r-group);padding-top:18px}
.app .sheet.dialog.arriving{animation:fade-in var(--m-layer) var(--ease-out)}
/* a dialog holding fields the number pad writes stands in the pad's column, beside a rail too, and above the pad while it is up */
.app .sheet.dialog{padding-bottom:28px}
.app.rail-l .sheet.dialog.pads{left:calc(50% + var(--rail) / 2)}
/* it stays centred - in the room above the pad (`--below`) - so the pad coming up moves it up, on the layer's
   curve, rather than setting it on another edge */
.app .sheet.dialog{--above:0px;--below:0px;top:calc(50% + (var(--above) - var(--below)) / 2);transition:top var(--m-layer) var(--ease-out),max-height var(--m-layer) var(--ease-out)}
.app:has(> .numpad) .sheet.dialog.pads{--below:calc(var(--numpad-h,0px) + var(--s4,16px));max-height:calc(100% - var(--above) - var(--below) - 2 * var(--s4,16px))}
/* where the pad floats as a card it stands off the bottom edge by its own 24px, and the popup clears that too */
.app.rail-w:has(> .numpad) .sheet.dialog.pads{--below:calc(var(--numpad-h,0px) + 24px + var(--s4,16px))}
/* and under a popup the pad stands in the middle, below it, rather than in the rest card's corner */
.app.rail-w:has(.sheet.dialog.pads) .keypad.numpad{right:auto;left:calc(50% - var(--rest-card) / 2)}
.sheet.dialog .grab{display:none}
@media (prefers-reduced-motion:reduce){
  .app .sheet.arriving,.app .sheet.dialog.arriving,.app .sheet.leaving,.app .scrim,.app .scrim.leaving{animation:none}
  .app .sheet:not(.dragging){transition:none}
}

/* ---- what several screens share ---- */
/* a detail's head, in a pane beside its list: its mark, its name over its line, its acts */
.dh{display:flex;align-items:flex-start;gap:var(--gap-head)}
.dh .t{flex:1;min-width:0}
.dh .t p{margin-top:var(--gap-line)}
.dh .acts{display:flex;align-items:center;gap:var(--gap-row)}
/* a card of a detail: its head names it and holds its one act */
.box.glass{border-radius:var(--r-group);padding:var(--s4)}
.box .hh{display:flex;justify-content:space-between;align-items:baseline;gap:var(--gap-head);margin-bottom:var(--s3)}
.box > .label{display:block;margin-bottom:var(--s2)}
/* a label over a group of a sheet, and the line a group says when it holds nothing */
.lb2{margin:var(--pad-row) 2px var(--gap-line)}
.pad{padding:var(--pad-row)}
/* a row of RIR chips across its width, one value each */
.rir .chips{flex-wrap:nowrap}
.rir .chips .chip{flex:1;padding:0}
/* a kind of account: its name and price, what it holds - what it adds over the one before in ink - and its act; the one in force lit across it */
.kind.lit{border-color:var(--accent-edge);background:linear-gradient(160deg,var(--accent-tint),transparent 70%),var(--glass)}
.kind .pr{font-size:13px;color:var(--ink-quiet)}
.kind .pr b{color:var(--ink);font-weight:600}
.kind .btn{width:100%}
.hl{list-style:none;margin:var(--s3) 0 var(--pad-row);padding:0;display:flex;flex-direction:column;gap:var(--gap-line)}
.hl li{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.35;color:var(--ink-quiet)}
.hl li svg{width:16px;height:16px;flex:none;margin-top:1px;color:var(--ink-faint);stroke-width:2.4}
.hl li.x{color:var(--ink)}
.hl li.x svg{color:var(--accent)}

/* ---- Dziennik: the year's bars, the months, a row per training ---- */
.journal .yr{display:grid;grid-template-columns:repeat(12,1fr);gap:var(--gap-line);align-items:end;height:70px}
.journal .yr button{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:var(--gap-line);height:70px}
.journal .yr i{display:block;width:100%;border-radius:var(--r-mark);background:color-mix(in srgb,var(--accent) 42%,transparent)}
.journal .yr span{font-size:11px;color:var(--ink-faint)}
.journal .yr .on i{background:var(--act-face);box-shadow:inset 0 0 0 1px var(--act-rim),var(--glow)}
.journal .yr .on span{color:var(--accent)}
.journal .yr .fu i{background:none;box-shadow:inset 0 0 0 1px var(--track)}
.journal .month .mh p{font-size:12px;color:var(--ink-quiet);text-align:right}
.journal .jr{display:grid;grid-template-columns:40px 1fr auto;gap:10px;align-items:center;width:100%;padding:10px 4px;border-top:1px solid var(--hairline);text-align:left}
.journal .dt b{display:block;font-size:18px;font-weight:600;line-height:1}
.journal .dt span{font-size:11px;color:var(--ink-faint);text-transform:uppercase}
.journal .jr .nm{display:flex;align-items:center;gap:8px;font-weight:500}
.journal .jr .nm .rt{width:22px;height:22px;border-radius:calc(2 * var(--r-mark));font-size:11px}
.journal .jr .nm .rt svg{width:12px;height:12px}
.journal .jr .s{font-size:12px;color:var(--ink-quiet);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.journal .jr .nt{font-size:12px;color:var(--ink-quiet);margin-top:4px;font-style:italic}
.journal .jr .r b{font-weight:600;font-size:14px}
.journal .jr .st i{width:6px;height:6px;border-radius:50%;background:var(--track)}
.journal .jr .st i.on{background:var(--ink)}
.journal .ev{display:flex;align-items:center;gap:8px;margin:4px;padding:8px 10px;border-radius:var(--r-inner);background:var(--sink);color:var(--ink-quiet);font-size:12px;font-weight:500}
.journal .ev i{width:8px;height:8px;border-radius:50%;background:var(--tone,var(--accent));flex:none}

/* ---- Plan: the list of plans, a plan's page, its stages, a routine ---- */
.plan .orb{width:14px;height:14px;border-radius:50%;background:var(--tone);flex:none;margin:9px -4px 0 4px}
.plan .rule{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r-card)}
.plan .rule .t{flex:1;font-size:13px;line-height:1.35}
.plan .rule .ring{width:42px;height:42px;flex:none;font-size:11px;font-weight:600;--w:4px}
.plan .rule .na{font-size:12px;color:var(--ink-faint);text-align:right;max-width:90px}
.plan .rule .v{font-size:12px;font-weight:600}
.plan .rules.flat .rule{padding:12px 0;border-radius:0;border-top:1px solid var(--hairline)}
.plan .mr{display:grid;grid-template-columns:minmax(0,7.5em) 1fr 44px;gap:10px;align-items:center;min-height:30px;padding:3px 0;font-size:13px;line-height:1.25}
.plan .mr .b{height:8px;border-radius:var(--r-pill);background:var(--track);position:relative;container-type:inline-size}
.plan .mr .b i{position:absolute;left:0;top:0;bottom:0;border-radius:var(--r-pill);background:var(--prog);background-size:100cqw 100%}
.plan .mr .b em{position:absolute;top:-3px;bottom:-3px;width:2px;background:var(--ink-quiet)}
.plan .mr span:last-child{text-align:right;font-weight:600}
.plan .en .row .n{width:20px;font-size:12px;color:var(--ink-faint);font-weight:600;flex:none}
.plan .en .row.off .t-name{color:var(--ink-quiet)}
.plan .en .sl{display:flex;align-items:center;gap:6px;padding:10px 14px 0 18px;font-size:12px;font-weight:600;color:var(--ink-quiet)}
.plan .en .ss{border-left:2px solid var(--track);margin-left:14px}
/* the routine's last act: a dashed button across the list it adds to */
.plan .btn.add{width:calc(100% - 24px);margin:8px 12px 0;border-style:dashed}
.plan .rule.off .t{color:var(--ink-quiet)}
/* a plan's stages: a row each, its number in a disc - the stage in force in the chosen row's look and its disc in the accent */
.plan .stg-list .sn{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;flex:none;font-size:12px;font-weight:600;color:var(--ink-quiet);background:var(--well);box-shadow:inset 0 0 0 1.5px var(--track)}
.plan .stg-list .sn.on{color:var(--accent);box-shadow:inset 0 0 0 1.5px var(--accent)}
.plan .stage-card{padding:6px 14px 14px;border-radius:var(--r-group)}
.plan .stage-card .goal{display:flex;align-items:center;gap:10px;margin-top:8px;padding-top:10px;border-top:1px solid var(--hairline)}
.plan .stg-list .add .sn{background:none;box-shadow:none;color:var(--accent)}
/* THE MONTH: a row a week - the days, then under them a lane per plan: a stage framed where it begins and ends, named above its opening frame, and
   a thin line in its tone from the week's first training to its last, fading out to the week's edge where the plan goes on. The
   trainings stand on it as the routines' marks, each on the card's ground so the line passes behind it; a day gone by is quieted,
   with a green check where finished and a grey one where begun. The day marked is lit down its column from its top */
.month-who{display:flex;flex-wrap:wrap;gap:6px 14px;padding:8px var(--pad-head) 0;font-size:12px;color:var(--ink-quiet)}
.month-who span{display:inline-flex;align-items:center;gap:6px}
/* a plan's key: a swatch of its tone */
.month-who .plan-key{width:16px;height:10px;border-radius:var(--r-mark);background-color:var(--tone)}
.month-grid{margin:10px 12px 0;padding:10px 8px 12px}
.month-grid :is(.wd,.wr){display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.month-grid .wd{padding-bottom:2px}
.month-grid .wd span{text-align:center;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}
.month-grid .wr{row-gap:2px;padding:8px 0 10px;box-shadow:inset 0 -1px 0 var(--hairline)}
.month-grid .dn{grid-row:1;position:relative;z-index:1;text-align:center;font-size:13px;line-height:24px;color:var(--ink-quiet)}
.month-grid .dn.away{color:var(--ink-faint);opacity:var(--o-aside)}
.month-grid .dn b{font-weight:600;color:var(--accent)}
/* what is drawn over a day lets its press through to the day, which stands under it so its light stays under the marks */
.month-grid :is(.dn,.cap,.lane,.mk){pointer-events:none}
.month-grid .hit{margin:0 2px;border-radius:var(--r-cell)}
.month-grid .hit[aria-current="date"]{background:linear-gradient(to bottom,var(--accent-tint),transparent 85%)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .month-grid .hit:hover{background-color:var(--lift)} }
/* a stage's name starts after the room before its frame (--lead), which gives way when the name is longer than the days left of the week */
.month-grid .cap{position:relative;z-index:1;display:flex;padding:4px 0 0 0;font-size:12px;font-weight:600;color:var(--ink-quiet);white-space:nowrap;min-width:0}
.month-grid .cap > i{flex:0 1 var(--lead)}
.month-grid .cap > span{flex:none;padding-left:6px}
.month-grid .lane{grid-column:1 / 8;position:relative;height:34px}
.month-grid .lane i{position:absolute;top:50%;height:2px;margin-top:-1px;background:color-mix(in oklch,var(--tone) 60%,transparent)}
.month-grid .lane i.in{background:linear-gradient(to right,transparent,color-mix(in oklch,var(--tone) 60%,transparent))}
.month-grid .lane i.out{background:linear-gradient(to right,color-mix(in oklch,var(--tone) 60%,transparent),transparent)}
.month-grid .mk{position:relative;z-index:2;display:grid;place-items:center;height:34px}
/* a stage's frame, the date bar's own, stands in the lane around the marks of the days it opens or closes on */
.month-grid .band{position:relative;z-index:1;left:auto;width:auto;top:auto;bottom:auto;align-self:center;height:calc(30px + 2 * var(--out))}
.month-grid .pin{position:relative;display:grid;border-radius:var(--r-inner);background:var(--raised)}
.month-grid .rt{font-style:normal}
.month-grid .rt.gone{opacity:var(--o-aside)}
/* what stands on a day of another month is quieted once more: its marks, a frame, and the line over those days */
.month-grid :is(.mk,.band).away{opacity:var(--o-aside)}
.month-grid .lane.away{-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.4) var(--own-from),#000 var(--own-from),#000 var(--own-to),rgba(0,0,0,.4) var(--own-to));
  mask-image:linear-gradient(90deg,rgba(0,0,0,.4) var(--own-from),#000 var(--own-from),#000 var(--own-to),rgba(0,0,0,.4) var(--own-to))}
.month-grid .rt.off > svg{width:16px;height:16px}
.month-grid .ok{position:absolute;top:-5px;right:-5px;width:14px;height:14px;border-radius:50%;display:grid;place-items:center;color:var(--kept);background:color-mix(in srgb,var(--kept) 22%,var(--raised));box-shadow:inset 0 0 0 1px var(--kept-edge),0 0 0 1.5px var(--raised)}
.month-grid .ok svg{width:8px;height:8px;stroke-width:4}
.month-grid .ok.begun{color:var(--ink-faint);background:color-mix(in srgb,var(--ink) 8%,var(--raised));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink-faint) 70%,transparent),0 0 0 1.5px var(--raised)}
/* a month with no lane: the days alone, each a cell, and a line saying nothing is in it */
.month-grid.bare .wr{box-shadow:none;padding:2px 0}
.month-grid.bare .dn{line-height:36px;border-radius:var(--r-cell);background:var(--sink)}
.month-grid.bare .dn.away{background:none}
.month-grid .none{padding:14px 6px 2px;text-align:center;font-size:13px;color:var(--ink-quiet)}
.month-grid .leg{display:flex;flex-wrap:wrap;gap:8px 16px;padding:12px 4px 0;font-size:12px;color:var(--ink-quiet)}
.month-grid .leg > span{display:inline-flex;align-items:center;gap:6px}

/* ---- Profil: the body's card, the rooms under it - Pomiary i cel, Konto, Klucze - and the login ---- */
.profile .badge-prem{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:var(--r-pill);font-size:12px;font-weight:600;color:var(--ink);background:var(--glass);border:1px solid var(--glass-edge)}
.profile .meas .big,.measures .wcard .big{font-size:40px;font-weight:400;line-height:1;letter-spacing:-.02em;margin-top:2px}
.profile .meas .big small,.measures .wcard .big small{font-size:16px;color:var(--ink-quiet);margin-left:4px}
.profile .meas .dl,.measures .wcard .dl{text-align:right;font-size:12px;color:var(--ink-quiet)}
.profile .meas .dl b,.measures .wcard .dl b{display:block;color:var(--ink);font-size:14px;font-weight:600;margin-top:2px}
.profile .meas .dl b{font-size:16px}
.measures .wcard .chart-axis{display:flex;justify-content:space-between;font-size:11px;color:var(--ink-faint);margin-top:2px}
/* the goal under the weight */
.profile .goal{display:flex;align-items:center;gap:8px;margin-top:10px;padding:8px 10px;border-radius:var(--r-inner);background:var(--sink);font-size:12px;color:var(--ink-quiet)}
.profile .goal b{color:var(--ink);font-weight:500}
/* a goal's period: its dates and pace, where the weight stands against it, and the pencil that edits it */
.measures .per .pr{display:flex;align-items:center;gap:10px;width:100%;padding:4px 4px 4px 12px;border-radius:var(--r-card);background:var(--sink);text-align:left;font-size:13px}
.measures .per .in{flex:none;color:var(--ink-quiet);font-size:12px}
.measures .per .out{flex:none;color:var(--accent-2);font-size:12px;padding:4px 10px;border-radius:var(--r-pill);box-shadow:inset 0 0 0 1px var(--accent-2-edge)}
.measures .ob .v{color:var(--ink)}
.measures .ob .d{width:44px;text-align:right;font-size:12px;color:var(--ink-quiet)}
.konto .kcard .cr{width:40px;height:40px;border-radius:var(--r-card);display:grid;place-items:center;background:var(--sink);color:var(--ink);flex:none}
/* the kinds of account, side by side: each a value the account holds or not, the one it is lit from its top edge */
.konto .kinds span{height:44px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:11px;line-height:1.15;color:var(--ink-quiet);border-radius:var(--r-pill);background:var(--sink)}
.konto .kinds span.on{color:var(--ink);background:var(--lit-top);box-shadow:inset 0 0 0 1.5px var(--accent)}
.konto .use{padding:10px var(--pad-row) 12px;border-top:1px solid var(--hairline)}
.konto .use p{display:flex;justify-content:space-between;font-size:12px;color:var(--ink-quiet);margin-bottom:6px}
.konto .row.off{opacity:var(--o-off)}
.keyroom .new{margin:12px 12px 0;padding:14px;border:1px solid var(--accent-edge)}
.keyroom .new .k{display:flex;align-items:center;gap:8px;margin-top:8px;padding:10px 12px;border-radius:var(--r-card);background:var(--sink);font-family:ui-monospace,monospace;font-size:13px}
.keyroom .new .k .btn{font-family:var(--font-sans);flex:none}
.keyroom .kr{font-size:12px;color:var(--ink-quiet);margin-top:2px;font-family:ui-monospace,monospace}
.keyroom .perm{font-size:11px;color:var(--ink);padding:3px 8px;border-radius:var(--r-pill);background:var(--sink);white-space:nowrap}
.keyroom .info{margin:12px 12px 0;padding:12px 14px;font-size:13px;line-height:1.45;color:var(--ink-quiet);border-radius:var(--r-card)}
.keyroom .row-link{display:flex;align-items:center;gap:8px;margin:14px 12px 0;padding:14px;color:var(--accent)}
.login .top .link{display:inline-flex;align-items:center;gap:2px;height:44px;padding:0 12px 0 6px;border-radius:var(--r-card);color:var(--ink-quiet);font-size:13px}
.login .lg .hl-mark{font-size:56px;color:var(--ink)}
.login .lg .s{margin-top:6px;font-size:14px;color:var(--ink-quiet);line-height:1.45}
.login .lg .s b{color:var(--ink);font-weight:500}

/* ---- Trening: the training card, the path under it, the sets, the keypad on a wide screen ---- */
.training .set button.v{padding:0;font:inherit;font-weight:600;font-size:16px}
.training .set.warm button.v{font-weight:500}
.training .set.failed .v{color:var(--refused);text-decoration:line-through}
.training .set .pair .rir{pointer-events:auto;padding:4px 6px;border-radius:var(--r-mark)}
.training .set .pair .rir.on{outline:var(--ring) solid var(--focus)}
/* a superset: its label, then its exercises as items of one list - the one open lit from its left edge */
.training .ss .lb{display:flex;align-items:center;gap:6px;padding:4px 8px;font-size:12px;font-weight:600;color:var(--ink-quiet)}
.training .ss .it{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 10px;border-radius:var(--r-card);background:var(--sink);text-align:left}
.training .ss .it[aria-current="true"]{background:var(--lit-left),var(--sink)}
.training .ss .it .t-name{font-weight:500}
.training .ss .it[aria-current="true"] .t-name{font-weight:600}
.training .path .rx .h{font-weight:500}
.training .path .rx .h:not(.dif){color:var(--ink)}
/* on a wide screen the keypad is a card where the rest card stands, and the rest card steps aside while it is open - the
   keypad's head carries the rest's time */
.app.rail-w .keypad{left:auto;right:max(24px,calc((100% - var(--rail-wide) - var(--frame)) / 2 + 24px));bottom:24px;
  width:var(--rest-card);max-width:none;margin:0;padding-bottom:14px;border-radius:var(--r-sheet)}
.app .keypad .tmr{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--ink)}
.app .keypad .tmr i{width:16px;height:16px;--w:2.5px}
/* a figure the set already holds and nobody typed: the suggestion or last time's */
.nbox input.pre:not(.whole){color:var(--ink-quiet)}
/* the date's way back to today: amber from another day, as every day but today is highlighted; blue from another week */
/* the day's title holds one line whatever the day is called: its size follows the room the bar gives it (an inline-size
   container), never the name, so the longest name - Poniedziałek, 30 października - fits and the bar keeps its height */
.date-head .t{container-type:inline-size}
.date-head .t-section{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:min(18px,7.3cqi)}
.date-head .to-today{color:var(--accent-2);font:inherit;padding:0}
.date-head .to-today.read-week{color:var(--accent)}
/* the day on a wide screen: the open exercise's number in its ring, its history, the list of the training's exercises */
.desk-log .dh .no{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-size:16px;font-weight:600;color:var(--ink-quiet);box-shadow:inset 0 0 0 2px var(--track)}
.desk-log .hist .r{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid var(--hairline);font-size:13px}
.desk-log .hist .r > b{font-weight:500}
.desk-log .hist .r span{color:var(--ink-quiet);text-align:right}
.desk-log .ex .t b{display:flex;align-items:center;gap:6px;font-weight:500}
.desk-log .ex.current .t b{font-weight:600}
.desk-log .ex .t b.quiet{color:var(--ink-quiet)}
.desk-log .ex .mini{width:64px;flex:none;display:flex;flex-direction:column;gap:var(--gap-line)}
.desk-log .ex .mini > span:first-child{text-align:right;font-size:11px;color:var(--ink-quiet)}
.desk-log .other-t{width:calc(100% - 24px);margin:10px 12px 0 12px;border-radius:var(--r-group)}

/* ---- the gate: the mark over the kinds of start ---- */
.gate-head .hl-mark{font-size:72px;color:var(--ink)}
.gate-foot{margin-top:14px;text-align:center;font-size:12px;color:var(--ink-faint)}

/* ---- the AI agent (Agent): a layer over the app - its mark at the tab bar's end (TabBar's `end`) or its item in the rail, its sheet or
   panel, and what it lays over a screen while it shows or acts. Only its presence wears `agent`; the marks laid over a
   screen stand on the viewport, measured off the element they mark ---- */
:root, [data-theme]{--agent-face:linear-gradient(var(--agent-tint),var(--agent-tint)),var(--float)}
/* THE MARK AT WORK: lit, a light draws the frame once and a glow swells from the centre (.wakes); while an answer is on
   its way (.thinks) the mark turns to ink, a comet runs round the frame and a glow breathes under the glass. Each layer
   fades in and out over m-glide; the breathing and the comet hold still while unseen */
:is(.ag-mark,.ag-item){transition:color var(--m-glide) var(--ease-move),border-color var(--m-glide) var(--ease-move)}
.ag-orb{position:absolute;inset:0;display:grid;place-items:center;border-radius:50%}
/* A QUESTION ON ITS WAY in the conversation: the orb at work, a note on what the agent does and the seconds it has taken */
.ag-thinking{display:flex;align-items:center;gap:var(--gap-within)}
.ag-thinking > .meta:last-child{margin-left:auto}
.ag-think{position:relative;flex:none;width:32px;height:32px}
.ag-orb > .ag-glyph{position:relative;z-index:1;width:24px;height:24px;overflow:visible;transition:opacity var(--m-glide) var(--ease-move),scale var(--m-glide) var(--ease-move)}
/* while Wskaż is on, the mark gives way to Wskaż's crosshair in the same place */
.ag-orb > .ag-aim{position:absolute;z-index:1;width:22px;height:22px;opacity:0;scale:.6;transition:opacity var(--m-glide) var(--ease-move),scale var(--m-glide) var(--ease-move)}
.aims .ag-orb > .ag-glyph{opacity:0;scale:.6}
.aims .ag-orb > .ag-aim{opacity:1;scale:1}
.ag-glyph path{fill:none;stroke:var(--agent);stroke-width:51.2;stroke-linecap:round;filter:drop-shadow(0 0 36px var(--agent));opacity:0}
.ag-trace{stroke-dasharray:28 72;transition:opacity var(--m-glide) var(--ease-move);animation:ag-trace 1.8s linear infinite paused}
:is(.ag-mark,.ag-item,.ag-think).thinks .ag-trace{opacity:1;animation-play-state:running}
.ag-draw{stroke-dasharray:100;stroke-dashoffset:100}
:is(.ag-mark,.ag-item).wakes .ag-draw{animation:ag-draw 1.1s var(--ease-move) forwards}
.ag-breath, .ag-swell{position:absolute;inset:0;border-radius:50%;overflow:hidden;pointer-events:none}
.ag-breath::before, .ag-swell::before{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,color-mix(in oklab,var(--agent) 50%,transparent),transparent 62%)}
.ag-breath{opacity:0;transition:opacity var(--m-glide) var(--ease-move)}
:is(.ag-mark,.ag-item,.ag-think).thinks .ag-breath{opacity:1}
.ag-breath::before{animation:ag-breathe 2.6s ease-in-out infinite alternate paused}
:is(.ag-mark,.ag-item,.ag-think).thinks .ag-breath::before{animation-play-state:running}
.ag-swell::before{opacity:0}
:is(.ag-mark,.ag-item).wakes .ag-swell::before{animation:ag-swell 1.1s var(--ease-out)}
@keyframes ag-trace{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@keyframes ag-draw{0%{stroke-dashoffset:100;opacity:1}70%{stroke-dashoffset:0;opacity:1}to{stroke-dashoffset:0;opacity:0}}
@keyframes ag-breathe{from{transform:scale(.7);opacity:.45}to{transform:scale(1.1);opacity:1}}
@keyframes ag-swell{from{transform:scale(.2);opacity:1}to{transform:scale(1.4);opacity:0}}
@media (prefers-reduced-motion:reduce){
  .ag-trace, :is(.ag-mark,.ag-item).wakes .ag-draw, :is(.ag-mark,.ag-item).wakes .ag-swell::before{animation:none;opacity:0}
  .ag-breath::before{animation:none;transform:none;opacity:.7}
}
.ag-mark.lit, .ag-line, .ag-bubble, .ag-pickname{background:var(--agent-face);border-color:var(--agent-edge)}
.ag-mark.lit{color:var(--agent)}
:is(.ag-mark,.ag-item,.ag-think).thinks{color:var(--ink)}
/* the rail's item is a row of the rail as its places are - their height, inset, gap, ink and weight, the mark at their
   icons' size in their column - edged in glass-edge as the phone's mark is; lit, it is lit from its left edge in the
   agent's tone. Its mark wakes and thinks as the
   phone's does, the glow round the mark alone */
.rail .ag-item{display:flex;align-items:center;gap:12px;width:100%;height:48px;margin-top:var(--s3);padding:0 13px;overflow:hidden;white-space:nowrap;
  border-radius:var(--r-pill);color:var(--ink-quiet);font:inherit;font-weight:500;position:relative;box-shadow:inset 0 0 0 1px var(--glass-edge)}
.rail .ag-item .ag-orb{position:relative;inset:auto;flex:none;width:36px;height:36px;margin:0 -7.5px}
.rail .ag-item .ag-orb > :is(.ag-glyph,.ag-aim){width:var(--mk-l);height:var(--mk-l)}
.rail .ag-item.lit{color:var(--ink);background:linear-gradient(90deg,color-mix(in srgb,var(--agent) 24%,transparent),transparent);box-shadow:inset 0 0 0 1px var(--agent-edge)}
.rail .ag-item.lit .ag-orb{color:var(--agent)}
.rail .ag-item.thinks .ag-orb{color:var(--ink)}
.rail.icons .ag-item{justify-content:center;padding:0}
.rail.icons .ag-item > span:not(.ag-orb){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* the switch that hides it, among the device's settings: the mark in the row's icon place */
.row .ic .hl-mark{font-size:20px}
/* the conversation: on a phone in the family's Sheet - the rows, and the question in its foot, which stays while the
   rows scroll; from 600px in a Workspace panel (.float.panel) over the right edge, the panes as they are */
/* on a phone the sheet floats above the tab bar (Sheet's `above`) as the bar itself does: rounded all round, no scrim,
   the bar and the mark beside it seen and live; half the frame above the bar, or all of it up to the top safe area.
   With the keys up the bar is away, and the sheet stands above the keys. It stands UNDER the bar (z-sticky), so coming
   and going it slides out from behind the bar and the mark rather than across them */
:is(.app,.hk) .sheet.above{z-index:calc(var(--z-sticky) - 1);--below:calc(var(--bar-at) + var(--bar) + var(--s2) + env(safe-area-inset-bottom,0px) + var(--under,0px));
  left:14px;right:14px;bottom:var(--below);border-radius:var(--r-sheet);padding-bottom:var(--s3);
  max-height:calc(100% - var(--below) - var(--s2) - env(safe-area-inset-top,0px))}
.app.typing:not(.blind) .sheet.above{--below:calc(var(--s2) + var(--under,0px))}
:is(.app,.hk) .sheet.above.half:not(.dialog){height:calc((100% - var(--below)) * .56)}
:is(.app,.hk) .sheet.above.full:not(.dialog){height:calc(100% - var(--below) - var(--s2) - env(safe-area-inset-top,0px));border-radius:var(--r-sheet);padding-top:10px}
/* THE CREDITS LEFT: a slim meter under the agent's head, staying while the rows scroll - this week's pool fills it, and
   the extra credits that never expire continue that fill in a neutral grey; a coin and the figures at its end; it opens
   Konto, where both are said in full */
.ag-credits{flex:none;display:flex;align-items:center;gap:var(--s2);margin:calc(-1 * var(--s2)) 0 var(--s3);color:var(--ink-quiet);font-size:13px;line-height:18px;text-decoration:none;white-space:nowrap}
.panel > .ag-credits{margin:var(--s1) var(--s2) var(--s2)}
.ag-credits svg{width:16px;height:16px;flex:none}
.ag-credits .pool-n{color:var(--agent)}
.ag-credits .more-n{color:var(--ink-faint)}
.ag-credits.low .pool-n{color:var(--pending)}
/* the extra credits' segment: a grey well below the pool's lightness, so the two never blend */
.ag-meter{--extra:color-mix(in oklab,var(--ink-faint) 50%,var(--ground));flex:1;display:flex;gap:2px;height:4px;border-radius:var(--r-pill);background:var(--glass-strong);overflow:hidden}
.ag-meter i{flex:none;height:100%;width:var(--w)}
.ag-meter .pool{background:var(--agent)}
.ag-meter .more{background:var(--extra)}
.ag-credits.low .ag-meter .pool{background:var(--pending)}
/* the week's pool spent: the extra credits are the ones being spent now, so they take the agent's colour */
.ag-credits.extra .ag-meter .more{background:var(--agent)}
.ag-credits.extra .more-n{color:var(--agent)}
.ag-credits.extra .pool-n{color:var(--ink-faint)}
/* while the agent works the meter and the figure step down as it spends, breathing as what is on its way does */
.ag-credits.live b{font-weight:inherit;color:var(--agent)}
.ag-credits.live b, .ag-credits.live:not(.extra) .ag-meter .pool, .ag-credits.live.extra .ag-meter .more{animation:busy-breathe 1.1s var(--ease-move,ease) infinite alternate}
@media (prefers-reduced-motion:reduce){.ag-credits.live b, .ag-credits.live .ag-meter i{animation:none}}
/* over a screen's sheet, which stands at the end of the frame after it */
.ag-panel{position:absolute;z-index:calc(var(--z-sheet) + 1);top:var(--s3);right:var(--s3);bottom:var(--s3);width:var(--panel);max-width:calc(100% - 2 * var(--s3))}
.panel.ag-panel > .rows{flex:1}
.ag-acts{display:flex;flex-direction:column;gap:var(--gap-within)}
/* AN ACT THE AGENT OFFERS: the chat's whole width, in the agent's colour, its kind at its head and the way on at its end */
.ag-act{display:flex;align-items:center;gap:var(--gap-row);width:100%;min-height:var(--tap);padding:var(--s2) var(--s3);border:0;border-radius:var(--r-card);background:var(--agent-face);box-shadow:inset 0 0 0 1px var(--agent-edge);color:var(--ink);font:inherit;text-align:left;text-decoration:none;cursor:pointer}
.ag-act > .ic{flex:none;display:grid;place-items:center;width:var(--mk);height:var(--mk);color:var(--agent)}
.ag-act > .ic svg{width:var(--mk);height:var(--mk)}
.ag-act > .t{flex:1;min-width:0;display:flex;flex-direction:column}
.ag-act > .t .t-name{font-size:14px;font-weight:600}
.ag-act > .t .meta{font-size:12px;color:var(--ink-quiet)}
.ag-act > svg:last-child{flex:none;width:var(--mk-s);height:var(--mk-s);color:var(--ink-faint)}
.ag-change{display:flex;flex-direction:column;gap:var(--gap-line);padding:var(--s2) var(--s3);border-radius:var(--r-card);background:var(--agent-face);box-shadow:inset 0 0 0 1px var(--agent-edge)}
.ag-change > ul{margin:0;padding-left:1.1em;font-size:14px;line-height:1.4}
.ag-offer > p:not(.meta){margin:0;font-size:14px;line-height:1.4}
/* A ROW OF ANSWERS stands at the right edge: the act that backs out first, the accepting act last, on the edge */
.askacts{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--gap-row)}
.ask-msg{color:var(--ink-quiet)}
ul.ask-msg{padding-left:18px;display:flex;flex-direction:column;gap:var(--gap-line)}
:is(.ask-form,.field).typed{margin-top:var(--gap-head)}
.ag-change.undone > p:not(.meta){color:var(--ink-quiet)}
.ag-change.undone > ul{color:var(--ink-quiet);text-decoration:line-through}
.ag-summary{border-block:1px solid var(--line);padding-block:var(--s1)}
.ag-summary > summary{cursor:pointer;text-align:center;list-style:none}
.ag-summary > summary::-webkit-details-marker{display:none}
.ag-summary > p{margin-top:var(--s1);color:var(--ink-quiet);font-size:13px;white-space:pre-line}
.ag-panel.growing > .rows{scrollbar-width:none}
.ag-veil{position:absolute;inset:0;z-index:calc(var(--z-sticky) - 1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:color-mix(in srgb,var(--scrim) 30%,transparent)}
.ag-panel.growing > .rows::-webkit-scrollbar{display:none}
/* beside a rail it grows from its bottom right, where its bubble stands, and goes back there */
.ag-panel{transform-origin:100% 100%}
/* ON A PHONE THE SAME PANEL across the frame, from under the top safe area to s2 above the bar (above the keys while
   they are up - the frame itself already ends above them, --under, so the panel adds nothing for them), frosted so the screen shows through; it grows from the agent's mark - its origin is the mark's centre,
   34px in from its right edge and 40px below its foot - and goes back into it */
.ag-panel.phone{left:var(--s3);right:var(--s3);width:auto;max-width:none;top:calc(var(--s3) + env(safe-area-inset-top,0px));
  bottom:calc(var(--bar-at) + var(--bar) + var(--s2) + env(safe-area-inset-bottom,0px));overflow:hidden;
  background:color-mix(in srgb,var(--float) 78%,transparent);-webkit-backdrop-filter:blur(calc(var(--blur) * 1.5)) saturate(1.2);backdrop-filter:blur(calc(var(--blur) * 1.5)) saturate(1.2);
  transform-origin:calc(100% - 34px) calc(100% + 40px)}
.app.typing:not(.blind) .ag-panel.phone{bottom:var(--s2)}
/* an open sheet or dialog keeps the page modal: the panel goes under its scrim, dimmed and out of reach with the rest */
.app:has(> .layer-top) .ag-panel{z-index:calc(var(--z-sheet) - 1)}
.ag-say p{margin:0}
/* what the agent does, said before it answers for the first time: the lead names what it is, and each
   point below it stands on its own line - a notice read in one pass rather than a paragraph skimmed past */
.ag-first{display:flex;flex-direction:column;gap:var(--gap-block);font-size:15px;line-height:1.45;color:var(--ink)}
.ag-first > ul{display:flex;flex-direction:column;gap:var(--gap-line);margin:0;padding-left:1.1em;font-size:14px;line-height:1.4;color:var(--ink-quiet)}
.ag-say{color:var(--ink);font-size:15px;line-height:1.45;display:flex;flex-direction:column;gap:var(--gap-line)}
/* an answer stands at the left, plain, as the question stands at the right in glass */
/* its mark leads the head of its sheet and its panel */
.ag-lead{display:contents;color:var(--agent)}
/* the panel's head is one line: the mark at the line's height, the name, and what it sees after it, quieter, cut short
   with an ellipsis before the name ever is */
.ag-panel > .sh > .lead{font-size:20px}
/* THE HEAD'S NAME, SMALL, AND WHAT IT SEES UNDER IT - two short lines in the height of the head's buttons */
.ag-panel > .sh .t{display:flex;flex-direction:column;justify-content:center;gap:0;white-space:nowrap}
.ag-panel > .sh .t-section{font-size:15px;line-height:18px}
.ag-panel > .sh .meta{min-width:0;margin:0;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis}
.ag-ask{align-self:flex-end;max-width:82%;padding:var(--s2) var(--s3);border-radius:var(--r-card);background:var(--glass-strong);box-shadow:inset 0 0 0 1px var(--glass-edge);font-size:15px;line-height:1.4;display:flex;flex-direction:column;gap:var(--gap-within);align-items:flex-end}
/* WHAT WAS PICKED, AS ITS PICTURE: the element as it stood, scaled down whole into a framed thumbnail, as a photo
   stands in a chat - in the question, and above the field until the question goes. The copy is the app's own markup,
   so it is never pressable */
.ag-shot{display:block;flex:none;width:calc(var(--w) * var(--k) * 1px);height:calc(var(--h) * var(--k) * 1px);overflow:hidden;border-radius:var(--r-inner);background:var(--ground);box-shadow:inset 0 0 0 1px var(--glass-edge);pointer-events:none}
.ag-shot-in{display:block;width:calc(var(--w) * 1px);height:calc(var(--h) * 1px);scale:var(--k);transform-origin:0 0;overflow:hidden}
.ag-ask .ag-shot{align-self:flex-end}
.ag-attach{display:flex;align-items:flex-start;gap:var(--s1)}
.ag-foot{display:flex;flex-direction:column;gap:var(--gap-line);padding-top:var(--s2);border-top:1px solid var(--hairline)}
.acts > .ag-foot{flex:1;min-width:0}
/* the questions offered stand over the field at its right, under the thumb */
.ag-foot > .chips{justify-content:flex-end}
.ag-retry{display:flex;flex-direction:column;align-items:flex-start;gap:var(--gap-line)}
/* one thing above the tab bar: what is under way gives way to the agent's bubble and draft */
.app:has(> .ag-line, > .ag-draft) > .drawer{display:none}
/* the bubble from the mark: the agent speaking while it shows or works rather than talks */
.ag-line{position:fixed;z-index:calc(var(--z-sheet) + 2);right:14px;bottom:calc(var(--bar-at) + var(--bar) + var(--s2) + env(safe-area-inset-bottom));max-width:min(300px,calc(100vw - 28px));border:1px solid var(--agent-edge);border-radius:var(--r-card) var(--r-card) var(--r-mark) var(--r-card);display:flex;align-items:center;gap:var(--gap-line);padding:var(--s3) var(--s2) var(--s3) var(--s4)}
.ag-line .t{flex:1;min-width:0;font-size:14px;line-height:1.3}
.ag-line .t b{display:block;font-weight:600}
.ag-line .t span{display:block;color:var(--ink-quiet);font-size:12px}
/* an app sheet covers the mark, so the bubble goes to the top of the screen */
:root:has(section.sheet) .ag-line{top:calc(var(--s3) + env(safe-area-inset-top,0px));bottom:auto;border-radius:var(--r-card)}
/* and the sheet leaves it that band, so the bubble never covers a sheet's head: a dialog moves down in what is left (as for
   the number pad's --below), a drawer shortens. --ag-line-h is the bubble's own height, measured as it is drawn */
.app:has(> .ag-line) .sheet{--above:calc(var(--ag-line-h,0px) + 2 * var(--s3) + env(safe-area-inset-top,0px))}
.app:has(> .ag-line) .sheet:not(.dialog){max-height:calc(100% - var(--above) - var(--s4) - var(--under,0px))}
.app:has(> .ag-line) .sheet.dialog{max-height:calc(100% - var(--above) - var(--below) - 2 * var(--s4,16px))}
/* beside a rail the bubble stands at the view's bottom right, where the panel ends; while Wskaż waits it moves to the
   other bottom corner as the pointer comes near it (.dodged, AgentLayer), its way out then the key Escape (.ag-esc) */
.app.rail-l > .ag-line, .app.rail-w > .ag-line{--rail-at:var(--rail);--gutter:var(--s3);right:var(--s3);bottom:var(--s3);border-radius:var(--r-card)}
.app.rail-w > .ag-line{--rail-at:var(--rail-wide)}
/* at any width, under a mouse, it moves to the other bottom corner as the pointer comes near it */
.ag-line{--rail-at:0px;--gutter:14px;--dx:0px;--dy:0px;translate:var(--dx) var(--dy);transition:translate var(--m-layer) var(--ease-move)}
.ag-line.dodged{--dx:calc(var(--rail-at) + 2 * var(--gutter) + 100% - 100vw)}
.ag-line.flipped{--dy:var(--flip-by)}
/* while Wskaż is on, nothing on the screen presses: no hand over a control, a crosshair over what can be picked; the
   agent's own controls - its mark first, which lets Wskaż go - keep the hand */
html.ag-picking .app *{cursor:default !important}
html.ag-picking .app [data-ask], html.ag-picking .app [data-ask] *{cursor:crosshair !important}
html.ag-picking .app :is(button,a).ag-ui, html.ag-picking .app .ag-ui :is(button,a){cursor:pointer !important}
/* AND WHAT CANNOT BE PICKED STEPS BACK: the outermost part holding nothing pickable - beside what holds something
   pickable or the agent's own parts - is dimmed, blurred and its colour taken away, so a thing in ink fades as one
   in colour does; nothing inside a pickable thing, nor the agent's parts, steps back */
html.ag-picking .app :is(:has([data-ask]),:has(.ag-ui)) > :not([data-ask],.ag-ui,[data-ask] *):not(:has([data-ask],.ag-ui)){opacity:.3;filter:grayscale(1) blur(2px);
  transition:opacity var(--m-glide) var(--ease-move),filter var(--m-glide) var(--ease-move)}
@media (prefers-reduced-motion:reduce){ html.ag-picking .app :is(:has([data-ask]),:has(.ag-ui)) > *{transition:none} }
.ag-esc{flex:none;display:flex;align-items:center;color:var(--ink-quiet);font-size:12px;padding-right:var(--s2)}
@media (prefers-reduced-motion:reduce){ .ag-line{transition:none} }
/* pointing: a ring round the element, the rest of the screen dimmed, one bubble at it with its tail turned to it */
.ag-spot{position:fixed;z-index:calc(var(--z-sheet) + 1);border-radius:var(--r-card);pointer-events:none;box-shadow:0 0 0 2px var(--agent),0 0 0 7px var(--agent-tint),0 0 0 100vmax color-mix(in srgb,var(--ground) 58%,transparent)}
.ag-bubble{position:fixed;z-index:calc(var(--z-sheet) + 2);border:1px solid var(--agent-edge);padding:var(--s3) var(--s2) var(--s2) var(--s4);border-radius:var(--r-card);display:flex;flex-direction:column;gap:var(--gap-line);font-size:14px;line-height:1.4;color:var(--ink)}
.ag-bubble p{margin:0;padding-right:var(--s2)}
.ag-bubble::after{content:'';position:absolute;left:var(--tail);width:12px;height:12px;background:var(--agent-face);border:1px solid var(--agent-edge);rotate:45deg;margin-left:-6px}
.ag-bubble[data-side="above"]::after{bottom:-7px;border-top-color:transparent;border-left-color:transparent}
.ag-bubble[data-side="below"]::after{top:-7px;border-bottom-color:transparent;border-right-color:transparent}
.ag-bubble[data-side="over"]::after{display:none}
.ag-steps{display:flex;align-items:center;gap:var(--s1)}
.ag-steps .meta{flex:1}
.ag-steps .hl-mark{font-size:18px;color:var(--agent)}
/* Wskaż: the element under the finger outlined, its name over it */
.ag-pickring{position:fixed;z-index:calc(var(--z-sheet) + 1);border-radius:var(--r-inner);box-shadow:0 0 0 2px var(--agent);background:var(--agent-tint);pointer-events:none}
.ag-pickname{position:fixed;z-index:calc(var(--z-sheet) + 2);transform:translateY(-100%);margin-top:-8px;border:1px solid var(--agent-edge);border-radius:var(--r-pill);padding:3px 10px;font-size:12px;line-height:18px;color:var(--ink);white-space:nowrap;max-width:calc(100vw - 28px);overflow:hidden;text-overflow:ellipsis;pointer-events:none}
:root:has(.ag-pickring) .app *{cursor:crosshair}
/* acting live: the finger on the control it presses, the value it set marked in its field and then on the page */
.ag-finger{position:fixed;z-index:calc(var(--z-sheet) + 3);width:38px;height:38px;margin:-19px 0 0 -19px;border-radius:50%;background:var(--agent-tint);box-shadow:0 0 0 2px var(--agent);pointer-events:none;transition:left var(--m-layer) var(--ease-move),top var(--m-layer) var(--ease-move)}
.ag-finger::after{content:'';position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:var(--agent)}
.ag-set-at{position:fixed;z-index:calc(var(--z-sheet) - 1);border-radius:var(--r-mark);background:var(--agent-tint);box-shadow:0 0 0 1px var(--agent-edge);pointer-events:none}
.ag-setin-at{position:fixed;z-index:calc(var(--z-sheet) + 1);border-radius:var(--r-inner);box-shadow:inset 0 0 0 1.5px var(--agent);background:var(--agent-tint);pointer-events:none}
/* a draft: what goes outlined dashed, what comes in the agent's colour, and its bar over the tab bar */
.ag-draft{position:fixed;z-index:calc(var(--z-sheet) + 2);left:14px;right:14px;bottom:calc(var(--bar-at) + var(--bar) + var(--s2) + env(safe-area-inset-bottom));display:flex;align-items:center;gap:var(--s2);padding:var(--s2) var(--s2) var(--s2) var(--s4);border-radius:var(--r-card);background:var(--agent-face);border:1px solid var(--agent-edge);-webkit-backdrop-filter:blur(var(--blur));backdrop-filter:blur(var(--blur));box-shadow:var(--lift-float)}
.app.rail-l > .ag-draft{left:calc(var(--rail) + var(--s3));right:var(--s3);bottom:var(--s3);max-width:560px;margin:0 auto}
.app.rail-w > .ag-draft{left:calc(var(--rail-wide) + var(--s3));right:var(--s3);bottom:var(--s3);max-width:560px;margin:0 auto}
.ag-draft .t{flex:1;min-width:0;font-size:14px;line-height:1.3}
.ag-draft .t b{display:block;font-weight:600}
.ag-draft .t span{color:var(--ink-quiet);font-size:12px}
.ag-draft .btn{flex:none}
.ag-gone-at{position:fixed;z-index:calc(var(--z-sheet) - 1);outline:1.5px dashed var(--agent);outline-offset:-2px;border-radius:var(--r-inner);pointer-events:none}
.ag-new-at{position:fixed;z-index:calc(var(--z-sheet) - 1);display:grid;place-items:center start;color:var(--agent);background:var(--float);pointer-events:none;font:inherit}

/* ================= FOUNDATION: A PAGE, DATA, INPUTS, LAYOUTS ================= */
/* ---- a rounded box that scrolls never scrolls itself: its content scrolls in .roll inside it, the box's padding (at
   least half its radius at top and bottom) holding the bar off the corners, where it would run into the curve */
.roll{min-height:0;overflow:auto;overscroll-behavior:contain}
/* a page that scrolls with the window: the window's own bar is the same quiet pill */
html:has(> body:is(.hk,.screen,.aurora)){scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ink) 20%,transparent) transparent}
/* a rounded box that clips what floats inside it clips with clip-path too: overflow alone leaves a layer with a backdrop
   blur square at the corners */
.clips{overflow:hidden;clip-path:inset(0 round var(--r, var(--r-group)))}

/* ---- a page ---- */
/* ================= BRAND ================= */
/* the family's mark beside a product's name: the mark (design/brand/mark.svg - the frame with HeksLog's glyph, which every
   product carries until it has a glyph of its own) is inlined once per page as a symbol and drawn in the current ink;
   the name is t-name. The size is the mark's: 40px in a Rail, 28px in a bar, 20px in a foot - never under 16px. */
/* the page's symbols - the mark, the icons it uses more than once - inlined once and drawn with <use> */
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.brand{--mark:28px;display:inline-flex;align-items:center;gap:var(--s2);flex:none;color:var(--ink);text-decoration:none;white-space:nowrap}
.brand > .heks-mark{width:var(--mark);height:var(--mark);flex:none}
.brand > span{font-family:var(--font-sans);font-size:15px;line-height:1.25;font-weight:600}
.brand.small{--mark:20px}
.brand.large{--mark:40px}
/* a lockup that leads home answers as a ghost control: its wash reaches past the mark and the name by s2 each side, and
   gives the same back as a negative margin, so the mark still stands on the page's content line */
a.brand{min-height:var(--tap);padding:0 var(--s2);margin-inline:calc(-1 * var(--s2));border-radius:var(--r-card);
  --pressed:var(--shade);transition:box-shadow var(--m-state) var(--ease-out),transform var(--m-state) var(--ease-out)}
@media (pointer:fine){ a.brand{min-height:var(--tap-fine)} }
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) a.brand:hover{box-shadow:inset 0 0 0 999px var(--lift)} }
a.brand:active{transform:translateY(var(--press));box-shadow:inset 0 0 0 999px var(--pressed);transition-duration:0s}

/* ================= PAGE ================= */
/* the page's root is body.hk.aurora (Screen); anchors land clear of the bar, and a jump glides unless motion is reduced */
html:has(> body.aurora){-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body.aurora{margin:0}
html:has(.pagebar){scroll-padding-top:calc(var(--bar) + var(--s5))}
@media (prefers-reduced-motion:reduce){ html:has(> body.aurora){scroll-behavior:auto} }
/* the measure: the content's width, centred, page-edge from the window */
.page{width:min(var(--page),100% - 2 * var(--page-edge));margin-inline:auto}
/* a part of the page: the head opens the page a little nearer the bar; between two parts, half a gap-part, the hairline,
   a whole gap-part - the line belongs to the part it opens */
.part{padding-top:var(--gap-part)}
.part:first-child{padding-top:calc(var(--gap-part) - var(--s4))}
.part + .part{margin-top:calc(var(--gap-part) / 2);border-top:1px solid var(--hairline)}
/* a part that is running text - a policy, a term, a notice: the measure it is read at, and the rhythm between a
   paragraph, a subheading and a list. A part's head keeps its own spacing above it. */
.prose{display:flex;flex-direction:column;gap:var(--s4);max-width:38em}
.prose > *{margin:0}
.prose > :is(h2,h3,h4){margin-top:var(--s3)}
.prose > :first-child{margin-top:0}
.prose > :is(ul,ol){display:flex;flex-direction:column;gap:var(--gap-line);padding-left:1.2em}
:is(.pagehead,.parthead) + .prose{margin-top:var(--s5)}
/* the foot: the brand, the links, the copyright - a hairline over it, gap-part under the last part */
.pagefoot{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s4);margin-top:var(--gap-part);
  padding:var(--s5) 0 calc(var(--s6) + env(safe-area-inset-bottom,0px));border-top:1px solid var(--hairline);color:var(--ink-quiet)}
.pagefoot > .brand{margin-right:auto}
.pagefoot > nav{display:flex;flex-wrap:wrap;gap:var(--s1)}
/* a phone's foot: one under another - the brand, the links with their words on the content line, the copyright */
@media (max-width:599px){
  .pagefoot{flex-direction:column;align-items:flex-start}
  .pagefoot > .brand{margin-right:0}
  .pagefoot > nav{margin-left:calc(-1 * var(--pad-row))}
}

/* ================= PAGEBAR ================= */
/* the bar that stays: a float spanning the window - of the float's edge it keeps the one over the content - `bar` tall,
   the page's measure inside it; it reads its own width, which is the window's */
.pagebar{position:sticky;top:0;z-index:var(--z-sticky);border-width:0 0 1px;border-radius:0;padding-top:env(safe-area-inset-top,0px);container:pagebar / inline-size}
.pagebar > .page{display:flex;align-items:center;gap:var(--s4);min-height:var(--bar)}
/* the middle: section links, or a Search that takes the room; the act stands at the end */
.pagebar .mid{display:flex;align-items:center;gap:var(--s1);flex:1;min-width:0}
.pagebar .mid > .search{flex:1;max-width:32rem}
.pagebar .page > .btn{flex:none;margin-left:auto}
/* the part being read, where the page follows the scroll: lit from the top as a chosen option in a row */
.pagebar nav.mid > a[aria-current]{color:var(--ink);background:var(--lit-top);box-shadow:inset 0 0 0 1px var(--accent-edge)}
@container pagebar (min-width:900px){ .pagebar > .page{gap:var(--s5)} }
/* what folds: under 900px the section links (the parts follow one another as the page is read); under 600px, beside a
   Search, the name (kept for a screen reader, the mark stays) and a plain link out (the foot carries it too) */
@container pagebar (max-width:899px){ .pagebar nav.mid{display:none} }
@container pagebar (max-width:599px){
  .pagebar:has(.mid > .search) .brand > span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .pagebar:has(.mid > .search) .page > .btn:not(.act){display:none}
}

/* ================= PAGEHEAD ================= */
/* the page's head: an eyebrow, the headline (t-display on the front page, t-headline on a page further in), the lead in
   ink-quiet, the acts; a part's head: an eyebrow, a t-headline, a paragraph in t-prose */
:is(.pagehead,.parthead){display:flex;flex-direction:column;align-items:flex-start;gap:var(--s4)}
:is(.pagehead,.parthead) > .label + *{margin-top:calc(var(--s2) - var(--s4))}
:is(.pagehead,.parthead) > p:not(.label){color:var(--ink-quiet)}
.pagehead > .t-display{max-width:13em}
.pagehead > .t-headline{max-width:20em}
.pagehead > .t-lead{max-width:34em}
.parthead > .t-prose{max-width:38em}
/* the way back of a page further in: a ghost button whose icon stands on the content line */
.pagehead > .btn.ghost:first-child{margin-left:calc(-1 * var(--pad-row))}
.pagehead > .acts{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s3) var(--s5);margin-top:var(--s2)}
/* a part whose head stands beside its content from 900px - sticky under the bar - and above it on a phone */
.part.split{display:grid;gap:var(--s5)}
@media (min-width:900px){
  .part.split{grid-template-columns:300px minmax(0,1fr);gap:var(--gap-part)}
  .part.split > .parthead{position:sticky;top:calc(var(--bar) + 1px + var(--s5));align-self:start}
}

/* ================= LINK ================= */
/* text that leads somewhere, in the accent - it moves the person on - and underlined, so colour never carries it alone.
   A bare `a` inside a screen or a page is one, at no specificity, so every component's own anchor keeps its look. */
:where(.screen,.hk) :where(a:not([class])), .textlink{color:var(--accent);text-decoration-line:underline;text-decoration-thickness:1px;
  text-underline-offset:.2em;text-decoration-color:var(--accent-edge);border-radius:var(--r-mark)}
:where(.screen,.hk) :where(a:not([class])):visited, .textlink:visited{color:var(--accent)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) :where(.screen,.hk) :where(a:not([class])):hover,:where(html:not(.ag-picking)) .textlink:hover{text-decoration-color:currentColor} }
/* a press is seen under a finger: the line comes up full and thick at once */
:where(.screen,.hk) :where(a:not([class])):active, .textlink:active{text-decoration-color:currentColor;text-decoration-thickness:2px}
/* the focus edge hugs the words: a text link has no box to draw it inside */
:where(.screen,.hk) :where(a:not([class])):focus-visible, .textlink:focus-visible{outline:var(--ring) solid var(--focus);outline-offset:2px}
/* in a line that already speaks in a colour - a notice, a refusal under a field - the link takes that colour */
:where(.notice,.note) :is(a:not([class]),.textlink){color:inherit;text-decoration-color:color-mix(in srgb,currentColor 45%,transparent)}
/* a link line, aimed at alone: the words and an arrow, a tap tall, no line until the pointer is on it; its target reaches
   s2 past the words each side and gives it back as a negative margin, so the words stand on the content line */
.textlink.line{display:inline-flex;align-items:center;gap:var(--s1);min-height:var(--tap);padding:0 var(--s2);margin-inline:calc(-1 * var(--s2));
  font-size:14px;font-weight:500;text-decoration-line:none;border-radius:var(--r-card);transition:transform var(--m-state) var(--ease-out)}
.textlink.line svg{width:var(--mk-s);height:var(--mk-s);flex:none}
.textlink.line > span{text-decoration-line:underline;text-decoration-thickness:1px;text-underline-offset:.2em;text-decoration-color:transparent}
@media (pointer:fine){ .textlink.line{min-height:var(--tap-fine)} }
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .textlink.line:hover > span{text-decoration-color:currentColor} }
.textlink.line:active{transform:translateY(var(--press));transition-duration:0s}
.textlink.line:active > span{text-decoration-color:currentColor}
.textlink.line:focus-visible{outline-offset:calc(-1 * var(--ring))}
/* the name of a thing that opens it - an account in a table, a family over its exercises: ink at 600, its place says it
   leads; the line comes under a pointer */
.textlink.name{color:var(--ink);font-weight:600;text-decoration-color:transparent}
.textlink.name:visited{color:var(--ink)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .textlink.name:hover{text-decoration-color:color-mix(in srgb,currentColor 45%,transparent)} }
.textlink.name:active{text-decoration-color:currentColor}

/* ================= CARDLINK ================= */
/* a glass card that is one link - its states are a press row's: the lift wash under a pointer, a step down and a shade
   under a press, the focus edge drawn inside at r-group. Any glass card that leads on takes .press (Surface). */
:where(.glass.press){color:inherit;text-decoration:none;
  transition:box-shadow var(--m-state) var(--ease-out),transform var(--m-state) var(--ease-out)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .glass.press:hover{box-shadow:inset 0 0 0 999px var(--lift)} }
.glass.press:active{transform:translateY(var(--press));box-shadow:inset 0 0 0 999px var(--pressed);transition-duration:0s}
/* the card: its name and an arrow at the top, then its figures and a line of what it holds at the foot, so cards side
   by side line up by their figures whatever their names' length */
.cardlink{display:flex;flex-direction:column;gap:var(--s2);padding:var(--s4);color:var(--ink);container-type:inline-size}
.cardlink > .top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s2);margin-bottom:auto;padding-bottom:var(--s4);
  font-size:18px;line-height:1.25;font-weight:600}
.cardlink > .top svg{width:var(--mk);height:1lh;flex:none;color:var(--ink-faint)}
.cardlink > .figs > span{white-space:nowrap}
.cardlink > .meta{min-height:2lh;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* a narrow card (two to a phone's row) names itself in t-name */
@container (max-width:200px){ .cardlink > .top{font-size:15px} }

/* ---- data ---- */
/* ---- table: rows and columns of figures in one glass box that scrolls sideways on its own. The head is its
   label, rules are hairlines, numbers stand right; the chosen row is lit from its left edge as a List's is ---- */
.table{overflow:hidden;container-type:inline-size}
/* the box never scrolls itself (Scrollbar): its table scrolls sideways in a .roll, the box's foot holding the bar off
   the corners - only while the table is wider than the box (.scrolls, set by the Table): a table that fits keeps no foot */
/* .roll's own contain holds the other axis too: a box that cannot scroll down would keep a vertical swipe from the page,
   so only the sideways one is held */
.table > .roll{overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain auto}
@container (max-width:599px){ .table > .roll.scrolls{margin-bottom:calc(var(--r-group) / 2)} }
.table table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.35}
.table :is(th,td){height:var(--tap);padding:var(--gap-within) var(--gap-row);border-top:1px solid var(--hairline);text-align:left;vertical-align:middle;font-weight:400;white-space:nowrap}
/* a row reads on one line - the table scrolls sideways instead; a column of free text (a detail, a note) wraps, at least a
   readable measure wide */
.table :is(th,td).wrap{white-space:normal;min-width:16em}
@media (pointer:fine){ .table :is(th,td){height:var(--tap-fine)} }
.table :is(th,td):first-child{padding-left:var(--pad-row)}
/* a head that does not sort stands on the line of those that do: as tall as their button */
.table .head{display:inline-flex;align-items:center;min-height:var(--tap-tight)}
.table :is(th,td):last-child{padding-right:var(--pad-row)}
.table thead th{height:auto;padding-top:var(--s3);padding-bottom:var(--gap-line);border-top:0;vertical-align:bottom;white-space:nowrap;
  font-size:11px;line-height:1.25;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-quiet)}
/* the row's name: what the row is about, at a name's weight; a second line under it is its meta */
.table tbody th{font-weight:500;color:var(--ink)}
.table td .meta, .table tbody th .meta{display:block;font-weight:400}
/* a figure stands right, in tabular numerals, never broken; its unit quiet */
.table .num{text-align:right;white-space:nowrap}
/* a value in code in a cell keeps whole: it breaks only at its spaces */
.table code{overflow-wrap:normal}
/* a row set aside (an expired key, a failed entry) is quiet across, its name too */
.table tbody tr.quiet > *{color:var(--ink-quiet)}
.table .num small{font-size:inherit;color:var(--ink-quiet)}
/* a chip in a cell is a tap tall under a finger: the cell gives it its padding, so the row stays a tap */
.table td:has(> .chip){padding-block:0}
/* a cell that holds a control (a Toggle, a small Button) is as narrow as the control */
.table .ctl{width:1%;white-space:nowrap}
.table .ctl .toggle{vertical-align:middle}
.table :is(td,th) :is(.chip,.status) + :is(.chip,.status), .table :is(td,th) > a + :is(.chip,.status){margin-left:var(--gap-line)}
.table tfoot td, .table tfoot th{font-weight:600;color:var(--ink)}
/* the chosen row: the one open beside the table */
.table tbody tr.sel{background:var(--lit-left)}
.table tbody tr.sel > th{font-weight:600}
/* a row that is a press: the whole row opens its item; its name is the link the keyboard reaches */
.table tr.press{cursor:pointer}
.table tr.press > *{transition:box-shadow var(--m-state) var(--ease-out)}
.table tr.press a{color:inherit;text-decoration:none;outline:0}
.table tr.press:has(a:focus-visible){outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .table tr.press:hover > *{box-shadow:inset 0 0 0 999px var(--lift)} }
.table tr.press:active > *{box-shadow:inset 0 0 0 999px var(--shade, color-mix(in srgb,var(--ink) 14%,transparent));transition-duration:0s}
/* a sortable head: its words are a button; the column it is sorted by is in ink with an arrow in the accent, which
   stands on the side away from the column's edge, so the words never move */
.table th .sort{display:inline-flex;align-items:center;gap:var(--s1);min-height:var(--tap-tight);margin:0 calc(-1 * var(--s1));padding:0 var(--s1);border-radius:var(--r-mark);
  font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;cursor:pointer}
.table th.num .sort{flex-direction:row-reverse}
.table th .sort svg{width:var(--mk-s);height:var(--mk-s);stroke-width:2.2;color:var(--accent);opacity:0;transition:rotate var(--m-state) var(--ease-move)}
.table th:is([aria-sort="ascending"],[aria-sort="descending"]) .sort{color:var(--ink)}
.table th:is([aria-sort="ascending"],[aria-sort="descending"]) .sort svg{opacity:1}
.table th[aria-sort="descending"] .sort svg{rotate:180deg}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .table th .sort:hover{box-shadow:inset 0 0 0 999px var(--lift)} }
@media (prefers-reduced-motion:reduce){ .table th .sort svg{transition:none} }
/* nothing to show: one row across the table that says what is missing */
.table td.empty{height:auto;padding:var(--s5) var(--pad-row);color:var(--ink-quiet);white-space:normal}
/* the first rows on their way: the head stands, and quiet bars hold the rows' places until they come; nothing in the
   table answers a hand meanwhile - no sort, no row to open */
.table[aria-busy="true"]{cursor:progress}
.table[aria-busy="true"] :is(button,a,tr){pointer-events:none}
.table[aria-busy="true"] th .sort{color:var(--ink-faint)}
.table tr.wait td i{display:block;width:var(--w,60%);height:var(--gap-line);border-radius:var(--r-pill);background:var(--track)}
.table tr.wait td.num i{margin-left:auto}
/* NARROWER THAN A TABLET, the box scrolls sideways under its first column, which stays: it takes the glass's own ground
   over the screen's, a hairline at its side, and the chosen row's light, so a figure never shows through a name */
@container (max-width:599px){
  .table :is(th,td){background:linear-gradient(var(--glass),var(--glass)),var(--ground)}
  .table :is(th,td):first-child{position:sticky;left:0;z-index:1;box-shadow:inset -1px 0 0 var(--hairline)}
  .table tbody tr.sel{background:none}
  .table tbody tr.sel > *{background:linear-gradient(var(--accent-tint),var(--accent-tint)),linear-gradient(var(--glass),var(--glass)),var(--ground)}
  .table tbody tr.sel > :first-child{background:var(--lit-left),linear-gradient(var(--glass),var(--glass)),var(--ground)}
  :where(html:not(.ag-picking)) .table tr.press:hover > :first-child{box-shadow:inset -1px 0 0 var(--hairline),inset 0 0 0 999px var(--lift)}
}

/* ---- a chart's series: a single series is the accent; several take --c, cat-1, cat-2, ... in order, set on the
   series' group; an earlier window set against the one read is context, dashed and quiet ---- */
.chart .sr > .ln{stroke:color-mix(in oklch,var(--c,var(--accent)),var(--ink) var(--data-deep,0%))}
.chart .sr > .pt{fill:color-mix(in oklch,var(--c,var(--accent)),var(--ink) var(--data-deep,0%))}
.chart .ln.prior{stroke:var(--ink-faint);stroke-width:1.5;stroke-dasharray:4 3}
/* the held reading, on each series: the point ringed in the ground it stands on */
.chart .hp{fill:color-mix(in oklch,var(--c,var(--accent)),var(--ink) var(--data-deep,0%));stroke:var(--well);stroke-width:2}
/* the key: the line or the dot of each series, the words beside it */
.legend{display:flex;flex-wrap:wrap;align-items:center;gap:var(--gap-line) var(--gap-block);font-size:11px;line-height:1.25;color:var(--ink-quiet)}
.legend > span{display:inline-flex;align-items:center;gap:var(--gap-line)}
:is(.legend,.tip) i{display:inline-block;flex:none;width:14px;height:2px;border-radius:var(--r-pill);background:color-mix(in oklch,var(--c,var(--accent)),var(--ink) var(--data-deep,0%))}
:is(.legend,.tip) i.dot{width:10px;height:10px;border-radius:50%}
:is(.legend,.tip) i.prior{height:0;background:none;border-top:1.5px dashed var(--ink-faint);border-radius:0}
:is(.legend,.tip) i.dot.prior{height:10px;border:0;border-radius:50%;background:var(--prior-fill)}
.tip p > span:first-child{display:inline-flex;align-items:center;gap:var(--gap-line)}
.tip p.sum{margin-top:var(--s1);padding-top:var(--s1);border-top:1px solid var(--hairline)}

/* ---- bar chart: columns from one baseline, single, stacked or grouped; horizontal bars for a few categories ---- */
:root, :is(.screen,.hk){ --prior-fill:color-mix(in srgb,var(--ink) 20%,transparent); }
.chart .br{fill:var(--c,var(--accent));stroke:color-mix(in oklch,var(--c,var(--accent)),var(--ink) var(--data-deep,0%));stroke-width:var(--data-edge,0px)}
.chart .br.prior{fill:var(--prior-fill)}
/* the held column: a wash behind its band, as a hover is a wash */
.chart .hb{fill:var(--lift);stroke:none}
/* a value standing on its bar, where it fits */
.chart .vl{font:500 11px var(--font-sans);fill:var(--ink-quiet)}
.chart .vl.on{fill:var(--ink);font-weight:600}
.chart .ax line.base{stroke:var(--ink-faint)}
/* horizontal bars: a name, the bar from one edge, its figure at its end; --p is the bar's share of the longest */
.hbars{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--gap-row) var(--s3);align-items:center;font-size:13px}
.hbars > .n{color:var(--ink-quiet);white-space:nowrap}
.hbars > .b{display:flex;align-items:center;gap:var(--gap-row);min-width:0}
.hbars .bk{display:flex;gap:var(--gap-within);flex:none;width:calc(var(--p,0) * (100% - 7ch) / 100);min-width:2px;height:var(--s4);border-radius:0 var(--r-mark) var(--r-mark) 0;overflow:hidden}
.hbars .bk > i{flex:var(--v,1) 1 0;min-width:var(--gap-within);background:var(--c,var(--accent));box-shadow:inset 0 0 0 var(--data-edge,0px) color-mix(in oklch,var(--c,var(--accent)),var(--ink) var(--data-deep,0%))}
.hbars .b > b{font-weight:600;color:var(--ink);white-space:nowrap}

/* ---- share: a proportion, not work done - the bar's track with a neutral fill, or a category's; a whole of
   several parts side by side, a gap between them. Never Progress's blue to green, never done ---- */
.bar.share > i{background:var(--c,var(--ink-quiet));background-size:auto}
.bar.share.parts{display:flex;gap:var(--gap-within);background:none}
.bar.share.parts > i{flex:var(--v,1) 1 0;min-width:var(--gap-within);border-radius:0}

/* ---- tiles for a dashboard: as many columns as the width holds, up to --n, never narrower than a figure needs;
   tiles grouped under a label; a tile that leads to where its figure is analysed; a figure past its limit ---- */
.tiles.fit{grid-template-columns:repeat(auto-fill,minmax(max(10rem,calc((100% - (var(--n,4) - 1) * var(--gap-line)) / var(--n,4))),1fr))}
.tileset{display:flex;flex-direction:column;gap:var(--gap-line);min-width:0}
.tileset > .label{padding:0 var(--s1)}
a.tile{position:relative;display:block;color:inherit;text-decoration:none;transition:box-shadow var(--m-state) var(--ease-out),transform var(--m-state) var(--ease-out)}
a.tile > .ch{position:absolute;top:var(--s2);right:var(--s2);width:var(--mk-s);height:var(--mk-s)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) a.tile:hover{box-shadow:inset 0 0 0 999px var(--lift)} }
a.tile:active{transform:translateY(var(--press));box-shadow:inset 0 0 0 999px color-mix(in srgb,var(--ink) 14%,transparent);transition-duration:0s}
/* past its limit: "look here" in amber, past the point where the service stops in refused - an edge and the words
   that say the limit; the figure stays in ink */
.tile.warn{border-color:var(--accent-2-edge)}
.tile.bad{border-color:color-mix(in srgb,var(--refused) 45%,transparent);background:color-mix(in srgb,var(--refused) 12%,transparent)}
.tile.warn .d{color:var(--accent-2)}
.tile.bad .d{color:var(--refused)}
.tile .d:has(> svg){display:flex;align-items:center;gap:var(--s1)}
.tile .d > svg{flex:none;width:var(--mk-s);height:var(--mk-s)}

/* ---- code: the system's monospace (t-code) for what a person types or a machine wrote ---- */
/* inline: a command or an id in a sentence, a little smaller than the words around it, on a recessed ground */
:where(.screen,.hk) code{font-family:var(--font-mono);font-size:.92em;font-variant-ligatures:none;padding:0 var(--s1);border-radius:var(--r-mark);background:var(--sink);color:var(--ink);overflow-wrap:anywhere}
:where(.screen,.hk) :is(pre,.code-block,.log,.term) code{padding:0;background:none;font-size:inherit}
/* a block: lines kept as written, scrolled sideways rather than broken; .wrap breaks them */
.code-block{margin:0;padding:var(--s3) var(--s4);border-radius:var(--r-card);background:var(--sink);color:var(--ink);
  font:400 13px/1.5 var(--font-mono);font-variant-ligatures:none;white-space:pre;overflow-x:auto;tab-size:2}
.code-block.wrap{white-space:pre-wrap;overflow-wrap:anywhere}
/* a log: a line per entry - its time, its level in words, the message - in columns the longest of each sets */
.log{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);align-content:start;padding:var(--s2) 0;border-radius:var(--r-card);background:var(--sink);color:var(--ink);
  font:400 13px/1.5 var(--font-mono);font-variant-ligatures:none;overflow:auto;overscroll-behavior:contain}
.log > p{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;column-gap:var(--s3);padding:0 var(--s3)}
.log > p > time{color:var(--ink-faint)}
.log > p > .lv{color:var(--ink-faint)}
.log > p > .lv.warn{color:var(--pending)}
.log > p > .lv.err{color:var(--refused)}
.log > p > :last-child{white-space:pre-wrap;overflow-wrap:anywhere}
.log.nowrap > p > :last-child{white-space:pre;overflow-wrap:normal}
/* a turn of the log: the process started again */
.log > p.start{margin-top:var(--s1);padding-top:var(--s1);border-top:1px solid var(--hairline);font-weight:600}
.log > p.start:first-child{margin-top:0;padding-top:0;border-top:0}
/* scrolled up from the end, the log holds still and says what came since: one press back to the newest line */
.log > .tail{grid-column:1 / -1;justify-self:center;position:sticky;bottom:var(--s2);margin-top:var(--s2);font-family:var(--font-sans)}
/* a terminal: a session of commands and answers, on the dark theme's ground in every theme (data-theme="dark" on it) */
.term{border-radius:var(--r-group);background:var(--ground);border:1px solid var(--glass-edge);color:var(--ink);overflow:hidden;
  font:400 13px/1.5 var(--font-mono);font-variant-ligatures:none}
.term > header{display:flex;align-items:center;gap:var(--gap-line);padding:var(--s3) var(--pad-row);border-bottom:1px solid var(--hairline);color:var(--ink-faint)}
.term > header > i{width:var(--s2);height:var(--s2);border-radius:50%;background:var(--track)}
.term > header > span{margin-left:var(--s2)}
.term > .lines{display:flex;flex-direction:column;gap:var(--gap-line);padding:var(--s4) var(--pad-row);white-space:pre-wrap;overflow-wrap:anywhere}
.term .you{color:var(--accent-lit)}
.term .you::before{content:'$ ';color:var(--ink-faint)}

/* ---- inputs ---- */
/* ---- select: a choice among many in a form. Closed it is a Field whose box is a button - the answer and a chevron;
   open, under a precise pointer its answers hang under the box (.select-list), under a finger they rise in a Sheet of
   rows (List). The box is as wide as its longest answer (--d characters), never as wide as its name ---- */
.field.select .input{align-self:flex-start;gap:var(--gap-row);padding:0 var(--s2) 0 var(--s3);text-align:left;cursor:pointer;
  transition:box-shadow var(--m-state) var(--ease-out)}
.field.select.wide .input{align-self:stretch}
.field.select .val{flex:1;min-width:calc(var(--d,6) * 1ch);font:500 16px/1 var(--font-sans);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* nothing chosen yet: a dash in the placeholder's ink, never an instruction */
.field.select .val:empty::before{content:'-';color:var(--ink-faint);font-weight:400}
.field.select .cv{width:var(--mk);height:var(--mk);flex:none;color:var(--ink-quiet);transition:rotate var(--m-state) var(--ease-move)}
/* open: the box keeps the focus edge - the keys act on it - and the chevron turns to the list */
.field.select .input[aria-expanded="true"]{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.field.select .input[aria-expanded="true"] .cv{rotate:180deg}
.field.select .input:disabled{opacity:var(--o-off)}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .field.select .input:not(:disabled):hover{box-shadow:inset 0 0 0 1px var(--field-in-edge),inset 0 0 0 999px var(--lift)} }
/* in a List of settings the row is the closed select: its chevron-down at the end */
.row > .cv{width:var(--mk);height:var(--mk);flex:none;color:var(--ink-faint)}
.field.bad.select .input{box-shadow:inset 0 0 0 1.5px var(--refused)}
@media (prefers-reduced-motion:reduce){ .field.select .cv{transition:none} }

/* the answers under the box: a float laid over the ground so it is opaque, at the page's top level (a portal) as
   ChoiceMenu's list; at least as wide as the box (--w, set by the app), eight and a half rows high, so the cut row says
   there is more; the rest scrolls on the thin bar */
.select-list{position:fixed;z-index:var(--z-pop);width:max-content;min-width:var(--w,200px);max-width:min(360px, calc(100vw - 2 * var(--s3)));
  display:flex;flex-direction:column;max-height:calc(var(--tap-fine) * 8.5 + 2 * var(--s3));overflow:hidden;padding:var(--s3) var(--gap-line);
  border-radius:var(--r-group);background:linear-gradient(var(--float),var(--float)),var(--ground);border:1px solid var(--glass-edge);
  box-shadow:var(--lift-float);transform-origin:left top;font:400 14px/1.3 var(--font-sans);color:var(--ink);outline:0}
.select-list.up{transform-origin:left bottom}
.select-list > .roll{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.select-list [role="option"]{display:flex;align-items:center;gap:var(--gap-row);min-height:var(--tap-fine);padding:var(--s1) 10px;border-radius:var(--r-inner);cursor:pointer}
.select-list [role="option"] .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.select-list [role="option"] .meta{font-size:12px}
.select-list [role="option"] svg{width:var(--mk);height:var(--mk);flex:none;margin-left:auto;color:var(--accent);stroke-width:2.2}
/* the answer in force: lit from its left, at 600, a check at its end */
.select-list [role="option"][aria-selected="true"]{background:var(--lit-left);font-weight:600}
/* the answer the pointer or the keys stand on: the lift; reached by the keys it also wears the focus edge */
.select-list [role="option"].active{box-shadow:inset 0 0 0 999px var(--lift)}
.select-list:focus-visible [role="option"].active{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.select-list [role="option"][aria-disabled="true"]{opacity:var(--o-off);cursor:default}
/* answers in groups: the group's label, and a hairline above every group but the first */
.select-list .label{display:block;padding:var(--s2) 10px var(--s1);color:var(--ink-faint)}
.select-list .label:not(:first-child){margin-top:var(--s1);border-top:1px solid var(--hairline)}

/* ---- a field of many lines (.field.area): the Field's box holding a textarea that grows with its text from --rows
   lines to --rows-max, then scrolls; a counter at the note's end when the text has a limit ---- */
.field.area .input{height:auto;align-items:stretch;padding:var(--s2) var(--s3)}
.field.area textarea{display:block;flex:1;width:100%;min-width:0;resize:none;outline:0;font:400 16px/1.45 var(--font-sans);
  field-sizing:content;min-height:calc(var(--rows,3) * 1.45em);max-height:calc(var(--rows-max,10) * 1.45em);overflow-y:auto}
.field.area textarea::placeholder{color:var(--ink-faint)}
/* a template or code: the system's monospace, lines kept as written; at 16px under a finger, where a smaller face zooms */
.field.area.mono textarea{font:400 16px/1.5 var(--font-mono);font-variant-ligatures:none;tab-size:2;white-space:pre;overflow-x:auto;
  min-height:calc(var(--rows,3) * 1.5em);max-height:calc(var(--rows-max,16) * 1.5em)}
@media (pointer:fine){ .field.area.mono textarea{font-size:13px} }
/* the note and the counter on one line: the count at its end, in the note's ink; past the limit, refused with the field */
.field .notes{display:flex;align-items:baseline;gap:var(--gap-row)}
.field .notes .note{flex:1;min-width:0}
.field .count{flex:none;margin-left:auto;font-size:13px;line-height:1.35;color:var(--ink-faint);font-variant-numeric:tabular-nums}
.field.bad .count{color:var(--refused)}

/* ---- slider: a value on a range. A 4px track in --track; the part up to the value and the knob in ink - a value the
   person set is neither the act nor a choice lit among others; the knob is the Toggle's. --p is the value's share of
   the range, 0-100. A position in time (.time, a clip's playhead) runs sea to blue, as every time does ---- */
.slider{--thumb:22px;--from:color-mix(in srgb,var(--ink) 60%,transparent);--to:var(--from);
  --at:calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--p,0) / 100);
  position:relative;flex:1;min-width:0;display:flex;align-items:center;height:var(--tap);padding:0 var(--s2);border-radius:var(--r-pill)}
@media (pointer:fine){ .slider{--thumb:16px;height:var(--tap-fine)} }
.slider.time{--from:var(--prog-start);--to:color-mix(in oklch,var(--prog-start),var(--accent) calc(var(--p,0) * 1%))}
.slider input{-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%;margin:0;padding:0;background:none;cursor:pointer;outline:0}
.slider input::-webkit-slider-runnable-track{height:4px;border-radius:var(--r-pill);
  background:linear-gradient(90deg,var(--from),var(--to) var(--at),var(--track) var(--at))}
.slider input::-moz-range-track{height:4px;border-radius:var(--r-pill);background:var(--track)}
.slider input::-moz-range-progress{height:4px;border-radius:var(--r-pill);background:linear-gradient(90deg,var(--from),var(--to))}
.slider input::-webkit-slider-thumb{-webkit-appearance:none;width:var(--thumb);height:var(--thumb);margin-top:calc((4px - var(--thumb)) / 2);border:0;border-radius:50%;
  background:var(--knob);box-shadow:inset 0 0 0 1px var(--field-in-edge),0 1px 3px color-mix(in srgb,var(--scrim) 60%,transparent);
  transition:scale var(--m-tap) var(--ease-out)}
.slider input::-moz-range-thumb{width:var(--thumb);height:var(--thumb);border:0;border-radius:50%;
  background:var(--knob);box-shadow:inset 0 0 0 1px var(--field-in-edge),0 1px 3px color-mix(in srgb,var(--scrim) 60%,transparent)}
/* held: the knob grows a little under the finger or the pointer that moves it */
.slider input:active::-webkit-slider-thumb{scale:1.15}
/* focus: the slider has no edge, so it gets one - the pill around it, drawn inside */
.slider:has(input:focus-visible){outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.slider:has(input:disabled){opacity:var(--o-off)}
/* steps a person aims at (a few, never every step): a tick under the track at each, --n intervals */
.slider.ticks::after{content:'';position:absolute;left:calc(var(--s2) + var(--thumb) / 2);right:calc(var(--s2) + var(--thumb) / 2 - 1px);top:calc(50% + var(--s2));height:5px;pointer-events:none;
  background:linear-gradient(90deg,var(--ink-faint) 1px,transparent 1px) 0 0 / calc((100% - 1px) / var(--n,4)) 100% repeat-x}
@media (prefers-reduced-motion:reduce){ .slider input::-webkit-slider-thumb{transition:none} }
/* a slider in a row: its name, the slider, the figure typed beside it (a Field's number box) */
.row > .slider{flex:1}
.row > .field.num{flex:none}
/* the figure beside a slider keeps room for its unit, so the boxes of a column of sliders with one --d line up */
.slider + .field.num .input{min-width:calc(var(--d,4) * 1ch + 2px + 2 * var(--s3) + 2em);justify-content:flex-end}

/* ---- colour: a swatch that opens a palette, and the colour written as hex beside it, in one Field box ---- */
.swatch{position:relative;width:24px;height:24px;flex:none;border-radius:50%;background:var(--c,transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 24%,transparent);cursor:pointer}
/* drawn smaller than a pointer's target: it reaches to the target's size, as a Toggle does */
.swatch::before{content:'';position:absolute;inset:calc((var(--tap-fine) - 24px) / -2)}
@media (pointer:coarse){ .swatch::before{inset:calc((var(--tap) - 24px) / -2)} }
.field.colour .input{gap:var(--gap-row);padding-left:calc((var(--tap) - 24px) / 2)}
@media (pointer:fine){ .field.colour .input{padding-left:calc((var(--tap-fine) - 24px) / 2)} }
.field.colour .input input{flex:none;width:calc(var(--d,7) * 1ch + 2px);text-transform:lowercase}
.field.colour .swatch[aria-expanded="true"]{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 24%,transparent),0 0 0 2px var(--field-in),0 0 0 calc(2px + var(--ring)) var(--focus)}
/* the palette: a float under the swatch (z-pop), the categories in rows of eight, the hex and the device's picker at its foot */
.palette{position:fixed;z-index:var(--z-pop);width:max-content;padding:var(--pad-card);display:flex;flex-direction:column;gap:var(--gap-head);
  border-radius:var(--r-group);background:linear-gradient(var(--float),var(--float)),var(--ground);border:1px solid var(--glass-edge);
  box-shadow:var(--lift-float);transform-origin:left top;font:400 14px/1.4 var(--font-sans);color:var(--ink)}
.palette .label{color:var(--ink-faint);margin:0 2px calc(var(--gap-line) - var(--gap-head))}
.palette .swatches{display:grid;grid-template-columns:repeat(8,28px);gap:var(--s2) var(--gap-line)}
.palette .swatch{width:28px;height:28px}
.palette .swatch::before{inset:-4px}
/* the colour in force: a check in the ground's ink, which stands on every category in both themes, and the accent's
   ring around it with the float between */
.swatch[aria-pressed="true"]{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 24%,transparent),0 0 0 2px var(--float),0 0 0 calc(2px + var(--ring)) var(--accent)}
.swatch svg{position:absolute;inset:0;margin:auto;width:var(--mk-s);height:var(--mk-s);color:var(--ground);stroke-width:3}
.palette .any{display:flex;align-items:flex-end;gap:var(--gap-row)}
.palette .any .field{flex:1}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .swatch:not([disabled]):hover{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 24%,transparent),inset 0 0 0 999px var(--lift)} }
.swatch:active{transform:translateY(var(--press))}
/* under a finger the palette is a Sheet: each swatch a tap, as many to a row as the sheet holds */
.sheet .swatches{display:grid;grid-template-columns:repeat(auto-fill,var(--tap));justify-content:space-between;gap:var(--gap-row)}
.sheet .swatches .swatch{width:var(--tap);height:var(--tap)}
.sheet .swatches .swatch::before{inset:0}

/* ---- search: the clear inside the box, while it holds a query - an Icon alone (.ib), a tap under a finger and
   tap-fine under a pointer, its icon's centre as far from the box's end as the lens's from its start ---- */
.search :is(.clear,.trail){margin-right:calc((var(--mk) - var(--tap)) / 2)}
@media (pointer:fine){ .search :is(.clear,.trail){margin-right:calc((var(--mk) - var(--tap-fine)) / 2)} }
.search:has(input:placeholder-shown) .clear{display:none}
/* an act in the lens's place (.lead): its icon where the lens stands, the target overhanging on both sides so the words
   start where they do after the lens; an act in the clear's place (.trail) stays while the box is empty */
.search .lead{margin:0 calc((var(--mk) - var(--tap)) / 2)}
@media (pointer:fine){ .search .lead{margin:0 calc((var(--mk) - var(--tap-fine)) / 2)} }
/* a chip before the words (what the query is about): never more than under half the box, its words cut short */
.search > .chip{flex:none;max-width:45%}
.search > .chip svg{width:14px;height:14px}
/* a field that is off says so in its words, its acts dimmed as any disabled Icon alone */
.search:has(input:disabled) input::placeholder{opacity:var(--o-off)}
.search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}

/* ---- a ghost chip: an option offered but not chosen and not a filter - no ground, no edge, the chip's own ink; chosen,
   it wears the chosen look as any chip ---- */
.chip.ghost:not([aria-pressed="true"]){background:none;box-shadow:none}
@media (hover:hover) and (pointer:fine){ :where(html:not(.ag-picking)) .chip.ghost:not([aria-pressed="true"]):is(button,a,label):not([disabled]):hover{box-shadow:inset 0 0 0 999px var(--lift)} }
.chip.ghost:not([aria-pressed="true"]):is(button,a,label):active{box-shadow:inset 0 0 0 999px var(--pressed)}

/* ---- list: a row or a chip that is a link keeps the row's ink and no underline - a way on, not a link in prose ---- */
:where(.screen,.hk) a:is(.row,.chip){color:inherit;text-decoration:none}

/* ---- list: a dense row for a long list in a tool under a pointer - tap-fine high, a tap under a finger ---- */
.row.dense{min-height:var(--tap);padding-block:var(--s1)}
@media (pointer:fine){ .row.dense{min-height:var(--tap-fine)} }
.row.dense .ic{width:24px;height:24px;border-radius:var(--r-mark)}
.row.dense .ic svg{width:var(--mk-s);height:var(--mk-s)}
.row.dense .t p{margin-top:0}
.row.dense .sel-ic{width:20px;height:20px}
.row.dense .sel-ic svg{width:12px;height:12px}
/* a group's foot act: what leads on from the group - more of it in place, or the whole of it elsewhere. Quieter than
   the rows it follows: no mark, the words as a ghost button's, a tap high */
.row.more{min-height:var(--tap);font-size:14px;font-weight:500;color:var(--ink-quiet)}
@media (pointer:fine){ .row.more{min-height:var(--tap-fine)} }

/* ---- Segmented: a segment keeps room beside its words when the switch is only as wide as they are (a switch in a
   strip, a tool's top row); in a switch that fills its line the segments share the width as before */
.seg button{padding-inline:var(--s3);white-space:nowrap}

/* ---- layouts and navigation ---- */
/* ---- the workspace: the Rail, an optional dock, and the stage - a canvas the stage's size with the controls floating
   over its edges. The stage is a grid of its edges laid over the canvas, so a float ends where the next one begins
   whatever their heights, and nothing is placed by a measure of another float ---- */
.workspace{display:flex;height:100%;min-height:0;container:workspace / inline-size}
.workspace > .rail{flex:none;height:100%}
/* the dock: a pane of the work's long content (a list to find in, a shape's settings) standing beside the stage rather
   than over it - as wide as a pane's list, never narrower than a panel, and scrolling on its own */
.workspace > .dock{flex:none;width:min(var(--pane-list),max(var(--panel),42%));min-height:0;overflow-x:hidden;overflow-y:auto;
  padding:var(--pad-pane);border-right:1px solid var(--glass-edge);container-type:inline-size}
.stage{position:relative;isolation:isolate;flex:1;min-width:0;min-height:0;overflow:hidden;display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;
  grid-template-areas:"top top top" "start . end" "foot foot foot";gap:var(--gap-row);padding:var(--pad-card);
  container:stage / inline-size}
/* the canvas lies under everything and draws its own ground; until it draws, the screen's aurora shows through */
.stage > .canvas{position:absolute;inset:0;z-index:0}
.stage > .canvas > :is(canvas,svg,img,video){display:block;width:100%;height:100%;touch-action:none}
/* the edges let the canvas take the pointer everywhere a float is not */
.stage > :is(.top,.start,.end,.foot){position:relative;z-index:var(--z-sticky);min-width:0;min-height:0;pointer-events:none}
.stage > :is(.top,.start,.end,.foot) > *{pointer-events:auto}
.stage > .top{grid-area:top;display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--gap-row)}
.stage > .start{grid-area:start;display:flex;flex-direction:column;align-items:flex-start;gap:var(--gap-row)}
.stage > .end{grid-area:end;display:flex;flex-direction:column;align-items:flex-end;gap:var(--gap-row)}
.stage > .foot{grid-area:foot;display:flex;flex-direction:column;align-items:center;gap:var(--gap-row)}

/* a panel: a float with the corners of a group - its head (the name and the close), its rows, which scroll while the
   head and the acts stay, and its acts; the parts are named as a Sheet's */
.panel{display:flex;flex-direction:column;min-width:0;min-height:0;max-width:100%;padding:var(--s2);border-radius:var(--r-group)}
.panel > .sh{flex:none;display:flex;align-items:center;gap:var(--gap-row);padding-left:var(--s2)}
.panel > .sh .t{flex:1;min-width:0}
.panel > .rows{flex:0 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;display:flex;flex-direction:column;gap:var(--gap-head);padding:var(--s1) var(--s1) var(--s2)}
.panel > .rows > *{flex:none}
.panel > .acts{flex:none;display:flex;gap:var(--gap-row);padding:var(--s2) var(--s1) 0}
.panel > .acts .btn{flex:1}
/* a panel of one line: words and the tools beside them (the top row's bars) */
.panel.line{flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--gap-row)}
.panel.line > .t{flex:1;min-width:0;padding-left:var(--s2)}
/* at the stage's sides a panel never takes more than half the stage, and shrinks to the room between the top row
   and the foot, its rows scrolling */
.stage > :is(.start,.end) > .panel{flex:0 1 auto;width:min(var(--panel),50cqw)}
.stage > :is(.start,.end) > .panel.wide{width:min(var(--panel-wide),50cqw)}
.stage > .start > .panel{transform-origin:top left}
.stage > .end > .panel{transform-origin:top right}
/* a panel arrives from a little smaller on the spring and leaves the same way, quicker, without one */
.panel.arriving{animation:panel-in var(--m-spring) var(--ease-spring),fade-in var(--m-tap) var(--ease-out)}
.panel.leaving{animation:panel-out var(--m-state) var(--ease-in) forwards}
@keyframes panel-in{from{transform:scale(.96)}}
@keyframes panel-out{to{transform:scale(.96);opacity:0}}

/* a strip: a float of one line - along the foot the snapshots, the player, a sled's track; in the top row a view's
   switch. A pill, as what it holds is chips, segments and round icons */
.strip{display:flex;align-items:center;gap:var(--gap-line);padding:var(--s1);border-radius:var(--r-pill)}
.stage > .foot > .strip{width:min(var(--strip),100%)}
.strip > .label{flex:none;padding-left:var(--s3)}
.strip > .figs{flex:none;min-width:4ch;padding-right:var(--s3);text-align:right}
/* a run of chips longer than the strip slides sideways inside it */
.strip > .line{flex:1;min-width:0;gap:var(--gap-line);overflow-x:auto}
.strip > .line > *{flex:none;white-space:nowrap}
/* a strip that holds one switch is the switch's own ground: the segments stand on the float, its padding their inset */
.strip:has(> .seg:only-child){padding:0}
.strip > .seg{background:none}
.strip > .slider{flex:1;min-width:0;margin-inline:var(--s2)}

/* under 720px of the stage a side panel takes the stage's width between the top row and the foot; one stands at a time */
@container stage (max-width:720px){
  .stage > :is(.start,.end){grid-column:1 / -1;align-items:stretch}
  .stage > :is(.start,.end) > :is(.panel,.panel.wide){width:auto}
}

@media (prefers-reduced-motion:reduce){
  .panel.arriving{animation:fade-in var(--m-tap) linear}
  .panel.leaving{animation:fade-out var(--m-tap) linear forwards}
}

/* ---- panes whose list is the wide one: a table takes the room and the item opened from it a column at its side.
   With nothing opened the list has the frame alone ---- */
.panes.wide{grid-template-columns:minmax(0,1fr) var(--pane-item)}
.panes.wide > :only-child{grid-column:1 / -1}

/* ---- a rail of many places: the places in groups, each under its label, the tabs closer together. Where the rail keeps
   its icons alone, a group's label gives way to a short line on the icons' axis, so the groups still read ---- */
.rail.grouped{gap:var(--gap-within);overflow-x:hidden;overflow-y:auto}
.rail.grouped > :is(a,.label,.brand){flex:none}
.rail.grouped > .brand{margin-bottom:var(--s3)}
/* the label's words start where the tabs' icons do (the tabs' own 13px inset) */
.rail > .label{position:relative;display:flex;align-items:flex-end;height:var(--s6);padding:0 13px var(--gap-line);white-space:nowrap;color:var(--ink-faint);transition:color var(--m-state)}
.rail > .label::after{content:'';position:absolute;left:var(--s3);top:50%;width:var(--s5);height:1px;background:color-mix(in srgb,var(--ink-faint) 45%,transparent);opacity:0;transition:opacity var(--m-state)}
.rail.icons > .label{color:transparent}
.rail.icons > .label::after{opacity:1}
@media (prefers-reduced-motion:reduce){ .rail > .label, .rail > .label::after{transition:none} }

/* ---- the phone's More: the tab bar's last tab opens a sheet of the places it has no room for; it is lit while the
   place shown is one of them. A button, so it wears the tabs' look itself ---- */
.tabbar > button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:var(--r-pill);color:var(--ink-faint);font-size:11px;font-weight:500}
.tabbar > button svg{width:var(--mk-l);height:var(--mk-l)}
.tabbar > button[aria-current="page"]{color:var(--ink);background:var(--lit-mark);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.tabbar > button[aria-current="page"] svg{color:var(--accent)}
.tabbar.glides > button[aria-current="page"]{background:none;box-shadow:none}

/* ---- a centred dialog leaves where it stands: it fades over m-state, keeping the transform that centres it. The
   phone's sheet-out (down 24px as it fades) replaced that transform, so a dialog slid to the bottom right as it went ---- */
.app .sheet.dialog.leaving{animation:fade-out var(--m-state) var(--ease-in) forwards}
@media (prefers-reduced-motion:reduce){
  .app .sheet.dialog.leaving{animation:none}
}
/* a list that floats off a field is portalled to the page's root, outside any reset: it resets its own controls */
:where(.select-list,.palette) :is(button,input){appearance:none;margin:0;border:0;background:none;font:inherit;color:inherit}

/* ---- the composer (Composer): where a message is written. The paragraphs (.txt, a textarea each), the media
   blocks between them and the acts' row are ONE bordered surface; the act that adds a picture leads the row, what the
   product puts at its end is the trail, and the figures of the limits stand between, quiet until they are near ---- */
.composer{display:flex;flex-direction:column;gap:var(--gap-line)}
.composer > .name{font-size:13px;font-weight:500;line-height:1.25;color:var(--ink-quiet)}
.composer > .line{display:flex;flex-direction:column;align-items:stretch;padding:6px 8px 6px 14px;
  border-radius:var(--r-card);background:var(--field-in);box-shadow:inset 0 0 0 1px var(--field-in-edge);color:var(--ink-quiet)}
.composer > .line:focus-within{outline:var(--ring) solid var(--focus);outline-offset:calc(-1 * var(--ring))}
.composer .blocks{display:flex;flex-direction:column;gap:var(--gap-line);min-width:0;padding-right:6px}
.composer .txt{display:block;width:100%;min-width:0;min-height:20px;max-height:120px;margin:0;padding:9px 0;border:0;background:none;resize:none;
  overflow-y:auto;font:400 16px/20px var(--font-sans);color:var(--ink);field-sizing:content;white-space:pre-wrap;overflow-wrap:anywhere}
.composer .txt::placeholder{color:var(--ink-faint)}
.composer textarea.txt:focus-visible{outline:0}
.composer .acts{display:flex;align-items:center;gap:var(--gap-line)}
.composer .acts > .sp{flex:1}
.composer .acts > .lead{margin-left:-6px}
.composer .acts > .trail{display:flex;align-items:center;gap:var(--gap-line);margin-right:-2px}
.composer .acts > .meta{font-variant-numeric:tabular-nums}
.composer .meta.bad{color:var(--refused)}
.composer > .note:not(.bad){margin:0;font-size:13px;line-height:1.35;color:var(--ink-faint)}
.composer > .note.bad{margin:0}
.media{position:relative;flex:none;align-self:flex-start;margin:0;max-width:100%;border-radius:var(--r-inner);overflow:hidden;background:var(--sink);line-height:0}
.media :is(img,video){display:block;max-width:100%;max-height:var(--media-h,240px);width:auto;height:auto}
.thread .media{--media-h:360px}
.media .x{position:absolute;top:var(--s1);right:var(--s1);width:32px;height:32px;border-radius:50%;display:grid;place-items:center;padding:0;border:0;background:var(--float);color:var(--ink);cursor:pointer}
.media .x svg{width:var(--mk-s);height:var(--mk-s)}
.media .len{position:absolute;left:var(--s1);bottom:var(--s1);padding:2px 8px;border-radius:var(--r-pill);background:var(--float);font-size:12px;font-weight:600;line-height:18px;color:var(--ink);font-variant-numeric:tabular-nums}
.media .pl{position:absolute;inset:0;margin:auto;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--float);color:var(--ink);pointer-events:none}
.media .pl svg{width:18px;height:18px;fill:currentColor;margin-left:2px}
.media .up{position:absolute;left:var(--s1);right:var(--s1);bottom:var(--s1);display:flex;flex-direction:column;gap:4px;padding:6px 8px;border-radius:var(--r-inner);background:var(--float);font-size:12px;line-height:16px;color:var(--ink);font-variant-numeric:tabular-nums}
.media .up .bar{width:100%}
.media.bad{box-shadow:inset 0 0 0 1px var(--refused)}

/* ---- a thread (Thread): a report and what follows it - messages under their bylines, the one the person must
   answer lit as a due row is, what happened to the thread as a quiet line among them, a reward on the kept tint ---- */
.thread{display:flex;flex-direction:column;gap:var(--gap-head)}
.msg{display:flex;flex-direction:column;gap:var(--gap-line);padding:var(--pad-row);border-radius:var(--r-group) var(--r-group) var(--r-group) var(--r-mark);align-self:flex-start;max-width:min(88%,560px)}
.msg.mine{align-self:flex-end;border-radius:var(--r-group) var(--r-group) var(--r-mark) var(--r-group);background:var(--accent-tint)}
.msg.mine .by{justify-content:flex-end}
/* its time under it, and under the reader's own whether it was read - one tick sent, two read, in the accent */
.msg .when{display:flex;align-items:center;justify-content:flex-end;gap:var(--gap-within);margin:0;font-size:11px;line-height:14px;color:var(--ink-faint)}
.msg .when .seen{display:inline-flex}
.msg .when .seen svg{width:14px;height:14px}
.msg .when .seen.read{color:var(--accent)}
/* WHAT HAPPENED TO A REPORT in its state's colour: taken in the accent, asked in amber, fixed in green */
.thread .happened[data-state="in-progress"] b{color:var(--accent)}
.thread .happened[data-state="needs-info"] b{color:var(--accent-2)}
.thread .happened:is([data-state="fixed"],[data-state="closed"]) b{color:var(--kept)}
.thread .happened[data-state="works"]{color:var(--kept)}
.thread .happened[data-state="not"]{color:var(--accent-2)}
/* HOW MANY OF THE OTHER SIDE'S MESSAGES WAIT UNREAD, on a list's row */
.count-badge{flex:none;min-width:20px;height:20px;padding:0 6px;display:inline-grid;place-items:center;border-radius:var(--r-pill);background:var(--accent);color:var(--ground);font-size:11px;font-weight:700;line-height:1}
/* on a row's icon the count lies over its corner, ringed in the row's own ground so it reads as sitting on top */
.row .ic > .count-badge{box-shadow:0 0 0 2px var(--glass)}
.row.due .ic > .count-badge{box-shadow:0 0 0 2px var(--accent-tint)}
.msg.due{background:var(--accent-tint);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.msg .by{display:flex;align-items:center;gap:var(--gap-within);margin:0;font-size:13px;line-height:18px;color:var(--ink-quiet)}
.msg .by .heks-mark{width:16px;height:16px;color:var(--ink)}
.msg .by b{color:var(--ink);font-weight:600}
.msg .txt{margin:0;font-size:15px;line-height:1.45;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}
.thread .happened{display:flex;align-items:center;gap:var(--gap-within);margin:0;padding:0 var(--s2);font-size:13px;color:var(--ink-quiet)}
.thread .happened svg{flex:none;width:var(--mk-s);height:var(--mk-s);color:var(--ink-faint)}
.thread .happened b{color:var(--ink);font-weight:600}
.thread .reward{display:flex;align-items:center;gap:var(--gap-row);padding:var(--s3) var(--pad-row);border-radius:var(--r-card);background:var(--kept-tint);box-shadow:inset 0 0 0 1px var(--kept-edge);font-size:14px;color:var(--ink)}
.thread .reward svg{flex:none;width:var(--mk);height:var(--mk);color:var(--kept)}
.thread .reward p{flex:1;min-width:0;margin:0}
/* THE SAME REWARD, small, where a list names it on a row */
.reward-tag{align-self:flex-start;display:inline-flex;align-items:center;gap:var(--gap-within);margin-top:var(--s1);padding:2px var(--s2);border-radius:var(--r-card);background:var(--kept-tint);box-shadow:inset 0 0 0 1px var(--kept-edge);max-width:100%;font-size:13px;line-height:18px;color:var(--ink)}
.reward-tag svg{flex:none;width:var(--mk-s);height:var(--mk-s);color:var(--kept)}
.thread .reward .meta{display:block;margin-top:2px}
.status.due{color:var(--accent)} .status.due i{background:var(--accent)}
