/*
 * 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.
 */
/* A light SlideFrame (h-slide-frame) takes these light tokens even inside a dark page: its selector outranks the dark ones */
.h-theme, .h-theme.h-light.h-slide-frame.h-sf-light {
  --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-you-who: #022A69;
  --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: #334155; --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-you-who: #CDF3F2;
  --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: #CBD5E1; --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-you-who: #CDF3F2;
    --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: #CBD5E1; --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: #CBD5E1; --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 */
/* StatusBar and UsageBar: one line each, for a short space; stacked once there's no room for the line */
.h-bar-line { display: block; container-type: inline-size }
.h-bar-line .h-progress { grid-template-columns: minmax(0, 2fr) minmax(96px, 1fr) minmax(0, 2fr); align-items: center; gap: 4px 12px; padding: 6px 0 }
.h-bar-line .h-title, .h-bar-line .h-row > * { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }   /* one line each (Chris, 2026-11-09) */
.h-bar-line .h-title { color: var(--h-hai1y) }
.h-bar-line .h-row { flex-wrap: nowrap; min-width: 0 }
.h-bar-line .h-row > .h-done { flex-shrink: 0 }   /* Done ✓ stays whole; a long close is what gives way */
.h-bar-line .h-progress.h-run .h-track { display: none }
.h-bar-line .h-progress.h-run .h-wait-art { display: block }
.h-progress.h-attention .h-fill { background: var(--h-error) }
.h-progress.h-finished .h-fill { background: var(--h-gain) }
@container (max-width: 480px) { .h-bar-line .h-progress { grid-template-columns: minmax(0, 1fr) } }
/* UsageMeters (h-usage-meters, a list of compact h-usage-bar): how much is used, small enough to sit beside a heading
   (Chris, 2026-11-09: Session and Weekly beside the chat's title). Names, bars and percents in three shared columns,
   so the meters line up; each is still one stop, heard whole. */
.h-usage-meters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: max-content 48px max-content; gap: 2px 8px; align-items: center }
.h-usage-meters > li, .h-usage-meters .h-bar-line, .h-usage-meters .h-bar-line .h-progress { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; min-width: 0 }
.h-usage-meters .h-bar-line { container-type: normal }
.h-usage-meters .h-bar-line .h-progress { gap: 0 8px; padding: 0 }
.h-usage-meters .h-progress .h-title { font-size: 12px; font-weight: 400; color: var(--h-fg2) }
.h-usage-meters .h-progress .h-track { height: 5px }
.h-usage-meters .h-progress .h-row { font-size: 12px; justify-content: end }
.h-section > .h-shead:has(.h-usage-meters) { flex-wrap: wrap }
/* stacked: the bar between its name and its words, the width of the space, so the drive has room (Chris, 2026-11-09) */
.h-bar-line.h-stacked .h-progress { grid-template-columns: minmax(0, 1fr); padding: 8px 0 }
/* BarTray: a chat's bars in a strip of their own on top of the conversation, which scrolls beneath it and never mixes
   with it (Chris, 2026-11-09). Many bars make a grid, each stacked and a little smaller; past a few rows the strip
   scrolls itself, so the chat keeps its room. */
.h-bar-tray { list-style: none; margin: 0; padding: 4px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0 14px; max-height: 30vh; overflow-y: auto; flex-shrink: 0; border-radius: 6px; background: var(--h-c2) }
/* Each bar's three lines (its name, the bar or the drive, its words) are the tray's rows, shared across a row of cells,
   so a name that wraps moves its neighbours' bars down with its own and the bars line up (Chris, 2026-11-09) */
.h-bar-tray > li, .h-bar-tray .h-bar-line, .h-bar-tray .h-bar-line .h-progress { display: grid; grid-row: span 3; grid-template-rows: subgrid; min-width: 0 }
/* a container can't share its parent's rows, and in the tray every bar is already narrow */
.h-bar-tray .h-bar-line { container-type: normal }
.h-bar-tray .h-bar-line .h-progress { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 5px 0 }
.h-bar-tray .h-progress .h-title { align-self: end }
.h-bar-tray .h-progress .h-row { align-self: start }
.h-bar-tray .h-progress .h-title { font-size: 13px }
.h-bar-tray .h-progress .h-row { font-size: 12px; gap: 0 8px; flex-wrap: wrap }
/* a cell is narrow, so its name and words wrap rather than lose their ends */
.h-bar-tray .h-bar-line .h-title, .h-bar-tray .h-bar-line .h-row > * { white-space: normal; overflow-wrap: anywhere }
.h-bar-tray .h-progress .h-track { height: 6px }
.h-bar-tray .h-progress .h-wait-art { justify-self: stretch }
.h-bar-tray .h-drive { height: 12px }
.h-bar-tray .h-drive-ball { top: 3px; width: 10px; height: 6px }
.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-primary); 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 } }
/* Hai1yPromptField's commands (a terminal's "/"): a list above the field, as wide as it, the picked one as a picker's */
.h-compose { position: relative }
.h-cmds { position: absolute; z-index: 30; left: 0; right: 0; bottom: calc(100% + 6px); max-height: min(320px, 50vh); 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); cursor: default }
.h-cmds [role="option"] { display: grid; gap: 2px; min-height: 44px; padding: 6px 16px; align-content: center; cursor: pointer; color: var(--h-fg); font: 15px/1.35 var(--h-font) }
.h-cmds .h-cmd-name { font-weight: 700 } .h-cmds .h-cmd-hint { font-weight: 400; color: var(--h-fg2) } .h-cmds .h-cmd-about { color: var(--h-fg2) }
.h-cmds .h-active { background: var(--h-primary-c); color: var(--h-on-primary-c); outline: 2px solid var(--h-primary); outline-offset: -2px }
.h-cmds .h-active .h-cmd-hint, .h-cmds .h-active .h-cmd-about { color: inherit }
.h-term-look .h-cmds { border-radius: 6px; background: var(--h-bg) } .h-term-look .h-cmds [role="option"] { font-size: 14px }

