/* ===== Driver eligibility check =====
   Layout: questions column + sticky answer summary. Everything is scoped to .qe
   so the hero, "Before you start" card and step cards above are untouched. */
.qe {
  --qe-card: #0b1c14;
  --qe-sub: #12241b;
  --qe-line: #2b4237;
  --qe-line-soft: rgba(255,255,255,.08);
  --qe-control: #71867b;
  --qe-text: #f3f6f4;
  --qe-muted: #b9c4bf;
  --qe-yellow: #f4f40c;
  --qe-yellow-wash: rgba(244,244,12,.09);
  --qe-amber: #f2d27c;
  --qe-error: #ffb4b4;
  --qe-ok: #8fe3ad;
  --qe-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: none;
  max-width: 1120px;
  margin: 6px auto 0;
  padding: 30px 0 0;
  border-top: 1px solid var(--sp-border);
  color: var(--qe-text);
  font-family: var(--qe-font);
  font-size: 15px;
  line-height: 1.5;
}
.qe.open { display: block; }
.qe { scroll-margin-top: 120px; }
.qe *, .qe *::before, .qe *::after { box-sizing: border-box; }
.qe [hidden] { display: none !important; }
.qe :where(h2,h3,h4,p) { text-shadow: none; }

.qe-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 20px; }
.qe-head h2 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; color: #fff; text-wrap: balance; }
.qe-head p { max-width: 440px; margin: 0 0 3px; font-size: 14.5px; line-height: 1.5; color: var(--qe-muted); }

.qe-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; align-items: start; }

/* Questions panel */
.qe-panel { background: rgba(11,28,20,.97); border: 1px solid var(--qe-line); border-radius: 10px; padding: 22px 26px 6px; min-width: 0; }
.qe-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--qe-line-soft); }
.qe-panel-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.qe-panel-head p { margin: 0; font-size: 13.5px; color: var(--qe-muted); }

