:root { color-scheme: light dark; }
body { margin: 0; font: 17px/1.5 system-ui, sans-serif; }
main { max-width: 34rem; margin: 0 auto; padding: 1.25rem; }
h1 { font-size: 1.5rem; line-height: 1.25; }
h2 { font-size: 1.2rem; margin-top: 2rem; }
button, .button {
  display: inline-block; font: inherit; padding: 0.75rem 1.1rem;
  border: 1px solid; border-radius: 0.6rem; background: none;
  color: inherit; text-decoration: none; cursor: pointer;
}
button:disabled { opacity: 0.5; }
form > button[type="submit"] { width: 100%; margin-top: 0.5rem; }
label { display: block; }
input, select, textarea { font: inherit; padding: 0.6rem; width: 100%; box-sizing: border-box; }
fieldset { border: 1px solid; border-radius: 0.6rem; margin: 1rem 0; padding: 0.5rem 1rem 1rem; }
label.choice { display: flex; gap: 0.6rem; align-items: center; padding: 0.4rem 0; }
label.choice input { width: auto; }
table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: 0.4rem 0.5rem 0.4rem 0; vertical-align: middle; }
.ok { color: #0a7d32; }
.warn { color: #a15c00; }
.hint { font-size: 0.9rem; margin: 0.25rem 0; }
.preview, .unit { display: block; max-width: 100%; max-height: 18rem; margin: 0.5rem 0; border-radius: 0.6rem; }
.entry { border-top: 1px solid; padding: 0.75rem 0; }
.qr svg { width: 100%; max-width: 20rem; height: auto; background: #fff; }
.link { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: 0.85rem; }
/* Setup shows a field only some kinds have once one of those kinds is chosen (spec section 8.2).
   A browser without :has shows every field, and the server keeps only the chosen kind's.
   ponytail: one line per kind. A new kind slug needs its own line here. */
form:has(option:checked) .only { display: none; }
form:has(option.k-furnace:checked) .for-furnace,
form:has(option.k-air_conditioner:checked) .for-air_conditioner,
form:has(option.k-heat_pump:checked) .for-heat_pump,
form:has(option.k-water_heater:checked) .for-water_heater,
form:has(option.k-boiler:checked) .for-boiler,
form:has(option.k-other:checked) .for-other { display: block; }
.brand { margin-bottom: 1rem; font-size: 1.2rem; }
.brand img { display: block; max-height: 3.5rem; max-width: 70%; }
.actions { display: grid; gap: 0.6rem; margin: 1rem 0; }
.actions:empty { display: none; }
.actions .button, .actions button { box-sizing: border-box; width: 100%; min-height: 48px; text-align: center; font-weight: 600; }
