/*
 * HAi1Y Design System for the web: the same components as hai1y-design-android. The whole palette is HAi1Y; each app
 * adds one brand through the --h-brand-* tokens, in its own files.
 * Color carries meaning (Chris, 2026-10-23): blue (--h-primary) is only what can be tapped; navy and teal (--h-hai1y, from its logo) are HAi1Y
 * itself, never an action; values are text, bold with fixed-width digits; violet is calm information.
 * Put class "h-theme" on <html> (or any container). Light by default; dark with the viewer's system setting,
 * data-theme="dark" on the root, or the h-dark class.
 */
.h-theme {
  --h-bg: #F9FAFB; --h-surface: #FFFFFF; --h-c1: #F5F7F9; --h-c2: #F0F2F5; --h-c3: #EBEEF1; --h-c4: #E7EAEE;
  --h-fg: #000000; --h-fg2: #1F242B; --h-outline: #5F6773; --h-line: #CBD2DA;
  --h-primary: #1D4ED8; --h-on-primary: #FFFFFF; --h-primary-c: #DCE7FE; --h-on-primary-c: #000000;
  --h-tonal-text: #1E3A8A;   /* 8.3:1 on the tinted button (dark mode: #DCE7FE, 8.5:1) */
  /* HAi1Y's navy (teal in dark mode): its identity and states (section tints, headings, its badges, your chat bubbles), never an
     action. Brighter than the active color's container in dark mode, so information stands out (Chris, 2026-10-23). Stays HAi1Y's if an app makes another color the active one (--h-primary). */
  --h-hai1y: #022A69; --h-on-hai1y: #FFFFFF; --h-hai1y-c: #CDF3F2; --h-on-hai1y-c: #000000;
  --h-value: var(--h-fg);
  --h-calm: #4E1DA2; --h-calm-c: #D9CCF8;
  --h-error: #B4232C; --h-error-c: #FEE2E2; --h-on-error: #FFFFFF;
  --h-gain: #15692D; --h-loss: #B4232C; --h-cash: #64748B;
  --h-s1: #027894; --h-s2: #1D4ED8; --h-s3: #B45309; --h-s4: #4E1DA2; --h-s5: #BE185D;
  /* the same in both modes */
  --h-brand-a: #022A69; --h-brand-b: #027894; --h-on-brand: #FFFFFF; --h-alert-a: #DC2626; --h-alert-b: #991B1B;
  /* HAi1Y's logo: the mark's deep navy circle and its teal edge, with the words set on it (a page's band in the logo's colors) */
  --h-logo: #0A1330; --h-logo-edge: #03C4BF; --h-on-logo: #FFFFFF; --h-on-logo-q: #CDF3F2;
  /* the logo grown long: its navy, the teal-blue its pill passes through, and the navy of the words set on white */
  --h-logo-mid: #024E7C; --h-logo-ink: #022A69;
  /* where an app's brand goes: HAi1Y's own by default */
  --h-brand-fill: #03C4BF; --h-brand-track: #022A69; --h-brand-surface: #022A69;
  --h-brand-on-surface: #FFFFFF; --h-brand-knob-a: #CDF3F2; --h-brand-knob-b: #03C4BF;
  --h-brand-on-knob: #022A69; --h-brand-chosen: #03C4BF; --h-brand-on-chosen: #000000;
  /* the app's accent on its own content (an Alert's and a Call to Information's edge): HAi1Y's navy or teal by default */
  --h-brand-accent: var(--h-hai1y);
  /* a card's lift off the page: a soft shadow on light pages; none on dark ones, where borders do it */
  --h-shadow: 0 1px 2px rgb(10 20 30 / .06), 0 8px 24px rgb(10 20 30 / .08);
  --h-font: "Atkinson Hyperlegible", Verdana, "Segoe UI", sans-serif;
  --h-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --h-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  background: var(--h-bg); color: var(--h-fg); font-family: var(--h-font); font-variant-numeric: tabular-nums;
}
.h-theme.h-dark, :root[data-theme="dark"] .h-theme, :root[data-theme="dark"].h-theme {
  --h-bg: #111418; --h-surface: #111418; --h-c1: #171B20; --h-c2: #1C2026; --h-c3: #232830; --h-c4: #2B313A;
  --h-fg: #FFFFFF; --h-fg2: #E6E8EB; --h-outline: #9AA3AE; --h-line: #3A414B;
  --h-primary: #6CB0FF; --h-on-primary: #000000; --h-primary-c: #1E3A8A; --h-on-primary-c: #FFFFFF; --h-tonal-text: #DCE7FE;
  --h-hai1y: #03C4BF; --h-on-hai1y: #000000; --h-hai1y-c: #024E7C; --h-on-hai1y-c: #FFFFFF;
  --h-value: #DADAE0; --h-calm: #C4B3F5; --h-calm-c: #45208A;
  --h-error: #FF8A8A; --h-error-c: #5F1414; --h-on-error: #000000; --h-gain: #5BE38A; --h-loss: #FF8A8A; --h-cash: #94A3B8;
  --h-s1: #03C4BF; --h-s2: #6CB0FF; --h-s3: #FBBF24; --h-s4: #AB96EE; --h-s5: #F472B6; --h-shadow: none; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h-theme:not(.h-light), :root:not([data-theme="light"]).h-theme:not(.h-light) {
    --h-bg: #111418; --h-surface: #111418; --h-c1: #171B20; --h-c2: #1C2026; --h-c3: #232830; --h-c4: #2B313A;
    --h-fg: #FFFFFF; --h-fg2: #E6E8EB; --h-outline: #9AA3AE; --h-line: #3A414B;
    --h-primary: #6CB0FF; --h-on-primary: #000000; --h-primary-c: #1E3A8A; --h-on-primary-c: #FFFFFF; --h-tonal-text: #DCE7FE;
    --h-hai1y: #03C4BF; --h-on-hai1y: #000000; --h-hai1y-c: #024E7C; --h-on-hai1y-c: #FFFFFF;
    --h-value: #DADAE0; --h-calm: #C4B3F5; --h-calm-c: #45208A;
    --h-error: #FF8A8A; --h-error-c: #5F1414; --h-on-error: #000000; --h-gain: #5BE38A; --h-loss: #FF8A8A; --h-cash: #94A3B8;
    --h-s1: #03C4BF; --h-s2: #6CB0FF; --h-s3: #FBBF24; --h-s4: #AB96EE; --h-s5: #F472B6; --h-shadow: none; color-scheme: dark;
  }
}
/* OnBlack: a chart on true black in either mode */
h-on-black, .h-on-black { display: block; background: #000000; color: #FFFFFF; border-radius: 16px; padding: 12px;
  --h-bg: #000000; --h-fg: #FFFFFF; --h-fg2: #E6E8EB; --h-line: #3A414B; --h-outline: #9AA3AE; --h-surface: #000000; --h-c2: #1C2026;
  --h-primary: #6CB0FF; --h-on-primary: #000000; --h-hai1y: #03C4BF; --h-on-hai1y: #000000; --h-value: #DADAE0; --h-gain: #5BE38A; --h-loss: #FF8A8A;
  --h-s1: #03C4BF; --h-s2: #6CB0FF; --h-s3: #FBBF24; --h-s4: #AB96EE; --h-s5: #F472B6 }

.h-theme *, .h-theme *::before, .h-theme *::after { box-sizing: border-box }
.h-theme :focus-visible { outline: 3px solid var(--h-primary); outline-offset: 2px }
/* Hidden means hidden, whatever display a class gives it */
.h-theme [hidden], [hidden].h-theme { display: none !important }
.h-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
/* Hidden words inside a line of text (a comma in a name, "Haily" beside the written name): kept in the line, taking no
   room, so Chrome joins them to the words beside them ("Energy, Up 3.10%"), never with a stray space ("Energy , Up") as it
   does around a box taken out of the line */
.h-sr.h-in { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; clip-path: inset(50%);
  font-size: 1px; line-height: 0; letter-spacing: -1px; user-select: none }
.h-btn { font: 700 15px var(--h-font); border-radius: 99px; min-height: 44px; padding: 8px 18px; cursor: pointer; border: 0;
  background: var(--h-primary); color: var(--h-on-primary) }
/* The secondary button (Chris, 2026-10-23): action-blue text on a pale blue fill, as HAi1Y's reply buttons; it reads
   as a button on any surface and stays quieter than the solid one. (.h-outline kept as its old name.) */
.h-btn.h-outline, .h-btn.h-tonal { background: var(--h-primary-c); color: var(--h-tonal-text); border: 0; box-shadow: inset 0 0 0 1.5px var(--h-primary) }
.h-btn.h-text { background: transparent; color: var(--h-primary); padding-inline: 10px }
.h-iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 0; border-radius: 50%;
  color: var(--h-primary); cursor: pointer; flex: none }
