:root {
  --bg: #08110f;
  --surface: rgba(248, 255, 252, 0.94);
  --surface-2: #e8f4ef;
  --surface-3: #f6fbf8;
  --ink: #071612;
  --muted: #667973;
  --line: rgba(12, 65, 48, 0.14);
  --green: #0f8f68;
  --green-2: #d8f5e9;
  --mint: #52f1b7;
  --cyan: #4ed8ff;
  --blue: #276c98;
  --amber: #b98216;
  --red: #c64b55;
  --sidebar: #071310;
  --glass: rgba(255, 255, 255, 0.1);
  --shadow: 0 22px 60px rgba(3, 18, 14, 0.14);
  --shadow-soft: 0 14px 34px rgba(3, 18, 14, 0.1);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 76% 4%, rgba(82, 241, 183, 0.26), transparent 26rem),
    radial-gradient(circle at 14% 16%, rgba(78, 216, 255, 0.18), transparent 24rem),
    linear-gradient(180deg, #0b1815 0, #f4f8f6 330px, #eef5f1 100%);
  color: var(--ink);
}

html,
body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(19, 107, 79, 0.18);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 0, rgba(82, 241, 183, 0.22), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 20rem),
    var(--sidebar);
  color: #f6fbf7;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), #bfffe3);
  color: #061510;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(82, 241, 183, 0.22), inset 0 -8px 16px rgba(19, 107, 79, 0.16);
}

.brand strong,
.brand span,
.account-panel strong,
.account-panel p {
  display: block;
}

