/* FOCAL Growth Check page (/growth-check/). Builds on focal-2026.css and its colour tokens. */

:root { --gc-error: #B42318; }
:root[data-theme="dark"] { --gc-error: #FF9C8F; }

#gc-app [hidden] { display: none !important; }

/* Headline */
.gc-h1 {
  font-weight: 600;
  font-size: clamp(29px, 8.4vw, 54px); line-height: 1.08; letter-spacing: -0.035em; max-width: 880px;
}
.gc-h1 .mark { padding: 0 8px; }

/* Form */
.gc-form { max-width: 760px; }
.gc-form-time { margin: 0 0 20px; }
.gc-form-title { margin-bottom: 4px; font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
/* No divider line between the intro and the form on this page */
:root[data-theme="dark"] main > section#gc-section { border-top: 0; }
/* ...and the background rings fade out there instead of stopping in a straight edge */
main > .page-head > .rings { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 92%); mask-image: linear-gradient(to bottom, #000 55%, transparent 92%); }
.gc-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.gc-group legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.gc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-chip { position: relative; display: inline-flex; }
.gc-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gc-chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.2; transition: background-color .15s ease, border-color .15s ease;
}
.gc-chip:hover span { border-color: var(--muted); }
.gc-chip input:checked + span { background: var(--highlight); border-color: var(--accent); font-weight: 500; }
.gc-chip input:checked + span::before { content: "\2713"; color: var(--accent); font-weight: 600; }
.gc-chip input:focus-visible + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--highlight); }
.gc-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 24px; }
.gc-error { margin-top: 16px; color: var(--gc-error); font-size: 15px; font-weight: 500; }
.gc-invalid { border-color: var(--gc-error) !important; }

/* Loading: the FOCAL rings gently pulsing */
.gc-loading {
  max-width: 760px; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 56px 24px;
}
.gc-mark { width: 104px; height: 104px; margin-bottom: 12px; }
.gc-mark .r { fill: none; stroke: var(--ring); stroke-linecap: round; }
.gc-mark .c { fill: var(--mark-centre); }
.gc-mark .gc-r1, .gc-mark .gc-r2, .gc-mark .gc-r3 {
  transform-box: fill-box; transform-origin: center; animation: gc-pulse 2.4s ease-in-out infinite;
}
.gc-mark .gc-r2 { animation-delay: .3s; }
.gc-mark .gc-r3 { animation-delay: .6s; }
@keyframes gc-pulse {
  0%, 100% { opacity: .9; transform: scale(1); }
  50% { opacity: .2; transform: scale(.92); }
}
.gc-loading-msg { font-size: 19px; font-weight: 500; color: var(--text); transition: opacity .3s ease; }
.gc-loading-msg.gc-fade { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .gc-mark .gc-r1, .gc-mark .gc-r2, .gc-mark .gc-r3 { animation: none; }
  .gc-loading-msg { transition: none; }
}

/* Results */
.gc-results-title { max-width: 880px; overflow-wrap: anywhere; }
.gc-label { margin-bottom: 8px; color: var(--accent); font-size: 15px; font-weight: 500; }
.gc-results-title, .gc-thanks, .gc-form, .gc-loading { scroll-margin-top: 96px; }
.gc-results-title:focus { outline: none; }
.gc-site { color: var(--accent); }
.gc-note { margin-top: 12px; }
.gc-summary { margin-top: 18px; padding: 16px 18px; background: var(--featured-bg); }
.gc-summary p { color: var(--text); font-size: 15px; line-height: 1.5; }
.gc-sub { margin: 24px 0 12px; }
/* Compact on phones, so "Your top 3 potential leaks" shows without much scrolling */
@media (max-width: 639px) {
  .gc-results-title { font-size: 25px; }
}
.gc-cards .card { gap: 8px; }
.gc-cards .tag { align-self: flex-start; }
.gc-cards .h3 { margin: 6px 0 0; } /* no default heading gap under the title */
.gc-impact { margin-top: 4px; color: var(--accent) !important; font-weight: 500; font-size: 14px !important; }

/* "Get my full report": a button that stays on screen with the results, and its pop-up form */
.gc-float {
  position: fixed; z-index: 55; left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
}
.gc-float .btn { width: 100%; min-height: 52px; padding-left: 8px; padding-right: 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; box-shadow: 0 10px 30px rgba(10, 14, 24, 0.25); }
@media (min-width: 640px) {
  .gc-float { left: 50%; right: auto; transform: translateX(-50%); bottom: 24px; }
  .gc-float .btn { width: auto; padding-left: 28px; padding-right: 28px; }
}
html.menu-lock .gc-float { display: none; }
/* While it shows: the Ask FOCAL button steps aside, with room left under the footer so no links are covered */
body:has(#gc-results:not([hidden]) .gc-float:not([hidden])) .ask { display: none; }
body:has(#gc-results:not([hidden]) .gc-float:not([hidden])) { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.gc-report-form { display: grid; gap: 14px; margin-top: 18px; }
.gc-report-form .btn { width: 100%; }
.gc-report-form .gc-error { margin-top: 0; }
.gc-report-form .btn[disabled] { opacity: .7; cursor: progress; }
/* Phones: tighten the pop-up so the send button is on screen without scrolling */
@media (max-width: 639px) {
  .gc-dialog { max-height: 94vh; max-height: 94dvh; }
  .gc-dialog .calc-head { padding: 14px 0 8px; }
  .gc-dialog > p { font-size: 15px; line-height: 1.45; }
  .gc-report-form { gap: 10px; margin-top: 12px; }
  .gc-report-form .cf-field { gap: 4px; }
  .gc-report-form .cf-field input { min-height: 46px; padding-top: 10px; padding-bottom: 10px; }
}

/* Estimated leak: one big number at the top of the result */
.gc-estimate { margin-top: 14px; }
.gc-estimate-label { font-weight: 500; font-size: 14px; color: var(--accent); }
.gc-estimate-value { margin: 2px 0 4px; font-size: clamp(34px, 9vw, 48px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.gc-estimate-value small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.gc-estimate .small { font-size: 13px; line-height: 1.45; }

/* Mobile field helper */
.gc-help { line-height: 1.45; }

/* Newsletter opt-in (optional, unticked) */
.gc-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--muted); }
.gc-check input { flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); cursor: pointer; }
.gc-privacy { margin-top: -2px; }

/* After they request the report */
.gc-thanks { margin-top: 32px; padding: 28px; }
.gc-thanks p { color: var(--text); font-size: 19px; line-height: 1.5; font-weight: 500; }
.gc-thanks:focus { outline: none; }

/* Final buttons */
.gc-next { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.gc-next .btns { margin-top: 0; }
.gc-fine { margin-top: 16px; }
@media (max-width: 520px) {
  .gc-next .btns .btn { width: 100%; }
}

/* Hint under the two number questions */
.gc-guess { margin: -10px 0 0; }
