/* public/css/hub.css — HUB v2 LAYOUT AND COMPONENTS
 *
 * Loaded by views/hub.ejs and views/console.ejs (and the dev gallery,
 * views/hub/gallery.ejs) AFTER /styles.css, and built ONLY on the :root
 * tokens that file declares: the D18 Hub set (--ink-2, --edge-control,
 * --well, --focus, --mark-sub, the --t-* type roles), plus --void, --card,
 * --bone, --signal, --warn, --danger, the glass edges, the D19 depths (--e1, --e2, --e3, --sunk), --dur
 * and --ease. styles.css points the --font-* faces at Hubot, Mona and
 * Strata Figures inside .hv-app.
 *
 * It NEVER declares a token. The only custom properties declared here are
 * Hub v2's own layout values, named --hv-*. tests/unit/hubV2Assets.test.js
 * fails the build if this file declares anything else, shadows a name
 * src/styles.css declares, uses a var() that does not resolve on a Hub v2
 * page, writes a colour literal (every colour is a token; tints are
 * color-mix() of a token), defines a block class the gallery does not show,
 * or lets an animation escape the reduced-motion block.
 *
 * The design is docs/design/hub-v2/final/strata-hub-v2-final.html (D18).
 *
 * Every class is prefixed hv- so nothing here can collide with the old
 * portal's classes while both ship. Blocks are BEM-ish: .hv-panel,
 * .hv-panel__head, .hv-panel--lit. Open overlays carry [data-open].
 */


/* ══ 0 · Page ══════════════════════════════════════════════════════════ */

.hv-app {
    --hv-row-pad: 0px;
    --hv-i: 0;
    --hv-tl: 6s;
    --hv-tw: 0;
    --hv-tx: 0;
    --hv-gut: 16px;

    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--frame);
    color: var(--bone);
    font-family: var(--font-body);
    font-size: var(--t-body);
    line-height: var(--lh-3);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
:where(.hv-app) *,
:where(.hv-app) *::before,
:where(.hv-app) *::after { box-sizing: border-box; }
/* Resets under :where() carry no specificity, so a component class wins. */
:where(.hv-app) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:where(.hv-app) a { color: inherit; text-decoration: none; }
.hv-app ::selection { background: var(--signal-edge); }
/* `hidden` wins over any component's display (a hidden button stays hidden). */
.hv-app [hidden] { display: none !important; }

/* Focus (D18): a bone ring (ink on Light), 2px out, on every control. */
.hv-app :focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
/* styles.css sets every heading in expanded caps; the Hub is sentence case. */
:where(.hv-app) :is(h1, h2, h3, h4, h5, h6) { text-transform: none; letter-spacing: 0; }
:where(.hv-app) p { max-width: 72ch; }

/* The icon sprite (views/partials/hub-icons.ejs): Linear, or Bold where
   --hv-ic-bd is switched on (the selected page). */
.hv-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hv-ic-ln { display: var(--hv-ic-ln, inline); }
.hv-ic-bd { display: var(--hv-ic-bd, none); }
.hv-app [aria-current="page"] > svg { --hv-ic-ln: none; --hv-ic-bd: inline; }

.hv-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ── Skip link: off-screen until focused ── */
.hv-skip {
    position: absolute;
    left: var(--hv-gut);
    top: -100px;
    z-index: var(--z-modal);
    padding: 8px 12px;
    background: var(--card);
    color: var(--bone);
    font-size: var(--t-small);
}
.hv-skip:focus-visible { top: var(--hv-gut); }

/* ── Main landmark ── */
.hv-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: calc(var(--hv-gut) * 4) var(--hv-gut);
}
.hv-main:focus:not(:focus-visible) { outline: none; }

.hv-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: var(--t-figure);
    letter-spacing: -0.02em;
    line-height: var(--lh-7);
}
.hv-lede {
    margin: 12px 0 0;
    max-width: 40rem;
    color: var(--text-mut);
}

/* Phase 1 (the mockup's .smain > .wrap): pages fill the sheet, 48px in from its edges. */
.hv-wrap {
    position: relative;
    z-index: 1;
    padding: 0 48px;
}

/* ══ 1 · Frame: the rail on the frame, the page in a sheet set into it (D18) ══ */

.hv-frame {
    --hv-rail-w: 252px;
    --hv-va-h: 62px;
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: var(--hv-rail-w) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    background: var(--frame);
}
.hv-frame--col { --hv-rail-w: 72px; }
/* The server's view-as banner (partials/viewing-as.ejs) is fixed to the bottom edge; main.js measures it. */
.hv-app[data-viewing-as="true"] .hv-frame { bottom: var(--hv-va-h); }

.hv-sheet {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 12px 12px 12px 0;
    border: 1px solid var(--sheet-edge);
    background: var(--sheet);
    overflow: hidden;
}
.hv-sbar { flex: none; }
.hv-sbar > :not(:empty) { padding: 12px 28px 0; }
/* The sheet's only scroller: the frame and the rail never move. */
.hv-page { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.hv-page:focus:not(:focus-visible) { outline: none; }

/* ── Rail ── */
.hv-rail {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.hv-rail__head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 72px;
    padding: 0 10px 0 14px;
}
.hv-ws { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hv-ws__mark {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    background: var(--card-flat);
}
.hv-ws__mark svg { width: 22px; height: 22px; }
.hv-ws__t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hv-ws__name {
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: 700;
    font-stretch: 105%;
    font-size: var(--t-body);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.hv-ws__sub { margin-top: 2px; color: var(--ink-2); font-size: var(--t-label); white-space: nowrap; }
.hv-lockup {
    display: flex;
    align-items: center;
    font-family: var(--font-mark);
    font-weight: 800;
    font-size: var(--t-body);
    letter-spacing: -0.01em;
    text-transform: uppercase;
    white-space: nowrap;
}
.hv-lockup__sub { margin-left: 9px; padding-left: 9px; border-left: 1px solid var(--edge-control); color: var(--mark-sub); }
.hv-rail__col { display: grid; flex: none; place-items: center; width: 30px; height: 30px; color: var(--ink-2); }
.hv-rail__col:hover { color: var(--bone); }
.hv-rail__col svg { transition: transform calc(var(--dur) * 2) var(--ease); }
.hv-frame--col .hv-rail__col svg { transform: rotate(180deg); }

/* The plan: its name in the heading face, what it covers beneath in ash (D1a), then the trial day */
.hv-planchip { display: flex; flex: none; flex-direction: column; gap: 2px; min-width: 0; padding: 0 18px 14px; }
.hv-planchip__name { font-family: var(--font-display); font-weight: 700; font-stretch: 108%; font-size: var(--t-title); line-height: 1.2; }
.hv-planchip__beta {
    margin-left: 6px;
    padding: 0 4px;
    background: var(--warn);
    color: var(--on-signal);
    font-family: var(--font-body);
    font-size: var(--t-label);
    font-style: normal;
    font-weight: 500;
}
.hv-planchip__desc,
.hv-planchip__trial { overflow: hidden; color: var(--ink-2); font-size: var(--t-label); white-space: nowrap; text-overflow: ellipsis; }
.hv-planchip__trial { margin-top: 4px; color: var(--bone); }

.hv-rail__tools { display: flex; flex: none; gap: 6px; padding: 0 12px 6px; }
.hv-search {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    overflow: hidden;
    border: 1px solid var(--card-edge);
    background: color-mix(in srgb, var(--bone) 4%, transparent);
    color: var(--ink-2);
    font-size: var(--t-small);
}
.hv-search:hover { border-color: var(--edge-hi); color: var(--bone); }
.hv-search svg { flex: none; }
.hv-search > span { white-space: nowrap; }
.hv-search__kbd {
    margin-left: auto;
    padding: 1px 5px;
    border: 1px solid var(--card-edge);
    font-family: var(--font-mono);
    font-size: var(--t-label);
    white-space: nowrap;
}

.hv-icon-btn {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--card-edge);
    color: var(--ink-2);
    transition: border-color calc(var(--dur) * 1.25), color calc(var(--dur) * 1.25);
}
.hv-icon-btn:hover { border-color: var(--edge-hi); color: var(--bone); }
/* Unread is information (decision 8): the bell keeps its dot. */
.hv-icon-btn__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: var(--signal);
    box-shadow: 0 0 0 2px var(--frame);
}
.hv-icon-btn svg { width: 16px; height: 16px; }

.hv-rail__nav { flex: 1; min-height: 0; padding: 0 8px 12px; overflow: hidden; }
.hv-rail__group { margin-top: 14px; }
.hv-rail__gl { padding: 0 10px 4px; color: var(--text-mut); font-size: var(--t-label); white-space: nowrap; }
.hv-rail__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 32px;
    padding: 0 10px;
    color: var(--ink-2);
    font-size: var(--t-small);
    font-weight: 500;
    white-space: nowrap;
    transition: background-color calc(var(--dur) * 1.25), color calc(var(--dur) * 1.25);
}
.hv-rail__link svg { flex: none; }
.hv-rail__link:hover { color: var(--bone); }
/* The page you are on is a tab cut from the sheet. */
.hv-rail__link[aria-current="page"] { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--sheet-edge); color: var(--bone); font-weight: 600; }
.hv-rail__count { margin-left: auto; color: var(--ink-2); font-family: var(--font-mono); font-size: var(--t-label); font-weight: 500; }
.hv-rail__link[aria-current="page"] .hv-rail__count { color: var(--bone); }
/* The tab takes the sheet's theme, but its ring sits on the frame. */
.hv-rail .hv-rail__link[aria-current="page"]:focus-visible { outline-color: var(--focus-frame); }
.hv-rail__secs { display: flex; flex-direction: column; margin: 2px 0 6px 18px; border-left: 1px solid var(--line); }
.hv-rail__sec {
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px 3px 13px;
    color: var(--ink-2);
    font-size: var(--t-label);
    line-height: 1.25;
}
.hv-rail__sec:hover { color: var(--bone); }
.hv-rail__sec[aria-current="true"] { box-shadow: inset 1px 0 0 var(--bone); color: var(--bone); }

.hv-rail__foot { display: flex; flex: none; flex-direction: column; gap: 4px; padding: 8px 12px; border-top: 1px solid var(--line); }
.hv-agent { display: block; padding: 12px 10px 10px; transition: background-color calc(var(--dur) * 1.25); }
.hv-agent__t { display: flex; align-items: center; gap: 9px; }
.hv-agent__t b { min-width: 0; overflow: hidden; font-size: var(--t-body); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.hv-agent__st { flex: none; }
.hv-agent__st { margin-left: auto; color: var(--signal-text); font-size: var(--t-label); }
.hv-agent__st--bad { color: var(--danger-lift); }
.hv-agent__d { display: block; margin-top: 4px; overflow: hidden; color: var(--ink-2); font-size: var(--t-label); white-space: nowrap; text-overflow: ellipsis; }
/* The agent's live square: a status, not a marker (decision 8). */
.hv-live { flex: none; width: 6px; height: 6px; background: var(--signal); }
@keyframes hv-breathe { 50% { opacity: 0.45; } }
/* Nothing in the rail scrolls: on a shorter screen the card folds to its first line. */
@media (max-height: 1000px) {
    .hv-agent__d:not(.hv-agent__d--today) { display: none; }
}

.hv-acct {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px;
    border: 1px solid transparent;
    color: var(--ink-2);
    text-align: left;
}
.hv-acct:hover,
.hv-acct[aria-expanded="true"] { border-color: var(--card-edge); }
.hv-acct[aria-expanded="true"] { background: color-mix(in srgb, var(--bone) 3.5%, transparent); }
.hv-acct__name { flex: 1; min-width: 0; overflow: hidden; color: var(--bone); font-size: var(--t-small); line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.hv-acct__sub { display: block; overflow: hidden; color: var(--ink-2); font-size: var(--t-label); text-overflow: ellipsis; }
.hv-acct > svg { flex: none; }

.hv-av {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    background: var(--card-hi);
    color: var(--bone);
    font-family: var(--font-display);
    font-size: var(--t-label);
    font-weight: 700;
    font-stretch: 105%;
}
.hv-av--lg { width: 40px; height: 40px; font-size: var(--t-small); }
.hv-av--sig { background: var(--signal-dim); }
.hv-av--btn { width: 36px; height: 36px; }

/* Collapsed: icons, the live square and the avatar; the names are tooltips. */
.hv-frame--col :is(.hv-ws__t, .hv-planchip, .hv-search > span, .hv-search__kbd, .hv-rail__gl, .hv-rail__label,
    .hv-agent__t b, .hv-agent__st, .hv-agent__d, .hv-acct__name, .hv-acct > svg) { display: none; }
.hv-frame--col .hv-rail__head { flex-direction: column; justify-content: center; gap: 10px; height: auto; padding: 14px 0 12px; }
.hv-frame--col .hv-rail__tools { flex-direction: column; align-items: center; padding: 0 0 4px; }
.hv-frame--col .hv-search { flex: none; justify-content: center; width: 40px; padding: 0; }
.hv-frame--col .hv-rail__nav { padding: 0 12px 12px; }
.hv-frame--col .hv-rail__group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.hv-frame--col .hv-rail__group:first-child { border-top: 0; }
.hv-frame--col .hv-rail__link { justify-content: center; padding: 0; }
.hv-frame--col .hv-rail__count { position: absolute; top: 2px; right: 2px; padding: 0 4px; background: var(--bone); color: var(--void); }
.hv-frame--col .hv-agent { display: flex; justify-content: center; padding: 12px 0; }
.hv-frame--col .hv-acct { justify-content: center; padding: 6px 0; }
/* A shorter screen packs the open rail tighter; below what fits, core/frame.js collapses it. */
@media (max-height: 900px) {
    .hv-rail__head { height: 60px; }
    .hv-rail__group { margin-top: 8px; }
    .hv-rail__link { height: 28px; }
    .hv-rail__sec { min-height: 22px; padding-top: 2px; padding-bottom: 2px; }
}

/* ── Phone: a top bar, the sheet full screen and a tab bar (four pages and More) ── */
.hv-mtop,
.hv-tabbar { display: none; }
.hv-mtop {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 12px;
    border-bottom: 1px solid var(--glass-edge);
    background: var(--frame);
}
.hv-mtop .hv-ws { flex: 1; }
.hv-mtop .hv-icon-btn { border-color: transparent; }
.hv-tabbar {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: 64px;
    border-top: 1px solid var(--glass-edge);
    background: var(--frame);
}
.hv-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--ink-2);
    font-size: var(--t-label);
}
.hv-tab[aria-current="page"] { color: var(--bone); }
.hv-tab[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--bone); }
.hv-tab__count {
    position: absolute;
    top: 8px;
    left: calc(50% + 6px);
    padding: 0 4px;
    background: var(--bone);
    color: var(--void);
    font-family: var(--font-mono);
    font-size: var(--t-label);
}
@media (max-width: 820px) {
    .hv-frame,
    .hv-frame--col { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
    .hv-rail { display: none; }
    .hv-mtop { display: flex; }
    .hv-tabbar:not(:empty) { display: grid; }
    .hv-sheet { grid-column: 1; grid-row: 2; margin: 0; border: 0; }
    .hv-sbar > :not(:empty) { padding: 10px 12px 0; }
}

/* Banners at the top of the sheet: trial, multi-site beta (with the branch picker) */
.hv-tbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 9px 14px;
    border: 1px solid var(--signal-edge);
    background: color-mix(in srgb, var(--signal) 7%, transparent);
    color: var(--ink-2);
    font-size: var(--t-small);
}
.hv-tbar b { color: var(--bone); font-weight: 600; }
.hv-tbar a { border-bottom: 1px solid var(--card-edge); color: var(--bone); font-size: var(--t-label); }
.hv-tbar > a:first-of-type { margin-left: auto; }
.hv-tbar--beta { border-color: var(--warn-edge); background: color-mix(in srgb, var(--warn) 7%, transparent); }

