/* Growth Lens — sales overlay shared by every sample site.
   Everything is namespaced gl- so it never collides with a site's own styles. */
:root {
  --gl-ink: #16181d;
  --gl-ink-2: #23262e;
  --gl-line: rgba(255, 255, 255, .12);
  --gl-text: #f3f4f6;
  --gl-dim: #a8adb8;
  --gl-trust: #5b8cff;
  --gl-patients: #2fc485;
  --gl-ai: #b08cff;
  --gl-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.gl, .gl * { box-sizing: border-box; }
.gl { font-family: var(--gl-font); -webkit-font-smoothing: antialiased; letter-spacing: 0; line-height: 1.45; }
.gl button { font: inherit; cursor: pointer; }
.gl h2, .gl h3, .gl h4 { font-family: var(--gl-font); font-stretch: normal; font-style: normal; text-transform: none; }
.gl p { font-family: var(--gl-font); }

/* ---------- top strip ---------- */
.gl-strip {
  position: relative; z-index: 60; background: var(--gl-ink); color: var(--gl-dim);
  font-size: 13px; padding: 9px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center;
}
.gl-strip strong { color: var(--gl-text); font-weight: 600; }
.gl-strip a {
  color: var(--gl-ink); background: #fff; text-decoration: none; font-weight: 600; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; white-space: nowrap;
}
.gl-strip a:hover { background: #e9ebf0; }
.gl-strip a:focus-visible { outline: 2px solid var(--gl-trust); outline-offset: 2px; }

/* ---------- chips on sections ---------- */
.gl-host { position: relative; }
.gl-chip {
  position: absolute; z-index: 40; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 28px);
  background: var(--gl-ink); color: var(--gl-text); border: 0; border-radius: 999px;
  padding: 7px 13px 7px 9px; font-size: 12.5px; font-weight: 500; line-height: 1.2;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 6px 20px -6px rgba(10, 12, 20, .55);
  transition: transform .18s ease, opacity .2s ease;
  text-align: left;
}
.gl-chip[data-pos="tl"] { right: auto; left: 14px; }
.gl-chip[data-pos="bl"] { top: auto; bottom: 14px; right: auto; left: 14px; }
.gl-chip[data-pos="br"] { top: auto; bottom: 14px; }
.gl-chip[data-pos="above"] { top: -46px; left: 0; right: auto; }
.gl-chip[data-pos="above-r"] { top: -46px; right: 0; }
.gl-chip[data-pos="below"] { top: calc(100% + 12px); left: 0; right: auto; }
.gl-chip[data-pos="below-r"] { top: calc(100% + 12px); right: 0; }
.gl-chip:hover { transform: translateY(-1px); }
.gl-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gl-chip .gl-n {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--gl-ink); background: var(--c, #fff);
}
.gl-chip .gl-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-off .gl-chip { opacity: 0; pointer-events: none; transform: scale(.9); }
.gl-active-host { outline: 2px solid var(--c); outline-offset: -2px; }
.gl-off .gl-active-host { outline: none; }

/* ---------- note popover ---------- */
.gl-note {
  position: absolute; z-index: 70; width: min(360px, calc(100vw - 24px));
  background: var(--gl-ink); color: var(--gl-text); border-radius: 16px; padding: 18px 18px 14px;
  box-shadow: 0 0 0 1px var(--gl-line), 0 24px 60px -18px rgba(5, 7, 14, .7);
  animation: gl-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes gl-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.gl-note-cat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--c); font-weight: 600; margin-bottom: 8px; }
