/* ==========================================================================
   Basket states — action card variants, locked holdings, investment sections.
   Built only from the tokens/components in styles.css so every state reads as
   the same product.
   ========================================================================== */

:root {
  --amber-50: #fbf6e6;
  --amber-200: #f1e3b3;
  --amber-600: #c79a1c;
  --red-50: #fdf0f0;
  --green-700: #038a69;
}

.rot-270 { transform: rotate(-90deg); }
[hidden] { display: none !important; }

/* Small lock glyph, tinted by currentColor */
.lock-ico {
  display: inline-block;
  width: 12px; height: 12px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M4 5.3V4a2 2 0 0 1 4 0v1.3' fill='none' stroke='black' stroke-width='1.15' stroke-linecap='round'/><rect x='2.3' y='5.2' width='7.4' height='5.3' rx='1.5'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M4 5.3V4a2 2 0 0 1 4 0v1.3' fill='none' stroke='black' stroke-width='1.15' stroke-linecap='round'/><rect x='2.3' y='5.2' width='7.4' height='5.3' rx='1.5'/></svg>") center / contain no-repeat;
}

/* State swap: quick cross-fade (beats the scroll-reveal rules on specificity) */
html.js body.is-swapping .page > *, html.js body.is-swap-in .page > * { transition: opacity 180ms ease; }
html.js body.is-swapping .page > * { opacity: 0.3; }
html.js body.is-swapping .page > .sidebar { opacity: 0; }

/* ==========================================================================
   STATUS CHIPS (hero)
   ========================================================================== */
.status-chips { display: contents; }
.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 7px;
  border-radius: var(--radius-round);
  font-weight: 600; font-size: 12px; line-height: 18px;
  white-space: nowrap;
  animation: chipIn 320ms var(--ease-out) both;
}
.status-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-chip .lock-ico { width: 11px; height: 11px; }
.status-chip--free, .status-chip--invested { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 0.5px rgba(5, 179, 136, 0.18); }
.status-chip--invested .status-chip__dot { box-shadow: 0 0 0 3px rgba(5, 179, 136, 0.16); }
.status-chip--paid, .status-chip--subscribed { background: var(--brand-100); color: var(--brand-600); box-shadow: inset 0 0 0 0.5px var(--brand-200); }
.status-chip--expired { background: var(--amber-50); color: var(--yellow-700); box-shadow: inset 0 0 0 0.5px var(--amber-200); }
.status-chip--exited { background: var(--grey-300); color: var(--content-secondary); }

/* ==========================================================================
   ACTION CARD (sidebar) variants
   ========================================================================== */
.sb-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }
.sb-body--tight { padding-bottom: 0; }
.sb-body--tight + .sidebar__stats-wrap .sidebar__stats { padding-top: 16px; }
.sb-micro { text-align: center; text-wrap: pretty; margin-top: -2px; }
.sb-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sb-dot--brand { background: var(--brand-600); box-shadow: 0 0 0 3px rgba(106, 31, 82, 0.12); }
.sb-dot--amber { background: var(--amber-600); }
.sb-kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px; }
.sb-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.1px;
  color: var(--content-secondary);
  text-decoration: underline dotted; text-decoration-thickness: 9%; text-underline-position: from-font;
  border-radius: 4px;
  transition: color 160ms ease;
}
.sb-link:hover { color: var(--content-primary); text-decoration-style: solid; }
.sb-link.is-disabled { color: var(--content-tertiary); text-decoration: none; cursor: not-allowed; }
.sb-link .lock-ico { width: 11px; height: 11px; }
.sb-pill {
  display: inline-flex; align-items: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: var(--radius-round);
  background: var(--grey-300);
  color: var(--content-secondary);
  font-weight: 600; font-size: 11px; line-height: 18px;
  white-space: nowrap;
  vertical-align: 1px;
}
.sb-pill--warn { background: var(--amber-50); color: var(--yellow-700); }

/* Notes */
.sb-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--grey-100);
  box-shadow: inset 0 0 0 0.5px var(--border-secondary);
}
.sb-note__icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.sb-note__icon--green { background: var(--green-50); box-shadow: inset 0 0 0 0.5px rgba(5, 179, 136, 0.15); }
.sb-note b { font-weight: 600; }

/* Investment summary */
.sb-inv { display: flex; flex-direction: column; gap: 2px; padding: 20px 20px 0; }
.sb-inv__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.sb-inv__value { font-variant-numeric: tabular-nums; }
.sb-inv .t-para-sm { font-variant-numeric: tabular-nums; }
.sb-today { white-space: nowrap; }
.sb-today b { font-weight: 600; }
.sb-kv {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 14px; padding: 12px 0 0;
  border-top: 1.5px dashed var(--border-primary);
}
.sb-kv > div { display: flex; flex-direction: column; gap: 0; }
.sb-kv > div + div { padding-left: 16px; box-shadow: inset 0.5px 0 0 var(--border-primary); }
.sb-kv .t-label-sm { font-variant-numeric: tabular-nums; }

