:root {
  color-scheme: dark;
  --color-background: #070b09;
  --color-background-raised: #0a0f0d;
  --color-surface: #0e1512;
  --color-surface-raised: #131c18;
  --color-surface-soft: #17211d;
  --color-border: #26352e;
  --color-border-strong: #395046;
  --color-text: #f4f8f6;
  --color-text-secondary: #adbbb5;
  --color-text-tertiary: #7f9189;
  --color-accent: #63e6aa;
  --color-accent-bright: #9af2c7;
  --color-accent-ink: #06120d;
  --color-accent-soft: #0e3325;
  --color-blue: #8cbcff;
  --color-blue-soft: #10253e;
  --color-warning: #f3c66b;
  --color-warning-soft: #33260e;
  --color-danger: #ff8791;
  --color-danger-soft: #351319;
  --color-ring: #d9fff0;
  --shadow-panel: 0 18px 54px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 18px 60px rgba(0, 0, 0, 0.42);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --duration-fast: 140ms;
  --duration-base: 220ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-height: 76px;
  --z-header: 20;
  --z-toast: 100;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--color-background);
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--color-text);
  background:
    radial-gradient(circle at 16% 2%, rgba(47, 165, 112, 0.1), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(67, 112, 89, 0.08), transparent 24rem),
    var(--color-background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(115, 149, 133, 0.16) 0.7px, transparent 0.7px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to bottom, black, transparent 56%);
  pointer-events: none;
  content: "";
}

button,
input { font: inherit; }

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: calc(var(--z-toast) + 1);
  padding: 10px 14px;
  color: #07100c;
  background: #f5fff9;
  border-radius: var(--radius-sm);
  font-weight: 750;
}

.skip-link:focus { top: 16px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(7, 11, 9, 0.96);
  border-bottom: 1px solid rgba(57, 80, 70, 0.58);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1480px, 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 36px);
}

.brand,
.heading-group,
.topbar-status,
.status-cluster,
.wallet-state,
.metric-top,
.control-note,
.cycle-meta {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; }

.brand-link {
  color: inherit;
  text-decoration: none;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  background: rgba(14, 21, 18, 0.82);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.primary-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  color: var(--color-text-secondary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.primary-nav-link:hover { color: var(--color-text); background: var(--color-surface-soft); }

.primary-nav-link.is-active {
  color: var(--color-accent-bright);
  background: var(--color-accent-soft);
  box-shadow: inset 0 0 0 1px #28684c;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--color-accent);
  background: linear-gradient(145deg, #173629, #0d2118);
  border: 1px solid #2d694e;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 28px rgba(58, 225, 149, 0.08);
  overflow: hidden;
}

.brand-mark picture,
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark img {
  object-fit: cover;
  object-position: 50% 12%;
  transform: scale(1.55);
  transform-origin: 50% 14%;
}

.brand-copy { display: grid; }

.brand-copy strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  color: var(--color-text-tertiary);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.topbar-status {
  justify-content: flex-end;
  gap: 16px;
}

.last-updated {
  color: var(--color-text-tertiary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.status-cluster {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.badge,
.count,
.lock-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.075em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-paper {
  color: var(--color-accent-bright);
  background: var(--color-accent-soft);
  border-color: #28684c;
}

.badge-paper::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(99, 230, 170, 0.1);
  content: "";
}

.badge-approval {
  color: #bad8ff;
  background: var(--color-blue-soft);
  border-color: #2f537b;
}

.badge-muted {
  color: var(--color-text-secondary);
  background: #111815;
}

.badge-danger {
  color: #ffb3b9;
  background: var(--color-danger-soft);
  border-color: #71303a;
}

.badge-warning {
  color: #f8d995;
  background: var(--color-warning-soft);
  border-color: #715820;
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  min-height: 320px;
  margin-bottom: 20px;
  padding: clamp(32px, 5vw, 68px);
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(15, 37, 28, 0.96), rgba(10, 16, 13, 0.98) 55%, rgba(8, 13, 11, 0.98)),
    var(--color-surface);
  border: 1px solid #2d463a;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.hero::after {
  position: absolute;
  top: -50%;
  right: -8%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(99, 230, 170, 0.08), transparent 68%);
  border: 1px solid rgba(99, 230, 170, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-copy,
.scanner-console { position: relative; z-index: 1; }

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--color-accent-bright);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-kicker span {
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(99, 230, 170, 0.1), 0 0 20px rgba(99, 230, 170, 0.35);
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero h1 span { color: var(--color-accent); }

.hero-description {
  max-width: 610px;
  margin: 22px 0 0;
  color: var(--color-text-secondary);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
}

.hero-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-capabilities span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--color-text-secondary);
  background: rgba(6, 13, 10, 0.48);
  border: 1px solid rgba(61, 91, 77, 0.72);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.hero-capabilities span::before {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(99, 230, 170, 0.35);
  content: "";
}

.scanner-console {
  min-width: 0;
  min-height: 444px;
  overflow: hidden;
  background: rgba(5, 11, 8, 0.8);
  border: 1px solid #315043;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 50px rgba(0, 0, 0, 0.22);
}

.scanner-topline {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(to bottom, rgba(5, 11, 8, 0.98), rgba(5, 11, 8, 0.76));
  border-bottom: 1px solid #25372f;
}

.scanner-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--color-text-secondary);
  background: #111916;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scanner-state::before {
  width: 6px;
  height: 6px;
  background: #7b8d84;
  border-radius: 50%;
  content: "";
}

.scanner-state-live {
  color: var(--color-accent-bright);
  background: var(--color-accent-soft);
  border-color: #28684c;
}

.scanner-state-live::before {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99, 230, 170, 0.11), 0 0 12px rgba(99, 230, 170, 0.3);
}

.scanner-body {
  position: relative;
  min-height: 316px;
}

.mascot-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.mascot-stage::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 42%;
  background: linear-gradient(to top, rgba(5, 11, 8, 0.96), transparent);
  content: "";
  pointer-events: none;
}

