/* mswx — simple, consumer-facing. Mobile-first.
   Shares color tokens with the nerds-side style.css but uses larger type,
   more whitespace, sleeker hierarchy. */

:root {
  --bg:        #0b0d12;
  --surface:   #14171f;
  --surface-2: #1c2029;
  --line:      #252a36;
  --text:      #e7e9ee;
  --text-dim:  #9aa1ad;
  --text-mute: #6c7281;
  --accent:    #ff8c42;   /* sun / warm */
  --accent-2:  #ffd43b;   /* highlight */
  --cool:      #4dabf7;   /* cold / valley / rain */
  --water:     #22d3ee;   /* pool */
  --green:     #69db7c;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "tnum" 1;
  line-height: 1.4;
  min-height: 100vh;
}
a { color: var(--cool); text-decoration: none; }
a:active, a:hover { opacity: 0.85; }

/* ---------- Top bar ---------- */
.simple-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
/* "Coming soon" banner — sits above the header on consumer pages. */
.app-banner {
  background: linear-gradient(90deg,
    rgba(245, 158, 11, 0.16) 0%,
    rgba(245, 158, 11, 0.08) 50%,
    rgba(245, 158, 11, 0.16) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.30);
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}
.app-banner strong { color: var(--accent); font-weight: 600; }
.app-banner .icon  { margin-right: 6px; opacity: 0.9; }

.simple-top .brand {
  display: flex; align-items: center; gap: 10px;
}
.simple-top .brand img {
  width: 28px; height: 28px;
}
.simple-top .brand-wordmark {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700; letter-spacing: -0.5px;
  font-size: 20px; color: var(--text);
}
.simple-top .brand-wordmark .brand-wx { color: var(--accent); }
.simple-top .brand-wordmark .brand-tld {
  color: var(--accent); font-weight: 600;
}
/* Legacy text wordmark — kept so older /static/ caches don't break. */
.simple-top .brand-text {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700; letter-spacing: -0.5px; font-size: 18px;
}
.simple-top .brand-text .tail { color: var(--accent); }
.simple-top .links {
  display: flex; gap: 8px; font-size: 13px;
}
.simple-top .links a {
  color: var(--text-dim); padding: 6px 10px; border-radius: 6px;
}
.simple-top .links a:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Page container ---------- */
.simple-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 80px;
  display: flex; flex-direction: column; gap: 18px;
}

