:root {
  --navy: #1c3a5e;
  --navy-dark: #142943;
  --red: #b3341f;
  --red-dark: #8f2a19;
  --ink: #2a2a2a;
  --gray-600: #5b5b5b;
  --gray-200: #dcdcdc;
  --gray-100: #f2f2f0;
  --white: #faf8f5;
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--navy-dark);
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; border-bottom: 3px solid var(--red); padding-bottom: 8px; display: inline-block; }
h3 { font-size: 1.15rem; color: var(--ink); }

p { margin: 0 0 1em; max-width: 72ch; }

a { color: var(--red); text-decoration: underline; }
a:hover { color: var(--red-dark); }
a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.topbar {
  background: var(--white);
  border-bottom: 4px solid var(--navy);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-dark);
  text-decoration: none;
}

.brand img {
  height: 54px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--gray-600);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-toggle:hover { background: var(--gray-100); border-color: var(--navy); }

.nav-toggle .bars {
  display: block;
  width: 20px;
  height: 14px;
  position: relative;
}

.nav-toggle .bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.navlinks {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding-top: 12px;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid var(--gray-200);
  margin-top: 4px;
}

.navlinks.open { display: flex; }

.navlinks a {
  display: block;
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: var(--radius);
}

.navlinks a:hover { background: var(--gray-100); }
.navlinks a.active { background: var(--navy); color: var(--white); }

@media (min-width: 781px) {
  .nav { justify-content: space-between; }
  .nav-toggle { display: none; }
  .navlinks {
    display: flex;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
  .navlinks a { padding: 8px 14px; font-size: 0.92rem; }
}

/* ---------- Page banner ---------- */

.banner {
  background: var(--navy);
  color: var(--white);
  padding: 34px 0;
}

.banner h1 { color: var(--white); margin: 0; }
.banner p { color: #cdd9e6; margin: 8px 0 0; max-width: 62ch; }

/* ---------- Sections ---------- */

section { padding: 40px 0; }
section.alt { background: var(--gray-100); }
section + section { border-top: 1px solid var(--gray-200); }

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 760px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
}

/* ---------- Boxes ---------- */

.box {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px 22px;
}

.notice {
  border: 1px solid #e0b7ab;
  background: #faf1ee;
  border-left: 4px solid var(--red);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* ---------- Buttons / links-as-buttons ---------- */

.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 18px;
  border-radius: var(--radius);
  text-decoration: none !important;
  border: 1px solid var(--navy);
}
.btn:hover { background: var(--navy-dark); }

.btn-red {
  background: var(--red);
  border-color: var(--red);
}
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--navy) !important;
  border: 1px solid var(--navy);
}
.btn-outline:hover { background: var(--gray-100); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); }

table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 0.94rem; }

thead th {
  text-align: left;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 14px;
}

tbody td { padding: 10px 14px; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--gray-100); }
tbody tr.event-highlight { background: #faf1ee; }
tbody tr.event-highlight td { font-weight: 600; }

td.date { white-space: nowrap; font-weight: 700; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--gray-600);
}
.badge.youth { border-color: var(--red); color: var(--red); }

/* ---------- Archive lists ---------- */

.archive-year { margin-bottom: 26px; }
.archive-year h3 {
  border-bottom: 2px solid var(--navy);
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.archive-year .count { font-weight: 400; color: var(--gray-600); font-size: 0.85rem; }

.archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive-list li {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--gray-200);
  font-size: 0.92rem;
}
.archive-list .master { color: var(--gray-600); font-size: 0.85rem; }

/* ---------- Leadership list ---------- */

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 24px;
}
.people li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}
.people .role { color: var(--red); font-weight: 600; font-size: 0.85rem; }

dl.spec { margin: 0; }
dl.spec div { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
dl.spec div:last-child { border-bottom: none; }
dl.spec dt { flex: 0 0 120px; font-weight: 700; font-size: 0.9rem; }
dl.spec dd { margin: 0; }

/* ---------- Footer ---------- */

footer {
  background: var(--navy-dark);
  color: #c7d2dd;
  padding: 32px 0;
  margin-top: 20px;
}
footer a { color: #dfe7ee; }
footer a:hover { color: var(--white); }
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  list-style: none;
  padding: 0;
}
.footer-bottom {
  font-size: 0.85rem;
  border-top: 1px solid #2c4a6c;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.text-muted { color: var(--gray-600); }
.small { font-size: 0.88rem; }
.mt-0 { margin-top: 0; }
