/* ============================================================
   Community Christian Spiritual Gifts Assessment — front-end styles
   All scoped under #ccsg-app so the theme can't bleed in.
   BRAND TOKENS: edit the :root block below per deployment.

   Palette (WCAG-checked):
     --primary #0055B8 blue  — white text OK (7.02:1)
     --accent  #00B863 green — DARK text only; white-on-green fails AA (2.61:1)
   Fonts: Montserrat (display) / Fira Sans (body).
   ============================================================ */

#ccsg-app{
  --ink:#060606; --ink-soft:#414141; --muted:#6c6c74;
  --paper:#E5E5E5; --surface:#FFFFFF;
  --primary:#0055B8; --primary-deep:#004496; --primary-tint:#E4EDF9;
  --accent:#00B863; --accent-deep:#00a659; --accent-tint:#E1F6EC;
  --line:#DADEE4;
  --display:"Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body:"Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  font-family:var(--body); color:var(--ink); line-height:1.5;
  -webkit-font-smoothing:antialiased; box-sizing:border-box;

  /* Flow naturally in the page's content column and align to its left edge —
     exactly like the surrounding H1/H2. No viewport breakout (which mis-aligns
     inside constrained/overflow-hidden Beaver Builder columns). */
  width:100%;
  margin:0;
  background:var(--surface);
}
#ccsg-app *{ box-sizing:border-box; }

/* Screens are simple full-width blocks. NO horizontal padding and NO width cap
   here — the Beaver Builder row already constrains content to 1240px and centers
   it, so the assessment must fill 100% of that row, flush to both edges. */
#ccsg-app .ccsg-screen{ display:none; animation:ccsg-rise .35s ease both;
  background:var(--surface); padding:clamp(1.5rem,3vw,2.5rem) 0; }
#ccsg-app .ccsg-screen.ccsg-on{ display:block; }

/* Inner wrapper fills the row completely — no max-width, no side margins. */
#ccsg-app .ccsg-inner{ width:100%; max-width:none; margin:0; padding:0; }

/* HARD GUARANTEE: the app and its structural wrappers always fill 100% of the
   row they're placed in, flush to both edges. !important defeats any cached or
   theme rule that would otherwise indent or center them. Individual content
   blocks (hero, options, card) keep their own readability caps below — those
   are left-aligned, so they don't create side padding. */
#ccsg-app,
#ccsg-app .ccsg-screen,
#ccsg-app .ccsg-inner{
  width:100% !important;
  max-width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
  box-sizing:border-box !important;
}

/* Within the wide column, keep reading and input widths comfortable so text
   and form controls don't stretch the full 1240px. */
#ccsg-app .ccsg-hero{ max-width:none; }
#ccsg-app .ccsg-qtext{ max-width:820px; }
#ccsg-app .ccsg-opts{ max-width:680px; }
#ccsg-app #ccsg-s-intro .ccsg-field,
#ccsg-app .ccsg-results-head{ max-width:680px; }

/* ---- Theme-conflict reset: WordPress themes frequently override heading
   colors and button/link typography with high-specificity selectors.
   Pin our typography on BOTH <button> and <a> so nothing bleeds in. ---- */
#ccsg-app h1, #ccsg-app h2, #ccsg-app h3, #ccsg-app h4{
  font-family:var(--display) !important; color:var(--ink); margin:0;
  text-transform:none !important; letter-spacing:-.01em;
}
#ccsg-app button, #ccsg-app a.ccsg-btn{
  font-family:var(--display) !important; text-transform:none !important;
  text-decoration:none !important; letter-spacing:normal !important;
  line-height:1.2 !important; text-shadow:none !important; box-shadow:none;
}
#ccsg-app a, #ccsg-app a:hover, #ccsg-app a:focus{ text-decoration:none; }

#ccsg-app .ccsg-eyebrow{ font-family:var(--display); font-weight:600; letter-spacing:.14em;
  text-transform:uppercase; font-size:11.5px; color:var(--primary); }

#ccsg-app .ccsg-btn{ font-family:var(--display); font-weight:700; font-size:16px; border:none;
  border-radius:999px; padding:15px 30px; cursor:pointer; background:var(--primary); color:#fff;
  transition:transform .12s ease, background .2s ease; }
#ccsg-app .ccsg-btn:hover{ background:var(--primary-deep); }
#ccsg-app .ccsg-btn:active{ transform:translateY(1px); }
#ccsg-app .ccsg-btn.ccsg-ghost{ background:transparent; color:var(--ink); border:1.5px solid var(--line); }
#ccsg-app .ccsg-btn.ccsg-ghost:hover{ background:#fff; border-color:var(--ink-soft); }
#ccsg-app .ccsg-btn:focus-visible,
#ccsg-app .ccsg-opt:focus-visible{ outline:3px solid var(--primary); outline-offset:2px; }
#ccsg-app .ccsg-btn:disabled{ opacity:.6; cursor:default; }

