/* Turtle Bee Honey — agreement form
   Scoped under .tbh-wrap and defensive about theme resets. */

.tbh-wrap {
	--tbh-purple: #5b4a96;
	--tbh-navy: #131681;
	--tbh-bar: #eeeafb;
	--tbh-bar-line: #7867ad;
	--tbh-ink: #14142b;
	--tbh-label: #6e6294;
	--tbh-muted: #6b6880;
	--tbh-line: #b9b4cc;
	--tbh-error: #b32d2e;
	max-width: 880px;
	margin: 0 auto;
	color: var(--tbh-ink);
	font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tbh-wrap *,
.tbh-wrap *::before,
.tbh-wrap *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------ header */

.tbh-header {
	display: flex;
	align-items: center;
	gap: 18px;
	padding-bottom: 14px;
	margin-bottom: 20px;
	border-bottom: 3px solid var(--tbh-navy);
}
.tbh-logo { width: 78px; height: 78px; flex: 0 0 auto; object-fit: contain; border-radius: 50%; }
.tbh-brand {
	margin: 0 !important;
	font-size: 1.7rem !important;
	line-height: 1.15 !important;
	color: var(--tbh-ink) !important;
}
.tbh-brand-sub { margin: 2px 0 0 !important; font-size: 1.05rem; font-weight: 700; }
.tbh-brand-contact { margin: 4px 0 0 !important; font-size: .82rem; color: var(--tbh-navy); }

/* ------------------------------------------------------------------ status */

.tbh-status {
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 8px;
	border-left: 5px solid var(--tbh-purple);
	background: #f5f2fb;
}
.tbh-status--ok { background: #e9f7ee; border-left-color: #1a7f37; }
.tbh-status--warn { background: #fff6d8; border-left-color: #b8860b; }
.tbh-status--error { background: #fdf0f0; border-left-color: var(--tbh-error); }
.tbh-status ul { margin: 8px 0 0; padding-left: 20px; }
.tbh-status li { margin: 3px 0; }
.tbh-status a { color: var(--tbh-error); }
.tbh-status:focus { outline: 2px solid var(--tbh-purple); outline-offset: 3px; }

.tbh-intro {
	margin: 0 0 20px;
	padding: 14px 16px;
	background: #faf9fd;
	border: 1px solid #e7e2f2;
	border-radius: 8px;
	font-size: .92rem;
}

/* ---------------------------------------------------------------- sections */

.tbh-section {
	margin: 0 0 18px;
	border: 1px solid #ddd6ea;
	border-radius: 10px;
	overflow: hidden;
	break-inside: avoid;
}
.tbh-section-title {
	margin: 0 !important;
	padding: 12px 16px !important;
	font-size: 1.03rem !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	color: var(--tbh-purple) !important;
	background: var(--tbh-bar) !important;
	border-bottom: 1px solid var(--tbh-bar-line);
}
.tbh-section-body { padding: 16px; }
.tbh-section-body > p { margin: 0 0 10px; font-size: .92rem; }
.tbh-section-body > p:last-child { margin-bottom: 0; }
.tbh-section-intro { color: var(--tbh-muted); }
.tbh-terms { margin: 0; padding-left: 20px; font-size: .92rem; }
.tbh-terms li { margin: 5px 0; }

/* ------------------------------------------------------------------ fields */

.tbh-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}
.tbh-grid:last-child { margin-bottom: 0; }
.tbh-grid--panel {
	padding: 14px;
	margin-top: 12px;
	background: #faf9fd;
	border: 1px solid #e7e2f2;
	border-radius: 8px;
}
.tbh-span-2 { grid-column: 1 / -1; }

.tbh-field { display: flex; flex-direction: column; min-width: 0; }
.tbh-field > label {
	display: block;
	margin-bottom: 5px;
	font-size: .86rem;
	font-weight: 600;
	color: var(--tbh-label);
}
.tbh-req { color: var(--tbh-error); }

.tbh-wrap input[type="text"],
.tbh-wrap input[type="email"],
.tbh-wrap input[type="tel"],
.tbh-wrap input[type="date"],
.tbh-wrap textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid #8b8490;
	border-radius: 7px;
	background: #fff;
	color: var(--tbh-ink);
	font: inherit;
	font-size: 16px; /* stops iOS zooming on focus */
}
.tbh-wrap textarea { min-height: auto; resize: vertical; line-height: 1.5; }

.tbh-wrap input:focus-visible,
.tbh-wrap textarea:focus-visible,
.tbh-wrap button:focus-visible,
.tbh-wrap .tbh-check input:focus-visible {
	outline: 3px solid var(--tbh-purple);
	outline-offset: 1px;
}

.tbh-hint { margin-top: 4px; font-size: .78rem; color: var(--tbh-muted); }
.tbh-error { margin-top: 5px; font-size: .82rem; font-weight: 600; color: var(--tbh-error); }
.tbh-field--error input,
.tbh-field--error textarea { border-color: var(--tbh-error); border-width: 2px; }
.tbh-field.tbh-field--error > label { color: var(--tbh-error); }
fieldset.tbh-field--error {
	padding-left: 12px;
	border-left: 4px solid var(--tbh-error);
	border-radius: 0 6px 6px 0;
}

.tbh-subhead {
	margin: 18px 0 10px;
	padding-bottom: 5px;
	border-bottom: 2px solid var(--tbh-bar);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--tbh-purple);
}
.tbh-subhead span {
	margin-left: 6px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tbh-muted);
}

