/*
  PAF-IAST Central Library, theme "pafiast": home page (opac-main.tt), "Cupertino Shelf".
  Ported from the approved redesign/OPACUserCSS.css.
  - Loaded only on the home page, after css/pl/pl-base.css (INCLUDE 'pl-head.inc' pl_css=['pl-home.css']).
  - Every rule is scoped to body#opac-main.pl-theme, and the page body to its .pl-home root, so nothing here
    reaches pl-masthead.inc / pl-bottom.inc (header, nav, footer belong to pl-base.css) or any other page.
  - Design tokens (--pl-navy, --pl-navy-dark, --pl-blue, --pl-gold, --pl-gold-dark, --pl-ink, --pl-muted, --pl-line,
    --pl-bg, --pl-bg-soft, --pl-ease, --pl-sans, --pl-wrap) come from pl-base.css and are never redefined here.
    Home-only values use the --ph- prefix; the shelf geometry vars (--bk-*, --rows, --mode ...) are read by pl-home.js.
*/

/* =========================================================
   ROOT, BASE
   ========================================================= */
body#opac-main.pl-theme #wrapper {
  /* opac.css pads #wrapper 40px / 15px; the home page is full-bleed (defensive: pl-base.css normally does this) */
  padding-left: 0;
  padding-right: 0;
}
body#opac-main.pl-theme .pl-home {
  --ph-navy-ink: #0a1d38;

  /* Shelf geometry (JS reads --rows, --mode, --bk-w and --bk-gap from .pl-case) */
  --bk-w: 120px;
  --bk-h: 172px;
  --bk-gap: 18px;
  --bk-fs: 10.5px;
  --bay-gap: 22px;
  --board-h: 22px;
  --crown-h: 46px;
  --skirt-h: 50px;
  --stile-w: 26px;
  --rows: 2;
  --mode: fit;

  /* Wood grain: SVG turbulence stretched horizontally / vertically, blended as overlay (inline data, no request) */
  --ph-grain-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='160'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.010 0.55' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.55'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --ph-grain-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='480'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55 0.010' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.55'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");

  /* .maincontent may carry page-card styling from pl-base.css on other pages: the home page is full-bleed */
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: none;
  background: var(--pl-bg);
  color: var(--pl-ink);
  font-family: var(--pl-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body#opac-main.pl-theme .pl-home *,
body#opac-main.pl-theme .pl-home *::before,
body#opac-main.pl-theme .pl-home *::after {
  box-sizing: border-box;
}
body#opac-main.pl-theme .pl-home :where(a) {
  color: var(--pl-blue);
}
body#opac-main.pl-theme .pl-home :where(p) {
  margin: 0 0 .5rem;
}
body#opac-main.pl-theme .pl-home :where(h1, h2, h3) {
  margin: 0;
  font-family: var(--pl-sans);
  font-weight: 600;
  color: var(--pl-navy);
  letter-spacing: -.02em;
}
body#opac-main.pl-theme .pl-home :where(ul) {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Content container of the home sections: the same --pl-wrap width as the chrome's .pl-container (pl-base.css).
   Zero specificity on purpose: should pl-base.css ever style .pl-wrap for every page, its values win. */
:where(body#opac-main.pl-theme .pl-home .pl-wrap) {
  width: 100%;
  max-width: var(--pl-wrap);
  margin: 0 auto;
  padding: 0 20px;
}
body#opac-main.pl-theme .pl-home .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Focus ---- */
body#opac-main.pl-theme .pl-home a:focus-visible,
body#opac-main.pl-theme .pl-home button:focus-visible,
body#opac-main.pl-theme .pl-home input:focus-visible,
body#opac-main.pl-theme .pl-home select:focus-visible {
  outline: 3px solid var(--pl-gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Buttons ---- */
body#opac-main.pl-theme .pl-home .pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 14px/1 var(--pl-sans);
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  transition: background-color .25s var(--pl-ease), color .25s var(--pl-ease), border-color .25s var(--pl-ease), transform .35s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-btn:hover {
  transform: translateY(-1px);
}
body#opac-main.pl-theme .pl-home .pl-btn:active {
  transform: translateY(0);
  transition-duration: .1s;
}
body#opac-main.pl-theme .pl-home .pl-btn--gold {
  background: var(--pl-gold);
  color: #1b1200;
  box-shadow: 0 6px 18px -8px rgba(245, 166, 35, .9);
}
body#opac-main.pl-theme .pl-home .pl-btn--gold::before {
  /* pre-rendered hover shadow: only its opacity animates */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 10px 24px -8px rgba(245, 166, 35, .95);
  opacity: 0;
  transition: opacity .35s var(--pl-ease);
  pointer-events: none;
}
body#opac-main.pl-theme .pl-home .pl-btn--gold:hover,
body#opac-main.pl-theme .pl-home .pl-btn--gold:focus-visible {
  background: #ffb63a;
  color: #1b1200;
}
body#opac-main.pl-theme .pl-home .pl-btn--gold:hover::before,
body#opac-main.pl-theme .pl-home .pl-btn--gold:focus-visible::before {
  opacity: 1;
}
body#opac-main.pl-theme .pl-home .pl-btn--navy {
  background: var(--pl-navy);
  color: #fff;
}
body#opac-main.pl-theme .pl-home .pl-btn--navy:hover,
body#opac-main.pl-theme .pl-home .pl-btn--navy:focus-visible {
  background: var(--pl-navy-dark);
  color: #fff;
}
body#opac-main.pl-theme .pl-home .pl-btn--outline {
  border-color: rgba(20, 61, 110, .35);
  color: var(--pl-navy);
  background: transparent;
  font-weight: 600;
}
body#opac-main.pl-theme .pl-home .pl-btn--outline:hover,
body#opac-main.pl-theme .pl-home .pl-btn--outline:focus-visible {
  background: var(--pl-navy);
  border-color: var(--pl-navy);
  color: #fff;
}
/* =========================================================
   BREADCRUMBS (Koha html_helpers WRAPPER breadcrumbs)
   Home: not rendered. Its only item is "Home" (href="#"), which the main navigation already marks as the
   current page; a hidden copy was an invisible tab stop.
   Single news item: visible. Visuals use low specificity so pl-base.css styling, if any, wins.
   ========================================================= */
body#opac-main.pl-theme .pl-crumbs--hidden {
  display: none;
}
/* Single news item: the trail sits above <main class="pl-home">, outside the home styles, aligned with the content */
:where(body#opac-main.pl-theme .pl-crumbs--article) {
  width: 100%;
  max-width: var(--pl-wrap);
  margin: 0 auto;
  padding: 18px 20px 0;
}
:where(body#opac-main.pl-theme .pl-crumbs) .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font: 500 13px/1.5 var(--pl-sans);
  color: var(--pl-muted);
  list-style: none;
}
:where(body#opac-main.pl-theme .pl-crumbs) .breadcrumb a {
  color: var(--pl-blue);
  text-decoration: none;
}
:where(body#opac-main.pl-theme .pl-crumbs) .breadcrumb-item.active a {
  color: var(--pl-muted);
}
:where(body#opac-main.pl-theme .pl-crumbs) .breadcrumb-item + .breadcrumb-item::before {
  content: "\203A";
  float: none;
  display: inline-block;
  width: auto;
  height: auto;
  padding: 0 .5rem;
  background: none;
  color: var(--pl-muted);
}

/* =========================================================
   HERO: wall + wooden case
   ========================================================= */
body#opac-main.pl-theme .pl-home .pl-hero {
  position: relative;
  color: #fff;
  background: var(--ph-navy-ink);
  overflow: hidden;
  isolation: isolate;
}
body#opac-main.pl-theme .pl-home .pl-hero::before {
  /* lit top edge of the wall: a hairline that separates it from the nav */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 240, 215, .22) 35%, rgba(255, 255, 255, .06));
  pointer-events: none;
}

/* Wall behind the case (parallax layer) */
body#opac-main.pl-theme .pl-home .pl-hero__wall {
  position: absolute;
  inset: -3% -2%;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 18% -10%, rgba(255, 214, 160, .24), transparent 60%),
    radial-gradient(700px 500px at 85% 20%, rgba(31, 95, 168, .38), transparent 65%),
    linear-gradient(180deg, #1a4a86 0%, #143d70 28%, #0e2d55 62%, #0a1d38 100%);
}
body#opac-main.pl-theme .pl-home .pl-hero__wall::after {
  /* a shaft of warm light entering from the upper left */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(70deg, transparent 22%, rgba(255, 220, 170, .09) 31%, rgba(255, 222, 175, .28) 40%, rgba(255, 222, 175, .28) 46%, rgba(255, 220, 170, .08) 55%, transparent 63%);
}

/* Soft warm light that follows the cursor across the wall (JS moves it with eased transforms; opacity only otherwise).
   At rest it sits where the shaft lands so the first frame already has atmosphere. */
