/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #F7F4EF;
  --surface:     #FFFFFF;
  --surface-2:   #F1ECE4;
  --border:      rgba(0, 0, 0, 0.08);
  --accent:      #9A6B3F;
  --accent-2:    #B98965;
  --accent-3:    #8B7E6B;
  --accent-dim:  rgba(154,107,63,0.12);
  --teal-dim:    rgba(185,137,101,0.12);
  --green:       #2F7D57;
  --green-dim:   rgba(47,125,87,0.12);
  --red:         #B94A48;
  --red-dim:     rgba(185,74,72,0.12);
  --amber:       #B7791F;
  --text-1:      #0F172A;
  --text-2:      #64748B;
  --text-3:      #94A3B8;
  --mono:        'SF Mono', ui-monospace, 'Cascadia Code', monospace;
  --nav-h:       68px;
  --safe-b:      env(safe-area-inset-bottom, 0px);
  --safe-t:      env(safe-area-inset-top, 0px);
  --r-card:      16px;
  --r-pill:      100px;
}

html, body, #root {
  height: 100%;
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(231,205,169,0.28), transparent 34%),
    linear-gradient(180deg, #fbf8f2 0%, #f1e9df 100%);
}

/* ─── Platform Shell ────────────────────────────────────────────── */
.platform {
  position: relative;
  width: min(100vw, 430px);
  height: min(100dvh, 932px);
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(76,54,34,0.14);
}

/* ─── App Overlay (slide-up transition) ────────────────────────── */
.app-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 200;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-overlay.open {
  transform: translateY(0);
}

/* ─── Mini-app Shell (shared by all apps) ──────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
}

/* ─── Back Button (mini-app → launcher) ────────────────────────── */
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background 0.15s;
  flex-shrink: 0;
}
.back-btn:active { background: var(--surface-2); }

/* ─── Launcher ─────────────────────────────────────────────────── */
.launcher {
  height: 100%;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-b) + 32px);
  display: flex;
  flex-direction: column;
}

/* Launcher header */
.launcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-t) + 20px) 20px 0;
}
.launcher-wordmark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.launcher-wordmark span {
  color: var(--accent);
}
.launcher-date {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

/* Hero greeting */
.launcher-hero {
  margin: 18px 16px 0;
  padding: 22px 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #8A715B 0%, #B1845B 52%, #D0A17A 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(120,83,45,0.14), 0 4px 18px rgba(185,137,101,0.11);
  overflow: hidden;
  position: relative;
}
.launcher-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.launcher-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.launcher-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  margin-top: 8px;
  line-height: 1.4;
}
.launcher-hero-apps {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.launcher-hero-chip {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 4px 10px;
}
.launcher-hero-chip.live {
  background: rgba(47,125,87,0.35);
  border-color: rgba(47,200,100,0.3);
  color: #7FFFB0;
}
/* decorative orbs */
.launcher-hero::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  top: -60px;
  right: -40px;
  pointer-events: none;
}
.launcher-hero::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  bottom: -30px;
  left: 20px;
  pointer-events: none;
}

/* App grid */
.launcher-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #7185A3;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 24px 20px 12px;
}

.launcher-app-dock {
  margin-top: auto;
  padding-top: clamp(56px, 10dvh, 128px);
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}

/* App Tile */
.app-tile {
  border-radius: 20px;
  padding: 18px 16px 16px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.18);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  min-height: 158px;
  user-select: none;
}
.app-tile:active {
  transform: scale(0.96);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.app-tile.soon {
  cursor: default;
  opacity: 0.88;
}
.app-tile.soon:active {
  transform: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Tile decorative orb */
.app-tile::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -40px;
  right: -30px;
  pointer-events: none;
}

/* Tile icon */
.app-tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

/* Tile text */
.app-tile-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.app-tile-tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  line-height: 1.35;
  flex: 1;
}

/* Status pill */
.app-tile-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  width: fit-content;
}
.app-tile-status.live {
  background: rgba(47,125,87,0.35);
  border: 1px solid rgba(47,200,100,0.3);
  color: #7FFFB0;
}
.app-tile-status.soon {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.6);
}
.app-tile-status.soon::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.app-tile-status.live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7FFFB0;
  box-shadow: 0 0 4px #7FFFB0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Launcher footer */
