/* Applicant controls for matching (goals.js): goals, experience, alerts.
   Uses the Daylight tokens set in jobs.css. Everything is scoped under .gl, which each mount adds to its container.
   Phone first (375px wide): one column, 44px touch targets with 8px between them, 16px form text so iOS never zooms,
   nothing that needs hover. Wider screens get two-column grids and inline option rows. */
.gl { display: grid; gap: 16px; min-width: 0; font-size: 15px; line-height: 1.5 }
.gl > div, .gl > form { display: grid; gap: 16px; min-width: 0 }
.gl .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.gl h3 { font-size: 18px; margin: 8px 0 0; line-height: 1.3 }
.gl q { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.5; quotes: "“" "”"; overflow-wrap: anywhere }
.gl small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45 }
.gl .note { font-size: 14px; line-height: 1.5 }
.gl .gl-lede { font-size: 16px; line-height: 1.5; color: var(--ink); margin: 0 }
.gl p { margin: 0 }
.gl input[type=text], .gl input[type=number], .gl select, .gl textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--ink); font-size: 16px; font-family: inherit }
.gl select { padding-right: 32px }
.gl input:focus-visible, .gl select:focus-visible, .gl textarea:focus-visible, .gl button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.gl details > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink-2); min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.gl details[open] > summary { margin-bottom: 8px }
.gl details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px }
.gl .callout { margin: 0 }
.gl .linkish { min-height: 44px; font-size: 14px; display: inline-flex; align-items: center }
.gl .ghost, .gl .btn { min-height: 44px }
.gl-reset { justify-self: start }
.gl .chip { white-space: normal; overflow-wrap: anywhere }

/* a large switch row: a checkbox with a bold label and an optional line under it */
.gl .gl-switch { display: flex; gap: 12px; align-items: flex-start; min-height: 52px; border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; background: var(--surface); color: var(--ink); cursor: pointer }
.gl .gl-switch input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent) }
.gl .gl-switch > span { display: grid; gap: 2px; min-width: 0; font-size: 15px }
.gl .gl-switch > span b { font-weight: 600 }
.gl .gl-switch:has(input:checked) { border-color: var(--accent); background: var(--accent-soft) }
.gl .gl-switch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px }

/* sections with a Must have / Nice to have switch */
.gl-sec { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; min-width: 0 }
.gl-sechead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.gl-sechead h3 { margin: 0 }

/* segmented controls: Must have / Nice to have, Paid / Volunteer, Yes / No / Not stated */
.gl-firm, .gl-seg { display: flex; border: 1.5px solid var(--line-2); border-radius: 99px; padding: 3px; background: var(--surface); gap: 2px }
.gl-firm label, .gl-seg label { position: relative; cursor: pointer; flex: 1 1 0; min-width: 0 }
.gl-firm input, .gl-seg input, .gl-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0 }
.gl-firm span, .gl-seg span { white-space: nowrap; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 4px 14px; border-radius: 99px; font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.2 }
.gl-firm input:checked + span, .gl-seg input:checked + span { background: var(--accent); color: var(--accent-ink) }
.gl-firm input:focus-visible + span, .gl-seg input:focus-visible + span, .gl-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px }
.gl-sechead .gl-firm { width: 100% }   /* phones: full width under the heading */

/* choices: checkboxes and radios drawn as chips, or as full-width rows with a tick box (.rows) */
.gl-choices { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px }
.gl-choices legend { font-size: 15px; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 6px }
.gl-choices legend small { font-weight: 400 }
.gl-opts { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0 }
.gl-opt { position: relative; cursor: pointer; min-width: 0; max-width: 100% }
.gl-opt > span { display: grid; gap: 1px; min-height: 44px; align-content: center; border: 1.5px solid var(--line-2); border-radius: 22px; padding: 8px 16px; background: var(--surface); color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere }
.gl-opt > span b { font-weight: 600 }
.gl-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--ink) }
.gl-choices:not(.rows) .gl-opt input:checked + span b::before { content: "✓ "; color: var(--accent) }
.gl-choices.compact .gl-opt > span { padding: 8px 14px; font-size: 14.5px; border-radius: 99px }
.gl-choices.rows .gl-opts { display: grid; gap: 8px }
.gl-choices.rows .gl-opt > span { position: relative; min-height: 52px; padding: 11px 14px 11px 48px; border-radius: 14px; color: var(--ink) }
.gl-choices.rows .gl-opt > span::before { content: ""; position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; box-sizing: border-box; border: 2px solid var(--line-2); border-radius: 6px; background: var(--surface) }
.gl-choices.rows .gl-opt input[type=radio] + span::before { border-radius: 50% }
.gl-choices.rows .gl-opt input:checked + span::before { border-color: var(--accent); background: var(--accent) }
.gl-choices.rows .gl-opt input[type=checkbox]:checked + span::after { content: ""; position: absolute; left: 21px; top: 50%; width: 6px; height: 11px; margin-top: -8px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) }
.gl-choices.rows .gl-opt input[type=radio]:checked + span::before { box-shadow: inset 0 0 0 4px var(--surface) }

