@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@500;600;700&family=DM+Sans:wght@400..700&family=Noto+Sans+JP:wght@400..700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0c111c;
  --panel: #121925;
  --panel-hover: #182230;
  --border: #232c3c;
  --text: #edf2f7;
  --muted: #7f8ba0;
  --dim: #566278;
  --mint: #54e0b1;
  --mint-dim: #142c29;
  --coral: #ed8587;
  --purple: #a897f8;
  --amber: #e4b477;
  --rail: 76px;
  --radius: 12px;
  --font: "DM Sans", "Noto Sans JP", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--mint);
}
button {
  transition:
    background 0.16s,
    color 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button svg {
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
}
svg {
  vertical-align: middle;
}
strong,
b {
  font-weight: 600;
}
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #354055;
  border-radius: 5px;
}
::selection {
  background: #54e0b144;
  color: #fff;
}
.positive {
  color: var(--mint) !important;
}
.negative {
  color: var(--coral) !important;
}
.muted {
  color: var(--muted);
}
.amber {
  color: var(--amber);
}
.text-xs {
  font-size: 10px;
}
.full-width {
  width: 100%;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px #54e0b126;
  flex-shrink: 0;
}
.term {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.term svg {
  color: #65738a;
}
.term:hover,
.term:hover svg {
  color: var(--mint);
}

/* Navigation */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  border-right: 1px solid var(--border);
  background: #0f1520;
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 30;
}
.rail-logo {
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.rail-logo img {
  border-radius: 11px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 27px;
  width: 100%;
  align-items: center;
}
.rail-button {
  width: 46px;
  height: 46px;
  color: #6d7a90;
  border-radius: 10px;
  display: grid;
  place-items: center;
  position: relative;
}
.rail-button:hover {
  background: #1a2331;
  color: #c6d2e3;
}
.rail-button.active {
  background: #1b332f;
  color: var(--mint);
}
.rail-button.active:before {
  content: "";
  position: absolute;
  left: -15px;
  width: 3px;
  height: 25px;
  background: var(--mint);
  border-radius: 0 3px 3px 0;
}
.rail-label {
  position: absolute;
  left: 57px;
  background: #273345;
  padding: 6px 10px;
  border-radius: 5px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  transform: translateX(-4px);
  transition: 0.16s;
}
.rail-button:hover .rail-label {
  opacity: 1;
  transform: translateX(0);
}
.nav-dot {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}
.rail-bottom {
  margin-top: auto;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.rail-avatar,
.player-avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2a3045;
  border: 1px solid #474259;
  color: #c4b5ed;
  font-family: "Barlow", sans-serif;
  font-weight: 600;
}
.rail-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
  margin-top: 8px;
}
.app-shell {
  margin-left: var(--rail);
}
.topbar {
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  background: #0e141f;
}
.brand {
  display: flex;
  align-items: center;
  font-family: "Barlow", sans-serif;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 1.3px;
  font-weight: 700;
  gap: 5px;
}
.brand > span:first-child {
  color: var(--mint);
}
.brand-divider {
  width: 1px;
  height: 19px;
  background: #303849;
  margin: 0 13px 0 15px;
}
.brand small {
  font-size: 10px;
  letter-spacing: 1px;
  font-family: var(--font);
  color: var(--muted);
  font-weight: 400;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 21px;
}
.simulation-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #27362f;
  border-radius: 5px;
  padding: 4px 9px;
  color: #a6c0b6;
  font-size: 10px;
  background: #15231f;
}
.header-divider {
  height: 19px;
  width: 1px;
  background: var(--border);
}
.help-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #97a3b6;
  font-size: 11px;
}
.help-link:hover {
  color: var(--mint);
}
.player-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.player-avatar span {
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 0;
  right: 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--mint);
}

/* Overview */
main {
  max-width: 1750px;
  margin: 0 auto;
  padding: 29px 32px 108px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 24px;
}
.eyebrow {
  color: #8291a6;
  font-size: 9px;
  letter-spacing: 1.85px;
  line-height: 1.5;
  font-weight: 600;
}
.page-heading h1 {
  font-size: 25px;
  letter-spacing: 1.05px;
  line-height: 1.5;
  margin: 5px 0 6px;
  font-weight: 650;
}
.page-description {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.challenge-status {
  width: 280px;
  flex-shrink: 0;
  padding-top: 5px;
}
.challenge-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c4ccda;
  font-size: 11px;
}
.challenge-name > svg {
  color: #a5b2c4;
}
.day-count {
  margin-left: auto;
  color: var(--mint);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.day-count b {
  font-size: 19px;
  margin-left: 5px;
}
.day-count > span {
  color: #6e7c93;
  font-size: 11px;
  letter-spacing: 0;
}
.day-progress {
  height: 4px;
  border-radius: 3px;
  background: #27313e;
  overflow: hidden;
  margin: 9px 0 7px;
}
.day-progress > span {
  display: block;
  background: var(--mint);
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s;
}
.challenge-date {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
  color: var(--muted);
}
.challenge-date > span {
  font-size: 7px;
  color: #56657a;
  letter-spacing: 0.6px;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr 1fr;
  gap: 17px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 13px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.main-stat {
  background: linear-gradient(110deg, #152524, #131e26);
  border-color: #294039;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #9aa7bb;
  font-weight: 500;
  line-height: 1.4;
}
.stat-label > svg {
  color: #81958f;
}
.stat-label > .live-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
}
.stat-label > .term {
  margin-left: 0;
}
.stat-number {
  font-family: "DM Sans", sans-serif;
  font-size: 29px;
  letter-spacing: -0.85px;
  font-weight: 600;
  line-height: 1.55;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0 4px;
  white-space: nowrap;
}
.main-stat .stat-number {
  font-size: 31px;
}
.stat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}
.stat-hint {
  font-size: 9px;
  color: #7f8c9e;
  white-space: nowrap;
}
.stat-detail {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  color: #b5c1d1;
}
.mini-chart {
  width: 75px;
  height: 23px;
  margin-top: -2px;
}
.sparkline {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.percent-badge {
  padding: 3px 6px;
  background: #1c342f;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}
.percent-badge.negative {
  background: #34242e;
}
.stat-unit {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin: 8px 0 0 -3px;
  letter-spacing: 0;
}
.level-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #b7a8e8;
  border: 1px solid #3b324e;
  background: #292238;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 3px 6px;
  margin-left: auto;
}

/* Main trading grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 278px;
  gap: 20px;
  align-items: start;
}
.left-column,
.center-column,
.right-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-heading {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
  flex-shrink: 0;
}
.panel-heading h2 {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 550;
  white-space: nowrap;
}
.panel-heading h2 > svg {
  color: #96a3b7;
}
.tiny-badge {
  font-size: 9px;
  color: #9aa6b7;
  background: #1e2836;
  border: 1px solid #2b3545;
  border-radius: 4px;
  padding: 0 6px;
  line-height: 19px;
}
.watchlist .panel-heading {
  height: 55px;
}
.watchlist-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 15px 9px;
  font-size: 8px;
  color: #68768a;
  letter-spacing: 0.2px;
}
.stock-list {
  padding: 0 7px;
}
.stock-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  padding: 16px 8px;
  border-radius: 7px;
  min-width: 0;
  border: 1px solid transparent;
  margin-bottom: 2px;
}
.stock-row:hover {
  background: #1a2432;
}
.stock-row.selected {
  background: #1b2e2b;
  border-color: #2b4940;
}
.stock-row.selected:before {
  content: "";
  position: absolute;
  width: 2px;
  height: 20px;
  left: -8px;
  background: var(--mint);
  border-radius: 0 3px 3px 0;
}
.company-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--company-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--company-color) 16%, transparent);
  border-radius: 10px;
  color: var(--company-color);
  font-family: "Barlow", sans-serif;
  font-size: 15px;
  letter-spacing: -0.3px;
  font-weight: 600;
}
.company-mark.small {
  width: 29px;
  height: 29px;
  border-radius: 7px;
  font-size: 11px;
}
.stock-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.stock-identity strong {
  font-family: "Barlow", sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.12px;
}
.stock-identity small {
  color: #829082;
  font-size: 7px;
  white-space: nowrap;
}
.stock-row:not(.selected) .stock-identity small {
  color: #748097;
}
.stock-numbers {
  display: flex;
  flex-direction: column;
  text-align: right;
  gap: 2px;
  flex-shrink: 0;
}
.stock-numbers strong {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.6;
}
.stock-numbers small {
  font-size: 9px;
  line-height: 1.3;
}
.watchlist-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 15px 13px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 8px;
  color: #718096;
}
.watchlist-footer > .live-dot {
  width: 4px;
  height: 4px;
  background: #8b9aaf;
  box-shadow: none;
}
.watchlist-footer > span:last-child {
  margin-left: auto;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
}
.market-pulse .panel-heading {
  height: 47px;
  padding: 0 16px;
}
.market-pulse .panel-heading h2 {
  font-size: 10px;
  gap: 6px;
}
.pulse-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 16px 11px;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #cfdae4;
}
.pulse-icon {
  color: #92a9bc;
  opacity: 0.7;
}
.sentiment-meter {
  height: 5px;
  margin: 0 16px;
  border-radius: 5px;
  background: linear-gradient(90deg, #bc6d78, #a49672 45%, #54b394);
  position: relative;
}
.sentiment-meter > span {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 13px;
  background: #e9eef3;
  box-shadow: 0 0 0 3px #121925;
  border-radius: 2px;
  transform: translateX(-50%);
}
.meter-labels {
  display: flex;
  justify-content: space-between;
  margin: 7px 16px 0;
  font-size: 8px;
  color: #6e7d91;
}
.market-pulse > p {
  font-size: 8px;
  margin: 14px 16px 14px;
  color: #728097;
}
.sidebar-note {
  display: flex;
  gap: 9px;
  color: #546479;
  padding: 0 10px;
  font-size: 8px;
  line-height: 1.9;
}
.sidebar-note > svg {
  margin-top: 3px;
  color: #6b7a8b;
}

/* Price chart */
.chart-panel {
  padding: 19px 20px 0;
  background: linear-gradient(130deg, #151d2a, #121925 70%);
}
.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.company-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.company-title h2 {
  font-family: "Barlow", "DM Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.6px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.company-title p {
  font-size: 9px;
  color: #7c899e;
  letter-spacing: 0.1px;
  margin-top: 1px;
}
.company-title p > span {
  color: #586477;
  margin: 0 4px;
}
.listing-badge {
  font-family: "DM Sans", sans-serif;
  color: #7e8da3;
  border: 1px solid #344051;
  font-size: 8px;
  line-height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  letter-spacing: 0.2px;
}
.icon-button {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #718099;
  border-radius: 5px;
}
.icon-button:hover {
  background: #243142;
  color: #c8d2df;
}
.icon-button.active {
  background: #263331;
  color: var(--mint);
}
.price-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
}
.selected-price {
  font-family: "DM Sans", sans-serif;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -1.1px;
  font-weight: 550;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.selected-price > span {
  font-size: 10px;
  color: #69768d;
  letter-spacing: 0.6px;
  font-weight: 400;
}
.price-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding-top: 7px;
  white-space: nowrap;
}
.price-change > span {
  font-size: 10px;
}
.market-open {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  color: #87a99b;
  margin-top: 5px;
}
.market-open > .live-dot {
  width: 4px;
  height: 4px;
  animation: live-pulse 3s infinite;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 9px;
}
.range-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0e1520;
  padding: 3px;
  border-radius: 5px;
}
.range-buttons button {
  font-size: 9px;
  font-weight: 600;
  min-width: 32px;
  padding: 2px 7px;
  border-radius: 3px;
  color: #718199;
}
.range-buttons button.active {
  background: #27332f;
  color: var(--mint);
}
.range-buttons button:hover {
  color: var(--text);
}
.chart-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chart-tools .icon-button {
  width: 27px;
  height: 24px;
}
.chart-help {
  font-size: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #77869b;
  margin-right: 5px;
}
.chart-help:hover {
  color: var(--mint);
}
.toolbar-divider {
  width: 1px;
  height: 15px;
  background: #2b3544;
  margin-right: 5px;
}
.ohlc {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  color: #697a92;
  font-size: 8px;
  white-space: nowrap;
}
.ohlc b {
  color: #acb8c9;
  font-size: 9px;
  font-weight: 400;
  margin-left: 3px;
}
.ohlc > span:first-child {
  color: #75869e;
  font-size: 8px;
}
.chart-container {
  margin: 0 -8px -1px -10px;
  position: relative;
}
.price-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.candle-hit:hover {
  fill: #9faec010;
  stroke: #93a4b025;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.company-metrics {
  border-top: 1px solid #27303f;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.1fr 0.9fr;
  margin-top: 9px;
  padding: 15px 0 16px;
}
.company-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid #27303e;
  padding-left: 16px;
}
.company-metrics > div:first-child {
  padding-left: 0;
}
.company-metrics > div:last-child {
  border: 0;
}
.company-metrics > div > span,
.company-metrics .term {
  font-size: 8px;
  color: #7a899d;
  white-space: nowrap;
}
.company-metrics > div > strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.company-metrics strong small {
  font-size: 9px;
  font-weight: 400;
  color: #a7b2c2;
}
.company-metrics .risk-level {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 11px;
}
.risk-level i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* News */
.news-panel .panel-heading {
  height: 51px;
  border-bottom: 1px solid var(--border);
}
.live-label {
  font-family: "DM Sans", sans-serif;
  font-size: 7px;
  letter-spacing: 0.8px;
  background: #2b2521;
  color: #dcaf7b;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 1px;
}
.news-count {
  font-size: 8px;
  color: #707d93;
}
.news-list {
  padding: 0 18px;
}
.news-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  text-align: left;
  border-bottom: 1px solid #222b39;
  padding: 14px 0;
}
.news-item:last-child {
  border: 0;
}
.news-item:hover .news-content strong {
  color: var(--mint);
}
.news-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex-shrink: 0;
  border-radius: 7px;
  background: #192f2b;
  color: #70bea6;
}
.news-icon.negative {
  background: #30232b;
}
.news-icon.mixed {
  color: #b8a3e0;
  background: #29243a;
}
.news-content {
  flex: 1;
  min-width: 0;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 7px;
  line-height: 1.5;
  color: #8294a9;
}
.news-meta > span:first-child {
  color: #a0b2c9;
}
.news-meta > span:last-child {
  color: #617086;
  display: flex;
  align-items: center;
  gap: 4px;
}
.news-meta i {
  font-style: normal;
}
.news-content strong {
  display: block;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.8;
  letter-spacing: 0.15px;
  margin-top: 4px;
  transition: color 0.2s;
}
.news-item > svg {
  color: #66778e;
  width: 13px;
}
.news-footnote {
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid #232c3b;
  font-size: 7px;
  color: #63748a;
  padding: 10px 18px;
  line-height: 1.7;
}

