/* Growth: glass workspace design (from the "glassy dashboard" reference in docs/dev21_design_pr.txt).
   A warm photo behind frosted panels; Manrope; pill controls; a floating dock. Hue carries meaning only:
   teal = gain / positive, coral = loss / attention, ochre = caution. Numbers always carry a sign or a word too. */

@font-face { font-family: "Manrope Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02FF, U+20A0-20C0; }

:root {
  --font: "Manrope Variable", Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ink: #25201e; --muted: #423731; --faint: #5e5049;
  --line: rgb(74 49 33 / 15%); --line-strong: rgb(74 49 33 / 26%); --grid: rgb(74 49 33 / 19%);
  --rim: rgb(255 253 246 / 51%); --edge-light: rgb(255 254 247 / 84%); --edge-shade: rgb(57 40 28 / 19%);
  --gloss: rgb(255 251 242 / 45%); --frame: rgb(248 238 227 / 66%); --rail: rgb(244 231 218 / 74%);
  --card: rgb(252 246 238 / 78%); --card-light: rgb(255 252 247 / 45%); --raised: rgb(255 250 245 / 92%);
  --inner: rgb(255 250 245 / 56%); --surface: #f6ece2; --track: rgb(81 49 32 / 14%);
  --primary: #261e1b; --primary-ink: #fffaf5; --pick: #fff9f3; --pick-ink: #241b17;
  --coral: #a43c27; --teal: #09644f; --ochre: #996300; --graph-ink: #40332d; --focus: #194b48;
  --dark-shadow: 35 21 14; --frost: 12px; --page-bg: #ab8e76;
  --accent: var(--teal); --gain: var(--teal); --loss: var(--coral); --warn: var(--ochre); --flat: var(--muted);
  --chart-1: var(--coral); --chart-2: var(--teal); --chart-3: var(--ochre); --chart-4: #5a4fb0; --chart-5: #2f7d99; --chart-6: #8a5a44;
  --chart-bench: var(--graph-ink);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #fff6e9; --muted: #e5d5c7; --faint: #cdbcae;
  --line: rgb(243 221 198 / 19%); --line-strong: rgb(243 221 198 / 30%); --grid: rgb(243 221 198 / 19%);
  --rim: rgb(255 236 212 / 31%); --edge-light: rgb(255 242 225 / 49%); --edge-shade: rgb(11 6 5 / 30%);
  --gloss: rgb(255 237 213 / 11%); --frame: rgb(38 29 27 / 78%); --rail: rgb(42 31 29 / 82%);
  --card: rgb(50 39 36 / 82%); --card-light: rgb(106 88 81 / 26%); --raised: rgb(80 67 61 / 92%);
  --inner: rgb(78 61 56 / 62%); --surface: #3b302c; --track: rgb(245 226 212 / 16%);
  --primary: #f3ddca; --primary-ink: #231a16; --pick: #f9eee0; --pick-ink: #241b17;
  --coral: #ff9177; --teal: #75dac0; --ochre: #f1be58; --graph-ink: #e7d9cd; --focus: #f9bf9b;
  --dark-shadow: 10 4 3; --page-bg: #40322b;
  --chart-4: #b3a8ff; --chart-5: #7fd0ec; --chart-6: #e0b393;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; background: var(--page-bg); color: var(--ink); font: 550 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums; position: relative; isolation: isolate; }
.bg-photo, body::before { position: fixed; z-index: -2; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bg-photo { object-fit: cover; object-position: center 60%; filter: sepia(.22) saturate(.78) brightness(.86) blur(1.5px); transform: scale(1.03); }
body::before { content: ""; z-index: -1;
  background: linear-gradient(116deg, rgb(73 48 37 / 35%), transparent 43%, rgb(162 101 63 / 24%) 76%, transparent 100%),
              linear-gradient(0deg, rgb(53 33 25 / 34%), transparent 58%); }
:root[data-theme="dark"] .bg-photo { filter: sepia(.15) saturate(.75) brightness(.56) blur(1.5px); }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:where(button, input, select, textarea) { color: inherit; font: inherit; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .45rem; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(29px, 3.35vw, 49px); font-weight: 760; letter-spacing: -.062em; line-height: 1.03; }
h2 { font-size: 16px; font-weight: 810; letter-spacing: -.024em; }
h3 { font-size: 13.5px; font-weight: 810; letter-spacing: -.015em; }
p { margin: 0 0 .7rem; }
small, .small { font-size: 12px; }
::selection { background: color-mix(in srgb, var(--teal) 25%, transparent); }
[hidden] { display: none !important; }
.mono, .num, td.r { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.gain { color: var(--teal); } .loss { color: var(--coral); } .flat { color: var(--muted); } .warn { color: var(--ochre); }
.eyebrow { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--primary-ink); padding: 8px 12px; border-radius: 999px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- glass recipes ---------- */
.glass-rail { border: 1px solid var(--rim);
  background: linear-gradient(165deg, var(--gloss), transparent 32% 73%, var(--gloss)), var(--rail);
  box-shadow: inset 1px 1px 1px var(--edge-light), inset -1px -1px 1px var(--edge-shade), inset 0 -2px 5px var(--gloss), 0 7px 20px rgb(var(--dark-shadow) / 17%);
  backdrop-filter: blur(15px) saturate(1.35); -webkit-backdrop-filter: blur(15px) saturate(1.35); }

/* ---------- shell ---------- */
.surround { width: min(80vw, 1450px); margin-inline: auto; padding-block: clamp(18px, 3vh, 36px) 16px; }
.top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 440px) minmax(0, 1fr); align-items: center; gap: 12px;
  min-height: 60px; border-radius: 999px; padding: 6px 9px 6px 13px; position: sticky; top: 10px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline-start: 3px; text-decoration: none; }
.logo { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: var(--pick); color: var(--pick-ink);
  box-shadow: inset 0 0 0 1px var(--gloss), 0 2px 7px rgb(var(--dark-shadow) / 12%); flex: none; }
.logo svg { width: 20px; height: 20px; }
.brand strong { display: block; font-size: 12px; letter-spacing: .17em; line-height: 1.1; font-weight: 850; }
.brand small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.ask { position: relative; display: flex; align-items: center; gap: 10px; min-height: 43px; max-width: 100%; width: 100%; border: 1px solid var(--line);
  border-radius: 999px; background: var(--inner); box-shadow: inset 0 1px 0 var(--gloss); padding: 4px 13px 4px 9px; text-align: start; }
.ask:hover, .icon-btn:hover { background: var(--raised); }
.orb { flex: none; width: 25px; height: 25px; border-radius: 50%;
  background: radial-gradient(ellipse at 32% 24%, #faf7fe 5%, #72ecf1 25%, transparent 58%), radial-gradient(ellipse at 67% 54%, #e1b7f9, #815add 55%, #353467 79%);
  box-shadow: inset 0 0 0 .75px rgb(246 245 255 / 75%), inset 0 -2px 5px #604db4, 0 0 0 3px rgb(91 70 115 / 13%), 0 2px 8px rgb(71 46 113 / 35%); }
.prompt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 750; animation: prompt-in .74s steps(28, end) both; }
@keyframes prompt-in { from { clip-path: inset(0 100% 0 0); } }
.ask .kbd { margin-inline-start: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.icon-btn { position: relative; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); padding: 0; background: var(--inner); color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot { position: absolute; width: 6px; height: 6px; inset: 9px 9px auto auto; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--surface); }

.stage-wrap { position: relative; margin-top: 11px; }
.stage { border: 1px solid var(--rim); border-radius: 30px; min-height: calc(100svh - 170px);
  background: linear-gradient(148deg, var(--gloss), transparent 19% 77%, color-mix(in srgb, var(--gloss) 48%, transparent)), var(--frame);
  box-shadow: inset 1px 1px 1px var(--edge-light), inset -1px -1px 1px var(--edge-shade), inset 0 0 7px var(--gloss),
              0 1px 3px rgb(var(--dark-shadow) / 17%), 0 22px 72px rgb(var(--dark-shadow) / 22%);
  backdrop-filter: blur(var(--frost)) saturate(1.24); -webkit-backdrop-filter: blur(var(--frost)) saturate(1.24); }
.content { padding: clamp(19px, 2.15vw, 35px) clamp(25px, 3.2vw, 49px) 64px; min-width: 0; max-width: 100%; }

/* docks */
.dock-rail { position: absolute; left: -24px; top: 0; bottom: 0; z-index: 25; pointer-events: none; }
.dock { position: relative; display: flex; align-items: center; gap: 3px; padding: 4px; border-radius: 999px; pointer-events: auto; }
.dock-side { flex-direction: column; position: sticky; top: 110px; margin-top: clamp(40px, 9vh, 110px); }
.dock a { z-index: 1; position: relative; display: flex; gap: 6px; justify-content: center; align-items: center; min-width: 44px; min-height: 44px;
  padding: 0 13px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; text-decoration: none; color: var(--ink); }
.dock-side a { padding: 0; }
.dock a svg { width: 17px; height: 17px; }
.dock a[aria-current="page"] { color: var(--pick-ink); }
.dock a:not([aria-current="page"]):hover { background: var(--inner); }
.dock-indicator { position: absolute; inset: 0 auto auto 0; pointer-events: none; visibility: hidden; border-radius: 999px; background: var(--pick);
  box-shadow: inset 0 1px 0 white, 0 2px 7px rgb(var(--dark-shadow) / 16%); }
.dock-indicator[data-ready="true"] { visibility: visible; transition: transform .36s cubic-bezier(.24,.89,.26,1), width .36s cubic-bezier(.24,.89,.26,1), height .36s cubic-bezier(.24,.89,.26,1); }
.dock-tip { display: none; position: absolute; left: calc(100% + 8px); z-index: 2; pointer-events: none; color: var(--ink); background: var(--surface);
  padding: 6px 9px; border: 1px solid var(--rim); border-radius: 8px; box-shadow: 0 3px 8px rgb(var(--dark-shadow) / 17%); font-weight: 750; }
.dock-side a:is(:hover, :focus-visible) .dock-tip { display: inline; }
.dock-bottom-wrap { position: sticky; bottom: 14px; z-index: 24; display: flex; justify-content: center; margin-top: -24px; pointer-events: none; }
.dock-bottom { pointer-events: auto; max-width: calc(100% - 40px); overflow-x: auto; scrollbar-width: none; }
.dock-mobile { display: none; }
.subnav { display: flex; gap: 3px; padding: 3px; margin: -4px 0 18px; border-radius: 999px; border: 1px solid var(--rim); background: var(--inner);
  width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 1px 0 var(--gloss); }
.subnav a { padding: 7px 13px; border-radius: 999px; font-size: 11.5px; font-weight: 760; text-decoration: none; color: var(--ink); white-space: nowrap; }
.subnav a:hover { background: var(--raised); }
.subnav a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.footer { padding: 30px 3px 4px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.footer .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.footer .chips > * { border-radius: 999px; padding: 5px 10px; color: var(--ink); font-size: 10.5px; font-weight: 740; background: var(--raised); text-decoration: none; }
.footer .chips a:hover { text-decoration: underline; }
.footer .legal { width: 100%; font-size: 10.5px; color: var(--primary-ink); opacity: .9; text-shadow: 0 1px 2px rgb(0 0 0 / 35%); max-width: 110ch; }
:root[data-theme="dark"] .footer .legal { color: var(--ink); }

/* ---------- building blocks ---------- */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 40px; padding: 7px 14px; font-size: 12px; font-weight: 790;
  line-height: 1.2; border-radius: 999px; border: 1px solid transparent; text-decoration: none; white-space: nowrap; cursor: pointer; background: none; }
.btn svg { width: 14px; height: 14px; }
.btn-primary, .btn-accent { background: var(--primary); color: var(--primary-ink); } .btn-primary:hover, .btn-accent:hover { filter: brightness(1.17); color: var(--primary-ink); }
.btn-accent { background: var(--teal); color: #fff; } :root[data-theme="dark"] .btn-accent { color: #10241e; }
.btn-secondary { background: var(--raised); border-color: var(--rim); color: var(--ink); } .btn-secondary:hover { background: var(--surface); color: var(--ink); }
.btn-ghost { color: var(--ink); } .btn-ghost:hover { background: var(--inner); color: var(--ink); }
.btn-danger { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 55%, transparent); background: var(--inner); }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: 11.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card, .stat { min-width: 0; border: 1px solid var(--rim); border-radius: 20px;
  background: linear-gradient(144deg, var(--card-light), transparent 66%), var(--card);
  box-shadow: inset 0 1px 1px var(--edge-light), inset 0 -1px 1px var(--edge-shade), 0 6px 18px rgb(var(--dark-shadow) / 9%); }
.card { padding: 16px 18px; }
.card + .card { margin-top: 12px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 7px 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
a.card { display: block; text-decoration: none; transition: background .2s; } a.card:hover { background: var(--raised); color: inherit; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gauto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.split { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split > form { position: static !important; } }
@media (max-width: 680px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section { margin-top: 22px; }
.page-head { display: block; margin-bottom: 19px; }
.page-head p { color: var(--muted); max-width: 72ch; font-size: 13.5px; margin-top: 8px; }
.page-head.row { display: flex; }
.crumbs { font-size: 11px; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.crumbs a { color: var(--muted); }

.stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 104px; padding: 11px 13px; text-decoration: none; }
.stat .label { font-size: 11px; font-weight: 740; color: var(--ink); display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.stat .value { display: block; font-size: clamp(21px, 2.1vw, 31px); line-height: 1.05; margin: 3px 0 6px; letter-spacing: -.052em; font-weight: 815; }
.stat .sub { font-size: 10.5px; font-weight: 680; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat.tone-teal, .card.tone-teal { --coral: #ffc8b8; --teal: #b8f1dd; --muted: #e4f5ef; --faint: #cfeee3; --ink: #fff; color: #fff; border-color: rgb(196 248 231 / 55%);
  background: radial-gradient(ellipse at 5% -20%, #3a9381, transparent 68%), linear-gradient(145deg, #1e7461, #08443a);
  box-shadow: inset 0 1px 2px rgb(214 252 240 / 45%), 0 6px 14px rgb(19 78 64 / 17%); }
.tone-teal .btn-secondary { background: rgb(235 255 247 / 16%); border-color: rgb(196 248 231 / 45%); color: #fff; }
.tone-teal .btn-ghost { color: #fff; } .tone-teal .tip { border-color: rgb(230 255 245 / 50%); color: #e4f5ef; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 750;
  background: var(--inner); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; text-decoration: none; }
a.chip:hover, button.chip:hover { background: var(--raised); color: var(--ink); }
.chip.on, .chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip.on a { color: inherit; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 850; white-space: nowrap; }
.badge.gain { color: var(--teal); background: color-mix(in srgb, var(--teal) 13%, transparent); }
.badge.loss { color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, transparent); }
.badge.warn { color: var(--ochre); background: color-mix(in srgb, var(--ochre) 13%, transparent); }
.badge.flat, .badge.muted { color: var(--muted); background: var(--inner); }
.stars { color: var(--ochre); letter-spacing: 1px; font-size: 12px; white-space: nowrap; } .stars .off { color: var(--track); }

.seg { display: inline-flex; flex-wrap: wrap; align-items: center; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--rim); background: var(--inner); box-shadow: inset 0 1px 0 var(--gloss); }
.seg a, .seg button { min-height: 33px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: transparent;
  padding: 0 11px; font-size: 11px; font-weight: 750; white-space: nowrap; text-decoration: none; color: var(--ink); }
.seg a[aria-current="true"], .seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.seg a:not([aria-current="true"]):hover, .seg button[aria-pressed="false"]:hover { background: var(--inner); }
.tabs { display: flex; gap: 2px; padding: 3px; margin: 4px 0 18px; border-radius: 999px; border: 1px solid var(--rim); width: fit-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; position: sticky; top: 84px; z-index: 12; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--ink); font-weight: 760; font-size: 12px; border-radius: 999px; white-space: nowrap; }
.tabs a:hover { background: var(--inner); }
.tabs a[aria-current="true"] { background: var(--pick); color: var(--pick-ink); box-shadow: inset 0 1px 0 white, 0 2px 7px rgb(var(--dark-shadow) / 16%); }

/* tables */
.table-wrap { overflow-x: auto; max-width: 100%; scrollbar-width: thin; border-radius: 16px; border: 1px solid var(--rim); padding: 6px; background: var(--card); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
th, td { padding: 9px 10px; text-align: start; vertical-align: middle; }
th { background: var(--inner); font-size: 10.5px; color: var(--muted); font-weight: 800; white-space: nowrap; }
th:first-child { border-radius: 8px 0 0 8px; } th:last-child { border-radius: 0 8px 8px 0; }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr:hover td { background: color-mix(in srgb, var(--inner) 60%, transparent); }
td.r, th.r { text-align: end; } td.r, td.num { white-space: nowrap; }
.fund-cell a { font-weight: 780; text-decoration: none; } .fund-cell a:hover { text-decoration: underline; }
.fund-cell .sub { font-size: 10.5px; color: var(--muted); font-weight: 650; }
th button.sort { all: unset; cursor: pointer; } th button.sort:hover { color: var(--ink); }
tr.me td { background: color-mix(in srgb, var(--teal) 10%, transparent) !important; }
.table-plain { border: 0; padding: 0; background: transparent; }

/* forms */
label { font-size: 12px; font-weight: 760; display: block; margin-bottom: 5px; }
.field { margin-bottom: 13px; }
.hint { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.error { font-size: 11px; color: var(--coral); margin-top: 4px; font-weight: 750; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--inner); color: var(--ink);
  font: 600 13px var(--font); box-shadow: inset 0 1px 0 var(--gloss); }
select option { color: var(--ink); background: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=range] { width: 100%; accent-color: var(--teal); }
input[type=checkbox] { accent-color: var(--teal); }
:is(input, select, textarea):focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input[type=number] { max-width: 140px; }
.alert { padding: 11px 14px; border-radius: 14px; border: 1px solid var(--rim); background: var(--inner); font-size: 12.5px; }
.alert.warn { background: color-mix(in srgb, var(--ochre) 13%, var(--inner)); }
.alert.loss { background: color-mix(in srgb, var(--coral) 13%, var(--inner)); }
.alert.gain { background: color-mix(in srgb, var(--teal) 13%, var(--inner)); }

/* search boxes inside pages */
.gsearch { position: relative; flex: 1; max-width: 560px; }
.gsearch input, .gsearch input[type=search] { padding-left: 38px; border-radius: 999px; min-height: 42px; }
.gsearch svg { position: absolute; left: 13px; top: 12px; width: 17px; height: 17px; color: var(--muted); }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--rim); border-radius: 18px;
  box-shadow: 0 20px 60px rgb(var(--dark-shadow) / 30%); max-height: 64vh; overflow: auto; padding: 6px; z-index: 40; }
.results a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; text-decoration: none; }
.results a[aria-selected="true"], .results a:hover { background: var(--raised); }
.results .grp { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 8px 10px 4px; font-weight: 800; }

/* command palette */
.palette { max-width: min(calc(100% - 26px), 560px); width: 100%; border-radius: 23px; border: 1px solid var(--rim); color: var(--ink); padding: 0;
  background: var(--surface); box-shadow: 0 20px 80px rgb(var(--dark-shadow) / 38%); margin-top: 12vh; }
.palette::backdrop { background: rgb(30 21 17 / 43%); backdrop-filter: blur(5px); }
.palette-inner { padding: 18px; }
.palette header { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.palette h2 { font-size: 22px; font-weight: 830; letter-spacing: -.045em; margin: 0; }
.palette .gsearch { max-width: none; }
.palette .results { position: static; box-shadow: none; border: 0; padding: 6px 0 0; max-height: 52vh; background: transparent; }
.quick { display: grid; gap: 5px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--inner); text-decoration: none; }
.quick a:hover, .quick a[aria-selected="true"] { background: var(--raised); }
.quick a svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.quick a div { flex: 1; min-width: 0; } .quick strong, .quick small { display: block; } .quick small { color: var(--muted); margin-top: 2px; font-size: 11px; }

/* hero (home) */
.hero { padding: clamp(22px, 3vw, 40px); border-radius: 26px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 64px); max-width: 16ch; }
.hero p { font-size: 15px; color: var(--muted); max-width: 60ch; }
.hero .big-search { max-width: 640px; margin-top: 18px; position: relative; }
.hero .big-search input, .hero .big-search input[type=search] { min-height: 54px; font-size: 15px; padding-left: 50px; border-radius: 999px; background: var(--raised); }
.hero .big-search .orb { position: absolute; left: 14px; top: 14px; }
.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (max-width: 900px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.path { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 18px; border: 1px solid var(--rim); background: var(--inner); text-decoration: none; }
.path:hover { background: var(--raised); color: inherit; }
.path .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--raised); flex: none; color: var(--teal); }
.path .ico svg { width: 15px; height: 15px; }
.path strong { display: block; font-weight: 820; font-size: 13px; }
.path span { font-size: 11px; color: var(--muted); }

/* fund header */
.fund-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; margin-bottom: 8px; }
@media (max-width: 760px) { .fund-head { grid-template-columns: 1fr; } }
.nav-big { font-size: clamp(30px, 3.4vw, 48px); font-weight: 820; letter-spacing: -.07em; line-height: 1.02; }
.insight { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; }
.insight + .insight { border-top: 1px solid var(--line); }
.insight .dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--inner); }
.insight .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.insight .dot.gain { background: color-mix(in srgb, var(--teal) 14%, var(--inner)); } .insight .dot.gain::after { background: var(--teal); }
.insight .dot.loss { background: color-mix(in srgb, var(--coral) 14%, var(--inner)); } .insight .dot.loss::after { background: var(--coral); }
.insight strong { display: block; font-size: 12.5px; font-weight: 820; }
.insight p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 7px; padding: 6px; border-radius: 18px; background: var(--inner); }
.metric { padding: 10px 11px; border-radius: 13px; border: 1px solid var(--rim); background: linear-gradient(144deg, var(--card-light), transparent 66%), var(--card); }
.metric .label { font-size: 10.5px; font-weight: 740; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.metric .value { font: 815 19px/1.2 var(--font); letter-spacing: -.04em; margin-top: 4px; }
.metric .cmp { font-size: 10px; color: var(--muted); margin-top: 2px; font-weight: 650; }
.tip { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 9px; color: var(--muted);
  cursor: help; position: relative; font-weight: 850; font-family: var(--font); flex: none; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%); width: 250px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rim); padding: 9px 11px; border-radius: 11px; font: 600 11.5px/1.45 var(--font);
  z-index: 50; text-align: left; box-shadow: 0 8px 24px rgb(var(--dark-shadow) / 25%); letter-spacing: 0; text-transform: none; }
