.system { background: #f7f4ef; color: #242a2e; font-family: "Helvetica Neue", Arial, sans-serif }
.system-stage { padding: max(13.5svh, 6rem) 4.6vw 4svh; background: radial-gradient(ellipse at 82% 85%, #ece7df, transparent 55%), #f8f6f2 }
.system h2 { font-size: clamp(2.15rem, 3.7vw, 5rem); font-weight: 600; letter-spacing: -.047em; line-height: 1.06; margin: 0 }
.system-story { margin: .7em 0 0; font-size: clamp(1rem, 1.35vw, 1.55rem); color: #5c5a55; line-height: 1.4 }
.system-diagram { position: relative; margin: 3.7svh 0 2.5svh; height: 52svh; min-height: 285px; isolation: isolate }
.system-lines, .system-functions { position: absolute; inset: 0; width: 100%; height: 100% }
.system-lines { color: #b6a58e }
.system-lines path { stroke-width: 1.1 }
.system-signal { display: none }
.system-functions { display: grid; grid-template-columns: 30% 27% 30%; justify-content: space-between; grid-template-rows: repeat(4, 1fr); align-items: center; list-style: none; margin: 0; padding: 0 }
.system-functions > li { grid-column: var(--col); grid-row: var(--row); display: flex; align-items: center; gap: clamp(.6rem, 1.3vw, 1.5rem); padding: .75em 1.25vw; min-height: 86%; border: 1px solid #d6cfc5; border-radius: .9rem; background: linear-gradient(115deg, #fffdfa, #f8f5f0) }
.function-icon { flex: none; width: clamp(32px, 3.3vw, 64px); aspect-ratio: 1; background: url("assets/h04/functions.webp?v=ac94343e5e") calc(var(--icon) * 12.5%) center / 900% 100% no-repeat }
.system-functions > li > div { border-left: 1px solid #ded6ca; padding-left: clamp(.65rem, 1.25vw, 1.5rem) }
.system-functions h3 { margin: 0; font-size: clamp(1rem, 1.45vw, 1.75rem); line-height: 1.18; letter-spacing: -.032em; font-weight: 550 }
.system-functions p { margin: .3em 0 0; font-size: clamp(.78rem, .98vw, 1.2rem); color: #5e5b55; line-height: 1.3 }
.system-overview .system-functions > li { display: grid; grid-template-columns: auto 1fr; align-content: center; gap: .3rem .55rem; padding: .4rem .65rem }
.system-overview .system-functions > li > div { display: contents }
.system-overview .function-icon { width: clamp(21px, 1.65vw, 32px) }
.system-devices { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .28em .48em; color: #554e46; font-size: clamp(.73rem, .88vw, .98rem); line-height: 1.15; hyphens: auto; overflow-wrap: anywhere }
.system-devices span { display: flex; align-items: center; gap: .35em; min-width: 0 }
.system-devices svg { flex: none; width: 1.38em; height: 1.38em; color: #72583f; fill: none; stroke: currentColor }
@media (min-width: 761px) and (pointer: fine), (min-width: 1025px) {
  .system-overview .system-functions > li { grid-template-rows: auto auto; align-content: center; min-height: 0; height: 88%; gap: .52vh .55rem; padding: .45vh .75vw; border-radius: .65rem; background: #fbfaf7 }
  .system-overview .function-icon { width: clamp(16px, 1.3vw, 23px) }
  .system-overview h3 { font-size: clamp(14px, 1.18vw, 21px); letter-spacing: -.02em }
  .system-devices { display: flex; align-items: start; justify-content: space-between; gap: .36vw; padding-top: .55vh; border-top: 1px solid #e5dfd7; font-size: clamp(10px, .78vw, 14px); line-height: 1.14; color: #555148; hyphens: none; overflow-wrap: normal }
  .system-devices span { flex: 1 1 min-content; flex-direction: column; min-height: calc(2lh + 1.02vw + .3vh); gap: .3vh; text-align: center; text-wrap: balance }
  .system-devices svg { width: clamp(13px, 1.02vw, 19px); height: clamp(13px, 1.02vw, 19px) }
}
.system-hub { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); display: grid; place-items: center; width: min(19vw, 28svh); aspect-ratio: 1; border: 1px solid #bda98c; border-radius: 50%; background: radial-gradient(circle at 45% 38%, #fffefa, #ede6db); text-align: center }
.system-hub img { width: 76%; height: auto }
.system-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; border-top: 1px solid #d6cfc5; color: #625d55; font-size: clamp(.8rem, 1vw, 1.1rem) }
.system-foot a { color: #38332c; text-decoration: underline; text-underline-offset: .28em }
.site-header.over-system nav { color: #282724; text-shadow: none }
.brand .brand-on-light { filter: none; clip-path: inset(100% 0 0 0) fill-box; opacity: 1; pointer-events: none }
.site-header.over-system .menu { text-shadow: none }
body:has(.hero-steps > :nth-child(4).current) .hero-steps span { background: #978779; box-shadow: none }
body:has(.hero-steps > :nth-child(4).current) .hero-steps .current { background: #463a2f }
.system-integrations { margin-top: 4rem }
.system-integrations h2 { font-size: clamp(2rem, 3.2vw, 4.5rem) }
.system-integrations .system-functions { top: 9%; height: 87%; grid-template-rows: repeat(3, 1fr); grid-template-columns: 32% 1fr 32% }
.integration-icon { display: block; flex: none; width: clamp(32px, 3.3vw, 64px); aspect-ratio: 1; background: url("assets/h04/integrations.webp?v=979e19ff91") calc(var(--icon) * 100% / 9) center / 1000% 100% no-repeat }
.system-tags { display: flex; flex-wrap: wrap; gap: .35em }
.system-tags span { padding: .17em .42em; border: 1px solid #d2c8bc; border-radius: .35em; color: #443e37; font-size: .94em }
.system-features { position: absolute; bottom: 0; left: 34%; width: 32%; display: flex; justify-content: center; list-style: none; padding: 0; margin: 0; text-align: center }
.system-features li { flex: 1; padding: 0 .55em; font-size: clamp(.7rem, .93vw, 1rem); line-height: 1.18 }
.system-features li + li { border-left: 1px solid #d6cfc5 }
.system-features .integration-icon { width: clamp(18px, 1.8vw, 32px); margin: 0 auto .28em }
.system-process { display: flex; align-items: center; gap: 2vw; padding: .85rem 1.45vw; border: 1px solid #d6cfc5; border-radius: .9rem; background: #faf8f4 }
.system-process h3 { margin: 0; font-size: clamp(1rem, 1.45vw, 1.5rem); white-space: nowrap }
.system-process ol { display: flex; flex: 1; align-items: center; gap: 1.5vw; list-style: none; padding: 0; margin: 0 }
.system-process li { display: flex; flex: 1; align-items: center; gap: .7vw }
.system-process li + li::before { content: "→"; margin-right: .45vw; color: #897963 }
.system-process .integration-icon { width: clamp(24px, 2.7vw, 44px) }
.system-process strong { font-size: clamp(.82rem, 1.06vw, 1.25rem) }
.system-process p { margin: .3em 0 0; font-size: clamp(.72rem, .88vw, 1rem); line-height: 1.25; color: #5e5b55 }
.system-progress { display: none }

/* Static diagrams grow with the translated labels when the viewport is too
   short for a guided slide or the visitor has reduced motion enabled. */
@media (min-width: 761px) {
  .system:not(.is-guided) .system-overview .system-diagram { height: auto }
  .system:not(.is-guided) .system-overview .system-functions { position: relative; height: auto; row-gap: .65rem }
}
@media (min-width: 1100px) and (max-width: 1250px) {
  .system-overview [data-function="climate"] { width: calc(100% + 3.5vw) }
}
@media (min-width: 761px) and (max-width: 1099px) and (pointer: fine) {
  .system-overview .system-lines { display: none }
  .system-overview .system-hub { position: static; transform: none; width: 7rem; margin: 0 auto 1rem }
  .system-overview .system-functions { grid-template: none / repeat(2,minmax(0,1fr)); gap: .65rem }
  .system-overview .system-functions > li { grid-area: auto; height: auto; padding: .7rem }
}
@media (min-width: 1100px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  .system.is-guided { height: 840svh }
  .system.is-guided .system-stage { position: sticky; top: 0; height: 100svh; display: grid; padding-bottom: 5svh }
  .system.is-guided .system-board { grid-area: 1 / 1; display: grid; grid-template-rows: auto minmax(0, 1fr) 9svh; gap: 1.8svh; margin: 0; pointer-events: none }
  .system.is-guided .system-intro { align-self: end }
  .system.is-guided .system-diagram { min-height: 0; height: auto; margin: 0 }
  .system.is-guided .system-foot { align-self: center }
  .system.is-guided .system-foot a { pointer-events: auto }
  .system.is-guided .system-board:not(.is-current) { visibility: hidden }
  .system.is-guided .system-hub { width: min(20vw, 27svh); translate: 0 var(--hub-offset, 0svh) }
  .system.is-guided .system-overview :is(.system-functions, .system-lines),
  .system.is-guided .system-overview.show-footer .system-foot { opacity: var(--overview-opacity, 1) }
  .system.is-guided :is(.system-features, .system-process) { transition: opacity .35s ease, visibility 0s }
  .system.is-guided .system-board:not(.show-footer) :is(.system-foot, .system-features),
  .system.is-guided .system-process:not(.shown),
  .system.is-guided .system-process li:not(.shown) { visibility: hidden; opacity: 0; transition-delay: 0s, .35s }
  .system.is-guided .system-functions > li { position: relative; opacity: var(--reveal, 0) }
  .system.is-guided .system-functions > li:not(.shown) { visibility: hidden }
  .system.is-guided .system-lines [data-line] { stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: var(--remaining, 1) }
  .system.is-guided .system-signal.visible { display: block; filter: drop-shadow(0 0 2px #dc7e35) }
  .system-signal path { stroke: #b65c20; stroke-width: 2 }
  .system-signal circle { fill: #fff0bf; stroke: #db8030; stroke-width: 1.5 }
  .system.is-guided .system-functions > li.carrying-spark::after {
    content: ""; position: absolute; pointer-events: none;
    left: var(--spark-x); top: var(--spark-y); transform: translate(-50%, -50%);
    width: 5px; height: 5px; border-radius: 50%; background: #fff0bf;
    box-shadow: 0 0 0 1px #db8030, 0 0 6px 2px #edaa58; opacity: var(--spark-opacity);
  }
  .system.is-guided .system-progress { display: block; position: absolute; bottom: 2svh; left: 4.6%; right: 4.6%; height: 3px; background: #dfd6cb; transition: opacity .4s }
  .system-progress span { display: block; height: 100%; background: #bd6333; transform-origin: left }
  .system-progress.finished { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s }
}
@media (max-height: 800px) {
  .system.is-guided .system-overview { grid-template-rows: auto minmax(0, 1fr) 8svh }
}
@media (max-width: 760px), (max-width: 1024px) and (pointer: coarse) {
  .site-header.over-system { background: #f8f6f2 }
  .system-integrations { scroll-margin-top: calc(8rem + 9svh) }
  .system-stage { padding: calc(10rem + 9svh) 1.4rem 2.4rem }
  .system-diagram { margin: 1.5rem 0; height: auto; min-height: 0 }
  .system-lines { display: none }
  .system-functions { position: static; display: grid; grid-template-columns: 1fr; gap: .6rem }
  .system-functions > li { grid-area: auto; gap: 1rem; padding: .8rem 1rem }
  .system-hub { position: static; transform: none; width: 9rem; margin: 0 auto 1rem }
  .system-integrations .system-functions { grid-template-columns: 1fr; height: auto }
  .system-features { position: static; width: 100%; margin-top: 1.25rem }
  .system-process, .system-process ol { align-items: flex-start; flex-direction: column; gap: .8rem }
  .system-process { padding: 1rem }
  .system-process li + li::before { content: none }
  .system-foot { align-items: flex-start; flex-direction: column }
}

.system-functions > li:target { border-color: #965028; box-shadow: 0 0 0 1px #965028 }
.system-functions h3 a { pointer-events: auto; color: inherit; text-underline-offset: .2em }
.system-functions h3 a:hover { text-decoration: underline }

/* v06 artwork on the original scroll-driven desktop stage. */
.system-plate { scroll-margin-top: max(13.5svh, 6rem) }
body:has(.system-plate):has(.hero-steps > :nth-child(4).current) .hero-steps { right: .75vw }
.system-plate .plate-groups {
  inset: 0;
  width: 100%;
  height: 100%;
  grid-template: repeat(4, 1fr) / 30% 27% 30%;
}
.system-plate .plate-groups > li {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: .38em;
  min-height: 0;
  height: 90%;
  padding: .4em clamp(.45rem, .85vw, 1rem);
  border: 1px solid #dcd8cf;
  border-radius: .7rem;
  background: #fcfbf8;
}
.system-plate .plate-groups h3 {
  margin: 0;
  font-size: clamp(.88rem, 1.13vw, 1.35rem);
  font-weight: 550;
  text-align: center;
}
.plate-devices {
  display: flex;
  align-items: start;
  justify-content: space-around;
  gap: .2vw;
  padding: .45em 0 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid #e9e5dd;
}
.plate-devices li {
  flex: 1 1 min-content;
  display: grid;
  justify-items: center;
  gap: .25em;
  color: #555650;
  font-size: clamp(.66rem, .81vw, .98rem);
  line-height: 1.16;
  text-align: center;
  text-wrap: balance;
}
@media (min-width: 1025px), (min-width: 761px) and (pointer: fine) {
  html:lang(nb) .plate-devices li {
    min-width: 0;
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}
.plate-groups i {
  display: block;
  width: clamp(18px, min(1.8vw, 3.1svh), 36px);
  aspect-ratio: 1;
  background: url("assets/h04/v06-icons.webp") calc(var(--icon) * 100% / 53) center / 5400% 100% no-repeat;
  mix-blend-mode: multiply;
}
.system-plate .plate-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  margin: 0;
  color: #555650;
  font-size: clamp(.78rem, .98vw, 1.16rem);
  text-align: center;
}
.plate-detail span { max-width: 34ch; text-wrap: balance }
.plate-detail i { flex: none; width: clamp(22px, 2.1vw, 40px) }
.plate-hub { display: flex; flex-direction: column; justify-content: center }
.plate-hub p { margin: .25em 0 0; font-size: clamp(.87rem, 1.15vw, 1.35rem); line-height: 1.3 }
.plate-hub p::before { content: ""; display: block; width: 2em; height: 2px; margin: 0 auto .65em; background: #ce7848 }
.plate-ending { display: grid; align-content: center; gap: 1svh }
/* Both slides share the same diagram bounds as the footer changes. */
.system.is-guided .system-stage:has(.system-plate) {
  grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: 1.8svh;
}
.system.is-guided .system-board.system-plate {
  grid-area: 1 / 1 / span 3;
  grid-template-rows: subgrid;
  row-gap: inherit;
}
.system-plate .system-process ol {
  --step-gap: clamp(1.75rem, 3vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--step-gap);
}
.system-plate .system-process ol > li {
  position: relative;
  justify-content: center;
}
.system-plate .system-process ol > li + li::before {
  position: absolute;
  inset-inline-end: 100%;
  width: var(--step-gap);
  margin: 0;
  text-align: center;
}
.system-plate .system-foot { padding-top: .55em }
.system-plate .system-process { padding-block: .5em }
.plate-groups a:focus-visible { outline-color: currentColor }
@media (max-width: 1099px) {
  .system-plate .system-diagram { height: auto }
  .system-plate .system-lines { display: none }
  .system-plate .plate-hub { position: static; transform: none; width: 9rem; margin: 0 auto 1rem }
  .system-plate .plate-groups { position: relative; grid-template: none / repeat(2, minmax(0, 1fr)); gap: .7rem }
  .system-plate .plate-groups > li { grid-area: auto; height: auto; min-height: 6rem }
  .system-plate .plate-groups > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - .7rem) / 2);
  }
}
