/*
Theme Name:   Divi Child — Wealth Management
Theme URI:    https://example.com
Description:  Divi 5 child theme for the RJ Greenwood build.
Author:       Reach Media and Design
Author URI:   https://example.com
Template:     Divi
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  rj-divi-child
*/

/* ============================================================
   GLOBAL TOKENS
   ============================================================ */
:root{
  --rj-forest:#1B362B;
  --rj-forest-deep:#12241C;
  --rj-sage:#F4F6F0;
  --rj-sand:#E2DDD0;
  --rj-gold:#B59351;
  --rj-ink:#111111;
  --rj-ink-muted:#5A6560;
  --rj-paper:#FFFFFF;
  --rj-hairline:rgba(27,54,43,.14);
  --rj-accent:#2F6B4F;
  --rj-muted:#5A6560;
  --rj-line:rgba(27,54,43,.14);

  --rj-radius:16px;
  --rj-shadow-sm:0 1px 2px rgba(17,17,17,.04), 0 8px 24px -18px rgba(17,17,17,.25);
  --rj-shadow-md:0 18px 44px -26px rgba(17,17,17,.38);
  --rj-ease:cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   TYPE
   ============================================================ */
.rj-page h1,.rj-page h2,.rj-page h3,.rj-page h4{
  font-family:"Playfair Display",Georgia,serif;
  font-weight:500; letter-spacing:-.01em; line-height:1.12;
}
.rj-page p,.rj-page li,.rj-page a{
  font-family:"Inter",system-ui,-apple-system,sans-serif;
}
.rj-accent em,.rj-accent-green em{ font-style:italic; }
.rj-accent em{ color:var(--rj-gold); }
.rj-accent-green em{ color:#2F6B4F; }

.rj-eyebrow p,.rj-eyebrow{
  font-size:12px; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:var(--rj-forest);
}

.rj-arrow a,.rj-arrow{
  display:inline-flex; align-items:center; gap:10px;
  font-weight:700; font-size:14px; color:var(--rj-forest);
  text-decoration:none; padding-bottom:6px;
  border-bottom:1px solid var(--rj-hairline);
  transition:gap .3s var(--rj-ease), border-color .3s var(--rj-ease);
}
.rj-arrow a::after,.rj-arrow::after{ content:"→"; transition:transform .3s var(--rj-ease); }
.rj-arrow a:hover,.rj-arrow:hover{ gap:16px; border-color:var(--rj-forest); }

/* ============================================================
   ACCESSIBILITY + MOTION FLOOR
   ============================================================ */
.rj-page a:focus-visible,
.rj-page button:focus-visible{
  outline:2px solid var(--rj-gold); outline-offset:3px; border-radius:2px;
}
@media (prefers-reduced-motion:reduce){
  .rj-page *,.rj-page *::before,.rj-page *::after{
    transition-duration:.01ms !important; animation-duration:.01ms !important;
  }
}

/* ============================================================
   MOBILE MENU CTA
   Requires a menu item with the CSS class  nav-cta
   (Appearance → Menus → Screen Options → CSS Classes)
   ============================================================ */
@media (min-width: 981px) {
  .rj-header li.nav-cta { display: none; }
}
@media (max-width: 980px) {
  .rj-header .et_pb_menu__logo-wrapper { margin-left: 22px; }
  .rj-header .et_pb_menu__icon,
  .rj-header .et_mobile_nav_menu      { margin-right: 22px; }

  .rj-header .et_mobile_menu li.nav-cta {
    border-bottom: none;
    padding: 20px 16px 24px;
  }
  .rj-header .et_mobile_menu li.nav-cta > a {
    display: block; width: 100%; box-sizing: border-box;
    background: #FFFFFF; color: #1B362B !important;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 15px; font-weight: 700; text-align: center;
    text-decoration: none; padding: 16px 24px; border-radius: 999px;
    transition: background .25s cubic-bezier(.22,.61,.36,1);
  }
  .rj-header .et_mobile_menu li.nav-cta > a:hover,
  .rj-header .et_mobile_menu li.nav-cta > a:focus-visible { background: #E2DDD0; }
}

.rj-hidden { display: none !important; }


/* ============================================================
   RETIREMENT QUIZ — complete stylesheet
   Part 1: the Gravity Forms quiz (questions, progress, buttons)
   Part 2: the page 8 results and scheduling block
   Paste into the child theme style.css.
   ============================================================ */

/* ============================================================
   PART 1 — THE FORM
   ============================================================ */

.rj-quiz {
  --rj-forest: #1B362B;
  --rj-forest-deep: #12241C;
  --rj-accent: #2F6B4F;
  --rj-sage: #F4F6F0;
  --rj-sand: #E2DDD0;
  --rj-gold: #B59351;
  --rj-ink: #111111;
  --rj-muted: #5A6560;
  --rj-line: rgba(27, 54, 43, .14);
  --rj-warn: #8C4A3F;              /* muted brick, replaces GF's bright red */
  --rj-warn-bg: #FBF3F1;
}

/* ---------- layout stability ----------
   The form's column uses align-items:center, which shrink-wraps the module
   holding the shortcode. Explicit widths override that without touching the
   Divi layout, and also stop GF's wrapper collapsing on first paint.        */
.rj-quiz,
.rj-quiz.et_pb_module,
.rj-quiz .et_pb_text_inner,
.rj-quiz .gform_wrapper,
.rj-quiz .gform_wrapper form,
.rj-quiz .gform_body,
.rj-quiz .gform_page,
.rj-quiz .gform_fields,
.rj-quiz .gfield {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  align-self: stretch !important;
}
.rj-quiz > p { margin: 0; }          /* the shortcode sits inside a <p> */
.rj-quiz .gform_fields { display: block !important; }
.rj-quiz .gfield { grid-column: 1 / -1 !important; }
/* the confidentiality + disclosure notes below the form stay centred */
.rj-quiz-note, .rj-quiz-note p { text-align: center; }

/* ---------- kill GF's chrome we don't want ---------- */
.rj-quiz .gform_required_legend { display: none; }
.rj-quiz .gfield_required { display: none; }        /* every question is required */
.rj-quiz .gform_heading { display: none; }

/* ---------- progress ---------- */
.rj-quiz .gf_progressbar_wrapper { position: relative; margin: 0 0 26px; }
.rj-quiz .gf_progressbar_title {
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px; font-weight: 600; color: var(--rj-muted);
  margin: 0 0 10px; padding: 0;
}
.rj-quiz .gf_progressbar {
  background: rgba(27, 54, 43, .12);
  border-radius: 999px; height: 3px; overflow: hidden; padding: 0;
  box-shadow: none;
}
.rj-quiz .gf_progressbar_percentage {
  background: var(--rj-accent) !important;
  height: 3px; border-radius: 999px;
  transition: width .45s cubic-bezier(.22, .61, .36, 1);
}
.rj-quiz .gf_progressbar_percentage span {   /* GF prints "14%" inside the fill */
  position: absolute; right: 0; top: -30px;
  font-family: Inter, sans-serif; font-size: 13px; font-weight: 600;
  color: var(--rj-accent); background: none; padding: 0;
}

/* ---------- the card ---------- */
.rj-quiz .gform_page,
.rj-quiz .gform_body > .gform_fields {
  background: #fff;
  border: 1px solid var(--rj-line);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 1px 2px rgba(17,17,17,.03), 0 18px 40px -30px rgba(17,17,17,.30);
}
@media (max-width: 767px) {
  .rj-quiz .gform_page,
  .rj-quiz .gform_body > .gform_fields { padding: 26px 20px; border-radius: 12px; }
}

/* ---------- question heading ---------- */
.rj-quiz .gfield_label,
.rj-quiz .gform_wrapper.gravity-theme .gfield_label,
.rj-quiz legend.gfield_label {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 600; line-height: 1.25;
  color: var(--rj-forest);
  margin: 0 0 24px; display: block;
}

/* ---------- radio cards ---------- */
.rj-quiz .gfield_radio,
.rj-quiz .gform_wrapper .gfield_radio {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 12px; width: 100%;
}
/* GF's theme sizes the choice wrapper to its content — override to full width */
.rj-quiz .gfield_radio .gchoice,
.rj-quiz .gform_wrapper .gfield_radio .gchoice {
  margin: 0; padding: 0; position: relative;
  display: block; width: 100%; max-width: 100%; flex: 0 0 auto;
}

.rj-quiz .gfield_radio input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0; margin: 0;
}

.rj-quiz .gfield_radio label,
.rj-quiz .gform_wrapper .gfield_radio label {
  display: flex; align-items: center; gap: 14px;
  width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 17px 22px;
  border: 1px solid var(--rj-line);
  border-radius: 10px;
  background: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--rj-ink);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

/* the circle */
.rj-quiz .gfield_radio label::before {
  content: ""; flex: 0 0 auto;
  width: 19px; height: 19px; border-radius: 999px;
  border: 1.5px solid rgba(27, 54, 43, .28);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.rj-quiz .gfield_radio label:hover {
  border-color: rgba(47, 107, 79, .45);
  background: rgba(244, 246, 240, .6);
}

/* selected */
.rj-quiz .gfield_radio input[type="radio"]:checked + label {
  border-color: var(--rj-accent);
  background: rgba(47, 107, 79, .06);
  box-shadow: 0 0 0 1px var(--rj-accent) inset;
}
.rj-quiz .gfield_radio input[type="radio"]:checked + label::before {
  border-color: var(--rj-accent);
  border-width: 6px;
}

/* keyboard focus */
.rj-quiz .gfield_radio input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--rj-gold);
  outline-offset: 3px;
}

/* ---------- footer / buttons ---------- */
.rj-quiz .gform_page_footer,
.rj-quiz .gform_footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 30px 0 0; padding: 26px 0 0;
  border-top: 1px solid var(--rj-line);
}

