/* TAB Wrapper Quiz
 * Override the custom properties on .twq (e.g. in the Divi child theme) to match brand colors.
 */
.twq {
	--twq-accent: #111111;
	--twq-accent-text: #ffffff;
	--twq-text: #1f1f1f;
	--twq-muted: #5c5c5c;
	--twq-border: #d6d6d6;
	--twq-surface: #ffffff;
	--twq-surface-alt: #f2f2f2;
	--twq-radius: 6px;

	max-width: 760px;
	margin: 0 auto;
	padding: 32px;
	background: var(--twq-surface);
	color: var(--twq-text);
	border: 1px solid var(--twq-border);
	border-radius: var(--twq-radius);
	font-family: inherit;
	line-height: 1.5;
	scroll-margin-top: 120px; /* clears the sticky Divi header when scrolled into view */
}

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

.twq [hidden] { display: none !important; }

.twq h2.twq__title,
.twq h2.twq__question {
	margin: 0 0 12px;
	padding: 0;
	color: var(--twq-text);
	font-size: 28px;
	line-height: 1.25;
}
.twq h2:focus { outline: none; }
.twq h2:focus-visible { outline: 2px solid var(--twq-accent); outline-offset: 4px; }

.twq p { padding: 0; }

.twq__lead { margin: 0 0 24px; font-size: 18px; color: var(--twq-muted); }

.twq__eyebrow {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--twq-muted);
}

/* Progress */
.twq__progress { margin-bottom: 24px; }
.twq__progress-text { display: block; margin-bottom: 6px; font-size: 14px; color: var(--twq-muted); }
.twq__bar { height: 6px; background: var(--twq-surface-alt); border-radius: 3px; overflow: hidden; }
.twq__bar span { display: block; height: 100%; background: var(--twq-accent); }

/* Options */
.twq__options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 20px 0 24px;
}
.twq__option {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 64px;
	margin: 0;
	padding: 14px 18px;
	background: var(--twq-surface);
	color: var(--twq-text);
	border: 2px solid var(--twq-border);
	border-radius: var(--twq-radius);
	font: inherit;
	font-size: 16px;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.twq__option:hover { border-color: var(--twq-accent); }
.twq__option:focus-visible { outline: 2px solid var(--twq-accent); outline-offset: 2px; }
.twq__option[aria-pressed="true"] {
	border-color: var(--twq-accent);
	background: var(--twq-surface-alt);
	font-weight: 600;
}

/* Buttons & links */
.twq__btn {
	display: inline-block;
	margin: 0;
	padding: 14px 28px;
	border: 2px solid var(--twq-accent);
	border-radius: var(--twq-radius);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: opacity .15s, background-color .15s;
}
.twq__btn--primary { background: var(--twq-accent); color: var(--twq-accent-text); }
.twq__btn--primary:hover { opacity: .88; color: var(--twq-accent-text); }
.twq__btn--secondary { background: transparent; color: var(--twq-accent); }
.twq__btn--secondary:hover { background: var(--twq-surface-alt); color: var(--twq-accent); }
.twq__btn:focus-visible { outline: 2px solid var(--twq-accent); outline-offset: 3px; }

.twq__link {
	margin: 0;
	padding: 4px 0;
	background: none;
	border: 0;
	color: var(--twq-muted);
	font: inherit;
	font-size: 15px;
	text-decoration: underline;
	cursor: pointer;
}
.twq__link:hover { color: var(--twq-text); }

/* Result */
.twq__benefit { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.twq__copy { margin: 0 0 16px; font-size: 17px; }
.twq__closer { margin: 0 0 24px; color: var(--twq-muted); }
.twq__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }

@media (max-width: 640px) {
	.twq { padding: 20px 16px; }
	.twq h2.twq__title,
	.twq h2.twq__question { font-size: 22px; }
	.twq__options { grid-template-columns: 1fr; }
	.twq__actions .twq__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.twq * { transition: none !important; }
}


/* ==========================================================
 * TAB brand layer (from tab-quiz-brand.css)
 * Uses div.twq selectors so it overrides the base styles above.
 * ========================================================== */
/* 1. Brand tokens (the quiz reads these variables) */
div.twq {
  --tab-navy: #002B55;
  --tab-sky: #6BAEDF;
  --tab-sky-tint: #EEF6FC;
  --tab-black: #000000;

  --twq-accent: #000000;
  --twq-accent-text: #FFFFFF;
  --twq-text: #222222;
  --twq-muted: #5C5C5C;
  --twq-border: #D6D6D6;
  --twq-surface: #FFFFFF;
  --twq-surface-alt: #F2F2F2;
  --twq-radius: 0px;

  font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 500;
  border: 1px solid var(--twq-border);
  border-top: 4px solid var(--tab-navy);
  border-radius: 0;
  padding: 40px;
}

div.twq h2.twq__title,
div.twq h2.twq__question {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--twq-text);
  margin: 0 0 16px;
}
div.twq h2:focus-visible { outline-color: var(--tab-sky); }