/* 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) }
/* Blue in every state (Chris, 2026-11-04): off is an outlined thumb and edge; on is filled, with a check in the thumb */
.h-switch { width: 52px; height: 32px; border-radius: 99px; background: var(--h-surface); border: 2px solid var(--h-primary); position: relative; flex: none; transition: background 0.2s }
.h-switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--h-primary); 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) }
[aria-checked="true"] .h-switch::before { content: ""; position: absolute; z-index: 1; width: 5px; height: 11px; top: 6px; left: 30px; box-sizing: border-box;
  border: solid var(--h-primary); border-width: 0 2px 2px 0; transform: rotate(45deg) }
.h-theme input[type="checkbox"], .h-theme input[type="radio"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; box-sizing: border-box;
  border: 2px solid var(--h-primary); border-radius: 4px; background: var(--h-surface); display: inline-grid; place-items: center; vertical-align: middle; cursor: pointer }
.h-theme input[type="radio"] { border-radius: 50% }
.h-theme input[type="checkbox"]:checked { background: var(--h-primary) }
.h-theme input[type="checkbox"]:checked::before { content: ""; width: 5px; height: 11px; margin-top: -2px; box-sizing: border-box; border: solid var(--h-on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg) }
.h-theme input[type="radio"]:checked::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--h-primary) }
.h-theme input[type="checkbox"]:disabled, .h-theme input[type="radio"]:disabled { border-color: var(--h-outline); cursor: default; opacity: 0.6 }
/* CheckRow, RadioList and ChipChoices: native inputs, each row one stop and one target */
.h-checkrow, .h-radiolist label { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer }
.h-checkrow:has(input:disabled), .h-radiolist label:has(input:disabled) { cursor: default; color: var(--h-fg2) }
.h-radiolist label { padding: 4px 0 } .h-radiolist .h-t small { display: block; font-size: 13px; color: var(--h-fg2) }
.h-radiolist, .h-chips { border: 0; margin: 0; padding: 0; min-width: 0 }
.h-chips { display: flex; flex-wrap: wrap; gap: 8px }
.h-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--h-primary);
  border-radius: 99px; color: var(--h-primary); background: var(--h-surface); font-weight: 600; cursor: pointer }
/* The chip's checkbox covers it, clear, so the chip is its target and its focus ring is the checkbox's own */
.h-theme .h-chip input[type="checkbox"], .h-theme .h-chip input[type="checkbox"]:checked { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  border: 0; border-radius: 99px; background: transparent; cursor: pointer }
.h-theme .h-chip input[type="checkbox"]::before { content: none }
.h-theme .h-chip input:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 2px }
.h-chip .h-chip-check { display: none } .h-chip .h-chip-check svg { width: 16px; height: 16px; display: block }
.h-chip:has(input:checked) { background: var(--h-primary-c); color: var(--h-on-primary-c) }
.h-chip:has(input:checked) .h-chip-check { display: inline }
.h-switchrow:disabled { cursor: default; color: var(--h-fg2) } .h-switchrow:disabled .h-switch, .h-switchrow:disabled .h-switch::after { border-color: var(--h-outline); background: var(--h-surface) }
.h-switchrow:disabled .h-switch::after { background: var(--h-outline) }
/* TitledScreen: the title row, a line, then the content */
.h-titled-head { padding: 8px 0 12px; border-bottom: 1px solid var(--h-line) }
.h-titled-head h1:first-child { font: 700 22px var(--h-font) }
.h-titled-body { display: grid; gap: 16px; padding-top: 16px }
@media (forced-colors: active) {
  .h-chip:has(input:checked) { border-width: 3px }
  .h-theme input[type="checkbox"]:checked { background: Highlight }
  .h-theme input[type="radio"]:checked::before { background: Highlight }
}
/* 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) }
/* An amount, not a change: above zero in the gain color, below it in the loss color (plain money, a cost or a debt, only
   when below zero); its sign carries the same, so color is never the only cue (Chris, 2026-11-07) */
.h-pos, .h-value.h-pos { color: var(--h-gain) } .h-neg, .h-value.h-neg { color: var(--h-loss) }
.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) }
/* A section's ⓘ sits right after its title; anything else in the row (usage meters) stays at the end */
.h-section > .h-shead > .h-about-head { flex: 1; min-width: 0; gap: 4px }
.h-section > .h-shead > .h-about-head > .h-stitle { flex: 0 1 auto }
.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) }
/* A table's title belongs to the table (Chris, 2026-11-13): the top band of its frame, the columns' names beneath it in the
   same rounded border. Still the heading screen readers land on before the table, and the table's label */
