/* The PHQ-9 extends the established calm, readable topic design. */
.phq-test [hidden]{display:none!important}
.phq-test{scroll-margin-top:1rem}
.phq-test .eyebrow,.phq-test .status-label{font-size:.875rem}
.phq-test a:not(.button){text-decoration:underline;text-underline-offset:3px}
.test-audience{margin:1.5rem 0}
.test-audience fieldset{border:0;padding:0;margin:0;min-width:0}
.test-audience legend{font-size:1rem;font-weight:600;margin-bottom:.8rem;padding:0}
.test-audience-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.test-audience-options label{display:flex;gap:.8rem;align-items:center;min-height:82px;background:#ffffffa6;border:1px solid #aebfc3;border-radius:7px;padding:1rem;cursor:pointer}
.test-audience-options label:hover{background:#fff}
.test-audience-options label:has(input:checked){border-color:#365f53;background:#e0ebe3;box-shadow:inset 0 0 0 1px #365f53}
.test-audience label:focus-within{outline:3px solid #6e8070;outline-offset:3px}
.test-audience input{width:1.2rem;height:1.2rem;flex-shrink:0;margin:0;accent-color:var(--accent)}
.test-audience-options span{font-size:1rem;font-weight:600}
.test-audience-options small{display:block;font-size:.875rem;color:#3a5651;font-weight:400}
.test-audience-younger{display:flex;gap:.8rem;align-items:center;min-height:44px;margin-top:.75rem;cursor:pointer;font-size:.875rem}
.test-audience-note{font-size:.875rem;line-height:1.65;margin-top:.75rem}
.test-audience-feedback{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[data-adult-test],.test-youth{border-top:1px solid #c5d3d7;padding-top:1.25rem}
.test-youth h3:first-child{margin-top:0}
.test-youth-help{border-top:1px solid #c5d3d7;margin-top:1.5rem;padding-top:.25rem}
.test-youth-links{display:flex;flex-wrap:wrap;gap:.75rem}
.test-youth-links .button{margin-top:1rem}
.youth-reflection{min-width:0}
.youth-step{font-size:.9375rem;color:#3a5651}
.youth-question{display:block;font-size:1.125rem;font-weight:600;line-height:1.55;margin-top:1rem}
.youth-reflection textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;min-height:160px;resize:vertical;margin:1rem 0;padding:1rem;border:1px solid #8fa9a2;border-radius:7px;background:#ffffffd9;color:var(--ink);font:1rem/1.7 var(--sans)}
.youth-reflection textarea:focus-visible{outline:3px solid #6e8070;outline-offset:3px}
.youth-reflection h4{font:600 1.125rem/1.55 var(--sans);margin:1.5rem 0 .5rem}
.youth-notes{background:#ffffffa6;border:1px solid #bdcdd0;border-radius:8px;margin:1.25rem 0;padding:1.25rem}
.youth-notes:empty{display:none}
.youth-notes dt{font-size:1rem;font-weight:600;line-height:1.6}
.youth-notes dt:not(:first-child){margin-top:1.5rem;border-top:1px solid #c5d3d7;padding-top:1.25rem}
.youth-notes dd{white-space:pre-wrap;overflow-wrap:anywhere;margin:.5rem 0 0;font-size:1rem;line-height:1.7}
.youth-about{border-top:1px solid #c5d3d7;margin-top:1.5rem;padding-top:.75rem}
.youth-about summary{cursor:pointer;min-height:44px;font-size:.9375rem;padding:.5rem 0}
.test-youth-external{border-top:1px solid #c5d3d7;margin-top:1.5rem;padding-top:1rem}
.test-youth-help{scroll-margin-top:1rem}
.phq-text-link{display:inline-flex;align-items:center;min-height:44px;margin-top:.5rem;font-size:.875rem}
@media(max-width:36.25rem){.test-audience-options{grid-template-columns:1fr}.test-audience-options label{min-height:70px}.test-youth-links{flex-direction:column;gap:0}.test-youth-links .button{width:100%}}
.phq-facts{display:flex;flex-wrap:wrap;gap:.5rem 1.2rem;padding:1rem 0;margin:.5rem 0 1rem;border-bottom:1px solid #c5d3d7;font-size:.875rem;color:#3a5651}
.phq-privacy{font-size:.9375rem;margin-top:1rem}
.phq-age{display:flex;gap:.8rem;align-items:center;margin-top:1.5rem;padding:1rem;background:#ffffffa6;border:1px solid #acbfc3;border-radius:6px;cursor:pointer;min-height:48px}
.phq-age input{width:1.25rem;height:1.25rem;flex-shrink:0;margin:0;accent-color:var(--accent)}
.phq-age-note,.phq-footnote,.phq-no-script{font-size:.875rem;line-height:1.65}
.phq-age-note{margin-top:.75rem}
.phq-progress-label{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem;font-size:.875rem;color:#3a5651;margin-top:.5rem}
.phq-progress{display:block;appearance:none;width:100%;height:5px;margin:.65rem 0 1.4rem;border:none;border-radius:10px;overflow:hidden;background:#cbd8da;color:var(--accent)}
.phq-progress::-webkit-progress-bar{background:#cbd8da;border-radius:10px}
.phq-progress::-webkit-progress-value{background:var(--accent);border-radius:10px}
.phq-progress::-moz-progress-bar{background:var(--accent);border-radius:10px}
.phq-prompt{font-size:1rem;margin-bottom:1.25rem}
.phq-question{border:0;padding:0;margin:0;min-width:0}
.phq-question legend{font-size:1.125rem;font-weight:600;line-height:1.55;margin-bottom:1.1rem;padding:0;color:var(--ink);width:100%;scroll-margin-top:1rem}
.phq-options{display:grid;gap:.65rem}
.phq-option{display:flex;align-items:center;gap:.85rem;min-height:54px;border:1px solid #aebfc3;background:#ffffffae;border-radius:7px;padding:.85rem 1rem;font-size:1rem;line-height:1.5;cursor:pointer}
.phq-option:hover{background:#fff;border-color:#698d80}
.phq-option:has(input:checked){border-color:#365f53;background:#e0ebe3;box-shadow:inset 0 0 0 1px #365f53}
.phq-option:focus-within{outline:3px solid #6e8070;outline-offset:3px}
.phq-option input{appearance:auto;accent-color:var(--accent);width:1.2rem;height:1.2rem;flex-shrink:0;margin:0}
.phq-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem;margin-top:.25rem}
.phq-actions .button{flex:1 1 7rem;font-size:1rem;min-width:110px;min-height:48px}
.phq-actions .primary{margin-left:auto}
.phq-secondary-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem 1.25rem;margin-top:.65rem}
.phq-secondary-actions a,.phq-text-button{display:inline-flex;align-items:center;min-height:44px;font: .875rem/1.5 var(--sans);color:#3a5651}
.phq-text-button{padding:.5rem 0;background:none;border:0;text-decoration:underline;text-underline-offset:3px;text-align:left}
.phq-error{font-size:.9375rem;color:#81422c;margin-top:1rem}
.phq-safety{padding:1.25rem;border:1px solid #c8ab8d;border-left:4px solid #a87b50;border-radius:6px;background:#fff8ec;margin-top:1.5rem}
.phq-test .phq-safety h3{font-size:1.1rem;margin:0 0 .75rem}
.phq-safety p{color:#584d3c;font-size:1rem}
.phq-safety a{font-weight:700;white-space:nowrap}
.phq-safety .phq-safety-note{font-size:.875rem}
[data-phq-result-safety] .phq-safety{margin:0 0 1.5rem}
.phq-result-card{background:#ffffffa6;border:1px solid #bdcdd0;border-radius:8px;padding:1.5rem;margin-top:1rem}
.phq-score{display:flex;align-items:baseline;flex-wrap:wrap;gap:.8rem;margin:.5rem 0;color:var(--ink)}
.phq-score strong{font:3.5rem/1.2 var(--serif);letter-spacing:-.04em}
.phq-score span{font-size:1rem;color:var(--muted)}
.phq-test .phq-result-card h3{font-size:1.2rem;margin:1rem 0 .6rem}
.phq-result-card>p:last-child{font-size:1rem}
.phq-impairment{background:#ffffff80;border-left:3px solid #76907e;padding:1rem;margin-top:1.25rem}
.phq-footnote{border-top:1px solid #c5d3d7;margin-top:1.75rem;padding-top:1rem;color:#53645f}
.phq-footnote details{margin-top:.75rem}
.phq-footnote summary{min-height:44px;cursor:pointer;padding:.5rem 0}
.phq-footnote details p{font-size:.875rem;margin-top:.7rem}
@media(max-width:36.25rem){.phq-test .panel-heading{align-items:flex-start}.phq-test .panel-heading .eyebrow{font-size:.875rem}.phq-facts{gap:.5rem 1rem}.phq-result-card{padding:1.15rem}.phq-option{padding:.85rem .8rem}.phq-actions{gap:.65rem}.phq-actions .button{padding:.85rem 1rem;min-width:0}.phq-actions .primary{margin-left:auto}.phq-safety{padding:1rem}.phq-test .phq-secondary-actions{gap:.2rem 1rem}}
@media print{.phq-test form,.phq-secondary-actions,.phq-test .button{display:none!important}.phq-test,.phq-result-card,.phq-safety{break-inside:avoid}}

.phq-option span,.test-audience-options span{min-width:0;overflow-wrap:anywhere}
.phq-test :is(h2,h3,h4,legend,label){overflow-wrap:anywhere;hyphens:auto}
.phq-secondary-actions>*{max-width:100%;overflow-wrap:anywhere}
.youth-reflection textarea{scroll-margin-top:1rem}
