:root {
  --bg: #fdfdfc;
  --card: #ffffff;
  --green: #0a7a3a;
  --muted: #4a5568;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(10, 40, 20, 0.02), rgba(255, 255, 255, 0.02)),
    radial-gradient(800px 400px at 10% 10%, rgba(10, 122, 58, 0.03), transparent 10%),
    var(--bg);
  color: #0f1b1a;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--site-wrap-max);
  margin: 0 auto;
  padding: 20px;
}

main {
  margin-top: 12px;
}

.surface {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid rgba(9, 9, 9, 0.02);
  border-top: 3px solid rgba(184, 134, 11, 0.2);
  box-shadow: 0 18px 60px rgba(20, 30, 20, 0.04);
  margin-bottom: 24px;
}

#upcoming {
  min-height: 520px;
}

#past {
  min-height: 320px;
}

#upcoming.surface--compressed {
  min-height: 220px;
}

#upcoming.surface--compressed .event-grid {
  min-height: 0;
}

#upcoming.surface--compressed .empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 16px;
  border: 1px dashed rgba(10, 122, 58, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

p {
  margin: 4px 0 10px;
  font-size: 15px;
  line-height: 1.6;
}

h2 {
  font-size: 22px;
  color: var(--green);
}

h3 {
  font-size: 18px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  min-height: 398px;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  height: 100%;
  padding: 14px;
  border: 1px solid rgba(10, 20, 10, 0.08);
  border-radius: 12px;
  background: #fff;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.event-card:hover,
.event-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
  border-color: rgba(10, 122, 58, 0.22);
}

.event-card-placeholder {
  background: linear-gradient(90deg, rgba(235, 235, 235, 0.6), rgba(255, 255, 255, 0.9));
  border-color: rgba(10, 20, 10, 0.03);
  pointer-events: none;
}

.event-card-placeholder__image {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(220, 220, 220, 0.5), rgba(245, 245, 245, 0.95));
}

.event-card-placeholder__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.event-card-placeholder__line {
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(220, 220, 220, 0.6), rgba(250, 250, 250, 0.95));
}

.image-container {
  width: 100%;
  height: auto;
  aspect-ratio: var(--archive-thumb-ratio, 16 / 10);
  overflow: hidden;
  border-radius: 8px;
  background: #eef3ee;
  flex: 0 0 auto;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.image-container img.thumbnail--top {
  object-position: top center;
}

.event-body {
  min-width: 0;
  padding: 0;
}

.meta {
  display: inline-block;
  font-size: 12px;
  color: #5e6a63;
  background: rgba(10, 122, 58, 0.08);
  border-radius: 999px;
  padding: 5px 10px;
  margin-bottom: 10px;
}

.archive-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  min-height: 192px;
  overflow: visible;
  align-items: start;
}

.archive-item {
  border: 1px solid rgba(10, 20, 10, 0.08);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  height: auto;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.archive-item:hover,
.archive-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
  border-color: rgba(10, 122, 58, 0.22);
}

.archive-body {
  min-width: 0;
}

.event-card h3,
.archive-item h3 {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card p,
.archive-item p {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.help-box {
  border-left: 4px solid var(--green);
  background: rgba(10, 122, 58, 0.05);
}

footer[aria-label="Site footer"] {
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  padding-bottom: 22px;
  color: var(--muted);
  border-top: 1px solid rgba(184, 134, 11, 0.25);
  font-size: 13px;
}

/* Desktop-only layout lock */
.wrap {
  width: 1200px;
  max-width: none;
  min-width: 1200px;
  padding: 20px;
}

main {
  margin-top: 12px;
}

.surface {
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.event-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.archive-scroll {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  overflow: visible;
}

.event-card,
.archive-item {
  gap: 14px;
  padding: 14px;
}

.meta {
  display: inline-block;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.45;
}