.rj-quiz .gform_next_button,
.rj-quiz .gform_button,
.rj-quiz input[type="submit"] {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  background: var(--rj-forest) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 14px 32px !important;
  cursor: pointer;
  transition: background .22s ease, transform .22s ease;
  margin-left: auto;          /* pushes Next to the right */
}
.rj-quiz .gform_next_button:hover,
.rj-quiz .gform_button:hover {
  background: var(--rj-forest-deep) !important;
}

.rj-quiz .gform_previous_button,
.rj-quiz .gform_wrapper .gform_previous_button,
.rj-quiz .gform_wrapper.gravity-theme .gform_page_footer .gform_previous_button,
.rj-quiz input.gform_previous_button,
.rj-quiz button.gform_previous_button {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: none !important;
  background-color: transparent !important;
  color: var(--rj-muted) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  cursor: pointer;
  order: -1;
  text-decoration: none;
}
.rj-quiz .gform_previous_button:hover,
.rj-quiz .gform_wrapper .gform_previous_button:hover {
  color: var(--rj-forest) !important;
  background: none !important;
  text-decoration: underline;
  text-underline-offset: 5px;
}
/* input elements can't take ::before, so prefix the arrow in the button label
   instead: set the Previous Button text to  \u2190 Back  in Form Settings */