.launcher-footer {
  text-align: center;
  margin-top: 28px;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.2px;
}

@media (min-width: 520px) {
  .platform {
    border-radius: 34px;
  }
}

@media (max-width: 519px) {
  .platform {
    width: 100vw;
    height: 100dvh;
    box-shadow: none;
  }
}

/* ─── Header ───────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-t) + 16px) 20px 14px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.header-sub   { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.header-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 260px;
  line-height: 1.25;
  font-size: 11px;
}
.header-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-3);
}
.header-sync.fresh .header-sync-dot {
  background: var(--green);
  box-shadow: 0 0 5px rgba(47,125,87,0.42);
}
.header-sync.aging .header-sync-dot { background: var(--amber); }
.header-sync.stale .header-sync-dot { background: var(--red); }
.header-sync.unknown .header-sync-dot { background: var(--text-3); }
.header-sync-sep {
  width: 1px;
  height: 10px;
  background: rgba(100,116,139,0.24);
}
.header-sync-spinner {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(100,116,139,0.25);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, transform 0.3s;
  font-size: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.refresh-btn:active { background: var(--surface-2); }
.refresh-btn.spinning { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Cards ────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFCF8 100%);
  border: 1px solid rgba(120,83,45,0.09);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: 0 8px 22px rgba(15,23,42,0.05);
}
.card + .card { margin-top: 10px; }

/* ─── Section ──────────────────────────────────────────────────── */
.section { padding: 0 16px; }
.section + .section { margin-top: 20px; }
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: #7185A3;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

/* ─── P/L Pills ────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
}
.pill.gain  { color: var(--green); background: var(--green-dim); }
.pill.loss  { color: var(--red);   background: var(--red-dim);   }
.pill.flat  { color: var(--text-2); background: var(--surface-2); }

/* Pills on gradient hero card */
.hero-card .pill.gain { background: rgba(255,255,255,0.22); color: #fff; }
.hero-card .pill.loss {
  background: rgba(255,255,255,0.3);
  color: #7A2E2B;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.hero-card .pill.flat { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }

/* ─── Value Display ────────────────────────────────────────────── */
.val-hero {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: #FFFFFF;
  line-height: 1;
}
.hero-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.hero-currency {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.6px;
  font-family: var(--mono);
}
.val-sub {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 4px;
}
.val-mono {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
}
.val-mono-sm {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
}

/* ─── Vantage: Home Screen ─────────────────────────────────────── */
.hero-card {
  margin: 4px 16px 0;
  padding: 24px 20px 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #8A715B 0%, #B1845B 52%, #D0A17A 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(120,83,45,0.14), 0 4px 18px rgba(185,137,101,0.11);
}
.hero-card .label {
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 8px;
  font-weight: 500;
}
.hero-pl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.hero-sgd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.18);
  font-family: var(--mono);
  box-shadow: none;
}
.hero-sgd-amount {
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.hero-sgd-rate {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.2px;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.16);
}

/* Metrics Strip */
.metrics-strip {
  display: flex;
  align-items: stretch;
  margin: 12px 16px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFCF8 100%);
  border: 1px solid rgba(120,83,45,0.09);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}
.metric-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  gap: 4px;
}
.metric-item.metric-neutral {
  background: linear-gradient(180deg, rgba(120,83,45,0.055), rgba(120,83,45,0));
}
.metric-item.metric-pl.gain {
  background: linear-gradient(180deg, rgba(47,125,87,0.09), rgba(47,125,87,0));
}
.metric-item.metric-pl.loss {
  background: linear-gradient(180deg, rgba(185,74,72,0.09), rgba(185,74,72,0));
}
.metric-item.metric-pl.flat {
  background: linear-gradient(180deg, rgba(120,83,45,0.055), rgba(120,83,45,0));
}
.metric-val {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-1);
  letter-spacing: -0.3px;
}
.metric-label {
  font-size: 11px;
  color: #8292AA;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.metric-divider {
  width: 1px;
  background: rgba(15,23,42,0.08);
  margin: 10px 0;
}

