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

   Palette (WCAG-checked):
     --primary #1f1f1f near-black — white text OK (16.5:1). Buttons, bars, badges.
     --accent  #e7a538 gold       — DARK text only; white-on-gold fails AA (2.13:1).
                                     Used purely as a fill/highlight with ink text.
     --ink     #000000            — 20:1 on the FAFAFA surface.
     --muted   #5a5a5a            — 6.6:1 on FAFAFA (passes AA).
   Note: gold is never used as button background with white text, and never as
   text on the light surface (2.05:1, fails). It only ever appears as a fill
   behind dark text or as a solid rule/border.
   Fonts: Quincy CF (display) / Greycliff CF (body), with Fraunces / Nunito Sans
   as Google-Fonts fallbacks until the licensed Adobe kit is wired up.
   ============================================================ */

#cccsg-app{
  --ink:#000000; --ink-soft:#1f1f1f; --muted:#5a5a5a;
  --paper:#f1f1f1; --surface:#FAFAFA;
  --primary:#1f1f1f; --primary-deep:#000000; --primary-tint:#dedede;
  --accent:#e7a538; --accent-deep:#c98a1f; --accent-tint:#faedd4;
  --line:#dedede;
  --display:"Quincy CF", "Fraunces", Georgia, "Times New Roman", serif;
  --body:"Greycliff CF", "Nunito 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);
}
#cccsg-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. */
#cccsg-app .cccsg-screen{ display:none; animation:cccsg-rise .35s ease both;
  background:var(--surface); padding:clamp(1.5rem,3vw,2.5rem) 0; }
#cccsg-app .cccsg-screen.cccsg-on{ display:block; }

/* Inner wrapper fills the row completely — no max-width, no side margins. */
#cccsg-app .cccsg-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. */
#cccsg-app,
#cccsg-app .cccsg-screen,
#cccsg-app .cccsg-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. */
#cccsg-app .cccsg-hero{ max-width:none; }
#cccsg-app .cccsg-qtext{ max-width:820px; }
#cccsg-app .cccsg-opts{ max-width:680px; }
#cccsg-app #cccsg-s-intro .cccsg-field,
#cccsg-app .cccsg-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. ---- */
#cccsg-app h1, #cccsg-app h2, #cccsg-app h3, #cccsg-app h4{
  font-family:var(--display) !important; color:var(--ink); margin:0;
  text-transform:none !important; letter-spacing:-.01em;
}
#cccsg-app button, #cccsg-app a.cccsg-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;
}
#cccsg-app a, #cccsg-app a:hover, #cccsg-app a:focus{ text-decoration:none; }

#cccsg-app .cccsg-eyebrow{ font-family:var(--body); font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; font-size:11.5px; color:var(--ink-soft);
  display:inline-block; border-bottom:2px solid var(--accent); padding-bottom:4px; }

#cccsg-app .cccsg-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; }
#cccsg-app .cccsg-btn:hover{ background:var(--primary-deep); }
#cccsg-app .cccsg-btn:active{ transform:translateY(1px); }
#cccsg-app .cccsg-btn.cccsg-ghost{ background:transparent; color:var(--ink); border:1.5px solid var(--line); }
#cccsg-app .cccsg-btn.cccsg-ghost:hover{ background:#fff; border-color:var(--ink-soft); }
#cccsg-app .cccsg-btn:focus-visible,
#cccsg-app .cccsg-opt:focus-visible{ outline:3px solid var(--primary); outline-offset:2px; }
#cccsg-app .cccsg-btn:disabled{ opacity:.6; cursor:default; }

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

/* INTRO */
#cccsg-app .cccsg-brandmark{ display:flex; align-items:center; margin-bottom:36px; }
#cccsg-app .cccsg-wordmark{ font-family:var(--display); font-weight:800; font-size:16px;
  letter-spacing:.01em; color:var(--primary); }
#cccsg-app .cccsg-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:15ch; overflow-wrap:break-word; }
#cccsg-app .cccsg-lede{ font-size:18px; color:var(--ink-soft); max-width:52ch; margin:20px 0 0; }

