:root {
  --accent: #b6f509;
  --accent-strong: #d6ff4a;
  --text: #101010;
  --muted: #60646c;
  --bg: #ffffff;
  --soft: #f5f6f2;
  --panel: #ffffff;
  --ink: #0d0f10;
  --border: rgba(16, 16, 16, 0.14);
  --danger: #b42318;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(16, 16, 16, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover, .text-link { color: #557900; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
code { background: var(--soft); border: 1px solid var(--border); border-radius: 6px; padding: 0.1rem 0.3rem; }

.container { width: min(1160px, 92vw); margin: 0 auto; }
.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { align-items: center; display: inline-flex; flex: 0 0 auto; font-weight: 800; font-size: 1.08rem; letter-spacing: 0; }
.brand img { display: block; height: 40px; width: auto; }
.brand span { color: #668b00; }
.nav-links {
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--muted);
  display: none;
  flex-direction: column;
  font-size: 0.95rem;
  min-width: min(320px, 92vw);
  padding: 0.75rem;
  position: absolute;
  right: max(4vw, calc((100vw - 1160px) / 2));
  top: 76px;
}
.nav-links a { border-radius: var(--radius); padding: 0.75rem 0.85rem; }
.nav-links a:hover { background: var(--soft); }
.menu-open .nav-links { display: flex; }
.nav-toggle { align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; display: inline-flex; flex-direction: column; gap: 5px; height: 42px; justify-content: center; padding: 0; width: 42px; }
.nav-toggle span { background: var(--ink); border-radius: 999px; display: block; height: 2px; width: 22px; }

.hero, .page-hero {
  background: var(--soft);
  border-bottom: 1px solid var(--border);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1, .page-hero h1, h1, h2, h3 { font-family: "Space Grotesk", "Manrope", sans-serif; line-height: 1.05; letter-spacing: 0; }
.hero h1, .page-hero h1 { font-size: clamp(2.7rem, 7vw, 5.8rem); max-width: 900px; margin: 1rem 0; }
.lead { color: var(--muted); font-size: 1.12rem; line-height: 1.7; max-width: 760px; }
.eyebrow { color: #587800; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; margin: 0; text-transform: uppercase; }
.hero-panel { background: var(--ink); border-radius: var(--radius); color: #fff; display: grid; gap: 0.75rem; padding: 1.3rem; box-shadow: var(--shadow); }
.hero-panel strong { color: var(--accent); }
.hero-panel span { border-top: 1px solid rgba(255,255,255,0.16); color: rgba(255,255,255,0.78); padding-top: 0.75rem; }

.section { padding: 3.5rem 0; }
.section-heading { align-items: end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1.4rem; }
.section-heading h1, .section-heading h2 { margin: 0.35rem 0 0; }
.section-actions { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.meetup-actions { gap: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.meetup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.narrow { max-width: 840px; }
.stack { display: grid; gap: 0.8rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}
.link-card:hover, .card a:hover { color: #557900; }
.card h3 { margin-top: 0; }
.card-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.meta-row { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.meta-row .tag, .meta-row .status-badge { margin-bottom: 0; }
.meetup-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.meetup-card-past,
.meetup-event-past {
  background: #f1f2f0;
  border-color: rgba(16, 16, 16, 0.1);
  box-shadow: none;
  color: #5f6366;
}
.meetup-card-past .detail-icon,
.meetup-event-past .detail-icon,
.meetup-card-past .text-link,
.meetup-event-past .text-link {
  color: #6f7478;
}
.meetup-summary-header { align-items: start; display: flex; gap: 0.65rem; justify-content: space-between; }
.meetup-summary-header > span:first-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.meetup-summary-header .tag,
.meetup-summary-header .status-badge {
  margin-bottom: 0;
}
.meetup-summary-header h3, .meetup-card h3, .meetup-card h4 { margin: 0; }
.meetup-card h4 { color: var(--muted); font: 800 0.98rem "Manrope", system-ui, sans-serif; }
.meetup-card strong, .meetup-event > strong { color: var(--ink); }
.meetup-card-detail {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 0.55rem;
}
.meetup-card-detail strong { color: var(--ink); }
.meetup-card-footer {
  align-items: end;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.25rem;
}
.meetup-card-open {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #557900;
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  margin-left: auto;
  min-width: 2.35rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  width: 2.35rem;
}
.meetup-card-open:hover {
  background: #edf4df;
  border-color: #adc76a;
  color: #334900;
}
.meetup-card-open .detail-icon { width: 1.05rem; }
.meetup-event { margin-bottom: 1.25rem; }
.meetup-event h4 { color: var(--muted); font: 800 1rem "Manrope", system-ui, sans-serif; margin: 0 0 0.7rem; }
.meetup-detail-list {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 1.2rem;
}
.meetup-detail-list p {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  margin: 0;
}
.detail-icon {
  color: #557900;
  flex: 0 0 auto;
  height: 1.15rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1.15rem;
}
.detail-icon * { fill: none; }
.poll-card summary {
  cursor: pointer;
  display: grid;
  gap: 0.65rem;
  list-style: none;
}
.poll-card summary::-webkit-details-marker { display: none; }
.poll-card summary h3, .poll-card summary p { margin: 0; }
.poll-card form { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.empty { background: var(--soft); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); padding: 1rem; }
.tag, .status {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  padding: 0.32rem 0.65rem;
  text-transform: capitalize;
}
.recurrence-tag {
  background: rgba(182, 245, 9, 0.2);
  border-color: rgba(92, 125, 0, 0.28);
  color: #365400;
}
.past-tag {
  background: #fff0ed;
  border-color: rgba(180, 35, 24, 0.24);
  color: #9f2d23;
}
.meetup-card .recurrence-tag { justify-self: start; margin-bottom: 0; }

.btn {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
}
.btn:hover { background: #3b3f42; border-color: #3b3f42; color: #fff; }
.btn:disabled { cursor: wait; opacity: 0.65; }
.btn-ghost { background: var(--bg); color: var(--text); }
.btn-danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.notice {
  background: rgba(182, 245, 9, 0.18);
  border: 1px solid rgba(92, 125, 0, 0.28);
  border-radius: var(--radius);
  margin: 1rem 0;
  padding: 1rem;
}
.error { background: #fff0ed; border-color: rgba(180, 35, 24, 0.35); color: var(--danger); }
.danger-banner {
  background: #fff0ed;
  border: 1px solid rgba(180, 35, 24, 0.42);
  border-radius: var(--radius);
  color: var(--danger);
  font-weight: 700;
  margin: 0 0 1rem;
  padding: 1rem;
  position: relative;
}
.danger-banner strong { display: block; font-size: 1.02rem; margin-bottom: 0.25rem; }
.banner-close {
  background: transparent;
  border: 0;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0;
  position: absolute;
  right: 1rem;
  text-decoration: underline;
  top: 1rem;
}
.notice button { float: right; border: 0; background: transparent; color: inherit; cursor: pointer; font-weight: 800; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.meetup-filter {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 2rem;
}
.meetup-filter-actions {
  align-items: end;
  align-self: end;
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.meetup-filter-actions .btn {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  height: 42px;
  min-height: 42px;
  padding-block: 0;
  width: 72px;
}
.meetup-filter-actions .btn:hover {
  background: #fff;
  color: var(--ink);
}
#ask-advice-form:not([hidden]) { margin-bottom: 1.5rem; }
.form-grid.compact { border: 0; box-shadow: none; grid-template-columns: 1fr; padding: 0; }
.field { display: grid; gap: 0.38rem; }
.field.full, .full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 0.82rem; font-weight: 800; }
input, select, textarea {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 42px;
  padding: 0.76rem 0.9rem;
  width: 100%;
}
textarea { min-height: 130px; resize: vertical; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--soft); }
.auth-card { width: min(460px, 100%); }
.auth-card .field { margin-bottom: 1rem; }
.provider-list { display: grid; gap: 0.7rem; margin: 1.3rem 0; }
.provider-btn {
  align-items: center;
  border-radius: 4px;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  height: 42px;
  justify-content: center;
  line-height: 20px;
  padding: 0 12px;
  width: 100%;
}
.provider-btn span { background: transparent; color: inherit; display: inline; min-height: 0; min-width: 0; padding: 0; }
.provider-icon { flex: 0 0 auto; height: 18px; width: 18px; }
.provider-google { background: #fff; border: 1px solid #747775; color: #1f1f1f; font-family: "Google Sans", "Roboto", Arial, sans-serif; }
.provider-google:hover { background: #f8fafd; color: #1f1f1f; }
.provider-apple { background: #000; border: 1px solid #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; font-size: 18px; font-weight: 600; }
.provider-apple:hover { background: #111; color: #fff; }
.provider-apple .provider-icon { height: 20px; width: 20px; }

.announcements { display: grid; gap: 0.75rem; margin-top: 1.4rem; }
.announcements article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.announcements p { color: var(--muted); margin-bottom: 0; }
.comment, .answer { border-left: 4px solid var(--accent); background: var(--soft); border-radius: var(--radius); padding: 1rem; }
.meetup-event + [data-comments-list] { margin-top: 1.25rem; }
[data-comments-list] { margin-bottom: 1rem; }
.comment span { color: var(--muted); font-size: 0.82rem; font-weight: 800; }
.attendance { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; gap: 0.75rem; margin: 1rem 0; padding: 1rem 0; }
.attendance h3 { margin: 0; }
.attendance-row { align-items: center; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; }
.attendance .actions { gap: 0.55rem; }
.attendance .btn { min-width: 110px; }
.status-badge { border: 1px solid var(--border); border-radius: 999px; color: var(--muted); display: inline-flex; font-size: 0.78rem; font-weight: 800; line-height: 1; padding: 0.45rem 0.7rem; text-transform: capitalize; white-space: nowrap; }
.status-badge-success { background: rgba(182, 245, 9, 0.22); border-color: rgba(92, 125, 0, 0.32); color: #365400; }
.status-badge-danger { background: #fff0ed; border-color: rgba(180, 35, 24, 0.35); color: var(--danger); }
.choice { align-items: center; border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 0.5rem; grid-template-columns: auto 1fr auto; padding: 0.75rem; }
.choice small { color: var(--muted); }
.interest-grid { display: grid; gap: 0.65rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.interest-choice { grid-template-columns: auto 1fr; }

.footer { border-top: 1px solid var(--border); color: var(--muted); padding: 2rem 0; }
.footer-grid { align-items: center; display: flex; justify-content: space-between; gap: 1rem; }
.footer a { margin-left: 1rem; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: #fff; min-height: 100vh; padding: 1.25rem; position: sticky; top: 0; }
.admin-sidebar .brand { color: #fff; display: inline-flex; margin-bottom: 1.2rem; }
.admin-sidebar .brand img { filter: invert(1); }
.admin-sidebar nav { display: grid; gap: 0.25rem; margin-bottom: 1rem; }
.admin-sidebar a { border-radius: var(--radius); color: rgba(255,255,255,0.72); padding: 0.62rem 0.75rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(182,245,9,0.14); color: var(--accent); }
.admin-main { padding: 2rem; width: min(1400px, 100%); }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat strong { color: #557900; display: block; font: 700 2.2rem "Space Grotesk", sans-serif; }
.table-wrap { margin-top: 1.2rem; overflow: auto; }
.data-table { border-collapse: collapse; width: 100%; }
.data-table th, .data-table td { border-bottom: 1px solid var(--border); padding: 0.8rem; text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.actions-cell {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  white-space: nowrap;
}
.inline-actions { align-items: center; display: inline-flex; gap: 0.45rem; margin: 0.2rem 0.2rem 0.2rem 0; }
.inline-actions select { min-width: 130px; }
.actions-cell .inline-actions { margin: 0; }
.actions-cell select { width: auto; }

@media (max-width: 820px) {
  .nav-links { left: 4vw; right: 4vw; min-width: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .meetup-grid { grid-template-columns: 1fr; }
  .meetup-filter { grid-template-columns: 1fr; }
  .meetup-filter-actions { align-items: stretch; }
  .meetup-filter-actions .btn { flex: 1; width: auto; }
  .form-grid, .footer-grid { display: grid; grid-template-columns: 1fr; }
  .admin-shell { display: block; }
  .admin-sidebar { min-height: auto; position: static; }
  .admin-sidebar nav { display: flex; overflow-x: auto; }
  .admin-sidebar a { white-space: nowrap; }
  .admin-main { padding: 1rem; }
}
