:root {
  color-scheme: dark;
  --bg: #050a09;
  --panel: rgba(13, 24, 22, 0.76);
  --panel-strong: rgba(15, 29, 26, 0.94);
  --panel-soft: rgba(18, 34, 31, 0.54);
  --line: rgba(151, 181, 174, 0.13);
  --line-bright: rgba(70, 242, 199, 0.36);
  --text: #eef8f5;
  --muted: #819891;
  --muted-strong: #a8bbb6;
  --cyan: #38f2c1;
  --cyan-soft: rgba(56, 242, 193, 0.12);
  --lime: #b7f34b;
  --purple: #a97af8;
  --red: #ff6f7d;
  --amber: #f5bf55;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 16px;
  --ease: 180ms ease;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    radial-gradient(circle at 15% -10%, rgba(53, 234, 189, 0.09), transparent 28%),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto;
  color: var(--text);
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
[data-interactive] {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(100px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-one {
  top: 22%;
  right: -220px;
  background: var(--purple);
}

.ambient-two {
  bottom: -230px;
  left: 20%;
  background: var(--cyan);
}

.app-shell {
  width: min(1540px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 34px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  width: max-content;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  margin-right: 12px;
  place-items: center;
}

.brand-ring {
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(56, 242, 193, 0.55);
  border-radius: 50%;
  box-shadow: inset 0 0 16px rgba(56, 242, 193, 0.12), 0 0 16px rgba(56, 242, 193, 0.08);
}

.brand-ring::before,
.brand-ring::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(56, 242, 193, 0.15);
  border-radius: inherit;
  content: "";
  transform: rotate(45deg);
}

.brand-ring::after {
  inset: -2px 12px;
  border-color: var(--cyan);
  border-width: 1px 0;
  border-radius: 0;
}

.brand-letter {
  color: var(--cyan);
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.21em;
}

.brand-copy small,
.profile-copy small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.market-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.market-strip strong {
  color: var(--text);
  font-size: 11px;
}

.live-dot,
.sync-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(56, 242, 193, 0.08), 0 0 12px rgba(56, 242, 193, 0.8);
  animation: pulse 2s infinite;
}

.strip-divider {
  width: 1px;
  height: 15px;
  margin: 0 6px;
  background: var(--line);
}

.market-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.positive {
  color: var(--cyan) !important;
}

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

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

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  place-items: center;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.icon-button:hover {
  border-color: var(--line-bright);
  background: var(--cyan-soft);
}

.icon-button:active,
.button:active {
  transform: scale(0.98);
}

.icon-button svg,
.button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.notification-button {
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--bg);
  border-radius: 50%;
  background: var(--red);
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 5px;
}

.profile-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(56, 242, 193, 0.34);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(56, 242, 193, 0.18), rgba(169, 122, 248, 0.12));
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  place-items: center;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.tabbar {
  display: flex;
  min-height: 54px;
  gap: 34px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--ease);
}

.tab-button::after {
  position: absolute;
  right: 50%;
  bottom: -1px;
  left: 50%;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 -2px 12px rgba(56, 242, 193, 0.5);
  content: "";
  transition: right 240ms ease, left 240ms ease;
}

.tab-button:hover,
.tab-button.active {
  color: var(--text);
}

.tab-button.active::after {
  right: 0;
  left: 0;
}

.nav-count {
  display: grid;
  min-width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(56, 242, 193, 0.12);
  color: var(--cyan);
  font-size: 9px;
  place-items: center;
}

.nav-count[hidden] {
  display: none;
}

main {
  padding: 35px 0 20px;
}

.command-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.eyebrow span {
  width: 19px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 43px);
  font-weight: 420;
  letter-spacing: -0.045em;
}

.command-bar p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.command-actions,
.data-state {
  display: flex;
  align-items: center;
}

.command-actions {
  flex-shrink: 0;
  gap: 10px;
}

.data-state {
  gap: 11px;
  margin-right: 8px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.data-state div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.data-state small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.data-state strong {
  font-size: 10px;
  font-weight: 600;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease), transform var(--ease);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.02);
}

