/* Helf Jornie — hplus.css (v206)
 * H+ (bloodwork report card, body comp, protocols, genetics), Life (money,
 * travel, digital, creative) and Me (settings) screens. Loaded after
 * styles.css. Uses design-direction §B tokens with hex fallbacks; every
 * semantic color is paired with a sign (✓ ● ▲ ▼) in the markup.
 */

/* ───────────── local aliases ───────────── */
#screen-life, #screen-settings, #inbodyFormSheet {
  --hp-bg1: var(--bg-1, #15120f);
  --hp-bg2: var(--bg-2, #1e1b18);
  --hp-bg3: var(--bg-3, #282521);
  --hp-line: var(--line, #33302c);
  --hp-line-strong: var(--line-strong, #4b4743);
  --hp-ink: var(--ink, #f4f1ec);
  --hp-ink2: var(--ink-2, #c1bdb7);
  --hp-ink3: var(--ink-3, #95928b);
  --hp-brand: var(--brand, #f9bc8b);
  --hp-on-brand: var(--on-brand, #26160e);
  --hp-good: var(--good, #63d99b);
  --hp-warn: var(--warn, #f2ce59);
  --hp-bad: var(--bad, #f3625d);
  --hp-r-sm: var(--r-sm, 10px);
  --hp-r-md: var(--r-md, 14px);
  --hp-r-pill: var(--r-pill, 999px);
  --hp-font: var(--font-ui, "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --hp-display: var(--font-display, "Instrument Serif", "Iowan Old Style", Georgia, serif);
}

/* ───────────── shared atoms ───────────── */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.hp-eyebrow {
  font: 600 11px/1.2 var(--hp-font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--hp-ink3); margin: 0 0 8px;
}
.hp-mt { margin-top: 20px; }
.hp-lede { color: var(--hp-ink2); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.hp-fine { color: var(--hp-ink3); font-size: 12px; line-height: 1.45; }
.hp-disclaimer { color: var(--hp-ink3); font-size: 12px; line-height: 1.5; margin: 14px 0 0; }
.hp-link { background: none; border: 0; padding: 0; color: var(--hp-brand); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.hp-tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--hp-r-pill);
  font-size: 11px; font-weight: 500; color: var(--hp-ink2); background: var(--hp-bg3);
}
.hp-kind { text-transform: capitalize; }

/* tones: text color only — the sign carries the meaning */
.hp-tone-good { color: var(--hp-good); }
.hp-tone-warn { color: var(--hp-warn); }
.hp-tone-bad  { color: var(--hp-bad); }
.hp-tone-ok, .hp-tone-neutral { color: var(--hp-ink2); }

/* ───────────── buttons (augment global .btn) ───────────── */
#screen-life .hp-btn, #screen-settings .hp-btn {
  min-height: 44px; padding: 0 16px; border-radius: var(--hp-r-md);
  font: 600 15px/1 var(--hp-font); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--hp-line); background: var(--hp-bg3); color: var(--hp-ink);
  transition: transform 120ms cubic-bezier(.2,0,0,1);
}
#screen-life .hp-btn:active, #screen-settings .hp-btn:active { transform: scale(.97); }
#screen-life .btn-primary.hp-btn, #screen-settings .btn-primary.hp-btn { background: var(--hp-brand); background: var(--grad-btn, var(--hp-brand)); color: var(--hp-on-brand); border-color: transparent; }
#screen-life .btn-ghost.hp-btn, #screen-settings .btn-ghost.hp-btn { background: transparent; border-color: transparent; color: var(--hp-ink2); }
.hp-btn-block { width: 100%; }
#screen-life .hp-btn-sm, #screen-settings .hp-btn-sm {
  min-height: 36px; min-width: 36px; padding: 0 12px; border-radius: var(--hp-r-sm);
  font: 600 13px/1 var(--hp-font); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hp-bg3); color: var(--hp-ink); border: 1px solid var(--hp-line);
}
#screen-life .btn-ghost.hp-btn-sm, #screen-settings .btn-ghost.hp-btn-sm { background: transparent; border-color: transparent; color: var(--hp-ink2); }
#screen-life .hp-btn-sm.hp-icon, #screen-settings .hp-btn-sm.hp-icon { padding: 0; width: 36px; font-size: 16px; }
#screen-life .hp-btn-sm:disabled, #screen-settings .hp-btn-sm:disabled { opacity: .35; }
.hp-danger, #screen-life .btn-ghost.hp-danger, #screen-settings .btn-ghost.hp-danger { color: var(--hp-bad) !important; }
.hp-icon-spacer { width: 36px; display: inline-block; }
.hp-btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-btnrow .hp-btn { flex: 1 1 auto; }
#screen-life :is(.hp-btn, .hp-btn-sm, .hp-link, .hp-gchip, .hp-switch, .hp-radio):focus-visible,
#screen-settings :is(.hp-btn, .hp-btn-sm, .hp-link, .hp-switch, .hp-radio, .seg button, input, select):focus-visible {
  outline: 2px solid var(--hp-brand); outline-offset: 2px;
}

/* ───────────── inputs inside my screens ───────────── */
#screen-life .hp-addrow, #screen-settings .hp-inrow { display: flex; flex-wrap: wrap; gap: 8px; }
#screen-life .hp-addrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#screen-life .hp-addrow > :first-child { grid-column: 1 / -1; }
#screen-life .hp-addrow > button { grid-column: 1 / -1; }
#screen-life .hp-addrow input, #screen-life .hp-addrow select,
#screen-life .hp-input, #screen-settings .hp-input,
#screen-life select.hp-input {
  min-height: 44px; width: 100%; padding: 0 12px; border-radius: var(--hp-r-sm);
  background: var(--hp-bg3); color: var(--hp-ink); border: 1px solid transparent;
  font: 400 16px/1.2 var(--hp-font); box-sizing: border-box;
}
#screen-life .hp-addrow input:focus, #screen-life .hp-input:focus, #screen-settings .hp-input:focus { border-color: var(--hp-brand); outline: none; }
#screen-life select.hp-input { margin-bottom: 10px; }

/* ───────────── segmented (H+ / Life, units) ───────────── */
#screen-life .tabs.hp-seg, .hp-seg {
  display: flex; gap: 2px; padding: 2px; border-radius: var(--hp-r-sm);
  background: var(--hp-bg3); border: 0; margin: 0 0 16px;
}
#screen-life .tabs.hp-seg .tab, .hp-seg > button {
  flex: 1 1 0; min-height: 36px; border: 0; border-radius: calc(var(--hp-r-sm) - 2px);
  background: transparent; color: var(--hp-ink2); font: 500 14px/1 var(--hp-font); cursor: pointer;
  transition: background 200ms cubic-bezier(.2,0,0,1), color 200ms;
  letter-spacing: 0; text-transform: none; padding: 0 12px; position: relative;
}
#screen-life .tabs.hp-seg .tab::before, #screen-life .tabs.hp-seg .tab::after { content: none !important; }
#screen-life .tabs.hp-seg .tab.active, .hp-seg > button.active {
  background: var(--hp-bg1); color: var(--hp-ink);
  box-shadow: 0 1px 0 oklch(1 0 0 / .05) inset;
}
.hp-seg.hp-seg-sm { margin: 0; min-width: 104px; }
.hp-seg.hp-seg-sm > button { min-height: 32px; font-size: 13px; padding: 0 10px; }
#screen-settings .hp-seg.hp-seg-sm > button { min-height: 36px; }

/* ───────────── list rows ───────────── */
.hp-list { display: flex; flex-direction: column; }
.hp-row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 0;
  border-bottom: 1px solid var(--hp-line); background: none;
}
.hp-list > .hp-row:last-child, .hp-row:last-child { border-bottom: 0; }
#screen-settings .settings-row.hp-row { justify-content: flex-start; }
.hp-row-lead { width: 28px; flex: 0 0 28px; font-size: 20px; text-align: center; }
.hp-row-main { flex: 1 1 auto; min-width: 0; }
.hp-row-title { font: 500 15px/1.35 var(--hp-font); color: var(--hp-ink); overflow-wrap: anywhere; }
.hp-row-sub { font-size: 13px; line-height: 1.4; color: var(--hp-ink3); margin-top: 2px; overflow-wrap: anywhere; }
.hp-row-sub a { color: var(--hp-ink2); }
.hp-row-note { font-size: 13px; color: var(--hp-ink2); margin-top: 4px; font-style: italic; }
.hp-row-dose { font-size: 13px; color: var(--hp-ink3); font-weight: 400; }
.hp-row-trail { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; color: var(--hp-ink2); font-size: 14px; }
.hp-money { font-weight: 600; color: var(--hp-ink); margin-right: 2px; }
.hp-geno { font: 600 14px/1 var(--font-mono, ui-monospace, Menlo, monospace); color: var(--hp-ink); }
/* the old row styles must not fight the new markup */
#screen-life .hp-row.rx-row, #screen-life .hp-row.money-row, #screen-life .hp-row.travel-row,
#screen-life .hp-row.variant-row, #screen-life .hp-row.creative-life-row {
  display: flex; grid-template-columns: none; background: none; border-radius: 0; padding: 10px 0; margin: 0;
  border: 0; border-bottom: 1px solid var(--hp-line);
}
#screen-life .hp-row.rx-row.ended { opacity: .7; }

/* ───────────── stat tiles ───────────── */
.hp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.hp-tiles:empty { display: none; }
.hp-tiles > .hp-empty { grid-column: 1 / -1; }
.hp-tile {
  background: var(--hp-bg2); border: 1px solid var(--hp-line); border-radius: var(--hp-r-md);
  /* (v208) whisper of the card's domain hue from the top-left (≤ 9%) */
  background:
    radial-gradient(120% 95% at 0% 0%, color-mix(in oklch, var(--wash, var(--dot, transparent)) 9%, transparent), transparent 62%),
    var(--hp-bg2);
  padding: 12px; min-width: 0; display: flex; flex-direction: column; gap: 4px;
}
.hp-tile-val, .hp-tile-val.num { font-variant-numeric: proportional-nums; font-feature-settings: "pnum"; } /* (v208) display figures */
.hp-tile-label { font: 600 11px/1.2 var(--hp-font); letter-spacing: .08em; text-transform: uppercase; color: var(--hp-ink3); }
.hp-tile-val { font: 600 26px/1.05 var(--hp-font); letter-spacing: -.02em; color: var(--hp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-tile-val .u { font-size: 15px; font-weight: 500; color: var(--hp-ink3); margin-left: 3px; letter-spacing: 0; }
.hp-tile-val-sm { font-size: 18px; }
.hp-chip, .hp-delta {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%;
  font: 500 12px/1.3 var(--hp-font); padding: 3px 8px; border-radius: var(--hp-r-pill);
  background: color-mix(in oklch, currentColor 14%, transparent);
}
.hp-delta.hp-tone-neutral, .hp-chip.hp-tone-neutral { background: var(--hp-bg3); color: var(--hp-ink3); }
.hp-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-tiles-4 .hp-tile-val { font-size: 18px; }

/* ───────────── empty states ───────────── */
.hp-empty { text-align: center; padding: 18px 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hp-empty p { color: var(--hp-ink2); font-size: 14px; line-height: 1.5; max-width: 300px; margin: 0; }
.hp-empty-glyph {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; color: var(--hp-brand); background: color-mix(in oklch, var(--hp-brand) 14%, transparent);
}

/* ───────────── disclosure ───────────── */
.hp-details { border-top: 1px solid var(--hp-line); margin-top: 12px; }
.hp-details > summary {
  list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between;
  font: 500 14px/1.3 var(--hp-font); color: var(--hp-ink2);
}
.hp-details > summary::-webkit-details-marker { display: none; }
.hp-details > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.75px solid var(--hp-ink3); border-bottom: 1.75px solid var(--hp-ink3); transform: rotate(45deg); margin: -4px 4px 0 8px; transition: transform 200ms; }
.hp-details[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.hp-callout {
  background: var(--hp-bg2); border: 1px solid var(--hp-line); border-left: 3px solid var(--hp-brand);
  border-radius: var(--hp-r-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--hp-ink2); margin: 0 0 10px;
}
.hp-callout b { color: var(--hp-ink); font-weight: 600; }
.hp-upload { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.hp-upload .nutrients-status:empty { display: none; }

/* ───────────── bloodwork report card ───────────── */
.hp-rc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hp-rc-date { font: 400 22px/1.15 var(--hp-display); color: var(--hp-ink); }
.hp-rc-lab { font: 400 14px var(--hp-font); color: var(--hp-ink3); }
.hp-rc-count { text-align: right; display: flex; flex-direction: column; }
.hp-rc-count b { font: 600 28px/1 var(--hp-font); color: var(--hp-ink); }
.hp-rc-count span { font-size: 12px; color: var(--hp-ink3); }
.hp-gstrip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; margin: 0 -2px 6px; scrollbar-width: none; }
.hp-gstrip::-webkit-scrollbar { display: none; }
.hp-gchip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 4px;
  border-radius: var(--hp-r-pill); border: 1px solid var(--hp-line); background: var(--hp-bg2); cursor: pointer;
  font: 500 13px/1 var(--hp-font);
}
.hp-gchip .hp-gname { color: var(--hp-ink2); }
.hp-gletter, .hp-grade {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  font: 700 14px/1 var(--hp-font); background: color-mix(in oklch, currentColor 18%, transparent);
}
.hp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--hp-ink3); margin: 2px 0 10px; align-items: center; }
.hp-legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.hp-lg-ref { background: var(--hp-bg3); box-shadow: inset 0 0 0 1px var(--hp-line-strong); }
.hp-lg-tgt { background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--hp-brand) 55%, transparent) 0 3px, color-mix(in oklch, var(--hp-brand) 22%, transparent) 3px 6px); }
.hp-lg-dot { width: 8px !important; height: 8px !important; border-radius: 50% !important; background: var(--hp-ink); }
.hp-lg-ev { display: inline-flex; gap: 4px; align-items: center; }
.hp-ev {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--hp-r-pill);
  font: 600 10.5px/1 var(--hp-font); letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px;
  border: 1px solid currentColor;
}
.hp-ev-strong { color: var(--hp-good); }
.hp-ev-moderate { color: var(--hp-brand); }
.hp-ev-weak { color: var(--hp-ink3); border-style: dashed; }

