/* rc27: shared geometry, quiet loading states and distinct alarm/readout semantics. */
.mobile-brand{font-size:20px;line-height:1;letter-spacing:0;flex:0 0 44px;width:44px;height:44px}
.stepper .step-button{display:inline-flex!important;align-items:center;justify-content:center;line-height:1!important;padding:0!important;font-family:Arial,sans-serif;font-size:28px;flex-shrink:0}
.recognized-model,.recognized-seen{display:block}.recognized-seen{margin-top:6px}.recognized-device{padding:18px 0}
.programmatic-heading:focus,[tabindex="-1"]:focus{outline:none}summary:focus:not(:focus-visible){outline:none}
button:disabled{opacity:.55;cursor:wait}.action-feedback{margin-top:12px!important;font-weight:600;overflow-wrap:anywhere;min-height:1.5em}
[data-discard]{margin:10px 0 0 10px}.control-availability:empty{display:none}
.connection-stages{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;background:none!important;padding:0!important;margin:20px 0}
.connection-stage{border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px;min-width:0}
.connection-stage summary{cursor:pointer;list-style:none;display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px;letter-spacing:0}
.connection-stage summary::-webkit-details-marker{display:none}.connection-stage strong{font-size:14px;display:flex;gap:7px;align-items:center}.connection-stage strong:before{content:'…';font-size:16px}
.connection-stage[data-state=ok] strong{color:#21633a}.connection-stage[data-state=ok] strong:before{content:'✓'}
.connection-stage[data-state=error] strong{color:#ae2330}.connection-stage[data-state=error] strong:before{content:'×'}
.connection-stage[data-state=warning] strong{color:#925400}.connection-stage[data-state=warning] strong:before{content:'!'}
.connection-stage[data-state=waiting] strong{color:#627b90}.connection-stage p{font-size:13px;margin:12px 0 0}
[data-reading-age=stale] .metric-value:not(.gas-percent),[data-reading-age=stale] .metric-note,[data-reading-age=stale] .gas-status,[data-reading-age=stale] .device-setting,[data-reading-age=stale] .device-freshness,[data-reading-age=stale] #live-energy-value{color:#985400!important}
.reading-warning{background:#fff7e8!important;color:#805000!important;border-color:#d99c38!important}
.metric[data-alarm=true],#gas-overview [data-alarm=true]{background:#fff2f3;border-color:#bc2537}
[data-alarm=true] .metric-value:not(.gas-percent),.metric-alarm{color:#ae2030!important}
.metric-alarm p{color:inherit;font-size:14px;margin:10px 0}.metric-alarm button{font-size:14px;max-width:100%;white-space:normal}
[data-unconfirmed=true]{animation:alarm-pulse 2.4s ease-in-out infinite}
@keyframes alarm-pulse{0%,100%{box-shadow:0 0 0 0 rgba(188,37,55,.12)}50%{box-shadow:0 0 0 4px rgba(188,37,55,.55)}}
@media(prefers-reduced-motion:reduce){[data-unconfirmed=true]{animation:none;box-shadow:0 0 0 3px rgba(188,37,55,.35)}}
.setup-platforms{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}
.setup-platforms button[aria-expanded=true]{background:var(--blue);color:#fff}.platform-help{padding:16px;background:#f2f7fb;border-radius:12px;margin-bottom:18px}.platform-help li{margin:10px 0;line-height:1.6}
#push-settings{max-width:1000px}#push-settings details{margin:16px 0}#push-settings [hidden]{display:none!important}
.recovery-details{margin-top:16px}.recovery-settings>p{margin:12px 0}.recovery-settings [data-recovery-active-note]{border-left:3px solid #b96d00;padding-left:12px}
#climate-summary{background:#eaf4ff;padding:16px;border-radius:12px}.setup-checks{list-style:none;padding:0}.setup-checks li{padding:8px 0}
@media(max-width:600px){.connection-stages{gap:6px}.connection-stage{padding:10px 7px}.connection-stage summary,.connection-stage strong{font-size:12px}.connection-stage summary>span{overflow-wrap:anywhere}.setup-platforms{grid-template-columns:repeat(2,minmax(0,1fr))}[data-discard]{margin-left:0;display:block}.heat-confirmation>button{max-width:100%;white-space:normal}.action-feedback{font-size:14px}}
/* rc28: a secondary action must not inherit the blue control-card button style. */
body button[data-discard],body #schedule-form button.draft-discard,body #alarm-form button.draft-discard{background:#fff;color:var(--blue);border:1px solid var(--blue);border-radius:12px;padding:12px 18px;margin:12px 0 0 12px;min-height:48px;max-width:100%;white-space:normal;font-weight:600}
@media(max-width:600px){body button[data-discard],body #schedule-form button.draft-discard,body #alarm-form button.draft-discard{display:block;width:100%;margin:12px 0 0}}
@media(max-width:600px){body #heat-save,body #climate-panel button[type=submit]{display:block;width:100%;max-width:100%;white-space:normal;margin-bottom:0}}

/* rc29: planning controls remain within the card, including iOS native dates. */
#schedule-form .schedule-grid,#schedule-form [data-field]{min-width:0}
#schedule-form input[type=date]{box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;min-inline-size:0}
#schedule-form .planning-help{margin:20px 0}
#schedule-form .planning-help summary{cursor:pointer;font-weight:600}
#schedule-form button.draft-discard:disabled{opacity:.55;cursor:default}
@media(max-width:600px){body #schedule-form>button[type=submit]{display:block;box-sizing:border-box;width:100%;max-width:100%;white-space:normal;margin-bottom:0}body #schedule-form button.draft-discard{box-sizing:border-box}}
