/* Monthly calendar + programme, inspired by the supplied CMM references.
   Default programme, including the supplied historical activities. */
.crg-monthly-agenda, .crg-home-agenda-preview {
  --agenda-paper: var(--crg-theme-paper); --agenda-ink: var(--crg-theme-ink);
  --agenda-muted: var(--crg-theme-muted); --agenda-night: var(--crg-theme-night);
  --agenda-wash: var(--crg-theme-wash); --agenda-line: oklch(83% .017 244);
  --agenda-selected: oklch(91% .029 244); --agenda-accent: oklch(44% .075 50);
  color: var(--agenda-ink); font-family: Lato, Arial, sans-serif;
}
.crg-monthly-agenda [hidden], .crg-home-agenda-preview [hidden] { display: none !important; }
.crg-monthly-agenda { padding-block: clamp(38px, 5vw, 72px); background: var(--agenda-paper); }
.crg-monthly-agenda :is(button, a, [tabindex]):focus-visible, .crg-home-agenda-preview a:focus-visible { outline: 3px solid oklch(46% .12 240); outline-offset: 3px; }
.crg-monthly-agenda button { font: inherit; font-size: 14px; line-height: 1.3; color: var(--agenda-ink); background: transparent; border: 1px solid var(--agenda-line); border-radius: 3px; min-height: 44px; min-width: 44px; padding: 10px 14px; box-shadow: none; cursor: pointer; }
.crg-monthly-agenda button:hover { background: var(--agenda-wash); color: var(--agenda-ink); }
.crg-monthly-agenda button:disabled { opacity: .45; cursor: not-allowed; }
.crg-monthly-agenda__heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 42px; }
.crg-monthly-agenda__heading p { font-size: 17px; line-height: 1.6; color: var(--agenda-muted); margin: 12px 0 0; max-width: 56ch; }
.crg-monthly-agenda__heading > a { flex: 0 0 auto; font-size: 13px; color: var(--agenda-muted); min-height: 44px; display: flex; align-items: center; text-underline-offset: 4px; }
.crg-monthly-agenda__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.crg-monthly-agenda.is-enhanced .crg-monthly-agenda__layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.crg-monthly-agenda__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.crg-monthly-agenda__toolbar h3 { margin: 0; font-size: clamp(22px, 2.2vw, 29px); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; text-transform: none; }
.crg-monthly-agenda__toolbar button { font-size: 21px; padding: 6px; }
.crg-monthly-agenda__month-picker { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; font-size: 13px; color: var(--agenda-muted); }
.crg-monthly-agenda__month-picker select { min-height: 44px; max-width: 100%; min-width: 0; flex: 1; color: var(--agenda-ink); background: var(--agenda-paper); border: 1px solid var(--agenda-line); border-radius: 3px; padding: 8px 12px; font: 700 15px/1.4 Lato, Arial, sans-serif; }
.crg-monthly-agenda :is(select, summary):focus-visible { outline: 3px solid oklch(46% .12 240); outline-offset: 3px; }
.crg-monthly-agenda__week, .crg-monthly-agenda__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.crg-monthly-agenda__week { margin-bottom: 8px; color: var(--agenda-muted); font-size: 12px; font-weight: 700; text-align: center; }
.crg-monthly-agenda__week span { padding-block: 10px; }
.crg-monthly-agenda__grid { border: 1px solid var(--agenda-line); gap: 1px; background: var(--agenda-line); }
.crg-monthly-agenda .crg-monthly-agenda__day { position: relative; min-width: 0; height: 64px; min-height: 44px; border: 0; border-radius: 0; background: var(--agenda-paper); padding: 10px 4px 22px; font-size: 17px; font-variant-numeric: tabular-nums; text-align: center; }
.crg-monthly-agenda .crg-monthly-agenda__day.has-events { background: var(--agenda-selected); font-weight: 800; }
.crg-monthly-agenda .crg-monthly-agenda__day.has-events::after { content: ''; position: absolute; width: 5px; height: 5px; background: var(--agenda-accent); border-radius: 50%; left: calc(50% - 2.5px); bottom: 12px; }
.crg-monthly-agenda .crg-monthly-agenda__day[aria-current="date"] > span { border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.crg-monthly-agenda .crg-monthly-agenda__day[aria-pressed="true"] { background: var(--agenda-night); color: oklch(98% .004 244); }
.crg-monthly-agenda .crg-monthly-agenda__day[aria-pressed="true"]::after { background: oklch(88% .05 244); }
.crg-monthly-agenda .crg-monthly-agenda__day:not([aria-pressed="true"]):hover { background: oklch(86% .035 244); color: var(--agenda-ink); }
.crg-monthly-agenda .crg-monthly-agenda__day:focus-visible { outline-offset: -4px; z-index: 1; }
.crg-monthly-agenda .crg-monthly-agenda__outside { height: 64px; display: flex; justify-content: center; align-items: center; padding-bottom: 12px; color: var(--agenda-muted); background: var(--agenda-wash); font-size: 14px; }
.crg-monthly-agenda__calendar-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 16px; font-size: 12px; color: var(--agenda-muted); }
.crg-monthly-agenda__calendar-footer > span { display: flex; gap: 8px; align-items: center; }
.crg-monthly-agenda__calendar-footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--agenda-accent); }
.crg-monthly-agenda__calendar-footer > div { display: flex; gap: 8px; }
.crg-monthly-agenda__calendar-footer button { border: 0; text-decoration: underline; text-underline-offset: 4px; padding-inline: 9px; font-size: 13px; }
.crg-monthly-agenda__programme > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding-bottom: 20px; border-bottom: 1px solid var(--agenda-line); margin-bottom: 4px; }
.crg-monthly-agenda__programme h3 { margin: 0; font-size: 23px; line-height: 1.25; letter-spacing: -.02em; }
.crg-monthly-agenda__programme > header button { flex: 0 0 auto; font-size: 12px; padding-inline: 10px; }
.crg-monthly-agenda.is-enhanced .crg-monthly-agenda__programme { min-height: 544px; }
.crg-monthly-agenda.is-enhanced .crg-monthly-agenda__entries { height: 445px; overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.crg-agenda-entry { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 22px; align-items: start; padding-block: 25px; border-bottom: 1px solid var(--agenda-line); }
.crg-calendar-badge { width: 94px; background: var(--agenda-night); color: oklch(98% .004 244); text-align: center; overflow: hidden; }
.crg-calendar-badge strong { display: block; font-size: 27px; line-height: 1; font-weight: 800; letter-spacing: -.04em; padding: 17px 5px 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crg-calendar-badge span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .065em; padding: 7px 5px; background: oklch(33% .055 250); }
.crg-calendar-badge--pending { color: var(--agenda-ink); background: var(--agenda-wash); }
.crg-calendar-badge--pending strong { font-size: 13px; line-height: 1.3; letter-spacing: 0; white-space: normal; }
.crg-calendar-badge--pending span { color: var(--agenda-muted); background: var(--agenda-selected); }
.crg-agenda-entry h4 { margin: 0; font-size: clamp(20px, 1.7vw, 25px); line-height: 1.3; letter-spacing: -.018em; font-weight: 800; }
.crg-agenda-entry h4 a { color: inherit; text-decoration: underline; text-decoration-color: var(--agenda-line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.crg-agenda-entry h4 a:hover { color: var(--agenda-accent); text-decoration-color: currentColor; }
.crg-agenda-entry h4 a span { white-space: nowrap; font-size: .75em; }
.crg-agenda-entry__description { font-size: 15px; line-height: 1.6; margin: 12px 0 0; color: var(--agenda-ink); }
.crg-agenda-entry__date { font-size: 12px; line-height: 1.5; margin: 7px 0 0; color: var(--agenda-muted); }
.crg-agenda-entry__participation { margin-top: 12px; font-size: 14px; line-height: 1.5; }
.crg-agenda-entry__participation summary { cursor: pointer; min-height: 44px; padding-block: 12px; font-weight: 700; }
.crg-agenda-entry__participation ul { list-style: none; margin: 0; padding: 0; }
.crg-agenda-entry__participation li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--agenda-line); }
.crg-agenda-entry__participation p { margin: 6px 0; }
.crg-agenda-entry__participation strong { font-weight: 800; }
.crg-agenda-entry__context { margin: 9px 0 0; font-size: 14px; line-height: 1.5; color: var(--agenda-muted); }
.crg-agenda-entry__year { margin: 5px 0 0; color: var(--agenda-muted); font-size: 12px; }
.crg-monthly-agenda.is-enhanced .crg-agenda-entry__year { display: none; }
.crg-agenda-entry__status { color: var(--agenda-accent); font-size: 12px; font-weight: 800; margin: 0 0 8px; }
.crg-monthly-agenda__empty { margin: 30px 0; font-size: 17px; line-height: 1.6; color: var(--agenda-muted); max-width: 38ch; }
.crg-monthly-agenda__pending-note { font-size: 13px; line-height: 1.5; color: var(--agenda-muted); margin: 14px 0 0; }
.crg-home-agenda-preview ul { padding: 0; margin: 0 0 20px; list-style: none; }
.crg-home-agenda-preview li { border-bottom: 1px solid var(--agenda-line); }
.crg-home-agenda-preview li > a { display: grid !important; grid-template-columns: 88px minmax(0, 1fr) 16px; align-items: start; gap: 18px; padding-block: 21px !important; text-decoration: none; color: var(--agenda-ink); }
.crg-home-agenda-preview .crg-calendar-badge { width: 88px; }
.crg-home-agenda-preview .crg-calendar-badge span { color: oklch(98% .004 244); }
.crg-home-latest__agenda .crg-home-agenda-preview h4 { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0; }
.crg-home-story .crg-home-latest__agenda .crg-home-agenda-preview li { border-top: 0; }
.crg-home-agenda-preview li p { font-size: 13px; line-height: 1.5; color: var(--agenda-muted); margin: 8px 0 0; }
.crg-home-agenda-preview li a:hover h4 { text-decoration: underline; text-underline-offset: 4px; }
html[data-crg-contrast="high"] :is(.crg-monthly-agenda, .crg-home-agenda-preview), html[data-crg-contrast="inverse"] :is(.crg-monthly-agenda, .crg-home-agenda-preview) { --agenda-paper: var(--crg-paper); --agenda-ink: var(--crg-ink); --agenda-muted: var(--crg-ink); --agenda-line: var(--crg-ink); --agenda-wash: var(--crg-surface); --agenda-selected: var(--crg-surface); --agenda-accent: var(--crg-ink); }
@media (max-width: 900px) {
  .crg-monthly-agenda.is-enhanced .crg-monthly-agenda__layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .crg-monthly-agenda__calendar { max-width: 650px; width: 100%; margin-inline: auto; }
  .crg-monthly-agenda__heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 28px; }
}
@media (max-width: 480px) {
  .crg-monthly-agenda .crg-wrap { width: calc(100% - 24px); }
  .crg-monthly-agenda__heading h2 { font-size: 31px; }
  .crg-monthly-agenda__heading p { font-size: 15px; }
  .crg-monthly-agenda__toolbar { margin-bottom: 16px; }
  .crg-monthly-agenda .crg-monthly-agenda__day { height: 49px; padding-bottom: 17px; font-size: 15px; }
  .crg-monthly-agenda .crg-monthly-agenda__outside { height: 49px; padding-bottom: 7px; }
  .crg-monthly-agenda .crg-monthly-agenda__day.has-events::after { bottom: 7px; }
  .crg-monthly-agenda__programme h3 { font-size: 20px; }
  .crg-agenda-entry { grid-template-columns: 78px minmax(0, 1fr); gap: 16px; }
  .crg-calendar-badge { width: 78px; }
  .crg-calendar-badge strong { font-size: 23px; }
  .crg-calendar-badge--pending strong { font-size: 12px; }
  .crg-agenda-entry h4 { font-size: 20px; }
  .crg-home-agenda-preview li > a { grid-template-columns: 76px minmax(0, 1fr) 12px; gap: 12px; }
  .crg-home-agenda-preview .crg-calendar-badge { width: 76px; }
}
@media (forced-colors: active) {
  .crg-monthly-agenda, .crg-home-agenda-preview { --agenda-paper: Canvas; --agenda-ink: CanvasText; --agenda-muted: CanvasText; --agenda-night: Highlight; --agenda-wash: Canvas; --agenda-line: CanvasText; --agenda-selected: Canvas; --agenda-accent: Highlight; }
  .crg-monthly-agenda .crg-monthly-agenda__day[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: -4px; }
  .crg-calendar-badge { border: 1px solid CanvasText; }
}
