/* Markets pages extend the site's existing components and color tokens. */
.market-hero {
  padding-bottom: 34px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--brand-strong);
  text-decoration: none;
}

.breadcrumbs a:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.market-widget-shell {
  min-width: 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.market-widget-shell--overview {
  height: 670px;
}

.market-widget-shell--chart {
  height: 590px;
}

.market-widget-shell--profile {
  height: 560px;
}

.market-widget-shell--profile tv-company-profile {
  display: block;
  width: 100%;
  height: 100%;
}

.market-widget-shell--financials {
  height: 780px;
}

.market-widget-shell--heatmap {
  height: 1500px;
}

.tradingview-widget-container,
.tradingview-widget-container__widget {
  width: 100%;
}

.market-widget-shell .tradingview-widget-container {
  height: 100%;
}

.market-widget-shell .tradingview-widget-container__widget {
  height: calc(100% - 32px);
}

.tradingview-widget-copyright {
  min-height: 32px;
  padding-top: 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.tradingview-widget-copyright a {
  color: var(--brand-strong);
}

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

.market-card {
  display: flex;
  min-height: 196px;
  flex-direction: column;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.market-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.market-card .card-kicker,
.calculator-link .card-kicker {
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.market-card .card-action {
  margin-top: auto;
  padding-top: 20px;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 600;
}

.calculator-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.calculator-link {
  display: block;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color .15s;
}

.calculator-link:hover {
  border-color: var(--brand);
}

.calculator-link h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.calculator-link p {
  color: var(--muted);
  font-size: 14.5px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 54px;
  align-items: start;
}

.market-copy {
  max-width: 72ch;
}

.market-copy h2 {
  margin-top: 38px;
  font-size: clamp(25px, 3vw, 34px);
}

.market-copy h2:first-child {
  margin-top: 0;
}

.market-copy h3 {
  margin-top: 28px;
  font-size: 21px;
}

.market-copy p,
.market-copy ul {
  margin-top: 16px;
  color: var(--ink-soft);
}

.market-copy ul {
  padding-left: 22px;
}

.market-copy li + li {
  margin-top: 9px;
}

.market-aside {
  padding: 26px;
  background: var(--brand-wash);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.market-aside h2,
.market-aside h3 {
  font-size: 20px;
}

.market-aside p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
}

.market-aside ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.market-aside li + li {
  margin-top: 10px;
}

.market-aside a,
.text-link {
  color: var(--brand-strong);
  font-weight: 600;
}

.market-note {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.market-note h2 {
  font-size: 24px;
}

.market-note p {
  max-width: 66ch;
  margin-top: 12px;
  color: var(--muted);
}

.market-note a {
  display: inline-block;
  margin-top: 18px;
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.market-disclaimer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .calculator-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .market-cards {
    grid-template-columns: 1fr;
  }

  .market-widget-shell {
    padding: 8px;
    border-radius: var(--radius);
  }

  .market-widget-shell--overview {
    height: 620px;
  }

  .market-widget-shell--chart {
    height: 510px;
  }

  .market-widget-shell--profile {
    height: 520px;
  }

  .market-widget-shell--financials {
    height: 620px;
  }

  .market-widget-shell--heatmap {
    height: 1100px;
  }
}

@media (max-width: 480px) {
  .nav-cta {
    display: none;
  }

  .market-widget-shell--overview {
    height: 580px;
  }

  .market-widget-shell--chart {
    height: 470px;
  }

  .market-widget-shell--profile {
    height: 480px;
  }

  .market-widget-shell--financials {
    height: 560px;
  }

  .market-widget-shell--heatmap {
    height: 900px;
  }
}
