/*
 * Church Events: event cards, event pages and the month view.
 * Colours come from the theme's --rc-* tokens (Iteration skin, light and dark), with
 * the brand values as fallbacks for the other skins. Copper tile and labels, rounded
 * corners, no shadows beyond the theme's own.
 */
.ce-list-block,
.ce-event,
.ce-calendar,
.ce-week {
  --ce-copper: #c97d42;
  --ce-on-copper: #1e1e1e;
  /* Calls to action are patina (the theme's --rc-cta tokens; fallbacks are the light-mode values). */
  --ce-cta: var(--rc-cta, #2f6f64);
  --ce-cta-hover: var(--rc-cta-hover, #245a51);
  --ce-on-cta: var(--rc-on-cta, #ffffff);
  --ce-link: var(--rc-link, #8f5222);
  --ce-link-hover: var(--rc-link-hover, #6f3f19);
  --ce-text: var(--rc-text, #1e1e1e);
  --ce-strong: var(--rc-text-strong, #111);
  --ce-muted: var(--rc-muted, #5a5a5a);
  --ce-border: var(--rc-border, #e5ddd4);
  --ce-surface: var(--rc-surface, #fff);
  --ce-surface-hover: var(--rc-surface-hover, #f4ede6);
  --ce-tint: var(--rc-tint, rgba(201, 125, 66, .12));
  --ce-sand: var(--rc-sand, #f4ede6);
  --ce-sand-border: var(--rc-sand-border, #e2d5c7);
  --ce-radius: .5rem;
  color: var(--ce-text);
}

/* ─── Shared bits ─────────────────────────────────────────────────────────── */

.ce-label {
  margin: 0 0 .5rem;
  color: var(--ce-link);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ce-rule {
  display: block;
  width: 4rem;
  height: 2px;
  margin: 1rem 0 1.25rem;
  background: var(--ce-copper);
}

.ce-link {
  color: var(--ce-link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.ce-link:hover,
.ce-link:focus-visible {
  color: var(--ce-link-hover);
}

.ce-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border: 1px solid var(--ce-cta);
  border-radius: 999px;
  background: var(--ce-cta);
  color: var(--ce-on-cta);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.ce-btn:hover,
.ce-btn:focus-visible {
  background: var(--ce-cta-hover);
  border-color: var(--ce-cta-hover);
  color: var(--ce-on-cta);
}

.ce-btn-quiet {
  padding: .35rem .8rem;
  border-color: var(--ce-copper);
  background: transparent;
  color: var(--ce-link);
  font-size: .875rem;
}

.ce-btn-quiet:hover,
.ce-btn-quiet:focus-visible {
  background: var(--ce-tint);
  color: var(--ce-link-hover);
  border-color: var(--ce-copper);
}

.ce-flag {
  display: inline-block;
  margin-right: .4rem;
  padding: .05rem .45rem;
  border-radius: .25rem;
  background: var(--ce-strong);
  color: var(--ce-surface);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ce-empty {
  color: var(--ce-muted);
}

/* ─── Menus (Add to calendar, Subscribe): <details>, no JavaScript ───────── */

.ce-menu {
  position: relative;
  display: inline-block;
}

.ce-menu > summary {
  list-style: none;
}

.ce-menu > summary::-webkit-details-marker {
  display: none;
}

.ce-menu > summary::after {
  content: "";
  width: .4em;
  height: .4em;
  margin-left: .1rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-.15em) rotate(45deg);
}

.ce-menu[open] > summary::after {
  transform: translateY(.1em) rotate(-135deg);
}

.ce-menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + .35rem);
  left: 0;
  min-width: 13rem;
  margin: 0;
  padding: .4rem;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  background: var(--ce-surface);
  box-shadow: var(--rc-shadow, 0 10px 30px rgba(30, 30, 30, .1));
  list-style: none;
}

.ce-menu-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-menu-list a {
  display: block;
  padding: .45rem .65rem;
  border-radius: .35rem;
  color: var(--ce-text);
  text-decoration: none;
}

.ce-menu-list a:hover,
.ce-menu-list a:focus-visible {
  background: var(--ce-surface-hover);
  color: var(--ce-link);
}

.ce-menu-wide {
  width: min(20rem, calc(100vw - 2rem));
  padding: .75rem;
}

.ce-menu-note {
  display: block;
  margin: 0 0 .4rem;
  color: var(--ce-muted);
  font-size: .8125rem;
}

.ce-feed-url {
  width: 100%;
  margin-top: .1rem;
  padding: .4rem .5rem;
  border: 1px solid var(--ce-border);
  border-radius: .35rem;
  background: transparent;
  color: var(--ce-text);
  font-size: .8125rem;
}

/* ─── Event cards (Event List blocks, list and phone views) ───────────────── */

.ce-list-block-title {
  margin-bottom: 1rem;
}

.ce-cards {
  display: grid;
  gap: .75rem;
}

/* The theme's "This Week" Event List: one card per day (elements/day_card.php), in rows
   split evenly, at most four across (5 days = 3 + 2, 7 = 4 + 3), set by --ce-cols on the
   element. Narrower screens keep the theme's own wrapping. The [style] and .ce-list-block
   raise these over the theme's card grid. */
@media (min-width: 62rem) {
  .ce-list-block .ce-cards.ce-cards-balanced[style] {
    grid-template-columns: repeat(var(--ce-cols, 4), minmax(0, 1fr));
  }
}

/* The date on its own row, then the tile and events at the top of the rest: a card
   stretched to its row's height gives the extra space to the last row, so the tile
   stays at the top on a day with one event (in every skin). */
.ce-list-block .ce-cards-balanced[style] .ce-card.ce-day-card {
  grid-template-rows: auto 1fr;
  align-content: start;
  align-items: start;
}

.ce-day-card-title {
  grid-column: 1 / -1;
  margin: 0 0 .25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--ce-border);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ce-strong);
}

/* Today's card: a patina "Today" tag sitting on its top edge, and a copper outline over a
   warm tint, so it reads apart from a card's hover border. */
.ce-day-card.is-today {
  position: relative;
  border-color: var(--ce-copper);
  box-shadow: inset 0 0 0 1px var(--ce-copper);
  background: linear-gradient(var(--ce-tint), var(--ce-tint)), var(--ce-surface);
}

.ce-day-card.is-today .ce-day-card-title {
  border-bottom-color: color-mix(in srgb, var(--ce-copper) 45%, transparent);
}

.ce-today-tag {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 1rem;
  transform: translateY(-50%);
  padding: .2rem .5rem;
  border-radius: 999px;
  background: var(--ce-cta);
  color: var(--ce-on-cta);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ce-day-card-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-day-card-list li + li {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--ce-border);
}

.ce-day-card-name {
  display: block;
  color: var(--ce-strong);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.ce-day-card-name:hover,
.ce-day-card-name:focus-visible {
  color: var(--ce-link);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.ce-day-card-time {
  display: block;
  margin-top: .15rem;
  font-size: .875rem;
  color: var(--ce-muted);
}

.ce-day-card-list .is-cancelled .ce-day-card-name {
  text-decoration: line-through;
  color: var(--ce-muted);
}

.ce-card {
  display: grid;
  grid-template-columns: 3.75rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  background: var(--ce-surface);
  transition: background-color .2s ease, border-color .2s ease;
}

.ce-card:hover {
  border-color: var(--ce-copper);
}

/* Cards with a header image: the photo sits in an extra column on the right, so cards
   without one keep the same two columns and line up with the rest. The card is its own
   size container, so the photo drops out in narrow places (phones, sidebars). */
.ce-card.has-thumb {
  container-type: inline-size;
}

.ce-thumb {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  display: block;
  width: 10rem;
  aspect-ratio: 660 / 428;
  overflow: hidden;
  border-radius: var(--ce-radius);
  background: var(--ce-tint);
}

.ce-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.ce-card:hover .ce-thumb img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .ce-thumb img {
    transition: none;
  }

  .ce-card:hover .ce-thumb img {
    transform: none;
  }
}

@container (max-width: 34rem) {
  .ce-thumb {
    display: none;
  }
}

.ce-card + .ce-card {
  margin-top: 0;
}

.ce-list > .ce-card,
.ce-agenda > .ce-card {
  margin-bottom: .75rem;
}

.ce-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: var(--ce-radius);
  background: var(--ce-copper);
  color: var(--ce-on-copper);
  line-height: 1;
  text-decoration: none;
}

.ce-tile:hover {
  color: var(--ce-on-copper);
}

.ce-tile-month {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.ce-tile-day {
  margin-top: .2rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.ce-card-body {
  min-width: 0;
}

.ce-card-title {
  margin: 0 0 .25rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.ce-card-title a {
  color: var(--ce-strong);
  text-decoration: none;
}

.ce-card-title a:hover,
.ce-card-title a:focus-visible {
  color: var(--ce-link);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.ce-card-when,
.ce-card-where,
.ce-card-summary {
  margin: 0 0 .25rem;
  font-size: .9375rem;
}

.ce-card-where,
.ce-card-summary {
  color: var(--ce-muted);
}

.ce-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: .6rem;
}

.ce-card.is-cancelled .ce-card-title a,
.ce-card.is-cancelled .ce-card-when {
  color: var(--ce-muted);
}

.ce-card.is-cancelled .ce-card-title a {
  text-decoration: line-through;
}

.ce-card.is-cancelled .ce-tile {
  background: var(--ce-border);
}

.ce-card.is-cancelled .ce-thumb img {
  filter: grayscale(1);
  opacity: .6;
}

.ce-list-block-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.25rem;
  margin-top: 1rem;
}

/* "Next class" template (Faith Foundations): the start date, its card, then the ask. */
.ce-next-class-lead {
  margin-bottom: .75rem;
}

.ce-next-class .ce-cards + .ce-next-class-ask {
  margin-top: 1rem;
}

.ce-list-block .ce-menu-list {
  left: auto;
  right: 0;
}

@media (min-width: 576px) {
  .ce-list-block .ce-menu-list {
    left: 0;
    right: auto;
  }
}

/* ─── Event page ──────────────────────────────────────────────────────────── */

.ce-event {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.ce-event-image {
  margin-bottom: 1.75rem;
  overflow: hidden;
  border-radius: var(--ce-radius);
}

.ce-event-image img {
  display: block;
  width: 100%;
  height: auto;
  /* Reserves the photo's space before it loads, so the page doesn't jump (CLS). */
  aspect-ratio: 16 / 9;
  max-height: 26rem;
  object-fit: cover;
}

.ce-event-title {
  margin: 0;
  color: var(--ce-strong);
  font-weight: 700;
  line-height: 1.1;
}

.ce-notice {
  display: inline-block;
  padding: .4rem .75rem;
  border-radius: .35rem;
  background: var(--ce-tint);
  font-weight: 600;
}

.ce-notice--info {
  border-left: 3px solid var(--ce-link);
  font-weight: 500;
}

.ce-volunteers {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--ce-border);
  border-radius: .5rem;
  background: var(--ce-surface);
}

.ce-volunteers p {
  margin: 0 0 .5rem;
}

.ce-volunteers-list {
  margin: 0;
  padding-left: 1.1rem;
}

.ce-rsvp {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--ce-border);
  border-radius: .5rem;
  background: var(--ce-surface);
}

.ce-rsvp-form {
  display: grid;
  gap: .35rem;
  max-width: 28rem;
}

.ce-rsvp-form label {
  margin-top: .4rem;
  font-weight: 600;
}

.ce-rsvp-form input,
.ce-rsvp-form select,
.ce-rsvp-form textarea {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid var(--ce-border);
  border-radius: .375rem;
  background: transparent;
  color: var(--ce-text);
  font: inherit;
}

.ce-rsvp-form .ce-btn {
  justify-self: start;
  margin-top: .75rem;
}

.ce-rsvp-cancel {
  margin-top: .75rem;
}

.ce-rsvp-message {
  padding: .5rem .75rem;
  border-left: 3px solid var(--ce-cta);
  font-weight: 500;
}

.ce-rsvp-message--error {
  border-left-color: #b3261e;
}

.ce-rsvp-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ce-featured-badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: var(--ce-cta);
  color: var(--ce-on-cta);
  font-size: .75rem;
  font-weight: 700;
  vertical-align: middle;
}

.ce-featured {
  margin-bottom: 1.5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--ce-border);
}

.ce-month-event.is-featured {
  font-weight: 700;
  border-left: 3px solid var(--ce-cta);
}

.ce-card-notice {
  margin: .25rem 0 0;
  font-size: .9rem;
  font-weight: 600;
}

.ce-event-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .ce-event-layout {
    grid-template-columns: minmax(0, 1fr) 16rem;
  }
}

.ce-details {
  display: grid;
  gap: .9rem;
  margin: 0 0 1.5rem;
}

.ce-details > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
}

.ce-details dt {
  padding-top: .2rem;
  color: var(--ce-link);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ce-details dd {
  margin: 0;
  font-size: 1.0625rem;
}

/* "Led by": the team leads who said yes for this date, each with a photo or initials. */
.ce-details-leaders dt {
  padding-top: .9rem;
}

.ce-leaders {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-leader {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.ce-leader-photo {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: .375rem;
  object-fit: cover;
  background: var(--ce-sand);
}

.ce-leader-initials {
  border: 1px solid var(--ce-sand-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ce-link);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.ce-leader-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.ce-leader-name {
  font-weight: 600;
}

.ce-leader-role {
  color: var(--ce-muted);
  font-size: .875rem;
}

.ce-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2rem;
}

.ce-event-description {
  max-width: 40rem;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.ce-event-description a {
  color: var(--ce-link);
}

.ce-event-aside {
  padding: 1.5rem;
  border: 1px solid var(--ce-sand-border);
  border-radius: var(--ce-radius);
  background: var(--ce-sand);
  align-self: start;
}

.ce-aside-title {
  margin: 0 0 .75rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ce-link);
}

.ce-next {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-next li + li {
  margin-top: .5rem;
}

.ce-next a {
  color: var(--ce-text);
  font-size: .9375rem;
}

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

.ce-back {
  margin-top: 2.5rem;
}

/* ─── Calendar page ───────────────────────────────────────────────────────── */

.ce-calendar {
  padding: 1.5rem 0 3rem;
}

.ce-calendar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ce-calendar-title {
  margin: 0;
  color: var(--ce-strong);
  font-weight: 700;
}

.ce-calendar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.ce-calendar-tools .ce-menu-list {
  left: auto;
  right: 0;
}

.ce-toggle {
  display: inline-flex;
  padding: .2rem;
  border: 1px solid var(--ce-border);
  border-radius: 999px;
}

.ce-toggle a {
  padding: .35rem .9rem;
  border-radius: 999px;
  color: var(--ce-text);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.ce-toggle a[aria-current] {
  background: var(--ce-copper);
  color: var(--ce-on-copper);
}

.ce-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.5rem;
}

.ce-filters a {
  padding: .3rem .75rem;
  border: 1px solid var(--ce-border);
  border-radius: 999px;
  color: var(--ce-text);
  font-size: .875rem;
  text-decoration: none;
}

.ce-filters a:hover {
  border-color: var(--ce-copper);
  color: var(--ce-link);
}

.ce-filters a[aria-current] {
  border-color: var(--ce-copper);
  background: var(--ce-tint);
  color: var(--ce-link);
  font-weight: 600;
}

.ce-month-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.ce-month {
  display: none;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  overflow: hidden;
}

.ce-month th {
  padding: .5rem;
  border-bottom: 1px solid var(--ce-border);
  color: var(--ce-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
}

.ce-month td {
  height: 7rem;
  padding: .4rem;
  border-right: 1px solid var(--ce-border);
  border-bottom: 1px solid var(--ce-border);
  vertical-align: top;
}

.ce-month td:last-child {
  border-right: 0;
}

.ce-month tr:last-child td {
  border-bottom: 0;
}

.ce-month td.is-outside {
  background: var(--ce-tint);
  opacity: .55;
}

.ce-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  margin-bottom: .25rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
}

.ce-month td.is-today .ce-day-number {
  background: var(--ce-copper);
  color: var(--ce-on-copper);
}

.ce-month-event {
  display: block;
  margin-bottom: .25rem;
  padding: .2rem .4rem;
  overflow: hidden;
  border-left: 3px solid var(--ce-copper);
  border-radius: .25rem;
  background: var(--ce-tint);
  color: var(--ce-text);
  font-size: .8125rem;
  line-height: 1.3;
  text-decoration: none;
  text-overflow: ellipsis;
}

.ce-month-event:hover,
.ce-month-event:focus-visible {
  color: var(--ce-link);
  text-decoration: underline;
}

.ce-month-event.is-cancelled {
  text-decoration: line-through;
  opacity: .6;
}

.ce-month-time {
  display: block;
  color: var(--ce-muted);
  font-size: .75rem;
  font-weight: 600;
}

.ce-list-month {
  margin: 2rem 0 .75rem;
  color: var(--ce-link);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ce-list-month:first-child {
  margin-top: 0;
}

/* The month grid needs room; phones get the same month as a day-by-day agenda. */
@media (min-width: 768px) {
  .ce-month {
    display: table;
  }

  .ce-agenda {
    display: none;
  }
}

/* ─── Theme link colours ──────────────────────────────────────────────────────
 * The Iteration skin colours every link copper (div.theme-restoration a:not(.btn),
 * specificity 0,2,2) and underlines links in lists. That turned the tile's day and
 * month copper on copper, and the selected Month/List toggle the same. These links
 * keep their own colours; the extra :not(.btn) lifts each selector above the theme's.
 */
:is(.ce-list-block, .ce-event, .ce-calendar) a.ce-tile:not(.btn),
:is(.ce-list-block, .ce-event, .ce-calendar) a.ce-tile:not(.btn):hover,
.ce-tile-month,
.ce-tile-day {
  color: var(--ce-on-copper);
  text-decoration: none;
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-card-title a:not(.btn) {
  color: var(--ce-strong);
  text-decoration: none;
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-card-title a:not(.btn):hover,
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-card-title a:not(.btn):focus-visible {
  color: var(--ce-link);
  text-decoration: underline;
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-menu-list a:not(.btn),
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-toggle a:not(.btn),
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-filters a:not(.btn),
:is(.ce-list-block, .ce-event, .ce-calendar) a.ce-month-event:not(.btn),
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-next a:not(.btn) {
  color: var(--ce-text);
  text-decoration: none;
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-menu-list a:not(.btn):hover,
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-menu-list a:not(.btn):focus-visible,
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-filters a:not(.btn):hover,
:is(.ce-list-block, .ce-event, .ce-calendar) a.ce-month-event:not(.btn):hover,
:is(.ce-list-block, .ce-event, .ce-calendar) a.ce-month-event:not(.btn):focus-visible,
:is(.ce-list-block, .ce-event, .ce-calendar) .ce-next a:not(.btn):hover {
  color: var(--ce-link);
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-toggle a[aria-current]:not(.btn) {
  color: var(--ce-on-copper);
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-filters a[aria-current]:not(.btn) {
  color: var(--ce-link);
}

/* Calendar filters: wrap within the page on any width, long names included. */
.ce-filters {
  max-width: 100%;
  min-width: 0;
}

.ce-filters a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ce-calendar,
.ce-calendar-header > div,
.ce-calendar-tools {
  min-width: 0;
}

:is(.ce-list-block, .ce-event, .ce-calendar) .ce-card.is-cancelled .ce-card-title a:not(.btn) {
  color: var(--ce-muted);
  text-decoration: line-through;
}

.ce-card.is-cancelled .ce-tile-month,
.ce-card.is-cancelled .ce-tile-day {
  color: var(--ce-muted);
}

/* ─── Our week (the Our Week block) ───────────────────────────────────────── */

.ce-week {
  margin: 0 0 2rem;
}

.ce-week-title {
  margin-bottom: 1rem;
}

.ce-week-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .75rem;
}

.ce-week-day {
  padding: 1rem 1.125rem;
  border: 1px solid var(--ce-border);
  border-radius: var(--ce-radius);
  background: var(--ce-surface);
}

.ce-week-day .ce-label {
  font-family: inherit;
}

.ce-week-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-week-list li + li {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--ce-border);
}

.ce-week-name {
  display: block;
  color: var(--ce-strong);
  font-weight: 600;
  text-decoration: none;
}

.ce-week-name:hover,
.ce-week-name:focus-visible {
  color: var(--ce-link);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.ce-week-time,
.ce-week-often {
  display: block;
  font-size: .9375rem;
}

.ce-week-often {
  color: var(--ce-muted);
}

.ce-week-footer {
  margin: 1rem 0 0;
}
