/* ==========================================================================
   hack.build design system
   Version 1.4

   One accent. Paper and ink. Four faces with four jobs. Hard shadows, no blur,
   no radius. Everything here is derived from the favicon and from tools that
   already shipped in this language.

   Tokens live in tokens.css. This file is the class layer: every component,
   keyed off the tokens and nothing else. The Vue components in this package
   bind to these classes; they carry no styles of their own.

   Fonts (Google Fonts), or import fonts.css:
   https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Special+Elite&family=VT323&family=IBM+Plex+Mono:wght@400;500;600;700&family=Libre+Baskerville:ital@1&display=swap

   Icons: Font Awesome 6 solid, or inline SVG. Never emoji.
   ========================================================================== */

@import "./tokens.css";

/* ==========================================================================
   1. FOUNDATION
   ========================================================================== */

*,*::before,*::after{ box-sizing:border-box }
html,body{ margin:0; padding:0 }

body.hb{
  background:var(--hb-paper);
  color:var(--hb-ink);
  font-family:var(--hb-body);
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

/* Grain. One fixed overlay, never per element. 0.05 on paper, 0.07 on ink. */
body.hb::before{
  content:"";
  position:fixed; inset:0; z-index:var(--hb-z-grain);
  pointer-events:none; opacity:.05;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Halftone dot field. The app-chrome alternative to grain. Use one, not both. */
.hb-halftone{
  background-image:radial-gradient(rgba(26,26,26,.045) 1px, transparent 1px);
  background-size:4px 4px;
}

/* Graph rule, for canvases and scope backdrops on ink. */
.hb-graph{
  background-image:
    linear-gradient(rgba(254,3,134,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254,3,134,.10) 1px, transparent 1px);
  background-size:32px 32px;
}

.hb-shell{
  max-width:var(--hb-wide); margin:0 auto;
  padding:0 max(var(--hb-s4), env(safe-area-inset-right)) 0 max(var(--hb-s4), env(safe-area-inset-left));
}
.hb-shell-narrow{ max-width:var(--hb-narrow) }
.hb-prose{ max-width:var(--hb-measure) }
@media(min-width:641px){ .hb-shell{ padding:0 max(var(--hb-s5), env(safe-area-inset-right)) 0 max(var(--hb-s5), env(safe-area-inset-left)) } }

/* ==========================================================================
   2. TYPE
   Four faces, four jobs. Setting everything in one face kills the system.
   ========================================================================== */

.hb h1,.hb h2,.hb h3,.hb-display{
  font-family:var(--hb-display);
  font-weight:400;
  letter-spacing:.5px;
  margin:0;
}
.hb h1{ font-size:32px; line-height:1.05 }
.hb h2{ font-size:23px; line-height:1.15 }
.hb h3{ font-size:20px; line-height:1.2 }
@media(min-width:641px){ .hb h1{ font-size:44px } .hb h2{ font-size:28px } }

.hb p{ margin:0 0 var(--hb-s4) }

/* Utility text: every label, button, tab, chip, table header, form label. */
.hb-label{
  font-family:var(--hb-utility);
  font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  color:var(--hb-ink-3);
}

/* Readouts: any live number, timer, coordinate, console line, counter. */
.hb-readout{
  font-family:var(--hb-readout);
  font-size:20px; line-height:1.1;
  color:var(--hb-pink);
  font-variant-numeric:tabular-nums;
}

/* The tagline, and nothing else. */
.hb-tagline{
  font-family:var(--hb-tagline);
  font-style:italic;
  font-size:15px;
  color:var(--hb-ink-3);
}

.hb-mark{ background:var(--hb-pink-18); padding:1px 5px }
.hb-accent{ color:var(--hb-pink) }
.hb code,.hb .hb-code{
  font-family:var(--hb-utility); font-size:12.5px;
  background:var(--hb-paper-edge); border:1px solid var(--hb-ink);
  padding:1px 5px;
}
.hb pre{
  font-family:var(--hb-utility); font-size:12.5px; line-height:1.55;
  background:var(--hb-ink); color:var(--hb-paper);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow);
  padding:var(--hb-s4); overflow:auto; margin:0 0 var(--hb-s5);
}
.hb pre code{ background:none; border:0; padding:0; color:inherit }

/* Wordmark. hack in ink, then the dot AND build both pink. Never dot only. */
.hb-wordmark{
  font-family:var(--hb-utility); font-weight:700;
  letter-spacing:-.01em; color:var(--hb-ink);
}
.hb-wordmark b{ color:var(--hb-pink); font-weight:700 }
.hb-on-ink .hb-wordmark{ color:var(--hb-paper) }

/* ==========================================================================
   3. CHROME
   ========================================================================== */

.hb-header{
  background:var(--hb-ink);
  color:var(--hb-paper);
  border-bottom:var(--hb-border-hd) solid var(--hb-pink);
  padding:var(--hb-s2) max(var(--hb-s4), env(safe-area-inset-right)) var(--hb-s2) max(var(--hb-s4), env(safe-area-inset-left));
  padding-top:max(var(--hb-s2), env(safe-area-inset-top));
  display:flex; align-items:center; gap:var(--hb-s4); flex-wrap:wrap;
}
.hb-header .hb-logo{ width:28px; height:28px; flex:0 0 auto }
/* the title keeps its words whole: the controls beside it wrap to the
   next row first, and a title wider than the whole row ends in an
   ellipsis instead of breaking inside a word or pushing the page sideways */
.hb-header h1{
  font-size:20px; color:var(--hb-paper); flex:1 1 auto; min-width:0; max-width:100%;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
@media(max-width:359px){ .hb-header h1{ font-size:18px } }
@media(min-width:641px){ .hb-header h1{ font-size:24px; flex:0 1 auto } }
.hb-header h1 span{ color:var(--hb-pink) }
/* Suffix after the pink accent stays paper: PIP<span>.</span>bench. */
.hb-header h1 span.hb-suffix{ color:var(--hb-paper) }
.hb-header .hb-tagline{ display:none; margin-left:auto; color:var(--hb-paper); opacity:.55 }
/* A tool tagline is Special Elite; Libre Baskerville italic stays for the
   brand line alone. */
.hb-header .hb-tagline.is-tool{ font-family:var(--hb-body); font-style:normal }
@media(min-width:901px){ .hb-header .hb-tagline{ display:inline } }
@media(min-width:641px){ .hb-header{ padding:var(--hb-s3) max(var(--hb-s5), env(safe-area-inset-right)) var(--hb-s3) max(var(--hb-s5), env(safe-area-inset-left)) } }

.hb-tabs{ display:flex; gap:2px; background:var(--hb-ink); overflow-x:auto }
.hb-tab{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  background:transparent; color:var(--hb-paper);
  border:0; border-bottom:var(--hb-border-hd) solid transparent;
  padding:9px 14px; cursor:pointer; opacity:.6;
  flex:0 0 auto; white-space:nowrap; text-decoration:none;
}
@media (hover:hover) and (pointer:fine){ .hb-tab:hover{ opacity:1 } }
.hb-tab[aria-selected="true"],.hb-tab.is-active{
  opacity:1; color:var(--hb-pink); border-bottom-color:var(--hb-pink);
}

.hb-rule{ border:0; border-top:var(--hb-border) dashed var(--hb-ink); margin:var(--hb-s6) 0 }
.hb-rule-hd{ border:0; border-top:var(--hb-border-hd) solid var(--hb-ink); margin:var(--hb-s6) 0 }

/* ==========================================================================
   4. SURFACES
   ========================================================================== */

/* Paper surfaces always declare their own ink text. A surface that inherits
   its color from an ink band behind it goes unreadable, the same lesson the
   pill taught. */
.hb-panel{
  background:var(--hb-paper-raised);
  color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
  padding:var(--hb-s4) var(--hb-s5);
}
.hb-panel-sunk{ background:var(--hb-paper-sunk); box-shadow:none }
.hb-panel-hd{
  font-family:var(--hb-display); font-size:18px;
  margin:0 0 var(--hb-s3); padding-bottom:var(--hb-s2);
  border-bottom:var(--hb-border) solid var(--hb-ink);
}
/* Instrument head: VT323 caps on a full-bleed ink bar. One head style per
   artifact, editorial or instrument, never both. */
.hb-panel-hd-inst{
  font-family:var(--hb-readout); font-size:17px; letter-spacing:.06em;
  text-transform:uppercase;
  background:var(--hb-ink); color:var(--hb-paper);
  margin:calc(-1 * var(--hb-s4)) calc(-1 * var(--hb-s5)) var(--hb-s3);
  padding:7px var(--hb-s5);
}
@media (hover:hover) and (pointer:fine){ .hb-panel:hover{ } }                     /* panels do not move. only cards do. */

.hb-card{
  background:var(--hb-paper-raised);
  color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
  padding:var(--hb-s4);
  transition:transform var(--hb-t-fast), box-shadow var(--hb-t-fast);
}
a.hb-card{ display:block; color:inherit; text-decoration:none }
@media (hover:hover) and (pointer:fine){ a.hb-card:hover,.hb-card.is-interactive:hover{
  transform:translate(-2px,-2px); box-shadow:var(--hb-shadow-xl);
} }

/* Dark instrument surface: canvases, scopes, waterfalls, consoles, 3D views. */
.hb-stage{
  background:var(--hb-void);
  border:var(--hb-border-em) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-pink);
  color:var(--hb-paper);
  padding:var(--hb-s3);
}
.hb-stage-label{ color:var(--hb-paper); opacity:.6 }
.hb-on-ink{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-on-ink .hb-label{ color:var(--hb-paper); opacity:.6 }
/* Labels inside a paper surface stay ink even when the surface sits on an
   ink band. */
.hb-on-ink .hb-panel .hb-label,.hb-on-ink .hb-card .hb-label,
.hb-on-ink .hb-media-card .hb-label,.hb-on-ink .hb-tl-item .hb-label{
  color:var(--hb-ink-3); opacity:1;
}

/* Callout. Pink left rule by default. Signal variants for data commentary. */
.hb-callout{
  border-left:4px solid var(--hb-pink);
  background:var(--hb-pink-10);
  padding:var(--hb-s3) var(--hb-s4);
  margin:0 0 var(--hb-s5);
}
.hb-callout.is-ok{ border-left-color:var(--hb-ok); background:rgba(31,157,85,.08) }
.hb-callout.is-warn{ border-left-color:var(--hb-warn); background:rgba(199,119,0,.08) }
.hb-callout.is-err{ border-left-color:var(--hb-err); background:rgba(195,37,31,.08) }
.hb-callout.is-info{ border-left-color:var(--hb-info); background:rgba(43,108,176,.08) }
.hb-callout-title{ display:block; margin-bottom:var(--hb-s1); font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.1em }
.hb-callout-acts{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); margin-top:var(--hb-s2) }

/* Section number badge. One of only two places a radius is allowed. */
.hb-num{
  width:34px; height:34px; border-radius:50%;
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-utility); font-size:14px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center;
  flex:0 0 auto;
}

/* ==========================================================================
   5. CONTROLS
   ========================================================================== */

.hb-btn{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  background:var(--hb-ink); color:var(--hb-paper);
  border:var(--hb-border-em) solid var(--hb-ink);
  box-shadow:var(--hb-shadow);
  padding:8px 14px; cursor:pointer;
  display:inline-flex; align-items:center; gap:var(--hb-s2);
  transition:transform var(--hb-t-fast), box-shadow var(--hb-t-fast), background var(--hb-t);
  text-decoration:none;
}
/* Text on a pink fill is ink: 4.62:1 against 3.32:1 for paper (computed,
   WCAG relative luminance). Paper on pink fails AA at 11 px. */
@media (hover:hover) and (pointer:fine){ .hb-btn:hover{ background:var(--hb-pink); border-color:var(--hb-pink); color:var(--hb-ink) } }
.hb-btn:active{ transform:translate(3px,3px); box-shadow:0 0 0 var(--hb-ink) }
.hb-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-btn[disabled],.hb-btn.is-disabled{
  background:var(--hb-paper-edge); color:var(--hb-ink-4);
  border-color:var(--hb-ink-4); box-shadow:none; cursor:not-allowed;
}
.hb-btn-2{ background:var(--hb-paper-raised); color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-btn-2:hover{ background:var(--hb-pink); color:var(--hb-ink) } }
.hb-btn-danger{ background:var(--hb-pink); border-color:var(--hb-pink); color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-btn-danger:hover{ background:var(--hb-pink-deep); border-color:var(--hb-pink-deep) } }
.hb-btn-ghost{
  background:transparent; color:var(--hb-paper);
  border:1px solid rgba(245,240,230,.35); box-shadow:none;
}
@media (hover:hover) and (pointer:fine){ .hb-btn-ghost:hover{ background:transparent; border-color:var(--hb-pink); color:var(--hb-pink) } }
/* Disabled ghost: a paper edge fill with ink 3 text (4.46:1, computed,
   WCAG relative luminance) and a dashed border, so it reads on paper and
   on ink alike and still reads as off. */
.hb-btn-ghost[disabled],.hb-btn-ghost.is-disabled{
  background:var(--hb-paper-edge); color:var(--hb-ink-3); border:1px dashed var(--hb-ink-3); box-shadow:none;
}
@media (hover:hover) and (pointer:fine){ .hb-btn-ghost[disabled]:hover,.hb-btn-ghost.is-disabled:hover{ background:var(--hb-paper-edge); border-color:var(--hb-ink-3); color:var(--hb-ink-3) } }
.hb-btn-sm{ font-size:10px; padding:5px 10px; border-width:var(--hb-border); box-shadow:var(--hb-shadow-sm) }
.hb-btn-lg{ font-size:12px; padding:11px 20px }
.hb-btn-block{ display:flex; width:100%; justify-content:center }
/* A finger needs 44 px: buttons, chips and tabs start there and compact
   only on a wider screen with a fine pointer. */
.hb-btn,.hb-chip,.hb-tab{ min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-btn,.hb-chip,.hb-tab{ min-height:0 } }

/* Chips: filters and multi-select toggles. */
.hb-chip{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.08em;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:2px 2px 0 var(--hb-ink);
  padding:5px 10px; cursor:pointer; user-select:none;
  display:inline-flex; align-items:center; gap:6px;
}
.hb-chip.is-on{ background:var(--hb-pink); color:var(--hb-ink) }
.hb-chip:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
/* Toggle chip inside a bench. Ink fill when on, so the one pink stays free
   for the primary selection of a step. */
.hb-chip.is-toggle.is-on{ background:var(--hb-ink); color:var(--hb-paper); border-color:var(--hb-ink) }
@media(pointer:coarse){ .hb-chip{ min-height:44px; min-width:44px; justify-content:center } }

/* Status pill. Always carry an explicit color: a light pill on a light panel
   inherited paper text once and became unreadable. */
.hb-pill{
  font-family:var(--hb-utility); font-size:10px; font-weight:700;
  text-transform:uppercase; letter-spacing:.1em;
  color:var(--hb-ink); background:var(--hb-paper-raised);
  border:var(--hb-border) solid var(--hb-ink);
  padding:3px 9px; display:inline-flex; align-items:center; gap:6px;
}
.hb-pill::before{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--hb-ink-4); flex:0 0 auto;
}
.hb-pill.is-live{ border-color:var(--hb-pink); color:var(--hb-pink) }
.hb-pill.is-live::before{ background:var(--hb-pink); animation:hb-pulse 1.5s infinite }
.hb-pill.is-ok::before{ background:var(--hb-ok) }
.hb-pill.is-warn{ border-color:var(--hb-warn); color:var(--hb-warn-ink) }
.hb-pill.is-warn::before{ background:var(--hb-warn) }
.hb-pill.is-err{ border-color:var(--hb-err); color:var(--hb-err) }
.hb-pill.is-err::before{ background:var(--hb-err) }
@keyframes hb-pulse{ 0%,100%{opacity:1} 50%{opacity:.25} }

/* Fields */
.hb-field{ display:flex; flex-direction:column; gap:5px; margin-bottom:var(--hb-s3) }
.hb-field .hb-error{
  font-family:var(--hb-utility); font-size:11px; color:var(--hb-err);
}
/* hint: one muted line under a control or a part, anywhere */
.hb-hint{ margin:0; font-family:var(--hb-utility); font-size:11px; line-height:1.45; color:var(--hb-ink-3); overflow-wrap:anywhere }
.hb-on-ink .hb-hint,.hb-stage .hb-hint{ color:var(--hb-lit-label) }
.hb-field .hb-hint{
  font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3);
}
.hb-input,.hb-select,.hb-textarea{
  font-family:var(--hb-utility); font-size:16px;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  padding:8px 10px; width:100%;
}
.hb-input:focus,.hb-select:focus,.hb-textarea:focus{
  outline:none; border-color:var(--hb-pink); box-shadow:2px 2px 0 var(--hb-pink);
}
/* 16 px and 44 px tall on phones and touch screens, or iOS zooms the page
   on focus and a finger misses the field */
.hb-input,.hb-select{ min-height:44px }
@media(min-width:641px) and (pointer:fine){
  .hb-input,.hb-select,.hb-textarea{ font-size:13px }
  .hb-input,.hb-select{ min-height:0 }
}
.hb-input::placeholder,.hb-textarea::placeholder{ color:var(--hb-ink-4) }
.hb-input.is-invalid,.hb-select.is-invalid,.hb-textarea.is-invalid{
  border-color:var(--hb-err);
}
.hb-input[disabled],.hb-select[disabled],.hb-textarea[disabled]{
  background:var(--hb-paper-edge); color:var(--hb-ink-4); cursor:not-allowed;
}
.hb input[type=range],.hb-range{ accent-color:var(--hb-pink); width:100% }
/* A finger needs 44 px. The native thumb and accent-color stay. */
.hb-range,.hb-slider > input[type=range],.hb-prow input[type=range]{ height:44px; margin:0 }
@media(min-width:821px) and (pointer:fine){
  .hb-range,.hb-slider > input[type=range],.hb-prow input[type=range]{ height:auto; margin:2px }
}
.hb input[type=checkbox],.hb input[type=radio]{ accent-color:var(--hb-pink) }

/* Check and radio rows. The native control carries the accent color. */
.hb-check{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--hb-utility); font-size:12.5px; cursor:pointer;
  user-select:none;
}
.hb-check input{ width:15px; height:15px; margin:0; flex:0 0 auto }
/* A finger needs 44 px: the row is the target and the box is 20 px on
   phones and touch screens; 15 px and the natural height only on a wider
   screen with a fine pointer. */
.hb-check{ min-height:44px }
.hb-check input{ width:20px; height:20px }
@media(min-width:641px) and (pointer:fine){
  .hb-check{ min-height:0 }
  .hb-check input{ width:15px; height:15px }
}
.hb-check.is-disabled{ color:var(--hb-ink-4); cursor:not-allowed }

/* Switch. A rectangular toggle, knob slides, pink when on. No radius.
   The button is the hit box and the track is drawn inside it: 42 by 22
   with a fine pointer, 44 tall on a coarse one with the same track. */
.hb-switch{
  position:relative; width:42px; height:22px; flex:0 0 auto;
  background:transparent; border:0; cursor:pointer; padding:0;
}
.hb-switch::before{
  content:""; position:absolute; left:0; top:50%; width:42px; height:22px; margin-top:-11px;
  box-sizing:border-box; background:var(--hb-paper-raised);
  border:var(--hb-border) solid var(--hb-ink);
  transition:background var(--hb-t), border-color var(--hb-t);
}
.hb-switch::after{
  content:""; position:absolute; top:50%; left:4px; margin-top:-7px;
  width:14px; height:14px; background:var(--hb-ink);
  transition:transform var(--hb-t), background var(--hb-t);
}
.hb-switch[aria-checked="true"]::before{ background:var(--hb-pink-10); border-color:var(--hb-pink) }
.hb-switch[aria-checked="true"]::after{ transform:translateX(20px); background:var(--hb-pink) }
.hb-switch:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-switch[disabled]{ cursor:not-allowed }
.hb-switch[disabled]::before{ border-color:var(--hb-ink-4) }
.hb-switch[disabled]::after{ background:var(--hb-ink-4) }
@media(pointer:coarse){ .hb-switch{ width:44px; height:44px } }

/* Switch row: label left, value readout right. The workhorse of every panel. */
.hb-kv{
  display:flex; align-items:baseline; justify-content:space-between; gap:var(--hb-s4);
  padding:5px 0; border-bottom:1px dashed rgba(26,26,26,.25);
}
.hb-kv:last-child{ border-bottom:0 }
.hb-kv .hb-readout{ font-size:18px; min-width:0; overflow-wrap:anywhere }
.hb-kv > .hb-copymark{ align-self:center; margin-left:calc(var(--hb-s4) * -1 + var(--hb-s1)) }
/* Copy mark. A quiet square after a value; reads check once copied and
   x when the browser refused, then goes back after 1.5 s. */
.hb-copymark{
  flex:none; display:inline-flex; align-items:center; justify-content:center;
  width:24px; height:24px; padding:0; background:transparent; color:var(--hb-ink-3);
  border:1px solid transparent; cursor:pointer;
}
.hb-copymark:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:1px }
.hb-copymark.is-copied{ color:var(--hb-ok-ink) }
.hb-copymark.is-failed{ color:var(--hb-err) }
@media (hover:hover) and (pointer:fine){ .hb-copymark:hover{ color:var(--hb-ink); border-color:var(--hb-ink) } }
@media(pointer:coarse){ .hb-copymark{ width:44px; height:44px } }

/* ==========================================================================
   6. DATA
   ========================================================================== */

.hb-table{ width:100%; border-collapse:collapse; font-family:var(--hb-utility); font-size:11.5px }
.hb-table th{
  text-align:left; font-size:10px; font-weight:700;
  text-transform:uppercase; letter-spacing:.09em;
  background:var(--hb-ink); color:var(--hb-paper);
  padding:7px 10px;
}
.hb-table td{ padding:6px 8px; border-bottom:1px solid rgba(26,26,26,.2) }
.hb-table tbody tr:nth-child(even){ background:var(--hb-paper-sunk) }
@media (hover:hover) and (pointer:fine){ .hb-table tbody tr:hover{ background:var(--hb-pink-10) } }
.hb-table .num{ text-align:right; font-variant-numeric:tabular-nums }

/* Console / log. Newest line at the top, one color per severity. */
.hb-console{
  background:var(--hb-void); color:var(--hb-paper);
  border:var(--hb-border) solid var(--hb-ink);
  font-family:var(--hb-readout); font-size:16px; line-height:1.35;
  padding:var(--hb-s3); height:var(--hb-console-h, 180px); overflow:auto;
}
.hb-console-empty{ color:var(--hb-lit-label) }
.hb-console .t{ color:var(--hb-ink-4); margin-right:8px }
.hb-console .hit{ color:var(--hb-pink) }

/* Meter. Pink fill on an ink track, hard edges. */
.hb-meter{ height:10px; background:var(--hb-ink); border:1px solid var(--hb-ink) }
.hb-meter > i{ display:block; height:100%; background:var(--hb-pink) }

/* ==========================================================================
   7. STICKER AND SEAL
   Contained single shapes only. Nothing floats, so it cuts and weeds clean.
   ========================================================================== */

.hb-seal{ display:block }
.hb-seal-face{ fill:var(--hb-paper) }
.hb-seal-band{ fill:none; stroke:var(--hb-ink); stroke-width:5 }
.hb-seal-keyline{ fill:none; stroke:var(--hb-pink); stroke-width:2 }

/* ==========================================================================
   8. ACCESSIBILITY AND OUTPUT
   ========================================================================== */

.hb :focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }

@media (prefers-reduced-motion:reduce){
  .hb *,.hb *::before,.hb *::after{ animation:none !important; transition:none !important }
}

@media print{
  body.hb::before{ display:none }
  .hb-panel,.hb-card,.hb-btn{ box-shadow:none }
  .hb-stage,.hb-console{ background:#fff; color:#000 }
}

/* Radius is zero everywhere except .hb-num, nav dots and the pill status dot.
   If a component here grows a border-radius, it has left the system. */
.hb button,.hb input,.hb select,.hb textarea,
.hb .hb-panel,.hb .hb-card,.hb .hb-chip,.hb .hb-pill,.hb .hb-stage{ border-radius:0 }

/* ==========================================================================
   9. INSTRUMENT PALETTE
   The signal colors are tuned for text on paper. On the void they go muddy.
   Anything drawn on a stage uses the lit set instead. This is the split
   every shipped tool arrived at independently.
   ========================================================================== */

.hb-ok{ color:var(--hb-ok-ink) }
.hb-warn{ color:var(--hb-warn-ink) }
.hb-err{ color:var(--hb-err) }
.hb-info{ color:var(--hb-info) }
.hb-stage .hb-ok,.hb-console .ok{ color:var(--hb-slime) }
.hb-stage .hb-warn,.hb-console .warn{ color:var(--hb-lit-warn) }
.hb-stage .hb-err,.hb-console .err{ color:var(--hb-lit-err) }
.hb-stage .hb-info,.hb-console .info{ color:var(--hb-lit-info) }
.hb-console .ok{ color:var(--hb-slime) }

/* ==========================================================================
   10. BARS
   Four bar types, stacked in this order, never reordered:
   header, tabs, toolbar, then content, with the status strip last.
   ========================================================================== */

/* Toolbar. Sunk paper, sits under the tabs, holds connect, chips, readouts.
   The header is branding, the toolbar is verbs. Do not mix them. */
.hb-bar{
  display:flex; align-items:center; gap:var(--hb-s3); flex-wrap:wrap;
  background:var(--hb-paper-sunk);
  border-bottom:var(--hb-border) solid var(--hb-ink);
  padding:var(--hb-s2) max(var(--hb-s4), env(safe-area-inset-right)) var(--hb-s2) max(var(--hb-s4), env(safe-area-inset-left));
  min-height:46px;
}
.hb-bar .hb-spacer{ margin-left:auto }
/* A toolbar with nothing in it takes no room: no empty sunk band under
   the tabs. */
.hb-bar:empty{ display:none }
.hb-bar-ink{ background:var(--hb-ink); color:var(--hb-paper); border-bottom-color:var(--hb-pink) }
@media(min-width:641px){ .hb-bar{ padding:var(--hb-s2) max(var(--hb-s5), env(safe-area-inset-right)) var(--hb-s2) max(var(--hb-s5), env(safe-area-inset-left)) } }

/* Status strip. Thin, VT323, counts and rates only. Its one possible
   control is the whole strip as a button that opens the log behind it. */
.hb-statusbar{
  container:hb-statusbar / inline-size;
  display:flex; align-items:center; gap:var(--hb-s4); flex-wrap:wrap;
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-readout); font-size:15px; line-height:1;
  padding:6px var(--hb-s4) max(6px, env(safe-area-inset-bottom)); border-top:var(--hb-border-hd) solid var(--hb-pink);
}
.hb-statusbar b{ color:var(--hb-pink); font-weight:400 }
@media(min-width:641px){ .hb-statusbar{ gap:var(--hb-s5); padding-left:var(--hb-s5); padding-right:var(--hb-s5) } }
/* Cell priority by the strip's own width: data-priority 2 shows from
   481 px, 3 from 761 px, so a phone keeps two cells. */
.hb-statusbar [data-priority="2"],.hb-statusbar [data-priority="3"]{ display:none }
@container hb-statusbar (min-width:481px){ .hb-statusbar [data-priority="2"]{ display:revert } }
@container hb-statusbar (min-width:761px){ .hb-statusbar [data-priority="3"]{ display:revert } }
/* The button form fills the strip; 44 px tall on a coarse pointer. */
.hb-statusbar.is-button{ padding:0 }
.hb-statusbar-btn{
  flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:inherit; flex-wrap:wrap;
  background:none; color:inherit; border:0; cursor:pointer; text-align:left;
  font:inherit; line-height:1;
  padding:6px max(var(--hb-s4), env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(var(--hb-s4), env(safe-area-inset-left));
}
@media(min-width:641px){ .hb-statusbar-btn{ padding-left:var(--hb-s5); padding-right:var(--hb-s5) } }
@media(pointer:coarse){ .hb-statusbar-btn{ min-height:44px } }
.hb-statusbar-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
@media (hover:hover) and (pointer:fine){ .hb-statusbar-btn:hover{ background:rgba(245,240,230,.08) } }

/* Segmented control. Mode switches, polarity, easy versus advanced.
   Two or three options only; past that it is a select. */
.hb-seg{ display:inline-flex; border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow) }
.hb-seg > button{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:0; border-right:var(--hb-border) solid var(--hb-ink);
  padding:7px 13px; cursor:pointer;
}
.hb-seg > button:last-child{ border-right:0 }
.hb-seg > button.is-on{ background:var(--hb-pink); color:var(--hb-ink) }
/* A view switch that is not the step's primary selection: ink when on,
   so the pink stays with the focal value. */
.hb-seg.is-toggle > button.is-on{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-seg > button{ min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-seg > button{ min-height:0 } }
.hb-bar-ink .hb-seg,.hb-header .hb-seg{ box-shadow:none; border-color:var(--hb-paper) }
.hb-bar-ink .hb-seg > button,.hb-header .hb-seg > button{
  background:transparent; color:var(--hb-paper); border-right-color:var(--hb-paper);
}
.hb-bar-ink .hb-seg > button.is-on,.hb-header .hb-seg > button.is-on{
  background:var(--hb-pink); color:var(--hb-ink);
}

/* ==========================================================================
   11. INSTRUMENT COMPONENTS
   The parts a bench tool needs that a page does not.
   ========================================================================== */

/* The dial. One giant primary readout per tool, and only one.
   VT323 at display size, ink plate, pink digits, tabular so it stops jittering. */
.hb-dial{
  background:var(--hb-ink); color:var(--hb-pink);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
  font-family:var(--hb-readout);
  font-size:clamp(38px,9vw,84px); line-height:1;
  letter-spacing:.02em; font-variant-numeric:tabular-nums;
  padding:var(--hb-s3) var(--hb-s4);
  display:flex; align-items:baseline; justify-content:center; gap:2px;
  user-select:none;
}
.hb-dial .u{ font-size:.32em; color:var(--hb-paper); opacity:.65; margin-left:.35em }
.hb-dial .sep{ color:var(--hb-paper); opacity:.4 }
/* Digits are individually clickable: click the top half to raise, bottom to lower. */
.hb-dial .d{ cursor:ns-resize; padding:0 1px }
@media (hover:hover) and (pointer:fine){ .hb-dial .d:hover{ background:var(--hb-pink); color:var(--hb-ink) } }

/* Band sticker. A rotated hand-lettered tag, the one place Permanent Marker
   is allowed at small size. One per view, never more. */
.hb-sticker{
  display:inline-block;
  font-family:var(--hb-display); font-size:15px;
  background:var(--hb-pink); color:var(--hb-paper);
  padding:3px 12px; transform:rotate(-2.5deg);
  box-shadow:var(--hb-shadow);
}
.hb-sticker-2{ background:var(--hb-paper-raised); color:var(--hb-ink); border:var(--hb-border) solid var(--hb-ink) }

/* Preset tiles. Big tap targets for the easy path. Marker for the name,
   Plex for the sub. Minimum 96 px so a finger can hit them. */
.hb-tiles{ display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:var(--hb-s3) }
.hb-tile{
  background:var(--hb-paper-raised);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow);
  padding:var(--hb-s3); min-height:96px; cursor:pointer; text-align:left;
  display:flex; flex-direction:column; gap:4px; justify-content:flex-end;
  transition:transform var(--hb-t-fast), box-shadow var(--hb-t-fast);
}
@media (hover:hover) and (pointer:fine){ .hb-tile:hover{ transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--hb-pink) } }
.hb-tile:active{ transform:translate(1px,1px); box-shadow:1px 1px 0 var(--hb-ink) }
.hb-tile:disabled{ opacity:.45; cursor:not-allowed; transform:none; box-shadow:none }
.hb-tile.is-small{ min-height:64px; padding:var(--hb-s2) }
.hb-tile.is-small .n{ font-size:14px }
.hb-tile-media{ display:block; aspect-ratio:4/3; margin:calc(var(--hb-s3) * -1) calc(var(--hb-s3) * -1) var(--hb-s1); background:var(--hb-void); border-bottom:var(--hb-border) solid var(--hb-ink); overflow:hidden }
.hb-tile.is-small .hb-tile-media{ margin:calc(var(--hb-s2) * -1) calc(var(--hb-s2) * -1) var(--hb-s1) }
.hb-tile-media > img,.hb-tile-media > canvas,.hb-tile-media > svg{ display:block; width:100%; height:100%; object-fit:cover }
.hb-tiles.is-small{ grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:var(--hb-s2) }
.hb-tile.is-on{ background:var(--hb-pink); color:var(--hb-ink); border-color:var(--hb-ink) }
.hb-tile .n{ font-family:var(--hb-display); font-size:17px; line-height:1.05 }
.hb-tile .s{ font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.08em; opacity:.6 }
.hb-tile.is-on .s{ opacity:.85 }

/* Segmented meter. Reads as an instrument, not a progress bar. Fills slime
   until it crosses the threshold, then the whole lit run flips pink. */
.hb-segmeter{ display:flex; gap:2px; height:16px; background:var(--hb-void); padding:2px; border:var(--hb-border) solid var(--hb-ink) }
.hb-segmeter i{ flex:1; background:rgba(245,240,230,.10) }
.hb-segmeter i.on{ background:var(--hb-slime) }
.hb-segmeter.is-over i.on{ background:var(--hb-pink) }

/* Slider row: label, track, live value. The default control of every panel. */
.hb-slider{ display:grid; grid-template-columns:1fr auto; gap:4px var(--hb-s3); align-items:center; margin-bottom:var(--hb-s3) }
.hb-slider > .hb-label{ grid-column:1 }
.hb-slider > .hb-readout{ grid-column:2; grid-row:1; font-size:17px }
.hb-slider > input[type=range]{ grid-column:1/-1; accent-color:var(--hb-pink); width:100% }

/* Rows: bookmarks, device lists, capture sessions. */
.hb-list{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); color:var(--hb-ink) }
.hb-row{
  display:flex; align-items:center; gap:var(--hb-s3);
  padding:7px var(--hb-s3); border-bottom:1px dashed rgba(26,26,26,.25);
  cursor:pointer; font-family:var(--hb-utility); font-size:12.5px;
  width:100%; background:none; border-left:0; border-right:0; border-top:0;
  color:inherit; text-align:left;
}
.hb-row:last-child{ border-bottom:0 }
@media (hover:hover) and (pointer:fine){ .hb-row:hover{ background:var(--hb-pink-10) } }
.hb-row.is-on{ background:var(--hb-pink); color:var(--hb-ink) }
/* A pink readout inside a pink row is invisible. Flip it to ink. */
.hb-row.is-on .hb-readout,.hb-row.is-on .hb-label{ color:var(--hb-ink) }
.hb-row .hb-spacer{ margin-left:auto }
/* A finger needs 44 px. Material rows are read, not pressed. */
@media(pointer:coarse){ .hb-row{ min-height:44px } .hb-mat .hb-row{ min-height:0 } }

/* Button row: a group of verbs under a form, a card or a picked row.
   Wraps on a phone. is-end pushes it right, is-fill shares the width. */
.hb-acts{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2); min-width:0 }
.hb-acts.is-end{ justify-content:flex-end }
.hb-acts.is-fill > *{ flex:1 1 auto; justify-content:center }
/* tool page: the parts of one tool stacked with one gap; a part may grow to fill */
.hb-toolpage{ display:flex; flex-direction:column; gap:var(--hb-s3); min-width:0; min-height:0 }
.hb-toolpage > *{ flex-shrink:0 }
.hb-toolpage > .is-grow{ flex:1 1 auto; min-height:0 }
/* split: a side column (rack, queue, list) beside the main part from 1024 px */
@media (min-width:1024px){
  .hb-toolpage.is-split{ display:grid; grid-template-columns:minmax(260px, 340px) minmax(0, 1fr); align-items:start }
  .hb-toolpage.is-split > .is-full{ grid-column:1 / -1 }
  .hb-toolpage.is-split > .is-side{ position:sticky; top:var(--hb-s3) }
}
/* Under 1024 px the stage comes first: the side column drops below the
   other parts. .is-source-order keeps the order of the markup. */
@media (max-width:1023px){
  .hb-toolpage.is-split:not(.is-source-order) > .is-side{ order:1 }
}
/* stage split (FERRULE): the stage wide on the left, chat in a side column
   of 340 to 520 px on the right, from 1024 px. The side column is held to
   the window height so its log scrolls and its composer stays in view.
   Under 1024 px the stage comes first at --hb-stage-h-sm and chat follows. */
@media (min-width:1024px){
  .hb-toolpage.is-split.is-stage{ grid-template-columns:minmax(0, 1fr) minmax(340px, 520px) }
  .hb-toolpage.is-split.is-stage > :not(.is-side):not(.is-full){ grid-column:1 }
  .hb-toolpage.is-split.is-stage > .is-side{
    grid-column:2; grid-row:1 / span 8; display:flex; flex-direction:column; min-height:0;
    max-height:calc(100vh - 2 * var(--hb-s3)); max-height:calc(100dvh - 2 * var(--hb-s3));
  }
  .hb-toolpage.is-split.is-stage > .is-side > .is-grow{ flex:1 1 auto; min-height:0 }
}
/* Phone stage height. 38dvh leaves the chat log and composer in reach for a
   character (FERRULE); a room takes aspect="fill" in a fit shell instead,
   which ignores the token. Any length works: 50dvh, 320px. */
:root{ --hb-stage-h-sm:38dvh }
@media (max-width:1023px){
  .hb-toolpage.is-stage > .hb-viewport:not(.is-fill){
    aspect-ratio:auto; height:38vh; height:var(--hb-stage-h-sm); max-height:none; min-height:160px;
  }
}
/* A phone held sideways has too little height for 38dvh: the stage takes
   most of the screen and chat scrolls under it. */