.hv-brpick {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--card-edge);
    color: var(--ink-2);
    font-size: var(--t-small);
}
.hv-tbar .hv-brpick { height: 26px; margin-right: 4px; border-color: var(--warn-edge); }
.hv-brpick select {
    border: 0;
    background: transparent;
    color: var(--bone);
    font: inherit;
    cursor: pointer;
}
.hv-brpick select option { background: var(--card); color: var(--bone); }
.hv-brpick--locked { color: var(--bone); }

/* The Hub's own view-as bar, visible in every theme (decision 2). The security banner is still the
   server partial views/partials/viewing-as.ejs, unchanged. */
.hv-viewas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--bone);
    color: var(--void);
    font-size: var(--t-label);
}
.hv-viewas :focus-visible { outline-color: var(--sheet); }
.hv-viewas button,
.hv-viewas a {
    padding: 3px 9px;
    border: 1px solid var(--void);
    font-size: var(--t-label);
}

/* ══ 2 · Pages: a title, then sections that flow ══════════════════════ */

.hv-ph {
    margin: 0;
    padding: 30px 48px 8px;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: var(--t-figure);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.hv-slide { padding: 0 0 56px; }
.hv-slide:first-of-type { padding-top: 28px; }
.hv-ph + .hv-slide { padding-top: 8px; }

/* D20: the freshness line and the page notices under the title; the page dims while offline */
.hv-status { display: grid; gap: 8px; margin: 0; padding: 20px 48px 0; }
/* The mockup's page head: the title left, "Updated just now" with its dot on the same line, right. */
.hv-page:has(> .hv-ph) { position: relative; }
.hv-ph + .hv-status > .hv-fresh { position: absolute; top: 40px; right: 48px; display: inline-flex; align-items: center; gap: 8px; }
.hv-fresh::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); opacity: 0.6; }
.hv-fresh--old::before { background: var(--warn); opacity: 1; }
.hv-ph + .hv-status { padding-top: 4px; }
.hv-status:empty { display: none; }
.hv-ph + .hv-status + .hv-slide { padding-top: 8px; }
.hv-fresh { margin: 0; color: var(--ink-2); font-size: var(--t-label); }
.hv-fresh--old { color: var(--warn); }
.hv-stale .hv-slide { opacity: 0.82; filter: saturate(0.6); }

/* Section head: the label, the section's line and intro on the left, actions on the right. The sign-in
   pages keep the two-column head. */
.hv-sh {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end;
    margin-bottom: var(--space-4);
}
.hv-sh--page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; padding-top: 6px; }
.hv-sh__sub { margin-top: 4px; color: var(--ink-2); font-size: var(--t-body); }
.hv-sh__intro { max-width: 40rem; color: var(--ink-2); font-size: var(--t-body); line-height: var(--lh-3); }
.hv-sh--page .hv-sh__intro { margin-top: 4px; font-size: var(--t-small); }
.hv-sh__intro b { color: var(--bone); font-weight: 600; }
.hv-sh__acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
/* Phase 2: the first section's note with "Got it", then an (i) beside each label; Settings in two columns. */
.hv-hint { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -4px 0 16px; padding: 12px 14px; border: 1px solid var(--card-edge); background: var(--well); color: var(--ink-2); font-size: var(--t-small); line-height: var(--lh-3); }
.hv-hint > span { max-width: 72ch; }
.hv-hint { position: relative; padding-left: 46px; }
.hv-hint::before { content: 'i'; position: absolute; top: 13px; left: 16px; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--card-edge); color: var(--bone); font: 600 12px/1 var(--font-mono); }
.hv-hint b { color: var(--bone); }
/* A 44px tap target (phones) drawn as the mockup's 24px box; the negative margin keeps the header's height. */
.hv-info { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px; border: 0; background: none; color: var(--ink-2); font: 500 12px/1 var(--font-mono); cursor: help; }
.hv-info::before { content: ''; position: absolute; inset: 10px; border: 1px solid var(--card-edge); }
.hv-info:hover, .hv-info:focus-visible { color: var(--bone); }
.hv-info:hover::before, .hv-info:focus-visible::before { border-color: var(--ink-2); }
.hv-sh__sub:has(> span:empty) { display: none; }
.hv-set { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
.hv-set__h .hv-h2 { margin: 0; font-weight: 700; font-stretch: 108%; letter-spacing: -0.005em; line-height: 1.2; }
.hv-set__desc { margin-top: 8px; color: var(--ink-2); font-size: var(--t-small); line-height: var(--lh-3); }
.hv-set__h .hv-sh__acts { justify-content: flex-start; }
.hv-set__b .hv-grid > * { grid-column: 1 / -1; }
/* Reports › Timing: hour by day, the open hours outlined. */
.hv-heat { --hv-heat: 0; display: grid; grid-template-columns: 40px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.hv-heat__l { color: var(--ink-2); font: 500 12px/1 var(--font-mono); }
.hv-heat__l--h { text-align: center; }
.hv-heat__c { height: 30px; background: color-mix(in srgb, var(--signal) calc(var(--hv-heat) * 90%), var(--well)); }
.hv-heat__c--open { box-shadow: inset 0 1px 0 var(--bone), inset 0 -1px 0 var(--bone); }
.hv-heat__c--os { box-shadow: inset 0 1px 0 var(--bone), inset 0 -1px 0 var(--bone), inset 1px 0 0 var(--bone); }
.hv-heat__c--oe { box-shadow: inset 0 1px 0 var(--bone), inset 0 -1px 0 var(--bone), inset -1px 0 0 var(--bone); }
.hv-heat__c--os.hv-heat__c--oe { box-shadow: inset 0 0 0 1px var(--bone); }
.hv-heat__key { display: flex; flex-wrap: wrap; gap: 8px 20px; max-width: none; margin-top: 12px; color: var(--ink-2); font-size: var(--t-label); }
.hv-heat__key i { display: inline-block; width: 14px; height: 10px; margin-right: 6px; box-shadow: inset 0 0 0 1px var(--bone); }
.hv-heat__key > :last-child { margin-left: auto; }

.hv-kick {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-2);
    font-size: var(--t-label);
    font-weight: 500;
}

.hv-h2 {
    text-transform: none;
    margin: 12px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 115%;
    font-size: var(--t-section);
    letter-spacing: -0.02em;
    line-height: var(--lh-7);
    text-wrap: balance;
}
.hv-sh--page .hv-h2 { margin: 0; font-weight: 700; font-stretch: 108%; letter-spacing: -0.005em; line-height: 1.2; }

/* ══ 3 · Grid ══════════════════════════════════════════════════════════ */

.hv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--hv-gut); }
.hv-s3 { grid-column: span 3; }
.hv-s4 { grid-column: span 4; }
.hv-s5 { grid-column: span 5; }
.hv-s6 { grid-column: span 6; }
.hv-s7 { grid-column: span 7; }
.hv-s8 { grid-column: span 8; }
.hv-s9 { grid-column: span 9; }
.hv-s12 { grid-column: 1 / -1; }
.hv-mt { margin-top: var(--hv-gut); }

/* ══ 4 · Panels and figures ════════════════════════════════════════════ */

.hv-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    background: var(--card-flat);
    box-shadow: var(--e1);
    transition: border-color calc(var(--dur) * 2) var(--ease), box-shadow calc(var(--dur) * 2) var(--ease), transform calc(var(--dur) * 2) var(--ease);
}
/* D19: a card that opens something lifts 1px to e2 on hover; a card that only informs never moves. */
.hv-app a.hv-panel:hover { border-color: var(--edge-hi); box-shadow: var(--e2); transform: translateY(-1px); }
:is(a.hv-panel, .hv-fig) > .hv-meta::after { content: ' →' / ''; opacity: 0; transition: opacity var(--dur); }
:is(a.hv-panel, .hv-fig):is(:hover, :focus-visible) > .hv-meta::after { opacity: 1; }
.hv-panel--lit::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--bone); }
.hv-panel--upsell { border-style: dashed; border-color: var(--edge-hi); }
.hv-panel--upsell .hv-panel__title { color: var(--ink-2); }
.hv-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 0;
}
.hv-panel__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-stretch: 108%;
    font-size: var(--t-title);
    letter-spacing: -0.005em;
}
.hv-panel__body { flex: 1; padding: 16px 22px 20px; }
.hv-panel__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 22px 16px;
    border-top: 1px solid var(--row-edge);
}

.hv-pad { padding: 20px 22px; }

.hv-meta {
    color: var(--ink-2);
    font-size: var(--t-label);
}
.hv-muted { color: var(--ink-2); }
.hv-small { font-size: var(--t-small); }
.hv-num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.hv-stat__v {
    margin-top: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: var(--t-figure);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.hv-stat__unit { margin-left: 4px; color: var(--ink-2); font-size: var(--t-body); letter-spacing: 0; }
.hv-stat__l { margin-top: 4px; color: var(--ink-2); font-size: var(--t-small); }
.hv-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: var(--t-label);
}
.hv-delta b { color: var(--bone); font-weight: 500; }
.hv-spark { display: block; width: 100%; height: 34px; margin-top: 12px; }
.hv-hero-v {
    margin-top: 14px;
    color: var(--signal-text);
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: var(--t-hero);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* ══ 5 · Controls ══════════════════════════════════════════════════════ */

/* Buttons: one green per view; sentence case, no glow, no lift */
.hv-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    font-size: var(--t-small);
    font-weight: 600;
    white-space: nowrap;
    transition: transform var(--dur) var(--ease), border-color calc(var(--dur) * 1.5), background-color calc(var(--dur) * 1.5);
}
.hv-btn--sm { min-height: 32px; padding: 0 11px; }
.hv-btn--xs { min-height: 28px; padding: 0 9px; }
.hv-btn--primary {
    border-color: var(--signal-deep);
    background: var(--signal);
    color: var(--on-signal);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bone) 40%, transparent);
}
.hv-btn--secondary {
    border-color: var(--edge-hi);
    background: var(--glass-nested);
    color: var(--bone);
}
.hv-btn--secondary:hover { border-color: var(--glass-edge-hi); }
.hv-btn--ghost { color: var(--ink-2); }
.hv-btn--ghost:hover { border-color: var(--card-edge); color: var(--bone); }
.hv-btn--danger { border-color: var(--danger-edge); color: var(--danger-lift); }
.hv-btn--danger:hover { background: var(--danger-dim); }
.hv-btn:disabled,
.hv-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.hv-btn svg { width: 14px; height: 14px; }

