/* annual_calendar block.
   No literal colour: every value is a token (hard rules 1 and 6).

   The filter bar deliberately reuses the short_courses geometry and weights
   rather than inventing a second look for the same control. Same panel, same
   pill chips, same pressed state, same search field, same muted count line. A
   visitor who has used the course listing already knows how this works. The
   prefix differs (ac- not sc-) because the two blocks can appear on one page
   and must filter independently. */

/* ---------------------------------------------------------------- heading */
.annual-calendar__head { margin-bottom: 1.6rem; max-width: var(--measure); }
.annual-calendar__head .section-intro { margin-top: .6rem; }

/* ------------------------------------------------------------- filter bar */
.ac-filters {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
}
.ac-filters__inner { display: flex; flex-direction: column; gap: .75rem; }
.ac-filterrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ac-filterrow__label {
  font-size: var(--fs-min);
  font-weight: 700;
  color: var(--text-heading);
  min-width: 92px;
}
.ac-chipbtn {
  font-family: inherit;
  font-size: var(--fs-min);
  font-weight: 600;
  color: var(--ink);
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .45rem 1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ac-chipbtn:hover { border-color: var(--accent); color: var(--accent); }
.ac-chipbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--white); }
.ac-search {
  font-family: inherit;
  font-size: var(--fs-min);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  padding: .45rem .7rem;
  min-width: 200px;
  flex: 1 1 200px;
  max-width: 320px;
}
.ac-count {
  font-size: var(--fs-min);
  color: var(--muted);
  margin: 0 0 1.4rem;
}

/* ------------------------------------------------------------------ cards */
.ac-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap-grid);
}
/* [hidden] is how the JS filters, and a grid item ignores it without this. */
.ac-card[hidden] { display: none; }

.ac-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: var(--card-edge) solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.5rem;
}
/* On a light-grey ground the white card needs no border to separate, but it
   keeps one so the accent edge has something to sit against. */
.bg-light-grey .ac-card { border-color: transparent; border-top-color: var(--accent); box-shadow: var(--shadow-sm); }

.ac-card__date {
  font-size: var(--fs-meta);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.ac-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ac-card__cat {
  font-size: var(--fs-min);
  font-weight: 700;
  color: var(--text-heading);
}
.ac-card__group {
  font-size: var(--fs-meta);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--btn-accent-text);
  background: var(--btn-accent-bg);
  border-radius: var(--radius-pill);
  padding: .2rem .7rem;
}
.ac-card__title { font-size: 1.35rem; line-height: 1.25; margin: 0; }
.ac-card__desc { font-size: var(--fs-min); line-height: 1.6; color: var(--muted); margin: 0; }
.ac-card__meta {
  font-size: var(--fs-meta);
  color: var(--muted);
  margin: 0;
  padding-top: .4rem;
  border-top: 1px solid var(--line);
}
.ac-card__link {
  margin-top: auto;
  padding-top: .5rem;
  font-size: var(--fs-min);
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
}
.ac-card__link::after { content: " \2192"; }
.ac-card__link:hover { text-decoration: underline; }

.ac-empty {
  font-size: 1.2rem;
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 0;
  margin: 0;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 40em) {
  .ac-filterrow__label { min-width: auto; width: 100%; }
  .ac-cards { grid-template-columns: 1fr; }
  .ac-search { max-width: none; }
}