/* Rebalance-ready alert */
.sb-alert, .sb-ok {
  position: relative;
  display: flex; gap: 10px; align-items: center;
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
  background: var(--grey-100);
  box-shadow: inset 0 0 0 0.5px var(--border-primary);
}
.sb-alert__icon {
  position: relative;
  display: grid; place-items: center;
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface-elevated);
  box-shadow: inset 0 0 0 0.5px var(--border-primary);
}
.sb-alert .sb-alert__icon::after {
  content: ""; position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber-600); border: 1.5px solid var(--grey-100);
}
.sb-alert__icon--ok { background: var(--green-50); box-shadow: inset 0 0 0 0.5px rgba(5, 179, 136, 0.15); }
.sb-alert__text { flex: 1 0 0; min-width: 0; }
.sb-ok { padding: 8px 12px; }

/* Primary + secondary side by side */
.sb-actions { display: flex; gap: 8px; }
.sb-actions .btn-primary { flex: 1 0 0; width: auto; }
.btn-secondary--lg { padding: 13px 18px; font-size: 16px; line-height: 22px; }
.btn-secondary--sm { padding: 4px 10px; font-size: 12px; line-height: 18px; }
.btn-secondary:disabled { opacity: 0.5; pointer-events: none; }

.sb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 20px;
  border-top: 0.5px solid var(--border-secondary);
  background: var(--grey-100);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.sb-foot .sb-link { font-size: 12px; line-height: 18px; }

/* Subscription status + stepper */
.sb-sub { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 0; }
.sb-sub__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-progress { height: 4px; border-radius: var(--radius-round); background: var(--grey-300); overflow: hidden; }
.sb-progress span {
  display: block; height: 100%;
  width: calc(var(--p) * 100%);
  border-radius: inherit;
  background: linear-gradient(to right, var(--brand-600), var(--brand-900));
  transform-origin: left;
  animation: growX 900ms var(--ease-out) both 120ms;
}
@keyframes growX { from { transform: scaleX(0); } to { transform: none; } }