@media (max-width:1023px) and (orientation:landscape) and (max-height:540px){
  .hb-toolpage.is-stage > .hb-viewport:not(.is-fill){ height:85vh; height:85dvh }
}
@media(pointer:coarse){ .hb-acts > .hb-btn,.hb-acts > .hb-iconbtn{ min-height:44px } }

/* Disclosure. Fiddly controls fold away instead of being deleted. */
.hb-fold{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); margin-bottom:var(--hb-s3) }
.hb-fold > summary{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  padding:8px var(--hb-s3); cursor:pointer; list-style:none;
  display:flex; align-items:center; gap:var(--hb-s2);
}
.hb-fold > summary::-webkit-details-marker{ display:none }
.hb-fold > summary::before{ content:"+"; color:var(--hb-pink); font-weight:700 }
.hb-fold[open] > summary::before{ content:"-" }
.hb-fold[open] > summary{ border-bottom:var(--hb-border) solid var(--hb-ink) }
.hb-fold > div{ padding:var(--hb-s3) }
.hb-fold > summary{ min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-fold > summary{ min-height:0 } }
/* Numbered and finished folds: [03] in ink before the summary, done in
   ok green after it. */
.hb-fold-num{ color:var(--hb-ink-3); letter-spacing:0 }
.hb-fold-sum{ flex:1; min-width:0 }
.hb-fold-done{ color:var(--hb-ok-ink) }
.hb-fold > div > .hb-empty-hint{ padding:0 }
.hb-tabs-host{ min-width:0 }

/* Modal. The display rule must be beaten by [hidden] explicitly or the close
   button does nothing. This bug shipped once. */
.hb-modal{ position:fixed; inset:0; z-index:var(--hb-z-modal); display:flex; align-items:center; justify-content:center; padding:var(--hb-s3) }
.hb-modal[hidden]{ display:none }
.hb-modal::before{
  content:""; position:absolute; inset:0; background:rgba(10,10,10,.72);
  animation:hb-fade var(--hb-t-slow);
}
.hb-modal > .hb-panel{
  position:relative; max-width:var(--hb-modal-md); width:100%; max-height:82vh; overflow:auto;
  box-shadow:var(--hb-shadow-xl);
  animation:hb-drop var(--hb-t-slow);
}
.hb-modal > .hb-panel.is-sm{ max-width:var(--hb-modal-sm) }
.hb-modal > .hb-panel.is-lg{ max-width:var(--hb-modal-lg) }
@keyframes hb-drop{ from{ transform:translateY(-14px); opacity:0 } }
@media(min-width:641px){ .hb-modal{ padding:var(--hb-s5) } }

/* Toast. Bottom center, ink plate, pink rule, gone in about a second. */
.hb-toast{
  position:fixed; left:50%; bottom:26px; transform:translateX(-50%);
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-utility); font-size:11px;
  text-transform:uppercase; letter-spacing:.09em;
  padding:9px 16px; border:var(--hb-border) solid var(--hb-pink);
  opacity:0; transition:opacity .18s; pointer-events:none; z-index:var(--hb-z-toast);
  max-width:calc(100vw - 32px);
}
.hb-toast.is-on{ opacity:1 }
/* The stack HbToaster renders: held toasts above the transient one. A
   kind sets the rule colour; an error stays until ok is pressed. */
.hb-toasts{
  position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:var(--hb-z-toast);
  display:flex; flex-direction:column; align-items:center; gap:var(--hb-s2); width:max-content; max-width:calc(100vw - 32px); pointer-events:none;
}
.hb-toasts > .hb-toast{ position:static; transform:none; max-width:100%; display:flex; align-items:center; gap:var(--hb-s2); flex-wrap:wrap }
.hb-toasts > .hb-toast:not(.is-on){ display:none }
.hb-toasts > .hb-toast.is-on{ pointer-events:auto }
.hb-toast.is-ok{ border-color:var(--hb-slime) }
.hb-toast.is-warn{ border-color:var(--hb-lit-warn) }
.hb-toast.is-err{ border-color:var(--hb-lit-err) }
.hb-toast.is-held{ box-shadow:var(--hb-shadow) }
.hb-toast-msg{ flex:1 1 auto; min-width:0; overflow-wrap:anywhere }
.hb-toast-act{
  font:inherit; text-transform:inherit; letter-spacing:inherit; font-weight:700; cursor:pointer;
  background:transparent; color:var(--hb-paper); border:1px solid var(--hb-paper); padding:2px 8px; min-height:28px; min-width:44px;
}
.hb-toast-act:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
@media(pointer:coarse){ .hb-toast-act{ min-height:44px } }

/* Keyboard hint. */
.hb-kbd{
  font-family:var(--hb-utility); font-size:10px; font-weight:700;
  background:var(--hb-paper-raised); border:1px solid var(--hb-ink);
  box-shadow:1px 1px 0 var(--hb-ink); padding:1px 5px;
}

/* ==========================================================================
   12. APP SHELL
   Full-height tool layout. Header and tabs pinned, one scrolling work column
   beside one scrolling rail of panels. Below 900 px the shell unpins and the
   rail stacks under the work column.
   ========================================================================== */

.hb-app{ display:flex; flex-direction:column }
.hb-app > .hb-work{
  flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr); gap:var(--hb-s4);
  padding:var(--hb-s4) max(var(--hb-s4), env(safe-area-inset-right)) var(--hb-s4) max(var(--hb-s4), env(safe-area-inset-left));
}
.hb-app .hb-main{ min-width:0; display:flex; flex-direction:column; gap:var(--hb-s4) }
.hb-app .hb-rail{ min-width:0; display:flex; flex-direction:column; gap:var(--hb-s4) }
@media(min-width:901px){
  .hb-app{ height:100vh; height:calc(100dvh - var(--hb-kb, 0px)); overflow:hidden }
  .hb-app > .hb-work{ grid-template-columns:minmax(0,1fr) 340px; overflow:hidden }
  .hb-app .hb-main,.hb-app .hb-rail{ overflow:auto }
  /* No rail in the work row: the main column takes the full width, so a
     tool page fills 1440 instead of leaving an empty 340 px track. */
  .hb-app > .hb-work:not(:has(> .hb-rail)){ grid-template-columns:minmax(0,1fr) }
}

/* The foot: the dock (composer or primary action) over the status strip.
   Stacked under 901 px the page scrolls as one, so the foot sticks to the
   bottom of the screen: the input never scrolls away (phone rule). From
   901 px the shell is pinned and the foot sits at its bottom edge. */
.hb-app.has-dock{ min-height:100vh; min-height:100dvh }
.hb-app.has-dock > .hb-work{ align-content:start }
/* --hb-kb is the part of the layout viewport under the on-screen keyboard
   and --hb-foot-h the foot's height, both written by HbAppShell from
   visualViewport (vanilla dockInsets). The foot lifts over the keyboard;
   a pinned shell shrinks by it. */
.hb-app-foot{ position:sticky; bottom:var(--hb-kb, 0px); z-index:var(--hb-z-sticky) }
.hb-dock{
  display:flex; align-items:center; flex-wrap:wrap; gap:var(--hb-s2);
  background:var(--hb-paper-sunk); border-top:var(--hb-border-hd) solid var(--hb-ink);
  padding:var(--hb-s2) max(var(--hb-s4), env(safe-area-inset-right)) var(--hb-s2) max(var(--hb-s4), env(safe-area-inset-left));
}
.hb-dock > .hb-composer{ flex:1 1 100%; padding:0; border:0; background:none }
/* HbChat with log off, docked: the composer alone, one row at 320 px. */
.hb-dock > .hb-chat{ flex:1 1 100%; border:0; background:none; box-shadow:none }
.hb-dock > .hb-chat > .hb-composer{ padding:0; border:0; background:none; flex-wrap:nowrap }
.hb-dock > .hb-chat > .hb-composer > .hb-textarea{ flex:1 1 0; min-width:0 }
.hb-dock > .hb-spacer{ flex:1 }
/* Without a status strip under it the dock pads past the home bar itself. */
.hb-app-foot > .hb-dock:last-child{ padding-bottom:max(var(--hb-s2), env(safe-area-inset-bottom)) }
@media(min-width:641px){ .hb-dock{ padding-left:max(var(--hb-s5), env(safe-area-inset-left)); padding-right:max(var(--hb-s5), env(safe-area-inset-right)) } }
@media(min-width:901px){ .hb-app-foot{ position:static } }

/* Recipes. rack: stage beside a rack of tabs, 360 px at 1024 and 408 px
   (ARBOR's width) from about 1460; under 901 px the rack is a sheet.
   bench: numbered steps and the guide in the strips, the parameter rail
   beside the work. transcript: the stage stays short (38dvh) over the
   transcript on a phone, and the transcript column is the wide one. */
.hb-app.is-rack .hb-rail,.hb-app.is-bench .hb-rail{ gap:var(--hb-s3) }
/* The rack's tabs share its width equally and tighten, so seven fit the
   408 px rack; HbTabs still swaps them for a select before one clips. */
.hb-app.is-rack .hb-rail > .hb-tabs-host > .hb-tabs{ gap:0 }
.hb-app.is-rack .hb-rail > .hb-tabs-host > .hb-tabs > .hb-tab{ flex:1 1 auto; padding-left:var(--hb-s2); padding-right:var(--hb-s2); letter-spacing:.04em }
.hb-app.is-transcript .hb-viewport{ max-height:38vh; max-height:38dvh }
@media(min-width:901px){
  .hb-app.is-rack.has-rail > .hb-work{ grid-template-columns:minmax(0,1fr) clamp(360px, 28vw, 408px) }
  .hb-app.is-bench.has-rail > .hb-work{ grid-template-columns:minmax(0,1fr) 360px }
  .hb-app.is-transcript.has-rail > .hb-work{ grid-template-columns:minmax(0,2fr) minmax(360px,3fr) }
  .hb-app.is-transcript .hb-viewport{ max-height:none }
}
/* View modes (stage, split, chat), for tools with both a stage and a
   chat or rack. Split is the plain layout. */
.hb-app.is-stage .hb-rail{ display:none }
.hb-app.is-chat > .hb-work > .hb-main{ display:none }
@media(min-width:901px){
  .hb-app.is-stage.has-rail > .hb-work,.hb-app.is-chat.has-rail > .hb-work{ grid-template-columns:minmax(0,1fr) }
  .hb-app.is-chat > .hb-work > .hb-rail{ width:100%; max-width:760px; justify-self:center }
}
.hb-drawer-panel > .hb-rail{ display:flex; flex-direction:column; gap:var(--hb-s3) }

/* Fit (HbAppShell fit): the shell is the dynamic viewport at every width
   and the page never scrolls. A viewport with aspect 'fill' in the main
   column takes the height left over the foot, so the stage neither
   leaves a gap nor runs under the composer, portrait or landscape. */
.hb-app.is-fit{ height:100vh; height:calc(100dvh - var(--hb-kb, 0px)); min-height:0; overflow:hidden }
.hb-app.is-fit > .hb-work{ align-content:stretch; grid-template-rows:minmax(0,1fr); overflow:hidden }
.hb-app.is-fit .hb-main{ min-height:0; overflow:auto }
.hb-app.is-fit .hb-main > .hb-viewport.is-fill{ flex:1 1 auto; height:auto; min-height:120px }

/* Rack sheet open over a docked shell (phone and narrow tablet). The
   foot stays above the scrim so the input is always in reach, the sheet
   or side drawer stops at the foot's top edge, the scrim is light enough
   to read the stage through, and the stage keeps a one line caption at
   its top edge, the part the sheet leaves in view. */
.hb-app.is-sheet-open > .hb-app-foot{ z-index:calc(var(--hb-z-drawer) + 1) }
.hb-drawer:has(> .hb-drawer-panel > .hb-rail.is-above-dock)::before{ background:rgba(10,10,10,.4) }
.hb-drawer:has(> .hb-drawer-panel > .hb-rail.is-above-dock) > .hb-drawer-panel{ bottom:calc(var(--hb-foot-h, 0px) + var(--hb-kb, 0px)) }
.hb-drawer.is-sheet:has(> .hb-drawer-panel > .hb-rail.is-above-dock) > .hb-drawer-panel{ top:26%; height:auto; padding-bottom:var(--hb-s4) }
.hb-app.is-sheet-open .hb-viewport > .hb-ov-tl,
.hb-app.is-sheet-open .hb-viewport > .hb-ov-top,
.hb-app.is-sheet-open .hb-viewport > .hb-ov-foot > :not(.hb-ov-cap),
.hb-app.is-sheet-open .hb-caption-echo{ display:none }
.hb-app.is-sheet-open .hb-viewport > .hb-ov-foot{ top:var(--hb-s2); bottom:auto }
.hb-app.is-sheet-open .hb-caption-line{ max-height:calc(1.5em + 2 * var(--hb-s1)) }
.hb-app.is-sheet-open .hb-caption-who{ display:inline; margin-right:var(--hb-s1) }

/* Canvas inside a stage always fills it and stays block, or it leaves a
   baseline gap under itself and the pink shadow looks wrong. */
.hb-scope{ display:block; width:100%; background:var(--hb-void) }

/* ==========================================================================
   13. OVERFLOW
   Wide tables and code scroll inside their own panel rather than pushing the
   page sideways. A horizontally scrolling body is always a bug.
   ========================================================================== */

.hb-scroll-x,.hb .hb-panel > table.hb-table{ display:block; overflow-x:auto; max-width:100% }
.hb pre{ max-width:100% }
.hb-table th,.hb-table td{ white-space:nowrap }
@media(min-width:641px){
  .hb-table{ font-size:12.5px }
  .hb-table td{ padding:7px 10px }
  .hb-table th,.hb-table td{ white-space:normal }
}

/* ==========================================================================
   14. MENUS AND OVERLAYS
   ========================================================================== */

/* Dropdown menu. A raised panel of actions under a trigger. */
.hb-menu-wrap{ position:relative; display:inline-block }
.hb-menu{
  position:absolute; top:calc(100% + 6px); left:0; min-width:190px;
  background:var(--hb-paper-raised);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
  z-index:var(--hb-z-dropdown);
  padding:4px 0;
}
.hb-menu.is-right{ left:auto; right:0 }
.hb-menu-item{
  display:flex; align-items:center; gap:var(--hb-s2); width:100%;
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.08em;
  background:none; border:0; color:var(--hb-ink);
  padding:8px 14px; cursor:pointer; text-align:left; text-decoration:none;
}
@media (hover:hover) and (pointer:fine){ .hb-menu-item:hover{ background:var(--hb-pink); color:var(--hb-ink) } }
.hb-menu-item[disabled]{ color:var(--hb-ink-4); cursor:not-allowed }
@media (hover:hover) and (pointer:fine){ .hb-menu-item[disabled]:hover{ background:none; color:var(--hb-ink-4) } }
.hb-menu-rule{ border:0; border-top:1px dashed rgba(26,26,26,.3); margin:4px 0 }
/* Send to: a dropdown of tools with what each takes and, when it cannot
   take this now, why. The reason stays readable on a disabled row. */
.hb-sendto .hb-menu{ min-width:15rem; max-width:min(22rem, calc(100vw - 2 * var(--hb-s3))) }
.hb-sendto-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.hb-sendto-reason{ margin-left:auto; font-family:var(--hb-body); font-size:11px; font-weight:400; color:var(--hb-ink-3); text-transform:none; letter-spacing:0; text-align:right }

/* Drawer. A full-height panel that slides in from an edge. The mobile home
   of the rail, and of any nav that will not fit a bar. */
.hb-drawer{ position:fixed; inset:0; z-index:var(--hb-z-drawer) }
.hb-drawer[hidden]{ display:none }
.hb-drawer::before{
  content:""; position:absolute; inset:0; background:rgba(10,10,10,.72);
  animation:hb-fade var(--hb-t-slow);
}
.hb-drawer > .hb-drawer-panel{
  position:absolute; top:0; bottom:0; right:0; width:min(var(--hb-drawer-sm), 88vw);
  background:var(--hb-paper);
  border-left:var(--hb-border-hd) solid var(--hb-ink);
  overflow:auto; padding:var(--hb-s4);
  animation:hb-slide-r var(--hb-t-slow);
}
.hb-drawer.is-left > .hb-drawer-panel{
  right:auto; left:0;
  border-left:0; border-right:var(--hb-border-hd) solid var(--hb-ink);
  animation-name:hb-slide-l;
}
.hb-drawer.is-md:not(.is-sheet) > .hb-drawer-panel{ width:min(var(--hb-drawer-md), 88vw) }
.hb-drawer.is-lg:not(.is-sheet) > .hb-drawer-panel{ width:min(var(--hb-drawer-lg), 88vw) }
/* Bottom sheet (side bottom): the phone home of a rack, a manager or
   settings. 74 percent tall so the stage still shows above it; the panel
   pads past the home bar. One sheet is open at a time. */
.hb-drawer.is-sheet > .hb-drawer-panel{
  top:auto; left:0; right:0; width:auto; height:74%;
  border-left:0; border-top:var(--hb-border-hd) solid var(--hb-ink);
  padding:var(--hb-s4) max(var(--hb-s4), env(safe-area-inset-right)) max(var(--hb-s4), env(safe-area-inset-bottom)) max(var(--hb-s4), env(safe-area-inset-left));
  animation-name:hb-slide-u;
}
/* Head of a drawer or modal: the title, then the close button. */
.hb-drawer-hd,.hb-modal-hd{ display:flex; align-items:center; gap:var(--hb-s2) }
.hb-drawer-hd{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  margin:calc(var(--hb-s2) * -1) 0 var(--hb-s3); padding-bottom:var(--hb-s2);
  border-bottom:var(--hb-border) solid var(--hb-ink);
}
.hb-drawer-hd > span,.hb-modal-hd > span{ flex:1; min-width:0 }
.hb-modal-ft{ display:flex; justify-content:flex-end; flex-wrap:wrap; gap:var(--hb-s2); margin-top:var(--hb-s4) }
@keyframes hb-fade{ from{opacity:0} }
@keyframes hb-slide-r{ from{transform:translateX(100%)} }
@keyframes hb-slide-l{ from{transform:translateX(-100%)} }
@keyframes hb-slide-u{ from{transform:translateY(100%)} }

/* ==========================================================================
   15. IDENTITY AND STATES
   ========================================================================== */

/* Avatar. A square. This system does not crop people into circles. Without
   an image it carries a seeded plate color with paper marker initials or a
   paper critter, the way the mockups color-code every user. */
.hb-avatar{
  width:36px; height:36px; flex:0 0 auto;
  background:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  display:inline-flex; align-items:center; justify-content:center;
  font-family:var(--hb-display); font-size:14px;
  text-transform:uppercase; color:var(--hb-paper);
  overflow:hidden; user-select:none;
}
.hb-avatar img{ width:100%; height:100%; object-fit:cover; display:block }
.hb-avatar-sm{ width:26px; height:26px; font-size:10px }
.hb-avatar-lg{ width:56px; height:56px; font-size:22px }

/* Verified. A small pink square with a check, next to a name. */
.hb-verified{
  display:inline-flex; align-items:center; justify-content:center;
  width:14px; height:14px; flex:0 0 auto;
  background:var(--hb-pink); color:var(--hb-paper);
  vertical-align:-2px;
}

/* Stat row. Inline meta counts: views, likes, comments. Icon then figure,
   and the figure is VT323 like every other number in the system. */
.hb-stats{ display:flex; align-items:center; gap:14px; flex-wrap:wrap }
.hb-stats > span{
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--hb-readout); font-size:15px; line-height:1;
  color:var(--hb-ink-3); font-variant-numeric:tabular-nums;
}

/* Stat block. The big figure: projects shipped, boards spun, samples lost. */
.hb-stat-block{ text-align:center }
.hb-stat-block .hb-stat-value{
  font-family:var(--hb-readout); font-size:36px; line-height:1;
  color:var(--hb-pink); font-variant-numeric:tabular-nums;
}
.hb-stat-block .hb-label{ display:block; margin-top:4px }

/* Difficulty dots. Square pips, filled pink up to the level. */
.hb-dots{ display:inline-flex; align-items:center; gap:4px }
.hb-dots i{ width:8px; height:8px; background:var(--hb-paper-edge); border:1px solid var(--hb-ink-4) }
.hb-dots i.on{ background:var(--hb-pink); border-color:var(--hb-ink) }

/* Countdown. VT323 blocks on ink plates: contest deadlines, drop timers. */
.hb-countdown{ display:flex; gap:var(--hb-s3); flex-wrap:wrap }
.hb-countdown-cell{ text-align:center }
.hb-countdown-cell .n{
  display:block; min-width:62px;
  font-family:var(--hb-readout); font-size:32px; line-height:1.1;
  background:var(--hb-ink); color:var(--hb-pink);
  font-variant-numeric:tabular-nums;
  padding:6px 10px;
}
.hb-countdown-cell .hb-label{ display:block; margin-top:5px }
.hb-countdown.is-done .n{ color:var(--hb-paper); opacity:.6 }

/* Skeleton. A paper-edge block that breathes while the real thing loads. */
.hb-skeleton{
  display:block; height:1em; width:100%;
  background:var(--hb-paper-edge);
  animation:hb-pulse 1.4s infinite;
}

/* Spinner. Three meter segments blinking in order. Hard edges, no circles. */
.hb-spinner{ display:inline-flex; gap:3px; vertical-align:middle }
.hb-spinner i{ width:6px; height:14px; background:var(--hb-pink); animation:hb-blink 1s infinite }
.hb-spinner i:nth-child(2){ animation-delay:.2s }
.hb-spinner i:nth-child(3){ animation-delay:.4s }
@keyframes hb-blink{ 0%,60%,100%{opacity:.2} 30%{opacity:1} }

/* Empty state. A dashed well that says what is missing and what to do. */
.hb-empty{
  border:var(--hb-border) dashed var(--hb-ink-4);
  background:var(--hb-paper-sunk);
  padding:var(--hb-s6) var(--hb-s5);
  text-align:center;
}
.hb-empty .hb-empty-title{ font-family:var(--hb-display); font-size:18px; margin-bottom:var(--hb-s2) }
.hb-empty p{ margin:0 0 var(--hb-s3); color:var(--hb-ink-3) }

/* Pagination. Chips in a row, the current page filled pink. */
.hb-pages{ display:flex; gap:6px; align-items:center; flex-wrap:wrap }
.hb-page{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  min-width:30px; height:30px; padding:0 8px;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.hb-page.is-on{ background:var(--hb-pink); color:var(--hb-paper); border-color:var(--hb-ink) }
.hb-page[disabled]{ color:var(--hb-ink-4); border-color:var(--hb-ink-4); cursor:not-allowed }
.hb-page-gap{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }

/* ==========================================================================
   16. ZINE DECOR
   Page and sticker garnish. Never inside tool chrome, never on a stage.
   ========================================================================== */

/* Tilt. Sparing rotation for stickers, tags and hero blocks. At most one or
   two tilted things per view, or the page reads as broken rather than made. */
.hb-tilt-l{ transform:rotate(-2deg) }
.hb-tilt-l2{ transform:rotate(-4.5deg) }
.hb-tilt-r{ transform:rotate(1.5deg) }
.hb-tilt-r2{ transform:rotate(4deg) }

/* ==========================================================================
   17. ICONS
   Stroke icons on a 24 px grid: currentColor, no fills, square caps. The
   shipped set covers UI verbs and nouns; brand and social glyphs come from
   Font Awesome 6 brands. Never emoji, and never an icon where a two-word
   label is clearer.
   ========================================================================== */

.hb-icon{ display:inline-block; vertical-align:-2px; flex:0 0 auto }

/* Square icon button. For icon-only actions in navs, footers and rows.
   Always carries an aria-label. */
.hb-iconbtn{
  width:44px; height:44px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:2px 2px 0 var(--hb-ink);
  cursor:pointer; text-decoration:none;
  transition:background var(--hb-t);
}
@media (hover:hover) and (pointer:fine){ .hb-iconbtn:hover{ background:var(--hb-pink); color:var(--hb-ink) } }
.hb-iconbtn:active{ transform:translate(2px,2px); box-shadow:0 0 0 var(--hb-ink) }
/* on ink and in footers: ghost squares */
.hb-on-ink .hb-iconbtn,.hb-footer .hb-iconbtn{
  background:transparent; color:var(--hb-paper);
  border-color:rgba(245,240,230,.4); box-shadow:none;
}
@media (hover:hover) and (pointer:fine){ .hb-on-ink .hb-iconbtn:hover,.hb-footer .hb-iconbtn:hover{
  border-color:var(--hb-pink); color:var(--hb-pink); background:transparent;
} }
/* 44 px touch targets on phones and touch screens. */
@media(min-width:641px) and (pointer:fine){ .hb-iconbtn{ width:34px; height:34px } }

/* ==========================================================================
   18. PAGE SECTIONS
   The recurring anatomy of a marketing page or zine: nav, hero, section
   heads, footer. Tool chrome uses the bars in section 10 instead.
   ========================================================================== */

/* Page nav. Ink bar with the wordmark, links right, one pink call to
   action. Below 760 px the links move into a drawer behind the toggle. */
.hb-nav{
  background:var(--hb-ink); color:var(--hb-paper);
  border-bottom:var(--hb-border-hd) solid var(--hb-pink);
  padding:0 max(var(--hb-s4), env(safe-area-inset-right)) 0 max(var(--hb-s4), env(safe-area-inset-left)); min-height:58px;
  display:flex; align-items:center; gap:var(--hb-s4);
}
.hb-nav-brand{
  display:inline-flex; align-items:center; gap:10px;
  color:var(--hb-paper); text-decoration:none;
}
.hb-nav-links{ display:none; align-items:center; gap:2px; margin-left:auto }
.hb-nav-link{
  font-family:var(--hb-utility); font-size:12px; font-weight:600;
  text-transform:lowercase; letter-spacing:.04em;
  color:var(--hb-paper); opacity:.75; text-decoration:none;
  padding:8px 12px; border:var(--hb-border) solid transparent;
}
@media (hover:hover) and (pointer:fine){ .hb-nav-link:hover{ opacity:1; border-color:var(--hb-pink) } }
.hb-nav-link.is-active,.hb-nav-link[aria-current="page"]{ opacity:1; color:var(--hb-pink) }
.hb-nav-cta{
  background:var(--hb-pink); border-color:var(--hb-pink); opacity:1;
}
@media (hover:hover) and (pointer:fine){ .hb-nav-cta:hover{ background:var(--hb-pink-deep); border-color:var(--hb-pink-deep) } }
.hb-nav-toggle{ display:inline-flex; margin-left:auto }
@media(min-width:761px){
  .hb-nav{ padding:0 max(var(--hb-s5), env(safe-area-inset-right)) 0 max(var(--hb-s5), env(safe-area-inset-left)) }
  .hb-nav-links{ display:flex }
  .hb-nav-toggle{ display:none }
}

/* Hero. The big marker headline, often with a solid ink block behind one
   phrase, a kicker above and at most one pink action below. */
.hb-hero{ position:relative; padding:var(--hb-s7) 0 var(--hb-s6); overflow:hidden }
.hb-hero h1,.hb-hero-title{
  font-family:var(--hb-display); font-weight:400;
  font-size:clamp(40px,8vw,84px); line-height:1.05;
  letter-spacing:.5px; margin:0;
}
.hb-hero .hb-prose{ margin-top:var(--hb-s5); font-size:16px }
.hb-hero-actions{ display:flex; gap:var(--hb-s3); flex-wrap:wrap; margin-top:var(--hb-s6) }
@media(min-width:641px){ .hb-hero{ padding:var(--hb-s8) 0 var(--hb-s7) } }

/* Kicker. The VT323 tag on an ink plate that opens a hero or a section.
   The resume and the theme pages both arrived at this on their own. */
.hb-kicker{
  display:inline-block;
  font-family:var(--hb-readout); font-size:15px; letter-spacing:.04em;
  background:var(--hb-ink); color:var(--hb-paper);
  padding:3px 10px;
}
.hb-kicker.is-pink{ background:var(--hb-pink) }

/* Ink block. The solid plate behind one phrase of a marker headline. */
.hb-ink-block{
  background:var(--hb-ink); color:var(--hb-paper);
  display:inline-block; padding:0 .3em;
}

/* Section head. Kicker or marker title left, one quiet link pushed right. */
.hb-sechead{
  display:flex; align-items:baseline; gap:var(--hb-s4);
  margin:0 0 var(--hb-s5);
}
.hb-sechead .hb-sechead-link{
  margin-left:auto;
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  color:var(--hb-pink); text-decoration:none; white-space:nowrap;
}
@media (hover:hover) and (pointer:fine){ .hb-sechead .hb-sechead-link:hover{ text-decoration:underline } }

/* Footer. Ink, pink top rule, link columns, a social row of icon squares,
   and the stamp line at the bottom. */
.hb-footer{
  background:var(--hb-ink); color:var(--hb-paper);
  border-top:var(--hb-border-hd) solid var(--hb-pink);
  padding:var(--hb-s6) 0 var(--hb-s5);
}
.hb-footer .hb-label{ color:var(--hb-paper); opacity:.55 }
.hb-footer-grid{ display:flex; flex-wrap:wrap; gap:var(--hb-s5) var(--hb-s6) }
.hb-footer-col{ flex:1 1 140px; display:flex; flex-direction:column; gap:8px; align-items:flex-start }
.hb-footer-grid > .hb-footer-col:first-child{ flex:2 1 240px }
.hb-footer-col a{
  font-family:var(--hb-utility); font-size:12px;
  color:var(--hb-paper); opacity:.75; text-decoration:none;
}
@media (hover:hover) and (pointer:fine){ .hb-footer-col a:hover{ opacity:1; color:var(--hb-pink) } }
.hb-footer-social{ display:flex; gap:8px; margin-top:var(--hb-s3) }
.hb-footer-bottom{
  display:flex; align-items:center; gap:var(--hb-s4); flex-wrap:wrap;
  border-top:1px dashed rgba(245,240,230,.25);
  margin-top:var(--hb-s5); padding-top:var(--hb-s4);
  font-family:var(--hb-utility); font-size:11px; opacity:.6;
}

/* Centered section head, the resume idiom for standalone bands. */
.hb-sechead.is-center{ justify-content:center; text-align:center }
/* Underlined marker title, tilt it with .hb-tilt-l if the page is a zine. */
.hb-title-underline{
  display:inline-block;
  border-bottom:4px solid currentColor;
  padding-bottom:5px;
}

/* Static tag. VT323 on a plate: category, badge, year. Not a control; the
   interactive cousin is the chip. */
.hb-tag{
  display:inline-block;
  font-family:var(--hb-readout); font-size:13px; letter-spacing:.04em;
  background:var(--hb-ink); color:var(--hb-paper);
  padding:2px 8px; line-height:1.4;
}
.hb-tag.is-pink{ background:var(--hb-pink) }
.hb-tag.is-outline{
  background:transparent; color:var(--hb-ink-3);
  border:1px solid var(--hb-ink-4); padding:1px 7px;
}
/* Lit tags for status on ink and the void: good, warning, error. Outline
   only, so they never compete with a fill. */
.hb-tag.is-lit-ok,.hb-tag.is-lit-warn,.hb-tag.is-lit-err{
  background:transparent; border:1px solid currentColor;
  padding:calc(var(--hb-s1) / 2 - 1px) calc(var(--hb-s2) - 1px);
}
.hb-tag.is-lit-ok{ color:var(--hb-slime) }
.hb-tag.is-lit-warn{ color:var(--hb-lit-warn) }
.hb-tag.is-lit-err{ color:var(--hb-lit-err) }

/* Quiet link. Utility face, pink, usually with a trailing arrow icon. */
.hb-link{
  font-family:var(--hb-utility); font-size:12px; font-weight:600;
  color:var(--hb-pink); text-decoration:none;
  display:inline-flex; align-items:center; gap:5px;
}
@media (hover:hover) and (pointer:fine){ .hb-link:hover{ text-decoration:underline } }
/* A finger needs 44 px: on a coarse pointer the link grows its box, not
   its type. Fine pointers keep the line height. */
@media (pointer:coarse){ .hb-link{ min-height:44px; min-width:44px } }

/* Media card. Plate on top, tags, marker title, copy, quiet links. The
   project card every page rebuilt. */
.hb-media-card{
  background:var(--hb-paper-raised);
  color:var(--hb-ink);
  border:var(--hb-border-hd) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
  display:flex; flex-direction:column;
  transition:transform var(--hb-t-fast), box-shadow var(--hb-t-fast);
}
a.hb-media-card{ color:var(--hb-ink); text-decoration:none }
/* The hover every source page agreed on: lift, a half degree of rotation,
   and the pink shadow. */
@media (hover:hover) and (pointer:fine){ a.hb-media-card:hover,.hb-media-card.is-interactive:hover{
  transform:translate(-2px,-4px) rotate(-.5deg);
  box-shadow:7px 7px 0 var(--hb-pink);
} }
/* On an ink band the card's ink border, ink shadow and ink media plate all
   vanish into the background. Flip the border to paper and rest flat; the
   pink lift on hover stays. */
.hb-on-ink .hb-media-card{ border-color:var(--hb-paper); box-shadow:none }
.hb-on-ink .hb-media{ border-bottom-color:var(--hb-paper) }
.hb-media{
  position:relative;
  height:180px; overflow:hidden;
  background:var(--hb-ink); color:var(--hb-paper);
  border-bottom:var(--hb-border-hd) solid var(--hb-ink);
  display:flex; align-items:center; justify-content:center;
}
.hb-media img{ width:100%; height:100%; object-fit:cover; display:block }
/* Overlay badges pinned to the plate: official, featured, wip. */
.hb-media-badges{
  position:absolute; top:10px; left:10px;
  display:flex; gap:6px; flex-wrap:wrap;
}

/* Placeholder cover. A solid identity plate from the palette with a big
   paper icon at full strength, the way the magazine and resume cards do
   it. The ghost variant is the quieter app style: faded icon on ink. */
.hb-cover{
  width:100%; height:100%; position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--hb-ink); color:var(--hb-paper);
}
.hb-cover.is-ghost .hb-icon{ opacity:.16 }
.hb-cover.is-graph{
  background-image:
    linear-gradient(rgba(245,240,230,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,240,230,.12) 1px, transparent 1px);
  background-size:24px 24px;
}
/* standalone, outside a media plate */
:not(.hb-media) > .hb-cover{ position:relative; height:180px }
.hb-media-body{ padding:var(--hb-s4) var(--hb-s4) var(--hb-s4); display:flex; flex-direction:column; gap:10px; flex:1 }
/* Bigger than the originals, which ran titles at 17 and copy at 13 on
   muted gray and got hard to read. */