/* Order ticket */
.order-panel > .panel-heading {
  height: 53px;
}
.order-panel form {
  padding: 0 18px 17px;
}
.side-selector {
  display: flex;
  background: #0c131d;
  border: 1px solid #26303f;
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
}
.side-selector button {
  width: 50%;
  border-radius: 4px;
  font-size: 11px;
  padding: 6px;
  color: #7e8da1;
  font-weight: 500;
}
.side-selector .active.buy {
  background: #234e40;
  color: #73edbd;
}
.side-selector .active.sell {
  background: #5a3039;
  color: #ffc1bd;
}
.side-selector button:hover {
  background: #263444;
}
.order-stock {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 12px;
  margin: 19px 0 17px;
  letter-spacing: 0.5px;
}
.order-stock > span:last-child {
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  color: #63718a;
  letter-spacing: 0.3px;
}
.order-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.order-type-row > span {
  font-size: 9px;
  color: #8d9ab0;
}
.order-type {
  display: flex;
  gap: 17px;
}
.order-type > button {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8190a5;
  font-size: 10px;
  padding: 0;
}
.order-type > button i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #48556a;
}
.order-type > button.active {
  color: #dbe7e7;
}
.order-type > button.active i {
  border: 3px solid var(--mint);
  background: #123628;
}
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #a5b2c3;
  margin-bottom: 7px;
}
.form-label > span {
  color: #5f718a;
  font-size: 8px;
}
.quantity-field {
  display: flex;
  align-items: center;
  height: 41px;
  border: 1px solid #344051;
  border-radius: 5px;
  background: #0e1520;
  overflow: hidden;
}
.quantity-field > button {
  height: 100%;
  width: 37px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #8796ac;
}
.quantity-field > button:hover {
  background: #263444;
  color: #dce8ed;
}
.quantity-field > button:first-child {
  border-right: 1px solid #28313f;
}
.quantity-field > button:last-child {
  border-left: 1px solid #28313f;
}
.quantity-field > input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: center;
  outline: none;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  height: 100%;
  padding-left: 14px;
}
.quantity-field > span {
  font-size: 9px;
  color: #6b7e97;
  margin-right: 17px;
}
.quantity-field:focus-within {
  border-color: #54e0b188;
}
.quantity-shortcuts {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}
.quantity-shortcuts button {
  flex: 1;
  border: 1px solid #2a3545;
  background: #192330;
  border-radius: 4px;
  color: #8c9cb2;
  font-size: 8px;
  padding: 3px;
}
.quantity-shortcuts button:hover {
  color: var(--mint);
  border-color: #4c7162;
}
.limit-field {
  display: flex;
  align-items: center;
  border: 1px solid #344051;
  background: #0e1520;
  border-radius: 5px;
  margin-bottom: 13px;
  padding: 0 12px;
  height: 38px;
  gap: 9px;
}
.limit-field > span {
  color: #8c9db4;
}
.limit-field input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
  font-size: 14px;
}
.limit-field:focus-within {
  border-color: var(--mint);
}
#order-estimate {
  margin-top: 20px;
}
.estimate-row,
.estimate-total,
.order-available {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.estimate-row {
  font-size: 9px;
  color: #a7b5c8;
  margin: 8px 0;
}
.estimate-row > span:first-child {
  color: #7f8da2;
  font-size: 8px;
}
.estimate-row small {
  font-size: 8px;
  color: #607189;
  margin-left: 4px;
}
.estimate-total {
  border-top: 1px solid #2a3444;
  padding-top: 12px;
  margin-top: 13px;
}
.estimate-total > span {
  font-size: 10px;
  color: #a1aec0;
}
.estimate-total > strong {
  font-size: 20px;
  font-family: "DM Sans", sans-serif;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.order-available {
  font-size: 8px;
  color: #687b94;
  margin-top: 11px;
}
.order-available > span:last-child {
  color: #9aabbe;
  font-size: 9px;
}
.reserve-note {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  color: #687c91;
  font-size: 7px;
  margin-top: 6px;
  line-height: 1.7;
}
.reserve-note > span {
  font-size: 7px;
  color: #5b6e86;
}
.primary-button {
  background: var(--mint);
  color: #0c2e24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  min-height: 42px;
  border-radius: 6px;
  padding: 11px 18px;
  transition: 0.18s;
  box-shadow: 0 3px 12px #0000000a;
}
.primary-button:hover:not(:disabled) {
  background: #7aebc3;
  box-shadow: 0 3px 16px #54e0b112;
  transform: translateY(-1px);
}
.primary-button:active:not(:disabled) {
  transform: translateY(0);
}
.order-submit {
  width: 100%;
  margin-top: 16px;
  min-height: 41px;
  font-size: 11px;
  gap: 7px;
}
.order-submit > svg:last-child {
  margin-left: auto;
}
.order-submit > span {
  flex: 1;
}
.order-submit > svg:first-child {
  margin-right: auto;
}
.sell-button {
  background: #ed9293;
  color: #3c1a21;
}
.sell-button:hover:not(:disabled) {
  background: #f5aaab;
}
.execution-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 11px;
  font-size: 7px;
  color: #718198;
}
.order-error {
  color: var(--coral);
  font-size: 9px;
  line-height: 1.7;
}
.order-error:not(:empty) {
  padding-top: 10px;
}
.positions-panel .panel-heading {
  height: 51px;
}
.empty-position {
  text-align: center;
  padding: 10px 10px 25px;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #1b2432;
  color: #50637d;
  margin: 0 auto 12px;
  border: 1px solid #253042;
}
.empty-position p {
  font-size: 9px;
  color: #92a2b7;
}
.empty-position small {
  display: block;
  font-size: 8px;
  color: #5f718b;
  margin-top: 6px;
}
.compact-positions {
  padding: 0 15px;
}
.compact-position {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid #26303f;
  width: 100%;
  text-align: left;
}
.compact-position > span:not(.company-mark) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.compact-position > span:last-child {
  margin-left: auto;
  text-align: right;
}
.compact-position strong {
  font-size: 10px;
}
.compact-position small {
  font-size: 8px;
  color: var(--muted);
}
.positions-link {
  margin: 12px 16px 16px;
  font-size: 9px !important;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a6b7c9;
  font-size: 10px;
  font-weight: 450;
  padding: 0;
}
.text-link:hover {
  color: var(--mint);
}

/* Guidance, activity, bottom dock */
.learning-banner {
  margin-top: 22px;
  border: 1px solid #2a3d3b;
  background: linear-gradient(105deg, #142b27 0%, #152322 42%, #141d29 100%);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 17px;
  position: relative;
  overflow: hidden;
}
.learning-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 43px;
  height: 43px;
  border-radius: 11px;
  border: 1px solid #32564a;
  background: #204338;
  color: #6fdfb5;
}
.learning-banner .eyebrow {
  color: #6fba9e;
  font-size: 7px;
  letter-spacing: 1.5px;
}
.learning-banner h3 {
  font-size: 13px;
  letter-spacing: 0.35px;
  margin: 3px 0 5px;
}
.learning-banner p {
  color: #8ea69f;
  font-size: 9px;
  line-height: 1.9;
}
.lesson-cta {
  display: flex;
  align-items: center;
  gap: 17px;
  white-space: nowrap;
  margin-left: auto;
  color: #92d5bc;
  font-size: 10px;
  border: 1px solid #385346;
  border-radius: 5px;
  padding: 9px 13px;
}
.lesson-cta:hover {
  background: #28473b;
}
.dismiss-guide {
  position: absolute;
  right: 7px;
  top: 1px;
  font-size: 17px;
  color: #4d6b63;
}
.welcome-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.welcome-actions .primary-button {
  font-size: 9px;
  min-height: 35px;
  padding: 8px 12px;
  gap: 8px;
}
.subtle-button {
  color: #738d83;
  font-size: 8px;
  padding: 2px 4px;
}
.subtle-button:hover {
  color: var(--mint);
}
.activity-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 21px 2px 17px;
  border-bottom: 1px solid #202a37;
}
.activity-preview h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #a2b0c4;
  font-weight: 500;
}
.activity-preview h3 > span {
  border-left: 1px solid #354052;
  margin-left: 6px;
  padding-left: 14px;
  color: #687a92;
  font-size: 8px;
  font-weight: 400;
}
.activity-preview p {
  font-size: 8px;
  color: #61728a;
  margin: 7px 0 0 24px;
}
.activity-preview > .text-link {
  font-size: 9px;
}
.educational-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #4e5f77;
  font-size: 7px;
  padding-top: 18px;
  line-height: 1.8;
}
.educational-note > span {
  letter-spacing: 1.25px;
  font-size: 7px;
  white-space: nowrap;
  color: #526479;
}
.day-dock {
  position: fixed;
  left: var(--rail);
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  height: 84px;
  padding: 0 32px;
  background: #111824ef;
  backdrop-filter: blur(16px);
  border-top: 1px solid #2b3543;
  box-shadow: 0 -6px 30px #05091030;
}
.dock-left {
  display: flex;
  align-items: center;
  gap: 22px;
}
.dock-day {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 0.7px;
  color: #8392a8;
  white-space: nowrap;
}
.dock-day b {
  font-size: 26px;
  color: #dfebe9;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.dock-day small {
  font-size: 10px;
  color: #5f718a;
}
.dock-divider {
  height: 28px;
  width: 1px;
  background: #2d3849;
}
.dock-left > div > strong {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
}
.dock-left p {
  font-size: 8px;
  color: #6f8097;
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.dock-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.save-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  color: #6d867b;
}
.next-day-button {
  min-width: 200px;
  min-height: 43px;
  gap: 29px;
  border-radius: 5px;
  font-size: 12px;
  box-shadow: 0 0 20px #4fe1ae07;
}
.recap-button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #8ba399;
}
.recap-button:hover {
  color: var(--mint);
}
.mobile-tabs {
  display: none;
}

