/* One responsive panel per category; existing IDs and handlers remain unchanged. */
.control-page {
  --control-surface: var(--ui-surface);
  --control-field: var(--ui-rail);
  --control-border: var(--ui-border);
  --control-selection: color-mix(in srgb, var(--ui-hover), var(--ui-target) 20%);
  --pico-form-element-background-color: var(--control-field);
  --pico-form-element-active-background-color: var(--control-field);
  --pico-form-element-border-color: var(--control-border);
  --pico-range-border-color: var(--control-border);
  --pico-range-active-border-color: var(--ui-target);
  --pico-range-thumb-color: var(--ui-target);
  --pico-range-thumb-border-color: var(--ui-target);
  --pico-range-thumb-active-color: var(--ui-band);
  container-type: inline-size;
}
.control-section {
  margin: 0 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--control-border);
  border-radius: 0.75rem;
  background: var(--control-surface);
}
.control-section-heading { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.25rem; }
.control-section-heading > h2 { margin: 0; font-size: 1.2rem; font-weight: 500; }
.control-page .control-help-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -0.5rem 0; padding: 10px; border: 0; background: transparent; color: var(--ui-muted); }
.control-help-button .svg { width: 22px; height: 22px; }
.control-help-dialog > article { width: min(42rem, calc(100vw - 2rem)); }
.control-help-dialog h2 { margin: 0; font-size: 1.3rem; }
.control-help-dialog dt { margin-top: 1rem; font-weight: 600; color: var(--ui-text); }
.control-help-dialog dd { margin: 0.3rem 0 0; color: var(--ui-muted); line-height: 1.6; white-space: pre-line; }
.control-help-dialog [hidden] { display: none; }
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem; align-items: start; }
.control-primary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 2rem; max-width: 64rem; }
.control-temperature-grid { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--control-border); }
.control-water-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem; align-items: start; }
.control-page .control-card { min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.control-page .control-compact-card input[type="number"] { width: 5rem; }
.control-oil-set { max-width: 52rem; }
.control-page .dash-main { min-width: 0; padding: 0; }
.control-page .dash-header {
  display: block;
  margin: 0 0 0.8rem;
  padding: 0;
  text-align: left;
  color: var(--ui-text);
  font-size: max(14px, 0.9rem);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.control-page .dash-content { display: block; margin: 0; padding: 0; text-align: left; }
.control-page .control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; min-height: 2.8rem; }
.control-page .control-label-row .dash-header { min-width: 0; margin: 0; }
.control-page .control-reading, .control-page .control-oil-reading {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  flex-shrink: 0;
  color: var(--ui-accent);
  font-size: max(24px, 1.8rem);
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.control-page .control-oil-reading { font-size: max(18px, 1.15rem); }
.control-page .control-unit { color: var(--ui-muted); font-size: max(12px, 0.8rem); font-weight: 400; white-space: nowrap; }
.control-page .control-scale { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.15rem; color: var(--ui-muted); font-size: max(12px, 0.75rem); }
.control-page .dash-footer { display: block; margin: 0.65rem 0 0; padding: 0; text-align: left; color: var(--ui-muted); font-size: max(12px, 0.75rem); line-height: 1.4; }
.control-page input[type="range"] { width: 100%; height: 32px; margin: 0; accent-color: var(--ui-target); }
.control-page input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--ui-target) 0 var(--control-progress, 0%), var(--control-border) var(--control-progress, 0%) 100%); }
.control-page input[type="range"]::-moz-range-track { background: linear-gradient(to right, var(--ui-target) 0 var(--control-progress, 0%), var(--control-border) var(--control-progress, 0%) 100%); }
.control-page select, .control-page input[type="number"] { margin: 0; min-width: 0; min-height: 44px; font-size: max(16px, 0.95rem); }
.control-page input[type="number"] { width: min(100%, 8rem); }
.control-page .radio-buttons { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 4px; border: 1px solid var(--control-border); border-radius: 0.6rem; background: var(--control-field); }
.control-page .button-like { display: block; position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; clip-path: inset(50%); }
.control-page .button-like-label { display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: 0; min-height: 44px; margin: 0; padding: 0.45rem 0.2rem; border-radius: 0.4rem; color: var(--ui-muted); font-size: max(14px, 0.9rem); line-height: 1.3; text-align: center; }
.control-page .button-like-label > i { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.control-page .button-like:checked + .button-like-label { color: var(--ui-text); background: var(--control-selection); border-radius: 0.4rem; }
.control-page .button-like:focus-visible + .button-like-label { outline: 2px solid var(--ui-target); outline-offset: 1px; }
.control-page .control-oil-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.control-page .control-oil-controls > [role="group"] { flex: 1 1 15rem; min-width: 0; margin: 0; }
.control-page .control-oil-feedback { display: flex; align-items: baseline; gap: 0.5rem; color: var(--ui-muted); white-space: nowrap; }
.control-page .control-oil-set input { width: 100%; }
.control-page .control-oil-set button { width: auto; flex: 0 0 auto; white-space: nowrap; margin: 0; background: var(--control-selection); }
@container (min-width: 1500px) {
  .control-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (max-width: 1000px) {
  .control-grid, .control-water-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-water-grid .control-mode-card { grid-column: 1 / -1; max-width: 32rem; width: 100%; }
}
@container (max-width: 600px) {
  .control-grid, .control-primary-grid, .control-water-grid { grid-template-columns: minmax(0, 1fr); }
  .control-section { padding: 1rem; }
}
@media (pointer: coarse) {
  .control-page input[type="range"] { height: 44px; }
}

/* Buderus overrides; shared styles are provided by EspWebUI's lib.css. */

.leftright {
  margin-left: 10px;
  margin-right: 10px;
}

.sidebar .nav-list {
  overflow-y: auto;
}

:root {
  --pico-font-size-override: -5%;
}

/* Limit both heating circuits to two readable columns and a compact program. */
.heating-circuit {
  max-width: 64rem;
}

.heating-circuit-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  align-items: start;
  gap: var(--pico-grid-column-gap);
  margin-bottom: var(--pico-block-spacing-vertical);
}

.heating-circuit-info > article {
  min-width: 0;
  margin-bottom: 0;
}

/* Weekly view of the manual heating program. */
.weekly-program {
  --weekly-program-border: color-mix(in srgb, var(--pico-color) 25%, transparent);
}

.weekly-program-scroll {
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.weekly-program-chart {
  min-width: 36rem;
}

.weekly-program-header,
.weekly-program-body {
  display: grid;
  grid-template-columns: 3rem repeat(7, minmax(0, 1fr));
}

.weekly-program-header {
  padding-bottom: 0.75rem;
  text-align: center;
  font-weight: bold;
}

.weekly-program-body {
  height: 28rem;
  margin-block: 0.5rem;
  border-block: 1px solid var(--weekly-program-border);
}

.weekly-program-axis,
.weekly-program-day {
  position: relative;
}

.weekly-program-axis > span {
  position: absolute;
  right: 0.5rem;
  transform: translateY(-50%);
  color: var(--pico-muted-color);
  font-size: 0.7rem;
}

.weekly-program-day {
  border-left: 1px solid var(--weekly-program-border);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(12.5% - 1px), var(--weekly-program-border) calc(12.5% - 1px), var(--weekly-program-border) 12.5%);
}

.weekly-program-day:last-child {
  border-right: 1px solid var(--weekly-program-border);
}

.weekly-program-block {
  position: absolute;
  inset-inline: 15%;
  min-height: 2px;
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--ui-accent) 35%, var(--ui-surface));
  color: var(--ui-text);
  padding-inline: 0.15rem;
  text-align: center;
  overflow: hidden;
  font-size: 0.7rem;
}

