/* HJ Installation Detail Experience — Phase 3
   Shared visual layer for exactly 25 approved Installation detail pages.
   Authored copy, schema, evidence and routing stay in their existing owners. */

body[data-hj-installation-page="detail"] {
  --hj-install-accent: var(--hj-cyan);
  --hj-install-accent-soft: rgba(85, 220, 255, .09);
  --hj-install-accent-line: rgba(85, 220, 255, .32);
  --hj-install-grid: rgba(105, 189, 232, .045);
}

body[data-hj-installation-page="detail"][data-hj-regulated="true"] {
  --hj-install-accent: #f3b84b;
  --hj-install-accent-soft: rgba(243, 184, 75, .075);
  --hj-install-accent-line: rgba(243, 184, 75, .36);
}

body[data-hj-installation-page="detail"] main[data-hj-installation-detail] {
  min-width: 0;
  overflow: clip;
}

/* Compact engineering-dossier hero */
body[data-hj-installation-page="detail"] .hj-install-hero {
  isolation: isolate;
  padding-block: clamp(1.8rem, 4.6vw, 3.8rem) clamp(1.35rem, 3.6vw, 2.7rem) !important;
  border-bottom: 1px solid var(--hj-line);
  background:
    linear-gradient(var(--hj-install-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hj-install-grid) 1px, transparent 1px),
    radial-gradient(circle at 79% 18%, var(--hj-install-accent-soft), transparent 31%),
    linear-gradient(125deg, rgba(13, 31, 52, .9), rgba(4, 9, 18, .98));
  background-size: 30px 30px, 30px 30px, auto, auto;
}

body[data-hj-installation-page="detail"] .hj-install-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(3, 8, 16, .12), rgba(3, 8, 16, .72) 54%, rgba(3, 8, 16, .18));
  pointer-events: none;
}

body[data-hj-installation-page="detail"] .hj-install-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 4.2rem);
}

body[data-hj-installation-page="detail"] .hj-install-hero-copy {
  align-self: center;
  min-width: 0;
  padding-block: 1rem;
}

body[data-hj-installation-page="detail"] .hj-install-hero .eyebrow {
  margin-bottom: 1rem;
  color: var(--hj-install-accent);
}

body[data-hj-installation-page="detail"] .hj-install-hero h1 {
  max-width: 16ch;
  margin-bottom: 1.05rem;
  font-size: clamp(2.45rem, 5vw, 4.65rem);
  line-height: .98;
}

body[data-hj-installation-page="detail"] .hj-install-hero .lead {
  max-width: 62ch !important;
  margin-bottom: 0;
  color: var(--hj-muted);
  font-size: clamp(.98rem, 1.35vw, 1.08rem) !important;
  line-height: 1.72;
}

body[data-hj-installation-page="detail"] .hj-install-hero .cta-row {
  gap: 10px;
  margin-top: 1.45rem;
}

body[data-hj-installation-page="detail"] .hj-install-hero .btn {
  min-height: 46px;
  padding: 11px 17px;
  border-radius: 9px;
  font-size: .9rem;
}

body[data-hj-installation-page="detail"] .hj-install-signal {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(1.55rem, 3vw, 2.35rem);
  border: 1px solid var(--hj-install-accent-line);
  border-radius: 14px;
  background: rgba(3, 10, 20, .76);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 22px 55px rgba(0, 0, 0, .22);
}

body[data-hj-installation-page="detail"] .hj-install-signal::before,
body[data-hj-installation-page="detail"] .hj-install-signal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

body[data-hj-installation-page="detail"] .hj-install-signal::before {
  inset: 0;
  background:
    linear-gradient(rgba(85, 220, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 220, 255, .035) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

body[data-hj-installation-page="detail"] .hj-install-signal::after {
  width: 190px;
  height: 190px;
  right: -76px;
  bottom: -90px;
  border: 1px solid var(--hj-install-accent-line);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(85, 220, 255, .025), 0 0 0 64px rgba(85, 220, 255, .018);
}

body[data-hj-installation-page="detail"] .hj-install-signal-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 2.2rem;
  color: var(--hj-install-accent);
  font: 600 .7rem/1.2 'JetBrains Mono', monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}

body[data-hj-installation-page="detail"] .hj-install-signal ol {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-hj-installation-page="detail"] .hj-install-signal ol::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 10%;
  right: 10%;
  border-top: 1px dashed var(--hj-install-accent-line);
}

body[data-hj-installation-page="detail"] .hj-install-signal li {
  position: relative;
  min-width: 0;
  color: var(--hj-muted);
  text-align: center;
  font-size: .7rem;
}

