/* Hope Money — Investment Allocation section.
   Tokens, colours, type and the gold/white highlight treatment per
   design_handoff_investment_allocation/README.md. Scoped under .hope-ia. */

.hope-ia {
  /* navy ramp — light → dark */
  --hia-b1:#BFD3F2; --hia-b2:#8FB3E5; --hia-b3:#6493D6;
  --hia-b4:#3F76C5; --hia-b5:#205AAE; --hia-b6:#144794;
  --hia-b7:#0B377A; --hia-b8:#062B62; --hia-b9:#00204C;
  /* orange ramp — lightest → brand */
  --hia-o1:#FFEFE4; --hia-o2:#FFDFC8; --hia-o3:#FFC9A4;
  --hia-o4:#FFAD78; --hia-o5:#FF8B4A; --hia-o6:#FE5E1A; --hia-o7:#FE5E1A;
  /* surface + ink */
  --hia-navy:#002060;
  --hia-orange:#FE5E1A;
  --hia-ink:#0A1D47;
  --hia-subtitle-ink:#2F3A52;
  --hia-muted:#6B7280;
  --hia-hair:#E5E7EB;
  --hia-bg:#FAF7F2;

  background: var(--hia-bg);
  font-family: 'Inter',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  color: var(--hia-ink);
  position: relative;
  box-sizing: border-box;
  /* Width handled by the `alignfull` class (theme's standard breakout pattern). */
}

.hope-ia__stage {
  /* Match the hero tile row exactly: same content-max + gutter token. */
  max-width: 1360px;
  margin: 0 auto;
  padding: 48px clamp(20px, 4vw, 40px) 56px;
  box-sizing: border-box;
}

/* ───── Header ───── */
.hope-ia__head { text-align: center; }
.hope-ia__hook {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 44px; font-weight: 500;
  letter-spacing: -1.4px; line-height: 1.05;
  color: var(--hia-navy); margin: 0;
}
.hope-ia__hook-sub {
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.1px; line-height: 1.4;
  color: var(--hia-subtitle-ink); margin: 8px 0 0;
}
.hope-ia__title {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 26px; font-weight: 500;
  letter-spacing: -0.6px; line-height: 1.2;
  color: var(--hia-navy); margin: 28px 0 0;
}
.hope-ia__subtitle {
  font-size: 14px; font-weight: 500;
  letter-spacing: 0; line-height: 1.4;
  color: var(--hia-muted); margin: 6px 0 0;
}

/* ───── Row grid (Gilts/CP/Bonds + Prefs) ───── */
.hope-ia__row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 24px;
  align-items: center;
  margin-top: 36px;
}
.hope-ia__row--first { margin-top: 48px; }

.hope-ia__row-label {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 30px; font-weight: 500;
  letter-spacing: -0.8px; line-height: 1;
  color: var(--hia-navy); margin: 0;
}
.hope-ia__row-sub {
  font-size: 14px; font-weight: 500; line-height: 1.4;
  color: var(--hia-muted); margin: 6px 0 14px;
}

.hope-ia__alloc { align-self: center; }
.hope-ia__alloc-num {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 44px; font-weight: 500;
  letter-spacing: -2px; line-height: 1;
  color: var(--hia-navy); margin: 0;
  font-variant-numeric: tabular-nums;
}
.hope-ia__alloc-num--orange { color: var(--hia-orange); }
.hope-ia__alloc-label {
  font-size: 14px; font-weight: 500; line-height: 1.2;
  color: var(--hia-muted); margin: 6px 0 0;
}

/* ───── Big bars (Gilts/CP/Bonds) ───── */
.hope-ia__bar {
  display: flex; gap: 4px; height: 88px;
  position: relative;
}
.hope-ia__seg {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff;
  position: relative;
  padding: 0 4px;
  box-sizing: border-box;
}
.hope-ia__seg .hope-ia__num {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.6px; line-height: 1.1; color: #fff;
}
.hope-ia__seg .hope-ia__unit {
  font-size: 12px; font-weight: 500; line-height: 1.1;
  color: rgba(255,255,255,0.95);
}
.hope-ia__seg .hope-ia__single {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.6px; line-height: 1; color: #fff;
}