.hv-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--card-edge);
    color: var(--bone);
    font-size: var(--t-small);
    font-weight: 500;
}
.hv-link:hover { border-color: var(--bone); }

/* Segmented control */
.hv-seg { display: inline-flex; border: 1px solid var(--card-edge); background: color-mix(in srgb, var(--void) 40%, transparent); }
.hv-seg button {
    padding: 7px 12px;
    color: var(--ink-2);
    font-size: var(--t-small);
    white-space: nowrap;
}
.hv-seg button:is([aria-pressed="true"], [aria-checked="true"]) {
    background: color-mix(in srgb, var(--bone) 9%, transparent);
    color: var(--bone);
    box-shadow: inset 0 -2px 0 var(--bone);
}

/* Filter chips */
.hv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--card-edge);
    color: var(--ink-2);
    font-size: var(--t-small);
    white-space: nowrap;
}
.hv-chip[aria-pressed="true"] {
    border-color: var(--edge-hi);
    background: color-mix(in srgb, var(--bone) 5%, transparent);
    color: var(--bone);
}
.hv-chip__n { color: var(--ink-2); font-family: var(--font-mono); font-size: var(--t-label); }

/* The New client wizard: eight steps in three parts, plan cards, an email beside its tracker */
.hv-drawer.hv-drawer--wide { width: min(980px, 100%); }
.hv-wz-steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 14px; }
.hv-wz-g {
    --hv-span: 1;
    grid-column: span var(--hv-span);
    margin: 0 6px 8px 0;
    padding-bottom: 7px;
    overflow: hidden;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: var(--t-label);
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.hv-wz-step { min-width: 0; margin-right: -1px; padding: 10px 12px; border: 1px solid var(--card-edge); color: var(--ink-2); font-size: var(--t-label); text-align: left; }
.hv-wz-step b { display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-weight: 500; }
.hv-wz-step span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hv-wz-step[data-done] { color: var(--bone); }
.hv-wz-step[data-locked] { color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
.hv-wz-step[aria-current="step"] { position: relative; border-color: var(--edge-hi); background: color-mix(in srgb, var(--bone) 4%, transparent); color: var(--bone); }
.hv-wz-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.hv-wz-plan { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--card-edge); background: color-mix(in srgb, var(--void) 25%, transparent); text-align: left; }
.hv-wz-plan:hover { border-color: var(--edge-hi); }
.hv-wz-plan[aria-pressed="true"] { border-color: var(--bone); background: color-mix(in srgb, var(--bone) 5%, transparent); }
.hv-wz-plan b { font-family: var(--font-display); font-size: var(--t-title); }
.hv-wz-plan span { color: var(--ink-2); font-size: var(--t-small); }
.hv-wz-plan em { margin-top: 4px; font-style: normal; font-size: var(--t-label); }
.hv-wz-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
/* Step 6 and Quality: the simulated cases in two columns, each with its tag and, when it did not pass, Retell's reason */
.hv-wz-sim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 10px; border: 1px solid var(--card-edge); background: var(--card-edge); }
.hv-wz-case { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 8px 10px; background: var(--card-flat); font-size: var(--t-small); }
.hv-wz-case:last-child:nth-child(odd) { grid-column: 1 / -1; }
.hv-wz-case__t { flex: 1; min-width: 0; }
.hv-wz-case__why { margin-top: 2px; color: var(--ink-2); font-size: var(--t-label); overflow-wrap: anywhere; }
@media (max-width: 720px) {
    .hv-wz-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hv-wz-g { display: none; }
    .hv-wz-plans,
    .hv-wz-2,
    .hv-wz-sim { grid-template-columns: 1fr; }
}

/* Status tags: the word carries the meaning, the edge a quiet tone; no marker shapes */
.hv-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    border: 1px solid var(--card-edge);
    color: var(--ink-2);
    font-size: var(--t-label);
    font-weight: 500;
    white-space: nowrap;
}
.hv-tag--ok,
.hv-tag--hot,
.hv-tag--br { color: var(--bone); }
.hv-tag--ok { border-color: var(--edge-control); }
.hv-tag--warn { border-color: var(--warn-edge); color: var(--warn); }
.hv-tag--bad { border-color: var(--danger-edge); color: var(--danger-lift); }
.hv-tag--hot { border-color: var(--edge-hi); }
.hv-tag--plain { border-color: var(--line-2); }
.hv-tag svg { width: 12px; height: 12px; }

/* Branch colour: BY INDEX from the server's order, never by branch name */
.hv-brbar--1 { box-shadow: inset 3px 0 0 var(--bone); }
.hv-brbar--2 { box-shadow: inset 3px 0 0 var(--signal-lift); }
.hv-brbar--3 { box-shadow: inset 3px 0 0 var(--ink-2); }
.hv-brbar--4 { box-shadow: inset 3px 0 0 var(--info); }
.hv-brbar--5 { box-shadow: inset 3px 0 0 var(--warn); }

/* Fields */
.hv-label { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: var(--t-small); }
.hv-field {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--edge-control);
    border-radius: 0;
    background: var(--well);
    color: var(--bone);
    font: inherit;
    transition: border-color calc(var(--dur) * 1.25);
}
.hv-field:hover { border-color: var(--edge-hi); }
.hv-field::placeholder { color: var(--text-mut); opacity: 1; }
textarea.hv-field { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
select.hv-field { cursor: pointer; }

/* Code boxes (HUB-D2): one digit per box; public/js/hub/auth/otp.js moves
   focus, handles backspace, and spreads a pasted code across every box.
   One row always: on a narrow panel (390px) the boxes shrink from 44px rather
   than wrap the last digit onto a second line. */
.hv-otp { display: flex; flex-wrap: nowrap; gap: 8px; }
.hv-otp .hv-field { flex: 0 1 44px; min-width: 0; width: 44px; height: 48px; padding: 0; text-align: center; font-family: var(--font-mono); font-size: var(--t-section); }
.hv-field[aria-invalid="true"] { border-color: var(--danger); }
.hv-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Switch: a <button role="switch" aria-checked>. Quiet: off is a hollow
   track, on is a bone track with a dark thumb; never green. */
.hv-switch {
    position: relative;
    flex: none;
    width: 36px;
    height: 20px;
    border: 1px solid var(--edge-control);
    background: var(--well);
    transition: background-color calc(var(--dur) * 1.25), border-color calc(var(--dur) * 1.25);
}
.hv-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    background: var(--ink-2);
    transition: transform calc(var(--dur) * 1.4) var(--ease), background-color calc(var(--dur) * 1.25);
}
.hv-switch[aria-checked="true"] { border-color: var(--bone); background: var(--bone); }
.hv-switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--sheet); }
.hv-switch:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── D19 state layer: every clickable thing tints 6% on hover and 10% on press; the green brightens, a switch rings ── */
/* A touch screen keeps :hover on the last thing tapped (a second tab looked current), so the hover tint needs a real pointer. */
@media (hover: hover) {
    .hv-app :is(button, a[href], [role="button"], [role="link"], tr[tabindex], tr[data-href]):not(:disabled, [aria-disabled="true"], .hv-btn--primary, .hv-switch, .hv-link, .hv-skip):hover {
        background-image: linear-gradient(color-mix(in srgb, var(--bone) 6%, transparent) 0 0);
    }
}
.hv-app :is(button, a[href], [role="button"], [role="link"], tr[tabindex], tr[data-href]):not(:disabled, [aria-disabled="true"], .hv-btn--primary, .hv-switch, .hv-link, .hv-skip):active {
    background-image: linear-gradient(color-mix(in srgb, var(--bone) 10%, transparent) 0 0);
}
.hv-app .hv-btn--primary:not(:disabled):hover { filter: brightness(1.07) saturate(1.04); }
.hv-app .hv-btn--primary:not(:disabled):active { filter: brightness(0.95); }
.hv-app .hv-btn:not(:disabled):active { transform: translateY(1px); }
.hv-app .hv-switch:not(:disabled):hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bone) 6%, transparent); }
.hv-app .hv-switch:not(:disabled):active { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bone) 10%, transparent); }
/* Wells sit one step below the card. */
:is(.hv-field, .hv-notice, .hv-meter, .hv-code) { box-shadow: var(--sunk); }

/* ══ 6 · Lists, tables, meters ═════════════════════════════════════════ */

.hv-rows > * + * { border-top: 1px solid var(--row-edge); }
.hv-row { display: flex; align-items: center; gap: 14px; padding: calc(13px + var(--hv-row-pad)) 0; }
.hv-row__grow { flex: 1; min-width: 0; }
.hv-row__t { font-weight: 600; }
.hv-row__d { margin-top: 1px; color: var(--ink-2); font-size: var(--t-small); }
.hv-ell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* A table fits its card: headings and descriptions wrap; times, figures and tags do not. */
.hv-table { width: 100%; border-collapse: collapse; }
.hv-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--card-edge);
    background: var(--card);
    color: var(--ink-2);
    font-size: var(--t-label);
    font-weight: 500;
    text-align: left;
}
.hv-table td { padding: 12px; border-bottom: 1px solid var(--row-edge); vertical-align: middle; overflow-wrap: anywhere; }
.hv-table :is(.hv-tag, time) { white-space: nowrap; }
.hv-table .hv-num,
.hv-table .hv-r { text-align: right; white-space: nowrap; }
.hv-table tbody tr[data-href],
.hv-table tbody tr[tabindex] { cursor: pointer; transition: background-color calc(var(--dur) * 1.25); }
.hv-table tbody tr[aria-selected="true"] { background: color-mix(in srgb, var(--bone) 4%, transparent); }

/* Key/value grid (lead fields, plan facts) */
.hv-kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--card-edge);
    background: var(--card-edge);
}
.hv-kv > div { padding: 11px 13px; background: var(--card); }
.hv-kv--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hv-kv__k { color: var(--ink-2); font-size: var(--t-label); }
.hv-kv__v { margin-top: 3px; font-weight: 600; }
.hv-kv__v.hv-num { font-weight: 500; }   /* Geist Mono ships 400 and 500 only */

/* Meter with an 80% (or target) marker; --hv-fill and --hv-mark are the hooks */
.hv-meter {
    --hv-fill: 0%;
    --hv-mark: 80%;
    position: relative;
    height: 6px;
    background: var(--card-edge);
}
.hv-meter__fill { position: absolute; inset: 0 auto 0 0; width: var(--hv-fill); max-width: 100%; background: var(--bone); }
.hv-meter__mark { position: absolute; top: -4px; bottom: -4px; left: var(--hv-mark); width: 2px; background: var(--bone); }
.hv-meter--sig .hv-meter__fill { background: var(--signal); }
.hv-meter--warn .hv-meter__fill { background: var(--warn); }
.hv-meter--bad .hv-meter__fill { background: var(--danger); }

/* Bar chart (hub/core/charts.js): divs, heights on the --hv-fill hook */
.hv-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.hv-bars--tall { height: 180px; }
.hv-bars--short { height: 64px; }
.hv-bars__col { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; min-width: 0; height: 100%; }
.hv-bars__bar { display: block; height: var(--hv-fill); min-height: 2px; background: color-mix(in srgb, var(--bone) 70%, transparent); }
.hv-bars--signal .hv-bars__bar { background: var(--signal); }
.hv-bars__col:hover .hv-bars__bar { background: var(--bone); }
.hv-bars__lbl { margin-top: 6px; color: var(--text-mut); font-family: var(--font-mono); font-size: var(--t-label); text-align: center; white-space: nowrap; }

/* A row that is a button (a list you pick from): full width, left aligned */
.hv-listrow { width: 100%; padding: 12px 10px; border-left: 2px solid transparent; text-align: left; }
.hv-listrow[aria-current="true"] { border-left-color: var(--bone); background: color-mix(in srgb, var(--bone) 5.5%, transparent); }

/* A search field that does not stretch across a toolbar */
.hv-searchbox { width: min(320px, 100%); }

/* Reports: a column of panels inside a grid cell, an inline form row, the
   meter column in a labelled row, and a copyable one-time link */