.button-secondary:hover {
  border-color: var(--line-bright);
  background: var(--cyan-soft);
}

.button-primary {
  border-color: rgba(56, 242, 193, 0.55);
  background: var(--cyan);
  box-shadow: 0 0 25px rgba(56, 242, 193, 0.13);
  color: #03110d;
}

.button-primary:hover {
  background: #67f7d0;
  box-shadow: 0 0 30px rgba(56, 242, 193, 0.22);
}

.button-plus {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(105deg, rgba(15, 28, 25, 0.82), rgba(9, 18, 16, 0.66));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metric {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 19px 21px;
}

.metric:not(:last-child)::after {
  position: absolute;
  top: 19px;
  right: 0;
  bottom: 19px;
  width: 1px;
  background: var(--line);
  content: "";
}

.metric-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric-value {
  font-family: "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.metric-delta {
  font-size: 9px;
  font-weight: 700;
}

.metric-chart {
  width: 86px;
  height: 35px;
}

.metric-chart path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.6;
}

.metric-chart .area {
  fill: url("#metric-gradient");
  stroke: none;
}

.gauge {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--value) * 1%), rgba(255, 255, 255, 0.06) 0);
  place-items: center;
}

.gauge::after {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #0c1715;
  content: "";
}

.gauge strong {
  z-index: 1;
  font-size: 11px;
}

.tab-content {
  min-height: 470px;
}

.content-enter {
  animation: contentIn 350ms ease both;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-main {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.72fr);
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(16, 29, 27, 0.82), rgba(10, 19, 17, 0.7));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.19);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.panel:hover {
  border-color: rgba(56, 242, 193, 0.2);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.26);
}

.panel-header {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.panel-title-icon {
  display: grid;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(56, 242, 193, 0.16);
  border-radius: 7px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 12px;
  place-items: center;
}

.panel-meta {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.filters {
  display: flex;
  gap: 7px;
}

.select {
  min-height: 30px;
  padding: 0 27px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #0c1715;
  color: var(--muted-strong);
  font-size: 9px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: #667c76;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(151, 181, 174, 0.08);
  color: var(--muted-strong);
  font-size: 10px;
  vertical-align: middle;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background var(--ease);
}

.data-table tbody tr:hover {
  background: rgba(56, 242, 193, 0.035);
}

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

.security {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 145px;
}

.ticker-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
  place-items: center;
}

.security-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.security-copy strong {
  color: var(--text);
  font-size: 10px;
}

.security-copy small {
  max-width: 130px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-cell strong,
.stacked-cell strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 10px;
}

.price-cell small,
.stacked-cell small {
  color: var(--muted);
  font-size: 8px;
}

.ratio-pill,
.status-pill,
.risk-pill,
.action-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(56, 242, 193, 0.2);
  border-radius: 5px;
  background: rgba(56, 242, 193, 0.07);
  color: var(--cyan);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.confidence {
  display: flex;
  align-items: center;
  gap: 7px;
}

.confidence-track {
  width: 45px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  box-shadow: 0 0 8px rgba(56, 242, 193, 0.35);
}

.confidence strong {
  color: var(--text);
  font-size: 9px;
}

.timeline {
  position: relative;
  padding: 22px 20px 21px;
}

.timeline::before {
  position: absolute;
  top: 37px;
  bottom: 38px;
  left: 28px;
  width: 1px;
  background: linear-gradient(var(--cyan), rgba(56, 242, 193, 0.05));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 11px;
  padding-bottom: 23px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-node {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  margin-left: 4px;
  border: 2px solid #0a1714;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 242, 193, 0.18), 0 0 12px rgba(56, 242, 193, 0.6);
}

.timeline-content {
  min-width: 0;
}

.timeline-date {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.timeline-content strong {
  font-size: 10px;
}

.timeline-content p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.stock-list {
  display: grid;
  gap: 11px;
}

.stock-card {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.1fr 0.8fr 0.8fr 28px;
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(115deg, rgba(16, 30, 27, 0.84), rgba(9, 17, 16, 0.72));
  cursor: pointer;
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}

.stock-card:hover {
  border-color: rgba(56, 242, 193, 0.3);
  background: linear-gradient(115deg, rgba(19, 39, 34, 0.9), rgba(11, 20, 18, 0.8));
  transform: translateY(-2px);
}

.stock-chart {
  width: 100%;
  min-width: 90px;
  height: 40px;
}

.chart-cell {
  position: relative;
  min-width: 100px;
  height: 56px;
}

.chart-cell canvas,
.projection-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.projection-chart {
  position: relative;
  height: 112px;
  margin-bottom: 18px;
}

.stock-chart path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.stock-chart .spark-area {
  fill: rgba(56, 242, 193, 0.055);
  stroke: none;
}

.signal-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-pulse {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 242, 193, 0.1);
  color: var(--cyan);
  place-items: center;
}

.signal-pulse::after {
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(56, 242, 193, 0.2);
  border-radius: inherit;
  content: "";
  animation: signalPulse 2.1s infinite;
}

.signal-pulse svg {
  width: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.risk-pill.medium {
  border-color: rgba(245, 191, 85, 0.22);
  background: rgba(245, 191, 85, 0.08);
  color: var(--amber);
}

.risk-pill.high,
.action-pill.reduce {
  border-color: rgba(255, 111, 125, 0.22);
  background: rgba(255, 111, 125, 0.08);
  color: var(--red);
}

.action-pill.hold {
  border-color: rgba(169, 122, 248, 0.24);
  background: rgba(169, 122, 248, 0.08);
  color: #c3a5ff;
}

.card-arrow {
  color: var(--muted);
  font-size: 17px;
  text-align: right;
  transition: color var(--ease), transform var(--ease);
}

.stock-card:hover .card-arrow {
  color: var(--cyan);
  transform: translateX(3px);
}

.long-card {
  position: relative;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17, 32, 29, 0.88), rgba(9, 18, 16, 0.72));
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
}

.long-card:hover {
  border-color: rgba(56, 242, 193, 0.3);
  transform: translateY(-2px);
}

.long-card::after {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--cyan);
  content: "";
  filter: blur(70px);
  opacity: 0.06;
}

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

