/* ══════════════════════════════════════════════════════════════════
   OctosX platform.html V3 sections — Hybrid AI (hxh-) · Trust Ledger (hxl-)
   · Mobile App demo (hxm-). Merged from component builds 2026-07-11.
   Loaded only by platform.html, after interactive.css.
   ══════════════════════════════════════════════════════════════════ */

/* ── Hybrid AI Explorer (hxh-) ─────────────────────────────── */
/* ── Hybrid AI Explorer (hxh-) — platform.html #hybrid-ai ─────
   Edge + cloud split with TLS packet-stream boundary and
   data-volume meters. Light-section context (section--subtle).
   Pairs with scripts/hybrid-lab.js. */

.hxh { position: relative; }

/* ── Mode toggle ─────────────────────────────────────────────── */
.hxh__toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}
.hxh__mode {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.5rem 1.0625rem;
  border-radius: 999px;
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base),
    background var(--transition-base), box-shadow var(--transition-base);
}
.hxh__mode:hover { border-color: #CBD5E0; color: var(--color-text-primary); }
.hxh__mode[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-text-primary);
  box-shadow: 0 0 0 1px var(--color-accent);
}
.hxh__mode:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

/* ── Split layout: edge | boundary | cloud ───────────────────── */
.hxh__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.hxh__panel {
  min-width: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-top-width: 3px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.625rem 1.625rem;
}
.hxh__panel--edge  { border-top-color: var(--color-accent); }
.hxh__panel--cloud { border-top-color: #3182CE; }
.hxh__panel-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 0.375rem;
}
.hxh__site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  margin: 0 0 1rem;
}
.hxh__demo-chip {
  font-style: normal;
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  padding: 0.1875rem 0.4375rem;
  border-radius: 4px;
  background: var(--color-accent-soft);
  color: #92400E;
}
.hxh__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6875rem;
}
.hxh__item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.hxh__ic { flex-shrink: 0; margin-top: 0.1875rem; }
.hxh__panel--edge  .hxh__ic { color: #B45309; }
.hxh__panel--cloud .hxh__ic { color: #2B6CB0; }
.hxh__item-text { min-width: 0; }
.hxh__subnote {
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-top: 0.1875rem;
}

/* ── TLS boundary strip ──────────────────────────────────────── */
.hxh__boundary {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  padding: 1.25rem 0.375rem;
  min-height: 15rem;
}
.hxh__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hxh__tls {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  padding: 0.3125rem 0.6875rem;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.hxh__tls .hxh__ic { margin-top: 0; color: var(--color-text-secondary); }
.hxh__flow {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  padding: 0.25rem 0.375rem;
  max-width: 100%;
}
.hxh__flow--up   { color: #92400E; }
.hxh__flow--down { color: #2B6CB0; }

/* ── Meters ──────────────────────────────────────────────────── */
.hxh__meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.hxh__meter {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem 1.125rem;
}
.hxh__meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}
.hxh__meter-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.hxh__meter-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
}
.hxh__meter-track {
  height: 10px;
  border-radius: 999px;
  background: var(--color-bg-section);
  overflow: hidden;
}
.hxh__meter-bar {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--transition-base);
}
.hxh--raw .hxh__meter-bar { background: #94A3B8; }

.hxh__caption {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0.875rem 0 0;
}

/* ── Benefit chips + synthetic-data badge ────────────────────── */
.hxh__chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin: 1.375rem 0 0;
  padding: 0;
}
.hxh__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.8125rem;
  border-radius: 999px;
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  color: var(--color-text-secondary);
}
.hxh__chip .hxh__ic { margin-top: 0; color: var(--color-accent-hover); }

.hxh__foot {
  display: flex;
  justify-content: center;
  margin-top: 1.125rem;
}
.hxh__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border: 1px dashed var(--color-divider);
  border-radius: 999px;
  padding: 0.3125rem 0.75rem;
}