.h-iconbtn svg { width: 20px; height: 20px }
/* A value is never broken across lines (Chris, 2026-10-29): its container makes room instead */
.h-value { color: var(--h-value); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap }

/* Heading, Spinner, Problem */
.h-heading { font: 700 18px/1.25 var(--h-font); margin: 0; color: var(--h-fg) }
.h-spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--h-c4); border-top-color: var(--h-hai1y);
  animation: h-spin 0.9s linear infinite; display: inline-block }
@keyframes h-spin { to { transform: rotate(360deg) } }
h-loading { display: grid; place-items: center; min-height: 120px; padding: 24px }
.h-problem { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 16px }

/* ProgressBar, Waiting */
h-progress, h-waiting { display: block }
.h-progress { display: grid; gap: 6px }
.h-progress .h-title { font: 700 15px var(--h-font) }
.h-progress .h-track { display: block; place-items: normal; height: 10px; border: 0; border-radius: 5px; background: var(--h-brand-track); overflow: hidden; cursor: auto }   /* not SlideToConfirm's .h-track: the fill starts at the left */
.h-progress .h-fill { height: 100%; border-radius: 5px; background: var(--h-brand-fill); transition: width 0.4s ease }
.h-progress .h-row { display: flex; gap: 10px; font-size: 14px; flex-wrap: wrap }
.h-progress .h-left { color: var(--h-fg2) }
.h-progress .h-done { color: var(--h-gain); font-weight: 700 }
.h-progress .h-stop { color: var(--h-error); font-weight: 700 }
.h-progress.h-run .h-fill { width: 30%; animation: h-slide 1.6s ease-in-out infinite }
/* Waiting: one node from the start; its first seconds show only its animation (a spinner unless given), then the bar */
.h-progress .h-wait-art { display: none; justify-self: center }
.h-progress.h-early .h-wait-art { display: block }
.h-progress.h-early > .h-title, .h-progress.h-early > .h-track, .h-progress.h-early > .h-row { display: none }
@keyframes h-slide { from { transform: translateX(-110%) } to { transform: translateX(360%) } }

/* PeriodPicker, SegmentedSetting */
.h-period { display: flex; border: 1px solid var(--h-line); border-radius: 99px; padding: 3px; gap: 3px; background: var(--h-c1) }
.h-period button { flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 10px; border: 0; border-radius: 99px; background: none; font: 700 14px var(--h-font); color: var(--h-fg); cursor: pointer }
.h-period button svg { flex: none; width: 1em; height: 1em }
/* Too narrow for one line each: the same choices in two columns, then one, every row's choices one height */
.h-period.h-wrapped { display: grid; border-radius: 26px }
.h-period button[aria-checked="true"] { background: var(--h-primary); color: var(--h-on-primary) }
.h-seg { display: grid; gap: 8px }
.h-seg .h-bar { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--h-brand-surface) }
.h-seg .h-bar button { flex: 1; min-height: 44px; border: 0; border-radius: 99px; background: none; font: 700 14px var(--h-font);
  color: var(--h-brand-on-surface); cursor: pointer; padding: 6px 8px }
.h-seg .h-bar button[aria-checked="true"] { background: var(--h-brand-chosen); color: var(--h-brand-on-chosen) }
/* On the brand track the action blue can fall under 3:1 (navy, an app's own): the ring takes the track's own ink, just
   outside the choice, inside the track's padding (WCAG 1.4.11) */
.h-theme .h-seg .h-bar button:focus-visible { outline-color: var(--h-brand-on-surface); outline-offset: 1px }
.h-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700 }

/* CollapsibleCard, CollapsibleGroup, InfoRow, ChoiceRow */
.h-card { border: 1px solid var(--h-line); border-radius: 16px; background: var(--h-c1); overflow: hidden }
.h-card > .h-chead { margin: 0; font: inherit }
.h-card > .h-chead > .h-head { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: 0;
  text-align: left; cursor: pointer; color: var(--h-fg); font: inherit }
.h-card > .h-chead > .h-head .h-t { flex: 1; min-width: 0; display: grid; gap: 2px }
.h-card > .h-chead > .h-head .h-t b { font-size: 16px }
.h-card.h-large > .h-chead > .h-head .h-t b { font-size: 19px }
.h-card .h-chev { color: var(--h-primary); transition: transform 0.2s; display: grid }
.h-card[data-open="true"] .h-chev { transform: rotate(180deg) }
.h-card > .h-body { padding: 0 16px 14px; display: grid; gap: 4px }
.h-card[data-open="false"] > .h-body { display: none }
/* The summary: its button's description, drawn just under the title while closed (part of the header to touch) */
.h-card > .h-csum { margin: -12px 0 0; padding: 0 56px 14px 16px; color: var(--h-fg2); font-size: 13px; cursor: pointer }
.h-card[data-open="true"] > .h-csum { display: none }
.h-inforow { display: flex; align-items: center; min-height: 48px; gap: 8px; border-top: 1px solid var(--h-line) }
.h-inforow:first-child { border-top: 0 }
.h-inforow > span { flex: 1 }
.h-inforow .h-info-t { display: grid; min-width: 0 } .h-info-t small { color: var(--h-fg2); font-size: 14px }
.h-choice { display: flex; align-items: center; gap: 6px }
/* ChoiceRow (Chris, 2026-10-29): a pill that is a checkbox, its box at its start; picked, the pill fills in and the box
   is checked. A pick toggles back; nothing else dims */
.h-choice > button.h-pick { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 12px; border-radius: 24px;
  border: 1px solid var(--h-primary); background: var(--h-surface); color: var(--h-on-primary-c); font: 600 15px var(--h-font); cursor: pointer; text-align: left }
.h-choice > button.h-pick[aria-checked="true"] { background: var(--h-primary-c) }
.h-choice > button.h-pick[aria-disabled="true"] { cursor: default } .h-choice > button.h-pick[aria-disabled="true"] > * { opacity: 0.6 }
.h-choice .h-box { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--h-on-primary-c); display: grid; place-items: center }
.h-choice .h-box svg { width: 16px; height: 16px; visibility: hidden }
.h-choice [aria-checked="true"] .h-box { background: var(--h-primary); border-color: var(--h-primary); color: var(--h-on-primary) }
.h-choice [aria-checked="true"] .h-box svg { visibility: visible }
.h-choice .h-pick .h-t { flex: 1; min-width: 0; display: grid; gap: 1px }
.h-choice .h-pick .h-t small { font-size: 13px; font-weight: 400; color: var(--h-fg2) }

/* Notice: the badge, then its words (a heading and its text, one piece); its action a control of its own on a plate of
   the page's color inside the card, so it stands clear of any tint (Chris, 2026-10-29) */
.h-notice { border-radius: 16px; padding: 14px; display: grid; gap: 12px }
.h-notice .h-nhead { display: flex; gap: 12px; align-items: flex-start }
.h-notice.h-shut .h-nhead { align-items: center }
.h-notice .h-nwords { flex: 1; min-width: 0; display: grid; gap: 4px }
.h-notice .h-badge { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center }
.h-notice.h-shut .h-badge { width: 28px; height: 28px }
.h-notice .h-badge svg { width: 20px; height: 20px }
.h-notice h2, .h-notice h3, .h-notice h4, .h-notice h5, .h-notice h6 { margin: 0; font: 700 16px var(--h-font) }
.h-notice p { margin: 0; font-size: 15px; color: var(--h-fg2) }
.h-notice .h-ntoggle { display: flex; width: 100%; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit;
  color: inherit; text-align: left; cursor: pointer; min-height: 32px }
