:root {
  --navy: #12284b;
  --green: #22c55e;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --soft: #f3f4f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--navy); }
a:hover { color: var(--green); }

/* Slim white logo bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--navy);
}
.logo { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: 0.8rem; }
.topnav { display: flex; gap: 1rem; }
.topnav a { text-decoration: none; font-weight: 600; white-space: nowrap; }

/* Full banner with a fade to white at the bottom.
   The banner art is a brand gradient for now; the header photo is added
   back once the Worker is deployed (it is too large to paste inline). */
.banner { position: relative; overflow: hidden; }
.banner-art {
  display: block;
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, var(--navy) 0%, #1e4d8c 55%, var(--green) 130%);
}
.banner-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 40%, rgba(255,255,255,0.9) 100%);
}
.banner-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 1rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.banner-text h1 { margin: 0 0 0.25rem; color: var(--navy); font-size: 1.8rem; }
.banner-text p { margin: 0; color: var(--ink); }

.page { max-width: 900px; margin: 0 auto; padding: 1rem; }
.page h2 { color: var(--navy); }

.filters, form { display: grid; gap: 0.75rem; max-width: 560px; }
.filters { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); max-width: none; align-items: end; }
label { display: grid; gap: 0.25rem; font-weight: 600; }
label.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
input, select, textarea {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 100%;
}
button, .button {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  width: fit-content;
}
button:hover, .button:hover { background: var(--navy); color: #fff; }

.cards { display: grid; gap: 1rem; margin: 1.5rem 0; }
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}
.card h3 { margin-top: 0; color: var(--navy); }
.card p { margin: 0.3rem 0; }
.card-preferred { border: 2px solid var(--green); }
.badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  vertical-align: middle;
}

.subscribe, .upgrade {
  background: var(--soft);
  border-radius: 8px;
  padding: 1rem;
  margin: 1.5rem 0;
}
.subscribe h2, .upgrade h3 { margin-top: 0; color: var(--navy); }

.errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: #991b1b;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer a { color: var(--navy); }

@media (max-width: 600px) {
  .banner-art { height: 200px; }
  .banner-text h1 { font-size: 1.35rem; }
  .topnav a { font-size: 0.9rem; }
  .brand-text small { display: none; }
}
