/* Am I Trying to Save Someone? – styled to the cptsd.ca brand guide.
   Everything is scoped under .rescuecheck so it won't touch your theme. */
.rescuecheck {
	/* Brand palette */
	--rescuecheck-black: #000000;
	--rescuecheck-white: #ffffff;
	--rescuecheck-fair-pink: #fee9e9;
	--rescuecheck-vista-white: #fcf8f7;
	--rescuecheck-silver: #a9a9a9;
	--rescuecheck-accent: #ff8f95;   /* Geraldine */

	/* Roles */
	--rescuecheck-bg: var(--rescuecheck-vista-white);
	--rescuecheck-surface: var(--rescuecheck-white);
	--rescuecheck-ink: var(--rescuecheck-black);
	--rescuecheck-muted: #595959;    /* readable grey for small text (Silver Chalice is too light for text) */
	--rescuecheck-line: #ece3e1;
	--rescuecheck-them: var(--rescuecheck-black);

	/* Brand type */
	--rescuecheck-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--rescuecheck-sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 1200px;
	margin: 2rem auto;
	padding: clamp(1.5rem, 5vw, 4rem);
	background: var(--rescuecheck-bg);
	color: var(--rescuecheck-ink);
	border-radius: 12px;
	font-family: var(--rescuecheck-sans);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.65;
	text-align: left;
	scroll-margin-top: 120px;
}
.rescuecheck *, .rescuecheck *::before, .rescuecheck *::after { box-sizing: inherit; }
.rescuecheck p, .rescuecheck ul, .rescuecheck h2, .rescuecheck h3, .rescuecheck figure { margin: 0; }

/* Divi compatibility: Divi adds padding, bullets, and heading styles through
   high-specificity selectors (some use IDs like #left-area), so the few
   properties it touches are reset firmly here. Scoped to this tool only. */
.rescuecheck p,
.rescuecheck h2,
.rescuecheck h3,
.rescuecheck figure { padding-bottom: 0 !important; }
.rescuecheck h2, .rescuecheck h3 { text-transform: none; letter-spacing: normal; }
.rescuecheck ul.rescuecheck-notes,
.rescuecheck ul.rescuecheck-sections { list-style: none !important; padding: 0 !important; margin-left: 0 !important; }
.rescuecheck .rescuecheck-steps ul,
.rescuecheck .rescuecheck-sources ul { list-style: disc outside !important; padding: 0 0 0 1.2rem !important; line-height: inherit !important; }
.rescuecheck .rescuecheck-notes li { padding: 0.35rem 0 0.35rem 1.1rem !important; }
.rescuecheck button { text-transform: none; letter-spacing: normal; box-shadow: none; min-height: 0; }
.rescuecheck input[type="radio"] { appearance: auto; -webkit-appearance: radio; opacity: 1; position: absolute; }