body#opac-main.pl-theme .pl-home .pl-hero__glow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 820px;
  height: 820px;
  margin: -410px 0 0 -410px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 206, 150, .34) 0%, rgba(255, 200, 140, .15) 28%, rgba(255, 190, 130, .04) 50%, rgba(255, 190, 130, 0) 68%);
  transform: translate3d(26vw, 140px, 0);   /* at rest: where the shaft meets the wall */
  opacity: .7;
  transition: opacity .9s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-hero__glow.is-live {
  opacity: .95;
}

/* Headline copy on the wall */
body#opac-main.pl-theme .pl-home .pl-hero__copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 46px;
  padding-bottom: 30px;
}
body#opac-main.pl-theme .pl-home .pl-hero__title {
  font: 600 clamp(36px, 4.6vw, 60px)/1.04 var(--pl-sans);
  letter-spacing: -.035em;
  color: #fff;
  text-wrap: balance;
}
body#opac-main.pl-theme .pl-home .pl-hero__title em {
  font-style: normal;
  color: var(--pl-gold);
}
body#opac-main.pl-theme .pl-home .pl-hero__lead {
  margin: 16px auto 24px;
  max-width: 44ch;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.5;
  color: rgba(255, 255, 255, .78);
  letter-spacing: -.01em;
}

/* Entrance choreography (JS adds .is-js then .is-ready) */
body#opac-main.pl-theme .pl-home.is-js .pl-hero__copy > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--pl-ease), transform .7s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home.is-js .pl-hero__copy > :nth-child(2) { transition-delay: .1s; }
body#opac-main.pl-theme .pl-home.is-js .pl-hero__copy > :nth-child(3) { transition-delay: .2s; }
body#opac-main.pl-theme .pl-home.is-js .pl-hero__copy > :nth-child(4) { transition-delay: .3s; }
body#opac-main.pl-theme .pl-home.is-ready .pl-hero__copy > * {
  opacity: 1;
  transform: none;
}

/* Dust canvas */
body#opac-main.pl-theme .pl-home .pl-hero__dust {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

/* ---- The wooden case ---- */
body#opac-main.pl-theme .pl-home .pl-case {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, .7);
}
body#opac-main.pl-theme .pl-home .pl-case__light {
  /* the light shaft continues over the shelf */
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(70deg, transparent 30%, rgba(255, 220, 170, .07) 38%, rgba(255, 222, 175, .19) 44%, rgba(255, 222, 175, .19) 48%, rgba(255, 220, 170, .06) 55%, transparent 60%);
}

/* Wood recipes */
body#opac-main.pl-theme .pl-home .pl-wood-light {
  background-color: #b67a43;
  background-image:
    var(--ph-grain-h),
    repeating-linear-gradient(180deg, rgba(90, 45, 15, 0) 0 2px, rgba(90, 45, 15, .09) 2px 3px, rgba(255, 220, 170, .07) 3px 4px, rgba(90, 45, 15, 0) 4px 7px),
    linear-gradient(180deg, #c98f55 0%, #b97c45 40%, #a86b36 75%, #95592a 100%);
  background-blend-mode: overlay, normal, normal;
}

/* Crown rail with the quiet title */
body#opac-main.pl-theme .pl-home .pl-case__crown {
  position: relative;
  z-index: 3;
  height: var(--crown-h);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 190, .45),
    inset 0 -2px 0 rgba(60, 30, 10, .35),
    0 4px 10px rgba(0, 0, 0, .35);
}
body#opac-main.pl-theme .pl-home .pl-case__plate {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 5px 16px 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 238, 214, .62), rgba(255, 232, 200, .46));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(90, 45, 15, .25),
    0 1px 0 rgba(255, 230, 190, .25);
}
body#opac-main.pl-theme .pl-home .pl-case__label {
  /* an <h2> for structure, visually a small engraved plate label */
  display: inline-block;
  margin: 0;
  padding: 0;
  font: 600 12px/1.4 var(--pl-sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #3a2110;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
body#opac-main.pl-theme .pl-home .pl-case__count {
  font: 600 11px/1.4 var(--pl-sans);
  letter-spacing: .06em;
  color: #5a3417;
  font-variant-numeric: tabular-nums;
}
body#opac-main.pl-theme .pl-home .pl-case__count:empty {
  display: none;
}

/* Bays */
body#opac-main.pl-theme .pl-home .pl-case__bays {
  position: relative;
  z-index: 1;
}
body#opac-main.pl-theme .pl-home .pl-bay {
  position: relative;
  height: calc(var(--bay-gap) + var(--bk-h) + var(--board-h));
}
body#opac-main.pl-theme .pl-home .pl-bay__back {
  position: absolute;
  inset: -2% -1.5%;
  z-index: 0;
  background-color: #5a3618;
  background-image:
    var(--ph-grain-h),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 71px, rgba(0, 0, 0, .22) 71px 72px, rgba(255, 220, 170, .05) 72px 73px),
    repeating-linear-gradient(180deg, rgba(40, 20, 5, 0) 0 2px, rgba(40, 20, 5, .10) 2px 3px, rgba(255, 220, 170, .04) 3px 4px, rgba(40, 20, 5, 0) 4px 8px),
    linear-gradient(180deg, #3f2410 0%, #5a3618 35%, #67401e 70%, #5d3819 100%);
  background-blend-mode: overlay, normal, normal, normal;
}
body#opac-main.pl-theme .pl-home .pl-bay__back::before {
  /* shadow cast by the board above */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .28) 45%, rgba(0, 0, 0, 0));
}
body#opac-main.pl-theme .pl-home .pl-bay__back::after {
  /* ambient occlusion in the corners */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 7%, transparent 93%, rgba(0, 0, 0, .35)),
    linear-gradient(0deg, rgba(0, 0, 0, .18), transparent 30%);
}

/* The shelf board the books stand on */
body#opac-main.pl-theme .pl-home .pl-bay__board {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: var(--board-h);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 196, .55),
    inset 0 -1px 0 rgba(40, 20, 5, .5),
    0 3px 6px rgba(0, 0, 0, .35);
}
body#opac-main.pl-theme .pl-home .pl-bay__board::before {
  /* the lit top surface, seen slightly from above */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(180deg, rgba(255, 226, 180, .55), rgba(255, 226, 180, .15));
}
body#opac-main.pl-theme .pl-home .pl-bay__board::after {
  /* the lip's lower edge */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .28));
}

/* Scroll affordances for the narrow-screen shelf (hidden wherever the shelf does not scroll) */
body#opac-main.pl-theme .pl-home .pl-bay__arrow {
  display: none;
}

/* Side stiles */
body#opac-main.pl-theme .pl-home .pl-case__stile {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: var(--stile-w);
  background-color: #b67a43;
  background-image:
    var(--ph-grain-v),
    repeating-linear-gradient(90deg, rgba(90, 45, 15, 0) 0 2px, rgba(90, 45, 15, .09) 2px 3px, rgba(255, 220, 170, .07) 3px 4px, rgba(90, 45, 15, 0) 4px 7px),
    linear-gradient(90deg, #96592a 0%, #b97c45 35%, #c98f55 55%, #a86b36 100%);
  background-blend-mode: overlay, normal, normal;
  box-shadow: 0 0 12px rgba(0, 0, 0, .45);
}
body#opac-main.pl-theme .pl-home .pl-case__stile--l { left: 0; }
body#opac-main.pl-theme .pl-home .pl-case__stile--r {
  right: 0;
  background-image:
    var(--ph-grain-v),
    repeating-linear-gradient(90deg, rgba(90, 45, 15, 0) 0 2px, rgba(90, 45, 15, .09) 2px 3px, rgba(255, 220, 170, .07) 3px 4px, rgba(90, 45, 15, 0) 4px 7px),
    linear-gradient(270deg, #96592a 0%, #b97c45 35%, #c98f55 55%, #a86b36 100%);
}

/* Plinth */
body#opac-main.pl-theme .pl-home .pl-case__skirt {
  position: relative;
  z-index: 2;
  height: var(--skirt-h);
  background-image:
    var(--ph-grain-h),
    repeating-linear-gradient(180deg, rgba(90, 45, 15, 0) 0 2px, rgba(90, 45, 15, .09) 2px 3px, rgba(255, 220, 170, .05) 3px 4px, rgba(90, 45, 15, 0) 4px 7px),
    linear-gradient(180deg, #8e5427 0%, #9f6433 30%, #8a5126 100%);
  box-shadow: inset 0 6px 10px -4px rgba(0, 0, 0, .55);
}