.lock-note { margin-top: 10px; }

/* charts */
.chart { position: relative; width: 100%; height: 280px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .axis text { fill: var(--muted); font: 600 10px var(--font); }
.chart .grid line { stroke: var(--grid); stroke-dasharray: 3 4; }
.chart .tt { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px;
  font-size: 11px; box-shadow: 0 4px 10px rgb(var(--dark-shadow) / 15%); white-space: nowrap; z-index: 5; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--muted); margin-top: 8px; font-weight: 740; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 200px) 1fr 64px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .track { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar-row .fill { display: block; height: 100%; border-radius: inherit; background: var(--teal); transform-origin: left center; }
.bar-row .v { text-align: end; font-family: var(--mono); font-size: 11px; }

.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--inner); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 700; } .kv dd { margin: 0; font-weight: 650; }
.prose { max-width: 74ch; } .prose h2 { margin-top: 1.6rem; font-size: 19px; } .prose p, .prose li { color: var(--muted); font-size: 14px; line-height: 1.65; }
.prose table { margin: 10px 0; }
details.more summary { cursor: pointer; color: var(--ink); font-weight: 780; font-size: 12.5px; padding: 6px 0; }
details.more summary:hover { color: var(--teal); }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tray { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); border-radius: 999px; padding: 7px 8px 7px 16px; display: flex; gap: 8px;
  align-items: center; z-index: 35; max-width: calc(100% - 24px); }
