/* ==========================================================================
   Prosper — Stock portfolio detail page
   Tokens mirror the Figma variables (Prosper-Web, node 185:8677)
   ========================================================================== */

:root {
  --surface-background: #f8f8fa;
  --surface-elevated: #ffffff;
  --surface-primary: #f7f7f7;
  --border-primary: #e5e5e5;
  --border-secondary: #f2f2f2;
  --content-primary: #2f2f31;
  --content-secondary: #737375;
  --content-tertiary: #9d9d9e;
  --content-profit: #05b388;
  --content-loss: #e0484e;
  --content-inverted: #ffffff;
  --grey-100: #f8f8fa;
  --grey-200: #f7f7f7;
  --grey-300: #f2f2f2;
  --grey-400: #e5e5e5;
  --grey-500: #d9d9d9;
  --grey-700: #9d9d9e;
  --grey-1200: #1e1e20;
  --brand-100: #f8f4f6;
  --brand-200: #ede4ea;
  --brand-600: #6a1f52;
  --brand-800: #51183e;
  --brand-900: #421333;
  --yellow-700: #a28416;
  --green-50: #edf7f5;

  --radius-card: 16px;
  --radius-round: 100px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --shadow-pop: 0 12px 32px -10px rgba(30, 30, 32, 0.16), 0 0 0 0.5px var(--border-primary);

  --col-main: 732px;
  --col-side: 332px;
  --col-gap: 56px;
  --surface-dark-button: #121213;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-background);
  color: var(--content-primary);
  font-family: "Rethink Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" 0;
  overflow-x: hidden;
}

p, h1, h2, h3, ol { margin: 0; }
img { display: block; max-width: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgba(5, 179, 136, 0.55); outline-offset: 2px; border-radius: 6px; }

/* ----- Typography (Figma text styles) ----- */
.t-heading-xl { font-weight: 600; font-size: 44px; line-height: 56px; letter-spacing: -0.8px; }
.t-heading-lg { font-weight: 600; font-size: 32px; line-height: 38px; letter-spacing: -0.7px; }
.t-heading-sm { font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: -0.4px; }
.t-heading-xs { font-weight: 600; font-size: 20px; line-height: 26px; letter-spacing: -0.3px; }
.t-label-xxxl-bd { font-weight: 700; font-size: 24px; line-height: 32px; letter-spacing: -0.1px; }
.t-label-xl   { font-weight: 600; font-size: 20px; line-height: 26px; letter-spacing: -0.1px; }
.t-label-lg   { font-weight: 600; font-size: 18px; line-height: 24px; letter-spacing: -0.1px; }
.t-label-md   { font-weight: 600; font-size: 16px; line-height: 22px; letter-spacing: -0.1px; }
.t-label-sm   { font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px; }
.t-para-md    { font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: -0.1px; }
.t-para-sm    { font-weight: 500; font-size: 14px; line-height: 22px; letter-spacing: -0.1px; }
.t-para-xs    { font-weight: 500; font-size: 12px; line-height: 18px; letter-spacing: 0; }
.t-caption-sm { font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: 1.3px; text-transform: uppercase; }

.c-primary { color: var(--content-primary); }
.c-secondary { color: var(--content-secondary); }
.c-tertiary { color: var(--content-tertiary); }
.c-profit { color: var(--content-profit); }
.c-loss { color: var(--content-loss); }
.c-yellow { color: var(--yellow-700); }

.flip-x { transform: scaleX(-1); }
.flip-y { transform: scaleY(-1); }
.rot-90 { transform: rotate(90deg); }

