*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #163d28;
  color: #fff;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Header */

header {
  position: sticky;
  top: 0;
  background: #163d28;
  z-index: 10;
  padding: 0.75rem 1rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.beta-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: #cc2200;
  border-radius: 999px;
  padding: 0.1em 0.5em;
  vertical-align: middle;
  margin-left: 0.35em;
  text-transform: uppercase;
}

#clock {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

/* Main content */

main {
  padding: 0 1rem;
}

/* Sections */

section {
  margin-top: 1.5rem;
}

section h2 {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Cards */

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.5rem;
  border-left: none;
  box-shadow: none;
}

.card-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.card-name {
  font-weight: 700;
  font-size: 1.45rem;
  color: #000;
}

.card-name a {
  color: inherit;
  text-decoration: none;
}

.card-name a:hover {
  text-decoration: underline;
}

.card-status {
  font-size: 0.95rem;
  color: #111;
}

.card-note {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 0.3rem;
}

/* Badge */

.card-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.18);
  color: #000;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* State-specific card styles */

.card-sunny {
  background: #f5c200;
  border-left: none;
}

.card-losing {
  background: #f07800;
  border-left: none;
}

.card-soon {
  background: #a3e03a;
  border-left: none;
}

.card-later {
  background: #7ec8e3;
  border-left: none;
}

.card-shade {
  background: #595959;
  border-left: none;
  color: #888;
}

.card-shade .card-name {
  color: #888;
}

.card-shade .card-status {
  color: #888;
}

.card-shade .card-name a {
  color: #888;
}

#out-of-sun .card {
  padding: 0.5rem 1.1rem;
}

#out-of-sun .card-name {
  font-size: 1rem;
}

/* In-shade details/summary */

details#out-of-sun {
  margin-top: 1.5rem;
}

details#out-of-sun summary {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0 0.55rem 0;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

details#out-of-sun summary::-webkit-details-marker {
  display: none;
}

details#out-of-sun summary::after {
  content: '▸';
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-left: auto;
  transition: transform 0.15s;
}

details#out-of-sun[open] summary::after {
  transform: rotate(90deg);
}

#out-of-sun-list {
  margin-top: 0;
}

/* Footer */

footer {
  margin-top: 2rem;
  padding: 1.4rem 1rem 1.8rem;
  text-align: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.1rem;
  color: #fff;
}

footer p {
  font-size: 0.85rem;
}

footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

footer a:hover {
  color: #fff;
}