.h-ttitle:has(+ .h-dbox, + .h-table), .h-about-head:has(> .h-ttitle):has(+ .h-dbox, + .h-table) {
  margin: 0; padding: 12px 14px; background: var(--h-surface); border: 1px solid var(--h-outline); border-bottom: 0; border-radius: 12px 12px 0 0 }
.h-about-head:has(> .h-ttitle):has(+ .h-dbox, + .h-table) > .h-ttitle { margin: 0; padding: 0; border: 0; background: none }
:is(.h-ttitle, .h-about-head) + :is(.h-dbox, .h-table) { border-top-left-radius: 0; border-top-right-radius: 0 }
/* 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, and its own scrollbar showing where the view is (Sideways Scrolling, below). 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 }
.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 }
/* A row's name, in every table (data, name and value, settings, a chart's table, HAi1Y's in chat), in HAi1Y's navy
   (teal in dark mode), so the row stands out and bold elsewhere in it never reads as an action (Chris, 2026-11-07) */
.h-theme tbody th[scope="row"] { color: var(--h-hai1y) }
.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 }
@media (prefers-reduced-motion: reduce) { .h-dshade { transition: none } }
/* Sideways scrolling (2026-11-11, a demo's wide tables: a two-finger swipe went to the page or the browser's Back, and
   the drawn bar under the table couldn't be dragged, so a drag selected text instead). Every box that scrolls sideways
   shows its own scrollbar, always (never only while scrolling), thick enough to grab and drag, its thumb 3:1 or better
   on its track in light and dark (WCAG 1.4.11); a sideways swipe or wheel that reaches its end stops there rather than
   passing to the page and the browser's swipe Back (overscroll-behavior-x), while up and down still scroll the page.
   Chrome and Safari draw it from ::-webkit-scrollbar (only while scrollbar-width and scrollbar-color are auto, so an
   inherited scrollbar-color is reset); Firefox from scrollbar-color. The arrow keys still scroll a focused box. */
.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll {
  overscroll-behavior-x: contain; scrollbar-width: auto; scrollbar-color: auto }
:is(.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll)::-webkit-scrollbar { height: 12px; width: 12px }
:is(.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll)::-webkit-scrollbar-track { background: var(--h-c3); border-radius: 6px }
:is(.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll)::-webkit-scrollbar-thumb {
  background: var(--h-outline); border: 2px solid var(--h-c3); border-radius: 6px }
