.battery-page {
  padding-top: 54px;
}
.battery-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 45px;
}
.battery-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -0.055em;
}
.battery-hero > div > p:last-child {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}
.back-link {
  flex: none;
  color: #536e56;
  font-size: 13px;
  text-underline-offset: 4px;
}
.battery-summary-container,
.battery-grid-container {
  container-type: inline-size;
}
.battery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(37, 39, 35, 0.14);
  border-bottom: 1px solid rgba(37, 39, 35, 0.14);
  padding: 28px 0;
}
.battery-summary > div {
  min-width: 0;
  padding: 0 28px;
}
.battery-summary > div:first-child {
  padding-left: 0;
}
.battery-summary > div + div {
  border-left: 1px solid rgba(37, 39, 35, 0.1);
}
.summary-label {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.summary-value {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.summary-time {
  font-size: clamp(20px, 2.2vw, 30px);
}
.battery-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(290px, 2fr);
  gap: 42px;
  margin-top: 47px;
}
.history-panel,
.prediction-panel {
  min-width: 0;
}
.prediction-panel {
  border-left: 1px solid rgba(37, 39, 35, 0.14);
  padding-left: 42px;
}
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.panel-heading .eyebrow,
.prediction-panel .eyebrow {
  margin-bottom: 11px;
}
.battery-grid h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.panel-description {
  max-width: 58ch;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-wrap: pretty;
}
.range-buttons {
  display: flex;
  flex: none;
  gap: 3px;
  padding: 3px;
  border-radius: 6px;
  background: #eaece4;
}
.range-buttons button {
  padding: 7px 10px;
  border-radius: 4px;
  background: transparent;
  color: #5c6258;
  font-size: 12px;
}
.range-buttons button[aria-pressed="true"] {
  background: #fffefa;
  color: #252723;
}
.chart-frame {
  position: relative;
  margin-top: 24px;
  min-height: 340px;
  border: 1px solid rgba(37, 39, 35, 0.12);
  border-radius: 9px;
  background: #fffefa;
}
#battery-chart {
  display: block;
  width: 100%;
  height: 340px;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.chart-empty[hidden] {
  display: none;
}
.chart-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.prediction-panel form {
  margin-top: 34px;
}
.prediction-panel label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 11px;
}
.voltage-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voltage-input-row input {
  width: 125px;
  min-width: 0;
  border: 1px solid #c9cdc0;
  border-radius: 6px;
  background: #fffefa;
  padding: 9px 10px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.voltage-input-row span {
  color: var(--muted);
  font-size: 14px;
}
.voltage-input-row button {
  flex: none;
  width: auto;
  margin-left: auto;
  padding: 10px 12px;
  white-space: nowrap;
  font-size: 12px;
}
.prediction-panel #voltage-help {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.estimate-result {
  margin-top: 32px;
  border-top: 1px solid rgba(37, 39, 35, 0.14);
  padding-top: 25px;
}
.estimate-date {
  margin: 0 0 12px;
  font-size: clamp(27px, 3.2vw, 42px);
  font-weight: 500;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
#estimate-detail {
  margin: 0;
  color: #555e4b;
  font-size: 13px;
  line-height: 1.6;
}
.prediction-caveat {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
@container (max-width: 780px) {
  .battery-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .prediction-panel {
    border-left: 0;
    border-top: 1px solid rgba(37, 39, 35, 0.14);
    padding: 34px 0 0;
  }
}
@container (max-width: 620px) {
  .battery-summary {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .battery-summary > div,
  .battery-summary > div:first-child {
    padding: 19px 0;
    border-left: 0;
  }
  .battery-summary > div + div {
    border-left: 0;
    border-top: 1px solid rgba(37, 39, 35, 0.1);
  }
  .summary-value {
    font-size: 31px;
  }
  .summary-time {
    font-size: 24px;
  }
}
@media (max-width: 760px) {
  .battery-page {
    padding-top: 35px;
  }
  .battery-hero {
    display: block;
    margin-bottom: 30px;
  }
  .battery-hero > div > p:last-child {
    font-size: 16px;
  }
  .back-link {
    display: inline-block;
    margin-top: 22px;
    font-size: 16px;
  }
  .battery-grid h2 {
    font-size: 27px;
  }
  .panel-description,
  .chart-note,
  .prediction-panel label,
  .prediction-panel #voltage-help,
  #estimate-detail,
  .prediction-caveat {
    font-size: 16px;
  }
  .summary-label {
    font-size: 16px;
  }
  .range-buttons button,
  .voltage-input-row button {
    font-size: 14px;
  }
}
@media (max-width: 480px) {
  .panel-heading {
    align-items: start;
    flex-direction: column;
  }
  .voltage-input-row {
    flex-wrap: wrap;
  }
  .voltage-input-row button {
    width: 100%;
    margin-left: 0;
  }
}
