/* Sensor Network / Sitech Consulting - heater-controller page only.
   Builds on style.css and its tokens. Yellow marks the sensor and its view, signal red marks heat,
   everything else stays graphite on concrete grey. */

/* ---------- hero facts inside an inner-page hero ---------- */
.page-hero .hero-facts{max-width:none}

/* ---------- worked example (three figures) ---------- */
.figures.hc-example{grid-template-columns:repeat(3,minmax(0,1fr))}
.figures.hc-example dt small{font:500 .5em/1 var(--font-body);letter-spacing:0;margin-left:.15em}
@media (max-width:900px){.figures.hc-example{grid-template-columns:minmax(0,1fr)}}

/* ---------- presence + temperature demo ---------- */
.hc-demo{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:clamp(24px,4vw,56px);align-items:start}
.hc-demo > *{min-width:0}
.hc-scene{margin:0}
.hc-scene svg{display:block;width:100%;height:auto;overflow:visible}
.hc-scene text{font-family:var(--font-body);fill:var(--ink)}
.hc-scene .t-small{font-size:13px;fill:var(--ink-2)}
.hc-scene .t-tick{font-size:12px;fill:var(--ink-2);text-anchor:end}
.hc-scene .t-value{font:600 26px/1 var(--font-display);fill:var(--ink)}
.hc-scene .t-thr{font-size:13px;font-weight:600}
.hc-scene .line{fill:none;stroke:var(--ink-2);stroke-width:1.25}
.hc-scene .floor{stroke:var(--ink-3);stroke-width:1.5}
.hc-scene .steel{fill:#3B3D39}
.hc-scene .steel-2{fill:var(--ink-3)}
.hc-scene .box{fill:#C9CBC6;stroke:#3B3D39;stroke-width:1.25}
.hc-scene .paper{fill:var(--paper);stroke:var(--ink-2);stroke-width:1.25}
.hc-scene .zone{opacity:.2;transition:opacity .3s}
.hc-scene.is-present .zone{opacity:.36}
.hc-scene .zone-edge{fill:none;stroke:var(--yellow-deep);stroke-width:1.25;stroke-dasharray:5 4}
.hc-scene .sensor-head{fill:var(--yellow);stroke:#3B3D39;stroke-width:1}
.hc-scene .worker{transition:opacity .45s ease,transform .45s ease;opacity:0;transform:translateX(46px)}
.hc-scene.is-present .worker{opacity:1;transform:none}
.hc-scene .worker .body{fill:#3B3D39}
.hc-scene .worker .vest{fill:var(--yellow)}
.hc-scene .heat{opacity:0;transition:opacity .5s ease}
.hc-scene.is-on .heat{opacity:1}
.hc-scene .grill{fill:#8B8D86;transition:fill .35s}
.hc-scene.is-on .grill{fill:#F0762B}
.hc-scene .grill-core{fill:#FFD76A;opacity:0;transition:opacity .35s}
.hc-scene.is-on .grill-core{opacity:1}
.hc-scene .heater-state{font:600 15px/1 var(--font-body);fill:var(--ink-3);transition:fill .3s}
.hc-scene.is-on .heater-state{fill:var(--signal)}
.hc-scene .thermo-glass{fill:var(--paper);stroke:var(--ink-2);stroke-width:1.25}
.hc-scene .thermo-fill{fill:var(--ink);transition:y .25s ease,height .25s ease}
.hc-scene .thermo-range{fill:var(--yellow)}
.hc-scene .thermo-off{fill:var(--concrete-deep)}
.hc-scene .thr-mark{transition:transform .25s ease}
.hc-scene .thr-mark path{fill:var(--ink)}
.hc-scene figcaption{margin-top:.9rem}
@media (prefers-reduced-motion:reduce){
  .hc-scene .worker,.hc-scene .heat,.hc-scene .grill,.hc-scene .grill-core,.hc-scene .thermo-fill,.hc-scene .thr-mark{transition:none}
}

.hc-panel{background:var(--paper);border-radius:var(--radius);padding:clamp(18px,2.4vw,28px);display:grid;gap:1.25rem}
.hc-panel h3{font-size:1.25rem}
.hc-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.45rem .75rem;align-items:baseline}
.hc-field label,.hc-field .hc-label{font-weight:500;font-size:.9375rem}
.hc-field output{font:600 1.125rem/1 var(--font-display);white-space:nowrap}
.hc-field input[type=range]{grid-column:1 / -1;width:100%;margin:0;accent-color:var(--ink);height:28px;cursor:pointer}
.hc-field .caption{grid-column:1 / -1;margin-top:-.2rem}
.hc-seg{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1.5px solid var(--ink);border-radius:var(--radius);overflow:hidden}
.hc-seg button{font:600 .9375rem/1.2 var(--font-body);padding:.7rem .6rem;border:0;background:var(--paper);color:var(--ink);cursor:pointer;min-width:0}
.hc-seg button + button{border-left:1.5px solid var(--ink)}
.hc-seg button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.hc-seg button:focus-visible{outline-offset:-4px}
.hc-state{display:grid;gap:0;margin:0}
.hc-state > div{display:grid;grid-template-columns:7.5rem minmax(0,1fr);gap:.75rem;padding:.6rem 0;border-top:1px solid var(--line);align-items:baseline}
.hc-state > div:last-child{border-bottom:1px solid var(--line)}
.hc-state dt{font-size:.875rem;color:var(--ink-2)}
.hc-state dd{margin:0;font-weight:500;overflow-wrap:anywhere}
.hc-state .pill{display:inline-block;font:600 .9375rem/1 var(--font-body);padding:.36rem .6rem;border-radius:3px;background:var(--concrete);color:var(--ink-2)}
.hc-state .pill.on{background:var(--signal);color:#fff}
.hc-delay{display:grid;gap:.4rem;font-size:.875rem;color:var(--ink-2);min-height:2.3rem;align-content:start}
.hc-delay .bar{height:4px;background:var(--concrete);border-radius:2px;overflow:hidden;visibility:hidden}
.hc-delay .bar i{display:block;height:100%;width:100%;background:var(--signal);transform-origin:left center}
.hc-delay.is-running .bar{visibility:visible}
.hc-delay.is-running .bar i{animation:hc-drain var(--hc-delay,5s) linear forwards}
@keyframes hc-drain{from{transform:scaleX(1)}to{transform:scaleX(0)}}
.steps.hc-logic{margin-top:clamp(32px,5vw,64px)}
.steps.hc-logic li{align-content:start}
@media (max-width:860px){.hc-demo{grid-template-columns:minmax(0,1fr)}}

/* ---------- 3D aiming view ---------- */
.hc-aim{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:clamp(20px,3.5vw,56px);align-items:center}
.hc-aim > *{min-width:0}
.hc-stage{display:grid;gap:.9rem}
.hc-viewer{position:relative;aspect-ratio:4 / 3;-webkit-user-select:none;user-select:none}
.hc-viewer .hc-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transition:opacity .45s ease}
.hc-viewer canvas{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .45s ease;cursor:grab;touch-action:pan-y;outline-offset:-3px}
.hc-viewer canvas.is-dragging{cursor:grabbing}
.hc-viewer.is-live canvas{opacity:1}
.hc-viewer.is-live .hc-poster{opacity:0;pointer-events:none}
.hc-target{position:absolute;left:0;top:0;display:none;align-items:center;gap:.4rem;pointer-events:none;will-change:transform;font:600 .8125rem/1 var(--font-body);color:var(--ink-2)}
.hc-viewer.is-live .hc-target{display:inline-flex}
.hc-target .dot{width:12px;height:12px;border-radius:50%;border:2px solid var(--ink-2);background:var(--paper);margin-left:-6px;flex:0 0 auto;transition:background-color .25s,border-color .25s}
.hc-target .lbl{background:var(--paper);border:1px solid var(--line);border-radius:3px;padding:.32rem .5rem;white-space:nowrap;transition:background-color .25s,color .25s,border-color .25s}
.hc-target.is-seen{color:var(--ink)}
.hc-target.is-seen .dot{background:var(--yellow);border-color:var(--ink)}
.hc-target.is-seen .lbl{background:var(--yellow);border-color:var(--yellow)}
.hc-readout{margin:0;font-size:.9375rem;color:var(--ink-2);min-height:1.5em}
.hc-readout strong{color:var(--ink)}
.hc-controls{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center}
.hc-controls .btn{padding:.55rem .9rem;font-size:.9375rem}
.hc-controls .btn[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.hc-viewer-static .hc-controls,.hc-viewer-static .hc-readout{display:none}

.hc-steps{list-style:none;margin:0;padding:0;display:grid;gap:0;counter-reset:hc}
.hc-steps li{margin:0;display:grid;grid-template-columns:2.4rem minmax(0,1fr);gap:.2rem .75rem;padding:1.05rem 0 1.05rem 1rem;border-top:1px solid var(--line);border-left:3px solid transparent;transition:border-color .25s,background-color .25s}
.hc-steps li:last-child{border-bottom:1px solid var(--line)}
.hc-steps li::before{counter-increment:hc;content:counter(hc);grid-row:1 / span 2;font:600 1.75rem/1 var(--font-display);color:var(--ink-3);transition:color .25s}
.hc-steps li.is-active{border-left-color:var(--yellow);background:var(--paper)}
.hc-steps li.is-active::before{color:var(--ink)}
.hc-steps h3{font-size:1.125rem}
.hc-steps h3 button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;text-align:left;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px}
.hc-steps h3 button:hover{text-decoration-color:var(--ink)}
.hc-steps p{grid-column:2;color:var(--ink-2);font-size:.9375rem}
.band .hc-steps li.is-active{background:var(--bg)}
@media (max-width:900px){.hc-aim{grid-template-columns:minmax(0,1fr)}}
@media (max-width:540px){.hc-viewer{aspect-ratio:1 / 1}}

/* ---------- installation photos ---------- */
.places.hc-places{margin-top:clamp(32px,5vw,64px)}
.places.hc-places .ph{aspect-ratio:4 / 5}
.places.hc-places .ph.pos-dock img{object-position:64% 50%}
.places.hc-places .ph.pos-line img{object-position:38% 50%}
@media (max-width:760px){.places.hc-places .ph{aspect-ratio:4 / 5}}

/* ---------- specifications: render with dimensions ---------- */
.hc-render{margin:0}
.hc-render{display:grid;justify-items:center}
.hc-render img{display:block;width:auto;max-width:min(100%,420px);height:auto}
.hc-render.hc-render-inside img{max-width:min(100%,320px);aspect-ratio:1;object-fit:cover;border-radius:50%;background:var(--paper);border:1.5px solid var(--concrete-deep)}
.hc-render figcaption{justify-self:stretch}

/* ---------- device page (controller.html): labelled views and their legend ---------- */
.hc-parts{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:clamp(24px,4vw,64px);align-items:center}
.hc-parts > *{min-width:0}
.hc-views{display:grid;grid-template-columns:minmax(0,1.09fr) minmax(0,1fr);gap:clamp(12px,2.5vw,36px);align-items:end}
.hc-view{margin:0;min-width:0}
.hc-view-img{position:relative}
.hc-view-img img{display:block;width:100%;height:auto}
.hc-view figcaption{text-align:center}
.hc-pin,.hc-legend li::before{width:1.75rem;height:1.75rem;border-radius:50%;background:var(--ink);color:var(--paper);display:grid;place-items:center;font:600 .875rem/1 var(--font-body)}
.hc-pin{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);box-shadow:0 0 0 2px var(--concrete)}
.hc-legend{list-style:none;margin:0;padding:0;display:grid;gap:0;counter-reset:hcl}
.hc-legend li{margin:0;display:grid;grid-template-columns:1.75rem minmax(0,1fr);gap:.15rem .9rem;padding:.9rem 0;border-top:1px solid var(--line)}
.hc-legend li:last-child{border-bottom:1px solid var(--line)}
.hc-legend li::before{counter-increment:hcl;content:counter(hcl);grid-row:1 / span 2;margin-top:.05rem}
.hc-legend h3{font-size:1.0625rem;line-height:1.75rem}
.hc-legend p{grid-column:2;color:var(--ink-2);font-size:.9375rem}
@media (max-width:900px){.hc-parts{grid-template-columns:minmax(0,1fr)}}
@media (max-width:480px){.hc-legend li::before{width:1.5rem;height:1.5rem;font-size:.8125rem}.hc-legend li{grid-template-columns:1.5rem minmax(0,1fr)}.hc-legend h3{line-height:1.5rem}.hc-pin{width:1.3rem;height:1.3rem;font-size:.75rem;box-shadow:0 0 0 1.5px var(--concrete)}}