.h-notice .h-ntoggle span { flex: 1 }
.h-notice .h-ntoggle svg { flex: none; color: var(--h-primary); transition: transform 0.2s }
.h-notice:not(.h-shut) .h-ntoggle svg { transform: rotate(180deg) }
.h-notice .h-nact { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: 14px;
  background: var(--h-surface); color: var(--h-primary); font: 700 15px var(--h-font); text-align: left; cursor: pointer }
.h-notice .h-nact span { flex: 1 } .h-notice .h-nact svg { flex: none }
.h-notice .h-nact[hidden] { display: none }   /* a collapsible notice's action, while it's closed */
.h-notice.h-caution .h-nact { color: var(--h-error) }
@media (prefers-reduced-motion: reduce) { .h-notice .h-ntoggle svg { transition: none } }
.h-notice.h-brand { background: var(--h-hai1y-c) } .h-notice.h-brand .h-badge { background: var(--h-hai1y); color: var(--h-on-hai1y) }
.h-notice.h-info { background: var(--h-calm-c) } .h-notice.h-info .h-badge { background: var(--h-calm); color: var(--h-surface) }
.h-notice.h-caution { background: var(--h-error-c) } .h-notice.h-caution .h-badge { background: var(--h-error); color: var(--h-surface) }
.h-notice.h-quiet { background: var(--h-c2) } .h-notice.h-quiet .h-badge { background: var(--h-c4); color: var(--h-fg) }

/* Alert and Call to Information (Chris, 2026-10-25): one family in one box, so they read together: an Alert holds one
   quotable key point, always shown; a Call to Information holds extra information some people want (a definition, a
   background idea) behind one labeled control that expands in place (<details>, so it works without a script). Only
   between paragraphs or after a table, chart or image; never right after a heading, never in a table, never one inside
   another. Sizes follow the text around them. Markup: hai1y_build.py's alert_html and call_to_info_html. */
.h-alert, .h-cti { margin: 20px 0 24px; border: 1px solid var(--h-line); border-left: 6px solid var(--h-brand-accent); border-radius: 14px;
  background: var(--h-surface) }
.h-alert { padding: 14px 18px }
.h-alert p { margin: 0; font-size: 1.06em; font-weight: 650; line-height: 1.45; color: var(--h-fg) }
.h-cti > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 16px; border-radius: 8px; list-style: none;
  color: var(--h-primary); font-weight: 700; line-height: 1.3; text-align: left; cursor: pointer }
.h-cti > summary::-webkit-details-marker { display: none }
.h-cti > summary svg { flex: none; width: 24px; height: 24px }
.h-cti > summary span { flex: 1 }
.h-cti[open] > summary .h-cti-chev { transform: rotate(180deg) }
.h-cti-body { padding: 0 18px 16px }
.h-cti-body p, .h-cti-body li { color: var(--h-fg2); font-size: 0.94em }

/* Hai1yPromptField: HAi1Y's logo grown long (.h-long, with the chat button), collapsing to its bubble (.h-hb) */
.h-compose { width: 100%; cursor: text }
.h-compose .h-cbox { flex: 1; min-width: 0; display: grid; padding: 10px 0 }
/* Whole-pixel lines, so the box fits its text exactly: a fraction over shows a scroll bar where scroll bars always show */
.h-compose textarea, .h-compose .h-ph { grid-area: 1 / 1; font: 16px/22px var(--h-font); color: var(--h-on-logo) }
.h-compose textarea { resize: none; border: 0; padding: 0; background: none; max-height: 110px; overflow-y: hidden; caret-color: var(--h-logo-edge); outline: none }
.h-compose .h-ph { color: color-mix(in srgb, var(--h-on-logo) 78%, transparent); pointer-events: none }
.h-compose:has(textarea:focus-visible) { outline: 3px solid var(--h-primary); outline-offset: 2px } .h-compose textarea:focus-visible { outline: none }
.h-compose textarea:disabled { opacity: 0.6 }
.h-compose .h-send { flex: none; align-self: flex-end; width: 48px; height: 48px; margin: 0 0 6px; border-radius: 50%; border: 0; display: grid;
  place-items: center; background: var(--h-on-logo); color: var(--h-logo); cursor: pointer }
/* Send appears once there's something to send; until then the words run to the end */
/* Close, at the other end from the logo and mirroring it: a round end of the same size; on more lines it keeps to the
   top right while the logo keeps to the bottom left (Chris, 2026-10-29) */
.h-compose { padding-right: 0 }
.h-compose .h-close { flex: none; align-self: flex-start; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0;
  background: none; color: var(--h-on-logo); display: grid; place-items: center; cursor: pointer }
.h-compose .h-close:hover { background: var(--h-logo-edge); color: var(--h-logo) }   /* the logo's teal, never a see-through grey */ .h-compose .h-close svg { width: 24px; height: 24px } .h-compose .h-send:not([hidden]) { animation: h-pop 0.15s ease-out }
@keyframes h-pop { from { transform: scale(0.6); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .h-compose .h-send { animation: none !important } }

/* RichText */
.h-rich { display: grid; gap: 6px; font-size: 16px; line-height: 1.5 }
.h-rich p { margin: 0 }
.h-rich ul, .h-rich ol { margin: 0; padding-left: 1.4em; display: grid; gap: 4px }

/* Rows */
.h-switchrow { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; background: none; border: 0; text-align: left;
  color: var(--h-fg); font: inherit; cursor: pointer; padding: 0 }
.h-switchrow .h-t { flex: 1 } .h-switchrow .h-t small { display: block; font-size: 13px; color: var(--h-fg2) }
.h-switch { width: 52px; height: 32px; border-radius: 99px; background: var(--h-c4); border: 2px solid var(--h-outline); position: relative; flex: none; transition: background 0.2s }
.h-switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--h-outline); top: 6px; left: 6px; transition: all 0.2s }
[aria-checked="true"] .h-switch { background: var(--h-primary); border-color: var(--h-primary) }
[aria-checked="true"] .h-switch::after { width: 24px; height: 24px; top: 2px; left: 22px; background: var(--h-on-primary) }
/* DetailRow: the value beside its label when it fits on one line, else under it (never broken); the label's column
   grows with the text size */
.h-detail { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; font-size: 15px }
.h-detail > .h-dl { flex: 0 0 7.4em; color: var(--h-fg2) }
.h-detail > .h-dv { white-space: nowrap }
.h-soon { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--h-surface) 50%, transparent); color: var(--h-outline) }
.h-soon > div { flex: 1 } .h-soon small { display: block }
.h-initials { border-radius: 50%; background: var(--h-hai1y); color: var(--h-on-hai1y); display: inline-grid; place-items: center; font-weight: 700 }
/* Drawn from data-initials: a picture of the person, never words of a control's name (a profile button is named for
   them, so voice control says their name, not letters it can't match; axe's label-content-name-mismatch) */
.h-initials[data-initials]::before { content: attr(data-initials) }
/* A signed value, everywhere it appears (ChangeText, Chris, 2026-10-29): ▲ and its + up, ▼ and its − down, in the gain
   or loss color on a light tint of the same, on one line; arrow, sign and words carry it without color. .h-change alone
   is ChangePill's pill; .h-ct the same look in a stat, a row or a table's cell, at the text's own size */
.h-change { display: inline-block; font: 700 14px var(--h-font); padding: 2px 10px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums }
.h-change.h-ct { font: inherit; font-weight: 600; padding: 1px 6px; border-radius: 6px }
.h-change.h-up { color: var(--h-gain); background: color-mix(in srgb, var(--h-gain) 14%, transparent) }
.h-change.h-down { color: var(--h-loss); background: color-mix(in srgb, var(--h-loss) 14%, transparent) }
.h-change.h-flat { color: var(--h-fg); background: color-mix(in srgb, var(--h-fg) 10%, transparent) }
.h-pill { display: inline-block; font: 700 14px var(--h-font); padding: 3px 10px; border-radius: 99px; border: 1.5px solid currentColor }
.h-pill.h-filled { border-color: transparent; background: color-mix(in srgb, currentColor 14%, transparent) }
/* Pill tones (Android's PillTone): the color says it with the words, never blue (only what can be acted on is blue) */
.h-tone-plain { color: var(--h-fg) } .h-tone-hai1y { color: var(--h-hai1y) } .h-tone-calm { color: var(--h-calm) }
.h-tone-caution { color: var(--h-error) } .h-tone-gain { color: var(--h-gain) } .h-tone-loss { color: var(--h-loss) }
/* Stat: heard label first (its order in the page), seen value first */
.h-stat { display: flex; flex-direction: column-reverse; align-items: flex-start }
.h-stat b { display: block; font: 700 20px var(--h-font); font-variant-numeric: tabular-nums; white-space: nowrap }
.h-stat small { font-size: 13px; color: var(--h-fg2) }
.h-stat.h-signed small { padding-left: 6px }
/* StatRow: stats side by side, a whole one moving to the next line when they don't fit */
.h-stat-row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start }

