:root {
  /* Base colors in OKLCH */
  --primary: oklch(47.7% 0.162 264.06); /* Deep purple */

  /* Relative colors */
  --primary-light: oklch(from var(--primary) calc(l + 0.15) c h);
  --primary-lighter: oklch(from var(--primary) calc(l + 0.25) c h);
  --primary-dark: oklch(from var(--primary) calc(l - 0.1) c h);
  --primary-darker: oklch(from var(--primary) calc(l - 0.2) c h);

  /* Accent colors using color-mix */
  --accent: oklch(from var(--primary) l c calc(h + 60));
  --accent-light: oklch(from var(--accent) calc(l + 0.15) c h);

  /* Semantic colors */
  --success: oklch(55% 0.15 142);
  --error: oklch(65% 0.25 29.2);
  --warning: oklch(70% 0.2 75.5);

  /* Text colors with better contrast */
  --text: oklch(20% 0.02 264.06);
  --text-light: oklch(35% 0.02 264.06);
  --text-lighter: oklch(45% 0.02 264.06);

  /* Link colors */
  --link: var(--primary);
  --link-hover: oklch(from var(--primary) calc(l - 0.1) c h);
  --link-visited: oklch(from var(--primary) calc(l + 0.28) c calc(h - 50));

  /* Background colors */
  --bg-light: oklch(98% 0.005 264.06);
  --bg-dark: oklch(25% 0.02 264.06);

  /* Brand colors */
  --facebook: oklch(55% 0.2 250); /* Facebook blue */
  --facebook-hover: oklch(from var(--facebook) calc(l - 0.2) c h);

  /* Utility */
  --rem-to-px: calc(1rem / 16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-light);
  padding: 0;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

a:hover {
  color: var(--link-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary);
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
}

/* General H2 styling */
h2 {
  font-size: 1.875rem; /* 30px */
  text-align: center;
}

h1.title {
  font-size: 2rem;
  margin: 2rem 0;
  color: var(--primary);
}

table {
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  border-collapse: collapse;
  font-size: 1rem;
  background: var(--bg-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
}

table caption {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  padding: 1rem;
  text-align: left;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

tr:last-child td {
  border-bottom: none;
}

td a {
  color: #0066cc;
}

td a:hover {
  color: #004285;
}

img {
  border: 0px;
}

.center-logo {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.center-logo img {
  max-width: 100%;
  height: auto;
}

.event-calendar-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.event-calendar {
  display: inline-flex;
  align-items: center;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1rem 2rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-calendar:hover {
  background: var(--primary-dark);
  color: white;
}

.calendar-icon {
  height: calc(var(--rem-to-px) * 40);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin-right: 6px;
}

.facebook-link-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.facebook-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--facebook);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 1.1rem;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.facebook-link:hover {
  background: var(--facebook-hover);
  color: white;
}

#facebookIcon {
  --box: 45;
  width: calc(var(--rem-to-px) * var(--box));
  height: calc(var(--rem-to-px) * var(--box));
  fill: #ffffff;
}

/* Text styles */
.text-center {
  text-align: center;
  text-wrap: balance;
}

.large-text {
  font-size: 1.25rem;
}

.extra-large-text {
  font-size: 1.5rem;
  max-width: 75ch;
  margin: 0 auto 1.5rem;
  padding: 0 0.5rem;
}

/* Improve paragraph flow in large text sections */
.extra-large-text p {
  margin: 0 0 1rem;
  text-wrap: pretty;
  hyphens: auto;
}

.extra-large-text p + p {
  margin-top: 0.5rem;
}

/* Text colors */
.text-red {
  color: var(--error);
}
.text-purple {
  color: var(--primary);
}
.text-dark-purple {
  color: var(--primary-dark);
}
.text-green {
  color: var(--success);
}
.text-blue {
  color: var(--primary);
}

/* Center alignment */
.text-center {
  text-align: center;
}

/* Navigation Bar */
.main-nav {
  background-color: var(--primary);
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--primary-dark);
  color: white;
}

/* Newsletter Page */
.newsletter-archive {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.newsletter-archive h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 2rem;
}

.loading-indicator {
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
  font-style: italic;
}

.newsletter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.newsletter-list a {
  display: block;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
}

.newsletter-list a:hover {
  color: var(--primary-dark);
}

.newsletter-list .date {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.newsletter-signup {
  max-width: 600px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-light);
  border-radius: 8px;
}

/* Invalid newsletter links styling */
.invalid-link {
  color: #888 !important;
  cursor: not-allowed;
}

/* Loading indicator for newsletters */
#loading-indicator {
  text-align: center;
  margin: 20px 0;
  font-style: italic;
}

.news-letter {
  font-size: 2rem;
  text-align: center;
  font-weight: bold;
  color: #000088;
}

/* Newsletter Year Sections */
.newsletter-year {
  margin-bottom: 1rem;
  background: var(--bg-light);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.year-header {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.year-header:hover {
  background: var(--primary-dark);
}

.toggle-icon {
  width: 1rem;
  height: 1rem;
  position: relative;
  transition: transform 0.3s ease;
}

.toggle-icon::before,
.toggle-icon::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 1px;
  transition: transform 0.3s ease;
}

.toggle-icon::before {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.toggle-icon::after {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.year-header[aria-expanded="true"] .toggle-icon::before {
  transform: translateX(-50%) scaleY(0);
}

.year-content {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 1000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.year-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.year-content > * {
  padding: 0.75rem 1rem;
}

.year-content li {
  border-bottom: 1px solid #e2e8f0;
}

.year-content li:last-child {
  border-bottom: none;
}

.year-content a {
  display: block;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.year-content a:hover {
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .extra-large-text {
    font-size: 1.25rem;
  }
  .large-text {
    font-size: 1.1rem;
  }

  .event-calendar {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }

  table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .newsletter-archive {
    padding: 1rem 0.5rem;
  }

  .newsletter-list {
    gap: 0.75rem;
  }

  .year-header {
    font-size: 1.1rem;
    padding: 0.75rem;
  }

  .year-content > * {
    padding: 0.75rem;
  }

  .year-content a {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-nav menu {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .facebook-link {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
}
