/* =========================================================
   Kelvo — Static Website
   Fonts: Inter & JetBrains Mono (SIL Open Font License 1.1),
   self-hosted from ./fonts — see fonts/LICENSE-*.txt
   ========================================================= */

@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root,
[data-theme="dark"] {
  --bg: #050608;
  --bg-elev: #0a0c11;
  --surface: #111319;
  --surface-2: #171a22;
  --surface-hover: #1c2029;
  --chat-user-bg: #22252e;
  --border: #22252e;
  --border-strong: #2f3340;
  --text: #f4f5f7;
  --text-muted: #9aa0ad;
  --text-faint: #7d8494;
  --accent: #ffffff;
  --accent-2: #22252e;
  --accent-contrast: #050608;
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #050608;
  --btn-primary-hover: #e6e8ee;
  --pos: #4ade80;
  --neg: #f87171;
  --seg-1: #7c8cff;
  --seg-2: #a78bfa;
  --seg-3: #38bdf8;
  --seg-4: #475069;
  --panel-glow: rgba(99, 102, 241, 0.22);
  --nav-bg: rgba(10, 12, 17, 0.78);
  --nav-shadow: 0 8px 30px -18px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --shadow-float: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shield-a: #4338ca;
  --shield-b: #1e1b4b;
  --shield-c: #a5b4fc;
  --shield-check: #e0e7ff;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #eef0f6;
  --surface: #ffffff;
  --surface-2: #f3f4f9;
  --surface-hover: #eceef5;
  --chat-user-bg: #e2e5ee;
  --border: #e2e5ee;
  --border-strong: #cfd4e1;
  --text: #0b0d12;
  --text-muted: #4b5263;
  --text-faint: #5f6677;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-contrast: #ffffff;
  --btn-primary-bg: #0b0d12;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #262a35;
  --pos: #15803d;
  --neg: #dc2626;
  --seg-1: #4f46e5;
  --seg-2: #8b5cf6;
  --seg-3: #0ea5e9;
  --seg-4: #b8bfd0;
  --panel-glow: rgba(99, 102, 241, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.18);
  --shadow-card: 0 20px 50px -24px rgba(15, 23, 42, 0.25);
  --shadow-float: 0 30px 70px -24px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --shield-a: #6366f1;
  --shield-b: #3730a3;
  --shield-c: #c7d2fe;
  --shield-check: #ffffff;
}

:root {
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.645, 0.045, 0.355, 1);
  --section-space: clamp(4.5rem, 10vw, 8rem);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark light;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: 650;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.8rem 1.4rem;
  font-size: 0.975rem;
}

.btn-primary {
  background-color: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
}

.btn-primary svg {
  transition: transform 0.2s var(--ease);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-secondary {
  background-color: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
}

.btn-icon {
  padding: 0.5rem;
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-icon:hover {
  color: var(--text);
  background-color: var(--surface-hover);
}

.btn-icon .theme-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

.status-text {
  min-height: 1.4em;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--accent);
}

/* ---------- Top nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid transparent;
  background-color: transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  background-color: var(--nav-bg);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--nav-shadow);
}

/* Keep transparent top bar readable over the dark-scrimmed welcome photo in both themes */
.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .brand,
.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .nav-links a,
.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .nav-dropdown-btn,
.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .btn-icon {
  color: rgba(255, 255, 255, 0.9);
}

.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .nav-links a:hover,
.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .nav-dropdown-btn:hover,
.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .btn-icon:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

.has-welcome .site-header:not(.is-scrolled):not(.is-menu-open) .btn-primary {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #050608;
}

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  height: 64px;
  padding-inline: clamp(1rem, 2.5vw, 2.25rem);
}

.nav-bar .brand {
  justify-self: start;
}

.nav-bar .nav-links {
  justify-self: center;
}

