:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fafafa;
}

.clock-hero {
  padding: clamp(3rem, 9vw, 5rem) 0;
}

.main-clock {
  font-size: clamp(4.25rem, 20vw, 12rem);
}

.time-layout {
  display: flex;
  flex-direction: column;
}

.reference-times {
  display: flex;
  justify-content: center;
  gap: 1rem;
  color: #737373;
  font-size: 0.85rem;
}

.reference-times span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.reference-times strong {
  color: #525252;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reference-times time {
  color: #262626;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 600;
}

.time-section {
  border-top: 1px solid #e5e5e5;
  padding: 1.75rem 0 0;
}

.time-section.no-divider {
  border-top: 0;
  padding-top: 0;
}

.time-section + .time-section {
  margin-top: 2rem;
}

.timezone-list {
  display: grid;
  grid-template-columns: 1fr;
}

.timezone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
  cursor: pointer;
  outline: none;
  transition: opacity 160ms ease;
}

.timezone-row:hover,
.timezone-row:focus-visible,
.search-result:hover,
.search-result:focus-visible {
  opacity: 0.65;
}

.timezone-row.is-selected,
.search-result.is-selected {
  opacity: 1;
}

.timezone-row span {
  color: #525252;
  font-size: 0.95rem;
  font-weight: 500;
}

.timezone-row strong,
.timezone-row small {
  display: block;
}

.timezone-row strong {
  color: #404040;
  font-size: 0.95rem;
  font-weight: 600;
}

.timezone-row small {
  margin-top: 0.2rem;
  color: #737373;
  font-size: 0.8rem;
}

.timezone-row time {
  color: #171717;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.25rem;
  font-weight: 600;
}

.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.95rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  outline: none;
  transition: opacity 160ms ease;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #ffffff;
  padding: 0 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: #a3a3a3;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.search-box span {
  color: #a3a3a3;
  font-size: 1.05rem;
  line-height: 1;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #171717;
  font: inherit;
  font-size: 0.95rem;
}

.search-box input::placeholder {
  color: #a3a3a3;
}

.search-state {
  color: #737373;
  font-size: 0.9rem;
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.quick-search {
  min-height: 2rem;
  border-radius: 999px;
  background: #eeeeee;
  padding: 0 0.8rem;
  color: #525252;
  font-size: 0.86rem;
  font-weight: 600;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.quick-search:hover,
.quick-search:focus-visible {
  background: #e0e0e0;
  color: #171717;
  outline: none;
}

@media (min-width: 640px) {
  .search-box {
    max-width: 100%;
  }
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result strong {
  color: #262626;
  font-size: 0.95rem;
  font-weight: 600;
}

.search-result small {
  margin-top: 0.2rem;
  color: #737373;
  font-size: 0.82rem;
}

.search-result time {
  color: #171717;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .timezone-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
  }

  .timezone-row {
    border-bottom: 0;
    border-left: 1px solid #e5e5e5;
    padding: 1rem 1.25rem;
  }

  .timezone-row:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (min-width: 1024px) {
  .timezone-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 0;
  }

  .timezone-row:nth-child(odd) {
    border-left: 1px solid #e5e5e5;
    padding-left: 1.25rem;
  }

  .timezone-row:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .timezone-row:last-child {
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .timezone-row,
  .search-result {
    min-height: 4rem;
  }

  .timezone-row time,
  .search-result time {
    font-size: 1.05rem;
  }

  .search-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

}