/* Section */
.h-section { border-radius: 18px; background: var(--h-c1); overflow: hidden; display: grid }
.h-section::before { content: ""; height: 4px; background: linear-gradient(90deg, var(--h-brand-a), var(--h-brand-b)) }
.h-section > .h-shead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px }
.h-section > .h-shead .h-stitle { margin: 0; flex: 1; font: 700 17px var(--h-font); color: var(--h-hai1y) }
.h-section > .h-sbody { padding: 6px 16px 16px; display: grid; gap: 10px }
.h-section.h-highlight { background: var(--h-hai1y-c); border: 2px solid transparent;
  background-image: linear-gradient(var(--h-hai1y-c), var(--h-hai1y-c)), linear-gradient(90deg, var(--h-brand-a), var(--h-brand-b));
  background-origin: border-box; background-clip: padding-box, border-box; box-shadow: 0 10px 28px -14px var(--h-brand-a) }

/* SettingsTable, NameValueTable, StagedSettings, BasicsAndExpert */
/* SettingsTable, NameValueTable: a real table holding information only (each name a row header, its value bold); what
   people can do with it sits in a short summary right after it (.h-table-sum), never in a cell */
/* Tables on a phone scroll sideways, never squeeze (Chris, 2026-10-29): every column on one line; the box scrolls (and,
   only then, is a named region a keyboard can scroll: hai1y.js's scrollStops) */
.h-table { border: 1px solid var(--h-outline); border-radius: 12px; overflow-x: auto; background: var(--h-surface) }
.h-table:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 2px }
.h-table table { width: 100%; border-collapse: collapse }
.h-table th, .h-table td { padding: 13px 12px; border-top: 1px solid var(--h-line); font-size: 15px; vertical-align: middle; white-space: nowrap }
.h-table tr:first-child > * { border-top: 0 }
/* A table with column names (.h-cols): the names quiet over the values, numbers on the right */
.h-table thead th { font-size: 13px; font-weight: 700; color: var(--h-fg2) }
.h-table.h-cols thead th:not(:first-child) { text-align: right }
.h-table thead + tbody tr:first-child > * { border-top: 1px solid var(--h-line) }
.h-table tr.h-now > * { background: var(--h-c2) }
.h-table th { text-align: left; font-weight: 400; color: var(--h-fg) }
.h-table th small { display: block; font-size: 11px; font-weight: 700; color: var(--h-fg2) }
.h-table td { text-align: right; color: var(--h-value); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap }
/* A table's title, its one heading, right above it (Chris, 2026-10-29) */
.h-ttitle { margin: 0 0 8px; font: 700 16px var(--h-font); color: var(--h-fg) }
/* DataTable: every column at its natural width on one line; the first stays put while the rest slide under it, a shadow
   at each edge where there's more, a thin bar beneath showing where the view is. A group's row spans the table, its
   name staying put too */
h-data-table { display: block; min-width: 0 }
.h-dtable { min-width: 0 }
/* width 0, min-width 100%: the box takes its container's width and never widens it, however wide the table */
.h-dbox { width: 0; min-width: 100%; position: relative; border: 1px solid var(--h-outline); border-radius: 12px; overflow: hidden; background: var(--h-surface) }
.h-dscroll { overflow-x: auto; scrollbar-width: none }
.h-dscroll::-webkit-scrollbar { display: none }
.h-dscroll:focus-visible { outline: 3px solid var(--h-primary); outline-offset: -3px }
.h-dtable table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 15px }
.h-dtable th, .h-dtable td { padding: 12px; white-space: nowrap; text-align: left; vertical-align: middle; border-top: 1px solid var(--h-line);
  background: var(--h-surface); color: var(--h-fg); font-variant-numeric: tabular-nums }
.h-dtable thead th { border-top: 0; background: var(--h-c3); color: var(--h-fg2); font-size: 13px; font-weight: 700 }
.h-dtable tbody th { font-weight: 700 }
.h-dtable tr.h-alt > * { background: var(--h-c1) }
.h-dtable .h-num { text-align: right }
.h-dtable td.h-num { font-weight: 600 }
.h-dtable .h-cell-d { display: block; font-size: 13px; font-weight: 400; color: var(--h-fg2) }
.h-dtable thead th:first-child, .h-dtable tbody th[scope="row"] { position: sticky; left: 0; z-index: 1 }
.h-dtable.h-more-l thead th:first-child, .h-dtable.h-more-l tbody th[scope="row"] { box-shadow: 8px 0 8px -6px rgb(0 0 0 / 0.35) }
.h-dtable .h-dgroup th { padding: 0; background: var(--h-c2); border-top: 1px solid var(--h-outline) }
.h-dtable .h-dgroup th > span { position: sticky; left: 0; display: inline-block; padding: 12px; font: 800 15px var(--h-font); color: var(--h-fg) }
.h-dshade { position: absolute; top: 0; right: 0; bottom: 0; width: 14px; pointer-events: none; opacity: 0; transition: opacity 0.2s;
  background: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.28)) }
.h-dtable.h-more-r .h-dshade { opacity: 1 }
.h-dbar { position: relative; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--h-line); visibility: hidden }
.h-dtable.h-over .h-dbar { visibility: visible }
.h-dbar > span { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--h-outline) }
@media (prefers-reduced-motion: reduce) { .h-dshade { transition: none } }
.h-table-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px }
[data-basics] .h-table-sum { margin-top: -2px }
.h-btn.h-edit-btn { display: inline-flex; align-items: center; gap: 6px; padding-inline: 14px 18px }
.h-btn.h-edit-btn svg { width: 18px; height: 18px; flex: none }
/* An ⓘ with its words: the action color, no fill (it opens a thought bubble) */
.h-infobtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 8px; border: 0; border-radius: 99px;
  background: none; color: var(--h-primary); font: 700 15px var(--h-font); cursor: pointer; text-align: left }
.h-infobtn svg { width: 20px; height: 20px; flex: none }
.h-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px }

/* ThoughtBubble: an ⓘ's words beside it, a tail of small circles back to it; placed by hai1y.js (fixed to the window,
   so no scrolling box cuts it off); scrolls inside when longer than the window */
.h-thought { position: absolute; width: 0; height: 0; overflow: visible; z-index: 1000 }
.h-thought-body { position: fixed; z-index: 1000; width: max-content; overflow: auto; overscroll-behavior: contain;
  padding: 14px 16px; border-radius: 22px; background: var(--h-c3); color: var(--h-fg); border: 1.5px solid var(--h-outline);
  box-shadow: 0 12px 28px -14px rgb(0 0 0 / 0.5); font: 15px/1.45 var(--h-font); text-align: left; white-space: normal }
.h-thought-body > * + * { margin-top: 8px }
.h-thought-body p { margin: 0 }
.h-thought-body dl { margin: 0; display: grid; gap: 10px }
.h-thought-body dt { font-weight: 700 }
.h-thought-body dd { margin: 2px 0 0 }
.h-thought-dot { position: fixed; z-index: 1000; border-radius: 50%; background: var(--h-c3); border: 1.5px solid var(--h-outline) }
.h-thought.h-yield { visibility: hidden }   /* a pinned bubble out of the way of the control focus is on */