/* screen-reader-only status + canvas text equivalent */
.hxh__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Mobile: stack panels, boundary becomes horizontal strip ─── */
@media (max-width: 768px) {
  .hxh__split { grid-template-columns: minmax(0, 1fr); }
  .hxh__boundary {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.625rem;
    min-height: 5.5rem;
    padding: 0.875rem 1rem;
  }
  .hxh__flow { max-width: 34%; }
  .hxh__meters { grid-template-columns: minmax(0, 1fr); }
}

/* ── Reduced motion: meters jump, no packet animation (JS-gated) */
@media (prefers-reduced-motion: reduce) {
  .hxh__meter-bar { transition: none; }
  .hxh__mode { transition: none; }
}

/* ── Trust Ledger demo (hxl-) ──────────────────────────────── */
/* ── Tamper-Evident Ledger demo (hxl-, scripts/trust-ledger.js) ──
   Lives in the dark #data-trust section on platform.html.
   Lives in styles/platform-v3.css by design (platform.html only). Uses tokens.css vars;
   status hues match .hxi-tone-* (#34D399 / #FBBF24 / #F87171). */

.hxl {
  max-width: 760px;
  margin: 2rem auto 0;
}

/* scoped visually-hidden (interactive.css scopes this per-component) */
.hxl .hxl-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Header: demo-site identity + preview badge ─────────────── */
.hxl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.hxl-site { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
.hxl-site__name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text-on-dark);
}
.hxl-chip {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  padding: 0.1875rem 0.5rem;
  white-space: nowrap;
}
.hxl-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-on-dark-muted);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3125rem 0.75rem;
}

/* ── Chain of record cards ──────────────────────────────────── */
.hxl-chain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hxl-rec { margin: 0; padding: 0; }
.hxl-rec__card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 0.9375rem 1.125rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
}
.hxl-rec--checking .hxl-rec__card {
  border-color: rgba(245, 158, 11, 0.6);
  animation: hxl-pulse 0.8s ease infinite;
}
.hxl-rec--ok .hxl-rec__card   { border-color: rgba(52, 211, 153, 0.45); }
.hxl-rec--warn .hxl-rec__card { border-color: rgba(251, 191, 36, 0.55); }
.hxl-rec--crit .hxl-rec__card {
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25);
}
.hxl-rec--halt .hxl-rec__card { opacity: 0.55; }
@keyframes hxl-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35); }
  50%      { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12); }
}

.hxl-rec__top {
  display: flex;
  align-items: baseline;
  gap: 0.375rem 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.hxl-rec__idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}
.hxl-rec__ts {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-on-dark-muted);
}
.hxl-rec__actor {
  font-size: 0.75rem;
  color: var(--color-text-on-dark-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}
.hxl-rec__flag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-on-dark-muted);
  text-align: right;
}
.hxl-rec__flag--ok   { color: #34D399; }
.hxl-rec__flag--warn { color: #FBBF24; }
.hxl-rec__flag--crit { color: #F87171; }
.hxl-rec__flag--halt { color: var(--color-text-on-dark-muted); }

.hxl-rec__action {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 0.5625rem;
}
.hxl-rec__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-on-dark-muted);
}
.hxl-rec__val {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-on-dark);
  min-width: 0;
  overflow-wrap: anywhere;
}
.hxl-old {
  position: relative;
  color: #F87171;
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 0.5rem;
}
.hxl-new { color: #FBBF24; }

.hxl-rec__hashes {
  display: flex;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
}
.hxl-hashline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-on-dark-muted);
}
.hxl-hash {
  font-weight: 500;
  color: rgba(34, 211, 238, 0.85);
  transition: color var(--transition-base);
}
.hxl-hash--changed  { color: #FBBF24; }
.hxl-hash--mismatch { color: #F87171; }

/* ── Connector: chain-link node between cards ───────────────── */
.hxl-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 36px;
}
.hxl-link__line {
  width: 2px;
  flex: 1;
  background: rgba(255, 255, 255, 0.15);
  transition: background var(--transition-base);
}
.hxl-link__icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(160, 174, 192, 0.8);
  background: rgba(10, 31, 58, 0.9);
  transition: color var(--transition-base), border-color var(--transition-base);
}
.hxl-link--ok .hxl-link__line { background: rgba(52, 211, 153, 0.5); }
.hxl-link--ok .hxl-link__icon {
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.5);
}
.hxl-link--broken .hxl-link__line {
  background: repeating-linear-gradient(to bottom, rgba(248, 113, 113, 0.7) 0 3px, transparent 3px 7px);
}
.hxl-link--broken .hxl-link__icon {
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.55);
}

