:root {
  color-scheme: dark;
  --bg: #dff7ee;
  --app: #08110f;
  --sidebar: #06100b;
  --panel: #101917;
  --panel-soft: #121d1a;
  --panel-hot: #b8ffd9;
  --line: rgba(208, 237, 226, 0.12);
  --line-strong: rgba(166, 255, 208, 0.32);
  --text: #f4fbf7;
  --soft: #c7d9d1;
  --muted: #7d9289;
  --green: #9effc9;
  --teal: #45d6cf;
  --red: #ff737d;
  --yellow: #ffd36e;
  --blue: #6f8fe8;
  --shadow: 0 34px 80px rgba(10, 40, 30, 0.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  background: #08110f;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--app);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: 100%;
  min-width: 100%;
  max-width: none;
  height: auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--app);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.sidebar {
  background:
    linear-gradient(150deg, rgba(25, 99, 75, 0.42), transparent 42%),
    var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 34px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 34px;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(181, 255, 219, 0.88);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(158, 255, 201, 0.16), 0 0 22px rgba(158, 255, 201, 0.18);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

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

.brand h1 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: 0;
}

.nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.nav::after {
  content: "";
  height: 1px;
  margin: 24px 12px;
  background: var(--line);
}

.nav-item,
.ghost-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  text-align: left;
  padding: 0 14px;
  user-select: none;
  position: relative;
  z-index: 2;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(100, 221, 174, 0.28);
  color: var(--text);
  border-color: rgba(158, 255, 201, 0.16);
}

.nav-item.locked::after {
  content: "";
}

.sidebar-card {
  border-top: 1px solid var(--line);
  padding: 20px 10px 0;
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  margin-top: 5px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(158, 255, 201, 0.86);
}

.main {
  min-width: 0;
  min-height: 100vh;
  overflow: visible;
  padding: 34px 42px 42px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin: 0 0 8px;
  font-size: 1.72rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar p {
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 0;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.menu-button {
  display: none;
}

.pill,
.badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  font-weight: 800;
}

.badge.green {
  color: #07100d;
  border-color: transparent;
  background: var(--green);
}

.badge.red {
  color: #fff4f4;
  border-color: rgba(255, 115, 125, 0.4);
  background: rgba(255, 115, 125, 0.18);
}

.badge.yellow {
  color: #1a1300;
  border-color: transparent;
  background: var(--yellow);
}

.badge.blue {
  color: var(--text);
  border-color: rgba(69, 214, 207, 0.28);
  background: rgba(69, 214, 207, 0.12);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.ghost-button:hover,
.ghost-button.primary {
  border-color: var(--line-strong);
  background: rgba(158, 255, 201, 0.1);
}

.ghost-button.mini {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.notice {
  margin-bottom: 22px;
  border: 1px solid rgba(158, 255, 201, 0.1);
  border-radius: 8px;
  background: rgba(158, 255, 201, 0.04);
  color: var(--muted);
  padding: 12px 14px;
}

.content-grid {
  display: grid;
  gap: 18px;
  padding-bottom: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.92fr) minmax(500px, 1.08fr);
  gap: 22px;
}

.metric-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--panel);
}

.metric-tile {
  min-height: 138px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 10px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.metric-tile[data-jump],
.table-row[data-jump],
.chart-card[data-jump] {
  cursor: pointer;
}

.metric-tile[data-jump]:hover,
.table-row[data-jump]:hover,
.chart-card[data-jump]:hover {
  border-color: var(--line-strong);
  background-color: rgba(158, 255, 201, 0.055);
}

.metric-tile[data-jump]:hover {
  transform: translateY(-1px);
}

.metric-tile:nth-child(2n) {
  border-right: 0;
}

.metric-tile:nth-child(n + 3) {
  border-bottom: 0;
}

.metric-tile.featured {
  background:
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.28), transparent 30%),
    radial-gradient(circle at 86% 84%, rgba(255, 255, 255, 0.18), transparent 38%),
    var(--panel-hot);
  color: #07100d;
}

.metric-tile span,
.mini span,
.levels span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.metric-tile.featured span,
.metric-tile.featured em {
  color: rgba(7, 16, 13, 0.74);
}

.metric-tile strong {
  font-size: 1.42rem;
  line-height: 1.05;
}

