/* Gizlen Global contrast standards (v2026-11-29)
   Load LAST on every page. Target: WCAG 2.2 AA
   - body text and small labels: at least 4.5:1
   - large text (24px+, or 18.66px+ bold) and button labels on solid fills: at least 3:1 (we aim for 4.5:1)
   Tokens below are the only text colours to use for new work. Each is tested against every site surface. */

:root {
  /* On light surfaces (#ffffff, #f7f7f3, #eef2f1, #e7eeeb, #e1f5f1) */
  --gg-text: #0b1829;          /* 15.2–17.8:1  headings, body */
  --gg-text-muted: #4a5868;    /* 6.2–7.3:1    secondary copy, captions, sources */
  --gg-accent-text: #0d6e66;   /* 5.2–6.1:1    eyebrows, numbers, links, small labels */

  /* On dark surfaces (#071827 to #14242e) */
  --gg-text-on-dark: #f3f7fa;        /* 13.9–16.7:1 */
  --gg-text-on-dark-muted: #b9c7d4;  /* 8.7–10.4:1 */
  --gg-accent-on-dark: #6fe0d3;      /* 9.5–11.4:1 */

  /* Fills */
  --gg-fill-accent: #43ceb5;   /* teal buttons: label must be --gg-text (9.1:1), never white (1.9:1) */
  --gg-fill-dark: #0b1829;     /* dark buttons: label --gg-text-on-dark or #fff (17.8:1) */

  /* Non-text (WCAG 1.4.11: 3:1 for borders that identify a control, and focus rings) */
  --gg-field-border: #76838f;  /* 3.4–3.9:1 on light surfaces */
  --gg-placeholder: #5d6978;   /* 5.0–5.6:1, still lighter than typed text */
}

/* How these rules win: older patch files use long selectors with !important.
   Every rule here is prefixed with html:not(#_a):not(#_b), which adds two ID-level points of
   specificity, so a standard always beats a patch. Inline styles still win. */

/* 1. Text paint always follows the text colour.
   Older patch files set -webkit-text-fill-color separately from color, which made
   text invisible on some surfaces (white on white, dark on dark). */