.hv-stack { display: flex; flex-direction: column; gap: var(--hv-gut); }
.hv-stack > :last-child { flex: 1; }
.hv-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hv-inline .hv-field { width: auto; flex: 1 1 120px; height: 34px; }
.hv-w40 { flex: 0 0 40%; }
.hv-count { min-width: 3.5em; text-align: right; }
.hv-row--btn { width: 100%; border: 0; border-top: 1px solid var(--row-edge); background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.hv-row--btn:first-child { border-top: 0; }
.hv-row--btn:hover, .hv-row--btn[aria-pressed="true"] { color: var(--bone); }
.hv-row--btn[aria-pressed="true"] { padding-left: 10px; box-shadow: inset 2px 0 0 var(--bone); }
.hv-code { padding: 8px 10px; border: 1px solid var(--card-edge); color: var(--bone); font-family: var(--font-mono); font-size: var(--t-label); overflow-wrap: anywhere; }
.hv-dial { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.hv-code--dial { padding: 3px 8px; font-family: var(--font-code); font-size: var(--t-small); letter-spacing: 0.02em; white-space: nowrap; }
/* The authenticator QR (E-F10): the server's image as sent (src/lib/qr.js), kept sharp and scannable. */
.hv-qr { display: block; width: 180px; height: 180px; margin-top: 12px; border: 1px solid var(--card-edge); image-rendering: pixelated; }

/* Week calendar (Diary): an hour column and seven day columns */
.hv-cal { --hv-top: 0%; display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--card-edge); border-left: 1px solid var(--card-edge); }
.hv-cal__hd { position: sticky; top: 0; z-index: 4; background: var(--card); padding: 8px; border-right: 1px solid var(--card-edge); border-bottom: 1px solid var(--card-edge); color: var(--ink-2); font-size: var(--t-label); }
.hv-cal__hd--today { color: var(--bone); box-shadow: inset 0 -2px 0 var(--bone); }
.hv-cal__hr { height: 40px; padding: 3px 6px; border-right: 1px solid var(--card-edge); border-bottom: 1px solid var(--card-edge); color: var(--text-mut); font-family: var(--font-mono); font-size: var(--t-label); }
.hv-cal__cell { position: relative; height: 40px; border-right: 1px solid var(--card-edge); border-bottom: 1px solid var(--row-edge); }
.hv-cal__cell--off { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bone) 2.5%, transparent) 0 6px, transparent 6px 12px); }
.hv-cal__bk {
    position: absolute; left: 3px; right: 3px; top: var(--hv-top); z-index: 2;
    overflow: hidden; padding: 3px 6px; border: 1px solid var(--edge-hi);
    background: color-mix(in srgb, var(--bone) 8%, transparent); color: var(--bone);
    font-size: var(--t-label); text-align: left; white-space: nowrap; text-overflow: ellipsis;
}
.hv-cal__bk:hover { border-color: var(--bone); }
.hv-cal__bk--new { border-color: var(--signal-edge); background: var(--signal-dim); }
.hv-cal__now { position: absolute; left: 0; right: 0; top: var(--hv-top); z-index: 3; border-top: 1px solid var(--signal); }

/* Kanban board: one column per stage */
.hv-board { display: grid; grid-auto-columns: minmax(220px, 1fr); grid-auto-flow: column; gap: 12px; overflow-x: auto; }
.hv-board__col { display: flex; flex-direction: column; min-height: 320px; border: 1px solid var(--card-edge); background: color-mix(in srgb, var(--void) 50%, transparent); }
.hv-board__col[data-over] { border-color: var(--edge-hi); background: color-mix(in srgb, var(--bone) 3%, transparent); }
.hv-board__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--row-edge); }
.hv-board__cards { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.hv-board__card { padding: 10px 12px; cursor: grab; }
.hv-board__card:active { cursor: grabbing; }

/* Upsell / locked rows */
.hv-lockrow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--row-edge); }
.hv-lockrow:first-child { border-top: 0; }

/* ══ 6b · Console: the same frame, always dark (data-theme="console"), denser; nothing scrolls inside a card ══ */

.hv-app--console { --hv-gut: 12px; }
.hv-app--console .hv-page .hv-panel--lit::before { content: none; }
.hv-app--console .hv-panel__head { padding: 20px 20px 0; }
.hv-app--console .hv-panel__body { padding: 12px 20px 20px; }
.hv-app--console .hv-panel__foot { padding: 10px 20px 12px; }
.hv-app--console .hv-pad { padding: 20px; }
.hv-app--console .hv-row { padding-top: 8px; padding-bottom: 8px; }
.hv-app--console .hv-table :is(td, th) { padding-top: 10px; padding-bottom: 10px; }
.hv-app--console .hv-slide { padding-bottom: 40px; }
.hv-app--console .hv-sh--page { margin-bottom: 12px; }

/* ══ 7 · Overlays: scrim, drawer, modal, popover, toast, tooltip, palette ══ */

.hv-scrim {
    position: fixed;
    inset: 0;
    z-index: var(--z-drawer);
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity calc(var(--dur) * 2) var(--ease);
}
.hv-scrim[data-open] { opacity: 1; pointer-events: auto; }

.hv-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-drawer) + 1);
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    border-left: 1px solid var(--glass-edge);
    background: var(--card);
    box-shadow: var(--e3);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform calc(var(--dur) * 2.6) var(--ease), visibility 0s linear calc(var(--dur) * 2.6);
}
.hv-drawer[data-open] { transform: none; visibility: visible; transition: transform calc(var(--dur) * 2.6) var(--ease); }
.hv-drawer__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--row-edge);
}
.hv-drawer__title,
.hv-modal__title {
    flex: 1;
    text-transform: none;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: var(--t-section);
    letter-spacing: -0.015em;
    line-height: var(--lh-5);
}
.hv-drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }

.hv-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    width: min(640px, calc(100% - 32px));
    max-height: calc(100% - 60px);
    border: 1px solid var(--glass-edge-hi);
    background: var(--card);
    box-shadow: var(--e3);
    transform: translate(-50%, -46%);
    opacity: 0;
    visibility: hidden;
    transition: transform calc(var(--dur) * 2.2) var(--ease), opacity calc(var(--dur) * 2) var(--ease), visibility 0s linear calc(var(--dur) * 2.2);
}
.hv-modal[data-open] {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
    transition: transform calc(var(--dur) * 2.2) var(--ease), opacity calc(var(--dur) * 2) var(--ease);
}
.hv-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.hv-modal__body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.hv-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--row-edge);
}

.hv-pop {
    position: absolute;
    z-index: var(--z-dropdown);
    display: none;
    min-width: 280px;
    padding: 6px 0;
    border: 1px solid var(--glass-edge-hi);
    background: var(--card);
    box-shadow: var(--e3);
}
.hv-pop[data-open] { display: block; }
.hv-pop__head { padding: 10px 14px; border-bottom: 1px solid var(--row-edge); }
/* A group's name in a menu (the account menu's Your account and Settings; More's pages and sections). */
.hv-pop__label { margin: 0; padding: 12px 14px 4px; color: var(--text-mut); font-size: var(--t-label); font-weight: 500; }
.hv-pop__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    color: var(--ink-2);
    font-size: var(--t-small);
    text-align: left;
}
.hv-pop__item:hover { color: var(--bone); }
.hv-pop__item svg { width: 16px; height: 16px; }
/* A setting inside a menu: its label, then the control (the account menu's Appearance). */
.hv-pop__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--row-edge);
    color: var(--ink-2);
    font-size: var(--t-small);
}
.hv-pop__row .hv-seg button { padding: 6px 10px; font-size: var(--t-label); }

.hv-toasts {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: calc(var(--z-modal) + 10);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}
.hv-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--glass-edge-hi);
    background: var(--card);
    box-shadow: var(--e3);
    font-size: var(--t-small);
}
.hv-toast--bad { border-color: var(--danger-edge); }

.hv-tip {
    position: fixed;
    z-index: calc(var(--z-modal) + 20);
    max-width: 260px;
    padding: 8px 10px;
    border: 1px solid var(--glass-edge-hi);
    background: var(--card);
    box-shadow: var(--e3);
    font-size: var(--t-small);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur);
}
.hv-tip[data-open] { opacity: 1; }
.hv-tip b { font-family: var(--font-mono); font-weight: 500; }

.hv-cmdk {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    background: rgba(0, 0, 0, 0.55);
}
.hv-cmdk[data-open] { display: flex; }
.hv-cmdk__box {
    width: min(620px, calc(100% - 24px));
    border: 1px solid var(--glass-edge-hi);
    background: var(--card);
    box-shadow: var(--e3);
}
.hv-cmdk__input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 0;
    border-bottom: 1px solid var(--row-edge);
    background: transparent;
    color: var(--bone);
    font: inherit;
    font-size: var(--t-title);
}
.hv-cmdk__res { max-height: 360px; overflow: auto; margin: 0; padding: 6px; list-style: none; }
.hv-cmdk__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.hv-cmdk__item[aria-selected="true"] { background: color-mix(in srgb, var(--bone) 6%, transparent); }
.hv-cmdk__k { margin-left: auto; }

/* The keyboard sheet (core/keys.js) */
.hv-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: var(--t-small); }
.hv-keys dd { margin: 0; color: var(--ink-2); }
.hv-keys kbd { margin-right: 4px; padding: 1px 6px; border: 1px solid var(--card-edge); font-family: var(--font-mono); font-size: var(--t-label); }

/* ══ 8 · States: empty, loading, error; preview badge; build tags ══════ */

.hv-state { padding: 40px 20px; color: var(--ink-2); text-align: center; }
.hv-state__title { margin: 0 0 6px; color: var(--bone); font-weight: 600; }
.hv-state--empty { border: 1px dashed var(--card-edge); }
.hv-state--empty > p { margin-left: auto; margin-right: auto; }
.hv-state--error { border: 1px solid var(--danger-edge); background: var(--danger-dim); text-align: left; }
.hv-state--loading { display: grid; gap: 10px; text-align: left; }
.hv-skel {
    display: block;
    height: 12px;
    background: linear-gradient(90deg, var(--card-hi), var(--card-edge), var(--card-hi));
    background-size: 200% 100%;
    animation: hv-skel 1.4s linear infinite;
}
.hv-skel--short { width: 40%; }
.hv-skel--mid { width: 70%; }
@keyframes hv-skel { to { background-position: -200% 0; } }

.hv-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid var(--warn-edge);
    background: var(--warn-dim);
    color: var(--bone);
    font-size: var(--t-label);
    white-space: nowrap;
}
.hv-preview-badge__by { color: var(--ink-2); }

/* Build tag: Live / F-prompt / Premium build / Layout */
.hv-srcs { display: flex; flex-wrap: wrap; gap: 6px; margin: -10px 0 16px; }
.hv-src {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 8px;
    border: 1px dashed var(--card-edge);
    color: var(--bone);
    font-size: var(--t-label);
}
.hv-src__what { color: var(--ink-2); font-size: var(--t-small); }
.hv-src--live { border-color: var(--edge-hi); }
.hv-src--f { border-color: var(--signal-edge); }
.hv-src--p { border-style: solid; border-color: var(--warn); }
.hv-src--ui { border-color: var(--warn-edge); }

/* ══ 9 · Notices, whispers, photo-card matches ═════════════════════════ */

.hv-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--card-edge);
    background: color-mix(in srgb, var(--bone) 2.5%, transparent);
    color: var(--ink-2);
    font-size: var(--t-small);
}
.hv-notice b { color: var(--bone); }
.hv-notice--warn { border-color: var(--warn-edge); }
.hv-notice--ok { border-color: var(--signal-edge); }
.hv-notice--bad { border-color: var(--danger-edge); }
.hv-notice > p { flex: 1; margin: 0; }

/* Transfer whisper: what the salesperson heard before connecting */
.hv-whisper { margin-top: 8px; padding: 10px 12px; border-left: 2px solid var(--signal); background: var(--signal-dim); }
.hv-whisper--missed { border-left-color: var(--warn); background: var(--warn-dim); }

/* Photo-card match: tile + name + km + "listing link". Never a price.
   The tile is an <img> slot on a neutral plate; never a remote URL. */
.hv-matches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hv-match { display: flex; flex-direction: column; gap: 4px; width: 150px; padding: 6px; border: 1px solid var(--card-edge); }
.hv-match__tile {
    display: grid;
    place-items: center;
    width: 100%;
    height: 70px;
    border: 1px solid var(--card-edge);
    background: linear-gradient(135deg, var(--card-hi), var(--card));
    color: var(--ink-2);
    font-size: var(--t-label);
    object-fit: cover;
}
.hv-match__name { font-size: var(--t-small); font-weight: 600; }
.hv-match__km { color: var(--ink-2); font-family: var(--font-mono); font-size: var(--t-label); }
.hv-match__link { color: var(--bone); font-size: var(--t-label); }

/* ══ 9c · Home: the headline card and the figure grid (D18) ═══════════ */