.brand span,
.account-panel p {
  color: rgba(246, 251, 247, 0.68);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.nav-item {
  border: 0;
  color: rgba(246, 251, 247, 0.74);
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(82, 241, 183, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: inset 3px 0 0 rgba(82, 241, 183, 0.8);
  transform: none;
}

.account-panel {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.account-panel {
  display: grid;
  gap: 10px;
}

.plan-pill,
.storage-pill {
  width: max-content;
  border-radius: 8px;
  padding: 5px 9px;
  background: rgba(216, 247, 229, 0.14);
  color: #d8f7e5;
  font-size: 12px;
  font-weight: 900;
}

.storage-pill {
  background: rgba(255, 255, 255, 0.11);
  color: rgba(246, 251, 247, 0.82);
}

.main {
  min-width: 0;
  padding: 28px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.topbar,
.section-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 22px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 0 16px;
  background: linear-gradient(180deg, rgba(244, 248, 246, 0.94), rgba(244, 248, 246, 0.74) 72%, transparent);
  backdrop-filter: blur(12px);
}

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.28;
}

.top-summary {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.5;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.primary,
.ghost {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 15px;
  font-weight: 800;
  white-space: nowrap;
}

.primary {
  background: linear-gradient(135deg, #42efad, var(--green));
  color: #061510;
  box-shadow: 0 14px 30px rgba(15, 143, 104, 0.28);
}

.ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.small {
  padding: 8px 11px;
  font-size: 13px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.landing-hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  background: #071310;
  color: #ffffff;
  margin-bottom: 16px;
  isolation: isolate;
  box-shadow: 0 34px 90px rgba(3, 18, 14, 0.26);
}

.hero-market-scene {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(82, 241, 183, 0.32), transparent 18rem),
    radial-gradient(circle at 24% 42%, rgba(78, 216, 255, 0.16), transparent 22rem),
    linear-gradient(120deg, rgba(7, 19, 16, 0.55), rgba(7, 19, 16, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 68px),
    #071310;
  z-index: -1;
}

.hero-market-scene::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% 18%;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(82, 241, 183, 0.18), transparent 68%);
  filter: blur(18px);
}

.market-tape {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  gap: 10px;
  overflow: hidden;
}

.market-tape span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(82, 241, 183, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(246, 251, 247, 0.82);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(16px);
}

.hero-chart-line {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 34%;
  height: 190px;
  opacity: 0.92;
  background:
    linear-gradient(135deg, transparent 0 12%, rgba(82, 241, 183, 0.18) 12% 13%, transparent 13% 26%, rgba(82, 241, 183, 0.22) 26% 27%, transparent 27% 43%, rgba(82, 241, 183, 0.34) 43% 44%, transparent 44% 62%, rgba(82, 241, 183, 0.58) 62% 63%, transparent 63% 100%);
  border-bottom: 1px solid rgba(82, 241, 183, 0.26);
  filter: drop-shadow(0 0 16px rgba(82, 241, 183, 0.26));
}

.hero-bars {
  position: absolute;
  right: 32px;
  bottom: 42px;
  width: min(420px, 52%);
  height: 230px;
  display: flex;
  align-items: end;
  gap: 12px;
  opacity: 0.9;
}

.hero-bars i {
  flex: 1;
  min-width: 18px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(82, 241, 183, 0.74), rgba(82, 241, 183, 0.14));
  border: 1px solid rgba(82, 241, 183, 0.22);
  box-shadow: 0 -10px 26px rgba(82, 241, 183, 0.1);
}

.hero-signal-panel {
  position: absolute;
  right: 34px;
  top: 100px;
  width: min(290px, 42%);
  padding: 16px;
  border: 1px solid rgba(82, 241, 183, 0.26);
  border-radius: 8px;
  background: rgba(8, 20, 17, 0.68);
  box-shadow: 0 24px 66px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.hero-signal-panel span,
.hero-signal-panel small {
  display: block;
  color: rgba(246, 251, 247, 0.68);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.hero-signal-panel strong {
  display: block;
  margin: 7px 0;
  color: var(--mint);
  font-size: 26px;
  line-height: 1.1;
}

.hero-copy {
  width: min(760px, 100%);
  padding: 120px 42px 42px;
}

.hero-copy .eyebrow {
  color: var(--mint);
}

.hero-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  max-width: 760px;
}

.hero-copy p {
  max-width: 660px;
  color: rgba(246, 251, 247, 0.78);
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.landing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.landing-strip article,
.landing-feature {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 249, 0.9));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.landing-strip article {
  padding: 18px;
  min-height: 154px;
}

.landing-strip span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.landing-strip strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.2;
}

.landing-strip p,
.landing-feature p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

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

.landing-feature {
  padding: 24px;
  min-height: 230px;
}

.landing-feature h2 {
  margin-bottom: 12px;
  font-size: 26px;
  line-height: 1.2;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metrics article,
.panel,
.price-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 249, 0.9));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.metrics article {
  padding: 18px;
  min-height: 154px;
  position: relative;
  overflow: hidden;
}

.metrics article::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 241, 183, 0.22), rgba(82, 241, 183, 0.02) 70%);
}

.metrics span,
.metrics small {
  display: block;
  color: var(--muted);
}

.metrics strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: #062019;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.analysis-result {
  min-height: 420px;
}

.simulator-panel {
  grid-column: 2;
}

.analysis-ledger {
  grid-column: 1 / -1;
}

.wide {
  grid-column: span 1;
}

.panel {
  padding: 20px;
  min-width: 0;
  max-width: 100%;
}

.strategy-board,
.strategy-list,
.journal-list,
.watchlist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stock-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  max-height: 356px;
  overflow: auto;
  padding: 2px 4px 2px 2px;
  scrollbar-width: thin;
}

