:root {
  color-scheme: light;
  --ink: #192027;
  --muted: #66717c;
  --line: #dce2e8;
  --paper: #f7f4ec;
  --white: #fffdf8;
  --green: #246a5b;
  --red: #c35245;
  --gold: #c99232;
  --blue: #2f6f93;
  --shadow: 0 24px 70px rgba(25, 32, 39, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    linear-gradient(135deg, rgba(36, 106, 91, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(201, 146, 50, 0.13), transparent 42%),
    var(--paper);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(25, 32, 39, 0.08);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  transition: 0.2s ease;
}

nav a:hover,
nav a.active {
  color: var(--ink);
  background: rgba(36, 106, 91, 0.11);
}

.home-hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(36px, 7vw, 88px) clamp(18px, 6vw, 82px);
}

.hero-copy h1,
.bp-hero h1,
.page-intro h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(40px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy h1 em {
  color: var(--green);
  font-style: normal;
}

.hero-copy p,
.bp-hero p,
.page-intro p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.domain-signature {
  display: inline-flex;
  margin-top: 26px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 2px solid var(--gold);
}

.button,
button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 16px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.primary,
button:hover {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

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

.tile,
.grid article,
.cards article,
.spotlight,
.timeline {
  border: 1px solid rgba(25, 32, 39, 0.08);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.tile {
  min-height: 208px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.2s ease;
}

.tile:hover {
  transform: translateY(-4px);
}

.tile span {
  color: var(--gold);
  font-weight: 900;
}

.tile strong {
  font-size: 26px;
}

.tile small {
  color: var(--muted);
  line-height: 1.6;
}

.market-tile {
  grid-column: span 2;
  min-height: 164px;
  background: #202c35;
  color: white;
}

.market-tile small {
  color: rgba(255, 255, 255, 0.72);
}

.workspace,
.bp-page,
.pdf-page {
  padding: clamp(30px, 5vw, 72px) clamp(18px, 6vw, 82px);
}

.page-intro,
.bp-hero {
  margin-bottom: 28px;
}

.bp-hero {
  padding: clamp(28px, 5vw, 58px) 0 10px;
}

.leader-theme .eyebrow,
.leader-theme h2,
.leader-theme h3 {
  color: var(--red);
}

.value-theme .eyebrow,
.value-theme h2,
.value-theme h3 {
  color: var(--green);
}

.xupan-theme .eyebrow,
.xupan-theme h2,
.xupan-theme h3 {
  color: var(--blue);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(25, 32, 39, 0.08);
  margin: 28px 0;
}

.metric-strip div {
  min-height: 118px;
  padding: 20px;
  background: rgba(255, 253, 248, 0.86);
}

.metric-strip strong {
  display: block;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.grid,
.cards {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

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

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

.grid article,
.cards article,
.spotlight,
.timeline {
  padding: clamp(20px, 3vw, 32px);
}

h2,
h3 {
  margin: 0 0 12px;
  letter-spacing: 0;
}

p {
  line-height: 1.75;
}

.grid p,
.cards p,
.spotlight p,
.timeline span {
  color: var(--muted);
}

.spotlight {
  margin: 20px 0;
  background: #18382f;
  color: white;
}

.spotlight p {
  color: rgba(255, 255, 255, 0.78);
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.timeline div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.pdf-page {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.pdf-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.pdf-topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
}

.pdf-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid rgba(25, 32, 39, 0.12);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .home-hero,
  .grid.two,
  .grid.three,
  .cards {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .hero-panel,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .timeline div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  nav {
    justify-content: flex-start;
  }

  .pdf-topbar {
    align-items: stretch;
    flex-direction: column;
  }
}

.market-body {
  background: #eef1f3;
}

.market-header {
  position: relative;
  background: #fbfcfc;
}

.market-workspace {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 44px) 20px;
}

.market-titlebar,
.feed-status,
.section-heading,
.market-disclaimer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.market-titlebar h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.market-titlebar .eyebrow,
.section-heading .eyebrow {
  margin-bottom: 7px;
}

.feed-status {
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid #d8dee3;
  border-radius: 7px;
  background: white;
}

.feed-status div {
  display: grid;
  min-width: 150px;
}

.feed-status small {
  color: var(--muted);
  font-size: 11px;
}

.status-dot,
.source-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9aa4ac;
}

.status-dot.online,
.source-dot.online {
  background: #1d9274;
  box-shadow: 0 0 0 4px rgba(29, 146, 116, 0.12);
}

.status-dot.stale {
  background: var(--gold);
}

.status-dot.error,
.source-dot.error {
  background: var(--red);
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}

.icon-button.spinning {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.phase-switch {
  display: inline-flex;
  gap: 2px;
  margin: 24px 0 16px;
  padding: 3px;
  border: 1px solid #d8dee3;
  border-radius: 7px;
  background: #e3e8eb;
}

.phase-switch button {
  min-width: 68px;
  border: 0;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.phase-switch button:hover,
.phase-switch button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(25, 32, 39, 0.12);
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #d8dee3;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.pulse-grid article {
  position: relative;
  min-height: 122px;
  padding: 18px 20px;
  border-right: 1px solid #e2e7ea;
}

.pulse-grid article:last-child {
  border-right: 0;
}

.pulse-grid span,
.pulse-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.pulse-grid strong {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 34px;
  line-height: 1;
}

.pulse-grid strong b {
  font-weight: 800;
}

.pulse-grid strong i {
  color: #aeb6bc;
  font-size: 20px;
  font-style: normal;
}

.up { color: var(--red); }
.down { color: #178261; }

.emotion-meter div {
  position: absolute;
  right: 20px;
  bottom: 17px;
  left: 20px;
  height: 4px;
  overflow: hidden;
  background: #e4e8eb;
}

.emotion-meter div i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #178261 0%, #c99232 55%, #c35245 100%);
  transition: width 0.35s ease;
}

.desk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
}

.candidate-panel,
.board-panel,
.source-panel {
  border: 1px solid #d8dee3;
  border-radius: 8px;
  background: white;
}

.section-heading {
  min-height: 70px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e7ea;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.section-heading > span {
  color: var(--muted);
  font-size: 13px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  height: 56px;
  padding: 9px 14px;
  border-bottom: 1px solid #edf0f2;
  text-align: right;
  font-size: 13px;
}

th {
  height: 39px;
  color: #78838c;
  background: #f7f9fa;
  font-size: 11px;
  font-weight: 700;
}

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

td strong,
td small {
  display: block;
}

td small {
  margin-top: 2px;
  color: #8b959c;
  font-size: 10px;
}

.rank {
  color: #9aa4ac;
  font-variant-numeric: tabular-nums;
}

.rank.top {
  color: var(--gold);
  font-weight: 900;
}

.score {
  color: var(--blue);
  font-size: 16px;
}

.signal-list {
  display: flex;
  gap: 4px;
}

.signal-list span {
  padding: 4px 6px;
  border: 1px solid #dce3e7;
  border-radius: 4px;
  color: #50606a;
  background: #f8fafb;
  font-size: 10px;
}

.side-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}

.board-panel ol,
.source-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-panel li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 59px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf0f2;
}

.board-panel li > span {
  color: #9aa4ac;
  font-size: 11px;
}

.board-panel li div {
  min-width: 0;
  display: grid;
}

.board-panel li small {
  overflow: hidden;
  color: #8b959c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-panel li b {
  font-size: 13px;
}

.source-panel li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-bottom: 1px solid #edf0f2;
  font-size: 12px;
}

.source-panel li small {
  color: #8b959c;
  font-size: 10px;
}

.empty-state {
  padding: 70px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.empty-state.compact {
  padding: 28px 16px;
}

.market-disclaimer {
  margin-top: 14px;
  padding: 4px 2px;
  color: #78838c;
  font-size: 11px;
}

@media (max-width: 900px) {
  .desk-layout {
    grid-template-columns: 1fr;
  }

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

  .pulse-grid article:nth-child(2) {
    border-right: 0;
  }

  .pulse-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid #e2e7ea;
  }
}

@media (max-width: 560px) {
  .market-tile {
    grid-column: auto;
  }

  .market-titlebar {
    align-items: stretch;
    flex-direction: column;
  }

  .feed-status {
    width: 100%;
  }

  .feed-status div {
    min-width: 0;
    flex: 1;
  }

  .phase-switch {
    width: 100%;
    overflow-x: auto;
  }

  .phase-switch button {
    min-width: 62px;
    flex: 1 0 auto;
  }

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

  .pulse-grid article,
  .pulse-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #e2e7ea;
  }

  .pulse-grid article:last-child {
    border-bottom: 0;
  }

  .market-disclaimer {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

/* 2026-09-04 strength desk redesign */
.market-body {
  --terminal-bg: #090d10;
  --terminal-panel: #10161a;
  --terminal-panel-2: #f7f8f9;
  --terminal-line: rgba(255, 255, 255, 0.12);
  --terminal-line-light: #d9dde1;
  --terminal-text: #f4f7f8;
  --terminal-muted: #8f9aa3;
  --terminal-red: #e62f35;
  --terminal-green: #139863;
  --terminal-amber: #e99a24;
  --terminal-ink: #11181d;
  min-height: 100vh;
  color: var(--terminal-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 420px),
    var(--terminal-bg);
}

.terminal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 74px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 13, 16, 0.92);
  backdrop-filter: blur(18px);
}

.terminal-brand,
.terminal-title,
.terminal-nav,
.terminal-action {
  display: flex;
  align-items: center;
}

.terminal-brand {
  gap: 12px;
  padding: 12px 20px;
  border-right: 1px solid var(--terminal-line);
}

.terminal-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.terminal-brand span {
  display: grid;
  gap: 2px;
}

.terminal-brand strong {
  font-size: 24px;
  line-height: 1;
}

.terminal-brand small {
  color: #c5ccd2;
  font-size: 14px;
}

.terminal-title {
  padding: 0 28px;
  border-right: 1px solid var(--terminal-line);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.terminal-nav {
  gap: 4px;
  padding: 0 26px;
}

.terminal-nav a {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: #dce2e6;
  font-size: 16px;
  font-weight: 800;
}

.terminal-nav a::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 4px;
  background: var(--terminal-red);
  content: "";
  opacity: 0;
}

.terminal-nav a:hover,
.terminal-nav a.active {
  color: var(--terminal-red);
}

.terminal-nav a.active::after {
  opacity: 1;
}

.terminal-action {
  align-self: center;
  gap: 8px;
  height: 38px;
  margin-right: 16px;
  border-color: rgba(255, 255, 255, 0.2);
  background: #0c1114;
  color: var(--terminal-text);
}

.terminal-action:hover {
  border-color: var(--terminal-red);
  background: var(--terminal-red);
}

.terminal-action.spinning span {
  animation: spin 0.8s linear infinite;
}

.terminal-shell {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 8px 10px;
}

.command-strip {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 66px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #1b2228, #141a1f);
}

.command-strip .phase-switch {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.command-strip .phase-switch span,
.minute-badge span {
  color: #d7dde1;
  font-size: 14px;
  font-weight: 700;
}

.command-strip .phase-switch button {
  min-width: 64px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #e5e9ec;
  font-size: 14px;
}

.command-strip .phase-switch button:hover,
.command-strip .phase-switch button.active {
  border-color: rgba(230, 47, 53, 0.65);
  background: var(--terminal-red);
  color: #fff;
  box-shadow: 0 0 24px rgba(230, 47, 53, 0.24);
}

.command-strip .feed-status {
  justify-self: center;
  justify-content: center;
  min-width: 300px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--terminal-text);
}

.command-strip .feed-status small {
  color: #c7d0d6;
  font-size: 14px;
}

.minute-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dce4e8;
}

.minute-badge strong {
  color: var(--terminal-green);
  font-size: 14px;
}

.market-body .pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
  border: 1px solid var(--terminal-line);
  border-radius: 7px;
  overflow: hidden;
  background: #11171b;
}

