/* Industry interactive panel */

.industry-interactive .screen-inner > h2 {
  margin-bottom: 14px;
}

.ix-shell {
  display: grid;
  gap: 12px;
}

.ix-lede {
  margin: 0;
  max-width: 980px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.ix-year {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--red);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ix-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ix-kpi {
  position: relative;
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  box-shadow: var(--shadow-soft);
}

.ix-kpi strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--navy);
  font-family: "Times New Roman", serif;
  font-size: clamp(28px, 3.6vh, 36px);
  line-height: 1;
}

.ix-kpi strong small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

.ix-kpi > span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

.ix-kpi > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.ix-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--soft);
}

.ix-tab {
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.ix-tab:last-child {
  border-right: 0;
}

.ix-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.ix-tab.active {
  background: var(--white);
  color: var(--red);
  box-shadow: inset 0 -2px 0 var(--red);
}

.ix-panels {
  min-height: 250px;
}

.ix-panel {
  animation: ixFade 280ms ease;
}

@keyframes ixFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ix-panel {
    animation: none;
  }
}

.ix-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.ix-chart-card,
.ix-side,
.ix-segment,
.ix-policy {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.ix-chart-card {
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-soft);
}

.ix-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ix-chart-head h3,
.ix-side h3,
.ix-segment h3,
.ix-policy h3 {
  margin: 0;
  font-size: 15px;
}

.ix-chart-head p,
.ix-side p,
.ix-policy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.ix-bars,
.ix-wages {
  display: grid;
  gap: 8px;
}

.ix-bar,
.ix-wage {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(0, 2fr) 72px auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.ix-bar:hover,
.ix-wage:hover,
.ix-bar.is-hot,
.ix-wage.is-hot,
.ix-segment.is-hot {
  border-color: rgba(196, 40, 69, 0.28);
  background: rgba(196, 40, 69, 0.04);
  transform: translateY(-1px);
}

.ix-bar-label,
.ix-wage-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.ix-bar-track,
.ix-wage-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.ix-bar-track i,
.ix-wage-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  border-radius: inherit;
  background: linear-gradient(90deg, #1a4a7a, #2f6fad);
  transform: scaleX(0);
  transform-origin: left center;
}

.ix-bar.down .ix-bar-track i {
  background: linear-gradient(90deg, #9d1f38, #c42845);
}

.ix-wage-track i {
  background: linear-gradient(90deg, #0a1b31, #1a4a7a 55%, #c42845);
}

.ix-bar-value,
.ix-wage-value {
  justify-self: end;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.ix-bar.up .ix-bar-value {
  color: var(--blue);
}

.ix-bar.down .ix-bar-value {
  color: var(--red);
}

.ix-bar-value small,
.ix-wage-value small {
  margin-left: 1px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.ix-side {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 16px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(196, 40, 69, 0.06),
      transparent 42%
    ),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.ix-side ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.ix-side li + li {
  margin-top: 6px;
}

.ix-tip {
  margin-top: 4px !important;
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  background: rgba(196, 40, 69, 0.05);
  color: var(--ink) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.ix-segment-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ix-segment {
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  outline: none;
}

.ix-segment header small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ix-segment-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.ix-segment-metrics span {
  display: block;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.ix-segment-metrics strong {
  font-family: "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.1;
}

.ix-segment-metrics strong.up {
  color: var(--blue);
}

.ix-segment-metrics strong.down {
  color: var(--red);
}

.ix-mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 56px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.ix-mini-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: #d7e3f1;
}

.ix-mini-bars span.up {
  background: linear-gradient(180deg, #2f6fad, #1a4a7a);
}

.ix-mini-bars span.down {
  background: linear-gradient(180deg, #ef667c, #c42845);
}

.ix-policy-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ix-policy {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.ix-ring {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--p) * 1%), #e6ebf1 0);
}

.ix-ring::before {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--white);
  content: "";
}

.ix-ring strong {
  position: relative;
  z-index: 1;
  font-family: "Times New Roman", serif;
  font-size: 16px;
  line-height: 1;
}

.ix-ring small {
  font-family: var(--sans);
  font-size: 10px;
}

.ix-takeaways {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ix-takeaways li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
}

.ix-takeaways i {
  color: var(--red);
  font-family: "Times New Roman", serif;
  font-style: normal;
  font-weight: 700;
}

.industry-interactive .checked-note {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .ix-kpis,
  .ix-tabs,
  .ix-panel-grid,
  .ix-segment-row {
    grid-template-columns: 1fr;
  }

  .ix-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .ix-tab {
    border-bottom: 1px solid var(--line);
  }

  .ix-bar,
  .ix-wage {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ix-bar-value,
  .ix-wage-value {
    justify-self: start;
  }
}

@media (max-height: 760px) and (min-width: 821px) {
  body.deck-live .industry-interactive {
    padding-top: calc(var(--header-height) + 8px);
    padding-bottom: 18px;
  }

  .industry-interactive h2 {
    margin-bottom: 6px;
    font-size: clamp(34px, 5.2vh, 48px);
  }

  .ix-shell {
    gap: 8px;
  }

  .ix-lede {
    font-size: 13px;
  }

  .ix-kpis {
    gap: 8px;
  }

  .ix-kpi {
    padding: 8px 12px;
  }

  .ix-kpi strong {
    font-size: 28px;
  }

  .ix-panels {
    min-height: 210px;
  }

  .ix-bar,
  .ix-wage {
    padding: 4px 6px;
  }

  .ix-side {
    padding: 12px;
  }

  .ix-side ul,
  .ix-side p,
  .ix-tip {
    font-size: 12px !important;
  }
}