.metric-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.8rem;
}

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

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

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

.chart-card {
  min-height: 274px;
}

.main-chart {
  width: 100%;
  height: 246px;
  display: block;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #0b1412;
  background-size: 100% 44px;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1.35fr) minmax(320px, 0.65fr);
  gap: 22px;
}

.clean-table {
  display: grid;
  gap: 0;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 92px 104px;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.position-table .table-head,
.position-table .table-row {
  grid-template-columns: minmax(0, 1fr) 90px 130px 140px;
}

.table-head {
  min-height: 34px;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-row strong {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.table-row small,
.table-row em small {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.table-row em {
  font-style: normal;
  font-weight: 800;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  margin-right: 6px;
}

.swatch.mint {
  background: var(--green);
}

.swatch.teal {
  background: var(--teal);
}

.swatch.blue {
  background: var(--blue);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

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

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

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

.metric {
  margin: 12px 0 4px;
  font-size: clamp(1.45rem, 2vw, 2.45rem);
  line-height: 1;
  font-weight: 900;
}

.small-metric {
  font-size: 1.05rem;
  line-height: 1.2;
  word-break: break-word;
}

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

.mini-card {
  border: 1px solid rgba(180, 255, 218, 0.1);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 8px;
  padding: 13px;
}

.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 7px;
}

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

.bridge-card {
  gap: 18px;
}

.bridge-card .compact-grid {
  margin-top: 12px;
}

.bridge-decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 14px;
  align-items: stretch;
  border-top: 1px solid rgba(180, 255, 218, 0.09);
  padding-top: 16px;
}

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

.agentic-grid,
.history-grid {
  gap: 18px;
}

.heartbeat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
}

.heartbeat-pulse {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(158, 255, 201, 0.08);
  box-shadow: 0 0 0 1px rgba(158, 255, 201, 0.16), 0 0 34px rgba(158, 255, 201, 0.14);
}

.heartbeat-pulse span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(158, 255, 201, 0.95);
  animation: pulseGlow 1.4s ease-in-out infinite;
}

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

.heartbeat-reason {
  grid-column: 2 / -1;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin: 0;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(0.88);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.agent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.agent-status-card,
.agent-risk-card {
  position: relative;
  overflow: hidden;
}

.agent-status-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(158, 255, 201, 0.16), transparent 62%);
  pointer-events: none;
}

.agent-status-card > *,
.agent-risk-card > * {
  position: relative;
  z-index: 1;
}

.agent-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.readiness-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.readiness-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--soft);
}

.scroll-panel {
  max-height: 440px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.scroll-panel::-webkit-scrollbar {
  width: 7px;
}

.scroll-panel::-webkit-scrollbar-thumb {
  background: rgba(158, 255, 201, 0.22);
  border-radius: 999px;
}

.agent-row,
.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(158, 255, 201, 0.055), transparent 45%),
    rgba(255, 255, 255, 0.028);
  padding: 13px;
}

.agent-row strong,
.history-row strong {
  display: block;
  margin-bottom: 5px;
}

.agent-row small,
.history-row small {
  color: var(--muted);
  font-weight: 700;
}

