:root {
  --sky-navy: #111827;
  --sky-green: #22c55e;
  --sky-green-dark: #166534;
  --sky-gray: #f4f6f8;
  --sky-ink: #1f2933;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.site-page {
  margin: 0;
  background: var(--sky-gray);
  color: var(--sky-ink);
  font-family: Arial, Helvetica, sans-serif;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: var(--sky-navy);
  border-bottom: 3px solid var(--sky-green);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  order: 1;
}

.mobile-menu { display: none; }

.brand-link {
  display: inline-flex;
  align-items: center;
  margin-right: 0;
  margin-left: auto;
  order: 2;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: min(210px, 42vw);
  height: auto;
}

nav.site-nav a:not(.brand-link) {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.form-message {
  margin-top: 24px;
  padding: 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #ecfdf5;
  color: #14532d;
  font-family: inherit;
}

.form-message[hidden] { display: none; }

.dashboard-entry {
  max-width: 560px;
}

.sign-in-card {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid rgba(34, 197, 94, 0.38);
  border-radius: 14px;
  background: #f0fdf4;
}

.sign-in-card h2 {
  margin-top: 0;
}

.sign-in-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.sign-in-form label {
  grid-row: 1;
  font-weight: 700;
}

.sign-in-form input {
  grid-row: 2;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.sign-in-form button {
  grid-row: 2;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--sky-green-dark);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-entry label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.dashboard-entry input {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

nav.site-nav a:hover,
nav.site-nav a:focus-visible { color: var(--sky-green); }

nav.site-nav select {
  min-width: 250px;
  padding: 10px 38px 10px 12px;
  border: 1px solid #4b5563;
  border-radius: 7px;
  background: #fff;
  color: var(--sky-navy);
  font-weight: 700;
}

.hero { background: linear-gradient(135deg, var(--sky-navy), #173d2a); }

.home-hero {
  padding: 0 24px 34px;
  background: var(--sky-navy);
}

.hero-lockup {
  display: block;
  width: min(100%, 1280px);
  height: auto;
  margin: 0 auto;
}

.button,
button { transition: transform 140ms ease, box-shadow 140ms ease; }

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.18);
}

.card,
.search-card,
.pro-card { border: 1px solid rgba(17, 24, 39, 0.06); }

.pledge,
.note { color: #14532d; }

footer.site-footer {
  margin-top: 40px;
  padding: 28px 20px;
  background: var(--sky-navy);
  color: #fff;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

footer.site-footer a {
  margin: 0;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

footer.site-footer a:hover,
footer.site-footer a:focus-visible { color: var(--sky-green); }

.copyright {
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.dashboard-page {
  max-width: none !important;
  margin: 0 !important;
}

.dashboard-shell {
  width: min(100% - 32px, 1000px);
  margin: 34px auto;
  padding: 30px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.dashboard-shell h1,
.dashboard-shell h2 { color: var(--sky-navy); }

.pwa-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 14px;
  background: #f8fafc;
}

.pwa-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.14);
}

.pwa-card h2 {
  margin: 0 0 8px;
}

.pwa-card p {
  margin-top: 0;
}

.pwa-card button,
.pwa-admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--sky-green-dark);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.pwa-card button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-push-card {
  border-color: rgba(34, 197, 94, 0.35);
  background: #f0fdf4;
}

.pwa-actions,
.push-pairing {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.pwa-instructions,
.pwa-message {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 9px;
  background: #ecfdf5;
  color: #14532d;
}

.pwa-message.error {
  background: #fef2f2;
  color: #991b1b;
}

.pwa-install-widget {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  width: min(390px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 16px;
  background: var(--sky-navy);
  color: #fff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.34);
}

.pwa-install-widget[hidden] { display: none; }

.pwa-install-widget > img {
  width: 58px;
  height: 58px;
  border-radius: 13px;
}

.pwa-widget-copy {
  min-width: 0;
  padding-right: 18px;
}

.pwa-widget-copy strong,
.pwa-widget-copy span {
  display: block;
}

.pwa-widget-copy span {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.35;
}

.pwa-widget-close {
  position: absolute;
  top: 5px;
  right: 7px;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 23px;
  line-height: 1;
  box-shadow: none;
}

.pwa-widget-close:hover {
  transform: none;
  box-shadow: none;
  color: #fff;
}

.pwa-widget-actions {
  margin-top: 10px;
}

.pwa-widget-install,
.pwa-widget-done {
  width: auto;
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 14px;
}

.pwa-widget-ios-help {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.4;
}

.pwa-widget-ios-help .pwa-widget-done {
  display: block;
  margin-top: 9px;
}

.push-pairing label {
  width: 100%;
  font-weight: 700;
}

.push-pairing input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.dashboard-shell a {
  color: var(--sky-green-dark);
  font-weight: 700;
}

.dashboard-shell .pwa-admin-button {
  color: #fff;
}

.dashboard-shell table {
  display: block;
  overflow-x: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .sign-in-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  nav.site-nav {
    position: relative;
    flex-wrap: nowrap;
    min-height: 68px;
    padding: 10px 16px;
  }
  .brand-link {
    order: 2;
    margin-right: 0;
    margin-left: auto;
  }
  .brand-logo {
    width: min(148px, 46vw);
  }
  .nav-links {
    display: none;
  }
  .mobile-menu {
    display: block;
    order: 1;
  }
  .mobile-menu summary {
    padding: 9px 12px;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }
  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }
  .mobile-menu summary::before {
    content: "☰";
    margin-right: 8px;
    color: var(--sky-green);
  }
  .mobile-menu[open] summary {
    border-color: var(--sky-green);
  }
  .mobile-menu-links {
    position: absolute;
    z-index: 100;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 14px;
    border-bottom: 3px solid var(--sky-green);
    background: var(--sky-navy);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.24);
  }
  .mobile-menu-links a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .mobile-menu-links a:last-child {
    border-bottom: 0;
  }
  .home-hero { padding-inline: 0; }
  .dashboard-shell {
    width: min(100% - 20px, 1000px);
    padding: 20px;
  }
  .pwa-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }
  .pwa-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }
  .push-pairing {
    grid-column: 1 / -1;
  }
  .pwa-install-widget {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    padding: 13px;
  }
}