/* The hero headline and lede wrap naturally at every width. (An earlier build
   forced them onto single no-wrap lines above 1100px; with this church's longer
   headline that overflowed narrow rows, so wrapping is the correct behavior.) */
#cccsg-app .cccsg-meta-row{ display:flex; gap:26px; margin:34px 0 26px; }
#cccsg-app .cccsg-meta-row .cccsg-n{ font-family:var(--display); font-weight:700; font-size:24px; color:var(--ink); }
#cccsg-app .cccsg-meta-row .cccsg-l{ font-size:13px; color:var(--muted); }
#cccsg-app .cccsg-field{ margin:0 0 16px; }
#cccsg-app .cccsg-field label{ display:block; font-size:13px; color:var(--muted); margin-bottom:7px; }
#cccsg-app .cccsg-field label span{ opacity:.7; }
#cccsg-app .cccsg-field input,
#cccsg-app .cccsg-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); }
#cccsg-app .cccsg-field input:focus,
#cccsg-app .cccsg-field select:focus{ outline:none; border-color:var(--primary); }
#cccsg-app #cccsg-start{ margin-top:12px; }

/* QUESTIONS */
#cccsg-app .cccsg-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
#cccsg-app .cccsg-count{ font-family:var(--display); font-weight:600; font-size:13px; color:var(--muted); }
#cccsg-app .cccsg-bar{ height:6px; background:var(--primary-tint); border-radius:99px; overflow:hidden; margin-bottom:44px; }
#cccsg-app .cccsg-bar > i{ display:block; height:100%; width:0; background:var(--primary);
  border-radius:99px; transition:width .35s cubic-bezier(.4,0,.2,1); }
#cccsg-app .cccsg-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); overflow-wrap:break-word; }
#cccsg-app .cccsg-opts{ display:flex; flex-direction:column; gap:10px; }
#cccsg-app .cccsg-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; }
#cccsg-app .cccsg-opt:hover{ border-color:var(--primary); }
#cccsg-app .cccsg-opt .cccsg-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; }
#cccsg-app .cccsg-opt.cccsg-sel{ border-color:var(--primary); background:var(--primary-tint); }
#cccsg-app .cccsg-opt.cccsg-sel .cccsg-key{ border-color:var(--primary); background:var(--primary); color:#fff; }
#cccsg-app .cccsg-qnav{ margin-top:26px; }
#cccsg-app .cccsg-qnav .cccsg-btn.cccsg-ghost{ padding:11px 22px; font-size:14px; }

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

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

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

#cccsg-app .cccsg-label{ font-family:var(--display); font-weight:600; letter-spacing:.1em; text-transform:uppercase; font-size:10.5px; color:var(--muted); margin-bottom:14px; }
#cccsg-app .cccsg-row{ display:grid; grid-template-columns:118px 1fr 34px; align-items:center; gap:12px; margin-bottom:11px; }
#cccsg-app .cccsg-row .cccsg-g{ font-size:13px; font-weight:500; color:var(--ink); }
#cccsg-app .cccsg-row .cccsg-track{ height:8px; background:var(--primary-tint); border-radius:99px; overflow:hidden; }
#cccsg-app .cccsg-row .cccsg-track > i{ display:block; height:100%; background:var(--primary); border-radius:99px; }
#cccsg-app .cccsg-row .cccsg-v{ font-family:var(--display); font-weight:600; font-size:12px; color:var(--muted); text-align:right; }
#cccsg-app .cccsg-row.cccsg-toprow .cccsg-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. */
#cccsg-app .cccsg-ministry{ margin-top:30px; padding-top:24px; border-top:1px solid var(--line); }
#cccsg-app #cccsg-ministry-list{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; }
#cccsg-app .cccsg-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; }
#cccsg-app .cccsg-ministry-name{ font-family:var(--display); font-weight:700; font-size:15px; color:var(--ink); }
#cccsg-app .cccsg-ministry-why{ font-size:13px; color:var(--ink-soft); }
#cccsg-app .cccsg-ministry-none{ font-size:14px; color:var(--ink-soft); margin:0; }

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

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

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

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

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