.qe-q { padding: 18px 0 20px; border-bottom: 1px solid var(--qe-line-soft); scroll-margin-top: 150px; }
.qe-q:last-of-type { border-bottom: 0; }
.qe-q-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.qe-num { flex: 0 0 26px; height: 26px; display: inline-grid; place-items: center; border: 1.5px solid var(--qe-control); border-radius: 50%; font-size: 12.5px; font-weight: 700; color: var(--qe-muted); font-variant-numeric: tabular-nums; margin-top: -1px; transition: background .15s, border-color .15s, color .15s; }
.qe-q.is-answered .qe-num { background: var(--qe-yellow); border-color: var(--qe-yellow); color: #111; }
.qe-q.is-invalid .qe-num { border-color: var(--qe-error); color: var(--qe-error); }
.qe-q-text { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--qe-text); }
.qe-req { color: var(--qe-yellow); margin-left: 2px; }
.qe-help-wrap { position: relative; display: inline-flex; vertical-align: middle; margin-left: 4px; }
.qe-help { display: inline-grid; place-items: center; width: 32px; height: 32px; min-height: 32px !important; margin: -5px 0; padding: 0; border: 0; background: transparent; color: var(--qe-yellow); font: 700 12px/1 var(--qe-font); cursor: pointer; }
.qe-help span { display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; }
.qe-help[aria-expanded="true"] span { background: var(--qe-yellow); color: #111; }
.qe-nowrap { white-space: nowrap; }
.qe [role="radiogroup"][aria-invalid] { outline: none !important; box-shadow: none !important; }
.qe-note { margin: 12px 0 0 38px; font-size: 13.5px; line-height: 1.5; color: #aab7b0; }
.qe-note strong { color: var(--qe-yellow); }
.qe-pop { position: fixed; z-index: 50; width: 360px; max-width: calc(100vw - 48px); overflow-y: auto; padding: 18px 20px; background: #0e2219; border: 1px solid var(--qe-control); border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,.55); font-weight: 400; }
.qe-pop h4 { margin: 0 28px 8px 0; font-size: 16px; color: #fff; }
.qe-pop p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #c3cec8; }
.qe-pop p strong { color: var(--qe-yellow); }
.qe-pop a { font-size: 14px; color: var(--qe-yellow); text-underline-offset: 3px; }
.qe-pop-close { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; background: transparent; color: #fff; font-size: 22px; cursor: pointer; }

/* Answer chips: native radios, restyled as bubbles */
.qe-opts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 38px; }
.qe-opts.is-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.qe-opts.is-twic { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.qe-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 16px 9px 12px; background: var(--qe-sub); border: 1px solid #355044; border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 500; line-height: 1.35; color: #e6ede9; transition: border-color .12s, background .12s; user-select: none; }
.qe-opt:hover { border-color: var(--qe-control); background: #163024; }
.qe-opt input { appearance: none; -webkit-appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; border: 2px solid var(--qe-control); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.qe-opt input:checked { border-color: var(--qe-yellow); background: radial-gradient(circle, var(--qe-yellow) 0 4px, transparent 4.5px); }
.qe-opt:has(input:checked) { border-color: var(--qe-yellow); background: var(--qe-yellow-wash); color: #fff; }
.qe-opt:has(input:focus-visible) { outline: 2px solid var(--qe-yellow); outline-offset: 2px; }
.qe-opt input:focus-visible { outline: none; }
.qe-q.is-invalid .qe-opt { border-color: #8a4a4a; }
.qe-opt.is-wide { grid-column: 1 / -1; }

.qe-flag, .qe-err { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0 38px; font-size: 14px; line-height: 1.45; }
.qe-flag { color: var(--qe-amber); }
.qe-err { color: var(--qe-error); }
.qe-flag svg, .qe-err svg { flex: 0 0 16px; margin-top: 2px; }

/* 1B follow-up, multi-select and inline help on an option */
.qe-sub { margin: 14px 0 0 38px; padding: 14px 16px 16px; background: rgba(255,255,255,.03); border: 1px solid var(--qe-line); border-radius: 8px; }
.qe-sub .qe-opts { padding-left: 0; }
.qe-sub .qe-err { margin-left: 0; }
.qe-sub-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.qe-sub-head .qe-q-text { font-size: 15px; }
.qe-sub-tag { flex: 0 0 auto; margin-top: 1px; padding: 2px 6px; border-radius: 4px; background: var(--qe-yellow); color: #111; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.qe-opts.is-airports { display: grid; grid-template-columns: minmax(0,1fr); max-width: 520px; }
.qe-opt-wrap { position: relative; display: flex; min-width: 0; }
.qe-opt-wrap > .qe-opt { flex: 1; padding-right: 44px; }
.qe-opt-wrap > .qe-help-wrap { position: absolute; right: 6px; top: calc(50% - 11px); margin: 0; }
.qe-hint { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 500; color: var(--qe-muted); }
.qe-opt input[type="checkbox"] { border-radius: 4px; }
.qe-opt input[type="checkbox"]:checked { background: var(--qe-yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--qe-yellow); }

.qe-advice { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0 38px; padding: 12px 14px; background: #2a2c0e; border: 1px solid #a3a31a; border-radius: 8px; color: #eef0c8; font-size: 14px; line-height: 1.5; }
.qe-advice svg { flex: 0 0 16px; margin-top: 3px; color: var(--qe-yellow); }
.qe-advice strong { color: var(--qe-yellow); }
@media (max-width: 620px) { .qe-advice { margin-left: 0; } }


/* Sticky summary */
.qe-side { position: sticky; top: 132px; display: grid; gap: 12px; min-width: 0; }
.qe-card { background: rgba(11,28,20,.97); border: 1px solid var(--qe-line); border-radius: 10px; padding: 20px; }
.qe-count { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.qe-count strong { font-size: 15px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.qe-count span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--qe-yellow); }
.qe-bar { height: 5px; border-radius: 3px; background: #23372d; overflow: hidden; margin-bottom: 14px; }
.qe-bar span { display: block; height: 100%; width: 0; background: var(--qe-yellow); border-radius: 3px; transition: width .25s ease; }
.qe-summary { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 2px; }
.qe-summary button { min-height: 36px !important; display: grid; grid-template-columns: 16px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; border-radius: 6px; background: transparent; color: var(--qe-muted); font: 13.5px/1.35 var(--qe-font); text-align: left; cursor: pointer; }
.qe-summary button:hover { background: rgba(255,255,255,.05); }
.qe-s-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #5a6f64; }
.qe-s-val { color: #7f948a; text-align: right; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qe-summary li.is-answered .qe-s-dot { border-color: var(--qe-yellow); background: radial-gradient(circle, var(--qe-yellow) 0 3px, transparent 3.5px); }
.qe-summary li.is-answered .qe-s-label { color: #e6ede9; }
.qe-summary li.is-answered .qe-s-val { color: #fff; font-weight: 600; }
.qe-summary li.is-flagged .qe-s-val { color: var(--qe-amber); }
.qe-summary li.is-invalid .qe-s-dot { border-color: var(--qe-error); }
.qe-summary li.is-invalid .qe-s-val { color: var(--qe-error); }

.qe-submit { width: 100%; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 6px; background: var(--qe-yellow); color: #111; font: 700 16px/1.3 var(--qe-font); cursor: pointer; }
.qe-submit:hover { background: #ffff3d; }
.qe-fine { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: #8fa197; }

.qe-result { display: none; margin-top: 14px; padding: 14px 16px; border: 1px solid; border-radius: 8px; font-size: 14px; }
.qe-result.success { display: block; background: #102e1f; border-color: #35734d; }
.qe-result.error { display: block; background: #301e20; border-color: #b26767; }
.qe-result.missing { display: block; background: #301e20; border-color: #b26767; color: #ffd5d5; }
.qe-result h4 { margin: 0 0 6px; font-size: 15px; color: #fff; line-height: 1.35; }
.qe-result p { margin: 6px 0 0; color: #c3cec8; font-size: 13.5px; line-height: 1.5; }
.qe-result ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; color: #ffd5d5; font-size: 13.5px; line-height: 1.45; }
.qe-result li + li { margin-top: 4px; }
.qe-go { display: flex; align-items: center; justify-content: center; margin-top: 12px; min-height: 44px; border-radius: 6px; background: var(--qe-yellow); color: #111; font-weight: 700; text-decoration: none; }

.qe-twic { padding: 14px 16px; background: #1d2410; border: 1px solid #555a2a; border-radius: 8px; font-size: 13.5px; line-height: 1.5; color: #c9d0bb; }
.qe-twic strong { color: var(--qe-yellow); }

@media (max-width: 980px) {
  .qe-layout { grid-template-columns: minmax(0,1fr); }
  .qe-side { position: static; }
}
@media (max-width: 800px) {
  .qe-head { display: block; }
  .qe-head p { margin-top: 10px; max-width: none; }
}
@media (max-width: 620px) {
  .qe-panel { padding: 18px 16px 4px; }
  .qe-panel-head { display: block; }
  .qe-panel-head p { margin-top: 4px; }
  .qe-opts { padding-left: 0; }
  .qe-opts.is-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .qe-opts.is-twic, .qe-opts.is-airports { grid-template-columns: minmax(0,1fr); }
  .qe-sub { margin-left: 0; }
  .qe-flag, .qe-err, .qe-note { margin-left: 0; }
  .qe-opts.is-grid .qe-opt:last-child { grid-column: 1 / -1; }
  .qe-summary { display: none; }
  .qe-bar { margin-bottom: 16px; }
  .qe-head h2 { font-size: 26px; }
}