/* ── Anchor line ────────────────────────────────────────────── */
.hxl-anchor {
  margin: 0.875rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--color-text-on-dark-muted);
  overflow-wrap: anywhere;
}
.hxl-anchor b {
  font-weight: 500;
  color: rgba(34, 211, 238, 0.85);
}

/* ── Controls + status pill ─────────────────────────────────── */
.hxl-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.hxl-btn {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.6875rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}
.hxl-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.hxl-btn--primary {
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  color: var(--color-brand-primary);
}
.hxl-btn--primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.hxl-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-text-on-dark);
}
.hxl-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}
.hxl-btn--ghost[aria-pressed="true"] {
  border-color: rgba(251, 191, 36, 0.6);
  color: #FBBF24;
}
.hxl-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}

.hxl-statusrow {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
.hxl-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.9375rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-on-dark-muted);
  text-align: center;
  transition: border-color var(--transition-base), color var(--transition-base);
}
.hxl-status__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(160, 174, 192, 0.6);
}
.hxl-status--ok   { border-color: rgba(52, 211, 153, 0.45); color: #34D399; }
.hxl-status--ok .hxl-status__dot   { background: #34D399; }
.hxl-status--warn { border-color: rgba(251, 191, 36, 0.5); color: #FBBF24; }
.hxl-status--warn .hxl-status__dot { background: #FBBF24; }
.hxl-status--crit { border-color: rgba(248, 113, 113, 0.55); color: #F87171; }
.hxl-status--crit .hxl-status__dot { background: #F87171; }

/* ── Caption + footer notes ─────────────────────────────────── */
.hxl-caption {
  max-width: 640px;
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-text-on-dark-muted);
}
.hxl-foot {
  display: flex;
  justify-content: center;
  gap: 0.375rem 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(160, 174, 192, 0.85);
}

/* ── Motion + mobile ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hxl-rec--checking .hxl-rec__card { animation: none; }
}
@media (max-width: 768px) {
  .hxl-rec__card { padding: 0.8125rem 0.875rem; }
  .hxl-rec__flag {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
  .hxl-controls .hxl-btn { flex: 1 1 auto; }
}

/* ── Mobile push-to-ack demo (hxm-) ────────────────────────── */
/* ============================================================
   OctosX — Mobile push-to-acknowledge demo (hxm- prefix)
   Pairs with scripts/mobile-demo.js, mount #hxi-mobileapp on
   platform.html #mobile-app. Lives in styles/platform-v3.css by design; not merged into the shared
   interactive stylesheet. Host section background is light
   (.section--subtle); the phone screen itself is dark, so the
   in-phone palette mirrors the hard-coded dark-scheme colors
   already used by risk-lab.js / interactive.css dark components.
   Sizes inside the fixed 300×620 phone mockup are px on purpose.
   ============================================================ */

/* ── Layout: phone stage | narration panel ───────────────────── */
.hxm-app {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hxm-stage { justify-self: center; }

/* ── Phone frame (CSS-drawn) ─────────────────────────────────── */
.hxm-phone {
  position: relative;
  width: 300px;
  max-width: 100%;
  height: 620px;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, #16283F, #0A1526 55%);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.hxm-phone::before { /* side button */
  content: "";
  position: absolute;
  right: -2.5px;
  top: 140px;
  width: 3px;
  height: 52px;
  border-radius: 2px;
  background: #1E2F47;
}
.hxm-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: linear-gradient(180deg, #0A1F3A 0%, #050E1F 78%);
}
.hxm-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 17px;
  border-radius: 10px;
  background: #04070D;
  z-index: 6;
  pointer-events: none;
}

/* ── Screens (one visible at a time) ─────────────────────────── */
.hxm-scr {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 15px;
  overflow: hidden;
}
.hxm-scr[hidden] { display: none; }

.hxm-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(226, 232, 240, 0.72);
}

/* Persistent per-screen governance note */
.hxm-synth {
  margin-top: auto;
  padding-top: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(160, 174, 192, 0.78);
}

/* ── Screen 1: lock screen + push card ───────────────────────── */
.hxm-lock {
  margin-top: 64px;
  text-align: center;
  color: #F7FAFC;
}
.hxm-lock-clock {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.hxm-lock-date {
  margin-top: 4px;
  font-size: 11.5px;
  color: #A0AEC0;
}
.hxm-push {
  display: block;
  width: 100%;
  margin-top: auto;
  margin-bottom: 12px;
  padding: 11px 12px;
  text-align: left;
  font: inherit;
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
  animation: hxm-drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.05) 0.35s backwards;
}
.hxm-push:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}
.hxm-push-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A0AEC0;
}
.hxm-push-head b { color: #F7FAFC; font-weight: 500; }
.hxm-push-when { margin-left: auto; }
.hxm-push-title {
  display: block;
  margin-top: 7px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: #F7FAFC;
}
.hxm-push-body {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.45;
  color: #CBD5E0;
}
.hxm-push-hint {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F59E0B;
}

/* ── Screen 2/3: alarm detail ────────────────────────────────── */
.hxm-appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #A0AEC0;
}
.hxm-appbar-title {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  color: #E2E8F0;
}
.hxm-appbar-score {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #F87171;
}
.hxm-appbar-score small { font-size: 9px; color: var(--color-text-on-dark-muted); }

.hxm-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}
.hxm-scr--detail .hxm-detail { animation: hxm-fade-up 0.35s ease backwards; }

.hxm-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hxm-chip--crit {
  align-self: flex-start;
  color: #FCA5A5;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.hxm-chip--crit i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #F87171;
}
.hxm-chip--demo {
  padding: 2px 6px;
  font-size: 8px;
  color: #FBD38D;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.5);
}
.hxm-asset {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #F7FAFC;
}
.hxm-site {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: #A0AEC0;
}

.hxm-spark {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.hxm-spark-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #A0AEC0;
}
.hxm-spark-head b { font-size: 11px; color: #F87171; }
.hxm-spark-svg { display: block; width: 100%; height: 44px; }
.hxm-spark-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: hxm-dash 0.9s ease 0.3s forwards;
}
.hxm-spark-dot { animation: hxm-fade 0.3s ease 1.1s backwards; }

.hxm-factors {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hxm-factor {
  display: grid;
  grid-template-columns: 64px 1fr 22px;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #A0AEC0;
}
.hxm-factor-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.hxm-factor-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
  transform-origin: left center;
  animation: hxm-bar 0.55s ease 0.25s backwards;
}
.hxm-factor-val { text-align: right; color: #CBD5E0; }

.hxm-rule {
  margin: 0;
  padding-left: 8px;
  border-left: 2px solid rgba(245, 158, 11, 0.55);
  font-size: 10px;
  line-height: 1.5;
  color: #FBD38D;
}

/* ── Screen 3: confirm sheet ─────────────────────────────────── */
.hxm-dim {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 15px;
  opacity: 0.45;
}
.hxm-scrim {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: rgba(3, 9, 20, 0.5);
  animation: hxm-fade 0.3s ease backwards;
}
.hxm-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  padding: 14px 16px 12px;
  background: #0E2340;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px 20px 31px 31px;
  animation: hxm-sheet-up 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) 0.2s backwards;
}
.hxm-sheet-grab {
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}
.hxm-sheet-title {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 700;
  color: #F7FAFC;
}
.hxm-sheet-body {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.55;
  color: #A0AEC0;
}
.hxm-confirm {
  display: block;
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 12px;
  background: var(--color-accent);
  color: var(--color-brand-primary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-base);
}
.hxm-confirm:hover { background: var(--color-accent-hover); }
.hxm-sheet-note {
  margin: 10px 0 0;
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
  color: #8FA3B8;
}
.hxm-sheet .hxm-synth { margin-top: 10px; padding-top: 0; }

