/* Self-tests (page-templates/self-test.php) and Emergency resources (page-templates/emergency.php). */

/* ---------- Self-test ---------- */
.st-hero { padding-bottom: 36px; }
.st-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 15px; }
.st-meta li { display: flex; align-items: center; gap: 6px; }
.st-meta .icon { color: var(--teal); }

.st-note { display: flex; gap: 12px; background: var(--gold-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 28px; font-size: 15px; }
.st-note > .icon { color: var(--clay-dark); margin-top: 3px; }
.st-note p { margin: 0 0 .5em; }
.st-note p:last-child { margin: 0; color: var(--muted); }
.st-content { margin-bottom: 24px; }

.st-progress { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 0 10px; margin-bottom: 8px; }
.st-progress-text { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.st-done { font-weight: 600; color: var(--teal-dark); }
.st-bar { height: 8px; border-radius: var(--pill); background: var(--teal-soft); overflow: hidden; }
.st-bar-fill { display: block; height: 100%; width: 0; background: var(--teal); border-radius: var(--pill); transition: width .25s ease; }
.st-question-lead { font-family: var(--serif); font-size: 1.15rem; margin: 8px 0 18px; }
.st-missing { background: var(--clay-soft); color: var(--clay-dark); border-radius: var(--r); padding: 12px 16px; font-weight: 600; }

.st-item { border: 1px solid var(--line); margin: 0 0 16px; padding: 18px 16px 16px; min-width: 0; scroll-margin-top: 80px; transition: border-color .2s ease; }
.st-item.is-done { border-color: var(--teal-soft); }
.st-item.is-missing { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay-soft); }
.st-legend { padding: 0; margin-bottom: 14px; float: left; width: 100%; }
.st-legend + * { clear: both; }
.st-num { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.st-text { display: block; font-size: 1.08rem; font-weight: 500; line-height: 1.45; }

.st-options { display: grid; gap: 8px; }
.st-option { position: relative; display: block; cursor: pointer; }
.st-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-option span { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: background .15s ease, border-color .15s ease; }
.st-option span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: border .15s ease; }
.st-option:hover span { border-color: var(--teal); }
.st-option input:checked + span { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark); font-weight: 600; }
.st-option input:checked + span::before { border: 6px solid var(--teal); }
.st-option input:focus-visible + span { outline: 3px solid var(--clay); outline-offset: 2px; }

.st-alert { margin-top: 14px; background: var(--clay-soft); border: 1px solid var(--clay); border-radius: var(--r); padding: 14px 16px; font-size: 15px; }
.st-alert p { margin: 0 0 .6em; }
.st-alert p:last-child { margin: 0; }
.st-alert[hidden], .st-result[hidden], .st-band[hidden], .st-hint[hidden] { display: none; }
.st-crisis-lines { list-style: none; display: grid; gap: 6px; margin: 0 0 .8em; }
.st-crisis-lines span { color: var(--muted); }
.st-tel { display: inline-block; min-width: 96px; padding: 6px 12px; margin-right: 6px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--clay); color: var(--clay-dark); text-decoration: none; text-align: center; }

.st-submit { margin: 24px 0 8px; }
.st-hint { color: var(--clay-dark); font-weight: 600; margin-bottom: 10px; }

.st-result { margin-top: 36px; scroll-margin-top: 24px; outline: none; }
.st-band { padding: 24px 20px; border-top: 4px solid var(--teal); }
.st-band h2 { margin-bottom: 8px; }
.st-score { color: var(--muted); font-size: 15px; }
.st-score-num { font-family: var(--serif); font-size: 1.6rem; color: var(--teal-dark); }
.st-alert-result { margin-top: 16px; }
.st-ctas { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 8px; }
.st-ctas .btn { justify-content: center; }
.st-retake { margin: 8px 0; font-size: 15px; }
.st-small { font-size: 14px; }
.st-foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (min-width: 640px) {
	.st-item { padding: 22px 24px 20px; }
	.st-options { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
	.st-option span { justify-content: flex-start; }
	.st-ctas { flex-direction: row; flex-wrap: wrap; }
	.st-submit .btn-block { display: inline-flex; width: auto; }
}

/* ---------- Emergency resources ---------- */
.em-wrap h2 { display: flex; align-items: center; gap: 10px; }
.em-urgent { padding: 22px 20px; border: 2px solid var(--clay); margin-bottom: 40px; }
.em-urgent h2 .icon { color: var(--clay-dark); }
.em-big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 12px; }
.em-call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 18px; border-radius: var(--pill); background: var(--teal); color: var(--surface); text-decoration: none; font-size: 1.1rem; white-space: nowrap; }
.em-call:hover { background: var(--teal-dark); color: var(--surface); }
.em-call-main { flex-direction: column; gap: 0; border-radius: var(--r); background: var(--clay); min-height: 88px; line-height: 1.2; }
.em-call-main:hover { background: var(--clay-dark); }
.em-call-main strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; }
.em-call-main span { font-size: 15px; }
.em-small { font-size: 14px; color: var(--muted); }
.em-section { margin-bottom: 44px; }
.em-steps { padding-left: 1.4em; display: grid; gap: 10px; font-size: 1.04rem; }
.em-steps li::marker { color: var(--clay-dark); font-weight: 600; }
.em-lines { list-style: none; display: grid; gap: 12px; margin-bottom: 12px; }
.em-line { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.em-line h3 { margin: 0 0 4px; }
.em-line p { margin: 0 0 4px; }
.em-who { color: var(--muted); font-size: 15px; }
.em-hours { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--teal-dark); }
.em-note { font-size: 15px; }
.em-line .em-call { align-self: stretch; }
.em-tips { list-style: none; display: grid; gap: 12px; }
.em-tips li { padding-left: 16px; border-left: 3px solid var(--teal-soft); }
.em-later { padding: 22px 20px; }
.em-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.em-foot { padding-top: 16px; border-top: 1px solid var(--line); }

@media (min-width: 640px) {
	.em-urgent, .em-later { padding: 28px 30px; }
	.em-line { flex-direction: row; align-items: center; justify-content: space-between; padding: 20px 24px; }
	.em-line .em-call { align-self: center; flex: none; }
}