/* ---- Books ---- */
body#opac-main.pl-theme .pl-home .pl-bay__books {
  position: absolute;
  left: var(--stile-w);
  right: var(--stile-w);
  bottom: var(--board-h);
  z-index: 2;
  height: var(--bk-h);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--bk-gap);
  margin: 0;
  padding: 0 20px;
  list-style: none;
  perspective: 1500px;
  perspective-origin: 50% 20%;
  font-size: var(--bk-fs);
}
body#opac-main.pl-theme .pl-home .pl-bay.is-loading .pl-bay__books::before {
  /* ghost books while the catalogue answers (no layout shift) */
  content: "";
  position: absolute;
  inset: 10px 20px 0;
  /* pale spines (the old dark tint vanished into the wood, so the shelf read as empty on a first visit) */
  background:
    linear-gradient(180deg, rgba(255, 244, 228, .10), rgba(255, 244, 228, 0) 70%),
    repeating-linear-gradient(90deg, rgba(255, 238, 214, .20) 0 var(--bk-w), transparent var(--bk-w) calc(var(--bk-w) + var(--bk-gap)));
  background-position: center;
  opacity: .9;
  animation: plhGhost 1.4s var(--pl-ease) infinite alternate;
  -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
body#opac-main.pl-theme .pl-home .pl-bay__empty {
  position: absolute;
  left: 50%;
  bottom: calc(var(--board-h) + 24px);
  z-index: 3;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(20, 12, 6, .62);
  color: #f6ecdd;
  font: 500 13px/1.3 var(--pl-sans);
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
  backdrop-filter: blur(4px);
}
body#opac-main.pl-theme .pl-home .pl-bay__empty:hover {
  color: #fff;
  text-decoration: underline;
}
body#opac-main.pl-theme .pl-home .pl-book {
  /* three sizes (JS picks one from the title hash) so a row reads like a real shelf */
  --bh: 1;
  --bw: 1;
  position: relative;
  flex: 0 0 calc(var(--bk-w) * var(--bw));
  width: calc(var(--bk-w) * var(--bw));
  height: calc(var(--bk-h) * var(--bh));
  transform-style: preserve-3d;
}
body#opac-main.pl-theme .pl-home .pl-book--m { --bh: .94; --bw: .965; }
body#opac-main.pl-theme .pl-home .pl-book--s { --bh: .88; --bw: .93; }

/* Curated cover palette: seven deep/mid cloths plus three papers (about 40% of covers are paper).
   Text ink is chosen per swatch so every pairing clears 4.5:1. */
body#opac-main.pl-theme .pl-home .pl-pal-0 { --cv-bg1: #1f3a5f; --cv-bg2: #152a46; --cv-ink: #f6efe2; --cv-accent: #e8b86d; --cv-spine: #142741; }  /* deep navy */
body#opac-main.pl-theme .pl-home .pl-pal-1 { --cv-bg1: #6e2029; --cv-bg2: #4d141c; --cv-ink: #f6efe2; --cv-accent: #e3a0a8; --cv-spine: #45121a; }  /* oxblood */
body#opac-main.pl-theme .pl-home .pl-pal-2 { --cv-bg1: #2f5d3a; --cv-bg2: #214429; --cv-ink: #f6efe2; --cv-accent: #a9d1a0; --cv-spine: #1d3b24; }  /* forest */
body#opac-main.pl-theme .pl-home .pl-pal-3 { --cv-bg1: #4a5568; --cv-bg2: #37404f; --cv-ink: #f6efe2; --cv-accent: #a9c3e6; --cv-spine: #303847; }  /* slate */
body#opac-main.pl-theme .pl-home .pl-pal-4 { --cv-bg1: #c98d22; --cv-bg2: #b57b19; --cv-ink: #241a06; --cv-accent: #3b2a10; --cv-spine: #8f5c12; }  /* ochre */
body#opac-main.pl-theme .pl-home .pl-pal-5 { --cv-bg1: #cf8d98; --cv-bg2: #bf7a86; --cv-ink: #2b141a; --cv-accent: #5a2a3a; --cv-spine: #8c4a56; }  /* dusty rose */
body#opac-main.pl-theme .pl-home .pl-pal-6 { --cv-bg1: #1f6f78; --cv-bg2: #15525a; --cv-ink: #f6efe2; --cv-accent: #ead8a6; --cv-spine: #12474e; }  /* teal */
body#opac-main.pl-theme .pl-home .pl-pal-7 { --cv-bg1: #f3ead8; --cv-bg2: #e8dcc3; --cv-ink: #2a2117; --cv-accent: #1f3a5f; --cv-spine: #1f3a5f; }  /* cream paper */
body#opac-main.pl-theme .pl-home .pl-pal-8 { --cv-bg1: #f1e6c9; --cv-bg2: #e6d8b4; --cv-ink: #2a2117; --cv-accent: #6e2029; --cv-spine: #6e2029; }  /* parchment */
body#opac-main.pl-theme .pl-home .pl-pal-9 { --cv-bg1: #e8edf3; --cv-bg2: #d9e0e9; --cv-ink: #1c2a3a; --cv-accent: #2f5d3a; --cv-spine: #2f5d3a; }  /* pale paper */
body#opac-main.pl-theme .pl-home .pl-book__link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  transform-style: preserve-3d;
  border-radius: 2px;
}
body#opac-main.pl-theme .pl-home .pl-book__link:focus-visible {
  outline: 3px solid var(--pl-gold);
  outline-offset: 6px;
}
body#opac-main.pl-theme .pl-home .pl-book__body {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
}
body#opac-main.pl-theme .pl-home .pl-book__lift {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  transition: transform .5s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-book__shadow {
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -9px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 72%);
  transform: translateZ(0);
  transition: transform .5s var(--pl-ease), opacity .5s var(--pl-ease);
  pointer-events: none;
}
body#opac-main.pl-theme .pl-home .pl-book__face {
  position: absolute;
  backface-visibility: visible;
}
body#opac-main.pl-theme .pl-home .pl-book__spine {
  top: 0;
  left: 0;
  width: var(--t);
  height: 100%;
  transform-origin: left center;
  transform: translateZ(calc(var(--t) / 2)) rotateY(90deg);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 30%, rgba(255, 255, 255, .06) 70%, rgba(0, 0, 0, .25)),
    var(--cv-spine, #2a2a2a);
}
body#opac-main.pl-theme .pl-home .pl-book__pages {
  top: 3px;
  right: 0;
  width: var(--t);
  height: calc(100% - 6px);
  transform-origin: right center;
  transform: translateZ(calc(var(--t) / 2)) rotateY(-90deg);
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .10) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    linear-gradient(90deg, #d9cdb8, #efe6d4 40%, #e2d6c1);
}
body#opac-main.pl-theme .pl-home .pl-book__top {
  top: 0;
  left: 3px;
  width: calc(100% - 3px);
  height: var(--t);
  transform-origin: top center;
  transform: translateZ(calc(var(--t) / 2)) rotateX(-90deg);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    linear-gradient(180deg, #efe6d4, #d9cdb8);
}

