/* Theme 2.0 persistent ask / search bar (docked bottom). Promoted from Builder A's Fund detail build. */
body.t2 { --ask-h: 132px; --askbar-h: 132px; }   /* --askbar-h is refined by askbar.js; this is the fallback before it runs */
body.t2 .t2-page { padding-bottom: var(--ask-h); }
.t2-ask { position: fixed; z-index: 45; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(710px, calc(100vw - 2 * var(--page-x))); display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 16px;
  /* GLASS (Luke, 12 Oct): the panel recipe: translucent fill, backdrop blur and saturate, soft 1px border, soft shadow. The fill is the solid panel colour at 86%, so text keeps 4.5:1 or better over ANY content behind it (measured with a white, black or mid grey backdrop: placeholder, chips and key hint 4.9:1 or better in dark and 6.7:1 or better in light, typed text and icons 9:1 or better). */
  background: color-mix(in srgb, var(--panelsolid) 86%, transparent); border: 1px solid color-mix(in srgb, var(--tx) 14%, transparent); box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }
@supports not (backdrop-filter: blur(1px)) { .t2-ask { background: var(--panelsolid); } }
.t2-ask__results { max-height: 46vh; overflow: auto; padding: 14px 16px; border-radius: 12px; background: var(--ghost); display: flex; flex-direction: column; gap: 12px; }
.t2-ask__results[hidden] { display: none; }
.t2-ask__rh { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 500; color: var(--td); }
.t2-ask__x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--ghost); color: var(--t2); font-size: 16px; cursor: pointer; }
.t2-ask__g { display: flex; flex-direction: column; gap: 2px; }
.t2-ask__gl { font-size: 12px; color: var(--td); padding: 4px 0; }
.t2-ask__it { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; color: var(--tx); }
.t2-ask__it:hover { background: var(--ghost); }
.t2-ask__it b { font-size: 14px; font-weight: 500; display: block; }
.t2-ask__it small { font-size: 12px; color: var(--td); }
.t2-ask__tone { font-size: 12px; font-weight: 500; white-space: nowrap; }
.t2-ask__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t2-ask__chip { display: inline-flex; align-items: center; gap: 12px; height: 38px; padding: 0 8px 0 16px; border-radius: 11px; border: 1px solid var(--pbd); background: var(--seg); color: var(--t2); font-size: 13px; cursor: pointer; }
.t2-ask__chip:hover { color: var(--tx); }
.t2-ask__chip span { width: 24px; height: 24px; border-radius: 50%; background: var(--ghost); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.t2-ask__bar { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; background: var(--seg); border: 1px solid var(--pbd); }
.t2-ask__ai { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--glass); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
body.t2 .t2-ask__in { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; box-shadow: none; outline: none; text-align: center; font-size: 16px; color: var(--tx); padding: 0; font-family: var(--font); }
body.t2 .t2-ask__in:focus-visible { outline: none; }
.t2-ask__in::placeholder { color: var(--t2); opacity: 1; }
.t2-ask__kbd { flex: none; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--grid); background: var(--ghost); color: var(--t2); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.t2-ask__go { flex: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--grid); background: transparent; color: var(--tx); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.t2-ask__go:hover { background: var(--ghost); }
.t2-ask:focus-within { border-color: var(--r3); }
.t2-ask:has(.t2-ask__results:not([hidden])) { z-index: 60; }   /* open results sit above the cookie banner (z-index 50), which otherwise covers the links and swallows the click */
@media (max-width: 1279px) { .t2-ask { width: min(710px, calc(100vw - 48px)); } }
@media print { .t2-ask { display: none; } }

/* the compliance footer sits below the page frame: keep it clear of the fixed bar */
body.t2 .t2-foot { padding-bottom: calc(40px + var(--ask-h)); }

@media (max-width: 899px) {
  body.t2 { --ask-h: 120px; --askbar-h: 120px; }
  .t2-ask { width: calc(100vw - 24px); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .t2-ask__kbd { display: none; }
  .t2-ask__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .t2-ask__chip { flex: none; }
  body.t2 .t2-ask__in { font-size: 16px; text-align: left; }
  .t2-ask__ai, .t2-ask__go { width: 42px; height: 42px; }
}

@media (max-width: 899px) { .t2-ask__chip { height: 44px; font-size: 14px; } .t2-ask__go, .t2-ask__ai { width: 44px; height: 44px; } .t2-ask__x { width: 40px; height: 40px; } .t2-ask__it { padding: 12px 10px; } }
