:root {
  color-scheme: dark;
  --ink: #2e3033;
  --white: #f4f2ee;
  --linen: #d8d2ca;
  --nickel: #b8bbbe;
  --aqua: #a9c7c4;
  --gold: #c6b18d;
  --warning: #a64b43;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--white);
  background: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 1px solid #b8bbbe80;
  background: #f4f2ee04;
  border-radius: 7px;
}
a {
  color: inherit;
}
button:hover,
a.beta:hover {
  background: #f4f2ee12;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
}
.scene picture,
.scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene img {
  object-position: 42% 53%;
}
.scene:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 48%, #2e303322);
}
.site-head {
  height: 74px;
  padding: 17px 24px 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: block;
}
.brand img {
  display: block;
  width: 142px;
  height: 56px;
  object-fit: contain;
}
.beta {
  padding: 10px 19px;
  border: 1px solid var(--linen);
  border-radius: 16px;
  text-decoration: none;
  background: #2e303342;
  backdrop-filter: blur(12px);
  font-size: 15px;
}
main {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px 30px;
  min-height: calc(100svh - 74px);
}
.panel {
  align-self: flex-start;
  width: 510px;
  padding: 20px;
  border: 1px solid #b8bbbe99;
  border-radius: 16px;
  background: linear-gradient(130deg, #2e3033e8, #242526e8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 16px 50px #0003;
}
.panel-head h1 {
  font-family: Inter, "Helvetica Neue", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 350;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.chips {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
}
.chip {
  border: 1px solid #b8bbbe99;
  border-radius: 10px;
  font-size: 10px;
  line-height: 22px;
  padding: 0 15px;
  letter-spacing: 0.025em;
}
.demo-chip {
  border-color: var(--aqua);
  color: var(--aqua);
  box-shadow: inset 0 0 0 1px #a9c7c422;
}
h2 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 9px;
}
h2 small {
  float: right;
  font-size: 13px;
  font-weight: 400;
  color: var(--linen);
}
small {
  font-weight: 400;
  color: var(--linen);
}
.cfd-cues {
  margin-bottom: 17px;
}
.cfd-cues-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 15px;
}
.cfd-cue-edit {
  font-size: 12px;
  text-decoration: underline;
  border: 0;
  padding: 0 7px;
  background: none;
  color: var(--linen);
  min-height: 25px;
}
.cfd-cue-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.cfd-cue-tiles label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.cfd-cue-tiles input,
.cfd-ce-icons input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.cfd-cue {
  min-height: 96px;
  padding: 14px 3px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #b8bbbe80;
  border-radius: 6px;
  background: #f4f2ee04;
  gap: 6px;
}
.cfd-cue b {
  font-size: 14px;
  font-weight: 450;
}
.cfd-cue small {
  font-size: 10px;
  line-height: 1.35;
}
.cfd-cue-ico {
  width: 25px;
  height: 25px;
  margin-bottom: 3px;
}
.cfd-cue-tiles input:checked + .cfd-cue {
  border-color: var(--aqua);
  background: #a9c7c41c;
  box-shadow: inset 0 0 0 1px #a9c7c455;
}
.cfd-cue-tiles input:checked + .cfd-cue svg,
.cfd-cue-tiles input:checked + .cfd-cue small {
  color: var(--aqua);
}
.cfd-cue-tiles input:focus-visible + .cfd-cue,
.cfd-ce-icons input:focus-visible + span {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}
.cfd-cue-status {
  font-size: 11px;
  color: var(--linen);
  line-height: 1.5;
  margin: 8px 0 0;
}
.cfd-cue-status:empty {
  display: none;
}
.readings {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
}
.tile {
  background: #f4f2ee04;
  border: 1px solid #b8bbbe80;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
  min-width: 0;
}
.water {
  grid-column: span 2;
  grid-row: span 3;
  padding: 14px 12px;
}
.water-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 9px 0 10px;
}
.temperature {
  font-family: "Helvetica Neue", Inter, system-ui, sans-serif;
  font-size: 52px;
  font-weight: 300;
  white-space: nowrap;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.unit {
  font-size: 29px;
  letter-spacing: -0.02em;
}
.ring {
  width: 73px;
  height: 73px;
  transform: rotate(-90deg);
  flex: none;
  stroke-width: 5;
}
.ring circle {
  stroke: var(--aqua);
  stroke-dasharray: 270.18;
  transition: stroke-dashoffset 0.4s;
}
.ring .track {
  stroke: #b8bbbe40;
}
.water-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--linen);
}
.water-foot small {
  font-size: 10px;
}
.schedule {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
}
.schedule small {
  font-size: 10px;
}
.change {
  font-size: 9px;
  color: var(--linen);
  margin-left: 12px;
  text-decoration: underline;
}
.sensor {
  padding: 8px 10px;
}
.sensor > span {
  font-size: 11px;
}
.sensor-value {
  font-family: "Helvetica Neue", system-ui, sans-serif;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 300;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.sensor-value small {
  font-size: 17px;
  color: var(--white);
}
.flow {
  grid-column: span 2;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--aqua);
  font-size: 12px;
}
.flow svg {
  width: 20px;
  height: 18px;
}
.flow.warn {
  color: var(--white);
  background: var(--warning);
}
.hot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 18px;
  font-size: 12px;
}
.hot-row small {
  font-size: 11px;
}
.hot-state {
  margin-left: auto;
  color: var(--linen);
  font-size: 11px;
}
.switch {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  border: 0;
  border-radius: 99px;
  padding: 3px;
  background: #6e7276;
  flex: none;
}
.switch i {
  display: block;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 2px #0005;
  transition: transform 0.2s;
}
.switch[aria-checked="true"] {
  background: var(--aqua);
}
.switch[aria-checked="true"] i {
  transform: translateX(14px);
}
.outlets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}
.outlet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #b8bbbe80;
  border-radius: 6px;
  background: #f4f2ee03;
  font-size: 12px;
  min-width: 0;
}
.outlet-name {
  flex: 1;
  min-width: 0;
}
.outlet-state {
  font-size: 11px;
  min-width: 20px;
  color: var(--linen);
}
.outlet:has([aria-checked="true"]) .outlet-state {
  color: var(--aqua);
}
.equipment-note {
  font-size: 10px;
  color: var(--linen);
  line-height: 1.4;
  margin: 7px 0 0;
}
.block + .block {
  margin-top: 20px;
}
.scenarios {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.scenarios button {
  padding: 11px 3px;
  font-size: 11px;
  min-height: 40px;
}
.scenarios button[aria-pressed="true"] {
  border-color: var(--aqua);
  background: #a9c7c418;
}
.notifications {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border-top: 1px solid #b8bbbe55;
  margin-top: 14px;
  padding-top: 12px;
  font-size: 10px;
  color: var(--linen);
  line-height: 1.6;
}
.notifications button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--aqua);
  white-space: nowrap;
  text-decoration: underline;
  font-size: 11px;
}
.notifications button span {
  margin-left: 9px;
  font-size: 20px;
  vertical-align: -1px;
}
.status {
  margin-top: 12px;
  background: #49443f;
  border: 1px solid #b8bbbe70;
  border-radius: 7px;
  padding: 11px;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.status.alert {
  border-left: 4px solid var(--warning);
}
.status.alert:before {
  content: "⚠ ";
  color: var(--white);
}
.caption {
  position: fixed;
  bottom: 20px;
  left: 22px;
  width: min(590px, calc(100vw - 590px));
  background: #2e303386;
  border: 1px solid #b8bbbe70;
  border-radius: 9px;
  padding: 10px 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.caption p {
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}
.caption p + p {
  font-size: 10px;
  color: var(--linen);
  margin-top: 3px;
}
/* Modal editor keeps cue edits local to the page. */
.cfd-cue-editor {
  width: min(540px, calc(100% - 28px));
  max-height: 90svh;
  padding: 20px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--nickel);
  border-radius: 16px;
  overflow: auto;
}
.cfd-cue-editor::backdrop {
  background: #0009;
  backdrop-filter: blur(5px);
}
.cfd-ce-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.cfd-ce-head b {
  font-size: 21px;
  font-weight: 400;
}
.cfd-ce-x {
  font-size: 24px;
  min-width: 36px;
  min-height: 36px;
}
.cfd-ce-pick,
.cfd-ce-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.cfd-ce-chip,
.cfd-ce-btn {
  padding: 9px 12px;
  font-size: 12px;
}
.cfd-ce-chip[aria-checked="true"] {
  border-color: var(--aqua);
  background: #a9c7c422;
}
.cfd-ce-field {
  display: block;
  border: 0;
  margin: 17px 0;
  padding: 0;
  font-size: 13px;
}
.cfd-ce-field > span:first-child {
  display: block;
  margin-bottom: 7px;
}
.cfd-ce-field legend {
  margin-bottom: 8px;
}
.cfd-ce-name,
.cfd-ce-target,
select {
  border: 1px solid #b8bbbe80;
  border-radius: 6px;
  padding: 9px;
  background: #49443f;
  color: var(--white);
  max-width: 100%;
}
.cfd-ce-name {
  width: 100%;
}
.cfd-ce-icons label {
  position: relative;
  cursor: pointer;
}
.cfd-ce-icons label > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #b8bbbe70;
  border-radius: 6px;
}
.cfd-ce-icons svg {
  width: 22px;
  height: 22px;
  margin: 0;
}
.cfd-ce-icons input:checked + span {
  border-color: var(--aqua);
  background: #a9c7c422;
}
.cfd-ce-hint,
.cfd-ce-note {
  font-size: 11px;
  color: var(--linen);
  line-height: 1.5;
}
.cfd-ce-outlets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cfd-ce-outlets li {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #b8bbbe30;
  padding: 8px 0;
}
.cfd-ce-out {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}
.cfd-ce-out input {
  width: 20px;
  height: 20px;
  accent-color: var(--aqua);
}
.cfd-ce-time {
  font-size: 12px;
  width: 120px;
}
.no-times select {
  display: none;
}
select:disabled {
  opacity: 0.45;
}
.cfd-ce-num {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cfd-ce-target {
  width: 110px;
}
.cfd-ce-actions {
  display: flex;
  gap: 8px;
}
.cfd-ce-save {
  margin-left: auto;
  border-color: var(--aqua);
}
/* Big screens keep the 1440 layout and scale the whole panel, so its shape matches every other size. */
@media (min-width: 1500px) and (min-height: 1000px) {
  .panel {
    zoom: 1.12;
  }
}
@media (min-width: 1500px) {
  .caption {
    width: 625px;
  }
  .site-head {
    height: 78px;
  }
  main {
    min-height: calc(100svh - 78px);
  }
}
@media (min-width: 2200px) and (min-height: 1300px) {
  .panel {
    zoom: 1.4;
  }
}
@media (min-width: 701px) and (max-height: 850px) {
  .panel {
    padding: 17px;
  }
  .panel-head h1 {
    font-size: 25px;
    margin-bottom: 10px;
  }
  .chips {
    margin-bottom: 14px;
  }
  .cfd-cues {
    margin-bottom: 12px;
  }
  .cfd-cue {
    min-height: 87px;
    padding-top: 10px;
  }
  .hot-row {
    margin: 10px 0 13px;
  }
  .block + .block {
    margin-top: 15px;
  }
  .outlet {
    padding: 7px 11px;
  }
  .notifications {
    margin-top: 11px;
    padding-top: 9px;
  }
}
@media (max-width: 1050px) and (min-width: 701px) {
  .panel {
    width: 475px;
  }
  .caption {
    width: calc(100vw - 550px);
    min-width: 130px;
  }
  .temperature {
    font-size: 45px;
  }
  .unit {
    font-size: 25px;
  }
  .ring {
    width: 62px;
    height: 62px;
  }
  .water-foot {
    flex-wrap: wrap;
  }
  .scene img {
    object-position: 30% center;
  }
}
@media (max-width: 700px) {
  .scene {
    position: absolute;
    height: 430px;
  }
  .scene img {
    object-position: 50% 66%;
  }
  .scene:after {
    background: linear-gradient(0deg, #2e3033, transparent 32%);
  }
  .site-head {
    height: 74px;
    padding: 16px;
  }
  .brand img {
    width: 120px;
    height: 50px;
  }
  .beta {
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 13px;
  }
  main {
    display: block;
    min-height: 0;
    padding: 245px 0 0;
  }
  .panel {
    width: 100%;
    padding: 22px 16px 25px;
    border-radius: 20px 20px 0 0;
    border-width: 1px 0 0;
    background: linear-gradient(140deg, #2e3033f5, #2e3033);
    box-shadow: 0 -10px 40px #0002;
  }
  .panel-head h1 {
    font-size: 26px;
  }
  .chips {
    margin-bottom: 20px;
  }
  .cfd-cue {
    min-height: 104px;
    padding: 14px 3px 10px;
  }
  .cfd-cue b {
    font-size: 13px;
  }
  .cfd-cue small {
    font-size: 10px;
  }
  .cfd-cue-tiles {
    gap: 5px;
  }
  .readings {
    gap: 6px;
  }
  .water {
    padding: 13px 10px;
  }
  .water-main {
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
  }
  .temperature {
    font-size: 44px;
  }
  .unit {
    font-size: 24px;
  }
  .ring {
    width: 53px;
    height: 53px;
  }
  .water-foot {
    flex-wrap: wrap;
    gap: 6px;
  }
  .water-foot small {
    font-size: 9px;
  }
  .sensor {
    padding: 10px 8px;
  }
  .sensor > span {
    font-size: 10px;
  }
  .sensor-value {
    font-size: 27px;
  }
  .sensor-value small {
    font-size: 14px;
  }
  .schedule {
    padding: 9px 10px;
    font-size: 13px;
  }
  .schedule small {
    font-size: 10px;
  }
  .change {
    display: none;
  }
  .hot-row {
    margin: 15px 0 20px;
  }
  .outlet {
    padding: 11px 9px;
    gap: 7px;
    font-size: 11px;
    min-height: 44px;
  }
  .switch {
    width: 34px;
  }
  .outlet-state {
    font-size: 10px;
    min-width: 16px;
  }
  .block + .block {
    margin-top: 24px;
  }
  .scenarios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scenarios button {
    min-height: 44px;
    font-size: 12px;
  }
  .notifications {
    align-items: flex-start;
    font-size: 10px;
    flex-direction: column;
    gap: 8px;
  }
  .notifications button {
    min-height: 32px;
    font-size: 12px;
  }
  .caption {
    position: static;
    width: auto;
    margin: 0;
    padding: 0 16px 24px;
    background: var(--ink);
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
  }
  .caption p {
    font-size: 11px;
  }
  .caption p + p {
    font-size: 10px;
  }
  .cfd-ce-outlets li {
    gap: 8px;
  }
  .cfd-ce-time {
    width: 110px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.scene .plunge-frame{position:absolute;inset:0;opacity:0;transition:opacity .35s ease}.scene .plunge-frame.on{opacity:1}@media(prefers-reduced-motion:reduce){.scene .plunge-frame{transition:none}}

/* One light stone treatment, including mobile and the local cue editor. */
.panel,.cfd-cue-editor{
  color-scheme:light;
  --white:#2A2521;
  --linen:#5B5147;
  --aqua:#245C58;
  --gold:#B08D57;
  --nickel:#B08D57;
  color:#2A2521;
  border-color:#B08D57;
  background:linear-gradient(#FBF8F233,#FBF8F233),url("assets/calacatta-texture.webp?v=17df027c") center/cover;
}
.panel button,.cfd-cue-editor button,.chip,.cfd-cue,.tile,.outlet,.cfd-ce-icons label>span{
  border-color:#B08D57;
  background-color:#FBF8F280;
}
.chip,.demo-chip{color:#2A2521;box-shadow:none}
.panel button:hover,.cfd-cue-editor button:hover{background-color:#F0E1C6}
.cfd-cue-tiles input:checked+.cfd-cue,.scenarios button[aria-pressed="true"],.cfd-ce-chip[aria-checked="true"],.cfd-ce-icons input:checked+span{
  border-color:#A07838;background:#F0D59C99;box-shadow:inset 0 0 0 1px #B08D57;
}
.cfd-cue-tiles input:checked+.cfd-cue svg,.cfd-cue-tiles input:checked+.cfd-cue small{color:#654515}
.ring circle{stroke:#A07838}
.ring .track{stroke:#DED3C2}
.flow{color:#245C58;background:#C4E0DAcc}
.flow.warn{color:#F4F2EE;background:#A64B43}
.panel .switch,.panel .switch:hover,.cfd-cue-editor .switch,.cfd-cue-editor .switch:hover{background:#CFC6B8;box-shadow:inset 0 0 0 1px #A99C88}
.switch i{background:#FFFFFF}
.panel .switch[aria-checked="true"],.panel .switch[aria-checked="true"]:hover,.cfd-cue-editor .switch[aria-checked="true"],.cfd-cue-editor .switch[aria-checked="true"]:hover{background:#A07838;box-shadow:inset 0 0 0 1px #876020}
.outlet:has([aria-checked="true"]) .outlet-state{color:#654515}
.notifications{border-color:#B08D57}
.status,.status.alert{background:#FBF8F2e6;border-color:#B08D57;color:#2A2521}
.status.alert{border-left-color:#A64B43}
.status.alert:before{color:#A64B43}
.cfd-ce-name,.cfd-ce-target,.cfd-cue-editor select{background:#FBF8F2;color:#2A2521;border-color:#B08D57}
.cfd-ce-outlets li{border-color:#B08D5780}
.cfd-ce-out input{accent-color:#876020}
.panel :focus-visible,.cfd-cue-editor :focus-visible,.cfd-cue-tiles input:focus-visible+.cfd-cue,.cfd-ce-icons input:focus-visible+span{outline-color:#876020}

/* Painted edges preserve the existing border boxes and control geometry. */
.panel{box-shadow:inset 0 0 0 1px #B08D57,0 0 0 1px #B08D5780,0 0 14px #B08D5740,0 16px 50px #0003}
.chip,.cfd-cue,.tile,.outlet,.scenarios button{border-color:#A07838;outline:0.5px solid #B08D57;outline-offset:-1px}
.hot-row::before{content:"";order:1;flex:1;height:1px;background:#B08D57}
.hot-row>.hot-state{order:2;margin-left:0}
.hot-row>.switch{order:3}

/* Local text halos calm veins only beneath the small, open-stone labels. */
.hot-row small,.hot-state,.equipment-note,.notifications>span,.cfd-cue-status,
.cfd-ce-note,.cfd-ce-outlets .cfd-ce-out>span{
  color:#2A2521;
  text-shadow:0 0 3px #FBF8F2,0 0 3px #FBF8F2,0 0 6px #FBF8F2;
}
body>.scene{--scene-shift:.5}
@media(min-width:801px){body>.scene{left:calc(-1 * var(--pane,0px));right:auto;width:calc(100% + var(--pane,0px))}}
