:root {
  --ink: #f4f1e8;
  --muted: #b9b2a6;
  --soft: #837d74;
  --paper: #0b0c0c;
  --surface: #121514;
  --surface-2: #191d1a;
  --surface-3: #222720;
  --line: rgba(244, 241, 232, 0.13);
  --line-strong: rgba(244, 241, 232, 0.24);
  --green: #22c55e;
  --green-deep: #0f7a47;
  --red: #ef4444;
  --gold: #d7ad4c;
  --silver: #c7cdd1;
  --blue: #5ca8ff;
  --violet: #9b8cff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --header-height: 78px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(11, 12, 12, 0.94), rgba(11, 12, 12, 1) 410px),
    radial-gradient(circle at 15% 0%, rgba(215, 173, 76, 0.14), transparent 30%),
    #0b0c0c;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(220px, 310px);
  gap: 12px;
  align-items: center;
  min-height: var(--header-height);
  padding: 12px clamp(18px, 3vw, 42px);
  background: rgba(12, 14, 13, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(215, 173, 76, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 173, 76, 0.24), rgba(34, 197, 94, 0.08)),
    #151712;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #ffe2a0;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.28rem, 1.8vw, 1.65rem);
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 0.79rem;
  font-weight: 650;
}

.primary-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav {
  justify-content: center;
  min-width: 0;
}

.primary-nav a,
.mobile-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a.is-active,
.mobile-nav a.is-active {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(244, 241, 232, 0.06);
}

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

.stock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(190px, 22vw, 260px);
  min-width: 190px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.05);
}

.stock-search span {
  color: var(--soft);
  font-size: 0.77rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stock-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.stock-search input::placeholder {
  color: rgba(185, 178, 166, 0.58);
}

.mobile-menu {
  display: none;
}

.mobile-nav {
  display: none;
  padding: 0 18px 14px;
  background: rgba(12, 14, 13, 0.96);
  border-bottom: 1px solid var(--line);
}

#app {
  outline: none;
}

#app > .page {
  animation: routeFade 0.24s ease-out;
}

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

.page {
  padding: clamp(20px, 3vw, 38px) clamp(18px, 3vw, 42px) 44px;
}

.page-inner {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.market-ticker {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 44s linear infinite;
}

.market-ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid rgba(244, 241, 232, 0.09);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.ticker-item span {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 850;
}

.ticker-item strong {
  font-size: 0.82rem;
}

.ticker-item em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(420px, 1.14fr);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(11, 12, 12, 0.98) 0%, rgba(11, 12, 12, 0.9) 42%, rgba(11, 12, 12, 0.2) 75%),
    url("assets/market-hero.png") center right / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(26px, 4vw, 58px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(215, 173, 76, 0.35);
  border-radius: 8px;
  background: rgba(215, 173, 76, 0.08);
  color: #f5d991;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.55rem, 5vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.75;
}

.hero-actions,
.inline-actions,
.filter-actions,
.pricing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(215, 173, 76, 0.48);
  border-radius: 8px;
  background: linear-gradient(180deg, #f0c768, #b98725);
  color: #1d1404;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: 0 12px 30px rgba(215, 173, 76, 0.12);
}

.button:hover {
  filter: brightness(1.05);
}

.button.secondary {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(34, 197, 94, 0.1);
  color: #b7ffd2;
  box-shadow: none;
}

.button.ghost {
  border-color: var(--line);
  background: rgba(244, 241, 232, 0.06);
  color: var(--ink);
  box-shadow: none;
}

.button.compact {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.86rem;
}

.hero-terminal {
  align-self: center;
  margin: 28px 26px 26px 0;
  border: 1px solid rgba(244, 241, 232, 0.16);
  border-radius: 8px;
  background: rgba(8, 9, 9, 0.68);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

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

.signal::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.78);
}

.terminal-body {
  padding: 14px;
}

.mini-chart-wrap {
  position: relative;
  height: 250px;
  border: 1px solid rgba(244, 241, 232, 0.1);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.8);
}

canvas {
  display: block;
  width: 100%;
}

.mini-chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.terminal-stat,
.metric-card,
.intel-card,
.tool-panel,
.pricing-card,
.stock-card,
.portfolio-card,
.education-card,
.copilot-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.045);
}

