/* CPEV assessment screens. Loaded after styles.css, uses the site's colors and fonts. */

.cpev-main { padding: 3rem 0 5rem; }
.cpev-main .wrap { max-width: 46rem; }

/* Progress */
.q-progress { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 0.9rem 0 0.8rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.q-progress-text { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--ink-2); margin-bottom: 0.45rem; }
.q-bar { height: 8px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.q-bar span { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width 200ms ease; }

/* Scale key */
.q-key { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; }
.q-key p { margin-bottom: 0.6rem; font-weight: 500; }
.q-scale { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; font-size: 0.95rem; color: var(--ink-2); }
.q-scale strong { display: inline-block; width: 1.4em; color: var(--teal-deep); }

/* Questions */
.q-form { display: grid; gap: 1rem; }
.q-item { border: 1px solid var(--rule); border-radius: 6px; background: var(--white); padding: 1.2rem 1.4rem 1rem; margin: 0; min-width: 0; transition: border-color 150ms ease; }
.q-item legend { float: left; width: 100%; padding: 0; margin-bottom: 0.9rem; font-size: 1.04rem; line-height: 1.5; }
.q-item legend + * { clear: both; }
.q-num { color: var(--teal-deep); font-weight: 600; margin-right: 0.15em; }
.q-item.q-missing { border-color: #b4532a; box-shadow: 0 0 0 1px #b4532a; }
.q-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.q-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-options label {
  display: flex; align-items: center; justify-content: center; min-height: 2.9rem;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); cursor: pointer;
  font-weight: 600; font-size: 1.05rem; color: var(--ink-2); transition: background 100ms ease, border-color 100ms ease;
}
.q-options label:hover { border-color: var(--teal); background: var(--teal-tint); color: var(--ink); }
.q-options input:checked + label { background: var(--teal); border-color: var(--teal); color: var(--white); }
.q-options input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 2px; }
.q-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.q-ends { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-3); margin-top: 0.35rem; }
.q-msg { color: #8f3d1b; font-weight: 500; margin: 1.2rem 0 0; min-height: 1em; }
.q-msg:empty { display: none; }
.q-nav { margin-top: 1.6rem; }
.q-nav .btn { font-family: inherit; cursor: pointer; }
.q-saved { margin-top: 1.2rem; }
.q-resume { background: var(--teal-tint); border-radius: 6px; padding: 0.9rem 1.2rem; margin-bottom: 1rem; font-size: 0.97rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Results */
.r-save { background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--teal); border-radius: 6px; padding: 1.3rem 1.5rem; margin-bottom: 2.5rem; }
.r-save .btn, .r-end .btn { font-family: inherit; cursor: pointer; margin-top: 0.9rem; }
.r-end .btn { margin-top: 0; }
.r-block { margin-bottom: 2.8rem; }
.r-block h2 { font-size: 1.7rem; margin-bottom: 0.9rem; }
.r-bars { list-style: none; padding: 0; margin: 1.5rem 0 1.5rem; display: grid; gap: 1.1rem; }
.r-bar { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.2rem; }
.r-bar-head { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 0.5rem; }
.r-pos { font-size: 0.85rem; color: var(--ink-3); min-width: 4.6em; }
.r-name { font-family: var(--serif); font-size: 1.2rem; flex: 1; }
.r-pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.r-track { height: 10px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.r-track span { display: block; height: 100%; background: var(--ink-3); border-radius: 99px; }
.r-top .r-track span { background: var(--teal); }
.r-top { border-left: 4px solid var(--teal); }
.r-desc { font-size: 0.95rem; color: var(--ink-2); margin: 0.7rem 0 0; }
.r-list { padding-left: 1.1em; }
.r-list li { margin-bottom: 0.8em; max-width: var(--measure); }
.r-prac { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 1.4rem 1.5rem; }
.r-flag { background: #fff6d8; border-radius: 4px; padding: 0.8rem 1rem; font-weight: 500; }

@media (max-width: 600px) {
  .cpev-main { padding-top: 1.5rem; }
  .q-item, .q-key { padding: 1rem; }
  .q-options { gap: 0.35rem; }
  .r-bar-head { flex-wrap: wrap; gap: 0.2rem 0.8rem; }
  .r-pos { min-width: 0; width: 100%; }
}

@media print {
  .site-head, .site-foot .nav, .page-head .lede, .r-save .btn, .r-end, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .page-head { padding: 0 0 1rem; border: 0; }
  .cpev-main { padding: 0; }
  .r-bar, .r-block, .r-prac { break-inside: avoid; }
  .r-track, .r-track span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-foot { border: 0; padding: 1rem 0 0; }
}
