/* GF Scanner — shared art direction and install-CTA system.
 *
 * Loaded after each page's inline <style> so it can override the two design
 * systems the site grew into (DM Sans / slate on the homepage, Figtree /
 * cream on the 577 generated pages) without editing either in place.
 *
 * The site has no dark mode. What it has is dark *panels* -- the hero and the
 * closing CTA band sit on --site-ink -- so every component that can land on one
 * carries an explicit inverted palette rather than inheriting and hoping.
 */

:root {
  --site-paper: #f7f5ef;
  --site-paper-2: #faf8f4;
  --site-white: #fffdf8;
  --site-ink: #1d1914;
  --site-ink-2: #2a251e;
  /* 6.29:1 on paper. The inherited #62564b sat at 4.6:1 and was doing body copy. */
  --site-muted: #5e5a52;
  --site-rule: rgba(29, 25, 20, .12);
  --site-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --site-ease: cubic-bezier(.2, .8, .2, 1);

  /* Action colour, reserved exclusively for install CTAs.
   *
   * The homepage shipped #16A34A, which puts white text at 3.30:1 -- the single
   * most important element on the site was also its least legible, and below
   * WCAG AA. The guides' #2b8a4b was no better at 4.34:1. This is 6.54:1.
   *
   * Nothing else may use it. A colour doing six jobs cannot signal "act here". */
  --gs-action: #1b6b3a;
  --gs-action-hover: #155630;
  --gs-action-tint: rgba(27, 107, 58, .09);
  /* For CTA text sitting on a dark panel: 10.03:1 on --site-ink. */
  --gs-action-on-dark: #4ade80;

  --gs-verify: #2e5b4a;   /* assurance ticks, 7.10:1 on paper */
  --gs-star: #b8720f;     /* rating glyphs on paper */
  --gs-star-deep: #e8a33d;/* rating glyphs on ink, 8.11:1 */
  --gs-bar-h: 58px;
}

/* ---------------------------------------------------------------- CTA core */

.gs-cta {
  display: grid;
  gap: .85rem;
  justify-items: start;
}

.gs-cta__buttons {
  display: grid;
  gap: .6rem;
  width: 100%;
  max-width: 430px;
}

.gs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 10px;
  background: var(--gs-action);
  color: #fff;
  font-family: var(--site-sans);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(21, 24, 28, .10), 0 8px 20px -8px rgba(27, 107, 58, .5);
  transition: background .2s var(--site-ease), transform .12s var(--site-ease);
}

.gs-btn:hover { background: var(--gs-action-hover); color: #fff; }
.gs-btn:active { transform: translateY(1px); }
.gs-btn:focus-visible { outline: 2px solid var(--site-ink); outline-offset: 3px; }

/* Store badges follow the shared app-store treatment: white, compact, and
 * legible on both the light page and dark CTA panels. */
.gs-btn--store {
  min-height: 54px;
  gap: .7rem;
  padding: .72rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: var(--site-white);
  color: var(--site-ink);
  box-shadow: none;
  text-align: left;
  transition: transform .2s var(--site-ease), box-shadow .2s var(--site-ease), opacity .2s var(--site-ease);
}
.gs-btn--store:hover { background: var(--site-white); color: var(--site-ink); transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0, 0, 0, .2); }
.gs-btn--store svg { width: 25px; height: 25px; flex: 0 0 auto; }
.gs-btn__copy { display: grid; row-gap: .16rem; line-height: 1.06; }
.gs-btn__copy small { font-size: .61rem; font-weight: 650; }
.gs-btn__copy strong { font-size: .94rem; font-weight: 850; }

/* The demoted twin's label. Hidden until a device class promotes it. */
.gs-btn__alt { display: none; }

/* --------------------------------------------------- Device adaptation
 *
 * Driven entirely off a class stamped on <html> before first paint. Both store
 * links stay in the served HTML on every device -- the non-matching one is
 * demoted to a quiet text link, never removed -- so crawlers, the JSON-LD
 * downloadUrl and the pt=/ct=/referrer= attribution all survive with
 * JavaScript off, and an Android user browsing on an iPad still gets a route.
 */

.gs-ios .gs-btn--android,
.gs-android .gs-btn--ios {
  order: 9;
  justify-self: start;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--site-muted);
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gs-ios .gs-btn--android:hover,
.gs-android .gs-btn--ios:hover { background: none; color: var(--site-ink); }

.gs-ios .gs-btn--android .gs-btn__label,
.gs-android .gs-btn--ios .gs-btn__label { display: none; }
.gs-ios .gs-btn--android .gs-btn__alt,
.gs-android .gs-btn--ios .gs-btn__alt { display: inline; }