:not(#_a):not(#_b):not(#_c),
:not(#_a):not(#_b):not(#_c)::before,
:not(#_a):not(#_b):not(#_c)::after { -webkit-text-fill-color: currentColor !important; }

/* 2. Header phone link (dark header bar on every page) */
html:not(#_a):not(#_b) .gg-site-header .gg-header-tel { color: var(--gg-text-on-dark) !important; }

/* 3. Small accent labels, numbers and kickers on light surfaces */
html:not(#_a):not(#_b) article.gg-ai-card > small,
html:not(#_a):not(#_b) .speaker-solution-item > span,
html:not(#_a):not(#_b) .speaker-topic-row > span,
html:not(#_a):not(#_b) .founder-record-id span,
html:not(#_a):not(#_b) .founder-metric-card small,
html:not(#_a):not(#_b) .hero-micro,
html:not(#_a):not(#_b) .phone-brand > span { color: var(--gg-accent-text) !important; }

/* 4. Dark surfaces: headings, body copy and accent labels */
html:not(#_a):not(#_b) .gg-ai-hero h1, html:not(#_a):not(#_b) .gg-ai-hero h2, html:not(#_a):not(#_b) .gg-ai-hero h3,
html:not(#_a):not(#_b) .gg-ai-hero-card h2, html:not(#_a):not(#_b) .gg-ai-hero-card h3,
html:not(#_a):not(#_b) .gg-ai-section.dark h2, html:not(#_a):not(#_b) .gg-ai-section.dark h3 { color: var(--gg-text-on-dark) !important; }
html:not(#_a):not(#_b) .gg-ai-hero p, html:not(#_a):not(#_b) .gg-ai-hero li, html:not(#_a):not(#_b) .gg-ai-hero-card p, html:not(#_a):not(#_b) .gg-ai-hero-card li,
html:not(#_a):not(#_b) .gg-ai-section.dark p, html:not(#_a):not(#_b) .gg-ai-section.dark li,
html:not(#_a):not(#_b) .prompt-library-hero .prompt-library-reviewed,
html:not(#_a):not(#_b) .brand-device-caption { color: var(--gg-text-on-dark-muted) !important; }
html:not(#_a):not(#_b) .gg-ai-hero .gg-ai-eyebrow, html:not(#_a):not(#_b) .gg-ai-hero-card .gg-ai-eyebrow,
html:not(#_a):not(#_b) .gg-ai-section.dark .gg-ai-card small,
html:not(#_a):not(#_b) .prompt-library-hero .eyebrow,
html:not(#_a):not(#_b) .clarity-final-panel .section-kicker,
html:not(#_a):not(#_b) .inquiry-next-card .section-kicker,
html:not(#_a):not(#_b) .bb-hero .bb-eyebrow, html:not(#_a):not(#_b) .bb-cred .bb-eyebrow { color: var(--gg-accent-on-dark) !important; }

/* 5. Buttons: label colour is set with the fill, never inherited */
html:not(#_a):not(#_b) .cta-band .button:not(.button-secondary) { background: var(--gg-fill-dark) !important; color: #fff !important; }
html:not(#_a):not(#_b) .cta-band .button.button-secondary { background: #fff !important; color: var(--gg-text) !important; border: 1px solid rgba(11,24,41,.18) !important; }
html:not(#_a):not(#_b) .gg-article-cta a { color: var(--gg-text) !important; }

/* 6. Audit price card pill ("Where it usually starts") */
html:not(#_a):not(#_b) .flagship-price-card .tag,
html:not(#_a):not(#_b) .audit-price .tag { color: var(--gg-accent-text) !important; background: #e1f5f1 !important; border-color: #9fd7cc !important; }

/* 7. Components designed for dark panels that sit on light surfaces (free website scan page) */
html:not(#_a):not(#_b) .scan-deliverables > span,
html:not(#_a):not(#_b) .first-look-grid > article, html:not(#_a):not(#_b) .first-look-grid > article *,
html:not(#_a):not(#_b) .conversion-flow > span,
html:not(#_a):not(#_b) .flow-note-grid span { color: var(--gg-text-muted) !important; }
html:not(#_a):not(#_b) .first-look-grid > article strong, html:not(#_a):not(#_b) .first-look-grid > article b,
html:not(#_a):not(#_b) .first-look-grid > article h3, html:not(#_a):not(#_b) .flow-note-grid strong, html:not(#_a):not(#_b) .flow-note-grid b { color: var(--gg-text) !important; }

/* 8. 404 page cards */
html:not(#_a):not(#_b) .hero .card-grid-3 .card h2 a { color: var(--gg-text) !important; }
html:not(#_a):not(#_b) .hero .card-grid-3 .card .card-copy { color: var(--gg-text-muted) !important; }

/* 9. Notes, sources and captions */
html:not(#_a):not(#_b) .page-hero .gg-secondary-note, html:not(#_a):not(#_b) .gg-ai-hero .gg-secondary-note { color: var(--gg-text-on-dark-muted) !important; }
html:not(#_a):not(#_b) .page-hero .gg-secondary-note .text-link, html:not(#_a):not(#_b) .gg-ai-hero .gg-secondary-note .text-link { color: var(--gg-accent-on-dark) !important; }
html:not(#_a):not(#_b) .gg-gap-sources { color: var(--gg-text-muted) !important; }
html:not(#_a):not(#_b) .gg-gap-sources .text-link { color: var(--gg-accent-text) !important; }
html:not(#_a):not(#_b) .article-body .article-meta,
html:not(#_a):not(#_b) .facts .fact span span,
html:not(#_a):not(#_b) .left-bottom > span { color: var(--gg-text-muted) !important; }

/* 10. Illustrated product mockups on the website services page (light screens) */
html:not(#_a):not(#_b) .operations-dashboard em, html:not(#_a):not(#_b) .ops-list em, html:not(#_a):not(#_b) .ops-sync > span { color: #4f5f63 !important; }
html:not(#_a):not(#_b) .ops-head small, html:not(#_a):not(#_b) .workflow-phone-screen small, html:not(#_a):not(#_b) .workflow-phone-screen p { color: var(--gg-text-muted) !important; }

/* 11. More dark surfaces found in the audit */
html:not(#_a):not(#_b) .gg-ai-cta h2, html:not(#_a):not(#_b) .gg-ai-cta h3,
html:not(#_a):not(#_b) .gg-ai-process article h3,
html:not(#_a):not(#_b) .speaker-fit-v3 h2, html:not(#_a):not(#_b) .speaker-fit-v3 h3,
html:not(#_a):not(#_b) .speaker-market-fit h2 { color: var(--gg-text-on-dark) !important; }
html:not(#_a):not(#_b) .gg-ai-cta p, html:not(#_a):not(#_b) .gg-ai-process article p,
html:not(#_a):not(#_b) .article-header .article-meta, html:not(#_a):not(#_b) .hero .article-meta { color: var(--gg-text-on-dark-muted) !important; }
html:not(#_a):not(#_b) .hero .gg-secondary-note .text-link { color: var(--gg-accent-on-dark) !important; }

/* 12. Light dashboard screen inside the website-services illustration */
html:not(#_a):not(#_b) .ops-sync > b, html:not(#_a):not(#_b) .ops-list span > b, html:not(#_a):not(#_b) .commerce-product-row b { color: var(--gg-text) !important; }

/* 13. Free website scan page: next-steps card sits on a light panel */
html:not(#_a):not(#_b) .scan-next-card span { color: var(--gg-text-muted) !important; }

/* 14. Form fields: the border is the only thing that shows where a field is */
html:not(#_a):not(#_b) input:not([type=hidden]):not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]),
html:not(#_a):not(#_b) select, html:not(#_a):not(#_b) textarea { border-color: var(--gg-field-border) !important; }
html:not(#_a):not(#_b) input::placeholder, html:not(#_a):not(#_b) textarea::placeholder { color: var(--gg-placeholder) !important; opacity: 1 !important; }

/* 15. Keyboard focus: two-colour ring (dark outline + white gap) is visible on light and dark surfaces */
html:not(#_a):not(#_b) a:focus-visible, html:not(#_a):not(#_b) button:focus-visible, html:not(#_a):not(#_b) summary:focus-visible,
html:not(#_a):not(#_b) input:focus-visible, html:not(#_a):not(#_b) select:focus-visible, html:not(#_a):not(#_b) textarea:focus-visible,
html:not(#_a):not(#_b) [tabindex]:focus-visible { outline: 2px solid #0b1829 !important; outline-offset: 2px !important; box-shadow: 0 0 0 2px #ffffff !important; }