.hp-sys { border-top: 1px solid var(--hp-line); }
.hp-sys > summary { list-style: none; cursor: pointer; }
.hp-sys > summary::-webkit-details-marker { display: none; }
.hp-sys-head {
  display: grid; grid-template-columns: 28px 1fr 16px; grid-template-rows: auto auto; column-gap: 12px;
  align-items: center; min-height: 56px; padding: 8px 0;
}
.hp-sys-head .hp-grade { grid-row: 1 / 3; }
.hp-sys-title { font: 600 16px/1.3 var(--hp-font); color: var(--hp-ink); }
.hp-sys-sub { grid-column: 2; font-size: 13px; color: var(--hp-ink3); }
.hp-chev { grid-column: 3; grid-row: 1 / 3; width: 8px; height: 8px; border-right: 1.75px solid var(--hp-ink3); border-bottom: 1.75px solid var(--hp-ink3); transform: rotate(45deg); justify-self: center; transition: transform 200ms; }
.hp-sys[open] .hp-chev { transform: rotate(-135deg); }
.hp-sys-body { padding: 0 0 8px; }

.hp-mk { padding: 12px 0; border-top: 1px solid color-mix(in oklch, var(--hp-line) 70%, transparent); }
.hp-sys-body > .hp-mk:first-child, .hp-sys-body > .hp-callout + .hp-mk, .hp-sys-body > .hp-mk-hint + .hp-mk { border-top: 0; }
.hp-mk-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hp-mk-name { font: 500 15px/1.3 var(--hp-font); color: var(--hp-ink); }
.hp-mk-val b { font: 600 20px/1 var(--hp-font); color: var(--hp-ink); letter-spacing: -.01em; }
.hp-mk-val .u { font-size: 12px; color: var(--hp-ink3); margin-left: 4px; }
.hp-bar { position: relative; height: 10px; margin: 10px 0 8px; border-radius: 5px; background: color-mix(in oklch, var(--hp-bg3) 60%, transparent); }
.hp-bar-ref { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: var(--hp-bg3); box-shadow: inset 0 0 0 1px var(--hp-line-strong); }
.hp-bar-tgt {
  position: absolute; top: 2px; bottom: 2px; border-radius: 3px;
  background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--hp-brand) 55%, transparent) 0 3px, color-mix(in oklch, var(--hp-brand) 22%, transparent) 3px 6px);
}
.hp-bar-dot {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 2px var(--hp-bg1);
}
.hp-bar-dot.hp-tone-ok, .hp-bar-dot.hp-tone-neutral { color: var(--hp-ink); }
.hp-bar-dot.clipped { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 2px; }
.hp-mk-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; font-size: 13px; }
.hp-status { font-weight: 500; }
.hp-sign { display: inline-block; min-width: 1em; }
.hp-trend { color: var(--hp-ink2); font-weight: 500; }
.hp-trend.hp-better { color: var(--hp-good); }
.hp-trend.hp-worse { color: var(--hp-warn); }
.hp-trend-vs { color: var(--hp-ink3); font-weight: 400; }
.hp-mk-sub { font-size: 12px; color: var(--hp-ink3); margin-top: 6px; line-height: 1.6; }
.hp-stale { color: var(--hp-warn); }
.hp-mk-hint { font-size: 13px; color: var(--hp-ink2); margin-top: 6px; line-height: 1.45; }
.hp-mk-note { margin-top: 6px; }
.hp-mk-note > summary { list-style: none; cursor: pointer; font-size: 12px; color: var(--hp-ink3); text-decoration: underline; text-underline-offset: 2px; min-height: 24px; display: inline-flex; align-items: center; }
.hp-mk-note > summary::-webkit-details-marker { display: none; }
.hp-mk-note p { font-size: 13px; line-height: 1.5; color: var(--hp-ink2); margin: 4px 0 0; }

