/* Moaboda design tokens and reusable controls. See /DESIGN.md. */
:root{
  --ds-color-brand:#254fe5;
  --ds-color-accent:#dfef9c;
  --ds-color-text:#202b3c;
  --ds-color-muted:#606b78;
  --ds-color-page:#f7f7f1;
  --ds-color-surface:#fff;
  --ds-color-border:#dce0e0;
  --ds-color-selected:#ebefff;
  --ds-color-disabled-bg:#e8ebef;
  --ds-color-disabled-text:#6b7280;
  --ds-space-1:4px;--ds-space-2:8px;--ds-space-3:12px;--ds-space-4:16px;--ds-space-5:24px;--ds-space-6:32px;
  --ds-radius-control:10px;--ds-radius-card:16px;--ds-radius-panel:24px;
  --ds-control-height:48px;--ds-touch-height:44px;
  --ds-nav-label-size:1rem;--ds-nav-active-scale:1.2;
  --ds-launch-duration:3s;
  --ds-dropdown-shadow:0 16px 40px rgba(32,43,60,.16);
  --blue:var(--ds-color-brand);--lime:var(--ds-color-accent);--ink:var(--ds-color-text);--muted:var(--ds-color-muted);
  --line:var(--ds-color-border);--soft:var(--ds-color-selected);--surface:var(--ds-color-surface);
  --radius-control:var(--ds-radius-control);--radius-card:var(--ds-radius-card);--radius-panel:var(--ds-radius-panel);
}
/* The current desktop menu grows relative to its normal responsive size. */
@media(min-width:701px){
  .site-nav a,.site-nav a:last-child{font-size:var(--ds-nav-label-size)}
  .site-nav a[aria-current=page],.site-nav a:last-child[aria-current=page]{font-size:calc(var(--ds-nav-label-size) * var(--ds-nav-active-scale))}
}
@media(min-width:701px) and (max-width:900px){
  .site-nav{--ds-nav-label-size:.875rem}
}
/* Initial entry covers the existing home until its three-second intro ends. */
.launch-splash{display:none}
.is-app-starting{overflow:hidden}
.is-app-starting .launch-splash{
  position:fixed;inset:0;z-index:1100;display:flex;align-items:center;justify-content:center;
  min-height:100dvh;padding:40px var(--ds-space-5);background:var(--ds-color-surface);
}
.is-app-starting>.site-header,.is-app-starting>#app,.is-app-starting>.site-footer,.is-app-starting>.mobile-bottom-nav{visibility:hidden}
.is-app-starting .page-transition{display:none}
.launch-splash-content{
  display:flex;flex-direction:column;align-items:center;gap:28px;max-width:100%;text-align:center;
  color:var(--ds-color-text);font-family:inherit;
  animation:ds-launch-screen var(--ds-launch-duration) cubic-bezier(.22,1,.36,1) both;
}
.launch-splash-icon{display:block;flex:none;width:80px;height:80px}
.launch-splash-content strong{font-size:clamp(1.375rem,3.4vw,2rem);font-weight:700;line-height:1.5;letter-spacing:-.025em;word-break:keep-all;overflow-wrap:anywhere}
.is-app-starting:has(.noscript) .launch-splash{display:none}
@keyframes ds-launch-screen{
  0%{opacity:0;transform:translateY(18px)}
  18%,76%{opacity:1;transform:translateY(0)}
  100%{opacity:0;transform:translateY(-40px)}
}
@keyframes ds-launch-screen-reduced{
  0%,100%{opacity:0}
  18%,76%{opacity:1}
}
@media(prefers-reduced-motion:reduce){.launch-splash-content{animation-name:ds-launch-screen-reduced}}
.ds-icon-button{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 var(--ds-control-height);
  width:var(--ds-control-height);min-height:var(--ds-control-height);margin:0;padding:var(--ds-space-3);
  border:1px solid var(--ds-color-brand);border-radius:var(--ds-radius-control);
  background:var(--ds-color-surface);color:var(--ds-color-text);font:inherit;cursor:pointer;
}
.ds-icon-button:hover{background:var(--ds-color-selected);color:var(--ds-color-brand)}
.ds-icon-button:focus:not(:focus-visible){outline:none;box-shadow:none}
.ds-icon-button:focus-visible{outline:3px solid var(--ds-color-brand);outline-offset:3px}
.ds-filter-bar{display:flex;align-items:stretch;gap:var(--ds-space-2);margin-top:var(--ds-space-4);--ds-filter-bar-width:760px;--ds-filter-bar-columns:4}
.ds-filter-bar[data-filter-layout=institutions]{--ds-filter-bar-width:568px;--ds-filter-bar-columns:3}
.ds-filter-bar[data-filter-layout=resources]{--ds-filter-bar-width:376px;--ds-filter-bar-columns:2}
.ds-filter-bar__controls{flex:0 1 var(--ds-filter-bar-width);min-width:0}
.ds-filter-bar .ds-filter-bar__row{display:grid;grid-template-columns:repeat(var(--ds-filter-bar-columns),minmax(0,1fr));align-items:stretch;gap:var(--ds-space-2);width:100%;margin:0}
.ds-filter-bar .ds-filter-bar__reset{margin-left:auto}
.ds-filter-bar .ds-dropdown:last-child .ds-dropdown__panel{left:auto;right:0}
@media(max-width:700px){
  .ds-filter-bar--mobile-sheet .mobile-filter-open{flex:1;min-width:0;width:auto;margin:0}
  .ds-filter-bar--mobile-sheet .ds-filter-bar__controls{display:none}
  .ds-filter-bar[data-filter-layout=resources] .ds-dropdown__trigger{gap:var(--ds-space-2);padding:10px var(--ds-space-2)}
}
.ds-dropdown{position:relative;min-width:0;--ds-dropdown-columns:2;--ds-dropdown-width:calc(var(--ds-dropdown-columns) * 166px + 28px)}
/* External stylesheet rules work under the site's style-src 'self' policy. */
.ds-dropdown[data-choice-columns="3"]{--ds-dropdown-columns:3}
.ds-dropdown[data-choice-columns="4"]{--ds-dropdown-columns:4}
.ds-dropdown[data-choice-columns="5"]{--ds-dropdown-columns:5}
.ds-dropdown[data-choice-columns="6"]{--ds-dropdown-columns:6}
.ds-dropdown .ds-dropdown__trigger{
  display:flex;align-items:center;justify-content:space-between;gap:var(--ds-space-4);
  width:100%;min-height:var(--ds-control-height);margin:0;padding:10px var(--ds-space-4);
  border:1px solid var(--ds-color-brand);border-radius:var(--ds-radius-control);
  background:var(--ds-color-surface);color:var(--ds-color-text);
  font:inherit;font-size:.9375rem;font-weight:600;line-height:1.5;text-align:left;cursor:pointer;
  transition:background-color .15s,border-color .15s;
}
.ds-dropdown__trigger>span{min-width:0;overflow-wrap:anywhere}
.ds-dropdown .ds-dropdown__trigger:hover,.ds-dropdown .ds-dropdown__trigger[aria-expanded=true]{background:var(--ds-color-surface);box-shadow:none}
.ds-dropdown .ds-dropdown__trigger.has-selection{background:var(--ds-color-brand);color:var(--ds-color-surface)}
.ds-dropdown .ds-dropdown__chevron,.ds-icon-button>svg{
  display:block;flex:0 0 20px;width:20px;height:20px;margin:0;border:0;
  fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  transform:none;transition:transform .15s;
}
.ds-filter-bar__reset>svg{stroke-width:2.6}
.ds-dropdown .ds-dropdown__trigger[aria-expanded=true] .ds-dropdown__chevron{transform:rotate(180deg)}
.ds-dropdown .ds-dropdown__panel{
  display:flex;flex-direction:column;position:absolute;top:calc(100% + 10px);left:0;z-index:30;
  width:var(--ds-dropdown-width,360px);max-width:calc(100vw - 36px);max-height:min(460px,70dvh);overflow:hidden;
  margin:0;padding:18px;border:1px solid var(--ds-color-border);border-radius:var(--ds-radius-card);
  background:var(--ds-color-surface);box-shadow:var(--ds-dropdown-shadow);transform:translateX(var(--ds-dropdown-offset,0px));
}
.ds-dropdown .ds-dropdown__panel[hidden],.ds-dropdown .filter-clear[hidden]{display:none}
.ds-dropdown .filter-popover-title{flex-shrink:0;margin:0 0 var(--ds-space-3);font-size:1rem;font-weight:600;color:var(--ds-color-text)}
.ds-dropdown .filter-choice-grid{display:grid;grid-template-columns:repeat(var(--ds-dropdown-columns,2),minmax(0,1fr));gap:var(--ds-space-2);min-height:0;overflow-y:auto;overscroll-behavior:contain}
.ds-dropdown .ds-dropdown__option{
  display:flex;align-items:center;gap:var(--ds-space-2);min-height:var(--ds-touch-height);margin:0;padding:10px;
  border:1px solid var(--ds-color-border);border-radius:var(--ds-radius-control);
  background:#f5f7fa;color:var(--ds-color-text);font-size:.9375rem;font-weight:500;line-height:1.5;cursor:pointer;
}
.ds-dropdown .ds-dropdown__option input{flex:0 0 18px;width:18px;height:18px;margin:0;accent-color:var(--ds-color-brand)}
.ds-dropdown .ds-dropdown__option.is-selected{background:var(--ds-color-selected);border-color:var(--ds-color-brand);color:var(--ds-color-brand)}
.ds-dropdown .ds-dropdown__option:focus-within{outline:none}
.ds-dropdown__actions{display:flex;flex-shrink:0;justify-content:flex-end;gap:var(--ds-space-2);margin-top:var(--ds-space-3)}
.ds-dropdown .filter-clear,.ds-dropdown .filter-done{
  float:none;min-height:var(--ds-touch-height);margin:0;padding:10px 12px;
  border:1px solid var(--ds-color-border);border-radius:var(--ds-radius-control);
  background:var(--ds-color-surface);color:var(--ds-color-brand);font:inherit;font-size:.9375rem;font-weight:500;cursor:pointer;
}
.ds-dropdown .filter-done{background:var(--ds-color-brand);border-color:var(--ds-color-brand);color:var(--ds-color-surface)}
.ds-dropdown .filter-done:disabled,#mobile-filter-apply:disabled{background:var(--ds-color-disabled-bg);border-color:var(--ds-color-disabled-bg);color:var(--ds-color-disabled-text);cursor:default}
.ds-dropdown button:focus:not(:focus-visible),.ds-dropdown input:focus:not(:focus-visible){outline:none;box-shadow:none}
.ds-dropdown button:focus-visible,.ds-dropdown input:focus-visible{outline:3px solid var(--ds-color-brand);outline-offset:3px}
.ds-dropdown--single .ds-dropdown__panel{left:auto;right:0;width:240px}
.ds-dropdown--single .filter-choice-grid{grid-template-columns:1fr}
.ds-dropdown--single .ds-dropdown__option{border-color:transparent;background:transparent}
.ds-dropdown--single .ds-dropdown__option.is-selected{background:var(--ds-color-selected);color:var(--ds-color-brand)}
.compact-filters .ds-dropdown{width:184px;flex:0 0 auto}
@media(min-width:701px){#catalog-filter-home .ds-dropdown:last-child .ds-dropdown__panel{left:auto;right:0}}
/* The same multi-select options expand into the existing mobile sheet. */
#mobile-filter-body .ds-dropdown{padding:18px 0;border-bottom:1px solid var(--ds-color-border)}
#mobile-filter-body .ds-dropdown:last-child{border-bottom:0}
#mobile-filter-body .ds-dropdown .ds-dropdown__trigger{display:none}
#mobile-filter-body .ds-dropdown .ds-dropdown__panel,#mobile-filter-body .ds-dropdown .ds-dropdown__panel[hidden]{display:block;position:static;width:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;overflow:visible;background:transparent;transform:none}
#mobile-filter-body .ds-dropdown .filter-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
#mobile-filter-body .ds-dropdown .filter-done{display:none}
#mobile-filter-body .ds-dropdown__actions{justify-content:flex-start}
#mobile-filter-body .ds-dropdown__actions:has(.filter-clear[hidden]){display:none}
#mobile-filter-body .ds-dropdown .ds-dropdown__option{border-radius:24px;padding:10px 16px}
@media(max-width:700px){
  .compact-filters .ds-dropdown{width:172px}
  .catalog-toolbar{flex-wrap:wrap}
  .compact-filters{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.ds-dropdown .ds-dropdown__trigger,.ds-dropdown .ds-dropdown__chevron{transition:none}}

/* Icon geometry is centered in its viewBox; layout centers the SVG box separately. */
svg{display:block;flex-shrink:0}
.ds-icon{display:block;flex:0 0 20px;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ds-icon--small{flex-basis:16px;width:16px;height:16px}
.mobile-header-actions button{width:44px;height:44px;padding:0}
.landing-search button{padding:0}
.mobile-dialog-close,#mobile-filter-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:0;text-align:center}
.hub-arrow,.mobile-filter-open-arrow,.mobile-menu-links a>span,.selected-filters button>span{display:inline-flex;align-items:center;justify-content:center;line-height:1}
.guide-header .hub-guide-icon{justify-content:center}
.resource-year-chevron,.location-chevron{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;width:20px;height:20px;margin:0;border:0;transform:none}
.resource-year-filter[open] .resource-year-chevron,.institution-location[open] .location-chevron{margin:0;transform:rotate(180deg)}
.brand-symbol b{margin:0.5px}
.transition-symbol b{margin:1px}

/* Brand copy shares the same tagline in the header and mobile home. */
.brand-copy{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.brand-tagline{font-size:11px;font-weight:500;line-height:1.4;letter-spacing:-.02em;color:var(--ds-color-muted);white-space:nowrap}
.brand-name{font-size:inherit;font-weight:inherit;line-height:1.15;letter-spacing:inherit}
.landing-brand .brand-tagline{font-size:12px}
@media(max-width:700px){.site-header .brand-tagline{font-size:10px}}