.projection {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 15px;
  margin-bottom: 20px;
}

.projection-label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.projection-value {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 530;
}

.projection-upside {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
}

.projection-band {
  position: relative;
  height: 35px;
  margin-bottom: 18px;
}

.projection-line {
  position: absolute;
  top: 16px;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(169, 122, 248, 0.3), var(--cyan), rgba(183, 243, 75, 0.7));
}

.projection-marker {
  position: absolute;
  top: 10px;
  left: var(--marker);
  width: 15px;
  height: 15px;
  border: 3px solid #0d1a17;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 242, 193, 0.2), 0 0 14px rgba(56, 242, 193, 0.5);
  transform: translateX(-50%);
}

.projection-range {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 7px;
}

.fundamentals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 17px;
}

.fundamental {
  padding: 9px;
  border: 1px solid rgba(151, 181, 174, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

.fundamental small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 7px;
}

.fundamental strong {
  font-size: 10px;
}

.catalyst {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 8px;
  line-height: 1.5;
}

.catalyst span {
  color: var(--purple);
  font-weight: 800;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 18px;
}

.sector-tile {
  min-height: 83px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  background: color-mix(in srgb, var(--tile-color) var(--tile-strength), rgba(255, 255, 255, 0.015));
}

.sector-tile strong {
  display: block;
  margin-bottom: 9px;
  font-size: 9px;
}

.sector-tile span {
  font-size: 16px;
  font-weight: 560;
}

.signal-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 19px;
  border-bottom: 1px solid var(--line);
}

.signal-card:last-child {
  border-bottom: 0;
}

.signal-card-main {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 20px;
}

.signal-reason {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.level {
  padding: 8px 9px;
  border: 1px solid rgba(151, 181, 174, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.015);
}

.level small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.level strong {
  font-size: 9px;
}

.alert-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
}