/* ───────────── body comp ───────────── */
.hp-scan-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.hp-scan-actions { display: flex; gap: 4px; }
.hp-shape {
  margin-top: 20px; padding: 12px; border-radius: var(--hp-r-md);
  border: 1px dashed var(--hp-line-strong); background: transparent;
}
.hp-shape-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hp-shape-head .hp-eyebrow { margin: 0; }
.hp-shape-val { font-size: 14px; color: var(--hp-ink2); }
.hp-shape-val b { font: 600 22px/1 var(--hp-font); color: var(--hp-ink); margin-right: 4px; }
.hp-shape-scale { position: relative; height: 34px; margin: 10px 4px 6px; }
.hp-shape-scale::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 6px; border-radius: 3px; background: var(--hp-bg3); }
.hp-shape-ref { position: absolute; top: 4px; width: 2px; height: 18px; margin-left: -1px; background: var(--spirit, #ee8dbd); }
.hp-shape-ref i { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font: 500 11px/1 var(--hp-font); font-style: normal; color: var(--spirit, #ee8dbd); }
.hp-shape-dot { position: absolute; top: 7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--hp-ink); box-shadow: 0 0 0 2px var(--hp-bg1); }
.hp-shape-end { position: absolute; top: 20px; font-size: 11px; color: var(--hp-ink3); }
.hp-shape-end.l { left: 0; } .hp-shape-end.r { right: 0; }

.hp-seg-fig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.hp-seg-cell {
  background: var(--hp-bg2); border: 1px solid var(--hp-line); border-radius: var(--hp-r-sm);
  padding: 8px; text-align: center; min-height: 72px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.hp-seg-cell.empty { visibility: hidden; }
.hp-seg-cell.hp-seg-mid { background: transparent; border-style: dashed; }
.hp-seg-name { font: 600 11px/1.2 var(--hp-font); letter-spacing: .06em; text-transform: uppercase; color: var(--hp-ink3); }
.hp-seg-lb { font: 600 17px/1.1 var(--hp-font); color: var(--hp-ink); }
.hp-seg-lb .u { font-size: 11px; color: var(--hp-ink3); margin-left: 2px; }
.hp-seg-pct { font-size: 12px; }
.hp-seg-cell.hp-tone-ok .hp-seg-pct { color: var(--hp-ink2); }
.hp-seg-mid .hp-seg-pct { color: var(--hp-ink3); }

.hp-lbm { margin-top: 20px; padding: 12px; border-radius: var(--hp-r-md); background: var(--hp-bg2); border: 1px solid var(--hp-line); }
.hp-lbm-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; color: var(--hp-ink2); padding: 4px 0; }
.hp-lbm-row b { color: var(--hp-ink); font-weight: 600; }
.hp-trends .trend-block { margin-bottom: 8px; }

/* ───────────── protocol diff ───────────── */
.hp-diff:empty { display: none; }
.hp-diff-box { background: var(--hp-bg2); border: 1px solid var(--hp-line); border-radius: var(--hp-r-md); padding: 10px 12px; margin-bottom: 14px; }
.hp-diff-quiet { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hp-diff-quiet .hp-eyebrow { margin: 0; }
.hp-diff-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hp-diff-row { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hp-line); }
.hp-diff-head + .hp-diff-row { border-top: 0; }
.hp-diff-sign {
  flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font: 700 15px/1 var(--hp-font);
}
.hp-diff-add .hp-diff-sign { color: var(--hp-good); background: color-mix(in oklch, var(--hp-good) 16%, transparent); }
.hp-diff-stop .hp-diff-sign { color: var(--hp-bad); background: color-mix(in oklch, var(--hp-bad) 16%, transparent); }
.hp-diff-main { min-width: 0; flex: 1; }
.hp-diff-name { font: 500 15px/1.35 var(--hp-font); color: var(--hp-ink); }
.hp-diff-tag { font-size: 12px; color: var(--hp-ink3); font-weight: 400; margin-left: 4px; }
.hp-diff-why { font-size: 13px; color: var(--hp-ink2); margin-top: 2px; }

/* ───────────── Me ───────────── */
.hp-section-label {
  font: 600 11px/1.2 var(--hp-font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--hp-ink3); margin: 28px 4px 10px;
}
#screen-settings .greet + .hp-section-label { margin-top: 8px; }
.hp-form { display: flex; flex-direction: column; gap: 16px; }
.hp-field { display: flex; flex-direction: column; gap: 8px; }
.hp-label { font: 600 11px/1.2 var(--hp-font); letter-spacing: .08em; text-transform: uppercase; color: var(--hp-ink3); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hp-label .hp-fine, .hp-label .hp-link { text-transform: none; letter-spacing: 0; font-weight: 400; }
.hp-inrow { align-items: center; }
.hp-inrow .hp-input { flex: 1 1 0; min-width: 0; }
.hp-unit { color: var(--hp-ink3); font-size: 14px; }
.hp-radio-list { display: flex; flex-direction: column; gap: 6px; }
.hp-radio {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; text-align: left;
  border-radius: var(--hp-r-sm); background: var(--hp-bg2); border: 1px solid var(--hp-line); color: var(--hp-ink); cursor: pointer;
  font: inherit;
}
.hp-radio.active { border-color: color-mix(in oklch, var(--hp-brand) 55%, transparent); background: color-mix(in oklch, var(--hp-brand) 10%, var(--hp-bg2)); }
.hp-radio-dot { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 1.75px solid var(--hp-line-strong); }
.hp-radio.active .hp-radio-dot { border-color: var(--hp-brand); box-shadow: inset 0 0 0 4px var(--hp-bg2), inset 0 0 0 9px var(--hp-brand); }
.hp-radio-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-radio-main b { font: 500 15px/1.3 var(--hp-font); }
.hp-radio-main span { font-size: 12px; color: var(--hp-ink3); }
.hp-radio-trail { font-size: 12px; color: var(--hp-ink2); }
.hp-switch {
  width: 50px; height: 30px; border-radius: 15px; border: 0; padding: 0; cursor: pointer; position: relative;
  background: var(--hp-bg3); box-shadow: inset 0 0 0 1px var(--hp-line-strong); transition: background 200ms;
}
.hp-switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--hp-ink2); transition: transform 200ms cubic-bezier(.2,0,0,1); }
.hp-switch.on { background: var(--hp-brand); box-shadow: none; }
.hp-switch.on span { transform: translateX(20px); background: var(--hp-on-brand); }
.hp-layout-row.is-hidden .hp-row-title { color: var(--hp-ink3); }
.hp-layout-row .hp-row-trail { gap: 2px; }

/* goals editor */
#screen-settings .hp-goal-group { border-top: 1px solid var(--hp-line); margin: 0; padding: 0; background: none; }
#screen-settings .hp-goal-group > summary {
  list-style: none; cursor: pointer; min-height: 48px; display: flex; justify-content: space-between; align-items: center;
  font: 600 15px/1.3 var(--hp-font); color: var(--hp-ink); text-transform: none; letter-spacing: 0; margin: 0;
}
#screen-settings .hp-goal-group > summary::-webkit-details-marker { display: none; }
#screen-settings .hp-goal-group > summary .hp-fine { font-weight: 400; }
#screen-settings .hp-goal-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 56px;
  border-top: 1px solid color-mix(in oklch, var(--hp-line) 60%, transparent); grid-template-columns: none;
}
.hp-goal-main { flex: 1 1 auto; min-width: 0; }
.hp-goal-main .hp-row-title { display: block; }
.hp-goal-input { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
#screen-settings .hp-goal-input .hp-input { width: 84px; min-height: 40px; text-align: right; padding: 0 10px; }
.hp-goal-input .unit { min-width: 38px; font-size: 12px; color: var(--hp-ink3); }
.hp-goal-row.is-range .hp-row-sub { color: var(--hp-ink2); }
#screen-settings .goal-suggest.hp-details { border-top: 0; margin: 0 0 8px; background: var(--hp-bg2); border: 1px solid var(--hp-line); border-radius: var(--hp-r-md); padding: 0 12px 8px; }
#screen-settings .goal-suggest.hp-details > summary { color: var(--hp-ink); font-weight: 600; }
#screen-settings .goal-suggest-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* hide-scores: Today agent reads helf:hideScores; this is the fallback */
html[data-hide-scores] #screen-today [data-score],
html[data-hide-scores] #screen-today .score-num { visibility: hidden; }

/* ───────────── InBody form (sheet) ───────────── */
#inbodyFormSheet select#if_tape_unit { min-height: 36px; border-radius: var(--hp-r-sm); background: var(--hp-bg3); color: var(--hp-ink); border: 0; padding: 0 8px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .hp-switch span, .hp-chev, .hp-details > summary::after { transition: none; }
}

