/* Shared hover tooltip — appended to body by js/tooltip.js.
   Positioned fixed so it escapes ALL parent overflow/z-index contexts. */

.gc-tip {
  position: fixed;
  z-index: 10000;
  background: var(--forest-dk, #143728);
  color: #fdfaf3;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.002em;
  padding: 8px 12px;
  border-radius: var(--r-sm, 6px);
  max-width: 260px;
  width: max-content;
  white-space: normal;
  text-align: left;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s cubic-bezier(.22,.61,.36,1), transform .15s cubic-bezier(.22,.61,.36,1);
}
.gc-tip--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Arrow — positioned by JS based on placement */
.gc-tip::before {
  content: '';
  position: absolute;
  width: 0; height: 0;
  border: 5px solid transparent;
}
.gc-tip--top::before    { bottom: -10px; left: 50%; transform: translateX(-50%); border-top-color: var(--forest-dk, #143728); }
.gc-tip--bottom::before { top: -10px;    left: 50%; transform: translateX(-50%); border-bottom-color: var(--forest-dk, #143728); }
.gc-tip--left::before   { right: -10px;  top: 50%;  transform: translateY(-50%); border-left-color: var(--forest-dk, #143728); }
.gc-tip--right::before  { left: -10px;   top: 50%;  transform: translateY(-50%); border-right-color: var(--forest-dk, #143728); }

/* Popover variant — larger, supports title + body */
.gc-tip--popover {
  background: #fdfaf3;
  color: var(--ink-2, #57534E);
  border: 1px solid rgba(28,25,23,.14);
  max-width: 340px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 12px 32px rgba(28,25,23,.14);
}
.gc-tip--popover::before { display: none; }
.gc-tip__title {
  display: block;
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--forest, #1B4332);
  margin: 0 0 8px;
}
.gc-tip__body { display: block; }
.gc-tip strong { color: #fdfaf3; font-weight: 600; }
.gc-tip--popover strong { color: var(--ink, #1c1917); font-weight: 600; }

/* ── Rich CARD variant (2026-07-29) ───────────────────────────────────────────
   For content that genuinely will not fit in a table cell: a one-line summary of
   what the program IS, plus the few facts a founder decides on. Wider than the
   popover, pointer-reachable, and typeset as a small document rather than a label. */
.gc-tip--card {
  background: #fdfaf3;
  color: var(--ink-2, #57534E);
  border: 1px solid rgba(28,25,23,.13);
  border-radius: 12px;
  max-width: 372px;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 18px 44px -14px rgba(28,25,23,.34), 0 2px 6px rgba(28,25,23,.06);
  pointer-events: auto;             /* reachable — see the mouseenter handler in tooltip.js */
  overflow: hidden;
}
.gc-tip--card::before { display: none; }

.gc-tipc__head { padding: 13px 15px 11px; border-bottom: 1px solid rgba(28,25,23,.09); }
.gc-tipc__t {
  display: block;
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 14px; font-weight: 600; line-height: 1.3;
  color: var(--ink, #1c1917); margin: 0 0 5px;
}
.gc-tipc__org { display: block; font-size: 11px; color: var(--ink-3, #78716c); letter-spacing: .01em; }
.gc-tipc__sum { display: block; padding: 11px 15px 12px; color: var(--ink-2, #57534E); }

/* fact rows — label left, value right, so the eye can run down the values */
.gc-tipc__facts { display: block; padding: 2px 15px 13px; }
.gc-tipc__f { display: flex; gap: 12px; align-items: baseline; padding: 4px 0; }
.gc-tipc__f + .gc-tipc__f { border-top: 1px dotted rgba(28,25,23,.11); }
.gc-tipc__k {
  flex: 0 0 auto; min-width: 108px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3, #78716c);
}
.gc-tipc__v { flex: 1 1 auto; text-align: right; color: var(--ink, #1c1917); font-weight: 600; font-size: 12px; }
.gc-tipc__v--warn { color: #a86a1f; }
.gc-tipc__v--good { color: #1f5c3d; }

/* A locked line is a CUE, never an offer — no price, no button, no second CTA. Two priced
   offers within ~120px read as a paywall rather than a page, so this names the value and
   stops. One line for ALL gated fields, never one row each. */
.gc-tipc__lockline {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 9px 15px 11px; margin-top: 2px;
  background: rgba(31,92,61,.045);
  border-top: 1px solid rgba(31,92,61,.13);
}
.gc-tipc__lockicon { flex: 0 0 auto; line-height: 1; padding-top: 1px; color: #1f5c3d; opacity: .75; }
.gc-tipc__lockicon svg { width: 11px; height: 11px; display: block; }
.gc-tipc__locktext { font-size: 11.5px; line-height: 1.4; color: #1f5c3d; font-weight: 600; }

.gc-tipc__foot {
  display: block; padding: 9px 15px 10px; background: rgba(28,25,23,.028);
  border-top: 1px solid rgba(28,25,23,.08);
  font-size: 11px; color: var(--ink-3, #78716c);
}

@media (max-width: 520px) {
  .gc-tip--card { max-width: calc(100vw - 24px); }
  .gc-tipc__k { min-width: 92px; }
}

/* Reduced motion — drop transitions */
@media (prefers-reduced-motion: reduce) {
  .gc-tip { transition: none; transform: none; }
  .gc-tip--visible { transform: none; }
}
