/* CBT Tools base styles: tokens from the CBT Test style guide and the parts every tool shares
   (title, lede, buttons, footer, embed box, credit). Moves to S02 "CBT Tools Core". */
.cbt-tool {
	--ink: #1F2A33;
	--muted: #5B6670;
	--line: #D5DBE0;
	--road: #EEF1F3;
	--surface: #FFFFFF;
	--easier: #1565C0;
	--neutral-data: #6B7580;
	--harder: #C62828;
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 10px;
	--font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--font-body: "Barlow", system-ui, sans-serif;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.5;
	color: var(--ink);
	background: var(--surface);
	max-width: 760px;
	margin: 0 auto;
	box-sizing: border-box;
	text-align: left;
}
.cbt-tool *, .cbt-tool *::before, .cbt-tool *::after { box-sizing: border-box; }
.cbt-tool [hidden] { display: none !important; }
.cbt-tool p { margin: 0; }
.cbt-tool a { color: var(--ink); text-underline-offset: 3px; }
.cbt-tool button { font: inherit; cursor: pointer; }
.cbt-tool :focus-visible { outline: 3px solid var(--easier); outline-offset: 2px; }
.cbt-tool .cbt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cbt-tool .cbt-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 8vw, 60px); line-height: 1.02; margin: 0 0 12px; color: var(--ink); }
.cbt-tool .cbt-lede { max-width: 62ch; margin-bottom: 24px; }
.cbt-tool .cbt-h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; margin: 32px 0 8px; color: var(--ink); }

.cbt-tool .cbt-btn { min-height: 48px; padding: 0 16px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-weight: 600; }
.cbt-tool .cbt-btn:disabled { opacity: .7; cursor: progress; }

.cbt-tool .cbt-foot { margin-top: 32px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cbt-tool .cbt-source { max-width: 70ch; }
.cbt-tool .cbt-embed { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 16px; margin: 16px 0; color: var(--ink); }
.cbt-tool .cbt-embed summary { font-weight: 600; cursor: pointer; min-height: 24px; }
.cbt-tool .cbt-embed p { margin: 8px 0; }
.cbt-tool .cbt-embed textarea { width: 100%; font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical; color: var(--ink); background: var(--surface); }
.cbt-tool .cbt-embed .cbt-btn { margin-top: 8px; }
.cbt-tool .cbt-copied { margin-left: 8px; }
.cbt-tool .cbt-credit { margin-top: 12px; font-size: 13px; }

.cbt-tool--embed { padding: 8px 16px 16px; }
.cbt-tool--embed .cbt-title { font-size: clamp(30px, 7vw, 44px); }

@media (max-width: 480px) {
	.cbt-tool { font-size: 16px; }
}
