:root {
  --stage: #17372c;
  --stage-deep: #102b23;
  --stage-text: #edf8f0;
  --stage-muted: #c3d9cc;
  --stage-line: #416454;
  --stage-led: #b4e5c6;
  --stage-amber: #ffd08a;
}

[data-views]:not(.enhanced) [data-view-choice],
.house-demo:not(.enhanced) .house-choices,
.house-demo:not(.enhanced) .demo-console,
.house-demo:not(.enhanced) .scene-effects,
.house-demo.enhanced .spot-fallback { display: none; }

.house-demo {
  container: maquete / inline-size;
  min-width: 0;
  --scene-brightness: 1;
}
.house-demo.enhanced {
  border: 1px solid #254839;
  border-radius: 21px;
  background: var(--stage-deep);
  box-shadow: 0 17px 36px #142e252b;
}
.house-demo.enhanced .hero-scene {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.house-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.9rem), 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #6c907547;
}
.house-choices button {
  --choice-color: var(--stage-led);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 7px 8px;
  border: 1px solid #547866;
  border-radius: 8px;
  background: linear-gradient(145deg, #294b3b, #1b3a2e);
  color: var(--stage-text);
  text-align: left;
  cursor: pointer;
}
.house-choices button[data-view-choice="luz"] { --choice-color: var(--stage-amber); }
.house-choices button[data-view-choice="porta"] { --choice-color: #dacdf4; }
.house-choices button:hover, .house-choices button[aria-pressed="true"] { border-color: var(--choice-color); background: #31533f; }
.house-choices button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--choice-color); }
.house-choices button:focus-visible { outline-color: var(--stage-led); outline-offset: 2px; }
.house-choice-check {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--choice-color);
  color: var(--stage-deep);
  visibility: hidden;
}
.house-choices button[aria-pressed="true"] .house-choice-check { visibility: visible; }
.house-choice-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #122d23;
  color: var(--choice-color);
}
.house-choice-copy { display: grid; gap: 3px; line-height: 1.25; }
.house-choice-copy strong { font-size: 1.0625rem; }
.house-choice-copy > span { color: var(--stage-muted); font-size: var(--type-caption); line-height: 1.4; }
.home-hero { padding-block: clamp(33px, 3.4vw, 53px); }
.hero-copy { padding-bottom: 90px; }
.house-demo .spot {
  z-index: 1;
  gap: 7px;
  line-height: 1.2;
  cursor: pointer;
}
.house-demo .spot > svg:first-child { color: #215944; }
.house-demo .spot[aria-pressed="true"] {
  background: #e5f6ea;
  border-color: #9ce4b4;
  box-shadow: 0 0 0 3px #93dfa54c, 0 5px 15px #0c211aa6;
}
.spot-selection {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
}
.house-demo .spot[aria-pressed="true"] { padding-inline-end: 19px; }
.house-demo .spot[aria-pressed="true"] .spot-selection { display: grid; }
@container maquete (max-width: 19rem) {
  .house-demo .spot, .house-demo .spot[aria-pressed="true"] { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .house-demo .spot .spot-label, .house-demo .spot .spot-arrow { display: none; }
}
.scene-effects { position: absolute; inset: 0; pointer-events: none; }
.scene-light, .scene-plug, .scene-door {
  position: absolute;
  opacity: 0;
  transition: opacity .28s ease, background .22s ease;
}
.scene-light {
  left: 24.4%;
  top: 46.8%;
  width: 47%;
  height: 69%;
  transform: translate(-50%, -50%);
}
.scene-light::before, .scene-light::after {
  content: "";
  position: absolute;
  inset: 0;
  transition: opacity .28s ease;
}
.scene-light::before {
  background: radial-gradient(ellipse, #18281ddc 2%, #17251a99 18%, #18281d2a 46%, transparent 70%);
  opacity: calc(1 - var(--scene-brightness));
}
.scene-light::after {
  background: radial-gradient(ellipse, #fff1b77d 0%, #ffc77663 13%, #ffc76d22 35%, transparent 68%);
  mix-blend-mode: screen;
  opacity: var(--scene-brightness);
}
.house-demo[data-active-view="luz"] .scene-light,
.house-demo[data-active-view="tomada"] .scene-plug,
.house-demo[data-active-view="porta"] .scene-door { opacity: 1; }
.scene-plug {
  left: 64.5%;
  top: 28%;
  width: 8%;
  height: 11%;
  border-left: 2px dashed #c0d7c7b3;
  border-bottom: 2px dashed #c0d7c7b3;
  border-radius: 0 0 0 8px;
}
.scene-plug > span {
  position: absolute;
  right: -4px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #dbe9df;
  background: #56655a;
}
.house-demo[data-plug-power="on"] .scene-plug { border-color: #d4f6dc; filter: drop-shadow(0 0 5px #92f1a4); }
.house-demo[data-plug-power="on"] .scene-plug > span { background: #d0ffda; }
.house-demo[data-active-view="tomada"][data-plug-power="on"] .scene-plug > span { animation: led-on .55s ease-out; }
.scene-door {
  display: grid;
  place-items: center;
  left: 70.2%;
  top: 62.4%;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  transform: translate(-50%, -50%);
  border: 1px solid #f4c681be;
  background: #342513e8;
  color: var(--stage-amber);
}
.scene-door svg { grid-area: 1 / 1; }
.scene-door svg + svg, .house-demo[data-door="open"] .scene-door svg:first-child { visibility: hidden; }
.house-demo[data-door="open"] .scene-door {
  border-color: #c4f4d2;
  background: #143d2de8;
  color: #ceffda;
  box-shadow: 0 0 18px #b7ffcd82;
}
.house-demo[data-door="open"] .scene-door svg + svg { visibility: visible; animation: led-on .4s ease-out; }
@keyframes led-on {
  0% { transform: scale(.72); }
  60% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.demo-console {
  padding: 15px 19px 14px;
  border-top: 1px solid #6c907547;
  color: var(--stage-text);
  background: radial-gradient(ellipse at 100% 100%, #254936 0%, transparent 65%);
}
.console-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--stage-muted);
  font-size: var(--type-caption);
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.console-label > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stage-led);
  box-shadow: 0 0 0 3px #b4e5c625;
}
.demo-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 35%);
  grid-template-areas: "copy control" "requirements requirements" "link link";
  align-items: start;
  gap: 7px 15px;
  margin-top: 8px;
}
.demo-explanation { grid-area: copy; }
.demo-explanation h2 { font-size: 1.26rem; letter-spacing: -.03em; }
.demo-explanation p { margin-top: 4px; font-size: 1rem; line-height: 1.5; color: var(--stage-muted); }
.demo-requirements {
  grid-area: requirements;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--stage-line);
  border-radius: 7px;
  background: var(--stage-line);
}
.demo-requirements > div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 9px; background: #1b3a2e; }
.demo-requirements dt { display: flex; align-items: start; gap: 5px; color: var(--stage-led); font-size: var(--type-caption); font-weight: 600; line-height: 1.35; }
.demo-requirements dd { color: var(--stage-text); font-size: var(--type-caption); line-height: 1.45; }
.console-link {
  grid-area: link;
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--stage-led);
  text-decoration: none;
}
.console-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.demo-console :focus-visible, .power-demo :focus-visible { outline-color: var(--stage-led); }
.demo-control {
  grid-area: control;
  align-self: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--stage-line);
  border-radius: 9px;
  background: #102a23b3;
}
.demo-control-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 1rem; font-weight: 600; }
.demo-control output { color: var(--stage-led); }
.demo-control input[type="range"] { display: block; width: 100%; margin: 0; min-height: 44px; accent-color: var(--stage-led); cursor: pointer; }
.brightness-range { display: flex; justify-content: space-between; align-items: center; margin-top: -2px; color: var(--stage-muted); }
.console-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #698775;
  border-radius: 7px;
  background: #284b39;
  color: var(--stage-text);
  font-size: 1rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.console-button[data-house-door] { justify-content: start; }
