/* Hero phone mock — light app theme tokens (packages/core light). Scoped to .hero-mock. */
.hero-mock-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  background: #F3F1E7;
  /* Keep frame size from first paint; no layout shift when JS paints. */
  min-height: 0;
  container-type: inline-size;
}

.hero-mock-desc {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-mock {
  --hm-bg: #F3F1E7;
  --hm-surf: #FFFFFF;
  --hm-raise: #ECEAE0;
  --hm-pline: #DEDCD0;
  --hm-text: #171E38;
  --hm-dim: #5B6275;
  --hm-accent: #3F6E3E;
  --hm-up: #3F7A3E;
  --hm-down: #B91C1C;
  --hm-dot: #CF5C3D;
  --hm-warn: #8A6410;
  --hm-purple: #7A5AA6;
  --hm-amber: #B7791F;
  --hm-khaki: #9C8F6A;
  --hm-font: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --hm-r: 16px;

  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--hm-bg);
  color: var(--hm-text);
  font-family: var(--hm-font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  pointer-events: none;
}

.hm-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  transform-origin: 0 0;
  /* Prefer CQ units so the first paint (before JS) already fits; JS ResizeObserver keeps it exact. */
  transform: scale(calc(100cqw / 390));
  display: flex;
  flex-direction: column;
  background: var(--hm-bg);
  overflow: hidden;
}

/* —— chrome —— */
.hm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  flex: none;
}
.hm-mark {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.hm-mark i { font-style: normal; color: var(--hm-accent); }
.hm-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hm-dim);
  font-size: 14px;
  font-weight: 600;
}
.hm-bell {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.hm-bell svg { width: 18px; height: 18px; fill: none; stroke: var(--hm-text); stroke-width: 1.7; }
.hm-bell-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--hm-dot);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .25s ease, transform .25s ease;
}
.hm-bell-badge.on {
  opacity: 1;
  transform: scale(1);
}

.hm-status {
  margin: 0 16px 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--hm-raise);
  color: var(--hm-dim);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  flex: none;
}
.hm-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hm-accent);
}

.hm-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 0 12px 56px;
}

.hm-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  overflow: auto;
  scrollbar-width: none;
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.9,.25,1);
}
.hm-panel::-webkit-scrollbar { display: none }
.hm-panel.is-on {
  opacity: 1;
  transform: translateX(0);
  z-index: 1;
}
.hm-panel.is-exit {
  opacity: 0;
  transform: translateX(-14px);
  z-index: 0;
}

/* First paint / no-JS / reduced-motion: Five visible, others hidden */
.hero-mock:not(.hm-ready) .hm-panel[data-panel="five"],
.hero-mock.hm-static .hm-panel[data-panel="five"] {
  opacity: 1;
  transform: none;
  z-index: 1;
}
.hero-mock:not(.hm-ready) .hm-panel:not([data-panel="five"]),
.hero-mock.hm-static .hm-panel:not([data-panel="five"]) {
  visibility: hidden;
}

.hm-card {
  background: var(--hm-surf);
  border: 1px solid var(--hm-pline);
  border-radius: var(--hm-r);
  padding: 14px 14px 12px;
}
.hm-card-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.hm-card-h b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hm-card-h span {
  font-size: 11px;
  color: var(--hm-dim);
  font-weight: 600;
}

.hm-mood-word {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--hm-accent);
  margin: 0 0 4px;
}
.hm-mood-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--hm-dim);
  line-height: 1.35;
}

.hm-gauge {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: var(--hm-raise);
  margin-bottom: 6px;
}
.hm-gauge i {
  display: block;
  height: 100%;
  font-style: normal;
}
.hm-gauge i:nth-child(1) { width: 25%; background: color-mix(in srgb, var(--hm-down) 55%, var(--hm-raise)); }
.hm-gauge i:nth-child(2) { width: 17.5%; background: color-mix(in srgb, var(--hm-down) 30%, var(--hm-raise)); }
.hm-gauge i:nth-child(3) { width: 15%; background: var(--hm-raise); }
.hm-gauge i:nth-child(4) { width: 17.5%; background: color-mix(in srgb, var(--hm-up) 35%, var(--hm-raise)); }
.hm-gauge i:nth-child(5) { width: 25%; background: var(--hm-up); }
.hm-gauge-labels {
  display: flex;
  font-size: 10px;
  color: var(--hm-dim);
  margin-bottom: 12px;
}
.hm-gauge-labels span { flex: 1; text-align: center; }
.hm-gauge-labels span:first-child { text-align: left; }
.hm-gauge-labels span:last-child { text-align: right; }
.hm-gauge-labels span.on { color: var(--hm-text); font-weight: 700; }

.hm-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 10px;
}
.hm-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hm-tile .n { font-size: 11px; color: var(--hm-dim); font-weight: 600; }
.hm-tile .v {
  position: relative;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: hidden;
  border-radius: 4px;
  padding: 1px 2px;
  margin: 0 -2px;
}
.hm-tile .v.up { color: var(--hm-up); }
.hm-tile .v.down { color: var(--hm-down); }
.hm-tile .v.flat { color: var(--hm-text); }

.hm-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
}
.hm-flash.up::after { background: var(--hm-up); }
.hm-flash.down::after { background: var(--hm-down); }
.hm-flash.go::after {
  animation: hm-flash .9s ease-out;
}
.hm-flash.frozen::after {
  opacity: .2;
}
@keyframes hm-flash {
  0% { opacity: .22; }
  100% { opacity: 0; }
}

