:root {
  --energy-reef-deep: #0b6f75;
  --energy-reef: #14919b;
  --energy-reef-light: #62c6c1;
  --energy-sunset-coral: #ef6f61;
  --energy-sunset-gold: #f2a65a;
  --energy-sunset-rose: #d85f7a;
  --energy-track: #eaf3f2;
}

.energy-summary-bars {
  display: grid;
  gap: 11px;
  margin-top: 24px;
}

.energy-summary-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.energy-summary-metrics > div {
  min-width: 0;
  padding: 8px 10px;
  background: #f7faf9;
  border: 1px solid #e4eeec;
  border-radius: 10px;
}

.energy-summary-metrics span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #66706f;
  font-size: 10px;
  white-space: nowrap;
}

.energy-summary-metrics strong {
  display: block;
  margin-top: 3px;
  color: #122526;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.energy-summary-metrics i,
.energy-summary-key i,
.intraday-legend i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.energy-balance-metric.deficit {
  background: linear-gradient(135deg, rgba(242, 166, 90, .1), rgba(216, 95, 122, .1));
  border-color: rgba(216, 95, 122, .22);
}

.energy-balance-metric.surplus {
  background: linear-gradient(135deg, rgba(239, 111, 97, .1), rgba(242, 166, 90, .12));
  border-color: rgba(239, 111, 97, .24);
}

.energy-summary-plot {
  display: grid;
  gap: 5px;
}

.energy-summary-track {
  position: relative;
  height: 17px;
  background: var(--energy-track);
  border-radius: 999px;
}

.energy-summary-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
}

.total-burned-fill {
  display: flex;
  overflow: hidden;
  background: transparent;
}

.resting-segment {
  display: block;
  height: 100%;
  background: var(--energy-reef-light);
}

.active-segment,
.active-fill {
  display: block;
  height: 100%;
  background: var(--energy-sunset-coral);
}

.consumed-fill {
  background: var(--energy-sunset-gold);
}

.energy-balance-gap {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  box-sizing: border-box;
  border-radius: 999px;
}

.energy-balance-gap.deficit-gap {
  background: repeating-linear-gradient(
    135deg,
    rgba(216, 95, 122, .16) 0,
    rgba(216, 95, 122, .16) 5px,
    rgba(242, 166, 90, .3) 5px,
    rgba(242, 166, 90, .3) 10px
  );
  border: 1px dashed rgba(216, 95, 122, .7);
}

.energy-balance-gap.surplus-gap {
  background: repeating-linear-gradient(
    135deg,
    rgba(239, 111, 97, .22) 0,
    rgba(239, 111, 97, .22) 5px,
    rgba(242, 166, 90, .38) 5px,
    rgba(242, 166, 90, .38) 10px
  );
  border: 1px dashed rgba(239, 111, 97, .76);
}

.energy-balance-gap b {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 6px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(11, 111, 117, .14);
  border-radius: 999px;
  box-shadow: 0 1px 5px rgba(20, 66, 68, .12);
  color: #7d4258;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.energy-balance-gap.narrow-gap b {
  left: 100%;
  transform: translate(-100%, -50%);
}

.energy-summary-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  color: #687170;
  font-size: 10px;
}

.energy-summary-key span,
.intraday-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.total-dot {
  background: var(--energy-reef-deep);
}

.resting-dot {
  background: var(--energy-reef-light);
}

.active-dot {
  background: var(--energy-sunset-coral);
}

.consumed-dot {
  background: var(--energy-sunset-gold);
}

.balance-dot {
  background: linear-gradient(90deg, var(--energy-sunset-gold), var(--energy-sunset-rose));
}

.intraday-energy {
  margin-top: 14px;
  padding: 22px 24px 18px;
  min-width: 0;
}

.intraday-energy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.intraday-energy h3 {
  margin: 3px 0 4px;
  font-size: 24px;
  letter-spacing: -.025em;
}

.intraday-energy p {
  max-width: 690px;
  margin: 0;
  color: #707877;
  font-size: 12px;
  line-height: 1.45;
}

.intraday-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 15px;
  color: #53615f;
  font-size: 11px;
}

.intraday-chart {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfdfd, #f7fbfa);
  border: 1px solid #e2edeb;
  border-radius: 14px;
}

.intraday-chart svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
}

.intraday-grid line {
  stroke: #dce9e7;
  stroke-width: 1;
}

.intraday-grid text,
.intraday-x text,
.intraday-y-label {
  fill: #6f7b79;
  font-size: 10px;
  font-weight: 600;
}

.intraday-line {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.total-line {
  stroke: var(--energy-reef-deep);
}

.resting-line {
  stroke: var(--energy-reef-light);
}

.active-line {
  stroke: var(--energy-sunset-coral);
}

.consumed-line {
  stroke: var(--energy-sunset-gold);
}

.intraday-point {
  fill: #fff;
  stroke-width: 2.5;
}

.total-point {
  stroke: var(--energy-reef-deep);
}

.resting-point {
  stroke: var(--energy-reef-light);
}

.active-point {
  stroke: var(--energy-sunset-coral);
}

.consumed-point {
  stroke: var(--energy-sunset-gold);
}

.intraday-empty {
  padding: 44px 20px;
  color: #707877;
  text-align: center;
  background: #f8fbfa;
  border: 1px solid #e2edeb;
  border-radius: 14px;
}

/* The fitness rings are owned by React (ActivityRings in App.tsx) and animated by
   the stroke-dashoffset transition in App.css. Ring rules previously lived here and
   keyed off a JS-set class and JS-set custom properties; with those gone the rules
   resolved to an invalid value and forced the rings to their final size instantly. */

@media (max-width: 700px) {
  .energy-summary-bars {
    gap: 10px;
    margin-top: 20px;
  }

  .energy-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .energy-summary-metrics > div {
    padding: 7px 9px;
  }

  .energy-summary-track {
    height: 15px;
  }

  .energy-balance-gap b {
    font-size: 8px;
  }

  .intraday-energy {
    padding: 18px 12px 14px;
  }

  .intraday-energy-head {
    display: block;
  }

  .intraday-legend {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .intraday-energy h3 {
    font-size: 21px;
  }

  .intraday-chart {
    min-height: 0;
  }

  .intraday-chart svg {
    width: 100%;
    height: auto;
  }

  .intraday-grid text,
  .intraday-x text,
  .intraday-y-label {
    font-size: 9px;
  }
}