.terminal-stat {
  padding: 12px;
}

.terminal-stat span,
.metric-card span,
.intel-card span {
  display: block;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.terminal-stat strong,
.metric-card strong,
.intel-card strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.12rem;
}

.up {
  color: var(--green) !important;
}

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

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

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

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head h2,
.section-head h1,
.route-title h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.section-head p,
.route-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.intel-card {
  min-height: 126px;
  padding: 15px;
  display: block;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.intel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 173, 76, 0.36);
  background: rgba(244, 241, 232, 0.07);
}

.intel-card strong {
  font-size: 1.28rem;
}

.intel-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.heat-map {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 84px;
  gap: 8px;
}

.heat-tile {
  display: grid;
  align-content: space-between;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease-out,
    filter 0.18s ease-out;
}

.heat-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.heat-tile.positive {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, calc(0.3 + var(--heat) * 0.42)), rgba(15, 122, 71, calc(0.72 + var(--heat) * 0.18))),
    #10351f;
}

.heat-tile.negative {
  background:
    linear-gradient(135deg, rgba(239, 68, 68, calc(0.32 + var(--heat) * 0.42)), rgba(127, 29, 29, calc(0.75 + var(--heat) * 0.18))),
    #3a1111;
}

.heat-tile.xl {
  grid-column: span 3;
  grid-row: span 2;
}

.heat-tile.lg {
  grid-column: span 3;
}

.heat-tile.md {
  grid-column: span 2;
}

.heat-tile span {
  font-weight: 900;
}

.heat-tile strong {
  font-size: 1.25rem;
}

.heat-tile em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-style: normal;
}

.market-pulse-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
}

.market-pulse-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.82);
}

.breadth-gauge {
  display: flex;
  overflow: hidden;
  height: 18px;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.08);
}

.breadth-gauge span {
  display: block;
}

.breadth-gauge .advance {
  background: linear-gradient(90deg, #16a34a, #86efac);
}

.breadth-gauge .decline {
  background: linear-gradient(90deg, #ef4444, #991b1b);
}

.breadth-gauge .unchanged {
  background: rgba(244, 241, 232, 0.32);
}

.breadth-stats,
.flow-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

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

.flow-summary .metric-card {
  min-height: 82px;
}

.breadth-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.04);
}

.breadth-stats span,
.flow-row small,
.market-pulse-note {
  color: var(--soft);
}

.breadth-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.mini-breadth-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 96px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(244, 241, 232, 0.06) 1px, transparent 1px) 0 0 / 100% 24px,
    rgba(244, 241, 232, 0.025);
}

.mini-breadth-chart span {
  flex: 1;
  min-width: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #d7ad4c, #22c55e);
}

.market-pulse-note {
  margin: 12px 0 0;
  line-height: 1.5;
}

.flow-bars {
  display: grid;
  gap: 12px;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1fr) 86px;
  gap: 10px;
  align-items: center;
}

.flow-row strong,
.flow-row small {
  display: block;
}

.flow-track {
  display: flex;
  align-items: center;
  height: 12px;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.08);
}

.flow-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.flow-track.positive span {
  background: linear-gradient(90deg, #15803d, #86efac);
}

.flow-track.negative {
  justify-content: end;
}

.flow-track.negative span {
  background: linear-gradient(90deg, #fecaca, #dc2626);
}

.flow-row em {
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.route-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(520px, 1.18fr);
  gap: 16px;
}

.tool-panel {
  min-width: 0;
  padding: 16px;
  background: rgba(18, 21, 20, 0.82);
}

.tool-panel.flush {
  padding: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 1.03rem;
  letter-spacing: 0;
}

.panel-head span,
.subtle {
  color: var(--soft);
  font-size: 0.84rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.screener-search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.search-field {
  grid-column: span 2;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.search-suggestions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.045);
  color: var(--muted);
  cursor: pointer;
  transition:
    transform 0.18s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out;
}

.search-suggestions button:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 173, 76, 0.36);
  background: rgba(215, 173, 76, 0.08);
}

.search-suggestions span,
.search-suggestions strong,
.search-suggestions em {
  font-size: 0.78rem;
}

.search-suggestions em {
  font-style: normal;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.05);
  color: var(--ink);
  padding: 0 12px;
  outline: 0;
}

