/* self-hosted UI fonts (latin) */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: optional;
  src: url(/fonts/ui/instrument-sans-e190a634.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: optional;
  src: url(/fonts/ui/instrument-sans-e190a634.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* end fonts */
:root {
  --paper: #F3F6F4;
  --white: #FFFFFF;
  --ink: #14231C;
  --muted: #4B5D54;
  --line: #C9D3CD;
  --good: #1F9D55;
  --mid: #E0A100;
  --bad: #C93C3C;
  --focus: #1F6FD1;
  --radius-s: 4px;
  --radius-l: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.result, table, .inputs input { font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--good); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

header.site { border-bottom: 1px solid var(--line); background: var(--white); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
header nav { display: flex; gap: 18px; font-size: 15px; }
header nav a { text-decoration: none; color: var(--muted); }

.intro { padding: 36px 0 20px; max-width: 760px; }
h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 14px; }
.lede { margin: 0; color: var(--muted); font-size: 18px; }
h2 { font-size: 26px; line-height: 1.2; margin: 0 0 10px; }
h3 { font-size: 19px; margin: 26px 0 6px; }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: start; padding-bottom: 40px; }
.inputs { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 6px 22px 18px; }
fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 14px 0 12px; }
fieldset:last-child { border-bottom: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.inputs label { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 4px 12px; margin-top: 10px; font-size: 16px; }
.inputs label .u { grid-column: 1; color: var(--muted); font-size: 14px; margin-top: -4px; order: 2; }
.inputs input {
  grid-column: 2; grid-row: 1 / span 2; width: 100%; font: inherit; font-weight: 700; text-align: right;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink);
}
.inputs input:focus { background: var(--white); border-color: var(--ink); }
.hint { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
details { margin-top: 14px; }
summary { cursor: pointer; font-weight: 700; color: var(--muted); }

.result { position: sticky; top: 16px; background: var(--ink); color: var(--white); border-radius: var(--radius-l); padding: 26px 26px 22px; }
.r-label { margin: 0; font-size: 17px; color: #C4D2CA; }
.r-years { margin: 2px 0 0; font-weight: 700; font-size: clamp(64px, 9vw, 96px); line-height: 1; }
.r-unit { font-size: 0.34em; font-weight: 400; }
.r-range { margin: 8px 0 38px; color: #C4D2CA; font-size: 15px; }
.result[data-tone="good"] .r-years { color: #6FD39B; }
.result[data-tone="mid"] .r-years { color: #F2C445; }
.result[data-tone="bad"] .r-years { color: #F28B82; }

/* energy-label style bar: green → amber → red, with the battery's lifetime marked */
.label { margin: 0 0 16px; }
.track {
  position: relative; height: 28px; border-radius: var(--radius-s);
  background: linear-gradient(90deg, var(--good) 0 40%, var(--mid) 40% 60%, var(--bad) 60% 100%);
}
.life { position: absolute; top: -6px; bottom: -6px; border: 2px dashed var(--white); border-radius: var(--radius-s); }
.life span { position: absolute; top: -24px; left: 0; white-space: nowrap; font-size: 13px; color: #C4D2CA; }
.mark { position: absolute; top: -10px; width: 4px; height: 48px; margin-left: -2px; background: var(--white); border-radius: 2px; transition: left .25s ease; }
.ticks { display: flex; justify-content: space-between; font-size: 13px; color: #C4D2CA; margin-top: 8px; }
.verdict { margin: 0 0 16px; font-size: 17px; }
table.sum { width: 100%; border-collapse: collapse; font-size: 15px; }
table.sum th, table.sum td { padding: 8px 0; border-top: 1px solid #2F443A; text-align: left; vertical-align: top; }
table.sum th { font-weight: 400; color: #C4D2CA; padding-right: 12px; }
table.sum td { font-weight: 700; text-align: right; }

/* capacity table */
.sizes { padding: 36px 0; border-top: 1px solid var(--line); }
.sizes > p { max-width: 720px; color: var(--muted); }
.captable { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.captable th, .captable td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); }
.captable th:first-child, .captable td:first-child { text-align: left; }
.captable thead th { font-size: 14px; color: var(--muted); font-weight: 700; background: var(--paper); }
.captable tbody tr:last-child td { border-bottom: 0; }
.captable tr.best td { background: #E6F4EC; font-weight: 700; }
.captable tr.best td:first-child { box-shadow: inset 4px 0 0 var(--good); }

.offerte { margin: 0 0 8px; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--good); border-radius: var(--radius-l); max-width: 760px; }
.offerte p { margin: 0 0 14px; color: var(--muted); }
.btn { font: inherit; font-weight: 700; padding: 11px 18px; border-radius: var(--radius-s); border: 2px solid var(--ink); background: var(--ink); color: var(--white); cursor: pointer; }
.btn:hover { background: #24382E; }
.btn.ghost { background: transparent; color: var(--ink); }

.how, .faq { padding: 36px 0 10px; border-top: 1px solid var(--line); margin-top: 28px; max-width: 760px; }
.how ol { padding-left: 22px; }
.how li { margin-bottom: 6px; }
.src { padding-left: 20px; }
.src li { margin-bottom: 8px; }
.note { font-size: 15px; color: var(--muted); }
.faq p { margin: 0; }

footer.site { margin-top: 48px; border-top: 1px solid var(--line); background: var(--white); font-size: 15px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 18px; padding: 20px; }

.page { max-width: 720px; padding: 36px 0; }

/* dialog */
.pro-dlg { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 0; max-width: 440px; width: calc(100% - 32px); color: var(--ink); }
.pro-dlg::backdrop { background: rgba(20, 35, 28, .45); }
.pro-dlg-in { padding: 22px; }
.pro-dlg-h { font-weight: 700; font-size: 19px; margin: 0 0 8px; }
.pro-dlg-l { display: block; font-weight: 700; margin-top: 8px; }
.pro-dlg input { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: 4px; }
.pro-dlg-a { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pro-dlg-ok { color: var(--good); font-weight: 700; }

@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .result { position: static; order: -1; }
  .captable { font-size: 14px; }
  .captable th, .captable td { padding: 9px 8px; }
  .captable th:nth-child(3), .captable td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mark { transition: none; } }
