* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: #fff;
  background-color: #0000a8;
  background-image:
    linear-gradient(45deg, #000076 25%, transparent 25%),
    linear-gradient(-45deg, #000076 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #000076 75%),
    linear-gradient(-45deg, transparent 75%, #000076 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  font-family: "Comic Sans MS", "Trebuchet MS", Arial, sans-serif;
  text-align: center;
}

.site-shell {
  width: min(760px, calc(100% - 24px));
  margin: 18px auto 34px;
}

.masthead {
  border: 4px ridge #f4f4f4;
  padding: 15px 10px 12px;
  color: #000;
  background: #fff;
  box-shadow: 7px 7px 0 #000;
}

h1 {
  /* Keep the logo optically centred after the header's second row was removed. */
  margin: -6px 0 4px;
  color: #ff1493;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(52px, 12vw, 92px);
  letter-spacing: 2px;
  line-height: 0.95;
  text-shadow: 3px 3px #000, 6px 6px #7fff00;
}

h1 .logo-word {
  color: #7fff00;
  text-shadow: 3px 3px #000, 6px 6px #ff1493;
}

.logo-letter {
  display: inline-block;
  min-width: 0.5em;
  cursor: default;
  text-align: center;
}

.logo-space {
  display: inline-block;
  width: 0.32em;
}

h1:hover {
  animation: logo-colour-cycle 1.1s steps(6) infinite;
}

.url {
  color: #0000a8;
  font: bold 13px "Courier New", monospace;
  letter-spacing: 2px;
}

.url {
  margin: 7px 0 0;
}

.url:visited {
  color: #0000a8;
}

.player-window {
  margin-top: 14px;
  border: 4px ridge #f4f4f4;
  padding: 4px;
  color: #000;
  background: #fff;
  box-shadow: 7px 7px 0 #000;
}

.player-window h2 {
  margin: 0;
  padding: 6px 8px;
  color: #fff;
  background: #ff1493;
  font: bold 13px Arial, sans-serif;
  letter-spacing: 1px;
}

.player-note {
  margin: 8px 0 5px;
  color: #0000a8;
  font: bold 12px "Courier New", monospace;
  letter-spacing: 1px;
}

.spotify-player {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
}

.playlist-link {
  display: inline-block;
  margin: 7px 0 3px;
  color: #0000a8;
  font: bold 12px "Courier New", monospace;
}

.player-screen {
  min-height: 93px;
  margin: 8px;
  border: 3px inset #d6d6d6;
  padding: 10px 12px;
  color: #7fff00;
  background: #000;
  font-family: "Courier New", monospace;
  text-align: left;
}

.player-screen p {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.player-screen h3 {
  overflow: hidden;
  margin: 5px 0 2px;
  color: #ffff00;
  font-size: clamp(16px, 4vw, 22px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-screen .song-artist {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
}

.player-button {
  display: inline-block;
  border: 3px outset #f4f4f4;
  padding: 8px 11px;
  color: #000;
  background: #ffff00;
  font: 900 13px "Courier New", monospace;
  cursor: pointer;
  text-decoration: none;
}

.player-button:visited,
.player-button:hover,
.player-button:focus {
  color: #000;
  background: #ffff00;
}

.player-button:active {
  border-style: inset;
}

.player-button:disabled {
  cursor: wait;
  color: #666;
  background: #d6d6d6;
}

.spotify-engine {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 300px;
  height: 152px;
  overflow: hidden;
  pointer-events: none;
}

.player-controls a,
.track-count {
  color: #0000a8;
  font: bold 11px "Courier New", monospace;
}

.track-count {
  margin: 8px 8px 0;
}

.weather-window {
  margin-top: 14px;
  border: 4px ridge #f4f4f4;
  padding: 4px;
  color: #000;
  background: #fff;
  box-shadow: 7px 7px 0 #000;
}

.weather-window h2 {
  margin: 0;
  padding: 6px 8px;
  color: #000;
  background: #7fff00;
  font: bold 13px Arial, sans-serif;
  letter-spacing: 1px;
}

.weather-screen {
  margin: 8px;
  border: 3px inset #d6d6d6;
  padding: 10px 12px;
  color: #7fff00;
  background: #000;
  font-family: "Courier New", monospace;
  text-align: left;
}

.weather-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed #7fff00;
  padding-bottom: 8px;
}

.weather-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.weather-location,
.weather-condition,
.weather-updated {
  margin: 0;
  font-weight: 900;
  letter-spacing: 1px;
}

.weather-location {
  color: #fff;
  font-size: 11px;
}

.weather-condition {
  margin-top: 3px;
  color: #ffff00;
  font-size: 13px;
}

.weather-temperature {
  margin: 0;
  color: #ffff00;
  font-size: clamp(28px, 8vw, 43px);
  font-weight: 900;
  line-height: 1;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin: 10px 0;
}

.weather-details div {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px dotted #3f3f3f;
  padding-bottom: 2px;
}

.weather-details dt,
.weather-details dd {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
}

.weather-details dt {
  color: #fff;
}

.weather-details dd {
  color: #7fff00;
  text-align: right;
}

.weather-updated {
  color: #fff;
  font-size: 10px;
}

.weather-refresh {
  display: block;
  margin: 0 auto 5px;
  border: 3px outset #f4f4f4;
  padding: 7px 10px;
  color: #000;
  background: #7fff00;
  font: 900 12px "Courier New", monospace;
  cursor: pointer;
}

.weather-refresh:active {
  border-style: inset;
}

.weather-refresh:disabled {
  cursor: wait;
  color: #666;
  background: #d6d6d6;
}

.under-construction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  border: 3px dashed #000;
  padding: 9px;
  color: #000;
  background: repeating-linear-gradient(
    -45deg,
    #ffff00,
    #ffff00 11px,
    #111 11px,
    #111 22px
  );
  font: 900 12px Arial, sans-serif;
  line-height: 1.02;
  text-shadow: 1px 1px #fff;
}

.under-construction span {
  color: #ff1493;
  font-size: 23px;
  text-shadow: 1px 1px #fff;
}

footer {
  margin-top: 17px;
  font: bold 11px "Courier New", monospace;
}

@keyframes logo-colour-cycle {
  to {
    filter: hue-rotate(360deg);
  }
}

.last-updated {
  margin-top: 12px;
  color: #fff;
  font: bold 10px "Courier New", monospace;
  letter-spacing: 1px;
}

.home-refresh {
  color: inherit;
  text-decoration: none;
}

.home-refresh:visited {
  color: inherit;
}

.home-refresh:hover {
  color: inherit;
}

.about-window {
  margin-top: 14px;
  border: 4px ridge #f4f4f4;
  padding: 4px;
  color: #000;
  background: #fff;
  box-shadow: 7px 7px 0 #000;
}

.about-window h2 {
  margin: 0;
  padding: 6px 8px;
  color: #fff;
  background: #7fff00;
  font: bold 13px Arial, sans-serif;
  letter-spacing: 1px;
}

.about-content {
  padding: 10px;
  font: bold 12px "Courier New", monospace;
  text-align: left;
}

.about-content p {
  margin: 5px 0;
}

@media (max-width: 460px) {
  .weather-summary {
    grid-template-columns: auto 1fr;
  }

  .weather-temperature {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }
}
