/* Quick Assessment. Reuses the launch page tokens in styles.css (--ink, --cream, --brass, --green, --serif, --sans). */

body.is-assessing { overflow: hidden; }
body.is-assessing > :not(#quick-assessment):not(script) { visibility: hidden; }

.quick-assessment {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  background: var(--cream);
  color: var(--ink);
  -webkit-overflow-scrolling: touch;
}
.quick-assessment[hidden] { display: none; }

.qa-bar { position: sticky; top: 0; z-index: 2; background: var(--cream); border-bottom: 1px solid var(--line); }
.qa-bar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 60px; }
.qa-bar-inner > :last-child { justify-self: end; }
.qa-title { font-family: var(--serif); font-size: 17px; }
.qa-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--ink); font: 700 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.qa-link:hover { text-decoration: underline; }
.qa-progress { height: 3px; background: rgba(11, 19, 32, .08); }
.qa-progress span { display: block; height: 100%; background: var(--brass); transition: width .3s ease; }

.qa-body { max-width: 680px; padding: 44px 0 72px; }
.qa-label { margin: 0 0 16px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.qa-question { margin: 0 0 28px; font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 4vw, 34px); line-height: 1.22; letter-spacing: -.02em; max-width: none; }
.qa-question:focus { outline: none; }
.qa-question-notice { font-size: clamp(22px, 3.4vw, 28px); line-height: 1.35; }
.qa-hint { margin: -14px 0 18px; color: #4a5750; font-size: 15px; }
.qa-intro { margin: -12px 0 26px; color: #4a5750; font-size: 16px; }

.qa-options { display: grid; gap: 10px; }
.qa-option {
  display: flex; align-items: center; width: 100%; min-height: 58px; padding: 14px 18px;
  border: 1px solid rgba(11, 19, 32, .28); background: #fbf9f4; color: var(--ink);
  font: 400 17px/1.4 var(--sans); text-align: left; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.qa-option:hover { border-color: var(--ink); }
.qa-option.is-selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.qa-option:focus-visible, .qa-check input:focus-visible + span, .qa-field input:focus-visible, .qa-filter input:focus-visible {
  outline: 3px solid var(--brass); outline-offset: 2px;
}

.qa-checks { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.qa-checks-states { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.qa-check { position: relative; display: flex; cursor: pointer; }
.qa-check[hidden] { display: none; }
.qa-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qa-check span {
  flex: 1; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px;
  border: 1px solid rgba(11, 19, 32, .28); background: #fbf9f4; font-size: 16px; line-height: 1.35;
}
.qa-check span::before { content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid var(--ink); background: #fff; }
.qa-check input:checked + span { border-color: var(--ink); background: #ece6d8; }
.qa-check input:checked + span::before { background: var(--ink); box-shadow: inset 0 0 0 3px #fff; }
.qa-filter input { width: 100%; min-height: 48px; margin: 0 0 14px; padding: 0 14px; border: 1px solid rgba(11, 19, 32, .28); background: #fff; font: 16px var(--sans); }

.qa-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 28px; }
.qa-actions-stack { flex-direction: column; align-items: stretch; max-width: 420px; }
.qa-actions .button { justify-content: center; }
.qa-count { margin-right: auto; color: #4a5750; font-size: 14px; }
.qa-error { min-height: 1em; margin: 8px 0 0; color: #8a1c1c; font-size: 14px; }
.qa-error:empty { min-height: 0; margin: 0; }
.button.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.quick-assessment .button { border: 0; cursor: pointer; font-family: var(--sans); }
.quick-assessment .button:disabled { opacity: .6; cursor: progress; }

.qa-notice { padding: 28px; border-left: 3px solid var(--brass); background: #fbf9f4; }

.qa-form { display: grid; gap: 18px; }
.qa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qa-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.qa-field input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid rgba(11, 19, 32, .35); border-radius: 0; background: #fff; color: var(--ink); font: 17px var(--sans); }
.qa-field input[aria-invalid="true"] { border-color: #8a1c1c; }
.qa-field .qa-hint { margin: 6px 0 0; font-size: 14px; }
.qa-submit { width: 100%; margin-top: 6px; }

.qa-end p { font-size: 17px; margin: 0 0 28px; }

.qa-result .qa-score { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 12vw, 96px); line-height: 1; letter-spacing: -.03em; }
.qa-result .qa-score:focus { outline: none; }
.qa-result .qa-score small { font-family: var(--sans); font-size: 16px; letter-spacing: 0; color: #4a5750; }
.qa-band { margin: 12px 0 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 26px; color: var(--green); }
.qa-narrative p { margin: 0 0 18px; font-size: 18px; line-height: 1.65; }
.qa-writing { color: #4a5750; font-style: italic; }
.qa-note { margin: 8px 0 0; color: #4a5750; font-size: 13px; }

/* Footer placeholders shown in preview only */
.is-placeholder { outline: 1px dashed var(--brass); outline-offset: 4px; color: var(--brass) !important; }

@media (max-width: 760px) {
  .qa-body { padding: 30px 0 56px; }
  .qa-row { grid-template-columns: 1fr; }
  .qa-checks-states { grid-template-columns: 1fr 1fr; }
  .qa-option { font-size: 16px; }
  .qa-actions-stack { max-width: none; }
  .qa-notice { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .qa-progress span, .qa-option { transition: none; }
}
.site-footer [data-independence] { margin-top: 18px; }
