/* ==========================================================
   JCL EVENTS CALENDAR
   themes/jcl-theme/assets/css/events.css
   ----------------------------------------------------------
   The live LibCal calendar ([jcl_events], inc/events.php) on the
   home page and the Explore by pages, with assets/js/home.js.
   Loaded after home.css / pages.css.
   ========================================================== */
:where(.jcl-demo-page) .events-cal-section { background: var(--surface); }
:where(.jcl-demo-page) .cal-shell { display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 16px;
    align-items: stretch;
    margin-top: 4px; }
:where(.jcl-demo-page) .cal-pane,
:where(.jcl-demo-page) .agenda-pane { background: var(--surface);
    border: 1px solid var(--line);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; }
:where(.jcl-demo-page) .cal-pane-hd { display: flex; justify-content: space-between; align-items: end;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px; }
:where(.jcl-demo-page) .cal-month-title { display: flex; flex-direction: column; gap: 2px; }
:where(.jcl-demo-page) .cal-month-name { font-family: var(--font-brand);
    font-size: 22px; font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--navy);
    line-height: 1; }
:where(.jcl-demo-page) .cal-month-sub { font-size: 12px; font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.02em; }
:where(.jcl-demo-page) .cal-month-nav { display: flex; gap: 6px; }
:where(.jcl-demo-page) .cal-nav-btn { width: 30px; height: 30px;
    border: 1px solid var(--line-strong);
    display: grid; place-items: center;
    background: var(--surface);
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    transition: all var(--dur-fast) var(--ease); }
:where(.jcl-demo-page) .cal-nav-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
:where(.jcl-demo-page) .cal-grid { display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 4px;
    flex: 1;
    min-height: 0; }
:where(.jcl-demo-page) .cal-dow { text-align: left;
    font-family: var(--font-brand);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 2px 6px 6px; }
:where(.jcl-demo-page) .cal-day { background: var(--surface-alt);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    position: relative;
    padding: 4px 5px;
    display: flex; flex-direction: column;
    gap: 3px;
    min-height: 72px;
    overflow: hidden; }
:where(.jcl-demo-page) .cal-day:hover:not(.cal-mute):not(.cal-today) { background: var(--surface);
    box-shadow: 0 2px 10px rgba(5,36,96,0.10);
    transform: translateY(-1px);
    z-index: 2; }
:where(.jcl-demo-page) .cal-day .dn { font-family: var(--font-brand);
    font-size: 12px; font-weight: 700;
    color: var(--navy);
    line-height: 1;
    padding: 1px 2px 2px; }
:where(.jcl-demo-page) .cal-day.cal-mute { opacity: 0.35; background: transparent; cursor: default; }
:where(.jcl-demo-page) .cal-day.cal-mute .dn { color: var(--ink-soft); font-weight: 500; }
:where(.jcl-demo-page) .ev-pill { font-family: var(--font-display);
    font-size: 12px; font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    padding: 2px 5px;
    color: var(--surface);
    background: var(--navy);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 2px solid transparent; }