/* Generated cover */
body#opac-main.pl-theme .pl-home .pl-cover {
  inset: 0;
  transform: translateZ(calc(var(--t) / 2));
  display: flex;
  flex-direction: column;
  padding: 1.15em 1.1em 1.05em 1.5em;
  border-radius: 1px 3px 3px 1px;
  overflow: hidden;
  color: var(--cv-ink, #f6efe2);
  background: linear-gradient(180deg, var(--cv-bg1, #1f3a5f) 0%, var(--cv-bg2, #152a46) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
body#opac-main.pl-theme .pl-home .pl-cover--light {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
}
body#opac-main.pl-theme .pl-home .pl-cover::before {
  /* lighting + the hinge crease near the spine */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, .10) 4%, rgba(0, 0, 0, .22) 6.5%, rgba(255, 255, 255, .12) 8.5%, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0) 80%, rgba(0, 0, 0, .14) 100%),
    linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .10) 100%);
}
body#opac-main.pl-theme .pl-home .pl-cover--light::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .16) 0, rgba(0, 0, 0, .05) 4%, rgba(0, 0, 0, .12) 6.5%, rgba(255, 255, 255, .35) 8.5%, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0) 80%, rgba(0, 0, 0, .07) 100%),
    linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .05) 100%);
}
body#opac-main.pl-theme .pl-home .pl-cover::after {
  /* linen */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, rgba(255, 255, 255, 0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .035) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
}
body#opac-main.pl-theme .pl-home .pl-cover > * {
  position: relative;
  z-index: 3;
}
body#opac-main.pl-theme .pl-home .pl-cover__head {
  display: block;
  min-width: 0;
}
/* Cover type never drops below 9px; JS trims titles at word boundaries, so no CSS ellipsis is ever drawn. */
body#opac-main.pl-theme .pl-home .pl-cover__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  text-overflow: clip;
  font-family: var(--pl-sans);
  font-weight: 700;
  font-size: max(calc(1.25em * var(--tt, 1)), 9px);   /* --tt: JS tightens a title whose longest word would not fit a line (floor 9px) */
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
body#opac-main.pl-theme .pl-home .pl-cover__probe {
  position: absolute;
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}
body#opac-main.pl-theme .pl-home .pl-cover__head.has-sub .pl-cover__title {
  -webkit-line-clamp: 3;
}
body#opac-main.pl-theme .pl-home .pl-book--s .pl-cover__title {
  -webkit-line-clamp: 3;
}
body#opac-main.pl-theme .pl-home .pl-book--s .pl-cover__head.has-sub .pl-cover__title {
  -webkit-line-clamp: 2;
}
body#opac-main.pl-theme .pl-home .pl-cover__sub {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: clip;
  margin-top: .4em;
  font-size: max(calc(.8em * var(--tt, 1)), 9px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0;
  opacity: .9;
  overflow-wrap: break-word;
}
body#opac-main.pl-theme .pl-home .pl-book--s .pl-cover__sub {
  -webkit-line-clamp: 1;
}
body#opac-main.pl-theme .pl-home .pl-cover__author {
  display: block;
  font-size: max(.84em, 9px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: .01em;
  opacity: .95;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
body#opac-main.pl-theme .pl-home .pl-cover__meta {
  display: block;
  font-size: max(.72em, 9px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
body#opac-main.pl-theme .pl-home .pl-cover__rule {
  display: block;
  height: .32em;
  border-radius: 1px;
  background: var(--cv-accent);
}
/* Paper covers: secondary copy in the swatch's full ink, barely translucent, so 9px stays legible at 1x */
body#opac-main.pl-theme .pl-home .pl-cover--light .pl-cover__sub,
body#opac-main.pl-theme .pl-home .pl-cover--light .pl-cover__author,
body#opac-main.pl-theme .pl-home .pl-cover--light .pl-cover__meta {
  color: var(--cv-ink);
  opacity: .94;
}
body#opac-main.pl-theme .pl-home .pl-cover__sheen {
  position: absolute !important;
  inset: 0;
  z-index: 4 !important;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .25) 45%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity .5s var(--pl-ease);
}
/* Real cover photo (images/pl/covers, published by tools/fetch-covers.ps1). The generated cover is the placeholder:
   it shimmers while the photo loads, the photo fades in over it, and stays as the cover if the photo fails. */
body#opac-main.pl-theme .pl-home .pl-cover__photo {
  position: absolute !important;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-cover.has-photo .pl-cover__photo {
  opacity: 1;
}
body#opac-main.pl-theme .pl-home .pl-cover.has-photo > :not(.pl-cover__photo):not(.pl-cover__sheen) {
  visibility: hidden; /* some layouts lift their text above the photo; hide it once the photo has faded in */
  transition: visibility 0s .6s;
}
body#opac-main.pl-theme .pl-home .pl-cover.has-photo::before {
  z-index: 4; /* keep the spine crease and lighting on top of the photo */
  opacity: .8;
}
body#opac-main.pl-theme .pl-home .pl-cover.is-photo-loading .pl-cover__sheen {
  opacity: 1;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, 0) 65%);
  background-size: 300% 100%;
  animation: plhShimmer 1.3s linear infinite;
}
/* Cover layouts */
body#opac-main.pl-theme .pl-home .pl-cover--a .pl-cover__title {
  text-transform: uppercase;
  font-weight: 800;
  font-size: max(calc(1.12em * var(--tt, 1)), 9px);
  letter-spacing: 0;
}
body#opac-main.pl-theme .pl-home .pl-cover--a.is-caps-off .pl-cover__title {
  /* JS: a capitalised word that would not fit the cover width even when tightened falls back to title case */
  text-transform: none;
  letter-spacing: -.02em;
}
body#opac-main.pl-theme .pl-home .pl-cover--a .pl-cover__rule {
  margin-top: auto;
  width: 2.4em;
  margin-bottom: .55em;
}
body#opac-main.pl-theme .pl-home .pl-cover--b {
  text-align: center;
  padding-left: 1.3em;
}
body#opac-main.pl-theme .pl-home .pl-cover--b .pl-cover__author {
  order: -1;
  font-size: max(.72em, 9px);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .9em;
}
body#opac-main.pl-theme .pl-home .pl-cover--b .pl-cover__head {
  margin: auto 0;
}
body#opac-main.pl-theme .pl-home .pl-cover--b .pl-cover__title {
  font-size: max(calc(1.12em * var(--tt, 1)), 9px);
}
body#opac-main.pl-theme .pl-home .pl-cover--b .pl-cover__rule {
  width: 1.8em;
  height: .2em;
  margin: .9em auto .6em;
}
body#opac-main.pl-theme .pl-home .pl-cover--c {
  padding-left: 1.9em;
}
body#opac-main.pl-theme .pl-home .pl-cover--c .pl-cover__rule {
  position: absolute;
  top: 1.15em;
  bottom: 1.05em;
  left: 1.05em;
  width: .34em;
  height: auto;
}
body#opac-main.pl-theme .pl-home .pl-cover--c .pl-cover__head {
  margin-top: auto;
}
body#opac-main.pl-theme .pl-home .pl-cover--c .pl-cover__title {
  font-size: max(calc(1.2em * var(--tt, 1)), 9px);
}
body#opac-main.pl-theme .pl-home .pl-cover--c .pl-cover__author {
  order: 1;
  margin-top: .5em;
}
body#opac-main.pl-theme .pl-home .pl-cover--c .pl-cover__meta {
  order: 2;
  margin-top: .25em;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__initial {
  display: block;
  font-family: var(--pl-sans);
  font-weight: 800;
  font-size: 3.6em;
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--cv-accent);
  margin: -.05em 0 .2em -.04em;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__head {
  margin-top: auto;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__title {
  font-size: max(calc(1.08em * var(--tt, 1)), 9px);
  font-weight: 600;
  -webkit-line-clamp: 3;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__head.has-sub .pl-cover__title {
  -webkit-line-clamp: 2;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__sub {
  -webkit-line-clamp: 1;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__author {
  order: 1;
  margin-top: .4em;
}
body#opac-main.pl-theme .pl-home .pl-cover--d .pl-cover__meta {
  order: 2;
  margin-top: .2em;
}
body#opac-main.pl-theme .pl-home .pl-cover--a .pl-cover__author,
body#opac-main.pl-theme .pl-home .pl-cover--a .pl-cover__meta {
  order: 1;
}
body#opac-main.pl-theme .pl-home .pl-cover--a .pl-cover__meta {
  margin-top: .25em;
}

/* Hover / focus signature: the book eases off the shelf, cover brightens, neighbours lean away */
body#opac-main.pl-theme .pl-home .pl-book__link:hover .pl-book__lift,
body#opac-main.pl-theme .pl-home .pl-book__link:focus-visible .pl-book__lift {
  transform: translateZ(38px) translateY(-6px);
}
body#opac-main.pl-theme .pl-home .pl-book__link:hover .pl-cover__sheen,
body#opac-main.pl-theme .pl-home .pl-book__link:focus-visible .pl-cover__sheen {
  opacity: .17;
}
body#opac-main.pl-theme .pl-home .pl-book__link:hover .pl-book__shadow,
body#opac-main.pl-theme .pl-home .pl-book__link:focus-visible .pl-book__shadow {
  transform: translateZ(0) scale(1.18, 1.3);
  opacity: .75;
}
body#opac-main.pl-theme .pl-home .pl-book.is-lean-l .pl-book__lift {
  transform: rotateY(7deg) translateX(-3px);
}
body#opac-main.pl-theme .pl-home .pl-book.is-lean-r .pl-book__lift {
  transform: rotateY(-7deg) translateX(3px);
}

/* Book entrance (pl-home.js listens for the plhBookIn animationend) */
@keyframes plhGhost {
  from { opacity: .5; }
  to { opacity: 1; }
}
@keyframes plhShimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
@keyframes plhBookIn {
  from { transform: translateY(22px) rotateY(-16deg); }
  to   { transform: none; }
}
@keyframes plhFaceIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body#opac-main.pl-theme .pl-home.is-js .pl-book:not(.is-settled) .pl-book__lift {
  animation: plhBookIn .75s var(--pl-ease) both;
  animation-delay: calc(min(var(--i), 20) * 32ms);
}
body#opac-main.pl-theme .pl-home.is-js .pl-book:not(.is-settled) .pl-book__face,
body#opac-main.pl-theme .pl-home.is-js .pl-book:not(.is-settled) .pl-book__shadow {
  animation: plhFaceIn .5s ease-out both;
  animation-delay: calc(min(var(--i), 20) * 32ms);
}

/* =========================================================
   SEARCH CARD (the page's catalogue search form: #searchform)
   ========================================================= */
