/* Filter controls share the existing paper, ink and editorial typography. */
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.event-filters [hidden], .filters-dialog [hidden] { display:none !important; }
.selected-day { border:1px solid var(--navy); border-top:0; background:var(--paper-light); }
.selected-day-heading { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:10px; padding:20px 20px 0; }
.selected-day-heading h3 { margin:0; font:650 25px/1.25 var(--font-display); color:var(--navy); }
#selected-day-count { color:var(--muted); font-size:13px; font-weight:650; }
/* A fixed, hinted face keeps clock digits consistent at the original small size. */
@font-face { font-family:"CultureNN Clock"; src:url("/static/clock-noto-sans-regular-4456fea0b84f.woff2") format("woff2"); font-style:normal; font-weight:400; font-display:swap; unicode-range:U+0030-003A; }
.calendar-day-agenda time.calendar-agenda-time { font-family:"CultureNN Clock",var(--font-sans); font-weight:400; font-variant-numeric:lining-nums tabular-nums; font-kerning:none; letter-spacing:normal; line-height:1.25; white-space:nowrap; }
.event-filters { padding:18px 0 22px; }
.selected-day .event-filters { padding:16px 20px 20px; border-bottom:1px solid var(--line); }
.filter-desktop-heading { display:flex; align-items:baseline; gap:14px; margin-bottom:10px; font-size:13px; font-weight:700; }
.filter-desktop-heading span + span { color:var(--muted); font-size:12px; font-weight:450; }
.category-choices { display:flex; flex-wrap:wrap; gap:8px; }
.category-choice { display:flex; align-items:center; gap:7px; min-height:44px; padding:10px 13px; border:1px solid var(--line); border-radius:5px; background:transparent; color:var(--navy); cursor:pointer; font-size:14px; font-weight:600; transition:background-color .14s,border-color .14s; }
.choice-check { display:grid; place-items:center; width:15px; height:15px; border:1px solid #87908d; border-radius:3px; font-size:11px; color:transparent; }
.category-choice:hover { border-color:var(--brick); }
.category-choice[aria-pressed=true] { background:var(--navy); border-color:var(--navy); color:var(--paper-light); }
.category-choice[aria-pressed=true] .choice-check { color:var(--paper-light); border-color:var(--paper-light); }
.filter-tools { display:flex; align-items:center; gap:14px; margin-top:14px; }
.filter-search-field { display:flex; align-items:center; min-width:0; width:min(100%,420px); border-bottom:1px solid #87908d; }
.filter-search-field:focus-within { border-color:var(--navy); box-shadow:0 1px var(--navy); }
.filter-search-field input { appearance:none; -webkit-appearance:none; width:100%; min-width:0; min-height:44px; padding:10px 0; border:0; border-radius:0; background:transparent; color:var(--navy); font:400 16px/1.4 var(--font-sans); }
/* The shared underline indicates focus without crowding the adjacent controls. */
.filter-search-field input:focus { outline:none; }
.filter-search-field input::placeholder { color:var(--muted); opacity:1; }
.filter-search-field input::-webkit-search-cancel-button { display:none; }
.search-clear { position:relative; display:grid; place-items:center; width:44px; height:44px; padding:0; flex:none; border:0; background:transparent; color:var(--navy); font-size:23px; cursor:pointer; }
.search-clear::before { content:""; position:absolute; inset:6px; border:2px solid transparent; border-radius:5px; pointer-events:none; }
.search-clear:hover::before { background:rgba(16,40,59,.07); }
.search-clear:focus-visible { outline:none; }
.search-clear:focus-visible::before { border-color:var(--navy); }
.filters-reset,.empty-filter-reset { min-height:44px; padding:8px 0; border:0; background:transparent; color:var(--brick); font-size:13px; font-weight:650; cursor:pointer; }
.empty-filter-reset { display:block; margin:0 auto 16px; }
.filter-scope { margin:10px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.filter-sheet-trigger,.selected-categories { display:none; }
.filters-dialog { width:min(100%,540px); max-width:none; max-height:calc(100dvh - max(16px, env(safe-area-inset-top), var(--tg-content-safe-area-inset-top,0px))); margin:auto auto 0; padding:0; border:1px solid var(--line); border-bottom:0; border-radius:20px 20px 0 0; background:var(--paper-light); color:var(--navy); }
.filters-dialog:not([open]) { display:none; }
.filters-dialog[open] { animation:filters-enter .2s ease-out; }
.filters-dialog::backdrop { background:rgba(16,40,59,.48); }
.filters-sheet { display:flex; flex-direction:column; max-height:inherit; }
.filters-sheet-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:24px 20px 12px; flex:none; }
.filters-sheet-header h2 { margin:0; font:650 27px/1.15 var(--font-display); letter-spacing:-.03em; }
.filters-sheet-header .section-kicker { font-size:10px; line-height:1.4; margin-bottom:8px; }
.filters-sheet-header button { align-self:flex-start; width:44px; height:44px; flex:none; padding:0; border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--navy); font-size:24px; cursor:pointer; }
.filters-sheet-header button:is(:hover,:focus) { outline:none; background:rgba(16,40,59,.07); }
.filters-sheet-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 20px 12px; }
#filters-description { margin:0 0 20px; font-size:14px; color:var(--muted); }
.sheet-categories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.sheet-category { min-height:52px; display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:6px; padding:12px; font-size:15px; font-weight:550; cursor:pointer; transition:background-color .14s; }
.sheet-category:has(input:checked) { background:var(--navy); border-color:var(--navy); color:var(--paper-light); }
.sheet-category input { width:19px; height:19px; margin:0; flex:none; accent-color:var(--brick); }
.sheet-category:focus-within { outline:3px solid var(--coral); outline-offset:2px; }
.sheet-result,.sheet-search-note { font-size:13px; line-height:1.5; margin:16px 0 0; color:var(--muted); }
.filters-sheet-footer { display:grid; grid-template-columns:1fr; gap:8px; flex:none; margin:0; padding:12px 20px max(18px, env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom,0px)); border-top:1px solid var(--line); background:var(--paper-light); }
.filters-sheet-footer button { min-height:46px; padding:12px; border:0; border-radius:5px; font-weight:650; cursor:pointer; }
[data-reset-draft] { background:transparent; color:var(--brick); font-size:13px; }
[data-apply-filters] { grid-row:1; background:var(--navy); color:var(--paper-light); font-size:15px; }
body.filters-open { overflow:hidden; }
.has-mobile-shell .event-filters { padding-top:14px; padding-bottom:16px; }
.has-mobile-shell .selected-day-heading { padding:18px 14px 0; gap:6px; }
.has-mobile-shell .selected-day-heading h3 { font-size:21px; }
.has-mobile-shell #selected-day-count { font-size:12px; }
.has-mobile-shell .selected-day .event-filters { padding-left:14px; padding-right:14px; }
.has-mobile-shell .category-choices,.has-mobile-shell .filter-desktop-heading { display:none; }
.has-mobile-shell .filter-tools { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; margin-top:0; }
.has-mobile-shell .filter-sheet-trigger { display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 12px; border:1px solid var(--navy); border-radius:5px; background:transparent; color:var(--navy); font-size:14px; font-weight:650; cursor:pointer; }
[data-filter-count] { min-width:20px; height:20px; display:grid; place-items:center; border-radius:50%; background:var(--navy); color:var(--paper-light); font-size:11px; }
.has-mobile-shell .filter-search-field { width:100%; }
.has-mobile-shell .filter-search-field input { font-size:16px; }
.has-mobile-shell .filters-reset { grid-column:1/-1; justify-self:start; min-height:36px; padding:4px 0; }
.has-mobile-shell .selected-categories { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.selected-categories button { max-width:100%; min-height:38px; border:1px solid var(--line); border-radius:5px; padding:7px 10px; background:transparent; color:var(--navy); font-size:12px; cursor:pointer; text-align:left; }
.has-mobile-shell .filter-scope { font-size:11px; }
@keyframes filters-enter { from { transform:translateY(24px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@media(prefers-reduced-motion:reduce) { .filters-dialog[open] { animation:none; } .category-choice,.sheet-category { transition:none; } }
@media(max-width:360px) {
  .calendar-toolbar { gap:6px; }
  .calendar-toolbar h2 { font-size:20px; }
  .calendar-actions button { min-width:32px; padding-inline:6px; font-size:12px; }
}
/* Touch scrolling must not leave a mouse-hover or tap-focus highlight behind. */
@media (hover:none), (pointer:coarse) {
  .calendar-day-agenda-event:hover,
  .calendar-day-agenda-event:focus-within { background:rgba(251,247,237,.72); }
  .calendar-day-agenda-event:has(:focus-visible) { background:rgba(228,135,116,.16); }
  .contact-links > a:hover { background:var(--paper-light); color:var(--navy); }
  .contact-links > a:focus-visible { background:rgba(228,135,116,.18); color:var(--brick); }
}
