:root {
  --brand: #0b6b3a;
  --brand-dark: #074d29;
  --bg: #f6f8f6;
  --text: #1a1a1a;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}

.app-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: var(--brand);
  color: #fff;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.logo { font-weight: 700; letter-spacing: 1px; }
.app-bar nav a { color: #fff; margin-left: 16px; text-decoration: none; font-size: 14px; }
.app-bar nav a.cta {
  background: #fff; color: var(--brand);
  padding: 6px 12px; border-radius: 999px; font-weight: 600;
}

/* ---- Install banner ---- */
.install-banner {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 16px;
  position: sticky; top: 0; z-index: 9;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.install-banner[hidden] { display: none; }
.install-banner-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.install-banner-text span { font-size: 12px; color: #666; }
.install-btn {
  background: var(--brand); color: #fff; border: 0;
  padding: 8px 16px; border-radius: 999px;
  font-weight: 600; cursor: pointer; font-size: 14px;
}
.install-btn:hover { background: var(--brand-dark); }
.dismiss-btn {
  background: transparent; color: #888; border: 0;
  font-size: 22px; cursor: pointer; padding: 0 6px; line-height: 1;
}

main { max-width: 960px; margin: 0 auto; padding: 20px; }

.hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; padding: 48px 24px; border-radius: var(--radius);
  margin-bottom: 32px;
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.2; margin-bottom: 12px; }
.hero p { max-width: 560px; margin-bottom: 20px; }

.hero-install {
  background: #fff; color: var(--brand);
  border: 0; padding: 12px 22px; border-radius: 999px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  margin-top: 8px;
}
.hero-install[hidden] { display: none; }

button {
  background: var(--brand); color: #fff; border: 0;
  padding: 12px 22px; border-radius: 999px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
button:hover { background: var(--brand-dark); }

section { margin-bottom: 40px; }
h2 { font-size: 1.5rem; margin-bottom: 16px; color: var(--brand); }

.cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.cards article {
  background: #fff; padding: 20px; border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cards h3 { margin-bottom: 8px; color: var(--brand); }

form { display: grid; gap: 12px; max-width: 420px; }
input, select {
  padding: 12px; border: 1px solid #ccc; border-radius: 8px;
  font-size: 1rem; width: 100%;
}
#formStatus { margin-top: 12px; font-weight: 600; color: var(--brand); }

footer { text-align: center; padding: 24px; font-size: 13px; color: #666; }

/* ---- Modal (iOS instructions) ---- */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-content {
  background: #fff; border-radius: var(--radius);
  padding: 24px; max-width: 360px; width: 100%;
}
.modal-content h3 { margin-bottom: 12px; color: var(--brand); }
.modal-content ol { margin-left: 20px; margin-bottom: 16px; }
.modal-content li { margin-bottom: 8px; }
.ios-icon { font-size: 18px; }
.modal-content button { width: 100%; }

/* ---- Standalone-mode tweaks ---- */
@media (display-mode: standalone) {
  .install-banner { display: none !important; }
}