:root {
  --bg: #061226;
  --bg-soft: rgba(11, 26, 53, 0.92);
  --surface: rgba(10, 21, 44, 0.84);
  --surface-strong: rgba(7, 17, 36, 0.96);
  --stroke: rgba(61, 128, 255, 0.22);
  --primary: #11d2ff;
  --primary-strong: #3a7cff;
  --primary-soft: rgba(17, 210, 255, 0.12);
  --text: #f4f8ff;
  --muted: #91a7cf;
  --success: #2de38c;
  --danger: #ff6b8b;
  --warning: #ffc95f;
  --shadow: 0 24px 80px rgba(2, 8, 24, 0.5);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(17, 210, 255, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(58, 124, 255, 0.2), transparent 26%),
    linear-gradient(180deg, #071124 0%, #030a16 100%);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -2;
}

.app-bg-grid {
  background-image:
    linear-gradient(rgba(21, 52, 100, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 52, 100, 0.2) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 75%);
}

.app-bg-glow {
  z-index: -1;
  background:
    radial-gradient(circle at 15% 12%, rgba(17, 210, 255, 0.2), transparent 18%),
    radial-gradient(circle at 84% 20%, rgba(58, 124, 255, 0.18), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(17, 210, 255, 0.16), transparent 22%);
}

.topbar,
.tabbar,
.layout {
  width: min(calc(100% - 32px), var(--content-width));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 16px;
}

.brand-cluster,
.topbar-actions,
.hero-actions,
.section-header,
.market-strip,
.hero-stats,
.choice-row,
.trade-side-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-mark,
.onboarding-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(17, 210, 255, 0.12);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 2vw, 2.4rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.1rem;
}

.muted,
.hero-text,
.summary-copy,
.legal-copy,
.legal-banner {
  color: var(--muted);
}

.primary-button,
.secondary-button,
.text-button,
.tab-button,
.pill-button,
.chip-button {
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.tab-button:hover,
.pill-button:hover,
.chip-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 12px 18px;
  border-radius: 999px;
  color: #04101f;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, #6ce8ff 100%);
  box-shadow: 0 16px 40px rgba(17, 210, 255, 0.18);
}

.secondary-button,
.pill-button,
.chip-button,
.tab-button,
.icon-button {
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid rgba(104, 159, 255, 0.2);
  background: rgba(12, 28, 54, 0.72);
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.large-button {
  width: 100%;
  justify-content: center;
}

.pulse-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(17, 210, 255, 0.16), rgba(58, 124, 255, 0.18));
  border: 1px solid rgba(17, 210, 255, 0.18);
  color: var(--text);
  font-size: 0.95rem;
}

.secondary-chip {
  color: var(--muted);
  background: rgba(10, 24, 45, 0.86);
}

.tabbar {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(8, 22, 44, 0.72);
  border: 1px solid rgba(102, 145, 228, 0.14);
  backdrop-filter: blur(14px);
}

.desktop-tabbar {
  position: sticky;
  top: 16px;
  z-index: 10;
}

.mobile-tabbar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(calc(100% - 24px), 560px);
  justify-content: space-between;
  display: none;
}

.tab-button {
  flex: 1;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab-button.active,
.pill-button.active,
.chip-button.active {
  background: linear-gradient(135deg, rgba(17, 210, 255, 0.18), rgba(58, 124, 255, 0.24));
  border-color: rgba(17, 210, 255, 0.26);
  color: var(--text);
}

.layout {
  display: grid;
  gap: 22px;
  padding: 22px 0 120px;
}

.card,
.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(11, 24, 49, 0.92), rgba(7, 17, 36, 0.94)),
    rgba(8, 22, 44, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.card {
  padding: 22px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  padding: 26px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  align-content: center;
}

.hero-text {
  max-width: 58ch;
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero-stats {
  gap: 16px;
}

.stat-pill {
  min-width: 146px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(8, 20, 42, 0.88);
  border: 1px solid rgba(93, 141, 225, 0.16);
}

.stat-pill strong,
.metric-card strong,
.asset-row strong,
.market-card strong,
.portfolio-figure strong {
  display: block;
  font-size: 1.12rem;
}

.stat-pill span,
.metric-card span,
.asset-row span,
.market-card span,
.portfolio-figure span,
.detail-bullet span,
.event-item span,
.trade-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-visual {
  position: relative;
  min-height: 420px;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 8% 0 auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 210, 255, 0.26), transparent 68%);
  filter: blur(10px);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(17, 210, 255, 0.16);
}

.view {
  display: grid;
  gap: 22px;
}

.js-enabled .view {
  display: none;
}

