@media (prefers-reduced-motion: no-preference) {
  :has(:target) {
    scroll-behavior: smooth;
    scroll-padding-top: 3rem;
  }
}
html {
  box-sizing: border-box;
  color-scheme: light; /* Default dark */
  hanging-punctuation: first last; /* Not supported in Chrome */
}

*, *::before, *::after {
  box-sizing: inherit;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  box-sizing: border-box;
  min-width: 60rem;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  padding: 1rem;
}

body > header {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 16rem;
  max-width: 60rem;
  background-image: url(/img/green-energy-header.svg);
  background-position: left bottom;
  background-size: contain;
  background-repeat: no-repeat;
  margin-bottom: 3rem;
}
body > header h1 {
  color: #666;
  text-align: right;
  margin: 0.5rem 0;
}
body > header h1 strong {
  color: #9fc574;
  display: block;
}
body > header h2 {
  color: #666;
  align-self: start;
  text-align: right;
}
body > header section:last-child {
  display: grid;
  align-items: start;
  justify-content: end;
}
body > header section:last-child .system {
  align-self: end;
}
body > header section:last-child .total-generated {
  text-align: right;
}
body > header section:last-child .total-generated strong {
  font-size: 4rem;
}
body > header section:last-child .total-generated em {
  display: block;
  opacity: 0.6;
}
body > header section:last-child .total-generated [data-unit]:after {
  content: attr(data-unit);
  font-weight: normal;
  font-size: 50%;
  margin-left: 0.5em;
  opacity: 0.6;
}

body > main {
  max-width: 60rem;
}

.system {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1rem 2rem;
}
.system > label {
  display: grid;
  grid-template-columns: 2.4em auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 0 1rem;
}
.system > label:before {
  content: "";
  background-size: contain;
  opacity: 0.5;
  width: 2.4em;
  height: 2.4em;
  display: block;
  grid-row: span 2;
}
.system > label strong {
  font-size: 2em;
}
.system > label em {
  font-size: 76%;
  opacity: 0.6;
}
.system > label [data-unit]:after {
  content: attr(data-unit);
  font-weight: normal;
  font-size: 50%;
  margin-left: 0.5em;
  opacity: 0.6;
}
.system .solar:before {
  background-image: url(/img/solar-panels.svg);
}
.system .battery:before {
  background-image: url(/img/battery-storage.svg);
}

article {
  display: grid;
  gap: 3rem 1rem;
  align-items: start;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr minmax(12rem, 15rem);
  margin-bottom: 6rem;
  page-break-after: always;
}
article > header {
  display: grid;
  grid-column: span 2;
  justify-content: space-between;
  grid-auto-flow: column;
}
article > header .system strong {
  font-size: 1.6rem;
}
article h2,
article h3 {
  grid-column: span 2;
}
article h2 {
  margin: 0;
}
article section {
  position: relative;
  display: grid;
  gap: 1rem;
  grid-template-rows: auto auto;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 1rem;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 1rem 2rem;
}
article section[title]:before {
  position: absolute;
  display: block;
  content: attr(title);
  top: -1.5rem;
  left: 2rem;
}
article section .value {
  font-size: 2rem;
  display: block;
  font-weight: bold;
}
article section > div[title]:before {
  display: block;
  content: attr(title);
  margin-bottom: 0.5rem;
}
article section > div em {
  font-size: 80%;
  opacity: 0.8;
}
article section h4 {
  font-size: 90%;
}
article section.environment {
  background-color: #9fc574;
  grid-template-rows: repeat(4, auto);
  grid-template-columns: 1fr;
  gap: 2rem;
  align-self: stretch;
  grid-row: span 3;
}
article section.environment:after {
  content: "";
  display: block;
  background-image: url(/img/emission-reduction.svg);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  min-height: 8rem;
}
article section.environment > div[title]:before {
  color: white;
}
article section.environment h4 {
  margin: 0;
}
article section.environment .value {
  font-size: 3rem;
  font-weight: bold;
  color: white;
}
article section.environment em {
  font-size: 0.9rem;
  font-weight: bold;
}
article [data-unit]:after {
  content: attr(data-unit);
  font-size: 1rem;
  margin-left: 0.2rem;
  opacity: 0.5;
}
article.lifetime .lifetime {
  background-color: #deeef9;
}
footer {
  margin: 1rem 1rem 0.5rem;
  display: grid;
  grid-auto-flow: column;
  justify-content: space-between;
  font-size: 76%;
  max-width: 60rem;
  color: rgba(0, 0, 0, 0.5);
}
footer section {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
}

.sites-header {
  display: grid;
  grid-auto-flow: column;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 0.2rem solid rgba(0, 0, 0, 0.1);
}
.sites-header h1 {
  margin: 0;
  padding: 0;
}
.sites-header span {
  display: grid;
  grid-auto-flow: column;
  gap: 1rem;
  align-items: center;
  color: rgba(0, 0, 0, 0.5);
}