:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --yes: #2ecc71;
  --no: #e74c3c;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --primary: #3498db;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.card {
  background: var(--card);
  margin: 1rem;
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  text-align: center;
}

h1 {
  margin-top: 0;
  font-size: 1.8rem;
  letter-spacing: 0.2px;
}

.status {
  font-size: 1.45rem;
  font-weight: 900;
  margin: 1rem 0 0.75rem 0;
  padding: 1.15rem;
  border-radius: 12px;
  letter-spacing: 0.2px;
  color: #fff;
}

.status.yes {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.status.no {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.status.loading {
  background: #ecf0f1;
  color: var(--muted);
}

.reason {
  font-size: 0.98rem;
  margin: 0 0 0.5rem 0;
}

/* Frost / freeze badges */
.risk-line{
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.risk-badge{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.03);
}

.risk-badge strong{
  color: var(--text);
  font-weight: 800;
}

/* Location row */
.location-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0.9rem 0;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.geo-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.geo-btn:hover { filter: brightness(0.95); }

.updated-at {
  font-size: 0.75rem;
  color: var(--muted);
  margin: -0.25rem 0 0.9rem 0;
}

.zip-box {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.zip-box input {
  flex: 1;
  max-width: 320px;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid #cfd6de;
  font-size: 1rem;
  outline: none;
}

.zip-box input:focus {
  border-color: rgba(52, 152, 219, 0.8);
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.12);
}

.zip-box button {
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
}

.zip-box button:hover { filter: brightness(0.98); }

.details {
  display: flex;
  justify-content: space-around;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #6f7a85;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.details div { padding: 0.35rem 0.5rem; }

.hidden { display: none; }

.ad {
  width: 100%;
  max-width: 520px;
  margin: 0.5rem 1rem 0.25rem 1rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  display: none;
  min-height: 90px;
}

footer {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 1rem 0 1.25rem 0;
}

/* Slightly wider spacing on larger screens */
@media (min-width: 768px) {
  .card { padding: 2rem; }
  h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .card { padding: 1.25rem; }
  h1 { font-size: 1.6rem; }
  .status { padding: 1rem; font-size: 1.35rem; }
}

/* --- 3-day outlook additions --- */

.top-links {
  margin: 0.25rem 0 0.75rem 0;
}

.back-link {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* badges area (reuses your “🧊” look) */
.badges {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  margin: 0.4rem 0 0.35rem 0;
}

.badge {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #f7f8fa;
  border: 1px solid #e5e9ef;
  font-weight: 800;
  color: var(--text);
}

.badge-icon {
  font-size: 1rem;
}

/* 3-day grid */
.forecast-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 0.25rem;
}

.day-card {
  text-align: left;
  background: #ffffff;
  border: 1px solid #e7edf3;
  border-radius: 14px;
  padding: 0.95rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.day-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.day-label {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.pill {
  font-weight: 900;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.pill.yes {
  background: rgba(46, 204, 113, 0.16);
  color: #1f7a45;
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.pill.no {
  background: rgba(231, 76, 60, 0.14);
  color: #8a2a22;
  border: 1px solid rgba(231, 76, 60, 0.30);
}

.day-sub {
  color: #546170;
  margin-top: 0.35rem;
  font-weight: 700;
}

.mini-note {
  margin-top: 0.55rem;
  font-weight: 800;
  color: #2c3e50;
}

.day-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  margin-top: 0.65rem;
  color: #5d6a78;
}

.day-metrics strong {
  color: var(--text);
}
.outlook-link {
  margin: -0.35rem 0 1rem 0;
  font-size: 0.9rem;
}

.outlook-link a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.outlook-link a:hover {
  text-decoration: underline;
}

/* ===== Hourly dropdown ===== */
.hourly-toggle {
  width: 100%;
  margin: 0.4rem auto 0;
  padding: 0.75rem 1rem;
  border: 1px solid #cfd6de;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.hourly-toggle:hover { filter: brightness(0.985); }

.hourly-holder {
  margin-top: 0.75rem;
}

/* Desktop/table view */
.hourly-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;           /* prevents weird column growth */
}

.hourly-table th,
.hourly-table td {
  padding: 0.55rem 0.55rem;
  font-size: 0.9rem;
  text-align: left;
  border-top: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hourly-table thead th {
  font-weight: 900;
  background: rgba(0,0,0,0.03);
}

/* Column sizing that behaves */
.hourly-table th:nth-child(1),
.hourly-table td:nth-child(1) { width: 18%; } /* Hour */
.hourly-table th:nth-child(2),
.hourly-table td:nth-child(2) { width: 18%; } /* Cloud */
.hourly-table th:nth-child(3),
.hourly-table td:nth-child(3) { width: 18%; } /* Rain */
.hourly-table th:nth-child(4),
.hourly-table td:nth-child(4) { width: 24%; } /* Wind */
.hourly-table th:nth-child(5),
.hourly-table td:nth-child(5) { width: 22%; } /* Temp */

/* Mobile "stacked row" view */
.hourly-cards {
  display: none;
  gap: 0.6rem;
}

.hour-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
  background: rgba(255,255,255,0.9);
}

.hour-card .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.hour-card .time {
  font-weight: 900;
}

.hour-card .temp {
  font-weight: 900;
}

.hour-card .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.6rem;
  font-size: 0.92rem;
  color: #6f7a85;
}

.hour-card .grid span strong {
  color: var(--text);
}

/* Switch to cards on small screens */
@media (max-width: 520px) {
  .hourly-table { display: none; }
  .hourly-cards { display: grid; }
}

/* ===== Hourly dropdown (desktop polish) ===== */

/* Make the hourly area feel like a mini-card */
.hourly-holder {
  margin-top: 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden; /* rounds the table edges cleanly */
  background: rgba(255,255,255,0.95);
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

/* Give table a more "app" look */
.hourly-table {
  width: 100%;
  border-collapse: separate; /* allows nicer borders */
  border-spacing: 0;
  table-layout: fixed;
}

/* Header: looks like your other UI */
.hourly-table thead th {
  background: rgba(52, 152, 219, 0.08);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.2px;
  border-top: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0.7rem 0.65rem;
}

/* Body cells */
.hourly-table td {
  padding: 0.65rem 0.65rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  color: #3b4a5a;
}

/* Zebra striping */
.hourly-table tbody tr:nth-child(odd) td {
  background: rgba(0,0,0,0.015);
}

/* Hover state */
.hourly-table tbody tr:hover td {
  background: rgba(52, 152, 219, 0.07);
}

/* Align numeric columns more cleanly */
.hourly-table th:nth-child(2),
.hourly-table th:nth-child(3),
.hourly-table th:nth-child(4),
.hourly-table th:nth-child(5),
.hourly-table td:nth-child(2),
.hourly-table td:nth-child(3),
.hourly-table td:nth-child(4),
.hourly-table td:nth-child(5) {
  text-align: center;
}

/* Make the first column (hour) pop slightly */
.hourly-table td:nth-child(1) {
  font-weight: 800;
  color: var(--text);
}

/* Optional: soften the "mph" and "°F" look without changing JS */
.hourly-table td:nth-child(4),
.hourly-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
}

/* Tighten on large screens while keeping readability */
@media (min-width: 768px) {
  .hourly-table th,
  .hourly-table td {
    font-size: 0.92rem;
  }
}

.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e7edf4;
  margin-bottom: 0.35rem;
}

.site-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  color: var(--text);
}

.site-brand img {
  width: 24px;
  height: 24px;
}

.site-link {
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.65;
  color: var(--primary);
  text-decoration: none;
}

.site-link:hover {
  text-decoration: underline;
  opacity: 1;
}

@media (max-width: 480px) {
  .site-brand span {
    font-weight: 700;
    font-size: 0.95rem;
  }
}

.site-brand {
  text-decoration: none;
  color: var(--text);
}

.related-tools {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.related-tools a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.related-tools a:hover {
  text-decoration: underline;
}