.field textarea {
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(215, 173, 76, 0.55);
  box-shadow: 0 0 0 3px rgba(215, 173, 76, 0.1);
}

.data-table-wrap {
  overflow: auto;
}

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

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child,
.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  text-align: left;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #151816;
  color: var(--soft);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.data-table td {
  color: var(--muted);
  font-size: 0.92rem;
}

.data-table tr:hover td {
  background: rgba(244, 241, 232, 0.035);
}

.data-table tbody tr {
  cursor: pointer;
  transition:
    transform 0.2s ease-out,
    background 0.2s ease-out,
    box-shadow 0.2s ease-out;
}

.data-table tbody tr.is-selected td {
  background: rgba(215, 173, 76, 0.11);
  box-shadow: inset 0 1px 0 rgba(215, 173, 76, 0.18), inset 0 -1px 0 rgba(215, 173, 76, 0.18);
}

.symbol-link {
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.05);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.tag.green {
  border-color: rgba(34, 197, 94, 0.25);
  color: #a7f3c3;
}

.tag.gold {
  border-color: rgba(215, 173, 76, 0.3);
  color: #f8db95;
}

.tag.diamond {
  border-color: rgba(92, 168, 255, 0.36);
  color: #c9e1ff;
}

.tag.red {
  border-color: rgba(239, 68, 68, 0.26);
  color: #ffb4b4;
}

.stock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.stock-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.82);
}

.stock-title h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: 0;
}

.stock-title p {
  margin: 7px 0 0;
  color: var(--muted);
}

.price-tape {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.price-tape strong {
  color: var(--ink);
  font-size: 1.95rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.metric-card {
  min-height: 98px;
  padding: 14px;
}

.chart-workspace {
  display: block;
}

.chart-page {
  padding-top: 12px;
}

.chart-page-inner {
  width: min(1600px, 100%);
}

.tv-terminal {
  overflow: hidden;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.tv-topbar {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(420px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border-bottom: 1px solid #d8dde4;
  background: #ffffff;
}

.tv-symbol-search {
  display: grid;
  grid-template-columns: 42px 1fr 34px;
  gap: 8px;
  align-items: center;
}

.tv-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #2f2a8f;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.tv-symbol-search input {
  min-height: 36px;
  border: 1px solid #d6dbe3;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  padding: 0 12px;
  outline: 0;
}

.tv-icon-button,
.tv-tools button,
.tv-actions button,
.tv-left-rail button,
.tv-bottom-bar button,
.watchlist-table button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-weight: 800;
}

.tv-icon-button {
  min-height: 34px;
}

.tv-tools,
.tv-actions,
.tv-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tv-menu-group {
  position: relative;
  display: inline-flex;
}

.tv-tools button,
.tv-actions button,
.tv-bottom-bar button {
  min-height: 34px;
  padding: 0 10px;
}

.tv-tool-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tv-tool-trigger em,
.tv-tool-trigger small {
  color: #6b7280;
  font-size: 0.72rem;
  font-style: normal;
}

.tool-icon {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #f3f4f6;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 950;
}

.tv-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 25;
  width: 300px;
  padding: 8px;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.dropdown-title {
  padding: 6px 8px 10px;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-type-dropdown button {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px;
  text-align: left;
}

.chart-type-dropdown button strong,
.chart-type-dropdown button small {
  display: block;
}

.chart-type-dropdown button small {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.74rem;
}

.chart-type-dropdown button:hover,
.chart-type-dropdown button.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.indicator-menu-group .indicator-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 25;
  width: min(680px, calc(100vw - 56px));
  margin: 0;
  border-color: #d8dde4;
  background: #fff;
  color: #111827;
}

.chart-tools .indicator-menu-group .indicator-dropdown {
  left: auto;
  right: 0;
}

.indicator-menu-group .indicator-list {
  grid-template-columns: repeat(2, minmax(210px, 1fr));
}

.indicator-menu-group .indicator-row {
  border-bottom-color: #eef2f7;
  background: #fff;
  color: #111827;
}

.indicator-menu-group .indicator-row:hover {
  background: #f8fafc;
}

.indicator-menu-group .indicator-row small {
  color: #6b7280;
}

.tv-tools button:hover,
.tv-tools button.is-active,
.tv-actions button:hover,
.tv-bottom-bar button:hover,
.tv-bottom-bar button.is-active,
.tv-left-rail button:hover,
.tv-left-rail button.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #1e1b4b;
}

.tv-actions {
  justify-content: end;
}

.tv-actions .publish {
  background: #111827;
  color: #fff;
}

.tv-actions button.is-active {
  border-color: #111827;
  background: #e5e7eb;
}

.tv-actions .publish.is-active {
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.16);
}