/* (v206) polish pass */
.hp-list + .hp-eyebrow, .rx-list + .hp-eyebrow, .creative-life-list + .hp-eyebrow { margin-top: 18px; }
#screen-life .rx-list > .hp-row:has(+ .hp-details) { border-bottom: 0; }
#screen-life .rx-list > .hp-details { margin-top: 0; }
#screen-life .hp-addrow #rxNotes { grid-column: 1 / -1; }
.hp-tile .hp-chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#screen-settings .goal-row.hp-goal-row { background: none; border: 0; border-radius: 0; border-top: 1px solid color-mix(in oklch, var(--hp-line) 60%, transparent); padding: 8px 0; margin: 0; }
#screen-settings .goal-group.hp-goal-group { display: block; gap: 0; }
#screen-settings .hp-goal-row .hp-goal-input input { width: 84px; background: var(--hp-bg3); border: 1px solid transparent; }
#screen-settings .hp-goal-row button[data-clear] { color: var(--hp-ink3); }
#screen-settings .settings-row.hp-row { display: flex; grid-template-columns: none; background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--hp-line); padding: 10px 0; margin: 0; min-height: 52px; }
#screen-settings .settings-rows.hp-list { gap: 0; display: flex; }
#screen-settings .settings-rows.hp-list > .settings-row.hp-row:last-child { border-bottom: 0; }
#screen-settings #settingsAccount + #meData { border-top: 1px solid var(--hp-line); }
.hp-tiles-4 .hp-tile { padding: 10px 8px; }
.hp-tiles-4 .hp-tile-label { letter-spacing: .03em; }
#screen-life [hidden], #screen-settings [hidden] { display: none !important; }

/* (v206) 36px small buttons keep their look but get a 44px hit area. */
#screen-life .hp-btn-sm, #screen-settings .hp-btn-sm, #screen-life .hp-btn, #screen-settings .hp-btn { position: relative; }
#screen-life .hp-btn-sm::after, #screen-settings .hp-btn-sm::after,
#screen-life .hp-btn::after, #screen-settings .hp-btn::after { content: ""; position: absolute; inset: -4px; }