.hb-media-body h3{ font-size:22px; line-height:1.25 }
.hb-media-body h3 a{ color:var(--hb-ink); text-decoration:none }
@media (hover:hover) and (pointer:fine){ .hb-media-body h3 a:hover{ color:var(--hb-pink) } }
/* Descriptions clamp to two lines so a grid of cards stays level. */
.hb-media-body p{
  margin:0; color:var(--hb-ink-2); font-size:13.5px; line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.hb-media-tags{ display:flex; flex-wrap:wrap; gap:6px }
.hb-media-links{ display:flex; flex-wrap:wrap; gap:var(--hb-s4); margin-top:auto }
/* Author and stats row along the bottom, dashed rule above it. */
.hb-media-foot{
  display:flex; align-items:center; gap:8px;
  margin-top:auto; padding-top:10px;
  border-top:1px dashed rgba(26,26,26,.18);
}
.hb-media-foot a{ color:var(--hb-ink-3); text-decoration:none; display:inline-flex; align-items:center; gap:8px }
@media (hover:hover) and (pointer:fine){ .hb-media-foot a:hover{ color:var(--hb-pink) } }
.hb-media-foot .hb-stats{ margin-left:auto }

/* Video frame. The one pink border in a video section, void backing, a
   16 by 9 well for an embed or a file. */
.hb-vframe{
  background:var(--hb-void);
  border:var(--hb-border-hd) solid var(--hb-pink);
  box-shadow:var(--hb-shadow-lg);
  padding:6px;
}
.hb-vframe-media{ aspect-ratio:16/9; background:#000; position:relative }
.hb-vframe-media iframe,.hb-vframe-media video{
  display:block; width:100%; height:100%; border:0; position:absolute; inset:0;
}

/* Timeline. Left pink rule entries: jobs, releases, changelog. */
.hb-timeline{ display:flex; flex-direction:column; gap:var(--hb-s3) }
.hb-tl-item{
  background:var(--hb-paper-raised);
  color:var(--hb-ink);
  border:1px solid rgba(26,26,26,.3);
  border-left:4px solid var(--hb-pink);
  padding:var(--hb-s4);
}
.hb-tl-head{ display:flex; align-items:baseline; gap:4px var(--hb-s4); flex-wrap:wrap }
.hb-tl-head .hb-tl-title{ font-family:var(--hb-display); font-size:18px }
.hb-tl-head .hb-tl-period{
  margin-left:auto; font-family:var(--hb-readout); font-size:15px;
  color:var(--hb-ink-3); white-space:nowrap;
}
.hb-tl-sub{
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em; color:var(--hb-ink-3);
}
.hb-tl-item p{ margin:8px 0 0; font-size:13px; color:var(--hb-ink-2) }
.hb-tl-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px }

/* Award plaque. Paper card with a pink diamond pinned at a top corner,
   icon left, marker title, meta line, body. The resume awards idiom. */
.hb-plaque{
  position:relative;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
  padding:var(--hb-s4) var(--hb-s5);
  display:flex; gap:var(--hb-s4); align-items:flex-start;
}
.hb-plaque-pin{
  position:absolute; top:-8px; width:14px; height:14px;
  background:var(--hb-pink); border:2px solid var(--hb-ink);
  transform:rotate(45deg);
}
.hb-plaque.is-left .hb-plaque-pin{ left:-8px }
.hb-plaque.is-right .hb-plaque-pin{ right:-8px }
.hb-plaque > .hb-icon{ margin-top:3px }
.hb-plaque .hb-plaque-meta{
  font-family:var(--hb-readout); font-size:15px; color:var(--hb-ink-3);
}
.hb-plaque p{ margin:6px 0 0; font-size:13px; color:var(--hb-ink-2) }

/* Playlist. The video frame beside a numbered track list. Below 800 px the
   list drops under the player. */
.hb-playlist{ display:grid; grid-template-columns:minmax(0,1fr); gap:var(--hb-s4); align-items:start }
@media(min-width:801px){ .hb-playlist{ grid-template-columns:2fr 1fr } }
.hb-playlist-tracks{
  border:var(--hb-border) solid var(--hb-ink);
  background:var(--hb-paper-raised); color:var(--hb-ink);
  max-height:420px; overflow:auto;
}
.hb-track{
  display:flex; align-items:baseline; gap:var(--hb-s3); width:100%;
  padding:9px var(--hb-s3); cursor:pointer; text-align:left;
  background:none; border:0; border-bottom:1px dashed rgba(26,26,26,.25);
  border-left:4px solid transparent; color:inherit;
  font-family:var(--hb-utility); font-size:12.5px;
}
.hb-track:last-child{ border-bottom:0 }
@media (hover:hover) and (pointer:fine){ .hb-track:hover{ background:var(--hb-pink-10); border-left-color:var(--hb-pink) } }
.hb-track.is-on{ background:var(--hb-pink); color:var(--hb-paper); border-left-color:var(--hb-ink) }
.hb-track .no{
  font-family:var(--hb-readout); font-size:19px; color:var(--hb-ink-3);
  flex:0 0 auto;
}
.hb-track.is-on .no{ color:var(--hb-paper) }
.hb-track .dur{
  margin-left:auto; font-family:var(--hb-readout); font-size:15px;
  color:var(--hb-ink-3); flex:0 0 auto;
}
.hb-track.is-on .dur{ color:var(--hb-paper) }
.hb-playlist-bar{
  display:flex; gap:var(--hb-s2); align-items:center; flex-wrap:wrap;
  margin-top:var(--hb-s3);
}

/* Call to action band. Ink, centered, one pink action, colorless caution
   stripes on the edges. The pink stays on the button, never the band. */
.hb-cta{
  position:relative;
  background:var(--hb-ink); color:var(--hb-paper);
  padding:var(--hb-s8) var(--hb-s5);
  text-align:center; overflow:hidden;
}
.hb-cta h2{ color:var(--hb-paper); font-size:clamp(30px,5vw,46px) }
.hb-cta .hb-cta-sub{ max-width:520px; margin:var(--hb-s3) auto var(--hb-s5); opacity:.85 }
.hb-cta-actions{ display:flex; gap:var(--hb-s3); justify-content:center; flex-wrap:wrap }
.hb-stripes{
  height:10px;
  background:repeating-linear-gradient(135deg,
    var(--hb-ink) 0 14px, var(--hb-paper) 14px 28px);
}
.hb-cta > .hb-stripes{ position:absolute; left:0; right:0 }
.hb-cta > .hb-stripes.is-top{ top:0 }
.hb-cta > .hb-stripes.is-bottom{ bottom:0 }

/* ==========================================================================
   14. BENCH LAYER
   The strips, stage overlays and rail rows of a design bench, measured from
   the shipped benches (PIP, COLLAR, BLOCKS). It loads beside everything
   above: new names where a published name already means something else
   (.hb-prow beside .hb-row, .hb-welcome beside .hb-card). Spacing reads the
   4 px scale; a measured value off the scale takes the nearest step and
   GUIDELINES 9 lists each one.
   ========================================================================== */

/* Steps. The tabs strip of a bench, on the .hb-tabs markup: equal width,
   numbered, pink underline on the current step, ok badge when done. Never
   wraps; HbSteps swaps it for a select before it would. */
.hb-tabs.hb-steps{ gap:0; overflow:hidden }
.hb-steps > .hb-tab{
  flex:1 1 0; min-width:0; opacity:1;
  font-size:11px; letter-spacing:.04em;
  padding:var(--hb-s2) calc(var(--hb-s1) / 2);
  display:inline-flex; align-items:center; justify-content:center;
}
.hb-steps > .hb-tab[aria-selected="true"],.hb-steps > .hb-tab.is-active{ color:var(--hb-paper) }
.hb-steps .n{
  display:inline-block; width:18px; height:18px; line-height:16px; flex:0 0 auto;
  border:1px solid var(--hb-paper); text-align:center;
  margin-right:var(--hb-s1); font-size:11px; letter-spacing:0;
}
.hb-steps > .hb-tab.is-done .n{ background:var(--hb-ok); border-color:var(--hb-ok) }
.hb-steps-select{ display:block; width:100%; border-left:0; border-right:0 }
/* Numbered tabs (HbTabs num): the number is the order of work; a done
   tab fills its number green, as a step does. */
.hb-tabs.is-num > .hb-tab{ display:inline-flex; align-items:center }
.hb-tabs.is-num .n{
  display:inline-block; min-width:18px; height:18px; line-height:16px; flex:0 0 auto;
  border:1px solid currentColor; text-align:center;
  margin-right:var(--hb-s2); font-size:11px; letter-spacing:0;
}
.hb-tab.is-done .n{ background:var(--hb-ok); border-color:var(--hb-ok); color:var(--hb-paper) }
.hb-tabs-select{ display:block; width:100%; border-left:0; border-right:0 }
/* A tab or fold left empty names the next action instead of a blank. */
.hb-empty-hint{ margin:0; padding:var(--hb-s4) 0; font-family:var(--hb-body); font-size:14px; color:var(--hb-ink-3) }
@media(min-width:641px){
  .hb-steps > .hb-tab{ letter-spacing:.14em; font-size:12px; padding:var(--hb-s2) var(--hb-s1) }
  .hb-steps .n{ margin-right:var(--hb-s2) }
}

/* Guide. The toolbar strip of a bench: step name in VT323, the goal in
   Special Elite, the verbs at the right end (undo, redo, open, save,
   guide). Never a second bar. */
.hb-bar.hb-guide{
  font-family:var(--hb-body); font-size:13px; color:var(--hb-ink-2);
  flex-wrap:nowrap; gap:var(--hb-s2);
}
.hb-guide-step{
  font-family:var(--hb-readout); font-size:17px; color:var(--hb-pink);
  text-transform:uppercase; white-space:nowrap; flex:0 0 auto;
}
.hb-guide-goal{ display:none; flex:1 1 auto; min-width:0 }
.hb-guide-verbs{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--hb-s1); margin-left:auto; flex:0 1 auto; min-width:0 }
.hb-guide-verbs .hb-btn{ box-shadow:none }
.hb-guide-verbs .hb-btn{ width:44px; height:44px; padding:0; justify-content:center }
.hb-guide-verbs .hb-btn > .hb-guide-verb-label{
  position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;
}
@media(min-width:641px){
  .hb-guide-verbs .hb-btn{ width:auto; height:auto; padding:8px 14px; justify-content:flex-start }
  .hb-guide-verbs .hb-btn > .hb-guide-verb-label{ position:static; width:auto; height:auto; overflow:visible; clip:auto }
  .hb-guide-goal{ display:block }
}

/* Stage overlays. Absolute inside a relative stage, each with its own
   z-index: four corners and the centre, nothing else. */
.hb-stage.hb-stage-ov{ position:relative; padding:0; overflow:hidden }
.hb-stage.hb-stage-ov.is-quiet{ box-shadow:var(--hb-shadow-lg) }
.hb-ov{ position:absolute; z-index:5; display:flex; flex-direction:column; gap:var(--hb-s1) }
.hb-ov-tl{ left:var(--hb-s3); top:var(--hb-s3); max-width:calc(100% - 2 * var(--hb-s3)) }
.hb-ov-tr{ right:var(--hb-s3); top:var(--hb-s3); align-items:flex-end }
.hb-ov-bl{ left:var(--hb-s3); bottom:var(--hb-s3) }
.hb-ov-br{ right:var(--hb-s3); bottom:var(--hb-s3); align-items:flex-end; z-index:6 }
.hb-ov-c{
  inset:0; z-index:20; align-items:center; justify-content:center;
  pointer-events:none;
}
.hb-ov-c > *{ pointer-events:auto }
.hb-ov:empty{ display:none }

/* Cams and modes. One strip that wraps, translucent void buttons. The
   current cam is outlined in paper, never pink. */
.hb-cams{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) }
.hb-cams > button{
  font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.08em;
  background:color-mix(in srgb, var(--hb-void) 80%, transparent); color:var(--hb-lit-label);
  border:1px solid var(--hb-ink-border); padding:calc(var(--hb-s1) / 2) var(--hb-s1); cursor:pointer;
  min-width:44px; min-height:44px;
}
@media (hover:hover) and (pointer:fine){ .hb-cams > button:hover{ color:var(--hb-paper) } }
.hb-cams > button.is-on,.hb-cams > button[aria-pressed="true"]{ color:var(--hb-paper); border-color:var(--hb-paper) }
.hb-cams > button:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:1px }
@media(min-width:641px){ .hb-cams > button{ padding:var(--hb-s1) var(--hb-s2) } }
@media(min-width:641px) and (pointer:fine){ .hb-cams > button{ min-width:0; min-height:0 } }

/* Legend. Slot, name and role per material in VT323 on the void; mode
   notes use the lit set. Under 640 px it collapses to slot chips in the
   status strip, never hidden outright. */
.hb-legend{ display:none; flex-direction:column; gap:var(--hb-s1); font-family:var(--hb-readout); font-size:15px; color:var(--hb-paper) }
.hb-legend-item{ display:flex; align-items:center; gap:var(--hb-s2) }
.hb-legend-sw{ display:inline-block; width:14px; height:14px; flex:0 0 auto; border:1px solid var(--hb-paper); background:var(--hb-mat-color, transparent) }
.hb-legend-role{ color:var(--hb-lit-label) }
.hb-legend-chips{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) }
.hb-legend-chip{
  display:inline-flex; align-items:center; gap:var(--hb-s1);
  font-family:var(--hb-readout); font-size:15px; color:var(--hb-paper);
  border:1px solid var(--hb-ink-border); padding:0 var(--hb-s1);
}
@media(min-width:641px){
  .hb-legend{ display:flex }
  .hb-legend-chips{ display:none }
}

/* HUD. Bottom left: stage chips, explode and open sliders, the drive pad. */
.hb-hud{ display:flex; flex-direction:column; gap:var(--hb-s2); font-family:var(--hb-readout); font-size:15px; color:var(--hb-paper) }

/* Stage bar. An ink strip across the top of a paper stage. */
.hb-stagebar{
  display:flex; align-items:center; gap:var(--hb-s2); flex:0 0 auto; flex-wrap:wrap;
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-utility); font-size:11px;
  padding:var(--hb-s1) var(--hb-s3);
}

/* Materials. Pinned first in the rail on every step: swatch, extruder,
   material, the parts it prints, its role. */
.hb-mat .hb-row{ cursor:default; gap:var(--hb-s2); font-size:11px; padding:var(--hb-s1) var(--hb-s2) }
@media (hover:hover) and (pointer:fine){ .hb-mat .hb-row:hover{ background:none } }
.hb-mat-sw{ width:18px; height:18px; flex:0 0 auto; border:var(--hb-border) solid var(--hb-ink); background:var(--hb-mat-color, var(--hb-paper-edge)) }
.hb-mat-ex{ font-family:var(--hb-readout); font-size:15px; color:var(--hb-ink-3); width:18px; flex:0 0 auto }
.hb-mat-name{ font-weight:600; flex:0 1 auto; min-width:0; overflow-wrap:anywhere }
.hb-mat-parts{ color:var(--hb-ink-2); flex:1 1 auto; min-width:0; overflow-wrap:anywhere }
.hb-mat-role{ font-size:10px; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3); flex:0 0 auto }

/* Param row. Label column with a reset mark at its end once the value
   leaves its default, the control, a paired number, the unit. Wraps on
   narrow screens. */
.hb-prow{ display:flex; align-items:center; flex-wrap:wrap; gap:var(--hb-s2); margin:var(--hb-s1) 0 }
.hb-prow-label{
  flex:0 0 96px; display:flex; align-items:center; gap:var(--hb-s1);
  font-family:var(--hb-utility); font-size:10px;
  text-transform:uppercase; letter-spacing:.12em; color:var(--hb-ink-3);
  overflow-wrap:anywhere;
}
.hb-prow-ctl{ flex:1 1 0; min-width:48px; display:flex; align-items:center }
.hb-prow-ctl > .hb-seg{ display:flex; flex:1 1 auto; min-width:0; box-shadow:none }
.hb-prow-ctl > .hb-seg > button{ flex:1 1 auto; min-width:0; padding:var(--hb-s1); letter-spacing:.04em; overflow:hidden; text-overflow:ellipsis }
.hb-prow-ctl > .hb-slider{ display:block; flex:1 1 auto; min-width:0; margin:0 }
.hb-prow-ctl > .hb-slider > .hb-label,.hb-prow-ctl > .hb-slider > .hb-readout{ display:none }
.hb-prow-ctl > .hb-select{ flex:1 1 auto; min-width:0 }
.hb-prow-num.hb-input{ box-sizing:border-box; width:64px; flex:0 0 auto; min-width:0; padding:var(--hb-s1) var(--hb-s1) }
/* Seg and switch inside a param row are toggles: ink when on, never pink. */
.hb-prow-ctl > .hb-seg > button.is-on{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-prow-ctl > .hb-switch[aria-checked="true"]::before{ background:var(--hb-paper-sunk); border-color:var(--hb-ink) }
.hb-prow-ctl > .hb-switch[aria-checked="true"]::after{ background:var(--hb-ink) }
.hb-prow-unit{ font-family:var(--hb-utility); font-size:10px; color:var(--hb-ink-3); flex:0 0 22px }
.hb-prow-reset{
  box-sizing:border-box; width:22px; height:22px; flex:0 0 auto; padding:0; margin-left:auto;
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; color:var(--hb-ink-3); border:0; cursor:pointer;
}
@media (hover:hover) and (pointer:fine){ .hb-prow-reset:hover{ color:var(--hb-ink) } }
.hb-prow-reset:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:1px }
.hb-prow-reset[hidden]{ display:none }
.hb-prow-why{ flex:1 0 100%; font-family:var(--hb-body); font-size:12px; color:var(--hb-ink-3) }
.hb-prow.is-disabled .hb-prow-label{ color:var(--hb-ink-4) }
/* 44 px on phones and touch screens; the 22 px mark only with a fine pointer on a wide screen */
.hb-prow-reset{ width:44px; height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-prow-reset{ width:22px; height:22px } }

/* Welcome. The card over the stage centre on first run: tool name, a
   two-line note, the steps, three starts. It takes the pink shadow while
   open and the stage drops to the plain one. */
.hb-welcome-scrim{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--hb-void) 82%, transparent);
}
.hb-welcome{
  position:relative;
  background:var(--hb-paper); color:var(--hb-ink);
  border:var(--hb-border-hd) solid var(--hb-ink); box-shadow:var(--hb-shadow-pink);
  font-family:var(--hb-body); font-size:14px;
  padding:var(--hb-s4) var(--hb-s5);
  max-width:min(640px, calc(100% - var(--hb-s4) - var(--hb-s1)));
  max-height:calc(100% - var(--hb-s4) - var(--hb-s1)); overflow:auto;
}
.hb-welcome:focus{ outline:none }
.hb-welcome h2{ font-family:var(--hb-display); font-size:30px; font-weight:400; margin:0 0 var(--hb-s2) }
.hb-welcome h2 span{ color:var(--hb-pink) }
.hb-welcome h2 span.hb-suffix{ color:var(--hb-ink) }
.hb-welcome-note{ color:var(--hb-ink-3); margin:var(--hb-s2) 0; font-size:13px }
.hb-welcome-steps{ display:grid; grid-template-columns:1fr 1fr; gap:var(--hb-s3); margin:var(--hb-s3) 0 var(--hb-s4); padding:0; list-style:none }
.hb-welcome-steps > li{ border:var(--hb-border) solid var(--hb-ink); padding:var(--hb-s2) }
.hb-welcome-steps b{ display:block; font-family:var(--hb-readout); font-size:22px; font-weight:400; color:var(--hb-pink) }
.hb-welcome-steps p{ margin:calc(var(--hb-s1) / 2) 0 0; font-size:12px }
.hb-welcome-steps > li{ display:flex; flex-direction:column; align-items:flex-start; gap:var(--hb-s1) }
.hb-welcome-steps > li.is-done{ border-style:dashed; color:var(--hb-ink-3) }
.hb-welcome-steps > li.is-done b{ color:var(--hb-ok-ink) }
.hb-welcome-count{ font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-2) }
@media(pointer:coarse){ .hb-welcome-steps .hb-btn{ min-height:44px } }
.hb-welcome-close{ position:absolute; top:var(--hb-s2); right:var(--hb-s2) }
.hb-welcome .hb-tiles{ grid-template-columns:repeat(auto-fit,minmax(132px,1fr)) }
@media(min-width:641px){ .hb-welcome-steps{ grid-template-columns:repeat(4,1fr) } }

/* ==========================================================================
   19. AI AND 3D LAYER
   The pieces of a page that runs a model or a 3D scene in the tab: the
   viewport with its hud, the model loader, permission and capability
   states, chat, timed transcripts, audio strips, check results, readout
   grids and gauge rows. Taken from the hackbuild-motion,
   hackbuild-browser-ai and hackbuild-agents example pages and the
   dog-simulator view; docs/consumers-ai-3d.md maps each element.
   Every class stands alone for vanilla pages; the Vue components bind to
   them. GUIDELINES 10 holds the rules and the pink budget.
   ========================================================================== */

/* Status line. One sentence under the controls that says what the page is
   doing or what failed. Special Elite, a square marker by kind. */
.hb-status{
  display:flex; align-items:baseline; gap:var(--hb-s2);
  font-family:var(--hb-body); font-size:13px; line-height:1.5;
  color:var(--hb-ink-2); min-height:1.5em; margin:var(--hb-s2) 0;
}
.hb-status::before{
  content:""; width:8px; height:8px; flex:0 0 auto; align-self:center;
  background:var(--hb-ink-4);
}
.hb-status:empty::before{ display:none }
.hb-status.is-ok::before{ background:var(--hb-ok) }
.hb-status.is-warn{ color:var(--hb-warn-ink) }
.hb-status.is-warn::before{ background:var(--hb-warn) }
.hb-status.is-err{ color:var(--hb-err) }
.hb-status.is-err::before{ background:var(--hb-err) }
.hb-status.is-info::before{ background:var(--hb-info) }
.hb-status.is-busy::before{ background:var(--hb-ink); animation:hb-blink 1s infinite }

/* Inline control in a toolbar or a controls row: a utility label, then
   the control. .is-wide takes the whole row (URL fields). */
.hb-ctl{
  display:inline-flex; align-items:center; gap:var(--hb-s2); flex:1 1 100%; min-width:0; max-width:100%; white-space:nowrap;
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em; color:var(--hb-ink-3);
}
.hb-ctl > .hb-input,.hb-ctl > .hb-select{ width:auto; min-width:0; flex:1 1 auto; text-transform:none; letter-spacing:0; font-weight:400 }
.hb-ctl > .hb-range{ flex:1 1 auto; width:auto; min-width:0 }
.hb-ctl > .hb-readout{ font-size:17px; color:var(--hb-ink); min-width:4ch; text-align:right }
.hb-ctl.is-wide{ display:flex; flex:1 1 100%; white-space:normal; min-width:0 }
.hb-ctl.is-wide > .hb-input{ flex:1 1 auto }
@media(min-width:641px){
  .hb-ctl{ flex:0 0 auto }
  .hb-ctl > .hb-input,.hb-ctl > .hb-select{ flex:0 1 auto }
  .hb-ctl > .hb-range{ flex:0 1 auto; width:140px }
  .hb-ctl.is-wide{ flex:1 1 100% }
  .hb-ctl.is-wide > .hb-input{ flex:1 1 auto }
}

/* Readout grid. Label and value pairs, many at once: fps, timings, probe
   results. Values are VT323 ink; one value may be the focal pink. */
.hb-readouts{
  display:grid; grid-template-columns:minmax(0,1fr);
  gap:0 var(--hb-s5); margin:var(--hb-s2) 0 var(--hb-s5);
}
.hb-readouts > .hb-kv{ font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-3) }
.hb-readouts > .hb-kv:last-child{ border-bottom:1px dashed rgba(26,26,26,.25) }
.hb-readouts .hb-readout{ color:var(--hb-ink); font-size:18px; text-align:right; overflow-wrap:anywhere }
.hb-readouts .is-focal .hb-readout,.hb-readouts .hb-readout.is-focal{ color:var(--hb-pink) }
@media(min-width:641px){ .hb-readouts{ grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) } }

/* Gauge rows. Label, a bar, the value: drives, utilities, scores. Ink
   fill on a sunk track; the current row is the one pink. */
.hb-gauges{ display:flex; flex-direction:column; gap:var(--hb-s1) }
.hb-gauge{
  display:grid; grid-template-columns:96px minmax(0,1fr) 48px; align-items:center;
  gap:var(--hb-s2); font-family:var(--hb-utility); font-size:12px;
}
.hb-gauge-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.hb-gauge > .hb-meter{ height:11px; background:var(--hb-paper-sunk) }
.hb-gauge > .hb-meter > i{ background:var(--hb-ink) }
.hb-gauge-value{ font-family:var(--hb-readout); font-size:16px; text-align:right; font-variant-numeric:tabular-nums }
.hb-gauge.is-cur .hb-gauge-label{ font-weight:700 }
.hb-gauge.is-cur > .hb-meter > i{ background:var(--hb-pink) }

/* Instrument head on an h2 or h3. `.hb h3` sets the marker face and a zero
   margin at a higher specificity, so the head restates its own. */
.hb h2.hb-panel-hd-inst,.hb h3.hb-panel-hd-inst{
  font-family:var(--hb-readout); font-size:17px; letter-spacing:.06em; line-height:1.3;
  margin:calc(-1 * var(--hb-s4)) calc(-1 * var(--hb-s5)) var(--hb-s3);
}
.hb-panel-hd-inst:has(> .hb-hd-aux){ display:flex; align-items:baseline; gap:var(--hb-s2) }
/* Instrument head value: the right end of an ink head, quieter. */
.hb-hd-aux{ margin-left:auto; color:var(--hb-lit-label); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }

/* Busy pill. The task is running; the dot blinks ink, so a row of busy
   pills never spends the pink. */
.hb-pill.is-busy::before{ background:var(--hb-ink); animation:hb-blink 1s infinite }

/* Viewport. The stage for a 3D scene, a camera feed or a canvas sim: the
   void, the pink shadow, the canvas filling it, hud slots on top. The
   scene draws its own background and stays brightly lit; the hud plates
   are translucent void so they read on a light or a dark scene. */
.hb-viewport{
  position:relative; overflow:hidden; width:100%;
  aspect-ratio:var(--hb-vp-ratio-sm, 1/1); max-height:62vh; max-height:62svh;
  container-type:inline-size;
  background:var(--hb-void); color:var(--hb-paper);
  border:var(--hb-border-em) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-pink);
}
.hb-viewport.is-fill{ aspect-ratio:auto; max-height:none; height:100% }
.hb-viewport.is-quiet{ box-shadow:var(--hb-shadow-lg) }
.hb-viewport > canvas,.hb-viewport > video,.hb-viewport > img,.hb-viewport > .hb-viewport-media{
  position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none;
}
.hb-viewport > video,.hb-viewport > img{ object-fit:contain }
.hb-viewport > .hb-ov-bl,.hb-viewport > .hb-ov-br{ max-width:calc(100% - 2 * var(--hb-s3)) }
/* Bottom band: a wrapping row of scene verbs across the foot. */
.hb-ov-b{
  left:var(--hb-s2); right:var(--hb-s2); bottom:var(--hb-s2);
  flex-direction:row; flex-wrap:wrap; align-items:flex-end; gap:var(--hb-s1) var(--hb-s2);
}
@media(min-width:641px){
  .hb-viewport{ aspect-ratio:var(--hb-vp-ratio, 16/9); max-height:70vh }
  .hb-viewport.is-fill{ aspect-ratio:auto; max-height:none }
  .hb-ov-b{ left:var(--hb-s3); right:var(--hb-s3); bottom:var(--hb-s3) }
}
/* A narrow viewport stacks the hud figures and shrinks the scene verbs;
   from 561 px of viewport width they sit in a row at full size. */
.hb-hudstats{ flex-direction:column; align-items:flex-end }
.hb-ov-b .hb-btn{ font-size:10px; padding:5px 8px; box-shadow:2px 2px 0 var(--hb-ink) }
@container (min-width:561px){
  .hb-hudstats{ flex-direction:row; align-items:stretch }
  .hb-ov-b .hb-btn{ font-size:11px; padding:8px 14px; box-shadow:var(--hb-shadow) }
}

/* Hud stat. fps, frame ms, inference ms on a translucent void plate. The
   key is the lit label, the figure paper, a missed budget lit warn. */
.hb-hudstats{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) }
.hb-hudstat{
  display:inline-flex; align-items:baseline; gap:var(--hb-s1);
  font-family:var(--hb-readout); font-size:16px; line-height:1.1;
  background:color-mix(in srgb, var(--hb-void) 80%, transparent);
  border:1px solid var(--hb-ink-border); color:var(--hb-paper);
  padding:calc(var(--hb-s1) / 2) var(--hb-s2); white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.hb-hudstat .k{ color:var(--hb-lit-label); text-transform:uppercase }
.hb-hudstat .u{ color:var(--hb-lit-label); font-size:13px }
.hb-hudstat.is-warn b{ color:var(--hb-lit-warn) }
.hb-hudstat.is-err b{ color:var(--hb-lit-err) }
.hb-hudstat b{ font-weight:400 }
/* A plain note in a hud corner: hints, the orbit keys. */
.hb-hudnote{
  font-family:var(--hb-body); font-size:12px; line-height:1.4; max-width:280px;
  background:color-mix(in srgb, var(--hb-void) 80%, transparent); color:var(--hb-paper);
  border:1px solid var(--hb-ink-border); padding:var(--hb-s1) var(--hb-s2);
  display:none;
}
@media(min-width:641px){ .hb-hudnote{ display:block } }

/* Viewport cover. Over the whole viewport while it cannot show the scene:
   loading, waiting for a file, no webgpu adapter. Says what and why. */
.hb-vp-cover{
  position:absolute; inset:0; z-index:20;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:var(--hb-s3); padding:var(--hb-s5); text-align:center;
  background:color-mix(in srgb, var(--hb-void) 88%, transparent); color:var(--hb-paper);
}
.hb-vp-cover[hidden]{ display:none }
.hb-vp-cover-title{ font-family:var(--hb-display); font-size:26px; line-height:1.1 }
.hb-vp-cover-note{ font-family:var(--hb-body); font-size:13px; color:var(--hb-lit-label); max-width:46ch }
.hb-vp-cover.is-err .hb-vp-cover-note{ color:var(--hb-lit-err) }
.hb-vp-cover > .hb-progress{ width:min(360px, 100%) }

/* Inset. A picture in picture card on the viewport: the eye view, a
   depth map, a mask. Ink head, the media at its own ratio. */
.hb-inset{
  width:min(100%, max(44cqw, 168px)); margin:0;
  background:var(--hb-void); color:var(--hb-paper);
  border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow);
}
.hb-inset-hd{
  font-family:var(--hb-readout); font-size:15px; letter-spacing:.04em; text-transform:uppercase;
  background:var(--hb-ink); color:var(--hb-paper); padding:2px var(--hb-s2);
  display:flex; align-items:center; gap:var(--hb-s2); white-space:nowrap; min-width:0; overflow:hidden;
}
.hb-inset-title{ min-width:0; overflow:hidden; text-overflow:ellipsis }
.hb-inset-toggle{ display:inline-flex; align-items:center; gap:var(--hb-s1); min-width:0; padding:0; background:transparent; border:0; color:inherit; font:inherit; letter-spacing:inherit; text-transform:inherit; cursor:pointer }
.hb-inset-caret{ flex:none; width:1ch }
.hb-inset-modes{ display:flex; border-bottom:1px solid var(--hb-ink-border); background:var(--hb-ink) }
.hb-inset-mode{ flex:1 1 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:1px 4px; background:transparent; border:0; color:var(--hb-lit-label); font-family:var(--hb-readout); font-size:14px; letter-spacing:.04em; text-transform:uppercase; cursor:pointer }
.hb-inset-mode + .hb-inset-mode{ border-left:1px solid var(--hb-ink-border) }
.hb-inset-mode[aria-pressed="true"]{ background:var(--hb-paper); color:var(--hb-ink) }
.hb-inset-toggle:focus-visible,.hb-inset-mode:focus-visible{ outline:2px solid var(--hb-pink); outline-offset:1px }
.hb-inset.is-closed{ box-shadow:none }
@media(pointer:coarse){ .hb-inset-toggle,.hb-inset-mode{ min-height:44px } .hb-inset-toggle{ min-width:44px; flex:1 1 auto } .hb-inset-mode{ min-width:44px } }
.hb-inset-media{ position:relative; aspect-ratio:var(--hb-inset-ratio, 4/3) }
.hb-inset-media > canvas,.hb-inset-media > video,.hb-inset-media > img{ position:absolute; inset:0; width:100%; height:100%; display:block; object-fit:cover }
@container (min-width:561px){ .hb-inset{ width:min(var(--hb-inset-w), 46cqw) } }

/* Bubble. A speech or thought bubble pinned over a point in the scene.
   The page sets left and top in px; the bubble sits above the point. */
.hb-bubble{
  position:absolute; z-index:8; pointer-events:none; left:var(--hb-x, 0); top:var(--hb-y, 0);
  transform:translate(-50%, calc(-100% - 10px));
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow);
  font-family:var(--hb-body); font-size:14px; line-height:1.35;
  padding:var(--hb-s1) var(--hb-s2); max-width:280px; width:max-content;
}
.hb-bubble::after{
  content:""; position:absolute; left:50%; bottom:-7px; width:10px; height:10px;
  background:inherit; border-right:var(--hb-border) solid var(--hb-ink); border-bottom:var(--hb-border) solid var(--hb-ink);
  transform:translateX(-50%) rotate(45deg);
}
.hb-bubble.is-ink{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-bubble[hidden]{ display:none }
.hb-bubble.is-clamped > .hb-bubble-text{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:var(--hb-lines, 3); line-clamp:var(--hb-lines, 3); overflow:hidden }

/* Drop zone. Drop a file or pick one. The file input lives inside. While
   a file hovers, the dashes go pink: structural, like the focus ring. */
.hb-dropzone{
  display:flex; align-items:center; flex-wrap:wrap; gap:var(--hb-s2) var(--hb-s3);
  border:var(--hb-border) dashed var(--hb-ink-4); background:var(--hb-paper-sunk);
  padding:var(--hb-s3); font-family:var(--hb-body); font-size:13px; color:var(--hb-ink-3);
}
.hb-dropzone input[type=file]{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-2); max-width:100% }
.hb-dropzone input[type=file]::file-selector-button{
  font-family:var(--hb-utility); font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.09em;
  background:var(--hb-paper-raised); color:var(--hb-ink); border:var(--hb-border) solid var(--hb-ink);
  padding:5px 10px; margin-right:var(--hb-s2); cursor:pointer;
}
.hb-dropzone input[type=file]::file-selector-button{ min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-dropzone input[type=file]::file-selector-button{ min-height:0 } }
.hb-dropzone-pick{ position:relative; flex:0 0 auto }
.hb-dropzone-pick > input[type=file]{ position:absolute; inset:calc(var(--hb-border) * -1); width:auto; height:auto; opacity:0; cursor:pointer }
.hb-dropzone-pick:focus-within{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-dropzone.is-over{ border-color:var(--hb-pink); border-style:dashed; color:var(--hb-ink) }
/* Cover form: over a whole viewport, shown only while a file hovers. */
.hb-dropzone.is-cover{
  position:absolute; inset:0; z-index:30; justify-content:center;
  border-width:4px; background:color-mix(in srgb, var(--hb-paper) 70%, transparent);
  font-family:var(--hb-display); font-size:26px; color:var(--hb-ink);
}
.hb-dropzone.is-cover:not(.is-over){ display:none }

/* Progress. A download or a long task: what it is doing in words, the
   figure, one action (cancel or resume), the bar. Pink while it runs,
   because the running download is the live value of the view; a second
   one at the same time takes .is-quiet. */
.hb-progress{ display:flex; flex-direction:column; gap:var(--hb-s1); min-width:0 }
.hb-progress-hd{ display:flex; align-items:center; gap:var(--hb-s2); min-width:0 }
.hb-progress-text{ font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink-2); flex:1 1 auto; min-width:0; overflow-wrap:anywhere }
.hb-progress-pct{ font-family:var(--hb-readout); font-size:18px; line-height:1; color:var(--hb-ink); font-variant-numeric:tabular-nums }
.hb-progress > .hb-meter{ position:relative; overflow:hidden }
.hb-progress.is-busy > .hb-meter > i{ width:30% !important; animation:hb-sweep 1.4s steps(14) infinite }
.hb-progress.is-paused > .hb-meter > i{ background:var(--hb-ink-4) }
.hb-progress.is-done > .hb-meter > i{ background:var(--hb-slime) }
.hb-progress.is-failed > .hb-meter > i{ background:var(--hb-lit-err) }
.hb-progress.is-failed .hb-progress-text{ color:var(--hb-err) }
.hb-progress.is-quiet > .hb-meter > i{ background:var(--hb-paper) }
@keyframes hb-sweep{ from{ transform:translateX(-100%) } to{ transform:translateX(340%) } }
.hb-stage .hb-progress-text,.hb-vp-cover .hb-progress-text,.hb-on-ink .hb-progress-text{ color:var(--hb-lit-label) }
.hb-stage .hb-progress-pct,.hb-vp-cover .hb-progress-pct,.hb-on-ink .hb-progress-pct{ color:var(--hb-paper) }
.hb-stage .hb-progress > .hb-meter,.hb-vp-cover .hb-progress > .hb-meter{ border-color:var(--hb-ink-border) }

/* Verdict. A static outline tag for a result: pass, fail, not run,
   running, warn. Signal colors on paper, the lit set on ink and void. */
.hb-verdict{
  display:inline-flex; align-items:center; gap:var(--hb-s1); white-space:nowrap;
  font-family:var(--hb-utility); font-size:10px; font-weight:700;
  text-transform:uppercase; letter-spacing:.1em; line-height:1.4;
  color:var(--hb-ink-3); border:1px solid currentColor; padding:0 6px;
}
.hb-verdict.is-pass{ color:var(--hb-ok-ink) }
.hb-verdict.is-fail{ color:var(--hb-err) }
.hb-verdict.is-warn{ color:var(--hb-warn-ink) }
.hb-verdict.is-skip{ color:var(--hb-ink-3); border-style:dashed }
.hb-verdict.is-run{ color:var(--hb-ink) }
.hb-verdict.is-run::before{ content:""; width:6px; height:6px; background:currentColor; animation:hb-blink 1s infinite }
.hb-stage .hb-verdict.is-pass,.hb-on-ink .hb-verdict.is-pass,.hb-vp-cover .hb-verdict.is-pass{ color:var(--hb-slime) }
.hb-stage .hb-verdict.is-fail,.hb-on-ink .hb-verdict.is-fail,.hb-vp-cover .hb-verdict.is-fail{ color:var(--hb-lit-err) }
.hb-stage .hb-verdict.is-warn,.hb-on-ink .hb-verdict.is-warn,.hb-vp-cover .hb-verdict.is-warn{ color:var(--hb-lit-warn) }
.hb-stage .hb-verdict.is-skip,.hb-on-ink .hb-verdict.is-skip,.hb-stage .hb-verdict.is-run,.hb-on-ink .hb-verdict.is-run{ color:var(--hb-lit-label) }

/* Hash. A SHA-256 line: the hex, cut to fit, and its verdict. */
.hb-hash{ display:flex; align-items:center; gap:var(--hb-s2); min-width:0 }
.hb-hash-hex{
  font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-2);
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* Licence line. The weight licence before the download and after the
   load: an ink rule on sunk paper, the licence and the commercial terms. */
.hb-licence{
  border-left:4px solid var(--hb-ink); background:var(--hb-paper-sunk);
  padding:var(--hb-s2) var(--hb-s3);
  font-family:var(--hb-utility); font-size:11.5px; line-height:1.5; color:var(--hb-ink-2);
}
.hb-licence b{ color:var(--hb-ink); font-weight:700 }
.hb-licence a{ color:var(--hb-ink) }
.hb-licence.is-nc{ border-left-color:var(--hb-warn) }

/* Model loader. A panel: source (URL or a dropped file), size with the
   word that says where the number came from, the hash, the licence, the
   progress, load and cancel, and the error named when it fails. */
.hb-loader{ display:flex; flex-direction:column; gap:var(--hb-s3) }
.hb-loader > .hb-panel-hd,.hb-loader > .hb-panel-hd-inst{ margin-bottom:0 }
.hb-loader-src{ display:flex; flex-direction:column; gap:var(--hb-s2) }
.hb-loader-meta > .hb-kv{ font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-3) }
.hb-loader-meta > .hb-kv > :first-child{ flex:0 0 auto; white-space:nowrap }
.hb-loader-meta > .hb-kv > :last-child{ color:var(--hb-ink); min-width:0; text-align:right }
.hb-loader-actions{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); align-items:center }
.hb-loader > .hb-callout{ margin:0 }

/* Model list. One row per model: name, size and devices, licence, and
   the reason when this device cannot run it. The chosen row takes an ink
   rule, a row it cannot run goes quiet and says why. */