.weekly-program-block > span {
  display: block;
}

.weekly-program-block > span:last-child {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
}

.weekly-program-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.weekly-program-legend i {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid var(--weekly-program-border);
  border-radius: 0.15rem;
}

.weekly-program-key-on {
  background: color-mix(in srgb, var(--ui-accent) 35%, var(--ui-surface));
}

/* Compact instrument cards; histories and rendering stay in the browser. */
.dash.dash-history {
  --dash-heading-height: 4.8rem;
  --dash-legend-height: 1.4rem;
  --dash-trend-actual: var(--ui-accent);
  --dash-trend-target: var(--ui-target);
  --dash-trend-band: var(--ui-band);
  --dash-trend-surface: var(--ui-surface);
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: var(--dash-heading-height) auto auto;
  padding: 0;
  overflow: hidden;
  background: var(--dash-trend-surface);
}

.dash-history > .dash-header {
  display: flex;
  align-items: center;
  line-height: 1.4;
  overflow: hidden;
  background: var(--pico-card-background-color);
  grid-column: 1 / -1;
  padding: 1rem;
  margin: 0;
  text-align: left;
}

.dash-readings {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 10px;
  border-right: 1px solid var(--ui-border);
}

.dash-reading-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--pico-muted-color);
  overflow-wrap: anywhere;
}

.dash-reading-label::before {
  content: "";
  display: inline-block;
  width: 12px;
  flex: 0 0 12px;
  border-top: 2px solid var(--dash-trend-actual);
}

.dash-reading-secondary .dash-reading-label::before {
  border-top: 2px dashed var(--dash-trend-target);
}

.dash-reading-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px;
  line-height: 1.15;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.dash-reading-value .value { font-size: 2rem; }
.dash-reading-secondary .value { font-size: 1.5rem; color: var(--pico-muted-color); }
.dash-reading-unit { font-size: 11px; color: var(--pico-muted-color); }

.dash-history-plot {
  min-width: 0;
  padding: 12px 8px 5px 0;
}

.dash-chart { height: 220px; }

.dash-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.dash-chart text {
  fill: var(--pico-muted-color);
  font: 11px var(--pico-font-family);
}

.dash-chart-grid { stroke: var(--pico-form-element-border-color); stroke-width: 1; }

.dash-chart-actual,
.dash-chart-target {
  fill: none;
  stroke: var(--dash-trend-actual);
  stroke-width: 2;
  stroke-linejoin: round;
}

.dash-chart-target {
  stroke: var(--dash-trend-target);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}

.dash-chart .dash-chart-gap { stroke-width: 1; opacity: 0.38; }
.dash-chart circle { stroke: none; }
.dash-chart circle.dash-chart-actual { fill: var(--dash-trend-actual); }
.dash-chart circle.dash-chart-target { fill: var(--dash-trend-target); }
.dash-chart-guide { stroke: var(--pico-muted-color); stroke-width: 1; }

.dash-chart-status {
  grid-column: 1 / -1;
  height: 1.5em;
  line-height: 1.5;
  padding: 5px 6px;
  box-sizing: content-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--pico-muted-color);
  text-align: center;
}

.dash-chart-state { fill: var(--dash-trend-band); opacity: 0.2; }

.dash-chart-legend {
  height: var(--dash-legend-height);
  line-height: var(--dash-legend-height);
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 6px 9px;
  margin: 0 8px 7px 29px;
  font-size: 11px;
  color: var(--pico-muted-color);
}

.dash-history:not([data-chart-state]) .dash-history-plot::before {
  content: "";
  display: block;
  height: var(--dash-legend-height);
  margin-bottom: 7px;
}

.dash-chart-state-name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  margin-right: auto;
  color: var(--pico-color);
}

.dash-chart-state-name span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-chart-key-on,
.dash-chart-key-off,
.dash-chart-legend .svg { flex-shrink: 0; }

.dash-chart-legend .svg {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-size: contain;
}

.dash-chart-key-on::before,
.dash-chart-key-off::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 8px;
  margin-right: 4px;
  background: var(--dash-trend-band);
}

.dash-chart-key-off::before { background: var(--pico-form-element-border-color); }

/* Distinguish the received active program from the manual schedule below. */
.program-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.information-page .program-heading .table-header { margin: 0; }
.program-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--ui-field);
  color: var(--ui-muted);
  font-size: 0.85rem;
}
.program-status-value { color: var(--ui-text); font-size: 1.25rem; font-weight: 500; overflow-wrap: anywhere; }

/* Compact, offline-readable help using the project surfaces and native details. */
.buderus-help .help-intro { max-width: 56rem; color: var(--ui-muted); }
.help-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1.25rem 0; }
.help-shortcuts a { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem; color: var(--ui-text); text-decoration: none; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 0.65rem; }
.help-shortcuts a:hover { background: var(--ui-rail); }
.help-shortcuts span { color: var(--ui-muted); font-size: 0.85rem; }
.buderus-help .help-panel { padding: 0; margin: 0 0 0.75rem; border: 1px solid var(--ui-border); border-radius: 0.65rem; background: var(--ui-surface); scroll-margin-top: 1rem; }
.help-panel > summary { margin: 0; padding: 1rem 1.15rem; font-weight: 500; }
.help-panel[open] > summary { border-bottom: 1px solid var(--ui-border); }
.help-content { padding: 1.15rem; }
.help-content > :last-child { margin-bottom: 0; }
.help-content h3, .help-docs h2 { font-size: 1rem; font-weight: 500; }
.help-content p, .help-content li, .help-content dd { font-size: 0.9rem; line-height: 1.6; }
.help-content li + li { margin-top: 0.4rem; }
.help-note { padding-left: 0.85rem; border-left: 2px solid var(--ui-accent); color: var(--ui-muted); }
.help-content dt { margin-top: 1rem; font-weight: 500; }
.help-content dt:first-child { margin-top: 0; }
.help-content dd { margin: 0.3rem 0 0; color: var(--ui-muted); }
.help-table { overflow-x: auto; margin: 1rem 0; }
.buderus-help .help-table td:first-child { width: auto; }
.help-table table { font-size: 0.85rem; }
.help-doc-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
@container (max-width: 520px) {
  .help-shortcuts { grid-template-columns: minmax(0, 1fr); }
  .help-shortcuts a { padding: 0.8rem 1rem; }
}