/* Allocation Dot */
.alloc-dot { width: 7px; height: 7px; border-radius: 50%; }

/* Broker Cards */
.broker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.broker-card {
  background: var(--surface);
  border: 1px solid rgba(120,83,45,0.09);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}
.broker-card-name  { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.broker-card-value { font-size: 17px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.5px; }
.broker-card-pl    { font-size: 12px; margin-top: 4px; font-family: var(--mono); }

/* ─── Stock Card ───────────────────────────────────────────────── */
.stock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stock-card + .stock-card { margin-top: 8px; }
.stock-ticker  { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.stock-name    { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.stock-price   { font-size: 17px; font-weight: 600; font-family: var(--mono); text-align: right; }
.stock-qty     { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.stock-value   { font-size: 12px; color: var(--text-2); font-family: var(--mono); text-align: right; }
.stock-footer  {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.stock-cost   { font-size: 12px; color: var(--text-3); }
.stock-weight-bar  { height: 3px; background: var(--accent-dim); border-radius: 100px; margin-top: 8px; overflow: hidden; }
.stock-weight-fill { height: 100%; background: var(--accent); border-radius: 100px; }

/* ─── Option Card ──────────────────────────────────────────────── */
.option-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.option-card + .option-card { margin-top: 8px; }
.options-review-section { margin-bottom: 12px; }
.options-review-card {
  background: linear-gradient(180deg, #fff 0%, #fffaf2 100%);
  border: 1px solid rgba(220,38,38,0.18);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.05), 0 0 0 1px rgba(220,38,38,0.03), 0 0 22px rgba(220,38,38,0.08);
}
.options-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.options-review-kicker {
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.options-review-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-top: 2px;
}
.options-review-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.18);
  border-radius: var(--r-pill);
  padding: 4px 9px;
  white-space: nowrap;
}
.options-review-list { display: flex; flex-direction: column; gap: 8px; }
.options-review-item {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(220,38,38,0.08);
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(220,38,38,0.04);
}
.options-review-marker {
  width: 4px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--amber);
}
.options-review-item.urgent .options-review-marker { background: var(--red); }
.options-review-item.urgent { border-color: rgba(220,38,38,0.18); box-shadow: 0 0 14px rgba(220,38,38,0.08); }
.options-review-item.watch .options-review-marker { background: var(--accent-2); }
.options-review-main { min-width: 0; }
.options-review-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-1);
}
.options-review-meta {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.options-review-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  font-family: var(--mono);
}
.options-review-action span { font-size: 15px; font-weight: 800; color: var(--text-1); }
.options-review-action small {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.options-review-more {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 9px;
  text-align: center;
}
.option-header { display: flex; align-items: flex-start; justify-content: space-between; }
.option-ticker { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.option-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.option-meta { display: flex; gap: 16px; margin-top: 12px; }
.option-meta-item      { display: flex; flex-direction: column; gap: 2px; }
.option-meta-label     { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.option-meta-value     { font-size: 14px; font-weight: 600; font-family: var(--mono); }
.option-expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  color: var(--text-2);
  margin-top: 12px;
  background: var(--surface-2);
}

/* Live quote strip */
.option-quote-strip {
  display: flex;
  gap: 0;
  margin-top: 12px;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.option-quote-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  gap: 3px;
  border-right: 1px solid var(--border);
}
.option-quote-cell:last-child { border-right: none; }
.option-quote-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.3px; }
.option-quote-val   { font-size: 12px; font-weight: 600; font-family: var(--mono); color: var(--text-1); }

.option-spread-note {
  font-size: 11px;
  color: #7C654E;
  margin-top: 8px;
  padding: 7px 10px;
  background: rgba(154,107,63,0.055);
  border-radius: 8px;
  border: 1px solid rgba(154,107,63,0.12);
  line-height: 1.35;
}
.options-token-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 16px 0;
  padding: 10px 12px;
  background: rgba(217,119,6,0.06);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}
.options-token-banner code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ─── Stat Rows ────────────────────────────────────────────────── */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 14px; color: var(--text-2); }
.stat-value { font-size: 14px; font-weight: 600; font-family: var(--mono); }

