/* ==========================================================================
   Green Pastures • Find Your Starting Point
   Visual layer. Editorial, quiet, pastoral. Self-contained system fonts
   (no web-font CDN) so the tool stays private and works offline.
   Palette is subject-grounded: olive pasture, parchment, restrained antique
   gold, deep ink. Accessibility is first-class, not bolted on.
   ========================================================================== */

:root {
  --paper:   #F7F4EC;   /* parchment field                */
  --white:   #FFFEFB;   /* card surface                   */
  --ink:     #233026;   /* deep evergreen ink for text    */
  --muted:   #6A7369;   /* quiet secondary text           */
  --olive:   #536548;   /* primary olive                  */
  --olive2:  #6E7E63;   /* lighter olive for hover edges  */
  --line:    #D9D6C9;   /* hairlines                      */
  --gold:    #A98242;   /* restrained antique gold accent */
  --gold-dk: #8A6A34;   /* gold for small text (contrast) */
  --soft:    #EFEDE1;   /* soft fill                      */
  --danger:  #7C2D2D;   /* safety pathway                 */

  --shadow: 0 22px 60px rgba(35, 48, 38, .09);

  /* Self-contained, high-quality system stacks — no network fonts. */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
           "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 24px;
  --focus:  0 0 0 3px rgba(83, 101, 72, .35);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 8% -8%, rgba(169, 130, 66, .07), transparent 60%),
    linear-gradient(180deg, #FBFAF6 0%, var(--paper) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a, textarea { font: inherit; }

/* Global, unmistakable keyboard focus. Never removed without replacement. */
:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Shell + header
   -------------------------------------------------------------------------- */
.gp-shell { min-height: 100vh; padding: clamp(20px, 5vw, 64px) 18px; }
.gp-wrap  { max-width: 780px; margin: 0 auto; }

.gp-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; margin-bottom: clamp(22px, 4vw, 40px);
}
.gp-brand {
  font-family: var(--serif); font-size: 17px; letter-spacing: .01em;
  color: var(--ink); display: inline-flex; align-items: center; gap: 10px;
}
.gp-brand .gp-staff { color: var(--gold); display: inline-flex; align-items: center; }
.gp-brand b { font-weight: 400; color: var(--gold-dk); }

.gp-reset {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px;
  min-height: 44px; padding: 0 4px;
}
.gp-reset:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.gp-card {
  background: rgba(255, 254, 251, .96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 6vw, 60px);
  box-shadow: var(--shadow);
}

/* Quiet editorial eyebrow — NOT tracked all-caps. Reads as a pastoral label. */
.gp-kicker {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--gold-dk);
  letter-spacing: .01em; margin-bottom: 14px;
}

h1, h2 {
  font-family: var(--serif); font-weight: 400; line-height: 1.08;
  letter-spacing: -.01em; margin: 0 0 18px; color: var(--ink);
}
h1 { font-size: clamp(38px, 8vw, 66px); }
h2 { font-size: clamp(27px, 5vw, 42px); }