/* Portfolio, history and academy */
.portfolio-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.equity-total {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 31px;
  letter-spacing: -0.8px;
  padding: 8px 23px 0;
}
.equity-total > span {
  font-size: 13px;
  letter-spacing: 0;
}
.equity-chart {
  padding: 14px 17px 0;
}
.equity-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 19px;
  padding: 0 10px;
  font-size: 9px;
  color: #90a2b6;
}
.chart-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.panel-note {
  color: #6f8095;
  font-size: 9px;
  line-height: 1.9;
  padding: 13px 20px 16px;
}
.allocation-donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  padding: 20px;
  margin: 17px auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.allocation-donut > div {
  background: var(--panel);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 0 0 4px var(--panel);
}
.allocation-donut small {
  font-size: 9px;
  color: var(--muted);
}
.allocation-donut strong {
  font-size: 28px;
  line-height: 1.5;
  font-weight: 500;
}
.allocation-donut strong > span {
  color: var(--muted);
  font-size: 12px;
}
.allocation-legend {
  padding: 0 23px 19px;
}
.allocation-legend > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  gap: 10px;
  margin-top: 9px;
}
.allocation-legend > div > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9eafc4;
}
.allocation-legend i {
  width: 7px;
  height: 7px;
  border-radius: 3px;
}
.allocation-legend strong {
  font-size: 10px;
  font-weight: 500;
}
.holdings-table-panel .panel-heading {
  border-bottom: 1px solid var(--border);
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  color: #73859d;
  font-size: 9px;
  font-weight: 400;
  padding: 14px 15px;
  background: #101722;
}
td {
  font-size: 11px;
  padding: 16px 15px;
  border-top: 1px solid #232d3c;
}
.table-stock {
  display: flex;
  align-items: center;
  gap: 10px;
}
.table-stock strong {
  font-size: 11px;
}
.small-button {
  border: 1px solid #344153;
  border-radius: 5px;
  background: #1c2736;
  color: #aabbd0;
  font-size: 10px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.small-button:hover {
  border-color: #5a8d77;
  color: var(--mint);
  background: #20362e;
}
.risk-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-top: 20px;
}
.mini-metric {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mini-metric > span {
  font-size: 10px;
  color: #91a2ba;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mini-metric strong {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.6px;
}
.mini-metric small {
  font-size: 8px;
  line-height: 1.8;
  color: #697e99;
}
.filter-buttons {
  display: flex;
  gap: 4px;
  background: #0d1420;
  border-radius: 5px;
  padding: 3px;
}
.filter-buttons > button {
  font-size: 10px;
  color: #7b90a9;
  padding: 4px 10px;
  border-radius: 3px;
}
.filter-buttons > button.active {
  background: #243b33;
  color: var(--mint);
}
.orders-view > .panel-heading {
  height: 65px;
  border-bottom: 1px solid var(--border);
}
.order-cards {
  padding: 0 22px;
}
.order-history-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.order-history-card:last-child {
  border-bottom: 0;
}
.order-history-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.order-history-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.order-history-title strong {
  font-size: 12px;
  letter-spacing: 0.3px;
}
.order-history-title small {
  font-size: 9px;
  color: #71859f;
}
.status-badge {
  margin-left: auto;
  background: #27313d;
  border: 1px solid #3b4859;
  border-radius: 4px;
  padding: 2px 9px;
  font-size: 9px;
  color: #a2aebf;
}
.status-badge.pending {
  color: #d4b989;
  background: #332e24;
  border-color: #4d4433;
}
.status-badge.filled {
  color: #8ed6b8;
  background: #1d342d;
  border-color: #2d5043;
}
.order-history-details {
  margin: 14px 0 0 41px;
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 11px;
  color: #b4c2d3;
  flex-wrap: wrap;
}
.order-history-details > small,
.order-history-details > .cancel-button {
  margin-left: auto;
}
.cancel-button:hover {
  color: var(--coral);
  border-color: #a2646c;
  background: #38272d;
}
.large-empty {
  padding: 55px 22px;
  text-align: center;
  color: #8497b0;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  min-height: 170px;
}
.large-empty > svg {
  color: #455b74;
}
.large-empty h3 {
  font-size: 15px;
  color: #b4c2d4;
  font-weight: 500;
}
.large-empty p {
  font-size: 11px;
  margin-top: -5px;
}
.large-empty > .small-button {
  margin-top: 6px;
}
.academy-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.daily-quiz-panel {
  padding: 25px 28px;
}
.quiz-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  font-size: 10px;
  letter-spacing: 1px;
}
.quiz-label > span {
  color: #7e91a8;
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0;
}
.quiz-content h3 {
  font-size: 17px;
  letter-spacing: 0.2px;
  line-height: 1.9;
  margin: 18px 0 20px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #334053;
  background: #161f2d;
  border-radius: 7px;
  padding: 11px 13px;
  text-align: left;
  font-size: 12px;
  color: #becbda;
  line-height: 1.8;
}
.quiz-option:hover:not(:disabled) {
  background: #20332f;
  border-color: #568b75;
}
.option-letter {
  width: 23px;
  height: 23px;
  border-radius: 5px;
  background: #273347;
  color: #869db7;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}
.quiz-option.correct {
  border-color: #3b8f6a;
  background: #19392e;
  color: #9ce4c2;
  opacity: 1;
}
.quiz-option.correct .option-letter {
  background: #27523e;
  color: var(--mint);
}
.quiz-option.incorrect {
  border-color: #8c565b;
  background: #3a262f;
  opacity: 1;
  color: #e4a7ad;
}
.quiz-option > svg:last-child {
  margin-left: auto;
  flex-shrink: 0;
}
.quiz-optional {
  font-size: 9px;
  color: #778ba6;
  margin-top: 16px;
}
.quiz-feedback {
  padding-top: 18px;
  font-size: 12px;
  color: #b4c6d5;
}
.quiz-feedback strong {
  font-size: 13px;
}
.quiz-feedback p {
  font-size: 11px;
  color: #a2b7c9;
  line-height: 1.9;
  margin-top: 6px;
}
.academy-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 30px;
}
.academy-progress > .learning-icon {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  margin-bottom: 22px;
}
.academy-progress > .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #89b19f;
}
.academy-progress h2 {
  font-size: 20px;
  letter-spacing: 0.6px;
  margin: 8px 0 12px;
}
.academy-progress > p:not(.eyebrow) {
  font-size: 11px;
  color: #8a9fb5;
  line-height: 2;
}
.academy-progress > strong {
  font-size: 30px;
  margin-top: 20px;
  font-weight: 500;
  color: var(--mint);
}
.academy-progress > strong > span {
  font-size: 11px;
  color: #7890a6;
}
.academy-progress .day-progress {
  width: 80%;
  height: 5px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 30px 0 18px;
}
.section-title h2 {
  font-size: 16px;
  letter-spacing: 0.4px;
}
.section-title > span {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #617b93;
}
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}
.lesson-card {
  text-align: left;
  padding: 21px 22px;
  transition: 0.2s;
}
.lesson-card:hover {
  border-color: #3f6657;
  background: #182923;
  transform: translateY(-2px);
}
.lesson-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: #708b9d;
}
.lesson-number {
  font-family: "Barlow", sans-serif;
  font-size: 21px;
  color: #61788f;
}
.learned-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8fcab2;
  font-size: 9px;
}
.lesson-card h3 {
  font-size: 14px;
  margin-bottom: 10px;
}
.lesson-card p {
  font-size: 10px;
  line-height: 2;
  color: #8197ad;
  min-height: 40px;
}
.lesson-card > .text-link {
  margin-top: 21px;
  font-size: 10px;
  color: #9ac5af;
}

/* Dialogs */
.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #050912b8;
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  animation: fade-in 0.2s ease;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 550px;
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(135deg, #182231, #111a27);
  border: 1px solid #354356;
  border-radius: 16px;
  padding: 34px;
  box-shadow: 0 24px 100px #0007;
  animation: modal-in 0.25s ease;
}
.wide-modal {
  max-width: 780px;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #92a4b8;
  width: 30px;
  height: 30px;
  z-index: 1;
}
.modal-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #83bba4;
  font-size: 9px;
  letter-spacing: 1.5px;
  margin: 3px 20px 24px 0;
}
.modal h2 {
  font-size: 22px;
  line-height: 1.8;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}