.market-card,
.watch-card {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.market-card {
  min-height: 86px;
}

.market-card {
  cursor: pointer;
}

.market-card:hover,
.market-card.selected {
  border-color: rgba(15, 143, 104, 0.46);
  background: linear-gradient(180deg, #effcf6, #ffffff);
  box-shadow: 0 12px 28px rgba(15, 143, 104, 0.12);
}

.market-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(15, 143, 104, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfff7, #ffffff 58%, #eef9ff);
}

.market-summary strong,
.market-summary span,
.market-summary small {
  display: block;
}

.market-summary span,
.market-summary small {
  color: var(--muted);
}

.market-breadth {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.market-breadth em {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.market-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.market-card-top b {
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 12px;
  line-height: 1.1;
}

.market-card-top b.up {
  color: #a8222d;
  background: rgba(198, 75, 85, 0.1);
}

.market-card-top b.down {
  color: #1c67a7;
  background: rgba(39, 108, 152, 0.1);
}

.market-symbol {
  letter-spacing: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.market-card strong,
.market-card span,
.market-card small,
.watch-card strong,
.watch-card span,
.watch-card small {
  display: block;
}

.market-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card span,
.market-card small,
.watch-card span,
.watch-card small {
  color: var(--muted);
}

.market-card span,
.watch-card span {
  font-weight: 800;
}

.market-card small {
  display: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.market-card.selected small {
  display: none;
}

.market-card span:not(.market-symbol) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 7px;
  overflow: hidden;
}

.market-card .stock-tags {
  display: none;
}

.stock-tags em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(67, 239, 173, 0.1);
  color: #c9ffe7;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.stock-tags em.hot {
  background: rgba(198, 75, 85, 0.14);
  color: #ffc6ca;
}

.stock-tags em.safe {
  background: rgba(78, 216, 255, 0.12);
  color: #c3f3ff;
}

.analysis-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.decision-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(180, 198, 225, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 167, 255, 0.16), rgba(255, 255, 255, 0.055)),
    rgba(7, 12, 22, 0.64);
}

.decision-report.positive {
  background:
    linear-gradient(135deg, rgba(255, 95, 104, 0.17), rgba(255, 255, 255, 0.055)),
    rgba(7, 12, 22, 0.64);
}

.decision-report.danger {
  background:
    linear-gradient(135deg, rgba(240, 180, 76, 0.16), rgba(255, 255, 255, 0.055)),
    rgba(7, 12, 22, 0.64);
}

.decision-report span,
.decision-report small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.decision-report strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.1;
}

.decision-report b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--score, 72) * 1%), rgba(255, 255, 255, 0.1) 0);
  box-shadow: inset 0 0 0 8px rgba(6, 10, 20, 0.92), 0 12px 28px rgba(92, 167, 255, 0.16);
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quote-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: linear-gradient(180deg, #ffffff, #f3faf6);
  min-height: 104px;
}

.quote-grid span,
.strategy-match span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quote-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.2;
  color: #061f18;
}

.visual-chart {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 143, 104, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 249, 243, 0.9)),
    repeating-linear-gradient(90deg, rgba(15, 143, 104, 0.07) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(15, 143, 104, 0.06) 0 1px, transparent 1px 54px);
  min-height: 220px;
  min-width: 0;
}

.visual-chart > span,
.scenario-visual > span {
  color: var(--muted);
  align-self: center;
  justify-self: center;
  text-align: center;
}

.visual-chart svg {
  width: 100%;
  height: auto;
  min-height: 160px;
}

.visual-chart line {
  stroke: rgba(15, 143, 104, 0.14);
  stroke-width: 2;
}

.visual-chart polyline {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visual-chart polyline.positive {
  stroke: #0aa875;
  filter: drop-shadow(0 8px 12px rgba(15, 143, 104, 0.18));
}

.visual-chart polyline.negative {
  stroke: var(--red);
}

.visual-chart circle {
  fill: #ffffff;
  stroke: var(--green);
  stroke-width: 4;
}

.chart-head,
.chart-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.chart-scale {
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.strategy-match,
.scenario-grid,
.backtest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.scenario-grid article {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  padding: 15px;
  border: 1px solid rgba(15, 143, 104, 0.16);
  border-radius: 8px;
  background: linear-gradient(160deg, #f5fff9, #ffffff 65%);
}

.scenario-grid article.positive strong {
  color: var(--positive);
}

.scenario-grid article.neutral strong {
  color: var(--green);
}

.scenario-grid article.danger strong {
  color: var(--warning);
}

.scenario-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(82, 241, 183, 0.16);
}

.scenario-grid span,
.scenario-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.scenario-grid strong {
  display: block;
  margin: 9px 0 7px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--green);
}

.strategy-match article,
.backtest-grid article {
  background: linear-gradient(180deg, #fffaf0, #ffffff);
  border: 1px solid rgba(185, 130, 22, 0.18);
  border-radius: 8px;
  padding: 13px;
}

.strategy-match {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 0.8fr);
}

.strategy-match strong,
.backtest-grid strong {
  display: block;
  margin-top: 7px;
  line-height: 1.35;
}

.ai-review-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(78, 216, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, #f1fbff, #ffffff 64%);
}

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

.backtest-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.locked-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(169, 101, 0, 0.45);
  border-radius: 8px;
  background: #fff8ed;
  color: var(--amber);
}