.tv-body {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 320px;
  min-height: 690px;
}

.tv-left-rail {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px 8px;
  border-right: 1px solid #d8dde4;
  background: #fff;
}

.tv-left-rail button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  font-size: 0.9rem;
}

.chart-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1211;
}

.tv-chart-frame {
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.chart-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.symbol-search-panel {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
}

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

.timeframes,
.chart-tools,
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip,
.timeframes button,
.chart-tools button,
.segmented button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.045);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
}

.chip:hover,
.chip.is-active,
.timeframes button.is-active,
.chart-tools button.is-active,
.segmented button.is-active {
  border-color: rgba(215, 173, 76, 0.45);
  background: rgba(215, 173, 76, 0.1);
  color: #f8db95;
}

.chart-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.035);
  color: var(--muted);
  font-size: 0.78rem;
}

.tv-chart-frame .chart-readout {
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
}

.tv-chart-frame .chart-readout strong {
  color: #111827;
}

.chart-readout strong {
  color: var(--ink);
}

.chart-readout small {
  margin-left: auto;
  color: var(--soft);
}

.chart-canvas-wrap {
  height: 520px;
  padding: 8px;
}

.tv-chart-frame .chart-canvas-wrap {
  height: 590px;
  padding: 0;
  background: #fff;
}

.chart-canvas-wrap canvas {
  height: 100%;
}

.applied-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #fbfdff;
}

.applied-indicators.empty {
  color: #6b7280;
  font-size: 0.82rem;
}

.indicator-chip {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.indicator-chip strong,
.indicator-chip small {
  display: block;
}

.indicator-chip small,
.indicator-chip em {
  color: #6b7280;
  font-size: 0.7rem;
  font-style: normal;
}

.indicator-chip label {
  display: grid;
  gap: 2px;
}

.indicator-chip input {
  width: 68px;
  min-height: 28px;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  padding: 0 7px;
}

.indicator-chip input[readonly] {
  color: #6b7280;
}

.indicator-chip button {
  min-height: 28px;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.indicator-chip.is-editing {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.22);
}

.tv-bottom-bar {
  min-height: 44px;
  padding: 6px 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.tv-bottom-bar span {
  margin-left: auto;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 750;
}

.tv-side-panel {
  border-left: 1px solid #d8dde4;
  background: #fff;
  color: #111827;
}

.tv-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid #e5e7eb;
}

.watchlist-table {
  display: grid;
}

.watchlist-table > div,
.watchlist-table button {
  display: grid;
  grid-template-columns: 1fr 0.9fr 0.7fr;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.watchlist-table > div {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 850;
}

.watchlist-table button.is-active {
  border-color: #111827;
  background: #f3f4f6;
}

.stock-mini-profile {
  display: grid;
  gap: 8px;
  padding: 16px 14px;
}

.stock-mini-profile > span,
.stock-mini-profile small {
  color: #6b7280;
}

.stock-mini-profile h3 {
  margin: 8px 0 0;
  font-size: 2rem;
}

.stock-mini-profile .insight-item {
  border-color: #e5e7eb;
  background: #f8fafc;
}

.stock-mini-profile .insight-item p {
  color: #4b5563;
}

.indicator-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.82);
  overflow: hidden;
}

.indicator-dropdown {
  margin: 12px;
  background: rgba(12, 14, 13, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  animation: drawerIn 0.18s ease-out;
}

.tv-chart-frame .indicator-dropdown {
  border-color: #d8dde4;
  background: #fff;
  color: #111827;
}

.tv-chart-frame .indicator-row {
  border-bottom-color: #eef2f7;
  background: #fff;
  color: #111827;
}

.tv-chart-frame .indicator-row:hover {
  background: #f8fafc;
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.indicator-panel h3 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.indicator-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  max-height: 340px;
  overflow: auto;
}

.indicator-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.08);
  cursor: pointer;
}

