/* Approved software-library popup. All styles are scoped to this surface. */
#niches.live .niche[aria-expanded="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
#niches.live li:has(> .niche[aria-expanded="true"])::after { transform: rotate(45deg); opacity: 1; }
#software-library-fallback { margin-top: 24px; color: var(--head, #131023); }
#software-library-fallback[hidden] { display: none !important; }
#software-library-fallback summary { cursor: pointer; padding: 12px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
#software-library-fallback ul { columns: 3 240px; padding-left: 20px; margin-top: 12px; }
#software-library-fallback li { padding: 6px 0; break-inside: avoid; }
#software-library-fallback a { color: inherit; text-underline-offset: 4px; }
#software-library {
  --sl-paper: #fbf9f4;
  --sl-ink: #131023;
  --sl-muted: #5c5268;
  --sl-line: #d6cbbb;
  --sl-lilac: #c1aaff;
  --sl-ease: cubic-bezier(.16, 1, .3, 1);
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(1150px, calc(100% - 60px));
  height: min(760px, calc(100dvh - 70px));
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  overscroll-behavior: contain;
  background: var(--sl-paper);
  color: var(--sl-ink);
  color-scheme: light;
  font: 400 16px/1.5 "Onest", sans-serif;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 24px 90px #140c2029;
}
#software-library:not([open]) { display: none; }
#software-library[open] { animation: sl-reveal .35s var(--sl-ease) both; }
#software-library::backdrop { background: #140c206b; backdrop-filter: blur(2px); }
#software-library *, #software-library *::before, #software-library *::after { box-sizing: border-box; }
#software-library :is(h2,h3,p,ul) { margin: 0; }
#software-library button, #software-library input { font: inherit; color: inherit; }
#software-library button { border: 0; cursor: pointer; }
#software-library :is(button,a) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#software-library :focus-visible { outline: 2px solid #63419d; outline-offset: 4px; }
#software-library [hidden] { display: none !important; }
#software-library svg { width: 22px; height: 22px; flex-shrink: 0; }
#software-library .sl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#software-library .sl-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
#software-library .sl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 30px 34px 20px; flex: 0 0 auto; }
#software-library .sl-head > div { flex: 1; min-width: 0; }
#software-library .sl-head h2 { font: 460 48px/1.02 "Newsreader", Georgia, serif; letter-spacing: -.025em; text-wrap: balance; }
#software-library .sl-head h2:focus { outline: none; }
#software-library .sl-head p { margin-top: 10px; color: var(--sl-muted); font-size: 14px; line-height: 1.5; max-width: 58ch; }
#software-library .sl-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; }
#software-library .sl-close:hover { background: #bdaac533; }
#software-library .sl-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px 20px; flex: 0 0 auto; }
#software-library .sl-search { display: flex; align-items: center; gap: 10px; width: 420px; max-width: 100%; min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #ae9eb8; border-radius: 4px; }
#software-library .sl-search:focus-within { outline: 2px solid #8061aa; outline-offset: 2px; }
#software-library .sl-search svg { width: 18px; height: 18px; color: var(--sl-muted); }
#software-library .sl-search input { width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; outline: none; box-shadow: none; font-size: 14px; line-height: 1.5; caret-color: #63419d; }
#software-library .sl-search input::placeholder { color: var(--sl-muted); opacity: 1; }
#software-library .sl-count { flex-shrink: 0; color: var(--sl-muted); font-size: 12px; white-space: nowrap; }
#software-library .sl-body { display: flex; flex: 1 1 0; min-height: 0; border-top: 1px solid var(--sl-line); overflow: hidden; }
#software-library .sl-nav { flex: 0 0 248px; padding: 16px 20px; overflow: auto; overscroll-behavior: contain; background: #21172f; color: #f3eee4; scrollbar-width: thin; scrollbar-color: #7f6c8c #21172f; }
#software-library .sl-niche { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 47px; padding: 10px; text-align: left; background: transparent; color: inherit; font-size: 13px; line-height: 1.3; }
#software-library .sl-niche-count { font-size: 10px; color: #cbbbd7; font-variant-numeric: tabular-nums; }
#software-library .sl-niche:hover { background: #74608728; }
#software-library .sl-niche[aria-current] { border-radius: 4px; background: var(--sl-lilac); color: var(--sl-ink); }
#software-library .sl-niche[aria-current] .sl-niche-count { color: #4d355f; }
#software-library .sl-niche:focus-visible { outline-color: #91e6c6; outline-offset: -2px; }
#software-library .sl-scroll { flex: 1 1 0; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #aa98ba transparent; scroll-padding: 8px 0; }
#software-library .sl-scroll:focus-visible { outline-offset: -3px; }
#software-library .sl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; padding: 0 26px; list-style: none; }
#software-library .sl-item { min-width: 0; margin: 0; padding: 0; list-style: none; }
#software-library .sl-link { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; min-height: 68px; padding: 13px 1px; border-top: 1px solid #cdbfd255; color: var(--sl-ink); text-decoration: none; transition: background .22s var(--sl-ease); }
#software-library .sl-link:hover { background: #bcabce20; }
#software-library .sl-name { display: block; min-width: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 500; line-height: 1.35; }
#software-library .sl-link svg { width: 19px; height: 19px; color: #6b5484; transition: transform .2s var(--sl-ease); }
#software-library .sl-link:hover svg { transform: translateX(4px); }
#software-library .sl-empty { padding: 40px 24px; text-align: center; }
#software-library .sl-empty h3 { font: 450 30px/1.15 "Newsreader", Georgia, serif; }
#software-library .sl-empty p { margin: 10px 0; font-size: 14px; color: var(--sl-muted); }
#software-library .sl-reset { min-height: 44px; padding: 12px; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 5px; }
#software-library .sl-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: 0 0 auto; padding: 18px 34px; border-top: 1px solid #cdbfd277; }
#software-library .sl-foot > p { font-size: 11px; line-height: 1.5; color: var(--sl-muted); }
#software-library .sl-contact { display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; min-height: 44px; padding: 10px 17px; border-radius: 3px; background: var(--sl-ink); color: #f3eee4; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
#software-library .sl-contact svg { width: 20px; height: 20px; }
#software-library .sl-contact:hover { background: #342346; }
/* The footer's existing compact mode also tightens this new control's outer gap;
   its full 44px touch target remains intact beside the resting reading light. */
