:root {
  --bg: #f5f2eb;
  --bg-strong: #f8f7f2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-dark: #17362e;
  --line: rgba(28, 72, 58, 0.12);
  --line-strong: rgba(28, 72, 58, 0.2);
  --text: #18342d;
  --text-soft: rgba(24, 52, 45, 0.74);
  --brand: #3d8f73;
  --brand-strong: #2d745c;
  --brand-soft: rgba(61, 143, 115, 0.14);
  --gold: #c48f4f;
  --danger: #c15757;
  --danger-soft: rgba(193, 87, 87, 0.12);
  --shadow: 0 18px 48px rgba(33, 68, 59, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(132, 195, 168, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 210, 163, 0.18), transparent 26%),
    linear-gradient(180deg, #f6f4ed 0%, #eef5f0 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  width: min(var(--max-width), calc(100vw - 32px));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(246, 244, 237, 0.8);
  border-bottom: 1px solid rgba(24, 52, 45, 0.08);
}

.site-nav__inner {
  width: min(var(--max-width), calc(100vw - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef8f3 100%);
  border: 1px solid rgba(61, 143, 115, 0.18);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(61, 143, 115, 0.14);
}

.brand__mark svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand);
}

.brand__mark-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-soft);
}

.nav-links a:hover {
  color: var(--text);
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #5aa080 100%);
  box-shadow: 0 12px 28px rgba(61, 143, 115, 0.24);
}

.button--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(24, 52, 45, 0.12);
}

.button--danger {
  color: #fff;
  background: linear-gradient(135deg, #bc5f5f 0%, #9d4242 100%);
}

.hero {
  padding: 72px 0 56px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.hero-card,
.panel,
.stat-card,
.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-card {
  padding: 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.eyebrow--light {
  background: rgba(255, 255, 255, 0.14);
  color: #f3fff9;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero h1,
.page-title,
.section-title {
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 0.98;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 82px);
  margin: 18px 0 16px;
}

.hero p,
.lede {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-side {
  padding: 26px;
  display: grid;
  gap: 16px;
}

.hero-side__top {
  min-height: 280px;
  border-radius: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(142, 203, 171, 0.46), transparent 34%),
    linear-gradient(180deg, rgba(24, 52, 45, 0.95), rgba(33, 69, 60, 0.9));
  color: #f7fffb;
  position: relative;
  overflow: hidden;
}

.hero-side__top::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-side__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.metric-chip {
  border-radius: 20px;
  padding: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.metric-chip strong {
  display: block;
  font-size: 30px;
  margin-bottom: 6px;
}

.section {
  padding: 28px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(32px, 4vw, 52px);
  margin: 0;
}

.section-subtitle {
  color: var(--text-soft);
  max-width: 640px;
  line-height: 1.7;
}

.feature-grid,
.stats-grid,
.admin-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.stat-card,
.glass-card {
  padding: 22px;
}

.stat-card--interactive {
  width: 100%;
  text-align: left;
  background: rgba(246, 255, 251, 0.96);
  cursor: pointer;
}

.stat-card--interactive:hover {
  border-color: rgba(61, 143, 115, 0.28);
  box-shadow: 0 18px 36px rgba(33, 68, 59, 0.16);
}

.stat-card--interactive:focus-visible {
  outline: 0;
  border-color: rgba(61, 143, 115, 0.44);
  box-shadow: 0 0 0 4px rgba(61, 143, 115, 0.1);
}

.panel h3,
.stat-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.muted {
  color: var(--text-soft);
}

.list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding-left: 18px;
  position: relative;
  line-height: 1.7;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
}

.footer {
  padding: 42px 0 62px;
  color: var(--text-soft);
}

.footer-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-copy {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.page-hero {
  padding: 56px 0 24px;
}

.page-title {
  font-size: clamp(40px, 6vw, 68px);
  margin: 10px 0 8px;
}

.prose {
  display: grid;
  gap: 18px;
}

.prose section {
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.prose h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.prose p,
.prose li {
  color: var(--text-soft);
  line-height: 1.8;
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(132, 195, 168, 0.2), transparent 24%),
    linear-gradient(180deg, #f7f3eb 0%, #edf3f0 100%);
}

.admin-shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 26px 0 46px;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-auth,
.admin-section,
.table-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.admin-auth {
  width: min(460px, 100%);
  margin: 8vh auto 0;
  padding: 30px;
}

.admin-auth h1,
.admin-section h2 {
  margin: 0 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text-soft);
}

.field input,
.field select,
.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

.field input:focus,
.field select:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(61, 143, 115, 0.44);
  box-shadow: 0 0 0 4px rgba(61, 143, 115, 0.1);
}

.admin-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-section {
  padding: 22px;
  margin-bottom: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr 0.7fr auto;
  gap: 12px;
  margin-bottom: 14px;
}

.table-wrap {
  overflow: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 38, 32, 0.42);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100vw - 24px));
  max-height: min(78vh, 920px);
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 64px rgba(20, 43, 37, 0.22);
}