.market-body .pulse-grid article {
  position: relative;
  min-height: 118px;
  padding: 22px 24px;
  border-right: 1px solid var(--terminal-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.market-body .pulse-grid span,
.market-body .pulse-grid small {
  color: #b7c0c7;
}

.market-body .pulse-grid strong {
  color: var(--terminal-text);
  font-size: clamp(30px, 4vw, 45px);
}

.emotion-spark {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: min(42%, 180px);
  height: 42px;
  overflow: visible;
}

.emotion-spark polyline {
  fill: none;
  stroke: var(--terminal-red);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 0 10px rgba(230, 47, 53, 0.36));
}

.market-body .up {
  color: var(--terminal-red);
}

.market-body .down {
  color: var(--terminal-green);
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 8px;
  margin-top: 8px;
}

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

.candidate-lane,
.rail-panel {
  border: 1px solid var(--terminal-line);
  border-radius: 7px;
  overflow: hidden;
  background: #f7f8f9;
  color: var(--terminal-ink);
}

.candidate-lane.is-current {
  border-color: rgba(230, 47, 53, 0.82);
  box-shadow: 0 0 0 1px rgba(230, 47, 53, 0.24);
}

.lane-head,
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--terminal-line-light);
}

.lane-head span,
.rail-head span {
  color: #66717a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.lane-head h2,
.rail-head h2 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.1;
}