:is(.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll)::-webkit-scrollbar-thumb:hover { background: var(--h-fg2) }
:is(.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll)::-webkit-scrollbar-corner { background: transparent }
.h-dscroll::-webkit-scrollbar-track { margin: 0 10px }   /* clear of the box's rounded corners */
@supports not selector(::-webkit-scrollbar) {
  .h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll { scrollbar-color: var(--h-outline) var(--h-c3) }
}
@media print { :is(.h-dscroll, .h-table, .hx-scroll, .h-md-table, .h-md-code, .h-scroll, .h-code > pre, .h-wf-scroll)::-webkit-scrollbar { display: 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 { grid-template-columns: minmax(0, 1fr); 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 */

/* The terminal look (Chris, 2026-11-09: an IDE's chat, "something more terminal like"): .h-theme.h-term-look, Hai1yTheme's
   look="terminal". The same components and markup drawn as a terminal: the monospace font everywhere, flat sections,
   messages as full-width lines under a mark instead of bubbles (❯ the person's, on a band; ● HAi1Y's), and the prompt
   field as a bordered line after ❯ instead of HAi1Y's logo (always open: no bubble to close to, so no ✕). Who said it
   stays the message's heading, in words; the marks are drawn only. */
.h-theme.h-term-look { --h-font: var(--h-mono); --h-display: var(--h-mono); font-size: 14px }
.h-term-look .h-section { border-radius: 6px }
.h-term-look .h-section::before { display: none }
.h-term-look .h-section > .h-shead .h-stitle { font-size: 14px }
.h-term-look .h-btn { border-radius: 6px }
.h-term-look .h-md, .h-term-look .h-rich { font-size: 14px; line-height: 1.55 }
.h-term-look .h-md .h-md-h { font-size: 14px }
.h-term-look .h-md code, .h-term-look .h-md .h-md-code { font-size: 1em; border-radius: 4px }
.h-term-look .h-bubble-wrap { display: block }
.h-term-look .h-bubble { max-width: none; border-radius: 0; padding: 6px 0; background: none; color: inherit; font-size: 14px }
.h-term-look .h-you .h-bubble { padding: 8px 10px; border-left: 3px solid var(--h-hai1y); border-radius: 4px; background: var(--h-hai1y-c); color: var(--h-on-hai1y-c) }
.h-term-look .h-bubble > .h-who { display: flex; gap: 1ch; margin: 0 0 4px; font: 700 14px/1.4 var(--h-font); color: var(--h-hai1y) }
.h-term-look .h-you .h-bubble > .h-who { color: var(--h-you-who) }   /* "You" in an accent, the band in HAi1Y's tint (Chris, 2026-11-09) */
.h-term-look .h-bubble > .h-who::before { content: "●" / "" }
.h-term-look .h-you .h-bubble > .h-who::before { content: "❯" / "" }
/* ChatClose: a finished reply's last word in calm violet's band, apart from the progress above it (Chris, 2026-11-09) */
.h-chat-close { margin-top: 10px; padding: 8px 10px; border-left: 3px solid var(--h-calm); border-radius: 4px; background: var(--h-calm-c); color: var(--h-fg) }
.h-chat-close .h-chat-close-mark { margin: 0 0 2px; font-weight: 700; color: var(--h-calm) }
.h-chat-close .h-md > :first-child { margin-top: 0 } .h-chat-close .h-md > :last-child { margin-bottom: 0 }
.h-term-look .h-bubble > :not(.h-who) { margin-left: 2ch }   /* lined up past the mark */
.h-term-look .h-long { min-height: 0; align-items: flex-start; gap: 1ch; padding: 8px 10px; border: 1px solid var(--h-outline); border-radius: 6px;
  background: var(--h-bg); color: var(--h-fg); box-shadow: none }
.h-term-look .h-long::before { content: "❯" / ""; font: 700 14px/22px var(--h-font); color: var(--h-hai1y) }
.h-term-look .h-compose .h-hbmark, .h-term-look .h-compose .h-close { display: none }
.h-term-look .h-compose .h-cbox { padding: 0 }
.h-term-look .h-compose textarea, .h-term-look .h-compose .h-ph { font: 14px/22px var(--h-font); color: var(--h-fg) }
.h-term-look .h-compose textarea { caret-color: var(--h-hai1y) }
.h-term-look .h-compose .h-ph { color: var(--h-fg2) }
.h-term-look .h-compose .h-send { align-self: flex-end; width: 32px; height: 32px; margin: -5px -4px -5px 0; border-radius: 4px;
  background: var(--h-primary); color: var(--h-on-primary) }
.h-term-look .h-compose .h-send svg { width: 18px; height: 18px }
.h-theme.h-term-look .h-long :focus-visible { outline-color: var(--h-primary) }

/* 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-vread .h-vrow { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap }   /* several lines: each line's sample, name and value */
.h-chart .h-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px }
/* Waterfall (h-waterfall, React's Waterfall): a bridge from one total to another, change by change, the full width of
   its place. Totals in a neutral series color (never HAi1Y's navy or teal, never the action blue), a rise in the gain
   color, a fall in the loss color, a dashed connector from each bar's end to the next; each value is real text on the
   page's color above its bar (below it when it falls), each label beneath, wrapping. Each bar needs room for its value
   on one line: narrower, the chart scrolls sideways, its focus ring kept inside the scrolling box */
.h-waterfall .h-wf-scroll { overflow-x: auto; padding: 6px; margin: -6px }
/* Each column as wide as its longest value needs ([--h-wf-ch] characters, in the values' own font, so any font fits) */
.h-wf-inner { font-size: 12px; min-width: calc(var(--h-wf-n, 6) * (var(--h-wf-ch, 12) * 1ch + 16px)) }
.h-wf-plot { position: relative; cursor: crosshair; border-radius: 6px }
.h-waterfall .h-wf-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible }
.h-wf-zero { stroke: var(--h-outline); stroke-width: 1.5; vector-effect: non-scaling-stroke }
.h-wf-link { stroke: var(--h-outline); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke }
.h-wf-total { fill: var(--h-s2) } .h-wf-up { fill: var(--h-gain) } .h-wf-down { fill: var(--h-loss) } .h-wf-flat { fill: var(--h-outline) }
.h-wf-at { fill: none; stroke: var(--h-fg); stroke-width: 2; vector-effect: non-scaling-stroke }
.h-wf-val { position: absolute; transform: translateX(-50%); font-size: 12px; line-height: 1.35; white-space: nowrap; pointer-events: none;
  border-radius: 6px; background: var(--h-bg) }
.h-wf-val .h-value { font-weight: 700 }
.h-wf-cats { display: grid; grid-template-columns: repeat(var(--h-wf-n, 6), minmax(0, 1fr)); margin-top: 4px }
.h-wf-cats > span { padding: 6px 4px 2px; border-top: 3px solid transparent; text-align: center; font-size: 13px; line-height: 1.3;
  color: var(--h-fg2); overflow-wrap: break-word; hyphens: auto; min-width: 0 }
.h-wf-cats > span.h-at { font-weight: 700; color: var(--h-fg); border-top-color: var(--h-fg) }   /* the bar the slider is on, shown in shape and weight too */
.h-wf-run { white-space: nowrap; color: var(--h-fg2) }
.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 }
/* ValueBars (h-value-bars): a list of rows, any kind; from the start unless a value is below zero, then either way from the middle */
.h-vbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.h-vbars .h-gainrow { grid-template-columns: minmax(64px, 32%) 1fr auto }
.h-vbars .h-amt { white-space: nowrap }
.h-vbars-start .h-barbox::before { display: none }
.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; grid-template-columns: minmax(0, 1fr); gap: 8px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere }
/* Words wrap with the space, a long path or address included; only a code block (a text chart) and a table keep
   their lines and scroll sideways by themselves, never widening what holds them (Chris, 2026-11-09) */