.broker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(120,83,45,0.035), rgba(185,137,101,0));
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  border-radius: 10px;
}
.broker-row + .broker-row { margin-top: 2px; }
.broker-row:last-child { border-bottom: none; }
.broker-row-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.broker-row-info  { flex: 1; }
.broker-row-name  { font-size: 14px; font-weight: 500; }
.broker-row-sub   { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.broker-row-right { text-align: right; }
.broker-row-val   { font-size: 14px; font-weight: 600; font-family: var(--mono); color: #111827; }
.broker-row-pct   { font-size: 12px; color: var(--text-2); margin-top: 1px; font-family: var(--mono); }
.broker-bar-wrap  { margin-top: 4px; height: 4px; background: #F1ECE4; border-radius: 100px; overflow: hidden; }
.broker-bar-fill  { height: 100%; border-radius: 100px; }

/* Donut Chart */
.donut-wrap { display: flex; align-items: center; gap: 24px; padding: 8px 0; }
.donut-legend       { display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item  { display: flex; align-items: center; gap: 8px; }
.donut-legend-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-label { font-size: 13px; color: var(--text-2); }
.donut-legend-val   { font-size: 13px; font-weight: 600; font-family: var(--mono); margin-left: 4px; }

/* ─── Error Banner ─────────────────────────────────────────────── */
.error-banner {
  margin: 8px 16px;
  padding: 12px 14px;
  background: rgba(220,38,38,0.06);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.error-banner-text  { font-size: 13px; color: var(--red); }
.error-banner-retry { font-size: 13px; font-weight: 600; color: var(--red); background: none; border: none; cursor: pointer; white-space: nowrap; }

/* ─── Loading Screen ───────────────────────────────────────────── */
.loading-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.loading-logo  { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; }
.loading-text  { font-size: 15px; color: var(--text-2); }
.loader {
  width: 28px; height: 28px;
  border: 2.5px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── Bottom Nav ───────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--nav-h) + var(--safe-b));
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 10px;
  padding-bottom: var(--safe-b);
  z-index: 100;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 16px;
  border-radius: 12px;
  transition: opacity 0.15s;
  min-width: 60px;
}
.nav-btn:active { opacity: 0.7; }
.nav-icon  { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.nav-btn.active .nav-icon { transform: scale(1.1); }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; color: var(--text-3); transition: color 0.15s; }
.nav-btn.active .nav-label { color: var(--accent); }

/* ─── Totals Bar ───────────────────────────────────────────────── */
.totals-bar {
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  display: flex;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.totals-bar-item  { display: flex; flex-direction: column; gap: 3px; }
.totals-bar-label { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.totals-bar-value { font-size: 15px; font-weight: 600; font-family: var(--mono); }

/* ─── Placeholder Apps ─────────────────────────────────────────── */
.placeholder-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  text-align: center;
}
.placeholder-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.placeholder-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-1);
}
.placeholder-tagline {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 240px;
}
.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ─── Stale / Empty ────────────────────────────────────────────── */
.stale-notice { text-align: center; font-size: 12px; color: var(--text-3); padding: 8px 16px 0; }

/* ─── Data-as-of pill (on hero card) ───────────────────────────── */
.dataof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 11px 5px 9px;
  font-size: 11.5px;
  font-family: var(--mono);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-pill);
  color: rgba(255,255,255,0.85);
  width: fit-content;
}
.dataof-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.dataof-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  opacity: 0.5;
}
.dataof.fresh   .dataof-dot          { background: #7FFFB0; box-shadow: 0 0 6px rgba(127,255,176,0.7); }
.dataof.fresh   .dataof-dot::after   { background: rgba(127,255,176,0.4); animation: dataof-pulse 2s ease-in-out infinite; }
.dataof.aging   .dataof-dot          { background: #F5C77E; box-shadow: 0 0 5px rgba(245,199,126,0.5); }
.dataof.stale   .dataof-dot          { background: #F08D86; box-shadow: 0 0 5px rgba(240,141,134,0.5); }
.dataof.unknown .dataof-dot          { background: rgba(255,255,255,0.4); }
@keyframes dataof-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.4); opacity: 0; }
}
.dataof-stamp { font-weight: 600; color: rgba(255,255,255,0.95); letter-spacing: 0.1px; }
.dataof-sep   { width: 1px; height: 11px; background: rgba(255,255,255,0.22); }
.dataof-age {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.72);
}
.dataof-refreshing {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-top-color: rgba(255,255,255,0.9);
  animation: spin 0.7s linear infinite;
}