.agent-row-metrics,
.history-meta {
  min-width: 190px;
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.history-columns {
  align-items: start;
}

.history-list {
  max-height: 620px;
}

.news-history-row {
  background:
    linear-gradient(140deg, rgba(69, 214, 207, 0.05), transparent 48%),
    rgba(255, 255, 255, 0.026);
}

.mini {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.mini strong {
  display: block;
  margin-top: 4px;
}

.warning-stack,
.feed,
.compact-table {
  display: grid;
  gap: 10px;
}

.warning-card,
.feed-item,
.compact-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.warning-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.warning-card h3,
.feed-item h3 {
  margin: 0 0 5px;
  font-size: 0.95rem;
}

.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.page-intro h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.filter-row {
  display: flex;
  gap: 8px;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  padding: 0 12px;
}

.filter-chip.active {
  background: rgba(158, 255, 201, 0.16);
  border-color: var(--line-strong);
  color: var(--text);
}

.filter-chip span {
  color: var(--muted);
  margin-left: 5px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.signal-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 16px;
}

.signal-card details {
  display: grid;
  gap: 12px;
}

.signal-card summary,
.signal-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.signal-card summary::-webkit-details-marker {
  display: none;
}

.signal-card summary span,
.signal-title span {
  display: grid;
  gap: 3px;
}

.signal-card small,
.signal-title small {
  color: var(--muted);
}

.levels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.levels div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.levels strong {
  display: block;
  margin-top: 4px;
}

.empty,
.error {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 28px;
  color: var(--muted);
}

.empty.compact {
  padding: 14px;
}

.error {
  color: #ffd1d1;
  border-color: rgba(255, 115, 125, 0.34);
  background: rgba(255, 115, 125, 0.09);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
}

.auth-box {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0a1411;
  padding: 24px;
  box-shadow: var(--shadow);
}

.search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0 12px;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

details summary {
  color: var(--text);
}

pre {
  max-height: 520px;
  overflow: auto;
  color: var(--soft);
  white-space: pre-wrap;
}

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

@media (max-width: 1180px) {
  body {
    display: block;
    padding: 0;
  }

  html {
    min-width: 0;
  }

  .shell {
    width: 100vw;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .menu-button {
    display: inline-flex;
  }

  .main {
    padding: 24px;
  }

  .hero-grid,
  .lower-grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .bridge-decision,
  .bridge-journal {
    grid-template-columns: 1fr;
  }
}

/* Opus/Fable-inspired presentation layer: visual polish only. */
:root {
  --bg: #08110f;
  --app: #060b0a;
  --sidebar: rgba(5, 14, 12, 0.9);
  --panel: rgba(15, 26, 24, 0.78);
  --panel-soft: rgba(19, 32, 29, 0.72);
  --panel-hot: #b9ffd6;
  --glass: rgba(255, 255, 255, 0.045);
  --line: rgba(219, 255, 239, 0.11);
  --line-strong: rgba(177, 255, 221, 0.42);
  --text: #f8fffb;
  --soft: #d8ebe3;
  --muted: #8aa097;
  --green: #9dffca;
  --teal: #38dfd5;
  --red: #ff6b78;
  --yellow: #ffd86b;
  --blue: #88a2ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34), 0 0 80px rgba(67, 214, 170, 0.08);
}

body {
  background:
    radial-gradient(circle at 8% -8%, rgba(104, 255, 189, 0.18), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(56, 223, 213, 0.11), transparent 34%),
    linear-gradient(140deg, #06100d 0%, #080c0b 48%, #081511 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
  opacity: 0.5;
}

.shell {
  background: transparent;
}

.sidebar {
  background:
    linear-gradient(160deg, rgba(80, 255, 184, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 48%),
    var(--sidebar);
  backdrop-filter: blur(26px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.brand-mark {
  border: 1px solid rgba(181, 255, 219, 0.88);
  border-radius: 9px;
  background:
    conic-gradient(from 120deg, rgba(157, 255, 202, 0.18), rgba(56, 223, 213, 0.9), rgba(248, 255, 251, 0.86), rgba(157, 255, 202, 0.18));
  box-shadow: 0 0 28px rgba(56, 223, 213, 0.2);
  animation: brandGlow 5s ease-in-out infinite;
}

.nav-item,
.ghost-button,
.filter-chip {
  border-radius: 10px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  background:
    linear-gradient(90deg, rgba(157, 255, 202, 0.22), rgba(56, 223, 213, 0.08));
  color: var(--text);
  border-color: rgba(158, 255, 201, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.12);
  transform: translateX(2px);
}

.main {
  animation: pageIn 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar h2 {
  font-size: 1.9rem;
}

.ghost-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ghost-button:hover,
.ghost-button.primary {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(157, 255, 202, 0.16), rgba(56, 223, 213, 0.07));
  transform: translateY(-1px);
}

.notice {
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(157, 255, 202, 0.09), rgba(56, 223, 213, 0.035));
  backdrop-filter: blur(18px);
}

.metric-board,
.card,
.signal-card,
.empty,
.error {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.metric-board,
.card,
.signal-card {
  position: relative;
}

.card,
.signal-card {
  animation: cardRise 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card::before,
.metric-board::before,
.signal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), transparent 28%, transparent 76%, rgba(157, 255, 202, 0.08));
  opacity: 0.55;
}

.metric-tile {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.metric-tile[data-jump]:hover,
.table-row[data-jump]:hover,
.chart-card[data-jump]:hover {
  background-color: rgba(158, 255, 201, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.metric-tile[data-jump]:hover {
  transform: translateY(-3px);
}

.metric-tile.featured {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.34), transparent 26%),
    radial-gradient(circle at 92% 92%, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(135deg, #b9ffd6, #7cffce 52%, #5de7df);
}

.main-chart {
  border-radius: 14px;
  border: 1px solid rgba(219, 255, 239, 0.07);
  background:
    radial-gradient(circle at 72% 22%, rgba(56, 223, 213, 0.08), transparent 32%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #07100e;
}

.mini-card,
.warning-card,
.feed-item,
.compact-row,
.levels div {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.022));
}

.table-row,
.warning-card,
.feed-item,
.compact-row,
.signal-card {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.table-row:hover {
  background: rgba(255, 255, 255, 0.026);
}

.warning-card:hover,
.feed-item:hover,
.compact-row:hover,
.signal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(177, 255, 221, 0.28);
  background: rgba(255, 255, 255, 0.047);
}

.filter-chip.active {
  background:
    linear-gradient(90deg, rgba(157, 255, 202, 0.22), rgba(56, 223, 213, 0.09));
}

.auth-modal {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
}

.auth-box {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    #08120f;
}

.search-input {
  border-radius: 12px;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes brandGlow {
  0%,
  100% {
    filter: saturate(1);
    transform: rotate(0deg);
  }
  50% {
    filter: saturate(1.25) brightness(1.08);
    transform: rotate(3deg);
  }
}

/* Stronger public-site refresh layer. Keep selectors/data behavior unchanged. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, rgba(157, 255, 202, 0.035) 42%, transparent 56%),
    radial-gradient(circle at 50% 0%, rgba(157, 255, 202, 0.09), transparent 30%);
  animation: ambientSweep 10s linear infinite;
  opacity: 0.8;
}

.shell {
  isolation: isolate;
}

.sidebar {
  border-right-color: rgba(157, 255, 202, 0.18);
}

.brand h1 {
  font-size: 1.14rem;
}

.topbar {
  padding: 20px;
  border: 1px solid rgba(219, 255, 239, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 78% 0%, rgba(56, 223, 213, 0.14), transparent 38%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar h2 {
  font-size: 2.08rem;
  background: linear-gradient(90deg, #ffffff, #c7ffe0 55%, #76f3e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pill {
  border-color: rgba(157, 255, 202, 0.28);
  color: #102018;
  background: linear-gradient(135deg, #d8ffe9, #7ff4df);
}

.refresh-pill {
  color: var(--soft);
  border-color: rgba(219, 255, 239, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.card,
.metric-board,
.signal-card,
.empty,
.error {
  border-color: rgba(219, 255, 239, 0.15);
}

.card::after,
.signal-card::after,
.metric-board::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.12), transparent 42%);
  transform: translateX(-120%);
  animation: cardSheen 8s ease-in-out infinite;
  opacity: 0.28;
}

.metric {
  background: linear-gradient(90deg, #fff, #abffd2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-tile.featured .metric,
.metric-tile.featured strong {
  color: #07100d;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(157, 255, 202, 0.9);
  transform: translateY(-50%);
}

.nav-item.active {
  padding-left: 22px;
}

@keyframes ambientSweep {
  from {
    transform: translateX(-8%);
  }
  to {
    transform: translateX(8%);
  }
}

@keyframes cardSheen {
  0%,
  72% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

/* Phase UI refresh: full-screen fintech command center. */
:root {
  --ink: #07100d;
  --surface: rgba(13, 24, 21, 0.92);
  --surface-2: rgba(17, 31, 27, 0.9);
  --surface-3: rgba(20, 37, 33, 0.82);
  --glass-line: rgba(210, 255, 235, 0.13);
  --glow-soft: 0 18px 55px rgba(0, 0, 0, 0.34);
}

body {
  background:
    linear-gradient(130deg, rgba(7, 16, 13, 1) 0%, rgba(10, 22, 20, 1) 55%, rgba(7, 16, 13, 1) 100%) !important;
}

body::after {
  background:
    linear-gradient(120deg, transparent 0%, rgba(157, 255, 202, 0.035) 48%, transparent 72%),
    linear-gradient(180deg, rgba(95, 131, 214, 0.06), transparent 42%);
  opacity: 0.55;
}

.eyebrow,
.table-head {
  letter-spacing: 0;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(8, 26, 18, 0.96), rgba(4, 11, 8, 0.98)),
    var(--sidebar);
  box-shadow: inset -1px 0 0 rgba(157, 255, 202, 0.07);
}

.brand-mark {
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(158, 255, 201, 0.18), rgba(69, 214, 207, 0.06)),
    #0d1915;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-item.active {
  background:
    linear-gradient(90deg, rgba(158, 255, 201, 0.24), rgba(69, 214, 207, 0.08));
}

.main {
  padding: 28px 34px 40px;
}

.topbar {
  min-height: 112px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar h2 {
  font-size: 2rem;
}

.notice {
  border-radius: 14px;
  border-color: rgba(255, 211, 110, 0.16);
  background:
    linear-gradient(90deg, rgba(255, 211, 110, 0.08), rgba(69, 214, 207, 0.035));
}

.content-grid {
  animation: pageIn 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.loading-grid {
  min-height: 420px;
  place-items: center;
}

.loading-screen {
  width: min(620px, 100%);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--glow-soft);
  padding: 28px;
  display: grid;
  gap: 12px;
}

.loader-line {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.loader-line::after {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--teal));
  animation: loadingSlide 1.2s ease-in-out infinite;
}

.loading-screen strong {
  font-size: 1.35rem;
}

.loading-skeleton {
  display: grid;
  grid-template-columns: 1fr 0.72fr 0.44fr;
  gap: 10px;
  margin-top: 4px;
}

.loading-skeleton i {
  height: 58px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(560px, 1.35fr) minmax(390px, 0.65fr);
  gap: 18px;
}

.command-primary,
.equity-console,
.opportunities-panel,
.pulse-panel,
.risk-command,
.system-panel {
  border-color: var(--glass-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.022)),
    var(--surface);
  box-shadow: var(--glow-soft);
}

.command-primary {
  min-height: 236px;
  padding: 28px;
  display: grid;
  align-content: end;
}

.command-primary h3 {
  max-width: 760px;
  margin: 0 0 10px;
  font-size: 2.55rem;
  line-height: 0.98;
}

.command-primary p:not(.eyebrow) {
  max-width: 900px;
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.55;
}

.status-meter {
  position: absolute;
  top: 24px;
  left: 28px;
  width: 110px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--teal));
  box-shadow: 0 0 24px rgba(69, 214, 207, 0.28);
}

.command-hero.danger .status-meter {
  background: linear-gradient(90deg, var(--red), var(--yellow));
}

.command-hero.caution .status-meter {
  background: linear-gradient(90deg, var(--yellow), var(--teal));
}

.decision-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.equity-console {
  min-height: 236px;
  padding: 24px;
  display: grid;
  gap: 14px;
}

.equity-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.equity-value {
  font-size: 2.65rem;
  line-height: 1;
}

.equity-delta {
  font-weight: 900;
}

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

.market-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(105px, 1fr));
  gap: 10px;
}

.market-chip {
  min-height: 76px;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.036);
  padding: 12px;
  display: grid;
  gap: 5px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.market-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(210, 255, 235, 0.25);
}