.h-md .h-md-code, .h-md .h-md-table { overflow-wrap: normal }
.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:not(.h-vb-static)) { scroll-padding-top: 88px }
/* sticky="false": in the page's flow, for a page whose own bar sticks at the top, so one bar never covers the other */
h-view-banner[sticky="false"], .h-vb.h-vb-static { position: static }
.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 } }
/* SitePanel (h-site-panel, .h-site-panel; Chris, 2026-11-04): the navigation of a site with many pages in groups (a blog's
   posts), a panel growing out of its logo and folding back into it, under a bar that's position: relative. Bands, then
   columns, then groups, each with a heading; groups stacked in a column are split by a short rule with a diamond, so it
   reads as "and also". Every link is blue, the current one filled and marked in words. An app paints it with
   --h-site-panel-ring (the logo's ring) and --h-site-panel-sub (the groups' headings and the diamond). */
.h-site-panel-btn { position: relative; z-index: 31; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  display: grid; place-items: center; transition: transform .25s ease, box-shadow .25s ease }
.h-site-panel-btn img { width: 38px; height: 38px; border-radius: 50%; display: block }
.h-site-panel-btn:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-site-panel-ring, currentColor) 35%, transparent) }
.h-site-panel-btn[aria-expanded="true"] { transform: rotate(-12deg); box-shadow: 0 0 0 3px var(--h-site-panel-ring, currentColor) }
.h-site-panel-btn:focus-visible { outline: 3px solid var(--h-site-panel-ring, currentColor); outline-offset: 3px }
.h-site-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: calc(100vh - 64px); overflow-y: auto;
  background: var(--h-surface); color: var(--h-fg); border-bottom: 1px solid var(--h-line); box-shadow: 0 18px 40px rgb(0 0 0 / .45);
  clip-path: inset(0 0 100% 0); transition: clip-path .28s ease }
.h-site-panel[hidden] { display: none }
.h-site-panel.is-open { clip-path: inset(0 0 -40px 0) }
.h-site-panel a { display: block; color: var(--h-primary); text-decoration: none; font: 500 15px/1.3 var(--h-font); padding: 5px 8px; margin-left: -8px; border-radius: 8px }
.h-site-panel a:hover { text-decoration: underline; text-underline-offset: 3px }
.h-site-panel a[aria-current] { color: var(--h-bg); font-weight: 800; background: var(--h-primary) }
.h-site-panel a[aria-current="page"]::after { content: " · You are here"; font: 700 12px var(--h-font); color: var(--h-bg) }
.h-site-panel a:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 1px }
.h-site-panel a[aria-current]:focus-visible { outline-color: var(--h-fg) }
.h-site-panel ul { list-style: none; margin: 0; padding: 0 }
.h-sp-bands { max-width: 1240px; margin: 0 auto; padding: 16px 16px 22px; display: grid; grid-template-columns: var(--h-sp-bands, 1fr); gap: 0 }
.h-sp-band h3 { font: 800 16px var(--h-display); color: var(--h-fg); margin: 0 0 10px; padding: 0 18px 8px; border-bottom: 2px solid var(--h-line) }
.h-sp-band:first-child h3 { padding-left: 0 }
.h-sp-band + .h-sp-band { border-left: 2px solid var(--h-line) }
.h-sp-cols { display: grid; grid-template-columns: repeat(var(--h-sp-cols, 1), 1fr) }
.h-sp-col { padding: 0 18px; border-left: 1px solid var(--h-line) }
.h-sp-col:first-child { border-left: 0 }
.h-sp-band:first-child .h-sp-col:first-child { padding-left: 0 }
.h-sp-group h4 { font: 700 13px var(--h-font); color: var(--h-site-panel-sub, var(--h-fg2)); margin: 0 0 4px }
.h-sp-sep { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px }
.h-sp-sep::before, .h-sp-sep::after { content: ""; flex: 1; border-top: 1px dashed var(--h-line) }
.h-sp-sep span { width: 7px; height: 7px; background: var(--h-site-panel-sub, var(--h-fg2)); transform: rotate(45deg); flex: none }
@media (max-width: 1000px) {
  .h-sp-bands { grid-template-columns: 1fr; gap: 18px }
  .h-sp-band + .h-sp-band { border-left: 0 }
  .h-sp-band h3 { padding-left: 0 }
  .h-sp-band .h-sp-col:first-child { padding-left: 0 }
}
@media (max-width: 560px) {
  .h-sp-cols { grid-template-columns: 1fr }
  .h-sp-col { padding: 0; border-left: 0 }
}
@media (prefers-reduced-motion: reduce) { .h-site-panel { transition: none; clip-path: none !important } .h-site-panel-btn { 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 }
a.h-btn { text-decoration: none; box-sizing: border-box }
.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-primary);
  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) }

/* ImagePicker (h-image-picker): one group named by its label, its ⓘ beside it; the picture inside a plain box with a
   1px edge (a transparent logo seen in light and dark), which also takes a dropped file: a dashed edge and words while
   one is over it, never color alone. The button does the choosing. Its size, a hint and a problem are words. */
h-image-picker { display: block }
.h-ipick { display: grid; gap: 8px; justify-items: start; min-width: 0 }
.h-ipick-head { display: flex; align-items: center; gap: 2px; margin-block: -6px -4px }
.h-ipick-label { font-weight: 700; font-size: 15px }
.h-ipick-box { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; padding: 8px;
  border: 1px solid var(--h-outline); border-radius: 12px; background: var(--h-surface); overflow: hidden }