/* ── Screen 4: logged ────────────────────────────────────────── */
.hxm-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 34px;
  padding: 0 4px;
  text-align: center;
}
.hxm-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.1);
  animation: hxm-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) 0.15s backwards;
}
.hxm-check-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: hxm-dash 0.45s ease 0.4s forwards;
}
.hxm-done-title {
  margin: 6px 0 0;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #F7FAFC;
}
.hxm-done-sub {
  margin: 0;
  font-size: 11px;
  color: #A0AEC0;
}
.hxm-audit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 11px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.hxm-audit-line {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  color: #A0AEC0;
}
.hxm-audit-line--new {
  color: #6EE7B7;
  animation: hxm-fade-up 0.4s ease 0.7s backwards;
}
.hxm-audit-note {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8FA3B8;
}
.hxm-toast {
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 5;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(6, 24, 40, 0.92);
  color: #6EE7B7;
  font-size: 10px;
  animation: hxm-toast-in 0.4s ease 1s backwards;
}

/* ── Controls under the phone ────────────────────────────────── */
.hxm-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.hxm-play,
.hxm-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.hxm-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--color-brand-primary);
}
.hxm-play:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
}
.hxm-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-secondary);
}
.hxm-dot:hover {
  border-color: var(--color-brand-primary);
  color: var(--color-brand-primary);
}
.hxm-dot[aria-pressed="true"] {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: #FFFFFF;
}
.hxm-play:focus-visible,
.hxm-dot:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
/* in-phone buttons sit on dark screens — light outline reads there */
.hxm-push:focus-visible,
.hxm-confirm:focus-visible {
  outline: 2px solid #F7FAFC;
  outline-offset: 2px;
}

