/* GenZWealth — styles */
:root {
  --bg: #0b0b14;
  --bg2: #10101c;
  --surface: #151524;
  --surface2: #1c1c2e;
  --border: rgba(255, 255, 255, .08);
  --border2: rgba(255, 255, 255, .14);
  --text: #f2f2f8;
  --muted: #9a9ab3;
  --faint: #6c6c86;
  --brand: #7c5cff;
  --brand2: #22e3a3;
  --pos: #22e3a3;
  --neg: #ff6b8b;
  --warn: #ffb547;
  --grad: linear-gradient(120deg, #7c5cff 0%, #b45cff 45%, #22e3a3 100%);
  --c1: #7c5cff; --c2: #22e3a3; --c3: #ffb547; --c4: #ff6b8b; --c5: #3fa9ff; --c6: #c6ff3d; --c7: #ff8a3d;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --radius: 20px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f5fb; --bg2: #efedf8; --surface: #ffffff; --surface2: #f3f1fb; --border: rgba(20, 16, 50, .08); --border2: rgba(20, 16, 50, .16);
    --text: #14122b; --muted: #5d5a78; --faint: #8f8ca8; --pos: #0a9e6e; --neg: #e0335e; --warn: #c77800;
    --c2: #12b886; --c6: #8ac926; --shadow: 0 10px 40px rgba(40, 30, 100, .08); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f5fb; --bg2: #efedf8; --surface: #ffffff; --surface2: #f3f1fb; --border: rgba(20, 16, 50, .08); --border2: rgba(20, 16, 50, .16);
  --text: #14122b; --muted: #5d5a78; --faint: #8f8ca8; --pos: #0a9e6e; --neg: #e0335e; --warn: #c77800;
  --c2: #12b886; --c6: #8ac926; --shadow: 0 10px 40px rgba(40, 30, 100, .08); color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 20px rgba(124, 92, 255, .4); }
.logo-mark svg { width: 20px; height: 20px; }
.cat-nav { display: flex; gap: 4px; margin-left: auto; }
.cat-nav a { padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; transition: .15s; }
.cat-nav a:hover { color: var(--text); background: var(--surface2); }
.bar-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; font-size: 17px; transition: .15s; }
.icon-btn:hover { border-color: var(--border2); transform: translateY(-1px); }
.sun { display: none; } .moon { display: inline; }
:root[data-theme="light"] .sun { display: inline; } :root[data-theme="light"] .moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .sun { display: inline; } :root:not([data-theme="dark"]) .moon { display: none; } }
.menu-btn { display: none; }

@media (max-width: 1000px) {
  .menu-btn { display: grid; }
  .bar-actions { margin-left: auto; }
  .cat-nav { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .25s; margin: 0; box-shadow: var(--shadow); }
  .cat-nav a { padding: 12px; font-size: 16px; }
  .menu-open .cat-nav { transform: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 56px; text-align: center; overflow: hidden; }
.hero-glow { position: absolute; inset: -30% -10% auto; height: 520px; background: radial-gradient(40% 50% at 30% 40%, rgba(124, 92, 255, .35), transparent 70%), radial-gradient(35% 45% at 70% 30%, rgba(34, 227, 163, .22), transparent 70%); filter: blur(30px); pointer-events: none; }
.hero .wrap { position: relative; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border2); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--muted); }
.hero h1 { font-size: clamp(40px, 7.2vw, 80px); margin: 22px 0 16px; font-weight: 700; letter-spacing: -.04em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 620px; margin: 0 auto; }
.search-box { position: relative; max-width: 560px; margin: 32px auto 0; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 58px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border2); box-shadow: var(--shadow); transition: .2s; }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(124, 92, 255, .18), var(--shadow); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 16px; }
.search-box kbd { font: 12px var(--font); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border2); color: var(--faint); }
.search-results { position: relative; z-index: 5; max-width: 560px; margin: 8px auto 0; text-align: left; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); }
.search-results a { display: block; padding: 10px 12px; border-radius: 10px; }
.search-results a:hover, .search-results a:first-child { background: var(--surface2); }
.search-results small { display: block; color: var(--muted); font-size: 13px; margin-left: 26px; }
.search-results .empty { margin: 10px 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; transition: .15s; }
.chip:hover { border-color: var(--brand); transform: translateY(-2px); }
.stats { display: flex; justify-content: center; gap: clamp(24px, 6vw, 64px); margin-top: 44px; }
.stats b { display: block; font: 700 30px var(--display); }
.stats span { font-size: 13px; color: var(--muted); }