.foot.fit2 .sl-analytics-choice { margin-top: 6px; }
@keyframes sl-reveal { from { opacity: .7; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1500px) { #software-library { height: min(820px, calc(100dvh - 100px)); } }
@media (max-width: 1000px) {
  #software-library .sl-nav { flex-basis: 210px; }
  #software-library .sl-list { grid-template-columns: 1fr; }
  #software-library .sl-head h2 { font-size: 42px; }
}
@media (max-width: 650px) {
  #software-library { width: calc(100% - 20px); height: calc(100dvh - 28px); border-radius: 10px; }
  #software-library .sl-head { padding: 24px 20px 16px; gap: 10px; }
  #software-library .sl-head h2 { font-size: 36px; }
  #software-library .sl-head p { font-size: 12px; }
  #software-library .sl-tools { padding: 0 20px 16px; flex-wrap: wrap; gap: 10px; }
  #software-library .sl-search { width: 100%; padding: 9px 11px; }
  #software-library .sl-search input { font-size: 16px; }
  #software-library .sl-count { font-size: 11px; }
  #software-library .sl-body { flex-direction: column; }
  #software-library .sl-nav { display: flex; flex: 0 0 auto; gap: 6px; max-width: 100%; min-height: 70px; padding: 12px 16px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid #75618544; }
  #software-library .sl-niche { flex: 0 0 auto; width: auto; min-width: max-content; min-height: 44px; padding: 8px 12px; font-size: 12px; }
  #software-library .sl-niche-count { font-size: 10px; }
  #software-library .sl-list { padding: 0 20px; }
  #software-library .sl-link { min-height: 68px; }
  #software-library .sl-name { font-size: 15px; }
  #software-library .sl-foot { flex-wrap: wrap; gap: 10px; padding: 16px 20px; }
  #software-library .sl-foot > p { font-size: 10px; }
  #software-library .sl-contact { width: 100%; }
}
@media (max-height: 550px) {
  #software-library { height: calc(100dvh - 20px); }
  #software-library .sl-head { padding-top: 14px; padding-bottom: 10px; }
  #software-library .sl-head h2 { font-size: 30px; }
  #software-library .sl-head p { margin-top: 6px; }
  #software-library .sl-tools { padding-bottom: 10px; }
  #software-library .sl-foot { padding-top: 10px; padding-bottom: 10px; }
  #software-library .sl-foot > p { display: none; }
}
@media (max-width: 650px) and (max-height: 420px) {
  #software-library .sl-head { padding-top: 8px; padding-bottom: 6px; }
  #software-library .sl-head p { display: none; }
  #software-library .sl-tools { padding-bottom: 8px; gap: 6px; }
  #software-library .sl-nav { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  #software-library .sl-foot { padding-top: 8px; padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #software-library[open] { animation: none; }
  #software-library *, #software-library *::before, #software-library *::after { transition: none; scroll-behavior: auto; }
}
