/* webfix1117: public-site fixes from the developer review (Nov 2026). Loaded last on every page.
   Undo: remove the <link data-webfix> tag (webfix.py --undo) or swap the site back. */

/* 1. Header: constant height so the sticky header no longer shrinks/grows at the top of the page
      (that loop made the first section "vibrate" after a small scroll). */
html body .gh .gh-bar, html body .gh.is-compact .gh-bar { min-height: 68px; transition: none; }
@media (max-width: 1099px) { html body .gh .gh-bar, html body .gh.is-compact .gh-bar { min-height: 64px; } }

/* 2. Nav: every top item gets the same hover/open underline (menus and plain links alike). */
@media (min-width: 1100px) {
  html body .gh-menu > li > .gh-top { position: relative; background: transparent !important; }
  html body .gh-menu > li > .gh-top::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px;
    background: currentColor; border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
  html body .gh-menu > li > .gh-top:hover::after, html body .gh-menu > li > .gh-top:focus-visible::after,
  html body .gh-menu > li.is-open > .gh-top::after, html body .gh-menu > li > .gh-top[aria-current]::after { transform: scaleX(1); }
  html body .gh-menu > li > .gh-top:hover, html body .gh-menu > li.is-open > .gh-top { color: #124576; text-decoration: none; }
  /* dropdown panels: never clip their own items */
  html body .gh-panel { max-height: calc(100vh - 120px); overflow-y: auto; }
  html body .gh-panel a, html body .gh-panel a strong, html body .gh-panel a small { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* 3. Buttons: text stays readable on hover, and every primary button reacts the same way. */
html body a.btn:not(.btn-ghost):not(.btn-outline):not(.btn-elig):hover,
html body a.btn:not(.btn-ghost):not(.btn-outline):not(.btn-elig):focus-visible,
html body button.btn:not(.btn-ghost):not(.btn-outline):hover { background: #0c2744; color: #fff; border-color: #0c2744; }
html body .hero a.btn:not(.btn-ghost):not(.btn-outline):hover, html body .hero a.btn:not(.btn-ghost):not(.btn-outline):focus-visible,
html body .cta-band a.btn:not(.btn-ghost):not(.btn-outline):hover, html body .cta-band a.btn:not(.btn-ghost):not(.btn-outline):focus-visible,
html body .site-footer a.btn:not(.btn-ghost):hover { background: #d8b46a; border-color: #d8b46a; color: #0b1b3f; }
html body .hero a.btn.btn-ghost:hover, html body .cta-band a.btn.btn-ghost:hover, html body .site-footer a.btn.btn-ghost:hover,
html body .hero a.btn.btn-ghost:focus-visible, html body .cta-band a.btn.btn-ghost:focus-visible { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }
html body a.btn.btn-outline:hover, html body a.btn.btn-outline:focus-visible { background: #124576; color: #fff; border-color: #124576; }
html body a.btn:hover .sr-only { color: inherit; }

/* 4. Grant-type cards: icon and link pill stay visible on the blue hover state. */
html body .grant-card:hover svg, html body .grant-card:focus-visible svg { color: #fff; stroke: currentColor; }
html body .grant-card:hover h3, html body .grant-card:hover p, html body .grant-card:focus-visible h3, html body .grant-card:focus-visible p { color: #fff; }
html body .grant-card:hover .card-more, html body .grant-card:focus-visible .card-more { background: #fff; color: #0c2744; }

/* 5. Stats strip: equal columns, no count-up width jumps. */
html body .proof-bar .proof-stats { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 1.5rem; justify-items: center; text-align: center; }
html body .proof-stats > li { width: 100%; max-width: 22rem; }
@media (max-width: 640px) { html body .proof-stats { grid-template-columns: 1fr; gap: 1rem; } }

/* 6. Process steps: remove the stray timeline dots/lines that looked like a rendering bug. */
html body ol.steps::before, html body ol.steps::after, html body ol.steps > li.step::before, html body ol.steps > li.step::after { content: none !important; display: none !important; }
html body ol.steps > li.step { padding: 1.25rem 1.25rem 1.4rem; }
html body ol.gwc-steps > li { padding: 1.25rem; }

/* 7. FAQ: the whole row opens the answer, with a clear +/- marker; no empty right half. */
html body .faq details { display: block; padding: 0; }
html body .faq summary { width: 100%; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .95rem 1.1rem; list-style: none; cursor: pointer; }
html body .faq summary::-webkit-details-marker { display: none; }
html body .faq summary::after { content: "+"; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  font: 600 1.15rem/1 system-ui, sans-serif; color: #124576; background: #eef3f8; transition: transform .2s ease; }
html body .faq details[open] > summary::after { content: "\2212"; }
html body .faq details > div, html body .faq details .prose { padding: 0 1.1rem; }
html body .faq details[open] .prose { padding-bottom: 1rem; }
html body .faq details .prose p { max-width: 75ch; }

/* 8. Consistent spacing: last section before the footer no longer leaves a big gap. */
html body main > section.band:last-of-type, html body main > .band:last-child { padding-bottom: clamp(2.5rem, 5vw, 4rem); margin-bottom: 0; }
html body main + .related-services, html body .related-services { width: min(1240px, calc(100% - 2.5rem)); margin: 0 auto; padding: 0 0 2.5rem; box-sizing: border-box; }
html body .related-services p { margin: 0; }

/* 9. Cookie notice: a tidy card instead of an edge-to-edge strip (the old padding rule was invalid). */
html body #consent:not([hidden]) { position: fixed; left: 1rem; right: auto; bottom: 1rem; width: min(30rem, calc(100% - 2rem)); box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 1rem 1.15rem; margin: 0; border-radius: 14px;
  background: #0c2744; color: #fff; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 40px rgba(12,39,68,.28); z-index: 70; }
html body #consent p { flex: 1 1 100%; margin: 0; font-size: .92rem; line-height: 1.5; color: #e9eef5; }
html body #consent button { min-height: 40px; padding: .45rem 1.1rem; border-radius: 999px; font-weight: 600; cursor: pointer; border: 1px solid #fff; }
html body #consent button:first-of-type { background: #fff; color: #0c2744; }
html body #consent button + button { background: transparent; color: #fff; }
html body #consent button:hover { background: #d8b46a; border-color: #d8b46a; color: #0b1b3f; }
@media (max-width: 600px) { html body #consent:not([hidden]) { left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); width: auto; } }

/* 10. Pricing tool header: real spacing between the holiday pill, "Currency" and the select. */
html body .gwc-tool-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; row-gap: .6rem; }
html body .gwc-tool-head > .eyebrow, html body .gwc-tool-head > h2 { flex: 1 1 100%; margin-bottom: 0; }
html body .gwc-tool-head .gwc-pill { margin: 0; }
html body .gwc-tool-head .gwc-cur:not([hidden]) { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 0 .5rem; }
html body .gwc-tool-head .gwc-cur select { min-height: 38px; padding: .3rem .6rem; }

/* 11. Free tools block: 2 rows of 3, readable contrast. */
html body .pf-xlinks .pf-xlinks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
html body .pf-xlinks .pf-xlinks-grid > a { background: #fff; border: 1px solid #cfc4ae; border-radius: 14px; padding: 1.1rem 1.2rem; box-shadow: 0 6px 18px rgba(12,39,68,.06);
  color: #172033; text-decoration: none; display: flex; flex-direction: column; gap: .35rem; transition: border-color .2s, transform .2s; }
html body .pf-xlinks .pf-xlinks-grid > a strong { color: #0c2744; font-size: 1.02rem; }
html body .pf-xlinks .pf-xlinks-grid > a span { color: #3d4a5c; font-size: .93rem; line-height: 1.5; }
html body .pf-xlinks .pf-xlinks-grid > a:hover, html body .pf-xlinks .pf-xlinks-grid > a:focus-visible { border-color: #124576; transform: translateY(-2px); }
html body .pf-xlinks .wf-xl-sub { margin: .25rem 0 1rem; color: #3d4a5c; max-width: 60ch; }
@media (max-width: 900px) { html body .pf-xlinks .pf-xlinks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { html body .pf-xlinks .pf-xlinks-grid { grid-template-columns: 1fr; } }

/* 12. Footer newsletter: checkbox aligned with its text, no stray gaps, stable layout when errors show. */
html body .site-footer form.footer-news .choice { display: grid !important; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: start; margin: 0; }
html body .site-footer form.footer-news .choice input[type=checkbox] { margin: 3px 0 0 !important; width: 18px; height: 18px; }
html body .site-footer form.footer-news .choice span { display: block; margin: 0; line-height: 1.5; }
html body .site-footer form.footer-news .choice span a { display: inline; white-space: normal; }
html body .site-footer form.footer-news .field-error { margin: -4px 0 0 !important; padding: 0; font-size: 12px; line-height: 1.35; color: #ffd2d2; min-height: 0; }
html body .site-footer form.footer-news .field-error[hidden] { display: none !important; }
html body .site-footer form.footer-news .wizard-banner { margin: 0; padding: .5rem .75rem; border-radius: 8px; background: rgba(255,210,210,.12); color: #ffd2d2; font-size: 13px; }
html body .site-footer form.footer-news .wizard-banner[hidden] { display: none !important; }
html body .site-footer form.footer-news input[aria-invalid="true"]:not([type=checkbox]) { border-color: #ffb4b4 !important; box-shadow: 0 0 0 2px rgba(255,180,180,.35); }
html body .site-footer form.footer-news [data-status]:empty { display: none; }

/* 13. Forms: Back buttons are always visible (outlined) on light cards. */
html body .form-card .btn-ghost, html body .form-card button[data-back], html body .wizard .btn-ghost, html body .wizard button.wizard-back,
html body form.wizard button[type=button]:not(.btn):not([class*=chip]):not([class*=opt]) { background: #fff; color: #124576; border: 2px solid #124576; border-radius: 999px; }
html body .form-card .btn-ghost:hover, html body .wizard .btn-ghost:hover, html body .wizard button.wizard-back:hover { background: #e7eef6; color: #0c2744; }
html body .form-card .btn-ghost[hidden], html body .wizard [hidden] { display: none !important; }

/* 14. Eligibility check: form sits in the hero beside the intro; clean progress; no overflowing lines. */
html body .hero-copy:has(#eligibility-quiz)::after, html body .hero.wf-split .hero-copy::after { display: none; }
html body #eligibility-quiz .eq-card::before { display: none !important; }
html body #eligibility-quiz .eq-card { overflow: hidden; border-radius: 16px; }
html body .hero .eq-progress { justify-content: flex-start; color: #fff; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
html body .hero .eq-progress p { margin: 0; color: #fff; }
html body .hero .eq-ring-track { stroke: rgba(255,255,255,.28); }
html body .hero .eq-ring-value { stroke: #d8b46a; }
html body #eligibility-quiz .eq-option { position: relative; display: block; padding: .8rem 1rem .8rem 2.75rem; border-radius: 12px; background: #fff; cursor: pointer; }
html body #eligibility-quiz .eq-option::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 1rem; height: 1rem; margin-top: -.5rem; border-radius: 50%; border: 2px solid #8f8572; background: #fff; box-sizing: border-box; }
html body #eligibility-quiz .eq-option:has(input:checked) { background: #eef3f8; border-color: #124576 !important; box-shadow: 0 0 0 1px #124576 inset; }
html body #eligibility-quiz .eq-option:has(input:checked)::before { border-color: #124576; background: radial-gradient(circle, #124576 0 40%, #fff 45%); }
html body #eligibility-quiz .eq-option:hover { border-color: #124576 !important; }
html body #eligibility-quiz .eq-option-label, html body #eligibility-quiz .eq-option span { background: transparent !important; box-shadow: none !important; }
html body #eligibility-quiz .eq-actions { gap: .75rem; margin-top: .25rem; }
@media (min-width: 980px) {
  html body .hero.wf-split > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 3rem; align-items: start; }
  html body .hero.wf-split .hero-copy { max-width: none; }
  html body .hero.wf-split .wf-hero-side { position: relative; z-index: 2; }
}
html body .hero.wf-split .wf-hero-side #eligibility-quiz .eq { max-width: none; margin: 0; }
html body .hero.wf-split .hero-visual { display: none !important; }
@media (max-width: 979px) { html body .hero.wf-split .wf-hero-side { margin-top: 1.5rem; } }

/* 15. Blog posts: lead form on the right of the hero (desktop); one compact left table of contents. */
html body .hero .blog-lead { background: #fffcf8; color: #172033; border-radius: 16px; padding: 1.25rem 1.25rem 1rem; box-shadow: 0 18px 40px rgba(0,0,0,.25); display: grid; gap: .6rem; }
html body .hero .blog-lead p { margin: 0; color: #172033; }
html body .hero .blog-lead label { display: grid; gap: .25rem; font-size: .88rem; font-weight: 600; color: #172033; }
html body .hero .blog-lead input { min-height: 42px; border: 1px solid #8f8572; border-radius: 8px; padding: .45rem .7rem; background: #fff; color: #172033; }
html body .hero .blog-lead .btn { justify-self: start; background: #124576; color: #fff; border-color: #124576; min-width: 9rem; }
html body .hero .blog-lead .btn:hover { background: #0c2744; color: #fff; }
html body .hero .blog-lead [data-note]:empty { display: none; }
html body .hero .blog-lead .wf-lead-sub { font-size: .9rem; color: #3d4a5c; }
@media (min-width: 980px) {
  html body .hero.wf-post > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 3rem; align-items: center; }
  html body .hero.wf-post .hero-copy { max-width: none; }
}
html body .post-layout nav.toc { font-size: .88rem; line-height: 1.4; background: #fffcf8; border: 1px solid #e4dccb; border-radius: 12px; padding: .9rem 1rem; }
html body .post-layout nav.toc > p { margin: 0 0 .5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: #124576; }
html body .post-layout nav.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: wftoc; display: grid; gap: .1rem; }
html body .post-layout nav.toc li { counter-increment: wftoc; }
html body .post-layout nav.toc li a { display: grid; grid-template-columns: 1.6rem 1fr; padding: .35rem .4rem; border-radius: 8px; color: #172033; text-decoration: none; }
html body .post-layout nav.toc li a::before { content: counter(wftoc) "."; color: #8a6d2f; font-weight: 700; }
html body .post-layout nav.toc li a:hover, html body .post-layout nav.toc li a[aria-current], html body .post-layout nav.toc li a.is-active { background: #eef3f8; color: #0c2744; }
@media (min-width: 980px) { html body .post-layout nav.toc { max-height: calc(100vh - 120px); overflow-y: auto; } }

/* 16. Blog index: one even card grid (no odd wide card), consistent images. */
html body .blog-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
html body .blog-list > li, html body .blog-list > li.is-featured { grid-column: auto !important; grid-row: auto !important; }
html body .blog-list > li > a { height: 100%; display: flex; flex-direction: column; gap: .5rem; }
html body .blog-list > li.is-featured > a { display: flex !important; flex-direction: column !important; }
html body .blog-list .card-photo, html body .blog-list .card-photo img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 10px; display: block; }
html body .blog-list .card-more { margin-top: auto; }
@media (max-width: 900px) { html body .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { html body .blog-list { grid-template-columns: 1fr; } }

/* 17. US / UK / Australia hubs: hero uses the full width; same country-pill colours on every hub; tidy amounts and cards. */
html body .pf-hero .pf-cc[aria-current], html body .pf-hero-au .pf-cc[aria-current] { background: #f7f3ea !important; border-color: #f7f3ea !important; color: #0c2744 !important; }
@media (min-width: 980px) {
  html body .pf-hub .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: 3.5rem; max-width: none; align-items: start; }
  html body .pf-hub .hero-copy > * { grid-column: 1; }
  html body .pf-hub .hero-copy > .pf-hub-stats { grid-column: 2; grid-row: 2 / span 3; align-self: center; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0;
    padding: 1.1rem; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); }
  html body .pf-hub .hero-copy > .pf-hub-stats > li:last-child { grid-column: 1 / -1; }
  html body .pf-hub .hero-copy > .hero-actions { grid-column: 2; grid-row: 5; margin-top: .75rem; }
  html body .pf-hub .hero-copy > .pf-flagbar { grid-column: 1 / -1; }
}
html body .pf-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem .75rem; }
html body .pf-card-top .pf-amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
html body .pf-legal-grid, html body .pf-setup { gap: 1rem; }
html body .pf-legal { background: #fff; border: 1px solid #e4dccb !important; border-top: 4px solid var(--pf-accent, #124576) !important; border-left-width: 1px !important; border-radius: 14px; padding: 1.15rem 1.2rem !important;
  display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 6px 18px rgba(12,39,68,.05); }
html body .pf-legal h3 { margin: 0; font-size: 1.05rem; }
html body .pf-legal p { margin: 0; font-size: .95rem; line-height: 1.55; color: #3d4a5c; }
html body .pf-legal a { margin-top: auto; font-weight: 600; font-size: .9rem; }

/* 18. Book a call: the hero's right side explains what happens next. */
html body .wf-book-card { background: #fffcf8; color: #172033; border-radius: 16px; padding: 1.4rem 1.5rem; box-shadow: 0 18px 40px rgba(0,0,0,.25); max-width: 420px; margin-left: auto; }
html body .wf-book-card h2 { margin: 0 0 .75rem; font-size: 1.35rem; color: #0c2744; }
html body .wf-book-card ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .8rem; counter-reset: wfb; }
html body .wf-book-card li { counter-increment: wfb; display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: start; color: #172033; }
html body .wf-book-card li::before { content: counter(wfb); width: 2rem; height: 2rem; border-radius: 50%; background: #124576; color: #fff; display: grid; place-items: center; font-weight: 700; }
html body .wf-book-card li strong { display: block; color: #0c2744; }
html body .wf-book-card p.wf-book-note { margin: .9rem 0 0; font-size: .9rem; color: #3d4a5c; }
@media (max-width: 979px) { html body .wf-book-card { margin: 1.5rem 0 0; max-width: none; } }
html body .wf-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
html body .wf-more article { background: #fffcf8; border: 1px solid #e4dccb; border-radius: 14px; padding: 1.1rem 1.2rem; }
html body .wf-more h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
html body .wf-more p { margin: 0; color: #3d4a5c; }
@media (max-width: 800px) { html body .wf-more { grid-template-columns: 1fr; } }

/* 19. Pricing buttons and audience cards: readable text (accessibility). */
html body .gwc-aud .gwc-go { color: #124576; font-weight: 700; }
html body .gwc-aud:hover .gwc-go { color: #0c2744; }
html body .hero .wf-book-side { display: block !important; align-self: center; }
html body .hero .wf-book-side svg { display: none; }
@media (max-width: 640px) { html body .proof-bar .proof-stats { grid-template-columns: 1fr !important; display: grid !important; } }
html body .wf-book-card a { color: #124576; font-weight: 600; text-decoration: underline; }
html body .site-footer form.footer-news input[type=checkbox][aria-invalid="true"] { outline: 2px solid #ffb4b4; outline-offset: 1px; box-shadow: none; border: 0; }
html body #eligibility-quiz .eq-option .eq-option-detail { display: block; margin-top: .15rem; font-weight: 400; }

/* batch 3 (sweep 2026-11-16 ET) */
.wf-resizing .gh-panel,.wf-resizing .gh-nav,.wf-resizing .gh-panel *{transition:none!important}
form.blog-lead .wf-note{font-size:15px;line-height:1.45;margin:10px 0 0}
form.blog-lead.wf-tried:has(input[aria-invalid=true]) .wf-note{color:#8a1c12}
form.blog-lead .wf-note:empty{display:none}
form.blog-lead input[aria-invalid=true]{border-color:#b42318!important;box-shadow:0 0 0 3px rgba(180,35,24,.14)!important}
form.blog-lead button[disabled]{opacity:.65;cursor:progress}

/* batch 5 (Claude review part 3, 2026-11-16 ET) */

/* 1/2. Mobile drawer: keep MENU and Close on one row with space between them.
   .gh-drawer-only { display:block } was overriding .gh-drawer-head { display:flex }. */
@media (max-width: 1099px) {
  html body .gh-drawer-head.gh-drawer-only {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
}

/* 3. Eligibility leftover #quiz band: only holds a hidden SMS <template>, but
   .band padding left an empty 89px (phone) / 145px (desktop) strip. */
html body #quiz.band,
html body section#quiz.band {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  background: none !important;
}
html body #quiz[hidden] { display: none !important; }

/* 4. Pricing slider ticks: $2.5M · $5M · $5M+ crowd at the right on mid widths.
   Existing rule hid them only under 520px; also hide $2.5M and $5M (keep $5M+)
   up to 900px so labels never overlap. */
@media (max-width: 900px) {
  html body .gwc-ticks span:nth-child(5),
  html body .gwc-ticks span:nth-child(6) { display: none; }
}

/* 6. Homepage on a phone: blog cards in one horizontal swipe row.
   FAQs are already <details> accordions; this only changes the blog layout. */
@media (max-width: 700px) {
  body.kind-home .post-grid,
  body.kind-home .post-grid ul.index {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.85rem;
    margin: 0;
    list-style: none;
  }
  body.kind-home .post-grid ul.index > li {
    flex: 0 0 min(80vw, 300px);
    width: min(80vw, 300px);
    max-width: min(80vw, 300px);
    scroll-snap-align: start;
  }
  body.kind-home .post-grid .card-photo,
  body.kind-home .post-grid .card-photo img,
  body.kind-home .post-grid img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
  }
}