/* ---------- Sections / cards ---------- */
.section { padding: 36px 16px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { font-size: clamp(24px, 3vw, 32px); }
.sec-head p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .18s, border-color .18s, box-shadow .18s; overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: .2s; z-index: 0; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px; border-radius: inherit; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-ico { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--surface2); border: 1px solid var(--border); }
.card-body { display: flex; flex-direction: column; min-width: 0; position: relative; }
.card-title { font-weight: 600; font-size: 16px; }
.card-hi { font-size: 12.5px; color: var(--faint); margin-top: 1px; }
.card-desc { font-size: 14px; color: var(--muted); margin-top: 6px; }
.card-arrow { margin-left: auto; color: var(--faint); transition: .18s; position: relative; }
.card:hover .card-arrow { color: var(--brand); transform: translateX(3px); }
.hot { display: inline-block; vertical-align: 2px; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: linear-gradient(90deg, #ff6b8b, #ffb547); color: #1a0f00; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); transition: .15s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.why > div { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.why span { font-size: 28px; }
.why h3 { margin: 12px 0 6px; font-size: 19px; }
.why p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }

/* ---------- Calculator page ---------- */
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 8px; }
.page-head .lead { margin: 0 0 24px; }
.crumbs { font-size: 13.5px; color: var(--faint); }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--brand); }
.calc-page { padding-top: 24px; padding-bottom: 48px; }
.calc-head { display: flex; align-items: center; gap: 16px; margin: 16px 0 22px; flex-wrap: wrap; }
.calc-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: var(--grad); box-shadow: 0 8px 28px rgba(124, 92, 255, .35); flex: none; }
.calc-head h1 { font-size: clamp(26px, 4vw, 38px); }
.calc-head p { margin: 4px 0 0; color: var(--muted); }
.calc-head .hi { color: var(--faint); }
.head-actions { display: flex; gap: 8px; margin-left: auto; }
.btn { border: 0; cursor: pointer; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(124, 92, 255, .3); transition: .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border2); box-shadow: none; }

.calc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; align-items: start; }
.calc-grid.lower { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; }
.inputs { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 82px; }
@media (max-width: 1000px) { .calc-grid, .calc-grid.lower { grid-template-columns: 1fr; } .inputs { position: static; } .head-actions { margin-left: 0; width: 100%; } .head-actions .btn { flex: 1; } }
@media (max-width: 520px) { .panel { padding: 18px; border-radius: 20px; } }

.field label { font-size: 14.5px; font-weight: 500; color: var(--muted); display: block; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.field-top label { flex: 1; }
.pill { display: flex; align-items: center; gap: 2px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); font-weight: 600; color: var(--brand2); transition: .15s; max-width: 55%; }
.pill:focus-within { border-color: var(--brand); }
.pill.err { border-color: var(--neg); }
.pill span { color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; }
.pill .num { width: 9ch; min-width: 4ch; border: 0; background: none; outline: none; text-align: right; font-weight: 700; color: var(--text); font-size: 15.5px; }
.pill.wide .num { width: 14ch; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) 0, var(--brand2) var(--p, 50%), var(--surface2) var(--p, 50%)); outline: none; cursor: pointer; margin: 6px 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid var(--brand); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); transition: transform .12s; }
.range::-webkit-slider-thumb:active { transform: scale(1.15); }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 5px solid var(--brand); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 4px; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--border); margin-top: 10px; }
.seg button { flex: 1 1 auto; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); transition: .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); font-weight: 600; }
:root[data-theme="light"] .seg button.on { background: #fff; }
.select { width: 100%; margin-top: 10px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); cursor: pointer; font-size: 15px; }
.select:focus { outline: none; border-color: var(--brand); }
.select option { background: var(--surface); color: var(--text); }

.rows { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) 36px; gap: 8px; }
.row.head span { font-size: 12px; color: var(--faint); font-weight: 500; }
.row input { width: 100%; min-width: 0; height: 42px; padding: 0 10px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); font-size: 14.5px; }
.row input:focus { outline: none; border-color: var(--brand); }
.del { width: 36px; height: 42px; border-radius: 10px; border: 1px solid var(--border); background: none; color: var(--faint); cursor: pointer; }
.del:hover { color: var(--neg); border-color: var(--neg); }
.add { margin-top: 10px; width: 100%; padding: 10px; border-radius: 12px; border: 1px dashed var(--border2); background: none; color: var(--brand); font-weight: 600; cursor: pointer; }
.add:hover { background: var(--surface2); }

