.hero {
  --hero-background-image: none;
  --hero-background-position-mobile: 58% center;
  --hero-background-position-tablet: 62% center;
  --hero-background-position-desktop: 68% center;
  --hero-background-position: var(--hero-background-position-mobile);
  --hero-overlay-strength: 0.86;

  position: relative;
  overflow: hidden;
  background: var(--color-canvas);
}

.hero::before,
.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.hero::before {
  background-image: var(--hero-background-image);
  background-position: var(--hero-background-position);
  background-repeat: no-repeat;
  background-size: cover;
}

.hero::after {
  background: rgb(7 16 20 / var(--hero-overlay-strength));
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: start;
  gap: var(--space-6);
  padding-block: var(--space-6);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.hero h1 {
  max-width: 12ch;
  font-size: 2.5rem;
}

.hero-positioning {
  max-width: 25ch;
  color: var(--color-text);
  font-size: var(--font-size-xl);
  line-height: 1.35;
}

.hero-description {
  max-width: 60ch;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-block-start: var(--space-1);
}

.button--primary {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-canvas);
  font-weight: 700;
}

.button--primary:hover {
  border-color: var(--color-brand-strong);
  background: var(--color-brand-strong);
}

.text-link {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}

.hero-disclosure {
  max-width: 48ch;
  color: var(--color-neutral);
  font-size: var(--font-size-xs);
}

.hero-market-preview {
  width: min(100%, 46rem);
  display: grid;
  justify-self: center;
  gap: var(--space-2);
}

.symbols-preview,
.session-summary {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.symbols-preview--primary {
  border-color: rgb(105 185 255 / 40%);
  background: var(--color-surface-raised);
}

.symbols-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
}

.preview-heading h2 {
  font-size: var(--font-size-lg);
}

.data-state,
.session-state {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.symbols-date {
  display: grid;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.25;
}

.symbols-date strong {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.symbols-header__action {
  grid-column: 1 / -1;
  min-height: var(--touch-target-min);
  border-color: var(--color-accent);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
}

.symbol-groups {
  display: grid;
  gap: var(--border-width);
  margin-block-start: var(--space-2);
  background: var(--color-border);
}

.symbol-group {
  min-width: 0;
  padding: var(--space-2);
  background: #02080b;
}

.symbol-group h3 {
  font-size: var(--font-size-sm);
}

.symbol-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-block-start: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.3;
}

.symbol-table th,
.symbol-table td {
  padding: 0.08rem var(--space-1);
  border: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.symbol-table th {
  padding-block-end: var(--space-1);
  color: var(--color-text-muted);
  font-weight: 500;
  text-align: right;
}

.symbol-table th:first-child,
.symbol-table td:first-child {
  width: 28%;
  padding-inline-start: 0;
  text-align: left;
}

.symbol-table th:last-child,
.symbol-table td:last-child {
  padding-inline-end: 0;
}

.symbol-group:nth-child(n + 3) .symbol-table th:first-child,
.symbol-group:nth-child(n + 3) .symbol-table td:first-child {
  width: 25%;
}

.symbol-group:nth-child(3) .symbol-table th:nth-child(2),
.symbol-group:nth-child(3) .symbol-table td:nth-child(2),
.symbol-group:nth-child(4) .symbol-table th:nth-child(3),
.symbol-group:nth-child(4) .symbol-table td:nth-child(3) {
  width: 27%;
}

.symbol-group:nth-child(3) .symbol-table th:nth-child(3),
.symbol-group:nth-child(3) .symbol-table td:nth-child(3),
.symbol-group:nth-child(4) .symbol-table th:nth-child(2),
.symbol-group:nth-child(4) .symbol-table td:nth-child(2) {
  width: 48%;
}

.symbol-table td {
  color: var(--color-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.symbol-table tbody:empty::after {
  height: 3.25rem;
  display: table-row;
  content: "";
}

.symbol-row__symbol {
  font-weight: 700;
}

.symbol-table .symbol-row__change--positive {
  color: #51f0a4;
  font-weight: 700;
}

.symbol-table .symbol-row__change--negative {
  color: #ff6767;
  font-weight: 700;
}

.symbol-table .symbol-row__change--neutral {
  color: var(--color-neutral);
  font-weight: 700;
}

.session-summary {
  padding-block: var(--space-2);
  box-shadow: none;
}

.session-summary h2 {
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.session-state {
  margin-block-start: var(--space-1);
}

.session-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: var(--space-1) 0 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  list-style: none;
}

.hero-market-preview[data-preview-state="loading"] .session-fields,
.hero-market-preview[data-preview-state="unavailable"] .session-fields,
.hero-market-preview[data-preview-state="error"] .session-fields {
  display: none;
}

.session-fields li {
  min-width: 0;
  display: grid;
  line-height: 1.25;
}

.session-fields strong {
  color: var(--color-text);
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

@media (min-width: 600px) {
  .symbol-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .symbols-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .symbols-header__action {
    grid-column: auto;
  }

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

@media (min-width: 768px) {
  .hero {
    --hero-background-position: var(--hero-background-position-tablet);
    --hero-overlay-strength: 0.88;
  }

  .hero h1 {
    font-size: 3.5rem;
  }
}

@media (min-width: 960px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(26rem, 1fr);
  }

  .session-fields {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .hero {
    --hero-background-position: var(--hero-background-position-desktop);
  }

  .hero h1 {
    font-size: 4.75rem;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(34rem, 1.1fr);
  }
}

@media (min-width: 768px) and (max-height: 720px) {
  .hero-layout {
    gap: var(--space-4);
    padding-block: var(--space-2);
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-copy {
    gap: var(--space-2);
  }

  .symbols-preview {
    padding: var(--space-2);
  }
}
