/* page-verdicts.css - money-page Rung 2 "Is this funding for you?" bar + verdict chips + persona pickers.
   Warm editorial theme (cream surfaces / forest primary / sienna accent), aligned with the Funding
   Game Plan (css/gameplan.css) so the bar and its destination read as one system. Fonts inherit the
   host page. In-flow only (no fixed/sticky). WCAG AA. Mobile-safe. */

.gcv, .gcv-chip-wrap, .gcv-ptabs, .gcv-personas-q { box-sizing: border-box; }
.gcv *, .gcv *::before, .gcv *::after { box-sizing: border-box; }

.gcv {
  /* self-contained tokens (do not rely on any page's vars) */
  /* text colours meet WCAG AAA (7:1) on their surfaces (verified via axe color-contrast-enhanced) */
  --gcv-cream: #faf7f0; --gcv-card: #ffffff; --gcv-ink: #241f1a; --gcv-dim: #524a3d;
  --gcv-line: #e7ded0; --gcv-line-d: #d9cebb;
  --gcv-forest: #1f5138; --gcv-forest-d: #163d2a;
  --gcv-sienna: #c4532b; --gcv-sienna-d: #8f3719; --gcv-gold: #9a6a1a;
  --gcv-ok-bg: #e6f1ea; --gcv-ok-ink: #23512e;
  --gcv-mid-bg: #f4ecd8; --gcv-mid-ink: #63490f;
  --gcv-low-bg: #f4ece9; --gcv-low-ink: #73402f;

  font-family: inherit;
  color: var(--gcv-ink);
  background: var(--gcv-cream);
  border: 1px solid var(--gcv-line);
  border-top: 3px solid var(--gcv-forest);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 30px 0;
  box-shadow: 0 1px 2px rgba(42,33,22,.04), 0 14px 34px -22px rgba(42,33,22,.22);
  width: 100%;
}

.gcv-head { margin-bottom: 16px; }
.gcv-title { font-family: inherit; font-weight: 700; font-size: 1.18rem; line-height: 1.2; margin: 0 0 5px; color: var(--gcv-ink); }
.gcv-sub { font-size: .9rem; line-height: 1.45; color: var(--gcv-dim); margin: 0; }
.gcv-context { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.gcv-tag {
  display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; letter-spacing: .2px;
  color: var(--gcv-forest-d); background: var(--gcv-ok-bg); border: 1px solid #cfe3d6;
  border-radius: 999px; padding: 3px 10px;
}

.gcv-qs { display: flex; flex-direction: column; gap: 14px; }
.gcv-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.gcv-q__l { font-size: .82rem; font-weight: 700; color: var(--gcv-ink); padding: 0; margin: 0 0 8px; }
.gcv-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.gcv-q--grid .gcv-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; }