.market-chip span,
.market-chip small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.market-chip strong {
  font-size: 1.08rem;
}

.market-chip.green strong,
.opportunity-card.green .opportunity-topline strong {
  color: var(--green);
}

.market-chip.red strong,
.opportunity-card.red .opportunity-topline strong {
  color: var(--red);
}

.market-chip.yellow strong,
.opportunity-card.yellow .opportunity-topline strong {
  color: var(--yellow);
}

.dashboard-command-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.2fr) minmax(420px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.opportunities-panel {
  grid-row: span 2;
}

.opportunity-stack {
  display: grid;
  gap: 10px;
}

.opportunity-card {
  min-height: 102px;
  border: 1px solid rgba(210, 255, 235, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 15px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.opportunity-card:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 255, 201, 0.24);
  background: rgba(255, 255, 255, 0.055);
}

.rank-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #06100c;
  background: linear-gradient(135deg, var(--green), var(--teal));
  font-weight: 950;
}

.opportunity-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.opportunity-topline strong {
  font-size: 1.22rem;
}

.opportunity-card p {
  margin: 8px 0 12px;
  color: var(--soft);
  line-height: 1.4;
}

.opportunity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.opportunity-meta span,
.status-card span {
  border: 1px solid rgba(210, 255, 235, 0.1);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.034);
  font-size: 0.72rem;
  font-weight: 800;
}

