/* =====================================================================
   Sitewide search — the button in the header and the panel it opens.
   Loaded by every page; see assets/search.js. Deliberately namespaced
   under .tgps- so it can't collide with a page's own styles, and it
   carries its own colour tokens rather than depending on the page's.
   ===================================================================== */
.tgps-open{
  display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border:1px solid #e4e7ef;
  border-radius:10px;background:#fff;color:#616a80;font:inherit;font-size:0.8125rem;font-weight:600;
  cursor:pointer;line-height:1;white-space:nowrap}
.tgps-open:hover{border-color:#3646c4;color:#3646c4}
.tgps-open svg{width:15px;height:15px;flex:none}
.tgps-open kbd{font:inherit;font-size:0.6875rem;padding:2px 5px;border:1px solid #e4e7ef;border-radius:5px;
  background:#f6f8fc;color:#8a91a6}
@media(max-width:720px){.tgps-open kbd{display:none}.tgps-open .tgps-open-l{display:none}.tgps-open{padding:7px 9px}}

.tgps-scrim{position:fixed;inset:0;z-index:2000;background:rgba(15,20,36,.45);backdrop-filter:blur(3px);
  display:flex;align-items:flex-start;justify-content:center;padding:10vh 16px 16px;opacity:0;pointer-events:none;
  transition:opacity .14s}
.tgps-scrim.open{opacity:1;pointer-events:auto}
@media(max-width:640px){.tgps-scrim{padding:0}}

.tgps-box{width:100%;max-width:680px;background:#fff;border-radius:18px;overflow:hidden;display:flex;
  flex-direction:column;max-height:76vh;box-shadow:0 30px 70px rgba(16,26,74,.3);
  transform:translateY(-8px);transition:transform .14s;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif}
.tgps-scrim.open .tgps-box{transform:none}
@media(max-width:640px){.tgps-box{max-width:none;border-radius:0;max-height:100vh;height:100%}}

.tgps-bar{display:flex;align-items:center;gap:11px;padding:15px 18px;border-bottom:1px solid #eef1f7;flex:none}
.tgps-bar svg{width:19px;height:19px;color:#8a91a6;flex:none}
.tgps-bar input{flex:1;min-width:0;border:0;outline:none;font:inherit;font-size:1.0625rem;color:#0f1424;background:none}
.tgps-bar input::placeholder{color:#8a91a6}
.tgps-esc{border:1px solid #e4e7ef;background:#f6f8fc;color:#8a91a6;border-radius:6px;padding:3px 7px;
  font:inherit;font-size:0.6875rem;font-weight:700;cursor:pointer}
.tgps-esc:hover{color:#3646c4;border-color:#3646c4}

.tgps-results{overflow-y:auto;padding:8px 0 10px;-webkit-overflow-scrolling:touch}
.tgps-group{font-size:0.6875rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#8a91a6;
  padding:12px 18px 5px}
.tgps-hit{display:block;padding:9px 18px;cursor:pointer;border-left:3px solid transparent}
.tgps-hit:hover,.tgps-hit.sel{background:#f2f4ff;border-left-color:#3646c4}
.tgps-hit b{display:block;font-size:0.9375rem;font-weight:700;color:#0f1424;line-height:1.35}
.tgps-hit span{display:block;font-size:0.8125rem;color:#616a80;line-height:1.5;margin-top:2px;
  overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tgps-hit em{font-style:normal;color:#8a91a6}
.tgps-hit mark{background:#fdf0cd;color:inherit;border-radius:3px;padding:0 1px}

.tgps-answer{margin:10px 14px 4px;background:#f2f4ff;border:1px solid #dfe4ff;border-left:4px solid #3646c4;
  border-radius:12px;padding:14px 16px}
.tgps-answer .tgps-a-h{font-size:0.6875rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:#3646c4;margin-bottom:6px}
.tgps-answer p{font-size:0.9rem;color:#3a4256;line-height:1.6;margin:0}
.tgps-answer strong{color:#0f1424}
.tgps-answer a.tgps-a-link{display:inline-block;margin-top:9px;font-size:0.85rem;font-weight:700;color:#3646c4;
  text-decoration:none}
.tgps-answer a.tgps-a-link:hover{text-decoration:underline}

.tgps-empty{padding:34px 22px;text-align:center;color:#616a80;font-size:0.9rem}
.tgps-empty b{display:block;color:#0f1424;margin-bottom:5px;font-size:0.95rem}
.tgps-empty a{color:#3646c4;font-weight:700;text-decoration:none}
.tgps-empty a:hover{text-decoration:underline}

.tgps-foot{flex:none;border-top:1px solid #eef1f7;padding:9px 18px;display:flex;gap:16px;flex-wrap:wrap;
  font-size:0.75rem;color:#8a91a6}
.tgps-foot kbd{font:inherit;font-size:0.7rem;padding:1px 5px;border:1px solid #e4e7ef;border-radius:4px;background:#f6f8fc}
@media(max-width:640px){.tgps-foot{display:none}}