.sb-steps {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--grey-100);
  box-shadow: inset 0 0 0 0.5px var(--border-secondary);
}
.sb-steps::before { content: ""; position: absolute; left: 23.5px; top: 36px; height: 22px; border-left: 1px dashed #d7d7d9; }
.sb-step { display: flex; gap: 10px; align-items: flex-start; }
.sb-step__dot {
  display: grid; place-items: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  font-weight: 600; font-size: 12px; line-height: 1;
}
.sb-step.is-done .sb-step__dot { background: var(--green-50); box-shadow: inset 0 0 0 0.5px rgba(5, 179, 136, 0.15); }
.sb-step.is-done .t-label-sm { color: var(--content-secondary); }
.sb-step.is-current .sb-step__dot { background: linear-gradient(to bottom, var(--grey-1200), var(--brand-900)); color: #fff; box-shadow: 0 0 0 3px rgba(106, 31, 82, 0.1); }

/* Expired */
.sb-expired { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 20px 0; }
.sb-expired .status-chip { margin-bottom: 4px; }
.sb-expired .t-label-lg { text-wrap: balance; }
.sb-unlock { padding: 12px; border-radius: 12px; background: var(--grey-100); box-shadow: inset 0 0 0 0.5px var(--border-secondary); }
.sb-unlock ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sb-unlock li { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: -0.1px; }
.sb-unlock li img { flex-shrink: 0; }
.sb-expired + .sb-body + .sidebar__plan, .sb-body + .sidebar__plan { padding-top: 16px; }

.sb-warn {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: var(--amber-50);
  box-shadow: inset 0 0 0 0.5px var(--amber-200);
}
.sb-warn__icon { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; background: #fff; color: var(--yellow-700); box-shadow: inset 0 0 0 0.5px var(--amber-200); }
.sb-warn > div { display: flex; flex-direction: column; gap: 2px; }
.sb-warn__missed { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--yellow-700); font-weight: 600; }
.sb-links { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: -2px; }
.sb-links__sep { width: 1px; height: 12px; background: var(--border-primary); }

/* Exited: since-exit comparison */
.sb-since { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--grey-100); box-shadow: inset 0 0 0 0.5px var(--border-secondary); }
.sb-since__row { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 10px; }
.sb-since__row .t-label-sm { font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.sb-since__track { height: 6px; border-radius: var(--radius-round); background: var(--grey-300); overflow: hidden; }
.sb-since__fill { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: inherit; transform-origin: left; animation: growX 900ms var(--ease-out) both 200ms; }
.sb-since__fill--p { background: var(--content-profit); }
.sb-since__fill--b { background: var(--grey-500); }

/* Primary button: variants used by states */
.btn-primary--md { width: auto; padding: 10px 20px; font-size: 14px; line-height: 20px; }
.btn-primary--danger { background: linear-gradient(to bottom, #3a1416, #6e1e22); }
.btn-primary--danger::before { background: linear-gradient(to bottom, #4a1a1c, #85262b); }
.btn-primary:disabled { opacity: 0.45; pointer-events: none; }
.btn-primary.is-pulse { animation: ctaPulse 1100ms var(--ease-out) 350ms; }
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(106, 31, 82, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(106, 31, 82, 0); }
}


/* ==========================================================================
   SEGMENTED: compact + locked tab
   ========================================================================== */
.segmented--sm { padding: 4px; }
.segmented--sm .segmented__pill { top: 4px; height: calc(100% - 8px); }
.segmented__lock { display: none; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.segmented.is-locked .segmented__lock { display: inline-block; }

/* ==========================================================================
   LOCKED HOLDINGS (paid · no access)
   ========================================================================== */
.holdings-lock {
  position: relative;
  min-height: 372px;
  margin-top: -2px;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
}
.ghost {
  position: absolute; inset: -6px -10px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 6px 10px;
  filter: blur(4.5px) saturate(0.9);
  transform: scale(1.01);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0, 0, 0, 0.25) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0, 0, 0, 0.25) 100%);
  transition: filter 500ms var(--ease-out);
  user-select: none;
  pointer-events: none;
}
.holdings-lock:hover .ghost { filter: blur(4px) saturate(0.95); }
.ghost > * { flex-shrink: 0; }
.ghost__bar { display: flex; gap: 2px; height: 18px; }
.ghost__bar span { height: 100%; border-radius: 6px; }
.ghost__sector { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ghost__sector .t-para-md { flex: 1; }
.ghost__mark { width: 3px; height: 14px; border-radius: 1px; }
.ghost__stock { display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--content-secondary); }
.ghost__stock .t-para-sm:first-of-type { flex: 1; }
.ghost__logo { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #e9e3ee, #d9dbe8); box-shadow: inset 0 0 0 0.5px var(--border-primary); }
.ghost__stock:nth-child(odd) .ghost__logo { background: linear-gradient(135deg, #f1e6d3, #e2e8d9); }

/* Slow sheen that sweeps the blurred list so it feels alive, not broken */
.ghost__shine {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: sweep 5.5s var(--ease-in-out) infinite 1.2s;
  pointer-events: none;
}
@keyframes sweep { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ghost__shine { animation: none; display: none; } }

.lockcard {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: min(360px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 24px 24px 18px;
  text-align: center;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
          backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 24px 48px -20px rgba(66, 19, 51, 0.22), 0 0 0 0.5px var(--border-primary), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%);
  transition: transform 360ms var(--ease-out), box-shadow 360ms ease;
}
.holdings-lock:hover .lockcard { transform: translate(-50%, calc(-50% - 2px)); box-shadow: 0 28px 56px -20px rgba(66, 19, 51, 0.26), 0 0 0 0.5px var(--border-primary), inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
.lockcard .t-label-md { text-wrap: balance; }
.lockcard > .t-para-sm { text-wrap: pretty; max-width: 300px; }
.lockcard__medal {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--grey-1200), var(--brand-900));
  box-shadow: 0 0 0 6px rgba(106, 31, 82, 0.07), 0 0 0 12px rgba(106, 31, 82, 0.035), 0 8px 16px -6px rgba(66, 19, 51, 0.5);
}
.lock-svg__shackle { transition: transform 320ms var(--ease-out); }
.holdings-lock:hover .lock-svg__shackle { transform: translateY(-1.6px); }
.lockcard__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 6px 0 10px; }
.lockcard__meta span { padding: 1px 8px; border-radius: var(--radius-round); background: var(--grey-300); color: var(--content-secondary); font-weight: 600; font-size: 11px; line-height: 18px; }
.lockcard .t-para-xs { margin-top: 2px; }

.holdings-lock:not(.holdings-lock--a) { min-height: 0; overflow: visible; }
.lockcard__medal--sm { width: 36px; height: 36px; margin: 0; flex-shrink: 0; box-shadow: 0 0 0 5px rgba(106, 31, 82, 0.06), 0 6px 12px -6px rgba(66, 19, 51, 0.5); }
.lockcard__medal--sm svg { width: 17px; height: 17px; }

/* B · Redacted list ------------------------------------------------------ */
.redact {
  display: flex; flex-direction: column; gap: 16px;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, rgba(0, 0, 0, 0.12) 100%);
          mask-image: linear-gradient(to bottom, #000 40%, rgba(0, 0, 0, 0.12) 100%);
  user-select: none;
}
.redact__bar { display: flex; gap: 2px; height: 18px; }
.redact__bar span { border-radius: 6px; background: var(--grey-400); }
.redact__sector { display: flex; align-items: center; gap: 8px; height: 22px; margin-top: 4px; }
.redact__mark { width: 3px; height: 14px; border-radius: 1px; }
.redact__row { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 20px; }
.redact__logo { width: 20px; height: 20px; border-radius: 50%; background: var(--grey-300); box-shadow: inset 0 0 0 0.5px var(--border-primary); }
.redact__pill { height: 10px; border-radius: var(--radius-round); background: var(--grey-300); margin-right: auto; }
.redact__pill--dark { height: 12px; background: var(--grey-400); }
.redact__tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: var(--radius-round); background: var(--grey-300); color: var(--content-tertiary); font-weight: 600; font-size: 11px; line-height: 18px; letter-spacing: 0.5px; }
.redact__tag .lock-ico { width: 10px; height: 10px; }
.redact__tag--light { background: transparent; }
.unlockbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  margin-top: -36px; padding: 12px 12px 12px 14px;
  border-radius: 14px;
  background: var(--surface-elevated);
  box-shadow: 0 16px 32px -18px rgba(66, 19, 51, 0.28), 0 0 0 0.5px var(--border-primary);
  transition: transform 300ms var(--ease-out), box-shadow 300ms ease;
}
.unlockbar:hover { transform: translateY(-1px); box-shadow: 0 20px 36px -18px rgba(66, 19, 51, 0.32), 0 0 0 0.5px var(--border-primary); }
.unlockbar__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.unlockbar .btn-primary { flex-shrink: 0; width: auto; }
.unlockbar:hover .lock-svg__shackle { transform: translateY(-1.6px); }

/* C · Sector peek -------------------------------------------------------- */
.peek { display: flex; flex-direction: column; gap: 14px; }
.peek__bar { margin-bottom: 2px; }
.peek__sector { display: flex; flex-direction: column; gap: 8px; }
.peek__head { display: flex; align-items: center; gap: 8px; }
.peek__mark { width: 3px; height: 14px; border-radius: 1px; background: var(--c); }
.peek__name { flex: 1; min-width: 0; }
.peek__head .t-para-sm { font-variant-numeric: tabular-nums; }
.peek__sealed {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 12px 8px 11px;
  border-radius: 10px;
  background: var(--grey-200);
  box-shadow: inset 0 0 0 0.5px var(--border-secondary);
  text-align: left;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.peek__sealed:hover { background: var(--grey-300); }
.peek__sealed:active { transform: scale(0.99); }
.peek__sealed .t-para-sm { flex: 1; }
.peek__dots { display: flex; }
.peek__dot { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #fff), color-mix(in srgb, var(--c) 60%, #fff)); box-shadow: 0 0 0 1.5px var(--grey-200), inset 0 0 0 0.5px var(--border-primary); }
.peek__dot + .peek__dot { margin-left: -6px; }
.peek__sealed:hover .peek__dot { box-shadow: 0 0 0 1.5px var(--grey-300), inset 0 0 0 0.5px var(--border-primary); }
.peek__lock { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-elevated); color: var(--content-secondary); box-shadow: 0 0 0 0.5px var(--border-primary); }
.peek__lock .lock-ico { width: 11px; height: 11px; }
.peek__foot { display: flex; align-items: center; gap: 16px; margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--border-primary); }
.peek__foot > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.peek__foot .btn-primary { width: auto; flex-shrink: 0; }

/* D · Sealed tiles ------------------------------------------------------- */
.sealed { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 6px 0 2px; text-align: center; }
.sealed__grid { display: grid; grid-template-columns: repeat(6, 44px); gap: 8px; }
.seal {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 22%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, #fff);
  color: color-mix(in srgb, var(--c) 55%, #2f2f31);
  animation: sealIn 420ms var(--ease-out) both;
  animation-delay: var(--d);
  transition: transform 200ms var(--ease-out), background-color 200ms ease;
}
.seal .lock-ico { width: 13px; height: 13px; opacity: 0.8; }
.seal:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 34%, #fff); }
@keyframes sealIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .seal { animation: none; } }
.sealed__copy { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.sealed__copy .t-label-md { text-wrap: balance; }
.sealed__copy .t-para-sm { text-wrap: pretty; }
.sealed__stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 420px; border-radius: 12px; background: var(--grey-200); }
.sealed__stat { padding: 10px 8px; }
.sealed__stat + .sealed__stat { box-shadow: inset 1px 0 0 var(--border-primary); }
.sealed__stat .t-label-md { font-variant-numeric: tabular-nums; }
.sealed__cta { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sealed__cta .btn-primary { width: auto; min-width: 220px; }

/* E · Value card --------------------------------------------------------- */
.valuecard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.valuecard__main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 4px; }
.valuecard__main .lockcard__medal { margin-bottom: 10px; }
.valuecard__main .t-label-md { text-wrap: balance; }
.valuecard__main .t-para-sm { text-wrap: pretty; }
.valuecard__cta { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 14px; }
.valuecard__cta .btn-primary { width: auto; align-self: flex-start; }
.valuecard__list { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; border-radius: 14px; background: var(--brand-100); box-shadow: inset 0 0 0 0.5px var(--brand-200); }
.valuecard__list li { display: flex; align-items: flex-start; gap: 10px; }
.valuecard__list li:first-child { margin-bottom: 2px; }
.valuecard__tick { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: var(--surface-elevated); box-shadow: 0 0 0 0.5px var(--brand-200); }
.valuecard__tick img { width: 12px; height: 12px; }
.holdings-lock--e:hover .lock-svg__shackle { transform: translateY(-1.6px); }

/* Prototype: lock variation picker, lives inside the state switcher */
.lock-switch { display: flex; align-items: center; gap: 2px; margin-left: 4px; padding-left: 8px; box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.14); }
.lock-switch__label { margin-right: 4px; font-weight: 600; font-size: 11px; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 1px; }
.lock-switch__opt { width: 28px; height: 28px; border-radius: 50%; color: rgba(255, 255, 255, 0.7); font-weight: 600; font-size: 12px; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.lock-switch__opt:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lock-switch__opt:active { transform: scale(0.92); }
.lock-switch__opt[aria-checked="true"] { background: #fff; color: var(--grey-1200); }

/* Timeline: locked change list */
.tl__locked { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: var(--radius-round); background: var(--grey-200); color: var(--content-secondary); font-weight: 600; }
.tl__locked .lock-ico { width: 11px; height: 11px; }
.step-dot.is-locked { background: var(--amber-50); border-color: var(--amber-200); color: var(--yellow-700); }
.step-dot.is-locked img { display: none; }
.step-dot .lock-ico { width: 11px; height: 11px; }
.step-dot:not(.is-locked) .lock-ico { display: none; }

/* ==========================================================================
   COMPACT TIMELINE (past investment)
   ========================================================================== */
.tl--compact .tl__item { padding-bottom: 16px; }
.tl--compact .tl__main { gap: 0; }
.tl--compact .tl__title { align-items: center; }
.tl__dot--locked { background: var(--amber-50); border: 0.5px solid var(--amber-200); color: var(--yellow-700); }
.tl__dot--locked .lock-ico { width: 11px; height: 11px; }
.tl__dot--warn { background: var(--amber-50); border: 0.5px solid var(--amber-200); }
.tl__dot--warn::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber-600); }
.tl__dot--exit { background: var(--grey-300); border: 0.5px solid var(--border-primary); }
.tl__dot--exit::after { content: ""; width: 8px; height: 1.5px; border-radius: 2px; background: var(--content-secondary); }
.tl__dot--next { position: relative; }
.tl--compact .tl__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; }