.locked-panel span {
  color: #7d5a25;
  line-height: 1.5;
}

.inline-upgrade {
  display: inline-grid;
  width: max-content;
  margin-top: 10px;
}

.current-plan-button {
  opacity: 0.76;
}

.compact {
  margin-top: 0;
}

.strategy-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  min-width: 0;
}

.strategy-card p {
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.55;
}

.strategy-card .practice-strategy-button {
  width: max-content;
  margin-top: 12px;
}

.practice-strategy-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.practice-note {
  padding: 12px;
  border: 1px solid rgba(37, 95, 136, 0.16);
  border-radius: 8px;
  background: #f4f9fb;
  color: var(--muted);
  line-height: 1.5;
}

.practice-note strong {
  color: var(--ink);
}

.slider-stack {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.slider-stack label {
  gap: 8px;
}

.slider-stack span {
  justify-self: end;
  color: var(--ink);
  font-weight: 900;
}

.scenario-visual {
  display: grid;
  gap: 12px;
  min-height: 170px;
  padding: 14px;
  border: 1px solid rgba(19, 107, 79, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #f4fbf7, #ffffff);
}

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

.scenario-numbers article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.scenario-numbers span,
.scenario-visual small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scenario-numbers strong {
  display: block;
  margin-top: 6px;
  line-height: 1.2;
}

.risk-bar {
  display: flex;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}

.risk-loss,
.risk-gain {
  display: grid;
  place-items: center;
  min-width: 34px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.risk-loss {
  background: var(--red);
}

.risk-gain {
  background: var(--green);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.tag.locked {
  background: #f7ead4;
  color: var(--amber);
}

.score {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green);
  background: conic-gradient(var(--green) calc(var(--score) * 1%), var(--green-2) 0);
  font-weight: 900;
  box-shadow: inset 0 0 0 7px #ffffff;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.checkline {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  background: var(--surface-2);
  line-height: 1.45;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 180px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(to top, #edf2ee, #ffffff);
  border: 1px solid var(--line);
  overflow: hidden;
}

.bar {
  flex: 1;
  min-width: 24px;
  border-radius: 8px 8px 4px 4px;
  background: var(--green);
  position: relative;
}

.bar.loss {
  background: var(--red);
}

.bar span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 680px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  display: flex;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 4px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(23, 32, 27, 0.08);
}

.section-head {
  margin-bottom: 18px;
}

.market-toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(150px, 0.8fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
  width: min(760px, 100%);
  min-width: 0;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 16px;
  align-items: start;
}

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

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: var(--ink);
  padding: 12px;
  min-width: 0;
}

input[type="range"] {
  padding: 0;
  height: 34px;
  accent-color: var(--green);
  background: transparent;
  cursor: grab;
}

input[type="range"]:active {
  cursor: grabbing;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 143, 104, 0.58);
  box-shadow: 0 0 0 4px rgba(15, 143, 104, 0.1);
  background: #ffffff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.insight,
.risk-result {
  margin-top: 16px;
  background: linear-gradient(180deg, rgba(232, 244, 239, 0.82), rgba(255, 255, 255, 0.72));
  border-radius: 8px;
  padding: 16px;
  line-height: 1.6;
}

.risk-result strong {
  display: block;
  font-size: 28px;
  margin: 8px 0;
}

.disclaimer,
.legal-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.disclaimer {
  margin-top: 14px;
}

.journal-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-3);
}