.modal-feature-icon {
  display: grid;
  place-items: center;
  width: 59px;
  height: 59px;
  border: 1px solid #3b5b4f;
  border-radius: 13px;
  background: #203d32;
  color: #82d8b3;
  margin-bottom: 20px;
}
.lesson-body {
  font-size: 13px;
  line-height: 2.2;
  color: #b1c2d4;
  margin: 15px 0 22px;
}
.lesson-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #182e29;
  border: 1px solid #2b4c3d;
  border-radius: 8px;
  padding: 16px;
  margin: 23px 0;
  color: #94bda9;
}
.lesson-tip > span {
  color: #78c6a5;
  flex-shrink: 0;
  padding-top: 1px;
}
.lesson-tip strong {
  font-size: 11px;
  font-weight: 500;
  color: #bbd6c7;
  display: block;
  margin-bottom: 5px;
}
.lesson-tip p {
  font-size: 11px;
  line-height: 2;
}
.modal-footnote {
  font-size: 9px;
  text-align: center;
  color: #718ba0;
  margin-top: 13px;
  line-height: 1.9;
}
.lesson-example {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 15px;
  padding: 0 4px 22px;
}
.lesson-example > span {
  font-size: 10px;
  color: #9caebf;
}
.lesson-example strong {
  font-size: 13px;
}
.modal-company-title {
  margin-top: 15px;
}
.modal-company-title h2 {
  font-size: 22px;
  margin: 0;
  line-height: 1.4;
}
.modal-company-title p {
  font-size: 10px;
}
.modal-company-title .company-mark {
  width: 48px;
  height: 48px;
  font-size: 18px;
}
.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.profile-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #182230;
  border-radius: 6px;
  padding: 14px;
}
.profile-metrics span {
  font-size: 9px;
  color: #7b94ad;
}
.profile-metrics strong {
  font-size: 16px;
}
.modal-section-title {
  font-size: 13px;
  margin: 25px 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal-section-title > span {
  font-size: 10px;
  color: #83a69a;
}
.profile-news {
  display: flex;
  flex-direction: column;
}
.profile-news button {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  text-align: left;
  border-bottom: 1px solid #2c3b4a;
  align-items: center;
}
.profile-news button > span {
  font-size: 8px;
  color: #7a8fa7;
  white-space: nowrap;
}
.profile-news button > strong {
  font-size: 11px;
  font-weight: 400;
  color: #b2c1d1;
  line-height: 1.9;
}
.profile-news button > svg {
  margin-left: auto;
  flex-shrink: 0;
  color: #637a91;
}
.profile-news button:hover strong {
  color: var(--mint);
}
.news-tag {
  font-size: 9px;
  border: 1px solid #3e515d;
  color: #a6c1cd;
  background: #20323d;
  border-radius: 4px;
  padding: 4px 8px;
  display: inline-block;
  margin-bottom: 10px;
}
.news-modal-title {
  font-size: 20px !important;
  margin: 5px 0 16px !important;
}
.related-stocks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.related-stocks .small-button {
  padding: 4px 8px 4px 4px;
  font-size: 9px;
}
.related-stocks .company-mark {
  width: 24px;
  height: 24px;
  font-size: 9px;
}
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #3e5263;
  background: #202d3a;
  color: #b3c6d6;
  border-radius: 6px;
  font-size: 11px;
  padding: 10px 16px;
  min-height: 42px;
}
.secondary-button:hover {
  background: #2a3b49;
  border-color: #6a8a89;
  color: #dceee9;
}
.modal-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.modal-action-row > * {
  flex: 1;
}
.recap-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(110deg, #1c342d, #1b2b31);
  border: 1px solid #304a41;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0 17px;
}
.recap-summary > span {
  font-size: 11px;
  color: #9ab5a7;
}
.recap-summary > strong {
  font-size: 36px;
  letter-spacing: -1px;
  line-height: 1.6;
  font-weight: 500;
}
.recap-summary > small {
  font-size: 11px;
  color: #8caaa1;
}
.fill-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #92d8b5;
  font-size: 12px;
  margin: 17px 0 9px;
}
.recap-fills > div {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #182633;
  border: 1px solid #2c3b48;
  padding: 10px 13px;
  font-size: 11px;
  border-radius: 5px;
  margin: 5px 0;
}
.recap-fills small {
  margin-left: auto;
  color: #748ca3;
  font-size: 9px;
}
.recap-no-fills {
  font-size: 11px;
  color: #859fb7;
  padding: 5px 0 12px;
}
.factor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 25px 0 14px;
}
.factor-heading h3 {
  font-size: 13px;
  white-space: nowrap;
}
.factor-heading select {
  background: #1c2a39;
  border: 1px solid #354c5c;
  border-radius: 5px;
  color: #b7cbd8;
  font-size: 10px;
  padding: 6px 9px;
  max-width: 65%;
}
.factor-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #344353;
  padding-bottom: 12px;
  font-size: 11px;
  color: #b4c5d3;
}
.factor-total strong {
  font-size: 16px;
}
.factor-list {
  padding-top: 5px;
}
.factor-list > div {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 11px 0;
}
.factor-list > div > span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #9bb0c5;
  min-width: 154px;
}
.factor-list > div > span:first-child > svg {
  color: #6f8ba1;
}
.factor-track {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #263342;
}
.factor-track > i {
  height: 100%;
  background: currentColor;
  display: block;
  border-radius: 3px;
}
.factor-list strong {
  width: 65px;
  text-align: right;
  font-size: 12px;
}
.factor-note {
  font-size: 9px;
  line-height: 1.9;
  color: #728ba1;
  margin-top: 8px;
}
.recap-sources {
  font-size: 10px;
  color: #8fa8bc;
  margin-top: 15px;
}
.recap-sources summary {
  cursor: pointer;
}
.recap-sources p {
  margin: 7px 0;
  font-size: 10px;
  color: #778fa5;
  line-height: 1.9;
}
.settings-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  padding: 20px 0;
  font-size: 11px;
  border-top: 1px solid #2e3f50;
  border-bottom: 1px solid #2e3f50;
}
.settings-status > span {
  color: #8aa2bb;
}
.settings-status > strong {
  font-weight: 500;
  overflow-wrap: anywhere;
  max-width: 220px;
  text-align: right;
}
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #b2c6d7;
  padding: 20px 0;
}
.settings-toggle input {
  accent-color: var(--mint);
  width: 15px;
  height: 15px;
}
.settings-restart {
  border-top: 1px solid #2e3f50;
  padding-top: 21px;
}
.settings-restart h3 {
  font-size: 14px;
}
.settings-restart > p {
  font-size: 11px;
  color: #8da4bb;
  line-height: 2;
  margin: 10px 0 17px;
}
.text-input {
  background: #0e1825;
  color: #c8d8e4;
  border: 1px solid #3b4e62;
  border-radius: 6px;
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  font-size: 12px;
  outline: none;
}
.text-input:focus {
  border-color: var(--mint);
}
.settings-restart > .secondary-button {
  margin-top: 15px;
}
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0;
}
.help-steps > div {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.help-steps > div > span {
  font-family: "Barlow", sans-serif;
  font-size: 21px;
  color: #63bb9b;
  line-height: 1.5;
}
.help-steps strong {
  font-size: 12px;
  color: #c6d7e3;
}
.help-steps p {
  color: #8da6bc;
  font-size: 11px;
  line-height: 1.9;
  margin-top: 4px;
}

/* Results */
.result-topline {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  margin: 9px 0 25px;
}
.result-trophy {
  width: 65px;
  height: 65px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #335342, #20372e);
  border: 1px solid #50785d;
  color: #d3da95;
  box-shadow: 0 0 45px #6fe2b010;
}
.result-topline .eyebrow {
  color: #91d3ab;
  font-size: 9px;
  letter-spacing: 2.5px;
  margin-bottom: 6px;
}
.result-topline h2 {
  font-size: 21px;
  margin: 0 0 5px;
  line-height: 1.7;
}
.result-topline p:not(.eyebrow) {
  font-size: 10px;
  color: #8da6b5;
}
.result-score {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(120deg, #1c342d, #1a2b32);
  border: 1px solid #375549;
  border-radius: 12px;
}
.grade-circle {
  width: 82px;
  height: 82px;
  border: 2px solid #70c29a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #b9eeb3;
  font-family: "Barlow", sans-serif;
  font-size: 46px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 0 0 5px #284538;
}
.grade-circle small {
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  letter-spacing: 2px;
  color: #82b9a0;
  margin-top: 5px;
}
.result-score > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.result-score > div:nth-child(2) > span {
  font-size: 7px;
  letter-spacing: 1.1px;
  color: #90b3a3;
  white-space: nowrap;
}
.result-score > div:nth-child(2) > strong {
  font-size: 40px;
  line-height: 1.3;
  color: #c7ecda;
  font-weight: 500;
}
.result-score > div:nth-child(2) > strong > small {
  font-size: 14px;
  color: #648e7e;
}
.score-breakdown {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: 12px;
}
.score-breakdown > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-breakdown > div > span {
  font-size: 10px;
  width: 92px;
  color: #b3c8bc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.score-breakdown small {
  font-size: 8px;
  color: #6f9786;
}
.score-breakdown > div > div {
  flex: 1;
  min-width: 30px;
  height: 4px;
  background: #334c43;
  border-radius: 3px;
  overflow: hidden;
}
.score-breakdown i {
  display: block;
  height: 100%;
  background: #86cfa8;
  border-radius: 3px;
}
.score-breakdown strong {
  font-size: 11px;
  font-weight: 500;
  width: 23px;
  text-align: right;
  color: #bad9ca;
}
.result-metrics {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.7fr;
  gap: 15px;
  margin: 24px 0 10px;
}
.result-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-right: 1px solid #314354;
}
.result-metrics > div:last-child {
  border-right: 0;
}
.result-metrics span {
  font-size: 9px;
  color: #829fb5;
}
.result-metrics strong {
  font-size: 21px;
  letter-spacing: -0.6px;
  line-height: 1.5;
  font-weight: 500;
}
.result-metrics strong small {
  font-size: 11px;
  letter-spacing: 0;
  color: #92aaba;
}
.benchmark-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 17px;
  border: 1px solid #324456;
  background: #1b2938;
  border-radius: 7px;
  font-size: 11px;
  color: #aca2cc;
  margin-top: 12px;
}
.benchmark-result strong {
  font-size: 11px;
}
.trade-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 10px;
}
.trade-highlights > div {
  padding: 14px;
  background: #1a2938;
  border: 1px solid #304356;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trade-highlights span {
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8fa9be;
}
.trade-highlights strong {
  font-size: 12px;
  color: #c0cfdb;
  font-weight: 500;
}
.learned-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.learned-tags button {
  border: 1px solid #365146;
  background: #21392f;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a2cdb6;
  font-size: 9px;
}
.learned-tags button:hover {
  background: #335443;
}
.result-insights {
  margin: 24px 0;
  padding: 20px;
  background: #1a2c30;
  border: 1px solid #314c4b;
  border-radius: 9px;
}
.result-insights h3 {
  font-size: 13px;
  color: #b0cfbd;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.result-insights p {
  font-size: 11px;
  line-height: 2;
  color: #96b3b6;
  margin: 6px 0;
}
.result-insights p:last-child {
  color: #718e9e;
  font-size: 10px;
  margin-top: 12px;
}
.score-formula {
  font-size: 9px;
  color: #7c97ae;
  line-height: 2;
  margin-top: 20px;
}
.score-formula summary {
  cursor: pointer;
}
.score-formula p {
  margin-top: 9px;
  font-size: 10px;
}
.results-celebration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 210px;
  overflow: hidden;
  pointer-events: none;
}
.results-celebration i {
  position: absolute;
  left: calc(var(--i) * 8.5%);
  width: 4px;
  height: 9px;
  opacity: 0;
  background: #75d4a5;
  transform: rotate(calc(var(--i) * 35deg));
  animation: confetti 2s ease-out forwards;
  animation-delay: calc(var(--i) * 0.06s);
}
.results-celebration i:nth-child(3n) {
  background: #ad9fe0;
}
.results-celebration i:nth-child(3n + 1) {
  background: #c4b078;
}

/* The opening guide is visible before the trading workspace. */
.header-settings {
  display: none;
}
.dashboard-intro .learning-banner {
  margin: 0 0 22px;
  padding: 15px 20px;
}
.dashboard-intro .learning-icon {
  width: 37px;
  height: 37px;
}
.dashboard-intro .learning-banner p {
  font-size: 9px;
}
.dashboard-intro .welcome-actions {
  flex-direction: row;
  gap: 15px;
}
.dashboard-intro .welcome-actions .primary-button {
  white-space: nowrap;
}
.dashboard-intro .learning-banner h3 {
  font-size: 12px;
}