body#opac-main.pl-theme .pl-home .pl-search-wrap {
  position: relative;
  z-index: 3;
  margin-top: -40px;
  scroll-margin-top: 24px;
}
body#opac-main.pl-theme .pl-home .pl-search-wrap--flat {
  /* single news item page: no hero to overlap */
  margin-top: 0;
  margin-bottom: 64px;
}
body#opac-main.pl-theme .pl-home .pl-search {
  background: #fff;
  border: 1px solid var(--pl-line);
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(10, 29, 56, .45), 0 2px 6px rgba(10, 29, 56, .06);
  padding: 28px 36px 24px;
}
body#opac-main.pl-theme .pl-home--article .pl-search {
  /* single news item page: the card sits on plain page, not over the hero */
  background: var(--pl-bg-soft);
  box-shadow: none;
}
body#opac-main.pl-theme .pl-home--article .pl-account-wrap {
  margin-top: 0;
  margin-bottom: 64px;
}
body#opac-main.pl-theme .pl-home .pl-search__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pl-gold-text);
  margin-bottom: 6px;
}
body#opac-main.pl-theme .pl-home .pl-search__title {
  font: 600 clamp(24px, 2.4vw, 30px)/1.2 var(--pl-sans);
  letter-spacing: -.025em;
}
body#opac-main.pl-theme .pl-home .pl-search__lead {
  color: var(--pl-muted);
  font-size: 14px;
  margin-top: 4px;
}
body#opac-main.pl-theme .pl-home .pl-search__form {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
}
body#opac-main.pl-theme .pl-home .pl-search__custom {
  margin: 18px 0 14px;
}
body#opac-main.pl-theme .pl-home #translControl {
  /* Koha's legacy transliteration hook, kept for parity with the masthead form */
  display: none;
}
body#opac-main.pl-theme .pl-home .pl-search__idx,
body#opac-main.pl-theme .pl-home .pl-search__q {
  height: 48px;
  margin: 0;
  border: 1px solid var(--pl-line);
  border-radius: 999px;
  font: 500 15px var(--pl-sans);
  color: var(--pl-ink);
  background: #fff;
  box-shadow: none;
  transition: border-color .25s var(--pl-ease), box-shadow .25s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-search__idx {
  flex: 0 0 auto;
  max-width: 220px;
  padding: 0 36px 0 18px;
  background: var(--pl-bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2316233a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
body#opac-main.pl-theme .pl-home .pl-search__q {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 20px;
  text-overflow: ellipsis;   /* applies to the placeholder too (Chromium / Safari); JS shortens it on phones */
}
body#opac-main.pl-theme .pl-home .pl-search__q::placeholder {
  color: var(--pl-muted);   /* 5.9:1 on white (WCAG AA) */
  opacity: 1;
}
body#opac-main.pl-theme .pl-home .pl-search__q:focus,
body#opac-main.pl-theme .pl-home .pl-search__idx:focus {
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 4px rgba(31, 95, 168, .14);
  outline: none;
}
/* keyboard focus: the same 3px ring as every other control (pl-base.css section 2: --pl-focus-light is --pl-blue),
   not just the soft halo */
body#opac-main.pl-theme .pl-home .pl-search__q:focus-visible,
body#opac-main.pl-theme .pl-home .pl-search__idx:focus-visible {
  outline: 3px solid var(--pl-blue);
  outline-offset: 2px;
}
body#opac-main.pl-theme .pl-home .pl-search__form .pl-btn {
  height: 48px;
  padding: 0 26px;
  font-size: 15px;
}
body#opac-main.pl-theme .pl-home .pl-search__links {
  font-size: 13px;
  color: var(--pl-muted);
  margin: 0;
}
body#opac-main.pl-theme .pl-home .pl-search__links a {
  text-decoration: none;
  font-weight: 500;
}
body#opac-main.pl-theme .pl-home .pl-search__links a:hover {
  text-decoration: underline;
}

/* =========================================================
   USER SUMMARY (Koha #user_summary, logged-in patrons with OPACUserSummary)
   ========================================================= */
body#opac-main.pl-theme .pl-home .pl-account-wrap {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}
body#opac-main.pl-theme .pl-home .pl-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin: 0;
  padding: 20px 28px;
  border: 1px solid var(--pl-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--pl-bg-soft));
  box-shadow: 0 18px 40px -30px rgba(10, 29, 56, .45);
}
body#opac-main.pl-theme .pl-home .pl-account__head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
body#opac-main.pl-theme .pl-home .pl-account__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--pl-navy);
  background: linear-gradient(160deg, rgba(31, 95, 168, .14), rgba(20, 61, 110, .06));
}
body#opac-main.pl-theme .pl-home .pl-account__icon .fa {
  font-size: 18px;
}
body#opac-main.pl-theme .pl-home .pl-account__intro {
  min-width: 0;
}
body#opac-main.pl-theme .pl-home .pl-account__label {
  margin: 0 0 2px;
  padding: 0;
  background: none;
  text-align: left;
  font: 600 11px/1.3 var(--pl-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pl-gold-text);
}
body#opac-main.pl-theme .pl-home .pl-account__welcome {
  margin: 0;
  font: 600 18px/1.3 var(--pl-sans);
  letter-spacing: -.015em;
  color: var(--pl-navy);
}
body#opac-main.pl-theme .pl-home .pl-account__welcome a {
  color: var(--pl-navy);
  text-decoration: none;
}
body#opac-main.pl-theme .pl-home .pl-account__welcome a:hover {
  text-decoration: underline;
}
body#opac-main.pl-theme .pl-home .pl-account__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 260px;
  margin: 0;
  padding: 0;
}
body#opac-main.pl-theme .pl-home .pl-account__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 14px 4px 5px;
  border: 1px solid var(--pl-line);
  border-radius: 999px;
  background: #fff;
  font: 500 14px/1.2 var(--pl-sans);
  color: var(--pl-ink);
  text-decoration: none;
  transition: border-color .25s var(--pl-ease), background-color .25s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-account__list a:hover {
  border-color: rgba(20, 61, 110, .3);
  background: var(--pl-bg-soft);
}
body#opac-main.pl-theme .pl-home .pl-account__list .count_label {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--pl-navy);
  color: #fff;
  font: 700 13px/1 var(--pl-sans);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
body#opac-main.pl-theme .pl-home .pl-account__alert .count_label {
  background: #b3261e;
}
body#opac-main.pl-theme .pl-home .pl-account__cta {
  flex: 0 0 auto;
  margin-left: auto;
}

/* =========================================================
   QUOTE OF THE DAY (Koha #daily-quote)
   ========================================================= */
body#opac-main.pl-theme .pl-home .pl-quote {
  margin-top: 56px;
  text-align: center;
}
body#opac-main.pl-theme .pl-home .pl-quote__label {
  margin: 0 0 12px;
  font: 600 11px/1.3 var(--pl-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pl-gold-text);
}
body#opac-main.pl-theme .pl-home .pl-quote__body {
  max-width: 54ch;
  margin: 0 auto;
  padding: 0;
  border: 0;
  font: 500 clamp(18px, 1.8vw, 22px)/1.5 var(--pl-sans);
  letter-spacing: -.015em;
  color: var(--pl-navy);
}
body#opac-main.pl-theme .pl-home .pl-quote__body #daily-quote-text::before { content: "\201C"; }
body#opac-main.pl-theme .pl-home .pl-quote__body #daily-quote-text::after { content: "\201D"; }
body#opac-main.pl-theme .pl-home .pl-quote__body #daily-quote-sep {
  /* the " ~ " stays for screen readers; the source moves to its own line */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
body#opac-main.pl-theme .pl-home .pl-quote__body #daily-quote-source {
  display: block;
  margin-top: 10px;
  font: 500 14px/1.4 var(--pl-sans);
  letter-spacing: .01em;
  color: var(--pl-muted);
}
body#opac-main.pl-theme .pl-home .pl-quote__body #daily-quote-source:empty {
  display: none;
}
body#opac-main.pl-theme .pl-home .pl-quote__body #daily-quote-source::before {
  content: "\2014\00A0";
}

/* =========================================================
   LIBRARY NEWS (Koha OPAC news: #news .newsitem ...)
   ========================================================= */
