@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #eef7ff;
  background: #16374f;
  font-synthesis: none;
  --muted: #b3c9da;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 95% 0%, #396488 0%, transparent 48%), linear-gradient(140deg, #173c52, #224d69 45%, #273c59);
  background-attachment: fixed;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #f6dca7;
  outline-offset: 4px;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: .3;
}

.ambient-one {
  width: 500px;
  height: 500px;
  top: 15%;
  left: -180px;
  background: #65a6b8;
}

.ambient-two {
  width: 450px;
  height: 450px;
  right: -160px;
  bottom: 0;
  background: #7588b6;
}

.app {
  position: relative;
  max-width: 1440px;
  margin: auto;
  padding: 0 50px;
}

header {
  display: flex;
  align-items: center;
  gap: 60px;
  height: 105px;
  border-bottom: 1px solid #ffffff16;
}

.brand {
  display: flex;
  align-items: center;
  font-family: 'Manrope', sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.8px;
  text-decoration: none;
  white-space: nowrap;
}

.brand > span:first-child {
  font-size: 34px;
  margin-right: 10px;
  color: #c1e5fc;
}

.domain {
  color: #a9c9e0;
  font-weight: 400;
}

nav {
  display: flex;
  gap: 30px;
  align-self: stretch;
}

nav a {
  display: grid;
  align-items: center;
  text-decoration: none;
  font-size: 14px;
  color: #b3c8db;
  border-bottom: 2px solid transparent;
}

nav a.active {
  color: white;
  border-color: #b3dfff;
}

.header-label {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #91b4ce;
}

.heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin: 37px 0 26px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #b9d0e3;
  text-transform: uppercase;
  margin: 0 0 11px;
}

h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  letter-spacing: -.7px;
  font-size: 29px;
  margin: 0;
}

.glass {
  background: linear-gradient(125deg, #ffffff17, #ffffff09);
  border: 1px solid #ffffff26;
  box-shadow: 0 12px 35px #081b2a12, inset 0 1px 0 #ffffff09;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 22px;
}

.search-container {
  width: 360px;
  position: relative;
  z-index: 3;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 17px;
  border-radius: 14px;
}

.search-form > span {
  font-size: 25px;
  color: #bfd7eb;
}

.search-form input {
  width: 100%;
  min-width: 0;
  background: transparent;
  color: white;
  border: 0;
  font-size: 13px;
  padding: 10px 0;
}

.search-form input::placeholder {
  color: #b1c7da;
}

.search-form button {
  border: 1px solid #ffffff25;
  background: #ffffff15;
  color: white;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12px;
}

.search-results:not(:empty) {
  position: absolute;
  top: calc(100% + 8px);
  width: 100%;
  background: #23445f;
  border: 1px solid #6c91af;
  border-radius: 12px;
  box-shadow: 0 15px 30px #09192555;
  padding: 10px;
  font-size: 13px;
}

.result {
  display: block;
  width: 100%;
  color: #edf6ff;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
}

.result:hover {
  background: #ffffff17;
}

.location-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.city-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.city-tabs button {
  border: 1px solid transparent;
  background: none;
  color: #b6cdde;
  padding: 9px 15px;
  font-size: 12px;
  border-radius: 22px;
}

.city-tabs button[aria-pressed="true"] {
  background: #ffffff17;
  border-color: #ffffff28;
  color: white;
}

.refresh {
  background: none;
  border: 0;
  color: #b5cfe2;
  font-size: 12px;
  padding: 8px 0;
}

.status {
  color: #9ebed4;
  font-size: 11px;
  min-height: 17px;
  margin: 14px 0 20px;
}

.status.error {
  color: #ffdcaf;
}

.top-grid {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 22px;
}

.current-card, .hourly-card, .week-card, .sun-card {
  padding: 27px;
}

.current-card {
  background: radial-gradient(ellipse at top right, #c3e3ff25, transparent 65%), linear-gradient(135deg, #ffffff23, #ffffff08);
}

.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 17px;
}

h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.pill {
  font-size: 9px;
  letter-spacing: 1px;
  border: 1px solid #ffffff25;
  padding: 5px 9px;
  border-radius: 20px;
  white-space: nowrap;
  color: #c7e1f3;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.current-card > .muted {
  margin: 7px 0;
}

.current-weather {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 205px;
  gap: 10px;
}

.temperature {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 82px;
  letter-spacing: -5px;
  line-height: 1.15;
}

.current-weather h2 {
  font-size: 17px;
  margin-top: 8px;
}

.current-weather p {
  color: #bcd5e7;
  font-size: 12px;
  margin: 7px 0;
}

.hero-icon {
  font-size: 92px;
  filter: drop-shadow(0 12px 18px #091e3150);
}

.current-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #ffffff20;
  font-size: 10px;
  color: #b6d0e4;
}

.hourly {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  margin-top: 32px;
  gap: 7px;
}

.hour-item {
  text-align: center;
  border-radius: 14px;
  padding: 12px 3px;
}

.hour-item:first-child {
  background: #ffffff13;
  border: 1px solid #ffffff20;
}

.hour-item time {
  font-size: 11px;
  color: #c3d7e7;
}

.hour-item .icon {
  display: block;
  font-size: 29px;
  margin: 13px 0;
}

.hour-item strong {
  display: block;
  font-size: 18px;
  font-weight: 500;
}

.hour-item small {
  display: block;
  font-size: 10px;
  color: #9fd0ed;
  margin-top: 10px;
}

.chart-wrapper {
  margin-top: 9px;
  height: 55px;
}

#temperature-chart {
  width: 100%;
  height: 100%;
}