.hb-models{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); color:var(--hb-ink); margin:0; padding:0; list-style:none }
.hb-model{
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px var(--hb-s3); align-items:start;
  padding:var(--hb-s2) var(--hb-s3); border-bottom:1px dashed rgba(26,26,26,.25);
  border-left:4px solid transparent;
}
.hb-model:last-child{ border-bottom:0 }
.hb-model[aria-selected="true"]{ border-left-color:var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-model-name{ font-family:var(--hb-utility); font-size:12.5px; font-weight:700 }
.hb-model-meta,.hb-model-lic{ grid-column:1; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-model-why{ grid-column:1 / -1; font-family:var(--hb-body); font-size:12.5px; color:var(--hb-warn-ink) }
.hb-model > .hb-btn{ grid-column:2; grid-row:1 / span 2 }
.hb-model[aria-disabled="true"] .hb-model-name{ color:var(--hb-ink-4) }

/* Permission and capability. Microphone, camera, the webgpu adapter,
   storage: what it is, where it stands, the reason in words, and the one
   action that can change it. The left rule carries the state. */
.hb-perm{
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:2px var(--hb-s3); align-items:center;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink); border-left-width:6px; border-left-color:var(--hb-ink-4);
  padding:var(--hb-s2) var(--hb-s3);
}
.hb-perm-ic{ grid-column:1; grid-row:1 / span 2; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; color:var(--hb-ink) }
.hb-perm-hd{ grid-column:2; display:flex; align-items:center; gap:var(--hb-s2); flex-wrap:wrap; min-width:0 }
.hb-perm-name{ font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.09em }
.hb-perm-why{ grid-column:2 / -1; font-family:var(--hb-body); font-size:12.5px; line-height:1.45; color:var(--hb-ink-2) }
.hb-perm-act,.hb-perm-acts{ grid-column:3; grid-row:1 }
.hb-perm-acts{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--hb-s1) }
.hb-perm-still{ grid-column:2 / -1; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px var(--hb-s2); font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-2) }
.hb-perm-still-hd{ font-weight:700; text-transform:uppercase; letter-spacing:.09em; font-size:10px; color:var(--hb-ok-ink) }
.hb-perm-still ul{ display:inline; list-style:none; margin:0; padding:0 }
.hb-perm-still li{ display:inline }
.hb-perm-still li + li::before{ content:", " }
@media(max-width:480px){ .hb-perm-act,.hb-perm-acts{ grid-column:1 / -1; grid-row:auto; justify-content:flex-start } }
.hb-perm.is-ok{ border-left-color:var(--hb-ok) }
.hb-perm.is-ask{ border-left-color:var(--hb-info) }
.hb-perm.is-denied{ border-left-color:var(--hb-err) }
.hb-perm.is-missing{ border-left-color:var(--hb-warn) }

/* Chat. A transcript and a composer. Messages are prose in Special
   Elite; the person's turns sit on ink, the model's on raised paper, and
   a streaming reply ends in a blinking ink block. Think text folds. */
.hb-chat{
  display:flex; flex-direction:column; min-height:0;
  border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); color:var(--hb-ink);
  box-shadow:var(--hb-shadow-lg);
}
.hb-chat-log{
  flex:1 1 auto; min-height:0; overflow:auto; max-height:var(--hb-chat-h);
  display:flex; flex-direction:column; gap:var(--hb-s3); padding:var(--hb-s3);
}
.hb-msg{ display:flex; flex-direction:column; gap:2px; max-width:100%; align-self:flex-start }
.hb-msg-who{ font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-msg-text{
  font-family:var(--hb-body); font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere;
  border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper); padding:var(--hb-s2) var(--hb-s3);
}
.hb-msg.is-user{ align-self:flex-end; align-items:flex-end }
.hb-msg.is-user .hb-msg-text{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-msg.is-system{ max-width:100%; align-self:stretch }
.hb-msg.is-system .hb-msg-text{ background:transparent; border-style:dashed; border-color:var(--hb-ink-4); color:var(--hb-ink-3); font-size:13px }
.hb-msg.is-streaming .hb-msg-text::after{
  content:""; display:inline-block; width:.55em; height:1em; margin-left:2px; vertical-align:-2px;
  background:var(--hb-ink); animation:hb-blink 1s infinite;
}
.hb-msg-note{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-msg-note.is-err{ color:var(--hb-err) }
.hb-think{ border:1px dashed var(--hb-ink-4); font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-think > summary{ cursor:pointer; padding:2px var(--hb-s2); text-transform:uppercase; letter-spacing:.09em; font-weight:600; list-style:none }
.hb-think > summary::-webkit-details-marker{ display:none }
.hb-think > summary::before{ content:"+ " }
.hb-think[open] > summary::before{ content:"- " }
.hb-think > pre,.hb .hb-think > pre{
  margin:0; padding:var(--hb-s2); white-space:pre-wrap; font-size:11.5px;
  background:var(--hb-paper-sunk); color:var(--hb-ink-2); border:0; box-shadow:none;
}
.hb-composer{
  display:flex; align-items:flex-end; gap:var(--hb-s2); flex-wrap:wrap;
  border-top:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-sunk); padding:var(--hb-s2);
}
.hb-composer > .hb-textarea{ flex:1 1 220px; min-height:44px; resize:vertical; font-family:var(--hb-body); font-size:16px }
@media(min-width:641px) and (pointer:fine){ .hb-composer > .hb-textarea{ font-size:14px } }
.hb-composer-acts{ display:flex; gap:var(--hb-s2) }
.hb-chat-key{ display:flex; align-items:center; gap:var(--hb-s2); flex-wrap:wrap; padding:var(--hb-s2); border-bottom:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-chat-key > .hb-ctl{ flex:1 1 220px }
.hb-chat-key .hb-input{ flex:1 1 auto }
.hb-chat-key > .hb-readout{ font-size:16px; color:var(--hb-ink-3) }
@media(min-width:641px){ .hb-msg{ max-width:88% } }

/* Transcript. Timed segments: start to end in VT323, the words in
   Special Elite. The segment playing now takes an ink rule and its time
   is the focal pink; a partial line still being heard stays muted. */
.hb-transcript{
  margin:0; padding:0; list-style:none;
  border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); color:var(--hb-ink);
  max-height:var(--hb-chat-h); overflow:auto;
}
.hb-tseg{
  display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--hb-s3); align-items:baseline;
  padding:var(--hb-s1) var(--hb-s3); border-bottom:1px dashed rgba(26,26,26,.2); border-left:4px solid transparent;
}
.hb-tseg:last-child{ border-bottom:0 }
.hb-tseg-t{ font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-3); white-space:nowrap; font-variant-numeric:tabular-nums }
.hb-tseg-text{ font-family:var(--hb-body); font-size:14px; line-height:1.5; overflow-wrap:anywhere }
button.hb-tseg{ width:100%; background:none; border-top:0; border-right:0; text-align:left; cursor:pointer; color:inherit; font:inherit }
@media (hover:hover) and (pointer:fine){ button.hb-tseg:hover{ background:var(--hb-paper-sunk) } }
.hb-tseg.is-now{ border-left-color:var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-tseg.is-now .hb-tseg-t{ color:var(--hb-pink) }
.hb-tseg.is-partial .hb-tseg-text{ color:var(--hb-ink-3) }
.hb-tseg{ min-height:44px }
.hb-tseg-body{ min-width:0; font-family:var(--hb-body); font-size:14px; line-height:1.5; overflow-wrap:anywhere }
.hb-tseg-body > .hb-tseg-text{ display:inline }
.hb-tseg-who{ display:inline-block; margin-right:6px; padding:0 5px; font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; background:var(--hb-ink); color:var(--hb-paper); vertical-align:1px }
input.hb-tseg-who{ width:9ch; min-height:24px; border:1px solid var(--hb-ink-3); background:var(--hb-paper); color:var(--hb-ink); text-transform:none; letter-spacing:0 }
.hb-tseg-why{ margin-left:6px; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-tseg-hit{ background:var(--hb-ink); color:var(--hb-paper); padding:0 1px }
.hb-tseg.is-dropped{ opacity:.55 }
.hb-tseg.is-dropped .hb-tseg-text{ color:var(--hb-err); text-decoration:line-through }
.hb-tseg.is-dropped .hb-tseg-why{ color:var(--hb-err) }
.hb-tseg-note{ padding:var(--hb-s1) var(--hb-s3); border-bottom:1px dashed rgba(26,26,26,.2); font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-transcript{ position:relative }
.hb-transcript.is-edit .hb-tseg-body > .hb-tseg-text{ display:block; min-height:1.5em; outline:0; border-bottom:1px dashed transparent }
.hb-transcript.is-edit .hb-tseg-body > .hb-tseg-text:focus{ border-bottom-color:var(--hb-ink); background:var(--hb-paper) }
button.hb-tseg-t{ background:none; border:0; padding:0; cursor:pointer; text-align:left; align-self:stretch }
button.hb-tseg-t:focus-visible,.hb-tseg-who:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
@media (hover:hover) and (pointer:fine){ button.hb-tseg-t:hover{ color:var(--hb-ink) } }
@media(pointer:coarse){ button.hb-tseg-t{ min-width:44px; min-height:44px } input.hb-tseg-who{ min-height:44px } .hb-transcript.is-edit .hb-tseg-body > .hb-tseg-text{ min-height:44px } }
/* The heard line: the last thing a microphone caught, one line, VT323. */
.hb-heard{
  font-family:var(--hb-readout); font-size:19px; line-height:1.25; min-height:1.6em;
  background:var(--hb-paper-sunk); border:1px solid var(--hb-paper-edge); color:var(--hb-ink);
  padding:2px var(--hb-s2); overflow-wrap:anywhere;
}
.hb-heard:empty::before{ content:attr(data-empty); color:var(--hb-ink-3) }

/* Wave. An audio strip on the void: waveform, level history or visemes
   drawn by the page into the canvas, a label, and an optional playhead.
   The trace is data, so it may be pink; the strip never takes the pink
   shadow, that belongs to the one viewport. */
.hb-wave{
  position:relative; height:var(--hb-wave-h); overflow:hidden;
  background:var(--hb-void); color:var(--hb-paper);
  border:var(--hb-border) solid var(--hb-ink);
}
.hb-wave > canvas{ position:absolute; inset:0; width:100%; height:100%; display:block }
.hb-wave-label{
  position:absolute; left:var(--hb-s2); top:var(--hb-s1); z-index:2;
  font-family:var(--hb-readout); font-size:14px; color:var(--hb-lit-label); text-transform:uppercase;
}
.hb-wave-value{
  position:absolute; right:var(--hb-s2); top:var(--hb-s1); z-index:2;
  font-family:var(--hb-readout); font-size:16px; color:var(--hb-paper); font-variant-numeric:tabular-nums;
}
.hb-wave-head{
  position:absolute; top:0; bottom:0; z-index:1; width:2px; margin-left:-1px;
  left:calc(var(--hb-at, 0) * 100%); background:var(--hb-paper);
}
.hb-wave.is-off > canvas{ opacity:.35 }
.hb-wave.is-seek{ cursor:col-resize; touch-action:none }
.hb-wave.is-seek:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }

/* Feeds. Small multiples of a sense or a camera: each a void canvas with
   a utility caption, pixel art left square. */
.hb-feeds{ display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:var(--hb-s3); margin:var(--hb-s3) 0 }
.hb-feed{ margin:0; display:flex; flex-direction:column; gap:var(--hb-s1); min-width:0 }
.hb-feed > canvas,.hb-feed > video,.hb-feed > img{
  display:block; width:100%; height:auto; background:var(--hb-void);
  border:var(--hb-border) solid var(--hb-ink);
}
.hb-feed.is-pixel > canvas{ image-rendering:pixelated }
.hb-feed.is-mirror > video{ transform:scaleX(-1) }
.hb-feed > figcaption{ font-family:var(--hb-utility); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.09em; color:var(--hb-ink-3) }

/* Checks. The result table of a test page: each check, its verdict, the
   reason in words, and the measured figure. A summary line above. */
.hb-checks-sum{ display:flex; flex-wrap:wrap; gap:var(--hb-s2) var(--hb-s4); align-items:center; margin:0 0 var(--hb-s2); font-family:var(--hb-readout); font-size:17px }
.hb-table.hb-checks td{ vertical-align:top }
.hb-table.hb-checks td.why{ color:var(--hb-ink-2); overflow-wrap:anywhere; min-width:16ch; white-space:normal }
.hb-table.hb-checks td.id{ font-weight:600; white-space:nowrap }
.hb-table.hb-checks tr.is-fail td.id{ box-shadow:inset 4px 0 0 var(--hb-err) }
@media (hover:hover) and (pointer:fine){ .hb-table.hb-checks tbody tr:hover{ background:inherit } }

/* Table row mark: the rows a step used, such as the recall hits handed
   to the model. An ink rule on the first cell, never pink. */
.hb-table tr.is-mark > td:first-child{ box-shadow:inset 4px 0 0 var(--hb-ink); font-weight:700 }

/* Heat table. A matrix of strengths, cue by action. The page sets --v
   from 0 to 1 on each cell; the fill is ink mixed into paper, and the
   figure flips to paper past the middle. */
.hb-heat{ border-collapse:collapse; font-family:var(--hb-utility); font-size:11px }
.hb-heat th{ font-weight:600; color:var(--hb-ink-3); padding:2px var(--hb-s1); text-align:center; white-space:nowrap }
.hb-heat th[scope="row"]{ text-align:right }
.hb-heat td{
  min-width:28px; height:22px; text-align:center; border:1px solid var(--hb-paper-edge);
  font-family:var(--hb-readout); font-size:14px; font-variant-numeric:tabular-nums;
  background:color-mix(in srgb, var(--hb-ink) calc(var(--v, 0) * 100%), var(--hb-paper-raised));
}
.hb-heat td.is-hi{ color:var(--hb-paper) }

@media (prefers-reduced-motion:reduce){
  .hb-status.is-busy::before,.hb-pill.is-busy::before,.hb-verdict.is-run::before,
  .hb-msg.is-streaming .hb-msg-text::after{ animation:none }
  .hb-progress.is-busy > .hb-meter > i{ animation:none; width:100% !important; opacity:.45 }
}

/* ==========================================================================
   20. MINDS AND CAPABILITIES
   What an agent wants, what it weighed, why it acted, and what the page
   can turn on: drive sparkline rows, choice bars, the cause timeline and
   the capability panel. Taken from the dog-simulator minds tab design
   (two agents, one timeline) and its capability drawer. Every class
   stands alone for vanilla pages; the Vue components bind to them.
   GUIDELINES 11 holds the rules and the pink budget: the chosen bar or
   the current trace, never both, and the running download in the panel.
   ========================================================================== */

/* Spark rows. Label, a sparkline of recent history with a threshold rule
   and switch ticks, the value, a state chip. Ink trace on sunk paper; the
   current row may take the one pink trace. Each row is 44 px on a phone
   and may be a button that opens the larger chart under it. */
.hb-sparks{ display:flex; flex-direction:column; margin:0; padding:0; list-style:none; min-width:0 }
.hb-sparks > li{ display:block; min-width:0 }
.hb-spark{
  display:grid; grid-template-columns:72px minmax(0,1fr) 40px; align-items:center;
  position:relative; gap:0 var(--hb-s2); min-height:44px; width:100%; min-width:0;
  padding:var(--hb-s1); border:0; border-bottom:1px dashed rgba(26,26,26,.2);
  background:transparent; color:var(--hb-ink); text-align:left;
  font-family:var(--hb-utility); font-size:12px;
}
.hb-sparks > li:last-child > .hb-spark:not([aria-expanded="true"]){ border-bottom:0 }
button.hb-spark{ cursor:pointer }
@media (hover:hover) and (pointer:fine){ button.hb-spark:hover{ background:var(--hb-paper-sunk) } }
.hb-spark-label{ grid-column:1; grid-row:1 / span 2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.hb-spark:has(> .hb-spark-chip:not(:empty)) > .hb-spark-label{ grid-row:1; align-self:end }
.hb-spark-line,.hb-spark-value{ grid-row:1 / span 2 }
.hb-spark-line{ display:block; width:100%; height:var(--hb-spark-h); background:var(--hb-paper-sunk); overflow:visible }
.hb-spark-value{ font-family:var(--hb-readout); font-size:17px; line-height:1; text-align:right; font-variant-numeric:tabular-nums }
.hb-spark-chip{
  grid-column:1; grid-row:2; justify-self:start; margin:0;
  font-family:var(--hb-utility); font-size:10px; font-weight:700; line-height:1.4;
  text-transform:uppercase; letter-spacing:.1em; white-space:nowrap;
  color:var(--hb-ink-3); border:1px solid currentColor; padding:0 6px;
}
.hb-spark-chip:empty{ display:none }
.hb-spark-chip.is-hi{ background:var(--hb-ink); color:var(--hb-paper); border-color:var(--hb-ink) }
.hb-spark-chip.is-lo{ border-style:dashed }
/* svg parts, drawn by the page or the component */
.hb-spark-trace{ fill:none; stroke:var(--hb-ink); stroke-width:1.5; stroke-linejoin:miter; vector-effect:non-scaling-stroke }
.hb-spark-th{ stroke:var(--hb-ink-3); stroke-width:1; stroke-dasharray:3 3; vector-effect:non-scaling-stroke }
.hb-spark-tick{ stroke:var(--hb-ink-3); stroke-width:1; vector-effect:non-scaling-stroke }
.hb-spark-now{ fill:var(--hb-ink) }
.hb-spark.is-cur .hb-spark-label{ font-weight:700 }
.hb-spark.is-cur .hb-spark-trace{ stroke:var(--hb-pink); stroke-width:2 }
.hb-spark.is-cur .hb-spark-now{ fill:var(--hb-pink) }
/* The larger chart a row opens: the same series, an axis line, words. */
.hb-spark-big{
  display:flex; flex-direction:column; gap:var(--hb-s1);
  padding:var(--hb-s2) var(--hb-s1) var(--hb-s3); border-bottom:1px dashed rgba(26,26,26,.2);
}
.hb-spark-big[hidden]{ display:none }
.hb-spark-big > svg{ display:block; width:100%; height:var(--hb-spark-big-h); background:var(--hb-paper-sunk); border:1px solid var(--hb-paper-edge) }
.hb-spark-axis{ display:flex; justify-content:space-between; gap:var(--hb-s2); font-family:var(--hb-readout); font-size:14px; color:var(--hb-ink-3) }
.hb-spark-note{ font-family:var(--hb-body); font-size:12.5px; line-height:1.45; color:var(--hb-ink-2) }
@media(min-width:641px){
  .hb-spark{ grid-template-columns:96px minmax(0,1fr) 48px 84px; gap:0 var(--hb-s3); padding-block:0 }
  .hb-spark-label,.hb-spark:has(> .hb-spark-chip:not(:empty)) > .hb-spark-label,.hb-spark-line,.hb-spark-value{ grid-row:1; align-self:center }
  .hb-spark-chip{ grid-column:4; grid-row:1; justify-self:stretch; text-align:center; overflow:hidden; text-overflow:ellipsis }
}
@media(min-width:641px) and (pointer:fine){ .hb-spark{ min-height:32px } }

/* Choice bars. The options an agent weighed: label, a bar split into the
   base score, the commitment bonus (hatched) and a struck penalty, the
   score and the chance in VT323. The chosen row takes a 4 px ink rule
   and the one pink bar; the top scoring row is bold; zero rows dim. */
.hb-choice{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-choice-list{
  display:grid; grid-template-columns:fit-content(40%) minmax(0,1fr) 36px 40px;
  margin:0; padding:0; list-style:none;
}
.hb-opt{
  display:grid; grid-column:1 / -1; grid-template-columns:subgrid; align-items:center;
  position:relative; gap:0 var(--hb-s2); min-height:32px; padding:0 var(--hb-s1) 0 var(--hb-s2);
  border-left:4px solid transparent; border-bottom:1px dashed rgba(26,26,26,.2);
  font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink);
}
.hb-opt:last-child{ border-bottom:0 }
.hb-opt-label{ min-width:64px; overflow-wrap:anywhere; line-height:1.25; padding-block:2px }
@media(min-width:641px){ .hb-opt-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-block:0 } }
.hb-opt-bar{ display:flex; height:12px; min-width:0; background:var(--hb-paper-sunk); overflow:hidden }
.hb-opt-bar > i{ display:block; height:100%; flex:0 0 auto }
.hb-opt-base{ background:var(--hb-ink-2) }
.hb-opt-bonus{
  background:repeating-linear-gradient(135deg, var(--hb-ink) 0 2px, var(--hb-paper-raised) 2px 5px);
  box-shadow:inset 0 0 0 1px var(--hb-ink);
}
.hb-opt-penalty{
  background:linear-gradient(var(--hb-ink-3), var(--hb-ink-3)) center / 100% 1px no-repeat;
  box-shadow:inset 0 0 0 1px var(--hb-ink-3);
}
.hb-opt-score,.hb-opt-prob{ font-family:var(--hb-readout); font-size:16px; line-height:1; text-align:right; font-variant-numeric:tabular-nums }
.hb-opt-score{ color:var(--hb-ink-3) }
.hb-opt.is-top .hb-opt-label{ font-weight:700 }
.hb-opt.is-top .hb-opt-base{ background:var(--hb-ink) }
.hb-opt.is-chosen{ border-left-color:var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-opt.is-chosen .hb-opt-bar{ background:var(--hb-paper-raised) }
.hb-opt.is-chosen .hb-opt-base{ background:var(--hb-pink) }
.hb-opt.is-chosen .hb-opt-label::after{ content:" *"; font-weight:700 }
.hb-choice.is-quiet .hb-opt.is-chosen .hb-opt-base{ background:var(--hb-ink) }
.hb-opt.is-zero{ color:var(--hb-ink-4) }
.hb-opt.is-zero .hb-opt-score{ color:var(--hb-ink-4) }
.hb-choice-why{ margin:0; font-family:var(--hb-body); font-size:13.5px; line-height:1.5; color:var(--hb-ink) }
.hb-choice-meta{ margin:0; font-family:var(--hb-utility); font-size:11px; line-height:1.5; color:var(--hb-ink-3); overflow-wrap:anywhere }
.hb-choice-key{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) var(--hb-s3); margin:0; font-family:var(--hb-utility); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.09em; color:var(--hb-ink-3) }
.hb-choice-key > span{ display:inline-flex; align-items:center; gap:var(--hb-s1) }
.hb-choice-key i{ display:inline-block; width:14px; height:10px }
.hb-choice-key .hb-opt-base{ background:var(--hb-ink) }
@media(min-width:641px){
  .hb-choice-list{ grid-template-columns:fit-content(40%) minmax(0,1fr) 40px 44px }
  .hb-opt{ gap:0 var(--hb-s3) }
}

/* Cause timeline. Events from one or more agents, newest first: time,
   agent, kind icon, the text, and the chain that led to it (a sense, a
   choice, an action) indented under it. Filters are toggle chips; a pin
   keeps an event at the top. No pink here: rules and pins are ink. */
.hb-causal{ display:flex; flex-direction:column; gap:var(--hb-s3); min-width:0 }
.hb-causal-filters{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); align-items:center }
.hb-causal-filters > .hb-label,.hb-causal-flabel{
  flex:1 1 100%; font-family:var(--hb-utility); font-size:10px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em; color:var(--hb-ink-3);
}
.hb-causal-filters .hb-chip{ box-shadow:none }
.hb-causal-list{
  margin:0; padding:0; list-style:none; max-height:var(--hb-log-h); overflow:auto; overscroll-behavior:contain;
  border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); color:var(--hb-ink);
}
.hb-causal-list > ol{ margin:0; padding:0; list-style:none }
.hb-causal-group{
  position:sticky; top:0; z-index:1; margin:0;
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
  background:var(--hb-ink); color:var(--hb-paper); padding:2px var(--hb-s3);
}
.hb-causal-empty{ padding:var(--hb-s3); font-family:var(--hb-body); font-size:13px; color:var(--hb-ink-3) }
.hb-cev{
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:2px var(--hb-s2); align-items:start;
  padding:var(--hb-s2) var(--hb-s1) var(--hb-s2) var(--hb-s3);
  border-bottom:1px dashed rgba(26,26,26,.2); border-left:4px solid transparent;
}
.hb-cev:last-child{ border-bottom:0 }
.hb-cev-hd{ display:flex; align-items:center; flex-wrap:wrap; gap:2px var(--hb-s2); min-width:0 }
.hb-cev-t{ font-family:var(--hb-readout); font-size:16px; line-height:1; color:var(--hb-ink-3); font-variant-numeric:tabular-nums; white-space:nowrap }
.hb-cev-agent,.hb-cev-kind{
  display:inline-flex; align-items:center; gap:var(--hb-s1);
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
}
.hb-cev-agent{ color:var(--hb-ink) }
.hb-cev-kind{ color:var(--hb-ink-3) }
.hb-cev-text{ grid-column:1; margin:0; font-family:var(--hb-body); font-size:13.5px; line-height:1.45; overflow-wrap:anywhere }
.hb-cev-pin{
  grid-column:2; grid-row:1 / span 2; justify-self:end;
  width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center;
  background:transparent; color:var(--hb-ink-4); border:var(--hb-border) solid transparent; cursor:pointer;
}
@media (hover:hover) and (pointer:fine){ .hb-cev-pin:hover{ color:var(--hb-ink); border-color:var(--hb-ink) } }
.hb-cev-pin[aria-pressed="true"]{ background:var(--hb-ink); color:var(--hb-paper); border-color:var(--hb-ink) }
.hb-cev.is-pinned{ border-left-color:var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-cev.is-new .hb-cev-t{ color:var(--hb-ink) }
/* The chain: what led here, oldest first, one line each, indented on a
   dashed rule. */
.hb-cev-chain{
  grid-column:1; margin:var(--hb-s1) 0 0; padding:0 0 0 var(--hb-s3); list-style:none;
  border-left:2px dashed var(--hb-ink-4); display:flex; flex-direction:column; gap:2px;
}
.hb-cev-chain > li{
  display:block; min-width:0; overflow-wrap:anywhere;
  font-family:var(--hb-utility); font-size:11.5px; line-height:1.45; color:var(--hb-ink-2);
}
.hb-cev-chain > li > .hb-icon{ vertical-align:-1px; margin-right:var(--hb-s1); color:var(--hb-ink-3) }
.hb-cev-chain .hb-cev-t{ font-size:14px; margin-right:var(--hb-s2) }
@media(min-width:641px){
  .hb-causal-filters > .hb-label,.hb-causal-flabel{ flex:0 0 auto }
}
@media(min-width:641px) and (pointer:fine){
  .hb-cev{ grid-template-columns:minmax(0,1fr) 32px }
  .hb-cev-pin{ width:32px; height:32px }
}

/* Capability panel. What the page can turn on: one row per optional
   feature with its state, what it needs, the size with its source word,
   the licence, the reason when it cannot run, and one button. The left
   rule carries the state; a loading row holds the progress. */
.hb-caps{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0; container-type:inline-size }
.hb-caps-sum{ display:flex; align-items:baseline; gap:var(--hb-s2); margin:0; font-family:var(--hb-readout); font-size:18px; color:var(--hb-ink) }
.hb-caps-sum > small{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-caps-list{ display:flex; flex-direction:column; gap:var(--hb-s2); margin:0; padding:0; list-style:none }
.hb-cap{
  display:grid; grid-template-columns:minmax(0,1fr); gap:var(--hb-s1) var(--hb-s3); align-items:center;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink); border-left-width:6px; border-left-color:var(--hb-ink-4);
  padding:var(--hb-s2) var(--hb-s3); min-width:0; position:relative;
}
.hb-cap-hd{ display:flex; align-items:center; gap:var(--hb-s1) var(--hb-s2); flex-wrap:wrap; min-width:0 }
.hb-cap-hd > .hb-icon{ flex:0 0 auto }
.hb-cap-name{ font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; overflow-wrap:anywhere }
.hb-cap-act{ justify-self:start }
.hb-cap-needs{ display:flex; flex-wrap:wrap; gap:var(--hb-s1); margin:0; padding:0; list-style:none }
.hb-cap-need{
  display:inline-flex; align-items:center; gap:var(--hb-s1);
  font-family:var(--hb-utility); font-size:10.5px; line-height:1.5; color:var(--hb-ink-2);
  background:var(--hb-paper-sunk); border:1px solid var(--hb-paper-edge); padding:0 6px;
}
.hb-cap-need.is-missing{ color:var(--hb-warn-ink); border-color:currentColor; background:transparent; text-decoration:line-through }
.hb-cap-why,.hb-cap-dep,.hb-cap-ask{ margin:0; font-family:var(--hb-body); font-size:12.5px; line-height:1.45; color:var(--hb-ink-2) }
.hb-cap-why{ color:var(--hb-warn-ink) }
.hb-cap-dep{ color:var(--hb-ink) }
.hb-cap > .hb-licence{ padding:var(--hb-s1) var(--hb-s2) }
.hb-cap.is-on{ border-left-color:var(--hb-ok) }
.hb-cap.is-loading{ border-left-color:var(--hb-ink) }
.hb-cap.is-failed{ border-left-color:var(--hb-err) }
.hb-cap.is-failed .hb-cap-why{ color:var(--hb-err) }
.hb-cap.is-unavailable{ border-left-color:var(--hb-warn) }
.hb-cap.is-unavailable .hb-cap-name{ color:var(--hb-ink-3) }
/* From 420 px of panel width the button sits beside the name, the rest
   wraps under both. */
@container (min-width:420px){
  .hb-cap{ grid-template-columns:minmax(0,1fr) auto }
  .hb-cap > *{ grid-column:1 / -1 }
  .hb-cap > .hb-cap-hd{ grid-column:1 }
  .hb-cap > .hb-cap-act{ grid-column:2; grid-row:1; justify-self:end }
}

/* `.hb p` sets a bottom margin at a higher specificity; these paragraphs
   space by their container's gap instead. */
.hb .hb-cev-text,.hb .hb-choice-why,.hb .hb-choice-meta,.hb .hb-choice-key,
.hb .hb-spark-note,.hb .hb-caps-sum,.hb .hb-cap-why,.hb .hb-cap-dep,.hb .hb-cap-ask,
.hb .hb-causal-empty{ margin:0 }

/* ==========================================================================
   21. VANILLA BEHAVIOUR HOOKS
   The states the vanilla entry (`/vanilla`) writes on the class layer.
   ========================================================================== */

/* Window drop cover: dropRoutes on the window toggles .is-over, and
   .is-reject when no route takes the hovering type. */
.hb-dropzone.is-cover.is-window{ position:fixed; z-index:var(--hb-z-modal) }
.hb-dropzone.is-cover.is-reject{ border-color:var(--hb-ink-3); color:var(--hb-ink-3) }
/* HbDropzone: the zone opens the picker on a press; a refused file names
   itself and the types the zone takes on a line of its own. */
.hb-dropzone:not(.is-cover){ cursor:pointer }
.hb-dropzone-err{ flex:1 0 100%; margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-err) }
/* A button the behaviour hides (keep, while not armed) stays hidden:
   .hb-btn sets display, which outranks the hidden attribute. */
.hb-btn[hidden]{ display:none }

/* ==========================================================================
   22. SUITE NAV
   HbSuiteNav. Groups as tabs on ink and the group's tools as chips in the
   toolbar row from 761 px of container width; below that one 44 px
   "group / tool" button that opens the grouped list in a bottom sheet with
   a search field. The width is the nav's own (container query), so a nav
   in a narrow column takes the button.
   ========================================================================== */
.hb-suitenav{ display:block; container:hb-suitenav / inline-size; min-width:0 }
.hb-suitenav-wide{ display:none }
.hb-suitenav-phone{ display:block; background:var(--hb-ink) }
.hb-suitenav-tools{ display:none }
@container hb-suitenav (min-width:761px){
  .hb-suitenav:not(.is-sheet) .hb-suitenav-wide{ display:block }
  .hb-suitenav:not(.is-sheet) .hb-suitenav-phone{ display:none }
  .hb-suitenav:not(.is-sheet) .hb-suitenav-tools{ display:flex }
}
.hb-suitenav.is-strip .hb-suitenav-wide{ display:block }
.hb-suitenav.is-strip .hb-suitenav-phone{ display:none }
.hb-suitenav.is-strip .hb-suitenav-tools{ display:flex }
/* Seven tools scroll inside the strip, never the page. */
.hb-suitenav-tools{ gap:var(--hb-s2); overflow-x:auto; min-width:0; max-width:100%; padding:2px 4px 4px 0 }
.hb-suitenav-tools > .hb-chip{ flex:0 0 auto }
/* The current tool is ink, so the pink stays with the group tab. */
.hb-suitenav-tools > .hb-chip.is-on{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-suitenav-bar:empty{ display:none }
/* On a phone the tool chips live in the sheet, so a bar holding only them
   collapses; it returns with the strip, or with toolbar content. */
.hb-suitenav-bar:not(:has(> :not(.hb-suitenav-tools))){ display:none }
@container hb-suitenav (min-width:761px){ .hb-suitenav:not(.is-sheet) .hb-suitenav-bar:has(> .hb-suitenav-tools){ display:flex } }
.hb-suitenav.is-strip .hb-suitenav-bar:has(> .hb-suitenav-tools){ display:flex }
.hb-suitenav-btn{
  display:flex; align-items:center; gap:var(--hb-s2); width:100%; min-height:44px;
  font-family:var(--hb-utility); font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.09em;
  background:transparent; color:var(--hb-paper); border:0;
  border-bottom:var(--hb-border-hd) solid var(--hb-pink);
  padding:0 max(var(--hb-s4), env(safe-area-inset-right)) 0 max(var(--hb-s4), env(safe-area-inset-left));
  cursor:pointer; text-align:left;
}
.hb-suitenav-path{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.hb-suitenav-path b{ color:var(--hb-pink); font-weight:600; padding:0 .5em }
.hb-suitenav-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-suitenav-sheet{ display:flex; flex-direction:column; gap:var(--hb-s3) }
.hb-suitenav-sheet > .hb-input{ font-size:16px }
.hb-suitenav-list{ display:flex; flex-direction:column; gap:var(--hb-s3) }
.hb-suitenav-list > [role="group"]{ display:flex; flex-direction:column; border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised) }
.hb-suitenav-list > [role="group"][hidden]{ display:none }
.hb-suitenav-head{
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
  background:var(--hb-ink); color:var(--hb-paper); padding:4px var(--hb-s3);
}
.hb-suitenav-opt{
  display:flex; align-items:center; gap:var(--hb-s3); min-height:44px; width:100%;
  font-family:var(--hb-utility); font-size:12.5px; color:var(--hb-ink); text-align:left;
  background:none; border:0; border-bottom:1px dashed rgba(26,26,26,.25);
  padding:0 var(--hb-s3); cursor:pointer;
}
.hb-suitenav-opt:last-child{ border-bottom:0 }
.hb-suitenav-opt[hidden]{ display:none }
.hb-suitenav-opt small{ margin-left:auto; font-size:10.5px; color:var(--hb-ink-3) }
.hb-suitenav-opt[aria-current="page"]{ font-weight:700; box-shadow:inset 4px 0 0 var(--hb-ink) }
.hb-suitenav-opt.is-active{ background:var(--hb-pink); color:var(--hb-ink) }
.hb-suitenav-opt.is-active small{ color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-suitenav-opt:hover{ background:var(--hb-pink-10) } .hb-suitenav-opt.is-active:hover{ background:var(--hb-pink) } }
.hb .hb-suitenav-empty,.hb-suitenav-empty{ margin:0; font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-3) }

/* ==========================================================================
   23. WORKSPACE MENU
   HbWorkspaceMenu. In the header: the workspace name as a menu trigger and
   the disclosure level as a segmented toggle from 641 px; below that one
   44 px menu button opens a sheet holding the name, a level button that
   cycles, the actions and the other workspaces. Busy disables every action
   and says why.
   ========================================================================== */
.hb-wsmenu{ display:inline-flex; align-items:center; gap:var(--hb-s3); min-width:0 }
.hb-wsmenu-wide,.hb-wsmenu-level{ display:none }
@media(min-width:641px){
  .hb-wsmenu-wide{ display:inline-block }
  .hb-wsmenu-level{ display:inline-flex }
  .hb-wsmenu-phone{ display:none }
}
.hb-wsmenu-btn{
  display:inline-flex; align-items:center; gap:var(--hb-s2); min-height:44px; max-width:16rem;
  font-family:var(--hb-utility); font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.09em;
  background:transparent; color:inherit; border:1px solid rgba(245,240,230,.4); padding:0 var(--hb-s3); cursor:pointer;
}
.hb-wsmenu-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
@media(pointer:fine){ .hb-wsmenu-btn{ min-height:32px } }
/* The level is a view switch, not the focal value: paper when on, so the
   one pink stays with the group tab. */
