/* Sitewide search: nav trigger, overlay panel, result rows, answer cards.
   Loaded from partials/nav.html so it arrives with the shared chrome and never
   has to be pasted into a page. Kept out of chrome.css on purpose: a handful of
   pages (rectors, my-profile, bulletin) do not load chrome.css at all. */

/* ------------------------------------------------------------ nav trigger */
.nav-search-btn{
  width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:none;border:1px solid rgba(123,29,42,.35);cursor:pointer;color:#7B1D2A;
  transition:background .2s,color .2s,border-color .2s;padding:0;flex-shrink:0;margin-left:.7rem;
}
/* Below 781px the Give, Contact and profile controls are all hidden, so the
   hamburger becomes the next control and the two circles ended up touching with
   no gap at all. */
@media(max-width:780px){.nav .nav-search-btn{margin-right:.7rem}}
.nav-search-btn:hover,.nav-search-btn:focus-visible{background:#7B1D2A;color:#F6F1E8;border-color:#7B1D2A;outline:none}
.nav .nav-search-btn{display:flex}

.dr-search{
  display:flex;align-items:center;gap:.6rem;width:100%;
  background:rgba(246,241,232,.07);border:1px solid rgba(246,241,232,.22);
  color:rgba(246,241,232,.82);padding:.75rem .95rem;margin:0 0 1.1rem;cursor:pointer;
  font-family:'Cinzel',Georgia,serif;font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;
  transition:background .18s,border-color .18s;
}
.dr-search:hover{background:rgba(246,241,232,.12);border-color:rgba(184,131,40,.6)}
.dr-search svg{flex-shrink:0}

/* ---------------------------------------------------------------- overlay */
html.spps-locked{overflow:hidden}

.spps{
  position:fixed;inset:0;z-index:9000;
  font-family:'EB Garamond',Georgia,serif;
  opacity:0;transition:opacity .18s ease;
}
.spps.is-open{opacity:1}
.spps[hidden]{display:none}

.spps-scrim{position:absolute;inset:0;background:rgba(59,15,24,.52);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}

.spps-panel{
  position:relative;margin:7vh auto 0;max-width:730px;width:calc(100% - 2.4rem);
  max-height:82vh;display:flex;flex-direction:column;
  background:#F6F1E8;border:1px solid rgba(184,131,40,.55);
  box-shadow:0 26px 70px rgba(28,20,16,.34);
  transform:translateY(-10px);transition:transform .2s ease;
}
.spps.is-open .spps-panel{transform:translateY(0)}

/* ---------------------------------------------------------------- the bar */
.spps-bar{
  display:flex;align-items:center;gap:.75rem;padding:.9rem 1.15rem;
  border-bottom:1px solid rgba(123,29,42,.16);flex-shrink:0;
}
.spps-bar-icon{width:19px;height:19px;color:#7B1D2A;flex-shrink:0}
.spps-input{
  flex:1;min-width:0;border:none;background:none;outline:none;
  font-family:'Cormorant Garamond',Georgia,serif;font-size:1.32rem;color:#2C1F16;
  padding:.15rem 0;-webkit-appearance:none;
}
.spps-input::placeholder{color:rgba(122,102,72,.62)}
.spps-input::-webkit-search-cancel-button{-webkit-appearance:none}
.spps-close{
  background:none;border:1px solid rgba(122,102,72,.32);color:#7A6648;cursor:pointer;
  font-family:'Cinzel',Georgia,serif;font-size:.56rem;letter-spacing:.12em;text-transform:uppercase;
  padding:.32rem .5rem;transition:border-color .18s,color .18s;flex-shrink:0;
}
.spps-close:hover{border-color:#7B1D2A;color:#7B1D2A}

/* --------------------------------------------------------------- the body */
.spps-body{overflow-y:auto;overscroll-behavior:contain;padding:.35rem 0 .5rem;flex:1;-webkit-overflow-scrolling:touch}

.spps-group{padding:.35rem 0 .25rem}
.spps-group-head{
  display:flex;align-items:center;gap:.55rem;margin:0;padding:.75rem 1.2rem .45rem;
  font-family:'Cinzel',Georgia,serif;font-size:.70rem;letter-spacing:.17em;text-transform:uppercase;
  color:#7A6648;font-weight:600;
}
.spps-group-head::after{content:'';flex:1;height:1px;background:rgba(122,102,72,.2)}
.spps-group-count{
  font-size:.67rem;color:rgba(122,102,72,.75);letter-spacing:.06em;order:3;
}

/* The row is a container: the link and the chips are siblings, because a
   button inside an anchor is invalid and the two fight over the same click. */
.spps-row{
  padding:.6rem 1.2rem;border-left:2px solid transparent;
  transition:background .13s,border-color .13s;
}
.spps-row:hover,.spps-row.is-active{background:rgba(184,131,40,.09);border-left-color:#B88328}
.spps-row-link{display:flex;gap:.85rem;align-items:flex-start;text-decoration:none;color:inherit}
.spps-row-link:focus-visible{outline:2px solid #B88328;outline-offset:-2px}
.spps-row.is-slim{padding-top:.42rem;padding-bottom:.42rem}
.spps-row.is-slim .spps-row-link{align-items:center}
/* keep the chips under the text, not under the icon, when a row has a thumbnail */
.spps-row.has-thumb .spps-chips{margin-left:calc(46px + .85rem)}
/* visually hidden, still announced */
.spps-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.spps-row-main{flex:1;min-width:0;display:block}
.spps-row-title{
  display:block;font-family:'Cormorant Garamond',Georgia,serif;font-size:1.27rem;
  line-height:1.28;color:#2C1F16;
}
.spps-row:hover .spps-row-title,.spps-row.is-active .spps-row-title{color:#7B1D2A}
.spps-row-parent{
  display:block;font-family:'Cinzel',Georgia,serif;font-size:.65rem;letter-spacing:.13em;
  text-transform:uppercase;color:#7A6648;margin-top:.16rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.spps-row-text{
  display:block;font-size:1rem;line-height:1.44;color:rgba(44,31,22,.76);margin-top:.28rem;
}
.spps-row-text mark{background:rgba(184,131,40,.24);color:#7B1D2A;padding:0 .08em}
.spps-row-kind{
  font-family:'Cinzel',Georgia,serif;font-size:.6rem;letter-spacing:.12em;text-transform:uppercase;
  color:rgba(122,102,72,.8);flex-shrink:0;padding-left:.6rem;
}
.spps-thumb{
  width:46px;height:46px;object-fit:cover;flex-shrink:0;margin-top:.15rem;
  border:1px solid rgba(122,102,72,.28);background:rgba(122,102,72,.06);
}

/* ------------------------------------------------------------------ chips */
.spps-chips{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.36rem}
/* Optical centring for the small caps-lettered boxes. Both corrections were
   measured off rendered pixels at 8x, not guessed:
   1. letter-spacing leaves a trailing space after the last letter with nothing
      to balance it on the left, so the right padding is reduced by exactly one
      letter-space. Across 25 labels this leaves a mean error of 0.10px.
   2. Cinzel uppercase has no descenders, so the ink rides high in the line box.
      line-height:1 shrinks the box to the em and the uneven vertical padding
      carries the rest. Mean error 0.26px.
   What remains is per-glyph side bearing, which no padding can remove: a label
   ending in T sits differently from one ending in O. Do not chase it by tuning
   against a single label, which only moves the error onto every other one. */
.spps-chip{
  display:inline-block;background:none;cursor:pointer;text-decoration:none;
  border:1px solid rgba(122,102,72,.32);border-radius:999px;color:#7A6648;
  font-family:'Cinzel',Georgia,serif;font-size:.6rem;letter-spacing:.1em;text-transform:uppercase;
  line-height:1;
  padding:.375rem .55rem .245rem;
  padding-right:calc(.55rem - .1em);
  transition:border-color .16s,color .16s,background .16s;
}
.spps-chip:hover{border-color:#B88328;color:#7B1D2A;background:rgba(184,131,40,.12)}
.spps-chip:focus-visible{outline:2px solid #B88328;outline-offset:1px}

/* ------------------------------------------------------------ answer card */
.spps-card{
  margin:.7rem 1.2rem .5rem;padding:1rem 1.15rem 1.05rem;
  background:rgba(184,131,40,.07);border:1px solid rgba(184,131,40,.32);border-left:3px solid #7B1D2A;
}
.spps-card-kicker{
  display:block;font-family:'Cinzel',Georgia,serif;font-size:.66rem;letter-spacing:.17em;
  text-transform:uppercase;color:#7A6648;margin-bottom:.3rem;
}
.spps-card-title{
  margin:0 0 .5rem;font-family:'Cormorant Garamond',Georgia,serif;font-weight:500;
  font-size:1.8rem;line-height:1.2;color:#7B1D2A;
}
.spps-card-meta{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.6rem}
.spps-tag{
  display:inline-block;
  font-family:'Cinzel',Georgia,serif;font-size:.6rem;letter-spacing:.11em;text-transform:uppercase;
  border:1px solid rgba(122,102,72,.35);color:#7A6648;
  line-height:1;
  padding:.36rem .5rem .26rem;
  padding-right:calc(.5rem - .11em);
}
.spps-tag.is-fast{border-color:rgba(61,107,94,.55);color:#3D6B5E}
.spps-tag.is-feast{border-color:rgba(123,29,42,.45);color:#7B1D2A}
.spps-card-dates{display:flex;flex-wrap:wrap;gap:.3rem;margin-bottom:.6rem}
.spps-card-readings{list-style:none;margin:0 0 .6rem;padding:0;font-size:1.01rem;line-height:1.6;color:rgba(44,31,22,.82)}
.spps-card-readings li{display:grid;grid-template-columns:182px 1fr;gap:.6rem;padding:.1rem 0}
.spps-card-src{
  font-family:'Cinzel',Georgia,serif;font-size:.6rem;letter-spacing:.1em;text-transform:uppercase;
  color:#7A6648;padding-top:.22rem;line-height:1.5;
}
.spps-card-list{display:flex;flex-direction:column;margin-bottom:.6rem}
.spps-card-link{
  display:flex;flex-direction:column;padding:.32rem 0;text-decoration:none;color:#2C1F16;
  border-bottom:1px solid rgba(122,102,72,.14);font-size:1.1rem;
}
.spps-card-link:last-child{border-bottom:none}
.spps-card-link:hover{color:#7B1D2A}
.spps-card-link small{
  font-family:'Cinzel',Georgia,serif;font-size:.6rem;letter-spacing:.12em;text-transform:uppercase;
  color:#7A6648;margin-top:.1rem;
}
.spps-card-note{margin:0 0 .6rem;font-size:1.06rem;color:rgba(44,31,22,.7)}
.spps-card-links{display:flex;flex-wrap:wrap;gap:1rem}
.spps-card-links a{
  font-family:'Cinzel',Georgia,serif;font-size:.66rem;letter-spacing:.13em;text-transform:uppercase;
  color:#7B1D2A;text-decoration:none;border-bottom:1px solid rgba(123,29,42,.35);padding-bottom:.12rem;
}
.spps-card-links a:hover{border-bottom-color:#B88328;color:#B88328}

/* ------------------------------------------------------- empty and waiting */
.spps-empty{padding:1.5rem 1.3rem 1.8rem}
.spps-empty-lead{margin:0 0 .9rem;font-size:1.2rem;line-height:1.5;color:rgba(44,31,22,.8)}
.spps-empty-note{margin:0;font-size:1.06rem;line-height:1.55;color:rgba(44,31,22,.66)}
.spps-empty-note a{color:#7B1D2A}
.spps-suggest{display:flex;flex-wrap:wrap;gap:.4rem}
.spps-loading{
  padding:1.1rem 1.3rem;font-family:'Cinzel',Georgia,serif;font-size:.70rem;letter-spacing:.15em;
  text-transform:uppercase;color:rgba(122,102,72,.8);
}
.spps-note{
  margin:0;padding:.7rem 1.3rem .3rem;font-family:'Cinzel',Georgia,serif;font-size:.66rem;
  letter-spacing:.13em;text-transform:uppercase;color:#7A6648;
}
.spps-related{border-top:1px solid rgba(122,102,72,.18);margin-top:.5rem}

/* ------------------------------------------------------------------- foot */
.spps-foot{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-shrink:0;
  padding:.6rem 1.2rem;border-top:1px solid rgba(123,29,42,.16);background:rgba(122,102,72,.045);
}
.spps-hint{
  font-family:'Cinzel',Georgia,serif;font-size:.52rem;letter-spacing:.11em;text-transform:uppercase;
  color:rgba(122,102,72,.85);display:flex;align-items:center;gap:.3rem;
}
.spps-hint kbd{
  font-family:'Cinzel',Georgia,serif;border:1px solid rgba(122,102,72,.35);padding:.08rem .3rem;
  font-size:.55rem;line-height:1.4;
}
.spps-foot-all{
  font-family:'Cinzel',Georgia,serif;font-size:.55rem;letter-spacing:.13em;text-transform:uppercase;
  color:#7B1D2A;text-decoration:none;border-bottom:1px solid rgba(123,29,42,.4);padding-bottom:.1rem;
}
.spps-foot-all:hover{color:#B88328;border-bottom-color:#B88328}

/* ----------------------------------------------------------------- mobile */
@media(max-width:640px){
  .spps-panel{margin:0;width:100%;max-width:none;height:100%;max-height:none;border:none}
  .spps-scrim{display:none}
  .spps-bar{padding:.85rem .9rem}
  .spps-input{font-size:1.15rem}
  .spps-row,.spps-group-head,.spps-note{padding-left:.9rem;padding-right:.9rem}
  .spps-card{margin-left:.9rem;margin-right:.9rem}
  .spps-hint{display:none}
  .spps-foot{justify-content:flex-end}
  .spps-card-readings li{grid-template-columns:1fr;gap:.05rem}
  .spps-card-src{padding-top:0}
}

@media(prefers-reduced-motion:reduce){
  .spps,.spps-panel{transition:none}
}

/* --------------------------------------------------------- /search page */
.spsp-wrap{max-width:940px;margin:0 auto;padding:0 1.4rem 5rem}
.spsp-form{display:flex;align-items:center;gap:.8rem;border-bottom:2px solid #7B1D2A;padding:.5rem 0 .7rem;margin-bottom:.5rem}
.spsp-form svg{width:22px;height:22px;color:#7B1D2A;flex-shrink:0}
.spsp-input{
  flex:1;min-width:0;border:none;background:none;outline:none;-webkit-appearance:none;
  font-family:'Cormorant Garamond',Georgia,serif;font-size:1.7rem;color:#2C1F16;padding:.1rem 0;
}
.spsp-input::placeholder{color:rgba(122,102,72,.55)}
.spsp-input::-webkit-search-cancel-button{-webkit-appearance:none}
.spsp-meta{
  font-family:'Cinzel',Georgia,serif;font-size:.70rem;letter-spacing:.14em;text-transform:uppercase;
  color:#7A6648;padding:.5rem 0 1.4rem;
}
.spsp-body .spps-row{padding-left:0;padding-right:.6rem;border-left:none;border-bottom:1px solid rgba(122,102,72,.13)}
.spsp-body .spps-row.has-thumb .spps-chips{margin-left:calc(46px + .85rem)}
.spsp-body .spps-row:hover,.spsp-body .spps-row.is-active{background:rgba(184,131,40,.08)}
.spsp-body .spps-group-head{padding-left:0;padding-right:0}
.spsp-body .spps-card{margin-left:0;margin-right:0}
.spsp-body .spps-note{padding-left:0}
.spsp-body .spps-empty{padding-left:0;padding-right:0}
.spsp-body .spps-row-text{font-size:1.08rem}
@media(max-width:640px){
  .spsp-input{font-size:1.3rem}
  .spsp-wrap{padding:0 1.1rem 4rem}
}