.js-enabled .view.active {
  display: grid;
}

.view-grid {
  display: grid;
  gap: 22px;
}

.two-columns {
  grid-template-columns: 1.2fr 0.8fr;
}

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

.wide-card {
  min-height: 260px;
}

.section-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.market-strip,
.market-grid,
.idea-grid,
.article-grid,
.lesson-grid,
.asset-table,
.stack-list,
.hero-stats {
  width: 100%;
}

.market-strip {
  margin-top: 18px;
}

.market-grid,
.idea-grid,
.article-grid,
.lesson-grid {
  display: grid;
  gap: 16px;
}

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

.idea-grid,
.article-grid,
.lesson-grid {
  grid-template-columns: repeat(3, 1fr);
}

.stack-list {
  display: grid;
  gap: 14px;
}

.market-card,
.asset-row,
.event-item,
.detail-bullet,
.idea-card,
.article-card,
.lesson-card,
.trade-row,
.holding-row,
.metric-card,
.portfolio-preview,
.empty-state {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(91, 138, 226, 0.14);
  background: rgba(8, 19, 39, 0.76);
}

.market-card {
  cursor: pointer;
}

.market-card.active {
  border-color: rgba(17, 210, 255, 0.34);
  background: linear-gradient(135deg, rgba(17, 210, 255, 0.12), rgba(58, 124, 255, 0.16));
}

.asset-row,
.event-item,
.trade-row,
.holding-row,
.metric-card {
  display: grid;
  gap: 8px;
}

.row-top,
.row-bottom,
.holding-actions,
.idea-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.positive {
  color: var(--success);
}

.negative {
  color: var(--danger);
}

.neutral {
  color: var(--warning);
}

.market-meta,
.asset-meta,
.idea-tags,
.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-tag {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(17, 210, 255, 0.08);
  border: 1px solid rgba(17, 210, 255, 0.12);
}

.summary-copy {
  font-size: 1.02rem;
  line-height: 1.7;
}

.detail-panel {
  display: grid;
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-bullet ul,
.idea-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.detail-bullet li,
.idea-card li,
.article-card li,
.lesson-card li {
  margin-bottom: 8px;
}

.search-panel {
  margin-bottom: 18px;
}

.text-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(94, 140, 228, 0.18);
  background: rgba(7, 18, 37, 0.86);
  color: var(--text);
  outline: none;
}

.text-input:focus {
  border-color: rgba(17, 210, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(17, 210, 255, 0.08);
}

.text-area {
  min-height: 120px;
  resize: vertical;
}

.field-label {
  display: block;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 201, 95, 0.14);
  background: rgba(255, 201, 95, 0.08);
}

.portfolio-preview {
  display: grid;
  gap: 12px;
}

.portfolio-figure {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.article-card,
.lesson-card,
.idea-card {
  display: grid;
  gap: 14px;
}

.article-card p,
.lesson-card p,
.idea-card p {
  color: var(--muted);
  line-height: 1.65;
}

.article-card h4,
.lesson-card h4,
.idea-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.sticky-card {
  position: sticky;
  top: 98px;
  align-self: start;
}

.toast,
.onboarding-backdrop,
.trade-backdrop {
  position: fixed;
}

.toast {
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 30;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(4, 14, 28, 0.94);
  border: 1px solid rgba(17, 210, 255, 0.18);
  box-shadow: var(--shadow);
}

.onboarding-backdrop,
.trade-backdrop {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 7, 15, 0.68);
  backdrop-filter: blur(12px);
  z-index: 40;
}

.onboarding-modal,
.trade-modal {
  width: min(100%, 760px);
  max-height: min(90vh, 900px);
  overflow: auto;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(90, 141, 226, 0.18);
  background: linear-gradient(180deg, rgba(11, 24, 49, 0.98), rgba(7, 17, 36, 0.98));
  box-shadow: var(--shadow);
}

.trade-modal {
  width: min(100%, 520px);
}

.onboarding-header,
.trade-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.onboarding-group {
  margin-top: 24px;
}

.trade-price-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 210, 255, 0.14);
  background: rgba(10, 23, 46, 0.84);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-panel,
  .two-columns,
  .three-columns,
  .idea-grid,
  .article-grid,
  .lesson-grid {
    grid-template-columns: 1fr;
  }

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

  .sticky-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar,
  .tabbar,
  .layout {
    width: min(calc(100% - 18px), var(--content-width));
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .desktop-tabbar {
    display: none;
  }

  .mobile-tabbar {
    display: flex;
  }

  .hero-panel,
  .card {
    padding: 18px;
  }

  .hero-visual {
    min-height: 300px;
  }

  .market-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