.hb-header .hb-seg.is-toggle > button.is-on{ background:var(--hb-paper); color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-wsmenu-btn:hover{ border-color:var(--hb-pink); color:var(--hb-pink) } }
.hb-wsmenu-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-wsmenu-menu{ min-width:15rem }
.hb-wsmenu-menu .hb-menu-item small,.hb-wsmenu-row small{ margin-left:auto; font-size:10px; color:var(--hb-ink-3); text-transform:none; letter-spacing:0 }
.hb-wsmenu-proj{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; text-transform:none; letter-spacing:0 }
.hb-menu-item.hb-wsmenu-del{ color:var(--hb-err) }
.hb .hb-wsmenu-busy,.hb-wsmenu-busy{ margin:0; padding:6px 14px; font-family:var(--hb-utility); font-size:11px; color:var(--hb-warn-ink) }
.hb-wsmenu-sheet{ display:flex; flex-direction:column; gap:var(--hb-s3); color:var(--hb-ink) }
.hb-wsmenu-sheet .hb-wsmenu-busy{ padding:0 }
.hb-wsmenu-acts{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--hb-s2) }
.hb-wsmenu-acts > .hb-btn{ justify-content:center }
.hb-wsmenu-head{ font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-wsmenu-row{ min-height:44px }
.hb-wsmenu-sheet > .hb-wsmenu-del{ justify-content:center }
/* Menu items are 44 px on a coarse pointer, here and in every menu. */
@media(pointer:coarse){ .hb-menu-item{ min-height:44px } }

/* ==========================================================================
   24. STATUS PILLS AND STATUS LIST
   HbPills: one pill per subsystem in the header (off, load, ok, warn, err).
   Under 641 px the pills drop to one 44 px button of dots with a ready
   count from 360 px, which opens HbStatusList in a sheet. HbStatusList is
   one line per subsystem: the state in words and what it means now.
   ========================================================================== */
.hb-pills{ display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0 }
.hb-pills > button.hb-pill{ cursor:pointer }
.hb-pills > button.hb-pill:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-pill.is-off{ opacity:.6 }
@media(pointer:coarse){ .hb-pills > button.hb-pill{ min-height:44px } }
.hb-pills.is-compact > .hb-pill{ display:none }
.hb-pills-dots{ display:inline-flex; align-items:center; gap:5px; min-height:44px; min-width:44px; padding:0 var(--hb-s2); background:transparent; color:inherit; border:1px solid currentColor; cursor:pointer }
.hb-pills-dots:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-pills-count{ display:none; font-family:var(--hb-readout); font-size:15px; line-height:1; margin-left:2px }
@media(min-width:360px){ .hb-pills-count{ display:inline } }
@media(min-width:641px){
  .hb-pills.is-compact > .hb-pill{ display:inline-flex }
  .hb-pills.is-compact > .hb-pills-dots{ display:none }
}
/* On ink the pills drop the paper plate and keep the state colours. */
.hb-header .hb-pill,.hb-on-ink .hb-pill{ background:transparent; color:var(--hb-paper); border-color:rgba(245,240,230,.55) }
.hb-header .hb-pill.is-ok::before,.hb-on-ink .hb-pill.is-ok::before{ background:var(--hb-slime) }
.hb-header .hb-pill.is-warn,.hb-on-ink .hb-pill.is-warn{ color:var(--hb-lit-warn); border-color:var(--hb-lit-warn) }
.hb-header .hb-pill.is-warn::before,.hb-on-ink .hb-pill.is-warn::before{ background:var(--hb-lit-warn) }
.hb-header .hb-pill.is-err,.hb-on-ink .hb-pill.is-err{ color:var(--hb-lit-err); border-color:var(--hb-lit-err) }
.hb-header .hb-pill.is-err::before,.hb-on-ink .hb-pill.is-err::before{ background:var(--hb-lit-err) }
.hb-header .hb-pill.is-busy::before,.hb-on-ink .hb-pill.is-busy::before{ background:var(--hb-paper) }
/* The status dot: round, one of the radius exceptions (the pill dot). */
.hb-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--hb-ink-4); flex:0 0 auto }
.hb-dot.is-ok,.is-ok > * > .hb-dot{ background:var(--hb-ok) }
.hb-dot.is-warn,.is-warn > * > .hb-dot{ background:var(--hb-warn) }
.hb-dot.is-err,.is-err > * > .hb-dot{ background:var(--hb-err) }
.hb-dot.is-load,.is-load > * > .hb-dot{ background:var(--hb-ink); animation:hb-blink 1s infinite }
.hb-header .hb-dot.is-ok,.hb-on-ink .hb-dot.is-ok{ background:var(--hb-slime) }
.hb-header .hb-dot.is-warn,.hb-on-ink .hb-dot.is-warn{ background:var(--hb-lit-warn) }
.hb-header .hb-dot.is-err,.hb-on-ink .hb-dot.is-err{ background:var(--hb-lit-err) }
.hb-header .hb-dot.is-load,.hb-on-ink .hb-dot.is-load{ background:var(--hb-paper) }
.hb-pills-dots.is-err{ border-color:var(--hb-lit-err) }
.hb-statuslist{ list-style:none; margin:0; padding:0; border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); color:var(--hb-ink) }
.hb-statuslist > li{ border-bottom:1px dashed rgba(26,26,26,.25) }
.hb-statuslist > li:last-child{ border-bottom:0 }
.hb-statuslist-row{
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:2px var(--hb-s2);
  width:100%; min-height:44px; padding:6px var(--hb-s3); background:none; border:0; color:inherit; text-align:left;
  font-family:var(--hb-utility); font-size:11px;
}
button.hb-statuslist-row{ cursor:pointer }
@media (hover:hover) and (pointer:fine){ button.hb-statuslist-row:hover{ background:var(--hb-pink-10) } }
button.hb-statuslist-row:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-statuslist-name{ font-weight:700; text-transform:uppercase; letter-spacing:.09em }
.hb-statuslist-state{ font-family:var(--hb-readout); font-size:16px; line-height:1 }
.hb-statuslist-note{ grid-column:2 / -1; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.is-warn > .hb-statuslist-row .hb-statuslist-state{ color:var(--hb-warn-ink) }
.is-err > .hb-statuslist-row .hb-statuslist-state,.is-err > .hb-statuslist-row .hb-statuslist-note{ color:var(--hb-err) }
.is-off > .hb-statuslist-row{ color:var(--hb-ink-3) }

/* ==========================================================================
   25. ACTIVITY LINE
   HbActivity: what the app waits on. The oldest task with its percent and
   a count of the rest, and a 2 px line on the bottom edge of the header
   (it carries position relative): a known fraction fills, an unknown one
   slides. A press lists the tasks with cancel. Under 641 px the label
   drops and the spinner and percent stay.
   ========================================================================== */
.hb-header{ position:relative }
.hb-activity[hidden]{ display:none }
.hb-activity{ min-width:0 }
.hb-activity-btn{
  display:inline-flex; align-items:center; gap:6px; min-height:44px; max-width:22rem; min-width:44px;
  background:transparent; color:inherit; border:0; padding:0 var(--hb-s1); cursor:pointer;
  font-family:var(--hb-utility); font-size:11px;
}
@media(pointer:fine){ .hb-activity-btn{ min-height:28px } }
.hb-activity-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-activity-label{ display:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
.hb-activity-pct{ font-family:var(--hb-readout); font-size:16px; line-height:1; white-space:pre }
.hb-activity-more{ opacity:.6 }
@media(min-width:641px){ .hb-activity-label{ display:inline } }
.hb-activity.is-err .hb-activity-pct,.hb-activity.is-err .hb-activity-label{ color:var(--hb-lit-err) }
.hb-activity-list{ min-width:16rem }
.hb-activity-list .hb-menu-item > span:last-child:not(:first-child){ margin-left:auto }
.hb-activity-row{ text-transform:none; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
.hb-activity-list .hb-menu-item[disabled]{ color:var(--hb-ink-2) }
.hb-activity-line{ position:absolute; left:0; right:0; bottom:-3px; height:2px; overflow:hidden; pointer-events:none }
.hb-activity-fill{ position:absolute; top:0; bottom:0; left:0; width:30%; background:var(--hb-paper); animation:hb-activity-slide 1.1s ease-in-out infinite }
.hb-activity-line.is-known .hb-activity-fill{ animation:none; transition:width var(--hb-t) linear }
.hb-activity-line.is-err .hb-activity-fill{ animation:none; width:100%; background:var(--hb-lit-err) }
@keyframes hb-activity-slide{ from{ transform:translateX(-100%) } to{ transform:translateX(340%) } }
@media (prefers-reduced-motion:reduce){ .hb-activity-line:not(.is-known) .hb-activity-fill{ animation:none; width:100%; opacity:.4 } }

/* ==========================================================================
   26. COMMAND PALETTE
   HbPalette. Opens on / and ctrl+k (cmd+k on a Mac) over the page: a
   prompt field, sectioned items with a hint and a printed key, the empty
   copy and a foot that teaches the keys. Near the top on a wide screen so
   the list grows down; full width under 641 px.
   ========================================================================== */
.hb-modal.hb-palette{ align-items:flex-start; padding-top:max(var(--hb-s4), env(safe-area-inset-top)) }
@media(min-width:641px){ .hb-modal.hb-palette{ padding-top:12vh } }
.hb-palette > .hb-panel{ max-width:600px; padding:0; display:flex; flex-direction:column; max-height:min(72vh, 560px); overflow:hidden }
.hb-palette-field{ display:flex; align-items:center; gap:var(--hb-s2); border-bottom:var(--hb-border) solid var(--hb-ink); padding:0 var(--hb-s3) }
.hb-palette-prompt{ font-family:var(--hb-readout); font-size:22px; color:var(--hb-pink); line-height:1 }
.hb-palette-input{
  flex:1; min-width:0; min-height:48px; border:0; outline:0; background:transparent; color:var(--hb-ink);
  font-family:var(--hb-utility); font-size:16px;
}
/* The field is the focus mark: a pink rule under it, no outline box. */
.hb-palette-input:focus-visible,.hb .hb-palette-input:focus-visible{ outline:0 }
.hb-palette-field:focus-within{ box-shadow:inset 0 -3px 0 var(--hb-pink) }
.hb-palette-list{ overflow-y:auto; padding:var(--hb-s1) 0; min-height:0 }
.hb-palette-list > [role="group"][hidden]{ display:none }
.hb-palette-head{
  display:block; padding:var(--hb-s2) var(--hb-s3) 2px;
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3);
}
.hb-palette-item{
  display:flex; align-items:center; gap:var(--hb-s3); width:100%; min-height:44px;
  padding:0 var(--hb-s3); background:none; border:0; color:var(--hb-ink); text-align:left; cursor:pointer;
  font-family:var(--hb-utility); font-size:12.5px;
}
@media(pointer:fine){ .hb-palette-item{ min-height:34px } }
.hb-palette-item[hidden]{ display:none }
.hb-palette-item.is-active{ background:var(--hb-pink); color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-palette-item:not(.is-active):hover{ background:var(--hb-pink-10) } }
.hb-palette-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
.hb-palette-hint{ font-size:11px; color:var(--hb-ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
.hb-palette-item.is-active .hb-palette-hint{ color:var(--hb-ink) }
.hb-palette-kbd{ margin-left:auto; display:inline-flex; align-items:center; gap:2px; flex:0 0 auto }
.hb .hb-palette-empty,.hb .hb-palette-foot{ margin:0 }
.hb-palette-empty{ padding:var(--hb-s3); font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-3) }
.hb-palette-foot{
  padding:6px var(--hb-s3); border-top:1px dashed rgba(26,26,26,.3);
  font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3);
}
@media(pointer:coarse){ .hb-palette-foot{ display:none } }

/* ==========================================================================
   27. KEY MAP
   HbKeyMap. The hotkey registry printed: a heading per group, the combos
   in .hb-kbd beside what they do. ctrl prints as cmd on a Mac because the
   registry formats it. Two columns from 641 px.
   ========================================================================== */
.hb-keymap{ display:grid; gap:var(--hb-s4); color:var(--hb-ink) }
@media(min-width:641px){ .hb-keymap{ grid-template-columns:repeat(auto-fit, minmax(16rem, 1fr)) } }
.hb-keymap-head,.hb .hb-keymap-head{
  margin:0 0 var(--hb-s2); color:var(--hb-ink); line-height:1.3; padding-bottom:4px; border-bottom:var(--hb-border) solid var(--hb-ink);
  font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
}
.hb-keymap dl{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px var(--hb-s3); margin:0; align-items:baseline }
.hb-keymap dt{ display:flex; flex-wrap:wrap; align-items:center; gap:2px; white-space:nowrap }
.hb-keymap dd{ margin:0; font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-2) }
.hb-keymap-or,.hb-keymap-plus{ font-family:var(--hb-utility); font-size:10px; color:var(--hb-ink-3); padding:0 2px }
.hb .hb-keymap-empty,.hb-keymap-empty{ margin:0; font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-3) }

/* ==========================================================================
   28. TOOL RAIL
   HbToolRail. Icon buttons from tool data, each printing its key letter in
   the corner; the same data binds the letters. The tool that is on fills
   ink, and a hint pill states its gesture. 44 px buttons at every width.
   ========================================================================== */
.hb-toolrail-wrap{ display:inline-flex; flex-direction:column; align-items:flex-start; gap:var(--hb-s2); max-width:100% }
.hb-toolrail{ display:inline-flex; flex-direction:column; border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); box-shadow:2px 2px 0 var(--hb-ink); max-width:100% }
.hb-toolrail-wrap.is-horizontal .hb-toolrail{ flex-direction:row; overflow-x:auto }
.hb-toolrail-btn{
  position:relative; width:44px; height:44px; flex:0 0 auto; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; color:var(--hb-ink); border:0; cursor:pointer;
}
.hb-toolrail-btn + .hb-toolrail-btn{ border-top:1px dashed rgba(26,26,26,.25) }
.hb-toolrail-wrap.is-horizontal .hb-toolrail-btn + .hb-toolrail-btn{ border-top:0; border-left:1px dashed rgba(26,26,26,.25) }
.hb-toolrail-btn.is-on{ background:var(--hb-ink); color:var(--hb-paper) }
@media (hover:hover) and (pointer:fine){ .hb-toolrail-btn:not(.is-on):hover{ background:var(--hb-pink-10) } }
.hb-toolrail-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-toolrail-btn[disabled]{ color:var(--hb-ink-4); cursor:not-allowed }
.hb-toolrail-key{ position:absolute; right:3px; bottom:1px; font-family:var(--hb-utility); font-size:9px; font-weight:700; opacity:.7 }
/* Letters mean nothing without a keyboard. */
@media(pointer:coarse){ .hb-toolrail-key{ display:none } }
.hb .hb-toolrail-hint,.hb-toolrail-hint{
  margin:0; max-width:100%; padding:3px 9px;
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-utility); font-size:11px; line-height:1.4;
}

/* ==========================================================================
   29. CHIP GROUP AND TOGGLE ROW
   HbChipGroup: one or several chips on, arrows move in a single group, a
   letter chooses through the hotkeys. The off chip is dashed and reads as
   a different kind of choice; chosen, it turns warn. HbToggleRow: label,
   one line of why, and the switch, as one 44 px button.
   ========================================================================== */
.hb-chipgroup{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); min-width:0 }
.hb-chip-off{ border-style:dashed; box-shadow:none; background:transparent }
.hb-chip.hb-chip-off.is-on{ background:transparent; color:var(--hb-warn-ink); border-color:var(--hb-warn) }
.hb-chip-key{ font-family:var(--hb-utility); font-size:9px; font-weight:700; opacity:.6; margin-left:2px }
@media(pointer:coarse){ .hb-chip-key{ display:none } }
.hb-togrow{
  display:flex; align-items:center; gap:var(--hb-s3); width:100%; min-height:44px;
  padding:6px 0; background:none; border:0; border-bottom:1px dashed rgba(26,26,26,.25);
  color:var(--hb-ink); text-align:left; cursor:pointer;
}
.hb-togrow:last-child{ border-bottom:0 }
.hb-togrow:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-togrow-text{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px }
.hb-togrow-label{ font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.09em }
.hb-togrow-why{ font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-togrow-sw{
  position:relative; width:42px; height:22px; flex:0 0 auto;
  background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink);
  transition:background var(--hb-t);
}
.hb-togrow-sw::after{
  content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; background:var(--hb-ink);
  transition:transform var(--hb-t), background var(--hb-t);
}
.hb-togrow.is-on .hb-togrow-sw{ background:var(--hb-pink-10); border-color:var(--hb-pink) }
.hb-togrow.is-on .hb-togrow-sw::after{ transform:translateX(20px); background:var(--hb-pink) }
.hb-togrow[disabled]{ cursor:not-allowed; color:var(--hb-ink-4) }
.hb-togrow[disabled] .hb-togrow-why{ color:var(--hb-ink-4) }
.hb-togrow[disabled] .hb-togrow-sw{ border-color:var(--hb-ink-4) }
.hb-togrow[disabled] .hb-togrow-sw::after{ background:var(--hb-ink-4) }

/* ==========================================================================
   30. EVENT LOG, CODE BLOCK, HOW THIS WORKS, EXPORT PANEL
   HbEventLog: the tagged line log. A 38 px tag column in the readout face,
   one tone per kind, live rows replaced in place with a 90 px bar, filter
   chips per kind and a follow toggle. HbCodeBlock: plain text on ink with
   copy and wrap; no highlighter. HbHow: the fold at the foot of a tool.
   HbExportPanel: format chips, file name, export and copy, a two column
   readout and checks tagged ok, warn, err.
   ========================================================================== */
.hb-evlog{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); min-width:0 }
.hb-evlog-head{
  display:flex; align-items:center; gap:var(--hb-s2); flex-wrap:wrap;
  padding:var(--hb-s1) var(--hb-s2); border-bottom:var(--hb-border) solid var(--hb-ink);
}
.hb-evlog-head > .hb-spacer{ flex:1 }
.hb-evlog-label{ font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em }
.hb-evlog-count{ font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-3) }
.hb-evlog-head .hb-chip,.hb-evlog-filters .hb-chip{ box-shadow:none }
.hb-evlog-filters{ display:flex; flex-wrap:wrap; gap:var(--hb-s1); padding:var(--hb-s1) var(--hb-s2); border-bottom:1px dashed rgba(26,26,26,.25) }
.hb-evlog-filters .hb-chip{ text-transform:uppercase; min-width:44px; justify-content:center }
@media(min-width:641px) and (pointer:fine){ .hb-evlog-filters .hb-chip{ min-width:0 } }
.hb-evlog-box{ position:relative }
.hb-evlog-rows{
  max-height:var(--hb-log-h); overflow-y:auto; overscroll-behavior:contain;
  padding:var(--hb-s2); display:flex; flex-direction:column; gap:3px;
}
.hb-evlog-rows:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:-2px }
.hb-evlog-row{ display:flex; align-items:baseline; gap:var(--hb-s2); line-height:1.35; min-width:0 }
.hb-evlog-row[hidden]{ display:none }
.hb-evlog-tag{
  flex:0 0 38px; font-family:var(--hb-readout); font-size:16px; font-weight:400;
  text-transform:uppercase; color:var(--hb-ink-3);
}
.hb-evlog-t{ flex:0 0 auto; font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-3); font-variant-numeric:tabular-nums }
.hb-evlog-text{ flex:1 1 auto; min-width:0; font-family:var(--hb-utility); font-size:12.5px; overflow-wrap:anywhere }
.hb-evlog-row.is-pink .hb-evlog-tag{ color:var(--hb-pink) }
.hb-evlog-row.is-pink .hb-evlog-text{ font-family:var(--hb-body); font-size:14px }
.hb-evlog-row.is-info .hb-evlog-tag{ color:var(--hb-info) }
.hb-evlog-row[data-kind="you"]{ margin-top:6px; padding-top:6px; border-top:1px dashed rgba(26,26,26,.25) }
.hb-evlog-row.is-ok .hb-evlog-text{ color:var(--hb-ok-ink) }
.hb-evlog-row.is-err .hb-evlog-tag,.hb-evlog-row.is-err .hb-evlog-text{ color:var(--hb-err) }
.hb-evlog-row.is-warn .hb-evlog-tag{ color:var(--hb-warn-ink) }
.hb-evlog-row.is-dim .hb-evlog-text{ color:var(--hb-ink-3) }
.hb-evlog-row.is-live .hb-evlog-text{ color:var(--hb-ink-3) }
.hb-evlog-bar{ flex:0 0 90px; height:8px; border:1px solid var(--hb-ink); align-self:center }
.hb-evlog-bar > i{ display:block; height:100%; background:var(--hb-pink) }
.hb-evlog-empty{ margin:0; font-family:var(--hb-utility); font-size:12px; color:var(--hb-ink-3) }
.hb-evlog-jump{ position:absolute; right:var(--hb-s2); bottom:var(--hb-s2) }
@media(max-width:480px){ .hb-evlog-bar{ flex-basis:56px } }

.hb-codeblock{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-ink); min-width:0 }
.hb-codeblock-head{
  display:flex; align-items:center; gap:var(--hb-s1);
  padding:0 0 0 var(--hb-s2); border-bottom:1px solid var(--hb-ink-line);
}
.hb-codeblock-lang{ flex:1; font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-lit-label) }
.hb-codeblock-btn{
  min-height:44px; min-width:44px; padding:0 var(--hb-s2);
  background:transparent; color:var(--hb-paper); border:0; border-left:1px solid var(--hb-ink-line);
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; cursor:pointer;
}
@media(min-width:641px) and (pointer:fine){ .hb-codeblock-btn{ min-height:28px } }
@media (hover:hover) and (pointer:fine){ .hb-codeblock-btn:hover{ color:var(--hb-pink) } }
.hb-codeblock-btn:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:-2px }
.hb-codeblock-btn[aria-pressed="true"]{ background:var(--hb-paper); color:var(--hb-ink) }
.hb-codeblock-btn.is-done{ color:var(--hb-slime) }
.hb-codeblock pre,.hb .hb-codeblock pre{
  margin:0; padding:var(--hb-s3); overflow-x:auto; border:0; box-shadow:none;
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-utility); font-size:12.5px; line-height:1.55; white-space:pre; tab-size:2;
}
.hb-codeblock pre:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:-2px }
.hb-codeblock pre code{ font:inherit; background:none; border:0; padding:0; color:inherit }
.hb-codeblock.is-wrap pre{ white-space:pre-wrap; overflow-wrap:anywhere }

.hb-how > div{ display:flex; flex-direction:column; gap:var(--hb-s3) }
.hb-how-k{ display:block; font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-ink-3); margin-bottom:var(--hb-s1) }
.hb-how-pkgs{ display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--hb-s1) }
.hb-how-pkgs > .hb-how-k{ flex:0 0 100% }
.hb-how-install{ display:flex; flex-direction:column; gap:var(--hb-s1) }
.hb-how-note{ margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-how-links{ display:flex; flex-wrap:wrap; gap:var(--hb-s3) }

.hb-export{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-export > .hb-export-head{ margin:0; font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em }
.hb-export-note{ margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3); overflow-wrap:anywhere }
.hb-export-name{ display:flex; flex-direction:column; gap:var(--hb-s1) }
.hb-export-namebox{ display:flex; align-items:stretch; min-width:0 }
.hb-export-namebox > .hb-input{ flex:1 1 auto; min-width:0; min-height:44px }
.hb-export-ext{
  display:flex; align-items:center; padding:0 var(--hb-s2);
  border:var(--hb-border) solid var(--hb-ink); border-left:0; background:var(--hb-paper-sunk);
  font-family:var(--hb-utility); font-size:14px;
}
.hb-export-local.hb-togrow{ border-bottom:0 }
.hb-export-btns{ display:flex; flex-wrap:wrap; gap:var(--hb-s2) }
.hb-export-btns > .hb-btn:first-child{ flex:1 1 auto; justify-content:center }
.hb-export-busy{ margin:0; font-family:var(--hb-utility); font-size:12px; color:var(--hb-warn-ink) }
.hb-export-readout{
  margin:0; display:grid; grid-template-columns:1fr 1fr; gap:2px var(--hb-s3);
  font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-2);
}
.hb-export-readout > div{ display:flex; justify-content:space-between; gap:var(--hb-s2); min-width:0 }
.hb-export-readout dt{ color:var(--hb-ink-3) }
.hb-export-readout dd{ margin:0; color:var(--hb-ink) }
.hb-export-checks{ list-style:none; margin:0; padding:0; font-family:var(--hb-utility); font-size:12px }
.hb-export-checks > li{ display:flex; gap:var(--hb-s2); align-items:baseline; padding:2px 0; border-bottom:1px dashed rgba(26,26,26,.25) }
.hb-export-checks b{ flex:0 0 34px; font-family:var(--hb-readout); font-size:15px; font-weight:400; text-transform:uppercase }
.hb-export-checks > li > span{ min-width:0; overflow-wrap:anywhere }
.hb-export-checks .is-ok b{ color:var(--hb-ok-ink) }
.hb-export-checks .is-warn b{ color:var(--hb-warn-ink) }
.hb-export-checks .is-err b{ color:var(--hb-err) }
@media(max-width:360px){ .hb-export-readout{ grid-template-columns:1fr } }

/* ==========================================================================
   31. SETTINGS FORM, PRESET CHIPS, PARAM ROW HELP
   HbSettingsForm: sections from a schema, one HbParamRow per key with a
   sentence under it, a tag, and when it applies; reset per row, per
   section and for all. Rows above the disclosure level are hidden and
   counted. HbPresetChips: one press sets every dial a preset names; the
   chip whose values all hold is on, else the row reads custom. On a
   coarse pointer every row, reset mark and number box is 44 px.
   ========================================================================== */
.hb-prow-ctl > .hb-range{ flex:1 1 auto; min-width:0; width:auto }
.hb-prow-ctl > .hb-input{ flex:1 1 auto; min-width:0; padding:var(--hb-s1) var(--hb-s2) }
.hb-prow-name{ min-width:0 }
.hb-prow-tags{ flex:1 0 100%; display:flex; flex-wrap:wrap; gap:var(--hb-s1) }
.hb-prow-tag{
  display:inline-block; font-family:var(--hb-utility); font-size:9px; font-weight:700;
  text-transform:uppercase; letter-spacing:.1em; line-height:1.5;
  color:var(--hb-ink-2); border:1px solid var(--hb-ink-3); padding:0 4px;
}
.hb-prow-tag.is-applies{ border-style:dashed; color:var(--hb-warn-ink); border-color:var(--hb-warn) }
.hb-prow-help{ flex:1 0 100%; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-prow.has-help{ padding-bottom:var(--hb-s2); border-bottom:1px dashed rgba(26,26,26,.25) }
@media(pointer:coarse){
  .hb-prow{ min-height:44px }
  .hb-prow-reset{ width:44px; height:44px }
  .hb-prow-label{ flex-basis:128px }
  .hb-prow-num.hb-input,.hb-prow-ctl > .hb-input,.hb-prow-ctl > .hb-select{ min-height:44px }
  .hb-prow-ctl > .hb-seg > button{ min-height:44px; min-width:48px }
}

.hb-field-head{ display:flex; align-items:center; gap:var(--hb-s2); flex-wrap:wrap }
.hb-field-foot{ display:flex; align-items:baseline; gap:var(--hb-s2) }
.hb-field-count{ margin-left:auto; font-family:var(--hb-readout); font-size:15px; color:var(--hb-ink-3); font-variant-numeric:tabular-nums }
.hb-field-count.is-over{ color:var(--hb-err) }

.hb-setform{ display:flex; flex-direction:column; min-width:0 }
.hb-setform-sec{ padding:var(--hb-s3) 0; border-bottom:var(--hb-border) solid var(--hb-ink) }
.hb-setform-sec:first-child{ padding-top:0 }
.hb-setform > .hb-setform-sec > .hb-setform-head{
  margin:0 0 var(--hb-s1); font-family:var(--hb-utility); font-size:11px; font-weight:700;
  text-transform:uppercase; letter-spacing:.12em;
}
.hb-setform-note{ margin:0 0 var(--hb-s2); font-family:var(--hb-body); font-size:12.5px; color:var(--hb-ink-3) }
.hb-setform-foot,.hb-setform-end{ display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:var(--hb-s2); margin-top:var(--hb-s2) }
.hb-setform-more{ margin-right:auto; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-setform-end{ padding-top:var(--hb-s2) }

.hb-presets{ display:flex; flex-direction:column; gap:var(--hb-s1); margin-bottom:var(--hb-s2) }
.hb-presets-row{ display:flex; flex-wrap:wrap; gap:var(--hb-s2) }
.hb-presets-hint{ margin:0; font-family:var(--hb-body); font-size:12.5px; color:var(--hb-ink-2) }
/* Settings labels run longer than bench labels: a wider column keeps a
   word and its reset mark on one line. */
.hb-setform .hb-prow-label{ flex-basis:136px }
@media(pointer:coarse){ .hb-setform .hb-prow-label{ flex-basis:148px } }
/* Under 400 px the label takes its own line, its reset mark at the right
   end, so the control, number and unit keep one line between them. */
@media(max-width:400px){ .hb-prow-label,.hb-setform .hb-prow-label{ flex-basis:100% } }

/* ==========================================================================
   32. MODEL CATALOGUE, LOAD PHASES, REASONS
   HbModelList: search, censorship chips and the fits switch over groups
   with sticky ink heads. A row is one radio (name, the owner's badge, the
   note, size and vram each with a source word, censorship tag, fit chip,
   tags) beside its state action; the reason under a row this machine
   cannot run; the licence as one quiet line. The chosen row takes an ink
   rule and opens its fact line and context sizes. HbProgress file rows,
   HbReasons rows (label, value, why, edit), capability speed chips.
   ========================================================================== */
.hb-modellist{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0; container-type:inline-size }
.hb-modellist-tools{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-modellist-search > .hb-input{ width:100%; box-sizing:border-box; min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-modellist-search > .hb-input{ min-height:0 } }
.hb-modellist-tools > .hb-togrow{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised) }
.hb .hb-model-legend,.hb-model-legend{ margin:0; font-family:var(--hb-body); font-size:12.5px; line-height:1.45; color:var(--hb-ink-2) }
.hb-model-legend b{ font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.09em; color:var(--hb-ink) }
.hb-modellist > .hb-models{ max-height:var(--hb-models-h, none); overflow:auto }
.hb-model-group{ margin:0 }
.hb-model-gh{
  position:sticky; top:0; z-index:1; margin:0; padding:var(--hb-s1) var(--hb-s3);
  background:var(--hb-ink); color:var(--hb-paper);
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.12em;
}
.hb-model-rows{ list-style:none; margin:0; padding:0 }
.hb-modellist .hb-model{ grid-template-columns:minmax(0,1fr); gap:var(--hb-s1) var(--hb-s3) }
.hb-modellist .hb-model > *{ grid-column:1 / -1 }
.hb-modellist .hb-model:last-child{ border-bottom:0 }
.hb-model.is-chosen{ border-left-color:var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-model.is-fault{ border-left-color:var(--hb-err) }
.hb-model-pick{
  display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; width:100%;
  min-height:44px; margin:0; padding:0; border:0; background:transparent; color:inherit;
  font:inherit; text-align:left; cursor:pointer;
}
.hb-model-pick:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-model-pick[aria-disabled="true"]{ cursor:not-allowed }
.hb-model-pick[aria-disabled="true"] .hb-model-name{ color:var(--hb-ink-4) }
.hb-model-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--hb-s1) var(--hb-s2); min-width:0 }
.hb-model-pick .hb-model-name{ overflow-wrap:anywhere }
.hb-model-badge{ font-family:var(--hb-readout); font-size:15px; line-height:1; color:var(--hb-ink-2) }
.hb-model-def{ font-family:var(--hb-utility); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; background:var(--hb-ink); color:var(--hb-paper); padding:1px 5px }
.hb-model-defwhy,.hb-model-note{ font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-model-defwhy{ color:var(--hb-ink) }
.hb-model-pick .hb-model-meta{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-model-tags{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) }
.hb-model-cens,.hb-model-fit,.hb-model-tag,.hb-model-state{
  font-family:var(--hb-utility); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
  line-height:1.5; padding:0 4px; border:1px solid var(--hb-ink-3); color:var(--hb-ink-2);
}
.hb-model-cens.is-uncensored,.hb-model-cens.is-abliterated{ background:var(--hb-ink); border-color:var(--hb-ink); color:var(--hb-paper) }
.hb-model-cens.is-unknown{ border-style:dashed }
.hb-model-tag{ border-color:var(--hb-paper-edge); background:var(--hb-paper-sunk); font-weight:400 }
.hb-model-fit.is-ok{ color:var(--hb-ok-ink); border-color:currentColor }
.hb-model-fit.is-warn{ color:var(--hb-warn-ink); border-color:currentColor }
.hb-model-fit.is-err{ color:var(--hb-err); border-color:currentColor }
.hb-model-state{ border-style:dashed; color:var(--hb-ink) }
.hb-model.is-loaded .hb-model-state{ border-style:solid; background:var(--hb-ink); color:var(--hb-paper) }
.hb-model-bar{ display:block; width:100%; height:6px; background:var(--hb-paper-sunk); border:1px solid var(--hb-ink) }
.hb-model-bar > i{ display:block; height:100%; background:var(--hb-ink) }
.hb-model-icon:empty{ display:none }
.hb-model-acts{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) var(--hb-s2); align-items:center }
.hb .hb-model-why,.hb-modellist .hb-model-why{ margin:0 }
.hb-model-why.is-fault{ color:var(--hb-err) }
.hb-model-detail{ display:flex; flex-direction:column; gap:var(--hb-s1); padding-top:var(--hb-s1); border-top:1px dashed rgba(26,26,26,.25) }
.hb .hb-model-facts,.hb-model-facts{ margin:0; font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink) }
.hb-model-notes{ margin:0; padding-left:var(--hb-s3); font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-model-ctx{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s1) var(--hb-s2) }
.hb-model-ctxlabel{ font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-model-ctxnote{ flex:1 0 100%; font-family:var(--hb-body); font-size:12px; color:var(--hb-ink-3) }
.hb-model-ctx .hb-chip[disabled]{ border-style:dashed; color:var(--hb-ink-4); box-shadow:none; cursor:not-allowed }
.hb .hb-model-empty,.hb-model-empty{ margin:0; padding:var(--hb-s3); font-family:var(--hb-body); font-size:13px; color:var(--hb-ink-3) }
.hb .hb-model-echo,.hb-model-echo{ margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
/* From 480 px of list width the action sits beside the row. */
@container (min-width:480px){
  .hb-modellist .hb-model{ grid-template-columns:minmax(0,1fr) auto }
  .hb-modellist .hb-model > .hb-model-pick{ grid-column:1 }
  .hb-modellist .hb-model > .hb-model-acts{ grid-column:2; grid-row:1; align-self:start; justify-content:flex-end }
}
.hb-modellist.is-tiers .hb-model-pick{ display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:var(--hb-s3) }
.hb-modellist.is-tiers .hb-model-pick > *{ grid-column:2 }
.hb-modellist.is-tiers .hb-model-icon{ grid-column:1; grid-row:1 / span 6; width:36px; height:36px; display:flex; align-items:center; justify-content:center }

/* Licence as one quiet line: a model row, a load panel. */
.hb .hb-licence-q,.hb-licence-q{ margin:0; font-family:var(--hb-utility); font-size:10.5px; line-height:1.45; color:var(--hb-ink-3); overflow-wrap:anywhere }

/* Load progress: the file rows fold under the summed bar. */
.hb-progress-files{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-progress-files > summary{ cursor:pointer; display:flex; align-items:center; min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-progress-files > summary{ min-height:0 } }
.hb-progress-files > summary:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-progress-files ul{ list-style:none; margin:0; padding:0; max-height:160px; overflow:auto }
.hb-progress-files li{ display:flex; justify-content:space-between; gap:var(--hb-s2); padding:1px 0; border-bottom:1px dashed rgba(26,26,26,.2) }
.hb-progress-files li.is-done{ color:var(--hb-ink-4) }
.hb-progress-file{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.hb-progress-fileamt{ flex:0 0 auto; font-variant-numeric:tabular-nums; color:var(--hb-ink) }

/* Capability speed chip and marks. */
.hb-cap-speed{
  font-family:var(--hb-utility); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
  line-height:1.5; padding:0 4px; border:1px solid currentColor; color:var(--hb-ink-3);
}
.hb-cap-speed.is-fast{ color:var(--hb-ok-ink) }
.hb-cap-speed.is-ok{ color:var(--hb-ink) }
.hb-cap-speed.is-slow{ color:var(--hb-warn-ink) }
.hb-cap-speed.is-none{ border-style:dashed }
.hb-cap-mark{ font-family:var(--hb-utility); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; line-height:1.5; padding:0 4px; background:var(--hb-ink); color:var(--hb-paper) }
.hb-cap-mark.is-stored{ background:transparent; color:var(--hb-ink); border:1px dashed var(--hb-ink) }
.hb-cap-act2{ justify-self:start }
.hb .hb-caps-machine,.hb-caps-machine{ margin:0; font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink) }
.hb .hb-cap-without,.hb-cap-without{ margin:0; font-family:var(--hb-body); font-size:12.5px; line-height:1.45; color:var(--hb-ink-3) }
@container (min-width:420px){
  .hb-cap > .hb-cap-act2{ grid-column:2; justify-self:end }
}

/* Defaults with reasons: label, the value, why it was picked, edit. A
   changed row reads 'your choice' in ink. */
.hb-reasons{ margin:0; display:flex; flex-direction:column; min-width:0 }
.hb-reason{
  display:grid; grid-template-columns:minmax(64px,auto) minmax(0,1fr) auto; gap:var(--hb-s1) var(--hb-s3); align-items:center;
  padding:var(--hb-s1) 0; border-bottom:1px dashed rgba(26,26,26,.25);
}
.hb-reason:last-child{ border-bottom:0 }
.hb-reason-label{ font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-reason-body{ margin:0; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px var(--hb-s2); min-width:0 }
.hb-reason-value{ font-family:var(--hb-utility); font-size:12.5px; font-weight:700; color:var(--hb-ink); overflow-wrap:anywhere }
.hb-reason-why{ flex:1 0 100%; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-reason.is-changed .hb-reason-why{ color:var(--hb-ink) }
.hb-reason-edit{ margin:0 }
@media(max-width:400px){
  .hb-reason{ grid-template-columns:minmax(0,1fr) auto }
  .hb-reason-label{ grid-column:1 / -1 }
}
@media(pointer:coarse){ .hb-model-ctx .hb-chip{ min-width:44px; justify-content:center } }
.hb-model-legend-item + .hb-model-legend-item::before{ content:" " }
.hb-modellist-tools > .hb-togrow{ padding:var(--hb-s1) var(--hb-s3) }

/* ==========================================================================
   33. SLOT RACK, ENGINE BAR, MODEL MANAGER
   HbModelSlot: one organ per row: name and role, the model select with
   size, a load button that names the size, the meta line, its own bar
   and a status square: empty, loading, ready, fault with the message. A
   fault marks its row only. HbModelRack: presets that state the summed
   download, slots that load one after another, the gate line. HbEngineBar:
   the picker shrunk to one line once a model is chosen. HbModelManager:
   the drawer: machine, by job, catalogue, stored and loaded.
   ========================================================================== */
.hb-slot-in{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--hb-s1) var(--hb-s3); align-items:start; min-width:0 }
.hb-slot{
  background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink); border-left:6px solid var(--hb-ink-4);
  padding:var(--hb-s2) var(--hb-s3); min-width:0; container-type:inline-size;
}
.hb-slot.is-ready{ border-left-color:var(--hb-ok) }
.hb-slot.is-loading{ border-left-color:var(--hb-ink) }
.hb-slot.is-fault{ border-left-color:var(--hb-err) }
/* A pick with no catalogue record: named in a row with remove, never hidden. */
.hb-slot.is-missing{ border-left-color:var(--hb-err); border-left-style:dashed }
.hb-slot.is-missing .hb-slot-fault{ flex:1 1 200px; min-width:0 }
.hb-slot.is-missing .hb-slot-stat{ color:var(--hb-err) }
.hb-slot-id{ display:flex; flex-direction:column; gap:2px; min-width:0 }
.hb-slot-name{ font-family:var(--hb-utility); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.1em }
.hb-slot-role{ font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--hb-ink-3) }
.hb-slot-mid{ grid-column:1 / -1; display:flex; flex-direction:column; gap:var(--hb-s1); min-width:0 }
.hb-slot-row{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); align-items:center; min-width:0 }
.hb-slot-pick{ flex:1 1 200px; min-width:0 }
.hb-slot-pick > .hb-select{ width:100%; box-sizing:border-box; min-height:44px }
@media(min-width:641px) and (pointer:fine){ .hb-slot-pick > .hb-select{ min-height:0 } }
.hb-slot-meta{ font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-3) }
.hb-slot-bar,.hb-engine-bar{ display:block; height:6px; background:var(--hb-ink); border:1px solid var(--hb-ink); position:relative; overflow:hidden }
.hb-slot-bar > i,.hb-engine-bar > i{ display:block; height:100%; background:var(--hb-pink) }
.hb-slot-bar.is-busy > i,.hb-engine-bar.is-busy > i{ animation:hb-sweep 1.4s steps(14) infinite }
.hb .hb-slot-fault,.hb-slot-fault{ margin:0; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-err) }
.hb-slot-stat{
  grid-column:2; grid-row:1; display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
  font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3);
}
.hb-slot-sq{ width:8px; height:8px; border:1px solid currentColor }
.hb-slot.is-ready .hb-slot-stat{ color:var(--hb-ok-ink) }
.hb-slot.is-ready .hb-slot-sq,.hb-slot.is-fault .hb-slot-sq{ background:currentColor }
.hb-slot.is-loading .hb-slot-stat{ color:var(--hb-ink) }
.hb-slot.is-loading .hb-slot-sq{ background:currentColor; animation:hb-blink 1s infinite }
.hb-slot.is-fault .hb-slot-stat{ color:var(--hb-err) }
/* From 640 px of slot width the mortise three columns: name, controls, status. */
@container (min-width:640px){
  .hb-slot-in{ grid-template-columns:140px minmax(0,1fr) auto; align-items:center }
  .hb-slot-mid{ grid-column:2; grid-row:1 }
  .hb-slot-stat{ grid-column:3 }
}
@media (prefers-reduced-motion:reduce){ .hb-slot-bar.is-busy > i,.hb-engine-bar.is-busy > i,.hb-slot.is-loading .hb-slot-sq{ animation:none } }

