.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);
  container-type: inline-size;
}

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

.hero-copy > .eyebrow {
  color: var(--color-text-muted);
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.75rem, 12vw, 3.25rem);
  font-weight: 750;
  line-height: 1.05;
}

.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: 0;
}

.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(244 189 80 / 42%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  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(--title-primary-size);
  font-weight: var(--title-primary-weight);
  line-height: var(--title-primary-line-height);
}

.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: rgb(244 189 80 / 24%);
}

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

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

.symbol-group:nth-child(1) h3 {
  color: #51f0a4;
}

.symbol-group:nth-child(2) h3 {
  color: #ff7b78;
}

.symbol-group:nth-child(3) h3 {
  color: var(--color-info);
}

.symbol-group:nth-child(4) h3 {
  color: #d8b46c;
}

.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: var(--space-1);
  border-block-end: var(--border-width) solid rgb(244 189 80 / 30%);
  background: rgb(23 38 44 / 64%);
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  text-align: right;
}

.symbol-table tbody tr:not(:last-child) td {
  border-block-end: var(--border-width) solid rgb(244 189 80 / 16%);
}

.symbol-table th:first-child,
.symbol-table td:first-child {
  width: 42%;
  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 + 2) .symbol-table th:nth-child(2),
.symbol-group:nth-child(-n + 2) .symbol-table td:nth-child(2),
.symbol-group:nth-child(-n + 2) .symbol-table th:nth-child(3),
.symbol-group:nth-child(-n + 2) .symbol-table td:nth-child(3) {
  width: 29%;
}

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

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

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

.symbol-group:nth-child(4) .symbol-table th:first-child,
.symbol-group:nth-child(4) .symbol-table td:first-child {
  width: 34%;
}

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

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

.symbol-group:nth-child(n + 3) {
  padding-block: 0.375rem;
}

.symbol-group:nth-child(n + 3) h3 {
  font-size: 0.8125rem;
  font-weight: 600;
}

.symbol-group:nth-child(n + 3) .symbol-table {
  line-height: 1.2;
}

.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: var(--space-1) var(--space-2) var(--space-2);
  border-color: rgb(244 189 80 / 34%);
  border-block-start: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--color-surface-raised);
  box-shadow: none;
}

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

.session-state {
  margin: 0;
}

.session-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 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;
  padding-inline: var(--space-2);
  line-height: 1.25;
}

.session-fields li:nth-child(even) {
  border-inline-start: var(--border-width) solid rgb(244 189 80 / 22%);
}

.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));
  }

  .session-fields li:nth-child(even) {
    border-inline-start: 0;
  }

  .session-fields li:not(:nth-child(3n + 1)) {
    border-inline-start: var(--border-width) solid rgb(244 189 80 / 22%);
  }
}

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

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

@media (min-width: 800px) {
  .hero-layout {
    grid-template-columns: minmax(13rem, 0.33fr) minmax(0, 0.67fr);
    gap: var(--space-3);
    padding-block: var(--space-5) var(--space-3);
  }

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

  .hero h1 {
    font-size: clamp(2.5rem, 5cqi, 2.75rem);
    line-height: 1.08;
  }

  .hero-positioning {
    max-width: 22ch;
    font-size: var(--font-size-lg);
  }

  .hero-description {
    max-width: 38ch;
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .hero-actions {
    gap: var(--space-2);
    margin-block-start: 0;
  }

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

@media (min-width: 800px) and (max-width: 899px) {
  .symbol-group:nth-child(n + 3) .symbol-table {
    font-size: 0.6875rem;
  }

  .symbol-group:nth-child(n + 3) .symbol-table th,
  .symbol-group:nth-child(n + 3) .symbol-table td {
    padding-inline: 0.125rem;
  }

  .symbol-group:nth-child(n + 3) .symbol-table th:first-child,
  .symbol-group:nth-child(n + 3) .symbol-table td:first-child {
    padding-inline-start: 0;
  }

  .symbol-group:nth-child(n + 3) .symbol-table th:last-child,
  .symbol-group:nth-child(n + 3) .symbol-table td:last-child {
    padding-inline-end: 0;
  }
}

@media (min-width: 900px) {
  .session-fields {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .session-fields li:not(:first-child) {
    border-inline-start: var(--border-width) solid rgb(244 189 80 / 22%);
  }
}

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

  .hero h1 {
    font-size: clamp(2.875rem, 4.75cqi, 3.5rem);
  }

  .hero-layout {
    grid-template-columns: minmax(15rem, 0.28fr) minmax(0, 0.72fr);
    gap: var(--space-4);
    padding-block: var(--space-5) var(--space-4);
  }
}

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

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

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

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