:where(.jcl-demo-page) .ev-pill.ev-navy { background: rgba(5,36,96,0.10); color: var(--navy); border-left-color: var(--navy); }
:where(.jcl-demo-page) .ev-pill.ev-red { background: rgba(218,44,56,0.10); color: var(--red); border-left-color: var(--red); }
:where(.jcl-demo-page) .ev-pill.ev-orange { background: rgba(255,107,53,0.14); color: #c04a20; border-left-color: var(--orange); }
:where(.jcl-demo-page) .ev-pill.ev-ink { background: rgba(10,10,10,0.08); color: var(--ink); border-left-color: var(--ink); }
:where(.jcl-demo-page) .ev-more { font-family: var(--font-brand);
    font-size: 12px; font-weight: 700;
    color: var(--ink-soft);
    padding: 0 4px;
    letter-spacing: 0.02em; }
:where(.jcl-demo-page) .cal-day.cal-today { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(5,36,96,0.28); }
:where(.jcl-demo-page) .cal-day.cal-today .dn { color: #fff; font-size: 14px; }
:where(.jcl-demo-page) .cal-day.cal-today .ev-pill { background: rgba(255,255,255,0.14);
    color: #fff;
    border-left-color: var(--orange); }
:where(.jcl-demo-page) .cal-day.cal-today .ev-more { color: rgba(255,255,255,0.75); }
:where(.jcl-demo-page) .cal-today-tag { position: absolute; top: 4px; right: 4px;
    font-family: var(--font-brand);
    font-size: 8px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--orange);
    background: rgba(255,255,255,0.16);
    padding: 1px 5px;
    line-height: 1.4; }
:where(.jcl-demo-page) .cal-legend { display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: 12px; font-weight: 600;
    color: var(--ink-muted); }
:where(.jcl-demo-page) .cal-legend .lg { display: flex; align-items: center; gap: 6px; }
:where(.jcl-demo-page) .cal-legend-spacer { flex: 1; }
:where(.jcl-demo-page) .cal-legend-link { font-family: var(--font-brand);
    font-weight: 700;
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(5,36,96,0.3);
    transition: text-decoration-color var(--dur-fast);
    font-size: 12px; }
:where(.jcl-demo-page) .cal-legend-link:hover { text-decoration-color: var(--red); color: var(--red); }
:where(.jcl-demo-page) .agenda-pane { position: sticky; top: 122px;
    max-height: calc(100vh - 130px); }
:where(.jcl-demo-page) .agenda-hd { display: flex; align-items: center; gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
    flex-shrink: 0; }
:where(.jcl-demo-page) .agenda-day-num { font-family: var(--font-brand);
    font-size: 40px; font-weight: 700;
    letter-spacing: -0.04em; line-height: 0.9;
    color: var(--red); }
:where(.jcl-demo-page) .agenda-day-label { font-family: var(--font-brand);
    font-size: 15px; font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--navy);
    line-height: 1.15; }
:where(.jcl-demo-page) .agenda-day-meta { font-size: 12px; font-weight: 600;
    color: var(--ink-soft);
    margin-top: 3px; }
:where(.jcl-demo-page) .agenda-list { display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    margin: -4px -4px 0;
    padding: 4px; }
:where(.jcl-demo-page) .agenda-list::-webkit-scrollbar { width: 6px; }
:where(.jcl-demo-page) .agenda-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
:where(.jcl-demo-page) .agenda-row { display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--surface-warm);
    border: 1px solid var(--line);
    color: inherit;
    transition: all var(--dur-fast) var(--ease);
    flex-shrink: 0; }
:where(.jcl-demo-page) .agenda-row:hover { background: var(--surface);
    border-color: var(--line-strong);
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(5,36,96,0.08); }
:where(.jcl-demo-page) .agenda-row.featured { background: linear-gradient(135deg, rgba(218,44,56,0.06) 0%, rgba(255,107,53,0.05) 100%);
    border-color: rgba(218,44,56,0.24); }
:where(.jcl-demo-page) .agenda-row.featured:hover { border-color: rgba(218,44,56,0.4);
    box-shadow: 0 6px 20px rgba(218,44,56,0.14); }
:where(.jcl-demo-page) .agenda-time { text-align: center;
    padding: 7px 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex; flex-direction: column;
    align-items: center; }
:where(.jcl-demo-page) .agenda-row.featured .agenda-time { background: var(--navy);
    color: #fff;
    border-color: var(--navy); }
:where(.jcl-demo-page) .agenda-time .ah { font-family: var(--font-brand);
    font-size: 15px; font-weight: 700;
    letter-spacing: -0.02em; line-height: 1;
    color: var(--navy); }