.switch {
  position: relative;
  width: 31px;
  height: 17px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: left var(--ease), background var(--ease), box-shadow var(--ease);
}

.switch.on {
  background: rgba(56, 242, 193, 0.15);
}

.switch.on::after {
  left: 17px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(56, 242, 193, 0.65);
}

.scenario-panel {
  padding: 19px;
}

.scenario-field {
  margin-bottom: 17px;
}

.scenario-field label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.scenario-field input,
.scenario-field select {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.scenario-field input:focus,
.scenario-field select:focus {
  border-color: var(--line-bright);
}

.scenario-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.empty-state {
  min-height: 280px;
  padding: 38px;
}

.empty-state h2 {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 520;
}

.empty-state p {
  max-width: 700px;
  color: var(--muted);
  line-height: 1.7;
}

.freshness-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.freshness-badge.live {
  border-color: rgba(56, 242, 193, 0.26);
  background: rgba(56, 242, 193, 0.08);
  color: var(--cyan);
}

.freshness-badge.stale {
  border-color: rgba(255, 111, 125, 0.28);
  background: rgba(255, 111, 125, 0.08);
  color: var(--red);
}

.freshness-badge.delayed {
  border-color: rgba(169, 122, 248, 0.28);
  background: rgba(169, 122, 248, 0.08);
  color: var(--purple);
}

.freshness-badge.end-of-day {
  border-color: rgba(245, 191, 85, 0.24);
  background: rgba(245, 191, 85, 0.08);
  color: var(--amber);
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 19px;
}

.health-card {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.015);
}

.health-card div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.health-card small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.health-card strong {
  font-size: 10px;
}

.sync-indicator.offline {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 111, 125, 0.08), 0 0 12px rgba(255, 111, 125, 0.5);
  animation: none;
}

.accuracy-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.accuracy-card:last-child {
  border-bottom: 0;
}

.scenario-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(56, 242, 193, 0.035);
}

.scenario-stat small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 7px;
}

.scenario-stat strong {
  font-size: 13px;
}

.indices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.index-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(16, 30, 27, 0.85), rgba(8, 16, 14, 0.7));
}

.index-top,
.index-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.index-top {
  margin-bottom: 17px;
}

.index-top strong {
  font-size: 9px;
}

.index-value {
  margin-top: 12px;
}

.index-value strong {
  font-size: 15px;
}

.index-value span {
  font-size: 9px;
  font-weight: 700;
}

.movers {
  padding: 7px 17px 12px;
}

.mover-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(151, 181, 174, 0.08);
  font-size: 9px;
}

.mover-row:last-child {
  border: 0;
}

.mover-row strong {
  color: var(--text);
}

.mover-row span {
  color: var(--muted);
}

.loading-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.loading-card {
  height: 380px;
  border-radius: var(--radius);
}

.metric-skeleton {
  height: 92px;
}

.skeleton {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  border-top: 1px solid var(--line);
  color: #536861;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

footer p {
  margin: 0;
}

footer span {
  margin: 0 5px;
  color: var(--cyan);
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 9px;
}

.toast {
  width: min(340px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  background: rgba(10, 24, 20, 0.96);
  box-shadow: var(--shadow);
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.5;
  animation: toastIn 250ms ease both;
}

.toast strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  padding: 8vh 20px;
  background: rgba(1, 5, 4, 0.74);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(8px);
  transition: opacity 200ms ease;
}

.modal-backdrop.open,
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  width: min(690px, 100%);
  align-self: start;
  justify-self: center;
  border: 1px solid var(--line-bright);
  border-radius: 15px;
  background: rgba(8, 18, 16, 0.98);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 200ms ease;
}