/* ==========================================================================
   PAST INVESTMENT
   ========================================================================== */
.past { display: flex; flex-direction: column; overflow: clip; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px 20px 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 0 16px; font-variant-numeric: tabular-nums; }
.kpi:first-child { padding-left: 0; }
.kpi + .kpi { box-shadow: inset 0.5px 0 0 var(--border-primary); }
.past__body { margin: 0 20px; padding: 16px 0 4px; border-top: 1.5px dashed var(--border-primary); }
.past__insight {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(to right, var(--green-50), rgba(237, 247, 245, 0.2));
  border-top: 0.5px solid rgba(5, 179, 136, 0.12);
}
.past__insight > div { display: flex; flex-direction: column; gap: 2px; }

/* ==========================================================================
   WHAT THE SUBSCRIPTION INCLUDES
   ========================================================================== */
.incl { display: flex; flex-direction: column; overflow: clip; }
.incl__grid { display: grid; grid-template-columns: 1fr 1fr; }
.incl__tile { display: flex; gap: 10px; align-items: flex-start; padding: 18px 20px; transition: background-color 200ms ease; }
.incl__tile:hover { background: var(--grey-100); }
.incl__tile:nth-child(odd) { box-shadow: inset -0.5px 0 0 var(--border-secondary); }
.incl__tile:nth-child(n+3) { box-shadow: inset 0 0.5px 0 var(--border-secondary); }
.incl__tile:nth-child(3) { box-shadow: inset 0 0.5px 0 var(--border-secondary), inset -0.5px 0 0 var(--border-secondary); }
.incl__tile .method__icon { margin-top: 0; }
.incl__tile > div { display: flex; flex-direction: column; gap: 2px; }
.incl__tile .t-label-sm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.incl__tile .sb-pill { margin-left: 0; }
.incl__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: var(--grey-100);
  border-top: 0.5px solid var(--border-secondary);
}
.incl__foot p { flex: 1; text-wrap: pretty; }
.incl__foot b { font-weight: 600; }
.incl__foot-icon { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 0.5px var(--border-primary); }