body[data-hj-installation-page="detail"] .hj-install-signal li span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  margin: 0 auto 10px;
  border: 1px solid var(--hj-install-accent-line);
  border-radius: 50%;
  color: var(--hj-install-accent);
  background: #06111f;
  font: 600 .72rem/1 'JetBrains Mono', monospace;
}

body[data-hj-installation-page="detail"] .hj-install-signal li strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--hj-white);
  font-size: .76rem;
  font-weight: 600;
}

body[data-hj-installation-page="detail"] .hj-install-delivery-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: clamp(1.45rem, 3.5vw, 2.6rem) 0 0;
  padding: 0;
  border-block: 1px solid var(--hj-line);
  list-style: none;
}

body[data-hj-installation-page="detail"] .hj-install-delivery-rail li {
  position: relative;
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--hj-line);
  color: var(--hj-text);
  text-align: center;
  font-size: .78rem;
}

body[data-hj-installation-page="detail"] .hj-install-delivery-rail li:last-child { border-right: 0; }
body[data-hj-installation-page="detail"] .hj-install-delivery-rail span {
  margin-right: 7px;
  color: var(--hj-install-accent);
  font: 600 .66rem/1 'JetBrains Mono', monospace;
}
body[data-hj-installation-page="detail"] .hj-install-delivery-rail strong { font-weight: 600; }