.nav-bar .nav-actions {
  justify-self: end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #050608;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background-color: var(--surface-hover);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-dropdown-btn:hover,
.nav-dropdown.is-open .nav-dropdown-btn {
  color: var(--text);
  background-color: var(--surface-hover);
}

.nav-dropdown-btn svg {
  transition: transform 0.2s ease;
}

.nav-dropdown.is-open .nav-dropdown-btn svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  color: var(--text);
  background-color: var(--surface-hover);
}

.mobile-nav-toggle {
  display: none;
}

.mobile-nav-toggle .icon-close,
.site-header.is-menu-open .mobile-nav-toggle .icon-menu {
  display: none;
}

.site-header.is-menu-open .mobile-nav-toggle .icon-close {
  display: block;
}

.mobile-menu {
  padding: 0.75rem clamp(1rem, 2.5vw, 2.25rem) 1.25rem;
  border-top: 1px solid var(--border);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-label {
  margin: 0.9rem 0 0.35rem;
  padding-inline: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.mobile-menu-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu-links a {
  display: block;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-menu-links a:hover,
.mobile-menu-links a[aria-current="page"] {
  color: var(--text);
  background-color: var(--surface-hover);
}

/* ---------- Welcome Banner ---------- */
.welcome {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 6rem 4rem;
  overflow: hidden;
  isolation: isolate;
  background: #050608;
}

.welcome-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.welcome-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.72) 0%, rgba(5, 6, 8, 0.42) 45%, rgba(5, 6, 8, 0.78) 100%),
    radial-gradient(60% 50% at 50% 50%, rgba(5, 6, 8, 0.55), transparent 100%);
}

.welcome-inner {
  display: flex;
  justify-content: center;
  text-align: center;
  margin-bottom: clamp(7rem, 18vh, 12rem);
}

.welcome h1 {
  max-width: 15ch;
  color: #ffffff;
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-shadow: 0 6px 36px rgba(0, 0, 0, 0.55);
}

.welcome-scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(5, 6, 8, 0.45);
  color: #ffffff;
  text-decoration: none;
  animation: bounce-down 2.4s ease-in-out infinite;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.welcome-scroll:hover {
  background: rgba(5, 6, 8, 0.75);
  border-color: rgba(255, 255, 255, 0.55);
}

@keyframes bounce-down {

  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 6px);
  }
}

.welcome+.hero {
  scroll-margin-top: 0;
  padding-top: clamp(5rem, 10vw, 8rem);
  border-top: 1px solid var(--border);
}