/* Feedback and motion */
#toast-root {
  position: fixed;
  right: 25px;
  bottom: 101px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  max-width: min(430px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #1d3c30;
  color: #c4e7d6;
  border: 1px solid #467358;
  border-radius: 8px;
  padding: 13px 17px;
  font-size: 11px;
  line-height: 1.9;
  box-shadow: 0 8px 30px #0005;
  animation: toast-in 0.3s ease;
  pointer-events: auto;
}
.toast > svg {
  flex-shrink: 0;
  color: #6bdd9f;
}
.toast.error {
  background: #3a252e;
  color: #f1c0c4;
  border-color: #7f525d;
}
.toast.error > svg {
  color: var(--coral);
}
.animated-number {
  animation: number-in 0.45s ease;
}
.mobile-tabs {
  display: none;
}
@keyframes live-pulse {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 8px #54e0b160;
  }
}
@keyframes number-in {
  from {
    opacity: 0.5;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes confetti {
  0% {
    top: -15px;
    opacity: 1;
  }
  80% {
    opacity: 0.5;
  }
  100% {
    top: 210px;
    opacity: 0;
    transform: rotate(calc(var(--i) * 85deg)) translateX(20px);
  }
}

/* Responsive */
@media (min-width: 1600px) {
  main {
    padding-left: 40px;
    padding-right: 40px;
  }
  .dashboard-grid {
    grid-template-columns: 258px minmax(0, 1fr) 306px;
    gap: 24px;
  }
  .stock-row {
    padding: 18px 11px;
  }
  .stock-identity strong {
    font-size: 12px;
  }
  .stock-identity small {
    font-size: 8px;
  }
  .stock-numbers strong {
    font-size: 13px;
  }
  .chart-panel {
    padding: 23px 25px 0;
  }
  .chart-container {
    margin-top: 6px;
  }
  .news-content strong {
    font-size: 11px;
  }
  .order-panel form {
    padding: 0 23px 20px;
  }
  .order-panel .panel-heading {
    padding: 0 23px;
  }
  .order-stock {
    margin: 22px 0;
  }
  .order-type-row {
    margin-bottom: 20px;
  }
  .quantity-field {
    height: 45px;
  }
  .estimate-row {
    margin: 11px 0;
  }
  .order-submit {
    height: 46px;
    margin-top: 20px;
  }
  .stat-number {
    font-size: 33px;
  }
  .main-stat .stat-number {
    font-size: 35px;
  }
  .day-dock {
    padding-left: 40px;
    padding-right: 40px;
  }
}
@media (max-width: 1250px) {
  :root {
    --rail: 66px;
  }
  .topbar {
    padding: 0 24px;
    height: 74px;
  }
  .rail-logo {
    height: 74px;
  }
  .rail-button.active:before {
    left: -10px;
  }
  main {
    padding: 25px 24px 110px;
  }
  .dashboard-grid {
    grid-template-columns: 210px minmax(0, 1fr) 254px;
    gap: 15px;
  }
  .left-column,
  .center-column,
  .right-column {
    gap: 15px;
  }
  .stat-card {
    padding: 15px 14px 12px;
  }
  .stats-grid {
    gap: 12px;
  }
  .stat-number {
    font-size: 25px;
    gap: 6px;
  }
  .main-stat .stat-number {
    font-size: 28px;
  }
  .stat-hint {
    font-size: 8px;
  }
  .percent-badge {
    font-size: 8px;
    padding: 3px 4px;
  }
  .level-badge {
    font-size: 7px;
    padding: 3px 4px;
  }
  .stock-row {
    gap: 7px;
    padding: 15px 5px;
  }
  .stock-identity strong {
    font-size: 10px;
    letter-spacing: 0;
  }
  .stock-identity small {
    font-size: 6.5px;
  }
  .stock-numbers strong {
    font-size: 11px;
  }
  .stock-numbers small {
    font-size: 8px;
  }
  .stock-row .company-mark.small {
    width: 26px;
    height: 28px;
    font-size: 10px;
  }
  .chart-panel {
    padding: 17px 16px 0;
  }
  .company-title h2 {
    font-size: 16px;
    gap: 6px;
  }
  .company-title p {
    font-size: 8px;
  }
  .selected-price {
    font-size: 30px;
  }
  .price-heading {
    gap: 8px;
  }
  .market-open {
    font-size: 6px;
    letter-spacing: 0.1px;
  }
  .price-change {
    font-size: 10px;
  }
  .price-change > span {
    font-size: 9px;
  }
  .price-change > svg {
    width: 12px;
  }
  .selected-price > span {
    font-size: 8px;
    gap: 5px;
  }
  .chart-toolbar {
    margin-top: 19px;
  }
  .ohlc {
    gap: 9px;
    font-size: 7px;
  }
  .ohlc b {
    font-size: 8px;
  }
  .chart-help {
    font-size: 7px;
    gap: 3px;
  }
  .company-metrics > div {
    padding-left: 10px;
  }
  .company-metrics > div > strong {
    font-size: 12px;
  }
  .company-metrics > div > span,
  .company-metrics .term {
    font-size: 7px;
  }
  .news-content strong {
    font-size: 9px;
  }
  .news-meta {
    font-size: 6px;
    gap: 8px;
  }
  .news-item {
    gap: 9px;
  }
  .news-icon {
    width: 28px;
    height: 30px;
  }
  .news-footnote {
    font-size: 6px;
    padding: 9px 13px;
  }
  .panel-heading {
    padding: 0 15px;
  }
  .panel-heading h2 {
    font-size: 11px;
  }
  .order-panel form {
    padding: 0 15px 15px;
  }
  .order-stock {
    margin: 17px 0 15px;
  }
  .quantity-field {
    height: 38px;
  }
  .order-type-row {
    margin-bottom: 15px;
  }
  #order-estimate {
    margin-top: 16px;
  }
  .estimate-total {
    padding-top: 11px;
  }
  .order-submit {
    margin-top: 14px;
  }
  .execution-note {
    font-size: 6px;
  }
  .market-pulse .panel-heading h2 {
    font-size: 9px;
  }
  .pulse-value {
    font-size: 15px;
  }
  .learning-banner {
    padding: 17px 20px;
    gap: 13px;
  }
  .learning-banner p {
    font-size: 8px;
  }
  .learning-banner h3 {
    font-size: 12px;
  }
  .lesson-cta {
    font-size: 9px;
    padding: 8px 11px;
  }
  .brand {
    font-size: 22px;
  }
  .brand small {
    font-size: 9px;
  }
  .day-dock {
    padding: 0 24px;
    height: 79px;
  }
  .dock-actions {
    gap: 15px;
  }
  .next-day-button {
    min-width: 185px;
  }
  .dock-left {
    gap: 16px;
  }
  .order-history-details {
    gap: 20px;
  }
  .risk-summary {
    gap: 12px;
  }
  .mini-metric {
    padding: 17px 15px;
  }
  .mini-metric strong {
    font-size: 22px;
  }
  .lesson-grid {
    gap: 14px;
  }
  .lesson-card {
    padding: 18px;
  }
}
@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: 185px minmax(0, 1fr) 238px;
    gap: 12px;
  }
  .left-column,
  .center-column,
  .right-column {
    gap: 12px;
  }
  main {
    padding: 23px 20px 105px;
  }
  .topbar {
    padding: 0 20px;
  }
  .brand small,
  .brand-divider {
    display: none;
  }
  .stat-number {
    font-size: 22px;
    gap: 5px;
  }
  .main-stat .stat-number {
    font-size: 25px;
  }
  .stat-label {
    font-size: 9px;
    gap: 5px;
  }
  .stat-label > svg {
    width: 14px;
  }
  .level-badge {
    font-size: 6px;
  }
  .stat-unit {
    font-size: 10px;
  }
  .stock-row {
    gap: 6px;
    padding: 14px 4px;
  }
  .stock-row .company-mark.small {
    width: 24px;
    height: 26px;
    font-size: 9px;
  }
  .stock-identity strong {
    font-size: 9px;
  }
  .stock-numbers strong {
    font-size: 10px;
  }
  .stock-numbers small {
    font-size: 7px;
  }
  .stock-identity small {
    font-size: 6px;
  }
  .watchlist-labels {
    font-size: 7px;
    padding: 0 12px 9px;
  }
  .stock-list {
    padding: 0 5px;
  }
  .stock-row.selected:before {
    left: -6px;
  }
  .panel-heading {
    padding: 0 12px;
  }
  .panel-heading h2 {
    font-size: 10px;
    gap: 6px;
  }
  .panel-heading h2 > svg {
    width: 15px;
  }
  .tiny-badge {
    font-size: 8px;
    line-height: 17px;
  }
  .chart-panel {
    padding: 16px 13px 0;
  }
  .company-title h2 {
    font-size: 14px;
  }
  .company-title p {
    font-size: 7px;
  }
  .company-title .company-mark {
    width: 33px;
    height: 33px;
    border-radius: 8px;
    font-size: 13px;
  }
  .company-title {
    gap: 8px;
  }
  .selected-price {
    font-size: 29px;
  }
  .selected-price > span {
    display: none;
  }
  .price-change {
    gap: 3px;
  }
  .market-open {
    font-size: 5px;
  }
  .market-open .live-dot {
    width: 3px;
    height: 3px;
  }
  .chart-help > span {
    display: none;
  }
  .ohlc {
    font-size: 6px;
    gap: 7px;
  }
  .ohlc b {
    font-size: 7px;
  }
  .company-metrics {
    padding: 12px 0 14px;
  }
  .company-metrics > div {
    padding-left: 7px;
  }
  .company-metrics strong small {
    font-size: 7px;
  }
  .company-metrics > div > strong {
    font-size: 11px;
  }
  .company-metrics > div > span,
  .company-metrics .term {
    font-size: 6px;
  }
  .company-metrics .term svg {
    width: 9px;
  }
  .company-metrics .risk-level {
    font-size: 9px;
  }
  .order-panel form {
    padding: 0 13px 13px;
  }
  .order-stock {
    font-size: 11px;
  }
  .news-list {
    padding: 0 12px;
  }
  .news-count {
    font-size: 7px;
  }
  .news-item {
    gap: 8px;
    padding: 12px 0;
  }
  .news-meta {
    font-size: 6px;
  }
  .news-content strong {
    font-size: 8px;
  }
  .news-footnote {
    font-size: 6px;
  }
  .market-pulse .panel-heading {
    padding: 0 12px;
  }
  .market-pulse .panel-heading h2 {
    font-size: 8px;
  }
  .market-pulse .panel-heading h2 > svg {
    width: 13px;
  }
  .pulse-value {
    margin: 0 13px 11px;
    font-size: 14px;
  }
  .learning-banner p {
    max-width: 470px;
  }
  .welcome-actions .primary-button {
    font-size: 8px;
    padding: 8px 10px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .challenge-status {
    width: 250px;
  }
  .challenge-name {
    font-size: 10px;
  }
  .challenge-date {
    font-size: 8px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 13px 12px 11px;
  }
  .knowledge-stat .stat-number {
    flex-wrap: wrap;
  }
  .level-badge {
    margin-left: auto;
    font-size: 6px;
    padding: 2px 3px;
  }
  .stat-hint {
    font-size: 7px;
  }
  .stat-detail {
    font-size: 10px;
  }
  .mini-chart {
    width: 50px;
  }
  .percent-badge {
    font-size: 7px;
  }
  .sidebar-note {
    font-size: 7px;
    padding: 0 6px;
  }
  .day-dock {
    padding: 0 20px;
  }
  .dock-left > div > strong {
    font-size: 10px;
  }
  .dock-left p {
    font-size: 7px;
  }
  .next-day-button {
    min-width: 170px;
    gap: 20px;
    font-size: 11px;
  }
  .dock-actions {
    gap: 13px;
  }
  .recap-button {
    font-size: 8px;
  }
  .recap-button > svg {
    width: 14px;
  }
  .dock-day {
    gap: 6px;
  }
  .dock-left {
    gap: 13px;
  }
  .lesson-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lesson-card h3 {
    font-size: 12px;
  }
  .lesson-card p {
    font-size: 9px;
  }
  .academy-progress h2 {
    font-size: 17px;
  }
  .quiz-content h3 {
    font-size: 15px;
  }
  .quiz-option {
    font-size: 11px;
  }
  .risk-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .order-history-details {
    gap: 15px;
  }
}
@media (max-width: 930px) {
  .dashboard-grid {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 17px;
  }
  .left-column {
    grid-column: 1;
    grid-row: 1/3;
  }
  .center-column {
    grid-column: 2;
    grid-row: 1;
  }
  .right-column {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: start;
  }
  .stock-row {
    padding: 16px 3px;
  }
  .chart-panel {
    padding: 20px 19px 0;
  }
  .company-title h2 {
    font-size: 18px;
  }
  .company-title p {
    font-size: 9px;
  }
  .company-title .company-mark {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .chart-help > span {
    display: inline;
  }
  .chart-help {
    font-size: 8px;
  }
  .price-change {
    font-size: 12px;
  }
  .price-change > span {
    font-size: 10px;
  }
  .selected-price {
    font-size: 35px;
  }
  .market-open {
    font-size: 7px;
  }
  .market-open .live-dot {
    width: 4px;
    height: 4px;
  }
  .company-metrics > div > span,
  .company-metrics .term {
    font-size: 8px;
  }
  .company-metrics > div > strong {
    font-size: 13px;
  }
  .company-metrics strong small {
    font-size: 9px;
  }
  .company-metrics .risk-level {
    font-size: 11px;
  }
  .ohlc,
  .ohlc b {
    font-size: 9px;
  }
  .news-content strong {
    font-size: 10px;
  }
  .news-meta {
    font-size: 7px;
  }
  .news-icon {
    width: 32px;
    height: 32px;
  }
  .news-list {
    padding: 0 16px;
  }
  .news-item {
    padding: 15px 0;
  }
  .news-footnote {
    font-size: 7px;
  }
  .panel-heading h2 {
    font-size: 11px;
  }
  .news-count {
    font-size: 8px;
  }
  .chart-container {
    margin-top: 4px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-card {
    padding: 15px 17px 12px;
  }
  .stat-number {
    font-size: 29px;
  }
  .main-stat .stat-number {
    font-size: 31px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-hint {
    font-size: 9px;
  }
  .stat-detail {
    font-size: 12px;
  }
  .level-badge {
    font-size: 8px;
    padding: 3px 7px;
    margin-left: auto;
  }
  .percent-badge {
    font-size: 9px;
    padding: 3px 5px;
  }
  .stat-unit {
    font-size: 13px;
  }
  .mini-chart {
    width: 85px;
  }
  .learning-banner p {
    font-size: 9px;
  }
  .learning-banner {
    align-items: flex-start;
  }
  .learning-banner h3 {
    font-size: 12px;
  }
  .learning-icon {
    width: 37px;
    height: 37px;
  }
  .welcome-actions .primary-button {
    font-size: 8px;
    white-space: nowrap;
  }
  .lesson-cta {
    font-size: 9px;
    margin: auto 0 auto auto;
    white-space: nowrap;
  }
  .learning-banner .eyebrow {
    font-size: 6px;
  }
  .welcome-banner {
    flex-wrap: wrap;
  }
  .welcome-banner > div:nth-child(2) {
    flex: 1;
  }
  .welcome-actions {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 0;
  }
  .welcome-actions .primary-button {
    font-size: 10px;
    min-height: 34px;
    padding: 8px 12px;
  }
  .welcome-actions .subtle-button {
    padding: 5px 12px;
  }
  .page-description {
    font-size: 9px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .page-heading {
    gap: 15px;
  }
  .challenge-status {
    width: 230px;
  }
  .challenge-name {
    font-size: 9px;
  }
  .challenge-date {
    font-size: 7px;
  }
  .challenge-date > span {
    font-size: 6px;
  }
  .dock-left > div {
    display: none;
  }
  .dock-left {
    gap: 0;
  }
  .dock-divider {
    display: none;
  }
  .day-dock {
    height: 74px;
  }
  .dock-actions {
    gap: 20px;
  }
  .next-day-button {
    min-width: 205px;
  }
  .dock-day b {
    font-size: 28px;
  }
  .dock-day {
    font-size: 10px;
  }
  .recap-button {
    font-size: 10px;
  }
  .recap-button > svg {
    width: 16px;
  }
  .portfolio-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: 15px;
  }
  .allocation-donut {
    width: 125px;
    height: 125px;
    padding: 17px;
    margin: 20px auto;
  }
  .allocation-legend {
    padding: 0 17px 18px;
  }
  .allocation-legend > div {
    font-size: 8px;
  }
  .allocation-legend strong {
    font-size: 9px;
  }
  .equity-total {
    font-size: 26px;
    padding: 10px 18px 0;
  }
  .equity-total > span {
    font-size: 11px;
  }
  .chart-legend {
    font-size: 8px;
    gap: 10px;
  }
  .academy-top {
    grid-template-columns: 1.5fr 1fr;
    gap: 15px;
  }
  .daily-quiz-panel {
    padding: 22px;
  }
  .academy-progress {
    padding: 23px 15px;
  }
  .academy-progress h2 {
    font-size: 15px;
  }
  .academy-progress > p:not(.eyebrow) {
    font-size: 9px;
  }
  .academy-progress > .eyebrow {
    font-size: 6px;
  }
  .quiz-label {
    font-size: 8px;
  }
  .quiz-label > span {
    font-size: 7px;
  }
  .quiz-option {
    font-size: 10px;
  }
  .quiz-content h3 {
    font-size: 14px;
  }
  .lesson-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-title h2 {
    font-size: 14px;
  }
}
@media (max-width: 700px) {
  :root {
    --rail: 0px;
  }
  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    background: #0f1723f5;
    backdrop-filter: blur(14px);
    border-right: 0;
    border-top: 1px solid #2b394a;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 40;
  }
  .rail-logo,
  .rail-bottom {
    display: none;
  }
  .sidebar nav {
    width: 100%;
    flex-direction: row;
    margin: 0;
    gap: 0;
    justify-content: space-around;
    align-items: center;
    height: 100%;
  }
  .rail-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 25%;
    height: 100%;
    border-radius: 0;
    color: #7b90a6;
  }
  .rail-button > svg {
    width: 20px;
    height: 20px;
  }
  .rail-button.active {
    background: linear-gradient(0deg, #25433624, #25433600);
    color: var(--mint);
  }
  .rail-button.active:before {
    top: 0;
    left: calc(50% - 15px);
    width: 30px;
    height: 2px;
    border-radius: 0 0 3px 3px;
  }
  .rail-label {
    display: block;
    position: static;
    opacity: 1;
    transform: none !important;
    font-size: 8px;
    padding: 0;
    background: none;
    color: inherit;
    line-height: 1.3;
  }
  .nav-dot {
    right: calc(50% - 16px);
    top: 8px;
    width: 4px;
    height: 4px;
  }
  .app-shell {
    margin-left: 0;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .brand {
    font-size: 23px;
    letter-spacing: 1.1px;
    gap: 4px;
  }
  .header-actions {
    gap: 15px;
  }
  .simulation-badge {
    font-size: 8px;
    padding: 3px 6px;
    gap: 4px;
  }
  .simulation-badge svg {
    width: 12px;
    height: 12px;
  }
  .header-divider,
  .help-link > span,
  .player-avatar {
    display: none;
  }
  .help-link {
    width: 22px;
    height: 28px;
    justify-content: center;
  }
  .help-link svg {
    width: 20px;
    height: 20px;
  }
  main {
    padding: 22px 17px 158px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
    margin-bottom: 19px;
  }
  .page-heading h1 {
    font-size: 24px;
    margin-top: 7px;
    letter-spacing: 1px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.8px;
  }
  .page-description {
    font-size: 10px;
    margin-top: 5px;
    letter-spacing: 0.2px;
  }
  .challenge-status {
    width: 100%;
    padding: 13px 15px 9px;
    margin-top: 2px;
    border: 1px solid #253240;
    background: #121b27;
    border-radius: 8px;
  }
  .challenge-name {
    font-size: 10px;
    gap: 8px;
  }
  .challenge-name > .day-count {
    font-size: 9px;
  }
  .day-count b {
    font-size: 19px;
  }
  .day-count > span {
    font-size: 10px;
  }
  .challenge-status .day-progress {
    height: 3px;
    margin: 7px 0 6px;
  }
  .challenge-date {
    font-size: 8px;
  }
  .challenge-date > span {
    font-size: 7px;
  }
  .stats-grid {
    gap: 10px;
    margin-bottom: 21px;
  }
  .stat-card {
    padding: 13px 12px 11px;
    border-radius: 9px;
  }
  .stat-label {
    font-size: 9px;
    gap: 6px;
  }
  .stat-label > svg {
    width: 14px;
    height: 14px;
  }
  .stat-number,
  .main-stat .stat-number {
    font-size: 26px;
    letter-spacing: -1px;
    gap: 6px;
    margin: 7px 0 3px;
  }
  .stat-bottom {
    gap: 4px;
    min-height: 16px;
  }
  .stat-hint {
    font-size: 7px;
  }
  .stat-detail {
    font-size: 9px;
  }
  .mini-chart {
    width: 40px;
    height: 18px;
  }
  .stat-unit {
    font-size: 10px;
    margin-top: 5px;
  }
  .level-badge {
    font-size: 6px;
    gap: 3px;
    padding: 3px 4px;
    margin-left: auto;
  }
  .level-badge > svg {
    width: 9px;
    height: 9px;
  }
  .percent-badge {
    font-size: 7px;
    padding: 3px 4px;
  }
  .mobile-tabs {
    display: flex;
    border-bottom: 1px solid #303c4d;
    margin-bottom: 18px;
    gap: 2px;
  }
  .mobile-tabs button {
    flex: 1;
    padding: 11px 5px 12px;
    font-size: 11px;
    color: #7e93aa;
    position: relative;
  }
  .mobile-tabs button.active {
    color: #9fe8c9;
  }
  .mobile-tabs button.active:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--mint);
    border-radius: 2px 2px 0 0;
  }
  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 17px;
  }
  .left-column,
  .center-column,
  .right-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 17px;
  }
  .dashboard-grid .left-column,
  .dashboard-grid .center-column,
  .dashboard-grid .right-column {
    display: none;
  }
  .mobile-market .left-column,
  .mobile-market .center-column {
    display: flex;
  }
  .mobile-market .left-column {
    order: 2;
  }
  .mobile-market .center-column {
    order: 1;
  }
  .mobile-market .news-panel {
    display: none;
  }
  .mobile-trade .right-column {
    display: flex;
  }
  .mobile-news .center-column {
    display: flex;
  }
  .mobile-news .chart-panel {
    display: none;
  }
  .left-column .market-pulse,
  .left-column .sidebar-note {
    display: none;
  }
  .chart-panel {
    padding: 18px 15px 0;
    border-radius: 10px;
  }
  .company-title {
    gap: 10px;
  }
  .company-title h2 {
    font-size: 18px;
    letter-spacing: 0.3px;
  }
  .company-title p {
    font-size: 8px;
  }
  .company-title .company-mark {
    width: 37px;
    height: 37px;
    border-radius: 9px;
    font-size: 15px;
  }
  .listing-badge {
    font-size: 7px;
  }
  .price-heading {
    margin-top: 18px;
    gap: 10px;
  }
  .selected-price {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .selected-price > span {
    display: inline;
    font-size: 8px;
  }
  .price-change {
    font-size: 11px;
    gap: 3px;
    padding-top: 5px;
  }
  .price-change > span {
    font-size: 9px;
  }
  .market-open {
    font-size: 5px;
    letter-spacing: 0.1px;
    gap: 4px;
    margin-top: 5px;
  }
  .chart-toolbar {
    margin: 18px 0 11px;
  }
  .range-buttons button {
    font-size: 9px;
    min-width: 30px;
    padding: 3px 7px;
  }
  .chart-help {
    font-size: 7px;
  }
  .chart-tools {
    gap: 3px;
  }
  .chart-tools .icon-button {
    width: 24px;
  }
  .ohlc {
    font-size: 7px;
    gap: 10px;
    height: 23px;
  }
  .ohlc > span:first-child {
    font-size: 7px;
  }
  .ohlc b {
    font-size: 8px;
    margin-left: 2px;
  }
  .chart-container {
    margin: 6px -8px 1px -8px;
  }
  .price-chart {
    min-height: 185px;
  }
  .company-metrics {
    padding: 14px 0 16px;
    margin-top: 5px;
  }
  .company-metrics > div {
    padding-left: 12px;
    gap: 4px;
  }
  .company-metrics > div > span,
  .company-metrics .term {
    font-size: 7px;
  }
  .company-metrics > div > strong {
    font-size: 13px;
  }
  .company-metrics strong small {
    font-size: 8px;
  }
  .company-metrics .risk-level {
    font-size: 10px;
  }
  .watchlist .panel-heading {
    height: 51px;
    padding: 0 16px;
  }
  .panel-heading h2 {
    font-size: 12px;
    gap: 8px;
  }
  .panel-heading h2 > svg {
    width: 17px;
    height: 17px;
  }
  .tiny-badge {
    font-size: 9px;
    padding: 1px 6px;
  }
  .watchlist-labels {
    padding: 0 16px 10px;
    font-size: 8px;
  }
  .stock-list {
    padding: 0 8px;
  }
  .stock-row {
    padding: 12px 9px;
    gap: 12px;
    margin-bottom: 3px;
  }
  .stock-row .company-mark.small {
    width: 34px;
    height: 34px;
    font-size: 12px;
    border-radius: 8px;
  }
  .stock-identity {
    gap: 3px;
  }
  .stock-identity strong {
    font-size: 13px;
    letter-spacing: 0.1px;
  }
  .stock-identity small {
    font-size: 8px;
  }
  .stock-numbers strong {
    font-size: 14px;
  }
  .stock-numbers small {
    font-size: 10px;
  }
  .stock-row.selected:before {
    left: -9px;
  }
  .watchlist-footer {
    font-size: 8px;
    padding: 12px 16px;
    margin-top: 7px;
  }
  .watchlist-footer > span:last-child {
    font-size: 9px;
  }
  .order-panel .panel-heading {
    height: 56px;
    padding: 0 20px;
  }
  .order-panel form {
    padding: 0 20px 20px;
  }
  .side-selector {
    padding: 4px;
    gap: 4px;
  }
  .side-selector button {
    font-size: 12px;
    padding: 8px;
  }
  .order-stock {
    font-size: 15px;
    margin: 24px 0 20px;
  }
  .order-stock > span:last-child {
    font-size: 10px;
  }
  .order-type-row {
    margin-bottom: 23px;
  }
  .order-type-row > span {
    font-size: 11px;
  }
  .order-type {
    gap: 24px;
  }
  .order-type > button {
    font-size: 12px;
    gap: 7px;
  }
  .order-type > button i {
    width: 13px;
    height: 13px;
  }
  .form-label {
    font-size: 11px;
    margin-bottom: 9px;
  }
  .form-label > span {
    font-size: 9px;
  }
  .quantity-field {
    height: 48px;
    border-radius: 6px;
  }
  .quantity-field > button {
    width: 48px;
  }
  .quantity-field > input {
    font-size: 21px;
  }
  .quantity-field > span {
    font-size: 11px;
    margin-right: 25px;
  }
  .quantity-shortcuts {
    margin-top: 9px;
    gap: 9px;
  }
  .quantity-shortcuts > button {
    padding: 6px;
    font-size: 10px;
  }
  .limit-field {
    height: 44px;
  }
  .limit-field > input {
    font-size: 17px;
  }
  #order-estimate {
    margin-top: 25px;
  }
  .estimate-row {
    font-size: 12px;
    margin: 11px 0;
  }
  .estimate-row > span:first-child {
    font-size: 10px;
  }
  .estimate-row small {
    font-size: 9px;
  }
  .estimate-total {
    margin-top: 18px;
    padding-top: 17px;
  }
  .estimate-total > span {
    font-size: 12px;
  }
  .estimate-total > strong {
    font-size: 25px;
  }
  .order-available {
    font-size: 10px;
    margin-top: 14px;
  }
  .order-available > span:last-child {
    font-size: 11px;
  }
  .reserve-note,
  .reserve-note > span {
    font-size: 8px;
  }
  .reserve-note {
    margin-top: 9px;
  }
  .order-submit {
    min-height: 48px;
    font-size: 13px;
    margin-top: 22px;
  }
  .execution-note {
    font-size: 9px;
    margin-top: 14px;
  }
  .order-error {
    font-size: 11px;
  }
  .positions-panel .panel-heading {
    height: 55px;
    padding: 0 20px;
  }
  .empty-position {
    padding: 20px 15px 29px;
  }
  .empty-icon {
    width: 52px;
    height: 52px;
  }
  .empty-position p {
    font-size: 11px;
  }
  .empty-position small {
    font-size: 10px;
  }
  .compact-positions {
    padding: 0 20px;
  }
  .compact-position {
    padding: 14px 0;
    gap: 12px;
  }
  .compact-position .company-mark {
    width: 33px;
    height: 33px;
  }
  .compact-position strong {
    font-size: 12px;
  }
  .compact-position small {
    font-size: 10px;
  }
  .positions-link {
    font-size: 11px !important;
    margin: 15px 20px 20px;
  }
  .news-panel .panel-heading {
    height: 55px;
    padding: 0 16px;
  }
  .live-label {
    font-size: 7px;
  }
  .news-count {
    font-size: 8px;
  }
  .news-list {
    padding: 0 16px;
  }
  .news-item {
    padding: 19px 0;
    gap: 11px;
    align-items: flex-start;
  }
  .news-icon {
    width: 33px;
    height: 34px;
    margin-top: 3px;
  }
  .news-meta {
    font-size: 7px;
    gap: 10px;
  }
  .news-content strong {
    font-size: 11px;
    line-height: 1.9;
    margin-top: 6px;
  }
  .news-item > svg {
    margin-top: 19px;
  }
  .news-footnote {
    font-size: 8px;
    padding: 12px 16px;
    align-items: flex-start;
  }
  .news-footnote > svg {
    flex-shrink: 0;
    margin-top: 2px;
  }
  .learning-banner {
    padding: 17px 16px;
    gap: 12px;
    margin-top: 19px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .learning-banner > .learning-icon {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    margin-top: 2px;
  }
  .learning-banner > div:nth-child(2) {
    flex: 1;
    min-width: 0;
  }
  .learning-banner .eyebrow {
    font-size: 6px;
    letter-spacing: 1.2px;
  }
  .learning-banner h3 {
    font-size: 12px;
    line-height: 1.9;
    margin: 4px 0 5px;
  }
  .learning-banner p {
    font-size: 9px;
    line-height: 2;
  }
  .lesson-cta {
    margin: 1px 0 0 auto;
    padding: 7px 12px;
    font-size: 9px;
    gap: 12px;
  }
  .welcome-actions {
    margin-top: 1px;
    flex-direction: row;
    justify-content: flex-end;
    gap: 11px;
  }
  .welcome-actions .primary-button {
    font-size: 9px;
    padding: 9px 12px;
    gap: 8px;
  }
  .welcome-actions .subtle-button {
    font-size: 8px;
    padding: 4px 0;
  }
  .activity-preview {
    padding: 19px 1px 17px;
    align-items: flex-start;
  }
  .activity-preview h3 {
    font-size: 9px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .activity-preview h3 > span {
    font-size: 7px;
    padding-left: 8px;
    margin-left: 3px;
  }
  .activity-preview p {
    font-size: 8px;
    margin-left: 20px;
    max-width: 250px;
  }
  .activity-preview > .text-link {
    font-size: 8px;
    gap: 3px;
    white-space: nowrap;
    margin-top: 2px;
  }
  .educational-note {
    font-size: 7px;
    display: block;
    padding-top: 15px;
    line-height: 2;
  }
  .educational-note > span {
    display: block;
    font-size: 6px;
    margin-top: 12px;
    letter-spacing: 1.7px;
  }
  .day-dock {
    bottom: 64px;
    height: 68px;
    left: 0;
    right: 0;
    padding: 0 17px;
    background: #111c29f5;
    box-shadow: 0 -6px 20px #0002;
  }
  .dock-day {
    font-size: 8px;
    gap: 5px;
    letter-spacing: 0.3px;
  }
  .dock-day b {
    font-size: 23px;
  }
  .dock-day small {
    font-size: 9px;
  }
  .dock-actions {
    gap: 13px;
  }
  .next-day-button {
    min-width: 170px;
    min-height: 40px;
    padding: 10px 14px;
    font-size: 11px;
    gap: 22px;
  }
  .recap-button {
    font-size: 8px;
    gap: 4px;
  }
  .recap-button > span {
    max-width: 40px;
    line-height: 1.6;
    text-align: left;
  }
  .recap-button > svg {
    width: 15px;
    height: 15px;
  }
  .save-status {
    font-size: 7px;
    gap: 3px;
  }
  .save-status > svg {
    width: 11px;
    height: 11px;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .equity-panel .panel-heading {
    padding: 0 17px;
  }
  .equity-total {
    font-size: 31px;
    padding: 7px 18px 0;
  }
  .equity-total > span {
    font-size: 12px;
  }
  .equity-chart {
    padding: 17px 8px 0;
  }
  .chart-legend {
    font-size: 8px;
    gap: 15px;
  }
  .panel-note {
    padding: 12px 17px 16px;
    font-size: 8px;
  }
  .allocation-panel {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    padding-bottom: 18px;
  }
  .allocation-panel > .panel-heading {
    grid-column: 1/-1;
    padding: 0 17px;
  }
  .allocation-donut {
    width: 130px;
    height: 130px;
    margin: 10px auto 5px;
    padding: 18px;
  }
  .allocation-legend {
    padding: 0 17px 0 6px;
  }
  .allocation-legend > div {
    font-size: 8px;
    gap: 6px;
  }
  .allocation-legend strong {
    font-size: 9px;
  }
  .holdings-table-panel .panel-heading {
    padding: 0 17px;
  }
  .holdings-table-panel .panel-heading > .text-xs {
    font-size: 7px;
  }
  .table-scroll {
    overflow: visible;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody {
    padding: 0 17px;
  }
  tr {
    padding: 17px 0;
    border-bottom: 1px solid #2e3e4f;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 15px;
  }
  tr:last-child {
    border: 0;
  }
  td {
    padding: 0;
    border: 0;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    white-space: normal;
  }
  td:first-child {
    grid-column: 1/-1;
    margin-bottom: 7px;
  }
  td:last-child {
    grid-column: 1/-1;
    justify-content: flex-end;
  }
  .table-stock strong {
    font-size: 13px;
  }
  .table-stock .company-mark {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }
  td:nth-child(2):before {
    content: "数量";
  }
  td:nth-child(3):before {
    content: "取得単価";
  }
  td:nth-child(4):before {
    content: "現在値";
  }
  td:nth-child(5):before {
    content: "評価額";
  }
  td:nth-child(6):before {
    content: "評価損益";
  }
  td:nth-child(7):before {
    content: "実現損益";
  }
  td:before {
    font-size: 8px;
    color: #7b93aa;
  }
  .risk-summary {
    gap: 10px;
    margin-top: 17px;
  }
  .mini-metric {
    padding: 15px 13px;
    gap: 7px;
  }
  .mini-metric > span {
    font-size: 9px;
  }
  .mini-metric strong {
    font-size: 22px;
  }
  .mini-metric small {
    font-size: 7px;
  }
  .orders-view > .panel-heading {
    padding: 0 15px;
    height: 61px;
    gap: 8px;
  }
  .orders-view > .panel-heading h2 {
    font-size: 11px;
  }
  .filter-buttons > button {
    font-size: 8px;
    padding: 4px 7px;
  }
  .order-cards {
    padding: 0 16px;
  }
  .order-history-card {
    padding: 18px 0;
  }
  .order-history-title {
    gap: 10px;
  }
  .order-history-title strong {
    font-size: 12px;
  }
  .order-history-title small {
    font-size: 8px;
  }
  .status-badge {
    font-size: 8px;
    padding: 2px 6px;
  }
  .order-history-details {
    margin: 14px 0 0;
    gap: 12px;
    font-size: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .order-history-details > .cancel-button {
    font-size: 9px;
    padding: 5px 10px;
  }
  .order-history-details > small {
    font-size: 8px;
  }
  .order-history-details > strong {
    font-size: 10px;
  }
  .large-empty {
    padding: 40px 20px;
    font-size: 11px;
    line-height: 2;
  }
  .large-empty h3 {
    font-size: 14px;
  }
  .large-empty p {
    font-size: 10px;
  }
  .academy-top {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .daily-quiz-panel {
    padding: 22px 20px;
  }
  .quiz-label {
    font-size: 9px;
  }
  .quiz-label > span {
    font-size: 8px;
  }
  .quiz-content h3 {
    font-size: 16px;
    margin: 19px 0;
  }
  .quiz-option {
    padding: 12px;
    font-size: 11px;
  }
  .quiz-feedback p {
    font-size: 11px;
  }
  .academy-progress {
    padding: 26px 21px;
  }
  .academy-progress > .learning-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 17px;
  }
  .academy-progress h2 {
    font-size: 19px;
  }
  .academy-progress > .eyebrow {
    font-size: 7px;
  }
  .academy-progress > p:not(.eyebrow) {
    font-size: 10px;
  }
  .academy-progress > strong {
    margin-top: 13px;
  }
  .academy-progress > .day-progress {
    max-width: 250px;
  }
  .section-title {
    margin: 24px 0 16px;
  }
  .section-title h2 {
    font-size: 12px;
  }
  .section-title > span {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .lesson-grid {
    gap: 11px;
    grid-template-columns: repeat(2, 1fr);
  }
  .lesson-card {
    padding: 17px 14px;
  }
  .lesson-card > div {
    margin-bottom: 19px;
  }
  .lesson-number {
    font-size: 20px;
  }
  .lesson-card h3 {
    font-size: 12px;
    line-height: 1.8;
  }
  .lesson-card p {
    font-size: 9px;
    line-height: 1.9;
  }
  .lesson-card > .text-link {
    font-size: 9px;
    margin-top: 17px;
  }
  .learned-badge {
    font-size: 7px;
  }
  .lesson-card > div > svg {
    width: 18px;
  }
  .modal-backdrop {
    padding: 16px 12px;
  }
  .modal {
    padding: 28px 22px;
    max-height: calc(100dvh - 32px);
    border-radius: 13px;
  }
  .modal-close {
    right: 11px;
    top: 11px;
  }
  .modal-eyebrow {
    font-size: 7px;
    margin: 4px 17px 22px 0;
    letter-spacing: 1.25px;
  }
  .modal h2 {
    font-size: 20px;
    line-height: 1.9;
    margin-bottom: 15px;
  }
  .lesson-body {
    font-size: 12px;
    line-height: 2.2;
  }
  .modal-feature-icon {
    width: 52px;
    height: 52px;
  }
  .lesson-tip {
    padding: 14px 13px;
    gap: 10px;
  }
  .lesson-tip p {
    font-size: 10px;
  }
  .lesson-tip strong {
    font-size: 11px;
  }
  .modal .primary-button,
  .modal .secondary-button {
    font-size: 11px;
    padding: 11px 13px;
  }
  .profile-metrics {
    gap: 7px;
  }
  .profile-metrics > div {
    padding: 12px 9px;
    gap: 6px;
  }
  .profile-metrics span {
    font-size: 8px;
  }
  .profile-metrics strong {
    font-size: 14px;
  }
  .modal-company-title h2 {
    font-size: 20px;
    line-height: 1.5;
  }
  .modal-company-title p {
    font-size: 8px;
  }
  .modal-company-title .company-mark {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }
  .profile-news button > strong {
    font-size: 10px;
  }
  .profile-news button > span {
    font-size: 7px;
  }
  .news-modal-title {
    font-size: 19px !important;
  }
  .recap-summary {
    padding: 17px;
    margin: 20px 0 16px;
  }
  .recap-summary > span {
    font-size: 10px;
  }
  .recap-summary > strong {
    font-size: 33px;
  }
  .recap-summary > small {
    font-size: 10px;
  }
  .fill-notice {
    font-size: 11px;
  }
  .recap-fills > div {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 10px;
    padding: 9px 10px;
  }
  .recap-fills small {
    font-size: 8px;
  }
  .factor-heading h3 {
    font-size: 12px;
  }
  .factor-heading select {
    font-size: 9px;
    max-width: 58%;
    padding: 6px;
  }
  .factor-total {
    font-size: 10px;
  }
  .factor-total strong {
    font-size: 14px;
  }
  .factor-list > div {
    gap: 12px;
    padding: 10px 0;
  }
  .factor-list > div > span:first-child {
    min-width: 125px;
    font-size: 9px;
    gap: 6px;
  }
  .factor-list > div > span:first-child > svg {
    width: 14px;
  }
  .factor-list strong {
    font-size: 10px;
    width: 53px;
  }
  .factor-note {
    font-size: 8px;
  }
  .modal-action-row {
    gap: 9px;
  }
  .result-topline {
    gap: 13px;
    align-items: flex-start;
    margin-top: 15px;
  }
  .result-trophy {
    width: 46px;
    height: 50px;
    border-radius: 11px;
  }
  .result-trophy > svg {
    width: 28px;
    height: 28px;
  }
  .result-topline h2 {
    font-size: 17px;
    line-height: 1.8;
  }
  .result-topline .eyebrow {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .result-topline p:not(.eyebrow) {
    font-size: 9px;
    line-height: 1.9;
  }
  .result-score {
    padding: 19px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .grade-circle {
    width: 67px;
    height: 67px;
    font-size: 38px;
  }
  .grade-circle small {
    font-size: 7px;
  }
  .result-score > div:nth-child(2) > span {
    font-size: 7px;
  }
  .result-score > div:nth-child(2) > strong {
    font-size: 36px;
  }
  .score-breakdown {
    flex-basis: 100%;
    margin: 2px 0 0;
    gap: 11px;
  }
  .score-breakdown > div > span {
    font-size: 10px;
    width: 105px;
  }
  .score-breakdown > div > div {
    height: 4px;
  }
  .result-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 19px 15px;
    margin: 24px 0 10px;
  }
  .result-metrics > div:nth-child(2) {
    border: 0;
  }
  .result-metrics span {
    font-size: 9px;
  }
  .result-metrics strong {
    font-size: 23px;
  }
  .benchmark-result {
    font-size: 9px;
    padding: 12px;
  }
  .benchmark-result strong {
    font-size: 9px;
  }
  .trade-highlights {
    gap: 10px;
    grid-template-columns: 1fr;
  }
  .trade-highlights > div {
    padding: 12px;
  }
  .trade-highlights span {
    font-size: 9px;
  }
  .trade-highlights strong {
    font-size: 12px;
  }
  .learned-tags {
    gap: 7px;
  }
  .learned-tags button {
    font-size: 8px;
    padding: 5px 7px;
  }
  .result-insights {
    padding: 16px;
  }
  .result-insights p {
    font-size: 10px;
  }
  .result-insights h3 {
    font-size: 12px;
  }
  .result-insights p:last-child {
    font-size: 9px;
  }
  .score-formula p {
    font-size: 9px;
  }
  .settings-status > strong {
    max-width: 170px;
  }
  .settings-toggle {
    font-size: 10px;
  }
  .settings-restart > p {
    font-size: 10px;
  }
  .help-steps p {
    font-size: 10px;
  }
  .help-steps strong {
    font-size: 12px;
  }
  .help-steps > div {
    gap: 13px;
  }
  .modal .quiz-label {
    font-size: 8px;
  }
  .modal .quiz-label > span {
    font-size: 7px;
  }
  .modal .quiz-content h3 {
    font-size: 16px;
  }
  .modal .quiz-option {
    font-size: 11px;
  }
  .modal .quiz-feedback strong {
    font-size: 12px;
  }
  .modal .quiz-feedback p {
    font-size: 10px;
  }
  #toast-root {
    right: 14px;
    bottom: 147px;
    max-width: calc(100vw - 28px);
  }
  .toast {
    font-size: 10px;
    padding: 11px 14px;
  }
}
@media (max-width: 380px) {
  main {
    padding-left: 13px;
    padding-right: 13px;
  }
  .topbar {
    padding: 0 14px;
  }
  .brand {
    font-size: 21px;
  }
  .header-actions {
    gap: 10px;
  }
  .simulation-badge {
    font-size: 7px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .stat-number,
  .main-stat .stat-number {
    font-size: 23px;
  }
  .stat-card {
    padding: 12px 10px 10px;
  }
  .stat-hint {
    font-size: 6px;
  }
  .stat-detail {
    font-size: 8px;
  }
  .level-badge {
    font-size: 5px;
    padding: 3px;
  }
  .percent-badge {
    font-size: 6px;
  }
  .company-title h2 {
    font-size: 16px;
  }
  .company-title p {
    font-size: 7px;
  }
  .chart-panel {
    padding: 16px 12px 0;
  }
  .price-heading {
    gap: 7px;
  }
  .selected-price {
    font-size: 31px;
  }
  .selected-price > span {
    display: none;
  }
  .market-open {
    font-size: 5px;
  }
  .price-change {
    font-size: 10px;
  }
  .price-change > span {
    font-size: 8px;
  }
  .ohlc {
    gap: 7px;
    font-size: 6px;
  }
  .ohlc b {
    font-size: 7px;
  }
  .company-metrics > div {
    padding-left: 8px;
  }
  .company-metrics > div > span,
  .company-metrics .term {
    font-size: 6px;
  }
  .company-metrics > div > strong {
    font-size: 12px;
  }
  .day-dock {
    padding: 0 13px;
  }
  .dock-actions {
    gap: 10px;
  }
  .next-day-button {
    min-width: 150px;
    font-size: 10px;
    gap: 14px;
    padding: 10px 12px;
  }
  .dock-day b {
    font-size: 21px;
  }
  .save-status {
    font-size: 6px;
  }
  .recap-button {
    font-size: 7px;
  }
  .recap-button > svg {
    width: 13px;
  }
  .modal {
    padding: 26px 18px;
  }
  .factor-list > div > span:first-child {
    min-width: 115px;
    font-size: 8px;
  }
  .factor-list > div {
    gap: 9px;
  }
  .lesson-card h3 {
    font-size: 11px;
  }
  .lesson-card p {
    font-size: 8px;
  }
  .section-title h2 {
    font-size: 11px;
  }
  .section-title > span {
    font-size: 5px;
  }
}
@media (max-width: 930px) {
  .dashboard-intro .welcome-actions {
    flex-direction: row;
    width: 100%;
    gap: 15px;
  }
}
@media (max-width: 700px) {
  .header-settings {
    display: inline-flex;
  }
  .header-actions {
    gap: 12px;
  }
  .header-actions .simulation-badge {
    display: none;
  }
  .dashboard-intro .learning-banner {
    padding: 16px;
    margin-bottom: 18px;
  }
  .dashboard-intro .learning-banner p {
    font-size: 9px;
  }
  .dashboard-intro .welcome-actions {
    justify-content: flex-start;
    margin-left: 47px;
    gap: 15px;
  }
  .dashboard-intro .welcome-actions .primary-button {
    font-size: 9px;
  }
  .dashboard-intro .lesson-cta {
    margin-left: 47px;
    margin-right: auto;
  }
  .dashboard-intro .learning-banner h3 {
    font-size: 12px;
  }
}
@media (max-width: 700px) {
  .dashboard-grid .right-column {
    align-items: stretch;
  }
  .learning-banner > div:nth-child(2) {
    flex: 1 1 calc(100% - 50px);
  }
  .learning-banner > .lesson-cta {
    margin-left: 47px;
    margin-right: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
