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

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: #eef2f8;
  color: #040415;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Header */

header {
  position: sticky;
  top: 0;
  background: #eef2f8;
  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: #040415;
}

.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(4, 4, 21, 0.5);
  font-variant-numeric: tabular-nums;
}

/* Main content */

main {
  padding: 0 1rem;
}

/* Overcast banner */

#overcast-banner {
  background: #040415;
  color: #fff;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Sections */

section {
  margin-top: 1.5rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.55rem;
}

section h2 {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(4, 4, 21, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-col-label {
  min-width: 38%;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(4, 4, 21, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

/* Cards */

.card {
  display: flex;
  border-radius: 14px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.card-left {
  flex: 1;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.85rem 0;
}

.card-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: #040415;
  line-height: 1.2;
}

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

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

.card-hours {
  font-size: 0.82rem;
  font-weight: 700;
  color: #040415;
}

.card-shade .card-hours {
  color: rgba(4, 4, 21, 0.55);
}

.card-status {
  font-size: 1.25rem;
  font-weight: 700;
  color: #040415;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
  width: 7rem;
}

/* Badge */

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

.card-sunny .card-status::before,
.card-losing .card-status::before {
  content: '↓';
  margin-right: 0.3em;
  font-size: 0.7em;
  font-weight: 400;
}

.card-soon .card-status::before,
.card-later .card-status::before {
  content: '↑';
  margin-right: 0.3em;
  font-size: 0.7em;
  font-weight: 400;
}

/* State-specific card styles */

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

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

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

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

.card-shade {
  background: #c8c8d8;
  border-left: none;
}

.card-shade .card-name {
  color: rgba(4, 4, 21, 0.6);
  font-size: 1rem;
}

.card-shade .card-status {
  color: rgba(4, 4, 21, 0.6);
}

.card-shade .card-name a {
  color: rgba(4, 4, 21, 0.6);
}

.card-soon .card-name,
.card-later .card-name {
  font-size: 1rem;
}

.card-soon .card-status,
.card-later .card-status,
.card-shade .card-status {
  font-size: 1rem;
}

.card-sunny .card-left,
.card-losing .card-left {
  padding: 1.15rem 1.1rem;
}

#out-of-sun .card-left {
  padding: 0.5rem 1.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: rgba(4, 4, 21, 0.8);
  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: 1.1rem;
  color: rgba(4, 4, 21, 0.4);
  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(4, 4, 21, 0.45);
  line-height: 1.7;
  border-top: 1px solid rgba(4, 4, 21, 0.1);
}

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

footer p {
  font-size: 0.85rem;
}

footer a {
  color: rgba(4, 4, 21, 0.45);
  text-decoration: underline;
}

footer a:hover {
  color: #040415;
}