.link-dotted {
  text-decoration: underline dotted;
  text-decoration-thickness: 9%;
  text-underline-position: from-font;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.link-dotted:hover { color: var(--content-primary); text-decoration-style: solid; }

/* ----- Background noise (Figma "Noise" layer): overlay 36% on the page background,
   beneath every surface. The wrapper paints the background and isolates the blend
   so the overlay always mixes with --surface-background. ----- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--surface-background);
  isolation: isolate;
}
.noise {
  position: absolute;
  inset: 0;
  background: url("../assets/noise-tile.jpg") center top / 846px auto;
  mix-blend-mode: overlay;
  opacity: 0.36;
}

/* ==========================================================================
   NAV — the landing page's floating bar (Playground 10452:43815), always in its
   "after scroll" look since this page has no hero video. Colours are the landing
   design system's, scoped here so the bar matches it exactly.
   ========================================================================== */
.nav {
  --ln-primary: #2b2b31;
  --ln-secondary: #6f6f75;
  --ln-border: #f2f2f2;
  --ln-border-2: #f7f7f7;
  --ln-dark: linear-gradient(180deg, #0f0f13 0%, #210a1a 100%);
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1144px, calc(100% - 48px));
  z-index: 50;
  border: 0.5px solid var(--ln-border-2);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  color: var(--ln-primary);
  transition: border-radius 300ms var(--ease-out), background-color 300ms var(--ease-out);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
/* The wordmark is pinned 12px from the bar's content top, as on the landing page */
.nav__logo { align-self: stretch; display: inline-flex; align-items: flex-start; padding-top: 12px; color: inherit; transition: opacity 160ms ease; }
.nav__logo svg { display: block; width: 95.869px; height: 20px; }
.nav__logo:hover { opacity: 0.75; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: 0;
  white-space: nowrap;
  font-feature-settings: "liga" 0;
  transition: transform 300ms var(--ease-out), filter 200ms var(--ease-out);
}
.nav__btn:active { transform: scale(0.97); }
.nav__btn--primary { background: var(--ln-dark); color: #fff; }
.nav__btn--glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--ln-border);
  color: var(--ln-secondary);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  cursor: default;
}
@media (hover: hover) and (pointer: fine) {
  .nav__btn--primary:hover { filter: brightness(1.25); }
}

/* QR popover under "Download app" (Playground 10452:43817) */
.nav__download { position: relative; }
.nav__qr {
  position: absolute;
  top: calc(100% + 12.5px);
  left: 50%;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 12px 6px;
  border-radius: 12px;
  background: var(--ln-dark);
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.02));
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px) scale(0.97);
  transform-origin: 50% 0;
  cursor: pointer;
  transition: opacity 200ms var(--ease-out), transform 250ms var(--ease-out), visibility 0s linear 250ms;
}
.nav__qr::before { content: ""; position: absolute; inset: -12.5px 0 100% 0; }
.nav__qr p { font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: -0.4px; color: #fff; white-space: nowrap; }
.nav__qr-code { position: relative; display: block; width: 140px; height: 140px; overflow: hidden; box-shadow: 0 0 12px rgba(0, 0, 0, 0.04); }
.nav__qr-code img { position: absolute; top: -4.82%; left: -23.09%; width: 146.18%; height: 109.63%; max-width: none; }
.nav__download:hover .nav__qr,
.nav__download:focus-within .nav__qr {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
  transition: opacity 200ms var(--ease-out), transform 250ms var(--ease-out), visibility 0s;
}

/* Phone: menu button + sheet, as on the landing page */
.nav__toggle { display: none; width: 44px; height: 44px; place-items: center; color: inherit; }
.nav__toggle-close, .nav.is-open .nav__toggle-menu { display: none; }
.nav.is-open .nav__toggle-close { display: block; }
.nav.is-open { background: var(--surface-elevated); border-radius: 20px; }
.nav__sheet { border-top: 1px solid var(--ln-border); height: calc(100dvh - 64px - 16px); overflow-y: auto; }
.nav__sheet[hidden] { display: none; }
.nav__sheet nav { display: flex; flex-direction: column; padding: 16px 16px 32px; }
.nav__sheet nav > a { padding: 16px 0; font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: -0.4px; border-bottom: 1px solid var(--ln-border); }
.nav__sheet-actions { display: grid; gap: 8px; margin-top: 24px; }
.nav__sheet-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 24px;
  border-radius: 64px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 16px; line-height: 22px; letter-spacing: -0.1px;
  transition: transform 160ms var(--ease-out);
}
.nav__sheet-btn:active { transform: scale(0.97); }
.nav__sheet-btn--primary { background: var(--ln-dark); color: #fff; }
.nav__sheet-btn--ghost { border-color: var(--ln-primary); color: var(--ln-primary); }
html.nav-locked { overflow: hidden; }
@media (max-width: 860px) {
  .nav__actions { display: none; }
  .nav__toggle { display: grid; }
}
@media (max-width: 720px) {
  .nav { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .nav__qr { transition: none; }
}

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */
.page {
  position: relative;
  z-index: 1;
  max-width: calc(var(--col-main) + var(--col-gap) + var(--col-side));
  margin: 0 auto;
  padding: 121px 0 157px;
  display: grid;
  grid-template-columns: minmax(0, var(--col-main)) var(--col-side);
  grid-template-areas: "hero side" "rest side";
  column-gap: var(--col-gap);
  row-gap: 72px;
  align-items: start;
}
.hero { grid-area: hero; min-width: 0; }
.sidebar { grid-area: side; }
.main-rest { grid-area: rest; min-width: 0; display: flex; flex-direction: column; gap: 72px; }

.card {
  background: var(--surface-elevated);
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 0.5px var(--border-secondary); /* Figma inside stroke */
}
.section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; gap: 6px; align-items: center; }
.section-head__bar { width: 3px; height: 12px; border-radius: var(--radius-round); background: var(--grey-500); flex-shrink: 0; }

/* Scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { display: flex; flex-direction: column; gap: 40px; }
.hero__header { display: flex; flex-direction: column; gap: 16px; }
.hero__title-row { display: flex; gap: 16px; align-items: center; }
.hero__meta { display: flex; flex-direction: column; gap: 12px; }
.hero__desc { width: 580px; max-width: 100%; }
.hero__tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 8px;
  border-radius: var(--radius-round);
  background: var(--grey-300);
  color: var(--content-secondary);
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.tag-chip:hover { background: var(--grey-400); color: var(--content-primary); }
.tag-chip:active { transform: scale(0.96); }
.hero__logo {
  width: 48px; height: 48px; flex-shrink: 0;
  border: 0.5px solid var(--border-secondary);
  border-radius: 10px;
  overflow: hidden;
}
.hero__logo img { width: 100%; height: 100%; object-fit: cover; }
.hero__title { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; min-width: 0; }
.hero__title h1 { overflow: hidden; text-overflow: ellipsis; }

.chart-block { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.chart-panel {
  width: 100%;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: inset 0 -0.5px 0 var(--border-primary);
}
.chart-head { display: flex; align-items: center; height: 54px; }
.chart-head__col { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.chart-head__col--end { align-items: flex-end; }
.chart-head__label { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.chart-head__value { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.chart-head__col p { white-space: nowrap; font-variant-numeric: tabular-nums; transition: color 200ms ease; }

.info-btn { display: grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; transition: transform 160ms var(--ease-out), opacity 160ms ease; }
.info-btn:hover { transform: scale(1.15); }
.info-btn:hover img { filter: brightness(0.5); }

.benchmark-btn {
  display: flex; gap: 2px; align-items: center;
  border-radius: 6px;
  padding: 0 2px; margin: 0 -2px;
  transition: background-color 160ms ease;
}
.benchmark-btn:hover, .benchmark-btn[aria-expanded="true"] { background: var(--grey-300); }
.benchmark-btn img { transition: transform 220ms var(--ease-out); }
.benchmark-btn[aria-expanded="true"] img { transform: scaleX(-1) rotate(180deg); }

/* Hero chart */
.hero-chart {
  position: relative;
  height: 280px;
  width: 100%;
  cursor: crosshair;
  touch-action: pan-y;
  border-radius: 0;
}
.hero-chart:focus-visible { outline-offset: 4px; }
.hero-chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-chart__crosshair {
  position: absolute; left: 0; bottom: 0;
  width: 1px; height: 191.658px;
  transform: translateX(-0.5px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.hero-chart__dot {
  position: absolute; left: 0; top: 0;
  width: 16px; height: 16px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Chart tooltip (shared look, Figma 185:8715 / 189:11580) */
.chart-tip {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--surface-elevated);
  border: 0.5px solid var(--border-primary);
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}
.hero-chart__tip { top: 36.83px; gap: 4px; padding: 6px 8px; }
.chart-tip__row { display: flex; gap: 7px; align-items: center; }
.chart-tip__val { display: flex; gap: 4px; align-items: center; font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px; }
.chart-tip__divider { display: grid; place-items: center; width: 0; height: 10px; }
.chart-tip__divider img { transform: rotate(90deg); }

/* Range tabs */
.range-tabs { position: relative; display: flex; gap: 8px; align-items: center; justify-content: center; }
.range-tab {
  position: relative; z-index: 1;
  padding: 3px 10px;
  border-radius: var(--radius-round);
  color: var(--content-tertiary);
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px; text-align: center;
  transition: color 200ms ease, background-color 160ms ease, transform 160ms var(--ease-out);
}
.range-tab:hover { color: var(--content-secondary); background: rgba(229, 229, 229, 0.45); }
.range-tab:active { transform: scale(0.95); }
.range-tab.is-active { color: var(--content-primary); background: transparent; }
.range-tabs__pill {
  position: absolute; top: 0; left: 0;
  height: 26px; width: 0;
  border-radius: var(--radius-round);
  background: var(--grey-400);
  transition: transform 340ms var(--ease-out), width 340ms var(--ease-out);
}
.no-anim .range-tabs__pill, .no-anim .segmented__pill { transition: none; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  position: sticky;
  top: 101px;
  background: var(--surface-elevated);
  box-shadow: inset 0 0 0 0.5px var(--border-secondary);
  border-radius: var(--radius-card);
  z-index: 5;
}
.sidebar__stats-wrap { padding: 0 20px; }
.sidebar__stats {
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 0 14.5px;
  border-bottom: 1.5px dashed var(--border-primary);
}
.stat-row { display: flex; gap: 2px; align-items: flex-start; border-radius: 6px; margin: -3px -6px; padding: 3px 6px; transition: background-color 160ms ease; cursor: default; }
.stat-row:hover { background: var(--grey-100); }
.stat-row__label { flex: 1 0 0; min-width: 1px; display: flex; gap: 8px; align-items: center; }
.stat-row__icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: var(--grey-200); flex-shrink: 0; }
.stat-row > span:last-child { white-space: nowrap; line-height: 20px; padding-top: 1px; }
.stat-row .t-para-sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar__plan { display: flex; flex-direction: column; gap: 16px; padding: 12px 20px 20px; }
.sidebar__plan-field { display: flex; flex-direction: column; gap: 6px; }
.plan-select {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px;
  box-shadow: inset 0 0 0 0.5px var(--border-primary);
  border-radius: 10px;
  text-align: left;
  transition: box-shadow 200ms ease, background-color 160ms ease;
}
.plan-select:hover { box-shadow: inset 0 0 0 0.5px #c9c9cc; background: var(--grey-100); }
.plan-select[aria-expanded="true"] { box-shadow: inset 0 0 0 0.5px #c9c9cc, 0 0 0 3px rgba(0,0,0,0.035); }
.plan-select__text { flex: 1 0 0; min-width: 1px; font-weight: 600; letter-spacing: -0.1px; }
.plan-select__price { font-size: 16px; line-height: 22px; }
.plan-select__slash { font-size: 14px; line-height: 20px; }
.plan-select__period { font-size: 12px; line-height: 16px; color: var(--content-tertiary); }
.plan-select__chev { transition: transform 220ms var(--ease-out); }
.plan-select[aria-expanded="true"] .plan-select__chev { transform: scaleX(-1) rotate(180deg); }

.btn-primary {
  position: relative;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 13px 12px;
  border-radius: var(--radius-round);
  background: linear-gradient(to bottom, var(--grey-1200), var(--brand-900));
  color: var(--content-inverted);
  font-weight: 600; font-size: 16px; line-height: 22px; letter-spacing: -0.1px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 180ms var(--ease-out), box-shadow 220ms ease;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, #2a2a2d, var(--brand-800));
  opacity: 0;
  transition: opacity 220ms ease;
}
.btn-primary::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: translateX(0) skewX(-12deg);
  opacity: 0;
}
.btn-primary:hover { box-shadow: 0 10px 24px -12px rgba(66, 19, 51, 0.7); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover::after { opacity: 1; animation: sheen 900ms var(--ease-out); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.is-loading span { opacity: 0.6; }
@keyframes sheen { from { transform: translateX(0) skewX(-12deg); } to { transform: translateX(560%) skewX(-12deg); } }

/* ==========================================================================
   ALLOCATION
   ========================================================================== */
.alloc { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.segmented {
  position: relative;
  display: inline-flex; align-self: flex-start; align-items: center;
  padding: 6px;
  border-radius: var(--radius-round);
  background: var(--grey-200);
  box-shadow: inset 0 0 0 1px #fff, inset 0 2px 6px rgba(0, 0, 0, 0.03);
}
.segmented__btn {
  position: relative; z-index: 1;
  padding: 4px 12px;
  border-radius: var(--radius-round);
  color: var(--content-tertiary);
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px;
  white-space: nowrap;
  transition: color 220ms ease;
}
.segmented__btn:hover { color: var(--content-secondary); }
.segmented__btn.is-active { color: var(--content-primary); }
.segmented__pill {
  position: absolute; top: 6px; left: 0;
  height: calc(100% - 12px);
  width: 0;
  transition: transform 360ms var(--ease-out), width 360ms var(--ease-out);
}
.segmented__pill-inner {
  position: absolute; inset: 0;
  border-radius: var(--radius-round);
  background: var(--surface-elevated);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.03), 0 0 0 1px var(--grey-300), inset 0 0 0 1px #fff, inset 0 2px 6px rgba(237, 237, 240, 0.32);
}

.alloc__viewport { position: relative; transition: height 380ms var(--ease-out); }
.alloc__panel { display: flex; flex-direction: column; gap: 12px; }
.alloc__panel[hidden] { display: none; }
.alloc__panel.is-entering { animation: panelIn 360ms var(--ease-out); }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.dist-bar { display: flex; gap: 2px; height: 18px; align-items: center; }
.dist-seg {
  position: relative;
  height: 18px;
  border: 1px solid;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transform-origin: center;
  transition: opacity 220ms ease, transform 260ms var(--ease-out), filter 220ms ease;
}
.dist-seg--grow { flex: 1 0 0; min-width: 1px; }
.dist-bar.is-focus .dist-seg { opacity: 0.35; }
.dist-bar.is-focus .dist-seg.is-hot { opacity: 1; transform: scaleY(1.22); filter: saturate(1.1); }
.dist-bar { clip-path: inset(-6px 0 -6px 0); transition: clip-path 1000ms var(--ease-out); }
.js .dist-bar.is-pre { clip-path: inset(-6px 100% -6px 0); }

.dist-legend { display: flex; gap: 20px; align-items: flex-start; }
.legend-item {
  flex: 1 0 0; min-width: 1px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  text-align: left;
  border-radius: 8px;
  padding: 2px 6px; margin: -2px -6px;
  transition: opacity 220ms ease, background-color 160ms ease;
}
.legend-item:hover { background: var(--grey-100); }
.legend-item { cursor: default; }
.legend-item__label { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.legend-item__mark { width: 3px; height: 14px; border-radius: 1px; flex-shrink: 0; transition: height 220ms var(--ease-out); }
.legend-item:hover .legend-item__mark, .legend-item.is-hot .legend-item__mark { height: 18px; }
.legend-item__value { font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: -0.1px; font-variant-numeric: tabular-nums; }
.dist-legend.is-focus .legend-item { opacity: 0.4; }
.dist-legend.is-focus .legend-item.is-hot { opacity: 1; }

/* Holdings — sector accordion (Figma 131:1890) */
.alloc__panel--holdings { gap: 16px; }
.alloc__panel--holdings .sectors { margin-top: -4px; } /* Stock/ETF row → list is 12px in Figma */
.sectors { display: flex; flex-direction: column; }
.sector { padding: 10px 0; transition: opacity 220ms ease, padding 380ms var(--ease-out); }
.sector:first-child { padding-top: 0; }
.sector:last-child { padding-bottom: 0; }
.sector.is-open:not(:last-child) { padding-bottom: 8px; }
.sectors.is-focus .sector:not(.is-hot) { opacity: 0.5; }
.sector__body { position: relative; }
.sector__mark {
  position: absolute; left: 0; top: 5px;
  width: 3px; height: 14px;
  border-radius: 1px;
  background: var(--c);
  transition: height 380ms var(--ease-out);
  pointer-events: none;
}
.sector.is-open .sector__mark { height: calc(100% - 5px); }
.sector__head {
  width: 100%;
  display: flex; gap: 24px; align-items: center; justify-content: space-between;
  padding-left: 9px;
  text-align: left;
  border-radius: 6px;
  transition: padding 380ms var(--ease-out);
}
.sector.is-open .sector__head { padding-left: 10px; }
.sector__head:focus-visible { outline-offset: 3px; }
.sector__name {
  flex: 1 0 0; min-width: 1px;
  font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: -0.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sector__pct { display: flex; gap: 4px; align-items: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sector__chev { transform: scaleX(-1); transition: transform 320ms var(--ease-out); }
.sector.is-open .sector__chev { transform: scaleY(-1); }
.sector__head:hover .sector__name { color: #000; }
.sector__stocks { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 380ms var(--ease-out); }
.sector.is-open .sector__stocks { grid-template-rows: 1fr; }
.sector__stocks > div { overflow: hidden; min-height: 0; }
.sector__list { list-style: none; margin: 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 16px; }
.stock { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--content-secondary); transition: color 160ms ease; }
.stock:hover { color: var(--content-primary); }
.sector.is-open .stock { animation: rowIn 360ms var(--ease-out) both; }
.sector.is-open .stock:nth-child(2) { animation-delay: 40ms; }
.sector.is-open .stock:nth-child(3) { animation-delay: 80ms; }
.sector.is-open .stock:nth-child(4) { animation-delay: 120ms; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.stock__logo {
  position: relative;
  display: grid; place-items: center;
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: var(--radius-round);
  box-shadow: inset 0 0 0 0.5px var(--border-primary);
  background: #fff;
  overflow: hidden;
  font-weight: 600; font-size: 8px; letter-spacing: 0.2px; color: var(--content-secondary);
}
.stock__logo img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.stock__name { flex: 1 0 0; min-width: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock__w { margin-left: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Shared hover tooltip */
.tooltip {
  position: fixed; left: 0; top: 0; z-index: 200;
  max-width: 240px;
  padding: 6px 10px;
  background: var(--surface-elevated);
  border: 0.5px solid var(--border-primary);
  border-radius: 8px;
  box-shadow: 0 8px 24px -10px rgba(30, 30, 32, 0.18);
  color: var(--content-secondary);
  font-weight: 500; font-size: 12px; line-height: 18px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 200ms var(--ease-out);
}
.tooltip.is-visible { opacity: 1; transform: none; }
.tooltip b { color: var(--content-primary); font-weight: 600; }

/* ==========================================================================
   ABOUT PORTFOLIO
   ========================================================================== */
.about { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.about__text {
  position: relative;
  overflow: hidden;
  transition: height 420ms var(--ease-out);
}
.about__text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
}
.about__toggle { text-align: left; }

/* ==========================================================================
   RETURNS CALCULATOR (Figma 332:76904)
   ========================================================================== */
.calc3 { position: relative; overflow: clip; isolation: isolate; }
.calc3::after { /* the card's 0.5px inside stroke, drawn above the header */
  content: ""; position: absolute; inset: 0; z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0.5px var(--border-secondary);
  pointer-events: none;
}
.calc3__head {
  position: relative;
  display: flex; align-items: flex-start; gap: 38px;
  height: 160px;
  padding: 24px 72px 24px 24px;
  overflow: clip;
  background: linear-gradient(to bottom, #fff, #fffcfe);
  box-shadow: inset 0 -0.5px 0 var(--border-secondary);
}
.calc3__noise {
  position: absolute; inset: 0.5px 0 -0.75px; z-index: 0;
  background: url("../assets/noise-tile.jpg") center / 846px auto;
  mix-blend-mode: overlay;
  opacity: 0.36;
  pointer-events: none;
}
/* Figma "bg" group: 0.5px #EDEDED grid (12.004 × 11.3265 pitch) inside a framed 396.6 × 227 box,
   faded by the radial mask from the design so it glows around the cube. */
.calc3__grid {
  position: absolute; z-index: 0;
  right: -26.11px; top: -23.57px;
  width: 396.635px; height: 226.983px;
  background:
    url("../assets/calc-grid-frame.svg") 0 0 / 100% 100% no-repeat,
    linear-gradient(#ededed 0 0.468px, transparent 0.468px) 0 11.33px / 100% 11.3265px repeat-y,
    linear-gradient(to right, #ededed 0 0.5125px, transparent 0.5125px) 12px 0 / 12.004px 100% repeat-x;
  -webkit-mask: url("../assets/calc-grid-mask.svg") 26.098px 23.572px / 344.426px 160px no-repeat;
          mask: url("../assets/calc-grid-mask.svg") 26.098px 23.572px / 344.426px 160px no-repeat;
  pointer-events: none;
}
.calc3__worth {
  position: relative; z-index: 1;
  flex: 1 0 0; min-width: 1px;
  display: flex; flex-direction: column; gap: 4px;
  white-space: nowrap;
}
.calc3__worth-row { display: flex; align-items: baseline; gap: 12px; }
.calc3__worth-row p, .calc3__tag { font-variant-numeric: tabular-nums; }

/* Cube + its two callouts. Callouts hang off the cube's left edge and follow the slab heights. */
.calc3__viz { position: relative; z-index: 1; flex: none; width: 58.0531px; height: 120px; }
.calc3__cube { display: block; overflow: visible; }
.calc3__tag {
  position: absolute; right: calc(100% + 21.52px); top: 0;
  margin-top: -11px; /* centre the 22px line on the callout's y */
  white-space: nowrap;
  will-change: transform;
}
.calc3__tag-gain, .calc3__tag-inv { font-weight: 600; line-height: 20px; }
.calc3__tag-inv { color: var(--content-primary); }
.calc3__tag-gain { color: var(--brand-600); }
.calc3__tag-gain .roll-cur, .calc3__tag-gain .roll-old {
  background: linear-gradient(157.46deg, #6a1f52 0%, #421333 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.calc3__leader {
  position: absolute; right: calc(100% + 2.35px); top: 0;
  width: 17.6523px; height: 1px; margin-top: -0.5px;
  will-change: transform;
}

.calc3__inputs { display: flex; align-items: stretch; }
.calc3__invest {
  flex: 1 0 0; min-width: 1px;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  box-shadow: inset -0.5px 0 0 var(--border-secondary);
}
.calc3__invest-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc3__period { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; gap: 16px; padding: 24px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Rolling digits (see Roller in app.js) */
.roll-slot { position: relative; display: inline-block; overflow: hidden; vertical-align: top; white-space: pre; }
.roll-cur { display: inline-block; will-change: transform, opacity; }
.roll-old { position: absolute; left: 0; top: 0; will-change: transform, opacity; }


.amount-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px;
  padding: 3px 8px 3px 3px;
  border-radius: var(--radius-round);
  background: var(--surface-primary);
  box-shadow: inset 0 0 0 1px var(--border-primary);
  cursor: text;
  transition: box-shadow 200ms ease, background-color 160ms ease;
}
.amount-pill:hover { box-shadow: inset 0 0 0 1px #d4d4d6; }
.amount-pill:focus-within { background: #fff; box-shadow: inset 0 0 0 1px var(--content-profit), 0 0 0 3px rgba(5, 179, 136, 0.12); }
.amount-pill.is-shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.amount-pill__sym {
  display: grid; place-items: center;
  width: 20px; height: 20px; padding-left: 1px;
  border-radius: var(--radius-round);
  background: var(--surface-elevated);
  box-shadow: inset 0 0 0 0.5px var(--border-primary);
  font-weight: 600; font-size: 12px; line-height: 16px;
}
.amount-pill input {
  field-sizing: content;
  min-width: 1ch; width: 56px;
  border: 0; outline: 0; padding: 0;
  background: transparent;
  color: var(--content-primary);
  font: 600 14px/20px "Rethink Sans", system-ui, sans-serif;
  letter-spacing: -0.1px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
@supports (field-sizing: content) { .amount-pill input { width: auto; } }

.mult-slider { display: flex; flex-direction: column; gap: 4px; }
.mult-slider__track {
  position: relative;
  height: 8px;
  border-radius: var(--radius-round);
  background: var(--grey-300);
  cursor: pointer;
  touch-action: none;
}
.mult-slider__track::before { content: ""; position: absolute; inset: -8px 0; } /* bigger hit area */
.mult-slider__track:focus-visible { outline-offset: 6px; }
.mult-slider__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 85.34px;
  border-radius: var(--radius-round);
  background: var(--surface-dark-button);
}
.mult-slider__knob {
  position: absolute; left: 84px; top: 50%;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%);
  transition: transform 160ms var(--ease-out);
  pointer-events: none;
}
.mult-slider.is-animating .mult-slider__fill { transition: width 320ms var(--ease-out); }
.mult-slider.is-animating .mult-slider__knob { transition: left 320ms var(--ease-out), transform 160ms var(--ease-out); }
.mult-slider__track:hover .mult-slider__knob { transform: translate(-50%, -50%) scale(1.15); }
.mult-slider.is-dragging .mult-slider__knob { transform: translate(-50%, -50%) scale(1.3); }
.mult-slider__labels { display: flex; justify-content: space-between; white-space: nowrap; }
.mult-slider__labels button { color: inherit; border-radius: 4px; transition: color 160ms ease; }
.mult-slider__labels button:hover { color: var(--content-primary); }

.period-chips { position: relative; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period-chips__pill {
  position: absolute; left: 0; top: 0; height: 24px; width: 0;
  border-radius: var(--radius-round);
  background: var(--surface-dark-button);
  transition: transform 320ms var(--ease-out), width 320ms var(--ease-out);
}
.no-anim .period-chips__pill { transition: none; }
.period-chip {
  position: relative; z-index: 1;
  padding: 4px 10px;
  border-radius: var(--radius-round);
  box-shadow: inset 0 0 0 1px var(--border-secondary);
  color: var(--content-tertiary);
  font-weight: 600; font-size: 12px; line-height: 16px; text-align: center;
  white-space: nowrap;
  transition: color 200ms ease, box-shadow 200ms ease, transform 160ms var(--ease-out);
}
.period-chip:hover { color: var(--content-secondary); box-shadow: inset 0 0 0 1px var(--border-primary); }
.period-chip:active { transform: scale(0.95); }
.period-chip[aria-checked="true"] { color: var(--content-inverted); box-shadow: none; }

/* ==========================================================================
   KEY DETAILS
   ========================================================================== */
.keyd { display: flex; gap: 32px; align-items: flex-start; padding: 20px; }
.keyd__stats { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.keyd__stat { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; white-space: nowrap; }
.keyd__stat .t-para-sm { line-height: 22px; }
.keyd__stat-value { border-radius: 4px; text-decoration: underline dotted transparent; text-underline-position: from-font; transition: text-decoration-color 160ms ease; }
.keyd__stat-value:hover { text-decoration-color: var(--content-tertiary); }
.keyd__divider { width: 0; height: 108px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.keyd__divider img { transform: rotate(90deg); flex-shrink: 0; }
.keyd__rebalance { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; gap: 12px; }
.keyd__rebalance-head { display: flex; align-items: center; justify-content: space-between; }
.timeline-link { display: flex; gap: 2px; align-items: center; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; transition: background-color 160ms ease; }
.timeline-link:hover { background: var(--grey-200); }
.timeline-link:hover .link-dotted { text-decoration-style: solid; }

.steps { display: flex; flex-direction: column; gap: 12px; }
.steps__track { display: flex; gap: 3px; align-items: center; }
.steps__line { flex: 1 0 0; min-width: 1px; height: 1px; position: relative; }
.steps__line img { position: absolute; inset: 0; width: 100%; height: 100%; }
.step-dot {
  position: relative;
  display: grid; place-items: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: var(--radius-round);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease;
}
.step-dot--done { background: var(--green-50); border: 0.5px solid rgba(5, 179, 136, 0.1); }
.step-dot--next { background: var(--surface-primary); border: 0.5px solid var(--border-secondary); }
.step-dot:hover { transform: scale(1.12); box-shadow: 0 0 0 4px rgba(5, 179, 136, 0.08); }
.step-dot--next:hover { box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04); }
.step-dot--next::after {
  content: "";
  position: absolute; inset: -0.5px;
  border-radius: inherit;
  border: 1px solid rgba(47, 47, 49, 0.18);
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.9; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .step-dot--next::after { animation: none; display: none; } }

.steps__labels { display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.steps__label { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; align-items: flex-start; }
.steps__label--center { align-items: center; text-align: center; }
.steps__label--end { align-items: flex-end; text-align: right; }

/* ==========================================================================
   ACCORDION — Methodology & factsheet
   ========================================================================== */
.accordion { padding: 0; overflow: clip; transition: box-shadow 220ms ease; }
.accordion:hover { box-shadow: 0 6px 24px -16px rgba(30, 30, 32, 0.18); }
.accordion__head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px;
  text-align: left;
  border-radius: var(--radius-card);
}
.accordion__head:focus-visible { outline-offset: -2px; }
.accordion__chev { transform: scaleY(-1); transition: transform 320ms var(--ease-out); }
.accordion__head:hover .accordion__chev { transform: scaleY(-1) translateY(-2px); }
.accordion.is-open .accordion__chev { transform: scaleY(1); }
.accordion.is-open .accordion__head:hover .accordion__chev { transform: translateY(-2px); }
.accordion__body { height: 0; overflow: hidden; transition: height 420ms var(--ease-out); }
.accordion__content {
  display: flex; flex-direction: column; gap: 20px;
  padding: 0 20px 20px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 300ms ease, transform 420ms var(--ease-out);
}
.accordion.is-open .accordion__content { opacity: 1; transform: none; transition-delay: 60ms; }

.method {
  list-style: none; margin: 0; padding: 0 0 15px;
  display: flex; flex-direction: column; gap: 16px;
  border-bottom: 1px dashed var(--border-primary);
}
.method__item { display: flex; flex-direction: column; gap: 2px; }
.accordion.is-open .method__item { animation: rowIn 420ms var(--ease-out) both; }
.accordion.is-open .method__item:nth-child(2) { animation-delay: 40ms; }
.accordion.is-open .method__item:nth-child(3) { animation-delay: 80ms; }
.accordion.is-open .method__item:nth-child(4) { animation-delay: 120ms; }
.accordion.is-open .method__item:nth-child(5) { animation-delay: 160ms; }
.method__head { display: flex; gap: 8px; align-items: center; }
.method__icon { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 4px; background: var(--grey-200); }
.method__desc { padding-left: 30px; }
.method__factsheet { display: inline-flex; gap: 8px; align-items: center; align-self: flex-start; border-radius: 6px; }
.method__factsheet-link { display: flex; gap: 2px; align-items: center; }
.method__factsheet-link img { transition: transform 220ms var(--ease-out); }
.method__factsheet:hover .link-dotted { text-decoration-style: solid; }
.method__factsheet:hover .method__factsheet-link img { transform: scaleY(-1) translateX(2px); }

.btn-secondary {
  position: relative;
  flex-shrink: 0;
  display: inline-flex; gap: 4px; align-items: center; justify-content: center;
  padding: 6px 12px;
  border-radius: var(--radius-round);
  background: linear-gradient(to bottom, var(--grey-100), var(--grey-300));
  box-shadow: 0 0 0 1px var(--grey-400), inset 0 0 0 1px #fff, inset 0 2px 6px rgba(237, 237, 240, 0.4);
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px;
  white-space: nowrap;
  transition: transform 180ms var(--ease-out), box-shadow 200ms ease, background 200ms ease;
}
.btn-secondary img { transition: transform 220ms var(--ease-out); }
.btn-secondary:hover { box-shadow: 0 0 0 1px #d6d6d8, 0 6px 14px -8px rgba(30, 30, 32, 0.25), inset 0 0 0 1px #fff, inset 0 2px 6px rgba(237, 237, 240, 0.4); background: linear-gradient(to bottom, #fff, var(--grey-200)); }
.btn-secondary:hover img:not(.rot-90) { transform: translateX(2px); }
.btn-secondary:hover img.rot-90 { transform: rotate(90deg) translateX(2px); }
.btn-secondary:active { transform: scale(0.97); }

/* ==========================================================================
   ABOUT MANAGER + ID BADGE
   ========================================================================== */
.manager { display: flex; align-items: flex-start; overflow: clip; }
.manager__stage-wrap { width: 260px; height: 240px; padding: 6px; flex-shrink: 0; }
.badge-stage {
  position: relative;
  width: 100%; height: 230px;
  border-radius: var(--radius-card);
  background: linear-gradient(to bottom, var(--brand-100), var(--brand-200));
  overflow: clip;
  perspective: 900px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.badge-stage.is-dragging { cursor: grabbing; }
.badge-stage__noise {
  position: absolute; left: 50%; top: 50%;
  width: 248px; height: 230px;
  transform: translate(-50%, -50%);
  background: url("../assets/noise-tile.jpg") center / 113px auto;
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
}
.badge-stage__light {
  position: absolute; inset: 0;
  background: radial-gradient(160px 140px at var(--lx, 50%) var(--ly, 55%), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.badge-stage.is-hover .badge-stage__light { opacity: 1; }

.badge {
  position: absolute; left: 24px; top: 18px;
  width: 200px; height: 200px;
  transform-origin: 100.28px -58px;
  transform: rotate(var(--swing, 0deg));
  will-change: transform;
}
.badge__strap { position: absolute; z-index: 1; left: 93.28px; top: -76px; width: 14px; height: 86.2px; }
.badge__strap img { position: absolute; left: -1px; top: 0; width: 16px; height: 88.2px; }
.badge__card {
  position: absolute; inset: 0;
  background: var(--surface-elevated);
  border: 0.4px solid var(--border-secondary);
  border-radius: 12px;
  overflow: clip;
  transform-origin: 50% 0%;
  transform: perspective(700px) translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--scale, 1));
  box-shadow:
    0 20px 36px -18px rgba(106, 31, 82, 0.35),
    0 0 40px 0 rgba(0, 0, 0, 0.03),
    0 0 0 0 rgba(255, 255, 255, 0);
  transition: box-shadow 360ms var(--ease-out);
  will-change: transform;
}
.badge-stage.is-hover .badge__card {
  box-shadow:
    0 22px 38px -18px rgba(106, 31, 82, 0.38),
    0 0 40px 0 rgba(0, 0, 0, 0.03),
    0 0 16px 0 rgba(255, 255, 255, 0.55),
    0 0 28px 2px rgba(197, 120, 168, 0.1);
}
.badge__wave { position: absolute; left: 50%; bottom: -0.2px; width: 200px; height: 50px; transform: translateX(-50%); overflow: clip; }
.badge__wave img { position: absolute; inset: 0; width: 100%; height: 100%; object-position: bottom; }
.badge__photo {
  position: absolute; left: calc(50% + 43px); top: 97.8px;
  width: 90px; height: 90px;
  transform: translateX(-50%);
  border: 2px solid #fff;
  border-radius: var(--radius-round);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.badge__photo img { width: 100%; height: 100%; }
.badge__slot {
  position: absolute; left: calc(50% + 0.28px); top: 7.8px;
  width: 24px; height: 4px;
  transform: translateX(-50%);
  border-radius: var(--radius-round);
  background: #f7f7f7;
  box-shadow: inset 0 0 0.5px 0.5px rgba(0, 0, 0, 0.05);
}
.badge__head { position: absolute; left: 11.8px; top: 23.8px; width: 176px; display: flex; align-items: center; justify-content: space-between; }
.badge__name { width: 98px; display: flex; flex-direction: column; }
.badge__name .t-label-md { margin-bottom: -1px; }
.badge__exp { position: absolute; left: 7.8px; top: 72.8px; display: flex; align-items: center; white-space: nowrap; }
.badge__laurel { position: relative; width: 16px; height: 16px; overflow: clip; flex-shrink: 0; }
.badge__laurel img { position: absolute; left: 50%; top: calc(50% + 0.13px); width: 22.4px; height: 22.4px; transform: translate(-50%, -50%); object-fit: cover; }
.badge__laurel--flip img { transform: translate(-50%, -50%) scaleX(-1); }
.badge__glare {
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(220px 180px at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 60%),
    linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255, 220, 240, 0.08) var(--sheen, 50%), rgba(255,255,255,0) 70%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 360ms ease;
  pointer-events: none;
}
.badge-stage.is-hover .badge__glare { opacity: 1; }

.manager__info {
  flex: 1 0 0; min-width: 1px; align-self: stretch;
  display: flex; flex-direction: column; gap: 24px; justify-content: center;
  padding: 20px 20px 20px 16px;
}
.manager__bio {
  display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--border-primary);
}
.manager__bio > div { display: flex; flex-direction: column; gap: 2px; }
.manager__foot { display: flex; gap: 16px; align-items: center; }
.manager__strategies { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px;
  border-radius: var(--radius-round);
  background: var(--grey-200);
  color: var(--content-secondary);
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.chip:hover { background: var(--grey-300); color: var(--content-primary); }
.chips .chip--extra { display: none; }
.chips.is-expanded .chip--extra { display: inline-flex; animation: chipIn 320ms var(--ease-out) both; }
.chips.is-expanded .chip--extra:nth-child(5) { animation-delay: 40ms; }
.chips.is-expanded .chip--extra:nth-child(6) { animation-delay: 80ms; }
.chips.is-expanded .chip--extra:nth-child(7) { animation-delay: 120ms; }
@keyframes chipIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
.chips__more { white-space: nowrap; border-radius: 6px; padding: 0 4px; margin: 0 -4px; transition: color 160ms ease, background-color 160ms ease; }
.chips__more:hover { color: var(--content-primary); background: var(--grey-200); }

/* ==========================================================================
   DISCLAIMER
   ========================================================================== */
.disclaimer { display: flex; flex-direction: column; gap: 4px; }

/* ==========================================================================
   DROPDOWN MENUS
   ========================================================================== */
.dropdown { position: relative; }
.dropdown--block { width: 100%; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 168px;
  padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-elevated);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 160ms ease, transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
.menu--right { left: auto; right: 0; transform-origin: top right; }
.menu--block { right: 0; }
.menu--wide { width: 300px; }
.dropdown.is-open .menu { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 160ms ease, transform 200ms var(--ease-out), visibility 0s; }
.menu__title { padding: 8px 10px 4px; font-weight: 600; font-size: 12px; line-height: 18px; color: var(--content-tertiary); letter-spacing: 0.4px; text-transform: uppercase; }
.menu__item, .menu__option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px;
  white-space: nowrap;
  color: var(--content-primary);
  transition: background-color 120ms ease;
}
.menu__item:hover, .menu__option:hover, .menu__item:focus-visible, .menu__option:focus-visible, .menu__option.is-kbd { background: var(--grey-200); outline: none; }
.menu__option .menu__check { opacity: 0; transition: opacity 120ms ease; }
.menu__option[aria-selected="true"] .menu__check { opacity: 1; }
.menu__option-meta { font-weight: 500; font-size: 12px; line-height: 18px; color: var(--content-tertiary); }
.menu__option-meta.c-profit { color: var(--content-profit); }
.menu__option-left { display: flex; flex-direction: column; }
.menu__option-right { display: flex; align-items: center; gap: 8px; }
.menu__sep { height: 0.5px; background: var(--border-primary); margin: 4px 6px; }
.menu__notif {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-weight: 500; font-size: 12px; line-height: 18px;
  color: var(--content-secondary);
  transition: background-color 120ms ease;
}
.menu__notif b { font-weight: 600; font-size: 14px; line-height: 20px; color: var(--content-primary); letter-spacing: -0.1px; }
.menu__notif:hover { background: var(--grey-200); }
.menu__notif-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--content-profit); margin-top: 7px; flex-shrink: 0; }
.menu__notif.is-read .menu__notif-dot { background: var(--grey-500); }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 30, 32, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 240ms ease;
}
.modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  background: var(--surface-elevated);
  border-radius: 20px;
  box-shadow: 0 30px 80px -24px rgba(30, 30, 32, 0.35), 0 0 0 0.5px var(--border-primary);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
  overflow: hidden;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 20px 16px; border-bottom: 0.5px solid var(--border-secondary); }
.modal__body { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 20px; }
.close-x { position: relative; width: 12px; height: 12px; }
.close-x::before, .close-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.4px; border-radius: 2px; background: var(--content-secondary); }
.close-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.close-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Timeline modal */
.tl { position: relative; display: flex; flex-direction: column; }
.tl__item { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 20px; }
.tl__item:last-child { padding-bottom: 0; }
.tl__item:not(:last-child)::before {
  content: ""; position: absolute; left: 11.5px; top: 28px; bottom: 4px;
  border-left: 1px dashed #e0e0e0;
}
.tl__dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--radius-round); }
.tl__dot--done { background: var(--green-50); border: 0.5px solid rgba(5, 179, 136, 0.1); }
.tl__dot--next { background: var(--surface-primary); border: 0.5px solid var(--border-secondary); }
.tl__dot--start { background: var(--brand-100); border: 0.5px solid var(--brand-200); }
.tl__dot--start::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-600); }
.tl__main { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.tl__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl__toggle { display: inline-flex; gap: 4px; align-items: center; color: var(--content-secondary); font-weight: 500; font-size: 12px; line-height: 18px; border-radius: 6px; padding: 0 4px; margin: 0 -4px; transition: color 160ms ease, background-color 160ms ease; }
.tl__toggle:hover { color: var(--content-primary); background: var(--grey-200); }
.tl__toggle img { transition: transform 220ms var(--ease-out); }
.tl__toggle[aria-expanded="true"] img { transform: scaleX(-1) rotate(180deg); }
.tl__changes { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--ease-out); }
.tl__changes.is-open { grid-template-rows: 1fr; }
.tl__changes > div { overflow: hidden; }
.tl__groups { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.tl__group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl__group-label { width: 72px; flex-shrink: 0; font-weight: 500; font-size: 12px; line-height: 18px; color: var(--content-tertiary); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-round); font-weight: 600; font-size: 12px; line-height: 18px; white-space: nowrap; }
.tag--add { background: var(--green-50); color: #038a69; }
.tag--remove { background: #fdf0f0; color: #c2393e; }
.tag--neutral { background: var(--grey-200); color: var(--content-secondary); }

/* Manager modal */
.mgr-head { display: flex; gap: 12px; align-items: center; }
.mgr-head__photo { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 0.5px var(--border-primary); }
.mgr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mgr-stats > div { padding: 12px; border-radius: 12px; background: var(--grey-100); border: 0.5px solid var(--border-secondary); }
.mgr-sub { margin-bottom: 8px; }
.mgr-list { display: flex; flex-direction: column; }
.mgr-list__row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; margin: 0 -8px; border-radius: 10px; transition: background-color 160ms ease; cursor: pointer; }
.mgr-list__row:hover { background: var(--grey-100); }
.mgr-list__row img { width: 28px; height: 28px; border-radius: 7px; border: 0.5px solid var(--border-secondary); }
.mgr-list__row .t-label-sm:nth-child(2) { flex: 1; }
.mgr-list__row.is-current .t-label-sm:nth-child(2)::after { content: "Viewing"; margin-left: 8px; padding: 1px 6px; border-radius: 100px; background: var(--grey-200); color: var(--content-tertiary); font-size: 11px; font-weight: 600; }

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-round);
  background: var(--grey-1200);
  color: #fff;
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 320ms var(--ease-out);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden; text-overflow: ellipsis;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  .page { padding-left: 24px; padding-right: 24px; }
  .page { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 32px; }
}

@media (max-width: 1023px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "side" "rest";
    row-gap: 40px;
    max-width: 800px;
  }
  .sidebar { position: relative; top: 0; }
  .main-rest { gap: 48px; }
}

@media (max-width: 720px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .page { padding-top: 109px; }
  .hero { gap: 24px; }
  .hero__title h1 { white-space: normal; }
  .hero-chart { height: 240px; }
  .range-tabs { gap: 2px; }
  .range-tab { padding: 3px 8px; }
  .dist-legend { flex-wrap: wrap; row-gap: 12px; }
  .legend-item { flex: 1 0 28%; }
  .calc3__head { flex-direction: column; gap: 20px; height: auto; padding: 20px 20px 16px; }
  .calc3__viz { align-self: flex-end; margin-right: 8px; }
  .calc3__worth { flex: none; white-space: normal; }
  .calc3__worth-row { flex-wrap: wrap; row-gap: 0; }
  .calc3__inputs { flex-direction: column; }
  .calc3__invest { padding: 20px; box-shadow: inset 0 -0.5px 0 var(--border-secondary); }
  .calc3__period { padding: 20px; gap: 12px; }
  .keyd { flex-direction: column; gap: 20px; }
  .keyd__stats { width: 100%; flex-direction: row; }
  .keyd__stat { flex: 1; }
  .keyd__divider { display: none; }
  .keyd__rebalance { width: 100%; padding-top: 20px; border-top: 1px dashed var(--border-primary); }
  .manager { flex-direction: column; align-items: stretch; }
  .manager__stage-wrap { width: 100%; }
  .badge { left: calc(50% - 100px); }
  .manager__info { padding: 16px 20px 20px; }
  .manager__foot { flex-direction: column; align-items: flex-start; }
}