/* Desktop installs nothing, so the handoff leads and the stores follow it. */
.gs-btn--handoff, .gs-handoff { display: none; }
.gs-desktop .gs-btn--handoff { display: inline-flex; order: -1; }
.gs-desktop .gs-btn--ios,
.gs-desktop .gs-btn--android {
  background: transparent;
  color: var(--site-ink);
  box-shadow: inset 0 0 0 1px var(--site-rule);
}
.gs-desktop .gs-btn--ios:hover,
.gs-desktop .gs-btn--android:hover {
  background: var(--gs-action-tint);
  color: var(--site-ink);
}
.gs-desktop .gs-cta__buttons {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  max-width: none;
}

/* The closing CTA is a dark panel, so its desktop store links need the
 * inverted outline palette instead of the default ink-on-paper treatment. */
.gs-desktop .cta-section .gs-btn--ios,
.gs-desktop .cta-section .gs-btn--android {
  color: var(--site-white);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .34);
}
.gs-desktop .cta-section .gs-btn--ios:hover,
.gs-desktop .cta-section .gs-btn--android:hover {
  background: rgba(255, 253, 248, .12);
  color: var(--site-white);
}

/* Store badges keep their white treatment on desktop, including inside the
 * dark closing CTA. */
.gs-desktop .cta-section .gs-btn--store,
.gs-desktop .cta-section .gs-btn--store:hover {
  background: var(--site-white);
  color: var(--site-ink);
  box-shadow: none;
}
.gs-desktop .cta-section .gs-btn--store:hover { box-shadow: 0 14px 36px rgba(0, 0, 0, .2); }

/* ------------------------------------------------------------- Handoff QR */

.gs-desktop .gs-handoff { display: block; }
.gs-desktop .gs-handoff[hidden] { display: none; }

.gs-handoff {
  margin-top: .2rem;
  padding: .9rem;
  border: 1px solid var(--site-rule);
  border-radius: 12px;
  background: var(--site-white);
  text-align: center;
}
.gs-handoff img { display: block; width: 150px; height: 150px; }
.gs-handoff p {
  margin: .5rem 0 0;
  color: var(--site-muted);
  font-family: var(--site-sans);
  font-size: .8125rem;
}

/* Desktop hover/focus preview for the nav and store-install buttons. */
.gs-qr-popover {
  position: fixed;
  z-index: 90;
  left: 0;
  top: 0;
  display: none;
  width: 248px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--site-rule);
  border-radius: 20px;
  background: var(--site-white);
  color: var(--site-ink);
  box-shadow: 0 24px 70px rgba(24, 32, 27, .32);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(.96);
  transform-origin: top center;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.gs-qr-popover::after {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  background: var(--site-white);
  transform: rotate(45deg);
}
.gs-qr-popover.is-above { transform-origin: bottom center; }
.gs-qr-popover.is-above::after { top: auto; bottom: -7px; }
.gs-qr-popover.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.gs-qr-popover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 220px;
  height: 220px;
  background: var(--site-white);
}
.gs-qr-popover p {
  position: relative;
  z-index: 1;
  margin: .65rem .35rem .15rem;
  color: var(--site-muted);
  font-family: var(--site-sans);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .gs-qr-popover { display: block; }
}

/* ------------------------------------------------------------ Assurances */

.gs-cta__assure {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  margin: 0;
  color: var(--site-muted);
  font-family: var(--site-sans);
  font-size: .8125rem;
  line-height: 1.5;
}
.gs-cta__assure span {
  padding-left: 1.15em;
  background: no-repeat left .32em / .78em .78em
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232e5b4a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- Rating
 *
 * Partial fill comes from a gradient clipped to the glyphs: one text node, no
 * image, no half-star sprite, and it tracks whatever value is set.
 */

.gs-rating {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin: 0;
  font-family: var(--site-sans);
  font-size: .8125rem;
}
.gs-rating__stars {
  --gs-fill: 100%;
  font-size: .95rem;
  letter-spacing: .06em;
  line-height: 1;
  color: var(--gs-star);
  background: linear-gradient(90deg, var(--gs-star) var(--gs-fill), var(--site-rule) var(--gs-fill));
  -webkit-background-clip: text;
  background-clip: text;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .gs-rating__stars { color: transparent; }
}
.gs-rating__value { color: var(--site-ink); font-weight: 700; }

/* ------------------------------------------------------------- Variants */

.gs-cta--mini { gap: 0; }
.gs-cta--mini .gs-cta__assure,
.gs-cta--mini .gs-rating,
.gs-cta--mini .gs-handoff { display: none; }
.gs-cta--mini .gs-cta__buttons {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  max-width: none;
  gap: .4rem;
}
.gs-cta--mini .gs-btn {
  min-height: 40px;
  padding: 0 .95rem;
  font-size: .8125rem;
  box-shadow: none;
}
.gs-cta--inline .gs-rating { display: none; }

/* Dark-panel palette. Without this the buttons render ink-on-ink. */
.gs-cta--hero .gs-cta__assure { color: rgba(247, 245, 239, .78); }
.gs-cta--hero .gs-rating__value { color: var(--site-white); }
.gs-cta--hero .gs-rating__stars {
  color: var(--gs-star-deep);
  background: linear-gradient(90deg, var(--gs-star-deep) var(--gs-fill), rgba(247, 245, 239, .3) var(--gs-fill));
  -webkit-background-clip: text;
  background-clip: text;
}
.gs-ios .gs-cta--hero .gs-btn--android,
.gs-android .gs-cta--hero .gs-btn--ios { color: rgba(247, 245, 239, .8); }
.gs-desktop .gs-cta--hero .gs-btn--ios,
.gs-desktop .gs-cta--hero .gs-btn--android {
  color: var(--site-white);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .34);
}
.gs-desktop .gs-cta--hero .gs-btn--ios:hover,
.gs-desktop .gs-cta--hero .gs-btn--android:hover {
  background: rgba(255, 253, 248, .12);
  color: var(--site-white);
}
.gs-cta--hero .gs-btn:focus-visible { outline-color: var(--site-white); }