.h-ipick-box img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain }
.h-ipick-empty { color: var(--h-fg2); font-size: 14px; text-align: center }
.h-ipick-box.h-over { border-style: dashed; border-color: var(--h-primary); box-shadow: inset 0 0 0 1px var(--h-primary) }
.h-ipick-drop, .h-ipick-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px;
  background: color-mix(in srgb, var(--h-surface) 92%, transparent); color: var(--h-fg); font-weight: 700; text-align: center }
.h-ipick-busy { background: var(--h-surface) }
.h-ipick-busy .h-spinner.h-small { width: 24px; height: 24px; border-width: 3px }
.h-ipick-size, .h-ipick-soft { margin: 0; font-size: 13px; color: var(--h-fg2) }
.h-ipick-size { font-variant-numeric: tabular-nums }
.h-ipick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.h-ipick-problem { margin: 0; display: flex; align-items: flex-start; gap: 6px; color: var(--h-error); font-size: 14px; font-weight: 600 }
.h-ipick-problem svg { flex: none; width: 18px; height: 18px; margin-top: 1px }

/* ColorField (h-color-field) and FileField (h-file-field): a TextField's box. The color's swatch (the browser's chooser)
   sits inside it, round, with a 1px edge so white and black both show, and rings itself when focused; the hex rings the
   box. A file's name is words in the box (in the outline color: words, not a field to type in), a folder button to its
   right opens the chooser and a ✕ removes it. Resets are text buttons under a color; a problem is words. */
h-color-field, h-file-field { display: block }
.h-field.h-color, .h-field.h-file { min-width: 0 }
.h-color .h-field-box:focus-within { outline: none }
.h-color .h-field-box:has(.h-hex:focus) { outline: 3px solid var(--h-primary); outline-offset: 2px }
.h-field-box input.h-swatch { -webkit-appearance: auto; appearance: auto; flex: none; box-sizing: border-box; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--h-outline); border-radius: 99px; background: none; cursor: pointer }
.h-swatch::-webkit-color-swatch-wrapper { padding: 0 } .h-swatch::-webkit-color-swatch { border: 0; border-radius: 99px }
.h-swatch::-moz-color-swatch { border: 0; border-radius: 99px }
.h-theme .h-field-box input.h-swatch:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 2px }
.h-field-box input.h-hex { font-family: var(--h-mono); text-transform: uppercase; min-height: 44px; padding: 0 }
.h-field-box input:disabled { cursor: default; opacity: 0.6 }
.h-pick-resets { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-inline: -10px }
.h-file-head { display: flex; align-items: center; gap: 2px; margin-block: -6px -4px }
.h-file-label { font-weight: 700; font-size: 15px }
.h-file-box { cursor: pointer; border-color: var(--h-outline) }
.h-file-name { flex: 1; min-width: 0; color: var(--h-fg); overflow-wrap: anywhere; padding-block: 12px }
.h-file-empty .h-file-name { color: var(--h-fg2) }
.h-file-box .h-spinner.h-small { width: 20px; height: 20px; border-width: 3px }
.h-file .h-field-row .h-iconbtn svg { width: 24px; height: 24px }
.h-file .h-iconbtn:hover { background: color-mix(in srgb, var(--h-primary) 10%, transparent) }
.h-file .h-iconbtn:disabled, .h-file .h-iconbtn[aria-disabled="true"] { opacity: 0.45; cursor: default }
.h-pick-problem { margin: 0; display: flex; align-items: flex-start; gap: 6px; color: var(--h-error); font-size: 14px; font-weight: 600 }
.h-pick-problem svg { flex: none; width: 18px; height: 18px; margin-top: 1px }

/* 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 }
/* GroupHeading (h-group-heading, h-chart-line-group): a list's group title, a band like a grouped table's group row */
.h-group-heading { 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:has(+ .h-dbox) { margin: 0 }
.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 }
/* Hai1yAnnouncement (h-hai1y-announcement): what HAi1Y has to say, in a sheet at the window's bottom, opened in full;
   its content scrolls, its actions and Ask HAi1Y About It anchored to its bottom */
dialog.h-announce { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(640px, 100vw); max-width: 100vw; max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--h-c3); color: var(--h-fg); box-shadow: var(--h-shadow); overflow: hidden }
dialog.h-announce[open] { display: flex; flex-direction: column }
dialog.h-announce::backdrop { background: rgb(0 0 0 / 0.45) }
.h-announce-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 18px 16px 12px; display: grid; gap: 12px; align-content: start }
.h-announce-head { display: flex; align-items: center; gap: 12px }
.h-announce-head > h2, .h-announce-head > h3, .h-announce-head > h4, .h-announce-head > h5, .h-announce-head > h6 { margin: 0; flex: 1; min-width: 0; font: 700 22px var(--h-font) }
.h-announce-mark { display: inline-flex; flex: none } .h-announce-action:empty { display: none }
.h-announce-foot { flex: none; border-top: 1px solid var(--h-outline); padding: 12px 16px 24px; display: grid; gap: 8px; background: var(--h-c3) }
.h-announce-foot .h-btn, .h-announce-actions > .h-btn, .h-announce-actions > h-button .h-btn { width: 100% }
.h-announce-actions { display: grid; gap: 8px }