.i_flame {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="%23ffffff" d="M20 15c0 4.255-2.618 6.122-4.641 6.751-.432.134-.715-.369-.457-.74.88-1.265 1.898-3.195 1.898-5.01 0-1.951-1.644-4.254-2.928-5.675-.293-.324-.805-.11-.821.328-.053 1.45-.282 3.388-1.268 4.908a.412.412 0 0 1-.677.036c-.308-.39-.616-.871-.924-1.252-.166-.204-.466-.207-.657-.026-.747.707-1.792 1.809-1.792 3.18 0 .93.36 1.905.767 2.69.224.43-.174.95-.604.724C6.113 19.98 4 18.084 4 15c0-3.146 4.31-7.505 5.956-11.623.26-.65 1.06-.955 1.617-.531C14.943 5.414 20 10.378 20 15Z"/></svg>');
}
.i_oil {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="200" height="200" fill="%23ffffff" viewBox="0 0 501.423 501.423"><path d="M482.133 326.846H470.4c-2.133-16-7.467-30.933-16-43.733l8.533-7.467c9.6-8.533 9.6-21.333 2.133-29.867-8.533-9.6-21.333-9.6-29.867-2.133l-9.6 8.533c-11.733-8.533-24.533-14.933-39.467-19.2l1.067-11.733c1.067-11.733-7.467-21.333-19.2-22.4-11.733-1.067-21.333 7.467-22.4 19.2l-1.067 12.8c-14.933 2.133-29.867 7.467-42.667 14.933l-7.467-8.533c-8.533-8.533-21.333-9.6-29.867-2.133-8.533 8.533-9.6 21.333-2.133 29.867l8.533 9.6c-8.533 11.733-14.933 25.6-19.2 40.533H240c-11.733-1.067-21.333 7.467-22.4 19.2-1.067 11.733 7.467 21.333 19.2 22.4h12.8c2.133 14.933 6.4 29.867 14.933 42.667L256 406.845c-9.6 8.533-9.6 21.333-2.133 29.867 4.267 5.333 10.667 7.467 16 7.467 4.267 0 9.6-2.133 13.867-5.333l9.6-8.533 3.2 3.2c10.667 7.467 23.467 13.867 37.333 17.067v11.733c-1.067 11.733 7.467 21.333 19.2 22.4h1.067c10.667 0 20.267-8.533 21.333-19.2l1.067-12.8c14.933-2.133 29.867-7.467 41.6-14.933l7.467 8.533c4.267 5.333 10.667 7.467 16 7.467 4.267 0 9.6-1.067 13.867-5.333 8.533-8.533 9.6-21.333 2.133-29.867l-8.533-9.6c8.533-11.733 16-24.533 19.2-39.467h11.734c11.733 0 20.267-8.533 21.333-19.2 1.065-12.801-7.469-22.401-19.202-23.467zm-122.667 83.2c-39.467 0-70.4-32-70.4-70.4 0-39.467 32-70.4 70.4-70.4s70.4 32 70.4 70.4c1.067 39.466-30.933 70.4-70.4 70.4z"/><path d="M321.067 186.045C272 98.578 202.667 11.112 200.534 7.911c-8.533-9.6-25.6-9.6-33.067 0C150.4 29.245 0 221.245 0 316.178c0 101.333 82.133 184.533 183.467 184.533 21.333 0 42.667-4.267 61.867-10.667 11.733-4.267 17.067-16 12.8-26.667-4.267-11.732-16-17.066-26.667-12.799-14.933 5.333-30.933 8.533-48 8.533-77.867 0-141.867-64-141.867-142.933 0-60.8 90.667-194.133 140.8-262.4 24.533 32 68.267 92.8 101.333 152.533 6.4 10.667 19.2 13.867 28.8 8.533 10.667-6.399 13.867-19.199 8.534-28.799z"/></svg>');
}
.i_pump {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" viewBox="-10 -5 1034 1034"><path d="M500 177q-115 0-215 58-96 56-152 152-58 100-58 215t58 215q56 96 152 152 100 58 215 58t215-58q96-56 152-152 58-100 58-215t-58-215q-56-96-152-152-100-58-215-58zm0 82q93 0 173 46 78 46 124 124 46 80 46 173t-46 173q-46 78-124 124-80 46-173 46-36 0-72-7l389-336-388-336q35-7 71-7zm-167 43 361 302-358 300q-82-45-130-124-49-82-49-177.5T205 426q48-79 128-124z"/></svg>');
}
.i_temp {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" viewBox="0 0 32 32"><path d="M20.75 6.008c0-6.246-9.501-6.248-9.5 0v13.238a6.75 6.75 0 1 0 9.5 0h-.001zM16 29.25a5.25 5.25 0 0 1-3.505-9.16l.005-.004.006-.012a.74.74 0 0 0 .231-.477v-.003c.001-.014.007-.024.008-.038l.006-.029V6.007a3.085 3.085 0 0 1 3.259-3.258h-.008a3.085 3.085 0 0 1 3.249 3.266v-.008 13.52l.006.029.007.036c.015.191.101.36.231.482l.006.012a5.25 5.25 0 0 1-3.5 9.164zm.75-7.883V9.845a.75.75 0 0 0-1.5 0v11.522a2.75 2.75 0 1 0 1.519.005l-.019-.005zM26.5 2.25a3.25 3.25 0 1 0 3.25 3.25 3.254 3.254 0 0 0-3.25-3.25zm0 5a1.75 1.75 0 1 1 1.75-1.75 1.752 1.752 0 0 1-1.75 1.75z"/></svg>');
}
.i_palm {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" viewBox="0 0 32 32"><path d="M11.177 1.287c-1.75.007-3.372.363-4.163.61 0 0 7.174 1.217 7.771 6.17C9.334.207 3.388 9.713 3.388 9.713c1.24-.325 4.79-1.291 7.16-.883 1.622.279 3.203 1.749 3.135 1.73-3.865.951-10.006 18.153-8.963 19.55.93 1.068 1.861.704 2.79.162.46-3.646 4.052-19.641 8.447-18.35h.002c.37.127.72.349.739.688.036.647-.381 1.703-.283 2.437.229 1.703.562 2.296 1.047 2.89 1.158-.651 2.267-2.999 2.496-4.216 1.038.455 2.706 1.507 4.068 5.417.712-3.664-.315-6.554-3.683-7.837 1.459-.631 7.809 2.56 8.584 4.339.754-3.207-4.58-7.131-9.02-6.922.851-.222 1.787.037 2.677-.618 1.195-.88 2.588-1.637 3.886-2.451-4.366-1.899-8.395-.961-8.679 1.004-.223-4.363-3.608-5.379-6.612-5.366z"/></svg>');
}
.i_water {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 3.1 7.05 8.05a7 7 0 1 0 9.9 0L12 3.1zm0-2.828 6.364 6.364a9 9 0 1 1-12.728 0L12 .272zM13 11h2.5L11 17.5V13H8.5L13 6.5V11z"/></svg>');
}
.i_summer {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill="%23ffffff" style="enable-background:new 0 0 240 240" viewBox="0 0 240 240"><path d="M58.57 25.81c-2.13-3.67-.87-8.38 2.8-10.51a7.688 7.688 0 0 1 10.51 2.8l9.88 17.1c2.13 3.67.87 8.38-2.8 10.51a7.688 7.688 0 0 1-10.51-2.8l-9.88-17.1zM120 51.17c19.01 0 36.21 7.7 48.67 20.16C181.12 83.79 188.83 101 188.83 120c0 19.01-7.7 36.21-20.16 48.67s-29.66 20.16-48.67 20.16-36.21-7.7-48.67-20.16C58.88 156.21 51.17 139.01 51.17 120s7.7-36.21 20.16-48.67C83.79 58.88 101 51.17 120 51.17zm38.27 30.56c-9.79-9.79-23.32-15.85-38.27-15.85-14.95 0-28.48 6.06-38.27 15.85-9.79 9.79-15.85 23.32-15.85 38.27 0 14.95 6.06 28.48 15.85 38.27 9.79 9.79 23.32 15.85 38.27 15.85 14.95 0 28.48-6.06 38.27-15.85 9.79-9.79 15.85-23.32 15.85-38.27 0-14.95-6.06-28.48-15.85-38.27zM113.88 7.71c0-4.26 3.45-7.71 7.71-7.71s7.71 3.45 7.71 7.71v19.75c0 4.26-3.45 7.71-7.71 7.71s-7.71-3.45-7.71-7.71V7.71zm56.99 12.01c2.11-3.67 6.8-4.94 10.48-2.83 3.67 2.11 4.94 6.8 2.83 10.48l-9.88 17.1c-2.11 3.67-6.8 4.94-10.48 2.83-3.67-2.11-4.94-6.8-2.83-10.48l9.88-17.1zm43.32 38.85c3.67-2.13 8.38-.87 10.51 2.8 2.13 3.67.88 8.38-2.8 10.51l-17.1 9.88c-3.67 2.13-8.38.87-10.51-2.8a7.688 7.688 0 0 1 2.8-10.51l17.1-9.88zm18.1 55.31c4.26 0 7.71 3.45 7.71 7.71s-3.45 7.71-7.71 7.71h-19.75c-4.26 0-7.71-3.45-7.71-7.71s3.45-7.71 7.71-7.71h19.75zm-12.01 56.99c3.67 2.11 4.94 6.8 2.83 10.48-2.11 3.67-6.8 4.94-10.48 2.83l-17.1-9.88c-3.67-2.11-4.94-6.8-2.83-10.48 2.11-3.67 6.8-4.94 10.48-2.83l17.1 9.88zm-38.85 43.32c2.13 3.67.87 8.38-2.8 10.51a7.688 7.688 0 0 1-10.51-2.8l-9.88-17.1c-2.13-3.67-.87-8.38 2.8-10.51a7.688 7.688 0 0 1 10.51 2.8l9.88 17.1zm-55.31 18.1c0 4.26-3.45 7.71-7.71 7.71s-7.71-3.45-7.71-7.71v-19.75c0-4.26 3.45-7.71 7.71-7.71s7.71 3.45 7.71 7.71v19.75zm-56.99-12.01c-2.11 3.67-6.8 4.94-10.48 2.83-3.67-2.11-4.94-6.8-2.83-10.48l9.88-17.1c2.11-3.67 6.8-4.94 10.48-2.83 3.67 2.11 4.94 6.8 2.83 10.48l-9.88 17.1zm-43.32-38.85c-3.67 2.13-8.38.87-10.51-2.8a7.688 7.688 0 0 1 2.8-10.51l17.1-9.88c3.67-2.13 8.38-.87 10.51 2.8 2.13 3.67.88 8.38-2.8 10.51l-17.1 9.88zm-18.1-55.31c-4.26 0-7.71-3.45-7.71-7.71s3.45-7.71 7.71-7.71h19.75c4.26 0 7.71 3.45 7.71 7.71s-3.45 7.71-7.71 7.71H7.71zm12.01-56.99c-3.67-2.11-4.94-6.8-2.83-10.48 2.11-3.67 6.8-4.94 10.48-2.83l17.1 9.88c3.67 2.11 4.94 6.8 2.83 10.48-2.11 3.67-6.8 4.94-10.48 2.83l-17.1-9.88z"/></svg>');
}
.i_winter {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" class="icon multi-color" viewBox="0 0 24 24"><path d="M12 9V5M9.88 9.88 7.05 7.05m2 5H5m4.88 2.12L7.05 17M12 19v-4m5 2-2.83-2.83M19 12h-4m2-4.95-2.88 2.83M12 9a3 3 0 1 0 3 3 3 3 0 0 0-3-3Zm2-6-2 2-2-2M4.22 7.05h2.83V4.22M3 14l2-2-2-2m4.05 9.78V17H4.22M14 21l-2-2-2 2m9.78-4H17v2.83M21 10l-2 2 2 2m-4-9.78v2.83h2.83" style="fill:none;stroke:%23ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2"/></svg>');
}
.i_day {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g stroke="%23ffffff" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M8 22h8M5 19h14M2 16h20"/><path d="M12 6a6 6 0 0 0-4.5 9.969h9A6 6 0 0 0 12 6Z"/><path stroke-linecap="round" d="M12 2v1M22 12h-1M3 12H2M19.07 4.93l-.392.393M5.322 5.322l-.393-.393"/></g></svg>');
}
.i_night {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g fill="%23ffffff"><path d="m14.574 1.11-.791 1.583a.2.2 0 0 1-.09.09l-1.582.79a.2.2 0 0 0 0 .359l1.582.791a.2.2 0 0 1 .09.09l.79 1.582a.2.2 0 0 0 .359 0l.791-1.583a.2.2 0 0 1 .09-.089l1.582-.791a.2.2 0 0 0 0-.358l-1.583-.791a.2.2 0 0 1-.089-.09l-.791-1.582a.2.2 0 0 0-.358 0ZM19.242 5.072l-.779 2.336a.2.2 0 0 1-.126.127L16 8.313a.2.2 0 0 0 0 .38l2.336.778a.2.2 0 0 1 .126.127l.779 2.336a.2.2 0 0 0 .38 0l.778-2.336a.2.2 0 0 1 .127-.127l2.335-.778a.2.2 0 0 0 0-.38l-2.335-.778a.2.2 0 0 1-.127-.127l-.779-2.336a.2.2 0 0 0-.38 0Z"/><path fill-rule="evenodd" d="M10.408 13.664c2.827 2.827 7.244 3.072 10.256.706a7.748 7.748 0 0 0 .68-.603c.512-.512 1.562-.21 1.408.498a10.796 10.796 0 0 1-.357 1.261C20.898 19.814 16.789 23 12 23 5.925 23 1 18.075 1 12 1 7.133 4.29 2.983 8.669 1.543l.053-.018a10.936 10.936 0 0 1 1.073-.287c.743-.159 1.047.953.51 1.49a7.75 7.75 0 0 0-.513.566c-2.462 3.014-2.247 7.507.616 10.37Zm-1.415 1.414c2.732 2.732 6.68 3.552 10.094 2.391C17.428 19.602 14.85 21 12 21a9 9 0 0 1-9-9c0-2.908 1.457-5.528 3.66-7.182-1.244 3.453-.443 7.485 2.333 10.26Z" clip-rule="evenodd"/></g></svg>');
}
.i_solar {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill="%23fff" viewBox="0 0 260 196"><path d="M98 54v-8H73.153a23.062 23.062 0 0 0-3.86-9.306l17.806-17.806-5.657-5.657L63.64 31.032A23.071 23.071 0 0 0 54 27.097V2h-8v25.207a23.064 23.064 0 0 0-9.021 3.82l-17.78-17.779-5.656 5.657 17.781 17.78A23.083 23.083 0 0 0 27.457 46H2v8h25.457a23.063 23.063 0 0 0 3.88 9.334L13.56 81.112l5.657 5.657 17.782-17.782A23.076 23.076 0 0 0 46 72.793V98h8V72.903a23.069 23.069 0 0 0 9.62-3.921l17.804 17.805 5.657-5.656-17.802-17.805A23.068 23.068 0 0 0 73.153 54H98zM50.305 34.8c8.381 0 15.2 6.819 15.2 15.2s-6.818 15.2-15.2 15.2-15.2-6.819-15.2-15.2 6.819-15.2 15.2-15.2zM242 178v-64h-20v44l-36-36H74L2 194h128l56-56 56 56h16l-16-16zM71.529 153H88.51l-10 10H61.529l10-10zm22.638 0h16.982l-10 10H84.166l10.001-10zm22.638 0h16.982l-10 10h-16.982l10-10zm20.982-4h-16.982l11-11h16.982l-11 11zm-22.639 0H98.167l11-11h16.981l-11 11zm-22.638 0H75.529l11-11h16.981l-11 11zm-34.981 18H74.51l-11 11H46.529l11-11zm22.637 0h16.982l-11 11H69.166l11-11zm22.638 0h16.982l-11 11H91.804l11-11z"/></svg>');
}

