/* Public interaction states. Reference: FIFV identity + Refero motion/craft rules. */
:root {
  --fifv-ui-fast:120ms;
  --fifv-ui-state:180ms;
  --fifv-ui-ease:cubic-bezier(.2,0,0,1);
}
html { scroll-padding-block:calc(var(--fifv-header-height) + var(--fifv-toolbar-height) + 24px) 88px; }
:where(a,button,input,select,textarea,summary,[tabindex]) { scroll-margin-block:24px 88px; }
:where(a[href],button,summary,input,select,textarea) {
  transition:color var(--fifv-ui-fast) ease,background-color var(--fifv-ui-fast) ease,border-color var(--fifv-ui-fast) ease,text-decoration-color var(--fifv-ui-fast) ease,text-decoration-thickness var(--fifv-ui-fast) ease;
}
a[href] { text-underline-offset:.18em; text-decoration-thickness:1px; }
/* Keep the line present so hover can fade it in rather than switch it on. */
main a[href]:not([class*="button"]):not(.wp-block-file a):not(.section-index a):not(:has(img)) {
  text-decoration-line:underline; text-decoration-color:transparent;
}
main :is(.curatorial-copy,.single-copy,.page-content) p a:not([class*="button"]),
main .program-venue-name a { text-decoration-color:currentColor; }
/* Linked photographs respond inside their frame without moving the card. */
.news-grid .wp-block-post-featured-image a { display:block; overflow:hidden; }
.news-grid .wp-block-post-featured-image a img {
  transition:transform var(--fifv-ui-state) var(--fifv-ui-ease);
}
/* A two-colour ring remains visible on the red, paper and photographic surfaces. */
body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline:3px solid var(--fifv-black) !important; outline-offset:3px !important;
  box-shadow:0 0 0 3px var(--fifv-cream) !important;
}
body .skip-link:focus { z-index:100000; background:var(--fifv-cream); color:var(--fifv-red); padding:16px 24px; font:700 18px/1.3 var(--font-display); }
/* Prose links stay identifiable before hover. Inline links keep the text flow. */
:is(.curatorial-copy,.single-copy,.page-content) p a:not([class*="button"]),
.program-venue-name a { text-decoration-line:underline; }
:is(.curatorial-copy,.single-copy,.page-content) p a:not([class*="button"]):visited { color:#740000; }
/* Navigation: current page, expanded, hover, keyboard focus and pressed. */
.site-header-wp a { text-decoration-line:underline; text-decoration-color:transparent; }
.site-header-wp :is(.current-menu-item > a,a[aria-current="page"]) { text-decoration-color:currentColor; text-decoration-thickness:2px; }
.site-header-wp button { cursor:pointer; border-radius:0; }
.site-header-wp .wp-block-navigation-submenu__toggle svg { transition:transform var(--fifv-ui-state) var(--fifv-ui-ease); }
.site-header-wp .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
.site-header-wp .wp-block-navigation-submenu__toggle[aria-expanded="true"] { outline:1px solid currentColor; outline-offset:-4px; }
.site-header-wp .wp-block-navigation-item__content:active { text-decoration-color:currentColor; text-decoration-thickness:3px; }
.site-header-wp .wp-block-navigation__submenu-container .wp-block-navigation-item__content { min-height:44px; }
/* Standalone document actions and pagination share a generous touch area. */
.wp-block-file a { display:inline-flex; align-items:center; min-height:44px; }
.wp-block-file .wp-block-file__button { padding:12px 20px; border:1px solid currentColor; border-radius:0; }
.wp-block-query-pagination :is(a,.page-numbers) { display:inline-flex; min-width:44px; min-height:44px; align-items:center; justify-content:center; padding:8px 12px; }
.wp-block-query-pagination .current { background:var(--fifv-red); color:var(--fifv-cream); text-decoration:underline; }
.news-grid h2 a { display:inline-block; min-height:44px; }
.program-venue-name a { min-height:44px; display:inline-flex; align-items:center; padding-block:6px; }
/* Keep footer text readable where the red silhouette passes behind it. */
.institutional-label { position:relative; width:fit-content; max-width:100%; border-bottom:0; background:var(--fifv-cream); color:var(--fifv-black); }
.institutional-label::after { content:""; position:absolute; bottom:0; left:0; width:min(900px,calc(100vw - 2 * var(--page-gutter))); border-bottom:1px solid #888; }
.institutional-dates { width:fit-content; max-width:100%; margin-inline:auto; background:var(--fifv-cream); color:var(--fifv-black); padding:4px 8px; }
.section-index a,.program-page .wp-block-file a,.wp-block-button__link,.wp-block-file__button {
  transition:color var(--fifv-ui-fast) ease,background-color var(--fifv-ui-fast) ease,border-color var(--fifv-ui-fast) ease,transform var(--fifv-ui-fast) var(--fifv-ui-ease);
}
.news-card__cta { transition:color var(--fifv-ui-fast) ease,background-color var(--fifv-ui-fast) ease,transform var(--fifv-ui-fast) var(--fifv-ui-ease); }
.post-share .post-share__button { transition:color var(--fifv-ui-fast) ease,background-color var(--fifv-ui-fast) ease,transform var(--fifv-ui-fast) var(--fifv-ui-ease); }
@media (hover:hover) and (pointer:fine) {
  .site-header-wp a:hover { text-decoration-color:currentColor; }
  .site-header-wp button:hover { background:var(--fifv-cream); color:var(--fifv-red); }
  .site-header-wp .is-menu-open button:hover { background:var(--fifv-red); color:var(--fifv-cream); }
  .site-header-wp .wp-block-navigation__submenu-container a:hover { background:var(--fifv-red); color:var(--fifv-cream); }
  main a[href]:not([class*="button"]):not(.wp-block-file a):not(.section-index a):not(:has(img)):hover { text-decoration-color:currentColor; text-decoration-thickness:2px; }
  .news-grid .wp-block-post-featured-image a:hover img { transform:scale(1.025); }
  .wp-block-file__button:hover,.wp-block-button__link:hover { background:var(--fifv-cream); color:var(--fifv-red); }
  .wp-block-query-pagination a:hover { background:var(--fifv-red); color:var(--fifv-cream); }
  .section-index a:hover .section-index__action { transform:translateX(3px); }
  .home-news .news-card__cta:hover { background:var(--fifv-red); color:var(--fifv-cream); text-decoration:none; }
  .post-related .news-card__cta:hover { background:var(--fifv-red); color:var(--fifv-cream); text-decoration:none; }
  .post-share .post-share__button:hover { background:var(--fifv-red); color:var(--fifv-cream); text-decoration:none; }
  .post-share .post-share__button--whatsapp:hover { background:var(--fifv-cream); color:var(--fifv-red); }
}
.section-index__action { transition:transform var(--fifv-ui-fast) var(--fifv-ui-ease); }
.section-index a:active,.program-page .wp-block-file a:active,.wp-block-file__button:active,.wp-block-button__link:active { transform:translateY(1px); }
.program-page .program-document > .wp-block-file a:active,.wp-block-file__button:active,.wp-block-button__link:active { background:var(--fifv-black); color:var(--fifv-cream); }
.site-header-wp button:active,.site-header-wp .is-menu-open button:active,.wp-block-query-pagination a:active,.back-to-top:active { background:var(--fifv-black); color:var(--fifv-cream); }
.back-to-top:active { transform:translateY(1px); }
.home-news .news-card__cta:active { background:var(--fifv-black); color:var(--fifv-cream); transform:translateY(1px); }
.post-related .news-card__cta:active { background:var(--fifv-black); color:var(--fifv-cream); transform:translateY(1px); }
.post-share .post-share__button:active { background:var(--fifv-black); color:var(--fifv-cream); transform:translateY(1px); }
/* Native disabled controls and explicitly disabled links do not react to hover. */
body :is(button,input,select,textarea):disabled,
body [aria-disabled="true"] { cursor:not-allowed; background:var(--fifv-cream) !important; color:#626259 !important; border-color:currentColor !important; border-style:dashed; opacity:1; transform:none !important; text-decoration-style:dashed; transition:none !important; }
body :is(button,a)[aria-busy="true"] { cursor:progress; }
body input[aria-invalid="true"],body textarea[aria-invalid="true"] { border:2px solid var(--fifv-red); }
@media (prefers-reduced-motion:reduce) {
  html,body :is(a,button,input,select,textarea,summary) { scroll-behavior:auto !important; }
  *,*::before,*::after { animation:none !important; transition:none !important; }
  .section-index a:active,.section-index__action,.program-page .wp-block-file a:active,.wp-block-file__button:active,.wp-block-button__link:active,.back-to-top:active,.home-news .news-card__cta:active,.post-related .news-card__cta:active,.post-share .post-share__button:active,
  .news-grid .wp-block-post-featured-image a img { transform:none !important; }
}
@media (forced-colors:active) {
  body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid Highlight !important; box-shadow:none !important; }
  .back-to-top { border:2px solid ButtonText; }
  .site-header-wp :is(.current-menu-item > a,a[aria-current="page"]) { text-decoration-color:LinkText; }
}