.hero h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(7.5rem, 15vw, 10.5rem);
  padding-bottom: 4rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.hero-copy {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Entrance animation */
.js .hero-inner>*,
.js .hero-visual {
  animation: rise-in 0.9s var(--ease) both;
}

.js .hero-inner> :nth-child(2) {
  animation-delay: 0.08s;
}

.js .hero-inner> :nth-child(3) {
  animation-delay: 0.16s;
}

.js .hero-inner> :nth-child(4) {
  animation-delay: 0.24s;
}

.js .hero-visual {
  animation: hero-image 1.25s var(--ease) 0.3s both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-image {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(4%) scale(0.98);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

/* ---------- Mockup primitives ---------- */
.hero-visual-wrap {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.hero-visual {
  position: relative;
  margin: 0 auto;
  max-width: 1080px;
}

.dashboard-preview {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  font-size: 0.8125rem;
  text-align: left;
}

.dashboard-preview::before {
  content: "";
  position: absolute;
  inset: 0 10% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.mock-dots {
  display: inline-flex;
  gap: 6px;
}

.mock-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mock-title {
  font-weight: 600;
}

.mock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.mock-tag {
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  color: var(--text-faint);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-pos {
  background: var(--pos);
  box-shadow: 0 0 10px var(--pos);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr) minmax(0, 1fr) 275px;
  grid-template-rows: minmax(280px, auto) minmax(220px, auto);
  min-height: 550px;
  gap: 0.875rem;
  padding: 0.875rem;
}

.dash-menu {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-nav {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-nav li {
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
}

.dash-settings {
  margin-top: auto;
  padding: 0.65rem 0.65rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-settings svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-nav .is-active {
  background: var(--surface-hover);
  color: var(--text);
  font-weight: 600;
}

.dash-portfolio {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.dash-chart {
  height: 96px;
}

.dash-macro {
  grid-column: 2;
  grid-row: 2;
}

.dash-markets {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  flex: 1;
}

.hm-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.55rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  border: 1px solid var(--border);
}

.hm-lg {
  grid-column: span 2;
}

.hm-tile span {
  color: var(--text-muted);
}

.hm-tile strong {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.hm-pos {
  background: color-mix(in srgb, var(--pos) 14%, var(--surface-2));
  border-color: color-mix(in srgb, var(--pos) 30%, var(--border));
}

.hm-pos strong {
  color: var(--pos);
}

.hm-neg {
  background: color-mix(in srgb, var(--neg) 14%, var(--surface-2));
  border-color: color-mix(in srgb, var(--neg) 30%, var(--border));
}

.hm-neg strong {
  color: var(--neg);
}

.dash-news {
  grid-column: 3;
  grid-row: 2;
}

.news-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.news-list small {
  flex: none;
  font-size: 0.65rem;
  color: var(--text-faint);
  text-transform: uppercase;
}

.dash-chat {
  grid-column: 4;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-alloc {
  grid-column: 3;
  grid-row: 1;
}

.dash-holdings {
  grid-column: 2 / 4;
  grid-row: 2;
}

.donut-wrap--sm {
  width: min(100px, 75%);
  margin: 0.6rem auto 0;
}

.dash-news-feed {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.news-feed-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.news-feed-list a {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.news-feed-list a:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.news-feed-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.news-feed-meta {
  font-size: 0.6875rem;
  color: var(--accent);
}

.mock-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.chat-msg {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.chat-msg--user {
  align-self: flex-end;
  max-width: 90%;
  background: var(--chat-user-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.chat-msg--bot {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.chat-msg--bot strong {
  color: var(--text);
  font-family: var(--font-mono);
}

.chat-msg--bot ul {
  display: grid;
  gap: 0.3rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chat-msg--bot li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-faint);
  font-size: 0.75rem;
}

.mock-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-card);
  text-align: left;
  font-size: 0.8125rem;
}

.mock-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mock-card-head .mock-tag {
  margin-left: 0;
}

.mock-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.mock-muted {
  color: var(--text-faint);
  font-weight: 400;
}

.mock-value {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.mock-value--sm {
  font-size: 1.375rem;
}

.mock-value .mock-delta {
  font-size: 0.8125rem;
  letter-spacing: 0;
}

.mock-decimals {
  font-size: 0.6em;
  color: var(--text-faint);
}

.mock-delta {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

.mock-delta .mock-muted {
  font-family: var(--font-sans);
}

.pos {
  color: var(--pos);
}

.neg {
  color: var(--neg);
}

/* Line chart */
.line-chart {
  width: 100%;
  height: clamp(120px, 18vw, 190px);
  margin-top: 0.75rem;
}

.line-chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.line-chart .grid-lines line {
  stroke: var(--border);
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
}

.stop-accent {
  stop-color: var(--accent);
}

/* Donut */
.donut-wrap {
  position: relative;
  width: min(150px, 70%);
  margin: 0.75rem auto 0.9rem;
}

.donut {
  width: 100%;
  transform: rotate(0deg);
}

.donut circle {
  fill: none;
  stroke-width: 5;
}

.donut-track {
  stroke: var(--surface-2);
}

.donut-seg {
  stroke-linecap: butt;
}

.seg-1 {
  stroke: var(--seg-1);
}

.seg-2 {
  stroke: var(--seg-2);
}

.seg-3 {
  stroke: var(--seg-3);
}

.seg-4 {
  stroke: var(--seg-4);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
}

.donut-center strong {
  font-family: var(--font-mono);
  font-size: 1rem;
}

/* Holdings table */
.mock-table {
  width: 100%;
  margin-top: 0.6rem;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.mock-table th {
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.mock-table td {
  padding: 0.5rem 0.45rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
}

.mock-table th:first-child,
.mock-table td:first-child {
  padding-left: 0;
  white-space: normal;
}

.mock-table th:last-child,
.mock-table td:last-child {
  padding-right: 0;
}

.mock-table tr:last-child td {
  border-bottom: 0;
}

.mock-table th:first-child,
.mock-table td:first-child {
  text-align: left;
  font-family: var(--font-sans);
}

.mock-table td:first-child {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}

.ticker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  color: #050608;
}

.t-1 {
  background: var(--seg-1);
}

.t-2 {
  background: color-mix(in srgb, var(--seg-1) 70%, #ffffff);
}

.t-3 {
  background: var(--seg-2);
}

.t-4 {
  background: var(--seg-3);
}

.t-5 {
  background: var(--seg-4);
  color: var(--text);
}

.x-list,
.scope-card ul {
  display: grid;
  gap: 0.55rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.x-list li,
.scope-card li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
}

.x-list svg,
.scope-card svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scope-card--is svg {
  stroke: var(--pos);
}

.x-list svg,
.scope-card--isnt svg {
  stroke: var(--neg);
}

/* ---------- Feature blocks ---------- */
.feature {
  margin-top: var(--section-space);
  padding-top: var(--section-space);
  border-top: 1px solid var(--border);
}

.feature-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.feature--reverse .feature-text {
  order: 2;
}

.feature--stacked .feature-inner {
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.feature--stacked .feature-text {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}

.feature--stacked .feature-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
}

.feature--stacked .feature-media {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
}

.feature-text,
.feature-media {
  min-width: 0;
}

.feature-text {
  max-width: 30rem;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.feature h2,
.trust h2,
.scope h2,
.cta h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.875rem);
}

.feature-copy {
  margin-top: 1.1rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.feature-points {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.feature-points li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23050608' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat,
    linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Metric lists */
.metric-list {
  display: grid;
  margin: 0.6rem 0 0;
}

.metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.metric-list div:last-child {
  border-bottom: 0;
}

.metric-list dt {
  color: var(--text-muted);
}

.metric-list dd {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
}

.metric-list--tight div {
  padding: 0.4rem 0;
}

/* ---------- Trust (privacy) band ---------- */
.trust {
  position: relative;
  margin-top: var(--section-space);
  padding-block: var(--section-space);
  border-block: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}

.trust-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.trust-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 460px;
  width: 100%;
  margin-inline: auto;
}

.shield {
  position: relative;
  width: 46%;
  filter: drop-shadow(0 30px 50px rgba(67, 56, 202, 0.55));
  animation: float 6s ease-in-out infinite;
}

.stop-shield-a {
  stop-color: var(--shield-a);
}

.stop-shield-b {
  stop-color: var(--shield-b);
}

.shield-inner {
  stroke: var(--shield-c);
  stroke-opacity: 0.45;
}

.shield-check {
  stroke: var(--shield-check);
  filter: drop-shadow(0 0 8px var(--shield-c));
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}

.orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.orbit-1 {
  inset: 18%;
  animation: spin 18s linear infinite;
}

.orbit-2 {
  inset: 8%;
  animation: spin 28s linear infinite reverse;
  border-style: dashed;
}

.orbit-3 {
  inset: 0;
  animation: spin 40s linear infinite;
  opacity: 0.6;
}

.orbit-2::after {
  background: var(--accent-2);
  box-shadow: 0 0 14px var(--accent-2);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.trust-text {
  max-width: 30rem;
}

.x-list {
  margin-top: 1.5rem;
  gap: 0.75rem;
}

.x-list li {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.privacy-list svg {
  stroke: var(--pos);
}

/* ---------- Scope (is / isn't) ---------- */
.scope {
  padding-block: var(--section-space) 0;
}

.section-head {
  max-width: 40rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.scope-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.scope-card h3 {
  font-size: 1.25rem;
}

.scope-card ul {
  margin-top: 1.25rem;
  gap: 0.9rem;
}

.scope-card li {
  font-size: 1rem;
  color: var(--text);
}

.scope-card--is {
  background:
    radial-gradient(80% 80% at 0% 0%, color-mix(in srgb, var(--pos) 9%, transparent), transparent 60%),
    var(--surface);
}

.scope-card--isnt {
  background:
    radial-gradient(80% 80% at 100% 0%, color-mix(in srgb, var(--neg) 9%, transparent), transparent 60%),
    var(--surface);
}

/* ---------- Team page ---------- */
.team-hero {
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.team-section {
  padding-block: clamp(2rem, 5vw, 4rem) 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.team-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(70% 70% at 50% 35%, var(--panel-glow), transparent 70%),
    var(--bg-elev);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.team-photo svg {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-info {
  padding: 1.35rem 1.5rem 1.5rem;
}

.team-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.team-info h2 {
  margin-top: 0.45rem;
  font-size: 1.25rem;
}

.team-bio {
  margin-top: 0.65rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ---------- Architecture & Security diagrams ---------- */
.arch-section {
  padding-block: clamp(1.5rem, 4vw, 3rem) 0;
}

.diagram-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

.diagram-card .mermaid {
  margin: 0;
  display: flex;
  justify-content: center;
  background: transparent;
}

/* ---------- Article page (About) ---------- */
.article-section {
  padding-block: clamp(1.5rem, 4vw, 3rem) 0;
}

.article-prose {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.article-prose h2 {
  margin-top: 2rem;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
}

.article-prose h2:first-child {
  margin-top: 0;
}

.article-prose p {
  margin-top: 0.85rem;
  font-size: 1.03125rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ---------- CTA ---------- */
.cta {
  margin-top: var(--section-space);
  padding-block: var(--section-space);
  border-top: 1px solid var(--border);
}

.cta-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background: var(--bg-elev);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.cta-copy {
  max-width: 32rem;
  margin-top: 1rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.cta-email {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cta-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cta .hero-actions {
  margin-top: 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding-block: 3.5rem 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-brand p {
  max-width: 22rem;
  margin-top: 0.9rem;
}

.footer-col h3 {
  margin-bottom: 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}

.footer-col ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-col a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}

.disclaimer {
  max-width: 44rem;
  color: var(--text-faint);
}

/* ---------- Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .feature-media[data-reveal] {
  transition-delay: 0.1s;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-bar {
    display: flex;
    justify-content: space-between;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .dash-menu,
  .dash-portfolio,
  .dash-macro,
  .dash-markets,
  .dash-news,
  .dash-alloc,
  .dash-holdings,
  .dash-news-feed,
  .dash-chat {
    grid-column: auto;
    grid-row: auto;
  }

  .dash-menu,
  .dash-chat {
    grid-column: 1 / -1;
  }

  .dash-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .dash-settings {
    margin-top: 0.25rem;
    padding-top: 0.55rem;
  }

  .feature-inner,
  .trust-inner {
    grid-template-columns: 1fr;
  }

  .feature--reverse .feature-text {
    order: 0;
  }

  .feature-text,
  .trust-text {
    max-width: 36rem;
  }

  .trust-visual {
    max-width: 320px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 26rem;
    margin-inline: auto;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dash-menu,
  .dash-chat {
    grid-column: auto;
  }

  .dash-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .mock-chip {
    display: none;
  }

  .scope-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(1200px, 100% - 1.5rem);
  }

  .nav-bar {
    height: 58px;
    padding-inline: 0.875rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .mock-table {
    font-size: 0.6875rem;
  }

  .mock-table th,
  .mock-table td {
    padding-inline: 0.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Desktop section sizing ---------- */
@media (min-width: 961px) {
  body.has-welcome main>section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 5.5rem 4rem;
  }

  body.has-welcome .welcome {
    display: grid;
    padding-block: 6rem 4rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  html,
  html:has(body.has-welcome) {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}