/* ---------- Hero current temp ---------- */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px 16px;
  text-align: center;
  position: relative;
}
.hero-grid { display: flex; flex-direction: column; align-items: center; gap: 0; }
.hero .location {
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.hero .temp {
  font-size: clamp(64px, 18vw, 112px);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 2px 0 2px;
  display: inline-block;
}
.hero .now-date {
  color: var(--text-mute); font-size: 12px; margin-top: 4px;
  letter-spacing: 0.4px;
}
.card-fcst-note { color: var(--text-mute); font-size: 12px; font-style: italic;
  padding: 4px 0; }
.hero .temp .degree { color: var(--text-mute); font-weight: 100; }
.hero .cond {
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  text-transform: capitalize;
}
.hero .hilo {
  color: var(--text-dim);
  font-size: 15px;
  margin-top: 4px;
}
.hero .hilo .hi { color: var(--accent); }
.hero .hilo .lo { color: var(--cool); }

.hero .asof {
  position: absolute; top: 14px; right: 16px;
  font-size: 11px; color: var(--text-mute); letter-spacing: 0.4px;
}

/* ---------- Compare bar ---------- */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.compare .label {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.compare .v {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -1px;
}
.compare .delta {
  display: inline-block; font-size: 13px;
  margin-left: 6px; vertical-align: middle;
  color: var(--text-mute);
}
.compare .delta.pos { color: var(--accent); }
.compare .delta.neg { color: var(--cool); }
.compare .sub {
  color: var(--text-mute); font-size: 12px;
  margin-top: 2px;
}
.compare .card.valley { border-left: 3px solid var(--green); }
.compare .card.pool   { border-left: 3px solid var(--water); }
a.card { color: inherit; display: block; position: relative; transition: transform 80ms ease, border-color 80ms ease; }
a.card:hover { border-color: var(--water); transform: translateY(-1px); opacity: 1; }
a.card .card-arrow { position: absolute; top: 14px; right: 14px; color: var(--text-mute);
  font-size: 16px; transition: transform 80ms ease, color 80ms ease; }
a.card:hover .card-arrow { color: var(--water); transform: translateX(2px); }

/* Card-internal forecast rows (Downtown + Pool both use this) — small
   caption-style label above value, stacked so they fit in the narrow
   columns on mobile. Verified at 414/800/1280. */
.card-fcst { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; }
.card-fcst .row { display: flex; flex-direction: column; gap: 1px;
  color: var(--text-mute); line-height: 1.3; }
.card-fcst .row .k { font-size: 10px; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--text-mute); font-weight: 500; }
/* Override .compare .v (28px) — the forecast values are small captions, not hero numbers. */
.compare .card .card-fcst .row .v { color: var(--text-dim); font-size: 13px;
  font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare .card .card-fcst .row .v .hi { color: var(--accent); font-weight: 600;
  font-size: 14px; margin-right: 4px; }
/* Pool card variant: highs are water-colored, not warm-accent. */
.compare .card.pool .card-fcst .row .v .hi { color: var(--water); }

/* ---------- Section title ---------- */
.section-h {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 12px 4px 0;
}

/* ---------- Daily forecast cards ---------- */
.daily {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 14px;
}
.daily .row {
  display: grid;
  grid-template-columns: 60px 1fr auto 36px auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.daily .row:last-child { border-bottom: 0; }
.daily .day { color: var(--text); font-weight: 600; font-size: 14px; }
.daily .cond { color: var(--text-dim); font-size: 14px; }
.daily .pop { color: var(--cool); font-size: 13px; min-width: 36px; text-align: right; }
.daily .pop.zero { color: var(--text-mute); }
.daily .icon { font-size: 18px; text-align: center; }
.daily .hilo { font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.daily .hilo .lo { color: var(--cool); }
.daily .hilo .hi { color: var(--accent); margin-left: 6px; }

/* ---------- Sun + rain card row ---------- */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.facts .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.facts .label {
  color: var(--text-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.facts .row {
  display: flex; justify-content: space-between;
  font-size: 14px; color: var(--text-dim);
}
.facts .row .v { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Timeline section ---------- */
.timeline-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2px;
}
.seg {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px;
}
.seg-btn {
  background: transparent; color: var(--text-dim);
  border: none; border-radius: 6px;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  cursor: pointer; letter-spacing: 0.3px;
  font-family: inherit;
}
.seg-btn.active { background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.seg-btn:not(.active):hover { color: var(--text); }

.hourly-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 10px;
}
.hourly-card canvas { max-height: 240px; }

.chart-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 12px; color: var(--text-dim);
  margin-bottom: 6px;
}
.chart-legend .sw {
  display: inline-block; width: 16px; height: 3px; border-radius: 2px;
  vertical-align: middle; margin-right: 6px;
}
.chart-legend .sw.air  { background: var(--accent); }
.chart-legend .sw.pool { background: var(--water); }
.chart-legend .sw.rain { background: var(--cool); }
.chart-legend .now-pill {
  margin-left: auto; font-size: 11px; color: var(--accent);
  background: rgba(255,140,66,0.10); border: 1px solid rgba(255,140,66,0.30);
  border-radius: 999px; padding: 2px 9px; letter-spacing: 0.4px;
}
.chart-foot { color: var(--text-mute); font-size: 11px; margin-top: 4px; text-align: center; }

/* ---------- Footer ---------- */
.simple-footer {
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
  padding: 30px 18px 60px;
}
.simple-footer a { color: var(--text-mute); }
.simple-footer a:hover { color: var(--text); }
.simple-footer .sep { margin: 0 8px; opacity: 0.5; }

/* ---------- Loading state ---------- */
.skeleton { color: var(--text-mute); }

/* ---------- Desktop scale-up ---------- */
@media (min-width: 720px) {
  .simple-page { padding: 32px 24px 80px; gap: 22px; }
  .hero { padding: 24px 32px 22px; text-align: left; }
  /* 2-column at tablet+: temp left, condition/hi-lo/date right.
     Stops the centered-temp-with-empty-sides whitespace at wide widths. */
  .hero-grid { flex-direction: row; align-items: center; justify-content: space-between;
    gap: 32px; }
  .hero-temp-col { display: flex; flex-direction: column; align-items: flex-start; }
  .hero-meta-col { display: flex; flex-direction: column; align-items: flex-end;
    gap: 4px; min-width: 160px; }
  .hero .cond { font-size: 22px; }
  .hero .hilo { font-size: 17px; }
  .hero .temp { font-size: 96px; margin: 0; }
}
@media (min-width: 980px) {
  .simple-page { max-width: 980px; }
  .hero .temp { font-size: 112px; }
  .hero .cond { font-size: 26px; }
}
