/* User portfolio case: one calm surface, a 90-day chart, and current exposure. */
.user-case { --case-line: #e9e7e3; --case-muted: #85817c; --case-green: #20946c; --case-red: #d66069; padding-top: clamp(72px, 8vw, 112px); }
.user-case [hidden] { display: none !important; }
.ucase-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.ucase-eyebrow { color: var(--accent); font-size: 11px; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.ucase-heading > p { color: #6f6c68; font-size: 16px; line-height: 1.6; padding-bottom: 4px; max-width: 390px; }
.ucase-account-switcher { display: inline-flex; max-width: 100%; gap: 4px; padding: 4px; margin-bottom: 18px; border: 1px solid #e8e3da; border-radius: 12px; background: #f4f1eb; }
.ucase-account-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 19px; border: 1px solid transparent; border-radius: 8px; color: #746b5f; font-size: 12px; font-weight: 500; line-height: 1.35; transition: color .18s ease, background .18s ease, box-shadow .18s ease; }
.ucase-account-tab::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #c5bfb4; flex: none; }
.ucase-account-tab:hover { color: #665343; background: rgba(255,255,255,.55); }
.ucase-account-tab[aria-selected="true"] { color: #8c603b; background: #fff; border-color: #eee5d9; box-shadow: 0 2px 5px -3px #aa9277; }
.ucase-account-tab[aria-selected="true"]::before { background: var(--accent); }
.ucase-account-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ucase-dashboard { border: 1px solid #e5e2dd; border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: 0 3px 6px -5px #756957, 0 24px 60px -42px #998473; overflow: hidden; }
.ucase-profile { padding: 28px 34px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--case-line); }
.ucase-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ucase-avatar { width: 48px; height: 48px; flex: none; position: relative; display: block; border: 1px solid #f1e1d2; background: #fff9f2; border-radius: 15px; overflow: hidden; }
.ucase-avatar img { position: absolute; width: auto; max-width: none; height: 25px; top: 11px; left: 8px; clip-path: inset(0 82% 0 0); }
.ucase-identity h3 { font-size: 21px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.ucase-identity p { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--case-muted); line-height: 1.4; margin-top: 6px; }
.ucase-identity p svg { width: 12px; height: 12px; color: #d6aa21; flex: none; }
.ucase-separator { color: #c9c5bf; padding-inline: 1px; }
.ucase-sync { text-align: right; flex: none; }
.ucase-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.4; font-weight: 500; background: #f4f3f1; color: #77736d; padding: 5px 9px; border-radius: 20px; }
.ucase-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ucase-sync p { font-size: 10px; line-height: 1.4; color: #918c85; margin-top: 5px; }
[data-case-state="live"] .ucase-status { color: #248260; background: #edf6ef; }
[data-case-state="preview"] .ucase-status { color: #9c7649; background: #f8f2e9; }
[data-case-state="stale"] .ucase-status, [data-case-state="error"] .ucase-status { color: #9a6a2b; background: #faf2e6; }
.ucase-notice { padding: 10px 34px; background: #fcf7ee; color: #8b6b40; font-size: 12px; line-height: 1.5; border-bottom: 1px solid #eee6d9; }
.ucase-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 30px 34px 26px; gap: 24px; }
.ucase-metrics > div + div { border-left: 1px solid var(--case-line); padding-left: 32px; }
.ucase-metrics dt { font-size: 12px; color: #7a7772; line-height: 1.4; margin-bottom: 7px; }
.ucase-metrics dt span { color: #aaa49c; }
.ucase-metrics dd { font-size: clamp(27px, 3vw, 37px); line-height: 1.1; letter-spacing: -.04em; font-weight: 500; font-variant-numeric: tabular-nums; }
.user-case .is-positive { color: var(--case-green); }
.user-case .is-negative { color: var(--case-red); }
.ucase-performance { padding: 0 34px 26px; }
.ucase-block-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ucase-block-heading h4 { font-size: 14px; line-height: 1.4; font-weight: 500; text-wrap: initial; }
.ucase-period { display: inline-block; flex: none; border: 1px solid #eae6e0; border-radius: 7px; padding: 4px 8px; color: #6d665c; background: #faf8f4; font-size: 11px; line-height: 1.4; }
.ucase-chart-wrap { margin: 16px 0 0; position: relative; }
.ucase-chart { width: 100%; height: auto; min-height: 220px; overflow: visible; }
.ucase-chart-grid path, .ucase-chart .chart-grid { fill: none; stroke: #e9e9e6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ucase-chart text { font-family: var(--font); font-size: 11px; fill: #96918b; }
.ucase-chart .chart-line { fill: none; stroke: var(--case-green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ucase-chart .chart-area { opacity: .13; }
.ucase-chart .chart-cursor { stroke: #b9b5ae; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.ucase-chart .chart-dot { fill: var(--case-green); stroke: white; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ucase-chart-empty { position: absolute; inset: 0 0 24px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 16px; background: radial-gradient(ellipse at center, #fff 0%, rgba(255,255,255,.94) 30%, rgba(255,255,255,0) 70%); text-align: center; }
.ucase-chart-empty-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #e8e3dc; border-radius: 11px; background: #fbfaf7; color: #b3a089; margin-bottom: 10px; }
.ucase-chart-empty-icon svg { width: 20px; height: 20px; }
.ucase-chart-empty strong { font-size: 14px; font-weight: 500; line-height: 1.4; color: #656059; }
.ucase-chart-empty > span:last-of-type { margin-top: 5px; color: #9a948b; font-size: 11px; line-height: 1.5; }
.ucase-retry { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--accent); margin-top: 10px; min-height: 30px; }
.ucase-retry svg { width: 14px; height: 14px; }
.ucase-retry:disabled { opacity: .5; cursor: default; }
.ucase-chart-dates { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 10px; color: #918c85; line-height: 1.4; }
.ucase-chart-tooltip { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, -100%); background: #fff; border: 1px solid #e7e3dc; border-radius: 9px; box-shadow: 0 5px 18px -8px #a2998b; padding: 8px 10px; font-size: 11px; line-height: 1.6; white-space: nowrap; }
.ucase-chart-tooltip strong { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.ucase-details { border-top: 1px solid var(--case-line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.ucase-allocation { padding: 27px 30px 28px 34px; }
.ucase-live-label { font-size: 10px; line-height: 1.4; color: #a29b92; text-align: right; }
.ucase-exposure-labels { display: flex; justify-content: space-between; gap: 18px; margin-top: 21px; }
.ucase-exposure-labels > div { display: flex; align-items: center; gap: 10px; }
.ucase-exposure-labels > div > span { display: flex; align-items: center; gap: 5px; color: #7e7870; font-size: 11px; line-height: 1.4; }
.ucase-exposure-labels strong { font-size: 18px; line-height: 1.4; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ucase-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; display: inline-block; }
.ucase-dot--long { background: var(--case-green); }
.ucase-dot--short { background: var(--case-red); }
.ucase-exposure-bar { display: flex; gap: 3px; height: 10px; border-radius: 3px; background: #f0efec; overflow: hidden; margin-top: 9px; }
.ucase-exposure-bar span { display: block; height: 10px; min-height: 10px; border-radius: 2px; }
.ucase-exposure-long { background: var(--case-green); }
.ucase-exposure-short { background: var(--case-red); }
.ucase-data-note { margin-top: 9px; color: #aaa399; font-size: 10px; line-height: 1.5; }
.ucase-distribution { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--case-line); }
.ucase-distribution-content { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 17px; }
.ucase-donut-wrap { position: relative; width: 128px; height: 128px; }
.ucase-donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.ucase-donut-track { fill: none; stroke: #efede9; stroke-width: 16px; }
.ucase-donut [data-case-donut-segments] circle { fill: none; stroke-width: 16px; transition: opacity .18s ease, stroke-width .18s ease; }
.ucase-donut-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.ucase-donut-center strong { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ucase-donut-center span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #969085; font-size: 10px; line-height: 1.4; margin-top: 2px; }
.ucase-allocation-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 3px 5px; max-height: 196px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9d4cb transparent; padding: 2px; }
.ucase-allocation-list li { display: flex; min-width: 0; font-size: 11px; line-height: 1.4; }
.ucase-allocation-list .ucase-allocation-empty { grid-column: 1 / -1; display: block; color: #a0988e; font-size: 11px; line-height: 1.7; padding: 7px; }
.ucase-sector-button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; width: 100%; min-height: 48px; padding: 7px; border: 1px solid transparent; border-radius: 7px; text-align: left; transition: background .18s ease, border-color .18s ease; }
.ucase-sector-button:hover { background: #f7f6f3; }
.ucase-sector-button[aria-pressed="true"] { background: #faf4ec; border-color: #e9d7c0; }
.ucase-sector-button:focus-visible, .ucase-clear-filter:focus-visible, .ucase-show-all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ucase-legend-dot { width: 15px; height: 4px; border-radius: 2px; flex: none; background: var(--asset-color, #9ba4b3); }
.ucase-legend-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 5px; min-width: 0; }
.ucase-legend-name { overflow-wrap: anywhere; color: #6e685f; font-size: 10px; line-height: 1.35; }
.ucase-legend-value { color: #979084; font-size: 10px; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ucase-sector-note { min-height: 30px; margin-top: 12px; }
.ucase-holdings { border-left: 1px solid var(--case-line); padding: 27px 34px 28px 30px; display: flex; flex-direction: column; min-width: 0; }
.ucase-holdings-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 7px 9px; background: #faf7f2; border: 1px solid #eee5d9; border-radius: 7px; }
.ucase-filter-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #70675d; min-width: 0; overflow-wrap: anywhere; }
.ucase-filter-label::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--sector-color, #9ba4b3); flex: none; }
.ucase-clear-filter { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: #9a774f; font-size: 10px; min-height: 24px; white-space: nowrap; flex: none; border-radius: 4px; }
.ucase-clear-filter svg { width: 11px; height: 11px; }
.ucase-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; }
.ucase-table-wrap { margin-top: 15px; overflow: auto; max-height: 330px; scrollbar-color: #d9d4cb transparent; scrollbar-width: thin; }
.ucase-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ucase-table { width: 100%; min-width: 480px; border-collapse: collapse; table-layout: fixed; font-size: 12px; line-height: 1.4; }
.ucase-table th { color: #aaa299; font-weight: 400; font-size: 10px; padding: 0 12px 9px 0; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--case-line); }
.ucase-table th:first-child { width: 12%; }
.ucase-table th:nth-child(2) { width: 35%; }
.ucase-table th:nth-child(3) { width: 15%; }
.ucase-table th:nth-child(4) { width: 23%; }
.ucase-table th:last-child { width: 15%; }
.ucase-table th:nth-child(n+3), .ucase-table td:nth-child(n+3) { text-align: right; white-space: nowrap; }
.ucase-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid #f0eeea; vertical-align: middle; font-variant-numeric: tabular-nums; }
.ucase-table th:last-child, .ucase-table td:last-child { padding-right: 0; }
.ucase-table tr:last-child td { border-bottom: 0; }
.ucase-asset { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ucase-asset img, .ucase-asset-fallback { width: 28px; height: 28px; object-fit: contain; flex: none; border-radius: 50%; }
.ucase-asset-fallback { display: grid; place-items: center; color: #9a9286; background: #f3f0eb; }
.ucase-asset-fallback svg { width: 20px; height: 20px; }
.ucase-asset > div { min-width: 0; }
.ucase-asset strong { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucase-asset small { display: block; color: #aaa299; font-size: 9px; line-height: 1.4; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucase-asset-tags { display: flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; margin-top: 4px; }
.ucase-sector-tag { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; padding: 2px 5px; border: 1px solid #eae7e0; border-radius: 4px; background: #fbfaf8; color: #8b847a; font-size: 9px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucase-sector-tag::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; flex: none; background: var(--sector-color, #9ba4b3); }
.ucase-tag-more { font-size: 8px; color: #aaa297; white-space: nowrap; }
.ucase-side { display: inline-block; font-size: 9px; line-height: 1.4; padding: 3px 6px; border-radius: 5px; background: #eef7f1; color: #359270; }
.ucase-side--short { background: #fbf0f1; color: #c66c76; }
.ucase-side--spot { color: #9d8455; background: #f6f2e9; }
.ucase-weight, .ucase-position-roi, .ucase-leverage { color: #5e5850; font-weight: 500; }
.ucase-holdings-empty td { height: 221px; text-align: center !important; }
.ucase-holdings-empty strong { display: block; font-size: 12px; color: #857e74; font-weight: 500; }
.ucase-holdings-empty td > span:last-child { display: block; margin-top: 5px; color: #aaa297; font-size: 10px; line-height: 1.5; max-width: 230px; margin-inline: auto; }
.ucase-empty-position-icon { display: grid; place-items: center; width: 33px; height: 33px; margin: 0 auto 10px; color: #b9ac97; }
.ucase-empty-position-icon svg { width: 28px; height: 28px; }
.ucase-show-all { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 1px solid #eae6df; border-radius: 7px; margin-top: 12px; font-size: 11px; color: #8d775f; transition: background .2s ease; }
.ucase-show-all:hover { background: #faf7f2; }
.ucase-show-all svg { width: 13px; height: 13px; }
.ucase-show-all[aria-expanded="true"] svg { transform: rotate(180deg); }
.ucase-holdings-note { margin-top: auto; padding-top: 12px; }
.ucase-disclaimer { max-width: 1010px; margin: 16px auto 0; color: #9a958f; font-size: 11px; line-height: 1.7; text-align: center; }
[data-case-state="loading"] .ucase-status i { animation: ucase-pulse 1.25s ease-in-out infinite; }
[data-case-state="loading"] .ucase-metrics dd { animation: ucase-pulse 1.25s ease-in-out infinite; }
@keyframes ucase-pulse { 50% { opacity: .35; } }
@media (max-width: 900px) {
  .ucase-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .ucase-heading > p { max-width: none; font-size: 15px; }
  .ucase-wide-break { display: none; }
  .ucase-profile { padding: 23px 25px; }
  .ucase-metrics { padding: 25px; gap: 16px; }
  .ucase-metrics > div + div { padding-left: 20px; }
  .ucase-performance { padding-inline: 25px; }
  .ucase-allocation { padding: 23px 22px 25px 25px; }
  .ucase-holdings { padding: 23px 25px 25px 22px; }
  .ucase-distribution-content { grid-template-columns: 98px minmax(0, 1fr); gap: 12px; }
  .ucase-donut-wrap { width: 98px; height: 98px; }
  .ucase-donut-center strong { font-size: 21px; }
  .ucase-donut-center span { max-width: 69px; font-size: 9px; }
  .ucase-exposure-labels > div { gap: 6px; }
}
@media (max-width: 680px) {
  .ucase-account-switcher { display: flex; width: 100%; margin-bottom: 14px; }
  .ucase-account-tab { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 11px; }
  .ucase-dashboard { border-radius: 20px; }
  .ucase-heading { margin-bottom: 25px; }
  .ucase-profile { padding: 20px; align-items: flex-start; gap: 12px; }
  .ucase-identity { gap: 10px; }
  .ucase-avatar { width: 40px; height: 40px; border-radius: 12px; }
  .ucase-avatar img { height: 23px; top: 8px; left: 6px; }
  .ucase-identity h3 { font-size: 18px; }
  .ucase-identity p { font-size: 10px; gap: 4px; }
  .ucase-identity p svg { width: 10px; height: 10px; }
  .ucase-sync p { font-size: 9px; max-width: 124px; }
  .ucase-status { font-size: 10px; padding: 4px 7px; }
  .ucase-metrics { padding: 23px 20px; gap: 12px; }
  .ucase-metrics > div + div { padding-left: 12px; }
  .ucase-metrics dt { font-size: 10px; min-height: 28px; margin-bottom: 5px; }
  .ucase-metrics dt span { display: none; }
  .ucase-metrics dd { font-size: 27px; }
  .ucase-performance { padding: 0 20px 21px; }
  .ucase-chart { min-height: 200px; }
  .ucase-chart text { font-size: 13px; }
  .ucase-chart-empty { bottom: 20px; }
  .ucase-chart-empty > span:last-of-type { max-width: 220px; }
  .ucase-details { grid-template-columns: 1fr; }
  .ucase-allocation { padding: 23px 20px; }
  .ucase-distribution-content { grid-template-columns: 118px minmax(0, 1fr); gap: 16px; }
  .ucase-donut-wrap { width: 118px; height: 118px; }
  .ucase-donut-center strong { font-size: 23px; }
  .ucase-donut-center span { max-width: 82px; }
  .ucase-allocation-list { max-height: 190px; }
  .ucase-sector-button { min-height: 45px; padding: 6px; }
  .ucase-holdings { border-left: 0; border-top: 1px solid var(--case-line); padding: 23px 20px; }
  .ucase-table-wrap { max-height: 285px; }
  .ucase-holdings-empty td { height: 178px; }
  .ucase-disclaimer { font-size: 10px; text-align: left; line-height: 1.7; }
  .ucase-notice { padding-inline: 20px; font-size: 11px; }
}
@media (max-width: 380px) {
  .ucase-profile { flex-wrap: wrap; padding: 17px; gap: 13px; }
  .ucase-sync { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
  .ucase-sync p { margin: 0; max-width: none; text-align: right; }
  .ucase-metrics { padding-inline: 17px; gap: 8px; }
  .ucase-metrics > div + div { padding-left: 8px; }
  .ucase-metrics dd { font-size: 24px; }
  .ucase-performance { padding-inline: 17px; }
  .ucase-allocation, .ucase-holdings { padding-inline: 17px; }
  .ucase-block-heading h4 { font-size: 13px; }
  .ucase-live-label { font-size: 9px; }
  .ucase-distribution-content { grid-template-columns: 90px minmax(0, 1fr); gap: 9px; }
  .ucase-donut-wrap { width: 90px; height: 90px; }
  .ucase-donut-center strong { font-size: 19px; }
  .ucase-donut-center span { max-width: 64px; font-size: 8px; }
  .ucase-allocation-list { gap: 2px; }
  .ucase-sector-button { padding: 5px; }
  .ucase-legend-name, .ucase-legend-value { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .user-case *, .user-case *::before, .user-case *::after { animation: none !important; transition: none !important; }
}


.ucase-data-note a { color: #82766a; text-decoration: underline; text-underline-offset: 2px; }