.hourly-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
  font-size: 9px;
  color: #adc7dc;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 22px 0;
}

.metric {
  padding: 23px 25px;
}

.metric-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.3px;
  color: #b7d0e3;
}

.metric-label > span {
  font-size: 21px;
  line-height: 1;
  color: #d0e9f9;
}

.metric strong {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 29px;
  font-weight: 400;
  margin: 18px 0 9px;
}

.metric p {
  font-size: 11px;
  margin: 0;
  color: #b0c9de;
}

.meter {
  margin-top: 17px;
  height: 4px;
  background: #ffffff13;
  border-radius: 3px;
}

.meter > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #6495b8, #c2e8ff);
  border-radius: inherit;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 22px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 10px;
  font-weight: 400;
  color: #acc6da;
  padding: 10px 8px 16px;
}

td {
  font-size: 12px;
  color: #dcecf7;
  padding: 14px 8px;
  border-top: 1px solid #ffffff0f;
}

td:first-child {
  font-weight: 500;
}

td .icon {
  font-size: 23px;
  margin-right: 9px;
  vertical-align: middle;
}

td:nth-child(4) {
  color: #9fd8f7;
}

.table-note {
  font-size: 10px;
  color: #a7c2d7;
  margin: 20px 8px 0;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sun-track {
  width: 70%;
  height: 75px;
  margin: 34px auto 0;
  border: 1px dashed #e4d0a36b;
  border-bottom: 0;
  border-radius: 150px 150px 0 0;
  text-align: center;
}

.sun-track span {
  display: inline-block;
  color: #f1d39d;
  font-size: 32px;
  transform: translateY(-20px);
  text-shadow: 0 0 25px #f9dc8470;
}

.sun-times {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ffffff15;
  padding-top: 15px;
}

.sun-times span {
  color: #bbd0e1;
  font-size: 11px;
  display: block;
}

.sun-times strong {
  display: block;
  font-size: 21px;
  font-weight: 400;
  margin-top: 7px;
}

.sun-times > div:last-child {
  text-align: right;
}

.warning-card {
  padding: 23px 26px;
  background: linear-gradient(120deg, #b0c1d31b, #ffffff09);
}

.warning-label {
  color: #e7d3b1;
  font-size: 10px;
  letter-spacing: 1px;
}

.warning-card h2 {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.4;
}

.warning-card p {
  font-size: 12px;
  color: #c0d1e1;
  line-height: 1.8;
}

.warning-card a {
  display: inline-block;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid #ffffff2d;
  background: #ffffff0a;
  font-size: 12px;
  text-decoration: none;
}

.warning-card small {
  display: block;
  font-size: 10px;
  color: #adc2d6;
  margin-top: 12px;
  line-height: 1.6;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
  font-size: 10px;
  color: #a4bed3;
}

footer a {
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 1150px) {
  .app {
    padding: 0 28px;
  }
  header {
    gap: 35px;
  }
  .header-label {
    display: none;
  }
  .top-grid {
    grid-template-columns: 1fr 1.5fr;
    gap: 18px;
  }
  .hero-icon {
    font-size: 65px;
  }
  .temperature {
    font-size: 70px;
  }
  .current-card, .hourly-card, .week-card, .sun-card {
    padding: 22px;
  }
  .current-bottom {
    flex-direction: column;
    gap: 7px;
  }
  .hour-item .icon {
    font-size: 24px;
  }
  h1 {
    font-size: 25px;
  }
  .search-container {
    width: 320px;
  }
  .metric {
    padding: 22px;
  }
  .bottom-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

@media (max-width: 900px) {
  .heading-row {
    flex-direction: column;
    align-items: stretch;
  }
  .search-container {
    width: 100%;
  }
  .top-grid, .bottom-grid {
    grid-template-columns: 1fr;
  }
  .current-weather {
    min-height: 180px;
  }
  .hero-icon {
    font-size: 100px;
  }
  .current-bottom {
    flex-direction: row;
  }
  .hourly-card {
    min-height: 310px;
  }
  .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 18px 15px;
  }
  .metric strong {
    font-size: 25px;
  }
  footer > span:last-child {
    display: none;
  }
  header {
    justify-content: space-between;
  }
  nav {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 0 17px;
  }
  header {
    height: auto;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 18px;
  }
  .brand {
    font-size: 23px;
  }
  nav {
    width: 100%;
    gap: 27px;
    height: 50px;
  }
  nav a {
    font-size: 13px;
  }
  .heading-row {
    margin: 27px 0 19px;
    gap: 20px;
  }
  h1 {
    font-size: 25px;
    line-height: 1.4;
  }
  .eyebrow {
    font-size: 10px;
    line-height: 1.6;
  }
  .location-row {
    align-items: flex-start;
  }
  .city-tabs {
    gap: 2px;
  }
  .city-tabs button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .refresh {
    font-size: 0;
    padding: 6px;
  }
  .refresh::first-letter {
    font-size: 23px;
  }
  .status {
    font-size: 10px;
    line-height: 1.7;
  }
  .glass {
    border-radius: 18px;
  }
  .current-card, .hourly-card, .week-card, .sun-card {
    padding: 22px 19px;
  }
  .temperature {
    font-size: 76px;
  }
  .hero-icon {
    font-size: 82px;
  }
  .current-bottom {
    font-size: 9px;
  }
  .hourly {
    grid-template-columns: repeat(8, 63px);
    overflow-x: auto;
    padding-bottom: 9px;
    margin-top: 22px;
  }
  .hourly-footer {
    font-size: 9px;
    line-height: 1.6;
  }
  .hourly-footer > span:last-child {
    max-width: 165px;
    text-align: right;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    margin: 17px 0;
  }
  .metric {
    padding: 20px;
  }
  .metric-label {
    font-size: 9px;
    letter-spacing: .7px;
  }
  .side-stack {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .top-grid, .bottom-grid {
    gap: 17px;
  }
  .table-wrap {
    margin-top: 16px;
  }
  table {
    min-width: 510px;
  }
  .card-heading h2 {
    font-size: 15px;
  }
  footer {
    flex-direction: column;
    gap: 9px;
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.skip {
  position: absolute;
  top: -100px;
  left: 15px;
  z-index: 10;
  padding: 12px 18px;
  background: #e7f5ff;
  color: #17384f;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.top-grid > *,
.bottom-grid > *,
.hourly-card,
.week-card {
  min-width: 0;
}

@media (max-width: 600px) {
  .refresh {
    font-size: 11px;
    white-space: nowrap;
  }

  .location-row {
    flex-wrap: wrap;
  }
}