.radar {
  position: absolute;
  top: 48%;
  left: 56%;
  width: min(286px, 72%);
  aspect-ratio: 1;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(99, 230, 170, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(13, 40, 28, 0.62), rgba(5, 12, 9, 0.28) 68%);
  border: 1px solid #345646;
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(37, 148, 96, 0.08), 0 0 28px rgba(50, 187, 122, 0.05);
  transform: translate(-50%, -50%);
}

.radar::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(99, 230, 170, 0.06);
  border-radius: 50%;
  content: "";
}

.radar-ring,
.radar-crosshair,
.radar-sweep,
.radar-core,
.radar-signal { position: absolute; }

.radar-ring {
  top: 50%;
  left: 50%;
  border: 1px solid rgba(99, 230, 170, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.radar-ring-one { width: 66%; height: 66%; }
.radar-ring-two { width: 35%; height: 35%; }

.radar-crosshair { inset: 0; }

.radar-crosshair::before,
.radar-crosshair::after {
  position: absolute;
  background: rgba(99, 230, 170, 0.12);
  content: "";
}

.radar-crosshair::before { top: 50%; right: 0; left: 0; height: 1px; }
.radar-crosshair::after { top: 0; bottom: 0; left: 50%; width: 1px; }

.radar-sweep {
  inset: 0;
  background: conic-gradient(from -40deg, rgba(99, 230, 170, 0.2), rgba(99, 230, 170, 0.02) 18%, transparent 18%);
  border-radius: 50%;
  opacity: 0.35;
}

.radar.is-active .radar-sweep {
  opacity: 1;
  animation: radar-sweep 3.8s linear infinite;
}

.radar-core {
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--color-accent-bright);
  background: #0c2b1e;
  border: 1px solid #35785a;
  border-radius: 9px;
  box-shadow: 0 0 0 5px rgba(99, 230, 170, 0.06), 0 0 22px rgba(99, 230, 170, 0.18);
  font-size: 13px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.radar-signal {
  z-index: 2;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border: 1px solid #d0ffe8;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(99, 230, 170, 0.08), 0 0 13px rgba(99, 230, 170, 0.42);
}

.signal-one { top: 25%; left: 64%; }
.signal-two { top: 63%; left: 22%; }
.signal-three { top: 70%; left: 72%; opacity: 0.6; }

.hero-motion {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #030806;
  pointer-events: none;
  user-select: none;
}

.mascot-stage .radar { z-index: 1; opacity: 0.34; mix-blend-mode: screen; }

.scanner-readouts {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 4;
  display: grid;
  gap: 7px;
  width: min(154px, 36%);
}

.readout {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid #26372f;
  border-radius: 9px;
}

.readout span,
.guard-copy span {
  color: var(--color-text-tertiary);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.readout strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.guard-rail {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 18px 18px;
  padding: 11px;
  background: rgba(38, 8, 13, 0.36);
  border: 1px solid #593039;
  border-radius: 11px;
}

.motion-feature {
  min-height: 0;
  margin-bottom: 20px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 42%, rgba(36, 214, 139, 0.12), transparent 28rem),
    linear-gradient(145deg, rgba(14, 26, 21, 0.98), rgba(8, 14, 11, 0.98));
  border: 1px solid #2b493b;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.motion-copy {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding: clamp(26px, 3.4vw, 46px);
}

.motion-copy h2 {
  max-width: 520px;
  margin: 6px 0 12px;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.motion-summary > p {
  max-width: 620px;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.motion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.motion-tags span {
  padding: 6px 9px;
  color: var(--color-accent-bright);
  background: rgba(14, 51, 37, 0.74);
  border: 1px solid #2a654b;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.motion-reel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  background: rgba(2, 8, 5, 0.58);
  border-top: 1px solid rgba(58, 91, 77, 0.72);
}

.motion-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: #030806;
  border: 1px solid rgba(68, 112, 91, 0.58);
  border-radius: 15px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.motion-card::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4, 12, 8, 0.04) 45%, rgba(2, 8, 5, 0.78)),
    linear-gradient(90deg, rgba(31, 232, 148, 0.04), transparent 40%);
  pointer-events: none;
  content: "";
}

.motion-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #050a08;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
}

.motion-card video::-webkit-media-controls,
.motion-card video::-webkit-media-controls-enclosure,
.motion-card video::-webkit-media-controls-panel,
.motion-card video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.motion-card figcaption,
.motion-index {
  position: absolute;
  z-index: 3;
  margin: 0;
  color: #d7eee4;
  background: rgba(4, 12, 8, 0.72);
  border: 1px solid rgba(75, 125, 102, 0.58);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.motion-card figcaption {
  bottom: 14px;
  left: 14px;
  max-width: calc(100% - 72px);
  padding: 7px 10px;
}

.motion-index {
  top: 14px;
  right: 14px;
  padding: 6px 8px;
  color: var(--color-accent-bright);
  font-variant-numeric: tabular-nums;
}

.orbit-story {
  position: relative;
  width: 100vw;
  height: calc(220vh - var(--topbar-height));
  height: calc(220dvh - var(--topbar-height));
  min-height: 980px;
  margin-inline: calc(50% - 50vw);
  margin-bottom: 20px;
  background: #030806;
}

.orbit-stage {
  position: sticky;
  top: var(--topbar-height);
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
  background: #030806;
}

.orbit-visual {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #030806 url("./assets/mascot/khalil-orbit-poster.webp") center / cover no-repeat;
}

.orbit-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #030806;
}

