/* Jordan Bright: the guide and the site search, on every page of the site.

   Moved out of site/index.html on 2026-09-10. It was one page's inline component, and the
   search button in the header called into it, so the header's own search did nothing on any
   other page. It is shell now: build_shell.py stamps the markup into every page that carries
   the markers, jordan-kb.js holds what she knows, and jordan.js runs her.

   The header sits at z-index 80 and the mega menu opens under it, so the launcher stays at 88
   and the panel at 89. Do not raise either without reading shell.css first.

   WHERE THE LAUNCHER SITS, AND WHY IT IS A NUMBER
   ------------------------------------------------
   The launcher used to sit at `--strip-h + 20px`. --strip-h is the homepage's logo band at the
   foot of the hero, measured by that page at runtime, and no other page sets it. That put the
   launcher 116px off the foot of the homepage and 20px off the foot of the other fourteen, so
   Jordan landed in a different place depending on which page you were reading. Gui caught it on
   2026-09-10 and ruled the homepage position correct.

   So the lift is a token now, the same on every page, and `max()` keeps the protection the
   homepage lift was built for: if that logo band ever grows past its current 96px, the launcher
   still rises to clear it. Change --jb-foot and all fifteen pages move together. */
:root {
  /* base.css's own light values, repeated so guard_signal.py, which reads this file alone, can see
     that the white on her launcher and her search button sits on red (4.62:1, and 5.0:1 on hover).
     base.css's dark theme still wins in the dark: its selector is the stronger one */
  --accent-fill: #e02a32;
  --accent-ink: #cc2d34;
  --jb-foot: 116px;
  /* the gap the launcher keeps from anything it has to clear */
  --jb-gap: 20px
}

/* the launcher names her: a brand-red pill with her photograph set into it */
.jb-launch {
  position: fixed;
  right: 22px;
  bottom: max(var(--jb-foot), calc(var(--strip-h, 0px) + var(--jb-gap)));
  z-index: 88;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 78px;
  padding: 0 26px 0 8px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--accent-fill);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 16px 38px -12px rgba(0, 0, 0, .55);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  transition: transform .2s var(--ease), background .2s var(--ease), opacity .2s var(--ease)
}

.jb-launch:hover {
  transform: translateY(-2px);
  background: var(--accent-ink);
  color: #ffffff
}

.jb-launch .jb-av {
  position: relative;
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 50%;
  background: var(--s-0);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9)
}

.jb-launch .jb-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 50%
}

.jb-launch .jb-t {
  display: block;
  text-align: left;
  line-height: 1.2
}

.jb-launch .jb-t small {
  display: block;
  margin-top: 3px;
  font-weight: 600;
  font-size: .78rem;
  background: var(--accent-fill);
  color: #ffffff
}

.jb-launch .dot {
  position: absolute;
  right: -1px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ok);
  border: 2.5px solid #ffffff
}

.jb-launch.away {
  opacity: 0;
  pointer-events: none;
  transform: scale(.9)
}

.jb-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 89;
  width: min(420px, calc(100vw - 40px));
  max-height: min(660px, calc(100vh - 40px));
  background: var(--s-0);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .4);
  display: none;
  flex-direction: column;
  overflow: hidden
}

.jb-panel.open {
  display: flex
}

.jb-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--s-50)
}

.jb-h img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover
}

.jb-h b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: .96rem;
  color: var(--c-hi)
}

.jb-h span {
  display: block;
  font-size: .78rem;
  color: var(--c-mid)
}

.jb-h button {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--s-0);
  border: 1.5px solid var(--rule);
  color: var(--c-hi);
  cursor: pointer
}

.jb-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.jb-say {
  background: var(--s-100);
  border-radius: var(--r-md) var(--r-md) var(--r-md) 4px;
  padding: 14px 16px;
  font-size: .92rem;
  color: var(--c-hi);
  line-height: 1.55
}

.jb-say b {
  font-weight: 700
}

.jb-note {
  display: block;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--c-mid)
}

.jb-opts {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.jb-opt {
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--s-0);
  border: 1.5px solid var(--rule);
  font-family: var(--display);
  font-weight: 600;
  font-size: .88rem;
  color: var(--c-hi);
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease)
}

.jb-opt:hover {
  border-color: var(--accent-ink);
  background: var(--s-50)
}

.jb-opt.go {
  border-color: var(--rule)
}

.jb-opt .lgi {
  color: var(--accent-ink);
  margin-right: 8px
}

.jb-search {
  padding: 14px 18px;
  border-top: 1px solid var(--rule);
  background: var(--s-50);
  display: flex;
  gap: 9px;
  align-items: center
}

.jb-search input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--rule);
  background: var(--s-0);
  color: var(--c-hi);
  font-family: var(--text-f);
  font-size: .9rem
}

.jb-search input::placeholder {
  color: var(--c-mid)
}

.jb-search button {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-fill);
  color: #ffffff;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center
}

@media(max-width:760px) {

  /* No floating launcher on a phone (Gui, 2026-10-19: "I dont want to have the floating button"):
     the header's search icon is how she opens there. */
  .jb-launch {
    display: none
  }

  /* On a phone her window is the whole screen (Gui, 2026-10-19: "her window can overlay the entire
     website on the mobile version"), opened by the header's search icon. It is the
     one fixed thing allowed over the header (90): on a phone nothing else is open while she is, and
     jordan.js closes the drawer as she opens. The page holds still under her (html.jb-open). */
  .jb-panel {
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 95
  }

  .jb-h {
    padding-top: calc(14px + env(safe-area-inset-top, 0px))
  }

  .jb-h button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem
  }

  .jb-search {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px))
  }

  /* iOS zooms the whole page into any field set under 16px */
  .jb-search input {
    font-size: 16px
  }
}

/* on html only, as the drawer's lock (shell.css): hidden on body too would unstick the header */
html.jb-open {
  overflow: hidden
}

/* ---------------------------------------------------- the page she is standing on
   Jordan opens on the subject of the page the visitor is already reading, so the first
   thing in the panel says which page that is. It is a label, never a link: the visitor
   is on it. */
.jb-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-mid)
}

.jb-crumb .lgi {
  color: var(--accent-ink);
  font-size: .95rem
}

/* ------------------------------------------------------------------ result groups
   A search returns answers first and pages second, each under its own label, because
   "read the answer here" and "go to the page that carries it in full" are different
   offers and the visitor is choosing between them. */
.jb-grp {
  display: block;
  margin: 2px 0 -4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-mid)
}

/* a result is an option with a second line under it */
.jb-opt .jb-d {
  display: block;
  margin-top: 3px;
  font-family: var(--text-f);
  font-weight: 400;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--c-mid)
}

/* what the visitor typed, echoed back so a wrong result reads as a wrong query */
.jb-q {
  font-style: italic;
  color: var(--c-hi)
}