.rescuecheck .rescuecheck-sr {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* Type (Minor Third scale, 1.2) */
.rescuecheck .rescuecheck-title {
	font-family: var(--rescuecheck-serif);
	font-size: 2.074em;           /* H2 */
	line-height: 1.15;
	font-weight: 700;
	color: var(--rescuecheck-ink);
	margin-bottom: 1.25rem;
	max-width: 26ch;
	outline: none;
}
.rescuecheck .rescuecheck-lede { font-size: 1em; margin-bottom: 1rem; max-width: 62ch; }
.rescuecheck .rescuecheck-fine { font-size: 0.833em; color: var(--rescuecheck-muted); margin-top: 0.75rem; max-width: 70ch; }

.rescuecheck .rescuecheck-notes {
	margin: 1.5rem 0 2rem !important;
	border-left: 3px solid var(--rescuecheck-accent);
}
.rescuecheck .rescuecheck-notes li { color: var(--rescuecheck-muted); }

/* Buttons: black with white text; Geraldine on hover */
.rescuecheck .rescuecheck-btn {
	font-family: var(--rescuecheck-sans); font-size: 1em; font-weight: 600;
	cursor: pointer; border-radius: 999px; padding: 0.8rem 1.75rem;
	border: 2px solid transparent; line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rescuecheck .rescuecheck-btn-primary { background: var(--rescuecheck-black); color: var(--rescuecheck-white); border-color: var(--rescuecheck-black); }
.rescuecheck .rescuecheck-btn-primary:hover { background: var(--rescuecheck-accent); color: var(--rescuecheck-black); border-color: var(--rescuecheck-accent); }
.rescuecheck .rescuecheck-btn-primary:disabled,
.rescuecheck .rescuecheck-btn-primary:disabled:hover { background: var(--rescuecheck-silver); border-color: var(--rescuecheck-silver); color: var(--rescuecheck-white); cursor: not-allowed; }
.rescuecheck .rescuecheck-btn-quiet { background: transparent; color: var(--rescuecheck-ink); border-color: var(--rescuecheck-silver); }
.rescuecheck .rescuecheck-btn-quiet:hover { background: var(--rescuecheck-fair-pink); color: var(--rescuecheck-ink); border-color: var(--rescuecheck-accent); }
.rescuecheck .rescuecheck-link {
	font-family: var(--rescuecheck-sans); font-size: 0.833em; background: none; border: 0; padding: 0.25rem;
	color: var(--rescuecheck-muted); text-decoration: underline; text-decoration-color: var(--rescuecheck-accent);
	text-underline-offset: 3px; cursor: pointer;
}
.rescuecheck .rescuecheck-link:hover { background: none; color: var(--rescuecheck-ink); }
.rescuecheck button:focus-visible, .rescuecheck summary:focus-visible, .rescuecheck .rescuecheck-opt:has(input:focus-visible) {
	outline: 3px solid var(--rescuecheck-black); outline-offset: 3px;
}

/* Intro */
.rescuecheck .rescuecheck-intro-side .rescuecheck-notes { margin-top: 0 !important; }

/* Question screen */
.rescuecheck .rescuecheck-q-top { display: flex; justify-content: space-between; align-items: center; }
.rescuecheck .rescuecheck-count { font-size: 0.833em; color: var(--rescuecheck-muted); }
.rescuecheck .rescuecheck-progress {
	height: 4px; background: var(--rescuecheck-line); border-radius: 4px;
	margin: 0.5rem 0 2.5rem; overflow: hidden;
}
.rescuecheck .rescuecheck-progress span { display: block; height: 100%; background: var(--rescuecheck-accent); transition: width 0.3s ease; }

.rescuecheck .rescuecheck-qhead { margin-bottom: 1.75rem; }
.rescuecheck .rescuecheck-q-section { font-size: 0.833em; color: var(--rescuecheck-muted); margin-bottom: 0.6rem; }
.rescuecheck .rescuecheck-q-text {
	font-family: var(--rescuecheck-serif);
	font-size: 1.44em;            /* H4 on mobile */
	line-height: 1.3; font-weight: 700; outline: none; max-width: 30ch;
}

.rescuecheck .rescuecheck-opts { display: grid; gap: 0.65rem; }
.rescuecheck .rescuecheck-opt {
	position: relative; display: block; cursor: pointer;
	background: var(--rescuecheck-surface); border: 2px solid var(--rescuecheck-line);
	border-radius: 10px; padding: 0.95rem 1.1rem 0.95rem 3rem;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.rescuecheck .rescuecheck-opt:hover { border-color: var(--rescuecheck-accent); }
.rescuecheck .rescuecheck-opt input {
	left: 1.1rem; top: 50%; transform: translateY(-50%);
	width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--rescuecheck-black);
}
.rescuecheck .rescuecheck-opt:has(input:checked) {
	border-color: var(--rescuecheck-accent);
	background: var(--rescuecheck-fair-pink);
	font-weight: 600;
}

.rescuecheck .rescuecheck-nav {
	display: flex; justify-content: space-between; align-items: center;
	gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap;
}

/* Results */
.rescuecheck .rescuecheck-balance {
	background: var(--rescuecheck-surface); border-radius: 12px;
	padding: clamp(1.25rem, 3vw, 2rem) !important; margin: 2rem 0 3rem;
}
.rescuecheck .rescuecheck-balance figcaption {
	font-family: var(--rescuecheck-serif); font-weight: 700;
	font-size: 1.44em; line-height: 1.25; margin-bottom: 1.25rem;
}
.rescuecheck .rescuecheck-balance-bar {
	position: relative; display: flex; height: 32px;
	border-radius: 999px; overflow: hidden; background: var(--rescuecheck-line);
}
.rescuecheck .rescuecheck-them { background: var(--rescuecheck-them); transition: width 0.6s ease; }
.rescuecheck .rescuecheck-you { background: var(--rescuecheck-accent); transition: width 0.6s ease; }
.rescuecheck .rescuecheck-balance-labels {
	display: flex; justify-content: space-between; margin-top: 0.6rem;
	font-weight: 600; font-size: 1em;
}
.rescuecheck .rescuecheck-them-label::before,
.rescuecheck .rescuecheck-you-label::before {
	content: ""; display: inline-block; width: 0.75em; height: 0.75em;
	border-radius: 50%; margin-right: 0.45em; vertical-align: -0.05em;
}
.rescuecheck .rescuecheck-them-label::before { background: var(--rescuecheck-them); }
.rescuecheck .rescuecheck-you-label::before { background: var(--rescuecheck-accent); }

.rescuecheck .rescuecheck-sections { display: grid; gap: 2.5rem 3.5rem; margin-bottom: 3rem !important; }
.rescuecheck .rescuecheck-sec { padding-left: 1.25rem; border-left: 3px solid var(--rescuecheck-accent); }
.rescuecheck .rescuecheck-sec-ready { border-left-color: var(--rescuecheck-them); }
.rescuecheck .rescuecheck-sec-cost { border-left-color: var(--rescuecheck-silver); }
.rescuecheck .rescuecheck-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.rescuecheck .rescuecheck-sec h3 {
	font-family: var(--rescuecheck-serif); font-weight: 700;
	font-size: 1.2em; line-height: 1.3; color: var(--rescuecheck-ink);
}
.rescuecheck .rescuecheck-band { font-size: 0.833em; font-weight: 600; color: var(--rescuecheck-muted); white-space: nowrap; }
.rescuecheck .rescuecheck-meter { height: 6px; background: var(--rescuecheck-line); border-radius: 6px; margin: 0.6rem 0 1rem; overflow: hidden; }
.rescuecheck .rescuecheck-meter span { display: block; height: 100%; background: var(--rescuecheck-accent); }
.rescuecheck .rescuecheck-sec-ready .rescuecheck-meter span { background: var(--rescuecheck-them); }
.rescuecheck .rescuecheck-sec-cost .rescuecheck-meter span { background: var(--rescuecheck-silver); }
.rescuecheck .rescuecheck-sec > p { max-width: 62ch; }

.rescuecheck details { margin-top: 1rem; }
.rescuecheck summary {
	cursor: pointer; font-weight: 600; color: var(--rescuecheck-ink);
	text-decoration: underline; text-decoration-color: var(--rescuecheck-accent);
	text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.rescuecheck details p { margin-top: 0.7rem; max-width: 62ch; }
.rescuecheck .rescuecheck-prompt {
	margin-top: 1.1rem; padding: 0.9rem 1.1rem 1rem !important; border-radius: 10px;
	background: var(--rescuecheck-fair-pink);
	font-family: var(--rescuecheck-serif); font-style: italic; font-size: 1.1em; line-height: 1.45;
}
.rescuecheck .rescuecheck-prompt::before {
	content: "Reflect: "; font-family: var(--rescuecheck-sans); font-style: normal;
	font-weight: 600; font-size: 0.757em; display: block; color: var(--rescuecheck-muted); margin-bottom: 0.2rem;
}

.rescuecheck .rescuecheck-steps { background: var(--rescuecheck-surface); border-radius: 12px; padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 2rem; }
.rescuecheck .rescuecheck-steps h3 { font-family: var(--rescuecheck-serif); font-weight: 700; font-size: 1.44em; line-height: 1.25; margin-bottom: 1rem; }
.rescuecheck .rescuecheck-steps li { margin-bottom: 0.7rem; }
.rescuecheck .rescuecheck-steps li::marker { color: var(--rescuecheck-accent); }

.rescuecheck .rescuecheck-care { font-size: 0.833em; color: var(--rescuecheck-muted); border-top: 1px solid var(--rescuecheck-line); padding-top: 1.25rem; max-width: 80ch; }
.rescuecheck .rescuecheck-sources summary { color: var(--rescuecheck-muted); font-weight: 400; font-size: 0.833em; }
.rescuecheck .rescuecheck-sources ul { margin-top: 0.6rem; font-size: 0.833em; color: var(--rescuecheck-muted); }
.rescuecheck .rescuecheck-sources li { margin-bottom: 0.4rem; }

/* Desktop: use the extra width */
@media (min-width: 960px) {
	.rescuecheck .rescuecheck-title { font-size: 2.488em; }   /* H1 */
	.rescuecheck .rescuecheck-intro {
		display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start;
	}
	.rescuecheck .rescuecheck-intro-side { padding-top: 0.75rem; }
	.rescuecheck .rescuecheck-qbody {
		display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: center;
		min-height: 320px;
	}
	.rescuecheck .rescuecheck-qhead { margin-bottom: 0; }
	.rescuecheck .rescuecheck-q-text { font-size: 1.728em; }   /* H3 */
	.rescuecheck .rescuecheck-sections { grid-template-columns: 1fr 1fr; }
	.rescuecheck .rescuecheck-steps ul { columns: 2; column-gap: 3rem; }
	.rescuecheck .rescuecheck-steps li { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
	.rescuecheck * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.rescuecheck { background: #fff; max-width: none; padding: 0; }
	.rescuecheck .rescuecheck-nav, .rescuecheck .rescuecheck-link { display: none; }
	.rescuecheck .rescuecheck-balance, .rescuecheck .rescuecheck-steps { border: 1px solid #ccc; }
	.rescuecheck .rescuecheck-balance-bar, .rescuecheck .rescuecheck-meter span, .rescuecheck .rescuecheck-them,
	.rescuecheck .rescuecheck-you, .rescuecheck .rescuecheck-prompt {
		-webkit-print-color-adjust: exact; print-color-adjust: exact;
	}
}