/* SettingEditor, FullTextOverlay (dialogs) */
dialog.h-panel { border: 0; border-radius: 24px; padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--h-c3); color: var(--h-fg) }
dialog.h-panel::backdrop { background: rgb(0 0 0 / 0.45) }
dialog.h-panel .h-pbody { padding: 22px; display: grid; gap: 12px; max-height: 80vh; overflow: auto }
dialog.h-panel h2 { margin: 0; font: 700 20px var(--h-font) }
dialog.h-panel h4 { margin: 6px 0 0; font: 700 14px var(--h-font) }
dialog.h-panel p { margin: 0 }
dialog.h-panel input[type="range"] { width: 100%; accent-color: var(--h-primary) }
dialog.h-panel select { font: 16px var(--h-font); min-height: 44px; border-radius: 10px; padding: 0 10px }
dialog.h-full { border: 0; background: transparent; max-width: min(560px, calc(100vw - 32px)) }
dialog.h-full::backdrop { background: rgb(0 0 0 / 0.6) }
dialog.h-full div { background: var(--h-surface, #fff); color: var(--h-fg, #000); padding: 20px; border-radius: 18px; font-size: 17px }

/* Truncated */
.h-trunc { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; background: none; border: 0; padding: 0; text-align: left;
  font: inherit; color: inherit; width: 100% }
button.h-trunc { cursor: pointer }

/* Toggles: SlideToConfirm, SlideSwitch */
.h-slide { display: grid; gap: 8px }
.h-track { position: relative; height: 56px; border-radius: 99px; background: var(--h-brand-surface); color: var(--h-brand-on-surface);
  display: grid; place-items: center; font: 700 14px var(--h-font); user-select: none; touch-action: none; border: 1px solid var(--h-line); cursor: pointer }
.h-knob { position: absolute; top: 5px; left: 5px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--h-brand-knob-a), var(--h-brand-knob-b)); color: var(--h-brand-on-knob); font-size: 20px;
  box-shadow: 0 4px 12px -4px var(--h-brand-knob-b); transition: transform 0.25s ease }
.h-track.h-dragging .h-knob { transition: none }
/* Confirmed: locked at the end with a check, saying what happened */
.h-track.h-locked { cursor: default } .h-track.h-locked > span:first-child { padding: 0 60px 0 20px }
.h-track.h-locked .h-knob { left: auto; right: 5px } .h-track.h-locked .h-knob svg { width: 24px; height: 24px }
.h-slide .h-state { font-size: 14px; color: var(--h-fg2) }

/* Chat: ChatBubble, ReplyButtons, Hai1yButton */
.h-bubble-wrap { display: flex }
.h-bubble-wrap.h-you { justify-content: flex-end }
.h-bubble { max-width: min(520px, 86%); border-radius: 16px; padding: 10px 12px; background: var(--h-c2); font-size: 16px }   /* c2: a loss pill in a table inside keeps 4.5:1 (axe color-contrast) */
.h-you .h-bubble { background: var(--h-hai1y-c); color: var(--h-on-hai1y-c) }
/* Who said it: the message's heading, drawn as the small label over the words it always was */
.h-bubble > .h-who { display: block; margin: 0 0 2px; font: inherit; font-size: 12px }
.h-bubble > .h-who:has(+ :is(.h-md, .h-rich) > p:first-child) { line-height: normal }   /* as when it sat in the first paragraph */
/* ChatHistory: earlier messages behind one disclosure, above the current ones; the chevron turns when it's open */
.h-chat-history { display: grid; gap: 12px }
.h-chat-history > .h-btn { justify-self: center; gap: 6px }
.h-chat-history > .h-btn > svg { width: 22px; height: 22px; transition: transform 0.2s ease }
.h-chat-history > .h-btn[aria-expanded="true"] > svg { transform: rotate(180deg) }
.h-ch-earlier { display: grid; gap: 12px } .h-ch-earlier[hidden] { display: none }
/* Its days: a heading each ("Today", "Yesterday", "Fri Oct 30"), centered over that day's messages */
.h-ch-day { display: grid; gap: 12px }
.h-ch-day-h { margin: 0; font: 700 13px/1.3 var(--h-font); color: var(--h-fg2); text-align: center }
@media (prefers-reduced-motion: reduce) { .h-chat-history > .h-btn > svg { transition: none } }
.h-replies { display: grid; gap: 8px }
.h-replies button { min-height: 52px; border-radius: 16px; border: 2px solid var(--h-primary); background: var(--h-primary-c);
  color: var(--h-on-primary-c); font: 700 16px var(--h-font); padding: 6px 16px; text-align: left; cursor: pointer }
/* The chat button: HAi1Y's mark (Chris, 2026-10-28), its circle lined up with the edge and its speech tail hanging past it;
   the button grows into the pill, the mark staying in its end. 72px marks: the circle's outer edge is 64px across. */
.h-hb { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 0; padding: 0; background: none; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 10px 22px -12px var(--h-logo-ink) }
.h-hbmark { flex: none; width: 60px; height: 60px; display: grid; place-items: center }
.h-hbmark svg { margin: -6px; transform: translate(-1.44px, .72px) }
.h-hb .h-hbmark { width: 64px; height: 64px } .h-hb .h-hbmark svg { margin: -4px }
/* The corner (Chris, 2026-10-29): what a HAi1Y bubble is for, at its top right, an icon or a count; white, ringed in the logo's teal */
.h-corner { position: absolute; top: -4px; right: -4px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; display: grid;
  place-items: center; background: var(--h-on-logo); color: var(--h-logo); border: 2px solid var(--h-logo-edge); font: 700 12px/1 var(--h-font) }
.h-corner svg { width: 14px; height: 14px }
.h-compose .h-send svg { width: 22px; height: 22px }
/* HAi1Y's logo grown long (Chris, 2026-10-28): the mark's navy carried along a pill edged in its teal, the mark (open)
   in the round end with its tail hanging past the edge. The chat button's preview, and the prompt field. */
.h-long { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 0 4px 0 0; border-radius: 32px; color: var(--h-on-logo);
  background: linear-gradient(90deg, var(--h-logo) 62px, var(--h-logo-mid) 55%, var(--h-brand-b)) var(--h-brand-b); border: 2px solid var(--h-logo-edge); box-shadow: 0 12px 24px -12px var(--h-brand-b) }
.h-long .h-hbmark { align-self: flex-end }
.h-nudge { gap: 4px }
.h-nudge > button.h-open { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 8px; padding: 0; background: none; border: 0; color: inherit; text-align: left; font: inherit; cursor: pointer }
.h-nudge .h-t { display: grid; padding: 8px 0; font-size: 14px; line-height: 1.3 }
.h-nudge .h-name { display: flex; align-items: center; gap: 8px; font-size: 13px }
.h-nudge .h-new { padding: 1px 8px; border-radius: 99px; background: var(--h-on-logo); color: var(--h-logo-ink); font: 700 12px/1.4 var(--h-font) }
.h-nudge .h-iconbtn { color: var(--h-on-logo); align-self: flex-start; margin-top: 8px }   /* ✕ keeps to the top right on more lines */
/* The long pill is dark in both modes (navy to teal): a ring inside it (the preview's ✕ and open, the prompt field's
   send and close) takes its white words' color, 3:1 or better all along it; the action blue fell to 1.20:1 on its teal
   end in light mode (WCAG 1.4.11). The field's own ring, outside the pill on the page, keeps the page's */
.h-theme .h-long :focus-visible { outline-color: var(--h-on-logo) }
.h-theme .h-nudge > button.h-open:focus-visible, .h-theme .h-compose .h-close:focus-visible { outline-offset: -3px }   /* inside the pill, never on the page */

/* Charts */
.h-chart { display: grid; gap: 8px }
.h-chart .h-sum { font-size: 15px; color: var(--h-fg2) }
.h-chart svg { width: 100%; height: auto; display: block; overflow: visible }
/* A chart's high and low float on it, on the page's color, so they read where they cross the line */
.h-chart .h-vplot { position: relative } .h-chart .h-float { position: absolute; margin: 4px 0; padding: 2px 6px; border-radius: 6px;
  background: color-mix(in srgb, var(--h-bg) 90%, transparent); font: 600 12px var(--h-font); color: var(--h-fg); pointer-events: none }
.h-chart svg text { font-family: var(--h-font); fill: var(--h-fg2) }
.h-chart .h-vread { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px }
.h-chart .h-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px }
.h-gainrow { display: grid; grid-template-columns: 64px 1fr minmax(84px, auto); align-items: center; gap: 8px; font-size: 14px; min-height: 30px }
.h-gainrow .h-barbox { position: relative; height: 16px }
.h-gainrow .h-barbox::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--h-line) }
.h-gainrow .h-b { position: absolute; top: 0; height: 16px; border-radius: 4px }
.h-gainrow .h-amt { text-align: right }
.h-readout .h-rch { text-align: right; white-space: nowrap }
.h-readout { display: grid; gap: 4px; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 14px; padding: 10px 12px }
.h-readout .h-when { font-size: 13px; color: var(--h-fg2) }
.h-readout .h-rrow { display: grid; grid-template-columns: 10px 1fr auto auto auto; align-items: center; gap: 8px; font-size: 14px }
.h-readout .h-rrow .h-value { text-align: right; white-space: nowrap }
.h-readout .h-rrow b { min-width: 52px }
.h-steps { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; pointer-events: none; padding: 0 4px;
  opacity: 0; transition: opacity 0.4s }