/* .pl-section.pl-news: one class more than the generic .pl-section padding further down, so these win */
body#opac-main.pl-theme .pl-home .pl-section.pl-news {
  padding-bottom: 0;
}
body#opac-main.pl-theme .pl-home .pl-section.pl-news--single {
  padding-top: 28px;
  padding-bottom: 48px;
}
body#opac-main.pl-theme .pl-home .pl-news__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}
body#opac-main.pl-theme .pl-home .pl-news__select {
  display: block;
  margin: 0;
}
body#opac-main.pl-theme .pl-home .pl-news__select fieldset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
body#opac-main.pl-theme .pl-home .pl-news__select label {
  margin: 0;
  font: 500 13px/1.3 var(--pl-sans);
  color: var(--pl-muted);
}
body#opac-main.pl-theme .pl-home .pl-news__select select {
  height: 40px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--pl-line);
  border-radius: 999px;
  font: 500 14px var(--pl-sans);
  color: var(--pl-ink);
  background: var(--pl-bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2316233a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
body#opac-main.pl-theme .pl-home .pl-news__box {
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}
body#opac-main.pl-theme .pl-home .pl-news--single .pl-news__box {
  margin-top: 4px;
  max-width: 760px;
}
body#opac-main.pl-theme .pl-home .pl-news__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  align-items: start;
  gap: 20px;
}
body#opac-main.pl-theme .pl-home .pl-news__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px 24px 18px;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: #fff;
}
body#opac-main.pl-theme .pl-home .pl-news--single .pl-news__item {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
body#opac-main.pl-theme .pl-home .pl-news__item .newsbody {
  /* opac.css pads .newsbody 8px 0; the card's gap already spaces it */
  padding: 0;
}
body#opac-main.pl-theme .pl-home .pl-news__item--empty {
  color: var(--pl-muted);
  background: var(--pl-bg-soft);
}
body#opac-main.pl-theme .pl-home .pl-news__title {
  margin: 0;
  padding: 0;
  font: 600 18px/1.3 var(--pl-sans);
  letter-spacing: -.015em;
  color: var(--pl-navy);
}
body#opac-main.pl-theme .pl-home h1.pl-news__title {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.03em;
}
body#opac-main.pl-theme .pl-home .pl-news__title a {
  color: inherit;
  text-decoration: none;
}
body#opac-main.pl-theme .pl-home .pl-news__title a:hover {
  color: var(--pl-blue);
  text-decoration: underline;
}
body#opac-main.pl-theme .pl-home .pl-news__meta {
  margin: 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--pl-line);
  font: 500 12.5px/1.5 var(--pl-sans);
  color: var(--pl-muted);
}
body#opac-main.pl-theme .pl-home .pl-news__item--empty .newsfooter {
  display: none;
}
body#opac-main.pl-theme .pl-home .pl-news__rss {
  margin: 18px 0 0;
  padding: 0;
  font: 500 13px/1.4 var(--pl-sans);
  color: var(--pl-muted);
}
body#opac-main.pl-theme .pl-home .pl-news__rss a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
body#opac-main.pl-theme .pl-home .pl-news__rss a:hover span {
  text-decoration: underline;
}
body#opac-main.pl-theme .pl-home .pl-news__rss .fa {
  color: var(--pl-gold-dark);
}
body#opac-main.pl-theme .pl-home .pl-news__back {
  margin: 16px 0 0;
  font-weight: 500;
}
body#opac-main.pl-theme .pl-home .pl-alert {
  margin: 16px 0 0;
  padding: 14px 18px;
  border: 1px solid #f1c9c5;
  border-radius: 12px;
  background: #fdf1f0;
  color: #8a1f17;
  font-weight: 500;
}

/* =========================================================
   STAFF CONTENT (news bodies, OpacMainUserBlock, OpacNavRight, OpacCustomSearch)
   ========================================================= */
body#opac-main.pl-theme .pl-home .pl-prose {
  min-width: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--pl-ink);
  overflow-wrap: break-word;
}
body#opac-main.pl-theme .pl-home .pl-prose p,
body#opac-main.pl-theme .pl-home .pl-prose ul,
body#opac-main.pl-theme .pl-home .pl-prose ol,
body#opac-main.pl-theme .pl-home .pl-prose table,
body#opac-main.pl-theme .pl-home .pl-prose blockquote {
  margin: 0 0 .8em;
}
body#opac-main.pl-theme .pl-home .pl-prose ul,
body#opac-main.pl-theme .pl-home .pl-prose ol {
  padding-left: 1.3em;
}
body#opac-main.pl-theme .pl-home .pl-prose ul {
  list-style: disc;
}
body#opac-main.pl-theme .pl-home .pl-prose ol {
  list-style: decimal;
}
body#opac-main.pl-theme .pl-home .pl-prose > :last-child,
body#opac-main.pl-theme .pl-home .pl-prose > div > :last-child,
body#opac-main.pl-theme .pl-home .pl-prose [class$="_body"] > :last-child {
  margin-bottom: 0;
}
body#opac-main.pl-theme .pl-home .pl-prose a {
  color: var(--pl-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
body#opac-main.pl-theme .pl-home .pl-prose img {
  max-width: 100%;
  height: auto;
}
body#opac-main.pl-theme .pl-home .pl-prose h2,
body#opac-main.pl-theme .pl-home .pl-prose h3,
body#opac-main.pl-theme .pl-home .pl-prose h4,
body#opac-main.pl-theme .pl-home .pl-prose [class$="_header"] {
  margin: 0 0 .5em;
  font: 600 18px/1.3 var(--pl-sans);
  letter-spacing: -.015em;
  color: var(--pl-navy);
}
body#opac-main.pl-theme .pl-home .pl-prose [class$="_item"] + [class$="_item"] {
  margin-top: 1.4em;
}
body#opac-main.pl-theme .pl-home .pl-section.pl-custom {
  padding-bottom: 0;
}
body#opac-main.pl-theme .pl-home--article .pl-section.pl-custom {
  /* last block of the single news page: no hero sections follow */
  padding-top: 0;
  padding-bottom: 64px;
}
body#opac-main.pl-theme .pl-home .pl-custom__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
body#opac-main.pl-theme .pl-home .pl-custom__grid--split {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
body#opac-main.pl-theme .pl-home .pl-custom__main {
  max-width: 820px;
}
body#opac-main.pl-theme .pl-home .pl-custom__grid--split .pl-custom__main {
  max-width: none;
}
body#opac-main.pl-theme .pl-home .pl-custom__aside {
  padding: 22px 24px;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: var(--pl-bg-soft);
}

/* =========================================================
   SECTIONS
   ========================================================= */
body#opac-main.pl-theme .pl-home .pl-section {
  padding: 72px 0;
}
body#opac-main.pl-theme .pl-home .pl-section--tight {
  padding-top: 64px;
}
body#opac-main.pl-theme .pl-home .pl-eyebrow {
  margin-bottom: 8px !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pl-gold-text);
}
body#opac-main.pl-theme .pl-home .pl-h2 {
  font: 600 clamp(26px, 2.8vw, 36px)/1.15 var(--pl-sans);
  letter-spacing: -.03em;
}
body#opac-main.pl-theme .pl-home .pl-h3 {
  font: 600 22px/1.3 var(--pl-sans);
  letter-spacing: -.02em;
  margin-bottom: 8px !important;
}
body#opac-main.pl-theme .pl-home .pl-lead {
  margin-top: 10px !important;
  max-width: 60ch;
  color: var(--pl-muted);
  font-size: 16px;
}
body#opac-main.pl-theme .pl-home .pl-grid {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}
body#opac-main.pl-theme .pl-home .pl-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
body#opac-main.pl-theme .pl-home .pl-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Scroll reveal (JS adds .is-js on root; .is-in on entering the viewport) */
body#opac-main.pl-theme .pl-home.is-js .pl-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--pl-ease), transform .7s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home.is-js .pl-reveal.is-in {
  opacity: 1;
  transform: none;
}
body#opac-main.pl-theme .pl-home.is-js .pl-reveal > .pl-grid > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s var(--pl-ease), transform .6s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home.is-js .pl-reveal.is-in > .pl-grid > * {
  opacity: 1;
  transform: none;
}
body#opac-main.pl-theme .pl-home .pl-reveal > .pl-grid > :nth-child(2) { transition-delay: .08s; }
body#opac-main.pl-theme .pl-home .pl-reveal > .pl-grid > :nth-child(3) { transition-delay: .16s; }
body#opac-main.pl-theme .pl-home .pl-reveal > .pl-grid > :nth-child(4) { transition-delay: .24s; }

/* Space cards (hover shadow lives on a pseudo-element and only its opacity animates) */
body#opac-main.pl-theme .pl-home .pl-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: #fff;
  transition: transform .45s var(--pl-ease), border-color .45s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-card::after,