@keyframes ccsg-rise{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }
@media (prefers-reduced-motion: reduce){ #ccsg-app .ccsg-screen, #ccsg-app .ccsg-screen.ccsg-on{ animation:none; } }

/* INTRO */
#ccsg-app .ccsg-brandmark{ display:flex; align-items:center; margin-bottom:36px; }
#ccsg-app .ccsg-wordmark{ font-family:var(--display); font-weight:800; font-size:16px;
  letter-spacing:.01em; color:var(--primary); }
#ccsg-app .ccsg-hero h1{ font-family:var(--display); font-weight:800; letter-spacing:-.02em;
  font-size:clamp(34px,8vw,54px); line-height:1.05; margin:.15em 0 0; color:var(--ink);
  max-width:none; }
#ccsg-app .ccsg-lede{ font-size:18px; color:var(--ink-soft); max-width:none; margin:20px 0 0; }

/* Keep the headline + lede each on a single line when the row is wide enough
   to hold them at full size; below that they wrap naturally (responsive). */
@media (min-width:1100px){
  #ccsg-app .ccsg-hero h1,
  #ccsg-app .ccsg-lede{ white-space:nowrap; }
}
#ccsg-app .ccsg-meta-row{ display:flex; gap:26px; margin:34px 0 26px; }
#ccsg-app .ccsg-meta-row .ccsg-n{ font-family:var(--display); font-weight:700; font-size:24px; color:var(--ink); }
#ccsg-app .ccsg-meta-row .ccsg-l{ font-size:13px; color:var(--muted); }
#ccsg-app .ccsg-field{ margin:0 0 16px; }
#ccsg-app .ccsg-field label{ display:block; font-size:13px; color:var(--muted); margin-bottom:7px; }
#ccsg-app .ccsg-field label span{ opacity:.7; }
#ccsg-app .ccsg-field input,
#ccsg-app .ccsg-field select{ font-family:var(--body); font-size:16px; width:100%; max-width:340px;
  padding:13px 15px; border:1.5px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); }
#ccsg-app .ccsg-field input:focus,
#ccsg-app .ccsg-field select:focus{ outline:none; border-color:var(--primary); }
#ccsg-app #ccsg-start{ margin-top:12px; }

/* QUESTIONS */
#ccsg-app .ccsg-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
#ccsg-app .ccsg-count{ font-family:var(--display); font-weight:600; font-size:13px; color:var(--muted); }
#ccsg-app .ccsg-bar{ height:6px; background:var(--primary-tint); border-radius:99px; overflow:hidden; margin-bottom:44px; }
#ccsg-app .ccsg-bar > i{ display:block; height:100%; width:0; background:var(--primary);
  border-radius:99px; transition:width .35s cubic-bezier(.4,0,.2,1); }
#ccsg-app .ccsg-qtext{ font-family:var(--display); font-weight:600; letter-spacing:-.01em;
  font-size:clamp(24px,5.4vw,34px); line-height:1.18; margin:0 0 30px; min-height:2.2em; color:var(--ink); }
#ccsg-app .ccsg-opts{ display:flex; flex-direction:column; gap:10px; }
#ccsg-app .ccsg-opt{ display:flex; align-items:center; gap:14px; width:100%; text-align:left; cursor:pointer;
  font-family:var(--body); font-size:16px; color:var(--ink); background:var(--surface);
  border:1.5px solid var(--line); border-radius:14px; padding:15px 17px;
  transition:border-color .15s ease, background .15s ease; }
#ccsg-app .ccsg-opt:hover{ border-color:var(--primary); }
#ccsg-app .ccsg-opt .ccsg-key{ width:26px; height:26px; border-radius:8px; border:1.5px solid var(--line); flex:0 0 auto;
  display:flex; align-items:center; justify-content:center; font-family:var(--display); font-weight:600;
  font-size:13px; color:var(--muted); background:#fff; transition:.15s; }
#ccsg-app .ccsg-opt.ccsg-sel{ border-color:var(--primary); background:var(--primary-tint); }
#ccsg-app .ccsg-opt.ccsg-sel .ccsg-key{ border-color:var(--primary); background:var(--primary); color:#fff; }
#ccsg-app .ccsg-qnav{ margin-top:26px; }
#ccsg-app .ccsg-qnav .ccsg-btn.ccsg-ghost{ padding:11px 22px; font-size:14px; }

/* RESULTS */
#ccsg-app .ccsg-results-head{ margin-bottom:22px; }
#ccsg-app .ccsg-results-head h2{ font-family:var(--display); font-weight:800; font-size:26px; letter-spacing:-.01em; margin:6px 0 4px; color:var(--ink); }
#ccsg-app .ccsg-results-head p{ color:var(--ink-soft); margin:0; font-size:15px; }

#ccsg-app .ccsg-card{ background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:34px 32px; width:100%; max-width:860px; margin:0; }
#ccsg-app .ccsg-c-eyebrow{ font-family:var(--display); font-weight:700; letter-spacing:.16em; text-transform:uppercase; font-size:11px; color:var(--primary); }
#ccsg-app .ccsg-card h3{ font-family:var(--display); font-weight:800; font-size:28px; letter-spacing:-.01em; margin:6px 0 2px; color:var(--ink); }
#ccsg-app .ccsg-c-sub{ font-size:13px; color:var(--muted); margin-bottom:26px; }