.hxm-caption {
  margin: 10px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* ── Narration panel (light section background) ──────────────── */
.hxm-panel { max-width: 30rem; }
.hxm-kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.hxm-eyebrow {
  margin: 0 0 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}
.hxm-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--color-accent);
}
.hxm-step-title {
  margin: 0 0 0.625rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary);
}
.hxm-step-desc {
  margin: 0;
  min-height: 4.95em; /* three lines — keeps the panel from jumping between steps */
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
}
.hxm-roadnote {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-divider);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ── Visually-hidden live region (self-contained utility) ────── */
.hxm-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Entrance keyframes ──────────────────────────────────────── */
@keyframes hxm-drop {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hxm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hxm-fade-up {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hxm-sheet-up {
  from { transform: translateY(102%); }
  to   { transform: translateY(0); }
}
@keyframes hxm-pop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes hxm-dash {
  to { stroke-dashoffset: 0; }
}
@keyframes hxm-bar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes hxm-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Reduced motion: final states applied instantly ──────────────
   Duration-squash (not animation:none) so `backwards`/`forwards`
   fills still resolve to their end states — the sparkline draws,
   the sheet sits up, the toast is visible. JS separately disables
   autoplay and hides the play button. */
@media (prefers-reduced-motion: reduce) {
  .hxm-app *,
  .hxm-app *::before,
  .hxm-app *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile: stack, keep the phone centered, no overflow ─────── */
@media (max-width: 860px) {
  .hxm-app { grid-template-columns: 1fr; gap: 2rem; }
  .hxm-panel {
    max-width: 34rem;
    justify-self: center;
    text-align: center;
  }
  .hxm-step-desc { min-height: 0; }
}

/* ── Touch-target enlargement on coarse pointers (44px min) ──── */
@media (pointer: coarse) {
  .hxm-dot { width: 44px; height: 44px; }
  .hxm-play { width: 44px; height: 44px; }
  .hxh__mode { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .hxl-btn { padding-top: 0.75rem; padding-bottom: 0.75rem; }
}