/* Read-only pages share the dashboard surfaces and existing WebSocket targets. */
.information-page { container-type: inline-size; }
.information-grid, .information-page .heating-circuit-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.information-page.heating-circuit, .information-page--compact { max-width: 64rem; }
.information-page .card {
  min-width: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.25rem;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 0.75rem;
}
.information-page .table-header { margin: 0 0 0.75rem; font-size: 1.1rem; font-weight: 500; }
.information-page table { margin-bottom: 0; }
.information-page table + table { margin-top: 1rem; }
.information-page td { overflow-wrap: anywhere; }
.information-page td:first-child { width: 59%; }
.information-page .table-value { text-align: right; font-variant-numeric: tabular-nums; }
.information-note { color: var(--ui-muted); font-size: max(12px, 0.8rem); line-height: 1.5; margin: 0.9rem 0 0; overflow-wrap: anywhere; }
.information-runtime { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.information-runtime small { font-size: 0.9rem; color: var(--ui-muted); }
.information-page .is-active { color: var(--ui-accent); }
.information-page .is-error { color: var(--pico-del-color); }
.information-page .is-connected { color: var(--ui-connected); }
.information-unit { margin-left: 0.35rem; white-space: nowrap; }
.information-page [data-info-meter] { display: block; width: 8rem; max-width: 100%; height: 0.3rem; margin: 0.5rem 0 0 auto; --pico-progress-color: var(--ui-target); --pico-progress-background-color: color-mix(in srgb, var(--ui-muted) 35%, var(--ui-surface)); }
.information-page [data-info-meter][hidden] { display: none; }
.tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.information-page .tools form { margin: 0; min-width: 0; }
.information-page .tools label { display: block; margin-bottom: 0.5rem; }
.information-page .tools input[type=file] { width: 100%; min-width: 0; margin: 0; }
.tools-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.tools-actions > button, .tools-actions > input[type=submit] { width: auto; max-width: 100%; margin: 0; white-space: normal; }
.information-page .tools progress { margin: 1rem 0 0; }
.log-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) max-content; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.log-toolbar > div { min-width: 0; }
.log-toolbar [hidden] { display: none; }
.log-toolbar label { display: block; font-size: 0.85rem; color: var(--ui-muted); margin-bottom: 0.4rem; }
.log-toolbar select { width: 100%; margin: 0; }
.log-toolbar .tools-actions { justify-content: end; margin: 0; }
.log-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.log-recording { display: flex; align-items: center; gap: 0.8rem; min-height: 44px; margin: 0; }
.log-recording input { margin: 0; }
.information-page [data-info-state="connection"]::before {
  content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  margin-right: 0.5rem; vertical-align: middle; background: var(--ui-muted);
}
.information-page .is-connected[data-info-state]::before { background: var(--ui-connected); }
.information-page .is-disconnected[data-info-state]::before { background: var(--pico-del-color); }
.information-page [data-info-state="connection"] { color: var(--ui-text); }
#p10_log_output { font: max(12px, 0.85rem)/1.7 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#p10_log_output > div { padding: 0.35rem 0; border-bottom: 1px solid var(--ui-border); }
#p10_log_output .log-warning { color: var(--ui-accent); }
#p10_log_output .log-error { color: var(--pico-del-color); }
#p10_log_output .log-debug { color: var(--ui-muted); }
@container (max-width: 850px) {
  .information-grid, .information-page .heating-circuit-info { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 420px) {
  .information-page .card { padding: 1rem; }
  .tools-actions > button, .tools-actions > input[type=submit] { flex: 1 1 100%; }
}

@container (max-width: 1000px) {
  .log-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-toolbar .tools-actions { grid-column: auto; }
}
@container (max-width: 420px) {
  .log-toolbar { grid-template-columns: minmax(0, 1fr); }
  .log-toolbar .tools-actions { justify-content: start; }
}

/* Keep accessible file labels without repeating the card headings. */
.information-page .tools .tools-file-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* Keep each update source and its action in a separate, labelled area. */
.information-page .tools-firmware { grid-column: 1 / -1; padding: 0; overflow: hidden; }
.information-page .tools > .table-header { padding: 1.25rem; margin: 0; border-bottom: 1px solid var(--ui-border); }
.information-page .tools:not(.tools-firmware) > .table-header {
  margin: -1.25rem -1.25rem 1.25rem;
}
@container (max-width: 420px) {
  .information-page .tools:not(.tools-firmware) > .table-header { margin: -1rem -1rem 1rem; padding: 1rem; }
}
.tools-update-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools-update-method { min-width: 0; padding: 1.25rem; display: flex; flex-direction: column; }
.tools-update-method + .tools-update-method { border-left: 1px solid var(--ui-border); }
.tools-update-method h3 { font-size: 1rem; font-weight: 500; margin: 0 0 0.5rem; }
.tools-method-description { color: var(--ui-muted); font-size: 0.85rem; margin: 0 0 1.25rem; flex-grow: 1; }
.tools-method-title { display: flex; align-items: center; gap: 0.6rem; }
.tools-method-title .svg, .tools-upload-icon { width: 22px; height: 22px; flex: 0 0 22px; color: var(--ui-target); }
.tools-source-box { display: flex; align-items: center; min-height: 5rem; padding: 0.9rem; background: var(--ui-field); border: 1px solid var(--ui-border); border-radius: 0.6rem; }
.tools-version-info { flex-direction: column; align-items: start; justify-content: center; gap: 0.3rem; font-size: 0.85rem; }
.tools-version-info strong { font-weight: 500; }
.tools-version-info span { color: var(--ui-muted); }
@container (max-width: 700px) {
  .tools-update-methods { grid-template-columns: minmax(0, 1fr); }
  .tools-update-method + .tools-update-method { border-left: 0; border-top: 1px solid var(--ui-border); }
}
@container (max-width: 420px) {
  .information-page .tools-firmware { padding: 0; }
  .information-page .tools-firmware > .table-header, .tools-update-method { padding: 1rem; }
}

.memory-detail { display: block; margin-top: 0.25rem; color: var(--ui-muted); font-size: max(12px, 0.8rem); }

.memory-table { table-layout: fixed; }

.information-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.tools-version-info > div { display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; }
.tools-version-info a:visited { color: var(--pico-primary); }
#p00_update_btn_hide { margin: 0; }
#p00_update_btn { width: auto; margin: 0; }
#github_progress_bar { --pico-progress-color: var(--ui-accent); }

/* Translate the file picker in the WebUI instead of using browser-language text. */
.tools-file-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.tools-file-picker > button { width: auto; margin: 0; flex-shrink: 0; }
.tools-file-picker > span { min-width: 0; overflow-wrap: anywhere; color: var(--ui-muted); }

/* Buderus design trial. Keep the palette here until it is shared with Jarolift. */
:root,
[data-theme="light"],
[data-theme="dark"] {
  --ui-background: light-dark(#edf0f3, #141a22);
  --ui-surface: light-dark(#fafbfc, #1c2530);
  --ui-field: light-dark(#ffffff, #17212c);
  --ui-rail: light-dark(#e4eaf0, #273545);
  --ui-hover: light-dark(#d5e0eb, #33485e);
  --ui-selected: light-dark(#e2e8ee, #2b3948);
  --ui-text: light-dark(#293746, #d8e1eb);
  --ui-muted: light-dark(#596b7c, #9eafbf);
  --ui-border: light-dark(#cdd7e0, #334355);
  --ui-accent: light-dark(#9b6a4f, #c9a58b);
  --ui-target: light-dark(#6b8298, #8ea5bb);
  --ui-band: light-dark(#96adc3, #819fbc);
  --ui-connected: light-dark(#2f7d62, #83bd9a);
  --ui-sidebar-width: 200px;
  --ui-footer-height: calc(44px + 1rem + 7px);
  --ui-icon-filter: none;

  --pico-background-color: var(--ui-background);
  --pico-color: var(--ui-text);
  --pico-muted-color: var(--ui-muted);
  --pico-muted-border-color: var(--ui-border);
  --pico-h1-color: var(--ui-text);
  --pico-h2-color: var(--ui-text);
  --pico-h3-color: var(--ui-text);
  --pico-h4-color: var(--ui-text);
  --pico-h5-color: var(--ui-text);
  --pico-h6-color: var(--ui-text);
  --pico-primary: var(--ui-accent);
  --pico-primary-hover: var(--ui-text);
  --pico-primary-background: var(--ui-rail);
  --pico-primary-border: var(--ui-border);
  --pico-primary-inverse: var(--ui-text);
  --pico-primary-hover-background: var(--ui-hover);
  --pico-primary-hover-border: var(--ui-target);
  --pico-primary-focus: color-mix(in srgb, var(--ui-target) 30%, transparent);
  --pico-secondary: var(--ui-muted);
  --pico-secondary-background: var(--ui-rail);
  --pico-secondary-border: var(--ui-border);
  --pico-secondary-inverse: var(--ui-text);
  --pico-secondary-hover-background: var(--ui-hover);
  --pico-card-background-color: var(--ui-surface);
  --pico-card-sectioning-background-color: var(--ui-rail);
  --pico-card-box-shadow: none;
  --pico-form-element-background-color: var(--ui-field);
  --pico-form-element-border-color: var(--ui-border);
  --pico-form-element-color: var(--ui-text);
  --pico-form-element-placeholder-color: var(--ui-muted);
  --pico-form-element-active-background-color: var(--ui-field);
  --pico-form-element-active-border-color: var(--ui-target);
  --pico-form-element-focus-color: var(--pico-primary-focus);
  --pico-form-element-spacing-vertical: 0.65rem;
  --pico-form-element-spacing-horizontal: 0.8rem;
  --pico-dropdown-background-color: var(--ui-surface);
  --pico-dropdown-border-color: var(--ui-border);
  --pico-dropdown-color: var(--ui-text);
  --pico-dropdown-hover-background-color: var(--ui-hover);
  --pico-table-border-color: var(--ui-border);
  --pico-table-row-stripped-background-color: transparent;
  --pico-switch-background-color: var(--ui-rail);
  --pico-switch-checked-background-color: var(--ui-target);
  --pico-range-border-color: var(--ui-rail);
  --pico-range-active-border-color: var(--ui-target);
  --pico-border-radius: 0.65rem;
}

[data-theme="light"] { --ui-icon-filter: brightness(0.35); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --ui-icon-filter: brightness(0.35); }
}

/* Shared surfaces and forms; Pico still owns control behaviour and validation. */
article { border: 1px solid var(--ui-border); }
hr { border-top: 1px solid var(--ui-border); margin-block: 1.25rem; }
details[open] { background: var(--ui-surface); }
.info-box { background: var(--ui-field); border-color: var(--ui-border); }
.info-box, .info-icon, .info-text { color: var(--ui-text); }
.button-like:checked + .button-like-label { color: var(--ui-text); background: var(--ui-selected); }
.svg { filter: var(--ui-icon-filter); }

/* Keep the existing desktop sidebar and mobile top-menu breakpoints. */
.sidebar { width: var(--ui-sidebar-width); background: var(--ui-background); color: var(--ui-text); border-right: 1px solid var(--ui-border); }
.sidebar li a { background: transparent; color: var(--ui-muted); padding: 0.65rem 0.8rem; min-height: 44px; border-radius: 8px; }
.sidebar li a:hover { background: var(--ui-rail); color: var(--ui-text); }
.sidebar li a.active { background: var(--ui-selected); color: var(--ui-text); }
.sidebar li a:hover .links_name, .sidebar li a.active .links_name { filter: none; }
.sidebar-status i { min-width: 0; flex-shrink: 0; }
.topMenu { background: var(--ui-surface); border-bottom: 1px solid var(--ui-border); color: var(--ui-text); }

/* Desktop app bar; on mobile the existing top menu provides the compact header. */
.app-header {
  position: fixed;
  inset: 0 0 auto;
  height: 56px;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 1.25rem;
  background: var(--ui-background);
  border-bottom: 1px solid var(--ui-border);
}
.app-header .app-brand, .topMenu .app-brand { font-size: max(14px, 0.95rem); font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ui-muted); }
.app-modes { display: flex; align-items: center; gap: 0.5rem; }
.app-modes .simModeBar, .app-modes .setupModeBar {
  align-items: center;
  margin: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--ui-accent) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ui-accent) 14%, var(--ui-surface));
  color: var(--ui-accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.app-modes .setupModeBar { color: var(--ui-target); border-color: color-mix(in srgb, var(--ui-target) 35%, transparent); background: color-mix(in srgb, var(--ui-target) 14%, var(--ui-surface)); }
.app-header > .app-brand { grid-column: 1; grid-row: 1; }
.app-header > .app-modes { grid-column: 2; grid-row: 1; }
.app-header > .app-connection-actions { grid-column: 3; grid-row: 1; justify-self: end; }
.app-header .app-connection { justify-self: end; }
.app-connection { color: var(--ui-muted); font-size: 0.85rem; white-space: nowrap; }
.app-connection::before { content: ""; display: inline-block; width: 0.65em; height: 0.65em; border-radius: 50%; background: var(--pico-del-color); margin-right: 0.5em; }
.app-connection.is-connected::before { background: var(--ui-connected); }
.sidebar { top: 56px; height: calc(100% - 56px); }
.home-section { position: fixed; top: 71px; bottom: var(--pico-spacing); margin-bottom: 0; left: var(--ui-sidebar-width); width: calc(100% - var(--ui-sidebar-width)); overflow-y: auto; }
.page-heading { margin-bottom: 1.5rem; }
.footerBar {
  height: var(--ui-footer-height);
  box-sizing: border-box;
  left: var(--ui-sidebar-width);
  bottom: 0;
  margin: 0;
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.5s ease-in-out, display 0.5s allow-discrete;
}
.footerBar[style*="display: none"] { transform: translateY(100%); }
@starting-style {
  .footerBar { transform: translateY(100%); }
}
.page-heading h1 { margin: 0; font-size: 1.8rem; font-weight: 500; letter-spacing: -0.025em; }
.page-heading p { margin: 0.3rem 0 0; color: var(--ui-muted); font-size: 0.95rem; }
@media (max-width: 768px) {
  .footerBar { left: 0; }
  .app-header { display: none; }
  .topMenu { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0.5rem; padding: 3px 1rem; }
  .topMenu > ul { min-width: 0; margin: 0; padding: 0; }
  .topMenu > ul:first-child, .topMenu > ul:last-child { margin: 0; }
  .topMenu > ul > li { padding: 0; }
  .topMenu details.dropdown { display: block; position: relative; width: 44px; margin: 0; padding: 0; background: transparent; }
  #topMenuDropdown { display: block; position: relative; width: 44px; height: 44px; margin: 0; padding: 10px; line-height: 0; list-style: none; }
  #topMenuDropdown::before, #topMenuDropdown::after { display: none; content: none; }
  #topMenuDropdown::-webkit-details-marker { display: none; }
  #topMenuDropdown > i { display: block; width: 22px; height: 22px; }
  .topMenu details.dropdown > .nav-list {
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    width: max-content;
    min-width: min(15rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    max-height: calc(100svh - 100px - env(safe-area-inset-bottom, 0px));
    padding-block: 0.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: left;
  }
  .topMenu details.dropdown > .nav-list > li { padding: 0; margin: 0; }
  .topMenu details.dropdown > .nav-list a { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0.4rem 0.9rem; font-size: max(16px, 1.05rem); line-height: 1.4; }
  .topMenu > ul:first-child, .topMenu > ul:first-child > li { width: 100%; }
  .topMenu > ul:last-child { justify-self: end; }
  .topMenu .app-brand { font-size: max(12px, 0.85rem); letter-spacing: 0.08em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-section { top: 70px; left: 10px; width: calc(100% - 20px); }
}

/* Quiet tables, including the existing striped system-information tables. */
table.striped tbody tr:nth-child(odd) td,
table.striped tbody tr:nth-child(odd) th,
table td, table th { background: transparent; }
table td, table th { padding: 0.85rem 0.4rem; border-color: var(--ui-border); font-size: max(12px, 0.85rem); }
table td:first-child { color: var(--ui-muted); }
table tr:last-child td, table tr:last-child th { border-bottom: 0; }
.table-header { font-weight: 500; text-align: left; }

/* Grouped dashboard status: the existing OPT_* visibility controls the grid. */
.dashboard-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  max-width: calc(3 * 512px + 2rem);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.dashboard-status > .dash {
  display: block;
  position: relative;
  min-width: 0;
  max-width: none;
  min-height: 6rem;
  margin: 0;
  padding: 1rem;
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  background: transparent;
}
.dashboard-status .dash-main { padding: 0; }
.dashboard-status .dash-header { text-align: left; color: var(--ui-muted); font-size: max(11px, 0.8rem); font-weight: 400; padding-right: 1.5rem; margin-bottom: 0.65rem; }
.dashboard-status .dash-content { display: block; text-align: left; margin: 0; }
.dashboard-status .dash-content .value { margin: 0; font-size: 1.6rem; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dashboard-status .dash-footer { display: block; margin: 0.4rem 0 0; text-align: left; color: var(--ui-muted); font-size: max(11px, 0.75rem); }
.dashboard-status .dash-icon { position: absolute; top: 0.9rem; right: 0.9rem; width: 18px; min-width: 0; height: 18px; background: transparent; opacity: 0.65; }
.dashboard-status .dash-icon i { width: 100%; height: 100%; background-size: contain; }
.dashboard-status > .is-active .dash-content .value { color: var(--ui-accent); }
#ota_progress_bar { --pico-progress-color: var(--ui-accent); accent-color: var(--ui-accent); }
.dashboard-trends { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); max-width: calc(3 * 512px + 2rem); gap: 1rem; align-items: start; }
.dashboard-trends > .dash { width: 100%; min-width: 0; max-width: none; border-radius: 0.75rem; }

/* Existing settings sections remain simple details/summary elements. */
.settings-panel > details { padding: 0; margin-bottom: 0.75rem; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 0.65rem; }
.settings-panel > details > summary { margin: 0; padding: 1rem 1.15rem; font-size: 1rem; font-weight: 500; }
.settings-panel > details[open] { padding: 0 1.15rem 1.15rem; }
.settings-panel > details[open] > summary { margin: 0 -1.15rem 1rem; border-bottom: 1px solid var(--ui-border); }
.settings-panel > hr { display: none; }
/* Field widths: compact GPIOs, medium numeric values, wide text inputs. */
.settings-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1rem;
  max-width: 42rem;
  margin-bottom: 1.5rem;
}
.settings-field { min-width: 0; }
.settings-fields .settings-field { display: flex; flex-direction: column; align-items: flex-start; }
.settings-field > label, .settings-field > .leftright {
  width: 100%;
  margin-bottom: 0.5rem;
}
.settings-fields .settings-field > label, .settings-fields .settings-field > .leftright {
  min-height: 1.5em;
  line-height: 1.5;
}
.settings-field > .leftright { justify-content: flex-start; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
.settings-field > .leftright > label { margin: 0; }
.settings-field > .leftright > button { width: 1.25rem; height: 1.25rem; min-width: 1.25rem; padding: 0; margin: 0; border: 0; background-color: transparent; background-size: contain; }
.settings-field > input { max-width: 100%; }
.settings-fields .settings-field > input { margin-top: auto; margin-bottom: 0; }
.settings-field--compact > input { width: 7rem; }
.settings-field--medium > input { width: 12rem; }
.settings-field--wide { grid-column: 1 / -1; }
.settings-field--wide > input { width: 100%; }
.settings-category-list button[aria-pressed="true"] { background: var(--ui-selected); color: var(--ui-text); }
.settings-category-list button:hover { background: var(--ui-rail); color: var(--ui-text); }

/* Connection status and manual reload share one desktop/mobile header. */
.app-connection-actions { display: flex; align-items: center; gap: 0.5rem; justify-self: end; min-width: 0; max-width: 100%; }
.app-connection-actions .app-connection { white-space: normal; line-height: 1.35; }
.app-connection-actions .app-reload { width: 2rem; height: 2rem; flex: 0 0 2rem; padding: 0; margin: 0; background-size: 1.1rem; }
.app-reload[hidden] { display: none; }
[data-connection-required][inert] { opacity: 0.55; }
@media (max-width: 768px) {
  .topMenu:has(> .app-connection-actions) { height: auto; grid-template-rows: 44px auto; padding-bottom: 0.5rem; }
  .topMenu > .app-connection-actions { grid-column: 1 / -1; }
}

/* Quiet navigation footer; signal classes continue to come from the ESP. */
.sidebar-status { display: flex; align-items: center; gap: 0; box-sizing: border-box; height: calc(var(--ui-footer-height) - 6px); flex-shrink: 0; margin-top: auto; padding: 0.5rem 0; border-top: 1px solid var(--ui-border); }
.sidebar-status #p00_version { display: inline-flex; align-items: center; width: auto; min-height: 44px; margin: 0 auto 0 0; padding: 0 0.45rem; border: 0; border-radius: 0.4rem; background: transparent; box-shadow: none; color: var(--ui-muted); font: inherit; font-size: max(12px, 0.8rem); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.sidebar-status #p00_version:hover { color: var(--ui-text); background: var(--ui-surface); }
.sidebar-status #p00_version:focus-visible, .sidebar-status .sidebar-logout:focus-visible { outline: 2px solid var(--ui-target); outline-offset: 1px; }
.sidebar-status #p00_wifi_icon, .sidebar-status #p00_eth_icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 44px; flex: 0 0 28px; margin: 0; background-image: none; filter: none; color: var(--ui-target); }
.sidebar-status svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#p00_wifi_icon .wifi-dot { fill: currentColor; stroke: none; }
#p00_wifi_icon:not([class*="i_wifi_"]), #p00_eth_icon:not([class*="i_eth_"]) { display: none; }
#p00_wifi_icon.i_wifi_nok, #p00_eth_icon.i_eth_nok { color: var(--ui-muted); opacity: 0.45; }
#p00_wifi_icon.i_wifi_1 path, #p00_wifi_icon.i_wifi_2 .wifi-outer, #p00_wifi_icon.i_wifi_2 .wifi-middle, #p00_wifi_icon.i_wifi_3 .wifi-outer { color: var(--ui-muted); opacity: 0.25; }
.sidebar-status .sidebar-logout, .sidebar-status .sidebar-logout:visited { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0 0 0 4px; margin-left: 4px; border-left: 1px solid var(--ui-border); color: var(--ui-muted); text-decoration: none; }
.sidebar-status .sidebar-logout:hover { color: var(--ui-text); background: var(--ui-surface); }