.gp-lead {
  font-family: var(--serif); font-size: clamp(19px, 3vw, 23px);
  line-height: 1.55; color: #3F4B41; max-width: 62ch;
}
.gp-copy { font-size: 16px; line-height: 1.72; color: #4C594F; max-width: 62ch; }
.gp-copy + .gp-copy { margin-top: 14px; }

/* --------------------------------------------------------------------------
   Buttons + actions
   -------------------------------------------------------------------------- */
.gp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.gp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 13px 26px; border-radius: 999px;
  border: 1px solid var(--olive); text-decoration: none; cursor: pointer;
  font-size: 16px; transition: background .18s ease, transform .18s ease,
                                box-shadow .18s ease;
}
.gp-btn-primary   { background: var(--olive); color: #fff; }
.gp-btn-primary:hover { background: #44563C; transform: translateY(-1px); }
.gp-btn-secondary { background: transparent; color: var(--olive); }
.gp-btn-secondary:hover { background: var(--soft); }
.gp-btn:focus-visible { outline: 2px solid var(--gold-dk); outline-offset: 3px; }
.gp-btn .gp-arrow { transition: transform .18s ease; }
.gp-btn:hover .gp-arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Opening verse + privacy
   -------------------------------------------------------------------------- */
.gp-verse {
  margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: 18px; line-height: 1.6; color: #55605A;
  font-style: italic;
}
.gp-verse cite {
  display: block; font-family: var(--sans); font-size: 12px; font-style: normal;
  color: var(--gold-dk); margin-top: 8px; letter-spacing: .05em;
}
.gp-privacy { margin-top: 22px; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* --------------------------------------------------------------------------
   Progress — driven by ASSESSMENT COMPLETENESS, not question count.
   A continuous fill plus four named stages.
   -------------------------------------------------------------------------- */
.gp-progress { margin-bottom: 26px; }
.gp-track {
  height: 4px; background: #E2E0D5; border-radius: 9px; overflow: hidden;
}
.gp-fill {
  height: 100%; width: 8%; background: linear-gradient(90deg, var(--olive2), var(--gold));
  border-radius: 9px; transition: width .5s cubic-bezier(.4, 0, .1, 1);
}
.gp-stages {
  display: flex; justify-content: space-between; gap: 6px;
  margin-top: 10px; font-size: 12px; color: var(--muted);
}
.gp-stages span { flex: 1; text-align: center; transition: color .3s ease; }
.gp-stages span:first-child { text-align: left; }
.gp-stages span:last-child  { text-align: right; }
.gp-stages span.on { color: var(--gold-dk); font-weight: 600; }

/* --------------------------------------------------------------------------
   Question options — statements, not radio buttons
   -------------------------------------------------------------------------- */
.gp-options { display: grid; gap: 10px; margin-top: 26px; }

.gp-option {
  width: 100%; min-height: 44px; text-align: left;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: #FFFEFA; color: var(--ink); cursor: pointer; line-height: 1.4;
  transition: border-color .16s ease, background .16s ease, transform .16s ease,
              box-shadow .16s ease;
  display: flex; align-items: center; gap: 12px;
}
.gp-option:hover {
  border-color: var(--olive2); background: #F5F5EE; transform: translateY(-1px);
}
.gp-option:focus-visible {
  outline: none; border-color: var(--olive);
  box-shadow: var(--focus); background: #F5F5EE;
}
.gp-option[aria-pressed="true"] {
  border-color: var(--olive); background: #EEF0E7;
}
.gp-option .gp-dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--olive2); background: transparent; transition: .16s ease;
}
.gp-option:hover .gp-dot,
.gp-option[aria-pressed="true"] .gp-dot { background: var(--gold); border-color: var(--gold-dk); }
.gp-option small { display: block; color: var(--muted); margin-top: 4px; }

/* multi-select helper row */
.gp-multi-hint { font-size: 13px; color: var(--muted); margin-top: 18px; }
.gp-continue { margin-top: 18px; }

/* --------------------------------------------------------------------------
   Navigation (back / skip)
   -------------------------------------------------------------------------- */
.gp-nav { display: flex; align-items: center; justify-content: space-between;
          gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.gp-back, .gp-skip {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  min-height: 44px; padding: 8px 4px; display: inline-flex; align-items: center; gap: 6px;
}
.gp-back:hover, .gp-skip:hover { color: var(--ink); }
.gp-back[hidden] { visibility: hidden; }

/* --------------------------------------------------------------------------
   Reflection interludes
   -------------------------------------------------------------------------- */
.gp-reflect {
  background: #F3F1E7; border-left: 3px solid var(--gold);
  padding: 16px 20px; margin: 0 0 24px; border-radius: 0 12px 12px 0;
  line-height: 1.65; color: #4E5A50; font-family: var(--serif); font-size: 17px;
}

/* Quiet contextual Scripture inside the flow */
.gp-inline-verse {
  margin: 22px 0 0; padding: 16px 20px; border: 1px solid var(--line);
  border-radius: 14px; background: #FBFAF3;
}
.gp-inline-verse p { margin: 0; font-family: var(--serif); font-style: italic;
  color: #4E5A50; line-height: 1.6; }
.gp-inline-verse cite { display: block; font-style: normal; font-size: 12px;
  color: var(--gold-dk); margin-top: 8px; letter-spacing: .05em; }
.gp-inline-verse .gp-frame { font-style: normal; font-family: var(--sans);
  font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   "Why are we asking this?"
   -------------------------------------------------------------------------- */
.gp-why { margin-top: 16px; }
.gp-why button {
  border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 0;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px;
}
.gp-why button:hover { color: var(--ink); }
.gp-why-body {
  margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.6;
  border-left: 2px solid var(--line); padding-left: 14px;
}


/* --------------------------------------------------------------------------
   Text input (name, optional contact)
   -------------------------------------------------------------------------- */
.gp-input {
  width: 100%; min-height: 48px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px;
  background: #fff; color: var(--ink); line-height: 1.5;
}
.gp-input::placeholder { color: #9AA093; }
.gp-input:focus-visible { outline: none; border-color: var(--olive); box-shadow: var(--focus); }
.gp-input-err { color: var(--danger); font-size: 14px; margin-top: 8px; }

/* --------------------------------------------------------------------------
   Send responses to Shepherds Only
   -------------------------------------------------------------------------- */
.gp-send {
  margin-top: 26px; padding: 20px 22px; border: 1px solid var(--line);
  border-radius: 18px; background: #F5F5EC;
}
.gp-send-lead { margin: 0 0 12px; color: #4C594F; line-height: 1.6; font-size: 15px; }
.gp-send .gp-input { margin-top: 0; max-width: 340px; background: #fff; }
.gp-send-actions { margin-top: 12px; }
.gp-send-alt {
  display: inline-block; margin-top: 10px; font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.gp-send-alt:hover { color: var(--ink); }
.gp-btn-send {
  background: var(--gold-dk); color: #fff; border-color: var(--gold-dk);
}
.gp-btn-send:hover { background: #75581f; transform: translateY(-1px); }
.gp-btn-send:disabled { opacity: .7; cursor: default; transform: none; }
.gp-send-status { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); min-height: 1px; }
.gp-send-status.is-ok  { color: #3E5A38; }
.gp-send-status.is-err { color: var(--danger); }
.gp-send-status a { color: var(--gold-dk); }

/* keep the send block calm inside the safety pathway */
.gp-alert + .gp-note + .gp-send { background: #FBF6F0; border-color: #E3D3C4; }
.gp-summary p { font-family: var(--serif); font-size: clamp(18px, 2.6vw, 21px);
  line-height: 1.62; color: #3F4B41; margin: 0 0 16px; max-width: 64ch; }

.gp-result-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin-top: 26px;
}
.gp-result {
  border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  background: #FFFEFA; display: flex; flex-direction: column;
}
.gp-result h3 { font-family: var(--serif); font-size: 23px; font-weight: 400;
  margin: 0 0 8px; color: var(--ink); }
.gp-result p { color: var(--muted); line-height: 1.58; font-size: 14px; flex: 1; }
.gp-result .gp-btn { margin-top: 18px; width: 100%; }

.gp-single-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Safety pathway */
.gp-alert {
  border: 1px solid #D8B5B5; background: #FFF8F7; border-radius: 18px;
  padding: clamp(22px, 5vw, 32px); margin: 6px 0 22px;
}
.gp-alert h2 { color: var(--danger); }
.gp-alert p { color: #5A4B4B; line-height: 1.7; }
.gp-alert .gp-btn-primary { background: var(--danger); border-color: var(--danger); }
.gp-alert .gp-btn-primary:hover { background: #672424; }

.gp-note {
  padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: #FAF9F3; color: var(--muted); font-size: 13px; line-height: 1.6;
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   Motion + responsive + no-JS
   -------------------------------------------------------------------------- */
.gp-fade { animation: gp-fade .3s ease; }
@keyframes gp-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.gp-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.gp-noscript {
  max-width: 640px; margin: 60px auto; background: #fff; padding: 30px;
  border: 1px solid var(--line); border-radius: 18px; line-height: 1.7;
}

@media (max-width: 640px) {
  .gp-card { border-radius: 18px; }
  .gp-result-grid { grid-template-columns: 1fr; }
  .gp-actions { flex-direction: column; }
  .gp-actions .gp-btn { width: 100%; }
  .gp-single-cta .gp-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (prefers-contrast: more) {
  .gp-option { border-color: var(--olive2); }
  :root { --muted: #545C52; }
}