:where(.jcl-demo-page) .agenda-row.featured .agenda-time .ah { color: #fff; }
:where(.jcl-demo-page) .agenda-time .ap { font-family: var(--font-brand);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin-top: 3px; }
:where(.jcl-demo-page) .agenda-row.featured .agenda-time .ap { color: rgba(255,255,255,0.7); }
:where(.jcl-demo-page) .agenda-body { min-width: 0; }
:where(.jcl-demo-page) .agenda-tag { display: inline-block;
    font-family: var(--font-brand);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    margin-bottom: 4px; }
:where(.jcl-demo-page) .agenda-tag.tag-navy { background: rgba(5,36,96,0.10); color: var(--navy); }
:where(.jcl-demo-page) .agenda-tag.tag-red { background: rgba(218,44,56,0.10); color: var(--red); }
:where(.jcl-demo-page) .agenda-tag.tag-orange { background: rgba(255,107,53,0.14); color: var(--orange); }
:where(.jcl-demo-page) .agenda-tag.tag-ink { background: rgba(10,10,10,0.08); color: var(--ink); }
:where(.jcl-demo-page) .agenda-title { font-family: var(--font-brand);
    font-size: 13px; font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--navy);
    margin-bottom: 2px; }
:where(.jcl-demo-page) .agenda-meta { font-size: 12px; font-weight: 600;
    color: var(--ink-soft);
    display: flex; align-items: center; gap: 5px;
    flex-wrap: wrap; }
:where(.jcl-demo-page) .agenda-dot { opacity: 0.5; }
:where(.jcl-demo-page) .agenda-arrow { font-family: var(--font-brand);
    font-size: 16px; font-weight: 700;
    color: var(--ink-soft);
    transition: all var(--dur-fast) var(--ease); }
:where(.jcl-demo-page) .agenda-row:hover .agenda-arrow { color: var(--red);
    transform: translateX(4px); }
:where(.jcl-demo-page) .agenda-viewall { display: block;
    margin-top: 10px;
    padding: 10px 14px;
    text-align: center;
    background: var(--surface-alt);
    border: 1px dashed var(--line-strong);
    font-family: var(--font-brand);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--navy);
    transition: all var(--dur-fast) var(--ease);
    flex-shrink: 0; }