.h-steps[data-show="true"], .h-steps:focus-within { opacity: 1 }   /* shown while a step has focus, never fading under it */
.h-steps .h-col { display: grid; gap: 6px; pointer-events: auto }
.h-steps button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--h-primary); color: var(--h-on-primary); font: 700 18px var(--h-font); cursor: pointer }
.h-steps button:disabled { opacity: 0.35; cursor: default }
.h-donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap }
.h-donut .h-dring { position: relative; width: 160px; height: 160px; flex: none }
.h-donut .h-dring > svg { width: 100%; height: 100%; display: block }
/* The middle: the total, its label above and a change (ChangeText) or words under it, inside the ring */
.h-donut .h-dcenter { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1px; text-align: center; line-height: 1.2 }
.h-donut .h-dcenter b { font: 700 15px var(--h-font); color: var(--h-fg); white-space: nowrap }
.h-donut .h-dcenter small { font-size: 11px; color: var(--h-fg2) }
.h-donut .h-dcenter .h-change { font-size: 11px; padding: 0 4px }
.h-legend { display: grid; gap: 6px; font-size: 14px; min-width: 0 }
.h-legend .h-li { display: flex; gap: 8px; align-items: center }
.h-legend .h-dot { width: 12px; height: 12px; border-radius: 50%; flex: none }
.h-legend .h-li span:nth-child(2) { flex: 1 }

@media (prefers-reduced-motion: reduce) { .h-progress.h-run .h-fill, .h-spinner { animation: none } .h-progress.h-run .h-fill { width: 45% }
  .h-progress .h-fill, .h-card .h-chev, .h-switch, .h-switch::after, .h-knob, .h-steps { transition: none } }

/* SheetScroll (staysInSheet): a scroll area inside a sheet that never drags the sheet itself */
.h-sheet-scroll { overflow: auto; overscroll-behavior: contain }

/* MarkdownText (h-markdown): HAi1Y's Markdown */
.h-md { display: grid; gap: 8px; font-size: 16px; line-height: 1.5 }
.h-md p, .h-md ul, .h-md ol, .h-md blockquote, .h-md .h-md-h { margin: 0 }
.h-md ul, .h-md ol { padding-left: 1.4em; display: grid; gap: 4px }
.h-md .h-md-sub { margin-left: 1.2em }
.h-md .h-md-h { font: 700 17px var(--h-font) }
.h-md a { color: var(--h-primary); text-decoration: underline }
.h-md code { font-family: var(--h-mono); font-size: 0.9em; background: var(--h-c4); padding: 1px 5px; border-radius: 6px }
.h-md .h-md-code { font-family: var(--h-mono); font-size: 14px; background: var(--h-c4); padding: 10px; border-radius: 10px; overflow-x: auto; margin: 0 }
.h-md blockquote { border-left: 3px solid var(--h-line); padding-left: 10px; color: var(--h-fg2) }
.h-md .h-md-table { overflow-x: auto; border: 1px solid var(--h-outline); border-radius: 12px }
.h-md table { border-collapse: collapse; width: 100%; font-size: 15px }
.h-md th, .h-md td { padding: 8px 12px; text-align: left; border-top: 1px solid var(--h-line) }
.h-md thead th { border-top: 0; font-weight: 700 }
.h-md tbody th { font-weight: 400 }
.h-md td { color: var(--h-value); font-weight: 600; font-variant-numeric: tabular-nums }
.h-readout .h-rrow.h-plotted { grid-template-columns: 10px 1fr auto }

/* ViewBanner (h-view-banner) */
h-view-banner { display: block; position: sticky; top: 0; z-index: 10 }
.h-vb { position: sticky; top: 0; z-index: 10 }   /* the banner and its settings panel, one landmark */
.h-view-banner { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; padding: 8px 12px; background: var(--h-surface);
  transition: transform 0.25s ease }
.h-view-banner.h-away { transform: translateY(-100%) }
.h-view-banner.h-away:focus-within { transform: none }   /* a focused control never slides out of sight (WCAG 2.4.11) */
/* A focused control scrolled into view lands clear of the sticky banner, never under it (WCAG 2.4.11) */
html:has(.h-vb) { scroll-padding-top: 88px }
.h-view-banner h1 { margin: 0; font: 700 22px var(--h-font); text-align: center }
.h-vb-end { display: grid; place-items: center }
.h-vb-profile img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover }
.h-vb-gear[aria-expanded="true"] { background: var(--h-primary-c) }
/* The view's own settings: the person's own controls, in a panel just under the banner */
.h-view-settings { display: grid; gap: 12px; padding: 4px 16px 16px; background: var(--h-hai1y-c); color: var(--h-on-hai1y-c); border-radius: 0 0 20px 20px }
.h-view-settings[hidden] { display: none }
@media (prefers-reduced-motion: reduce) { .h-view-banner { transition: none } }
/* SiteNav (h-site-nav, .h-nav; Chris, 2026-10-31): a site's links as HAi1Y's pills, the current one bold and underlined
   (never by color alone). Every link is a Tab stop; Left, Right, Home and End move between them (hai1y.js). Its focus
   ring is the theme's, 3px in the action color, which keeps 3:1 or better on the page in light and dark, and on a dark
   bar (.h-theme.h-dark, or .h-on-black) once the bar takes those tokens. */
.h-nav ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none }
.h-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 99px; color: var(--h-fg2);
  font: 700 15px var(--h-font); text-decoration: none; white-space: nowrap }
.h-nav a:hover { background: var(--h-c2); color: var(--h-fg) }
.h-nav a[aria-current] { color: var(--h-fg); font-weight: 800; box-shadow: inset 0 -3px 0 currentColor }
/* A link's mark (Chris, 2026-10-31): an app's own picture beside the link's words (its logo as its home tab), drawn
   out of reading (aria-hidden), so the link's name stays its words, heard once. With hide-text the words are only heard:
   the link takes the mark's size and shape (--h-nav-mark-radius, round by default), its focus ring round the mark, and
   the current one underlined beneath the mark, as the other links are (never by color alone) */
/* A link's tag ("Beta", Chris, 2026-10-31): a small outlined pill after its words, part of its name ("Blog Beta") */
.h-nav .h-nav-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; border: 1.5px solid currentColor;
  font: 700 12px/1.2 var(--h-font); letter-spacing: .04em; text-transform: uppercase; vertical-align: middle }
.h-nav a.h-nav-marked { gap: 8px }
.h-nav .h-nav-mark { display: inline-flex; flex: none; align-items: center; justify-content: center }
.h-nav .h-nav-mark > img { display: block; width: var(--h-nav-mark-size, 28px); height: auto }
.h-nav a.h-nav-mark-only { position: relative; padding: 0; min-width: 44px; justify-content: center; border-radius: var(--h-nav-mark-radius, 50%) }
.h-nav a.h-nav-mark-only[aria-current] { box-shadow: none }
.h-nav a.h-nav-mark-only[aria-current]::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -9px; height: 3px;
  border-radius: 2px; background: currentColor }
/* SkipLink (h-skip-link, .h-skip): the page's first stop, out of sight until it's focused, then at the top left */
.h-skip { position: absolute; left: 8px; top: 8px; z-index: 1001; padding: 12px 18px; border-radius: 12px; background: var(--h-surface);
  color: var(--h-primary); font: 700 16px var(--h-font); text-decoration: underline; border: 2px solid var(--h-primary); box-shadow: var(--h-shadow) }
.h-skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; white-space: nowrap }

/* HAi1Y's mark, spinning (h-sphere spin): its symbol turns like a globe twice, under 5 seconds (WCAG 2.2.2), and again on
   hover; with reduced motion it stays still */