.pulse-panel .main-chart {
  height: 300px;
}

.risk-split {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
}

.risk-list {
  display: grid;
  gap: 10px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.strategy-gate {
  border: 1px solid rgba(210, 255, 235, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 13px;
  display: grid;
  gap: 10px;
}

.strategy-gate div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.strategy-gate span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.strategy-gate strong {
  font-size: 1.18rem;
}

.strategy-gate p,
.strategy-gate small {
  margin: 0;
  color: var(--soft);
  line-height: 1.42;
}

.strategy-gate small {
  color: var(--muted);
}

.strategy-blockers {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.strategy-blockers li {
  border: 1px solid rgba(255, 107, 120, 0.18);
  border-radius: 10px;
  background: rgba(255, 107, 120, 0.06);
  color: var(--soft);
  padding: 8px 9px;
  line-height: 1.35;
}

.strategy-gate.red {
  border-color: rgba(255, 107, 120, 0.28);
  background: rgba(255, 107, 120, 0.07);
}

.strategy-gate.red strong {
  color: var(--red);
}

.strategy-gate.green strong {
  color: var(--green);
}

.strategy-gate.yellow strong {
  color: var(--yellow);
}

.status-card {
  min-height: 82px;
  border: 1px solid rgba(210, 255, 235, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.status-card span {
  width: fit-content;
  border-radius: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.status-card strong {
  font-size: 1.22rem;
}

.status-card.green strong {
  color: var(--green);
}

.status-card.red strong {
  color: var(--red);
}

.status-card.yellow strong {
  color: var(--yellow);
}

.compact-stack {
  display: grid;
  gap: 10px;
}

.card::after,
.signal-card::after,
.metric-board::after {
  animation-duration: 12s;
  opacity: 0.16;
}

.card:hover,
.signal-card:hover {
  border-color: rgba(210, 255, 235, 0.25);
}

@keyframes loadingSlide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

@media (max-width: 1320px) {
  .market-strip {
    grid-template-columns: repeat(4, minmax(105px, 1fr));
  }

  .command-hero,
  .dashboard-command-grid {
    grid-template-columns: 1fr;
  }

  .opportunities-panel {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 18px;
  }

  .command-primary h3,
  .equity-value {
    font-size: 2rem;
  }

  .equity-mini-grid,
  .status-grid,
  .risk-split {
    grid-template-columns: 1fr;
  }

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

  .opportunity-card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-grid,
  .card,
  .signal-card,
  .loader-line::after,
  body::after {
    animation: none !important;
  }

  .nav-item:hover,
  .market-chip:hover,
  .opportunity-card:hover {
    transform: none;
  }
}

/* Final desktop interaction cleanup. */
.topbar-actions {
  flex-wrap: nowrap;
  min-width: fit-content;
}

.menu-button {
  display: none !important;
}

@media (max-width: 1180px) {
  .topbar-actions {
    flex-wrap: wrap;
  }

  .menu-button {
    display: inline-flex !important;
  }
}

/* Page launcher and no-wheel risk presentation. */
body[data-page="home"] .shell {
  grid-template-columns: 1fr;
}

body[data-page="home"] .sidebar,
body[data-page="home"] .notice,
body[data-page="home"] #refreshStatus,
body[data-page="home"] #liveRefreshButton,
body[data-page="home"] #refreshButton,
body[data-page="home"] .menu-button {
  display: none !important;
}

body[data-page="home"] .main {
  min-height: 100vh;
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(8, 17, 15, 0.96), rgba(6, 11, 10, 1)),
    #07100d;
}

body[data-page="home"] .topbar {
  max-width: 1240px;
  margin: 0 auto 24px;
  min-height: 92px;
}

.launcher-grid {
  min-height: calc(100vh - 190px);
  align-items: center;
}

.launcher-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(560px, 1.14fr);
  gap: 18px;
}

.launcher-hero,
.page-option {
  border: 1px solid var(--glass-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.022)),
    var(--surface);
  box-shadow: var(--glow-soft);
}

.launcher-hero {
  min-height: 360px;
  border-radius: 22px;
  padding: 30px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.launcher-hero h3 {
  margin: 0;
  max-width: 560px;
  font-size: 3rem;
  line-height: 0.98;
}

.launcher-hero p:not(.eyebrow) {
  max-width: 560px;
  color: var(--soft);
  line-height: 1.55;
}

.launcher-auth {
  border: 1px solid rgba(210, 255, 235, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.signal-score {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.signal-card.no-news {
  border-color: rgba(255, 216, 107, 0.22);
  background: rgba(255, 216, 107, 0.035);
}

.no-news-note {
  margin-top: 12px;
  border-color: rgba(255, 216, 107, 0.2);
  background: rgba(255, 216, 107, 0.055);
}

.launcher-auth.unlocked {
  border-color: rgba(157, 255, 202, 0.32);
  background: rgba(157, 255, 202, 0.08);
}

.launcher-auth span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.launcher-auth strong {
  display: block;
  margin-top: 4px;
}

.launcher-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.launcher-login .search-input {
  min-height: 46px;
}

.launcher-pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.page-option {
  min-height: 150px;
  border-radius: 18px;
  padding: 18px;
  color: var(--text);
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.page-option:hover {
  transform: translateY(-3px);
  border-color: rgba(157, 255, 202, 0.36);
  background:
    linear-gradient(180deg, rgba(157, 255, 202, 0.11), rgba(56, 223, 213, 0.035)),
    var(--surface-2);
}

.page-option span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.page-option strong {
  font-size: 1.35rem;
}

.page-option small {
  color: var(--muted);
  line-height: 1.45;
}

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

.risk-summary-grid .mini {
  min-height: 84px;
  border: 1px solid rgba(210, 255, 235, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  display: grid;
  align-content: center;
}

@media (max-width: 980px) {
  .launcher-shell {
    grid-template-columns: 1fr;
  }

  .launcher-hero {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  body[data-page="home"] .main {
    padding: 18px;
  }

  .launcher-hero h3 {
    font-size: 2.2rem;
  }

  .launcher-login,
  .launcher-pages,
  .risk-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Final visual polish: cleaner desktop command surface and light motion. */
:root {
  --aqua: #7dffd6;
  --mint: #b4ffd7;
  --card-dark: rgba(15, 27, 24, 0.88);
  --card-dark-2: rgba(20, 38, 33, 0.76);
  --edge: rgba(179, 255, 220, 0.18);
  --edge-hot: rgba(136, 255, 211, 0.46);
}

body {
  background:
    radial-gradient(circle at 82% 0%, rgba(65, 214, 207, 0.13), transparent 34%),
    linear-gradient(135deg, #06100e 0%, #081713 48%, #04100c 100%) !important;
}

body::before {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(180, 255, 215, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 255, 215, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.topbar,
.card,
.page-option,
.launcher-hero,
.notice {
  backdrop-filter: blur(18px);
}

.topbar {
  border: 1px solid var(--edge);
  border-radius: 22px;
  padding: 22px 24px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.058), rgba(81, 255, 207, 0.035) 52%, rgba(255, 255, 255, 0.018)),
    rgba(13, 25, 22, 0.72);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
}

.card,
.page-option,
.launcher-hero,
.market-chip,
.opportunity-card,
.signal-card,
.mini-card,
.history-row {
  position: relative;
  overflow: hidden;
}

.card::after,
.page-option::after,
.launcher-hero::after,
.signal-card::after,
.history-row::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(180, 255, 215, 0.105) 48%, transparent 72%);
  transform: translateX(-35%);
  transition: opacity 180ms ease, transform 420ms ease;
}

.card:hover::after,
.page-option:hover::after,
.signal-card:hover::after,
.history-row:hover::after {
  opacity: 1;
  transform: translateX(35%);
}

.card:hover,
.signal-card:hover,
.history-row:hover,
.page-option:hover {
  border-color: var(--edge-hot);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(125, 255, 214, 0.05);
}

.content-grid > section,
.content-grid > article,
.content-grid > .card {
  animation: cardRise 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.content-grid > section:nth-child(2),
.content-grid > article:nth-child(2),
.content-grid > .card:nth-child(2) {
  animation-delay: 45ms;
}

.content-grid > section:nth-child(3),
.content-grid > article:nth-child(3),
.content-grid > .card:nth-child(3) {
  animation-delay: 85ms;
}

.content-grid > section:nth-child(4),
.content-grid > article:nth-child(4),
.content-grid > .card:nth-child(4) {
  animation-delay: 120ms;
}

.brand-mark {
  animation: brandGlow 3.2s ease-in-out infinite;
}

.status-dot {
  animation: pulseGlow 1.9s ease-in-out infinite;
}

.ghost-button,
.pill,
.badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.ghost-button:hover {
  border-color: rgba(157, 255, 202, 0.34);
  background: rgba(157, 255, 202, 0.11);
  color: var(--text);
}

body[data-page="home"] .topbar {
  display: none;
}

body[data-page="home"] .main {
  display: grid;
  align-content: center;
  padding: 44px;
}

body[data-page="home"] .launcher-grid {
  min-height: auto;
}

body[data-page="home"] .launcher-shell {
  width: min(1280px, 100%);
  grid-template-columns: minmax(460px, 0.92fr) minmax(600px, 1.08fr);
  align-items: stretch;
}

.launcher-hero {
  min-height: 640px;
  align-content: stretch;
  grid-template-rows: auto auto 1fr auto auto;
  background:
    linear-gradient(145deg, rgba(125, 255, 214, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.018)),
    var(--card-dark);
}

.launcher-hero h3 {
  max-width: 420px;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.9;
}

.launcher-visual {
  min-height: 210px;
  border: 1px solid rgba(179, 255, 220, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(125, 255, 214, 0.075), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 42px),
    rgba(2, 10, 8, 0.48);
  padding: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 14px;
}

.launcher-visual span {
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, var(--mint), var(--teal));
  box-shadow: 0 0 24px rgba(69, 214, 207, 0.2);
  transform-origin: bottom;
  animation: barLift 3s ease-in-out infinite;
}

.launcher-visual span:nth-child(1) {
  height: 42%;
}

.launcher-visual span:nth-child(2) {
  height: 72%;
  animation-delay: 0.12s;
}

.launcher-visual span:nth-child(3) {
  height: 56%;
  animation-delay: 0.24s;
}

.launcher-visual span:nth-child(4) {
  height: 88%;
  animation-delay: 0.36s;
}

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

.launcher-status-grid div {
  border: 1px solid rgba(179, 255, 220, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.launcher-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.launcher-status-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
}

.launcher-pages {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
}

.page-option {
  min-height: 188px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(125, 255, 214, 0.025)),
    var(--card-dark);
}

.page-option strong {
  font-size: 1.55rem;
}

.page-option small {
  max-width: 320px;
  font-size: 0.94rem;
}

.dashboard-command-grid,
.agent-hero,
.grid-2 {
  gap: 20px;
}

.metric,
.equity-value {
  text-shadow: 0 0 22px rgba(180, 255, 215, 0.08);
}

.main-chart {
  filter: drop-shadow(0 12px 26px rgba(69, 214, 207, 0.12));
}

.scroll-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 255, 214, 0.46) rgba(255, 255, 255, 0.04);
}

@media (min-width: 1321px) {
  .main {
    padding-left: 30px;
    padding-right: 30px;
  }

  .command-hero {
    grid-template-columns: minmax(600px, 1.38fr) minmax(360px, 0.62fr);
  }

  .dashboard-command-grid {
    grid-template-columns: minmax(560px, 1.24fr) minmax(440px, 1fr);
  }
}

@keyframes barLift {
  0%,
  100% {
    transform: scaleY(0.94);
    opacity: 0.72;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  body[data-page="home"] .launcher-shell {
    grid-template-columns: 1fr;
  }

  .launcher-hero {
    min-height: auto;
  }
}

@media (max-width: 740px) {
  body[data-page="home"] .main {
    padding: 18px;
  }

  .launcher-status-grid,
  .launcher-pages {
    grid-template-columns: 1fr;
  }

  .launcher-visual {
    min-height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