/* Keep the county-style badge surface after the desktop device rules above. */
.gs-desktop .gs-btn--store,
.gs-desktop .gs-btn--store:hover {
  background: var(--site-white);
  color: var(--site-ink);
  box-shadow: none;
}
.gs-desktop .gs-btn--store:hover { box-shadow: 0 14px 36px rgba(0, 0, 0, .2); }
.gs-desktop .gs-cta--hero .gs-btn--store,
.gs-desktop .gs-cta--hero .gs-btn--store:hover {
  background: var(--site-white) !important;
  color: var(--site-ink) !important;
  box-shadow: none;
}
.gs-desktop .gs-cta--hero .gs-btn--store:hover { box-shadow: 0 14px 36px rgba(0, 0, 0, .2); }

/* The closing CTA must remain visible even before device detection runs. */
.cta-section .gs-btn--store,
.cta-section .gs-btn--store:hover {
  background: var(--site-white);
  color: var(--site-ink);
  box-shadow: none;
}
.cta-section .gs-btn--store:hover { box-shadow: 0 14px 36px rgba(0, 0, 0, .2); }
.gs-desktop .cta-section .gs-btn--store:hover {
  background: var(--site-white);
  color: var(--site-ink);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
}

/* ---------------------------------------------------------- Sticky bar */

.gs-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 80;
  display: none;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: .7rem;
  height: calc(var(--gs-bar-h) + env(safe-area-inset-bottom));
  padding: 0 .9rem env(safe-area-inset-bottom);
  background: var(--site-white);
  box-shadow: 0 -1px 0 var(--site-rule), 0 -12px 32px -16px rgba(24, 32, 27, .35);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .28s var(--site-ease), opacity .28s var(--site-ease);
}
.gs-ios .gs-bar, .gs-android .gs-bar { display: grid; }
.gs-bar--in { transform: none; opacity: 1; }
.gs-bar-off .gs-bar { display: none; }

/* Reserve the space up front, from the same pre-paint class, so revealing the
 * bar cannot shift the page: CLS contribution is zero by construction. */
.gs-ios body, .gs-android body {
  padding-bottom: calc(var(--gs-bar-h) + env(safe-area-inset-bottom));
}

.gs-bar__close {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 25, 20, .07);
  cursor: pointer;
}
.gs-bar__close::after {
  content: "\00d7";
  font-size: 1.05rem;
  line-height: 1;
  color: var(--site-muted);
}
/* 26px visual, 44px touch target. */
.gs-bar__close::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.gs-bar__icon { border-radius: 7px; }
.gs-bar__name {
  font-family: var(--site-sans);
  font-size: .875rem;
  font-weight: 700;
  color: var(--site-ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gs-bar__actions { display: flex; gap: .4rem; }
.gs-bar__go {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 1rem;
  border-radius: 8px;
  background: var(--gs-action);
  color: #fff;
  font-family: var(--site-sans);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.gs-bar__go:hover { background: var(--gs-action-hover); color: #fff; }
/* Only the matching store shows in the bar; there is no room to demote. */
.gs-ios .gs-bar__go--android, .gs-android .gs-bar__go--ios { display: none; }
.gs-desktop .gs-bar { display: none; }

/* ------------------------------------------------------------------ RTL */

[dir="rtl"] .gs-cta,
[dir="rtl"] .gs-cta__assure { justify-items: start; }
[dir="rtl"] .gs-cta__assure span {
  padding-left: 0;
  padding-right: 1.15em;
  background-position: right .32em;
}
[dir="rtl"] .gs-bar { grid-template-columns: auto auto 1fr auto; }

/* -------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .gs-btn, .gs-bar, .gs-qr-popover { transition: none; }
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 720px) {
  .gs-cta__buttons { max-width: none; }
  .gs-desktop .gs-cta__buttons { grid-auto-flow: row; grid-auto-columns: auto; }
  .gs-cta__assure { font-size: .78125rem; gap: .25rem .8rem; }
}