.indicator-row:hover {
  background: rgba(244, 241, 232, 0.04);
}

.indicator-row strong {
  font-size: 0.88rem;
}

.indicator-row small {
  display: block;
  margin-top: 3px;
  color: var(--soft);
}

.toggle-dot {
  width: 34px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.06);
  position: relative;
}

.toggle-dot::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--soft);
  transition: transform 0.16s ease;
}

.indicator-row.is-active .toggle-dot {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.15);
}

.indicator-row.is-active .toggle-dot::after {
  transform: translateX(14px);
  background: var(--green);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.045);
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
}

.tab-button.is-active {
  border-color: rgba(215, 173, 76, 0.45);
  color: #f8db95;
  background: rgba(215, 173, 76, 0.1);
}

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

.insight-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.04);
}

.insight-item strong {
  display: block;
  margin-bottom: 5px;
}

.insight-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.insight-item.notice {
  margin-top: 12px;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(520px, 1.1fr);
  gap: 16px;
}

.human-review {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.82);
}

.analyst-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.22fr);
  gap: 14px;
}

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

.analyst-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.045);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.analyst-card:hover,
.analyst-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(215, 173, 76, 0.4);
  background: rgba(215, 173, 76, 0.08);
}

.analyst-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(215, 173, 76, 0.32);
  border-radius: 8px;
  background: rgba(215, 173, 76, 0.1);
  color: #f8db95;
  font-weight: 900;
}

.analyst-card strong {
  display: block;
  color: var(--ink);
}

.analyst-card small {
  display: block;
  margin-top: 4px;
  color: var(--soft);
}

.analyst-card em {
  color: var(--gold);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.analyst-profile {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.045);
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.portfolio-card,
.copilot-card,
.education-card {
  padding: 16px;
  background: rgba(18, 21, 20, 0.82);
}

.holding-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.holding-row input {
  min-width: 0;
}

.score-ring {
  display: grid;
  width: 148px;
  height: 148px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 999px;
  background:
    conic-gradient(var(--green) 0deg, var(--green) 244deg, rgba(244, 241, 232, 0.1) 244deg 360deg);
}

.score-ring span {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 999px;
  background: #101210;
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 900;
}

.allocation-bars {
  display: grid;
  gap: 10px;
}

.allocation-row {
  display: grid;
  grid-template-columns: 100px 1fr 46px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.09);
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.copilot-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(520px, 1.15fr);
  gap: 16px;
}

.message-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(215, 173, 76, 0.25);
  border-radius: 8px;
  background: rgba(215, 173, 76, 0.08);
}

.meter-line {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.12);
}

.meter-line span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.upload-zone {
  display: grid;
  gap: 10px;
  min-height: 160px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(199, 205, 209, 0.38);
  border-radius: 8px;
  background: rgba(199, 205, 209, 0.05);
  text-align: center;
}

.upload-zone input {
  max-width: 100%;
}

.research-result {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.075);
}

.research-result.muted {
  border-color: var(--line);
  background: rgba(244, 241, 232, 0.04);
}

.research-result strong {
  display: block;
  margin-bottom: 5px;
}

.research-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.chat-window {
  display: grid;
  gap: 12px;
  min-height: 430px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0e;
}

.message {
  max-width: 78%;
  padding: 12px;
  border-radius: 8px;
  line-height: 1.55;
}

.message.bot {
  justify-self: start;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.06);
}

.message.user {
  justify-self: end;
  background: rgba(34, 197, 94, 0.13);
  border: 1px solid rgba(34, 197, 94, 0.26);
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.chat-compose input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.05);
  color: var(--ink);
  padding: 0 12px;
  outline: 0;
}

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

.pricing-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  background: rgba(18, 21, 20, 0.82);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.pricing-card:hover,
.pricing-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(215, 173, 76, 0.5);
}

.pricing-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.price strong {
  font-size: 2.1rem;
  letter-spacing: 0;
}

.price span {
  color: var(--soft);
}

.feature-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.feature-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
}

.plan-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.plan-detail-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 241, 232, 0.04);
}