/* Highlighted-group wrapper: lets one ring span N adjacent segments */
.hope-ia__hl-group {
  display: flex; gap: 4px;
  position: relative;
}

/* Highlight ring — outer 3px gold gradient + 2px white inner gap */
.hope-ia__highlight {
  position: absolute; inset: -5px;
  border-radius: 13px;
  pointer-events: none; z-index: 3;
  background: linear-gradient(
    135deg,
    #F5E6A8 0%,
    #D4AF37 25%,
    #8B6914 50%,
    #D4AF37 75%,
    #F5E6A8 100%
  );
  padding: 3px;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.hope-ia__highlight::before {
  content: '';
  position: absolute; inset: 3px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: transparent;
  pointer-events: none;
  box-sizing: border-box;
}

/* ───── Prefs card ───── */
.hope-ia__prefs-card {
  background: #fff;
  border: 1.5px solid var(--hia-hair);
  border-radius: 22px;
  padding: 22px 22px 26px;
  box-shadow: 0 12px 32px -16px rgba(254, 94, 26, 0.18);
}
.hope-ia__prefs-title {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 26px; font-weight: 500;
  letter-spacing: -0.6px; line-height: 1.2;
  color: var(--hia-orange); margin: 0 0 6px;
}
.hope-ia__prefs-title-meta {
  font-family: 'Fraunces','Times New Roman',serif;
  font-size: 26px; font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--hia-orange);
  opacity: 0.75;
}
.hope-ia__prefs-desc {
  font-size: 14px; font-weight: 500; line-height: 1.4;
  color: #6B7280; margin: 0 0 18px;
}

.hope-ia__pref-row { margin-bottom: 14px; }
.hope-ia__pref-row:last-child { margin-bottom: 0; }
.hope-ia__pref-cap {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.4px; line-height: 1.2;
  color: var(--hia-muted);
  margin: 0 0 8px;
}

/* ───── Small bars (Prefs) ───── */
.hope-ia__bar--small { height: 46px; gap: 3px; }
.hope-ia__bar--small .hope-ia__seg { border-radius: 6px; }
.hope-ia__bar--small .hope-ia__seg .hope-ia__pref-text {
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.1px; line-height: 1.2;
  color: var(--hia-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 4px;
}
.hope-ia__highlight--small { border-radius: 11px; }
.hope-ia__highlight--small::before { border-radius: 8px; }

/* ───── Mobile reflow (README flags this as design-TBD; minimal sane treatment) ───── */
@media (max-width: 767px) {
  .hope-ia__stage { padding: 32px 20px 40px; }
  .hope-ia__title { font-size: 22px; letter-spacing: -0.4px; }
  .hope-ia__subtitle { font-size: 13px; }
  .hope-ia__hook { font-size: 30px; letter-spacing: -0.8px; margin-top: 22px; }
  .hope-ia__hook-sub { font-size: 15px; }
  .hope-ia__row { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .hope-ia__row--first { margin-top: 36px; }
  .hope-ia__alloc { display: flex; flex-direction: column; align-items: flex-start; }
  .hope-ia__alloc-num { font-size: 32px; letter-spacing: -1.2px; }
  .hope-ia__bar { height: 64px; }
  .hope-ia__seg .hope-ia__num { font-size: 14px; }
  .hope-ia__seg .hope-ia__unit { font-size: 10px; }
  .hope-ia__seg .hope-ia__single { font-size: 18px; }
  .hope-ia__bar--small { height: 36px; }
  .hope-ia__bar--small .hope-ia__seg .hope-ia__pref-text { font-size: 10px; }
  .hope-ia__prefs-title { font-size: 22px; }
  .hope-ia__prefs-title-meta { font-size: 22px; }
}