.open .search-modal {
  transform: translateY(0) scale(1);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.search-input-wrap svg {
  width: 18px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.6;
}

.search-input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search-input-wrap kbd {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 8px;
}

.search-modal-body {
  padding: 20px;
}

.search-modal-body h2 {
  font-size: 17px;
  font-weight: 500;
}

.search-results {
  display: grid;
  gap: 6px;
  max-height: min(520px, 62vh);
  overflow-y: auto;
}

.search-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.search-result:hover,
.search-result:focus-visible {
  border-color: var(--line);
  outline: 0;
  background: rgba(56, 242, 193, 0.04);
  transform: translateY(-1px);
}

.search-result-meta {
  display: grid;
  max-width: 210px;
  justify-items: end;
  color: var(--muted);
  font-size: 8px;
  gap: 3px;
  text-align: right;
}

.search-result-meta b {
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 650;
}

.search-guidance,
.search-loading {
  padding: 22px 12px;
  color: var(--muted);
  text-align: center;
}

.search-guidance strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 12px;
}

.search-guidance p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.search-guidance.search-error strong {
  color: var(--red);
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 10px;
}

.stock-route .command-bar {
  margin-bottom: 22px;
}

.stock-route .command-actions {
  align-items: center;
}

.stock-detail-loading {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stock-detail-loading .loading-card {
  min-height: 220px;
}

.stock-detail-shell {
  display: grid;
  gap: 18px;
}

.stock-back-link {
  width: max-content;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.stock-back-link::before {
  content: "<";
  margin-right: 7px;
}

.stock-detail-hero {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 28px;
}

.stock-detail-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stock-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 14px;
}

.stock-detail-identity h2 {
  margin: 12px 0 7px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 500;
}

.stock-detail-identity p,
.stock-source-line {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.stock-live-price {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.stock-live-price > strong {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 520;
}

.stock-live-price > span {
  font-size: 12px;
  font-weight: 700;
}

.stock-live-price > div {
  display: flex;
  gap: 7px;
}

.stock-section-tabs {
  display: flex;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 21, 19, 0.7);
}

.stock-section-tabs button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.stock-section-tabs button:hover,
.stock-section-tabs button.active {
  border-color: var(--line-bright);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.stock-overview-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(440px, 1.2fr);
  gap: 16px;
}

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

.stock-stat {
  display: grid;
  min-height: 105px;
  align-content: center;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.stock-stat small,
.split-event small,
.prediction-verdict small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.stock-stat strong {
  font-size: 20px;
  font-weight: 520;
}

.stock-history-panel {
  min-height: 450px;
}

.stock-history-chart {
  height: 350px;
  padding: 8px 18px 4px;
}

.stock-source-line {
  padding: 0 20px 18px;
}

.stock-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.confirmed-split-block {
  padding: 20px;
  border-top: 1px solid var(--line);
}

.confirmed-split-block h3 {
  margin: 0 0 12px;
  color: var(--muted-strong);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.split-event-list {
  display: grid;
  gap: 8px;
}

.split-event {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.014);
}

.split-event > div {
  display: grid;
  gap: 5px;
}

.split-event strong {
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
}

.stock-inline-empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.split-prediction-panel {
  align-self: start;
  padding-bottom: 20px;
}

.prediction-verdict {
  display: grid;
  margin: 20px;
  padding: 22px;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  background: var(--cyan-soft);
  gap: 7px;
}

.prediction-verdict strong {
  color: var(--cyan);
  font-size: 28px;
  font-weight: 520;
}

.prediction-verdict span {
  color: var(--muted-strong);
  font-size: 9px;
}

.prediction-unlikely {
  border-color: rgba(255, 111, 125, 0.28);
  background: rgba(255, 111, 125, 0.06);
}

.prediction-unlikely strong {
  color: var(--red);
}

.prediction-possible {
  border-color: rgba(245, 191, 85, 0.28);
  background: rgba(245, 191, 85, 0.06);
}

.prediction-possible strong {
  color: var(--amber);
}

.prediction-insufficient-data strong {
  color: var(--muted-strong);
}

.prediction-explanation {
  margin: 0;
  padding: 0 20px 14px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.7;
}

.split-prediction-panel .reason-list {
  margin: 0 20px;
  padding-bottom: 18px;
}

.prediction-disclaimer {
  margin: 0 20px;
  padding: 14px;
  border: 1px solid rgba(169, 122, 248, 0.2);
  border-radius: 9px;
  background: rgba(169, 122, 248, 0.05);
}

.prediction-disclaimer strong {
  color: var(--purple);
  font-size: 9px;
  text-transform: uppercase;
}

.prediction-disclaimer p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.prediction-disclaimer small {
  color: var(--muted);
  font-size: 7px;
}

.drawer-backdrop {
  justify-items: end;
  padding: 0;
}

.detail-drawer {
  position: relative;
  width: min(485px, 100%);
  height: 100%;
  padding: 31px;
  border-left: 1px solid var(--line-bright);
  background: rgba(7, 17, 15, 0.98);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 260ms ease;
}

.open .detail-drawer {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 19px;
  right: 19px;
  z-index: 1;
  font-size: 20px;
}

.drawer-hero {
  margin-bottom: 27px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-hero h2 {
  margin: 14px 0 7px;
  font-size: 34px;
  font-weight: 480;
}

.drawer-hero p,
.drawer-copy {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.drawer-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
}

.drawer-price strong {
  font-size: 25px;
}

.drawer-section {
  margin-bottom: 25px;
}

.drawer-section h3 {
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.reason-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.reason-list li {
  display: flex;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.5;
}

.reason-list li::before {
  color: var(--cyan);
  content: ">";
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@keyframes signalPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.75);
  }
  70% {
    opacity: 0;
    transform: scale(1.35);
  }
  100% {
    opacity: 0;
  }
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .market-strip {
    display: none;
  }

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

  .stock-card {
    grid-template-columns: 1.25fr 0.75fr 1fr 0.7fr 28px;
  }

  .stock-card .stock-chart {
    display: none;
  }

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

@media (max-width: 820px) {
  .app-shell {
    padding: 0 18px;
  }

  .profile-copy,
  .data-state {
    display: none;
  }

  .tabbar {
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tab-button {
    flex: 0 0 auto;
  }

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

  .command-actions {
    width: 100%;
  }

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

  .metric:nth-child(2)::after {
    display: none;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

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

  .stock-card {
    grid-template-columns: 1fr 0.75fr 0.8fr 28px;
  }

  .stock-card .signal-summary {
    display: none;
  }

  .stock-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .stock-live-price {
    justify-items: start;
    text-align: left;
  }

  .stock-overview-grid,
  .stock-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .brand-copy small,
  .notification-button {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .tabbar {
    margin-right: -18px;
  }

  main {
    padding-top: 28px;
  }

  .command-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button {
    width: 100%;
  }

  .metric-strip,
  .grid-two,
  .indices {
    grid-template-columns: 1fr;
  }

  .metric::after {
    display: none;
  }

  .metric {
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border: 0;
  }

  .stock-card {
    grid-template-columns: 1fr auto 20px;
    gap: 10px;
  }

  .stock-card > :nth-child(3),
  .stock-card > :nth-child(4) {
    display: none;
  }

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

  .table-scroll {
    overflow-x: auto;
  }

  .signal-card,
  .signal-card-main {
    grid-template-columns: 1fr;
  }

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

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

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    line-height: 1.5;
  }

  .detail-drawer {
    padding: 26px 20px;
  }

  .stock-detail-loading,
  .stock-stat-grid {
    grid-template-columns: 1fr;
  }

  .stock-detail-hero {
    padding: 20px;
  }

  .stock-detail-identity {
    align-items: flex-start;
  }

  .stock-detail-icon {
    display: none;
  }

  .stock-section-tabs button {
    flex: 1;
  }

  .stock-history-panel {
    min-height: 360px;
  }

  .stock-history-chart {
    height: 270px;
    padding: 8px 10px 4px;
  }

  .split-event {
    grid-template-columns: 1fr 1fr;
  }

  .search-result {
    align-items: flex-start;
    gap: 10px;
  }

  .search-result-meta {
    max-width: 120px;
  }
}

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