/* V4 platform refinements */
.launcher {
  background:
    radial-gradient(circle at 50% 0%, rgba(231,205,169,0.35), transparent 34%),
    linear-gradient(180deg, #fbf8f2 0%, #f5efe7 100%);
}
.launcher-header {
  align-items: flex-start;
  padding-top: calc(var(--safe-t) + 24px);
}
.launcher-wordmark {
  font-size: 34px;
  letter-spacing: -1.2px;
  text-transform: none;
}
.launcher-date {
  margin-top: 3px;
  font-family: inherit;
  color: #7c8aa1;
}
.launcher-badge {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(120,83,45,0.10);
  color: #8b6a48;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(76,54,34,0.06);
}
.launcher-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.settings-link {
  width: 33px;
  height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120,83,45,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #8b6a48;
  box-shadow: 0 8px 22px rgba(76,54,34,0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-link:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.88);
}
.settings-layer {
  position: absolute;
  inset: 0;
  z-index: 320;
  display: grid;
  align-items: end;
  padding: 16px;
  pointer-events: none;
}
.settings-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(32,24,18,0.20);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}
.settings-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 24px;
  padding: 17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,250,242,0.92));
  border: 1px solid rgba(120,83,45,0.12);
  box-shadow: 0 24px 58px rgba(58,43,30,0.22);
  pointer-events: auto;
}
.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.settings-head p {
  margin: 0 0 3px;
  color: #8794aa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.settings-head h2 {
  margin: 0;
  color: #142033;
  font-size: 20px;
  letter-spacing: -.03em;
}
.settings-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(76,54,34,0.07);
  color: #6e5a45;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.settings-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.settings-field span {
  color: #6f7f98;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.settings-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(76,54,34,0.13);
  background: rgba(255,255,255,0.76);
  color: #142033;
  padding: 0 12px;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}