.lane-head b {
  color: #77818a;
  font-size: 12px;
}

.auction-lane .lane-head h2 {
  color: var(--terminal-red);
}

.tail-lane .lane-head h2 {
  color: var(--terminal-green);
}

.candidate-stack {
  display: grid;
}

.candidate-card {
  display: grid;
  gap: 13px;
  min-height: 190px;
  padding: 16px;
  border-bottom: 1px solid #dfe3e6;
  outline: 0;
  background: #fbfcfc;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.candidate-card:hover,
.candidate-card:focus-visible {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--terminal-red);
}

.candidate-topline {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.rank {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: var(--terminal-red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.stock-id {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.stock-id strong {
  font-size: 13px;
  line-height: 1;
}

.stock-id b {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-block {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.score-block span,
.quote-row span,
.minute-row span,
.change-pair span {
  color: #65707a;
  font-size: 11px;
  font-weight: 800;
}

.score-block strong {
  color: var(--terminal-red);
  font-size: 24px;
  line-height: 1;
}

.quote-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.75fr;
  gap: 10px;
}

.quote-row div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quote-row strong {
  font-size: 14px;
  line-height: 1.2;
}

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

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

.change-pair div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  border: 1px solid #dfe4e7;
  border-radius: 6px;
  background: #f7f9fa;
}

.change-pair strong {
  font-size: 22px;
  line-height: 1;
}

.minute-row {
  display: grid;
  grid-template-columns: 32px 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dfe4e7;
  border-radius: 6px;
  background: #f2f5f6;
}

.minute-row strong {
  color: var(--terminal-ink);
  font-size: 13px;
}

.minute-row small {
  overflow: hidden;
  color: #65707a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfe3e6;
  border-radius: 6px;
  background: #dfe3e6;
}

.reason-grid div {
  min-width: 0;
  padding: 9px 8px;
  background: #fbfcfc;
}

.reason-grid dd {
  margin: 4px 0 0;
  color: #161c20;
  font-size: 12px;
  line-height: 1.42;
}

.market-rail {
  display: grid;
  gap: 8px;
  align-content: start;
}

.rail-panel {
  background: #11171b;
  color: var(--terminal-text);
}

.rail-head {
  border-color: var(--terminal-line);
}

.rail-head h2 {
  color: var(--terminal-text);
  font-size: 19px;
}

.rail-panel ol,
.rail-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-panel li {
  display: grid;
  align-items: center;
  min-height: 43px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--terminal-line);
}

.rail-panel ol li {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
}

.rail-panel ul li {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
}

.rail-panel li > span:first-child {
  color: #aab3ba;
  font-size: 12px;
  font-weight: 800;
}

.rail-panel li div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rail-panel li strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-panel li small {
  overflow: hidden;
  color: #9aa5ad;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-dot {
  width: 8px;
  height: 8px;
}

.market-body .empty-state {
  color: #7b858d;
}

.market-body .empty-state.compact {
  padding: 26px 14px;
}

.market-disclaimer {
  min-height: 66px;
  margin-top: 8px;
  padding: 0 24px;
  border: 1px solid var(--terminal-line);
  border-radius: 7px;
  background: #151b20;
  color: #c4ccd1;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .terminal-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .terminal-title {
    display: none;
  }

  .terminal-grid,
  .candidate-lanes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .terminal-header {
    grid-template-columns: 1fr auto;
  }

  .terminal-brand {
    border-right: 0;
  }

  .terminal-nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
    padding: 0 12px;
    border-top: 1px solid var(--terminal-line);
  }

  .terminal-nav a {
    min-height: 48px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .terminal-action {
    margin-right: 12px;
  }

  .command-strip,
  .market-body .pulse-grid,
  .quote-row,
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .command-strip .feed-status {
    justify-self: stretch;
    justify-content: flex-start;
    min-width: 0;
  }

  .command-strip .phase-switch {
    overflow-x: auto;
  }

  .market-body .pulse-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--terminal-line);
  }

  .market-body .pulse-grid article:last-child {
    border-bottom: 0;
  }

  .emotion-spark {
    width: 150px;
  }

  .minute-row {
    grid-template-columns: 32px 48px minmax(160px, 1fr);
    overflow-x: auto;
  }
}
