/* Motion only: palette, typography, image proportions and card layout stay in experience.css. */
html.lenis,html.lenis body{height:auto}
html.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-stopped{overflow:clip}
.lenis [data-lenis-prevent]{overscroll-behavior:contain}
.motion-cursor{display:none}
.program-deck{position:relative;isolation:isolate}
.program-deck>.program-card,.program-deck>.news-card,.program-deck>.council-activity-card{position:relative;transform-origin:center;transition:transform 340ms cubic-bezier(.22,.61,.36,1),box-shadow 340ms ease;opacity:1;translate:none;animation:none;will-change:transform}
.deck-heading{transform-origin:left bottom;transition:transform 340ms cubic-bezier(.22,.61,.36,1),opacity 340ms ease;will-change:transform,opacity}
.home-stage{transform-origin:center top;transition:opacity 620ms cubic-bezier(.22,.61,.36,1),transform 820ms cubic-bezier(.16,1,.3,1),clip-path 820ms cubic-bezier(.16,1,.3,1)}
.motion-enabled .home-stage:not(.is-open){opacity:.68;transform:translate3d(0,32px,0) scale(.972);clip-path:inset(0 2.5% 0 2.5% round 28px);will-change:opacity,transform,clip-path}
.motion-enabled .home-stage.is-open{opacity:1;transform:none;clip-path:inset(0 round 0)}
@media(max-width:720px){
 .program-grid.program-deck{grid-template-columns:1fr;gap:10px}
 .program-deck>.program-card{min-height:0;padding:14px 16px 12px;border-radius:18px}
 .program-deck .program-top{margin:0;min-height:22px}
 .program-deck .program-label{font-size:.7rem;padding:3px 8px}
 .program-deck .program-top>.icon{width:16px;height:16px}
 .program-deck .program-art{position:absolute;top:17px;right:44px;width:auto;height:auto;min-height:0;margin:0;padding:0}
 .program-deck .program-art{display:flex;align-items:center;gap:8px}
 .program-deck .program-art>.icon{display:block;width:21px;height:21px}
 .program-deck .program-code{font-size:.75rem;line-height:1;opacity:.7}
 .program-deck .program-card>.eyebrow,.program-deck .program-card>p{display:none}
 .program-deck .program-card h3{font-size:clamp(1rem,4.2vw,1.25rem);line-height:1.2;margin:8px 0 10px;letter-spacing:-.025em}
 .program-deck .program-bottom{font-size:.72rem;margin:0;padding:0;border:0;min-height:0}
 .program-deck .program-bottom>.icon{width:16px;height:16px}
}
@media(prefers-reduced-motion:reduce){.program-deck>.program-card,.program-deck>.news-card,.program-deck>.council-activity-card,.deck-heading{transform:none!important;opacity:1!important;transition:none}}
@media print{.program-deck>.program-card,.program-deck>.news-card,.program-deck>.council-activity-card{transform:none!important}.program-deck .program-card>p{display:block}}
/* Touch devices use the browser's native scrolling and a lighter static backdrop. */
@media(hover:none),(pointer:coarse){
 html{scroll-behavior:auto}
 .motion-enabled .home-stage{opacity:1!important;transform:none!important;clip-path:none!important;transition:none!important;will-change:auto}
 body:before,body:after{animation:none!important;will-change:auto;inset:0;transform:none}
 .cosmic-dust{animation:cosmic-drift 150s ease-in-out infinite alternate!important;will-change:transform;transform:none}
 .cosmic-nebula{filter:none;animation:cosmic-nebula-breathe 90s ease-in-out infinite alternate;will-change:transform}
 .site-header{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:var(--canvas)!important}
 .hero-note{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
 .hero-photo{transform:none!important;transition:none!important}
 ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}
@media(prefers-reduced-motion:reduce){.cosmic-nebula,.cosmic-dust,.cosmic-glints{animation:none!important;will-change:auto}}
/* One window transition at every width, anchored to the menu button. */
.site-header .mobile-nav{opacity:0;transform:translate3d(0,-14px,0) scale(.92);transform-origin:calc(100% - 32px) 0;transition:opacity 300ms ease,transform 520ms cubic-bezier(.22,1,.36,1);pointer-events:none}
.site-header .mobile-nav.is-open{opacity:1;transform:translate3d(0,0,0) scale(1);pointer-events:auto}
.site-header .mobile-nav>a{opacity:0;transform:translateY(8px);transition:opacity 200ms ease,transform 350ms cubic-bezier(.22,1,.36,1);transition-delay:0ms}
.site-header .mobile-nav.is-open>a{opacity:1;transform:none;transition-delay:calc(min(var(--menu-index,0),6)*24ms + 55ms)}
.site-header .menu-toggle span{transition:transform 450ms cubic-bezier(.22,1,.36,1)}
.site-header .menu-toggle[aria-expanded="true"] span:first-child{transform:translateY(4px) rotate(45deg)}
.site-header .menu-toggle[aria-expanded="true"] span:last-child{transform:translateY(-4px) rotate(-45deg)}
.menu-backdrop{opacity:0;transition:opacity 420ms ease}.menu-backdrop.is-open{opacity:1}
.site-header .mobile-nav .header-search{display:flex;position:relative;opacity:1;transform:none;flex:none;min-height:48px;width:100%;max-width:none;margin:0 0 14px}
@media(min-width:721px){.site-header .mobile-nav .header-search{display:none}}
@media(max-width:720px){
  .site-header .header-inner>.header-search{display:none}
  .site-header .mobile-nav{max-height:calc(100svh - 130px - env(safe-area-inset-top));scroll-padding-top:12px}
}
@media(prefers-reduced-motion:reduce){.site-header .mobile-nav,.site-header .mobile-nav>a,.menu-backdrop{transition:none}}
@media(prefers-reduced-motion:no-preference){
  :root{--motion-ease:cubic-bezier(.19,1,.22,1)}
  .hero-copy>.eyebrow,.hero-copy>.institution,.hero-copy>h1,.hero-copy>.hero-subtitle,.hero-copy>.hero-description,.hero-copy>.button-row{animation:motion-copy 1050ms var(--motion-ease) both}
  .hero-copy>.institution{animation-delay:45ms}.hero-copy>h1{animation-delay:90ms}.hero-copy>.hero-subtitle{animation-delay:140ms}.hero-copy>.hero-description{animation-delay:185ms}.hero-copy>.button-row{animation-delay:230ms}
  .hero-visual{animation:motion-hero 1250ms var(--motion-ease) both}
  .page-heading h1{animation:motion-copy 1000ms var(--motion-ease) both}
  .page-heading .page-lead{animation:motion-copy 1000ms 90ms var(--motion-ease) both}
  .schedule-heading,.schedule-sidebar,.schedule-main{animation:motion-copy 1000ms var(--motion-ease) both}
  .schedule-sidebar{animation-delay:60ms}.schedule-main{animation-delay:120ms}
  #schedule-table:not([aria-busy="true"]){animation:motion-copy 550ms var(--motion-ease) both}
  .motion-pending{opacity:0;translate:0 38px}
  .motion-enter{animation:motion-rise 1000ms var(--motion-delay,0ms) var(--motion-ease) both}
  .program-deck>.news-card.motion-enter{animation:motion-rise 1000ms var(--motion-delay,0ms) var(--motion-ease) both}
  .motion-enter[data-motion="heading"]{animation-name:motion-heading;animation-duration:1150ms}
  .motion-enter[data-motion="media"]{animation-name:motion-media;animation-duration:1200ms}
  .motion-enter[data-motion="line"]{animation-duration:900ms}
  .motion-pending:focus-within{opacity:1;translate:none}
  .motion-magnet{translate:var(--magnet-x,0px) var(--magnet-y,0px);transition:translate 550ms var(--motion-ease),transform 450ms var(--motion-ease),background 250ms,box-shadow 450ms}
  .button .icon,.text-link .icon,.program-bottom .icon{transition:transform 600ms var(--motion-ease)}
  .button:active{scale:.975}
  .hero-photo{transform:translate3d(var(--photo-x,0px),calc(var(--photo-y,0px) + var(--scroll-drift,0px)),0) scale(1.035);transition:transform 850ms var(--motion-ease)}
  [data-motion-parallax]{translate:0 var(--media-drift,0px);transition:translate 650ms var(--motion-ease)}
  @keyframes motion-copy{from{opacity:0;translate:0 32px}to{opacity:1;translate:0 0}}
  @keyframes motion-hero{from{opacity:0;translate:0 28px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
  @keyframes motion-rise{from{opacity:0;translate:0 38px}to{opacity:1;translate:0 0}}
  @keyframes motion-heading{from{opacity:0;translate:0 36px;clip-path:inset(0 0 100% 0)}to{opacity:1;translate:0 0;clip-path:inset(-12px)}}
  @keyframes motion-media{from{opacity:0;translate:0 36px;scale:.975}to{opacity:1;translate:0 0;scale:1}}
  ::view-transition-old(root){animation:180ms ease-out both dissolve}
  ::view-transition-new(root){animation:500ms var(--motion-ease) both motion-copy}
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .motion-cursor{display:block;position:fixed;left:0;top:0;z-index:100;pointer-events:none;opacity:0;transition:opacity 200ms;contain:layout style}
  .motion-cursor:before{content:"";position:absolute;width:22px;height:22px;left:-11px;top:-11px;border:1px solid var(--accent);border-radius:50%;opacity:.5;transition:scale 500ms var(--motion-ease),background 300ms,opacity 300ms}
  .motion-cursor.is-visible{opacity:1}.motion-cursor.is-active:before{scale:1.9;background:color-mix(in srgb,var(--accent) 9%,transparent);opacity:.75}.motion-cursor.is-pressed:before{scale:1.2}
  .program-card,.news-card,.resource-tile,.document-link,.document-row,.search-result,.steps>div,.resource-group,.footer-partner,.page-sidebar>a,.sidebar-help,.info-banner,.inline-cta,.contact-details>div,.library-book,.library-portfolio-slide,.library-document,.library-event,.schedule-week td,.schedule-lesson,.quick-links>a,.student-resources>a,.section-explorer>a,.council-activity-grid article,.council-tab{position:relative;isolation:isolate;transition:transform 600ms var(--motion-ease),box-shadow 600ms var(--motion-ease),background-color 420ms}
  .program-card:before,.news-card:before,.resource-tile:before,.document-link:before,.document-row:before,.search-result:before,.steps>div:before,.resource-group:before,.footer-partner:before,.page-sidebar>a:before,.sidebar-help:before,.info-banner:before,.inline-cta:before,.contact-details>div:before,.library-book:before,.library-portfolio-slide:before,.library-document:before,.library-event:before,.schedule-week td:before,.schedule-lesson:before,.quick-links>a:before,.student-resources>a:before,.section-explorer>a:before,.council-activity-grid article:before,.council-tab:before{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;background:radial-gradient(300px circle at var(--light-x,50%) var(--light-y,50%),color-mix(in srgb,var(--accent) 7%,transparent),transparent 75%);opacity:0;transition:opacity 550ms}
  .motion-hover:before{opacity:1}
  .resource-tile:hover,.news-card:hover{transform:translateY(-5px)}
  .program-card:hover{transform:translateY(-6px)}
}
@media(max-width:720px) and (prefers-reduced-motion:no-preference){
  .motion-enter{animation-duration:750ms;animation-delay:0ms}
  .program-deck>.news-card.motion-enter{animation-duration:750ms;animation-delay:0ms}
  .motion-enter[data-motion="heading"],.motion-enter[data-motion="media"]{animation-duration:850ms}
  .hero-visual{animation-duration:950ms}
  .hero-copy>h1{animation-delay:50ms}
}
@media(prefers-reduced-motion:reduce){
  .motion-pending{opacity:1!important;translate:none!important}.motion-cursor{display:none!important}
  .motion-magnet,[data-motion-parallax]{translate:none!important}.hero-photo{transform:none!important}
}
@media print{.motion-pending{opacity:1!important;translate:none!important}.motion-cursor{display:none!important}}



/* Touch fallback: news cards still animate even when the browser exposes no hover state. */
@media (hover:none) and (prefers-reduced-motion:no-preference), (pointer:coarse) and (prefers-reduced-motion:no-preference){
 .news-card{animation:motion-rise 900ms var(--motion-delay,0ms) var(--motion-ease) both!important}
 .news-grid>.news-card:nth-child(2){--motion-delay:70ms}
 .news-grid>.news-card:nth-child(3){--motion-delay:140ms}
 .news-grid>.news-card:nth-child(4){--motion-delay:210ms}
}

/* Guaranteed card reveal, independent from hover and the desktop deck transforms. */
@keyframes card-reveal-in{from{opacity:0;filter:blur(2px)}to{opacity:1;filter:none}}
@keyframes card-reveal-mobile{from{opacity:0;translate:0 20px}to{opacity:1;translate:none}}
@media (hover:none) and (prefers-reduced-motion:no-preference), (pointer:coarse) and (prefers-reduced-motion:no-preference){
 .program-deck>.program-card.card-reveal-target,.program-deck>.news-card.card-reveal-target,.card-reveal-target{opacity:0!important;filter:none!important}
 .program-deck>.program-card.card-reveal-visible,.program-deck>.news-card.card-reveal-visible,.card-reveal-visible{opacity:1!important;animation:card-reveal-in 760ms cubic-bezier(.16,1,.3,1) both!important}
}
@media(prefers-reduced-motion:reduce){.card-reveal-target,.card-reveal-visible{opacity:1!important;transform:none!important;filter:none!important;animation:none!important}}

/* Mobile card reveal stays lightweight and does not replace the deck transform. */
@media (hover:none) and (prefers-reduced-motion:no-preference), (pointer:coarse) and (prefers-reduced-motion:no-preference){
 .program-deck>.program-card.card-reveal-target,.program-deck>.news-card.card-reveal-target,.card-reveal-target{translate:0 20px!important}
 .program-deck>.program-card.card-reveal-visible,.program-deck>.news-card.card-reveal-visible,.card-reveal-visible{opacity:1!important;translate:none!important;animation:card-reveal-mobile 620ms cubic-bezier(.22,1,.36,1) both!important;filter:none!important}
}
/* A reduced-motion device must keep cards readable; the deck itself remains static. */
@media (hover:none),(pointer:coarse){
 .program-deck>.program-card.card-reveal-target,.program-deck>.news-card.card-reveal-target,.card-reveal-target{opacity:1!important;translate:none!important;filter:none!important;animation:none!important}
 .program-deck>.program-card.card-reveal-visible,.program-deck>.news-card.card-reveal-visible,.card-reveal-visible{opacity:1!important;translate:none!important;filter:none!important;animation:none!important}
}

/* Complete institutional navigation, shared by desktop and touch screens. */
.site-header .mobile-nav{overflow-y:auto;max-height:calc(100dvh - 140px);overscroll-behavior:contain}
.navigation-tree{display:flex;flex-direction:column;gap:4px;text-align:left}
.navigation-tree a,.navigation-tree summary{display:block;padding:12px 14px;color:var(--ink);font-size:.9rem;line-height:1.45;border-radius:12px;overflow-wrap:anywhere;text-decoration:none}
.navigation-tree summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;font-weight:650}
.navigation-tree summary::-webkit-details-marker{display:none}
.navigation-tree summary:after{content:'+';font-size:1.25rem;flex:none;color:var(--accent)}
.navigation-tree details[open]>summary:after{content:'−'}
.navigation-tree a:hover,.navigation-tree summary:hover,.navigation-tree details[open]>summary{background:var(--blue-soft)}
.navigation-tree a:focus-visible,.navigation-tree summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.navigation-children{margin-left:12px;padding:4px 0 8px 8px}
.navigation-children a,.navigation-children summary{font-size:.85rem}
.navigation-shortcuts{display:flex;flex-wrap:wrap;gap:4px;margin-top:12px;padding-top:8px}
@media(max-width:720px){.navigation-tree a,.navigation-tree summary{min-height:44px;padding:12px 10px}.navigation-children{margin-left:6px;padding-left:6px}}

.site-header .mobile-nav .navigation-tree a{opacity:1;transform:none;transition-delay:0ms}

.navigation-unavailable{padding:12px 14px;font-size:.85rem;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}.navigation-unavailable small{display:block;margin-top:4px;font-size:.72rem}

/* A lightweight brush of light follows homepage scroll without measuring cards. */
html:has(.home-page) .cosmic-backdrop::after{content:"";position:absolute;inset:-32% -18%;pointer-events:none;opacity:0;filter:blur(34px);background:linear-gradient(172deg,transparent 39%,#8b82ff08 43%,#76a9ff28 47%,#e7a9ff20 50%,#71e4ca1b 53%,transparent 59%);transform:translate3d(0,var(--brush-wave-shift,0px),0) rotate(var(--brush-wave-skew,0deg)) scale(1.08);transition:opacity 240ms ease,transform 760ms cubic-bezier(.16,1,.3,1);will-change:transform,opacity}
html:has(.home-page) .cosmic-backdrop.scroll-wave-active::after{opacity:.9}
@media(prefers-reduced-motion:reduce){html:has(.home-page) .cosmic-backdrop::after{display:none}}

/* Compact, touch-draggable alphabet directory. Only the list scrolls. */
.site-header .mobile-nav.has-alphabet{width:min(600px,100%);padding:18px;display:flex;flex-direction:column;overflow:hidden;max-height:calc(100dvh - 140px)}
.navigation-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 6px 12px;flex:none;color:var(--ink);font-size:.9rem}
.navigation-toolbar button{border:0;border-radius:10px;background:var(--blue-soft);color:var(--accent);padding:8px 12px;font-size:.8rem}
.navigation-browser{position:relative;display:flex;align-items:flex-start;gap:10px;min-height:0;overflow:hidden}
.site-header .navigation-browser .navigation-tree{flex:1;min-width:0;max-height:calc(100dvh - 218px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;gap:2px;padding-right:4px}
.site-header .navigation-browser .navigation-tree a,.site-header .navigation-browser .navigation-tree summary{padding:10px 12px;min-height:40px;line-height:1.35;font-size:.85rem}
.site-header .navigation-browser .navigation-children{margin-left:4px;padding:2px 0 6px 8px}
.site-header .navigation-browser .navigation-children a,.site-header .navigation-browser .navigation-children summary{font-size:.8rem}
.navigation-alphabet{position:relative;display:flex;flex-direction:column;flex:none;width:44px;touch-action:none;user-select:none;-webkit-user-select:none}
.navigation-alphabet button{display:flex;align-items:center;justify-content:center;width:44px;height:30px;flex:none;padding:0;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:.78rem;font-weight:700;transition:background 120ms,color 120ms}
.navigation-alphabet button[aria-pressed=true]{background:var(--blue-soft);color:var(--accent)}
.navigation-letter-preview{position:absolute;right:56px;top:15px;transform:translateY(-50%) scale(.85);display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:var(--accent);color:white;font-size:1.4rem;font-weight:700;opacity:0;pointer-events:none;transition:opacity 120ms,transform 120ms}
.is-browsing .navigation-letter-preview{opacity:1;transform:translateY(-50%) scale(1)}
@media(max-width:720px){.site-header .mobile-nav.has-alphabet{width:100%;padding:14px}.site-header .navigation-browser .navigation-tree{max-height:calc(100dvh - 282px)}.site-header .navigation-browser .navigation-tree a,.site-header .navigation-browser .navigation-tree summary{min-height:44px;padding:10px 8px}.navigation-browser{gap:4px}.navigation-alphabet button{height:28px}}
@media(max-height:650px){.navigation-alphabet button{height:20px}.site-header .navigation-browser .navigation-tree{max-height:calc(100dvh - 230px)}}
@media(prefers-reduced-motion:reduce){.navigation-alphabet button,.navigation-letter-preview{transition:none}}

/* Wide desktop directory uses the space beneath the full header. */
@media(min-width:1001px){
 .site-header .mobile-nav.has-alphabet{left:0;right:0;width:100%;max-width:none;padding:26px 30px;border-radius:28px}
 .site-header .mobile-nav.has-alphabet .navigation-toolbar{margin:0 8px 20px;font-size:1rem}
 .site-header .mobile-nav.has-alphabet .navigation-browser{gap:24px}
 .site-header .mobile-nav.has-alphabet .navigation-tree{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;align-content:start;column-gap:24px;row-gap:6px;max-height:calc(100dvh - 250px);padding-right:12px}
 .site-header .mobile-nav.has-alphabet .navigation-tree>a,.site-header .mobile-nav.has-alphabet .navigation-tree>details{min-width:0}
 .site-header .mobile-nav.has-alphabet .navigation-tree a,.site-header .mobile-nav.has-alphabet .navigation-tree summary{padding:12px;min-height:46px;font-size:.9rem}
 .site-header .mobile-nav.has-alphabet .navigation-children a,.site-header .mobile-nav.has-alphabet .navigation-children summary{font-size:.82rem}
 .site-header .mobile-nav.has-alphabet .navigation-alphabet{width:48px}
 .site-header .mobile-nav.has-alphabet .navigation-alphabet button{width:48px;height:32px;font-size:.85rem}
 .site-header .mobile-nav.has-alphabet .navigation-letter-preview{right:64px}
}
@media(min-width:1001px) and (max-height:650px){.site-header .mobile-nav.has-alphabet .navigation-alphabet button{height:20px}}

/* Desktop menu fills the available viewport underneath the header. */
@media(min-width:1001px){
 .site-header .mobile-nav.has-alphabet{height:calc(100dvh - 124px);max-height:calc(100dvh - 124px);padding:28px 32px}
 .site-header .mobile-nav.has-alphabet .navigation-browser{flex:1;min-height:0;align-items:stretch}
 .site-header .mobile-nav.has-alphabet .navigation-tree{height:100%;max-height:none;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;column-gap:32px;row-gap:12px}
 .site-header .mobile-nav.has-alphabet .navigation-alphabet{align-self:flex-start}
}

/* Open section directory: independent columns avoid gaps between long groups. */
.navigation-catalog{min-width:0}
.site-header .mobile-nav .navigation-catalog a,.site-header .mobile-nav .navigation-catalog summary{text-transform:none}
@media(min-width:1001px){
 .site-header .mobile-nav.has-alphabet .navigation-tree{display:block}
 .navigation-catalog{columns:3;column-gap:28px}
 .navigation-catalog>details,.navigation-catalog>a,.navigation-catalog>.navigation-unavailable{break-inside:avoid;display:block;margin-bottom:14px}
 .site-header .mobile-nav.has-alphabet .navigation-catalog>details>summary{font-size:.96rem;font-weight:700;color:var(--accent)}
 .site-header .mobile-nav.has-alphabet .navigation-catalog .navigation-children{margin-left:0;padding:0 0 6px 4px}
 .site-header .mobile-nav.has-alphabet .navigation-catalog .navigation-children a,.site-header .mobile-nav.has-alphabet .navigation-catalog .navigation-children summary{padding:7px 10px;min-height:32px;font-size:.82rem;line-height:1.4}
 .site-header .mobile-nav.has-alphabet .navigation-catalog .navigation-children .navigation-children{padding-left:10px}
}
@media(min-width:1600px){.navigation-catalog{columns:4}}

.header-search-results{position:fixed;z-index:1000;overflow:auto;overscroll-behavior:contain;padding:10px;border-radius:20px;background:var(--card);color:var(--ink);box-shadow:0 16px 48px #0003}
.header-search-results p{padding:8px 12px;color:var(--muted);font-size:.8rem}
.header-search-results a{display:block;padding:12px;border-radius:12px;line-height:1.4}
.header-search-results a:hover,.header-search-results a:focus-visible{background:var(--blue-soft)}
.header-search-results strong{display:block;font-size:.9rem;font-weight:600}
.header-search-results small{display:block;margin-top:4px;color:var(--muted);font-size:.75rem}
.header-search-results>button{width:100%;border:0;padding:12px;border-radius:12px;background:var(--blue-soft);color:var(--accent)}

/* Master/detail navigation: compact directory at left, selected contents at right. */
.navigation-master{position:relative;display:flex;gap:8px;min-height:0;min-width:0;flex:1;overflow:hidden}
.navigation-detail{display:none}
.site-header .mobile-nav.has-alphabet .navigation-catalog{columns:auto}
@media(min-width:1001px){
 .site-header .mobile-nav.has-alphabet .navigation-browser{display:flex;gap:28px}
 .site-header .mobile-nav.has-alphabet .navigation-master{flex:0 0 32%;max-width:370px;min-width:260px;gap:8px}
 .site-header .mobile-nav.has-alphabet .navigation-master .navigation-tree{height:100%;max-height:none;padding-right:4px}
 .site-header .mobile-nav.has-alphabet .navigation-catalog>details,.site-header .mobile-nav.has-alphabet .navigation-catalog>a{margin-bottom:2px}
 .site-header .mobile-nav.has-alphabet .navigation-catalog>details>summary,.site-header .mobile-nav.has-alphabet .navigation-catalog>a{font-size:.85rem;padding:10px;min-height:42px;color:var(--ink)}
 .site-header .mobile-nav.has-alphabet .navigation-catalog details[data-selected]>summary{color:var(--accent);background:var(--blue-soft)}
 .navigation-detail{display:block;flex:1;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 16px 24px 8px;scrollbar-width:thin}
 .navigation-detail-hint{color:var(--muted);font-size:1rem;max-width:380px;margin:30px auto}
 .navigation-detail h2{font-size:clamp(1.3rem,2vw,2rem);line-height:1.25;margin:4px 0 24px}
 .navigation-detail-trail{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
 .navigation-detail-trail button{border:0;padding:8px 12px;border-radius:10px;background:var(--blue-soft);color:var(--accent);font-size:.8rem}
 .site-header .mobile-nav.has-alphabet .navigation-detail>.navigation-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:0;padding:0}
 .site-header .mobile-nav.has-alphabet .navigation-detail a,.site-header .mobile-nav.has-alphabet .navigation-detail summary{display:block;padding:14px;border-radius:12px;color:var(--ink);font-size:.92rem;line-height:1.5;overflow-wrap:anywhere}
 .site-header .mobile-nav.has-alphabet .navigation-detail summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;font-weight:600}
 .navigation-detail summary::-webkit-details-marker{display:none}
 .navigation-detail summary:after{content:'+';color:var(--accent)}
 .navigation-detail a:hover,.navigation-detail summary:hover{background:var(--blue-soft)}
 .navigation-detail .navigation-unavailable{padding:14px}
}

/* Keep directory changes legible while the selected section and letter update. */
.navigation-tree a,.navigation-tree summary,.navigation-catalog details>summary:after,.navigation-alphabet button,.navigation-toolbar button{transition:color 360ms cubic-bezier(.22,1,.36,1),background-color 360ms cubic-bezier(.22,1,.36,1),transform 360ms cubic-bezier(.22,1,.36,1),opacity 220ms ease}
.navigation-catalog details>summary:after{display:inline-block;transform-origin:center}
.navigation-catalog details:is([open],[data-selected])>summary:after{transform:rotate(45deg)}
.navigation-detail-animated>*{animation:navigation-panel-enter 420ms cubic-bezier(.22,1,.36,1) both}
.navigation-filter-enter{animation:navigation-filter-enter 280ms cubic-bezier(.22,1,.36,1) both}
.navigation-filter-exit{animation:navigation-filter-exit 180ms ease both;pointer-events:none}
.navigation-heading-change{animation:navigation-heading-enter 300ms cubic-bezier(.22,1,.36,1) both}
.site-header .mobile-nav.has-alphabet .navigation-flat[hidden],.site-header .mobile-nav.has-alphabet .navigation-catalog[hidden],.site-header .mobile-nav.has-alphabet .navigation-catalog>[hidden]{display:none!important}
@keyframes navigation-panel-enter{from{opacity:0;transform:translate3d(0,12px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes navigation-filter-enter{from{opacity:0;transform:translate3d(0,7px,0) scale(.985)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
@keyframes navigation-filter-exit{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:0;transform:translate3d(0,-5px,0)}}
@keyframes navigation-heading-enter{from{opacity:.25;transform:translate3d(0,5px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@media(prefers-reduced-motion:reduce){.navigation-detail-animated>*,.navigation-filter-enter,.navigation-filter-exit,.navigation-heading-change{animation:none!important}.navigation-tree a,.navigation-tree summary,.navigation-catalog details>summary:after,.navigation-alphabet button,.navigation-toolbar button{transition:none!important}}

.navigation-flat{display:flex;flex-direction:column;gap:2px;min-width:0}
@media(max-width:1000px){
 .navigation-alphabet button{height:clamp(16px,calc((100dvh - 300px)/var(--letter-count,12)),28px);font-size:.72rem}
 .site-header .mobile-nav.has-alphabet .navigation-flat a{min-height:44px;padding:10px 8px;line-height:1.4;overflow-wrap:anywhere}
}
