:root {
  --ink: #172033;
  --muted: #5a6678;
  --paper: #f7fbff;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(23, 32, 51, 0.14);
  --blue: #0077c8;
  --cyan: #6ed6ff;
  --mint: #4fd5a7;
  --coral: #ff6f61;
  --yellow: #ffd166;
  --violet: #6d5dfc;
  --shadow: 0 18px 60px rgba(23, 32, 51, 0.14);
  --radius: 8px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    linear-gradient(180deg, rgba(110, 214, 255, 0.92) 0%, rgba(247, 251, 255, 0.96) 42%, #ffffff 100%);
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
select {
  font: inherit;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 72px;
  right: 10vw;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff8cc, var(--yellow) 52%, var(--coral));
  box-shadow: 0 18px 80px rgba(255, 111, 97, 0.24);
}

.cloud {
  position: absolute;
  width: 240px;
  height: 74px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 45px rgba(0, 119, 200, 0.12);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 22px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 38px;
  width: 88px;
  height: 88px;
}

.cloud::after {
  right: 44px;
  width: 112px;
  height: 112px;
}

.cloud-one {
  left: 8vw;
  top: 132px;
}

.cloud-two {
  right: 19vw;
  top: 236px;
  transform: scale(0.72);
  opacity: 0.68;
}

.coast {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28vh;
  background:
    linear-gradient(180deg, rgba(79, 213, 167, 0.34), rgba(79, 213, 167, 0) 42%),
    linear-gradient(180deg, rgba(255, 209, 102, 0.5), rgba(255, 255, 255, 0.9));
  border-top: 1px solid rgba(23, 32, 51, 0.08);
}

.topbar,
main,
footer {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--yellow) 48%, var(--mint));
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a,
.source-link,
.download-link {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.nav a {
  padding: 9px 10px;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.source-link:hover {
  border-bottom-color: var(--coral);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.dashboard {
  min-height: calc(100vh - 96px);
  display: grid;
  align-content: center;
  gap: 24px;
  padding-bottom: 32px;
}

.title-block {
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: 5.6rem;
  font-weight: 900;
}

h2 {
  font-size: 1.35rem;
  font-weight: 900;
}

.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.meta-row span,
.chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  padding: 6px 11px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.current-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 14px;
}

.metric-card,
.control-surface,
.script-panel,
.audio-band,
.route-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.metric-card {
  min-height: 178px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1.05;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.label {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.temp-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

#currentTemp {
  font-size: 5.8rem;
  line-height: 0.92;
  font-weight: 900;
}

.degree {
  margin-top: 7px;
  color: var(--coral);
  font-weight: 900;
}

.alert-card.has-alerts {
  border-color: rgba(255, 111, 97, 0.55);
  background: rgba(255, 245, 241, 0.92);
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 22px 0;
}

.control-surface,
.script-panel {
  padding: 18px;
}

.surface-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--blue);
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 900;
}

.icon-button:hover,
.primary-action:hover,
.secondary-action:hover,
.download-link:hover {
  transform: translateY(-1px);
}

.select-label {
  display: block;
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.primary-action,
.secondary-action,
.download-link {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, opacity 160ms ease;
}

.primary-action {
  background: var(--ink);
  color: #ffffff;
}

.secondary-action {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.status-line {
  min-height: 38px;
  margin-top: 14px;
  border-left: 4px solid var(--mint);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.status-line.is-error {
  border-left-color: var(--coral);
  color: #8f2b21;
}

.disclosure {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.script-panel {
  display: grid;
  gap: 14px;
}

.summary {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

pre {
  min-height: 240px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111827;
  color: #f8fbff;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.94rem;
  line-height: 1.65;
}

.audio-band {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(260px, 420px) auto;
  gap: 18px;
  align-items: center;
  margin: 22px 0;
  padding: 18px;
}

.audio-band p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

audio {
  width: 100%;
}

.download-link {
  background: var(--violet);
  color: #ffffff;
  white-space: nowrap;
}

.download-link.disabled {
  pointer-events: none;
  opacity: 0.48;
}

.route-panel {
  display: grid;
  gap: 16px;
  margin: 22px 0;
  padding: 18px;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.route-card {
  min-height: 188px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.route-card h3 {
  margin: 0;
  font-size: 1rem;
}

.route-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 6px;
  background: #111827;
  color: #f8fbff;
  padding: 9px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

.voice-link-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 8px;
}

.voice-link-grid a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.voice-link-grid a:hover {
  border-color: rgba(0, 119, 200, 0.4);
  color: var(--blue);
}

.forecast-section {
  margin-top: 30px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.forecast-card {
  min-height: 242px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  padding: 14px;
}

.forecast-card img {
  width: 54px;
  height: 54px;
}

.forecast-card h3 {
  margin: 0;
  font-size: 1rem;
}

.forecast-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.forecast-temp {
  font-size: 1.8rem;
  font-weight: 900;
}

.hourly-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding: 14px 2px 4px;
}

.hour-card {
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.hour-card time {
  display: block;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.hour-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.45rem;
}

.hour-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  h1 {
    font-size: 4rem;
  }

  .current-grid,
  .studio-grid,
  .audio-band,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voice-link-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 4px;
  }

  .dashboard {
    min-height: auto;
    padding-top: 28px;
  }

  h1 {
    font-size: 3rem;
  }

  .button-row,
  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .voice-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #currentTemp {
    font-size: 4.8rem;
  }

  .sun {
    right: -36px;
    top: 88px;
  }
}
