:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #fff;
  --ink: #1e2528;
  --muted: #667176;
  --line: #d8ddd8;
  --green: #24756b;
  --soft: #e1f0eb;
  --etf: #899c88;
  --cash: #d5d8cd;
  --error: #9e3d35;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 34px); line-height: 1.2; font-weight: 500; letter-spacing: -1px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.15px; }
h3 { font-size: 14px; font-weight: 600; }
svg { display: block; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 10; background: var(--surface); color: var(--green); padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; }
.skip-link:focus { top: 10px; }
.initial-state { display: grid; justify-content: center; align-content: center; gap: 18px; text-align: center; min-height: 70vh; color: var(--muted); }
.monogram { color: var(--ink); font-size: 23px; font-weight: 600; letter-spacing: -1.5px; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; padding: 20px 32px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.identity, .header-actions, .actions { display: flex; align-items: center; gap: 12px; }
.identity-rule { width: 1px; height: 19px; background: var(--line); }
.identity-caption { color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--green); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.badge::before { content: ""; height: 5px; width: 5px; border-radius: 50%; background: currentColor; }
.shell { max-width: 1180px; margin: auto; padding: 36px 32px 44px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--green); margin-bottom: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 12px; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--soft); }
.button svg { width: 15px; height: 15px; }
.button-primary { color: white; background: var(--green); border-color: var(--green); }
.button-primary:hover:not(:disabled) { background: #1b5e56; }
.button-danger { color: var(--error); }
.button-small { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.button-text { border: 0; padding: 4px 0; background: none; color: var(--green); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sample-notice { display: flex; align-items: baseline; gap: 12px; padding: 11px 14px; border-radius: 6px; background: #ecf0e8; margin-bottom: 26px; font-size: 12px; color: #52614e; }
.sample-notice strong { white-space: nowrap; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.summary { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 48px; padding: 3px 0 29px; border-bottom: 1px solid var(--line); }
.total-line { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.total { font-size: clamp(42px, 4.5vw, 54px); line-height: 1.15; letter-spacing: -2px; font-weight: 400; font-variant-numeric: tabular-nums; }
.currency { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.summary-meta { font-size: 11px; color: var(--muted); }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.history-empty { min-height: 100px; border: 1px dashed var(--line); border-radius: 7px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 18px; }
.history-empty strong { font-size: 12px; font-weight: 500; display: block; margin-bottom: 4px; }
.history-empty p { max-width: 290px; font-size: 11px; color: var(--muted); }
.history-svg { width: 100%; height: 110px; }
.history-dates { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--muted); }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); gap: 20px; margin: 26px 0 30px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); min-width: 0; }
.panel-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.panel-caption { font-size: 11px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 6px; background: var(--bg); }
.switch button { border: 0; background: none; padding: 4px 8px; min-height: 27px; font-size: 11px; color: var(--muted); border-radius: 4px; }
.switch button[aria-pressed="true"] { background: var(--ink); color: white; }
.industries { display: grid; align-content: start; gap: 6px; min-height: 153px; }
.industry { display: grid; grid-template-columns: 135px 1fr 45px; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 5px; padding: 10px 4px; background: transparent; font-size: 12px; }
.industry:hover, .industry[aria-pressed="true"] { background: var(--bg); }
.percent { text-align: right; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.track { display: block; height: 13px; background: var(--bg); border-radius: 2px; overflow: hidden; }
.fill { display: block; height: 100%; background: var(--green); border-radius: 2px; opacity: .8; transition: opacity .18s ease-out, filter .18s ease-out; }
.industry-note { font-size: 11px; color: var(--muted); padding-top: 13px; margin-top: 16px; border-top: 1px solid var(--line); }
.treemap { position: relative; height: 153px; }
.tile { position: absolute; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 5px; border: 2px solid var(--surface); border-radius: 5px; background: var(--soft); text-align: left; overflow: hidden; font-size: 12px; }
.tile:nth-child(odd) { background: var(--green); color: white; }
.tile strong { font-weight: 500; overflow-wrap: anywhere; }
.tile span { font-size: 11px; opacity: .8; }
.tile[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.allocation { position: relative; width: 148px; height: 148px; margin: 0 auto 16px; }
.ring { width: 148px; height: 148px; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 17; }
.ring circle[data-allocation] { pointer-events: visiblePainted; cursor: pointer; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ring-label strong { font-size: 24px; font-weight: 400; letter-spacing: -.8px; }
.ring-label span { font-size: 10px; color: var(--muted); }
.allocation-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 6px; border: 0; background: transparent; border-radius: 4px; font-size: 12px; }
.allocation-row:hover, .allocation-row[aria-pressed="true"] { background: var(--bg); }
.allocation-label { display: flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; height: 7px; width: 7px; border-radius: 2px; }
.allocation-value { color: var(--muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.allocation-value b { display: inline-block; min-width: 40px; margin-left: 12px; color: var(--ink); font-weight: 400; text-align: right; }
.industry, .allocation-row { transition: color .18s ease-out, background-color .18s ease-out; }
.tile, .swatch, .ring circle { transition: opacity .18s ease-out, filter .18s ease-out; }
.industry.emphasized .fill { opacity: 1; filter: brightness(1.15); }
.industry.subdued .fill { opacity: .2; }
.industry.subdued, .allocation-row.subdued { color: var(--muted); }
.tile.emphasized { filter: brightness(1.1); }
.tile.subdued { opacity: .45; }
.ring circle.emphasized { filter: brightness(1.12) saturate(1.1); opacity: 1; }
.ring circle.subdued { opacity: .22; }
.allocation-row.emphasized { background: var(--soft); }
.allocation-row.emphasized .swatch { filter: brightness(1.12); }
.allocation-row.subdued .swatch { opacity: .3; }
.holdings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.holdings-title { display: flex; align-items: center; gap: 9px; }
.count { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; }
.filter { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; color: var(--muted); font-weight: 400; text-align: left; border-bottom: 1px solid var(--line); padding: 11px 10px; white-space: nowrap; }
td { padding: 17px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.asset-name { display: flex; align-items: center; gap: 10px; }
.asset-mark { display: flex; align-items: center; justify-content: center; height: 33px; width: 33px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 9px; font-weight: 500; }
.symbol { font-weight: 500; }
.company { color: var(--muted); font-size: 11px; line-height: 1.4; }
.price-date { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.weight { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.weight-track { display: block; height: 3px; width: 36px; background: var(--line); border-radius: 2px; }
.weight-track span { display: block; height: 3px; border-radius: 2px; background: var(--green); }
tfoot td { border: 0; font-weight: 500; padding-top: 17px; padding-bottom: 0; }
.table-empty { padding: 26px 0; text-align: center; color: var(--muted); }
.holdings-note { margin-top: 19px; font-size: 11px; color: var(--muted); }
.footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: 1180px; padding: 17px 32px; margin: auto; display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 10px; }
.session-email { overflow-wrap: anywhere; }
.status { padding: 11px 14px; background: var(--soft); color: var(--green); border-radius: 6px; margin-bottom: 20px; font-size: 12px; }
.status:empty { display: none; }
.status.error, .form-error { color: var(--error); }
.status.error { background: #f9eae7; }
.auth-shell { max-width: 430px; margin: clamp(46px, 12vh, 130px) auto 56px; padding: 0 24px; }
.auth-shell h1 { margin: 10px 0 13px; }
.auth-copy { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 25px; }
.auth-shell .button-primary { width: 100%; min-height: 43px; font-size: 13px; }
.auth-secondary { margin-top: 20px; text-align: center; }
.auth-footer { font-size: 11px; color: var(--muted); margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.form { display: grid; gap: 17px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; }
.field input { width: 100%; min-height: 41px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 9px 11px; font-size: 13px; }
.field input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.field small { color: var(--muted); font-size: 11px; }
.form-error { font-size: 12px; line-height: 1.6; }
.form-error:empty { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dialog { width: min(490px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
.dialog::backdrop { background: rgb(30 37 40 / 32%); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; margin-bottom: 23px; }
.dialog h2 { font-size: 20px; font-weight: 500; }
.dialog-caption { font-size: 12px; color: var(--muted); margin-top: 5px; }
.close-button { display: flex; justify-content: center; align-items: center; flex-shrink: 0; height: 28px; width: 28px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.close-button:hover { background: var(--soft); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 5px; }
.form-note { padding: 11px 13px; background: var(--soft); border-radius: 5px; color: #49645c; font-size: 11px; line-height: 1.6; }
.viewer-list { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.viewer-list h3 { margin-bottom: 12px; }
.viewer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.viewer-email { font-size: 12px; overflow-wrap: anywhere; }
.viewer-state { font-size: 10px; color: var(--muted); margin-top: 2px; }
.invite-result { padding: 14px; margin-top: 20px; background: var(--soft); border: 1px solid #cbded4; border-radius: 7px; }
.invite-result p { font-size: 12px; }
.invite-result .field { margin: 12px 0; }
.invite-result input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.invite-result .small { font-size: 11px; color: #49645c; }
@media (max-width: 900px) {
  .shell { padding: 28px 24px 36px; }
  .topbar-inner, .footer-inner { padding-left: 24px; padding-right: 24px; }
  .chart-grid { grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr); gap: 14px; }
  .panel { padding: 18px; }
  .industry { grid-template-columns: 110px 1fr 40px; font-size: 11px; gap: 7px; }
  .type-col { display: none; }
  .weight-track { display: none; }
  .panel-top { gap: 10px; }
}
@media (max-width: 680px) {
  .topbar-inner { padding: 16px 18px; }
  .identity-caption { font-size: 11px; }
  .header-actions { gap: 10px; }
  .header-actions .badge { display: none; }
  .shell { padding: 26px 18px 32px; }
  .heading { align-items: flex-start; gap: 12px; }
  .heading .actions { gap: 7px; }
  .heading .button { padding: 8px 10px; }
  .hide-label { display: none; }
  .sample-notice { display: block; margin-bottom: 22px; font-size: 11px; }
  .sample-notice strong { display: block; margin-bottom: 4px; }
  .summary { grid-template-columns: 1fr; gap: 24px; padding-bottom: 24px; }
  .total { font-size: 47px; }
  .chart-grid { grid-template-columns: 1fr; margin: 23px 0 27px; }
  .industries { min-height: 80px; }
  .treemap { height: 153px; }
  .industry { grid-template-columns: 130px 1fr 45px; font-size: 12px; }
  .allocation-body { display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 18px; }
  .allocation, .ring { width: 124px; height: 124px; margin: 0; }
  .ring-label strong { font-size: 22px; }
  .allocation-row { padding: 9px 3px; }
  .allocation-value b { margin-left: 7px; }
  .allocation-money { display: none; }
  .table-wrap { margin-right: -18px; padding-right: 18px; }
  table { min-width: 570px; }
  .company { max-width: 150px; }
  .footer-inner { padding: 16px 18px; flex-wrap: wrap; font-size: 10px; }
  .dialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
