/* ===== google fonts import ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;1,8..60,300;1,8..60,400&family=DM+Mono:wght@300;400&display=swap');

/* ===== basics ===== */

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: #fcfaf7;
  color: #1d2328;
  margin: 0;
}

.title {
  max-width: 1100px;
  margin: 52px auto;
  padding: 0 24px;
}

/* ===== types, headings & paragraphs ===== */

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 2.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  margin-top: 0;
  line-height: 1.1;
  color: #161b1f;
}

.subtitle {
  max-width: 80ch;
  color: #3f4a50;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 14px;
  line-height: 1.65;
  font-style: italic;
  letter-spacing: 0.01em;
}

.viz-wrap {
  margin-top: 32px;
  position: relative;
}

.sun-icon {
  position: absolute;
  top: 0px;
  right: 164px;
  opacity: 0.45;
}

/* ===== legends ===== */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: #6a7880;
  font-size: 13.5px;
  font-family: 'DM Mono', 'Courier Prime', monospace;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.swatch.polar    { background-color: #243341; }
.swatch.midnight { background-color: #d8dccc; }

.ramp {
  width: 72px;
  height: 9px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  background: linear-gradient(to right, #506b82, #cfd9df);
}

/* ===== svg ===== */

#viz {
  display: block;
  width: 100%;
  height: auto;
}

.viz-wrap { color: #526269; }

.date-label {
  font-size: 13px;
  font-family: 'DM Mono', 'Courier Prime', monospace;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.55;
}

.corner-coord {
  font-size: 12.5px;
  font-family: 'DM Mono', 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  opacity: 0.55;
  letter-spacing: 0.03em;
}

.corner-coord .coord-suffix {
  font-size: .7em;
  baseline-shift: 30%;
}

.weekday-letter {
  font-size: 9px;
  font-weight: 400;
  user-select: none;
  pointer-events: none;
}

/* tooltip */
.tooltip {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  background: #1a2228;
  color: #dde3e6;
  padding: 9px 13px;
  border-radius: 5px;
  font-size: 12px;
  font-family: 'DM Mono', 'Courier Prime', monospace;
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.6;
}


.definitions {
  font-size: 16px;
  line-height: 1.75;
  color: #3f4a50;
  max-width: 80ch;
  margin-top: 56px;
  font-weight: 300;
}

.definitions strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-style: normal;
  color: #1d2328;
  font-size: 1em;
}

.fine-note {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #7a8990;
  max-width: 80ch;
  font-family: 'DM Mono', 'Courier Prime', monospace;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.fine-note a {
  color: #3c596b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.today-note {
  font-size: 12.5px;
  font-family: 'DM Mono', 'Courier Prime', monospace;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* ===== mobile styles ===== */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .title {
    margin: 28px 0 24px 0;
    padding: 0 14px;
  }
  h1 {
    font-size: 2rem;
  }
  .subtitle {
    max-width: 100%;
    font-size: 15px;
    padding: 0;
  }
  .viz-wrap {
    margin-top: 16px;
    padding: 0 2px;
  }
  .sun-icon {
    display: none;
  }
  .legend {
    gap: 12px;
    font-size: 12px;
  }
  .legend-item {
    gap: 6px;
  }
  .swatch {
    width: 14px;
    height: 10px;
  }
  .ramp {
    width: 48px;
    height: 8px;
  }
  #viz {
    min-width: 0;
    width: 100vw;
    max-width: 100vw;
  }
  .definitions {
    margin-top: 32px;
    font-size: 14px;
  }
  .fine-note {
    margin-top: 20px;
    font-size: 11px;
  }
}