.hb-rack{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-rack-presets{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2) }
.hb-rack-presets > .hb-btn[aria-pressed="true"]{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-rack-plabel{ font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-rack-pnote{ flex:1 0 100%; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-rack-slots{ display:flex; flex-direction:column; gap:var(--hb-s2) }
.hb .hb-rack-gate,.hb-rack-gate{ margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-2) }
.hb-rack-gate.is-ready{ color:var(--hb-ok-ink) }

.hb-engine{
  display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s1) var(--hb-s2);
  background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink); padding:var(--hb-s1) var(--hb-s2); min-width:0;
}
.hb-engine-dot{ flex:0 0 auto; width:10px; height:10px; border:2px solid var(--hb-ink-4) }
.hb-engine.is-stored .hb-engine-dot{ border-color:var(--hb-ink) }
.hb-engine.is-downloading .hb-engine-dot,.hb-engine.is-loading .hb-engine-dot{ background:var(--hb-ink); border-color:var(--hb-ink); animation:hb-blink 1s infinite }
.hb-engine.is-loaded .hb-engine-dot{ background:var(--hb-ok); border-color:var(--hb-ok) }
.hb-engine.is-fault .hb-engine-dot{ background:var(--hb-err); border-color:var(--hb-err) }
.hb-engine-text{ flex:1 1 180px; min-width:0; display:flex; flex-wrap:wrap; align-items:baseline; gap:0 var(--hb-s2) }
.hb-engine-model{ font-family:var(--hb-utility); font-size:12px; font-weight:700; color:var(--hb-ink); overflow-wrap:anywhere }
.hb-engine.is-none .hb-engine-model{ font-weight:400; color:var(--hb-ink-2) }
.hb-engine.is-fault .hb-engine-model{ color:var(--hb-err) }
.hb-engine-facts,.hb-engine-shared{ font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-3) }
.hb-engine-bar{ flex:1 0 100%; order:5 }
.hb-engine-acts{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) }
@media (prefers-reduced-motion:reduce){ .hb-engine-dot{ animation:none !important } }

.hb-mm{ display:flex; flex-direction:column; min-width:0 }
.hb-mm-sec{ display:flex; flex-direction:column; gap:var(--hb-s2); padding:var(--hb-s3) 0; border-bottom:var(--hb-border) solid var(--hb-ink); min-width:0 }
.hb-mm-sec:first-child{ padding-top:0 }
.hb-mm-sec:last-child{ border-bottom:0 }
.hb .hb-mm-hd,.hb-mm-hd{
  display:flex; align-items:center; gap:var(--hb-s2); margin:0;
  font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em;
}
.hb-mm-n{ font-family:var(--hb-readout); font-size:16px; font-weight:400; letter-spacing:0; background:var(--hb-ink); color:var(--hb-paper); padding:0 6px; line-height:1.3 }
.hb .hb-mm-sub,.hb-mm-sub{ margin:var(--hb-s1) 0 0; font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-mm-storage{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2) }
.hb .hb-mm-line,.hb-mm-line{ flex:1 1 220px; margin:0; font-family:var(--hb-body); font-size:13px; line-height:1.45; color:var(--hb-ink) }
.hb .hb-mm-policy,.hb-mm-policy,.hb .hb-mm-empty,.hb-mm-empty{ margin:0; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-3) }
.hb-mm-list{ list-style:none; margin:0; padding:0; border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised) }
.hb-mm-item{
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px var(--hb-s2); align-items:center;
  padding:var(--hb-s1) var(--hb-s3); border-bottom:1px dashed rgba(26,26,26,.25);
}
.hb-mm-item:last-child{ border-bottom:0 }
.hb-mm-name{ font-family:var(--hb-utility); font-size:12px; font-weight:700; overflow-wrap:anywhere }
.hb-mm-meta{ grid-column:1; font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-3) }
.hb-mm-acts{ grid-column:2; grid-row:1 / span 2; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--hb-s1) }

/* ==========================================================================
   34. WAKE GATE, TIER CARDS, API KEY, CUSTOM MODEL FORM
   HbWakeGate: an ink head, the big line, one paragraph, one row per
   subsystem (label, bar, note: pink loading, slime ready, red failed,
   paper off), the picker slot, the note built from size, origin and
   quota, wake and the lite wake, the failure line. HbTierCards: engine
   tiers as cards framed by cost and privacy, a size badge, a capability
   bar, a body under the picked one, a footer that echoes the pick.
   HbApiKey: a password field with the masked readout and the words that
   say where the key goes. HbCustomModelForm: four ways in, each field
   naming its failure, a check before any fetch, saved entries as chips.
   ========================================================================== */
.hb-wake-scrim{
  position:fixed; inset:0; z-index:var(--hb-z-modal); overflow:auto;
  display:grid; place-items:center; padding:var(--hb-s4); background:var(--hb-paper);
}
.hb-wake{
  width:min(640px,100%); min-width:0; background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow-pink);
}
.hb-wake-head{
  display:flex; justify-content:space-between; gap:var(--hb-s2); flex-wrap:wrap;
  background:var(--hb-ink); color:var(--hb-paper); padding:var(--hb-s2) var(--hb-s3);
  font-family:var(--hb-readout); font-size:20px; line-height:1;
}
.hb-wake-body{ display:flex; flex-direction:column; gap:var(--hb-s3); padding:var(--hb-s3) var(--hb-s4) var(--hb-s4) }
.hb .hb-wake-title,.hb-wake-title{ margin:0; font-family:var(--hb-display); font-size:34px; line-height:1 }
@media(min-width:641px){ .hb .hb-wake-title,.hb-wake-title{ font-size:44px } }
.hb .hb-wake-lede,.hb-wake-lede{ margin:0; font-family:var(--hb-body); font-size:15px; line-height:1.55 }
.hb-wake-rows{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--hb-s2) }
.hb-wake-row{ display:grid; grid-template-columns:76px minmax(0,1fr); gap:2px var(--hb-s2); align-items:center; min-width:0 }
.hb-wake-label{ font-family:var(--hb-readout); font-size:19px; font-weight:400; line-height:1 }
.hb-wake-row.is-required .hb-wake-label::after{ content:"*"; color:var(--hb-ink-3) }
.hb-wake-bar{ display:block; height:12px; border:1.5px solid var(--hb-ink); background:var(--hb-paper-sunk); position:relative; overflow:hidden }
.hb-wake-bar > i{ position:absolute; inset:0 auto 0 0; background:var(--hb-pink) }
.hb-wake-bar.is-busy > i{ animation:hb-sweep 1.4s steps(14) infinite }
.hb-wake-row.is-ready .hb-wake-bar > i{ background:var(--hb-slime) }
.hb-wake-row.is-error .hb-wake-bar > i{ background:var(--hb-lit-err) }
.hb-wake-row.is-off .hb-wake-bar > i{ background:var(--hb-paper-edge) }
.hb-wake-note{ grid-column:2; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3); min-width:0; overflow-wrap:anywhere }
.hb-wake-row.is-error .hb-wake-note{ color:var(--hb-err) }
@media(min-width:520px){
  .hb-wake-row{ grid-template-columns:90px minmax(0,1fr) minmax(0,38%) }
  .hb-wake-note{ grid-column:3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:right }
}
.hb .hb-wake-gnote,.hb-wake-gnote{ margin:0; font-family:var(--hb-utility); font-size:11.5px; line-height:1.5; color:var(--hb-ink-2) }
.hb-wake-gnote.is-warn{ color:var(--hb-warn-ink) }
.hb-wake-acts{ display:flex; flex-wrap:wrap; gap:var(--hb-s2) }
.hb .hb-wake-err,.hb-wake-err{ margin:0; font-family:var(--hb-body); font-size:13px; line-height:1.45; color:var(--hb-err); border-left:4px solid var(--hb-err); padding-left:var(--hb-s2) }
@media (prefers-reduced-motion:reduce){ .hb-wake-bar.is-busy > i{ animation:none } }

.hb-tiers{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-tiers-list{ display:flex; flex-direction:column; gap:var(--hb-s2) }
.hb-tier{ border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); min-width:0 }
.hb-tier.is-on{ box-shadow:var(--hb-shadow-pink) }
.hb-tier.is-off{ border-style:dashed; color:var(--hb-ink-3) }
.hb-tier-pick{
  display:flex; gap:var(--hb-s3); align-items:flex-start; width:100%; min-height:44px; text-align:left;
  background:transparent; color:inherit; border:0; padding:var(--hb-s2) var(--hb-s3); cursor:pointer; font:inherit;
}
.hb-tier-pick:disabled{ cursor:not-allowed }
.hb-tier-pick:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-4px }
.hb-tier.is-on .hb-tier-pick{ background:var(--hb-pink-10) }
.hb-tier-icon{ flex:0 0 36px; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center }
.hb-tier-main{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:3px }
.hb-tier-head{ display:flex; justify-content:space-between; align-items:baseline; gap:var(--hb-s2); flex-wrap:wrap }
.hb-tier-name{ font-family:var(--hb-utility); font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.08em }
.hb-tier-size{ font-family:var(--hb-readout); font-size:16px; line-height:1.1; border:1px solid currentColor; padding:0 6px }
.hb-tier-sub{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-2) }
.hb-tier-terms{ display:flex; flex-wrap:wrap; gap:0 var(--hb-s3); font-family:var(--hb-utility); font-size:11px; font-weight:700; color:var(--hb-ink) }
.hb-tier-note{ font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-2) }
.hb-tier-bar{ display:block; height:6px; border:1px solid var(--hb-ink); background:var(--hb-paper-sunk); margin-top:2px }
.hb-tier-bar > i{ display:block; height:100%; background:var(--hb-ink) }
.hb-tier.is-on .hb-tier-bar > i{ background:var(--hb-pink) }
.hb-tier-why{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-warn-ink) }
.hb-tier-body{ border-top:1px dashed var(--hb-ink-4); padding:var(--hb-s2) var(--hb-s3) var(--hb-s3) }
.hb-tiers-foot{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--hb-s2); border-top:var(--hb-border) solid var(--hb-ink); padding-top:var(--hb-s2) }
.hb-tiers-echo{ flex:1 1 200px; font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink-2) }

.hb-apikey{ display:flex; flex-direction:column; gap:5px; min-width:0 }
.hb-apikey-row{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2) }
.hb-apikey-row > .hb-input{ flex:1 1 200px; min-width:0; font-family:var(--hb-utility) }
.hb-apikey-mask{ font-family:var(--hb-readout); font-size:18px; line-height:1; color:var(--hb-ink-3) }
.hb-apikey-state{ font-family:var(--hb-utility); font-size:11px; font-weight:700; color:var(--hb-ink-2) }
.hb-apikey.is-waiting .hb-apikey-state{ color:var(--hb-warn-ink) }
.hb-apikey.is-valid .hb-apikey-state{ color:var(--hb-ok-ink) }
.hb-apikey-note{ font-family:var(--hb-utility); font-size:11px; line-height:1.45; color:var(--hb-ink-3) }

.hb-cmf{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb .hb-cmf-runtime,.hb-cmf-runtime{ margin:0; font-family:var(--hb-utility); font-size:10.5px; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-cmf > .hb-cmf-caveat{ margin:0 }
.hb-cmf-fields{ display:grid; grid-template-columns:minmax(0,1fr); gap:0 var(--hb-s3) }
@media(min-width:641px){ .hb-cmf-fields{ grid-template-columns:repeat(2,minmax(0,1fr)) } }
.hb-cmf-fields > .hb-field{ min-width:0 }
.hb-cmf-fields .hb-input,.hb-cmf-fields .hb-select{ width:100%; box-sizing:border-box }
.hb-cmf-check-out{ font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink-2); border-left:4px solid var(--hb-ink-4); padding:2px var(--hb-s2) }
.hb-cmf-check-out.is-checking{ border-left-color:var(--hb-ink) }
.hb-cmf-check-out.is-ok{ border-left-color:var(--hb-ok) }
.hb-cmf-check-out.is-fail{ border-left-color:var(--hb-err); color:var(--hb-err) }
.hb-cmf-check-size{ margin-left:var(--hb-s2); color:var(--hb-ink) }
.hb-cmf-check-lines{ margin:var(--hb-s1) 0 0; padding-left:1.2em; overflow-wrap:anywhere }
.hb-cmf-acts{ display:flex; flex-wrap:wrap; gap:var(--hb-s2) }
.hb-cmf-acts > .hb-btn{ max-width:100%; overflow:hidden; text-overflow:ellipsis }
.hb-cmf-saved{ display:flex; flex-direction:column; gap:var(--hb-s1) }
.hb .hb-cmf-empty,.hb-cmf-empty{ margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-cmf-chips{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:var(--hb-s2) }
.hb-cmf-chip{ display:inline-flex; align-items:stretch; border:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-raised); max-width:100% }
.hb-cmf-chip-name{
  display:inline-flex; align-items:baseline; gap:var(--hb-s2); min-width:0; min-height:32px; padding:2px var(--hb-s2);
  background:transparent; border:0; color:inherit; cursor:pointer; font-family:var(--hb-utility); font-size:11.5px; font-weight:700; overflow-wrap:anywhere; text-align:left;
}
.hb-cmf-chip-mode{ font-weight:400; color:var(--hb-ink-3) }
.hb-cmf-chip-x{ display:inline-flex; align-items:center; justify-content:center; min-width:32px; background:transparent; border:0; border-left:var(--hb-border) solid var(--hb-ink); color:var(--hb-ink-3); cursor:pointer }
.hb-cmf-chip-name:focus-visible,.hb-cmf-chip-x:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
@media(pointer:coarse){ .hb-cmf-chip-name,.hb-cmf-chip-x{ min-height:44px; min-width:44px } }

/* ==========================================================================
   35. MESSAGE, THINK, TOOL CALL, CONTEXT METER, CONVERSATION LIST, CHAT
   HbMessage: the who line with the stats strip, think fold, pending line,
   tool cards, the reply (split into up to 5 boxes for a persona), the
   error card with its fix, seen and memory used, and the action row:
   speak, redo, copy, delete (asks twice), edit on your own turns.
   HbThink open while it streams. HbToolCall one line when done, open with
   its arguments while running. HbContextMeter what fills the window by
   source, and the full banner with two fixes. HbConversationList the
   chats rail: new, rows with rename, duplicate and delete, export.
   ========================================================================== */
.hb-msg-who{ display:flex; flex-wrap:wrap; align-items:baseline; gap:0 var(--hb-s2) }
.hb-msg.is-user .hb-msg-who{ justify-content:flex-end }
.hb-msg-stats{ font-weight:400; text-transform:none; letter-spacing:0; font-size:10.5px; color:var(--hb-ink-3) }
.hb-msg-parts{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0; max-width:100% }
.hb-msg.is-user .hb-msg-parts{ align-items:flex-end }
.hb-msg.is-split .hb-msg-text{ box-shadow:var(--hb-shadow) }
.hb-msg.is-streaming .hb-msg-text:not(:last-child)::after{ display:none }
.hb-msg-pending{ font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink-2) }
.hb-msg-pending::after{ content:""; display:inline-block; width:.55em; height:1em; margin-left:4px; vertical-align:-2px; background:var(--hb-pink); animation:hb-blink 1s infinite }
.hb-msg-tools{ display:flex; flex-direction:column; gap:var(--hb-s1); min-width:0 }
.hb .hb-msg-err,.hb-msg-err{
  margin:0; font-family:var(--hb-body); font-size:13px; line-height:1.45; color:var(--hb-err);
  border:var(--hb-border) solid var(--hb-err); border-left-width:6px; background:var(--hb-paper); padding:var(--hb-s2) var(--hb-s3);
}
.hb-msg-seen{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3); overflow-wrap:anywhere }
.hb-msg-used{ font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink-3) }
.hb-msg-used > summary{ cursor:pointer; list-style:none; display:inline-flex; align-items:center; min-height:28px }
.hb-msg-used > summary::-webkit-details-marker{ display:none }
.hb-msg-used > summary::before{ content:"+ " ; white-space:pre }
.hb-msg-used[open] > summary::before{ content:"- " }
.hb-msg-used > summary:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-msg-used ul{ margin:var(--hb-s1) 0 0; padding-left:1.2em }
.hb-msg-used li{ margin:2px 0; overflow-wrap:anywhere }
.hb-msg-used-item{ font:inherit; color:var(--hb-ink); background:transparent; border:0; padding:0; text-align:left; text-decoration:underline; text-decoration-color:var(--hb-ink-4); cursor:pointer }
.hb-msg-used-score{ margin-left:var(--hb-s2); font-family:var(--hb-readout); font-size:14px; color:var(--hb-ink-3) }
.hb-msg-acts{ display:flex; flex-wrap:wrap; gap:var(--hb-s1); margin-top:2px }
.hb-msg.is-user .hb-msg-acts{ justify-content:flex-end }
.hb-msg-act{
  display:inline-flex; align-items:center; gap:5px; min-height:26px; padding:1px 8px;
  font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink); background:var(--hb-paper-raised);
  border:1.5px solid var(--hb-ink); cursor:pointer;
}
@media (hover:hover) and (pointer:fine){ .hb-msg-act:hover{ box-shadow:2px 2px 0 var(--hb-ink) } }
.hb-msg-act:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-msg-act.is-on{ background:var(--hb-paper-sunk) }
.hb-msg-act.is-armed{ background:var(--hb-pink); border-color:var(--hb-pink) }
.hb-msg-edit{ display:flex; flex-direction:column; gap:var(--hb-s1); width:100%; min-width:0 }
.hb-msg-edit > .hb-textarea{ width:100%; box-sizing:border-box; resize:none; font-family:var(--hb-body); font-size:16px }
.hb-msg-edit-acts{ display:flex; gap:var(--hb-s1); justify-content:flex-end }
@media(pointer:coarse){
  .hb-msg-act{ min-height:44px; min-width:44px; padding:2px 10px }
  .hb-msg-used > summary,.hb-msg-used-item{ min-height:44px }
  .hb-msg-used-item{ display:inline-flex; align-items:center }
}
@media (prefers-reduced-motion:reduce){ .hb-msg-pending::after{ animation:none } }

.hb-think.is-plan{ border-color:var(--hb-warn); border-style:solid; border-left-width:4px }
.hb-think.is-plan > summary{ color:var(--hb-warn-ink) }
.hb-think.is-memory{ border-color:var(--hb-ok); border-style:solid; border-left-width:4px }
.hb-think.is-memory > summary{ color:var(--hb-ok-ink) }
.hb-think.is-live > summary{ color:var(--hb-pink-deep) }
.hb-think > summary{ display:flex; align-items:center; min-height:24px }
.hb-think > summary:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-think > pre,.hb .hb-think > pre{ max-height:240px; overflow:auto }
@media(pointer:coarse){ .hb-think > summary{ min-height:44px } }

.hb-tool{ border:1px solid var(--hb-ink); border-left:4px solid var(--hb-ok); background:var(--hb-paper-sunk); font-family:var(--hb-utility); font-size:11px; min-width:0 }
.hb-tool.is-running{ border-left-color:var(--hb-ink) }
.hb-tool.is-error{ border-left-color:var(--hb-err) }
.hb-tool-row{
  display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:var(--hb-s2);
  width:100%; min-height:32px; padding:var(--hb-s1) var(--hb-s2); background:transparent; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer;
}
.hb-tool-row:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-tool-caret{ color:var(--hb-ink-3); width:1ch }
.hb-tool-name{ font-weight:700; color:var(--hb-ink) }
.hb-tool-args{ color:var(--hb-ink-3); font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0 }
.hb-tool-state{ font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; border:1px solid currentColor; padding:1px 6px; color:var(--hb-ok-ink); white-space:nowrap }
.hb-tool.is-running .hb-tool-state{ color:var(--hb-ink); animation:hb-blink 1.4s infinite }
.hb-tool.is-error .hb-tool-state{ color:var(--hb-err) }
.hb-tool-body{ display:flex; flex-direction:column; gap:var(--hb-s1); padding:var(--hb-s2); border-top:1px dashed var(--hb-ink-4) }
.hb-tool-label{ font-size:9.5px; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-ink-3) }
.hb .hb-tool-pre,.hb-tool-pre{
  margin:0; padding:var(--hb-s2); background:var(--hb-paper-raised); border:1px solid var(--hb-ink-4); box-shadow:none; color:var(--hb-ink);
  font-family:var(--hb-utility); font-size:11px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; max-height:280px; overflow:auto;
}
.hb-tool-pre.is-err{ color:var(--hb-err); border-color:var(--hb-err) }
.hb-tool.is-chip{ display:inline-flex; flex-direction:column; max-width:100% }
.hb-tool.is-chip .hb-tool-row{ grid-template-columns:auto auto auto; width:auto }
@media(pointer:coarse){ .hb-tool-row{ min-height:44px } }
@media (prefers-reduced-motion:reduce){ .hb-tool.is-running .hb-tool-state{ animation:none } }

.hb-ctx{ display:flex; flex-direction:column; gap:var(--hb-s1); min-width:0 }
.hb-ctx-hd{ display:flex; justify-content:space-between; align-items:baseline; gap:var(--hb-s2); flex-wrap:wrap }
.hb-ctx-label{ font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-ctx-words{ font-family:var(--hb-readout); font-size:16px; line-height:1; color:var(--hb-ink); font-variant-numeric:tabular-nums }
.hb-ctx.is-warn .hb-ctx-words{ color:var(--hb-warn-ink) }
.hb-ctx.is-full .hb-ctx-words{ color:var(--hb-err) }
.hb-ctx-bar{ display:flex; height:12px; background:var(--hb-void); border:var(--hb-border) solid var(--hb-ink); overflow:hidden }
.hb-ctx-bar > i{ display:block; height:100%; flex:0 0 auto }
.hb-ctx-bar > i + i{ box-shadow:-1px 0 0 var(--hb-void) }
.hb-ctx-p0{ background:var(--hb-part-a) }
.hb-ctx-p1{ background:var(--hb-part-b) }
.hb-ctx-p2{ background:var(--hb-part-c) }
.hb-ctx-p3{ background:var(--hb-part-d) }
.hb-ctx-p4{ background:var(--hb-plate-blue) }
.hb-ctx-p5{ background:var(--hb-plate-purple) }
.hb-ctx-legend{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:2px var(--hb-s3); font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-2) }
.hb-ctx-legend li{ display:inline-flex; align-items:center; gap:5px }
.hb-ctx-legend i{ width:9px; height:9px; border:1px solid var(--hb-ink) }
.hb-ctx-legend b{ font-weight:700; color:var(--hb-ink); font-variant-numeric:tabular-nums }
.hb-ctx > .hb-ctx-banner{ margin:var(--hb-s1) 0 0 }
.hb-ctx-pill{ display:inline-flex; align-items:center; gap:5px; padding:2px 7px; border:1px solid currentColor; font-family:var(--hb-utility); font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; white-space:nowrap }
.hb-ctx-pill.is-warn{ color:var(--hb-warn-ink) }
.hb-ctx-pill.is-full{ color:var(--hb-err) }

.hb-convs{ display:flex; flex-direction:column; min-height:0; min-width:0; background:var(--hb-paper-sunk); border:var(--hb-border) solid var(--hb-ink) }
.hb-convs-hd{
  display:flex; align-items:center; justify-content:space-between; gap:var(--hb-s2); flex:none;
  background:var(--hb-ink); color:var(--hb-paper); padding:0 4px 0 var(--hb-s3); min-height:40px;
  font-family:var(--hb-readout); font-size:21px; line-height:1;
}
.hb-convs-new{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; background:transparent; color:var(--hb-paper); border:1.5px solid var(--hb-paper); cursor:pointer }
.hb-convs-new:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-convs-list{ list-style:none; margin:0; padding:var(--hb-s2); display:flex; flex-direction:column; gap:var(--hb-s2); overflow:auto; flex:1 1 auto; min-height:0 }
.hb-convs-empty{ font-family:var(--hb-utility); font-size:11.5px; color:var(--hb-ink-3); padding:var(--hb-s1) 2px }
.hb-convs-item{ display:flex; align-items:stretch; border:1.5px solid var(--hb-ink); background:var(--hb-paper-raised); min-width:0 }
.hb-convs-item[aria-current="true"]{ box-shadow:3px 3px 0 var(--hb-pink) }
.hb-convs-open{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; padding:var(--hb-s2) var(--hb-s2) var(--hb-s2) var(--hb-s3); background:transparent; border:0; color:inherit; text-align:left; cursor:pointer; font:inherit }
.hb-convs-open:focus-visible,.hb-convs-act:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-convs-title{ font-family:var(--hb-body); font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.hb-convs-meta{ font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-3) }
.hb-convs-rename{ flex:1 1 auto; min-width:0; display:flex; padding:var(--hb-s1) }
.hb-convs-rename > .hb-input{ flex:1 1 auto; min-width:0 }
.hb-convs-acts{ display:flex; flex:none; border-left:1.5px solid var(--hb-ink) }
.hb-convs-act{ display:inline-flex; align-items:center; justify-content:center; min-width:32px; padding:0 6px; background:transparent; border:0; color:var(--hb-ink-3); cursor:pointer; font-family:var(--hb-utility); font-size:11px }
.hb-convs-act + .hb-convs-act{ border-left:1px dashed var(--hb-ink-4) }
.hb-convs-act.is-armed{ background:var(--hb-err); color:var(--hb-paper) }
/* Row actions never wait for a hover: always drawn, lifted to ink while
   focus is anywhere in the row, 44 px on a coarse pointer. */
.hb-convs-item:focus-within{ outline:1.5px solid var(--hb-pink); outline-offset:1px }
.hb-convs-item:focus-within .hb-convs-act:not(.is-armed){ color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-convs-act:hover{ color:var(--hb-ink) } .hb-convs-act.is-del:hover{ color:var(--hb-err) } .hb-convs-act.is-armed:hover{ color:var(--hb-paper) } }
.hb-convs-foot{ flex:none; border-top:var(--hb-border) solid var(--hb-ink); padding:var(--hb-s2); display:flex; flex-direction:column; gap:var(--hb-s1) }
.hb-convs-foot-acts{ display:flex; gap:var(--hb-s1); flex-wrap:wrap }
.hb .hb-convs-note,.hb-convs-note{ margin:0; font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-3) }
@media(pointer:coarse){ .hb-convs-new,.hb-convs-act{ min-width:44px; min-height:44px } .hb-convs-new{ width:44px; height:44px } .hb-convs-open,.hb-convs-foot-acts > .hb-btn{ min-height:44px } }

.hb-chat-hd{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--hb-s2); padding:var(--hb-s1) var(--hb-s2) var(--hb-s1) var(--hb-s3); border-bottom:var(--hb-border) solid var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-chat-title{ font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em }
.hb-chat-hd-acts{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s1) }
.hb-chat-key > .hb-apikey{ flex:1 1 100% }
.hb-chat-empty{ display:flex; flex-direction:column; gap:var(--hb-s2); border:1px dashed var(--hb-ink-4); padding:var(--hb-s3) }
.hb .hb-chat-empty-text,.hb-chat-empty-text{ margin:0; font-family:var(--hb-body); font-size:13px; color:var(--hb-ink-3) }
.hb-chat-examples{ display:flex; flex-wrap:wrap; gap:var(--hb-s2) }
.hb-chat-examples > .hb-chip{ text-transform:none; letter-spacing:0; text-align:left }
.hb-composer > .hb-textarea{ resize:none; overflow-y:hidden }
.hb-chat > .hb-ctx{ padding:var(--hb-s2) var(--hb-s3); border-top:var(--hb-border) solid var(--hb-ink) }

/* Memory panel. One surface: count line and storage with keep, a search
   that runs the live ranker, last reply used, add a note, the typed list,
   export, import, erase. Paper sunk, sections split by dashed rules. */
.hb-mempanel{ display:flex; flex-direction:column; min-width:0; background:var(--hb-paper-sunk); border:var(--hb-border) solid var(--hb-ink) }
.hb-mempanel-sec{ display:flex; flex-direction:column; gap:var(--hb-s2); padding:var(--hb-s3); border-bottom:1px dashed var(--hb-ink-4); min-width:0 }
.hb .hb-mempanel-hd,.hb-mempanel-hd{ margin:0; font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em }
.hb .hb-mempanel-counts,.hb-mempanel-counts{ margin:0; font-family:var(--hb-readout); font-size:19px; line-height:1.15 }
.hb .hb-mempanel-line,.hb-mempanel-line{ margin:0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb .hb-mempanel-empty,.hb-mempanel-empty{ margin:0; font-family:var(--hb-body); font-size:13px; color:var(--hb-ink-3) }
.hb-mempanel-store{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2) }
.hb-mempanel-row{ display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:var(--hb-s2) }
.hb-mempanel-row > .hb-select{ flex:1 1 120px; min-width:0 }
.hb-mempanel-list{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-mempanel-foot{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); padding:var(--hb-s3) }
.hb-mempanel-wipe{ margin-left:auto }
.hb-mempanel-wipe.is-armed{ background:var(--hb-err); color:var(--hb-paper); border-color:var(--hb-err) }
@media(pointer:coarse){ .hb-mempanel .hb-btn-sm{ min-height:44px } }

/* Memory item. Kind chip carrying the score, title, text, entity chips,
   then edit and a ghost forget that asks once in place. */
.hb-mem{ display:flex; align-items:stretch; min-width:0; background:var(--hb-paper-raised); border:1.5px solid var(--hb-ink) }
.hb-mem.is-used{ box-shadow:3px 3px 0 var(--hb-ink) }
.hb-mem.is-pinned{ border-left:4px solid var(--hb-ink) }
.hb-mem-pin{ display:inline-flex; align-items:center; gap:3px; margin-right:6px; font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--hb-ink); vertical-align:1px }
.hb-mem-act.is-on{ color:var(--hb-ink); background:var(--hb-paper-sunk) }
.hb-mem-body{ flex:1 1 auto; min-width:0; padding:var(--hb-s2) var(--hb-s3); font-family:var(--hb-body); font-size:13.5px; line-height:1.4; overflow-wrap:anywhere }
.hb-mem-kind,.hb-mem-ent{ display:inline-flex; align-items:baseline; gap:4px; margin-right:6px; padding:0 5px; font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; vertical-align:1px }
.hb-mem-kind{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-mem-score{ font-family:var(--hb-readout); font-size:14px; font-weight:400; letter-spacing:0; line-height:1 }
.hb-mem-ent{ margin:0 0 0 6px; border:1px solid var(--hb-ink-3); color:var(--hb-ink-2) }
.hb-mem-title{ margin-right:6px }
.hb-mem-when{ display:block; margin-top:2px; font-family:var(--hb-utility); font-size:10.5px; color:var(--hb-ink-3) }
.hb-mem-edit{ display:flex; flex-direction:column; gap:var(--hb-s1); margin-top:var(--hb-s1) }
.hb-mem-edit-acts{ display:flex; gap:var(--hb-s1); justify-content:flex-end }
.hb-mem-acts{ display:flex; flex:none; border-left:1.5px solid var(--hb-ink) }
.hb-mem-act{ display:inline-flex; align-items:center; justify-content:center; min-width:32px; padding:0 6px; background:transparent; border:0; color:var(--hb-ink-3); cursor:pointer; font-family:var(--hb-utility); font-size:11px }
.hb-mem-act + .hb-mem-act{ border-left:1px dashed var(--hb-ink-4) }
.hb-mem-act:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-mem-act.is-armed{ background:var(--hb-err); color:var(--hb-paper) }
@media (hover:hover) and (pointer:fine){ .hb-mem-act:hover{ color:var(--hb-ink) } .hb-mem-act.is-forget:hover{ color:var(--hb-err) } .hb-mem-act.is-armed:hover{ color:var(--hb-paper) } }
@media(pointer:coarse){ .hb-mem-act{ min-width:44px; min-height:44px } .hb-mem-edit-acts > .hb-btn{ min-height:44px } }
@media (max-width:479px){
  .hb-mem{ flex-direction:column }
  .hb-mem-acts{ justify-content:flex-end; border-left:0; border-top:1px dashed var(--hb-ink-4) }
}

/* Recall trace. On the void: the query, one line on how candidates were
   scored, optional weight sliders, then every candidate with a bar per
   part and the final bar. Used ones stay lit; the rest dim. */
.hb-recall{ min-width:0; background:var(--hb-void); color:var(--hb-paper); border:var(--hb-border) solid var(--hb-ink) }
.hb-recall-hd{ display:flex; align-items:center; gap:var(--hb-s2); background:var(--hb-ink); padding:2px var(--hb-s3); font-family:var(--hb-readout); font-size:17px; text-transform:uppercase; letter-spacing:.04em }
.hb .hb-recall-q,.hb-recall-q{ margin:var(--hb-s2) var(--hb-s3) 0; font-family:var(--hb-body); font-size:13.5px; overflow-wrap:anywhere }
.hb-recall-q > .hb-label{ color:var(--hb-lit-label); margin-right:var(--hb-s1) }
.hb .hb-recall-line,.hb-recall-line,.hb .hb-recall-empty,.hb-recall-empty{ margin:var(--hb-s1) var(--hb-s3) var(--hb-s2); font-family:var(--hb-utility); font-size:11px; color:var(--hb-lit-label) }
.hb-recall-weights{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:0 var(--hb-s3); padding:0 var(--hb-s3) var(--hb-s2) }
.hb-recall-weights .hb-label,.hb-recall-weights .hb-readout{ color:var(--hb-paper) }
.hb-recall-list{ list-style:none; margin:0; padding:0 var(--hb-s3) var(--hb-s3); display:flex; flex-direction:column; gap:var(--hb-s2) }
.hb-recall-hit{ border:1px solid var(--hb-ink-border); border-left:var(--hb-border-hd) solid var(--hb-ink-border); padding:var(--hb-s2); opacity:.55 }
.hb-recall-hit.is-used{ border-left-color:var(--hb-slime); opacity:1 }
.hb-recall-top{ display:flex; align-items:center; gap:var(--hb-s2); font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.08em }
.hb-recall-kind{ border:1px solid var(--hb-ink-border); padding:0 5px; font-weight:700 }
.hb-recall-mark{ margin-left:auto; color:var(--hb-lit-label) }
.hb-recall-hit.is-used .hb-recall-mark{ color:var(--hb-slime) }
.hb .hb-recall-text,.hb-recall-text{ margin:var(--hb-s1) 0 var(--hb-s2); font-family:var(--hb-body); font-size:13px; line-height:1.4; overflow-wrap:anywhere }
.hb-recall-bars{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:2px var(--hb-s2); font-family:var(--hb-readout); font-size:14px; line-height:1 }
.hb-recall-k{ color:var(--hb-lit-label); text-transform:uppercase; min-width:3.5ch }
.hb-recall-v{ font-variant-numeric:tabular-nums; text-align:right; min-width:4ch }
.hb-recall-bar{ position:relative; height:6px; background:var(--hb-ink-inset) }
.hb-recall-bar > i{ position:absolute; inset:0 auto 0 0; width:calc(var(--hb-v, 0) * 100%); background:var(--hb-lit-dim) }
.hb-recall-bar.is-final{ height:8px }
.hb-recall-bar.is-final > i{ background:var(--hb-paper) }
.hb-recall-hit.is-used .hb-recall-bar.is-final > i{ background:var(--hb-slime) }
.hb-recall-k.is-final,.hb-recall-v.is-final{ color:var(--hb-paper) }

/* Mic button. One 44 px square: paper off, pink while it takes input
   with the level along its foot, dashed while the browser asks, struck
   through when blocked or missing with a line that names the way around. */
.hb-mic{ display:inline-flex; align-items:center; gap:var(--hb-s2); min-width:0; --hb-level:0 }
.hb-mic-btn{
  position:relative; flex:none; width:44px; height:44px; padding:0; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:var(--hb-border) solid var(--hb-ink); box-shadow:2px 2px 0 var(--hb-ink);
  cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none;
}
.hb-mic-btn:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-mic-btn:active{ transform:translate(2px,2px); box-shadow:0 0 0 var(--hb-ink) }
.hb-mic-level{ position:absolute; left:0; bottom:0; height:4px; width:calc(var(--hb-level) * 100%); background:var(--hb-ink); transition:width var(--hb-t-fast) linear }
.hb-mic.is-asking .hb-mic-btn{ border-style:dashed }
.hb-mic.is-listening .hb-mic-btn,.hb-mic.is-hearing .hb-mic-btn{ background:var(--hb-pink); animation:hb-mic-pulse 1.1s steps(2, jump-none) infinite }
.hb-mic.is-hearing .hb-mic-btn{ animation:none }
.hb-mic.is-blocked .hb-mic-btn{ color:var(--hb-err); border-color:var(--hb-err) }
.hb-mic.is-unsupported .hb-mic-btn{ color:var(--hb-ink-4); border-color:var(--hb-ink-4); box-shadow:none; cursor:not-allowed }
.hb-mic-note{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3); min-width:0 }
.hb-mic.is-blocked .hb-mic-note{ color:var(--hb-err) }
.hb-on-ink .hb-mic-note,.hb-stage .hb-mic-note{ color:var(--hb-lit-label) }
@keyframes hb-mic-pulse{ 0%{ box-shadow:2px 2px 0 var(--hb-ink) } 100%{ box-shadow:4px 4px 0 var(--hb-ink) } }
@media (prefers-reduced-motion:reduce){ .hb-mic-btn{ animation:none } .hb-mic-level{ transition:none } }