/* The package relationship becomes a concise system-fit dossier. */
body[data-hj-installation-page="detail"] .hj-install-system-map {
  padding-block: clamp(2.7rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 16% 14%, var(--hj-install-accent-soft), transparent 30%),
    linear-gradient(180deg, rgba(6, 15, 27, .98), rgba(7, 12, 22, .98));
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-section-head {
  max-width: 780px;
  margin-bottom: 0;
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-section-head h2 {
  max-width: 30ch;
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-section-head p {
  max-width: 70ch;
  margin-bottom: 0;
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-grid {
  margin-top: 1.45rem;
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, .018);
  box-shadow: none;
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-path {
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(85, 220, 255, .032);
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-copy {
  padding: clamp(1.15rem, 2.4vw, 1.8rem);
}

body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-copy p {
  line-height: 1.55;
}

/* Authored sections retain every word but gain distinct editorial roles. */
body[data-hj-installation-page="detail"] .hj-install-section {
  padding-block: clamp(3.1rem, 6.2vw, 5.25rem);
  border-top: 1px solid var(--hj-line-soft);
}

body[data-hj-installation-page="detail"] .hj-install-section.section-alt {
  background: #07101d;
}

body[data-hj-installation-page="detail"] .hj-install-section .section-head {
  margin-bottom: clamp(1.6rem, 3.4vw, 2.5rem);
}

body[data-hj-installation-page="detail"] .hj-install-section .section-head.center {
  max-width: 800px;
}

body[data-hj-installation-page="detail"] .hj-install-section .section-head h2,
body[data-hj-installation-page="detail"] .hj-install-section .split h2 {
  max-width: 23ch;
}

body[data-hj-installation-page="detail"] .hj-install-section .split {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .72fr);
  gap: clamp(2.2rem, 6vw, 6.5rem);
  align-items: center;
}

body[data-hj-installation-page="detail"] .hj-install-section .split.rev > :first-child { order: 2; }
body[data-hj-installation-page="detail"] .hj-install-section .split.rev > :last-child { order: 1; }

body[data-hj-installation-page="detail"] .hj-install-section .card {
  overflow: visible;
  padding: 22px 0 22px 22px;
  border: 0;
  border-left: 2px solid var(--hj-install-accent-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-hj-installation-page="detail"] .hj-install-section .card::before,
body[data-hj-installation-page="detail"] .hj-install-section .card::after { display: none; }
body[data-hj-installation-page="detail"] .hj-install-section .card:hover {
  border-color: var(--hj-install-accent);
  box-shadow: none;
  transform: none;
}

body[data-hj-installation-page="detail"] .hj-install-section .grid {
  gap: clamp(1rem, 2.6vw, 1.8rem);
}

body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="diagnostic"] .card {
  padding: 20px 18px 18px 0;
  border-left: 0;
  border-top: 1px solid var(--hj-line-strong);
}

body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="diagnostic"] .card h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 9px 1px 0;
  border: 1px solid var(--hj-install-accent);
  border-radius: 50%;
}

body[data-hj-installation-page="detail"] .hj-install-section .grid-6 .card {
  min-height: 0;
  padding: 17px 10px !important;
  border-left: 0;
  border-top: 1px solid var(--hj-line-strong);
}

body[data-hj-installation-page="detail"] .hj-install-section .check-list {
  gap: 0;
  margin-block: 1.1rem;
}

body[data-hj-installation-page="detail"] .hj-install-section .check-list li {
  min-height: 43px;
  align-items: center;
  padding-block: 9px;
  border-bottom: 1px solid var(--hj-line-soft);
}

body[data-hj-installation-page="detail"] .hj-install-section .check-list svg {
  color: var(--hj-install-accent);
}

/* Process cards become a single connected commissioning rail. */
body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .grid {
  position: relative;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .process-step {
  min-width: 0;
  padding: 20px 18px;
  border: 0;
  border-top: 1px solid var(--hj-install-accent-line);
  border-right: 1px solid var(--hj-line);
  border-radius: 0;
  background: transparent;
}

body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .process-step:last-child { border-right: 0; }
body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .process-step .num {
  margin-bottom: 1rem;
  color: var(--hj-install-accent);
  font: 600 .76rem/1 'JetBrains Mono', monospace;
  opacity: 1;
}

/* Aftercare, responsibility and product references read as an open ledger. */
body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="continuity"] {
  padding-block: clamp(2.25rem, 4.5vw, 3.4rem);
}

body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="continuity"] + .hj-install-section[data-hj-install-stage="continuity"] {
  border-top: 0;
  padding-top: 0;
}

body[data-hj-installation-page="detail"] .hj-install-section .callout {
  padding: 18px 20px;
  border: 0;
  border-left: 2px solid var(--hj-install-accent-line);
  border-radius: 0;
  background: rgba(255, 255, 255, .018);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-hj-installation-page="detail"] .hj-install-section .callout h4 {
  color: var(--hj-install-accent);
  font-size: .82rem;
  letter-spacing: .045em;
  text-transform: uppercase;
}

body[data-hj-installation-page="detail"][data-hj-regulated="true"] .hj-install-section .callout {
  border-left-color: var(--hj-install-accent-line);
}

/* FAQ becomes a two-column editorial area on desktop. */
body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="faq"] > .container {
  display: grid;
  grid-template-columns: minmax(220px, .56fr) minmax(0, 1.44fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="faq"] .section-head {
  position: sticky;
  top: calc(var(--hj-header-height, 72px) + 24px);
  margin: 0;
}

body[data-hj-installation-page="detail"] .hj-install-section .faq-list {
  max-width: none;
  gap: 0;
  border-top: 1px solid var(--hj-line-strong);
}

body[data-hj-installation-page="detail"] .hj-install-section .faq-item {
  border: 0;
  border-bottom: 1px solid var(--hj-line);
  border-radius: 0;
  background: transparent;
}

body[data-hj-installation-page="detail"] .hj-install-section .faq-item summary {
  min-height: 58px;
  padding: 15px 42px 15px 0;
}

body[data-hj-installation-page="detail"] .hj-install-section .faq-item .faq-a {
  max-width: 74ch;
  padding: 0 32px 18px 0;
  line-height: 1.7;
}

/* Final CTA and routes are quieter and shorter than the legacy bands. */
body[data-hj-installation-page="detail"] .hj-install-final-cta {
  padding-block: clamp(2.8rem, 5vw, 4.2rem);
}

body[data-hj-installation-page="detail"] .hj-install-final-cta .cta-band {
  padding: clamp(2.1rem, 4.6vw, 3.5rem) !important;
  border: 1px solid var(--hj-install-accent-line);
  border-radius: 14px;
  background:
    linear-gradient(90deg, var(--hj-install-accent-soft), rgba(8, 18, 31, .92) 58%),
    #07101d;
  box-shadow: none;
}

body[data-hj-installation-page="detail"] .hj-install-final-cta .meteor { display: none; }

body[data-hj-installation-page="detail"] .hj-install-related {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  border-top: 1px solid var(--hj-line);
  background: #040a13;
}

body[data-hj-installation-page="detail"] .hj-install-related .hj-related-grid {
  gap: 0;
  border-top: 1px solid var(--hj-line-strong);
}

body[data-hj-installation-page="detail"] .hj-install-related .hj-related-link {
  min-height: 72px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--hj-line);
  border-bottom: 1px solid var(--hj-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-hj-installation-page="detail"] .hj-install-related .hj-related-link--primary {
  color: #05111b;
  background: var(--hj-cyan);
}

@media (max-width: 899px) {
  body[data-hj-installation-page="detail"] .hj-install-hero-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  body[data-hj-installation-page="detail"] .hj-install-hero-copy { padding-block: 0; }
  body[data-hj-installation-page="detail"] .hj-install-hero h1 { max-width: 18ch; font-size: clamp(2.35rem, 10vw, 3.35rem); }
  body[data-hj-installation-page="detail"] .hj-install-signal { min-height: 225px; }
  body[data-hj-installation-page="detail"] .hj-install-section .split { grid-template-columns: 1fr; gap: 2rem; }
  body[data-hj-installation-page="detail"] .hj-install-section .split.rev > :first-child,
  body[data-hj-installation-page="detail"] .hj-install-section .split.rev > :last-child { order: initial; }
  body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="faq"] > .container { grid-template-columns: 1fr; gap: 1.65rem; }
  body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="faq"] .section-head { position: static; }
}