.h-spin .h-globe { transform-box: fill-box; transform-origin: center; animation: h-globe 2.4s ease-in-out 2 }
.h-spin:hover .h-globe { animation: h-globe-again 2.4s ease-in-out 1 }
@keyframes h-globe { 0% { transform: scaleX(1) } 50% { transform: scaleX(-1) } 100% { transform: scaleX(1) } }
@keyframes h-globe-again { 0% { transform: scaleX(1) } 50% { transform: scaleX(-1) } 100% { transform: scaleX(1) } }
@media (prefers-reduced-motion: reduce) { .h-spin .h-globe, .h-spin:hover .h-globe { animation: none } }

/* SlideSwitch's handle (Chris, 2026-10-28): the 👍 emoji on a dark circle (the brand's track end) ringed in the knob's
   color; it turns from down to up (still with reduced motion) */
.h-slide [role="switch"] .h-knob { background: var(--h-brand-surface); border: 3px solid var(--h-brand-knob-b) }
.h-slide .h-knob .h-thumb { font-size: 22px; line-height: 1; transform: rotate(180deg); transition: transform 0.35s ease }
.h-slide [aria-checked="true"] .h-knob .h-thumb { transform: rotate(0deg) }
.h-track.h-dragging .h-knob .h-thumb { transition: none }   /* while dragged, the thumb follows the finger */
@media (prefers-reduced-motion: reduce) { .h-slide .h-knob .h-thumb { transition: none } }

/* Button (h-button), DangerButton, BusyButton: words and an icon on one line; danger in the error color led by a ⚠,
   never color alone */
.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px }
.h-btn > svg { flex: none; width: 18px; height: 18px }
.h-btn.h-danger { background: var(--h-error); color: var(--h-on-error) }
.h-spinner.h-small { width: 16px; height: 16px; border-width: 2px; flex: none }
.h-busy .h-spinner { border-color: color-mix(in srgb, var(--h-tonal-text) 30%, transparent); border-top-color: var(--h-tonal-text) }
.h-btn:disabled { opacity: 0.6; cursor: default }

/* ConfirmDialog: the settings panel's sheet, its question a heading, Cancel then the action */
dialog.h-confirm .h-confirm-text { color: var(--h-fg2) }
dialog.h-confirm .h-actions { margin-top: 4px }
.h-btn[aria-disabled="true"] { opacity: 0.6; cursor: progress }

/* ActionList: each row a whole cell, separators inside the rows */
.h-alist { list-style: none; margin: 0; padding: 0 }
.h-alist li { display: flex; align-items: center; gap: 4px; min-height: 56px; border-top: 1px solid var(--h-outline) }
.h-alist li:first-child { border-top: 0 }
.h-alist-t { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 6px 0 }
.h-alist-t b { font-weight: 600; font-size: 16px } .h-alist-t small { font-size: 13px; color: var(--h-fg2) }
.h-alist .h-alist-main { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 4px; border: 0; background: none;
  color: var(--h-fg); font: inherit; text-align: left; cursor: pointer }
.h-alist-plus { color: var(--h-primary); display: grid } .h-alist-plus svg { width: 22px; height: 22px }
.h-alist-empty { margin: 0; color: var(--h-fg2) }

/* TextField: its label above it, always shown */
.h-field { display: grid; gap: 6px }
.h-field label { font-weight: 700; font-size: 15px }
.h-field-row { display: flex; gap: 8px; align-items: center }
.h-field-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--h-outline);
  border-radius: 12px; background: var(--h-surface) }
.h-field-box:focus-within { outline: 3px solid var(--h-primary); outline-offset: 2px }
.h-field-box svg { flex: none; width: 20px; height: 20px; color: var(--h-fg2) }
.h-field-box input { flex: 1; min-width: 0; border: 0; background: none; font: 16px var(--h-font); color: var(--h-fg); padding: 10px 0; outline: none }
.h-theme .h-field-box input:focus-visible { outline: none }
.h-field-hint { font-size: 13px; color: var(--h-fg2) }

/* SelectButton, DropdownPicker: the label and the field one control (one focus ring around both); the list as wide as
   the field, the chosen option checked */
.h-picker { position: relative; display: flex; align-items: center; gap: 12px; border-radius: 16px }
.h-picker .h-pk-label { flex: 1; margin: 0; font: 600 15px var(--h-font); cursor: pointer }
.h-picker:has(.h-pk-field:focus-visible) { outline: 3px solid var(--h-primary); outline-offset: 4px }
.h-theme .h-picker .h-pk-field:focus-visible { outline: none }
.h-pk-anchor { position: relative }
.h-pk-field { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 8px 6px 14px; border-radius: 99px; cursor: pointer;
  background: var(--h-surface); border: 1.5px solid var(--h-primary); color: var(--h-primary); font: 600 15px var(--h-font); white-space: nowrap; user-select: none }
.h-pk-chev { display: grid } .h-pk-chev svg { width: 20px; height: 20px }
.h-pk-field[aria-expanded="true"] .h-pk-chev { transform: rotate(180deg) }
.h-pk-list { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; min-width: 100%; width: max-content; max-width: min(360px, 90vw); max-height: 320px;
  overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; border-radius: 12px; background: var(--h-c3); border: 1px solid var(--h-outline);
  box-shadow: 0 12px 28px -14px rgb(0 0 0 / 0.5) }
.h-pk-list [role="option"] { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; cursor: pointer; color: var(--h-fg); font-size: 16px }
.h-pk-list [role="option"] span { flex: 1 }
.h-pk-list [role="option"] svg { flex: none; width: 20px; height: 20px; visibility: hidden }
.h-pk-list [aria-selected="true"] { font-weight: 700 } .h-pk-list [aria-selected="true"] svg { visibility: visible }
.h-pk-list .h-active { background: var(--h-primary-c); color: var(--h-on-primary-c); outline: 2px solid var(--h-primary); outline-offset: -2px }
.h-picker.h-wide { display: grid; gap: 6px; align-items: stretch }
.h-picker.h-wide .h-pk-label { font-weight: 700 }
.h-picker.h-wide .h-pk-field { min-height: 56px; padding: 8px 8px 8px 16px; border-radius: 12px; border: 1px solid var(--h-outline); color: var(--h-fg); font-weight: 400; font-size: 16px }
.h-picker.h-wide .h-pk-value { flex: 1 }
.h-picker.h-wide .h-pk-list { left: 0; right: 0; width: auto; max-width: none }
@media (prefers-reduced-motion: no-preference) { .h-pk-chev { transition: transform 0.2s } }

/* ChartLineRow, ChartLineGroup, ChartLimits: the row a whole cell (the separator inside it), its buttons after it */
.h-ln { display: flex; align-items: center; gap: 2px; min-height: 56px }
.h-ln.h-divider { border-top: 1px solid var(--h-outline) }
.h-ln-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 4px; border: 0; background: none;
  color: var(--h-fg); font: inherit; text-align: left }
button.h-ln-main { cursor: pointer }
.h-ln-main .h-box { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--h-fg); display: grid; place-items: center }
.h-ln-main .h-box svg { width: 16px; height: 16px; visibility: hidden }
.h-ln-main[aria-checked="true"] .h-box { background: var(--h-primary); border-color: var(--h-primary); color: var(--h-on-primary) }
.h-ln-main[aria-checked="true"] .h-box svg { visibility: visible }
.h-ln-sample { flex: none; width: 28px }
.h-ln-t { flex: 1; min-width: 0; display: grid; gap: 1px }
.h-ln-kind { justify-self: start; font: 700 11px var(--h-font); letter-spacing: 0.04em; padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--h-fg) 60%, transparent); border-radius: 4px }
.h-ln-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0 }
.h-ln-line b { font-size: 16px; font-weight: 600; white-space: nowrap }
.h-ln-name { flex: 1 1 5em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--h-fg2) }
.h-ln-tag { flex: none; font: 600 12px var(--h-font); padding: 0 8px; border: 1px solid var(--h-fg); border-radius: 99px }
.h-ln-t small { font-size: 13px; color: var(--h-fg2) }
.h-ln-c { flex: none } .h-ln-none { font-weight: 600 }
.h-ln-lock[aria-pressed="true"] svg rect { fill: currentColor }
.h-ln-lock[aria-disabled="true"] { color: var(--h-outline); cursor: default }
.h-ln-group { margin: 0; padding: 10px 4px; border-top: 1px solid var(--h-outline); background: var(--h-c2); font: 800 15px var(--h-font); color: var(--h-fg) }
.h-limits { margin: 0; font-size: 14px } .h-limits > span[aria-hidden] { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center }
.h-limit { display: inline-flex; align-items: center; gap: 6px } .h-limit svg { width: 18px; height: 18px }
.h-limit-box { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--h-fg); border-radius: 4px }
.h-limit-box svg { width: 14px; height: 14px }