/* Level rail. The level rail of the earlier transcription tool: bars
   slime where the gate kept speech and grey where silence was cut, the
   noise floor dashed amber and the gate dotted red in the same scale,
   kept segments marked under it with the one playing lit, time labels,
   and a legend that reads the floor and gate as numbers. */
.hb-lrail{ margin:0; min-width:0; background:var(--hb-void); color:var(--hb-paper); border:var(--hb-border) solid var(--hb-ink) }
.hb-lrail > .hb-wave{ --hb-wave-h:var(--hb-lrail-h); border:0 }
.hb-lrail-segs{ position:relative; height:6px; margin:0 0 2px; background:var(--hb-ink-inset) }
.hb-lrail-segs > i{ position:absolute; top:0; bottom:0; left:var(--hb-x, 0); width:var(--hb-w, 0); min-width:1px; background:var(--hb-lit-dim); border-right:1px solid var(--hb-void) }
.hb-lrail-segs > i.is-now{ background:var(--hb-paper) }
.hb-lrail-ticks{ display:flex; padding:0 0 2px; font-family:var(--hb-readout); font-size:14px; line-height:1; color:var(--hb-lit-label); font-variant-numeric:tabular-nums }
.hb-lrail-ticks > span{ flex:1 1 0; min-width:0; padding-left:3px; overflow:hidden; white-space:nowrap }
@media (max-width:559px){ .hb-lrail-ticks > span:nth-child(even){ visibility:hidden } }
.hb-lrail-legend{ display:flex; flex-wrap:wrap; gap:var(--hb-s1) var(--hb-s3); padding:var(--hb-s1) var(--hb-s2); border-top:1px solid var(--hb-ink-border); font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-lit-label) }
.hb-lrail-legend b{ font-family:var(--hb-readout); font-size:15px; font-weight:400; letter-spacing:0; text-transform:none; color:var(--hb-paper); font-variant-numeric:tabular-nums }
.hb-lrail-legend i{ display:inline-block; width:10px; height:3px; margin-right:5px; vertical-align:2px }
.hb-lrail-legend i.is-kept{ background:var(--hb-slime) }
.hb-lrail-legend i.is-cut{ background:var(--hb-lit-dim) }
.hb-lrail-legend i.is-floor{ background:var(--hb-lit-warn) }
.hb-lrail-legend i.is-gate{ background:var(--hb-lit-err) }

/* Queue strip. One file per row as the earlier tool listed them: a
   large channel number, the name, a status word toned by state, a 44 px
   waveform, the measured line and the error, a bar while it works. The
   selected strip takes an ink rule on its left. Remove is its own 44 px
   target beside the strip. */
.hb-qstrips{ margin:0; padding:0; list-style:none; min-width:0; background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink) }
.hb-qstrip{ display:flex; align-items:stretch; min-width:0; border-bottom:1px dashed rgba(26,26,26,.2) }
.hb-qstrip:last-child{ border-bottom:0 }
.hb-qstrip-main{
  flex:1 1 auto; min-width:0; display:grid; grid-template-columns:34px minmax(0,1fr); gap:var(--hb-s3);
  padding:var(--hb-s2) var(--hb-s3); min-height:44px; background:none; border:0; border-left:4px solid transparent;
  text-align:left; color:inherit; font:inherit; cursor:pointer;
}
.hb-qstrip-main:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
@media (hover:hover) and (pointer:fine){ .hb-qstrip-main:hover{ background:var(--hb-paper-sunk) } }
.hb-qstrip.is-sel .hb-qstrip-main{ background:var(--hb-paper-sunk); border-left-color:var(--hb-ink) }
.hb-qstrip-n{ font-family:var(--hb-readout); font-size:24px; line-height:1; text-align:center; color:var(--hb-ink-3); font-variant-numeric:tabular-nums }
.hb-qstrip.is-sel .hb-qstrip-n,.hb-qstrip.is-done .hb-qstrip-n{ color:var(--hb-ink) }
.hb-qstrip-body{ display:flex; flex-direction:column; gap:var(--hb-s1); min-width:0 }
.hb-qstrip-hd{ display:flex; align-items:baseline; justify-content:space-between; gap:var(--hb-s3); min-width:0 }
.hb-qstrip-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--hb-body); font-size:14px }
.hb-qstrip-stat{ flex:none; font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-ink-3) }
.hb-qstrip.is-ok .hb-qstrip-stat{ color:var(--hb-ok-ink) }
.hb-qstrip.is-busy .hb-qstrip-stat{ color:var(--hb-warn-ink) }
.hb-qstrip.is-bad .hb-qstrip-stat{ color:var(--hb-err) }
.hb-qstrip-wave{ --hb-wave-h:var(--hb-qwave-h); border-width:1px }
.hb-qstrip-meta{ display:flex; flex-wrap:wrap; gap:2px var(--hb-s3); font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--hb-ink-3) }
.hb-qstrip-meta b{ font-family:var(--hb-readout); font-size:15px; font-weight:400; letter-spacing:0; text-transform:none; color:var(--hb-ink); font-variant-numeric:tabular-nums }
.hb-qstrip-meta .is-lo{ color:var(--hb-err) }
.hb-qstrip-meta b.is-hi{ color:var(--hb-ok-ink) }
.hb-qstrip-meta > .is-lo{ text-transform:none; letter-spacing:0; font-size:11px }
.hb-qstrip-bar{ display:block; height:4px; background:var(--hb-paper-sunk); border:1px solid var(--hb-ink) }
.hb-qstrip-bar > i{ display:block; height:100%; width:calc(var(--hb-v, 0) * 100%); background:var(--hb-ink); transition:width var(--hb-t-fast) linear }
.hb-qstrip-x{ flex:none; width:44px; display:inline-flex; align-items:center; justify-content:center; background:none; border:0; border-left:1px dashed var(--hb-ink-4); color:var(--hb-ink-3); cursor:pointer }
.hb-qstrip-x:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
@media (hover:hover) and (pointer:fine){ .hb-qstrip-x:hover{ color:var(--hb-err) } }
.hb-qstrip-empty{ padding:var(--hb-s4) var(--hb-s3); text-align:center; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
@media (prefers-reduced-motion:reduce){ .hb-qstrip-bar > i{ transition:none } }

/* Spoken text. The rap battle verse box: the line as word spans, the
   spoken word lit, earlier words kept, later words dim, the speaker's
   name above. Pink marks only the word in the mouth. */
.hb-spoken{ margin:0; min-width:0; padding:var(--hb-s3) var(--hb-s4); background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink) }
.hb-spoken-who{ margin-bottom:var(--hb-s1); font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-ink-3) }
.hb-spoken-line{ margin:0; font-family:var(--hb-body); font-size:clamp(16px, 3.6vw, 22px); line-height:1.6; overflow-wrap:anywhere }
.hb-spoken-w{ color:var(--hb-ink-3); transition:color var(--hb-t-fast), background var(--hb-t-fast) }
.hb-spoken-w.is-done{ color:var(--hb-ink) }
.hb-spoken-w.is-on{ color:var(--hb-ink); background:var(--hb-pink); box-shadow:0 0 0 2px var(--hb-pink) }
.hb-spoken:not(.is-live) .hb-spoken-w:not(.is-done){ color:var(--hb-ink-2) }
.hb-stage .hb-spoken,.hb-on-ink .hb-spoken{ background:var(--hb-void); border-color:var(--hb-ink-border) }
.hb-stage .hb-spoken-w,.hb-on-ink .hb-spoken-w{ color:var(--hb-lit-dim) }
.hb-stage .hb-spoken-w.is-done,.hb-on-ink .hb-spoken-w.is-done,.hb-stage .hb-spoken-w.is-on,.hb-on-ink .hb-spoken-w.is-on{ color:var(--hb-paper) }
.hb-stage .hb-spoken-w.is-on,.hb-on-ink .hb-spoken-w.is-on{ color:var(--hb-ink) }
@media (prefers-reduced-motion:reduce){ .hb-spoken-w{ transition:none } }

/* Method card. The rhythm game engine cards: a letter badge, the name
   over the trade, the time and three quality squares on the right, the
   size it costs, and the reason another method answered. The chosen card
   lifts on a hard shadow with a pink badge. */
.hb-methods{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-method{
  display:flex; align-items:center; gap:var(--hb-s3); width:100%; min-width:0; min-height:44px;
  padding:var(--hb-s2) var(--hb-s3); text-align:left; font:inherit; color:var(--hb-ink); cursor:pointer;
  background:var(--hb-paper-sunk); border:var(--hb-border) solid var(--hb-ink);
}
.hb-method:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
@media (hover:hover) and (pointer:fine){ .hb-method:not(:disabled):not(.is-active):hover{ background:var(--hb-paper-raised) } }
.hb-method.is-active{ background:var(--hb-paper-raised); box-shadow:3px 3px 0 var(--hb-ink) }
.hb-method:disabled{ cursor:not-allowed; color:var(--hb-ink-3); border-color:var(--hb-ink-4) }
.hb-method-badge{ flex:none; width:34px; height:34px; display:grid; place-items:center; font-family:var(--hb-readout); font-size:22px; line-height:1; background:var(--hb-ink); color:var(--hb-paper) }
.hb-method.is-active .hb-method-badge{ background:var(--hb-pink); color:var(--hb-ink) }
.hb-method:disabled .hb-method-badge{ background:var(--hb-ink-4) }
.hb-method-body{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px }
.hb-method-label{ font-family:var(--hb-body); font-size:15px; font-weight:700; line-height:1.15 }
.hb-method-state{ margin-left:var(--hb-s2); font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-method.is-failed .hb-method-state{ color:var(--hb-err) }
.hb-method.is-loading .hb-method-state{ color:var(--hb-warn-ink) }
.hb-method.is-stored .hb-method-state{ color:var(--hb-ok-ink) }
.hb-method-trade{ font-family:var(--hb-utility); font-size:11.5px; line-height:1.35; color:var(--hb-ink-2) }
.hb-method-notice{ font-family:var(--hb-utility); font-size:11px; line-height:1.35; color:var(--hb-warn-ink) }
.hb-method-meta{ flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:3px; font-family:var(--hb-utility); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--hb-ink-3); white-space:nowrap }
.hb-method-q{ display:inline-flex; gap:3px }
.hb-method-q > i{ width:9px; height:9px; border:1.5px solid var(--hb-ink) }
.hb-method-q > i.is-on{ background:var(--hb-ink) }
@media (max-width:379px){ .hb-method{ flex-wrap:wrap } .hb-method-meta{ flex-direction:row; flex-wrap:wrap; align-items:center; gap:var(--hb-s1) var(--hb-s2); margin-left:calc(34px + var(--hb-s3)); min-width:0; max-width:calc(100% - 34px - var(--hb-s3)); white-space:normal } }

/* Camera tile. The camera booth feed: the picture on the void, a utility
   tag in each corner (timer, record, effect, model), a blinking record
   dot, and a denied state that keeps the box and says what it needs. */
.hb-camtile{ position:relative; margin:0; width:100%; min-width:0; aspect-ratio:var(--hb-camtile-ar, 4 / 3); overflow:hidden; background:var(--hb-void); border:var(--hb-border) solid var(--hb-ink) }
.hb-camtile-video,.hb-camtile > canvas{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block }
.hb-camtile.is-mirror .hb-camtile-video{ transform:scaleX(-1) }
.hb-camtile-tag{ position:absolute; z-index:1; max-width:calc(50% - 12px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-lit-label); background:rgba(10,10,10,.6); padding:1px 5px }
.hb-camtile-tag.is-tl{ top:6px; left:6px } .hb-camtile-tag.is-tr{ top:6px; right:6px } .hb-camtile-tag.is-bl{ bottom:6px; left:6px } .hb-camtile-tag.is-br{ bottom:6px; right:6px }
.hb-camtile-tag.is-ok{ color:var(--hb-slime) }
.hb-camtile-tag.is-warn{ color:var(--hb-lit-warn) }
.hb-camtile-tag.is-rec{ color:var(--hb-lit-err) }
.hb-camtile-tag.is-dim{ color:var(--hb-lit-dim) }
.hb-camtile-rec{ position:absolute; z-index:1; top:9px; right:9px; width:8px; height:8px; background:var(--hb-lit-err); animation:hb-blink 1s step-end infinite }
.hb-camtile-tag.is-tr ~ .hb-camtile-rec{ top:26px }
.hb-camtile-none{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--hb-s2); padding:var(--hb-s3); text-align:center; font-family:var(--hb-utility); font-size:11px; text-transform:uppercase; letter-spacing:.16em; color:var(--hb-lit-label) }
.hb-camtile-none > svg{ color:var(--hb-lit-dim) }
.hb-camtile.is-denied{ border-color:var(--hb-err) }
@media (prefers-reduced-motion:reduce){ .hb-camtile-rec{ animation:none } }

/* Image slot. The face swap input panel: a titled box that shows the
   picture, the live camera or an empty well; upload, camera that turns
   into capture, paste and sample under it; one line for what the tool
   found or what failed. Drop and paste land on the whole slot. */
.hb-islot{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0; padding:var(--hb-s3); background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink) }
.hb-islot:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-islot.is-over{ outline:var(--hb-border-hd) dashed var(--hb-ink); outline-offset:-6px; background:var(--hb-paper-sunk) }
.hb-islot-hd{ font-family:var(--hb-utility); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--hb-ink-3) }
.hb-islot-box{ position:relative; min-width:0; aspect-ratio:var(--hb-islot-ar, 1 / 1); background:var(--hb-paper-sunk); border:1.5px solid var(--hb-ink); overflow:hidden }
.hb-islot-box > .hb-camtile{ position:absolute; inset:0; height:100%; aspect-ratio:auto; border:0 }
.hb-islot-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; display:block; background:var(--hb-void) }
.hb-islot-empty{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--hb-s2); padding:var(--hb-s3); text-align:center; border:2px dashed var(--hb-ink-4); margin:var(--hb-s2); font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-islot-acts > label{ position:relative }
.hb-islot-file{ position:absolute; inset:calc(var(--hb-border) * -1); width:auto; height:auto; min-height:0; opacity:0; cursor:pointer }
.hb-islot-acts > label:focus-within{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-islot-info.is-ok{ color:var(--hb-ok-ink) }
.hb-islot-info.is-warn{ color:var(--hb-warn-ink) }
.hb-islot-info.is-err{ color:var(--hb-err) }

/* History strip. The image tool's run strip: up to eight thumbs, newest
   first, the current one ringed; a press restores the run and its
   settings. Remove is a corner x on a fine pointer and one 44 px button
   for the run on screen on touch. .is-grid shows label and meta. */
.hb-hist{ display:flex; align-items:flex-start; gap:var(--hb-s2); min-width:0 }
.hb-hist-empty{ margin:0; padding:var(--hb-s2) 0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-hist-list{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); margin:0; padding:0; list-style:none; min-width:0; flex:1 1 auto }
.hb-hist-item{ position:relative; flex:none }
.hb-hist-thumb{ display:block; width:var(--hb-hist-size, 56px); height:var(--hb-hist-size, 56px); padding:0; overflow:hidden; cursor:pointer; background:var(--hb-paper-sunk); border:1.5px solid var(--hb-ink) }
.hb-hist-thumb > img{ width:100%; height:100%; object-fit:cover; display:block }
/* A thumb with no image: a short label in the readout face, or slot
   content such as a wave canvas, filling the square. */
.hb-hist-tx{ display:grid; place-items:center; width:100%; height:100%; padding:2px; font-family:var(--hb-readout); font-size:16px; line-height:1; color:var(--hb-ink); overflow:hidden; overflow-wrap:anywhere; text-transform:lowercase }
.hb-hist-thumb > svg,.hb-hist-thumb > canvas{ width:100%; height:100%; display:block }
.hb-hist-thumb:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:2px }
.hb-hist-item.is-current .hb-hist-thumb{ border:var(--hb-border-hd) solid var(--hb-ink); box-shadow:3px 3px 0 var(--hb-ink) }
.hb-hist-x{ position:absolute; top:-6px; right:-6px; width:20px; height:20px; padding:0; display:none; align-items:center; justify-content:center; background:var(--hb-paper-raised); color:var(--hb-ink); border:1.5px solid var(--hb-ink); cursor:pointer }
.hb-hist-x:focus-visible{ display:inline-flex; outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:1px }
@media (hover:hover) and (pointer:fine){
  .hb-hist-item:hover .hb-hist-x,.hb-hist-item:focus-within .hb-hist-x{ display:inline-flex }
  .hb-hist-x:hover{ color:var(--hb-err) }
  .hb-hist-drop{ display:none }
}
.hb-hist-drop{ flex:none }
.hb-hist.is-grid .hb-hist-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)) }
.hb-hist.is-grid .hb-hist-item{ display:flex; flex-direction:column; border:1.5px solid var(--hb-ink); background:var(--hb-paper-raised) }
.hb-hist.is-grid .hb-hist-item.is-current{ box-shadow:3px 3px 0 var(--hb-ink) }
.hb-hist.is-grid .hb-hist-thumb{ width:100%; height:auto; aspect-ratio:1 / 1; border:0; border-bottom:1.5px solid var(--hb-ink); box-shadow:none }
.hb-hist-cap{ display:flex; flex-direction:column; gap:2px; padding:var(--hb-s1) var(--hb-s2); padding-right:44px; min-width:0 }
.hb-hist-label{ font-family:var(--hb-body); font-size:12.5px; line-height:1.3; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical }
.hb-hist-meta{ font-family:var(--hb-utility); font-size:10px; color:var(--hb-ink-3); overflow-wrap:anywhere }
.hb-hist.is-grid .hb-hist-x{ display:inline-flex; top:auto; bottom:0; right:0; width:44px; height:44px; border:0; border-left:1px dashed var(--hb-ink-4); background:transparent; color:var(--hb-ink-3) }

/* Seed. The image tool's seed row: a whole number, the dice, and a lock
   that keeps the seed for the next run or rolls a new one each run. */
.hb-seed{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2); min-width:0 }
.hb-seed > .hb-ctl{ flex:1 1 160px }
.hb-seed-input{ font-family:var(--hb-readout); font-size:20px; font-variant-numeric:tabular-nums }
.hb-seed-lock[aria-pressed="true"]{ background:var(--hb-ink); color:var(--hb-paper) }
.hb-seed-err{ flex:1 1 100%; color:var(--hb-err) }

/* Prompt canvas. The mask tool's image: keep and leave out points and
   boxes placed in image pixels, committed masks tinted in their colour,
   the preview under the cursor. The frame keeps the image ratio and
   never grows past --hb-pc-max-h, so a prompt maps one to one. Handles
   are 24 px on a fine pointer and 44 px on a coarse one; the dot stays
   small so it never hides what it marks. Keep is a square, leave out
   a diamond, so the sign never rests on colour alone. */
.hb-pc{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-pc-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s2) }
.hb-pc-tools > .hb-iconbtn[disabled]{ opacity:.45; cursor:not-allowed; box-shadow:none }
.hb-pc-key{ margin-left:var(--hb-s1); font-family:var(--hb-utility); font-size:9px; font-weight:700; opacity:.6 }
@media (pointer:coarse){ .hb-pc-key{ display:none } }
.hb-pc-well{ display:flex; justify-content:center; min-width:0; background:var(--hb-void); border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow) }
.hb-pc-frame{
  position:relative; width:100%; max-width:calc(var(--hb-pc-max-h, 70vh) * var(--hb-pc-ratio, 1.333));
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:crosshair; overflow:hidden;
}
.hb-pc-frame:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-pc-frame.is-box{ cursor:cell }
.hb-pc.is-readonly .hb-pc-frame{ cursor:default }
.hb-pc-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; display:block; pointer-events:none }
.hb-pc-mask{ position:absolute; inset:0; pointer-events:none; mask-image:var(--hb-pc-src); -webkit-mask-image:var(--hb-pc-src); background:var(--hb-pc-c, var(--hb-pink)); opacity:.5; mask-size:100% 100%; -webkit-mask-size:100% 100%; mask-repeat:no-repeat; -webkit-mask-repeat:no-repeat }
.hb-pc-mask.is-preview{ opacity:.35; outline:1px dashed var(--hb-paper); outline-offset:-1px }
.hb-pc-box{ position:absolute; pointer-events:none; border:var(--hb-border) solid var(--hb-slime); outline:1px solid var(--hb-void) }
.hb-pc-box.is-neg{ border-color:var(--hb-lit-err); border-style:dashed }
.hb-pc-box.is-band{ border-style:dashed; background:color-mix(in srgb, var(--hb-paper) 10%, transparent) }
.hb-pc-h{
  position:absolute; width:24px; height:24px; margin:-12px 0 0 -12px; padding:0;
  display:flex; align-items:center; justify-content:center;
  background:transparent; border:0; cursor:grab; touch-action:none;
}
.hb-pc-dot{ width:12px; height:12px; background:var(--hb-slime); border:2px solid var(--hb-void); outline:2px solid var(--hb-paper) }
.hb-pc-h.is-neg .hb-pc-dot{ background:var(--hb-lit-err); transform:rotate(45deg) }
.hb-pc-h.is-corner .hb-pc-dot{ width:10px; height:10px; background:var(--hb-void); border-color:var(--hb-slime) }
.hb-pc-h.is-corner.is-neg .hb-pc-dot{ border-color:var(--hb-lit-err); transform:none }
.hb-pc-h:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:0 }
@media (pointer:coarse){ .hb-pc-h{ width:44px; height:44px; margin:-22px 0 0 -22px } }
.hb-pc-cursor{ position:absolute; width:22px; height:22px; margin:-11px 0 0 -11px; pointer-events:none; border:2px solid var(--hb-pink); outline:1px solid var(--hb-void) }
.hb-pc-cursor::before,.hb-pc-cursor::after{ content:''; position:absolute; background:var(--hb-pink) }
.hb-pc-cursor::before{ left:50%; top:-8px; bottom:-8px; width:2px; margin-left:-1px }
.hb-pc-cursor::after{ top:50%; left:-8px; right:-8px; height:2px; margin-top:-1px }
.hb-pc-help{ margin:0; font-family:var(--hb-utility); font-size:11px; line-height:1.5; color:var(--hb-ink-3) }
@media (pointer:coarse){ .hb-pc-help{ display:none } }

/* Instance list. One row per mask: colour square, name, score clamped to
   100 percent, show or hide, delete; merge all and clear all under it.
   The actions show on hover and focus on a fine pointer and stay on
   screen at 44 px on touch. A hidden mask's row reads struck through. */
.hb-inst{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-inst-empty{ margin:0; padding:var(--hb-s2) 0; font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-3) }
.hb-inst-list{ display:flex; flex-direction:column; gap:var(--hb-s1); margin:0; padding:0; list-style:none; max-height:var(--hb-inst-max-h, 240px); overflow-y:auto }
.hb-inst-row{ display:flex; align-items:stretch; min-width:0; background:var(--hb-paper-raised); border:1.5px solid var(--hb-ink) }
.hb-inst-row.is-on{ border-width:var(--hb-border-hd); box-shadow:3px 3px 0 var(--hb-ink) }
.hb-inst-pick{ flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:var(--hb-s2); padding:var(--hb-s1) var(--hb-s2); min-height:32px; background:transparent; border:0; color:var(--hb-ink); font:inherit; text-align:left; cursor:pointer }
.hb-inst-pick:focus-visible,.hb-inst-act:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-2px }
.hb-inst-sw{ flex:none; width:14px; height:14px; background:var(--hb-inst-c, var(--hb-pink)); border:1.5px solid var(--hb-ink) }
.hb-inst-name{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--hb-body); font-size:13px }
.hb-inst-score{ flex:none; font-family:var(--hb-readout); font-size:16px; font-variant-numeric:tabular-nums; color:var(--hb-ink-3) }
.hb-inst-row.is-hidden .hb-inst-name{ text-decoration:line-through; color:var(--hb-ink-3) }
.hb-inst-row.is-hidden .hb-inst-sw{ opacity:.35 }
.hb-inst-act{ flex:none; width:32px; display:inline-flex; align-items:center; justify-content:center; padding:0; background:transparent; color:var(--hb-ink-3); border:0; border-left:1px dashed var(--hb-ink-4); cursor:pointer }
.hb-inst-act[aria-pressed="false"]{ color:var(--hb-ink-4) }
@media (hover:hover) and (pointer:fine){
  .hb-inst-act{ visibility:hidden }
  .hb-inst-row:hover .hb-inst-act,.hb-inst-row:focus-within .hb-inst-act,.hb-inst-act[aria-pressed="false"]{ visibility:visible }
  .hb-inst-act:hover{ color:var(--hb-ink) }
  .hb-inst-act.is-del:hover{ color:var(--hb-err) }
}
@media (pointer:coarse){ .hb-inst-pick{ min-height:44px } .hb-inst-act{ width:44px } }
.hb-inst-foot{ margin:0 }

/* Dual range. Two thumbs on one track for a window: keep near and keep
   far, low and high cut. The band between them is pink; the moved thumb
   stops at the other. Native inputs stacked, so keys work as on any
   range; only the thumbs take the pointer. */
.hb-r2{ display:grid; grid-template-columns:1fr auto; gap:4px var(--hb-s3); align-items:center; margin-bottom:var(--hb-s3); min-width:0 }
.hb-r2 > .hb-readout{ font-size:17px }
.hb-r2-track{ grid-column:1 / -1; position:relative; height:44px }
.hb-r2-track::before{ content:''; position:absolute; left:0; right:0; top:50%; height:4px; margin-top:-2px; background:var(--hb-paper-sunk); border:1px solid var(--hb-ink) }
.hb-r2-track::after{ content:''; position:absolute; left:var(--hb-r2-a); right:calc(100% - var(--hb-r2-b)); top:50%; height:4px; margin-top:-2px; background:var(--hb-pink); border-block:1px solid var(--hb-ink) }
.hb-r2-in{ position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; background:transparent; pointer-events:none; appearance:none; -webkit-appearance:none; z-index:1 }
.hb-r2-in.is-top{ z-index:2 }
.hb-r2-in::-webkit-slider-runnable-track{ background:transparent; border:0; height:100% }
.hb-r2-in::-moz-range-track{ background:transparent; border:0 }
.hb-r2-in::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; pointer-events:auto; width:18px; height:24px; margin-top:10px; background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink); box-shadow:2px 2px 0 var(--hb-ink); cursor:grab }
.hb-r2-in::-moz-range-thumb{ pointer-events:auto; width:14px; height:20px; border-radius:0; background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink); box-shadow:2px 2px 0 var(--hb-ink); cursor:grab }
.hb-r2-in:focus-visible{ outline:none }
.hb-r2-in:focus-visible::-webkit-slider-thumb{ background:var(--hb-pink); outline:2px solid var(--hb-ink); outline-offset:2px }
.hb-r2-in:focus-visible::-moz-range-thumb{ background:var(--hb-pink) }
@media (pointer:coarse){
  .hb-r2-in::-webkit-slider-thumb{ width:28px; height:44px; margin-top:0 }
  .hb-r2-in::-moz-range-thumb{ width:24px; height:40px }
}
.hb-r2.is-disabled{ opacity:.5 }
.hb-r2-names{ grid-column:1 / -1; display:flex; justify-content:space-between; gap:var(--hb-s2); font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.1em; color:var(--hb-ink-3) }
.hb-r2-hint{ grid-column:1 / -1; margin:0; font-family:var(--hb-body); font-size:12.5px; line-height:1.4; color:var(--hb-ink-3) }

/* Monitor dock. Insets side by side: the raw feed beside the model's
   view, each folding to its head. Inline it fills the row and wraps
   two up when the row fits two; .is-overlay docks fixed width tiles on a
   viewport corner (.hb-ov-bl) and wraps upward. */
.hb-mdock{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); align-items:flex-start; min-width:0 }
.hb-mdock > .hb-inset{ flex:1 1 var(--hb-mdock-w, 176px); width:auto; min-width:0 }
.hb-mdock.is-overlay{ display:flex; flex-wrap:wrap-reverse; align-items:flex-end; max-width:100% }
.hb-mdock.is-overlay > .hb-inset{ flex:none; width:min(var(--hb-mdock-w, 176px), 44cqw) }

/* Split. A compare wipe for two views of one image: source and depth,
   before and after. The right slot is cut at the divider; the tags name
   each side. Press or drag anywhere; the bar is the keyboard slider.
   Not the page split: .hb-toolpage.is-split lays out columns. */
.hb-split{ position:relative; aspect-ratio:var(--hb-split-ratio, 4/3); overflow:hidden; background:var(--hb-void); border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow); touch-action:pan-y; user-select:none; -webkit-user-select:none; cursor:ew-resize }
.hb-split-side{ position:absolute; inset:0 }
.hb-split-side > img,.hb-split-side > canvas,.hb-split-side > video{ width:100%; height:100%; object-fit:contain; display:block }
.hb-split-side.is-right{ clip-path:inset(0 0 0 var(--hb-split-pos, 50%)) }
.hb-split-tag{ position:absolute; top:var(--hb-s2); padding:1px var(--hb-s2); font-family:var(--hb-readout); font-size:15px; text-transform:uppercase; letter-spacing:.04em; background:var(--hb-ink); color:var(--hb-paper); pointer-events:none; max-width:calc(50% - var(--hb-s3)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.hb-split-tag.is-left{ left:var(--hb-s2) }
.hb-split-tag.is-right{ right:var(--hb-s2) }
.hb-split-bar{ position:absolute; top:0; bottom:0; left:var(--hb-split-pos, 50%); width:24px; margin-left:-12px; display:flex; align-items:center; justify-content:center; cursor:ew-resize }
.hb-split-bar::before{ content:''; position:absolute; top:0; bottom:0; left:50%; width:2px; margin-left:-1px; background:var(--hb-paper); outline:1px solid var(--hb-void) }
.hb-split-grip{ position:relative; width:14px; height:32px; background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink) }
.hb-split-bar:focus-visible{ outline:none }
.hb-split-bar:focus-visible .hb-split-grip{ background:var(--hb-pink) }
@media (pointer:coarse){ .hb-split-bar{ width:44px; margin-left:-22px } .hb-split-grip{ width:20px; height:44px } }

/* Artboard. A board that pans and zooms inside a void box, layers placed
   by centre, scale and rotation, a dashed pink box with square corners
   and a rotate dot on the selected one (the relief bench face editor).
   The board is sized by layout, never by a scale transform, so a part in
   its slot keeps its handle sizes at any zoom. The erase mask is red over
   the layer; the brush shows as a ring. */
.hb-ab{ display:flex; flex-direction:column; gap:var(--hb-s2); min-width:0 }
.hb-ab.is-fill{ height:100% }
.hb-viewport > .hb-ab{ position:absolute; inset:0 }
.hb-ab-vp{
  position:relative; overflow:hidden; min-width:0; aspect-ratio:var(--hb-ab-ratio, 4 / 3); max-height:var(--hb-ab-h, min(70vh, 560px)); min-height:240px;
  background:var(--hb-void); border:var(--hb-border) solid var(--hb-ink); box-shadow:var(--hb-shadow);
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab;
}
.hb-ab.is-fill .hb-ab-vp{ flex:1 1 auto; aspect-ratio:auto; max-height:none; min-height:0; border:0; box-shadow:none }
.hb-ab-vp:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-ab-vp.is-pan{ cursor:grabbing }
.hb-ab-vp.is-paint{ cursor:none }
.hb-ab-board{ position:absolute; left:0; top:0; transform-origin:0 0; background:var(--hb-paper-sunk); outline:1px solid var(--hb-ink-3) }
.hb-ab-img{ position:absolute; inset:0; width:100%; height:100%; display:block; pointer-events:none }
.hb-ab-slot{ position:absolute; inset:0 }
.hb-ab-slot:empty{ pointer-events:none }
.hb-ab-layer{ position:absolute; transform-origin:50% 50%; pointer-events:none }
.hb-ab-mask{ position:absolute; inset:0; background:var(--hb-lit-err); opacity:.25; mask-image:var(--hb-ab-src); -webkit-mask-image:var(--hb-ab-src); mask-size:100% 100%; -webkit-mask-size:100% 100%; mask-repeat:no-repeat; -webkit-mask-repeat:no-repeat }
.hb-ab-mask.is-live{ opacity:.55 }
.hb-ab-stroke{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; opacity:.55 }
.hb-ab-stroke polyline{ fill:none; stroke:var(--hb-lit-err); stroke-linecap:round; stroke-linejoin:round }
.hb-ab-stroke.is-restore polyline{ stroke:var(--hb-slime) }
.hb-ab-sel{ position:absolute; transform-origin:50% 50%; pointer-events:none; outline:1.5px dashed var(--hb-pink) }
.hb-ab-sel.is-paint{ outline-color:var(--hb-ink-3) }
.hb-ab-h{
  position:absolute; width:24px; height:24px; margin:-12px 0 0 -12px; padding:0; pointer-events:auto;
  display:flex; align-items:center; justify-content:center; background:transparent; border:0; touch-action:none;
}
.hb-ab-h.is-tl{ left:0; top:0; cursor:nwse-resize }
.hb-ab-h.is-tr{ left:100%; top:0; cursor:nesw-resize }
.hb-ab-h.is-br{ left:100%; top:100%; cursor:nwse-resize }
.hb-ab-h.is-bl{ left:0; top:100%; cursor:nesw-resize }
.hb-ab-h.is-rot{ left:50%; top:-28px; cursor:crosshair }
.hb-ab-hsq{ width:10px; height:10px; background:var(--hb-pink); outline:1px solid var(--hb-void) }
.hb-ab-hdot{ width:12px; height:12px; background:var(--hb-pink); box-shadow:inset 0 0 0 3px var(--hb-void); outline:1px solid var(--hb-void) }
.hb-ab-stem{ position:absolute; left:50%; top:-28px; height:28px; width:0; border-left:1.5px solid var(--hb-pink) }
.hb-ab-h:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-paper); outline-offset:0 }
@media (pointer:coarse){ .hb-ab-h{ width:44px; height:44px; margin:-22px 0 0 -22px } .hb-ab-h.is-rot{ top:-40px } .hb-ab-stem{ top:-40px; height:40px } }
.hb-ab-read{ position:absolute; left:100%; top:100%; margin:var(--hb-s2) 0 0 var(--hb-s2); white-space:nowrap; font-family:var(--hb-readout); font-size:16px; color:var(--hb-slime); text-shadow:1px 1px 0 var(--hb-void) }
.hb-ab-guide{ position:absolute; pointer-events:none; border:0 dashed var(--hb-slime) }
.hb-ab-guide.is-x{ left:50%; top:0; bottom:0; border-left-width:1px }
.hb-ab-guide.is-y{ top:50%; left:0; right:0; border-top-width:1px }
.hb-ab-ring{ position:absolute; pointer-events:none; transform:translate(-50%, -50%); border-radius:50%; border:1.5px solid var(--hb-lit-err); outline:1px solid var(--hb-void) }
.hb-ab-ring.is-restore{ border-color:var(--hb-slime) }
.hb-ab-ov{ position:absolute; inset:0; pointer-events:none }
.hb-ab-ov > *{ pointer-events:auto }
.hb-ab-cap{ position:absolute; left:var(--hb-s2); top:var(--hb-s2); padding:0 var(--hb-s1); background:var(--hb-void); pointer-events:none; white-space:pre; font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-4) }
.hb-ab-zoom{ position:absolute; right:var(--hb-s2); bottom:var(--hb-s2); z-index:6; display:flex; align-items:stretch; gap:var(--hb-s1) }
.hb-ab-zoom > .hb-iconbtn{ width:32px; height:32px }
.hb-ab-pct{ min-width:56px; padding:0 var(--hb-s1); background:var(--hb-void); color:var(--hb-paper); border:1px solid var(--hb-ink-3); font-family:var(--hb-readout); font-size:16px; font-variant-numeric:tabular-nums; cursor:pointer }
.hb-ab-pct:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink) }
@media (pointer:coarse){ .hb-ab-zoom > .hb-iconbtn{ width:44px; height:44px } .hb-ab-pct{ min-height:44px } }
@media (max-width:420px){ .hb-ab-pct{ display:none } }
.hb-ab-help{ margin:0; font-family:var(--hb-utility); font-size:11px; line-height:1.5; color:var(--hb-ink-3) }
.hb-ab.is-fill .hb-ab-help{ display:none }
@media (pointer:coarse){ .hb-ab-help{ display:none } }