.settings-field input:focus {
  outline: 2px solid rgba(154,107,63,0.22);
  border-color: rgba(154,107,63,0.32);
}
.settings-field small {
  color: #8794aa;
  font-size: 10.5px;
  line-height: 1.35;
}
.settings-divider {
  height: 1px;
  margin: 14px 0 2px;
  background: rgba(76,54,34,0.10);
}
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.settings-actions button {
  height: 38px;
  border-radius: 999px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.settings-ghost {
  border: 1px solid rgba(76,54,34,0.10);
  background: rgba(255,255,255,0.58);
  color: #77849a;
}
.settings-save {
  border: 0;
  background: #9a7044;
  color: white;
  box-shadow: 0 10px 20px rgba(154,112,68,0.18);
}
.launcher-hero {
  padding: 24px 22px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0) 36%),
    linear-gradient(135deg, #6c5949 0%, #aa8058 54%, #d7af7f 100%);
  box-shadow: 0 20px 42px rgba(120,83,45,0.16);
}
.launcher-hero::before,
.launcher-hero::after,
.app-tile::before {
  display: none;
}
.launcher-hero-eyebrow {
  color: rgba(255,255,255,0.68);
}
.launcher-hero-title {
  font-size: 26px;
  max-width: 330px;
}
.launcher-hero-sub {
  max-width: 340px;
  color: rgba(255,255,255,0.76);
}
.launcher-hero-chip.live,
.app-tile-status.live {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.24);
  color: #fffdf7;
}
.app-grid {
  gap: 12px;
  justify-items: center;
}
.app-tile {
  width: 116px;
  min-height: 116px;
  border-radius: 28px;
  color: #8b6a48;
  border: 0;
  box-shadow: none;
  background: transparent !important;
  backdrop-filter: none;
}
.app-tile.logo-only {
  min-height: 116px;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.app-tile.logo-only::after {
  display: none;
}
.app-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.app-tile-icon {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: rgba(255,255,255,0.94);
}
.app-tile.logo-only .app-tile-icon {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.82));
  border: 1px solid rgba(117,91,63,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 16px 34px rgba(79,57,35,0.10);
}
.app-tile.logo-only.vantage .app-tile-icon {
  color: #9a7044;
}
.app-tile.logo-only.horizon .app-tile-icon {
  color: #203154;
}
.app-tile.logo-only .app-tile-icon svg {
  width: 52px;
  height: 52px;
}
.app-tile-name {
  font-size: 19px;
}
.app-tile-tagline {
  font-size: 11.5px;
  color: rgba(255,255,255,0.70);
}
.app-tile-metric {
  margin-top: 12px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app-tile.soon {
  opacity: 0.74;
}
.launcher-footer {
  color: #8b98ad;
}

/* Horizon mini app */
.horizon-app {
  background:
    radial-gradient(circle at 50% 0%, rgba(234,210,175,0.34), transparent 34%),
    linear-gradient(180deg, #fbf8f2 0%, #f5efe7 100%);
}
.h-screen {
  padding-bottom: calc(var(--safe-b) + 34px);
}
.h-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(var(--safe-t) + 18px) 20px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251,248,242,0.88);
  backdrop-filter: blur(16px);
}
.h-topbar h1 {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0;
}
.h-eyebrow {
  margin: 0 0 4px;
  color: #8190a7;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10.5px;
  font-weight: 800;
}
.h-sub {
  margin: 4px 0 0;
  color: #7888a2;
  font-size: 12px;
}
.h-hero {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 10px;
  align-items: center;
  min-height: 210px;
  margin: 0 16px;
  padding: 18px 10px 18px 20px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255,255,255,.38), rgba(255,255,255,0) 34%),
    linear-gradient(145deg, #f4ddbb 0%, #c79762 45%, #9f744c 100%);
  color: white;
  box-shadow: 0 24px 48px rgba(130,89,48,.2);
  position: relative;
  overflow: hidden;
}
.h-hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  border: 1px solid rgba(255,255,255,.22);
  pointer-events: none;
}
.h-hero-copy,
.h-hero-visual {
  position: relative;
  z-index: 1;
}
.h-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,253,247,.42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
  color: #0b0b0b;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.h-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0b0b0b;
}
.h-hero-label {
  margin: 14px 0 0;
  color: #0b0b0b;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
  opacity: .78;
}
.h-hero h2 {
  margin: 4px 0 8px;
  color: #fffdf6;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
  text-shadow: 0 1px 12px rgba(48,28,10,.35);
}
.h-hero-note {
  margin: 0;
  max-width: 138px;
  color: #0b0b0b;
  font-size: 10.5px;
  line-height: 1.45;
  font-weight: 500;
  opacity: .82;
}
.h-hero-visual {
  justify-self: stretch;
  width: 100%;
  min-height: 188px;
  border-radius: 26px;
  background: rgba(255,253,247,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 18px 35px rgba(91,61,34,.16);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 10px 6px 8px;
}
.h-ring-wrap {
  width: 168px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}
.h-ring {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 13px 18px rgba(76,54,34,.18));
}
.h-ring-segment {
  cursor: pointer;
  transition: opacity .18s ease, stroke-width .18s ease, filter .18s ease;
}
.h-ring:hover .h-ring-segment { opacity: .58; }
.h-ring .h-ring-segment:hover,
.h-ring-segment.active {
  opacity: 1;
  stroke-width: 13;
  filter: brightness(1.08);
}
.h-ring-inner {
  position: relative;
  z-index: 2;
  width: 102px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,253,249,.98);
  color: #142033;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  pointer-events: none;
  box-shadow: 0 10px 22px rgba(76,54,34,.16), inset 0 0 0 1px rgba(76,54,34,.06);
}
.h-ring-inner strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.02em;
}
.h-ring-inner span {
  font-size: 10.5px;
  color: #75839a;
  line-height: 1.25;
  margin-top: 3px;
  font-weight: 600;
}
.h-mini-legend {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  color: #0b0b0b;
  opacity: .72;
  font-size: 10px;
  font-weight: 700;
}
.h-mini-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.h-panel,
.h-alloc-sub,
.h-accounts {
  margin: 14px 16px 0;
  background: linear-gradient(180deg, #fffefb, #fffaf2);
  border: 1px solid rgba(76,54,34,0.12);
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(76,54,34,.07);
}
.h-panel {
  padding: 16px;
}
.h-alloc-sub {
  padding: 14px 16px 12px;
}
.h-alloc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.h-alloc-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  letter-spacing: -.02em;
  margin: 2px 0 0;
}
.h-alloc-title strong {
  font-weight: 800;
}
.h-alloc-title span {
  color: #75839a;
  font-weight: 600;
}
.h-source {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  background: rgba(76,54,34,.08);
  color: #75839a;
  text-transform: none;
}
.h-source.live {
  background: rgba(61,138,126,.12);
  color: #2f6a60;
}
.h-dob {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  color: #75839a;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.h-dob input {
  width: 118px;
  border: 1px solid rgba(76,54,34,0.12);
  border-radius: 10px;
  padding: 6px 7px;
  background: rgba(255,255,255,0.58);
  color: #142033;
  font-size: 11px;
}
.h-alloc-bar {
  display: flex;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 13px;
  background: rgba(20,32,51,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.48), 0 4px 12px rgba(76,54,34,0.08);
}
.h-alloc-bar span {
  display: block;
  height: 100%;
  min-width: 0;
}
.h-alloc-bar span + span {
  box-shadow: inset 1px 0 0 rgba(255,255,255,.45);
}
.h-alloc-rows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.h-alloc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(76,54,34,.04);
}
.h-alloc-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.h-alloc-row span,
.h-alloc-row b {
  font-size: 11px;
  color: #75839a;
}
.h-alloc-row strong {
  grid-column: 1 / 4;
  font-family: var(--mono);
  font-size: 13px;
  color: #142033;
}
.h-alloc-foot {
  margin: 10px 0 0;
  font-size: 10.5px;
  color: #75839a;
  line-height: 1.45;
}
.h-alloc-foot strong {
  color: #142033;
}
.h-accounts {
  padding: 15px 0 13px;
  overflow: hidden;
}
.h-carousel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 8px;
}
.h-carousel-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.h-carousel-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20,32,51,0.06);
  border: 1px solid rgba(76,54,34,0.08);
}
.h-carousel-tabs button {
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #75839a;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.h-carousel-tabs button.active {
  color: #142033;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 4px 12px rgba(76,54,34,0.08);
}
.h-accounts-viewport {
  overflow: hidden;
}
.h-accounts-track {
  display: flex;
  transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.h-account-panel {
  flex: 0 0 100%;
  padding: 10px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.h-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.h-account-value {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 3px 0 0;
}
.h-account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chip) 12%, #fff);
  color: var(--chip);
  font-size: 12px;
  font-weight: 800;
}
.h-account-spark {
  width: 100%;
  height: 70px;
}
.h-account-spark-wrap {
  position: relative;
  width: 100%;
  height: 112px;
  padding-top: 28px;
}
.h-spark {
  width: 100%;
  height: 70px;
  display: block;
}
.h-spark-overlay {
  opacity: .64;
  filter: drop-shadow(0 2px 4px rgba(76,54,34,0.08));
}
.h-spark-overlay-band {
  opacity: .14;
}
.h-spark-overlay-dot {
  opacity: .72;
}
.h-spark-hitboxes {
  position: absolute;
  inset: 10px 0 12px;
}
.h-spark-hitboxes button {
  position: absolute;
  top: 0;
  width: 8.333%;
  height: 100%;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  cursor: crosshair;
}
.h-spark-hitboxes button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 10px;
  width: 1px;
  transform: translateX(-50%);
  background: transparent;
}
.h-spark-hitboxes button:hover::after,
.h-spark-hitboxes button.active::after {
  background: rgba(20,32,51,0.16);
}
.h-spark-value-box {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  min-width: 132px;
  max-width: 58%;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(76,54,34,0.10);
  box-shadow: 0 10px 24px rgba(76,54,34,0.12);
  pointer-events: none;
}
.h-spark-value-box::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tip);
}
.h-spark-value-box div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-left: 13px;
  color: #142033;
}
.h-spark-value-box strong {
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.h-spark-value-box div span {
  color: #75839a;
  font-size: 10px;
  font-weight: 700;
}
.h-spark-value-box p {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: #142033;
}
.h-spark-value-box small {
  display: block;
  margin-top: 3px;
  color: #75839a;
  font-size: 10.5px;
  font-weight: 700;
}
.h-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  margin-top: -4px;
}
.h-months button {
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  color: #75839a;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 8px;
}
.h-months button:hover,
.h-months button.active {
  background: rgba(28,37,65,.07);
  color: #142033;
}
.h-account-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(76,54,34,0.12);
  padding-top: 9px;
  font-size: 11px;
  color: #75839a;
  font-weight: 600;
}
.h-overlay-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -4px;
  color: #75839a;
  font-size: 10.5px;
  font-weight: 700;
}
.h-overlay-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.h-overlay-legend i {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 2px solid #1c2541;
  border-radius: 999px;
}
.h-overlay-legend .eo-line {
  border-top-color: #8c6651;
  border-top-style: dashed;
  opacity: .72;
}
.h-account-foot span:first-child {
  color: #142033;
  font-weight: 700;
}
.h-account-insight {
  margin: -2px 0 0;
  padding: 11px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(247,241,232,0.72));
  border: 1px solid rgba(76,54,34,0.09);
  color: #64748b;
}
.h-account-insight span {
  display: block;
  color: #142033;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.h-account-insight p {
  margin: 5px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
}
.h-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.h-carousel-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(20,32,51,0.18);
  transition: width 0.2s ease, background 0.2s ease;
}
.h-carousel-dots i.active {
  width: 20px;
  background: #142033;
}
.h-metrics-panel {
  margin-bottom: 28px;
}
.h-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.h-metric-card {
  min-height: 98px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(250,244,235,0.72));
  border: 1px solid rgba(76,54,34,0.09);
}
.h-metric-card span {
  display: block;
  color: #75839a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  min-height: 24px;
}
.h-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #142033;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.h-metric-card small {
  display: block;
  margin-top: 7px;
  color: #75839a;
  font-size: 10.5px;
  line-height: 1.35;
}
.h-metrics-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(87,124,116,.07);
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}
.h-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.h-panel h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.h-soft-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(87,124,116,.11);
  color: #4a6b64;
  white-space: nowrap;
}
.h-chart {
  display: grid;
  gap: 8px;
  height: 170px;
  align-items: end;
  padding-top: 10px;
  border-bottom: 1px solid rgba(76,54,34,0.12);
}
.h-bar {
  display: grid;
  gap: 2px;
  align-items: end;
  height: 100%;
}
.h-bar span {
  border-radius: 8px 8px 3px 3px;
  min-height: 4px;
}
.h-bar label {
  font-size: 10px;
  color: #75839a;
  text-align: center;
  margin-top: 5px;
}
.h-bar .oa,
.h-legend .oa { background: #b7834d; }
.h-bar .sa,
.h-legend .sa { background: #577c74; }
.h-bar .ma,
.h-legend .ma { background: #d1a15f; }
.h-bar .eo,
.h-legend .eo { background: #8c6651; }
.h-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: #75839a;
  font-size: 12px;
}
.h-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}
.h-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 12px;
}
.h-table th {
  color: #75839a;
  font-weight: 800;
  text-align: right;
  padding: 8px 4px;
}
.h-table th:first-child,
.h-table td:first-child {
  text-align: left;
}
.h-table td {
  text-align: right;
  padding: 9px 4px;
  border-top: 1px solid rgba(76,54,34,0.12);
  font-family: var(--mono);
}

@media (max-width: 380px) {
  .h-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .h-hero-note {
    max-width: 260px;
  }
  .h-alloc-rows {
    grid-template-columns: 1fr;
  }
}