.orbit-context {
  position: absolute;
  bottom: clamp(24px, 6vh, 72px);
  left: clamp(18px, 5vw, 76px);
  z-index: 3;
  max-width: min(520px, calc(100% - 36px));
  padding: clamp(20px, 3vw, 34px);
  background: linear-gradient(145deg, rgba(3, 10, 7, 0.9), rgba(5, 20, 13, 0.72));
  border: 1px solid rgba(83, 151, 118, 0.58);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
}

.orbit-context h2 {
  max-width: 440px;
  margin: 6px 0 10px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.orbit-context > p:last-of-type {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.orbit-context > span {
  display: inline-flex;
  margin-top: 16px;
  padding: 6px 9px;
  color: var(--color-accent-bright);
  background: rgba(12, 47, 33, 0.78);
  border: 1px solid #2b674d;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.guard-icon,
.section-icon {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid #285440;
}

.guard-icon {
  width: 34px;
  height: 34px;
  color: #ffb3b9;
  background: var(--color-danger-soft);
  border-color: #71303a;
  border-radius: 9px;
}

.guard-icon svg,
.section-icon svg,
.control-note svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.guard-copy { display: grid; min-width: 0; }

.guard-copy strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
}

.lock-state {
  width: fit-content;
  min-height: 26px;
  padding-inline: 8px;
  color: #ffb3b9;
  background: var(--color-danger-soft);
  border-color: #71303a;
  font-size: 9px;
}

.eyebrow {
  margin: 0;
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin: 2px 0 0;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.control-grid,
.two-column {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.control-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.two-column { grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); }

.panel,
.metric-card {
  background: linear-gradient(145deg, rgba(19, 28, 24, 0.96), rgba(12, 18, 15, 0.98));
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-panel);
}

.panel {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-md);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.heading-group { gap: 12px; min-width: 0; }

.section-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.wallet-state {
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  background: #718078;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(113, 128, 120, 0.1);
}

.status-dot.connected {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(99, 230, 170, 0.1);
}

.wallet-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 12px;
  padding: 16px;
  background: rgba(5, 10, 8, 0.58);
  border: 1px solid #202e28;
  border-radius: 12px;
}

.wallet-guardian {
  position: relative;
  min-height: clamp(260px, 24vw, 330px);
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
  background: #030806;
  border: 1px solid #294337;
  border-radius: 12px;
  isolation: isolate;
}

.wallet-guardian::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(3, 10, 7, 0.96), rgba(3, 10, 7, 0.66) 52%, rgba(3, 10, 7, 0.08));
  content: "";
  pointer-events: none;
}

.guardian-copy {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  display: grid;
  align-content: center;
  width: min(72%, 410px);
  min-width: 0;
  padding: 22px;
}