/* SlideFrame (h-slide-frame, React's SlideFrame): a presentation's slide previewed in its own theme, light or dark,
   whatever the page's (its tokens scoped to the frame, never the document). A plain container: the frame owns the
   padding, its content wraps and the frame grows, nothing clipped. Behind the content, in order: its color or its
   picture (cover-fit, under the theme's background at 88%, so words and charts keep their contrast), then a watermark
   (large, turned about −24°, centered, drawn only, never in the way of a pointer). The logo sits at the top right, at
   most 40px tall and 160px wide, the content wrapping round it. */
h-slide-frame { display: block; min-width: 0 }
.h-slide-frame { position: relative; isolation: isolate; display: block; min-width: 0; border: 1px solid var(--h-line); border-radius: 20px;
  padding: clamp(20px, 4vw, 44px) }
.h-slide-frame.h-sf-light { color-scheme: light }
.h-sf-back, .h-sf-mark { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none }
.h-sf-back { z-index: -2; background-color: var(--h-bg); background-size: cover; background-position: center; background-repeat: no-repeat }
.h-sf-back.h-sf-pic::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--h-sf-tint, var(--h-bg)) 88%, transparent) }
.h-sf-mark { z-index: -1 }
.h-sf-mark svg { position: absolute; top: 4%; left: 4%; width: 92%; height: 92% }
.h-sf-mark text { fill: var(--h-fg); font: 800 100px var(--h-display) }
.h-sf-body { display: flow-root; min-width: 0; overflow-wrap: break-word }
.h-sf-logo { float: right; display: block; width: auto; height: auto; max-height: 40px; max-width: 160px; margin: 0 0 12px 16px }

/* Linked ranges (h-balance-bar, h-linked-range-card; Android's BalanceBar and LinkedRangeCard; React's too). A part is a
   color and a pattern (solid, lines, dots, stripes), so parts differ without color; the same space between parts on
   both bars, whose shape is what differs: what is stays square with a thin edge, the Ideal (it moves as ranges do) has
   round corners and a strong edge. A hollow diamond is where a line between parts is now, a solid one where it would
   be, with a key in words. Edges are inset shadows, so they take no room from the shares. */
h-balance-bar, h-linked-range-card { display: block }
.h-balance { display: grid; gap: 4px; min-width: 0 }
.h-balance-head { justify-content: flex-start; gap: 2px }
.h-balance-title, .h-lrange-name { margin: 0; font: 700 18px/1.25 var(--h-font); color: var(--h-fg) }
.h-balance-bars { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px 8px; margin-top: 4px }
.h-balance-word { font-size: 13px; font-weight: 600; color: var(--h-fg2); min-width: 36px }
.h-bsegs { display: flex; gap: 6px; height: 28px; min-width: 0 }
.h-bseg { flex: 0 1 0; min-width: 0; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--h-outline); transition: flex-grow 0.25s }
.h-bseg[hidden] { display: none }
.h-bsegs.h-planned .h-bseg { border-radius: 8px; box-shadow: inset 0 0 0 2px var(--h-fg) }
.h-pat0 { background: var(--c) }
.h-pat1 { background: repeating-linear-gradient(45deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 35%, transparent) 3px 11px) }
.h-pat2 { background: radial-gradient(circle, var(--c) 0 3px, transparent 3.5px) 0 0 / 12px 12px, color-mix(in srgb, var(--c) 35%, transparent) }
.h-pat3 { background: repeating-linear-gradient(90deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 35%, transparent) 3px 16px) }
.h-bmarks { position: relative; height: 14px; min-width: 0 }
.h-diamond { position: absolute; top: 50%; width: 9px; height: 9px; box-sizing: border-box; transform: translate(-50%, -50%) rotate(45deg); background: var(--h-fg) }
.h-diamond.h-was { background: none; border: 2px solid var(--h-fg2) }
.h-balance-key { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600 }
.h-balance-key .h-diamond { position: static; transform: rotate(45deg); flex: none; margin-inline: 2px }
.h-balance-key .h-diamond.h-will { margin-left: 12px }
@media (prefers-reduced-motion: reduce) { .h-bseg { transition: none } }
/* A part's card: its name and holdings, its lock, ⓘ, ⚙ and remove on top (blue in every state; the fill says which),
   then its range: a thumb at each end of a blue span on the rail, the rail below its lowest Minimum hatched, a solid
   diamond where it would settle and a hollow one where it is now. A pill under each thumb, with an arrow each side to
   move it a point by touch; the thumbs are the stops for everyone else. */