/* last page: no submit — results are the destination */
.rj-quiz .gform_button[type="submit"],
.rj-quiz input[type="submit"].gform_button,
.rj-quiz .gform_footer input[type="submit"],
.rj-quiz .gform_page_footer input[type="submit"],
.rj-quiz .gform_page_footer button[type="submit"] {
  display: none !important;
}
/* the Next buttons are .gform_next_button, so hiding submit outright is safe */

/* ---------- validation, de-reddened ---------- */
.rj-quiz .gform_validation_errors {
  background: var(--rj-warn-bg) !important;
  border: 1px solid rgba(140, 74, 63, .22) !important;
  border-left: 3px solid var(--rj-warn) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 18px 22px !important;
  margin: 0 0 22px !important;
}
.rj-quiz .gform_validation_errors > h2,
.rj-quiz .gform_validation_errors > h2.gform_submission_error {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 14px !important; font-weight: 600 !important;
  color: var(--rj-warn) !important;
  margin: 0 !important;
}
.rj-quiz .gform_validation_errors > h2 .gform-icon { display: none; }
.rj-quiz .gform_validation_errors ol,
.rj-quiz .gform_validation_errors ul { margin: 8px 0 0 0; padding-left: 18px; }
.rj-quiz .gform_validation_errors a {
  color: var(--rj-warn) !important;
  font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}