code { font-family: var(--mono); font-size: 12px; background: var(--inner); padding: 1px 5px; border-radius: 5px; }
.show-sm { display: none; }

/* entrance motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal-line { animation: line-in .74s cubic-bezier(.22,.8,.3,1) both .14s; }
  @keyframes line-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .grow-bar { transform-box: fill-box; transform-origin: center bottom; animation: bar-in .46s cubic-bezier(.22,.8,.3,1) both; }
  @keyframes bar-in { from { transform: scaleY(0); } }
  .bar-row .fill { animation: fill-in .58s cubic-bezier(.22,.8,.3,1) both .18s; }
  @keyframes fill-in { from { transform: scaleX(0); } }
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .surround { width: min(88vw, 1450px); } }
@media (max-width: 1060px) { .surround { width: calc(100% - 64px); } .content { padding-inline: 26px; } }
@media (max-width: 760px) {
  .surround { width: calc(100% - 20px); padding-top: 8px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .top { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 9px; gap: 6px 10px; border-radius: 21px; top: 6px; }
  .ask { grid-area: 2 / 1 / 3 / -1; min-height: 41px; }
  .ask .kbd { display: none; }
  .top-actions .icon-btn { min-width: 40px; min-height: 40px; }
  .top-actions .hide-sm { display: none; }
  .stage { border-radius: 23px; min-height: auto; }
  .content { padding: 15px 13px 20px; }
  .dock-rail, .dock-bottom-wrap { display: none; }
  .dock-mobile { display: flex; position: fixed; inset: auto 10px calc(9px + env(safe-area-inset-bottom)); z-index: 30; justify-content: space-between; }
  .dock-mobile a { flex: 1; flex-direction: column; gap: 2px; padding: 3px 4px; min-height: 48px; line-height: 1.2; font-size: 9.5px; min-width: 0; }
  .dock-mobile a svg { width: 16px; height: 16px; }
  .subnav { margin: -2px 0 14px; }
  .page-head.row { flex-direction: column; align-items: flex-start; }
  .tabs { top: 120px; }
  .tray { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .show-sm { display: inline; } .hide-sm { display: none; }
  .bar-row { grid-template-columns: minmax(80px, 130px) 1fr 56px; }
}
@media (max-width: 420px) { .card { padding: 13px; } .stat { padding: 9px; min-height: 92px; } th, td { padding-inline: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  .glass-rail, .stage, .card, .stat, .metric { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tone-teal { background: var(--surface) !important; color: var(--ink) !important; }
}
@media print {
  .bg-photo, body::before, .top, .dock-rail, .dock-bottom-wrap, .dock-mobile, .footer, .tabs, .no-print { display: none !important; }
  body { background: #fff; } .stage { background: none; box-shadow: none; border: 0; backdrop-filter: none; }
}
:root[data-theme="dark"] .i-moon, :root:not([data-theme="dark"]) .i-sun { display: none; }