.h-lrange { border: 1px solid var(--h-line); border-radius: 16px; background: var(--h-c1); padding: 2px 4px 10px 12px; display: grid; min-width: 0 }
.h-lrange-head { display: flex; align-items: center; gap: 2px; min-width: 0 }
.h-lrange-swatch { flex: none; width: 18px; height: 14px; margin-right: 6px }
.h-lrange-t { flex: 1; min-width: 0; display: grid; gap: 1px; padding-block: 6px }
.h-lrange-name { font-size: 16px }
.h-lrange-holds { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
.h-lrange-why { display: contents }
.h-lrange-why.h-stopped > .h-iconbtn svg circle { fill: currentColor }
.h-lrange-why.h-stopped > .h-iconbtn svg path { stroke: var(--h-c1) }
.h-lrange .h-lrange-head .h-iconbtn svg { width: 22px; height: 22px }
.h-iconbtn.h-danger { color: var(--h-error) }
.h-lrange-track { position: relative; height: 72px; margin-right: 8px; touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none }
.h-lrange-rail { position: absolute; inset: 0 0 auto; height: 40px }
.h-lrange-rail::before { content: ""; position: absolute; left: 20px; right: 20px; top: 19px; height: 10px; border-radius: 5px; background: var(--h-line) }
.h-lrange-hatch { position: absolute; left: 20px; top: 14px; height: 20px; background: repeating-linear-gradient(90deg, var(--h-fg2) 0 2px, transparent 2px 6px) }
.h-lrange-fill { position: absolute; top: 17px; height: 14px; border-radius: 7px; background: var(--h-primary) }
.h-locked .h-lrange-fill { background: var(--h-outline) }
.h-lrange-rail .h-diamond { top: 11px }
.h-lrange-thumb { position: absolute; top: 11px; width: 26px; height: 26px; margin-left: -13px; box-sizing: border-box; border-radius: 50%;
  background: var(--h-primary); border: 2px solid var(--h-fg); display: grid; place-items: center; cursor: grab; touch-action: none }
.h-lrange-thumb::before { content: ""; position: absolute; inset: -9px }
.h-lrange-thumb.h-held { background: var(--h-c3); cursor: default }
.h-lrange-thumb svg { width: 14px; height: 14px; color: var(--h-fg) }
.h-lrange-values { position: absolute; left: 0; right: 0; top: 42px; height: 30px }
.h-lrange-value { position: absolute; top: 0; width: 110px; margin-left: -55px; display: flex; align-items: center; justify-content: center }
.h-lrange-step { width: 28px; height: 30px; display: grid; place-items: center; color: var(--h-primary); cursor: pointer }
.h-lrange-step svg { width: 22px; height: 22px }
.h-vpill { width: 54px; box-sizing: border-box; padding: 4px 0; border-radius: 99px; background: var(--h-fg); color: var(--h-bg); text-align: center;
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap }
.h-moved .h-vpill { background: var(--h-calm-c); color: var(--h-fg) }   /* another part's drag just moved it: violet, calm information */
.h-lrange-settings { padding: 8px 8px 0 0 }
/* The Login Panel (Chris, 2026-11-13; 2026-11-14: "the same sign in screen for all HAi1Y products", HAi1Y's take on
   Google's sign-in screen): one rounded card centered on the page, the app's mark over what it is on the left, the way
   in on the right with its action at the bottom, links under the card's end; on a phone the card is the page. Its ways
   in (Sign In, Create Account) share the one panel */
.h-login { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; gap: 14px; padding: 24px; box-sizing: border-box;
  background: var(--h-login-page, var(--h-c2)); color: var(--h-fg) }
.h-login-card { width: min(1040px, calc(100vw - 48px)); min-height: 384px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px;
  padding: 40px 40px 36px; border-radius: 28px; background: var(--h-login-card, var(--h-surface)); border: 1px solid var(--h-line); box-sizing: border-box }
/* Dark: the card lifts off a darker page, as light's white card does off its gray one */
.h-theme.h-dark, :root[data-theme="dark"] .h-theme { --h-login-page: var(--h-bg); --h-login-card: var(--h-c2) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .h-theme:not(.h-light) { --h-login-page: var(--h-bg); --h-login-card: var(--h-c2) } }
.h-login-intro { display: grid; align-content: start; justify-items: start; gap: 14px }
.h-login-intro h1 { font: 800 clamp(30px, 3.4vw, 40px)/1.1 var(--h-display); letter-spacing: -0.01em; margin: 6px 0 0; text-wrap: balance }
.h-login-intro p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--h-fg2); max-width: 42ch }
.h-login-intro .h-login-eyebrow { font: 700 14px var(--h-font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--h-hai1y) }
.h-login-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 62px; min-width: 0 }
.h-login-panel h2 { font: 800 24px var(--h-display); margin: 0 }
.h-login-panel > .h-about-head { gap: 4px }
.h-login-panel > .h-about-head > h2 { flex: 0 1 auto; font: 800 24px var(--h-display); margin: 0 }   /* a way in's heading with its ⓘ */
.h-login-panel > p { margin: 0; color: var(--h-fg2); max-width: 46ch }
.h-login-panel .h-notice { max-width: 460px }
/* A sign-in option (Chris, 2026-11-14): its label ("With Google"), its button right beneath, its small print under that;
   more options stack below */
.h-signin-option { display: grid; justify-items: start; gap: 8px; width: 100% }
.h-signin-option + .h-signin-option { margin-top: 12px }
.h-signin-with { margin: 0; font: 700 15px var(--h-font); color: var(--h-fg) }
.h-signin-note p { margin: 0; font-size: 14px; color: var(--h-fg2); max-width: 46ch }
/* Google's button draws in a light frame: told the frame is light, the browser stops painting a white box behind it on a
   dark page (a color-scheme mismatch) */
.h-google-button { min-height: 44px; color-scheme: light }
.h-login-foot { justify-self: end; display: flex; gap: 20px; font-size: 14px }
.h-login-foot a { color: var(--h-primary) }
@media (max-width: 760px) {
  .h-login { place-content: start stretch; padding: 0; background: var(--h-bg) }
  .h-login-card { width: 100%; min-height: 0; grid-template-columns: 1fr; border: 0; border-radius: 0; padding: 32px 20px; background: var(--h-bg) }
  .h-login-panel { padding-top: 8px }
  .h-login-foot { padding: 0 20px 32px }
}