.tbh-wrap select {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid #8b8490;
	border-radius: 7px;
	background: #fff;
	color: var(--tbh-ink);
	font: inherit;
	font-size: 16px;
}
.tbh-field--error select { border-color: var(--tbh-error); border-width: 2px; }

/* ---------------------------------------------------------------- checkboxes */

.tbh-checks {
	display: grid;
	gap: 4px;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}
.tbh-checks:last-child { margin-bottom: 0; }
.tbh-legend {
	display: block;
	width: 100%;
	padding: 0;
	margin-bottom: 8px;
	font-size: .86rem;
	font-weight: 600;
	color: var(--tbh-label);
}
.tbh-legend-note {
	display: block;
	margin-top: 2px;
	font-size: .78rem;
	font-weight: 400;
	color: var(--tbh-muted);
}
fieldset.tbh-field--error .tbh-legend { color: var(--tbh-error); }
.tbh-check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 9px 10px;
	border-radius: 7px;
	font-size: .92rem;
	font-weight: 400;
	cursor: pointer;
}
.tbh-check:hover { background: #f7f5fc; }
.tbh-check input {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--tbh-purple);
}
.tbh-check span { padding-top: 1px; }

/* ---------------------------------------------------------------- signatures */

.tbh-sig {
	padding: 14px;
	margin-bottom: 14px;
	background: #fbfaFe;
	border: 1px solid #ddd6ea;
	border-radius: 9px;
}
.tbh-sig:last-child { margin-bottom: 0; }
.tbh-sig-title {
	margin: 0 0 12px !important;
	font-size: .82rem !important;
	font-weight: 700 !important;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tbh-purple) !important;
}
.tbh-draw { margin-top: 12px; }
.tbh-draw-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 5px;
	font-size: .86rem;
	font-weight: 600;
	color: var(--tbh-label);
}
.tbh-canvas {
	display: block;
	width: 100%;
	height: 120px;
	background: #fff;
	border: 2px dashed #a49dbb;
	border-radius: 7px;
	touch-action: none;
	cursor: crosshair;
}
.tbh-clear {
	padding: 6px 12px;
	border: 1px solid #c9c2d8;
	border-radius: 6px;
	background: #fff;
	color: var(--tbh-ink);
	font: inherit;
	font-size: .8rem;
	cursor: pointer;
}
.tbh-clear:hover { background: #f2eefa; }

/* ------------------------------------------------------------------ actions */

.tbh-actions { margin: 22px 0 8px; text-align: center; }
.tbh-submit {
	width: 100%;
	max-width: 420px;
	padding: 15px 24px;
	border: 0;
	border-radius: 8px;
	background: var(--tbh-purple);
	color: #fff;
	font: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
}
.tbh-submit:hover { background: #4c3d80; }
.tbh-submit[disabled] { opacity: .65; cursor: progress; }
.tbh-actions-note { margin: 10px 0 0; font-size: .84rem; color: var(--tbh-muted); }

.tbh-foot {
	margin: 20px 0 0;
	padding-top: 14px;
	border-top: 1px solid #e7e2f2;
	text-align: center;
	font-size: .8rem;
	color: var(--tbh-muted);
}

/* honeypot */
.tbh-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ mobile */

@media (max-width: 680px) {
	.tbh-wrap { font-size: 15px; }
	.tbh-header { gap: 14px; }
	.tbh-logo { width: 58px; height: 58px; }
	.tbh-brand { font-size: 1.35rem !important; }
	.tbh-brand-sub { font-size: .95rem; }
	.tbh-brand-contact { font-size: .74rem; }
	.tbh-grid { grid-template-columns: 1fr; }
	.tbh-span-2 { grid-column: auto; }
	.tbh-section-body { padding: 13px; }
	.tbh-canvas { height: 110px; }
}

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

/* ------------------------------------------------------------------- print */

@media print {
	.tbh-actions, .tbh-clear, .tbh-status { display: none !important; }
	.tbh-wrap { max-width: none; font-size: 10pt; }
	.tbh-section { break-inside: avoid; border-color: #999; }
	.tbh-section-title { background: #eee !important; color: #000 !important; }
	.tbh-canvas { height: 80px; }
	@page { size: letter; margin: .5in; }
}