.hv-hl__t {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: var(--t-display);
    letter-spacing: -0.025em;
    line-height: 1.05;
    text-wrap: balance;
}
.hv-hl__t small { display: block; margin-bottom: 8px; color: var(--ink-2); font-family: var(--font-body); font-weight: 500; font-stretch: 100%; font-size: var(--t-title); letter-spacing: 0; }
.hv-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--row-edge); background: var(--row-edge); }
.hv-fig { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--card); color: inherit; text-decoration: none; }
.hv-fig__v { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: var(--t-figure); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
/* An incomplete last line spreads across. */
.hv-figs > :last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.hv-figs > :last-child:nth-child(3n + 2) { grid-column: span 2; }

/* ══ 9d · The layout pass (core/layout.js): a line of cards ends on one edge ══ */

.hv-grid--measure { align-items: start; }
.hv-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hv-gut); }
.hv-joined { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border: 1px solid var(--glass-edge); background-color: var(--card); }
.hv-joined > .hv-panel { border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hv-joined > .hv-panel + .hv-panel { border-left: 1px solid var(--row-edge); }

/* ══ 9e · Motion: one entrance per card container, never replayed (D18) ══ */

@keyframes hv-fade { from { opacity: 0; } }
.hv-async--in { animation: hv-fade 160ms var(--ease) both; }
/* The arrival (the mockup's Tactile lk-in): on a page change, for 1.1 s. */
@keyframes hv-lk-card { 0% { opacity: 0; transform: scale(0.96); } 70% { opacity: 1; transform: scale(1.005); } 100% { opacity: 1; transform: none; } }
@keyframes hv-lk-grow { from { transform: scaleY(0); } }
@keyframes hv-lk-fill { from { transform: scaleX(0); } }
.hv-lk-in .hv-panel { animation: hv-lk-card 380ms cubic-bezier(0.34, 1.3, 0.64, 1) both; animation-delay: calc(var(--hv-i) * 45ms); }
.hv-lk-in .hv-panel .hv-panel { animation: none; }
.hv-lk-in .hv-bars__bar { transform-origin: bottom; animation: hv-lk-grow 600ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(120ms + var(--hv-i) * 30ms); }
.hv-lk-in .hv-meter__fill { transform-origin: left; animation: hv-lk-fill 700ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 160ms; }

/* ══ 9f · Phones: the lead drawer, labelled rows, swiping boards ══ */

.hv-board-hint { display: none; }

/* ══ 10 · Dev gallery (views/hub/gallery.ejs, never in production) ═════ */

.hv-gallery { padding: calc(var(--hv-gut) * 3) var(--hv-gut) calc(var(--hv-gut) * 6); background: var(--sheet); }
.hv-gallery__item { margin-top: 40px; }
.hv-gallery__h {
    margin: 0 0 14px;
    color: var(--ink-2);
    font-size: var(--t-small);
    font-weight: 500;
}
.hv-gallery__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* Overlays are shown open, in place, inside a stage box */
.hv-gallery__stage {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px dashed var(--card-edge);
}
.hv-gallery__stage > .hv-drawer,
.hv-gallery__stage > .hv-modal,
.hv-gallery__stage > .hv-pop,
.hv-gallery__stage > .hv-toasts,
.hv-gallery__stage > .hv-tip,
.hv-gallery__stage > .hv-cmdk,
.hv-gallery__stage > .hv-scrim,
.hv-gallery__stage > .hv-frame { position: absolute; }
.hv-gallery__stage > .hv-tip { left: 20px; top: 20px; }
.hv-gallery__stage > .hv-pop { left: 20px; top: 20px; }
.hv-gallery__stage--tall { min-height: 560px; }

/* ══ 11 · Width: desktop-first, nothing breaks at 390px ═══════════════ */

@media (max-width: 900px) {
    .hv-sh { grid-template-columns: 1fr; gap: 12px; }
    .hv-set { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .hv-hint { flex-direction: column; align-items: flex-start; gap: 8px; }
    .hv-sh__acts { justify-content: flex-start; }
}
@media (max-width: 720px) {
    .hv-wrap { padding: 0 var(--hv-gut); }
    .hv-grid > * { grid-column: 1 / -1; }
    .hv-frow,
    .hv-kv { grid-template-columns: 1fr; }
    .hv-ph { padding: 22px 16px 4px; }
    .hv-status { padding-right: var(--hv-gut); padding-left: var(--hv-gut); }
    .hv-ph + .hv-status > .hv-fresh { top: 28px; right: var(--hv-gut); }
    .hv-slide { padding-bottom: 40px; }
    .hv-sh--page { align-items: flex-start; }
    .hv-drawer { width: 100%; }
    /* A head's meta and a foot's note + buttons take their own line rather
       than squeeze the title into a column or push a button out of the panel
       (the operator sign-in's code stage at 390px). */
    .hv-panel__head,
    .hv-panel__foot { flex-wrap: wrap; }
}
@media (max-width: 820px) {
    .hv-lead-detail { display: none; }
    .hv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .hv-table :is(tbody, tr, td) { display: block; }
    .hv-table tr { padding: 8px 0; border-bottom: 1px solid var(--row-edge); }
    .hv-table td { display: flex; gap: 12px; justify-content: space-between; padding: 4px 0; border: 0; text-align: right; }
    .hv-table td[data-label]::before { content: attr(data-label); color: var(--ink-2); font-size: var(--t-label); text-align: left; }
    .hv-board { scroll-snap-type: x mandatory; grid-auto-columns: 82%; }
    .hv-board__col { scroll-snap-align: start; }
    .hv-board-hint { display: block; margin-bottom: 8px; color: var(--ink-2); font-size: var(--t-small); }
    .hv-grid > .hv-stat { grid-column: span 6; }
    .hv-grid > .hv-stat:nth-child(odd of .hv-stat):nth-last-child(1 of .hv-stat) { grid-column: 1 / -1; }
    .hv-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hv-figs > :last-child:is(:nth-child(3n + 1), :nth-child(3n + 2)) { grid-column: auto; }
    .hv-figs > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .hv-modal { width: 100%; max-height: 100%; height: 100%; }
    .hv-matches { flex-direction: column; }
    .hv-match { width: 100%; }
}

/* ══ 11b · Phones: iOS zooms into a field under 16px and does not zoom back; a thumb needs 44 x 44 ══ */

@media (max-width: 639.98px) {
    .hv-app :is(input:not([type=checkbox], [type=radio]), select, textarea) { font-size: var(--t-touch); }
    .hv-app :is(.hv-field, .hv-btn, .hv-chip, .hv-switch, .hv-search, .hv-acct, .hv-icon-btn, .hv-ws, .hv-av--btn,
        .hv-tab, .hv-skip, .hv-seg button, button.hv-link, a.hv-link, select) {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ══ 11c · Tactile (2026-11 redesign): rounded, extruded surfaces on a warm canvas; the rail is a dark capsule ══ */

.hv-app {
    --hv-r: 24px;
    --hv-r-m: 14px;
    --hv-r-s: 10px;
    --hv-r-p: 999px;
}
.hv-frame { background: var(--canvas) var(--canvas-bg); }
.hv-sheet {
    margin: 12px 14px 12px 0;
    border-color: var(--sheet-edge);
    border-radius: calc(var(--hv-r) + 8px);
    background: var(--sheet) var(--sheet-bg);
    box-shadow: var(--sheet-sh);
}
.hv-rail {
    margin: 12px;
    border-radius: 28px;
    background: var(--rail-b) linear-gradient(180deg, var(--rail-a), var(--rail-b));
    box-shadow: var(--rail-sh);
    color: var(--chrome-ink);
}
.hv-rail :is(.hv-rail__link, .hv-ws__sub, .hv-acct__sub) { color: var(--chrome-item); }
.hv-rail .hv-rail__link:hover { background: var(--chrome-tint); color: var(--chrome-hover); }
.hv-rail .hv-rail__gl { color: var(--chrome-group); }
.hv-rail .hv-rail__sec { color: var(--chrome-sec); }
.hv-rail .hv-rail__sec:hover { background: var(--chrome-tint-2); color: var(--chrome-hover); }
.hv-rail .hv-rail__secs { border-left-color: var(--chrome-tint); }
.hv-rail .hv-rail__group + .hv-rail__group { margin-top: 5px; padding-top: 8px; border-top: 1px solid var(--chrome-rule); }
.hv-agent { background: var(--chrome-b) linear-gradient(180deg, var(--rail-a), var(--rail-b)); box-shadow: var(--agent-sh); }
.hv-agent__d { color: var(--chrome-sec); }
.hv-frame--col { --hv-rail-w: 84px; }
.hv-rail__link,
.hv-rail__sec { border-radius: var(--hv-r-p); }
.hv-rail__link[aria-current="page"],
.hv-dock__btn[aria-current="true"] {
    background: var(--pill-2) linear-gradient(180deg, var(--pill), var(--pill-2));
    box-shadow: inset 0 1px 0 var(--pill), 0 3px 8px rgba(0, 0, 0, 0.35);
    color: var(--pill-ink);
}
.hv-rail .hv-rail__link[aria-current="page"] { color: var(--pill-ink); }
.hv-rail__link[aria-current="page"] :is(.hv-rail__count, svg) { color: var(--pill-icon); }
.hv-dock__btn[aria-current="true"] { box-shadow: inset 0 1px 0 var(--pill), 0 2px 6px rgba(0, 0, 0, 0.35); }
.hv-rail .hv-rail__sec[aria-current="true"] { box-shadow: inset 2px 0 0 var(--sec-on); background: var(--chrome-tint-2); color: var(--chrome-hover); }
.hv-rail__foot { border-top-color: var(--chrome-rule); }
.hv-agent { border-radius: var(--hv-r-m); }
.hv-ws__mark,
.hv-av,
.hv-icon-btn { border-radius: 50%; }
.hv-search { border-color: var(--search-edge); border-radius: var(--hv-r-p); background: var(--search-well); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5); color: var(--search-ink); }
.hv-search svg { color: var(--search-icon); }
.hv-search__kbd { border-radius: 6px; background: var(--chrome-tint); color: var(--search-kbd); }
:is(.hv-cap, .hv-rail) :is(.hv-av, .hv-icon-btn), .hv-cap .hv-rail__col { background: var(--pill-2) linear-gradient(180deg, var(--pill), var(--pill-2)); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--pill); color: var(--pill-ink); }
.hv-icon-btn__dot,
.hv-live { border-radius: 50%; }

.hv-panel { border-color: var(--card-edge); border-radius: var(--hv-r); background: var(--card-flat) var(--panel-bg); overflow: clip; }
:is(.hv-panel .hv-panel, .hv-kv) { background: var(--panel-nest); }
.hv-stat {
    border-color: var(--tile-edge);
    background: var(--tile-b) linear-gradient(180deg, var(--tile-a), var(--tile-b));
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.hv-app .hv-stat:hover { transform: translateY(-1px); border-color: var(--tile-edge); box-shadow: var(--e2); background: var(--tile-hi-b) linear-gradient(180deg, var(--tile-hi-a), var(--tile-hi-b)); }
.hv-app a.hv-stat:active { transform: translateY(1px); box-shadow: var(--sunk); }
.hv-fig { background: var(--tile-b) linear-gradient(180deg, var(--tile-a), var(--tile-b)); }
/* The mockup's strip6: the heading on the sheet, each figure its own extruded tile, 14px apart. */
.hv-panel--strip { border-color: transparent; background: none; box-shadow: none; overflow: visible; }
.hv-panel--strip > .hv-panel__head { padding-left: 4px; padding-right: 4px; }
.hv-panel--strip > .hv-panel__body { padding: 0; }
.hv-panel--strip .hv-figs { gap: 14px; border: 0; background: none; }
.hv-panel--strip .hv-fig {
    padding: 18px 20px;
    border: 1px solid var(--tile-edge);
    border-radius: var(--hv-r);
    box-shadow: var(--e1);
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.hv-panel--strip .hv-fig:hover { transform: translateY(-1px); box-shadow: var(--e2); background: var(--tile-hi-b) linear-gradient(180deg, var(--tile-hi-a), var(--tile-hi-b)); }
.hv-panel--strip .hv-fig:active { transform: translateY(1px); box-shadow: var(--sunk); }

/* The display face, condensed as on the sign-in (the mockup's .ph h1, .hl-t, .h2 and figures: Hubot 75%, 700). */
.hv-ph { font-weight: 700; font-stretch: 75%; font-size: var(--t-hero); letter-spacing: -0.015em; line-height: 0.95; }
.hv-hl__t { font-weight: 700; font-stretch: 75%; letter-spacing: -0.012em; line-height: 0.95; }
:is(.hv-drawer__title, .hv-modal__title) { font-family: var(--font-display); font-weight: 700; font-stretch: 75%; letter-spacing: -0.01em; }
:is(.hv-stat__v, .hv-fig__v, .hv-hero-v) { font-weight: 700; font-stretch: 75%; letter-spacing: -0.01em; }
.hv-panel.hv-hl {
    border-color: var(--hl-edge);
    background: var(--hl-b) linear-gradient(160deg, var(--hl-a) 0%, var(--hl-b) 52%, var(--hl-c) 100%);
    box-shadow: var(--hl-sh);
    color-scheme: dark;
    color: var(--hl-ink);
}
.hv-hl .hv-btn--secondary { border-color: var(--hl-btn-edge); background: var(--hl-btn); box-shadow: var(--hl-btn-sh); color: var(--hl-ink); }
.hv-hl .hv-btn--secondary:hover { background: var(--hl-btn-hi); }
.hv-app a.hv-panel:hover { border-color: var(--card-edge); }
.hv-panel--upsell { border-color: var(--edge-hi); }
.hv-panel--lit::before { left: 0; right: 0; top: 0; background: var(--go); }

.hv-btn { border-radius: var(--hv-r-p); }
.hv-btn--primary {
    border-color: var(--go-edge);
    background: var(--go-2) linear-gradient(180deg, var(--go), var(--go-2));
    color: var(--on-go);
    box-shadow: var(--go-sh);
}
.hv-btn--secondary {
    border-color: var(--btn-s-edge);
    background: var(--raise-2) linear-gradient(180deg, var(--raise), var(--raise-2));
    box-shadow: var(--btn-s-sh);
    color: var(--bone);
}
.hv-btn--secondary:hover { border-color: var(--edge-hi); }
.hv-app .hv-btn:not(:disabled):active { box-shadow: var(--press); }

.hv-field { border-color: var(--edge-control); border-radius: var(--hv-r-m); background: var(--field); }
textarea.hv-field { border-radius: var(--hv-r-m); }
.hv-otp .hv-field { border-radius: var(--hv-r-m); }
.hv-seg { padding: 3px; gap: 2px; border-color: transparent; border-radius: var(--hv-r-p); background: var(--seg-track); box-shadow: var(--seg-sh); }
.hv-seg button { border-radius: var(--hv-r-p); }
.hv-seg button:is([aria-pressed="true"], [aria-checked="true"]) {
    border: 1px solid var(--thumb-edge);
    background: var(--thumb-b) linear-gradient(180deg, var(--thumb-a), var(--thumb-b));
    box-shadow: var(--thumb-sh);
}
.hv-chip,
.hv-tag { border-radius: var(--hv-r-p); }
.hv-chip { background: var(--chip-bg); }
.hv-chip[aria-pressed="true"] { border-color: var(--chip-on); background: var(--chip-on); box-shadow: var(--chip-on-sh); color: var(--chip-on-ink); }
.hv-chip[aria-pressed="true"] .hv-chip__n { color: var(--chip-on-n); }
.hv-switch { border-color: var(--sw-edge); border-radius: var(--hv-r-p); background: var(--sw-track); box-shadow: var(--sw-track-sh); }
.hv-switch::after { border-radius: 50%; background: var(--sw-knob-b) linear-gradient(180deg, var(--sw-knob-a), var(--sw-knob-b)); box-shadow: var(--sw-knob-sh); }
.hv-switch[aria-checked="true"] { border-color: var(--sw-on-a); background: var(--sw-on-a) linear-gradient(180deg, var(--sw-on-a), var(--sw-on-b)); box-shadow: var(--sw-on-sh); }
.hv-switch[aria-checked="true"]::after { background: var(--sw-knob-b) linear-gradient(180deg, var(--sw-knob-a), var(--sw-knob-b)); }
.hv-meter { height: 8px; border: 0; border-radius: var(--hv-r-p); background: var(--meter-track); box-shadow: var(--meter-sh); }
.hv-meter__fill { border-radius: var(--hv-r-p); background: var(--go-fill) linear-gradient(180deg, var(--go), var(--go-fill)); box-shadow: var(--meter-fill-sh); }
.hv-bars__bar { background: var(--bar-b) linear-gradient(180deg, var(--bar-a), var(--bar-b)); }
.hv-bars__col:hover .hv-bars__bar { background: var(--bar-a); }
:is(.hv-notice, .hv-code, .hv-kv, .hv-state, .hv-board__col, .hv-board__card, .hv-cal, .hv-wz-step, .hv-wz-plan, .hv-wz-sim, .hv-match__tile) { border-radius: var(--hv-r-m); }
:is(.hv-drawer, .hv-modal, .hv-pop, .hv-cmdk__box) { border-radius: var(--hv-r); }
:is(.hv-toast, .hv-tip, .hv-tbar) { border-radius: var(--hv-r-m); }

/* ══ 11e · The Tactile rail (the mockup's .srail, open and .rail-col), desktop with the top capsule ══ */
@media (min-width: 821px) {
    .hv-frame:has(> .hv-cap:not(:empty)) { --hv-rail-w: 262px; transition: grid-template-columns 450ms cubic-bezier(0.22, 1, 0.36, 1); }
    .hv-frame--col:has(> .hv-cap:not(:empty)) { --hv-rail-w: 84px; }
    .hv-frame:has(> .hv-cap:not(:empty)) > .hv-rail {
        gap: 14px;
        margin: 12px;
        overflow: visible;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }
    /* The business and the plan are on the capsule's account button. */
    .hv-frame:has(> .hv-cap:not(:empty)) > .hv-rail > :is(.hv-rail__head, .hv-planchip, .hv-rail__tools) { display: none; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__nav {
        flex: 0 1 auto;
        min-height: 0;
        padding: 14px 10px 12px;
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 28px;
        background: var(--rail-b) linear-gradient(180deg, var(--rail-a), var(--rail-b));
        box-shadow: var(--rail-sh);
        scrollbar-width: none;
    }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__group { margin: 0 0 6px; padding: 0; border: 0; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__group + .hv-rail__group { margin-top: 0; padding-top: 8px; border-top: 1px solid var(--chrome-rule); }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__gl { padding: 4px 14px 6px; color: var(--chrome-group); font-size: var(--t-label); font-weight: 600; letter-spacing: 0.04em; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__link { gap: 12px; height: 42px; padding: 0 14px; border-radius: var(--hv-r-p); font-size: var(--t-body); font-weight: 500; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__link svg { width: 18px; height: 18px; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__count {
        display: inline-grid;
        place-items: center;
        min-width: 17px;
        height: 17px;
        margin-left: auto;
        padding: 0 5px;
        border-radius: var(--hv-r-p);
        background: var(--go);
        color: var(--on-go);
        font-family: var(--font-body);
        font-size: var(--t-label);
        font-weight: 600;
        line-height: 1;
    }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__secs { margin: 4px 0 8px 26px; border-left: 1px solid var(--chrome-tint); }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__sec { min-height: 32px; padding: 5px 10px 5px 14px; border-radius: 0 var(--hv-r-p) var(--hv-r-p) 0; font-size: var(--t-small); font-weight: 500; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__foot { gap: 0; padding: 0; border-top: 0; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-agent { padding: 14px 16px; border-radius: 22px; color: var(--chrome-ink); }
    /* The agent's capsule stands on the canvas, so its ring is drawn in the canvas's ink. */
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-agent:focus-visible { outline-color: var(--focus-canvas); }

    /* The menu's own toggle: "‹ Close menu" across the open menu, a round › on the collapsed one. */
    .hv-rail__tog {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        height: 44px;
        margin: 0 0 8px;
        padding: 0 14px;
        border-radius: var(--hv-r-p);
        background: var(--chrome-tint);
        color: var(--chrome-ink);
        font-size: var(--t-small);
        font-weight: 500;
        white-space: nowrap;
        transition: background-color 160ms ease;
    }
    .hv-rail__tog:hover { background: var(--chrome-tint-2); }
    .hv-rail__tog svg { flex: none; width: 18px; height: 18px; }

    /* Collapsed: a 60 px icon capsule level with the sheet, count badges on the icons, the agent's orb as its own capsule. */
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__nav { width: 60px; margin: 0 auto; padding: 12px 8px; border-radius: var(--hv-r-p); }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__tog { justify-content: center; width: 44px; margin: 0 auto 8px; padding: 0; border-radius: 50%; }
    .hv-frame--col .hv-rail__tog-l { display: none; }
    .hv-frame--col .hv-rail__tog svg { transform: rotate(180deg); }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__group { margin: 0; }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__group + .hv-rail__group { margin-top: 8px; padding-top: 8px; }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__link { width: 44px; height: 44px; margin: 2px auto; padding: 0; border-radius: 50%; }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__count { position: absolute; top: 2px; right: 0; margin: 0; }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent { display: grid; grid-template-columns: auto; place-items: center; width: 60px; min-height: 52px; margin: 0 auto; padding: 0; border-radius: var(--hv-r-p); }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent > :not(.hv-orb) { display: none; }
    .hv-frame--col:has(> .hv-cap:not(:empty)) .hv-orb { grid-row: auto; }

    /* Open and close (Moe: slower and smoother than the mockup's 320 ms): the width moves 450 ms; the words fade out first
       (120 ms) and back in once it has settled (180 ms after 200 ms); the chevrons turn with it. */
    .hv-rail :is(.hv-rail__label, .hv-rail__gl, .hv-rail__secs, .hv-rail__count, .hv-rail__tog-l, .hv-agent__t, .hv-agent__d) { transition: opacity 120ms ease; }
    .hv-frame--fade .hv-rail :is(.hv-rail__label, .hv-rail__gl, .hv-rail__secs, .hv-rail__count, .hv-rail__tog-l, .hv-agent__t, .hv-agent__d) { opacity: 0; }
    .hv-frame--anim:not(.hv-frame--col) .hv-rail :is(.hv-rail__label, .hv-rail__gl, .hv-rail__secs, .hv-rail__count, .hv-rail__tog-l, .hv-agent__t, .hv-agent__d) { animation: hv-fade 180ms ease 200ms both; }
    .hv-frame--anim :is(.hv-rail__col, .hv-rail__tog) svg { animation: hv-chev-open 450ms cubic-bezier(0.22, 1, 0.36, 1) both; }
    .hv-frame--anim.hv-frame--col :is(.hv-rail__col, .hv-rail__tog) svg { animation-name: hv-chev-close; }
    .hv-rail__link, .hv-agent { white-space: nowrap; }
}
/* A shorter screen (the mockup is drawn at 900): the open menu packs tighter before core/frame.js has to collapse it. */
@media (min-width: 821px) and (max-height: 860px) {
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__nav { padding: 10px 8px 8px; }
    .hv-frame:has(> .hv-cap:not(:empty)):not(.hv-frame--col) .hv-rail__tog { height: 36px; margin-bottom: 4px; }

    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__gl { padding: 2px 14px 4px; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__group { margin-bottom: 4px; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__group + .hv-rail__group { padding-top: 6px; }
    .hv-frame:has(> .hv-cap:not(:empty)) .hv-rail__secs { margin: 2px 0 4px 26px; }
    .hv-frame:has(> .hv-cap:not(:empty)):not(.hv-frame--col) .hv-agent { padding: 10px 14px; }
}
/* Phase 1: the mockup's 42px items while the open menu fits; frame.js packs them (--tight) before it folds the menu. */
.hv-frame--tight:has(> .hv-cap:not(:empty)):not(.hv-frame--col) .hv-rail__link { height: 34px; }
.hv-frame--tight:has(> .hv-cap:not(:empty)) .hv-rail__sec { min-height: 26px; padding-top: 3px; padding-bottom: 3px; }
@keyframes hv-chev-open { from { transform: rotate(180deg); } to { transform: rotate(0deg); } }
@keyframes hv-chev-close { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }

/* The top capsule (desktop): the menu toggle, the Hub mark, search, the bell and the account, above the sheet. */
.hv-cap {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 52px;
    margin: 12px 14px 0 0;
    padding: 0 8px;
    border-radius: var(--hv-r-p);
    background: var(--chrome-b) linear-gradient(180deg, var(--chrome-a), var(--chrome-b));
    box-shadow: var(--chrome-sh);
    color-scheme: dark;
    color: var(--chrome-ink);
}
.hv-cap:empty { display: none; }
@media (min-width: 821px) {
    .hv-frame:has(> .hv-cap:not(:empty)) { grid-template-rows: auto minmax(0, 1fr); }
    .hv-frame:has(> .hv-cap:not(:empty)) > :is(.hv-rail, .hv-sheet) { grid-row: 2; }
}
.hv-cap__brand { display: flex; flex: none; }
/* Phase 1: STRATA AUTOMATION HUB, the last word lighter and no rule between (the mockup's brand). */
.hv-cap__brand .hv-lockup__sub { margin-left: 0.4em; padding-left: 0; border-left: 0; font-weight: 500; }
.hv-ws__plan { overflow: hidden; color: var(--ink-2); font-size: var(--t-label); white-space: nowrap; text-overflow: ellipsis; }
.hv-pop__head--who { display: flex; align-items: center; gap: 12px; }
.hv-cap .hv-rail__col { width: 40px; height: 40px; border-radius: 50%; }
.hv-cap .hv-search,
.hv-frame--col .hv-cap .hv-search { flex: 0 1 440px; justify-content: flex-start; width: auto; min-width: 180px; height: 40px; margin: 0 auto; padding: 0 14px; }
.hv-frame--col .hv-cap :is(.hv-search > span, .hv-search__kbd) { display: inline; }
.hv-cap .hv-acct { flex: none; width: auto; max-width: 240px; padding: 4px 8px 4px 4px; border-radius: var(--hv-r-p); }
.hv-frame--col .hv-cap .hv-acct__name { display: block; }
.hv-frame--col :is(.hv-cap, .hv-mtop) .hv-ws__t { display: flex; }
.hv-frame--col .hv-cap .hv-acct > svg { display: inline; }

/* ══ 11f · Final Hub revision, PR A (24 Nov mockup): the top bar spans the frame; the sidebar is docked under it, full height, ══
   and holds the account, the plan, the pages with their sections, the agent card, Settings and Sign out. Desktop only. */
@media (min-width: 821px) {
    .hv-frame--side:has(> .hv-cap:not(:empty)) { --hv-rail-w: 262px; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) { --hv-rail-w: 76px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-cap { grid-column: 1 / -1; margin: 12px 12px 10px; padding: 0 10px 0 18px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-cap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 440px) minmax(0, 1fr); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-cap .hv-search { width: 100%; margin: 0; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-cap .hv-icon-btn { justify-self: end; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-sheet { margin: 0 12px 12px 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-rail {
        gap: 0;
        margin: 0 0 12px 12px;
        padding: 10px;
        overflow: hidden;
        border-radius: 32px 0 0 32px;
        background: var(--rail-b) linear-gradient(180deg, var(--rail-a), var(--rail-b));
        box-shadow: var(--rail-sh);
        color-scheme: dark;
    }
    .hv-frame--side:has(> .hv-cap:not(:empty)) > .hv-rail > .hv-rail__head { display: flex; flex: none; align-items: center; gap: 6px; height: auto; padding: 0 0 6px; border: 0; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__nav { flex: 1 1 auto; min-height: 0; padding: 4px 0; overflow-y: auto; border-radius: 0; background: none; box-shadow: none; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__group + .hv-rail__group { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--chrome-rule); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__gl { display: none; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__link { gap: 11px; height: 36px; margin: 0; padding: 0 10px 0 5px; border-radius: 13px; font-size: var(--t-small); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__link[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--chrome-tint-2); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__ch { display: grid; flex: none; place-items: center; width: 16px; margin-left: auto; color: var(--chrome-group); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__count + .hv-rail__ch { margin-left: 6px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__ch svg { transform: rotate(180deg); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__link[aria-current="page"] .hv-rail__ch svg { transform: rotate(270deg); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__link[aria-current="page"] .hv-rail__ch { color: var(--chrome-hover); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__secs { margin: 1px 0 3px 17px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__sec { min-height: 28px; padding: 3px 10px 3px 16px; border-radius: 9px; }

    /* The account: avatar (with the online dot), the business, a ▾; the toggle beside it. */
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-acct { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; height: 46px; padding: 0 6px 0 2px; border-radius: 16px; color: var(--chrome-ink); text-align: left; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-acct:hover { background: var(--chrome-tint); }
    .hv-av--on { position: relative; }
    .hv-av--on::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 2.5px var(--rail-a); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-acct__name { display: -webkit-box; flex: 1 1 auto; min-width: 0; overflow: hidden; font-weight: 600; line-height: 1.2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .hv-acct__ch { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--chrome-tint); color: var(--chrome-item); }
    .hv-acct__ch svg { transform: rotate(-90deg); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-acct[aria-expanded="true"] .hv-acct__ch svg { transform: rotate(90deg); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-rail__col { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1px solid var(--chrome-rule); border-radius: 11px; background: var(--chrome-tint); color: var(--chrome-item); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-rail__col:hover { background: var(--chrome-tint-2); color: var(--chrome-hover); }

    /* The plan: a tile, "Plan:" and the plan's pill. */
    .hv-planrow { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 3px; padding: 5px 4px; border-top: 1px solid var(--chrome-rule); border-bottom: 1px solid var(--chrome-rule); }
    .hv-planrow__i { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--go-2) linear-gradient(160deg, var(--go), var(--go-2)); color: var(--on-go); }
    .hv-planrow__t { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .hv-planrow__t em { color: var(--chrome-item); font-style: normal; font-size: var(--t-small); }
    .hv-planrow__pill { padding: 5px 9px 4px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-size: var(--t-label); font-weight: 700; letter-spacing: 0.1em; line-height: 1; text-transform: uppercase; }
    .hv-planrow__trial { flex-basis: 100%; padding-left: 42px; color: var(--chrome-group); font-size: var(--t-label); }

    /* The agent card: "Live now", the name large, today's calls; the orb on a dark panel with "Open agent". */
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__foot { flex: none; align-items: stretch; gap: 0; padding: 0; border: 0; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent { display: grid; grid-template-columns: 54% 1fr; width: 100%; height: 86px; margin: 5px 0; padding: 0; overflow: hidden; border-radius: 16px; background: var(--chrome-b); color: var(--pill-ink); box-shadow: inset 0 0 0 1px var(--chrome-tint-2); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent > * { grid-row: 1; grid-column: auto; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent:focus-visible { outline-color: var(--focus-frame); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent__t { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 0 4px 0 13px; background: var(--pill-2) linear-gradient(170deg, var(--pill), var(--pill-2)); }
    .hv-agent__k { display: flex; align-items: center; gap: 5px; color: var(--pill-ink); font-size: var(--t-label); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; opacity: 0.7; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent__k .hv-agent__st { margin: 0; padding: 0; background: none; color: inherit; font: inherit; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent .hv-agent__n { font-size: var(--t-figure); }
    .hv-agent__n { overflow: hidden; font-family: var(--font-display); font-size: var(--t-figure); font-weight: 800; font-stretch: 75%; line-height: 0.95; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent .hv-agent__d { color: var(--pill-ink); font-size: var(--t-label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
    .hv-agent__orb { position: relative; display: grid; place-items: center; background: radial-gradient(90% 80% at 55% 45%, var(--signal-dim), transparent 62%), linear-gradient(160deg, var(--chrome-a), var(--chrome-b)); }
    .hv-agent__go svg { transform: rotate(180deg); }
    .hv-agent__go { position: absolute; right: 10px; bottom: 8px; display: flex; align-items: center; gap: 2px; color: var(--chrome-item); font-size: var(--t-label); font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; }

    /* Settings and Sign out. */
    .hv-foot-row { display: flex; flex: none; flex-direction: column; padding-top: 6px; border-top: 1px solid var(--chrome-rule); }
    .hv-foot { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px 0 5px; border-radius: 14px; color: var(--chrome-item); font-size: var(--t-small); text-align: left; transition: background-color 160ms ease, color 160ms ease; }
    .hv-foot:hover { background: var(--chrome-tint); color: var(--chrome-hover); }
    .hv-foot[aria-current="page"] { background: var(--chrome-tint); color: var(--chrome-hover); box-shadow: inset 0 0 0 1px var(--chrome-tint-2); }
    .hv-foot--out:hover { color: var(--danger); }

    /* Collapsed (76 px): icons only, counts on the icons, the orb for the card. */
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) > .hv-rail { padding: 12px 6px; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) > .hv-rail > .hv-rail__head { flex-direction: column; gap: 6px; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-acct { flex: none; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__head :is(.hv-acct__name, .hv-acct__ch) { display: none; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-rail__col { width: 34px; height: 34px; border-radius: 50%; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-planrow { justify-content: center; padding: 6px 0; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) :is(.hv-planrow__t, .hv-planrow__trial) { display: none; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-planrow__i { width: 28px; height: 28px; border-radius: 50%; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__nav { width: auto; margin: 0; padding: 4px 0; border-radius: 0; background: none; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__link { justify-content: center; width: 38px; height: 36px; margin: 1px auto; padding: 0; border-radius: 13px; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-rail__ch { display: none; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent { display: grid; grid-template-columns: 1fr; place-items: center; width: auto; height: auto; min-height: 0; margin: 5px 0; padding: 10px 0; border-radius: 22px; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent > .hv-agent__t, .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent__go { display: none; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent__orb { background: none; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-agent > .hv-agent__orb { display: grid; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-foot-row { align-items: center; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-foot { justify-content: center; width: 38px; height: 36px; padding: 0; }
    .hv-frame--side.hv-frame--col:has(> .hv-cap:not(:empty)) .hv-foot__l { display: none; }
}
/* The mockup's compact sidebar below 880 px of height: 32 px rows, 24 px section links, the shorter agent card. */
@media (min-width: 821px) and (max-height: 880px) {
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__link { height: 32px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__sec { min-height: 24px; padding-top: 2px; padding-bottom: 2px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)):not(.hv-frame--col) .hv-agent { grid-template-columns: 62% 1fr; height: 64px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent .hv-agent__n { font-size: var(--t-section); }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-agent__go { display: none; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-foot { height: 34px; }
    .hv-frame--side:has(> .hv-cap:not(:empty)) .hv-rail__head .hv-acct { height: 42px; }
    .hv-planrow { padding: 3px 4px; }
}

/* "On this page" (desktop): the current page's sections while the collapsed rail cannot show them. */
.hv-sheet { position: relative; }
.hv-dock {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: var(--z-sticky);
    display: flex;
    gap: 2px;
    max-width: calc(100% - 48px);
    padding: 5px;
    overflow-x: auto;
    transform: translateX(-50%);
    border-radius: var(--hv-r-p);
    background: var(--chrome-b) linear-gradient(180deg, var(--chrome-a), var(--chrome-b));
    box-shadow: var(--dock-sh);
    color-scheme: dark;
    scrollbar-width: none;
}
.hv-dock__btn { flex: none; min-height: 44px; padding: 0 16px; border-radius: var(--hv-r-p); color: var(--dock-item); font-size: var(--t-small); white-space: nowrap; transition: background-color 160ms ease, color 160ms ease; }
.hv-dock__btn:hover { background: var(--chrome-tint); color: var(--pill); }
@media (min-width: 821px) {
    .hv-page { padding-bottom: 84px; }
}

/* One view-as banner: once the Hub's own bar has drawn, the server's bottom bar (its no-script fallback) steps aside. */
body:has(#hubViewAs .hv-viewas) [data-va-banner] { display: none !important; }

/* Phones: the sheet sits flush between the top bar and the tab bar, as before; the radius stays on the cards. */
@media (max-width: 820px) {
    .hv-sheet { margin: 0; border-radius: 0; box-shadow: none; }
    .hv-cap,
    .hv-dock { display: none; }
}

/* ══ 11g · Final Hub revision, PR C (24 Nov mockup): the phone shell. The top bar and the tab bar are floating dark pills; the ══
   active tab is a light pill with its label; the page's sections are chips under the top bar that wrap and stay put. */
.hv-pop__n { min-width: 22px; color: var(--ink-2); font-family: var(--font-mono); font-size: var(--t-label); }
@media (max-width: 820px) {
    .hv-frame--side .hv-mtop { margin: 8px 8px 0; border: 0; border-radius: var(--hv-r-p); background: var(--chrome-b) linear-gradient(180deg, var(--chrome-a), var(--chrome-b)); box-shadow: var(--chrome-sh); color: var(--chrome-ink); color-scheme: dark; }
    .hv-frame--side .hv-mtop .hv-ws__plan { color: var(--chrome-item); }
    .hv-frame--side .hv-mtop .hv-av--btn { background: var(--pill); color: var(--pill-ink); }
    .hv-frame--side .hv-tabbar { margin: 0 8px 8px; padding: 5px; border: 0; border-radius: var(--hv-r-p); background: var(--chrome-b) linear-gradient(180deg, var(--chrome-a), var(--chrome-b)); box-shadow: var(--chrome-sh); color-scheme: dark; }
    .hv-frame--side .hv-tab { border-radius: var(--hv-r-p); color: var(--chrome-item); }
    .hv-frame--side .hv-tab[aria-current="page"] { background: var(--pill); color: var(--pill-ink); }
    .hv-frame--side .hv-tab[aria-current="page"]::before { content: none; }
    .hv-frame--side .hv-tab__count { min-width: 17px; height: 17px; padding: 0 5px; border-radius: var(--hv-r-p); background: var(--go); color: var(--on-go); font-family: var(--font-body); font-weight: 600; line-height: 17px; text-align: center; }
    .hv-frame--side .hv-page > .hv-dock:not([hidden]) { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; flex-wrap: wrap; gap: 6px; max-width: none; margin: 0; padding: 8px 16px; transform: none; border-radius: 0; background: var(--sheet); box-shadow: none; color-scheme: inherit; }
    .hv-frame--side .hv-page > .hv-dock .hv-dock__btn { flex: none; }
    .hv-frame--side .hv-slide { scroll-margin-top: 56px; }
    .hv-frame--side .hv-dock .hv-dock__btn { padding: 0 12px; border: 1px solid var(--line); background: var(--card); color: var(--bone); box-shadow: none; }
    .hv-frame--side .hv-dock .hv-dock__btn[aria-current="true"] { border-color: transparent; background: var(--bone); color: var(--sheet); }
    .hv-frame--side .hv-page { padding-bottom: 24px; }
    .hv-pop--sheet { overflow-y: auto; }
    body:has(> .hv-pop--sheet[data-open]) .hv-frame--side .hv-sheet { filter: brightness(0.62); transition: filter calc(var(--dur) * 2) var(--ease); }
}
@media (max-width: 720px) {
    .hv-searchbox { width: 100%; }
}

/* ══ 11h · Final Hub revision, PR B (24 Nov mockup): Settings is a large dialog over the page (engine `dialogs`): the ══
   sections on a dark column to the left, the breadcrumb and close at the top right, one section's cards under it. */
.hv-modal--settings { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); width: min(940px, calc(100% - 48px)); height: min(820px, calc(100% - 48px)); max-height: none; overflow: hidden; border-radius: 28px; }
.hv-modal--settings > .hv-modal__head { grid-column: 2; grid-row: 1; padding: 18px 22px 0; }
.hv-modal--settings .hv-modal__title { color: var(--ink-2); font-size: var(--t-small); font-weight: 500; }
.hv-modal--settings .hv-modal__head .hv-icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--bone) 8%, transparent); box-shadow: none; }
.hv-modal--settings > .hv-modal__body,
.hv-setd { display: contents; }
.hv-setd__nav { grid-column: 1; grid-row: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 14px; overflow-y: auto; background: var(--rail-b) linear-gradient(180deg, var(--rail-a), var(--rail-b)); color: var(--chrome-ink); color-scheme: dark; }
.hv-setd__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; padding: 0 8px 12px; border-bottom: 1px solid var(--chrome-tint-2); }
.hv-setd__brand .hv-ws__mark { border: 0; background: var(--pill-2) linear-gradient(180deg, var(--pill), var(--pill-2)); color: var(--pill-ink); }
.hv-setd__brand > p { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.hv-setd__brand span { color: var(--chrome-item); font-size: var(--t-label); }
.hv-setd__gl { padding: 10px 8px 4px; color: var(--chrome-group); font-size: var(--t-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.hv-setd__link { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 12px; color: var(--chrome-item); font-size: var(--t-small); transition: background-color 160ms ease, color 160ms ease; }
.hv-setd__link:hover { background: var(--chrome-tint); color: var(--chrome-hover); }
.hv-setd__link[aria-current="page"] { background: var(--chrome-tint-2); color: var(--chrome-hover); box-shadow: inset 0 0 0 1px var(--go-edge); }
.hv-setd__link:focus-visible { outline-color: var(--focus-frame); }
.hv-setd__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 12px 8px 0; color: var(--chrome-group); font-size: var(--t-label); }
.hv-setd__main { grid-column: 2; grid-row: 2; min-height: 0; padding: 4px 22px 22px; overflow-y: auto; }
.hv-setd__main .hv-slide { padding: 0; }
.hv-setd__main .hv-grid > * { grid-column: 1 / -1; }
body:has(> .hv-modal--settings[data-open]) .hv-frame { filter: blur(6px); }
@media (max-width: 720px) {
    .hv-modal--settings { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); width: 100%; height: 100%; border-radius: 0; }
    .hv-modal--settings > .hv-modal__head { grid-column: 1; }
    .hv-setd__nav { grid-column: 1; grid-row: 2; flex-direction: row; gap: 6px; padding: 8px 12px; overflow-x: auto; }
    .hv-setd__nav :is(.hv-setd__brand, .hv-setd__gl, .hv-setd__foot) { display: none; }
    .hv-setd__link { flex: none; min-height: 44px; }
    .hv-setd__main { grid-column: 1; grid-row: 3; padding: 4px 14px 14px; }
}

/* ══ 11i · Final Hub revision, PR D: Agent › Health rows: the figure, the bar with its 90% tick, the status. ══ */
.hv-health__v { min-width: 9ch; text-align: right; }
.hv-health__bar { flex: 0 1 40%; }
@media (max-width: 720px) {
    .hv-health { flex-wrap: wrap; }
    .hv-health__bar { flex-basis: 100%; order: 3; }
}

/* ══ 11j · Final Hub revision, PR D: Leads, the list cards and the detail (avatar heading, the stepper, the summary). ══ */
.hv-av--lg { width: 44px; height: 44px; font-size: var(--t-small); }
.hv-listrow { display: flex; align-items: flex-start; gap: 12px; }
.hv-listrow__tags { margin-top: 6px; }
.hv-listrow__at { flex: none; }
.hv-lead__head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.hv-lead__name { margin: 0; font-family: var(--font-display); font-size: var(--t-figure); line-height: 1.05; }
.hv-lead__intel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.hv-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hv-step { display: grid; gap: 2px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--card-edge); border-radius: var(--hv-r-s); background: var(--card); color: var(--bone); text-align: left; font-size: var(--t-small); }
.hv-step--done { border-color: var(--signal-edge); background: var(--signal-dim); color: var(--signal-text); }
.hv-step[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--signal-edge); }
.hv-step__n { font-family: var(--font-mono); font-size: var(--t-label); }
.hv-step__l { font-weight: 600; }
.hv-lead__sum { padding: 14px 16px; border: 1px solid var(--card-edge); border-radius: var(--hv-r-s); background: var(--card-hi); }
@media (max-width: 720px) {
    .hv-leads__bar { flex-wrap: wrap; }
    .hv-leads__bar .hv-searchbox { flex: 1 1 100%; }
    .hv-lead__head .hv-chips { width: 100%; }
    .hv-steps { grid-template-columns: 1fr; }
}

/* ══ 11k · Final Hub revision, PR D: Home on a phone (who is waiting, round call buttons) and the diary as a timeline. ══ */
.hv-hl__k { display: none; align-items: center; gap: 8px; margin-top: 12px; }
.hv-tl__at { flex: none; min-width: 3.2em; font-size: var(--t-body); font-weight: 600; }
.hv-tl .hv-row__grow { padding-left: 12px; border-left: 2px solid var(--signal); }
.hv-tl .hv-tl__later .hv-row__grow { border-left-color: var(--card-edge); }
/* The diary's list on a phone: one card per booking, the time as its title and the status beside it. */
@media (max-width: 820px) {
    .hv-table--book tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 14px 0; }
    .hv-table--book td { justify-content: flex-start; padding: 0; text-align: left; }
    .hv-table--book td:nth-child(1) { color: var(--bone); font-family: var(--font-display); font-size: var(--t-title); font-weight: 700; }
    .hv-table--book td:nth-child(4) { grid-row: 1; grid-column: 2; }
    .hv-table--book td:is(:nth-child(2), :nth-child(3), :nth-child(5)) { grid-column: 1 / -1; }
    .hv-table--book td:is(:nth-child(1), :nth-child(4), :nth-child(5))::before { content: none; }
    .hv-table--book .hv-btn--ghost { border-color: var(--edge-hi); background: var(--glass-nested); color: var(--danger-lift); }
}
.hv-hi { grid-column: 1 / -1; padding: 0 2px; }
.hv-hi__t { margin: 8px 0 0; font-family: var(--font-display); font-weight: 700; font-stretch: 100%; font-size: var(--t-section); letter-spacing: -0.02em; line-height: 1.1; }
.hv-hi__d { margin: 6px 0 0; color: var(--ink-2); font-size: var(--t-title); }
.hv-hi__n { color: var(--signal); font-weight: 700; }
.hv-hl__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hv-hl__hot { display: inline-flex; flex: none; align-items: center; gap: 3px; color: color-mix(in srgb, var(--warn) 70%, var(--hl-ink)); font-size: var(--t-label); font-weight: 600; }
.hv-hl__hot svg { width: 12px; height: 12px; }
.hv-hl__wait { display: none; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: color-mix(in srgb, var(--warn) 55%, var(--hl-ink)); font-size: var(--t-label); font-weight: 600; }
@media (max-width: 720px) {
    .hv-hl__k { display: flex; }
    .hv-hl .hv-av { background: var(--hl-ink); color: var(--hl-c); }
    .hv-hl .hv-av--hot { background: color-mix(in srgb, var(--warn) 35%, var(--hl-ink)); }
    .hv-hl__wait { display: inline-block; }
    .hv-hl__in { display: none; }
    .hv-hl__row { align-items: center; }
    .hv-hl__open { display: none; }
    .hv-hl__call { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
    .hv-hl__cl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ══ 11d · Tactile motion (the mockup's, durations and curves exact): transform, opacity and filter only ══ */

/* The primary button: a light passes every 6.5 s; a press sinks it. */
.hv-btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.hv-btn--primary::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: linear-gradient(105deg, transparent 30%, var(--sheen) 48%, var(--sheen-2) 56%, transparent 70%);
    transform: translateX(-130%);
    animation: hv-sheen 6.5s var(--ease) 1.2s infinite;
    pointer-events: none;
}
@keyframes hv-sheen { 0% { transform: translateX(-130%); } 28%, 100% { transform: translateX(130%); } }
.hv-btn { transition: transform 0.18s var(--ease), border-color 0.24s, background-color 0.24s, filter 0.24s, box-shadow 0.24s; }
.hv-app .hv-btn:not(:disabled):active { transform: translateY(1px) scale(0.99); }
.hv-btn[aria-busy="true"]::after { content: ''; flex: none; width: 12px; height: 12px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; opacity: 0.8; animation: hv-rot 600ms linear infinite; }
@keyframes hv-rot { to { transform: rotate(360deg); } }

/* A write's result beside the button that made it (core/result.js): green for 6 s, or red until the next edit. */
.hv-result { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0 10px; color: var(--signal-text); font-size: var(--t-small); vertical-align: middle; }
.hv-result--bad { color: var(--danger-lift); }
.hv-result--warn { color: var(--warn); }
.hv-result__ok { flex: none; width: 10px; height: 6px; margin-bottom: 3px; border: 1.8px solid currentColor; border-top: 0; border-right: 0; transform: rotate(-45deg); }

/* The live dot breathes and sends a ring out. */
.hv-live { position: relative; overflow: visible; animation: hv-breathe 3.2s ease-in-out infinite; }
.hv-live::after { content: ''; position: absolute; inset: -4px; border: 1px solid var(--signal); border-radius: 50%; opacity: 0.5; animation: hv-ping 2.4s var(--ease) infinite; }
@keyframes hv-ping { 0% { transform: scale(0.6); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

/* The agent's mark: strata, cream and green, that slide like a voice when the card is pointed at. */
.hv-agent:has(> .hv-orb) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; }
.hv-agent > :not(.hv-orb) { grid-column: 2; }
.hv-orb {
    --hv-orb: 36px;
    display: flex;
    flex-direction: column;
    gap: calc(var(--hv-orb) * 0.055);
    grid-row: 1 / span 2;
    width: var(--hv-orb);
    height: var(--hv-orb);
    overflow: hidden;
    border-radius: 50%;
}
.hv-frame--col .hv-orb { --hv-orb: 30px; }
.hv-orb__r { flex: 1; background: linear-gradient(90deg, var(--hl-ink) 50%, var(--signal) 50%); transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1); }
.hv-orb__r:nth-child(odd) { --hv-dx: calc(var(--hv-orb) * -0.079); }
.hv-orb__r:nth-child(even) { --hv-dx: calc(var(--hv-orb) * 0.079); }
.hv-agent:is(:hover, :focus-visible) .hv-orb__r { animation: hv-speak 1100ms cubic-bezier(0.45, 0, 0.55, 1) infinite; animation-delay: calc(var(--hv-i) * -140ms); }
@keyframes hv-speak { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(var(--hv-dx)); } }

/* A period switch (Today, This month, ...) re-reads the figures: they settle in again. */
@keyframes hv-fig { from { opacity: 0.15; filter: blur(2px); } to { opacity: 1; filter: none; } }
.hv-fig-in :is(.hv-stat__v, .hv-stat__l, .hv-fig__v, .hv-num) { animation: hv-fig 180ms cubic-bezier(0.23, 1, 0.32, 1) both; }

/* Toasts rise in; a success draws its tick; an undo toast shows the time left. */
.hv-toast { position: relative; overflow: hidden; animation: hv-toast-in 220ms cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes hv-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hv-toast__ok { flex: none; width: 10px; height: 6px; margin: 0 2px 3px; border: 1.8px solid var(--signal-text); border-top: 0; border-right: 0; transform: rotate(-45deg); animation: hv-draw 260ms cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes hv-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.hv-toast__bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: currentColor; opacity: 0.35; transform-origin: left; animation: hv-tbar var(--hv-tl) linear forwards; }
@keyframes hv-tbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Menus (the account menu, More, the bell): in from their opener, and out again before they leave the page. */
.hv-pop[data-open] { animation: hv-pop-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.hv-pop.hv-pop--out { display: block; pointer-events: none; animation: hv-pop-out 200ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes hv-pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes hv-pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-4px) scale(0.96); } }

/* Switches and the segmented thumb slide; rail items fade their tint. */
.hv-switch { transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); }
.hv-switch::after { transition: transform 0.22s var(--ease), background-color 0.2s; }
.hv-seg { position: relative; isolation: isolate; }
.hv-seg__thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    z-index: -1;
    width: var(--hv-tw);
    border: 1px solid var(--thumb-edge);
    border-radius: var(--hv-r-p);
    background: var(--thumb-b) linear-gradient(180deg, var(--thumb-a), var(--thumb-b));
    box-shadow: var(--thumb-sh);
    transform: translateX(var(--hv-tx));
    transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), width 180ms cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}
.hv-seg:has(> .hv-seg__thumb) button:is([aria-pressed="true"], [aria-checked="true"]) { border-color: transparent; background: none; box-shadow: none; }
.hv-rail__link, .hv-rail__sec { transition: background-color 0.2s, color 0.2s; }

/* ══ 12 · Reduced motion: every animation and transition off ══════════ */

@media (prefers-reduced-motion: reduce) {
    .hv-app *,
    .hv-app *::before,
    .hv-app *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