div.twq h2.twq__title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 16px;
  background: var(--tab-sky);
}

div.twq .twq__eyebrow {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tab-navy);
  margin: 0 0 8px;
}

div.twq .twq__lead { font-size: 18px; line-height: 1.6; color: var(--twq-muted); }
div.twq .twq__benefit {
  font-size: 18px;
  font-weight: 700;
  color: var(--tab-navy);
}
div.twq .twq__copy { font-size: 16px; line-height: 1.65; color: #333333; }
div.twq .twq__closer { font-size: 15px; line-height: 1.6; color: var(--twq-muted); }

div.twq .twq__progress-text {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--twq-muted);
}
div.twq .twq__bar { height: 4px; border-radius: 0; background: var(--twq-surface-alt); }
div.twq .twq__bar span { background: var(--tab-navy); transition: width .3s ease; }

div.twq .twq__option {
  border: 1px solid var(--twq-border);
  border-radius: 0;
  background: #FFFFFF;
  color: #333333;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  padding: 16px 20px;
  box-shadow: inset 4px 0 0 transparent;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
div.twq .twq__option:hover {
  border-color: var(--tab-sky);
  background: var(--tab-sky-tint);
  box-shadow: inset 4px 0 0 var(--tab-sky);
}
div.twq .twq__option:focus-visible {
  outline: 2px solid var(--tab-sky);
  outline-offset: 2px;
}
div.twq .twq__option[aria-pressed="true"] {
  border-color: var(--tab-navy);
  background: var(--tab-sky-tint);
  box-shadow: inset 4px 0 0 var(--tab-navy);
  color: var(--tab-navy);
  font-weight: 600;
}

div.twq .twq__btn {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 36px;
  border: 2px solid var(--tab-black);
  border-radius: 50px;
  transition: background-color .15s, border-color .15s, color .15s;
}
div.twq .twq__btn--primary { background: var(--tab-black); color: #FFFFFF; }
div.twq .twq__btn--primary:hover,
div.twq .twq__btn--primary:focus-visible {
  opacity: 1;
  background: var(--tab-navy);
  border-color: var(--tab-navy);
  color: #FFFFFF;
}
div.twq .twq__btn--secondary { background: #FFFFFF; color: var(--tab-black); }
div.twq .twq__btn--secondary:hover,
div.twq .twq__btn--secondary:focus-visible {
  background: var(--tab-black);
  color: #FFFFFF;
}
div.twq .twq__btn:focus-visible { outline: 2px solid var(--tab-sky); outline-offset: 3px; }

div.twq .twq__link {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tab-navy);
}
div.twq .twq__link:hover { color: var(--tab-sky); text-decoration: underline; }

@media (max-width: 640px) {
  div.twq { padding: 24px 18px; }
  div.twq h2.twq__title,
  div.twq h2.twq__question { font-size: 21px; letter-spacing: 2px; }
  div.twq .twq__btn { font-size: 15px; padding: 8px 24px; }
}