body#opac-main.pl-theme .pl-home .pl-service::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 24px 48px -24px rgba(20, 61, 110, .35);
  opacity: 0;
  transition: opacity .45s var(--pl-ease);
  pointer-events: none;
}
body#opac-main.pl-theme .pl-home .pl-card:hover,
body#opac-main.pl-theme .pl-home .pl-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(20, 61, 110, .18);
}
body#opac-main.pl-theme .pl-home .pl-card:hover::after,
body#opac-main.pl-theme .pl-home .pl-card:focus-within::after,
body#opac-main.pl-theme .pl-home .pl-service:hover::after {
  opacity: 1;
}
body#opac-main.pl-theme .pl-home .pl-card__img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  background: var(--pl-bg-soft);
}
body#opac-main.pl-theme .pl-home .pl-card__img svg,
body#opac-main.pl-theme .pl-home .pl-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 1.2s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-card__photo {
  /* the library's photograph (images/pl/*.jpg); the drawn illustration stays until it has loaded */
  object-fit: cover;
  opacity: 0;
  z-index: 1;
}
body#opac-main.pl-theme .pl-home .pl-card__img.has-photo .pl-card__photo {
  opacity: 1;
}
body#opac-main.pl-theme .pl-home .pl-card__img.has-photo svg {
  display: none;
}
body#opac-main.pl-theme .pl-home .pl-card:hover .pl-card__img svg,
body#opac-main.pl-theme .pl-home .pl-card:hover .pl-card__photo {
  transform: scale(1.04);
}
body#opac-main.pl-theme .pl-home .pl-card__body {
  padding: 18px 20px 20px;
}
body#opac-main.pl-theme .pl-home .pl-card h3,
body#opac-main.pl-theme .pl-home .pl-service h3 {
  font: 600 17px/1.3 var(--pl-sans);
  letter-spacing: -.015em;
  color: var(--pl-navy);
  margin-bottom: 6px;
}
body#opac-main.pl-theme .pl-home .pl-card p,
body#opac-main.pl-theme .pl-home .pl-service p {
  font-size: 14px;
  color: var(--pl-muted);
  margin: 0;
}

/* Service tiles */
body#opac-main.pl-theme .pl-home .pl-service {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: #fff;
  padding: 24px 22px 22px;
  min-height: 150px;
  transition: transform .45s var(--pl-ease), border-color .45s var(--pl-ease);
}
body#opac-main.pl-theme .pl-home .pl-service:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 61, 110, .18);
}
body#opac-main.pl-theme .pl-home .pl-service__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: linear-gradient(160deg, rgba(31, 95, 168, .12), rgba(20, 61, 110, .06));
  color: var(--pl-navy);
}
body#opac-main.pl-theme .pl-home .pl-service__icon .fa {
  font-size: 17px;
  color: var(--pl-navy);
}

/* Blue band (the services section): white tiles on the navy gradient */
body#opac-main.pl-theme .pl-home .pl-section--blue {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--pl-navy) 0%, #12365f 60%, var(--pl-navy-dark) 100%);
  color: #fff;
}
body#opac-main.pl-theme .pl-home .pl-section--blue::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 320px at 85% 20%, rgba(245, 166, 35, .14), transparent 70%),
    linear-gradient(70deg, transparent 50%, rgba(255, 255, 255, .035) 60%, transparent 70%);
  pointer-events: none;
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-wrap {
  position: relative;
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-eyebrow {
  color: var(--pl-gold);
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-h2 {
  color: #fff;
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-lead {
  color: rgba(255, 255, 255, .78);
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-service {
  border-color: transparent;
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-service::after {
  box-shadow: 0 24px 48px -20px rgba(5, 18, 38, .6);
}

/* Stats */
body#opac-main.pl-theme .pl-home .pl-stats {
  background: #fff;
  border-top: 1px solid var(--pl-line);
  border-bottom: 1px solid var(--pl-line);
  padding: 44px 0;
}
body#opac-main.pl-theme .pl-home .pl-stats__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
body#opac-main.pl-theme .pl-home .pl-stats__list > div {
  position: relative;
}
body#opac-main.pl-theme .pl-home .pl-stats__list > div + div::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12%;
  height: 76%;
  width: 1px;
  background: var(--pl-line);
}
body#opac-main.pl-theme .pl-home .pl-stats strong {
  display: block;
  font: 700 clamp(30px, 3vw, 40px)/1.1 var(--pl-sans);
  letter-spacing: -.035em;
  color: var(--pl-navy);
  font-variant-numeric: tabular-nums;
}
body#opac-main.pl-theme .pl-home .pl-stats span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pl-muted);
}
/* inside the blue band (opac-main.tt nests the stats in the services section): white figures, hairline dividers */
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats {
  position: relative;
  margin-top: 56px;
  padding: 40px 0 0;
  border: 0;
  background: none;
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(min(var(--pl-wrap), 100%) - 40px); /* the content width inside .pl-wrap's 20px gutters */
  height: 1px;
  background: rgba(255, 255, 255, .16);
  transform: translateX(-50%);
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats__list > div + div::before {
  background: rgba(255, 255, 255, .16);
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats strong {
  color: #fff;
}
body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats span {
  color: rgba(255, 255, 255, .72);
}

/* Contact */
body#opac-main.pl-theme .pl-home .pl-contact {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
body#opac-main.pl-theme .pl-home .pl-contact p:not(.pl-eyebrow) {
  font-size: 15px;
  color: var(--pl-muted);
  margin-bottom: 10px;
}
body#opac-main.pl-theme .pl-home .pl-contact .pl-location p.pl-location__hours {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
body#opac-main.pl-theme .pl-home .pl-location__hours::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fa36b;
  box-shadow: 0 0 0 3px rgba(47, 163, 107, .18);
}
body#opac-main.pl-theme .pl-home .pl-location {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #163f70, var(--ph-navy-ink));
  border-radius: 18px;
  padding: 30px 28px;
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(10, 29, 56, .6);
}
body#opac-main.pl-theme .pl-home .pl-location::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(360px 220px at 100% 0%, rgba(245, 166, 35, .18), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 28px);
  pointer-events: none;
}
body#opac-main.pl-theme .pl-home .pl-location > * {
  position: relative;
}
body#opac-main.pl-theme .pl-home .pl-location__pin {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  margin-bottom: 14px;
}
body#opac-main.pl-theme .pl-home .pl-location__pin svg {
  width: 20px;
  height: 20px;
  display: block;
}
body#opac-main.pl-theme .pl-home .pl-location h3 {
  font: 600 20px/1.3 var(--pl-sans);
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 6px;
}
body#opac-main.pl-theme .pl-home .pl-contact .pl-location p {
  color: rgba(255, 255, 255, .78);
  margin-bottom: 18px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  body#opac-main.pl-theme .pl-home {
    --bk-w: 104px;
    --bk-h: 150px;
    --bk-fs: 9.4px;
  }
}
@media (max-width: 900px) {
  body#opac-main.pl-theme .pl-home .pl-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  body#opac-main.pl-theme .pl-home .pl-section {
    padding: 56px 0;
  }
  body#opac-main.pl-theme .pl-home .pl-custom__grid--split {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  body#opac-main.pl-theme .pl-home {
    --bk-w: 96px;
    --bk-h: 138px;
    --bk-gap: 14px;
    --bk-fs: 8.6px;
    --bay-gap: 26px;
    --board-h: 18px;
    --crown-h: 40px;
    --skirt-h: 34px;
    --stile-w: 10px;
    --rows: 1;
    --mode: scroll;
  }
  body#opac-main.pl-theme .pl-home .pl-bay--2 {
    display: none;
  }
  body#opac-main.pl-theme .pl-home .pl-bay__books {
    left: 0;
    right: 0;
    height: auto;
    top: 0;
    bottom: var(--board-h);
    justify-content: flex-start;
    align-items: flex-end;
    padding: 0 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 22px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    perspective: none;
  }
  body#opac-main.pl-theme .pl-home .pl-bay__books::-webkit-scrollbar {
    display: none;
  }
  body#opac-main.pl-theme .pl-home .pl-bay__books::after {
    /* trailing space so the last book can snap into view */
    content: "";
    flex: 0 0 2px;
  }
  body#opac-main.pl-theme .pl-home .pl-bay.is-loading .pl-bay__books::before {
    inset: auto 22px 0;
    height: var(--bk-h);
    background-position: left;
    -webkit-mask: linear-gradient(90deg, #000 70%, transparent);
    mask: linear-gradient(90deg, #000 70%, transparent);
  }
  body#opac-main.pl-theme .pl-home .pl-book {
    scroll-snap-align: start;
  }
  /* Edge fades: the cut-off book reads as "more to the right", not as clipping. JS hides each at its end of travel. */
  body#opac-main.pl-theme .pl-home .pl-bay::before,
  body#opac-main.pl-theme .pl-home .pl-bay::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: var(--board-h);
    z-index: 3;
    width: 60px;
    pointer-events: none;
    transition: opacity .3s var(--pl-ease);
  }
  body#opac-main.pl-theme .pl-home .pl-bay::before {
    left: 0;
    background: linear-gradient(90deg, rgba(48, 27, 11, .92), rgba(48, 27, 11, 0));
    opacity: 0;
  }
  body#opac-main.pl-theme .pl-home .pl-bay::after {
    right: 0;
    background: linear-gradient(270deg, rgba(48, 27, 11, .92), rgba(48, 27, 11, 0));
  }
  body#opac-main.pl-theme .pl-home .pl-bay.is-scrolled::before {
    opacity: 1;
  }
  body#opac-main.pl-theme .pl-home .pl-bay.is-at-end::after,
  body#opac-main.pl-theme .pl-home .pl-bay.is-loading::after {
    opacity: 0;
  }
  body#opac-main.pl-theme .pl-home .pl-bay__arrow {
    position: absolute;
    top: calc((100% - var(--board-h)) / 2);
    z-index: 4;
    width: 44px;   /* 44px touch target */
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #f6ecdd;
    background: rgba(20, 12, 6, .58);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 235, 210, .18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    transition: opacity .3s var(--pl-ease), background-color .25s var(--pl-ease);
  }
  body#opac-main.pl-theme .pl-home .pl-bay__arrow svg {
    width: 16px;
    height: 16px;
    display: block;
  }
  body#opac-main.pl-theme .pl-home .pl-bay__arrow:hover,
  body#opac-main.pl-theme .pl-home .pl-bay__arrow:focus-visible {
    background: rgba(20, 12, 6, .8);
  }
  body#opac-main.pl-theme .pl-home .pl-bay__arrow--l { left: 10px; }
  body#opac-main.pl-theme .pl-home .pl-bay__arrow--r { right: 10px; }
  body#opac-main.pl-theme .pl-home .pl-bay:not(.is-scrolled) .pl-bay__arrow--l,
  body#opac-main.pl-theme .pl-home .pl-bay.is-at-end .pl-bay__arrow--r,
  body#opac-main.pl-theme .pl-home .pl-bay.is-loading .pl-bay__arrow {
    opacity: 0;
    pointer-events: none;
  }
  body#opac-main.pl-theme .pl-home .pl-book__link:hover .pl-book__lift,
  body#opac-main.pl-theme .pl-home .pl-book__link:focus-visible .pl-book__lift {
    transform: translateY(-6px);
  }
  body#opac-main.pl-theme .pl-home .pl-book.is-lean-l .pl-book__lift,
  body#opac-main.pl-theme .pl-home .pl-book.is-lean-r .pl-book__lift {
    transform: none;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__copy {
    padding-top: 40px;
    padding-bottom: 30px;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__lead {
    margin: 12px auto 20px;
  }
  body#opac-main.pl-theme .pl-home .pl-case__label {
    font-size: 11px;
  }
  body#opac-main.pl-theme .pl-home .pl-cover__meta {
    /* small covers: drop the meta line rather than shrink it */
    display: none;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__glow {
    width: 560px;
    height: 560px;
    margin: -280px 0 0 -280px;
    transform: translate3d(30vw, 120px, 0);
  }
  body#opac-main.pl-theme .pl-home .pl-account {
    padding: 18px 20px;
  }
  body#opac-main.pl-theme .pl-home .pl-account__cta {
    margin-left: 0;
  }
  /* 16px or iOS Safari zooms the page when the field takes focus */
  body#opac-main.pl-theme .pl-home .pl-search__q {
    font-size: 16px;
  }
}
@media (max-width: 700px) {
  body#opac-main.pl-theme .pl-home .pl-grid--3,
  body#opac-main.pl-theme .pl-home .pl-contact {
    grid-template-columns: 1fr;
  }
  body#opac-main.pl-theme .pl-home .pl-contact {
    gap: 28px;
  }
  body#opac-main.pl-theme .pl-home .pl-stats__list {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }
  body#opac-main.pl-theme .pl-home .pl-stats__list > div:nth-child(3)::before {
    display: none;
  }
  body#opac-main.pl-theme .pl-home .pl-search {
    padding: 22px 18px 18px;
    border-radius: 16px;
  }
  body#opac-main.pl-theme .pl-home .pl-search__form {
    flex-wrap: wrap;
  }
  body#opac-main.pl-theme .pl-home .pl-search__q {
    flex-basis: 100%;
    order: -1;
  }
  body#opac-main.pl-theme .pl-home .pl-search__idx,
  body#opac-main.pl-theme .pl-home .pl-search__form .pl-btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
  body#opac-main.pl-theme .pl-home .pl-search__lib {
    flex-basis: 100%;
    order: 1;
  }
  body#opac-main.pl-theme .pl-home .pl-search__form .pl-btn {
    order: 2;
  }
  body#opac-main.pl-theme .pl-home .pl-search-wrap {
    margin-top: -24px;
  }
  body#opac-main.pl-theme .pl-home .pl-search-wrap--flat {
    margin-top: 0;
  }
}
@media (max-width: 520px) {
  body#opac-main.pl-theme .pl-home .pl-grid--4 {
    grid-template-columns: 1fr;
  }
  body#opac-main.pl-theme .pl-home .pl-section {
    padding: 48px 0;
  }
  body#opac-main.pl-theme .pl-home .pl-news__item {
    padding: 18px 18px 14px;
  }
  /* empty / failed-feed message (about 380px on one line): wrap inside the bay instead of being clipped by the hero */
  body#opac-main.pl-theme .pl-home .pl-bay__empty {
    width: max-content;
    max-width: calc(100% - 40px);
    white-space: normal;
    text-align: center;
    border-radius: 16px;
  }
}