.gl-note-cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.gl-note h3 { font-size: 17px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; color: #fff; letter-spacing: -.01em; }
.gl-note p { font-size: 14px; color: #c9cdd6; margin: 0; }
.gl-note-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gl-line); }
.gl-note-count { font-size: 12.5px; color: var(--gl-dim); font-variant-numeric: tabular-nums; }
.gl-note-nav { display: flex; gap: 6px; }
.gl-btn {
  border: 0; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: var(--gl-ink-2); color: var(--gl-text); box-shadow: inset 0 0 0 1px var(--gl-line);
}
.gl-btn:hover { background: #2d313b; }
.gl-btn-primary { background: #fff; color: var(--gl-ink); box-shadow: none; }
.gl-btn-primary:hover { background: #e9ebf0; }
.gl-btn:focus-visible, .gl-x:focus-visible { outline: 2px solid var(--gl-trust); outline-offset: 2px; }
.gl-x {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: transparent; color: var(--gl-dim); font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.gl-x:hover { background: var(--gl-ink-2); color: #fff; }

/* ---------- floating launcher ---------- */
.gl-launch {
  position: fixed; z-index: 65; left: 20px; bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px;
  background: var(--gl-ink); color: #fff; padding: 10px 16px 10px 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 14px 34px -10px rgba(5, 7, 14, .6);
}
.gl-launch:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.gl-dots { display: inline-flex; }
.gl-dots i { width: 10px; height: 10px; border-radius: 50%; margin-right: -3px; box-shadow: 0 0 0 2px var(--gl-ink); }
.gl-dots i:nth-child(1) { background: var(--gl-trust); }
.gl-dots i:nth-child(2) { background: var(--gl-patients); }
.gl-dots i:nth-child(3) { background: var(--gl-ai); margin-right: 0; }

/* ---------- intro card ---------- */
.gl-intro {
  position: fixed; z-index: 80; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 24px));
  background: var(--gl-ink); color: var(--gl-text); border-radius: 20px; padding: 22px 22px 18px;
  box-shadow: 0 0 0 1px var(--gl-line), 0 30px 80px -20px rgba(5, 7, 14, .75);
  animation: gl-rise .5s cubic-bezier(.2, .8, .2, 1) .5s both;
}
@keyframes gl-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.gl-intro h2 { font-size: 19px; line-height: 1.25; margin: 0 28px 8px 0; font-weight: 650; color: #fff; letter-spacing: -.015em; }
.gl-intro > p { font-size: 14px; color: #c3c8d2; margin: 0 0 14px; }
.gl-legend { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.gl-legend li { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: #e6e8ec; }
.gl-legend li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); transform: translateY(-1px); }
.gl-legend span { color: var(--gl-dim); }
.gl-intro-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gl-intro-actions .gl-btn { padding: 10px 16px; }

/* ---------- side panel ---------- */
.gl-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(8, 10, 16, .45); animation: gl-fade .2s ease; }
@keyframes gl-fade { from { opacity: 0; } }
.gl-panel {
  position: fixed; z-index: 91; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--gl-ink); color: var(--gl-text); overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 24px 32px; box-shadow: -30px 0 80px -30px rgba(0,0,0,.6);
  animation: gl-slide .32s cubic-bezier(.2, .8, .2, 1);
}
@keyframes gl-slide { from { transform: translateX(40px); opacity: 0; } }
.gl-panel h2 { font-size: 22px; line-height: 1.2; margin: 0 36px 6px 0; font-weight: 650; color: #fff; letter-spacing: -.02em; }
.gl-panel .gl-sub { font-size: 14px; color: var(--gl-dim); margin: 0 0 18px; }
.gl-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--gl-ink-2); font-size: 14px; margin-bottom: 22px; }
.gl-switch { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 0; background: #444955; flex: none; transition: background .2s; }
.gl-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.gl-switch[aria-checked="true"] { background: var(--gl-patients); }
.gl-switch[aria-checked="true"]::after { transform: translateX(18px); }
.gl-group { margin-bottom: 22px; }
.gl-group h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--c); margin: 0 0 8px; }
.gl-group h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.gl-group ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gl-group li button {
  width: 100%; text-align: left; border: 0; background: transparent; color: #e6e8ec; padding: 9px 10px; border-radius: 10px;
  display: flex; gap: 10px; align-items: baseline; font-size: 14.5px;
}
.gl-group li button:hover { background: var(--gl-ink-2); }
.gl-group li b { flex: none; font-size: 12px; color: var(--gl-dim); font-variant-numeric: tabular-nums; width: 16px; }
.gl-group li em { display: block; font-style: normal; font-size: 13px; color: var(--gl-dim); margin-top: 2px; }

.gl-ai { border-radius: 16px; background: #0f1115; box-shadow: inset 0 0 0 1px var(--gl-line); padding: 16px; margin: 6px 0 10px; }
.gl-ai-q { margin-left: auto; width: fit-content; max-width: 85%; background: #2b2f39; color: #fff; padding: 9px 13px; border-radius: 14px 14px 4px 14px; font-size: 14px; }
.gl-ai-a { margin-top: 12px; display: flex; gap: 10px; }
.gl-ai-a .gl-spark { flex: none; width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(from 200deg, var(--gl-ai), var(--gl-trust), var(--gl-patients), var(--gl-ai)); }
.gl-ai-a p { margin: 0; font-size: 14px; color: #dfe2e8; }
.gl-ai-src { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--gl-dim); background: #1c1f26; border-radius: 999px; padding: 4px 10px 4px 6px; }
.gl-ai-src::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--site, #888); }
.gl-fine { font-size: 12.5px; color: var(--gl-dim); margin: 0 0 22px; }
.gl-behind { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.gl-behind li { font-size: 14px; color: #dfe2e8; padding-left: 18px; position: relative; }
.gl-behind li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--gl-ai); }
.gl-behind li span { display: block; color: var(--gl-dim); font-size: 13px; }
.gl-offer { border-radius: 16px; padding: 18px; background: #fff; color: var(--gl-ink); }
.gl-offer p { margin: 0 0 12px; font-size: 14px; color: #3a3f4a; }
.gl-offer strong { display: block; font-size: 20px; letter-spacing: -.02em; margin-bottom: 4px; color: var(--gl-ink); }
.gl-offer a { display: inline-flex; background: var(--gl-ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 999px; }
.gl-offer a:focus-visible { outline: 2px solid var(--gl-trust); outline-offset: 2px; }
.gl-panel h4 { font-size: 15px; font-weight: 600; margin: 4px 0 8px; color: #fff; }

/* ---------- toast ---------- */
.gl-toast {
  position: fixed; z-index: 95; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); background: var(--gl-ink); color: #fff;
  padding: 12px 16px; border-radius: 14px; font-size: 14px; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 0 0 1px var(--gl-line), 0 20px 50px -14px rgba(5,7,14,.7);
  animation: gl-rise .3s cubic-bezier(.2,.8,.2,1);
}
.gl-toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gl-patients); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .gl-strip { font-size: 12px; padding: 8px 12px; gap: 8px; }
  .gl-strip .gl-strip-long { display: none; }
  .gl-chip { top: 10px; right: 10px; font-size: 12px; padding: 6px 11px 6px 7px; }
  .gl-chip[data-pos="tl"], .gl-chip[data-pos="bl"] { left: 10px; }
  .gl-chip[data-pos="above"], .gl-chip[data-pos="above-r"] { top: -40px; }
  .gl-chip[data-pos="above"] { left: 0; }
  .gl-chip[data-pos="above-r"] { right: 0; }
  .gl-launch { left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); padding: 9px 14px 9px 10px; font-size: 13px; }
  .gl-intro, .gl-note.gl-sheet {
    left: 0; right: 0; bottom: 0; top: auto; width: 100%; border-radius: 22px 22px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .gl-note.gl-sheet { position: fixed; animation: gl-rise .28s cubic-bezier(.2,.8,.2,1); }
  .gl-panel { top: auto; height: 88vh; height: 88dvh; width: 100%; border-radius: 22px 22px 0 0; animation-name: gl-up; }
  @keyframes gl-up { from { transform: translateY(40px); opacity: 0; } }
  .gl-toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .gl *, .gl-chip, .gl-note, .gl-intro, .gl-panel, .gl-toast { animation: none !important; transition: none !important; }
}
/* ---------- room for the Netlify badge (bottom-right, about 64px tall) ---------- */
html.gl-has-badge .actionbar { padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
html.gl-has-badge .gl-intro { bottom: 96px; }
html.gl-has-badge .gl-panel { padding-bottom: 104px; }
@media (max-width: 760px) {
  html.gl-has-badge .gl-launch { bottom: calc(150px + env(safe-area-inset-bottom)); }
  html.gl-has-badge .gl-intro, html.gl-has-badge .gl-note.gl-sheet { bottom: 0; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  html.gl-has-badge .gl-toast { bottom: calc(160px + env(safe-area-inset-bottom)); }
}
@media print { .gl, .gl-chip { display: none !important; } }
