:root {
  color-scheme: dark;
  font: 100%/1.5 system-ui, -apple-system, sans-serif;
  background: #10141c;
  color: #f1f4fa;
  --panel: #1d2430;
  --muted: #b8c3d3;
  --line: #354053;
  --yellow: #ffd45f;
  --accent: var(--yellow);
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(100%, 70rem); margin: auto; padding: calc(1.75rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.brand { display: flex; gap: .9rem; align-items: center; }
.brand img { border-radius: 15px; background: #292719; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.25rem, 5vw, 1.8rem); line-height: 1.15; letter-spacing: .035em; }
.brand p { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
h2 { font-size: 1.2rem; margin-bottom: .75rem; }
h3 { font-size: 1rem; line-height: 1.25; }
nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; padding: .25rem; margin: 1.35rem 0; background: #171d27; border: 1px solid var(--line); border-radius: 14px; }
nav a { color: var(--muted); text-align: center; text-decoration: none; padding: .65rem .15rem; border-radius: 10px; font-size: .875rem; font-weight: 650; }
nav a span { margin-right: .18rem; }
nav a[aria-current] { color: var(--yellow); background: #383321; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(.85rem, 2.6vw, 1.25rem); min-width: 0; }
.usage, .view, footer { margin-top: 1.2rem; }
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: 35rem; }
label { display: block; font-size: .875rem; font-weight: 650; margin-bottom: .25rem; }
input, select, button { font: inherit; border-radius: 9px; min-height: 44px; }
input, select { width: 100%; padding: .5rem .6rem; color: inherit; background: #141a24; border: 1px solid #556277; }
button { color: #181510; background: var(--yellow); border: 0; padding: .55rem 1rem; font-weight: 700; cursor: pointer; }
.note, footer { color: var(--muted); font-size: .875rem; }
.panel > .note, form > .note { margin-top: .55rem; }
form button { margin-top: .85rem; }
#save-result:empty { display: none; }
.grid { display: grid; gap: .75rem; }
.gas { --accent: #ffae69; }
.oil { --accent: #86bcff; }
.fan { --accent: #78dfb0; }
.purple { --accent: #cbb3ff; }
.device { border-top: 3px solid var(--accent); }
.device-head { display: flex; gap: .7rem; align-items: center; }
.device-icon { color: var(--accent); background: #141a24; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 10px; font-size: 1.2rem; }
.metric { margin-top: .65rem; font-size: 2rem; font-weight: 750; color: var(--accent); line-height: 1.15; }
.metric small { font-size: 1rem; }
.metric + .note { margin-top: .2rem; }
.autonomy { font-size: .875rem; margin-top: .5rem; }
.costs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; margin: .75rem 0 .25rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.costs dt { color: var(--muted); font-size: .875rem; }
.costs dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.compare-link { display: grid; margin-top: .75rem; text-decoration: none; }
.compare-link span { color: var(--muted); font-size: .875rem; }
.purple h2 { color: var(--accent); }
table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .875rem; margin-top: .75rem; }
td, th { text-align: right; padding: .55rem .15rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th:first-child { text-align: left; width: 37%; }
tbody th { color: var(--accent); }
#compare-context { overflow-wrap: anywhere; }
footer a { display: inline-block; margin-top: .35rem; }
@media (min-width: 53rem) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.equipment-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.equipment-nav a { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-weight: 650; font-size: .875rem; padding: .55rem .65rem; }
.intro { margin-bottom: .9rem; }
#cards { display: grid; gap: .8rem; }
.calculator-controls { margin-top: 1rem; max-width: none; }
.control-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem; }
.control-heading input { width: 4.25rem; }
input[type="range"] { border: 0; padding: 0; accent-color: var(--accent); }
.device h4 { margin: .65rem 0 .4rem; }
.figures { margin: 0 0 .5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.figures > div { background: #141a24; padding: .55rem .7rem; border-radius: 9px; }
.figures dt { font-size: .875rem; color: var(--muted); }
.figures dd { margin: 0; font-size: clamp(1.05rem, 4vw, 1.4rem); font-weight: 750; color: var(--accent); overflow-wrap: anywhere; }
.device details { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.device summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.device tr.selected { background: #141a24; font-weight: 700; }
.device table th:first-child { width: 23%; }
tbody th small { display: block; color: var(--muted); font-weight: 400; }