/* =========================================================
   COMPOSITOR HINTS: only where the pointer motion actually runs
   ========================================================= */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body#opac-main.pl-theme .pl-home .pl-hero__wall,
  body#opac-main.pl-theme .pl-home .pl-hero__copy,
  body#opac-main.pl-theme .pl-home .pl-hero__glow,
  body#opac-main.pl-theme .pl-home .pl-bay__back,
  body#opac-main.pl-theme .pl-home .pl-book__body {
    will-change: transform;
  }
}

/* =========================================================
   REDUCED MOTION: instant, still premium
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  body#opac-main.pl-theme .pl-home *,
  body#opac-main.pl-theme .pl-home *::before,
  body#opac-main.pl-theme .pl-home *::after {
    animation: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  body#opac-main.pl-theme .pl-home.is-js .pl-hero__copy > *,
  body#opac-main.pl-theme .pl-home.is-js .pl-reveal,
  body#opac-main.pl-theme .pl-home.is-js .pl-reveal > .pl-grid > * {
    opacity: 1;
    transform: none;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__dust {
    display: none;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__glow {
    opacity: .7;
  }
  body#opac-main.pl-theme .pl-home .pl-book__link:hover .pl-book__lift,
  body#opac-main.pl-theme .pl-home .pl-book__link:focus-visible .pl-book__lift {
    transform: translateZ(16px);
  }
  body#opac-main.pl-theme .pl-home .pl-book.is-lean-l .pl-book__lift,
  body#opac-main.pl-theme .pl-home .pl-book.is-lean-r .pl-book__lift {
    transform: none;
  }
  body#opac-main.pl-theme .pl-home .pl-card:hover,
  body#opac-main.pl-theme .pl-home .pl-service:hover,
  body#opac-main.pl-theme .pl-home .pl-btn:hover {
    transform: none;
  }
  body#opac-main.pl-theme .pl-home .pl-card:hover .pl-card__img svg,
  body#opac-main.pl-theme .pl-home .pl-card:hover .pl-card__photo {
    transform: none;
  }
}

/* =========================================================
   PRINT: content only, nothing left invisible by the reveal animation
   ========================================================= */
@media print {
  body#opac-main.pl-theme .pl-home .pl-hero__dust,
  body#opac-main.pl-theme .pl-home .pl-hero__glow,
  body#opac-main.pl-theme .pl-home .pl-hero__wall,
  body#opac-main.pl-theme .pl-home .pl-case,
  body#opac-main.pl-theme .pl-home .pl-search-wrap {
    display: none !important;
  }
  body#opac-main.pl-theme .pl-home .pl-hero,
  body#opac-main.pl-theme .pl-home .pl-section--blue,
  body#opac-main.pl-theme .pl-home .pl-location {
    background: none !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__title,
  body#opac-main.pl-theme .pl-home .pl-hero__lead,
  body#opac-main.pl-theme .pl-home .pl-section--blue .pl-h2,
  body#opac-main.pl-theme .pl-home .pl-section--blue .pl-lead,
  body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats strong,
  body#opac-main.pl-theme .pl-home .pl-section--blue .pl-stats span,
  body#opac-main.pl-theme .pl-home .pl-location__hours,
  body#opac-main.pl-theme .pl-home .pl-location h3,
  body#opac-main.pl-theme .pl-home .pl-contact .pl-location p {
    color: #000 !important;
    text-shadow: none !important;
  }
  body#opac-main.pl-theme .pl-home .pl-hero__copy > *,
  body#opac-main.pl-theme .pl-home .pl-reveal,
  body#opac-main.pl-theme .pl-home .pl-reveal > .pl-grid > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
