:root {
  color-scheme: dark;
  --ink: #0d0f10;
  --panel: rgba(20, 23, 23, 0.84);
  --panel-strong: #151818;
  --line: rgba(238, 242, 236, 0.13);
  --text: #f6f4ec;
  --muted: #abb6b0;
  --warm: #e0c584;
  --cool: #9fe3e1;
  --green: #8de5ae;
  --fog: rgba(255, 255, 255, 0.065);
  font-family:
    Inter, "Segoe UI Variable Display", "SF Pro Display", "Helvetica Neue", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(118deg, rgba(224, 197, 132, 0.11), transparent 24%),
    linear-gradient(312deg, rgba(100, 207, 204, 0.12), transparent 29%),
    linear-gradient(135deg, #090b0c 0%, #121414 48%, #080a0a 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent min(8.2vw, 7.25rem),
      rgba(255, 255, 255, 0.028) min(8.2vw, 7.25rem),
      rgba(255, 255, 255, 0.028) calc(min(8.2vw, 7.25rem) + 1px)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 23%);
  content: "";
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.dashboard {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  padding: clamp(1rem, 2.6vw, 2.5rem);
}

.ticker-card,
.clock-card,
.weather-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    0 1.5rem 4rem rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(20px);
}

.ticker-card {
  display: grid;
  min-height: clamp(4.5rem, 9vw, 6.5rem);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  overflow: hidden;
  padding-inline: clamp(1rem, 2.3vw, 2rem);
}

.ticker-label,
.card-header p,
.card-header span,
.weather-condition,
.weather-range span {
  letter-spacing: 0;
  text-transform: uppercase;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-right: 1px solid var(--line);
  padding-right: clamp(1rem, 2vw, 1.75rem);
  color: var(--warm);
  font-size: 0.95rem;
  font-weight: 650;
  white-space: nowrap;
}

.signal-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 1.1rem var(--green);
}

.ticker-window {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 34s linear infinite;
}

.ticker-run {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.75rem);
  padding-right: clamp(1.5rem, 3vw, 3.75rem);
}

.quote {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  white-space: nowrap;
}

.quote strong {
  color: var(--text);
  font-size: 1.06em;
  font-weight: 620;
}

.quote em {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  background: var(--fog);
  color: var(--cool);
  font-size: 0.78em;
  font-style: normal;
}

.quote.positive em {
  color: var(--green);
}

.widget-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.62fr) minmax(18rem, 0.82fr);
  gap: clamp(1rem, 2.4vw, 2.25rem);
}

.clock-card,
.weather-card {
  display: grid;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.clock-card {
  grid-template-rows: auto 1fr;
  min-height: clamp(27rem, 66vh, 52rem);
  overflow: hidden;
  isolation: isolate;
}

.clock-card::after {
  position: absolute;
  inset: auto -14% -45% 24%;
  z-index: -1;
  height: 70%;
  border: 1px solid rgba(159, 227, 225, 0.12);
  border-radius: 50%;
  background:
    linear-gradient(90deg, rgba(159, 227, 225, 0.08), transparent),
    repeating-radial-gradient(
      circle,
      transparent 0,
      transparent 2.4rem,
      rgba(255, 255, 255, 0.045) 2.45rem,
      rgba(255, 255, 255, 0.045) 2.5rem
    );
  content: "";
}

.clock-card,
.clock-layout,
.clock-stage {
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-header p {
  margin: 0;
  color: var(--warm);
  font-size: 0.92rem;
  font-weight: 700;
}

.card-header span {
  max-width: 64%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.clock-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.62fr);
  align-items: center;
  gap: clamp(1rem, 2.3vw, 2.2rem);
}

.clock-stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.75rem, 1.6vw, 1.4rem);
}

.clock-time {
  position: relative;
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: 10.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  letter-spacing: 0;
  line-height: 0.9;
  text-wrap: nowrap;
  text-shadow: 0 0.8rem 3rem rgba(0, 0, 0, 0.38);
}

.world-rail {
  position: relative;
  display: grid;
  min-height: 0;
  align-content: center;
  gap: 0.9rem;
  border-left: 1px solid var(--line);
  padding-left: clamp(1rem, 2vw, 1.8rem);
}

.world-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.world-rail-header p {
  margin: 0;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.world-clock-list {
  display: grid;
  gap: 0.65rem;
}

.world-clock {
  display: grid;
  min-height: 3.35rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.68rem 0.8rem;
  background: var(--fog);
}

.world-clock strong,
.world-clock time {
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.world-clock strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 630;
}

.world-clock span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.world-clock time {
  color: var(--cool);
  font-size: 1.2rem;
  font-weight: 580;
  white-space: nowrap;
}

.world-city-panel {
  position: absolute;
  top: 3.35rem;
  right: 0;
  left: clamp(1rem, 2vw, 1.8rem);
  z-index: 3;
  border: 1px solid rgba(159, 227, 225, 0.24);
  border-radius: 8px;
  padding: 0.9rem;
  background: rgba(12, 15, 15, 0.98);
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.42);
}

.world-city-panel[hidden] {
  display: none;
}

.world-city-panel fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.world-city-panel legend {
  margin-bottom: 0.6rem;
  color: var(--warm);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.world-city-options {
  display: grid;
  max-height: 15rem;
  gap: 0.42rem;
  overflow: auto;
}

.world-city-option {
  display: grid;
  min-height: 2rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.58rem;
  color: var(--text);
  font-size: 0.88rem;
}

.world-city-option input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--cool);
}

.clock-meta {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 1.6vw, 1.35rem);
  color: var(--muted);
}

.clock-meta span:first-child {
  border: 1px solid rgba(224, 197, 132, 0.24);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  color: var(--warm);
  background: rgba(224, 197, 132, 0.08);
  font-size: 0.92rem;
  font-weight: 700;
}