/* The prompt canvas inside an artboard: no tool row, well or help; the
   host shows the tools. */
.hb-pc.is-bare{ height:100% }
.hb-pc.is-bare .hb-pc-well{ height:100%; background:none; border:0; box-shadow:none }
.hb-pc.is-bare .hb-pc-frame{ max-width:none; height:100% }

/* Viewport foot and the 0.7.1 slots. The foot stacks hint, caption, the
   verb band and the pad from the top down, pinned to the bottom edge and
   passing presses through to the scene except on its controls. The
   telemetry group sits in the top left corner under the name hud. */
.hb-ov-foot{
  left:var(--hb-s2); right:var(--hb-s2); bottom:var(--hb-s2);
  align-items:stretch; gap:var(--hb-s2); pointer-events:none;
}
.hb-ov-foot > .hb-ov-b{ position:static; pointer-events:none }
.hb-ov-foot > .hb-ov-b > *,.hb-ov-foot > .hb-ov-pad > *{ pointer-events:auto }
.hb-ov-hint{ display:none; justify-content:center }
.hb-ov-hint > *{
  font-family:var(--hb-body); font-size:12px; line-height:1.4; max-width:100%;
  background:color-mix(in srgb, var(--hb-void) 80%, transparent); color:var(--hb-paper);
  border:1px solid var(--hb-ink-border); padding:var(--hb-s1) var(--hb-s2);
}
.hb-ov-cap{ display:flex; justify-content:center }
.hb-ov-tele{ display:flex; flex-direction:column; align-items:flex-start; gap:var(--hb-s1) }
/* With a pad the top corners share one grid, so the telemetry group can
   change corner without moving in the markup: under the name hud by
   default, under the top right content on a touch phone held sideways,
   where the stick covers the left side of a short stage. */
.hb-ov-top{
  left:var(--hb-s3); right:var(--hb-s3); top:var(--hb-s3);
  display:grid; grid-template-columns:auto auto; grid-template-areas:"tl tr" "tele ."; justify-content:space-between;
  align-items:start; gap:var(--hb-s1) var(--hb-s3); pointer-events:none;
}
.hb-ov-top > .hb-ov{ position:static; max-width:none }
.hb-ov-top > .hb-ov-tl{ grid-area:tl }
.hb-ov-top > .hb-ov-tr{ grid-area:tr; justify-self:end }
.hb-ov-top > .hb-ov-tele{ grid-area:tele }
.hb-ov-top > * > *{ pointer-events:auto }
@media (pointer:coarse) and (orientation:landscape) and (max-height:540px){
  .hb-ov-top{ grid-template-areas:"tl tr" ". tele" }
  .hb-ov-top > .hb-ov-tele{ justify-self:end; align-items:flex-end }
}
@media(min-width:641px){ .hb-ov-foot{ left:var(--hb-s3); right:var(--hb-s3); bottom:var(--hb-s3) } }
/* Under 561 px of viewport the hint gives way to the scene: it names keys
   and mouse moves a phone does not have. */
@container (min-width:561px){ .hb-ov-hint{ display:flex } }

/* Stage caption. What the user said as a small lit info echo, the reply
   as a body line on the void, the speaker in the lit label. The line
   keeps its newest words: it is cut to a tail and bottom aligned, so an
   overflow leaves at the top. Presses pass through to the scene. */
.hb-caption{
  display:flex; flex-direction:column; align-items:center; gap:var(--hb-s1);
  max-width:min(720px, 100%); pointer-events:none; text-align:center;
}
.hb-caption-echo{
  font-family:var(--hb-utility); font-size:11px; letter-spacing:.03em; color:var(--hb-lit-info);
  background:color-mix(in srgb, var(--hb-void) 80%, transparent);
  border:1px solid var(--hb-ink-border); padding:calc(var(--hb-s1) / 2) var(--hb-s2); max-width:100%;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.hb-caption-line{
  display:flex; flex-direction:column; justify-content:flex-end; overflow:hidden;
  max-height:calc(2 * 1.5em + 2 * var(--hb-s1));
  font-family:var(--hb-body); font-size:14px; line-height:1.5; color:var(--hb-paper);
  background:color-mix(in srgb, var(--hb-void) 86%, transparent);
  border:1px solid var(--hb-ink-border); border-left:var(--hb-border-hd) solid var(--hb-paper);
  padding:var(--hb-s1) var(--hb-s2); overflow-wrap:anywhere;
}
.hb-caption-who{
  display:block; font-family:var(--hb-utility); font-size:10px; font-weight:400;
  letter-spacing:.1em; text-transform:uppercase; color:var(--hb-lit-label);
}
@container (min-width:561px){
  .hb-caption-line{ font-size:16px; padding:var(--hb-s2) var(--hb-s3); max-height:calc(4 * 1.5em + 2 * var(--hb-s2)) }
  .hb-caption-echo{ white-space:normal; overflow-wrap:anywhere }
}

/* Name hud. The name on paper, the state word beside it in the readout
   face: idle quiet, thinking lit warn, listening lit info with a live
   square, talking pink. Chips that say a camera or mic is live follow. */
.hb-namehud{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s1); font-family:var(--hb-readout); font-size:17px; line-height:1 }
.hb-namehud-name{
  font-weight:400; background:var(--hb-paper); color:var(--hb-ink);
  border:1px solid var(--hb-ink); padding:3px var(--hb-s2) 2px; text-transform:uppercase;
}
.hb-namehud-state{
  display:inline-flex; align-items:center; gap:var(--hb-s1);
  background:color-mix(in srgb, var(--hb-void) 80%, transparent); color:var(--hb-lit-label);
  border:1px solid var(--hb-ink-border); padding:3px var(--hb-s2) 2px;
}
.hb-namehud.is-thinking .hb-namehud-state{ color:var(--hb-lit-warn) }
.hb-namehud.is-listening .hb-namehud-state{ color:var(--hb-lit-info) }
.hb-namehud.is-listening .hb-namehud-state::before{ content:""; width:7px; height:7px; background:var(--hb-lit-err) }
.hb-namehud.is-talking .hb-namehud-state{ background:var(--hb-pink); color:var(--hb-paper); border-color:var(--hb-pink) }
.hb-namehud .hb-tag{ font-size:13px }
@container (min-width:561px){ .hb-namehud{ font-size:19px } }

/* Transport. Play, previous and next, the chapter strip over the scrub,
   the time, speed and loop. One ink bar; the scrub takes its own row
   under 561 px of container. Chapter cells share the clip by length;
   the current one is paper, the ones played are dim. The whole bar
   fades while the pointer rests and the clip plays (is-idle). */
.hb-transport{
  container-type:inline-size; width:100%;
  background:var(--hb-ink); color:var(--hb-paper);
  border:var(--hb-border) solid var(--hb-ink);
  transition:opacity var(--hb-t-slow);
}
.hb-transport.is-idle{ opacity:0 }
.hb-transport.is-idle:focus-within{ opacity:1 }
.hb-tp-row{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--hb-s1); padding:var(--hb-s1) }
.hb-tp-btn{
  display:inline-grid; place-items:center; min-width:36px; height:36px; padding:0 var(--hb-s1);
  background:var(--hb-ink-2); color:var(--hb-paper); border:1px solid var(--hb-ink-border);
  font-family:var(--hb-readout); font-size:16px; line-height:1; cursor:pointer;
}
.hb-tp-btn.is-play{ background:var(--hb-paper); color:var(--hb-ink); border-color:var(--hb-paper) }
.hb-tp-btn[aria-pressed="true"]{ background:var(--hb-paper); color:var(--hb-ink) }
@media (hover:hover) and (pointer:fine){ .hb-tp-btn:hover{ border-color:var(--hb-paper) } }
.hb-tp-btn:focus-visible,.hb-tp-chap:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:1px }
.hb-tp-btn:disabled{ opacity:.4; cursor:default }
.hb-tp-track{ order:9; flex:1 0 100%; min-width:0; display:flex; flex-direction:column; gap:2px }
.hb-tp-chaps{ display:flex; gap:2px; overflow:hidden }
.hb-tp-chap{
  flex:var(--hb-share, 1) 1 0; min-width:18px; height:20px; padding:0 var(--hb-s1); overflow:hidden;
  background:color-mix(in srgb, var(--hb-paper) 14%, transparent); color:var(--hb-lit-label);
  border:1px solid var(--hb-ink-border); cursor:pointer;
  font-family:var(--hb-utility); font-size:10px; text-align:left; white-space:nowrap; text-overflow:ellipsis;
}
.hb-tp-chap.is-done{ background:color-mix(in srgb, var(--hb-paper) 30%, transparent); color:var(--hb-paper) }
.hb-tp-chap.is-on{ background:var(--hb-paper); color:var(--hb-ink); border-color:var(--hb-paper) }
.hb-tp-scrub{ width:100%; height:28px; margin:0; accent-color:var(--hb-pink) }
.hb-tp-time{ font-family:var(--hb-readout); font-size:17px; color:var(--hb-lit-label); white-space:nowrap; font-variant-numeric:tabular-nums; padding:0 var(--hb-s1) }
.hb-tp-sp{ flex:1 1 0 }
@container (min-width:561px){
  .hb-tp-track{ order:0; flex:1 1 160px }
  .hb-tp-sp{ display:none }
}
@media(pointer:coarse){
  .hb-tp-btn{ min-width:44px; height:44px }
  .hb-tp-chap{ height:44px; min-width:44px }
  .hb-tp-scrub{ height:44px }
}

/* Pad. A touch stick or d-pad for moving a body on a phone, and one
   action button that names what it does. Square like everything else:
   the knob is clamped to a circle in the vector, not in the drawing.
   Shown on a coarse pointer only, unless is-always. The base takes the
   pointer (touch-action none) and holds it by pointer capture. */
.hb-pad{ display:none; justify-content:space-between; align-items:flex-end; gap:var(--hb-s3); pointer-events:none }
.hb-pad.is-always{ display:flex }
@media(pointer:coarse){ .hb-pad{ display:flex } }
.hb-pad > *{ pointer-events:auto }
.hb-pad-base{
  --hb-pad-r:24px;
  position:relative; width:92px; height:92px; flex:0 0 auto;
  background:color-mix(in srgb, var(--hb-void) 70%, transparent);
  border:var(--hb-border) solid var(--hb-paper); box-shadow:var(--hb-shadow);
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab;
}
.hb-pad-base:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:2px }
.hb-pad-base::before,.hb-pad-base::after{ content:""; position:absolute; background:var(--hb-ink-border) }
.hb-pad-base::before{ left:50%; top:var(--hb-s2); bottom:var(--hb-s2); width:1px }
.hb-pad-base::after{ top:50%; left:var(--hb-s2); right:var(--hb-s2); height:1px }
.hb-pad-knob{
  position:absolute; left:50%; top:50%; width:44px; height:44px; z-index:1;
  background:var(--hb-paper); border:var(--hb-border) solid var(--hb-ink);
  transform:translate(calc(-50% + var(--hb-pad-x, 0) * var(--hb-pad-r)), calc(-50% + var(--hb-pad-y, 0) * var(--hb-pad-r)));
}
.hb-pad-base:not([data-dir=""]) .hb-pad-knob{ background:var(--hb-pink); border-color:var(--hb-paper) }
.hb-pad.is-dpad .hb-pad-knob{ display:none }
.hb-pad-arrow{ position:absolute; width:0; height:0; border:7px solid transparent; z-index:1 }
.hb-pad-n{ left:50%; top:var(--hb-s1); transform:translateX(-50%); border-bottom-color:var(--hb-lit-label) }
.hb-pad-s{ left:50%; bottom:var(--hb-s1); transform:translateX(-50%); border-top-color:var(--hb-lit-label) }
.hb-pad-w{ top:50%; left:var(--hb-s1); transform:translateY(-50%); border-right-color:var(--hb-lit-label) }
.hb-pad-e{ top:50%; right:var(--hb-s1); transform:translateY(-50%); border-left-color:var(--hb-lit-label) }
.hb-pad-base[data-dir*="n"] .hb-pad-n{ border-bottom-color:var(--hb-pink) }
.hb-pad-base[data-dir*="s"] .hb-pad-s{ border-top-color:var(--hb-pink) }
.hb-pad-base[data-dir*="w"] .hb-pad-w{ border-right-color:var(--hb-pink) }
.hb-pad-base[data-dir*="e"] .hb-pad-e{ border-left-color:var(--hb-pink) }
.hb-pad-act{
  min-width:56px; height:56px; padding:0 var(--hb-s2);
  background:var(--hb-paper); color:var(--hb-ink); border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow); cursor:pointer; touch-action:manipulation;
  font-family:var(--hb-utility); font-size:12px; letter-spacing:.1em; text-transform:uppercase;
}
.hb-pad-act:active{ transform:translate(2px,2px); box-shadow:0 0 0 var(--hb-ink) }
.hb-pad-act:focus-visible{ outline:var(--hb-border) solid var(--hb-pink); outline-offset:2px }
@container (min-width:561px){
  .hb-pad-base{ --hb-pad-r:30px; width:104px; height:104px }
}
@media (prefers-reduced-motion:reduce){ .hb-transport{ transition:none } }
@media(pointer:coarse){ .hb-ov-b .hb-btn{ min-width:44px; min-height:44px } }

/* Context menu. A raised panel at the pressed point with the thing's name
   on an ink bar, rows that send a sentence. Placed inside the area that
   owns it; rows are sentences, so they keep their case. The area takes
   right click, a long press on touch and the menu key or Shift+F10; the
   long press does not select text or raise the phone's own callout. */
.hb-ctx-area{ position:relative; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none }
.hb-ctx-area:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-ctx{
  position:absolute; left:0; top:0; z-index:var(--hb-z-dropdown);
  display:flex; flex-direction:column; min-width:180px; max-width:min(280px, calc(100% - 16px));
  background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink);
  box-shadow:4px 4px 0 var(--hb-pink); -webkit-user-select:none; user-select:none;
}
.hb-ctx[hidden]{ display:none }
.hb-ctx-title{
  font-family:var(--hb-readout); font-size:18px; line-height:1.2;
  background:var(--hb-ink); color:var(--hb-slime); padding:2px var(--hb-s2);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.hb-ctx .hb-menu-item{
  text-transform:none; letter-spacing:0; font-weight:500; font-size:12px;
  border-top:1px dashed var(--hb-ink-4); padding:7px var(--hb-s2);
}
.hb-ctx .hb-ctx-title + .hb-menu-item{ border-top:0 }
.hb-ctx .hb-menu-item:focus-visible{ outline:none; background:var(--hb-pink); color:var(--hb-ink) }

/* Step card. One decision tied to its input: step number, the action
   chip, the call's time; the frame the model saw beside the streamed
   text, the thought and the result. The left edge says the state. */
.hb-step{
  background:var(--hb-paper-raised); color:var(--hb-ink);
  border:1px solid var(--hb-ink-4); border-left:4px solid var(--hb-ink);
  padding:var(--hb-s2) var(--hb-s3); min-width:0;
}
.hb-step.is-thinking{ border-left-color:var(--hb-pink) }
.hb-step.is-fail{ border-left-color:var(--hb-err) }
.hb-step.is-done{ border-left-color:var(--hb-ok) }
.hb-step-head{ display:flex; align-items:center; gap:var(--hb-s2); margin-bottom:var(--hb-s2) }
.hb-step-n{ font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-3); text-transform:uppercase }
.hb-step-act{
  font-family:var(--hb-utility); font-size:10px; font-weight:600; letter-spacing:.06em;
  border:1px solid var(--hb-ink); padding:2px 6px; background:var(--hb-paper);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;
}
.hb-step.is-thinking .hb-step-act{ background:var(--hb-pink) }
.hb-step.is-fail .hb-step-act{ background:var(--hb-err); color:var(--hb-paper); border-color:var(--hb-err) }
.hb-step-ms{ margin-left:auto; font-family:var(--hb-readout); font-size:16px; color:var(--hb-ink-3); white-space:nowrap }
.hb-step-body{ display:flex; gap:var(--hb-s2); align-items:flex-start }
.hb-step-thumb{
  flex:none; width:64px; height:64px; object-fit:cover; display:block;
  border:1px solid var(--hb-ink); background:var(--hb-void);
}
.hb-step-thumb.is-none{
  display:flex; align-items:center; justify-content:center; text-align:center;
  font-family:var(--hb-utility); font-size:10px; color:var(--hb-lit-dim);
}
.hb-step-text{ flex:1; min-width:0; font-family:var(--hb-utility); font-size:12px; line-height:1.45; overflow-wrap:anywhere }
.hb-step-text p{ margin:0 0 4px }
.hb-step-text p:last-child{ margin-bottom:0 }
.hb-step-thought{ color:var(--hb-ink-2) }
.hb-step-result{ color:var(--hb-ink-3) }
.hb-step-text b{ font-weight:600; font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--hb-ink-3); margin-right:4px }
@media(min-width:641px){ .hb-step-thumb{ width:74px; height:74px } }

/* Prompt inspector. Three cards: what the last call cost and the session
   counters, the last plan as one line of JSON, and the full context sent
   with the raw reply after '>>>'. Long text wraps and scrolls inside its
   card; nothing scrolls the page sideways. */
.hb-pinsp{ display:flex; flex-direction:column; gap:var(--hb-s3); min-width:0 }
.hb-pinsp-card{ background:var(--hb-paper-raised); border:var(--hb-border) solid var(--hb-ink); min-width:0 }
.hb-pinsp .hb-pinsp-hd{
  display:flex; align-items:center; gap:var(--hb-s2); margin:0;
  font-family:var(--hb-readout); font-weight:400; font-size:18px; text-transform:uppercase;
  background:var(--hb-ink); color:var(--hb-paper); padding:2px var(--hb-s2);
}
.hb-pinsp .hb-pinsp-hd small{ font-family:var(--hb-utility); font-size:10px; text-transform:none; color:var(--hb-lit-dim) }
.hb-pinsp-copy{
  margin-left:auto; font-family:var(--hb-utility); font-size:10px; text-transform:uppercase; letter-spacing:.08em;
  background:none; color:var(--hb-paper); border:1px solid var(--hb-ink-border); padding:2px 8px; cursor:pointer;
}
.hb-pinsp-copy.is-copied{ color:var(--hb-lit-info) }
.hb-pinsp-copy.is-failed{ color:var(--hb-lit-err) }
@media(pointer:coarse){ .hb-pinsp-copy{ min-height:44px; min-width:44px } }
.hb-pinsp-kv{
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px var(--hb-s3);
  margin:0; padding:var(--hb-s2) var(--hb-s3);
}
.hb-pinsp-kv dt{ font-family:var(--hb-utility); font-size:11px; color:var(--hb-ink-2) }
.hb-pinsp-kv dd{ margin:0; font-family:var(--hb-readout); font-size:16px; text-align:right }
.hb-pinsp-empty{ margin:0; padding:var(--hb-s2) var(--hb-s3); font-size:12px; color:var(--hb-ink-3) }
/* Over the kit's pre: paper, not ink; no shadow or border of its own. */
.hb-pinsp .hb-pinsp-pre{
  margin:0; padding:var(--hb-s2) var(--hb-s3); max-height:var(--hb-pinsp-h, 320px); overflow:auto;
  font-family:var(--hb-utility); font-size:11px; line-height:1.5; color:var(--hb-ink);
  white-space:pre-wrap; overflow-wrap:anywhere; background:var(--hb-paper-sunk); border:0; box-shadow:none;
}
.hb-pinsp .hb-pinsp-pre.is-empty{ color:var(--hb-ink-3); background:none }
.hb-pinsp-pre:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:-3px }
.hb-pinsp-reply{ display:block; margin-top:var(--hb-s2); padding-top:var(--hb-s2); border-top:1px dashed var(--hb-ink-4); color:var(--hb-ink); font-weight:600 }

/* Persona editor. Name, the prompt with its cost under it, the template
   button, preset chips with a remove mark, an inline name to save under,
   import and export. */
.hb-persona{ display:flex; flex-direction:column; min-width:0 }
.hb-persona .hb-textarea{ font-family:var(--hb-utility); font-size:12px; line-height:1.5 }
.hb-persona-row{ display:flex; flex-wrap:wrap; gap:var(--hb-s2); margin-bottom:var(--hb-s3) }
.hb-persona-presets{ display:flex; flex-direction:column; gap:var(--hb-s2); margin-bottom:var(--hb-s3) }
.hb-persona-chips{ display:flex; flex-wrap:wrap; gap:6px; align-items:center }
.hb-persona-chip{
  display:inline-flex; align-items:stretch; border:var(--hb-border) solid var(--hb-ink);
  background:var(--hb-paper-raised); box-shadow:2px 2px 0 var(--hb-ink); max-width:100%;
}
.hb-persona-chip.is-on{ background:var(--hb-pink) }
.hb-persona-chip.is-on .hb-persona-chip-x{ color:var(--hb-ink) }
.hb-persona-chip button{
  font-family:var(--hb-utility); font-size:11px; font-weight:600; letter-spacing:.04em;
  background:none; border:0; color:var(--hb-ink); cursor:pointer; padding:4px 8px;
}
.hb-persona-chip-n{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
.hb-persona-chip .hb-persona-chip-x{ border-left:1px solid var(--hb-ink); color:var(--hb-ink-3); padding:4px 7px }
@media (hover:hover) and (pointer:fine){ .hb-persona-chip .hb-persona-chip-x:hover{ color:var(--hb-err) } .hb-persona-chip-n:hover{ text-decoration:underline } }
.hb-persona-chip button:focus-visible{ outline:var(--hb-border-hd) solid var(--hb-pink); outline-offset:1px }
@media(pointer:coarse){ .hb-persona-chip button{ min-height:44px; min-width:44px } }
.hb-persona-save{ display:flex; gap:var(--hb-s2); align-items:stretch }
.hb-persona-save .hb-input{ flex:1; min-width:0 }

/* ==========================================================================
   36. REFINED LOOK, STATE VOCABULARY, INSTRUMENT MODE
   The newest tools (FERRULE, ARBOR, BAIL) draw panels and controls with a
   1.5 px line, keep 2 px for emphasis, set tags and pills in VT323, put
   the work area in a lit stage on paper, and use one four state colour
   vocabulary. App chrome and tool panels get this by default through the
   tokens; marketing blocks, docs prose and .hb-zine keep the 2 px zine
   values. .hb-instrument is the opt-in rack density.
   ========================================================================== */

/* Zine scope. The marketing blocks carry the 2 px line and the deeper
   shadows; .hb-zine does the same for any other container. */
.hb-zine,.hb-prose,.hb-hero,.hb-cta,.hb-cover,.hb-footer,.hb-nav,.hb-media-card,
.hb-timeline,.hb-plaque,.hb-playlist,.hb-vframe,.hb-sechead,.hb-ink-block{
  --hb-border:2px;
  --hb-shadow-lg:5px 5px 0 var(--hb-ink);
  --hb-shadow-xl:7px 7px 0 var(--hb-ink);
}
.hb-zine .hb-pill{
  font-family:var(--hb-utility); font-size:10px; font-weight:700;
  text-transform:uppercase; letter-spacing:.1em; line-height:inherit; padding:3px 9px;
}

/* Emphasis keeps 2 px: the primary button (section 5), the stage and
   viewport (4, 19), the modal panel. */
.hb-modal > .hb-panel{ border-width:var(--hb-border-em) }

/* Pills read as instrument tags: VT323, sentence case, as FERRULE's bar. */
.hb-pill{
  font-family:var(--hb-readout); font-size:var(--hb-readout-md); font-weight:400;
  text-transform:none; letter-spacing:.02em; line-height:1; padding:4px 8px 3px;
}
.hb-cev-agent,.hb-cev-kind{ font-family:var(--hb-readout); font-size:var(--hb-readout-sm); font-weight:400; letter-spacing:.04em }
.hb-mem-kind,.hb-mem-ent{ font-family:var(--hb-readout); font-size:var(--hb-readout-sm); font-weight:400; letter-spacing:.02em; text-transform:none; padding:0 5px }
.hb-slot-stat{ font-family:var(--hb-readout); font-size:var(--hb-readout-md); font-weight:400; letter-spacing:.04em }

/* ---- four state vocabulary --------------------------------------------
   off dimmed, load amber blinking in two steps, ok green (slime on ink),
   err red. The tokens resolve to the lit set on ink and on the void. */
.hb-on-ink,.hb-header,.hb-stage,.hb-viewport,.hb-statusbar,.hb-console{
  --hb-state-off:var(--hb-lit-label);
  --hb-state-load:var(--hb-lit-warn);
  --hb-state-ok:var(--hb-slime);
  --hb-state-err:var(--hb-lit-err);
}
@keyframes hb-step{ 50%{ opacity:0 } }
/* The state light: an 8 px square for any row, cell or head. */
.hb-led{ display:inline-block; width:8px; height:8px; flex:0 0 auto; background:var(--hb-state-off); vertical-align:middle }
.hb-led.is-ok{ background:var(--hb-state-ok) }
.hb-led.is-err{ background:var(--hb-state-err) }
/* Every load indicator in the kit: pills, dots, status lines, verdicts,
   slot squares, engine dots and the light. */
.hb-led.is-load,
.hb-dot.is-load,.is-load > * > .hb-dot,.hb-header .hb-dot.is-load,.hb-on-ink .hb-dot.is-load,
.hb-pill.is-busy::before,.hb-pill.is-load::before,
.hb-header .hb-pill.is-busy::before,.hb-on-ink .hb-pill.is-busy::before,
.hb-status.is-busy::before,.hb-verdict.is-run::before,
.hb-slot.is-loading .hb-slot-sq,
.hb-engine.is-downloading .hb-engine-dot,.hb-engine.is-loading .hb-engine-dot{
  background:var(--hb-state-load); border-color:var(--hb-state-load);
  animation:hb-step 1s steps(2) infinite;
}
.hb-pill.is-load,.hb-pill.is-busy{ border-color:var(--hb-state-load) }
/* Off is dimmed by colour, not opacity, so the words keep 4.5:1: ink 3
   on paper 5.15:1, lit label on ink 5.60:1 (computed). */
.hb-pill.is-off{ opacity:1; color:var(--hb-ink-3); border-color:var(--hb-ink-4) }
.hb-header .hb-pill.is-off,.hb-on-ink .hb-pill.is-off{ color:var(--hb-lit-label); border-color:var(--hb-ink-border) }
.hb-slot.is-loading .hb-slot-stat,.hb-tool.is-running .hb-tool-state{ color:var(--hb-warn-ink) }
.hb-stage .hb-tool.is-running .hb-tool-state,.hb-on-ink .hb-tool.is-running .hb-tool-state{ color:var(--hb-lit-warn) }
.hb-statuslist .is-load > .hb-statuslist-row .hb-statuslist-state{ color:var(--hb-warn-ink) }
.hb-statuslist .is-ok > .hb-statuslist-row .hb-statuslist-state{ color:var(--hb-ok-ink) }
.hb-evlog-row.is-warn .hb-evlog-tag,.hb-evlog-row.is-load .hb-evlog-tag{ color:var(--hb-warn-ink) }
/* Reduced motion: load is a hollow square, so it never reads as warn. */
@media (prefers-reduced-motion:reduce){
  .hb-led.is-load,
  .hb-dot.is-load,.is-load > * > .hb-dot,.hb-header .hb-dot.is-load,.hb-on-ink .hb-dot.is-load,
  .hb-pill.is-busy::before,.hb-pill.is-load::before,
  .hb-header .hb-pill.is-busy::before,.hb-on-ink .hb-pill.is-busy::before,
  .hb-status.is-busy::before,.hb-verdict.is-run::before,
  .hb-slot.is-loading .hb-slot-sq,
  .hb-engine.is-downloading .hb-engine-dot,.hb-engine.is-loading .hb-engine-dot{
    animation:none; background:transparent; outline:2px solid var(--hb-state-load); outline-offset:-2px;
  }
}
/* A status bar cell with a state light before its label. */
.hb-statusbar .hb-led{ margin-right:5px; vertical-align:1px }

/* ---- stages ------------------------------------------------------------
   Lit: the FERRULE stage, a pink glow over diagonal hairlines on sunk
   paper, the work area read as an instrument in a paper page. The glow
   is drawn in three hard stepped bands, not a soft gradient.
   Void: the BAIL stage, black with the pink graph rule. */
.hb-stage-lit{
  background:
    radial-gradient(ellipse at 50% 38%, rgba(254,3,134,.14) 0 22%, rgba(254,3,134,.09) 22% 40%, rgba(254,3,134,.04) 40% 58%, transparent 58%),
    repeating-linear-gradient(135deg, transparent 0 12px, var(--hb-dot) 12px 13px),
    var(--hb-paper-sunk);
  color:var(--hb-ink);
  --hb-state-off:var(--hb-ink-4); --hb-state-load:var(--hb-warn); --hb-state-ok:var(--hb-ok); --hb-state-err:var(--hb-err);
}
.hb-stage.hb-stage-lit,.hb-viewport.hb-stage-lit{ box-shadow:none; border-width:var(--hb-border-em) }
.hb-stage-lit .hb-stage-label{ color:var(--hb-ink-3); opacity:1 }
.hb-stage-void{
  background-color:var(--hb-void); color:var(--hb-paper);
  background-image:
    linear-gradient(rgba(254,3,134,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254,3,134,.10) 1px, transparent 1px);
  background-size:32px 32px;
}
/* Stage tag: the FERRULE corner plate, ink name then pink mode. */
.hb-stage-tag{ display:inline-flex; gap:6px; align-items:center; font-family:var(--hb-readout); font-size:var(--hb-readout-lg); line-height:1 }
.hb-stage-tag > b{ background:var(--hb-ink); color:var(--hb-paper); padding:3px 8px 2px; font-weight:400 }
.hb-stage-tag > span{ background:var(--hb-pink); color:var(--hb-ink); padding:3px 8px 2px }

/* ---- dot grid paper ----------------------------------------------------
   Quieter than grain or halftone: 1 px ink dots at 7 px, 7 percent. The
   app shell carries it and drops the page grain; any surface may opt in. */
.hb-dotgrid,.hb-app{
  background-color:var(--hb-paper);
  background-image:radial-gradient(var(--hb-dot) 1px, transparent 1.3px);
  background-size:var(--hb-dot-step) var(--hb-dot-step);
}
body.hb.hb-dotgrid::before,body.hb:has(.hb-app)::before{ content:none }

/* ---- reply boxes -------------------------------------------------------
   HbMessage boxed: FERRULE's turn. A VT323 who tag on a plate, each part
   a raised box with a hard shadow; your turns sunk, no shadow. */
.hb-msg.is-boxed{ align-self:stretch; gap:6px }
.hb-msg.is-boxed .hb-msg-who{ font-family:var(--hb-readout); font-size:var(--hb-readout-lg); font-weight:400; text-transform:none; letter-spacing:0; line-height:1; align-items:center }
.hb-msg.is-boxed .hb-msg-name{ background:var(--hb-ink); color:var(--hb-paper); padding:3px 7px 2px }
.hb-msg.is-boxed.is-user .hb-msg-name{ background:var(--hb-pink); color:var(--hb-ink) }
.hb-msg.is-boxed .hb-msg-stats{ font-family:var(--hb-utility); font-size:11px }
.hb-msg.is-boxed .hb-msg-parts{ align-items:stretch }
.hb-msg.is-boxed .hb-msg-text{
  background:var(--hb-paper-raised); color:var(--hb-ink); border:var(--hb-border) solid var(--hb-ink);
  box-shadow:var(--hb-shadow-lg); padding:9px 12px; font-size:15px; line-height:1.55;
}
.hb-msg.is-boxed.is-user .hb-msg-text{ background:var(--hb-paper-sunk); box-shadow:none }
.hb-msg.is-boxed.is-streaming .hb-msg-text::after{ background:var(--hb-pink); animation:hb-step 1s steps(2) infinite }
@media(min-width:641px){ .hb-msg.is-boxed .hb-msg-text{ font-size:16px } }
@media (prefers-reduced-motion:reduce){ .hb-msg.is-boxed.is-streaming .hb-msg-text::after{ animation:none } }

/* ---- stroke icons ------------------------------------------------------
   Inline SVG drawn as lines: 2 px, square caps, mitre joins, as in the
   FERRULE and ARBOR bars. The baked set is Font Awesome solid (fills). */
svg.hb-stroke,.hb-stroke svg{ fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:square; stroke-linejoin:miter }

/* ---- fixture banner ----------------------------------------------------
   Every demo that shows sample state says so at its top, in words. */
.hb-fixture{
  display:flex; align-items:baseline; flex-wrap:wrap; gap:4px var(--hb-s2);
  margin:0 0 var(--hb-s3); padding:6px var(--hb-s3);
  background:var(--hb-paper-sunk); color:var(--hb-ink-2);
  border:var(--hb-border) dashed var(--hb-ink);
  font-family:var(--hb-utility); font-size:12px; line-height:1.45;
}
.hb-fixture > b{ font-family:var(--hb-readout); font-size:var(--hb-readout-md); font-weight:400; line-height:1; background:var(--hb-ink); color:var(--hb-paper); padding:2px 6px 1px }
.hb-header .hb-fixture,.hb-on-ink .hb-fixture{ background:transparent; color:var(--hb-paper); border-color:var(--hb-lit-label) }

/* ---- instrument density ------------------------------------------------
   .hb-instrument on any container: the ARBOR rack. 12.5 px base, tighter
   panel spacing, VT323 values, so about 30 lines of state fit one view.
   Coarse pointers keep 44 px targets; colours keep 4.5:1. */
.hb-instrument{
  --hb-s2:6px; --hb-s3:8px; --hb-s4:10px; --hb-s5:12px;
  --hb-shadow-lg:3px 3px 0 var(--hb-ink);
  font-size:12.5px; line-height:1.4;
}
.hb-instrument .hb-panel{ box-shadow:var(--hb-shadow) }
.hb-instrument .hb-panel-hd{ font-size:16px; margin-bottom:var(--hb-s2); padding-bottom:4px }
.hb-instrument .hb-panel-hd-inst,.hb .hb-instrument h2.hb-panel-hd-inst,.hb .hb-instrument h3.hb-panel-hd-inst{ font-size:var(--hb-readout-md); padding-top:4px; padding-bottom:3px; margin-bottom:var(--hb-s2) }
.hb-instrument .hb-label{ font-size:10px }
.hb-instrument .hb-kv{ padding:2px 0; font-family:var(--hb-utility); font-size:11.5px; line-height:1.35 }
.hb-instrument .hb-kv .hb-readout,.hb-instrument .hb-readouts .hb-readout{ font-size:var(--hb-readout-md); line-height:1 }
.hb-instrument .hb-readout{ font-size:var(--hb-readout-lg) }
.hb-instrument .hb-gauges{ gap:2px }
.hb-instrument .hb-gauge{ grid-template-columns:84px minmax(0,1fr) 40px; font-size:11.5px }
.hb-instrument .hb-gauge > .hb-meter{ height:9px }
.hb-instrument .hb-gauge-value{ font-size:var(--hb-readout-sm) }
.hb-instrument .hb-statuslist-row{ padding-top:3px; padding-bottom:3px }
.hb-instrument .hb-statuslist-note{ font-size:11.5px }
.hb-instrument .hb-evlog-rows{ gap:1px; padding:var(--hb-s1) var(--hb-s2) }
.hb-instrument .hb-evlog-text{ font-size:12px }
.hb-instrument .hb-mem-body{ padding:4px var(--hb-s2); font-size:12.5px; line-height:1.35 }
.hb-instrument .hb-msg-text{ font-size:13px; line-height:1.45 }
.hb-instrument .hb-hint{ font-size:10.5px }
@media(pointer:fine){
  .hb-instrument .hb-statuslist-row{ min-height:26px }
  .hb-instrument .hb-input,.hb-instrument .hb-select,.hb-instrument .hb-btn,.hb-instrument .hb-chip{ min-height:0 }
  .hb-instrument .hb-input,.hb-instrument .hb-select{ padding:4px 8px; font-size:12.5px }
  .hb-instrument .hb-btn{ padding:5px 10px }
}
@media(pointer:coarse){
  .hb-instrument button:not(.hb-msg-used-item),.hb-instrument select,.hb-instrument [role="button"],
  .hb-instrument input:not([type=checkbox]):not([type=radio]):not([type=range]){ min-height:44px }
}
/* The strip form sits under an app header, full width. */
.hb-fixture.is-strip{ margin:0; border-width:0 0 var(--hb-border); padding:4px max(var(--hb-s3), env(safe-area-inset-left)) }

/* 3D canvas host. The element a renderer appends its canvas to, inside
   HbViewport: it fills the frame, the canvas follows it with no layout
   shift (the renderer sets its size with the style left alone, three.js
   setSize(w, h, false)), and touch goes to the orbit control. */
.hb-viewport-host{ position:absolute; inset:0; overflow:hidden; touch-action:none; contain:strict }
.hb-viewport-host > canvas{ display:block; width:100% !important; height:100% !important; touch-action:none; outline:none }
/* A short verb on a thin line still makes a 44 px square for a finger. */
@media(pointer:coarse){ .hb-btn{ min-width:44px; justify-content:center } }