#ccsg-app .ccsg-primary{ display:flex; flex-direction:column; gap:16px; margin-bottom:30px; }
#ccsg-app .ccsg-pg{ display:flex; gap:16px; align-items:flex-start; padding-bottom:16px; border-bottom:1px solid var(--line); }
#ccsg-app .ccsg-pg:last-child{ border-bottom:none; padding-bottom:0; }
#ccsg-app .ccsg-rank{ font-family:var(--display); font-weight:700; font-size:15px; color:#fff; background:var(--primary);
  width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
#ccsg-app .ccsg-pg-body h4{ font-family:var(--display); font-weight:700; font-size:19px; margin:2px 0 4px; letter-spacing:-.01em; color:var(--ink); }
#ccsg-app .ccsg-pg-body .ccsg-ref{ font-size:12px; color:var(--muted); font-weight:600; }
#ccsg-app .ccsg-pg-body p{ margin:7px 0 0; font-size:14.5px; color:var(--ink-soft); line-height:1.45; }
#ccsg-app .ccsg-pg-score{ margin-left:auto; font-family:var(--display); font-weight:700; font-size:15px; color:var(--ink); flex:0 0 auto; }
#ccsg-app .ccsg-pg-score span{ color:var(--muted); font-weight:500; }

#ccsg-app .ccsg-label{ font-family:var(--display); font-weight:600; letter-spacing:.1em; text-transform:uppercase; font-size:10.5px; color:var(--muted); margin-bottom:14px; }
#ccsg-app .ccsg-row{ display:grid; grid-template-columns:118px 1fr 34px; align-items:center; gap:12px; margin-bottom:11px; }
#ccsg-app .ccsg-row .ccsg-g{ font-size:13px; font-weight:500; color:var(--ink); }
#ccsg-app .ccsg-row .ccsg-track{ height:8px; background:var(--primary-tint); border-radius:99px; overflow:hidden; }
#ccsg-app .ccsg-row .ccsg-track > i{ display:block; height:100%; background:var(--primary); border-radius:99px; }
#ccsg-app .ccsg-row .ccsg-v{ font-family:var(--display); font-weight:600; font-size:12px; color:var(--muted); text-align:right; }
#ccsg-app .ccsg-row.ccsg-toprow .ccsg-g{ font-weight:700; }

/* MINISTRY CHART — accent (green) used as a fill with DARK text only.
   Responsive grid so it uses the wider edge-to-edge results layout. */
#ccsg-app .ccsg-ministry{ margin-top:30px; padding-top:24px; border-top:1px solid var(--line); }
#ccsg-app #ccsg-ministry-list{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; }
#ccsg-app .ccsg-ministry-item{ display:flex; flex-direction:column; gap:2px;
  background:var(--accent-tint); border-left:4px solid var(--accent); border-radius:8px;
  padding:12px 15px; margin-bottom:0; }
#ccsg-app .ccsg-ministry-name{ font-family:var(--display); font-weight:700; font-size:15px; color:var(--ink); }
#ccsg-app .ccsg-ministry-why{ font-size:13px; color:var(--ink-soft); }
#ccsg-app .ccsg-ministry-none{ font-size:14px; color:var(--ink-soft); margin:0; }

#ccsg-app .ccsg-card-foot{ margin-top:26px; padding-top:18px; border-top:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; }
#ccsg-app .ccsg-date{ font-size:12px; color:var(--muted); }

/* EMAIL-ME / CONNECT (soft prompt) */
#ccsg-app .ccsg-connect{ margin:26px 0 0; max-width:860px; background:var(--primary-tint); border:1px solid var(--line);
  border-radius:16px; padding:24px 22px; }
#ccsg-app .ccsg-connect h4{ font-family:var(--display); font-weight:700; font-size:18px; color:var(--ink); margin:0 0 6px; }
#ccsg-app .ccsg-connect p{ font-size:14px; color:var(--ink-soft); margin:0 0 16px; }
#ccsg-app .ccsg-connect .ccsg-field input,
#ccsg-app .ccsg-connect .ccsg-field select{ max-width:none; }
#ccsg-app .ccsg-connect .ccsg-btn{ margin-top:4px; }
#ccsg-app .ccsg-connect.ccsg-sent .ccsg-btn{ display:none; }
#ccsg-app .ccsg-connect-msg{ margin-top:12px; font-size:14px; min-height:1.2em; }
#ccsg-app .ccsg-connect-msg.ccsg-ok{ color:var(--accent-deep); font-weight:600; }
#ccsg-app .ccsg-connect-msg.ccsg-err{ color:#b32d2e; font-weight:600; }

/* Honeypot — visually hidden, off-screen, not display:none (bots skip those) */
#ccsg-app .ccsg-hp{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

#ccsg-app .ccsg-actions{ display:flex; gap:12px; flex-wrap:wrap; margin:24px 0 0; max-width:860px; }

@media (max-width:520px){
  #ccsg-app .ccsg-row{ grid-template-columns:96px 1fr 30px; }
  #ccsg-app .ccsg-pg-score{ display:none; }
  #ccsg-app .ccsg-card{ padding:26px 20px; }
}