.plan-detail-card.highlight {
  border-color: rgba(215, 173, 76, 0.38);
  background: linear-gradient(135deg, rgba(215, 173, 76, 0.14), rgba(34, 197, 94, 0.07));
}

.plan-detail-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-detail-card strong {
  color: var(--ink);
  line-height: 1.45;
}

.plan-detail-card ul,
.plan-detail-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.4;
}

.plan-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.plan-pill-list em {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.05);
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.comparison-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 21, 20, 0.82);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 1px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.compare-cell {
  min-height: 48px;
  padding: 12px;
  background: #141715;
  color: var(--muted);
}

.compare-cell.head {
  color: var(--ink);
  font-weight: 850;
}

.compare-cell.yes {
  color: #abf2c3;
}

.compare-cell.no {
  color: #a2998e;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.education-card h3 {
  margin: 0 0 8px;
}

.education-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(18px, 3vw, 42px) 34px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.84rem;
}

@media (max-width: 1360px) {
  .site-header {
    grid-template-columns: minmax(230px, 1fr) auto;
  }

  .primary-nav {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(244, 241, 232, 0.06);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
  }

  .mobile-nav.is-open {
    display: flex;
    flex-wrap: wrap;
  }

  .stock-search {
    width: min(300px, 38vw);
  }

  .tv-topbar {
    grid-template-columns: 1fr;
  }

  .tv-actions {
    justify-content: start;
  }

}

@media (max-width: 1180px) {
  .hero,
  .dashboard-grid,
  .market-pulse-grid,
  .stock-layout,
  .portfolio-grid,
  .copilot-layout {
    grid-template-columns: 1fr;
  }

  .hero-terminal {
    margin: 0 24px 24px;
  }

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

  .heat-map {
    grid-template-columns: repeat(6, 1fr);
  }

  .plan-detail-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .tv-body {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .tv-side-panel {
    grid-column: 1 / -1;
    border-top: 1px solid #d8dde4;
    border-left: 0;
  }

  .heat-tile.xl,
  .heat-tile.lg {
    grid-column: span 3;
  }

  .heat-tile.md {
    grid-column: span 2;
  }

  .filter-grid,
  .indicator-list,
  .analyst-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .header-actions {
    justify-content: stretch;
  }

  .stock-search {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(11, 12, 12, 0.96) 0%, rgba(11, 12, 12, 0.72) 75%, rgba(11, 12, 12, 0.96) 100%),
      url("assets/market-hero.png") center / cover no-repeat;
  }

  .terminal-grid,
  .metric-grid,
  .filter-grid,
  .screener-search-panel,
  .market-grid,
  .pricing-grid,
  .education-grid,
  .plan-detail-grid,
  .indicator-list,
  .analyst-grid,
  .profile-metrics {
    grid-template-columns: 1fr;
  }

  .heat-map {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 92px;
  }

  .heat-tile.xl,
  .heat-tile.lg,
  .heat-tile.md {
    grid-column: span 1;
    grid-row: span 1;
  }

  .breadth-stats,
  .flow-summary,
  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-row em {
    text-align: left;
  }

  .indicator-menu-group .indicator-dropdown,
  .tv-dropdown-panel {
    position: fixed;
    top: 132px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: min(72vh, 560px);
    overflow: auto;
  }

  .indicator-menu-group .indicator-list {
    grid-template-columns: 1fr;
  }

  .tv-body {
    grid-template-columns: 1fr;
  }

  .tv-left-rail {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #d8dde4;
  }

  .indicator-chip {
    grid-template-columns: 1fr;
  }

  .tv-chart-frame .chart-canvas-wrap {
    height: 480px;
  }

  .search-field {
    grid-column: span 1;
  }

  .route-title,
  .section-head {
    display: block;
  }

  .chart-canvas-wrap {
    height: 430px;
  }

  .holding-row {
    grid-template-columns: 1fr;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand strong {
    font-size: 1.18rem;
  }

  .brand small {
    font-size: 0.72rem;
  }

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

  .header-actions {
    flex-wrap: wrap;
  }

  .stock-search {
    flex-basis: 100%;
  }

  .hero-content {
    padding: 24px 18px;
  }

  .hero-terminal {
    margin: 0 12px 12px;
  }

  .button,
  button.button {
    width: 100%;
  }

  .chart-toolbar {
    align-items: stretch;
  }
}