.guardian-copy > strong {
  margin-top: 2px;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.guardian-copy > p:last-child {
  max-width: 400px;
  margin: 5px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.guardian-motion {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  pointer-events: none;
  user-select: none;
}

.data-label {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text-tertiary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.address {
  min-height: 22px;
  margin: 0;
  color: var(--color-text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.balance-block { min-width: 112px; text-align: right; }

.balance-block strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.inline-message {
  min-height: 21px;
  margin: 0 0 4px;
  color: var(--color-danger);
  font-size: 13px;
}

.inline-message:empty { display: none; }

.wallet-note,
.hint {
  margin: 0 0 12px;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  color: var(--color-text);
  background: #18231e;
  border: 1px solid #35483f;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 750;
  transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, color var(--duration-fast) ease;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.button:hover:not(:disabled) {
  background: #213029;
  border-color: #507060;
}

.button:active:not(:disabled) {
  background: #101713;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.42);
}

.button[aria-busy="true"]::after {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  content: "";
}

.button-primary {
  width: 100%;
  color: var(--color-accent-ink);
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 10px 26px rgba(35, 184, 116, 0.14);
}

.button-primary:hover:not(:disabled) {
  color: #031009;
  background: var(--color-accent-bright);
  border-color: var(--color-accent-bright);
}

.button-danger {
  grid-column: 1 / -1;
  color: #ffb7bd;
  background: var(--color-danger-soft);
  border-color: #71303a;
}

.button-danger:hover:not(:disabled) {
  color: #fff;
  background: #4b1820;
  border-color: #a74a56;
}

.control-note {
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  color: var(--color-text-secondary);
  background: rgba(6, 11, 9, 0.44);
  border-radius: 10px;
}

.control-note svg { width: 17px; height: 17px; flex: none; color: var(--color-text-tertiary); }
.control-note p { margin: 0; font-size: 12px; }

.next-run,
.section-note {
  color: var(--color-text-tertiary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--color-accent-bright);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.section-link:hover { background: var(--color-accent-soft); }

.metrics-section { margin-bottom: 20px; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border-radius: 14px;
}

.metric-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--metric-accent, var(--color-border-strong)), transparent);
  content: "";
}

.metric-cash { --metric-accent: #63e6aa; }
.metric-equity { --metric-accent: #8cbcff; }
.metric-realized { --metric-accent: #f3c66b; }
.metric-unrealized { --metric-accent: #bd9cff; }

.metric-top { justify-content: space-between; gap: 12px; }

.metric-top > span:first-child,
.metric-card small { color: var(--color-text-secondary); }

.metric-top > span:first-child { font-size: 12px; font-weight: 650; }

.metric-glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--metric-accent);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--color-border);
  border-radius: 9px;
}

.metric-glyph svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.metric-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.5vw, 30px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.metric-card small { font-size: 11px; }
.positive { color: var(--color-accent) !important; }
.negative { color: var(--color-danger) !important; }

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #223029;
  border-radius: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 12px 13px;
  text-align: left;
  border-top: 1px solid #223029;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

thead th { border-top: 0; }

th {
  color: var(--color-text-tertiary);
  background: rgba(6, 11, 9, 0.46);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.empty {
  padding: 28px 10px;
  color: var(--color-text-tertiary);
  text-align: center;
}

.mono {
  color: var(--color-text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.proposal-empty,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 142px;
  padding: 20px;
  color: var(--color-text-tertiary);
  background: rgba(6, 11, 9, 0.34);
  border: 1px dashed #2b3c34;
  border-radius: 11px;
  text-align: center;
}

.proposal-grid,
.candidate-metrics,
.quote-grid {
  display: grid;
  gap: 8px;
}

.proposal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.data-cell {
  min-width: 0;
  padding: 10px 11px;
  background: rgba(5, 10, 8, 0.58);
  border: 1px solid #223029;
  border-radius: 9px;
}

.data-cell span {
  display: block;
  color: var(--color-text-tertiary);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-cell strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.candidates-panel { margin-bottom: 40px; }
.candidates-heading { align-items: center; }
.cycle-meta { gap: 10px; color: var(--color-text-secondary); font-size: 12px; }
.count { min-width: 30px; color: var(--color-text); background: var(--color-surface-soft); }
.candidate-list { display: grid; gap: 10px; }

.discovery-banner {
  position: relative;
  min-height: clamp(360px, 36vw, 520px);
  margin-bottom: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 48%, rgba(30, 219, 146, 0.15), transparent 22rem),
    #07120e;
  border: 1px solid #2c493c;
  border-radius: 13px;
  isolation: isolate;
}

.discovery-banner::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(5, 12, 9, 0.99) 0%, rgba(5, 12, 9, 0.92) 38%, rgba(5, 12, 9, 0.26) 66%, rgba(5, 12, 9, 0.04));
  content: "";
  pointer-events: none;
}

.discovery-copy {
  position: relative;
  z-index: 2;
  max-width: 48%;
  padding: 38px 32px;
}

.discovery-copy h3 {
  max-width: 390px;
  margin: 5px 0 8px;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.discovery-copy > p:last-child {
  max-width: 440px;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.discovery-motion {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  pointer-events: none;
  user-select: none;
}

.hero-motion::-webkit-media-controls,
.guardian-motion::-webkit-media-controls,
.discovery-motion::-webkit-media-controls {
  display: none !important;
  -webkit-appearance: none;
}

.empty-state {
  align-content: center;
  gap: 12px;
  min-height: 190px;
}

.empty-state p { margin: 0; }

.empty-orbit {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid #3e584c;
  border-radius: 50%;
  animation: empty-orbit 3.2s linear infinite;
}

.empty-orbit::before,
.empty-orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.empty-orbit::before {
  inset: 7px;
  border: 1px solid #2d4037;
}

.empty-orbit::after {
  top: 2px;
  left: 15px;
  width: 5px;
  height: 5px;
  background: var(--color-accent);
  box-shadow: 0 0 10px rgba(99, 230, 170, 0.4);
}

.candidate {
  padding: 15px;
  background: rgba(6, 11, 9, 0.48);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.candidate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.candidate-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.candidate-title h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.candidate-title code { color: var(--color-text-tertiary); font-size: 10px; }
.candidate-metrics { grid-template-columns: repeat(6, minmax(100px, 1fr)); }
.quote-grid { grid-template-columns: 1fr 1fr; margin-top: 9px; }

.candidate-score {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(220px, 0.64fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 9px;
  padding: 11px 12px;
  background: rgba(37, 22, 7, 0.34);
  border: 1px solid #4e3e1f;
  border-radius: 10px;
}

.candidate-score.score-pass {
  background: rgba(10, 45, 31, 0.38);
  border-color: #285b43;
}

.score-summary {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.score-summary > span {
  color: var(--color-text-tertiary);
  font-size: 10px;
  font-weight: 700;
}

.score-summary > span:first-child {
  color: var(--color-text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.score-summary strong {
  color: var(--color-warning);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.score-pass .score-summary strong { color: var(--color-accent); }
.score-summary small { color: var(--color-text-tertiary); font-size: 10px; }

.candidate-score progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  background: #202720;
  border: 0;
  border-radius: 999px;
}

.candidate-score progress::-webkit-progress-bar {
  background: #202720;
  border-radius: 999px;
}

.candidate-score progress::-webkit-progress-value {
  background: linear-gradient(90deg, #7d5e22, var(--color-warning));
  border-radius: 999px;
}

.candidate-score.score-pass progress::-webkit-progress-value {
  background: linear-gradient(90deg, #23875c, var(--color-accent));
}

.candidate-score progress::-moz-progress-bar {
  background: linear-gradient(90deg, #7d5e22, var(--color-warning));
  border-radius: 999px;
}

.candidate-score.score-pass progress::-moz-progress-bar {
  background: linear-gradient(90deg, #23875c, var(--color-accent));
}

.quote {
  min-width: 0;
  padding: 11px;
  background: var(--color-surface-raised);
  border: 1px solid #293a32;
  border-radius: 9px;
}

.quote-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.quote-head strong { font-size: 12px; }

.quote p {
  margin: 3px 0;
  color: var(--color-text-secondary);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.reasons {
  margin: 10px 0 0;
  padding: 10px 10px 10px 28px;
  color: var(--color-text-secondary);
  background: rgba(7, 11, 9, 0.36);
  border-radius: 9px;
  font-size: 12px;
}

.reasons li + li { margin-top: 3px; }

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px 6px;
  color: var(--color-text-tertiary);
  border-top: 1px solid rgba(38, 53, 46, 0.72);
  font-size: 11px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid #285440;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.footer-brand > div { display: grid; }
.footer-brand strong { color: var(--color-text-secondary); font-size: 11px; }
.footer-brand small { font-size: 10px; }

.footer-boundary {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.footer-boundary > span {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(99, 230, 170, 0.08);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-toast);
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  color: var(--color-text);
  background: #18231e;
  border: 1px solid #507060;
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.toast.visible { opacity: 1; transform: translateY(0); }

/* Portfolio pages */
.portfolio-shell { padding-top: clamp(24px, 3vw, 40px); }

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
}

.portfolio-heading-copy { max-width: 720px; }

.portfolio-heading-copy h1 {
  margin: 4px 0 10px;
  font-size: clamp(38px, 4.5vw, 54px);
  font-weight: 680;
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.portfolio-heading-copy > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.portfolio-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 6px;
  flex: none;
  padding: 6px;
  background: rgba(10, 15, 13, 0.9);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.portfolio-tab {
  display: grid;
  align-content: center;
  min-height: 62px;
  padding: 10px 13px;
  color: var(--color-text-secondary);
  border-radius: 10px;
  text-decoration: none;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.portfolio-tab:hover { color: var(--color-text); background: var(--color-surface); }

.portfolio-tab.is-active {
  color: var(--color-accent-bright);
  background: var(--color-accent-soft);
  box-shadow: inset 0 0 0 1px #2a654b;
}

.portfolio-tab span { font-size: 13px; font-weight: 800; }
.portfolio-tab small { color: var(--color-text-tertiary); font-size: 10px; }

.account-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: linear-gradient(105deg, rgba(15, 45, 33, 0.82), rgba(10, 16, 13, 0.96));
  border: 1px solid #2d5b46;
  border-radius: 14px;
}

.real-account-rail {
  background: linear-gradient(105deg, rgba(16, 37, 62, 0.76), rgba(10, 16, 13, 0.96));
  border-color: #315373;
}

.account-rail-main,
.account-rail-actions,
.read-only-lock {
  display: flex;
  align-items: center;
}

.account-rail-main { gap: 12px; min-width: 0; }
.account-rail-main > div { display: grid; min-width: 0; }
.account-rail-main strong { overflow-wrap: anywhere; font-size: 13px; }

.account-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--color-accent);
  background: rgba(14, 51, 37, 0.86);
  border: 1px solid #2a654b;
  border-radius: 11px;
}

.real-account-rail .account-icon { color: var(--color-blue); background: var(--color-blue-soft); border-color: #315373; }

.account-icon svg,
.read-only-lock svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.account-rail-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.account-rail-meta span,
.read-only-lock {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--color-text-secondary);
  background: rgba(5, 10, 8, 0.54);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.account-rail-actions { gap: 10px; flex: none; }
.read-only-lock { gap: 6px; color: #b7d5ff; border-color: #315373; }
.read-only-lock svg { width: 15px; height: 15px; }
.compact-button { width: auto; min-height: 42px; padding-inline: 16px; }

.portfolio-kpis {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(280px, 1fr);
  grid-template-rows: repeat(3, minmax(82px, auto));
  gap: 10px;
  margin-bottom: 14px;
}

.portfolio-kpi {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 126px;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(19, 28, 24, 0.96), rgba(12, 18, 15, 0.98));
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-panel);
}

.portfolio-kpi::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
  display: none;
  content: "";
}

.portfolio-kpi-primary { grid-row: 1 / span 3; align-content: end; min-height: 280px; background: linear-gradient(145deg, rgba(18, 52, 39, 0.96), rgba(10, 22, 17, 0.98)); border-color: #2d5b46; }
.portfolio-kpi-primary::after { background: linear-gradient(90deg, transparent, var(--color-accent), transparent); }
.portfolio-kpi > span { color: var(--color-text-secondary); font-size: 12px; font-weight: 700; }
.portfolio-kpi > strong { align-self: end; font-size: clamp(24px, 2.8vw, 32px); font-variant-numeric: tabular-nums; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.portfolio-kpi > small { color: var(--color-text-tertiary); font-size: 11px; line-height: 1.4; }
.portfolio-kpi-primary > strong { font-size: clamp(46px, 6vw, 74px); }
.portfolio-kpi:not(.portfolio-kpi-primary) { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 18px; align-content: center; min-height: 82px; padding: 14px 18px; }
.portfolio-kpi:not(.portfolio-kpi-primary) > span { grid-row: 1; grid-column: 1; }
.portfolio-kpi:not(.portfolio-kpi-primary) > small { grid-row: 2; grid-column: 1; }
.portfolio-kpi:not(.portfolio-kpi-primary) > strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 26px; text-align: right; }
.tracking-value { color: var(--color-warning); font-size: clamp(22px, 2.5vw, 30px) !important; }
.portfolio-kpi:not(.portfolio-kpi-primary) > strong.tracking-value { font-size: 16px !important; }
.neutral { color: var(--color-text) !important; }

.portfolio-explainer {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
  padding: 14px 16px;
  color: var(--color-text-secondary);
  background: rgba(14, 31, 23, 0.72);
  border: 1px solid #294a3a;
  border-radius: 12px;
}

.portfolio-explainer > span {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex: none;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(99, 230, 170, 0.09);
}

.portfolio-explainer p { margin: 0; font-size: 13px; line-height: 1.55; }
.portfolio-explainer-real { background: rgba(16, 32, 51, 0.72); border-color: #2d4b68; }
.portfolio-explainer-real > span { background: var(--color-blue); box-shadow: 0 0 0 5px rgba(140, 188, 255, 0.09); }

.portfolio-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.performance-panel { min-height: 430px; }
.allocation-panel { min-height: 0; }
.performance-heading { align-items: center; }

.range-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(5, 10, 8, 0.62);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.range-button {
  min-width: 50px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--color-text-tertiary);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.range-button:hover { color: var(--color-text); background: var(--color-surface-soft); }
.range-button.is-active { color: var(--color-accent-bright); background: var(--color-accent-soft); }
.real-chart ~ * .range-button.is-active { color: var(--color-blue); background: var(--color-blue-soft); }

.chart-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.chart-summary > div { display: grid; }
.chart-summary span { color: var(--color-text-tertiary); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.chart-summary strong { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; }
.chart-summary .trend-label { font-size: 12px; letter-spacing: 0; text-align: right; text-transform: none; }

.portfolio-chart-wrap {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(5, 13, 9, 0.48), rgba(5, 10, 8, 0.08));
  border-radius: 10px;
  cursor: crosshair;
  touch-action: pan-y;
}

.portfolio-chart { display: block; width: 100%; height: 260px; overflow: visible; }
.chart-grid path { fill: none; stroke: #223029; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-area { vector-effect: non-scaling-stroke; }
.chart-point { fill: var(--color-accent); stroke: #d9fff0; stroke-width: 2; vector-effect: non-scaling-stroke; }
.real-chart .chart-line { stroke: var(--color-blue); }
.real-chart .chart-point { fill: var(--color-blue); stroke: #e3efff; }
.chart-hover-line { stroke: rgba(217, 255, 240, 0.42); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart-hover-point { fill: var(--color-background); stroke: var(--color-accent-bright); stroke-width: 3; vector-effect: non-scaling-stroke; }
.real-chart .chart-hover-point { stroke: var(--color-blue); }

.chart-tooltip {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 2px;
  min-width: 154px;
  max-width: calc(100% - 16px);
  padding: 10px 12px;
  color: var(--color-text);
  background: rgba(8, 15, 12, 0.97);
  border: 1px solid #45675a;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  overflow-wrap: anywhere;
}

.chart-tooltip[hidden] { display: none; }
.chart-tooltip > span { color: var(--color-text-tertiary); font-size: 9px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.chart-tooltip > strong { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.chart-tooltip > small { color: var(--color-text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }

.chart-instructions {
  margin: 9px 0 0;
  color: var(--color-text-tertiary);
  font-size: 10px;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--color-text-tertiary);
  background: rgba(6, 11, 9, 0.44);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.chart-empty[hidden] { display: none; }

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--color-text-tertiary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
}

.allocation-panel { display: flex; flex-direction: column; }
.allocation-visual { display: grid; place-items: center; margin: 2px 0 22px; }

.allocation-donut {
  display: grid;
  place-items: center;
  width: 172px;
  height: 172px;
  background: conic-gradient(#26352e 0 100%);
  border-radius: 50%;
  box-shadow: 0 0 38px rgba(58, 225, 149, 0.06);
}

.allocation-donut::before {
  position: absolute;
  width: 112px;
  height: 112px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  content: "";
}

.allocation-donut > div { position: relative; z-index: 1; display: grid; text-align: center; }
.allocation-donut strong { font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.allocation-donut span { color: var(--color-text-tertiary); font-size: 9px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }

.allocation-legend { display: grid; gap: 6px; margin-top: auto; }
.empty-copy { margin: 0; padding: 18px 8px; color: var(--color-text-tertiary); font-size: 12px; text-align: center; }

.allocation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
}

.allocation-row:hover { background: rgba(255, 255, 255, 0.025); }
.allocation-swatch { width: 8px; height: 8px; background: var(--swatch); border-radius: 3px; }
.allocation-row > div { display: grid; min-width: 0; }
.allocation-row > div strong { font-size: 11px; }
.allocation-row > div span { overflow: hidden; color: var(--color-text-tertiary); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.allocation-row > span:not(.allocation-swatch) { color: var(--color-text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.allocation-row > strong:last-child { min-width: 62px; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }

.portfolio-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  background: rgba(13, 20, 17, 0.86);
  border: 1px solid var(--color-border);
  border-radius: 13px;
  box-shadow: var(--shadow-panel);
}

.portfolio-stat-strip > div { display: grid; gap: 2px; min-width: 0; padding: 15px 18px; }
.portfolio-stat-strip > div + div { border-left: 1px solid var(--color-border); }
.portfolio-stat-strip span { color: var(--color-text-secondary); font-size: 10px; font-weight: 750; }
.portfolio-stat-strip strong { overflow-wrap: anywhere; font-size: 16px; font-variant-numeric: tabular-nums; }
.portfolio-stat-strip small { color: var(--color-text-tertiary); font-size: 9px; line-height: 1.35; }

.holdings-panel { margin-bottom: 14px; padding: 0; overflow: hidden; }
.holdings-heading { align-items: center; margin: 0; padding: 20px; }
.holdings-meta { display: flex; align-items: center; gap: 10px; color: var(--color-text-tertiary); font-size: 10px; }

.portfolio-message {
  margin: 0 20px 14px;
  padding: 11px 13px;
  color: var(--color-text-secondary);
  background: rgba(16, 37, 62, 0.44);
  border: 1px solid #315373;
  border-radius: 9px;
  font-size: 12px;
}

.portfolio-message-error { color: #ffb3b9; background: var(--color-danger-soft); border-color: #71303a; }
.portfolio-message-warning { color: #f8d995; background: var(--color-warning-soft); border-color: #715820; }
.portfolio-message-notice { color: #bad8ff; }
.holdings-list { display: grid; gap: 10px; padding: 0 20px 20px; }
.holdings-list > .empty { margin: 0; padding: 32px 16px; color: var(--color-text-tertiary); text-align: center; }
.holding-card { min-width: 0; padding: 16px; background: rgba(10, 17, 14, 0.72); border: 1px solid var(--color-border); border-radius: 12px; }
.holding-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.holding-card-value { display: grid; flex: none; justify-items: end; }
.holding-card-value strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.holding-card-value span { color: var(--color-text-tertiary); font-size: 9px; font-variant-numeric: tabular-nums; }
.holding-quick-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.holding-metric { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; background: rgba(255, 255, 255, 0.022); border-radius: 9px; }
.holding-metric > span { color: var(--color-text-tertiary); font-size: 9px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.holding-metric > strong { overflow-wrap: anywhere; font-size: 13px; font-variant-numeric: tabular-nums; }
.holding-metric-tracking { color: var(--color-warning); }
.holding-more { margin-top: 10px; border-top: 1px solid var(--color-border); }
.holding-more > summary { display: flex; align-items: center; min-height: 44px; color: var(--color-text-secondary); cursor: pointer; font-size: 11px; font-weight: 750; list-style: none; }
.holding-more > summary::-webkit-details-marker { display: none; }
.holding-more > summary::after { margin-left: auto; color: var(--color-text-tertiary); font-size: 18px; content: "+"; }
.holding-more[open] > summary::after { content: "−"; }
.holding-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding-top: 2px; }

.asset-cell { display: flex; align-items: center; gap: 11px; min-width: 194px; text-align: left; }
.asset-monogram { display: grid; place-items: center; width: 36px; height: 36px; flex: none; color: var(--color-accent-bright); background: var(--color-accent-soft); border: 1px solid #285440; border-radius: 11px; font-size: 10px; font-weight: 850; letter-spacing: -0.02em; }
.asset-cell > div { display: grid; min-width: 0; }
.asset-cell strong { font-size: 13px; }
.asset-cell span:not(.asset-monogram) { color: var(--color-text-secondary); font-size: 10px; }
.asset-cell code { color: var(--color-text-tertiary); font-size: 8px; }
.verified-mark { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 5px; color: var(--color-accent-ink) !important; background: var(--color-blue); border-radius: 50%; font-size: 8px !important; vertical-align: 1px; }
.numeric-primary { font-size: 12px; font-variant-numeric: tabular-nums; }
.price-cell { display: grid; justify-items: end; gap: 3px; }
.price-cell > span { color: var(--color-text-tertiary); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tracking-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 7px;
  color: var(--color-warning);
  background: rgba(51, 38, 14, 0.62);
  border: 1px solid #5d491b;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
}

.balance-cell,
.value-cell,
.market-cell { display: grid; justify-items: end; }
.balance-cell strong,
.value-cell strong,
.market-cell strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.balance-cell span,
.value-cell span,
.market-cell span { color: var(--color-text-tertiary); font-size: 9px; }

.allocation-cell { display: grid; justify-items: end; gap: 5px; }
.allocation-cell strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.allocation-cell > span { display: block; width: 66px; height: 4px; overflow: hidden; background: #223029; border-radius: 999px; }
.allocation-cell i { display: block; height: 100%; background: var(--color-accent); border-radius: inherit; }
.muted-value { color: var(--color-text-tertiary); }
.table-note { margin: 0; padding: 13px 20px 17px; color: var(--color-text-tertiary); border-top: 1px solid var(--color-border); font-size: 10px; line-height: 1.55; }

.portfolio-more { margin-bottom: 36px; overflow: hidden; background: rgba(13, 20, 17, 0.72); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: var(--shadow-panel); }
.portfolio-more > summary { position: relative; display: grid; gap: 3px; min-height: 68px; padding: 14px 52px 14px 18px; cursor: pointer; list-style: none; }
.portfolio-more > summary::-webkit-details-marker { display: none; }
.portfolio-more > summary::after { position: absolute; top: 50%; right: 20px; color: var(--color-text-tertiary); font-size: 22px; transform: translateY(-50%); content: "+"; }
.portfolio-more[open] > summary::after { content: "−"; }
.portfolio-more > summary span { align-self: end; font-size: 14px; font-weight: 800; }
.portfolio-more > summary small { align-self: start; color: var(--color-text-tertiary); font-size: 10px; }
.portfolio-more-content { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.4fr); gap: 14px; padding: 0 14px 14px; }
.portfolio-more .allocation-panel { margin: 0; }
.portfolio-more .portfolio-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; margin: 0; }
.portfolio-more .portfolio-stat-strip > div:nth-child(3) { border-top: 1px solid var(--color-border); border-left: 0; }
.portfolio-more .portfolio-stat-strip > div:nth-child(4) { border-top: 1px solid var(--color-border); }

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

@keyframes radar-sweep { to { transform: rotate(360deg); } }

@keyframes empty-orbit { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr); gap: 32px; }
  .radar { width: min(240px, 70%); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .candidate-metrics { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
  .topbar-inner { flex-wrap: wrap; }
  .primary-nav { order: 3; width: 100%; }
  .portfolio-header { align-items: flex-start; flex-direction: column; }
  .portfolio-mode-tabs { width: 100%; }
  .portfolio-kpis { grid-template-columns: minmax(300px, 1.2fr) minmax(280px, 1fr); }
}

@media (max-width: 820px) {
  .topbar-inner { align-items: flex-start; }
  .topbar-status { align-items: flex-end; flex-direction: column; gap: 6px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .scanner-console { max-width: 680px; }
  .radar { width: min(300px, 72%); }
  .control-grid,
  .two-column { grid-template-columns: 1fr; }
  .candidate-metrics { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .portfolio-kpis { grid-template-columns: 1fr; grid-template-rows: auto; }
  .portfolio-kpi-primary { grid-row: auto; min-height: 190px; }
  .portfolio-visual-grid { grid-template-columns: 1fr; }
  .performance-panel,
  .allocation-panel { min-height: 0; }
  .portfolio-more-content { grid-template-columns: 1fr; }
  .portfolio-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-stat-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--color-border); }
  .portfolio-stat-strip > div:nth-child(4) { border-top: 1px solid var(--color-border); }
}

@media (max-width: 620px) {
  .topbar { position: sticky; }
  .topbar-inner { align-items: stretch; flex-direction: column; gap: 12px; padding-block: 14px; }
  .topbar-status { align-items: flex-start; }
  .status-cluster { justify-content: flex-start; }
  .last-updated { display: none; }
  .primary-nav { justify-content: flex-start; order: initial; width: 100%; overflow-x: auto; }
  .primary-nav-link { flex: 1 0 auto; min-height: 44px; }
  .shell { padding: 14px; }
  .hero { gap: 26px; margin-bottom: 14px; padding: 26px 20px; border-radius: 18px; }
  .hero h1 { font-size: clamp(38px, 13vw, 56px); }
  .hero-description { margin-top: 16px; font-size: 15px; }
  .hero-capabilities { margin-top: 18px; }
  .scanner-console { min-height: 442px; }
  .scanner-body { min-height: 318px; }
  .hero-motion { object-position: center top; }
  .scanner-readouts { width: min(148px, 42%); }
  .readout { padding: 8px; }
  .guard-rail { grid-template-columns: auto minmax(0, 1fr); }
  .guard-rail .lock-state { grid-column: 2; }
  .control-grid,
  .two-column,
  .metrics-section { margin-bottom: 14px; }
  .orbit-story { margin-bottom: 14px; }
  .orbit-context { bottom: 18px; left: 18px; }
  .panel { padding: 16px; }
  .wallet-summary { grid-template-columns: 1fr; gap: 12px; }
  .balance-block { text-align: left; }
  .discovery-banner { min-height: 330px; }
  .discovery-banner::after {
    background: linear-gradient(to bottom, rgba(5, 12, 9, 0.12), rgba(5, 12, 9, 0.97) 72%);
  }
  .discovery-copy { display: flex; flex-direction: column; justify-content: flex-end; max-width: none; min-height: 330px; padding: 24px; }
  .discovery-copy h3 { font-size: 28px; }
  .discovery-motion { object-position: center; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card strong { font-size: 28px; }
  .section-note { display: none; }
  .candidate-metrics,
  .proposal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .candidate-score { grid-template-columns: 1fr; gap: 9px; }
  .quote-grid { grid-template-columns: 1fr; }
  .candidates-heading,
  .candidate-head { align-items: flex-start; flex-direction: column; }
  .holdings-list { padding-inline: 12px; }
  .holding-card-head { align-items: flex-start; flex-direction: column; }
  .holding-card-value { justify-items: start; }
  .asset-cell { min-width: 0; }
  .holding-quick-stats { grid-template-columns: 1fr; }
  .holding-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .badge { white-space: normal; }
  .button-grid { grid-template-columns: 1fr; }
  .button-danger { grid-column: auto; }
  .candidate-metrics,
  .proposal-grid { grid-template-columns: 1fr; }
  .scanner-readouts { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr auto; align-items: center; }
  .wallet-guardian { min-height: 230px; }
  .guardian-copy { width: 82%; padding: 16px; }
  .guardian-motion { object-position: 58% center; }
  .guardian-copy > p:last-child { font-size: 10px; }
  .discovery-banner { min-height: 318px; }
  .discovery-banner::after {
    background: linear-gradient(to bottom, rgba(5, 12, 9, 0.55), rgba(5, 12, 9, 0.96) 74%);
  }
  .discovery-copy { min-height: 318px; padding: 20px; }
  .discovery-copy h3 { font-size: 26px; }
  .discovery-motion { object-position: center top; }
  .page-footer { align-items: flex-start; flex-direction: column; }
  .portfolio-shell { padding-top: 22px; }
  .portfolio-header { gap: 22px; margin-bottom: 18px; }
  .portfolio-heading-copy h1 { font-size: 42px; }
  .portfolio-heading-copy > p:last-child { font-size: 14px; }
  .portfolio-mode-tabs { grid-template-columns: 1fr 1fr; }
  .portfolio-tab { min-width: 0; min-height: 66px; }
  .account-rail { align-items: stretch; flex-direction: column; }
  .account-rail-actions { justify-content: space-between; }
  .account-rail-meta { justify-content: flex-start; }
  .portfolio-kpis { grid-template-columns: 1fr; }
  .portfolio-kpi { min-height: 112px; }
  .performance-heading { align-items: flex-start; flex-direction: column; }
  .range-picker { width: 100%; }
  .range-button { flex: 1; min-width: 0; min-height: 44px; }
  .chart-summary { align-items: flex-start; flex-direction: column; gap: 6px; }
  .chart-summary .trend-label { text-align: left; }
  .portfolio-chart,
  .portfolio-chart-wrap { height: 220px; min-height: 220px; }
  .portfolio-stat-strip { grid-template-columns: 1fr; }
  .portfolio-stat-strip > div + div { border-top: 1px solid var(--color-border); border-left: 0; }
  .holdings-heading { align-items: flex-start; flex-direction: column; }
  .holdings-meta { width: 100%; justify-content: space-between; }
}

@media (max-width: 390px) {
  .portfolio-mode-tabs { grid-template-columns: 1fr; }
  .account-rail-actions { align-items: stretch; flex-direction: column; }
  .compact-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-motion,
  .guardian-motion,
  .discovery-motion,
  .orbit-visual img { visibility: hidden; }
  .orbit-story {
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
    min-height: 0;
  }
  .orbit-stage { position: relative; top: auto; height: 100%; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