/* typed lists: chips you've picked, a box with Add, tappable suggestions */
.gl-picker { display: grid; gap: 8px; min-width: 0 }
.gl-picked { display: flex; flex-wrap: wrap; gap: 8px }
.gl-picked:empty { display: none }
.gl-picked .act { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; text-align: left; font-size: 15px; border-color: var(--accent); background: var(--accent-soft); color: var(--ink) }
.gl-picked .act span { margin-left: 4px; font-size: 18px; line-height: 1; color: var(--accent-deep) }
.gl-pick-in { display: flex; gap: 8px; min-width: 0 }
.gl-pick-in input { flex: 1 1 auto; min-width: 0 }
.gl-pick-in .ghost { flex: none; min-height: 48px; padding: 0 18px }
.gl-sugs { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface) }
.gl-sugs[hidden] { display: none }
.gl-sug { min-height: 48px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer }
.gl-sug:first-child { border-top: 0 }
.gl-sug:active, .gl-sug:focus-visible { background: var(--bg-2) }

/* "More filters (optional)": rarely useful filters (pay), closed by default */
.gl-more { border-top: 1px solid var(--line); padding-top: 6px; min-width: 0 }
.gl .gl-more > summary { font-size: 16px; color: var(--ink) }
.gl .gl-more > summary .note { font-weight: 400 }
.gl-more .gl-sec { border-top: 0; padding-top: 0 }
.gl-pay [data-pay-warn]:empty { display: none }

/* Save my goals: at the end of the form; while there are unsaved changes it sticks to the bottom of the screen,
   above the phone's bottom nav (base.css .rail, fixed under 760px) */
.gl-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0 }
.gl-save .btn { flex: 1 1 100% }
.gl-save .note:empty { display: none }
.gl-goals.dirty .gl-save { position: sticky; z-index: 5; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow) }
@media (max-width: 760px) { .gl-goals.dirty .gl-save { bottom: calc(82px + env(safe-area-inset-bottom, 0px)) } }

/* experience */
.gl-summary { background: var(--bg-2); border-radius: 16px; padding: 14px; display: grid; gap: 6px }
.gl-roles, .gl-skills, .gl-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px }
.gl-role { border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 14px; background: var(--surface); min-width: 0 }
.gl-role.out { background: var(--unknown); border-style: dashed }
.gl-role.out .gl-rhead b { text-decoration: line-through; color: var(--ink-2) }
.gl-rhead { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere }
.gl-rhead b { font-size: 16px }
.gl-field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 6px; font-size: 15px; font-weight: 600; color: var(--ink) }
.gl-field legend, .gl-flabel { font-size: 15px; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 6px }
.gl-field select, .gl-field input { font-weight: 400 }
.gl-now { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: var(--bg-2); border-radius: 14px; padding: 12px 14px; font-weight: 400 }
.gl-now > div { display: grid; gap: 2px; min-width: 0 }
.gl-now .ghost { flex: none }
.gl-levelpick { font-weight: 400 }
.gl-grid { display: grid; gap: 14px }
.gl-sig { display: flex; flex-wrap: wrap; gap: 6px }
.gl-lines li q { border-left: 3px solid var(--line); padding-left: 10px }
.gl-skills li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px }
.gl-skills li:first-child { border-top: 0; padding-top: 0 }
.gl-skills li > div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere }
.gl-skills .ghost { flex: none; padding: 0 16px }
.gl-removed .linkish { min-height: 44px; padding: 0 4px }
.gl-addskill { display: flex; gap: 8px; min-width: 0 }
.gl-addskill input { flex: 1 1 auto; min-width: 0; width: auto }
.gl-addskill .ghost { flex: none; min-height: 48px; padding: 0 18px }
.gl-cred { display: grid; gap: 16px; max-width: 460px }   /* one field per row: three across left the answers wrapping letter by letter */
.gl-cred select { width: 100% }

/* alerts */
.gl-bands { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0 }
.gl-bands:disabled { opacity: .5 }
.gl-band { border-top: 1px solid var(--line); padding-top: 14px }
.gl-actions { display: grid; gap: 8px }
.gl-preview:empty { display: none }
.gl-preview { display: grid; gap: 10px; min-width: 0 }
.gl-msg { border: 1px dashed var(--line-2); border-radius: 14px; padding: 14px; display: grid; gap: 6px; background: var(--bg-2); min-width: 0; overflow-wrap: anywhere }
.gl-msg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.gl-msg li { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px }
.gl-chips { display: flex; flex-wrap: wrap; gap: 6px }
.gl-msg pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.5 var(--f); margin: 0 }

@media (hover: hover) {
  .gl-opt:hover > span, .gl .gl-switch:hover { border-color: var(--ink) }
  .gl-sug:hover { background: var(--bg-2) }
}
@media (min-width: 700px) {
  .gl-sechead .gl-firm { width: auto }
  .gl-firm label { flex: 0 0 auto }
  .gl-firm span { font-size: 14px; min-height: 40px }
  .gl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start }
  .gl-save .btn { flex: 0 0 auto }
  .gl-actions { display: flex; flex-wrap: wrap }
}

/* denomination: the full list as large wrapping chips; churches that don't say are always included */
.gl-denoms .gl-opts { gap: 8px }
.gl-denoms .gl-opt > span { min-height: 48px; padding: 10px 16px; font-size: 15px; border-radius: 99px }
.gl-denom-note { margin: 4px 0 0 }
