/* One shared, editorial question/answer layout across the industry detail pages. */
.industry-output-section[data-chat-section] .industry-output-layout {
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}
.industry-output-section[data-chat-section] .industry-output-heading { position: static; align-self: center; min-width: 0; }
.industry-output-section[data-chat-section] .industry-chat-intro { margin: 0; max-width: none; color: rgba(255,255,255,.7); font-size: 1.0625rem; line-height: 1.6; }
.industry-chat-nav { display: grid; margin-top: 40px; }
.industry-chat-nav a {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center; gap: 16px; min-height: 88px; padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.72);
  font-size: 1.0625rem; line-height: 1.5; font-weight: 500; text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
.industry-chat-nav a:last-child { border-bottom: 1px solid rgba(255,255,255,.2); }
.industry-chat-nav a[aria-current="step"], .industry-chat-nav a:hover { color: #fff; border-top-color: var(--gold-soft); }
.industry-chat-nav a:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 5px; }
.industry-chat-nav-number { font-family: var(--font-mono); font-size: .875rem; color: var(--gold-soft); }
.industry-chat-nav-arrow { color: var(--gold-soft); opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .2s ease; }
.industry-chat-nav a[aria-current="step"] .industry-chat-nav-arrow, .industry-chat-nav a:hover .industry-chat-nav-arrow { opacity: 1; transform: translateX(0); }
.industry-chat-nav-short { display: none; }
.industry-chat-metrics { margin: 20px 0 0; padding: 0; }
.industry-chat-metrics > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 0; border-top: 1px solid rgba(18,57,91,.12); }
.industry-chat-metrics dt { color: var(--ink-muted); font-size: 1rem; }
.industry-chat-metrics dd { margin: 0; font-family: var(--font-mono); font-size: 1.125rem; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 1023px) {
  .industry-output-section[data-chat-section] .industry-output-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .industry-chat-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
  .industry-chat-nav a { grid-template-columns: 1fr; align-content: start; gap: 6px; min-height: 72px; padding: 12px 0; font-size: 1rem; }
  .industry-chat-nav a:last-child { border-bottom: 0; }
  .industry-chat-nav-full, .industry-chat-nav-arrow { display: none; }
  .industry-chat-nav-short { display: block; }
}
.industry-chat .industry-chat-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  padding: 20px 28px 10px;
  background: #f8f5ee;
  color: var(--navy-700);
  font-size: 1rem;
}
.industry-chat-header > span { color: var(--ink-muted); font-size: .875rem; }
.industry-chat .industry-chat-disclaimer {
  margin: 0;
  padding: 0 28px 18px;
  border-bottom: 1px solid rgba(18,57,91,.12);
  background: #f8f5ee;
  color: var(--ink-muted);
  font-size: .875rem;
  line-height: 1.5;
}
.industry-chat-viewport {
  height: 520px;
  height: clamp(320px, 62svh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #829396 #efebe4;
  scrollbar-gutter: stable;
  scroll-padding-block: 24px;
  /* Keep native scroll chaining: this panel must not trap the page. */
  overscroll-behavior-y: auto;
}
.industry-chat-viewport:focus-visible { outline: 2px solid var(--navy-700); outline-offset: -4px; }
.industry-chat-transcript { display: flex; flex-direction: column; gap: 24px; padding: 28px; }
.industry-chat .industry-chat-message {
  flex-shrink: 0;
  width: 90%;
  min-width: 0;
  padding: 22px 24px;
  border-radius: 4px 16px 16px;
  background: #fff;
  color: var(--navy-700);
}
.industry-chat .industry-chat-question {
  align-self: flex-end;
  width: fit-content;
  max-width: 86%;
  border-radius: 16px 16px 4px;
  background: var(--navy-700);
  color: #fff;
}
.industry-chat .industry-chat-speaker {
  display: block;
  margin-bottom: 10px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}
.industry-chat-question .industry-chat-speaker { color: #cee5e3; }
.industry-chat .industry-chat-message p {
  margin: 0;
  max-width: none;
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.industry-chat .industry-chat-question p { font-weight: 600; color: #fff; }
.industry-chat .industry-chat-answer > p { color: var(--ink-muted); }
.industry-chat .industry-chat-answer h3 {
  margin: 0 0 12px;
  width: auto;
  max-width: none;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
.industry-chat .industry-evidence-still { margin: 20px 0 0; border-radius: 8px; }
.industry-chat .industry-evidence-still img { height: auto; max-height: 200px; aspect-ratio: 1400 / 788; object-fit: contain; background: var(--navy-950); }
.industry-chat .industry-evidence-still figcaption { display: block; padding: 12px 14px; }
.industry-chat .industry-evidence-still figcaption span,
.industry-chat .industry-evidence-still figcaption strong {
  display: block; max-width: none; text-align: left; font-family: var(--font-sans);
  font-size: .875rem; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5;
}
.industry-chat .industry-evidence-still figcaption span { margin-bottom: 4px; }
.industry-chat-timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.industry-chat-timeline li {
  display: grid; grid-template-columns: 8ch minmax(0, 1fr); gap: 16px;
  padding: 12px 0; border-top: 1px solid rgba(18,57,91,.12); font-size: 1rem; line-height: 1.5;
}
.industry-chat-timeline time, .industry-chat-time { font-family: var(--font-mono); font-size: .875rem; font-variant-numeric: tabular-nums; }
.industry-chat .industry-chat-answer .industry-chat-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(18,57,91,.12);
  color: var(--navy-700); font-weight: 600;
}
.industry-chat-typing { display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 8px; color: var(--ink-muted); }
.industry-chat-typing > span:not(:last-child) { width: 5px; height: 5px; border-radius: 50%; background: #477a7b; }
.industry-chat-typing-label { margin-left: 8px; font-size: .875rem; }
.industry-chat[data-chat-state="playing"] .industry-chat-typing > span:not(:last-child) { animation: industry-typing 1s ease-in-out infinite; }
.industry-chat-typing > span:nth-child(2) { animation-delay: .15s !important; }
.industry-chat-typing > span:nth-child(3) { animation-delay: .3s !important; }
.industry-chat .industry-chat-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px; min-height: 64px; padding: 8px 20px;
  border-top: 1px solid rgba(18,57,91,.12); background: #f8f5ee;
}
.industry-chat-status { font-size: .875rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.industry-chat-controls > div { display: flex; gap: 4px; flex-wrap: wrap; }
.industry-chat-controls button {
  min-height: 44px; min-width: 65px; padding: 8px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--navy-700); font: inherit; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: background-color .2s ease;
}
.industry-chat-controls button:hover { background: rgba(18,57,91,.08); }
.industry-chat-controls button:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 1px; }
.industry-chat-controls button:disabled { color: var(--ink-muted); cursor: default; opacity: .65; }
.industry-chat > .industry-chat-caption {
  min-height: 0; display: block; padding: 12px 28px; color: #fff;
  font-size: .875rem; line-height: 1.5; background: var(--navy-700);
}
.industry-chat [hidden] { display: none !important; }
.industry-chat.is-chat-enhanced .industry-chat-message:not([hidden]) { animation: industry-message .38s ease-out both; }
@keyframes industry-message { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes industry-typing { 50% { opacity: .35; transform: translateY(-3px); } }
@media (max-width: 600px) {
  .industry-chat .industry-chat-header { padding: 18px 18px 8px; }
  .industry-chat .industry-chat-disclaimer { padding: 0 18px 16px; }
  .industry-chat-transcript { padding: 20px 14px; gap: 20px; }
  .industry-chat .industry-chat-message { width: 97%; padding: 18px 16px; }
  .industry-chat .industry-chat-question { width: fit-content; max-width: 92%; }
  .industry-chat .industry-chat-controls { display: grid; grid-template-columns: 1fr; padding: 8px 14px; }
  .industry-chat > .industry-chat-caption { padding: 12px 18px; }
  .industry-chat-timeline li { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .industry-chat *, .industry-chat *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .industry-chat-nav * { transition: none !important; }
}