:where(.jcl-demo-page) .agenda-viewall:hover { background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    border-style: solid; }
@media (max-width: 1080px) {
  :where(.jcl-demo-page) .cal-shell { grid-template-columns: 1fr; }
  :where(.jcl-demo-page) .agenda-pane { position: static; max-height: none; }
  :where(.jcl-demo-page) .agenda-list { overflow: visible; }
  :where(.jcl-demo-page) .cal-day { min-height: 68px; }
}
@media (max-width: 640px) {
  :where(.jcl-demo-page) .cal-pane,
  :where(.jcl-demo-page) .agenda-pane { padding: 14px; }
  :where(.jcl-demo-page) .cal-month-name { font-size: 18px; }
  :where(.jcl-demo-page) .cal-day { padding: 3px; min-height: 54px; }
  :where(.jcl-demo-page) .cal-day .dn { font-size: 12px; }
  :where(.jcl-demo-page) .ev-pill { font-size: 8px; padding: 1px 3px; }
  :where(.jcl-demo-page) .ev-more { font-size: 8px; }
  :where(.jcl-demo-page) .cal-grid { gap: 3px; }
  :where(.jcl-demo-page) .agenda-day-num { font-size: 32px; }
  :where(.jcl-demo-page) .agenda-row { grid-template-columns: 48px 1fr; padding: 10px; }
  :where(.jcl-demo-page) .agenda-arrow { display: none; }
  :where(.jcl-demo-page) .cal-today-tag { display: none; }
}
html[data-theme="dark"] :where(.jcl-demo-page) .cal-shell,
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day { background: var(--surface-alt); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day .dn { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day:hover { background: #303233; }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day.on { background: var(--red); color: #fff; }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day .dn,
html[data-theme="dark"] :where(.jcl-demo-page) .cal-shell h3 { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-shell,
html[data-theme="dark"] :where(.jcl-demo-page) .cal-pane,
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-pane { background: var(--surface-alt); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-month-name { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-month-sub { color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dow { color: var(--ink-soft); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day { background: transparent; border-color: var(--line); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day:hover:not(.cal-mute):not(.cal-today) { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day .dn { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day.cal-mute .dn { color: var(--ink-soft); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-nav-btn { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-nav-btn:hover { background: rgba(255,255,255,0.06); color: var(--ink); border-color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .ev-pill { background: rgba(255,255,255,0.08); color: var(--ink); border-left-color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .ev-pill.ev-navy { background: rgba(255,255,255,0.10); color: var(--ink); border-left-color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .ev-pill.ev-red { background: rgba(255,120,130,0.16); color: #ffb0b6; border-left-color: #ff8b8b; }
html[data-theme="dark"] :where(.jcl-demo-page) .ev-pill.ev-orange { background: rgba(255,170,110,0.14); color: #ffcb9c; border-left-color: #ffa070; }
html[data-theme="dark"] :where(.jcl-demo-page) .ev-pill.ev-ink { background: rgba(255,255,255,0.08); color: var(--ink); border-left-color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .ev-more { color: var(--ink-soft); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-legend { color: var(--ink-muted); border-top-color: var(--line); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-legend-link { color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-legend-link:hover { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day.cal-today { background: linear-gradient(135deg, #2d3966 0%, #1a2340 100%); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-pane { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-hd { border-bottom-color: var(--line); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-day-num { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-day-label { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-day-meta { color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row { background: var(--surface-alt);
    border-color: var(--line);
    color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row:hover { background: rgba(255,255,255,0.06);
    border-color: var(--line-strong);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured { background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.16); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-time { background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-time .ah { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-time .ap { color: var(--ink-soft); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured .agenda-time { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.16); color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured .agenda-time .ah { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured .agenda-time .ap { color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-tag.tag-navy { background: rgba(255,255,255,0.10); color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-tag.tag-red { background: rgba(255,255,255,0.08); color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-tag.tag-orange { background: rgba(255,255,255,0.08); color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-tag.tag-ink { background: rgba(255,255,255,0.06); color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-title { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-meta { color: var(--ink-soft); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-arrow { color: var(--ink-soft); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row:hover .agenda-arrow { color: var(--ink); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-viewall { color: var(--ink); border-color: var(--line-strong); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-viewall:hover { background: rgba(255,255,255,0.06); border-color: var(--ink); }
:where(.jcl-demo-page) .cal-grid { grid-template-rows: auto; }
/* Events calendar: LibCal's audiences (Adult, All Ages, Children, Teen) in LibCal's own colours. home.js sets each
   pill's --aud-bar (one 3px bar per audience at the left edge), --aud-w (their width) and --aud-tint (the colour, light,
   when the event has one audience). The text stays in the page's ink colour, so it reads on every audience colour. */
:where(.jcl-demo-page) .ev-pill.ev-aud,
html[data-theme="dark"] :where(.jcl-demo-page) .ev-pill.ev-aud {
  border-left: 0; padding-left: calc(5px + var(--aud-w, 0px));
  background-color: var(--aud-tint, rgba(128,128,128,0.12)); background-image: var(--aud-bar, none); background-repeat: no-repeat;
  color: var(--ink); }
:where(.jcl-demo-page) .cal-day.cal-today .ev-pill.ev-aud { background-color: rgba(255,255,255,0.14); background-image: var(--aud-bar, none); color: #fff; }
/* The day's list: the LibCal category, then each audience with its colour */
:where(.jcl-demo-page) .agenda-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; }
:where(.jcl-demo-page) .agenda-tags .agenda-tag { margin-bottom: 0; }
:where(.jcl-demo-page) .agenda-aud { display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-brand); font-size: 12px; font-weight: 700; color: var(--ink-muted); }
/* Colour swatches (chips, legend, the day's list): a thin edge keeps light colours such as Teen's yellow visible */
:where(.jcl-demo-page) .agenda-aud i { display: block; width: 10px; height: 10px; border-radius: 2px; }
:where(.jcl-demo-page) :is(.agenda-aud, .cal-legend-keys .lg, .cal-opt) i { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.28); }
html[data-theme="dark"] :where(.jcl-demo-page) :is(.agenda-aud, .cal-legend-keys .lg, .cal-opt) i { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
:where(.jcl-demo-page) .cal-legend-keys { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
:where(.jcl-demo-page) .cal-legend-keys .lg { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-muted); }
:where(.jcl-demo-page) .cal-legend-keys .lg i { width: 10px; height: 10px; border-radius: 2px; display: block; }
:where(.jcl-demo-page) .ev-pill { cursor: pointer; text-decoration: none; }
:where(.jcl-demo-page) .ev-pill:hover { filter: brightness(0.92); }
:where(.jcl-demo-page) .cal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 16px; }
:where(.jcl-demo-page) .cal-filter-lbl { font-size: 14px; font-weight: 700; color: var(--ink-muted); margin-right: 4px; }
:where(.jcl-demo-page) .cal-chip { padding: 7px 14px; font-size: 14px; font-weight: 600;
    border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface);
    transition: background var(--dur-fast) var(--ease-smooth), color var(--dur-fast) var(--ease-smooth), border-color var(--dur-fast) var(--ease-smooth); }
:where(.jcl-demo-page) .cal-chip:hover { border-color: var(--navy); }
:where(.jcl-demo-page) .cal-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
:where(.jcl-demo-page) .agenda-row[hidden] { display: none; }
:where(.jcl-demo-page) .agenda-empty { padding: 24px; text-align: center; color: var(--ink-muted); font-size: 15px; border: 1px dashed var(--line-strong); }
html[data-a11yw-contrast="light"] :where(.jcl-demo-page) .cal-shell,
html[data-a11yw-contrast="light"] :where(.jcl-demo-page) .agenda-row { border: 2px solid var(--ink) !important; box-shadow: none !important; }
html[data-a11yw-contrast="light"] :where(.jcl-demo-page) .ev-pill,
html[data-a11yw-contrast="light"] :where(.jcl-demo-page) .agenda-tag { color: var(--ink) !important; border: 1px solid var(--ink); }
html[data-a11yw-contrast="light"] :where(.jcl-demo-page) a:not(.btn):not(.event-row):not(.book-card):not(.branch-card):not(.svc-tile):not(.agenda-row):not(.brand):not(.mc-day):not(.ev-pill):not(.m-drawer-cta) { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  :where(.jcl-demo-page) .cal-filter { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  :where(.jcl-demo-page) .cal-chip { flex-shrink: 0; }
}
html[data-theme="dark"] :where(.jcl-demo-page) .cal-chip.is-active { background: #3a5ba8; border-color: #3a5ba8; }
@media (max-width: 720px) {
  :where(.jcl-demo-page) .cal-shell > * { min-width: 0; }
  :where(.jcl-demo-page) .cal-pane,
  :where(.jcl-demo-page) .agenda-pane { min-width: 0; }
  :where(.jcl-demo-page) .ev-pill { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* ==========================================================
   WordPress additions: live LibCal calendar (not in the mockup)
   ========================================================== */
/* Day numbers are buttons, so a day can be picked with the keyboard */
:where(.jcl-demo-page) .cal-day button.dn { align-self: flex-start; text-align: left; }
/* The day shown in the agenda */
:where(.jcl-demo-page) .cal-day.is-selected:not(.cal-today) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--navy); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-day.is-selected:not(.cal-today) { box-shadow: inset 0 0 0 2px var(--ink); }
:where(.jcl-demo-page) .cal-day.cal-today.is-selected { box-shadow: 0 6px 18px rgba(5,36,96,0.28), inset 0 0 0 2px var(--orange); }
/* While another month or day loads */
:where(.jcl-demo-page) .cal-grid[aria-busy="true"],
:where(.jcl-demo-page) .agenda-list[aria-busy="true"] { opacity: 0.5; transition: opacity var(--dur-fast); }
:where(.jcl-demo-page) .agenda-empty a { color: inherit; font-weight: 700; text-decoration: underline; }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured .agenda-meta,
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured .agenda-arrow { color: var(--ink-muted); }
html[data-theme="dark"] :where(.jcl-demo-page) .agenda-row.featured .agenda-time .ap { color: var(--ink); }
:where(.jcl-demo-page) .cal-today-tag { color: #ffd2bd; }
:where(.jcl-demo-page) .ev-pill.ev-red,
:where(.jcl-demo-page) .agenda-tag.tag-red { color: #c4222d; }
/* Events calendar: seven equal columns that always fit (long weekday names or event titles never widen a column) */
:where(.jcl-demo-page) .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
/* The day's number of events: phones only (below) */
:where(.jcl-demo-page) .ev-count { display: none; }
/* Phones (≤640px): short centred weekday names; each day shows its date with "6 events" in a small pill under it and
   takes the colours of its first event (tint + left edge, as the event pills have on wider screens); tapping a day
   lists its events, with titles, times, categories and links, below the month (home.js) */
@media (max-width: 640px) {
  :where(.jcl-demo-page) .cal-grid { gap: 3px; }
  :where(.jcl-demo-page) .cal-dow { padding: 2px 0 6px; font-size: 10px; letter-spacing: 0.04em; text-align: center; }
  :where(.jcl-demo-page) .cal-day { min-height: 58px; padding: 7px 3px 6px; gap: 5px; align-items: center; }
  :where(.jcl-demo-page) .cal-day .dn,
  :where(.jcl-demo-page) .cal-day button.dn { align-self: center; padding: 0; font-size: 15px; text-align: center; }
  :where(.jcl-demo-page) .cal-day.cal-today .dn { font-size: 15px; }
  :where(.jcl-demo-page) .cal-day > a.ev-pill,
  :where(.jcl-demo-page) .cal-day > .ev-more { display: none; }
  :where(.jcl-demo-page) .cal-grid .cal-day.tone-aud:not(.cal-today) {
      background-image: var(--aud-bar, none), linear-gradient(var(--aud-tint), var(--aud-tint)); background-repeat: no-repeat; }
  :where(.jcl-demo-page) .ev-count { display: block; max-width: 100%; padding: 2px 6px; border-radius: 9px;
      background: rgba(255,255,255,0.88); color: var(--navy);
      font-family: var(--font-display); font-size: 10px; font-weight: 600; line-height: 1.2; text-align: center; }
  :where(.jcl-demo-page) .ev-count b { font-weight: 800; }
  html[data-theme="dark"] :where(.jcl-demo-page) .ev-count { background: rgba(0,0,0,0.32); color: var(--ink); }
  :where(.jcl-demo-page) .cal-day.cal-today .ev-count { background: rgba(255,255,255,0.22); color: #fff; }
}
/* Narrow phones (≤420px): the grid takes a little more of the width, and "6 / events" sits on two lines in its pill */
@media (max-width: 420px) {
  :where(.jcl-demo-page) .cal-pane { padding: 12px 8px; }
  :where(.jcl-demo-page) .cal-grid { gap: 2px; }
  :where(.jcl-demo-page) .cal-day { padding: 6px 2px 5px; gap: 4px; }
  :where(.jcl-demo-page) .ev-count { padding: 2px 3px; border-radius: 6px; font-size: 9.5px; letter-spacing: -0.01em; }
  :where(.jcl-demo-page) .ev-count b { display: block; font-size: 11px; }
}
/* Smallest phones (≤360px): "eventos" still fits its pill */
@media (max-width: 360px) {
  :where(.jcl-demo-page) .ev-count { padding: 2px 1px; font-size: 8.5px; letter-spacing: -0.02em; }
}
/* Cards on a white page (light mode): a clearer edge and a soft shadow (service tiles, book cards, the day's events).
   Dark mode: the service tiles and the navy buttons change colour on hover too (a dark-mode rule used to win). */
:where(.jcl-demo-page) :is(.svc-tile, .book-card, .agenda-row):not(:hover) {
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.05), 0 4px 14px rgba(5, 36, 96, 0.06);
}
html[data-theme="dark"] :where(.jcl-demo-page) :is(.svc-tile, .book-card, .agenda-row):not(:hover) { box-shadow: none; }
/* Events calendar: Category, Audience and Branch dropdowns, like LibCal's. Each list opens under its button (on phones
   across the whole row), with LibCal's colours; ticked options show a check mark, and the button how many are ticked.
   The checkboxes stay focusable for the keyboard and screen readers; the label shows their focus. */
:where(.jcl-demo-page) .cal-filters { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 16px; }
:where(.jcl-demo-page) .cal-dd { position: relative; }
:where(.jcl-demo-page) .cal-dd-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px 7px 14px;
  font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-smooth); }
:where(.jcl-demo-page) .cal-dd-btn:hover,
:where(.jcl-demo-page) .cal-dd-btn[aria-expanded="true"],
:where(.jcl-demo-page) .cal-dd.is-active .cal-dd-btn { border-color: var(--navy); }
:where(.jcl-demo-page) .cal-dd.is-active .cal-dd-btn { box-shadow: inset 0 0 0 1px var(--navy); }
:where(.jcl-demo-page) .cal-dd-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
:where(.jcl-demo-page) .cal-dd-btn[aria-expanded="true"] .cal-dd-caret { transform: rotate(180deg); }
:where(.jcl-demo-page) .cal-dd-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
:where(.jcl-demo-page) .cal-dd-count[hidden] { display: none; }
:where(.jcl-demo-page) .cal-dd-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 290px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(10,10,10,0.18); }
:where(.jcl-demo-page) .cal-dd-panel[hidden] { display: none; }
:where(.jcl-demo-page) .cal-dd-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; color: var(--ink); }
:where(.jcl-demo-page) .cal-dd-x { flex: none; width: 36px; height: 36px; font-size: 24px; line-height: 1; color: var(--ink); background: none; border: 0; cursor: pointer; }
:where(.jcl-demo-page) .cal-dd-list { max-height: min(380px, 60vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }
:where(.jcl-demo-page) .cal-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 7px 16px;
  font-size: 15px; color: var(--ink); cursor: pointer; }
:where(.jcl-demo-page) .cal-opt:hover { background: rgba(5,36,96,0.06); }
:where(.jcl-demo-page) .cal-opt input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
:where(.jcl-demo-page) .cal-opt:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: -2px; }
:where(.jcl-demo-page) .cal-opt i { flex: none; width: 16px; height: 16px; border-radius: 3px; }
:where(.jcl-demo-page) .cal-opt span { flex: 1; }
:where(.jcl-demo-page) .cal-opt:has(input:checked) { font-weight: 700; }
:where(.jcl-demo-page) .cal-tick { flex: none; font-size: 16px; color: var(--navy); visibility: hidden; }
:where(.jcl-demo-page) .cal-opt:has(input:checked) .cal-tick { visibility: visible; }
:where(.jcl-demo-page) .cal-dd-clear { padding: 8px 6px; font-size: 14px; font-weight: 700; color: var(--navy); background: none; border: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
:where(.jcl-demo-page) .cal-dd-clear[hidden] { display: none; }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dd-btn:hover,
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dd-btn[aria-expanded="true"],
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dd.is-active .cal-dd-btn { border-color: #8fb3ff; }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dd.is-active .cal-dd-btn { box-shadow: inset 0 0 0 1px #8fb3ff; }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dd-count { background: #3a5ba8; }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-dd-panel { box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-opt:hover { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] :where(.jcl-demo-page) .cal-opt:has(input:focus-visible) { outline-color: #8fb3ff; }
html[data-theme="dark"] :where(.jcl-demo-page) :is(.cal-tick, .cal-dd-clear) { color: #8fb3ff; }
@media (max-width: 640px) {
  :where(.jcl-demo-page) .cal-dd { position: static; }
  :where(.jcl-demo-page) .cal-dd-panel { right: 0; width: auto; max-width: none; }
}