@media (max-width: 619px) {
  body[data-hj-installation-page="detail"] .hj-install-hero { padding-top: 1.45rem !important; }
  body[data-hj-installation-page="detail"] .hj-install-hero .cta-row { display: grid; grid-template-columns: 1fr; }
  body[data-hj-installation-page="detail"] .hj-install-hero .btn { width: 100%; white-space: normal; text-align: center; }
  body[data-hj-installation-page="detail"] .hj-install-signal { min-height: 192px; padding: 1.2rem 1rem; }
  body[data-hj-installation-page="detail"] .hj-install-signal-label { margin-bottom: 1.25rem; }
  body[data-hj-installation-page="detail"] .hj-install-signal ol { gap: 4px; }
  body[data-hj-installation-page="detail"] .hj-install-signal ol::before { top: 20px; }
  body[data-hj-installation-page="detail"] .hj-install-signal li span { width: 41px; height: 41px; margin-bottom: 7px; font-size: .62rem; }
  body[data-hj-installation-page="detail"] .hj-install-signal li strong { font-size: .64rem; }
  body[data-hj-installation-page="detail"] .hj-install-delivery-rail li { padding: 10px 2px; font-size: .62rem; }
  body[data-hj-installation-page="detail"] .hj-install-delivery-rail span { display: block; margin: 0 0 4px; }
  body[data-hj-installation-page="detail"] .hj-install-system-map { padding-block: 2.5rem; }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-section-head h2 { font-size: 1.65rem; }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-section-head > p { font-size: .87rem; line-height: 1.58; }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-grid[data-solution-count="2"],
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-grid[data-solution-count="3"] {
    display: flex;
    gap: 12px;
    width: calc(100% + 20px);
    overflow-x: auto;
    padding: 0 20px 12px 0;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-grid[data-solution-count="2"] .hj-solution-context-card,
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-grid[data-solution-count="3"] .hj-solution-context-card {
    flex: 0 0 88%;
    scroll-snap-align: start;
  }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-copy { padding: 1rem; }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-copy h3 { font-size: 1rem; }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-path { margin-top: 11px; }
  body[data-hj-installation-page="detail"] .hj-install-system-map .hj-solution-context-action { margin-top: 10px; }
  body[data-hj-installation-page="detail"] .hj-install-section { padding-block: 3rem; }
  body[data-hj-installation-page="detail"] .hj-install-section .grid-6 { grid-template-columns: 1fr 1fr; gap: 12px; }
  body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .grid { grid-template-columns: 1fr; }
  body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .process-step {
    min-height: 0;
    padding: 16px 0 16px 42px;
    border-top: 0;
    border-right: 0;
    border-left: 1px solid var(--hj-install-accent-line);
  }
  body[data-hj-installation-page="detail"] .hj-install-section[data-hj-install-stage="process"] .process-step .num {
    position: absolute;
    left: -14px;
    top: 14px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: 0;
    border: 1px solid var(--hj-install-accent-line);
    border-radius: 50%;
    background: #07101d;
  }
  body[data-hj-installation-page="detail"] .hj-install-section .callout { padding: 16px 0 16px 17px; }
  body[data-hj-installation-page="detail"] .hj-install-final-cta .cta-band { padding: 2rem 1.25rem !important; }
  body[data-hj-installation-page="detail"] .hj-install-related .hj-related-grid { grid-template-columns: 1fr; }
  body[data-hj-installation-page="detail"] .hj-install-related .hj-related-link { min-height: 68px; border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-hj-installation-page="detail"] *,
  body[data-hj-installation-page="detail"] *::before,
  body[data-hj-installation-page="detail"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