.journal-item strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.loss-text {
  color: var(--red);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}

.price-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 410px;
}

.price-card.featured {
  border-color: var(--green);
  box-shadow: 0 26px 78px rgba(15, 143, 104, 0.2);
  background: linear-gradient(180deg, #f0fff8, #ffffff);
}

.price-card strong {
  display: block;
  font-size: 30px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.price-card p,
.price-card li {
  color: var(--muted);
  line-height: 1.6;
}

.price-card ul {
  padding-left: 18px;
  margin-bottom: 18px;
}

.price-card button {
  width: 100%;
  margin-top: auto;
}

.legal-note {
  margin-top: 18px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 14, 12, 0.66);
  backdrop-filter: blur(12px);
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  display: grid;
  gap: 15px;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 247, 0.96));
  box-shadow: 0 30px 90px rgba(3, 18, 14, 0.34);
}

.auth-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.auth-message {
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 16px 18px;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .brand {
    justify-content: space-between;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: max-content;
    text-align: center;
  }

  .account-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px 16px;
    margin-top: 0;
  }

  .account-panel .eyebrow,
  .account-panel p {
    margin: 0;
  }

  .account-panel button {
    grid-row: auto;
    grid-column: auto;
    width: 100%;
  }

  .account-panel .plan-pill {
    grid-column: auto;
  }

  .metrics,
  .landing-strip,
  .landing-grid,
  .dashboard-grid,
  .analysis-grid,
  .form-layout,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .simulator-panel {
    grid-column: auto;
  }

  .analysis-ledger {
    grid-column: auto;
  }

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

  .landing-hero {
    min-height: 520px;
  }

  .hero-copy {
    padding: 112px 28px 34px;
  }

  .hero-signal-panel {
    top: 88px;
    right: 22px;
    width: min(260px, 48%);
  }

  .main {
    padding: 22px 18px 28px;
  }

  .topbar {
    position: static;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
  }
}

@media (max-width: 620px) {
  .main,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .section-head,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .segmented,
  .market-toolbar {
    width: 100%;
  }

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

  .stock-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 360px;
  }

  .market-summary {
    flex-direction: column;
  }

  .market-breadth {
    justify-content: flex-start;
  }

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

  .top-actions button,
  .segmented button {
    flex: 1;
  }

  .metrics,
  .landing-strip,
  .landing-grid,
  .quote-grid,
  .strategy-match,
  .scenario-grid,
  .backtest-grid,
  .scenario-numbers,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .account-panel {
    grid-template-columns: 1fr;
  }

  .account-panel button {
    grid-row: auto;
    grid-column: auto;
    width: 100%;
  }

  .plan-pill {
    width: 100%;
    text-align: center;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 18px;
  }

  .landing-hero {
    min-height: 590px;
  }

  .hero-copy {
    padding: 164px 20px 24px;
  }

  .hero-copy h2 {
    font-size: 36px;
  }

  .hero-copy p {
    font-size: 15px;
  }

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

  .hero-signal-panel {
    left: 20px;
    right: 20px;
    top: 66px;
    width: auto;
    padding: 14px;
  }

  .market-tape {
    left: 16px;
    right: 16px;
  }

  .hero-bars {
    right: 16px;
    bottom: 18px;
    width: 70%;
    height: 150px;
    gap: 7px;
  }

  .hero-chart-line {
    top: 42%;
    height: 150px;
  }

  .landing-feature h2 {
    font-size: 22px;
  }

  .panel,
  .metrics article,
  .price-card {
    padding: 16px;
  }

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

  .score {
    width: 54px;
    height: 54px;
  }

  .chart {
    gap: 6px;
    height: 156px;
  }

  .bar {
    min-width: 18px;
  }

  .bar span {
    font-size: 11px;
  }

  .segmented {
    overflow-x: auto;
  }

  .segmented button {
    min-width: 68px;
  }
}