/* results */
.results { display: flex; flex-direction: column; gap: 18px; }
.primary { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 22px 22px 20px; border-radius: 20px; background: var(--grad); color: #fff; box-shadow: 0 14px 40px rgba(124, 92, 255, .35); }
.primary::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.p-label { font-size: 14px; opacity: .9; font-weight: 500; }
.p-value { font: 700 clamp(30px, 5vw, 44px)/1.1 var(--display); letter-spacing: -.03em; word-break: break-word; animation: pop .25s ease; }
.p-sub { font-size: 14px; opacity: .88; }
@keyframes pop { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.res-rows { margin: 0; display: flex; flex-direction: column; }
.res-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 2px; border-bottom: 1px dashed var(--border); }
.res-rows div:last-child { border-bottom: 0; }
.res-rows dt { color: var(--muted); font-size: 14.5px; }
.res-rows dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.res-rows .pos dd { color: var(--pos); } .res-rows .neg dd { color: var(--neg); } .res-rows .muted dd { color: var(--muted); }
.res-rows .strong { background: var(--surface2); border-radius: 12px; padding: 12px; border-bottom: 0; margin-top: 4px; }
.res-rows .strong dt { color: var(--text); font-weight: 600; }
.res-rows .strong dd { font-size: 17px; }
.alert { padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.alert.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.alert.note { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); }

.charts { display: grid; gap: 16px; }
.chart { padding: 16px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--border); }
.chart h4 { font-size: 15px; font-family: var(--font); font-weight: 600; margin-bottom: 10px; color: var(--muted); }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { width: 170px; height: 170px; flex: none; }
.donut path, .donut circle { transition: opacity .15s; }
.donut path:hover { opacity: .8; }
.d-big { font: 700 24px var(--display); fill: var(--text); text-anchor: middle; }
.d-small { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.legend span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.legend b { color: var(--text); margin-left: 4px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart .legend { flex-direction: row; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.donut-wrap .legend { flex-direction: column; }
.line-wrap { position: relative; }
.line { width: 100%; height: auto; display: block; overflow: visible; }
.grid-l { stroke: var(--border); stroke-width: 1; }
.ax { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.cursor { stroke: var(--border2); stroke-dasharray: 3 3; }
.dot { stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.tip span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.tip i { width: 8px; height: 8px; border-radius: 2px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.hbar-top span { color: var(--muted); }
.track { height: 12px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.fill { height: 100%; border-radius: 99px; transition: width .4s cubic-bezier(.2, .8, .2, 1); }

.table-wrap summary { cursor: pointer; font-weight: 600; padding: 12px 14px; border-radius: 14px; background: var(--surface2); list-style: none; }
.table-wrap summary::-webkit-details-marker { display: none; }
.table-wrap[open] summary { border-radius: 14px 14px 0 0; }
.tscroll { max-height: 380px; overflow: auto; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 14px 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-weight: 600; font-size: 12.5px; }
tr:hover td { background: var(--surface2); }

.info h2, .related h2 { font-size: 21px; margin-bottom: 12px; }
.info h3 { font-size: 17px; margin: 22px 0 8px; }
.info p, .info li { color: var(--muted); }
.info ol { padding-left: 20px; margin: 0; }
.formula { display: block; padding: 12px 14px; border-radius: 12px; background: var(--surface2); font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
details:not(.table-wrap) { border-bottom: 1px solid var(--border); padding: 10px 0; }
details:not(.table-wrap) summary { cursor: pointer; font-weight: 600; }
details:not(.table-wrap) p { margin: 8px 0 0; }
.related { display: flex; flex-direction: column; gap: 4px; }
.related a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; font-weight: 500; font-size: 15px; transition: .15s; }
.related a span { width: 36px; height: 36px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; flex: none; }
.related a:hover { background: var(--surface2); }
.related .see-all { color: var(--brand); justify-content: center; margin-top: 6px; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--bg2); padding: 48px 0 28px; }
.foot-top { display: grid; grid-template-columns: 1fr 3fr; gap: 32px; }
.foot-brand p { color: var(--muted); font-size: 14.5px; max-width: 280px; }
.foot-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cats h4 { font-size: 14px; font-family: var(--font); margin-bottom: 10px; }
.foot-cats a { display: block; color: var(--muted); font-size: 13.5px; padding: 3px 0; }
.foot-cats a:hover { color: var(--brand); }
.disclaimer { margin-top: 36px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.copy { font-size: 13px; color: var(--faint); margin: 12px 0 0; }
@media (max-width: 1000px) { .foot-top { grid-template-columns: 1fr; } .foot-cats { grid-template-columns: repeat(2, 1fr); } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; transition: .25s; z-index: 100; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
[hidden] { display: none !important; }
.dot { opacity: 0; }
.line-wrap:hover .dot { opacity: 1; }

/* ---------- Markets ---------- */
.cat-nav a.active, .nav-dd.active > .nav-dd-btn { color: var(--text); background: var(--surface2); }
.up { color: var(--pos); } .down { color: var(--neg); } .muted { color: var(--faint); }
.ticker { border-top: 1px solid var(--border); overflow: hidden; height: 34px; font-size: 13px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tk-track { display: flex; width: max-content; animation: tk 60s linear infinite; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk-track a { display: flex; align-items: center; gap: 6px; padding: 0 22px; height: 34px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-track a b { color: var(--text); font-weight: 600; }
@keyframes tk { to { transform: translateX(-50%); } }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 0 12px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.status i, .mc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status i.live, .mc-dot.live { background: var(--pos); box-shadow: 0 0 0 0 var(--pos); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.m-h { font-size: 22px; margin: 34px 0 14px; }
.m-h:first-child { margin-top: 8px; }
.mgrid, .skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mgrid.four { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mcard { padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; transition: transform .18s, box-shadow .18s; }
.mcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mcard.sk { height: 190px; background: linear-gradient(90deg, var(--surface) 0, var(--surface2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.mc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-name { font-weight: 600; font-size: 14.5px; color: var(--muted); }
.mc-price { font: 700 26px/1.2 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mcard.small .mc-price { font-size: 21px; }
.chg { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chg.up { color: var(--pos); } .chg.down { color: var(--neg); }
.spark { width: 100%; height: 56px; margin-top: 8px; display: block; }
.prev-l { stroke: var(--border2); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.drange { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.dtrack { flex: 1; height: 4px; border-radius: 9px; background: linear-gradient(90deg, var(--neg), var(--warn), var(--pos)); position: relative; opacity: .8; }
.dtrack i { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 2px solid var(--surface); transform: translate(-50%, -50%); }
.breadth { padding: 16px 20px; }
.br-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 10px; flex-wrap: wrap; }
.br-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 3px; }
.br-bar i.up { background: var(--pos); } .br-bar i.down { background: var(--neg); } .br-bar i.flat { background: var(--faint); }
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.movers h3 { font-size: 17px; margin-bottom: 8px; }
.mv { list-style: none; margin: 0; padding: 0; counter-reset: mv; }
.mv li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.mv li:last-child { border-bottom: 0; }
.mv li > div:first-child { min-width: 0; display: flex; flex-direction: column; }
.mv small { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-r { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; flex: none; }
.pct { min-width: 72px; text-align: center; padding: 4px 8px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.pct.up { background: color-mix(in srgb, var(--pos) 16%, transparent); }
.pct.down { background: color-mix(in srgb, var(--neg) 16%, transparent); }
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.ht { border-radius: 12px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; cursor: default; transition: transform .12s; }
.ht:hover { transform: scale(1.05); }
.ht b { font-size: 12.5px; letter-spacing: .01em; }
.ht span { font-size: 13px; font-weight: 600; }
.m-foot { margin-top: 26px; font-size: 13px; color: var(--faint); }
.m-foot a { color: var(--brand); font-weight: 600; }
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state span { font-size: 40px; }
.empty-state h2 { font-size: 22px; margin: 12px 0 8px; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 0 auto; }
@media (max-width: 760px) { .movers { grid-template-columns: 1fr; } .heat { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); } }

/* ---------- Clickable market items ---------- */
a.mcard { color: inherit; cursor: pointer; }
a.mcard:hover { border-color: var(--brand); }
.mv li { display: block; padding: 0; }
.mv li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 8px; margin: 0 -8px; border-radius: 12px; transition: background .15s; }
.mv li a:hover { background: var(--surface2); }
.mv li a > div:first-child { min-width: 0; display: flex; flex-direction: column; }
a.ht { color: #fff; }

/* ---------- Quote detail ---------- */
.q-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 16px 0 20px; }
.q-head h1 { font-size: clamp(28px, 4vw, 40px); }
.q-sub { margin: 4px 0 0; color: var(--muted); }
.q-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.qp { font: 700 clamp(30px, 5vw, 44px)/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.q-price .chg { font-size: 15px; }
.q-time { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); }
.q-time i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.q-time i.live { background: var(--pos); animation: pulse 1.8s infinite; }
.q-chart { padding: 18px 18px 10px; }
.q-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.q-tools .seg { margin-top: 0; flex-wrap: nowrap; }
.q-ranges button { min-width: 44px; }
.q-readout { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); padding: 14px 4px 6px; font-variant-numeric: tabular-nums; min-height: 40px; }
.q-readout b { color: var(--text); font-weight: 600; }
.rd-t { color: var(--text); font-weight: 600; }
.qsvg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.qx, .qy { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; }
.qdot { stroke: var(--surface); stroke-width: 2; }
.lastp { fill: #fff; font: 600 11.5px var(--font); }
.ax.pc { fill: var(--muted); }
.q-stats { margin-top: 18px; }
.q-stats h3, .q-list h3 { font-size: 18px; margin-bottom: 14px; }
.st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.st-grid div { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.st-grid span { font-size: 12.5px; color: var(--faint); }
.st-grid b { font-size: 17px; font-variant-numeric: tabular-nums; }
.w52 { margin-top: 16px; }
.w52 > span { font-size: 12.5px; color: var(--faint); }
.w52-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.w52-row small { color: var(--muted); font-size: 13px; }
.q-list { margin-top: 18px; }
.q-list td a { display: flex; flex-direction: column; }
.q-list td small { color: var(--faint); font-size: 12px; font-weight: 400; }
.q-list td.up { color: var(--pos); } .q-list td.down { color: var(--neg); }
.q-list tbody tr { cursor: pointer; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sortable.on { color: var(--text); }
@media (max-width: 760px) {
  .st-grid { grid-template-columns: repeat(2, 1fr); }
  .q-price { align-items: flex-start; }
  .q-tools { flex-direction: column; }
  .q-tools .seg { overflow-x: auto; }
}
.st-grid b span { font-size: inherit; color: inherit; } .st-grid b span.up { color: var(--pos); } .st-grid b span.down { color: var(--neg); }

/* ---------- Crypto ---------- */
.cimg { border-radius: 50%; flex: none; background: var(--surface2); object-fit: cover; }
.cimg.ph { display: inline-block; width: 24px; height: 24px; }
.cstats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cstats .mc-price { font-size: 22px; }
.cs-sub { font-size: 13px; font-weight: 600; min-height: 18px; }
.dom { height: 6px; border-radius: 9px; background: var(--surface2); overflow: hidden; margin-top: 6px; }
.dom i { display: block; height: 100%; background: #f7931a; border-radius: 9px; }
.dom.eth i { background: #627eea; }
.chl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.chl h3 { font-size: 17px; margin-bottom: 6px; }
.cmv li a { justify-content: flex-start; }
.cmv li a > div:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.cmv b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctable { margin-top: 14px; }
.ct-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ct-head h3 { font-size: 18px; }
.ct-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); min-width: 240px; }
.ct-search:focus-within { border-color: var(--brand); }
.ct-search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; }
.ctable td { vertical-align: middle; }
.ctable tbody tr { cursor: pointer; }
.coin { display: flex; align-items: center; gap: 10px; }
.coin small { color: var(--faint); font-size: 12px; }
.cspark { width: 120px; height: 36px; display: block; margin-left: auto; }
.coin-title { display: flex; align-items: center; gap: 14px; }
.coin-title .cimg { width: 52px; height: 52px; }
.sym { font-size: .5em; color: var(--faint); font-family: var(--font); font-weight: 600; vertical-align: middle; }
.rank { font: 600 13px var(--font); vertical-align: middle; padding: 3px 8px; border-radius: 8px; background: var(--surface2); color: var(--muted); }
.st-grid b small { display: block; font-size: 12px; font-weight: 500; color: var(--faint); margin-top: 2px; }
.supply { height: 8px; border-radius: 9px; background: var(--surface2); overflow: hidden; margin-top: 8px; }
.supply i { display: block; height: 100%; background: var(--grad); }
.coin-extra { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 18px; }
.coin-extra h3 { font-size: 18px; margin-bottom: 10px; }
.muted-p { color: var(--muted); margin: 0; }
.clinks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.cta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface)); }
.cta > span { font-size: 30px; }
.cta p { color: var(--muted); margin: 0 0 10px; font-size: 14.5px; }
.q-tools .vs-seg { margin-top: 0; }
.head-actions .vs-seg { margin-top: 0; }
@media (max-width: 1000px) { .cstats { grid-template-columns: repeat(2, 1fr); } .chl { grid-template-columns: 1fr; } .coin-extra { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .hide-sm { display: none; } .ct-search { min-width: 0; width: 100%; } }
@media (max-width: 420px) { .hide-xs { display: none; } }
.ctable th, .ctable td { padding: 10px 6px; }
.ctable th:nth-child(2), .ctable td:nth-child(2) { text-align: left; }
.ctable .cspark { width: 88px; }
@media (max-width: 1000px) { .ctable th:nth-child(4), .ctable td:nth-child(4) { display: none; } }

/* live price flashes */
.flash-up { animation: flashUp 1.4s ease-out; border-radius: 6px; }
.flash-down { animation: flashDown 1.4s ease-out; border-radius: 6px; }
@keyframes flashUp { from { background: color-mix(in srgb, var(--pos) 30%, transparent); } to { background: transparent; } }
@keyframes flashDown { from { background: color-mix(in srgb, var(--neg) 30%, transparent); } to { background: transparent; } }
#cNote { margin-bottom: 14px; }

/* ---------- Finance Calculators dropdown ---------- */
.cat-nav { align-items: center; }
.nav-dd { position: relative; }
.nav-dd-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: .15s; }
.nav-dd-btn:hover, .nav-dd.open > .nav-dd-btn { color: var(--text); background: var(--surface2); }
.caret { font-size: 13px; transition: transform .2s; }
.nav-dd.open .caret { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border2); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 60; }
.nav-dd-menu::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-dd.open .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1001px) { .nav-dd:hover .nav-dd-menu { opacity: 1; visibility: visible; transform: none; } .nav-dd:hover .caret { transform: rotate(180deg); } }
.cat-nav .nav-dd-menu a { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 12px; white-space: normal; color: var(--text); }
.cat-nav .nav-dd-menu a:hover { background: var(--surface2); }
.dd-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--surface2); border: 1px solid var(--border); }
.dd-txt { display: flex; flex-direction: column; min-width: 0; }
.dd-txt b { font-size: 14.5px; font-weight: 600; }
.dd-txt small { font-size: 12.5px; color: var(--faint); line-height: 1.4; margin-top: 2px; }
@media (max-width: 1000px) {
  .cat-nav { align-items: stretch; max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-dd-btn { width: 100%; padding: 12px; font-size: 16px; justify-content: space-between; }
  .nav-dd-menu { position: static; width: auto; grid-template-columns: 1fr; padding: 4px 0 4px 8px; border: 0; box-shadow: none; background: none; display: none; opacity: 1; visibility: visible; transform: none; }
  .nav-dd.open .nav-dd-menu { display: grid; }
  .nav-dd-menu::before { display: none; }
}

/* ---------- Mutual funds ---------- */
.mf-tops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
a.mf-top { gap: 2px; }
.mf-tn { font-size: 15.5px; line-height: 1.3; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mf-tr { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 8px; }
.mf-tr .mc-price { font-size: 24px; }
.mf-table { margin-top: 14px; }
.mf-table .tabs { margin: 4px 0 10px; }
.tab small { opacity: .6; font-weight: 500; margin-left: 2px; }
.mf-table td, .mf-table th { padding: 11px 8px; }
.mf-table th:first-child, .mf-table td:first-child { text-align: left; white-space: normal; }
.mf-name { display: flex; flex-direction: column; min-width: 200px; }
.mf-name small { color: var(--faint); font-size: 12px; font-weight: 400; margin-top: 2px; }
.mf-table tbody tr { cursor: pointer; }
.mf-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; }
.pill-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.fund-page .q-head h1 { font-size: clamp(24px, 3.4vw, 34px); max-width: 760px; }
.f-returns, .f-sip { margin-top: 18px; }
.f-returns h3, .f-sip h3 { font-size: 18px; margin-bottom: 14px; }
.f-note { font-size: 12.5px; margin: 10px 0 0; }
.f-sip p { margin: -6px 0 14px; font-size: 14px; }
.f-sip-in { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.f-sip-in label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.f-sip-in .pill { max-width: none; }
.f-sip-in .seg { margin-top: 0; }
.f-sip-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.f-sip-res div { padding: 16px; border-radius: 16px; background: var(--surface2); display: flex; flex-direction: column; gap: 2px; }
.f-sip-res span { font-size: 13px; color: var(--muted); }
.f-sip-res b { font: 700 24px var(--display); font-variant-numeric: tabular-nums; }
.f-sip-res small { color: var(--faint); font-size: 12.5px; }
.st-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .mf-tops { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .mf-tops { grid-template-columns: 1fr; } .f-sip-res { grid-template-columns: 1fr; } .mf-name { min-width: 0; } }
.mgrid.peers { grid-template-columns: repeat(4, 1fr); } @media (max-width: 1000px) { .mgrid.peers { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 480px) { .mgrid.peers { grid-template-columns: 1fr; } }

/* ---------- Stocks ---------- */
.stocks .head-actions .seg { margin-top: 0; }
.st-top { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-top: 14px; }
.st-top h3 { font-size: 17px; margin-bottom: 10px; }
.st-top .tabs { margin-bottom: 4px; }
.st-mv .mv-px { display: flex; flex-direction: column; align-items: flex-end; }
.st-mv .mv-px small { font-size: 11.5px; }
.secs { display: flex; flex-direction: column; gap: 0; }
.sec { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 64px; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font-size: 13.5px; }
.sec:hover, .sec.on { background: var(--surface2); }
.sec.on { outline: 1px solid var(--brand); }
.sec-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-n small { color: var(--faint); }
.sec-bar { height: 8px; border-radius: 9px; background: var(--surface2); overflow: hidden; }
.sec-bar i { display: block; height: 100%; border-radius: 9px; }
.sec-bar i.up { background: var(--pos); } .sec-bar i.down { background: var(--neg); }
.sec b { text-align: right; font-variant-numeric: tabular-nums; }
.st-table { margin-top: 14px; }
.st-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.st-filters .select { margin-top: 0; width: auto; height: 42px; max-width: 260px; }
.st-table td, .st-table th { padding: 11px 8px; }
.st-table th:first-child, .st-table td:first-child { text-align: left; white-space: normal; }
.st-table tbody tr { cursor: pointer; }
.st-chg { display: block; font-size: 12px; }
.rbar { display: flex; align-items: center; gap: 6px; min-width: 170px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rbar .dtrack { min-width: 50px; }
@media (max-width: 1000px) { .st-top { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .stocks .head-actions .seg { width: 100%; } .st-filters .select { max-width: none; width: 100%; } }
.st-top > *, .chl > *, .calc-grid > * { min-width: 0; }
@media (max-width: 700px) {
  .stocks .head-actions { flex-wrap: wrap; }
  .stocks .head-actions .seg { flex-wrap: nowrap; }
  .stocks .head-actions .seg button { padding: 9px 6px; font-size: 13px; }
  .st-mv .mv-px small { display: none; }
}

/* Stocks top search */
.st-find { position: relative; margin-bottom: 14px; z-index: 20; }
.st-find .search-box { max-width: none; margin: 0; }
.st-find .search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-width: none; margin: 0; }
.search-results a.sf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; }
.search-results a.sf:first-child { background: none; }
.search-results a.sf.on, .search-results a.sf:hover { background: var(--surface2); }
.sf-l { display: flex; flex-direction: column; min-width: 0; }
.sf-l small { margin: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-r { display: flex; align-items: center; gap: 10px; flex: none; font-variant-numeric: tabular-nums; }
.stocks .head-actions { flex-wrap: wrap; justify-content: flex-end; }
.stocks .head-actions .vs-seg { margin-top: 0; }
.st-grid b small { font-weight: 500; }

.st-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .st-grid.three { grid-template-columns: repeat(2, 1fr); } }

/* single-column dropdown (Stocks) */
.nav-dd.single .nav-dd-menu { width: 340px; grid-template-columns: 1fr; }
.cat-nav .nav-dd-menu a.current { background: var(--surface2); }
.cat-nav .nav-dd-menu a.current { box-shadow: inset 3px 0 0 var(--brand); }

/* ---------- News ---------- */
.nw-hot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.nw-hot-wrap .m-h { margin-top: 0; }
.ncard { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s; }
.ncard:hover { border-color: var(--border2); }
.ncard.big { padding: 18px; }
.ncard.big.hot { background: linear-gradient(160deg, color-mix(in srgb, var(--c4) 9%, var(--surface)), var(--surface) 60%); }
.ncard h3 { font: 600 16px/1.4 var(--font); letter-spacing: -.01em; }
.ncard.big h3 { font: 600 17px/1.38 var(--display); }
.ncard h3 a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ncard p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.nmeta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; }
.nsrc { font-weight: 700; color: var(--text); }
.noff { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.ntags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; }
.ntag { border: 1px solid var(--border); background: var(--surface2); color: var(--muted); font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.ntag:hover, .ntag.on { color: var(--text); border-color: var(--brand); }
.ntag.on { background: color-mix(in srgb, var(--brand) 14%, var(--surface2)); }
.nimp { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.nimp.high { background: color-mix(in srgb, var(--c4) 16%, transparent); color: var(--neg); }
.nimp.med { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.nw-controls { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 108px; z-index: 5; }
.nw-controls .tabs { margin: 0; }
.nw-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.nw-filters .seg { margin: 0; }
.nw-filters .ct-search { flex: 1; max-width: 420px; }
.nw-topics { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.nw-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; scroll-margin-top: 280px; }
.nw-src { margin-top: 22px; }
.nw-src h3 { font-size: 17px; margin-bottom: 6px; }
.nw-src p { font-size: 13.5px; margin: 0 0 12px; }
.nw-src-list { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 1000px) { .nw-hot { grid-template-columns: 1fr 1fr; } .nw-controls { position: static; } }
@media (max-width: 700px) { .nw-hot, .nw-list { grid-template-columns: 1fr; } .nw-filters .ct-search { max-width: none; width: 100%; } .nw-filters .seg { width: 100%; } .nw-filters .seg button { padding: 9px 4px; font-size: 13px; } }

/* News v2: one column, single-line headlines */
.nw-list { grid-template-columns: 1fr !important; gap: 10px; margin-top: 12px; }
.nw-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nw-bar .ct-search { flex: 1; max-width: 520px; }
.ncard { padding: 14px 18px; gap: 6px; min-width: 0; }
.ncard.hot { border-left: 3px solid var(--neg); }
.ncard h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 600 16px/1.4 var(--font); }
.ncard h3 a { display: inline; }
.ncard p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.nmeta .ntags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0 auto; padding: 0; }
.ntag { cursor: default; font-size: 11.5px; padding: 2px 8px; }
.ntag:hover { color: var(--muted); border-color: var(--border); }
.nimp { font-size: 11.5px; padding: 2px 8px; }
.news .head-actions .seg { margin-top: 0; }
@media (max-width: 700px) {
  .nmeta .ntags { margin-left: 0; width: 100%; }
  .news .head-actions .seg { width: 100%; }
  .news .head-actions .seg button { padding: 9px 4px; font-size: 13px; }
}
@media (max-width: 700px) { .news .head-actions .seg { flex-wrap: nowrap; } .news .head-actions .seg button { flex: 1 1 0; white-space: nowrap; } }


/* ---------- Icon system & calmer, editorial styling ---------- */
.ico { display: inline-block; vertical-align: middle; flex: none; }
.accent { color: var(--brand); }
.hero-glow { opacity: .45; }
.calc-ico { background: var(--surface); border: 1px solid var(--border2); color: var(--brand); box-shadow: none; border-radius: 16px; }
.card-ico { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 0; color: var(--brand); }
.card:hover .card-ico { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); }
.card-arrow { display: flex; align-items: center; }
.hot { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: 11px; font-weight: 600; letter-spacing: 0; padding: 2px 7px; border-radius: 6px; text-transform: none; }
.chip .ico { margin-right: 4px; color: var(--brand); }
.search-results a .ico { color: var(--brand); margin-right: 4px; }
.why span { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); font-size: 0; }
.related a span { color: var(--brand); }
.dd-ico { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border: 0; }
.txt-ico { font: 700 12px/1 var(--font); letter-spacing: .04em; color: var(--brand); }
.caret { display: inline-flex; color: var(--faint); }
.caret .ico { width: 14px; height: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button .ico { margin-right: 2px; vertical-align: -3px; }
.alert { display: flex; gap: 10px; align-items: flex-start; }
.alert .ico { margin-top: 1px; }
.alert.warn .ico { color: var(--warn); }
.alert.note .ico { color: var(--brand); }
.empty-state > span { display: inline-flex; color: var(--faint); }
.cta > span { display: inline-flex; color: var(--brand); }
.s-ico { display: inline-flex; color: var(--faint); }
.del { display: inline-flex; align-items: center; justify-content: center; }
.cc { display: inline-block; font: 700 10.5px/1.5 var(--font); letter-spacing: .04em; padding: 0 5px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); margin-right: 6px; vertical-align: 1px; }
.chip .cc { margin-right: 6px; }
.icon-btn { color: var(--text); }
.icon-btn svg { display: block; }
.clinks .chip .ico { margin: 0 0 0 4px; color: var(--faint); }

/* One brand colour instead of multi-colour gradients */
:root { --grad: linear-gradient(135deg, #6f52ff 0%, #5a3be6 100%); }
.logo b { background: none; color: var(--brand); -webkit-text-fill-color: currentColor; }
.range { background: linear-gradient(90deg, var(--brand) 0, var(--brand) var(--p, 50%), var(--surface2) var(--p, 50%)); }
.pill { color: var(--text); }
.primary { box-shadow: 0 10px 30px rgba(90, 59, 230, .22); }
.btn { box-shadow: none; }
.btn:hover { filter: brightness(1.06); }
.card::before { display: none; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.calc-ico, .logo-mark { box-shadow: none; }


/* ---------- GenZWealth Assistant (chat widget) ---------- */
.gza { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-size: 14.5px; }
.gza-fab { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 16px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(40, 20, 120, .28); transition: transform .15s, filter .15s; }
.gza-fab:hover { transform: translateY(-1px); filter: brightness(1.06); }
.gza.is-open .gza-fab { display: none; }
.gza-panel { position: absolute; right: 0; bottom: 0; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border2); border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 10, 60, .28); overflow: hidden; }
.gza-panel[hidden] { display: none; }
.gza-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.gza-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gza-title b { display: block; font-size: 15px; }
.gza-title small { color: var(--faint); font-size: 12px; }
.gza-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); flex: none; }
.gza-actions { display: flex; gap: 4px; }
.gza-icon { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.gza-icon:hover { background: var(--surface2); color: var(--text); }
.gza-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.gza-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.gza-msg p { margin: 0 0 6px; } .gza-msg p:last-child { margin-bottom: 0; }
.gza-msg ul, .gza-msg ol { margin: 4px 0 6px; padding-left: 20px; } .gza-msg li { margin: 2px 0; }
.gza-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.gza-msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.gza-msg a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.gza-msg.error { border-color: color-mix(in srgb, var(--neg) 40%, var(--border)); }
.gza-retry { margin-top: 8px; border: 1px solid var(--border2); background: var(--surface2); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.gza-status { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; }
.gza-typing { display: flex; gap: 4px; padding: 4px 0; }
.gza-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: gzaDot 1s infinite ease-in-out; }
.gza-typing i:nth-child(2) { animation-delay: .15s; } .gza-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gzaDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.gza-suggest { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.gza-suggest button { text-align: left; border: 1px solid var(--border2); background: var(--surface); color: var(--text); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.gza-suggest button:hover { border-color: var(--brand); color: var(--brand); }
.gza-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.gza-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border2); background: var(--surface2); font: inherit; line-height: 1.4; outline: none; }
.gza-form textarea:focus { border-color: var(--brand); }
.gza-send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.gza.is-busy .gza-send { background: var(--text); }
.gza-foot { margin: 0; padding: 0 14px 10px; font-size: 11.5px; color: var(--faint); background: var(--surface); }
@media (max-width: 600px) {
  .gza { right: 14px; bottom: 14px; }
  .gza-fab span { display: none; }
  .gza-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .gza.is-open { inset: 0; right: 0; bottom: 0; }
  .gza-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
}
@media print { .gza { display: none; } }


/* ---------- Accounts ---------- */
.user-slot { position: relative; display: flex; align-items: center; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font: 700 14px var(--font); cursor: pointer; }
.user-dd { position: absolute; top: calc(100% + 10px); right: 0; width: 250px; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; z-index: 70; }
.user-dd[hidden] { display: none; }
.ud-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; min-width: 0; }
.ud-head small { color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.user-dd a, .user-dd button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.user-dd a:hover, .user-dd button:hover { background: var(--surface2); }
.user-dd .ico { color: var(--muted); }
@media (max-width: 600px) { #signInBtn span { display: none; } #signInBtn { width: 40px; padding: 0; } }
.mem { display: inline-block; vertical-align: 2px; font: 600 11px var(--font); padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
h1 .mem { font-size: 13px; vertical-align: 6px; }
.gz-modal { position: fixed; inset: 0; z-index: 120; background: rgba(10, 8, 25, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gz-dialog { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border2); border-radius: 20px; padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.gz-dialog h2 { font-size: 22px; margin: 0 0 6px; padding-right: 30px; }
.gz-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.gz-x:hover { background: var(--surface2); }
.gz-reason { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.gz-form { display: flex; flex-direction: column; gap: 14px; }
.gz-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.gz-form input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border2); background: var(--surface2); font-size: 15px; color: var(--text); outline: none; }
.gz-form input:focus { border-color: var(--brand); }
.gz-form small { color: var(--faint); font-size: 12px; font-weight: 400; }
.gz-form .btn { height: 46px; margin-top: 4px; }
.gz-err { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
.gz-err[hidden] { display: none; }
.gz-switch { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.gz-switch button { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; }
.gz-fine { margin: 14px 0 0; font-size: 12px; color: var(--faint); }
.danger-btn { background: var(--neg); }
.locked { text-align: center; padding: 40px 24px; max-width: 640px; margin: 10px auto 0; }
.lock-ico { display: inline-flex; width: 60px; height: 60px; border-radius: 18px; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); }
.locked h2 { font-size: 24px; margin: 16px 0 8px; }
.locked > p { color: var(--muted); max-width: 480px; margin: 0 auto 20px; }
.lock-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.lock-actions .btn { height: 44px; padding: 0 20px; }
.perks { list-style: none; padding: 0; margin: 0 auto 22px; display: inline-flex; flex-direction: column; gap: 10px; text-align: left; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .ico { color: var(--brand); }
.avatar-lg { background: var(--brand) !important; color: #fff !important; font: 700 22px var(--display); border: 0 !important; }
.ac-sec { margin-top: 16px; }
.ac-sec h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ac-sec h2 .ico { color: var(--brand); }
.ac-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ac-list { display: flex; flex-direction: column; }
.ac-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.ac-row:last-child { border-bottom: 0; }
.ac-row .card-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; }
.ac-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-main small { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-main:hover b { color: var(--brand); }
.ac-px { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-size: 14px; }
.ac-date { font-size: 13px; white-space: nowrap; }
.wl-kind { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ac-grid .muted { font-size: 14px; }
.danger h2 { color: var(--neg); }
@media (max-width: 760px) { .ac-grid { grid-template-columns: 1fr; } .ac-date { display: none; } }
.wl-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.wl-btn:hover { border-color: var(--brand); }
.wl-btn.on { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.wl-btn.on .ico { color: var(--warn); fill: currentColor; }

/* forgot / reset password */
.link-btn { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--brand); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.gz-sent { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 8px 0; }
.gz-sent .ico { color: var(--brand); }
.gz-sent p { margin: 6px 0 0; }
.reset .gz-form { max-width: 360px; margin: 0 auto; text-align: left; }

/* Continue with Google */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 12px; border: 1px solid var(--border2); background: #fff; color: #1f1f1f; font: 600 15px var(--font); text-decoration: none; transition: background .15s, border-color .15s; }
.google-btn:hover { background: #f5f5f7; border-color: #c7c7d1; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border2); }
.g-tag { display: inline-flex; align-items: center; gap: 5px; vertical-align: -3px; }
.g-tag svg { width: 14px; height: 14px; }

/* Top menu sits on the left, next to the logo; account & theme buttons stay on the right */
@media (min-width: 1001px) {
  .bar { gap: 8px; }
  .cat-nav { margin-left: 28px; }
  .bar-actions { margin-left: auto; }
  .nav-dd.single .nav-dd-menu { left: 0; right: auto; }
}