.hm-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-top: 1px solid var(--hm-pline);
  position: relative;
}
.hm-row:first-child { border-top: 0; }
.hm-sym {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  min-width: 52px;
}
.hm-sym.up { color: var(--hm-up); }
.hm-sym.down { color: var(--hm-down); }
.hm-meta {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--hm-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-meta.hm-sec {
  font-size: 13px;
  font-weight: 700;
  color: var(--hm-text);
}
.hm-px {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  border-radius: 4px;
  padding: 1px 3px;
  overflow: hidden;
}
.hm-chg {
  position: relative;
  font-size: 13px;
  font-weight: 800;
  min-width: 58px;
  text-align: right;
  border-radius: 4px;
  padding: 1px 3px;
  overflow: hidden;
}
.hm-chg.up, .hm-px.up { color: var(--hm-up); }
.hm-chg.down, .hm-px.down { color: var(--hm-down); }

/* Options rows + expand (T54 row shape) */
.hm-opt {
  border-top: 1px solid var(--hm-pline);
  padding: 9px 2px;
}
.hm-opt:first-child { border-top: 0; }
.hm-opt-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hm-opt-main .hm-sym {
  min-width: 46px;
  font-size: 15px;
}
.hm-opt-chg {
  font-size: 11px;
  font-weight: 700;
  min-width: 42px;
  font-variant-numeric: tabular-nums;
}
.hm-opt-chg.up { color: var(--hm-up); }
.hm-opt-chg.down { color: var(--hm-down); }
.hm-opt-line {
  flex: 1;
  font-size: 13px;
  color: var(--hm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-opt-prem {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hm-opt-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--hm-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-earn { color: var(--hm-amber); font-weight: 600; }
.hm-opt-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .5s ease, opacity .4s ease, margin .4s ease;
  margin-top: 0;
}
.hm-opt.open .hm-opt-detail {
  max-height: 120px;
  opacity: 1;
  margin-top: 12px;
}

/* T54-style price gauge */
.hm-pg {
  position: relative;
  height: 72px;
  font-size: 11px;
  color: var(--hm-dim);
}
.hm-pg-bracket {
  position: absolute;
  top: 12px;
  height: 10px;
  border: 1px solid var(--hm-khaki);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  box-sizing: border-box;
}
.hm-pg-bracket .mid {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--hm-khaki);
  background: var(--hm-surf);
  padding: 0 4px;
}
.hm-pg-bracket .lo,
.hm-pg-bracket .hi {
  position: absolute;
  top: -1px;
  transform: translateY(-100%);
  font-size: 10px;
  color: var(--hm-khaki);
  background: var(--hm-surf);
  padding: 0 2px;
  font-variant-numeric: tabular-nums;
}
.hm-pg-bracket .lo { left: 0; transform: translate(-10%, -100%); }
.hm-pg-bracket .hi { right: 0; transform: translate(10%, -100%); }
.hm-pg-track {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 999px;
  background: var(--hm-raise);
}
.hm-pg-band {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hm-khaki) 55%, var(--hm-raise));
}
.hm-pg-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}
.hm-pg-now {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hm-text);
  box-shadow: 0 0 0 2px var(--hm-surf);
}
.hm-pg-strike {
  width: 11px;
  height: 11px;
  background: var(--hm-purple);
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 2px;
}
.hm-pg-be {
  width: 14px;
  height: 14px;
  border: 2px solid var(--hm-amber);
  border-radius: 50%;
  box-sizing: border-box;
  background:
    radial-gradient(circle at center, var(--hm-amber) 0 3px, transparent 3.5px);
}
.hm-pg-labs {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  height: 28px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.hm-pg-labs span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.hm-pg-labs .now { color: var(--hm-text); font-weight: 700; top: 0; }
.hm-pg-labs .be { color: var(--hm-amber); font-weight: 700; top: 0; }
.hm-pg-labs .strike { color: var(--hm-purple); font-weight: 400; top: 14px; }

/* Alert banner */
.hm-alert {
  position: absolute;
  top: 56px;
  left: 12px;
  right: 12px;
  z-index: 5;
  background: var(--hm-surf);
  border: 1px solid var(--hm-pline);
  border-left: 4px solid var(--hm-dot);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(23, 30, 56, .12);
  transform: translateY(-120%);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2,.9,.25,1), opacity .4s ease;
}
.hm-alert.on {
  transform: translateY(0);
  opacity: 1;
}
.hm-alert b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}
.hm-alert span {
  font-size: 12px;
  color: var(--hm-dim);
  line-height: 1.35;
}

/* Soft tap circle */
.hm-tap {
  position: absolute;
  z-index: 6;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--hm-accent) 70%, #fff);
  background: color-mix(in srgb, var(--hm-accent) 22%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: scale(.55);
}
.hm-tap.go {
  animation: hm-tap .7s ease-out;
}
@keyframes hm-tap {
  0% { opacity: .85; transform: scale(.55); }
  70% { opacity: .35; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* Bottom tabs */
.hm-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  padding: 6px 4px 10px;
  border-top: 1px solid var(--hm-pline);
  background: var(--hm-surf);
}
.hm-tab {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--hm-dim);
  padding: 8px 1px;
  border-radius: 10px;
  line-height: 1.15;
}
.hm-tab.is-on {
  color: var(--hm-accent);
  background: color-mix(in srgb, var(--hm-accent) 10%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .hm-flash.go::after,
  .hm-tap.go { animation: none !important; }
  .hm-panel,
  .hm-opt-detail,
  .hm-alert,
  .hm-bell-badge {
    transition: none !important;
  }
}