.console-button:hover { background: #376049; }
.console-button .circuit-toggle { flex: none; }
.console-button[aria-checked="true"] .circuit-toggle { border-color: #7ebc97; background: var(--led); }
.console-button[aria-checked="true"] .circuit-toggle span { transform: translateX(16px); }
.demo-state { display: block; margin: 5px 1px 0; color: var(--stage-muted); font-size: var(--type-caption); line-height: 1.45; }

.light-choices { display: grid; gap: 7px; margin-top: 19px; padding: 0; list-style: none; }
.light-choices a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #d0e1d6;
  border-radius: 9px;
  background: #fafffb;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.light-choices a:hover { border-color: #87af9a; transform: translateX(3px); }
.light-choices a > span:nth-child(2) { display: grid; gap: 2px; line-height: 1.25; }
.light-choices strong { font-size: .96rem; }
.light-choices strong + span { color: var(--muted); font-size: var(--type-caption); }
.light-choices a > svg:last-child { color: var(--green); }
.routine-section { margin-bottom: 55px; }
.routine-section .section-heading { margin-bottom: 17px; }
.routine-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--stage-line);
  border-radius: 14px;
  background: var(--stage-line);
  color: var(--stage-text);
  list-style: none;
}
.routine-board li {
  display: grid;
  align-content: start;
  justify-items: start;
  padding: clamp(16px, 2.8vw, 32px);
  background:
    radial-gradient(#7eb69928 1px, transparent 1px) 0 0 / 14px 14px,
    var(--stage);
}
.routine-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #5a806a;
  border-radius: 7px;
  background: #254a37;
  color: #d4f6df;
  font-weight: 600;
}
.routine-trace { height: 25px; margin-left: 20px; border-left: 2px dotted #9dceb1; }
.routine-board h3 { font-size: 1.25rem; }
.routine-board p { margin-top: 5px; color: var(--stage-muted); font-size: .94rem; line-height: 1.42; }

.guide-rail.has-guide-art { box-shadow: none; }
.guide-art { overflow: hidden; margin: -20px -20px 16px; border-radius: 12px 12px 0 0; }
.guide-art img { width: 100%; height: auto; aspect-ratio: 2; object-fit: cover; }
.guide-diagram { margin-bottom: 34px; }
.guide-diagram h2 { margin-bottom: 14px; font-size: var(--type-section); }
.diagram-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 9px;
  border: 1px solid #ccdcd3;
  border-radius: 13px;
  background: #e2ece6;
  list-style: none;
}
.diagram-cards.two-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.diagram-cards li {
  padding: 13px;
  border: 1px solid #cbdad2;
  border-radius: 8px;
  background: #fff;
}
.diagram-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 13px;
  border: 1px solid #cce0d4;
  border-radius: 9px;
  background: #eaf5ed;
  color: var(--green);
  --icon-fill: #eaf5ed;
}
.diagram-cards li:nth-child(2) .diagram-icon { border-color: #e7d8b5; background: #fff4d9; color: #7b4919; --icon-fill: #fff4d9; }
.diagram-cards li:nth-child(3) .diagram-icon { border-color: #d5dce8; background: #edf1f8; color: #3e5879; }
.diagram-cards h3 { font-size: 1.09rem; }
.diagram-cards p { margin-top: 6px; color: var(--rail); font-size: .94rem; line-height: 1.42; }
.door-profile {
  position: relative;
  display: block;
  width: 107px;
  height: 61px;
  margin-bottom: 11px;
}
.door-profile span:first-child {
  position: absolute;
  inset: 21px 8px 5px 0;
  border: 1px solid #aa875e;
  border-radius: 4px;
  background: repeating-linear-gradient(7deg, #d5b48b 0 7px, #e1c4a0 7px 10px);
}
.door-profile span:last-child {
  position: absolute;
  top: 6px;
  left: 37px;
  width: 32px;
  height: 15px;
  border: 1px solid #152d24;
  border-radius: 3px;
  background: #355746;
  box-shadow: inset 0 -3px 0 #213b2e;
}
.door-profile.door-embedded span:last-child { top: 31px; left: 66px; }

.plug-guide-grid { grid-template-areas: "intro rail" "catalog rail" "content content"; }
.plug-guide-grid .guide-rail { position: static; }
.plug-guide-grid .guide-intro { align-self: start; }
.plug-guide-grid .guide-catalog { align-self: start; }
.plug-guide-grid .faq { max-width: 840px; }
.topic-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.topic-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid #cddbd3;
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.topic-nav a:hover { border-color: #92b8a4; background: #e7f2eb; }
.plug-topic {
  padding: clamp(15px, 3vw, 32px);
  margin-bottom: clamp(20px, 4vw, 38px);
  border: 1px solid #cfdbd4;
  border-top: 3px solid #9ab8a6;
  border-radius: 14px;
  background: #fff;
}
.topic-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 17px;
}
.topic-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 9px;
  background: #e4f0e8;
  color: var(--green);
}
.topic-heading h2 { font-size: var(--type-section); }
.topic-heading p { max-width: 68ch; margin-top: 6px; color: var(--rail); font-size: 1rem; line-height: 1.55; }
.socket-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.9rem), 1fr)); gap: 9px; }
.socket-card {
  --hole: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: clamp(12px, 2.4vw, 24px);
  border: 1px solid #ccdbd2;
  border-radius: 10px;
  background: repeating-linear-gradient(0deg, #eaf2ec 0 13px, #e5efe8 13px 14px);
}
.socket-twenty { --hole: 12px; }
.socket-drawings {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 16px minmax(0, 1fr);
  align-items: center;
  width: min(100%, 208px);
}
.socket-plate {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.2;
  border: 1px solid #bbcfc2;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #f4f8f4);
  box-shadow: 0 3px 0 #bdd0c3, inset 0 1px 0 #fff;
}
.socket-recess, .plug-face {
  position: relative;
  clip-path: polygon(14% 0, 86% 0, 100% 50%, 86% 100%, 14% 100%, 0 50%);
  background: linear-gradient(146deg, #bfcfc4, #e6efe8);
}
.socket-recess { width: 82%; aspect-ratio: 1.45; }
.plug-face { width: 100%; aspect-ratio: 1.42; background: linear-gradient(148deg, #95b1a1, #e0ece3); }
.socket-recess i, .plug-face i {
  position: absolute;
  top: 38%;
  left: 25%;
  width: var(--hole);
  height: var(--hole);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #22392c;
}
.plug-face i { border: 1px solid #506a5a; background: linear-gradient(125deg, #e8efe8, #8ea99b); }
.socket-recess i:nth-child(2), .plug-face i:nth-child(2) { left: 75%; }
.socket-recess i:nth-child(3), .plug-face i:nth-child(3) { left: 50%; top: 71%; box-shadow: 0 0 0 2px #98691f; }
.socket-connector { border-top: 2px dashed #829e8d; }
.socket-card figcaption { display: grid; gap: 4px; }
.socket-card strong { color: var(--green); font: 700 clamp(1.4rem, 3vw, 2.05rem)/1 var(--heading); }
.socket-card figcaption > span { color: var(--graphite); font-weight: 600; line-height: 1.28; }
.socket-card p { color: var(--rail); font-size: var(--type-caption); line-height: 1.45; }
.diagram-caption, .source-note { margin-top: 9px; color: var(--muted); font-size: var(--type-caption); line-height: 1.55; }
.source-note a { color: var(--green); text-underline-offset: 3px; }
.fit-sequence { margin-top: 21px; }
.fit-sequence h3 { margin-bottom: 10px; font-size: clamp(1.15rem, 2.4vw, 1.65rem); }
.fit-illustration { overflow: hidden; border: 1px solid #a7bfb0; border-radius: 11px; background: #16382a; }
.fit-illustration img { width: 100%; height: auto; aspect-ratio: 3.25; object-fit: cover; object-position: 50% 51%; }
.fit-chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding: 10px;
  border-top: 1px solid #739583;
  background: #e3eee6;
  list-style: none;
}
.fit-chain li {
  position: relative;
  display: flex;
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #bdcec3;
  border-radius: 7px;
  background: #fbfefc;
}
.fit-chain li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 22px;
  right: -9px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: rotate(45deg);
}
.fit-stage-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 6px; background: #e0efe6; color: var(--green); }
.fit-chain li > div { display: grid; gap: 4px; line-height: 1.34; }
.fit-chain li > div span { color: var(--rail); font-size: var(--type-caption); }
.fit-label-link { justify-content: start; min-height: 44px; }
.fit-note { display: flex; align-items: start; gap: 8px; margin-top: 13px; padding: 10px 12px; border-radius: 7px; background: #fff2d9; color: #6c4011; font-size: 1rem; line-height: 1.55; }

.label-reader, .power-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
}
.sample-label {
  position: relative;
  align-self: start;
  padding: 16px;
  border: 1px solid #244c3c;
  border-radius: 10px;
  background: #1c3b2d;
  color: var(--stage-text);
  box-shadow: inset 0 0 0 4px #ffffff13;
}
.sample-label figcaption { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; font-weight: 600; color: var(--stage-muted); }
.sample-label dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 3.9rem), 1fr)); gap: 4px; padding: 6px; border: 1px dashed #7f9d89; border-radius: 7px; }
.sample-label dl > div { display: grid; align-content: space-between; gap: 6px; padding: 7px; border-radius: 4px; background: #284a39; }
.sample-label dt { font-size: var(--type-caption); line-height: 1.35; }
.sample-label dd { font: 700 clamp(1.1rem, 2.55vw, 1.8rem)/1.15 var(--heading); }
.sample-label > p { margin-top: 8px; color: var(--stage-muted); font-size: var(--type-caption); }
.label-reader:has([data-label-note="tensao"][open]) [data-reading="tensao"],
.label-reader:has([data-label-note="corrente"][open]) [data-reading="corrente"],
.label-reader:has([data-label-note="potencia"][open]) [data-reading="potencia"] { background: var(--stage-led); color: var(--stage-deep); }
.label-notes { display: grid; align-content: start; gap: 6px; }
.label-notes details { border: 1px solid var(--border); border-radius: 8px; background: #f8fbf9; }
.label-notes details[open] { border-color: #a9c6b5; background: #edf5ef; }
.label-notes summary { display: flex; justify-content: space-between; align-items: center; gap: 11px; padding: 9px 13px; min-height: 47px; cursor: pointer; }
.label-notes summary > span { display: flex; flex-wrap: wrap; gap: 0 9px; align-items: baseline; }
.label-notes summary strong + span { color: var(--muted); font-size: var(--type-caption); }
.label-notes summary svg { color: var(--green); transition: transform .2s ease; }
.label-notes details[open] summary svg { transform: rotate(45deg); }
.label-notes p { padding: 0 13px 12px; color: var(--rail); font-size: 1rem; }

.power-workbench { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.power-demo {
  container: simulacao / inline-size;
  padding: clamp(14px, 2vw, 21px);
  border-radius: 10px;
  background:
    radial-gradient(#7eb69928 1px, transparent 1px) 0 0 / 13px 13px,
    var(--stage);
  color: var(--stage-text);
}
.power-demo h3 { font-size: 1.35rem; }
.power-scenarios { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.power-scenarios legend { margin-bottom: 5px; color: var(--stage-muted); font-size: var(--type-caption); }
.power-scenarios label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 5px 8px; border: 1px solid #6a8e7a; border-radius: 6px; background: #213f30; font-size: var(--type-caption); font-weight: 600; cursor: pointer; }
.power-scenarios label:has(:checked) { border-color: var(--stage-led); background: #345b45; }
.power-scenarios input { margin: 0; accent-color: var(--stage-led); }
.power-route, .connection-route { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 15px 0 12px; padding: 0; list-style: none; }
.power-route li, .connection-route li { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; text-align: center; line-height: 1.22; }
.power-route li > span:last-child { color: var(--stage-muted); font-size: var(--type-caption); }
.power-route strong, .connection-route strong { font-size: 1rem; }
.power-node, .connection-node {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  margin-bottom: 3px;
  border: 1px solid #6a8979;
  border-radius: 9px;
  background: #223f32;
  color: var(--stage-text);
}
.power-source, .power-demo[data-power="on"] .power-plug {
  border-color: #a8dabb;
  background: #315b43;
  color: #d0f8df;
}
.power-demo[data-running="true"] .power-device { border-color: #ffd490; background: #604821; color: #ffdc9f; box-shadow: 0 0 16px #eebc633b; }
.power-device svg { grid-area: 1 / 1; }
.power-demo[data-scenario="lamp"] .power-device svg:last-child, .power-demo[data-scenario="button"] .power-device svg:first-child { visibility: hidden; }
.power-route li:not(:last-child)::after, .connection-route li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(50% + 25px);
  top: 25px;
  width: max(0px, calc(100% - 46px));
  height: 2px;
  border-top: 2px dashed #89a795;
  transform-origin: left;
}
.power-route li:first-child::after { border-color: #bce2c8; }
.power-demo[data-power="on"] .power-route li:nth-child(2)::after { border-top-style: solid; border-color: var(--stage-amber); animation: send-command .32s ease-out both; }
.power-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.lab-button { min-height: 44px; padding: 7px 10px; border-color: #d1f2dc; background: #d7f1df; color: var(--stage-deep); cursor: pointer; }
.lab-button:hover { background: #b7e2c5; }
.lab-button-quiet { border-color: #8dad9a; background: #224333; color: var(--stage-text); }
.lab-button-quiet:hover { background: #355744; }
.lab-button:disabled { opacity: .7; cursor: default; }
.power-result { display: block; margin-top: 10px; color: #d2f2dc; font-weight: 600; line-height: 1.42; }
.power-fallback { display: grid; gap: 8px; margin-top: 12px; color: var(--stage-muted); }
.power-demo.enhanced .power-fallback,
.power-demo:not(.enhanced) :is(.power-scenarios, .power-route, .power-actions, .power-result) { display: none; }
.compatibility-checklist {
  min-width: 0;
  padding: clamp(13px, 2vw, 20px);
  border: 1px solid #cfdbd4;
  border-radius: 10px;
  background: #f3f8f4;
}
.compatibility-checklist h3 { display: flex; align-items: center; gap: 7px; font-size: 1.24rem; }
.compatibility-checklist h3 svg { color: var(--green); }
.compatibility-checklist fieldset { display: grid; gap: 5px; min-width: 0; margin: 11px 0 0; padding: 0; border: 0; }
.compatibility-checklist label { display: flex; align-items: start; gap: 9px; min-height: 44px; padding: 8px; border: 1px solid #d8e4db; border-radius: 7px; background: #fff; font-size: 1rem; line-height: 1.45; cursor: pointer; }
.compatibility-checklist label:has(:checked) { border-color: #a2c7af; background: #e6f3e9; }
.compatibility-checklist input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--led); }
.checklist-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 11px; color: var(--green); font-weight: 600; font-size: var(--type-caption); }
.checklist-count progress { flex: 1 1 85px; min-width: 0; height: 10px; accent-color: var(--led); }
.compatibility-checklist > p { margin-top: 6px; color: var(--rail); font-size: var(--type-caption); }

.connection-demo {
  padding: clamp(12px, 2.3vw, 22px);
  border-radius: 11px;
  background: var(--stage-deep);
  color: var(--stage-text);
}
.connection-demo:not(.enhanced) :is(.connection-choices, .internet-options) { display: none; }
.connection-demo.enhanced[data-internet="online"] [data-internet-state="offline"],
.connection-demo.enhanced[data-internet="offline"] [data-internet-state="online"] { display: none; }
.connection-conditions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px 18px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #4a705e;
  border-radius: 8px;
  background: #19392c;
}
.internet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.internet-options legend { margin-bottom: 6px; color: var(--stage-text); font-weight: 600; }
.internet-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid #638574;
  border-radius: 6px;
  background: #244534;
  color: var(--stage-text);
  font-size: var(--type-caption);
  font-weight: 600;
  cursor: pointer;
}
.internet-options label:has(:checked) { border-color: var(--stage-led); background: #325844; }
.internet-options input { margin: 0; accent-color: var(--stage-led); }
.connection-demo[data-internet="offline"] .internet-options label:has(:checked) { border-color: var(--stage-amber); background: #503a20; }
.connection-context { flex: 1 1 230px; }
.connection-context p { display: flex; align-items: start; gap: 7px; color: var(--stage-muted); font-size: var(--type-caption); line-height: 1.45; }
.connection-context strong { color: var(--stage-text); }
.connection-context svg { color: var(--stage-led); }
.connection-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.75rem), 1fr)); gap: 6px; margin-bottom: 10px; }
.connection-choices button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 55px;
  padding: 6px 9px;
  border: 1px solid #638574;
  border-radius: 7px;
  background: #214335;
  color: var(--stage-text);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}
.connection-choices button > span { display: grid; gap: 3px; line-height: 1.23; }
.connection-choices button [data-internet-state] { color: var(--stage-muted); font-size: var(--type-caption); }
.connection-choices button:hover, .connection-choices button[aria-pressed="true"] { border-color: var(--stage-led); background: #345843; }
.connection-choices button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--stage-led); }
.connection-demo[data-internet="offline"] .connection-choices button:not([data-view-choice="local"]) [data-internet-state="offline"] { color: var(--stage-amber); }
.connection-demo :focus-visible { outline-color: var(--stage-led); }
.connection-view {
  container: simulacao / inline-size;
  padding: clamp(11px, 2.3vw, 19px);
  border: 1px solid #426a57;
  border-radius: 8px;
  background:
    radial-gradient(#7eb69928 1px, transparent 1px) 0 0 / 13px 13px,
    var(--stage);
}
.connection-view + .connection-view { margin-top: 8px; }
.connection-demo.enhanced .connection-view { margin-top: 0; }
.connection-route { --node-radius: 25px; max-width: 660px; }
.connection-node { width: calc(var(--node-radius) + var(--node-radius) + 1px); height: calc(var(--node-radius) + var(--node-radius) + 1px); border-color: #9bcaad; background: #2e5440; color: #d5f4e0; }
.connection-route li:not(:last-child)::after {
  left: calc(50% + var(--node-radius));
  top: var(--node-radius);
  width: max(0px, calc(100% + 4px - var(--node-radius) - var(--node-radius)));
  border-top-style: solid;
  border-color: #a9d7b9;
}
.connection-demo.enhanced .connection-view:not([hidden]) .connection-route li:not(:last-child)::after { animation: send-command .32s ease-out both; animation-delay: calc(var(--step) * 115ms); }
.route-break { display: none; }
.connection-demo.enhanced[data-internet="offline"] .connection-view:not([hidden]) .connection-route:has(.route-break-after) li::after { animation: none; }
.connection-demo.enhanced[data-internet="offline"] .connection-route .route-break-after::after { border-color: var(--stage-amber); border-top-style: dashed; }
.connection-demo.enhanced[data-internet="offline"] .connection-route .route-break-after ~ li::after { border-color: #6e8a7b; border-top-style: dotted; }
.connection-demo.enhanced[data-internet="offline"] .route-break {
  position: absolute;
  z-index: 2;
  top: var(--node-radius);
  left: calc(100% + 2px);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--stage-amber);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #523b20;
  color: var(--stage-amber);
}
@keyframes send-command { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.connection-copy { display: grid; gap: 8px; margin-top: 13px; }
.connection-copy p { color: var(--stage-muted); }
.connection-copy strong { color: var(--stage-text); }
.connection-copy .connection-manual { display: flex; align-items: start; gap: 7px; padding: 8px; border: 1px solid #557b66; border-radius: 7px; background: #234737; color: var(--stage-text); }
.model-reference { margin-top: 13px; padding: clamp(12px, 2.3vw, 18px); border: 1px solid #c8dacf; border-radius: 9px; background: #eef5ef; }
.model-reference-heading { display: flex; align-items: center; gap: 9px; }
.model-reference-heading p { color: var(--muted); font-size: var(--type-caption); }
.model-reference-heading h3 { margin-top: 2px; }
.model-reference dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 11px; }
.model-reference dl > div { padding: 8px; border: 1px solid #d4e2d8; border-radius: 6px; background: #fbfdfb; }
.model-reference dt { color: var(--muted); font-size: var(--type-caption); }
.model-reference dd { color: var(--graphite); font-weight: 600; line-height: 1.33; }

@media (max-width: 1050px) {
  .socket-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .socket-drawings { width: min(100%, 188px); }
  .guide-grid:not(.plug-guide-grid) .diagram-cards:not(.two-cards) { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .demo-view { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "control" "requirements" "link"; gap: 7px; }
  .demo-control { padding: 7px 8px; }
  .power-workbench { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .home-hero { padding-block: 25px 29px; }
  .hero-copy { padding-bottom: 0; }
  .house-demo.enhanced { border-radius: 15px; }
  .demo-console { padding: 11px 12px 6px; }
  .demo-view { grid-template-columns: minmax(0, 1fr) minmax(132px, 36%); grid-template-areas: "copy control" "requirements requirements" "link link"; gap: 6px 10px; }
  .routine-section { margin-bottom: 35px; }
  .routine-section .section-heading { gap: 3px; }
  .routine-section .text-link { justify-self: start; }
  .routine-board { grid-template-columns: 1fr; }
  .routine-board li { padding: 14px; }
  .routine-trace { height: 14px; }
  .guide-art { margin: -14px -14px 13px; }
  .guide-art img { aspect-ratio: 2.55; }
  .guide-diagram { margin-bottom: 25px; }
  .plug-guide-grid { grid-template-areas: "intro" "catalog" "rail" "content"; }
  .topic-heading { gap: 9px; }
  .topic-icon { width: 36px; height: 36px; }
  .topic-icon svg { width: 21px; height: 21px; }
  .socket-card { --hole: 7px; gap: 12px; }
  .socket-twenty { --hole: 8.4px; }
  .socket-drawings { grid-template-columns: minmax(0, 1.25fr) 11px minmax(0, 1fr); }
  .fit-chain, .label-reader { grid-template-columns: 1fr; }
  .fit-illustration img { aspect-ratio: 2.65; }
  .fit-chain li:not(:last-child)::after { top: auto; right: auto; bottom: -9px; left: 23px; transform: rotate(135deg); }
  .sample-label { padding: 11px; }
}

@media (max-width: 460px) {
  .house-choices { gap: 5px; padding: 6px; }
  .house-choices button { grid-template-columns: 1fr; justify-items: start; gap: 4px; min-height: 62px; padding: 5px; }
  .house-choice-icon { width: 24px; height: 24px; }
  .house-choice-icon svg { width: 16px; height: 16px; }
  .demo-view { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "control" "requirements" "link"; gap: 7px; }
  .demo-requirements { grid-template-columns: 1fr; }
  .demo-requirements > div { grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.8rem), 1fr)); gap: 7px; }
  .house-demo .spot { gap: 5px; }
  .house-demo .spot > svg:first-child { width: 15px; height: 15px; }
  .scene-door { width: 28px; height: 28px; }
  .scene-door svg { width: 16px; height: 16px; }
  .diagram-cards.two-cards { grid-template-columns: 1fr; }
  .topic-heading { grid-template-columns: 1fr; }
  .topic-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(7.6rem, 45%)), 1fr)); }
  .connection-route { --node-radius: 20px; }
  .connection-node svg { width: 22px; height: 22px; }
  .model-reference dl { grid-template-columns: 1fr; }
}

@container simulacao (max-width: 18rem) {
  :is(.power-route, .connection-route) { grid-auto-flow: row; gap: 14px; }
  :is(.power-route, .connection-route) li {
    grid-template-columns: 51px minmax(0, 1fr);
    grid-template-rows: minmax(0, auto) minmax(0, auto);
    align-items: center;
    align-content: center;
    justify-items: start;
    min-height: 51px;
    gap: 2px 9px;
    text-align: start;
  }
  :is(.power-node, .connection-node) { grid-row: 1 / 3; margin: 0; }
  .connection-route strong { grid-row: 1 / 3; }
  .power-route strong { align-self: end; }
  .power-route li > span:last-child { grid-column: 2; align-self: start; }
  :is(.power-route, .connection-route) li:not(:last-child)::after {
    left: 25px;
    top: 100%;
    width: 0;
    height: 14px;
    border-left: 2px dashed #89a795;
    border-top-width: 0;
  }
  .power-route li:first-child::after { border-color: #bce2c8; }
  .power-demo[data-power="on"] .power-route li:nth-child(2)::after { border-color: var(--stage-amber); border-left-style: solid; animation: none; }
  .connection-route li:not(:last-child)::after { left: var(--node-radius); border-left-style: solid; border-color: #a9d7b9; }
  .connection-demo.enhanced .connection-view:not([hidden]) .connection-route li:not(:last-child)::after { animation: none; }
  .connection-demo.enhanced[data-internet="offline"] .connection-route .route-break-after::after { border-left-style: dashed; }
  .connection-demo.enhanced[data-internet="offline"] .connection-route .route-break-after ~ li::after { border-left-style: dotted; }
  .connection-demo.enhanced[data-internet="offline"] .route-break { top: calc(100% + 7px); left: var(--node-radius); }
}