/* ==========================================================================
   MANAGER UPDATES — APP BANNER
   ========================================================================== */
.app-banner {
  position: relative;
  display: flex; align-items: stretch; gap: 24px;
  min-height: 200px;
  padding: 0 0 0 24px;
  border-radius: var(--radius-card);
  overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 0 0 0.5px var(--brand-200);
}
.app-banner__bg { position: absolute; inset: 0; z-index: -2; background: radial-gradient(120% 140% at 100% 100%, #e6d6e1 0%, var(--brand-100) 55%, #fbf9fa 100%); }
.app-banner__noise { position: absolute; inset: 0; z-index: -1; background: url("../assets/noise-tile.jpg") center / 408px auto; mix-blend-mode: overlay; opacity: 0.5; pointer-events: none; }
.app-banner__copy { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 24px 0; }
.app-banner__copy .t-label-xl { text-wrap: balance; }
.app-banner__copy .t-para-sm { max-width: 400px; text-wrap: pretty; }
.app-banner__kicker { color: var(--brand-600); }
.app-banner__actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.app-banner__actions .btn-secondary { align-self: flex-start; }

.app-banner__phone { position: relative; width: 236px; flex-shrink: 0; }
.phone {
  position: absolute; left: 18px; top: 22px;
  width: 196px; height: 260px;
  padding: 30px 10px 0;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(to bottom, #fff, #faf7f9);
  box-shadow: 0 0 0 5px #1e1e20, 0 0 0 6px #3a3a3d, 0 24px 40px -12px rgba(66, 19, 51, 0.4);
  transform: rotate(-4deg) translateY(4px);
  transition: transform 520ms var(--ease-out);
  display: flex; flex-direction: column; gap: 6px;
}
.app-banner:hover .phone { transform: rotate(-2deg) translateY(-4px); }
.phone__notch { position: absolute; left: 50%; top: 8px; width: 60px; height: 16px; border-radius: 10px; background: #1e1e20; transform: translateX(-50%); }
.phone__time { position: absolute; left: 18px; top: 8px; font-weight: 600; font-size: 10px; line-height: 16px; }
.notif {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px -6px rgba(30, 30, 32, 0.18), 0 0 0 0.5px var(--border-primary);
  font-size: 10px; line-height: 14px;
  color: var(--content-secondary);
  animation: notifIn 600ms var(--ease-out) both;
}
.notif:nth-of-type(2) { animation-delay: 120ms; }
.notif:nth-of-type(3) { animation-delay: 240ms; opacity: 0.7; }
@keyframes notifIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
.notif img { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.notif p:first-child { display: flex; justify-content: space-between; gap: 6px; }
.notif b { color: var(--content-primary); font-weight: 600; }
.notif span { color: var(--content-tertiary); }
.app-banner__phone.is-paused .notif { filter: blur(2.5px) grayscale(0.6); opacity: 0.6; }
.phone__lock {
  position: absolute; left: 50%; top: 104px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--yellow-700);
  box-shadow: 0 6px 16px -6px rgba(30, 30, 32, 0.3), 0 0 0 0.5px var(--amber-200);
  transform: translateX(-50%);
}
.phone__lock .lock-ico { width: 14px; height: 14px; }

/* ==========================================================================
   HERO CHART MARKERS
   ========================================================================== */
.hero-chart__markers { position: absolute; inset: 0; pointer-events: none; }
.chart-marker { position: absolute; left: 0; top: 0; width: 0; height: 100%; transition: opacity 200ms ease; }
.chart-marker__line { position: absolute; left: -0.5px; width: 0; border-left: 1px dashed rgba(47, 47, 49, 0.28); }
.chart-marker__dot {
  position: absolute; left: -5px;
  width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--content-profit);
  box-shadow: 0 0 0 3px rgba(5, 179, 136, 0.15);
}
.chart-marker--exit .chart-marker__dot { border-color: var(--content-secondary); box-shadow: 0 0 0 3px rgba(47, 47, 49, 0.08); }
.chart-marker__label {
  position: absolute; bottom: 2px;
  padding: 1px 7px;
  border-radius: var(--radius-round);
  background: var(--surface-elevated);
  box-shadow: 0 0 0 0.5px var(--border-primary), 0 4px 10px -6px rgba(30, 30, 32, 0.2);
  font-weight: 600; font-size: 11px; line-height: 18px;
  color: var(--content-secondary);
  white-space: nowrap;
}
.chart-marker--invest .chart-marker__label { color: var(--green-700); }
.chart-band {
  position: absolute; left: 0; top: 0; bottom: 10px;
  background: linear-gradient(to bottom, rgba(47, 47, 49, 0), rgba(47, 47, 49, 0.035));
  border-radius: 6px 6px 0 0;
  transition: opacity 200ms ease;
}
.chart-band__label { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); color: var(--content-tertiary); white-space: nowrap; }

/* ==========================================================================
   FLOW MODAL (invest / exit / rebalance)
   ========================================================================== */
.modal__panel--sm { width: min(440px, 100%); }
.flow-amount { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.amount-pill--lg { height: 40px; padding: 4px 14px 4px 5px; gap: 8px; }
.amount-pill--lg .amount-pill__sym { width: 30px; height: 30px; font-size: 14px; }
.amount-pill--lg input { font-size: 20px; line-height: 28px; min-width: 6ch; }
.flow-chips { gap: 6px; margin-top: -8px; }
.flow-chips .chip { font-size: 12px; line-height: 18px; padding: 3px 10px; box-shadow: inset 0 0 0 0.5px var(--border-primary); background: #fff; }
.flow-chips .chip:hover { background: var(--grey-200); }
.flow-chips .chip.is-on { background: var(--surface-dark-button); color: #fff; box-shadow: none; }
.flow-sum { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--grey-100); box-shadow: inset 0 0 0 0.5px var(--border-secondary); font-variant-numeric: tabular-nums; }
.flow-sum > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-note { display: flex; gap: 6px; align-items: flex-start; margin-top: -6px; }
.flow-note img { margin-top: 3px; flex-shrink: 0; }
.flow-groups { padding: 0; }

/* ==========================================================================
   PROTOTYPE STATE SWITCHER
   ========================================================================== */
.state-switch {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  border-radius: var(--radius-round);
  background: var(--grey-1200);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(255, 255, 255, 0.06) inset;
}
.state-switch__nav {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.state-switch__nav img, .state-switch__chev { filter: invert(1); opacity: 0.7; }
.state-switch__nav:hover { background: rgba(255, 255, 255, 0.1); }
.state-switch__nav:active { transform: scale(0.92); }
.state-switch__trigger {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 6px;
  border-radius: var(--radius-round);
  color: #fff;
  font-weight: 600; font-size: 13px; line-height: 18px;
  white-space: nowrap;
  transition: background-color 160ms ease;
}
.state-switch__trigger:hover, .state-switch__trigger[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); }
.state-switch__num { padding: 1px 6px; border-radius: var(--radius-round); background: rgba(255, 255, 255, 0.14); font-size: 11px; font-variant-numeric: tabular-nums; }
.state-switch__chev { transform: rotate(180deg); transition: transform 220ms var(--ease-out); }
.state-switch__trigger[aria-expanded="true"] .state-switch__chev { transform: none; }
.menu--up { top: auto; bottom: calc(100% + 12px); transform-origin: bottom left; transform: translateY(4px) scale(0.98); }
.state-menu { width: 330px; left: -38px; max-height: calc(100vh - 120px); overflow: auto; color: var(--content-primary); }
.state-menu .menu__option { align-items: center; white-space: normal; }
.state-menu .menu__option-meta { white-space: normal; }
.state-menu__num { font-weight: 600; font-size: 11px; color: var(--content-tertiary); font-variant-numeric: tabular-nums; }
.state-menu .menu__option[aria-selected="true"] .state-menu__num { display: none; }
.state-menu .menu__title { padding-top: 10px; }
.toast { bottom: 76px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1023px) {
  .sidebar { order: 0; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .kpi:nth-child(3) { padding-left: 0; box-shadow: none; }
  .incl__grid { grid-template-columns: 1fr; }
  .incl__tile:nth-child(n) { box-shadow: inset 0 0.5px 0 var(--border-secondary); }
  .incl__tile:first-child { box-shadow: none; }
  .incl__foot { flex-direction: column; align-items: flex-start; }
  .past__insight { flex-direction: column; align-items: flex-start; }
  .app-banner { flex-direction: column; padding: 0 20px; gap: 0; }
  .app-banner__phone { width: 100%; height: 150px; }
  .phone { left: 50%; margin-left: -98px; }
  .app-banner__actions { flex-wrap: wrap; }
  .state-switch { left: 16px; right: 16px; bottom: 16px; justify-content: space-between; }
  .state-switch .dropdown { flex: 1; min-width: 0; }
  .state-switch__trigger { width: 100%; justify-content: center; }
  .state-switch__label { overflow: hidden; text-overflow: ellipsis; }
  .state-menu { left: 50%; width: min(330px, calc(100vw - 32px)); transform: translate(-50%, 4px) scale(0.98); }
  .dropdown.is-open .state-menu { transform: translateX(-50%); }
  .page { padding-bottom: 120px; }
  .toast { bottom: 76px; }
  .lockcard { padding: 20px 16px 16px; }
  .holdings-lock--a { min-height: 470px; }
  .unlockbar { flex-wrap: wrap; }
  .unlockbar .btn-primary { width: 100%; }
  .peek__foot { flex-direction: column; align-items: stretch; }
  .peek__foot .btn-primary { width: 100%; }
  .peek__sealed .t-para-sm { font-size: 13px; }
  .sealed__grid { grid-template-columns: repeat(6, minmax(0, 40px)); gap: 6px; }
  .seal { width: 40px; height: 40px; }
  .valuecard { grid-template-columns: 1fr; }
  .valuecard__cta .btn-primary { width: 100%; align-self: stretch; }
  .state-switch { flex-wrap: wrap; border-radius: 22px; }
  .lock-switch { width: 100%; justify-content: center; margin: 2px 0 0; padding: 4px 0 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
}

/* ==========================================================================
   HOLDINGS — % WEIGHTS ⇄ ₹ AMOUNTS
   ========================================================================== */
.hold-head { display: flex; flex-direction: column; }
.hold-head__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.unit-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--content-primary);
  border-radius: 4px;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.unit-toggle__label {
  display: inline-block;
  text-decoration: underline dotted; text-decoration-thickness: 9%; text-underline-position: from-font;
}
.unit-toggle img { width: 16px; height: 16px; transition: transform 220ms var(--ease-out); }
.unit-toggle:hover .unit-toggle__label { text-decoration-style: solid; }
.unit-toggle:hover img { transform: scaleY(-1); }
.unit-toggle:active { transform: scale(0.96); }

/* ₹ mode amount box (Figma 309:55331): 8px under the Stock/ETF row */
.amt-strip { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 360ms var(--ease-out); }
.amt-strip.is-open { grid-template-rows: 1fr; }
.amt-strip__inner { min-height: 0; overflow: hidden; }
.amt-strip__box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--grey-100);
  opacity: 0; transform: translateY(-4px);
  transition: opacity 240ms ease, transform 360ms var(--ease-out);
}
.amt-strip.is-open .amt-strip__box { opacity: 1; transform: none; transition-delay: 60ms; }
.amt-strip__left { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.amt-strip__left label { color: var(--content-primary); }
.amt-strip__box .amount-pill { flex-shrink: 0; background: var(--surface-elevated); }
.amt-strip__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.amt-chip {
  padding: 1px 8px;
  border-radius: var(--radius-round);
  box-shadow: inset 0 0 0 0.5px var(--border-primary);
  color: var(--content-secondary);
  font-weight: 500; font-size: 12px; line-height: 18px;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.amt-chip:hover { color: var(--content-primary); background: var(--grey-200); }
.amt-chip:active { transform: scale(0.95); }
.amt-chip.is-on { background: var(--surface-dark-button); color: var(--content-inverted, #fff); box-shadow: none; }
.sectors.is-amounts .sector__val, .sectors.is-amounts .stock__w { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .amt-strip__box { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Pinned page (<html data-pin-state>): the deployed free basket, Figma 288:24104
   ========================================================================== */
.hero__back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex-shrink: 0;
  margin-right: -8px;
  border-radius: var(--radius-round);
  background: var(--surface-elevated);
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.hero__back:hover { background: var(--grey-300); }
.hero__back:active { transform: scale(0.94); }
.tag-chip--free, .tag-chip--free:hover { background: var(--green-50); color: var(--content-profit); }
html[data-pin-state] #calculator > .section-head { display: none; }