/* AboutHeading: a heading with its ⓘ at the row's end; the ⓘ's bubble may end in Ask HAi1Y About It */
.h-about-head { display: flex; align-items: center; gap: 8px }
.h-about-head > :first-child { flex: 1; margin: 0; font: 700 17px var(--h-font) }
/* A DataTable's title with its ⓘ: the table's title size, its ⓘ at the row's end */
.h-dtable > .h-about-head { margin: 0 0 4px }
.h-dtable > .h-about-head > .h-ttitle { font: 700 16px var(--h-font) }
.h-thought-body .h-ask { margin-top: 4px }

/* Hai1yTip: HAi1Y's sphere and a speech bubble tucked toward it (a square corner by the sphere), ✕ beside it */
.h-tip { display: flex; align-items: center; gap: 2px }
.h-tip-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit }
.h-tip-open > svg { flex: none }
.h-tip-bubble { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 8px 6px 8px 14px; border-radius: 4px 16px 16px 16px;
  background: var(--h-primary-c); border: 1.5px solid var(--h-primary); color: var(--h-on-primary-c); font: 600 16px var(--h-font) }
.h-tip-bubble > span:not(.h-sr) { flex: 1 } .h-tip-bubble svg { flex: none; width: 22px; height: 22px; color: var(--h-primary) }

/* WaitingDrive: a field of yard lines in the brand's track, a ball carried to the posts, then the next drive; still
   (the ball at the posts) with reduced motion */
.h-drive { position: relative; display: block; width: 100%; height: 16px; border-radius: 8px; overflow: hidden;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), color-mix(in srgb, var(--h-brand-fill) 35%, transparent) calc(10% - 1px) 10%) 0 3px / calc(100% - 10px) 10px no-repeat, var(--h-brand-track) }
.h-drive-posts { position: absolute; right: 2px; top: 1px; bottom: 1px; width: 8px; border-right: 2px solid var(--h-brand-fill) }
.h-drive-posts::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: var(--h-brand-fill) }
.h-drive-ball { position: absolute; top: 4px; left: calc(100% - 26px); width: 12px; height: 8px; border-radius: 50%; background: var(--h-brand-fill) }
@media (prefers-reduced-motion: no-preference) { .h-drive-ball { animation: h-drive 3.2s linear infinite } }
@keyframes h-drive { 0% { left: 0 } 80%, 100% { left: calc(100% - 26px) } }
h-waiting-drive { display: block }
.h-progress .h-wait-art:has(.h-drive) { justify-self: stretch }

/* LoadScreen: its heading, then the state's area filling what's left */
.h-load { display: grid; gap: 12px }
.h-load-head { margin: 0; font: 700 20px var(--h-font) } .h-load-head:focus { outline: none } .h-load-head:focus-visible { outline: 3px solid var(--h-primary) }
.h-load-area { min-height: var(--h-load-min, 220px); display: grid; align-content: center; padding: 16px }
.h-load-area .h-progress:focus { outline: none } .h-load-area .h-progress:focus-visible, .h-load-area p:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 4px }
.h-load-area p:focus { outline: none }

/* Hai1yReveal: the chat filling the window, grown from HAi1Y's button (its colors giving way to the page's) */
dialog.h-reveal { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--h-surface); color: var(--h-fg); overflow: auto }
dialog.h-reveal::backdrop { background: transparent }
.h-reveal-tint { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(160deg, var(--h-logo-mid), var(--h-logo)) }
.h-reveal-body { position: relative; min-height: 100%; padding: 16px; display: grid; align-content: start; gap: 12px }

/* GroupedAllocationDonut: the ring (turning the focused slice to the bottom), the magnifier off its bottom right with a
   line from that slice, the legend rows filled with each slice's color and pattern, their words on plates of the page's color */
.h-gdonut { display: grid; gap: 12px }
.h-gd-stage { position: relative; height: 276px }
.h-gdonut.h-zoomed .h-gd-stage { height: 220px }
.h-gd-ring { position: absolute; left: calc(50% - 110px); top: 0; width: 220px; height: 220px }
.h-gd-ring > svg { width: 100%; height: 100%; display: block; overflow: visible }
.h-gd-turn { transform-box: view-box; transform-origin: 110px 110px; transition: transform 0.5s cubic-bezier(.3,1.3,.5,1) }
.h-gdonut.h-still .h-gd-turn { transition: none }
.h-gd-slice { transition: opacity 0.2s } .h-gd-slice.h-dim { opacity: 0.55 }
.h-gd-ring .h-dcenter { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1px; text-align: center; line-height: 1.2 }
.h-gd-ring .h-dcenter b { font: 700 20px var(--h-font); color: var(--h-value); white-space: nowrap }
.h-gd-ring .h-dcenter small { font-size: 13px; color: var(--h-fg2) }
.h-gd-ring .h-dcenter .h-change { font-size: 12px; padding: 0 4px }
.h-gd-lead { position: absolute; left: calc(50% - 150px); top: 0; width: 300px; height: 280px; overflow: visible; pointer-events: none; opacity: 0; transition: opacity 0.2s }
.h-gd-lead circle { fill: var(--h-fg) } .h-gd-lead line { stroke: var(--h-fg); stroke-width: 2 }
.h-gdonut.h-zoomable .h-gd-lead { opacity: 1 }
.h-gd-zoom { position: absolute; left: calc(50% + 106px); top: 216px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--h-primary); color: var(--h-on-primary); cursor: pointer }
.h-gd-zoom svg { width: 22px; height: 22px }
.h-gd-back { position: absolute; left: 0; top: 0 }
.h-gd-title { margin: 0; font: 700 20px var(--h-font) }
.h-gd-cols { display: flex; justify-content: flex-end; gap: 10px; padding-right: 12px; font: 600 13px var(--h-font); color: var(--h-fg2) }
.h-gd-cols span:first-child { min-width: 88px; text-align: right } .h-gd-cols span:last-child { min-width: 38px; text-align: right }
.h-gd-legend { list-style: none; margin: 0; padding: 0; display: grid }
.h-gd-row { width: 100%; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 6px; border: 0; border-top: 2px solid var(--h-surface);
  cursor: pointer; text-align: left; font: inherit; color: var(--h-fg); transition: transform 0.15s }
/* The rest step back: their fill fades toward the page (never their words, which stay at full contrast on their plates) */
.h-gd-row.h-dim { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--h-surface) 45%, transparent) }
.h-gd-row.h-sel { transform: scale(1.02); box-shadow: 0 6px 14px -6px rgb(0 0 0 / 0.5), inset 0 0 0 3px var(--h-fg); position: relative; z-index: 1 }
.h-gd-words { flex: 1; min-width: 0; display: grid; padding: 3px 8px; border-radius: 10px; background: var(--h-surface) }
.h-gd-name { display: flex; gap: 8px; flex-wrap: wrap } .h-gd-name b { font-size: 16px }
.h-gd-words small { font-size: 13px; color: var(--h-fg2) }
.h-gd-nums { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 10px; background: var(--h-surface) }
.h-gd-ch { min-width: 88px; text-align: right } .h-gd-share { min-width: 38px; text-align: right }
@media (prefers-reduced-motion: reduce) { .h-gd-turn, .h-gd-slice, .h-gd-lead, .h-gd-row { transition: none } }
/* A code block (code_block_html): its caption, then its Copy button at the end of the line (on a line of its own when
   both don't fit; the button never wraps), "Copied" under it for a moment, then the code, scrolling sideways */
.h-code { margin: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px }
.h-code > figcaption { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere }
.h-code > .h-copy { flex: 0 0 auto; margin-left: auto; min-height: 44px; white-space: nowrap }
.h-code > .h-copied { flex: 1 0 100%; text-align: end; font: 700 13px var(--h-font); color: var(--h-fg) }
.h-code > pre { flex: 1 0 100%; min-width: 0; margin: 0; overflow-x: auto }