.rj-quiz .gfield_validation_message,
.rj-quiz .validation_message {
  background: none !important;
  border: 0 !important;
  border-left: 2px solid var(--rj-warn) !important;
  border-radius: 0 !important;
  padding: 2px 0 2px 12px !important;
  margin: 0 0 16px !important;
  font-family: Inter, sans-serif !important;
  font-size: 13px !important;
  color: var(--rj-warn) !important;
}

.rj-quiz .gfield_error .gfield_label { color: var(--rj-forest) !important; }
.rj-quiz .gfield_error { background: none !important; border: 0 !important; padding: 0 !important; }

/* ---------- hide the calculated score field ---------- */
.rj-hidden, .rj-quiz .rj-hidden { display: none !important; }


/* ============================================================
   PART 2 — RESULTS (page 8)
   ============================================================ */

/* ---------- quiz results ---------- */
.rj-result { max-width: 640px; margin: 0 auto; }
.rj-result__eyebrow {
  font-family: Inter, sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rj-accent); margin: 0 0 10px;
}
.rj-result__title {
  font-family: "Playfair Display", Georgia, serif; font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15;
  color: var(--rj-forest); margin: 0 0 8px;
}
.rj-result__sub {
  font-family: Inter, sans-serif; font-size: 17px;
  color: var(--rj-muted); margin: 0 0 24px;
}
.rj-result__body {
  font-family: Inter, sans-serif; font-size: 16px; line-height: 1.75;
  color: var(--rj-muted); margin: 0 0 28px;
}
.rj-result__steps-label {
  font-family: Inter, sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rj-muted); margin: 0 0 14px;
}
.rj-result__steps,
.rj-quiz .rj-result__steps,
.rj-quiz ol.rj-result__steps {
  counter-reset: rjstep;
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 0 28px !important;
}
.rj-result__steps li,
.rj-quiz .rj-result__steps li {
  list-style: none !important;
  list-style-type: none !important;
}
.rj-result__steps li::marker,
.rj-quiz .rj-result__steps li::marker { content: none; }
.rj-result__steps li {
  counter-increment: rjstep; position: relative; padding-left: 38px;
  margin: 0 0 14px; font-family: Inter, sans-serif; font-size: 15px;
  line-height: 1.6; color: var(--rj-ink);
}
.rj-result__steps li::before {
  content: counter(rjstep); position: absolute; left: 0; top: -1px;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--rj-accent); color: #fff;
  font-size: 12px; font-weight: 700; text-align: center; line-height: 24px;
}
.rj-result__link a {
  font-family: Inter, sans-serif; font-size: 14px; font-weight: 700;
  color: var(--rj-forest); text-decoration: underline;
  text-underline-offset: 6px; text-decoration-thickness: 1px;
}

/* ---------- scheduling block ---------- */
.rj-result__next {
  max-width: 640px; margin: 40px auto 0; padding: 32px;
  background: #fff; border: 1px solid var(--rj-line); border-radius: 16px;
}
.rj-result__next-title {
  font-family: "Playfair Display", Georgia, serif; font-weight: 600;
  font-size: 22px; color: var(--rj-forest); margin: 0 0 8px;
}
.rj-result__next-copy {
  font-family: Inter, sans-serif; font-size: 15px; line-height: 1.7;
  color: var(--rj-muted); margin: 0 0 22px;
}
.rj-result__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.rj-btn {
  display: inline-block; font-family: Inter, sans-serif; font-size: 14px;
  font-weight: 600; padding: 13px 26px; border-radius: 999px;
  text-decoration: none; transition: background .25s ease;
}
.rj-btn--solid { background: var(--rj-forest); color: #fff !important; }
.rj-btn--solid:hover { background: var(--rj-forest-deep); }
.rj-btn--ghost {
  background: transparent; color: var(--rj-forest) !important;
  border: 1px solid var(--rj-forest);
}
.rj-btn--ghost:hover { background: rgba(27,54,43,.05); }
.rj-result__hours {
  font-family: Inter, sans-serif; font-size: 13px; color: var(--rj-muted); margin: 0;
}
.rj-result__disclosure {
  font-family: Inter, sans-serif; font-size: 11px; line-height: 1.7;
  color: #8A928E; margin: 22px 0 0;
  padding-top: 18px; border-top: 1px solid rgba(27,54,43,.10);
}
@media (max-width: 767px) {
  .rj-result__next { padding: 24px 20px; }
  .rj-btn { width: 100%; text-align: center; }
}