/* ========================================
   MARKET REPORT PAGE
======================================== */

.market-report-page .desktop-navigation a.active,
.market-report-page .mobile-navigation a.active {
  color: var(--brand-primary);
}

.market-report-hero {
  position: relative;
  padding: 105px 0 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(31, 106, 225, 0.17), transparent 32%),
    linear-gradient(145deg, #f7faff 0%, #ffffff 58%, #eef5ff 100%);
  border-bottom: 1px solid var(--border);
}

.market-report-hero::after {
  content: '';
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 430px;
  height: 430px;
  border: 70px solid rgba(31, 106, 225, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.market-report-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.market-report-hero h1 {
  max-width: 900px;
  margin: 12px 0 18px;
  color: var(--text-primary);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.market-report-lead {
  max-width: 900px;
  margin: 0 0 12px;
  color: var(--text-primary);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.55;
}

.market-report-subcopy {
  max-width: 840px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.75;
}

.market-report-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin-top: 34px;
}

.market-report-meta-row > div {
  min-height: 102px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 106, 225, 0.14);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.market-report-meta-row span,
.market-report-meta-row strong {
  display: block;
}

.market-report-meta-row span {
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.market-report-meta-row strong {
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

.market-report-section {
  padding: 82px 0;
}

.market-report-section-soft {
  background: var(--background-soft);
}

.market-report-heading {
  max-width: 860px;
  margin-bottom: 32px;
}

.market-report-heading-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  max-width: none;
}

.market-report-heading-split > div:first-child {
  max-width: 840px;
}

.market-report-heading h2 {
  margin: 8px 0 12px;
  color: var(--text-primary);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.market-report-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
}

.market-freshness-notice {
  margin-bottom: 42px;
  padding: 18px 20px;
  color: #634919;
  background: #fff9e9;
  border: 1px solid #f0db9e;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.7;
}

.market-freshness-notice.is-clear {
  color: #24563f;
  background: #effaf4;
  border-color: #bce1cb;
}

.market-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.market-insight-card,
.market-loading-card {
  min-height: 210px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.market-insight-card > span {
  display: block;
  margin-bottom: 12px;
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-insight-card > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 31px;
  line-height: 1.1;
}

.market-insight-card h3 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.market-insight-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.market-loading-card {
  grid-column: 1 / -1;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.market-type-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 5px;
  background: var(--background-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.market-type-button {
  padding: 10px 17px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.market-type-button:hover {
  color: var(--brand-primary);
}

.market-type-button.is-active {
  color: #ffffff;
  background: var(--brand-primary);
  box-shadow: 0 6px 16px rgba(31, 106, 225, 0.22);
}

.market-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.market-area-card {
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}

.market-area-card.is-unavailable {
  background: #fbfcfe;
}

.market-area-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.market-area-card-heading h3 {
  margin: 8px 0 0;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.market-area-card-heading time {
  flex: 0 0 auto;
  padding-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.market-freshness-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.market-freshness-badge.is-current {
  color: #1f6848;
  background: #e8f7ef;
}

.market-freshness-badge.is-older {
  color: #7c5918;
  background: #fff2ce;
}

.market-freshness-badge.is-missing {
  color: #68727e;
  background: #edf0f4;
}

.market-area-description {
  min-height: 54px;
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.market-area-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.market-area-stat-grid > div {
  min-height: 84px;
  padding: 15px 14px;
  background: #ffffff;
}

.market-area-stat-grid span,
.market-area-stat-grid strong {
  display: block;
}

.market-area-stat-grid span {
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.market-area-stat-grid strong {
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  line-height: 1.25;
}

.market-area-context {
  margin-bottom: 18px;
  padding: 14px 15px;
  color: var(--text-secondary);
  background: var(--background-soft);
  border-left: 3px solid #99a7b8;
  border-radius: 0 9px 9px 0;
  font-size: 12px;
  line-height: 1.65;
}

.market-area-context.is-tight {
  border-left-color: #e59d37;
}

.market-area-context.is-moderate {
  border-left-color: var(--brand-primary);
}

.market-area-context.is-higher {
  border-left-color: #40a472;
}

.market-area-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-area-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.market-area-links a:hover {
  color: #ffffff;
  background: var(--brand-primary);
}

.market-unavailable-note {
  margin: 20px 0;
  padding: 15px;
  color: var(--text-secondary);
  background: var(--background-soft);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
}

.market-definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.market-definition-grid article {
  padding: 27px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.market-definition-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
  border-radius: 12px;
  font-size: 18px;
}

.market-definition-grid h3 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
}

.market-definition-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.market-research-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  padding: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, #1f6ae1 0%, #154b9f 100%);
  border-radius: var(--radius-large);
  box-shadow: 0 20px 50px rgba(31, 106, 225, 0.24);
}

.market-research-cta h2 {
  margin: 8px 0 12px;
  color: #ffffff;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
}

.market-research-cta p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.75;
}

.market-research-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 205px;
}

.market-outline-button {
  color: #ffffff !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
}

.market-outline-button:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

.market-report-disclaimer-section {
  padding: 0 0 76px;
}

.market-report-disclaimer {
  padding: 20px 22px;
  color: var(--text-secondary);
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.75;
}

.market-report-disclaimer strong {
  color: var(--text-primary);
}

.market-load-error {
  grid-column: 1 / -1;
  padding: 28px;
  color: #7c3c3c;
  background: #fff5f5;
  border: 1px solid #efcaca;
  border-radius: 12px;
}

.market-load-error strong,
.market-load-error p {
  display: block;
}

.market-load-error p {
  margin: 6px 0 0;
}

@media (max-width: 1100px) {
  .market-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .market-report-hero {
    padding: 78px 0 58px;
  }

  .market-report-meta-row,
  .market-area-grid,
  .market-definition-grid {
    grid-template-columns: 1fr;
  }

  .market-report-heading-split,
  .market-research-cta {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .market-type-toggle {
    justify-self: start;
  }

  .market-research-cta-actions {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .market-report-hero h1 {
    font-size: 39px;
  }

  .market-report-section {
    padding: 62px 0;
  }

  .market-insight-grid {
    grid-template-columns: 1fr;
  }

  .market-area-card {
    padding: 21px;
  }

  .market-area-card-heading {
    display: block;
  }

  .market-area-card-heading time {
    display: block;
    margin-top: 7px;
  }

  .market-area-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .market-type-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .market-type-button {
    padding-left: 10px;
    padding-right: 10px;
  }

  .market-research-cta {
    padding: 30px 24px;
  }

  .market-research-cta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ========================================
   OREGON + WASHINGTON MARKET SECTIONS
======================================== */

.market-region-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.market-region-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 17px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 106, 225, 0.16);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.market-region-jump span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  color: #ffffff;
  background: var(--brand-primary);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.market-region-jump i {
  color: var(--brand-primary);
}

.market-region-jump:hover {
  color: var(--brand-primary);
  border-color: rgba(31, 106, 225, 0.35);
  transform: translateY(-1px);
}

.market-region-section {
  scroll-margin-top: 90px;
}

.market-region-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.market-region-topline > a {
  color: var(--brand-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.market-region-topline > a i {
  margin: 0 4px;
}

.market-region-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  color: #ffffff;
  background: var(--brand-primary);
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-region-state-washington {
  background: #334f79;
}

.market-state-subheading {
  max-width: 820px;
  margin: 44px 0 24px;
}

.market-state-subheading-spaced {
  margin-top: 58px;
}

.market-state-subheading h3 {
  margin: 7px 0 10px;
  color: var(--text-primary);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.market-state-subheading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.market-region-source-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  margin: 0 0 24px;
  padding: 17px 19px;
  color: #31445c;
  background: #f4f8fd;
  border: 1px solid #cfdef0;
  border-radius: 12px;
}

.market-region-source-note i {
  margin-top: 4px;
  color: var(--brand-primary);
  font-size: 16px;
}

.market-region-source-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.market-insight-status-card {
  grid-column: 1 / -1;
  padding: 27px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.market-insight-status-card > span {
  display: block;
  margin-bottom: 8px;
  color: #8a621c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-insight-status-card h3 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.4;
}

.market-insight-status-card p {
  max-width: 900px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.market-area-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 6px;
  padding: 4px 9px;
  color: #5d4b79;
  background: #f0eafb;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

#oregon-market .market-area-grid,
#washington-market .market-area-grid {
  align-items: stretch;
}

#washington-market .market-area-card {
  border-color: #d8e2ee;
}

@media (max-width: 900px) {
  .market-region-jumps {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .market-region-jump {
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .market-region-jumps {
    grid-template-columns: 1fr;
  }

  .market-region-jump {
    justify-content: flex-start;
    width: 100%;
  }

  .market-region-topline {
    align-items: flex-start;
  }

  .market-region-topline > a {
    text-align: right;
  }

  .market-state-subheading,
  .market-state-subheading-spaced {
    margin-top: 38px;
  }

  .market-region-source-note {
    grid-template-columns: 1fr;
  }

  .market-region-source-note i {
    margin-top: 0;
  }
}