#clock-date {
  font-size: 1.55rem;
  font-weight: 470;
}

.weather-card {
  grid-template-rows: auto 1fr auto;
  min-height: clamp(22rem, 52vh, 42rem);
  gap: clamp(1.2rem, 2.4vw, 2.5rem);
  background:
    linear-gradient(145deg, rgba(159, 227, 225, 0.11), transparent 38%),
    var(--panel-strong);
}

.weather-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.icon-button {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--fog);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
  border-color: rgba(159, 227, 225, 0.38);
  color: var(--cool);
}

.weather-location-panel {
  position: absolute;
  top: clamp(4.5rem, 8vw, 6.2rem);
  right: clamp(1.25rem, 3vw, 3rem);
  left: clamp(1.25rem, 3vw, 3rem);
  z-index: 2;
  display: grid;
  gap: 0.7rem;
  border: 1px solid rgba(159, 227, 225, 0.24);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(12, 15, 15, 0.96);
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.4);
}

.weather-location-panel[hidden] {
  display: none;
}

.weather-location-panel label {
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.location-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.location-search input,
.location-search button,
.location-device {
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.location-search input {
  min-width: 0;
  padding-inline: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.location-search button,
.location-device {
  background: rgba(224, 197, 132, 0.12);
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}

.location-search button {
  padding-inline: 0.95rem;
}

.location-device {
  width: 100%;
  color: var(--cool);
}

.weather-location-panel p {
  min-height: 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.weather-current {
  display: grid;
  align-content: center;
  grid-template-columns: minmax(6.75rem, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.weather-mark {
  position: relative;
  width: min(100%, 13.5rem);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(224, 197, 132, 0.16), rgba(255, 255, 255, 0.03)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04) 0 1px,
      transparent 1px 1.15rem
    );
}

.weather-mark::after {
  position: absolute;
  inset: auto 14% 18%;
  height: 0.24rem;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.sun {
  position: absolute;
  top: 20%;
  right: 19%;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 2.2rem rgba(224, 197, 132, 0.42);
}

.cloud {
  position: absolute;
  right: 17%;
  bottom: 25%;
  width: 62%;
  height: 27%;
  border-radius: 999px;
  background: #edf3f1;
  box-shadow:
    -1.25rem -0.75rem 0 -0.12rem #edf3f1,
    1rem -1.15rem 0 0.18rem #edf3f1;
}

.weather-mark[data-weather="clear"] .cloud {
  opacity: 0;
}

.weather-mark[data-weather="cloudy"] .sun,
.weather-mark[data-weather="fog"] .sun,
.weather-mark[data-weather="rain"] .sun,
.weather-mark[data-weather="snow"] .sun,
.weather-mark[data-weather="storm"] .sun {
  opacity: 0.28;
}

.weather-mark[data-weather="fog"]::after {
  background:
    linear-gradient(
      90deg,
      rgba(159, 227, 225, 0.75) 0 26%,
      transparent 26% 37%,
      rgba(159, 227, 225, 0.75) 37% 100%
    );
  box-shadow: 0 0.62rem 0 rgba(159, 227, 225, 0.36);
}

.weather-mark[data-weather="rain"]::after,
.weather-mark[data-weather="storm"]::after {
  height: 1.35rem;
  background:
    linear-gradient(115deg, transparent 0 17%, var(--cool) 18% 24%, transparent 25% 48%, var(--cool) 49% 55%, transparent 56% 100%);
}

.weather-mark[data-weather="snow"]::after {
  height: 0.82rem;
  background:
    radial-gradient(circle, var(--text) 0 0.16rem, transparent 0.18rem) 0 0 / 1.4rem 0.8rem;
}

.weather-mark[data-weather="storm"] {
  box-shadow: inset 0 0 0 1px rgba(224, 197, 132, 0.18);
}

.weather-condition {
  margin: 0 0 0.55rem;
  color: var(--cool);
  font-size: 0.86rem;
  font-weight: 720;
}

.weather-temp {
  display: block;
  min-width: 0;
  font-size: 6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 540;
  letter-spacing: 0;
  line-height: 0.92;
}

.weather-temp sup {
  color: var(--warm);
  font-size: 0.5em;
  vertical-align: 0.35em;
}

.weather-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.weather-range div {
  display: grid;
  min-height: clamp(6rem, 11vw, 8.6rem);
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(0.9rem, 1.6vw, 1.25rem);
  background: var(--fog);
}

.weather-range span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.weather-range strong {
  color: var(--text);
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 960px) {
  .clock-time {
    font-size: 8rem;
  }

  .weather-temp {
    font-size: 5rem;
  }
}

@media (max-width: 720px), (max-height: 540px) {
  body {
    overflow: auto;
  }

  .dashboard {
    min-height: 100vh;
  }

  .ticker-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-block: 1rem;
  }

  .weather-location-panel {
    position: relative;
    inset: auto;
  }

  .ticker-label {
    border-right: 0;
    padding-right: 0;
  }

  .widget-grid {
    grid-template-columns: 1fr;
  }

  .clock-layout {
    grid-template-columns: 1fr;
  }

  .world-rail {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 1rem;
    padding-left: 0;
  }

  .world-city-panel {
    left: 0;
  }

  .clock-card,
  .weather-card {
    min-height: 20rem;
  }

  .clock-time {
    font-size: 5.8rem;
  }

  #clock-date {
    font-size: 1.2rem;
  }

  .quote {
    font-size: 1rem;
  }

  .weather-temp {
    font-size: 4.75rem;
  }
}

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

  .weather-mark {
    width: min(54vw, 9rem);
  }

  .clock-time {
    font-size: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation-play-state: paused;
  }
}