.gcv-pill {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-size: .87rem; font-weight: 600;
  color: var(--gcv-ink); background: var(--gcv-card); border: 1.5px solid var(--gcv-line-d);
  border-radius: 999px; padding: 10px 16px; min-height: 44px; line-height: 1.15;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s; text-align: center;
}
.gcv-q--grid .gcv-pill { padding: 10px 8px; }
.gcv-pill:hover { border-color: var(--gcv-forest); }
.gcv-pill:focus-visible { outline: 2px solid var(--gcv-forest); outline-offset: 2px; }
.gcv-pill[aria-pressed="true"] { color: #fff; background: var(--gcv-forest); border-color: var(--gcv-forest); box-shadow: 0 2px 8px -3px rgba(31,81,56,.5); }

.gcv-summary {
  margin-top: 16px; padding: 14px 16px; background: var(--gcv-card); border: 1px solid var(--gcv-line);
  border-left: 4px solid var(--gcv-forest); border-radius: 0 12px 12px 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
}
/* [hidden] is overridden by the display:flex above (CLAUDE.md gotcha) — force it so the empty
   pre-answer summary box does not render as a stray bordered strip under the teaser. */
.gcv-summary[hidden] { display: none !important; }
.gcv-summary__t { font-size: .92rem; line-height: 1.5; color: var(--gcv-ink); margin: 0; flex: 1 1 260px; }
.gcv-summary__t strong { color: var(--gcv-forest-d); font-variant-numeric: tabular-nums; }
.gcv-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  font: inherit; font-size: .9rem; font-weight: 700; color: #fff; background: var(--gcv-sienna-d);
  border-radius: 10px; padding: 11px 18px; min-height: 44px; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.gcv-cta:hover { background: #772f11; }
.gcv-cta:focus-visible { outline: 2px solid var(--gcv-sienna); outline-offset: 2px; }
.gcv-cta:active { transform: translateY(1px); }

/* ── V0-A instant-value teaser (leads the bar; computed from page context, before any tap) ── */
.gcv-teaser {
  margin: 0 0 14px; padding: 12px 14px; background: var(--gcv-card);
  border: 1px solid var(--gcv-line); border-left: 4px solid var(--gcv-forest);
  border-radius: 0 10px 10px 0;
}
.gcv-teaser b { display: block; font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--gcv-ink); }
.gcv-teaser span { display: block; font-size: .82rem; line-height: 1.4; color: var(--gcv-dim); margin-top: 4px; }
.gcv-teaser__q {
  position: relative; appearance: none; -webkit-appearance: none; cursor: pointer; vertical-align: middle;
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; min-height: 18px; padding: 0; margin-left: 4px; flex: 0 0 auto;
  border-radius: 50%; border: 1.5px solid var(--gcv-line-d); background: var(--gcv-cream);
  color: var(--gcv-dim); font-size: .7rem; font-weight: 700; font-style: italic; line-height: 1;
}
/* extend the tap target to ~44px without enlarging the visual dot (rule 21) */
.gcv-teaser__q::after { content: ''; position: absolute; inset: -13px; border-radius: 50%; }
.gcv-teaser__q:hover { border-color: var(--gcv-forest); color: var(--gcv-forest-d); }
.gcv-teaser__q:focus-visible { outline: 2px solid var(--gcv-forest); outline-offset: 2px; }
.gcv-teaser__how { margin: 8px 0 0; font-size: .78rem; line-height: 1.45; color: var(--gcv-dim); }
.gcv-teaser__how[hidden] { display: none; }
/* province pre-highlight chip ("✓ British Columbia · from this page") */
.gcv-tag--pre { background: var(--gcv-forest); color: #fff; border-color: var(--gcv-forest); }

/* ── V1-A in-page ranked panel (compressed Game-Plan rows; top 3 = the anon tier) ── */
.gcv-rp { margin-top: 15px; background: var(--gcv-card); border: 1px solid var(--gcv-line); border-radius: 12px; overflow: hidden; }
.gcv-rp__head { margin: 0; padding: 12px 14px 8px; font-size: .84rem; line-height: 1.45; color: var(--gcv-dim); }
.gcv-rp__head strong { color: var(--gcv-forest-d); font-variant-numeric: tabular-nums; }
.gcv-rp__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gcv-rp__tbl { width: 100%; min-width: 420px; border-collapse: collapse; font-size: .82rem; }
.gcv-rp__tbl th { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: #6b6057; text-align: left; font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--gcv-line); white-space: nowrap; }
.gcv-rp__tbl td { padding: 11px 12px; border-bottom: 1px solid #efe8db; vertical-align: top; }
.gcv-rp__tbl tbody tr:last-child td, .gcv-rp__tbl tr:last-child td { border-bottom: 0; }
.gcv-rp__prog { min-width: 150px; }
.gcv-rp__num { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: #efe9dc; color: var(--gcv-gold); font-weight: 700; font-size: .7rem; align-items: center; justify-content: center; margin-right: 8px; vertical-align: 1px; }
.gcv-rp__prog b { font-size: .84rem; color: var(--gcv-ink); overflow-wrap: anywhere; }
.gcv-rp__sub { display: block; color: #6b6057; font-size: .68rem; margin-top: 3px; text-transform: capitalize; }
.gcv-rp__amt { font-weight: 700; color: var(--gcv-forest); font-size: .9rem; white-space: nowrap; }
.gcv-rp__amtsub { display: block; color: #6b6057; font-size: .66rem; margin-top: 2px; }
.gcv-rp__pill { display: inline-block; border-radius: 5px; padding: 3px 8px; font-weight: 700; font-size: .68rem; white-space: nowrap; }
.gcv-rp__pill--good { background: var(--gcv-ok-bg); color: var(--gcv-ok-ink); }
.gcv-rp__pill--mid { background: var(--gcv-mid-bg); color: var(--gcv-mid-ink); }
.gcv-rp__pill--low { background: var(--gcv-low-bg); color: var(--gcv-low-ink); }
.gcv-rp__time { font-size: .78rem; color: var(--gcv-dim); white-space: nowrap; }
.gcv-rp__time--between { color: var(--gcv-gold); font-weight: 700; }
.gcv-rp__time--soon, .gcv-rp__time--open { color: var(--gcv-forest); font-weight: 600; }
.gcv-rp__dim { color: #9a9082; }
.gcv-rp__more {
  display: block; text-align: center; padding: 12px 14px; font-weight: 700; font-size: .84rem;
  color: var(--gcv-sienna-d); text-decoration: none; border-top: 1px solid var(--gcv-line);
}
.gcv-rp__more:hover { text-decoration: underline; background: #fcfaf5; }
.gcv-rp__more:focus-visible { outline: 2px solid var(--gcv-sienna); outline-offset: -2px; }

/* ── verdict chips (injected into cards + table rows) ── */
.gcv-chip-wrap { margin: 10px 0 4px; opacity: 0; transform: translateY(4px); transition: opacity .32s ease, transform .32s ease; transition-delay: calc(var(--gcv-i, 0) * 45ms); }
.gcv-chip-wrap.is-in { opacity: 1; transform: none; }
.gcv-chip-wrap--row { margin: 6px 0 0; }

.gcv-chip {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 12px; min-height: 32px;
  border: 1.5px solid transparent; line-height: 1.2; max-width: 100%; text-align: left;
  transition: filter .15s, box-shadow .15s;
}
.gcv-chip:hover { filter: brightness(.97); }
.gcv-chip:focus-visible { outline: 2px solid var(--gcv-forest); outline-offset: 2px; }
.gcv-chip__ic { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; font-size: .72rem; font-weight: 700; flex: 0 0 auto; }
.gcv-chip__t { overflow-wrap: anywhere; }
.gcv-chip__more { font-size: .7rem; font-weight: 600; opacity: .7; text-decoration: underline; text-underline-offset: 2px; margin-left: 2px; flex: 0 0 auto; }

.gcv-chip--fit { color: var(--gcv-ok-ink); background: var(--gcv-ok-bg); border-color: #cadfce; }
.gcv-chip--fit .gcv-chip__ic { background: var(--gcv-forest); color: #fff; }
.gcv-chip--no { color: var(--gcv-low-ink); background: var(--gcv-low-bg); border-color: #e6d5cd; }
.gcv-chip--no .gcv-chip__ic { background: #b0553a; color: #fff; }
.gcv-chip--maybe { color: var(--gcv-mid-ink); background: var(--gcv-mid-bg); border-color: #e6d6ae; }
.gcv-chip--maybe .gcv-chip__ic { background: var(--gcv-gold); color: #fff; }
.gcv-chip--reserved { color: var(--gcv-mid-ink); background: #fbf5e7; border: 1.5px dashed var(--gcv-gold); }
.gcv-chip--reserved .gcv-chip__ic { background: transparent; color: var(--gcv-gold); }

.gcv-chip-detail {
  margin-top: 8px; padding: 12px 14px; background: var(--gcv-card); border: 1px solid var(--gcv-line);
  border-radius: 10px; max-width: 460px;
}
.gcv-chip-detail__p { font-size: .84rem; line-height: 1.5; color: var(--gcv-ink); margin: 0 0 8px; }
.gcv-chip-detail__a { font-size: .84rem; font-weight: 700; color: var(--gcv-sienna-d); text-decoration: none; }
.gcv-chip-detail__a:hover { text-decoration: underline; }
.gcv-chip-detail__a:focus-visible { outline: 2px solid var(--gcv-sienna); outline-offset: 2px; }

/* in a table cell, keep the chip tidy under the program name */
td .gcv-chip-wrap { margin: 6px 0 2px; }
td .gcv-chip-detail { max-width: 320px; }

/* ── persona pickers ── */
.gcv-personas-q { font-weight: 700; font-size: .92rem; margin: 4px 0 10px; color: inherit; }
.gcv-ptabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.gcv-ptab {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 600;
  color: #2f2a24; background: #fff; border: 1.5px solid #d9cebb; border-radius: 999px;
  padding: 9px 16px; min-height: 44px; line-height: 1.15; transition: border-color .15s, background .15s, color .15s;
}
.gcv-ptab:hover { border-color: #1f5138; }
.gcv-ptab:focus-visible { outline: 2px solid #1f5138; outline-offset: 2px; }
.gcv-ptab[aria-selected="true"] { color: #fff; background: #1f5138; border-color: #1f5138; box-shadow: 0 2px 8px -3px rgba(31,81,56,.5); }

/* the [hidden] attribute is silently overridden by any element rule that sets display
   (CLAUDE.md gotcha) - force it so hidden persona panels actually hide */
[data-gc-persona-label][hidden] { display: none !important; }
.gcv-ppanel:focus-visible { outline: 2px solid #1f5138; outline-offset: 3px; }

/* ── answered-state stand-down (Fix 2): while a verdict bar is answered (body.gcv-answered, set by
   the controller in _compute), suppress seo-conversion's sticky quiz CTA + injected mobile quiz
   widget so neither overlays the summary/panel (the documented bottom-overlay collision — same
   idiom as body.gc-emb-page in eligibility-embed.css). Not scoped under .gcv: the targets are
   seo-conversion elements outside the bar. Removed again by _clearAnswered() on start-over. ── */
body.gcv-answered .gc-sticky-cta,
body.gcv-answered .gc-quiz-widget { display: none !important; }

@media (max-width: 480px) {
  .gcv { padding: 16px 15px; margin: 22px 0; }
  .gcv-title { font-size: 1.08rem; }
  .gcv-q--grid .gcv-pills { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .gcv-cta { width: 100%; }
  .gcv-teaser b { font-size: .94rem; }
  .gcv-rp__more { padding: 13px 14px; }   /* comfortable tap target on the "N more" link */
}

/* ── V1-A ranked panel on phones (Fix 1): a 4-column table can't fit ~390px, so linearize each row
   into a stacked label-value card — program name on top, award/odds side-by-side as labeled metric
   rows, timing full-width. Mirrors gameplan.css's <700px card treatment. No horizontal scroll, no
   clipped pills. ── */
@media (max-width: 460px) {
  .gcv-rp__scroll { overflow-x: visible; -webkit-overflow-scrolling: auto; }
  .gcv-rp__tbl { display: block; min-width: 0; }
  .gcv-rp__tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }  /* header hidden, a11y-safe */
  .gcv-rp__tbl tbody { display: block; }
  .gcv-rp__tbl tbody tr {
    display: grid; grid-template-columns: 1fr 1fr;
    grid-template-areas: "prog prog" "award odds" "timing timing";
    gap: 10px 12px; align-items: start;
    padding: 13px 14px; margin: 0 12px 10px;
    border: 1px solid var(--gcv-line); border-radius: 10px; background: var(--gcv-card);
  }
  .gcv-rp__tbl td { display: block; padding: 0; border: 0; }
  .gcv-rp__prog { grid-area: prog; min-width: 0; }
  .gcv-rp__c--award { grid-area: award; }
  .gcv-rp__c--odds { grid-area: odds; }
  .gcv-rp__c--timing { grid-area: timing; }
  .gcv-rp__c[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: #6b6057; margin-bottom: 3px;
  }
  .gcv-rp__pill { white-space: normal; line-height: 1.25; }   /* long odds labels wrap instead of clipping */
}

@media (prefers-reduced-motion: reduce) {
  .gcv-pill, .gcv-cta, .gcv-chip, .gcv-ptab { transition: none; }
  .gcv-chip-wrap { transition: none !important; transition-delay: 0s !important; opacity: 1; transform: none; }
}