@media (max-width: 390px) {
  .main,
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .primary,
  .ghost {
    width: 100%;
  }

  .nav-item {
    padding: 10px 12px;
  }

  .hero-copy h2 {
    font-size: 32px;
  }

  .landing-hero {
    min-height: 570px;
  }
}

/* Stitch-inspired premium terminal layer */
:root {
  --bg: #070a12;
  --surface: rgba(14, 20, 34, 0.84);
  --surface-2: rgba(20, 29, 48, 0.82);
  --surface-3: rgba(25, 37, 60, 0.72);
  --ink: #f6f8ff;
  --muted: #9da8b8;
  --line: rgba(180, 198, 225, 0.15);
  --green: #5ca7ff;
  --green-2: rgba(92, 167, 255, 0.16);
  --sidebar: #060914;
  --positive: #ff5f68;
  --negative: #4ea1ff;
  --warning: #f0b44c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.22);
}

body {
  background:
    radial-gradient(circle at 82% 4%, rgba(92, 167, 255, 0.22), transparent 28rem),
    radial-gradient(circle at 14% 12%, rgba(255, 95, 104, 0.13), transparent 24rem),
    radial-gradient(circle at 74% 64%, rgba(240, 180, 76, 0.1), transparent 24rem),
    linear-gradient(180deg, #070a12 0%, #101727 48%, #080b13 100%);
  color: var(--ink);
}

.main {
  max-width: 1500px;
}

.topbar {
  background: linear-gradient(180deg, rgba(7, 16, 13, 0.94), rgba(7, 16, 13, 0.68) 78%, transparent);
}

.top-summary,
.landing-strip p,
.landing-feature p,
.metrics span,
.metrics small,
.market-card span,
.market-card small,
.watch-card span,
.watch-card small,
.quote-grid span,
.strategy-match span,
.scenario-grid span,
.scenario-grid small,
.backtest-grid span,
.strategy-card p,
.price-card p,
.price-card li,
.disclaimer,
.legal-note,
label {
  color: var(--muted);
}

.landing-hero {
  min-height: 620px;
  border: 1px solid rgba(180, 198, 225, 0.15);
  background: #050813;
}

.hero-copy {
  padding: 142px 48px 48px;
}

.hero-copy h2 {
  max-width: 820px;
  text-shadow: 0 18px 70px rgba(67, 239, 173, 0.14);
}

.landing-strip article,
.landing-feature,
.metrics article,
.panel,
.price-card,
.auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(12, 18, 31, 0.82);
  border: 1px solid rgba(180, 198, 225, 0.14);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.landing-strip article,
.landing-feature,
.metrics article,
.panel {
  position: relative;
  overflow: hidden;
}

.landing-strip article::before,
.landing-feature::before,
.metrics article::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(92, 167, 255, 0.08), transparent 42%);
}

.panel > *,
.landing-strip article > *,
.landing-feature > *,
.metrics article > * {
  position: relative;
  z-index: 1;
}

.metrics strong,
.quote-grid strong,
.scenario-grid strong,
.risk-result strong,
.price-card strong,
.practice-note strong {
  color: var(--ink);
}

.scenario-grid article.positive strong {
  color: var(--positive);
}

.scenario-grid article.neutral strong {
  color: var(--green);
}

.scenario-grid article.danger strong {
  color: var(--warning);
}

.eyebrow,
.landing-strip span {
  color: #7db8ff;
}

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