.contact-modal {
  width: min(960px, calc(100vw - 24px));
}

.contact-modal__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.contact-modal__card {
  height: 100%;
  background:
    radial-gradient(circle at top right, rgba(132, 195, 168, 0.16), transparent 32%),
    rgba(255, 255, 255, 0.82);
}

.contact-modal__email {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(61, 143, 115, 0.16);
  background: rgba(240, 247, 244, 0.9);
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-strong);
  letter-spacing: 0.01em;
}

.contact-modal__note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(24, 52, 45, 0.06);
  color: var(--text-soft);
  line-height: 1.8;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(24, 52, 45, 0.08);
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.pill--gold {
  background: rgba(196, 143, 79, 0.14);
  color: #99672b;
}

.pill--danger {
  background: var(--danger-soft);
  color: #9d4242;
}

.pill--muted {
  background: rgba(24, 52, 45, 0.08);
  color: var(--text-soft);
}

.chart {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.chart__summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 52, 45, 0.06);
  font-size: 13px;
  font-weight: 700;
}

.chart__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart__legend-dot--signups {
  background: rgba(61, 143, 115, 0.84);
}

.chart__legend-dot--active {
  background: rgba(41, 101, 181, 0.7);
}

.chart__legend-dot--checkins {
  background: rgba(196, 143, 79, 0.75);
}

.chart__scale {
  font-size: 12px;
  color: var(--text-soft);
  padding: 0 4px;
}

.chart__grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 220px;
}

.chart__day {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.chart__bars {
  display: flex;
  align-items: end;
  gap: 4px;
  min-height: 180px;
}

.chart__bar {
  width: 10px;
  border-radius: 999px 999px 4px 4px;
}

.chart__bar--signups {
  background: rgba(61, 143, 115, 0.84);
}

.chart__bar--active {
  background: rgba(41, 101, 181, 0.7);
}

.chart__bar--checkins {
  background: rgba(196, 143, 79, 0.75);
}

.chart__label {
  font-size: 11px;
  color: var(--text-soft);
}

.chart__meta {
  display: grid;
  gap: 2px;
  justify-items: center;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-soft);
}

.stack {
  display: grid;
  gap: 12px;
}

.report-card,
.recent-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  font-size: 14px;
}

.message--error {
  background: rgba(193, 87, 87, 0.12);
  color: #8c3e3e;
}

.message--success {
  background: rgba(61, 143, 115, 0.12);
  color: #2d745c;
}

.hidden {
  display: none !important;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--text-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(24, 52, 45, 0.14);
}

@media (max-width: 1080px) {
  .hero__grid,
  .feature-grid,
  .stats-grid,
  .admin-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .hero-side {
    padding: 24px;
  }
}

@media (max-width: 760px) {
  .site-nav__inner,
  .footer-card,
  .section-header,
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .contact-modal__grid {
    grid-template-columns: 1fr;
  }

  .chart__summary {
    flex-direction: column;
  }

  .chart__legend {
    justify-content: flex-start;
  }

  .chart__grid {
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .chart__day {
    min-width: 44px;
  }
}
