:root {
  --bg: #f8f4ec;
  --panel: #fffaf2;
  --panel-strong: #ffffff;
  --ink: #241f1a;
  --muted: #71685f;
  --brand: #3f6f52;
  --brand-dark: #244a35;
  --accent: #f2a65a;
  --accent-soft: #ffe6c7;
  --line: #e8ddcf;
  --shadow: 0 20px 45px rgba(64, 48, 31, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(242, 166, 90, 0.24), transparent 32rem),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 45%, #f3efe6 100%);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(232, 221, 207, 0.8);
  background: rgba(248, 244, 236, 0.88);
  backdrop-filter: blur(16px);
}

.nav-shell,
.section-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 22px rgba(63, 111, 82, 0.25);
}

.nav-links {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.auth-area {
  display: flex;
  align-items: center;
}

.auth-guest,
.auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-area .button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.auth-greeting {
  color: var(--ink);
  font-weight: 800;
}

.auth-dialog {
  width: min(420px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.auth-dialog::backdrop {
  background: rgba(36, 31, 26, 0.45);
  backdrop-filter: blur(4px);
}

.auth-form {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.auth-form h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-switch .text-button,
.auth-forgot-row .text-button {
  padding: 0 4px;
}

.auth-forgot-row {
  margin: 0;
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: var(--accent-soft);
  padding: 12px 18px;
  color: #7b4714;
  font-weight: 750;
}

.banner .text-button {
  color: var(--brand-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 36px;
  padding: 76px 0 42px;
}

.hero-copy h1,
.section-heading h2,
.panel h2,
.split-section h2 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 5.85rem);
}

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.18rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-actions,
.inline-heading,
.footer-shell,
.impact-row {
  display: flex;
  align-items: center;
}

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

.button,
.text-button,
.tab-button {
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 12px 22px rgba(63, 111, 82, 0.2);
}

.button-secondary {
  background: var(--panel-strong);
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

.hero-card,
.panel,
.resource-card,
.circle-card,
.event-card {
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.84);
  box-shadow: var(--shadow);
}

.hero-card {
  border-radius: 34px;
  padding: 28px;
}

.stat-number {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(3.4rem, 8vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.stat-label {
  margin: 8px 0 24px;
  color: var(--muted);
  font-weight: 700;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-card-grid span {
  border-radius: 18px;
  background: white;
  padding: 14px;
  color: var(--muted);
}

.hero-card-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 34px 0;
}

.main-column,
.side-column {
  display: grid;
  align-content: start;
  gap: 24px;
}

.panel {
  border-radius: 28px;
  padding: clamp(20px, 4vw, 32px);
}

.compact-panel {
  padding: 24px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.panel h2,
.split-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.inline-heading {
  justify-content: space-between;
  gap: 16px;
}

.composer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  padding: 12px 14px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(242, 166, 90, 0.55);
  outline-offset: 2px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-note {
  align-self: center;
  min-height: 1.5em;
  margin: 0;
  color: var(--brand-dark);
  font-weight: 750;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 850;
}

.feed-list,
.event-list,
.resource-list {
  display: grid;
  gap: 14px;
}

.feed-item {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  padding: 18px;
}

.feed-meta,
.card-meta,
.event-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  border-radius: 999px;
  background: var(--accent-soft);
  color: #7b4714;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.feed-item p {
  margin: 10px 0 0;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: var(--brand);
  font-weight: 900;
}

.impact-row {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  color: var(--muted);
}

.impact-row strong {
  color: var(--brand-dark);
  font-size: 1.35rem;
}

#circles,
#resources,
.split-section {
  padding: 58px 0;
}

.search-label {
  width: min(320px, 100%);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.circle-card,
.event-card,
.resource-card {
  border-radius: 24px;
  padding: 22px;
}

.circle-card {
  display: grid;
  gap: 16px;
}

.circle-card h3,
.event-card h3,
.resource-card h3 {
  margin: 0;
  font-size: 1.24rem;
}

.circle-card p,
.event-card p,
.resource-card p,
.split-section p {
  color: var(--muted);
}

.circle-card.is-joined {
  border-color: rgba(63, 111, 82, 0.55);
  background: #f5fff8;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  align-items: start;
}

.event-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.date-badge {
  display: grid;
  width: 72px;
  min-height: 72px;
  place-items: center;
  border-radius: 20px;
  background: var(--brand-dark);
  color: white;
  font-weight: 900;
  text-align: center;
  line-height: 1;
}

.date-badge span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 9px 14px;
  color: var(--muted);
  font-weight: 800;
}

.tab-button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
}

.footer-shell {
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0;
  color: var(--muted);
}

.footer-shell a {
  color: var(--brand-dark);
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero,
  .layout-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid,
  .resource-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .inline-heading,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 44px;
  }

  .composer,
  .side-column,
  .card-grid,
  .resource-list,
  .event-card {
    grid-template-columns: 1fr;
  }

  .event-card .button {
    justify-self: start;
  }
}