.primary {
  background: linear-gradient(135deg, #77b7ff, #2f6fd0);
  color: #f8fbff;
  box-shadow: 0 18px 40px rgba(47, 111, 208, 0.34);
}

.ghost {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  border-color: rgba(180, 198, 225, 0.16);
}

.market-card,
.watch-card,
.quote-grid article,
.scenario-grid article,
.strategy-card,
.journal-item,
.scenario-numbers article,
.checkline {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(180, 198, 225, 0.13);
}

.market-card:hover,
.market-card.selected {
  background: linear-gradient(135deg, rgba(92, 167, 255, 0.2), rgba(255, 255, 255, 0.07));
  border-color: rgba(92, 167, 255, 0.5);
}

.market-summary {
  border-color: rgba(180, 198, 225, 0.14);
  background:
    linear-gradient(135deg, rgba(92, 167, 255, 0.12), rgba(255, 255, 255, 0.04) 48%, rgba(255, 95, 104, 0.06)),
    rgba(7, 12, 22, 0.58);
}

.market-breadth em {
  border-color: rgba(180, 198, 225, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.market-card-top b.up {
  color: #ffd7da;
  background: rgba(255, 95, 104, 0.16);
}

.market-card-top b.down {
  color: #d8eaff;
  background: rgba(78, 161, 255, 0.16);
}

.stock-tags em {
  background: rgba(92, 167, 255, 0.11);
  color: #d8eaff;
}

.stock-tags em.hot {
  background: rgba(255, 95, 104, 0.14);
  color: #ffd7da;
}

.stock-tags em.safe {
  background: rgba(240, 180, 76, 0.14);
  color: #ffe7b8;
}

.market-summary,
.visual-chart,
.scenario-visual,
.slider-stack,
.insight,
.risk-result,
.practice-note,
.ai-review-box,
.strategy-match article,
.backtest-grid article {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    rgba(7, 12, 22, 0.54);
  border: 1px solid rgba(180, 198, 225, 0.13);
  color: var(--ink);
}

.visual-chart {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(92, 167, 255, 0.04)),
    repeating-linear-gradient(90deg, rgba(180, 198, 225, 0.07) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(180, 198, 225, 0.055) 0 1px, transparent 1px 54px),
    rgba(6, 10, 20, 0.72);
}

.visual-chart circle {
  fill: #070a12;
  stroke: var(--green);
}

.visual-chart polyline.positive {
  stroke: var(--positive);
}

.visual-chart line {
  stroke: rgba(180, 198, 225, 0.13);
}

.chart {
  background:
    repeating-linear-gradient(0deg, rgba(180, 198, 225, 0.06) 0 1px, transparent 1px 42px),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(180, 198, 225, 0.12);
}

.bar {
  background: linear-gradient(180deg, #78b7ff, rgba(92, 167, 255, 0.28));
  box-shadow: 0 -10px 28px rgba(92, 167, 255, 0.18);
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(180, 198, 225, 0.15);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: rgba(243, 255, 249, 0.44);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(92, 167, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(92, 167, 255, 0.14);
}

option {
  background: #090d18;
  color: var(--ink);
}

th,
td {
  border-bottom-color: rgba(180, 198, 225, 0.12);
}

.segmented {
  background: rgba(255, 255, 255, 0.06);
}

.segmented button.active {
  background: rgba(92, 167, 255, 0.2);
  color: var(--ink);
}

.tag,
.plan-pill,
.storage-pill {
  background: rgba(92, 167, 255, 0.14);
  color: #d8eaff;
}

.locked-panel {
  background: rgba(185, 130, 22, 0.08);
}

.price-card.featured {
  background:
    linear-gradient(180deg, rgba(92, 167, 255, 0.16), rgba(255, 255, 255, 0.045)),
    rgba(12, 18, 31, 0.88);
  border-color: rgba(92, 167, 255, 0.45);
}

.score {
  color: #070a12;
  background: conic-gradient(var(--green) calc(var(--score) * 1%), rgba(255, 255, 255, 0.11) 0);
  box-shadow: inset 0 0 0 7px rgba(6, 10, 20, 0.92), 0 0 24px rgba(92, 167, 255, 0.16);
}

@media (max-width: 620px) {
  .landing-hero {
    min-height: 620px;
  }

  .hero-copy {
    padding: 172px 20px 24px;
  }
}
