/*
 * TXCR Case Check - component styles.
 *
 * Skinned to the existing TX Case Review identity rather than to the
 * California design system: Texas-flag navy and red, Lato, the same square
 * corners and hairline rules the hand-written pages already use. Every value
 * is a token so a future rebrand is one block, not a hunt.
 */

.txcr-cc,
.txcr-hero {
	--txcr-navy: #002868;
	--txcr-deep: #001A45;
	--txcr-navy-600: #12408C;
	--txcr-red: #BF0A30;
	--txcr-red-dark: #8E0722;
	--txcr-red-tint: #FDF0F2;
	--txcr-surface: #FFFFFF;
	--txcr-surface-alt: #F6F8FB;
	--txcr-sunk: #EEF3FA;
	--txcr-ink: #0B1220;
	--txcr-mut: #5A6B85;
	--txcr-line: #E2E8F0;
	--txcr-line-strong: #C9D4E4;
	--txcr-ok: #0B7A4B;
	--txcr-ok-tint: #E6F4EC;
	--txcr-err: #B3261E;
	--txcr-err-tint: #FBEAE9;
	--txcr-radius: 10px;
	--txcr-radius-sm: 8px;
	--txcr-shadow-sm: 0 1px 2px rgba(0, 26, 69, .06);
	--txcr-shadow-md: 0 6px 18px -6px rgba(0, 26, 69, .16);
	--txcr-shadow-lg: 0 24px 60px -24px rgba(0, 26, 69, .40);
	--txcr-font: Lato, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--txcr-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ==================================================================
 * The card
 * ================================================================== */

.txcr-cc {
	font-family: var(--txcr-font);
	color: var(--txcr-ink);
	background: var(--txcr-surface);
	border: 1px solid var(--txcr-line);
	border-radius: var(--txcr-radius);
	box-shadow: var(--txcr-shadow-md);
	max-width: 640px;
	margin-inline: auto;
	overflow: hidden;
	text-align: left;
}
.txcr-cc *,
.txcr-cc *::before,
.txcr-cc *::after { box-sizing: border-box; }

.txcr-cc__title {
	font-size: 1.6rem;
	line-height: 1.2;
	text-align: center;
	margin: 0 0 24px;
	color: var(--txcr-navy);
}

/* A red hairline along the top edge, echoing the section rules already used
   across the site. */
.txcr-cc__head {
	padding: 22px 26px 0;
	border-top: 3px solid var(--txcr-red);
}
.txcr-cc__eyebrow {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; margin-bottom: 12px;
}
.txcr-cc__label {
	font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
	color: var(--txcr-red);
}
.txcr-cc__count {
	font-size: 12px; color: var(--txcr-mut); font-variant-numeric: tabular-nums;
	letter-spacing: .04em;
}
.txcr-cc__progress {
	height: 4px; border-radius: 999px; background: var(--txcr-sunk); overflow: hidden;
}
.txcr-cc__bar {
	height: 100%; width: 0; border-radius: inherit;
	background: linear-gradient(90deg, var(--txcr-navy), var(--txcr-navy-600));
	transition: width .42s var(--txcr-ease);
}

.txcr-cc__body { padding: 22px 26px 26px; }

.txcr-cc__fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.txcr-cc__fieldset:last-of-type { margin-bottom: 0; }

.txcr-cc__legend {
	display: block; width: 100%; padding: 0; border: 0; margin: 0 0 8px;
	font-size: 1.32rem; font-weight: 800; line-height: 1.25;
	letter-spacing: -.01em; color: var(--txcr-navy);
}
.txcr-cc__legend:focus { outline: none; }
.txcr-cc__help { font-size: .92rem; color: var(--txcr-mut); margin: 0 0 20px; line-height: 1.5; }

.txcr-cc__options { display: grid; gap: 10px; margin-bottom: 6px; }
.txcr-cc__fields { display: grid; gap: 0; }
.txcr-cc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.txcr-cc__nav {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--txcr-line);
}
.txcr-cc__back {
	background: none; border: 0; color: var(--txcr-mut); font: inherit; font-weight: 700;
	cursor: pointer; padding: 10px 4px; min-height: 44px;
	display: inline-flex; align-items: center; gap: 6px;
}
.txcr-cc__back:hover { color: var(--txcr-navy); }
.txcr-cc__back[hidden] { visibility: hidden; display: inline-flex; }

/* Honeypot: hidden from sight and from assistive technology, without a large
   negative offset that could extend the document box. */
.txcr-cc__hp {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0; opacity: 0; pointer-events: none;
}

.txcr-cc__status { margin-top: 14px; }

.txcr-cc__note {
	max-width: 640px; margin: 12px auto 0; text-align: center;
	font-size: .82rem; color: var(--txcr-mut); font-family: var(--txcr-font);
}
.txcr-cc__legal {
	max-width: 640px; margin: 16px auto 0; text-align: center;
	font-size: .78rem; line-height: 1.55; color: var(--txcr-mut); font-family: var(--txcr-font);
}

/* ==================================================================
 * Choices
 * ================================================================== */

.txcr-choice {
	position: relative; display: flex; align-items: center; gap: 14px;
	min-height: 62px; padding: 14px 18px;
	border: 1.5px solid var(--txcr-line); border-radius: var(--txcr-radius-sm);
	background: var(--txcr-surface); cursor: pointer;
	transition: border-color .2s var(--txcr-ease), background-color .2s var(--txcr-ease), box-shadow .2s var(--txcr-ease);
}
.txcr-choice:hover { border-color: var(--txcr-navy); background: var(--txcr-surface-alt); }
.txcr-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.txcr-choice__mark {
	flex: none; width: 22px; height: 22px;
	border: 2px solid var(--txcr-line-strong); border-radius: 50%;
	display: grid; place-items: center;
	transition: border-color .2s var(--txcr-ease), background-color .2s var(--txcr-ease);
}
.txcr-choice__mark::after {
	content: ""; width: 10px; height: 10px; border-radius: inherit; background: #fff;
	transform: scale(0); transition: transform .2s cubic-bezier(.34, 1.32, .64, 1);
}
.txcr-choice input:checked ~ .txcr-choice__mark { border-color: var(--txcr-navy); background: var(--txcr-navy); }
.txcr-choice input:checked ~ .txcr-choice__mark::after { transform: scale(1); }
.txcr-choice:has(input:checked) { border-color: var(--txcr-navy); background: var(--txcr-surface-alt); box-shadow: var(--txcr-shadow-sm); }
.txcr-choice:has(input:focus-visible) { outline: 3px solid var(--txcr-navy-600); outline-offset: 2px; }
.txcr-choice__label { font-weight: 700; line-height: 1.35; }
.txcr-choice__desc { display: block; font-weight: 400; font-size: .8rem; color: var(--txcr-mut); margin-top: 2px; }

/* ==================================================================
 * Fields
 * ================================================================== */

.txcr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.txcr-label { font-size: .86rem; font-weight: 700; color: var(--txcr-ink); }
.txcr-label__optional { font-weight: 400; color: var(--txcr-mut); }
.txcr-hint { font-size: .76rem; color: var(--txcr-mut); }

.txcr-input {
	width: 100%; min-height: 48px; padding: 12px 14px;
	border: 1px solid var(--txcr-line-strong); border-radius: var(--txcr-radius-sm);
	background: var(--txcr-surface); color: var(--txcr-ink);
	font: 400 1rem/1.4 var(--txcr-font);
	transition: border-color .2s var(--txcr-ease), box-shadow .2s var(--txcr-ease);
}
.txcr-input:hover { border-color: #9DAEC6; }
.txcr-input:focus {
	outline: none; border-color: var(--txcr-navy);
	box-shadow: 0 0 0 3px rgba(0, 40, 104, .14);
}
.txcr-input[aria-invalid="true"] {
	border-color: var(--txcr-err); box-shadow: 0 0 0 3px var(--txcr-err-tint);
}

.txcr-consent {
	display: flex; gap: 10px; align-items: flex-start; margin-top: 6px;
	font-size: .82rem; line-height: 1.5; color: var(--txcr-mut); cursor: pointer;
}
.txcr-consent input { margin-top: 3px; flex: none; width: 20px; height: 20px; accent-color: var(--txcr-navy); }

.txcr-error-text {
	display: flex; align-items: flex-start; gap: 6px; margin: 0;
	font-size: .82rem; color: var(--txcr-err); font-weight: 600;
}

.txcr-notice {
	display: flex; gap: 12px; padding: 16px;
	border: 1px solid var(--txcr-line); border-radius: var(--txcr-radius-sm);
	background: var(--txcr-surface-alt); font-size: .88rem; color: var(--txcr-mut);
}
.txcr-notice p { margin: 0 0 4px; }
.txcr-notice__title { font-weight: 700; color: var(--txcr-ink); }
.txcr-notice__icon { flex: none; margin-top: 2px; }
.txcr-notice--error { background: var(--txcr-err-tint); border-color: #F0CDCB; }
.txcr-notice--error .txcr-notice__icon { color: var(--txcr-err); }
.txcr-notice .txcr-btn { margin-top: 12px; }

/* ==================================================================
 * Buttons
 * ================================================================== */

.txcr-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px;
	border: 1px solid transparent; border-radius: var(--txcr-radius-sm);
	background: var(--txcr-navy); color: #fff;
	font: 800 .92rem/1.2 var(--txcr-font);
	letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
	cursor: pointer; text-align: center;
	transition: background-color .2s var(--txcr-ease), border-color .2s var(--txcr-ease), transform .12s var(--txcr-ease), box-shadow .2s var(--txcr-ease);
}
.txcr-btn:hover { background: var(--txcr-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--txcr-shadow-md); }
.txcr-btn:active { transform: translateY(0); }
.txcr-btn:focus-visible { outline: 3px solid var(--txcr-navy-600); outline-offset: 2px; }
.txcr-btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.txcr-btn--accent { background: var(--txcr-red); }
.txcr-btn--accent:hover { background: var(--txcr-red-dark); }
.txcr-btn--outline { background: transparent; color: var(--txcr-navy); border-color: var(--txcr-line-strong); }
.txcr-btn--outline:hover { background: var(--txcr-surface-alt); color: var(--txcr-navy); border-color: var(--txcr-navy); box-shadow: none; }
.txcr-btn--outline-on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .38); }
.txcr-btn--outline-on-dark:hover { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .7); color: #fff; }
.txcr-btn--lg { min-height: 54px; padding-inline: 28px; font-size: .95rem; }
.txcr-btn--sm { min-height: 40px; padding-inline: 16px; font-size: .82rem; }
.txcr-btn__arrow { display: inline-flex; transition: transform .2s var(--txcr-ease); }
.txcr-btn:hover .txcr-btn__arrow { transform: translateX(3px); }

/* ==================================================================
 * Result
 * ================================================================== */

.txcr-cc__result { text-align: center; padding: 30px 8px; }
.txcr-cc__result:focus { outline: none; }
.txcr-cc__result-icon {
	width: 56px; height: 56px; border-radius: 50%;
	display: grid; place-items: center; margin: 0 auto 18px;
}
.txcr-cc__result-icon--ok { background: var(--txcr-ok-tint); color: var(--txcr-ok); }
.txcr-cc__result-title { font-size: 1.3rem; margin: 0 0 10px; color: var(--txcr-navy); }
.txcr-cc__result-body { max-width: 46ch; margin: 0 auto; color: var(--txcr-mut); font-size: .95rem; line-height: 1.6; }
.txcr-cc__ref {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem;
	background: var(--txcr-sunk); padding: 6px 12px; border-radius: 6px;
	display: inline-block; margin-top: 14px; color: var(--txcr-mut);
}

.txcr-state { padding: 28px; text-align: center; color: var(--txcr-mut); }

/* ==================================================================
 * Hero variant - the compact panel that sits beside the headline
 * ================================================================== */

.txcr-cc--hero { max-width: none; box-shadow: var(--txcr-shadow-lg); border-color: rgba(255, 255, 255, .18); }
.txcr-cc--hero .txcr-cc__head { padding: 18px 22px 0; }
.txcr-cc--hero .txcr-cc__body { padding: 18px 22px 22px; }
.txcr-cc--hero .txcr-cc__legend { font-size: 1.16rem; }
.txcr-cc--hero .txcr-cc__help { margin-bottom: 16px; font-size: .86rem; }
.txcr-cc--hero .txcr-choice { min-height: 54px; padding: 11px 15px; }
.txcr-cc--hero .txcr-cc__options { gap: 8px; }

/* On the dark hero ground the note under the panel has to invert. */
.txcr-hero .txcr-cc__note,
.txcr-hero__aside .txcr-cc__note { color: rgba(255, 255, 255, .72); }

/* ==================================================================
 * Hero (Elementor widget)
 * ================================================================== */

.txcr-hero {
	position: relative;
	background: linear-gradient(150deg, var(--txcr-navy) 0%, var(--txcr-deep) 62%, #000E28 100%);
	color: #fff; font-family: var(--txcr-font);
	padding: clamp(48px, 6vw, 88px) 0;
	overflow: hidden;
}
.txcr-hero__inner {
	max-width: 1220px; margin: 0 auto; padding: 0 28px;
	display: grid; gap: clamp(28px, 4vw, 56px); align-items: start;
}
.txcr-hero--split .txcr-hero__inner { grid-template-columns: 1fr; }
@media (min-width: 1000px) {
	.txcr-hero--split .txcr-hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); align-items: center; }
}
.txcr-eyebrow {
	display: inline-block; font-size: 11px; font-weight: 800;
	letter-spacing: .2em; text-transform: uppercase; color: #FF6E82; margin-bottom: 14px;
}
.txcr-hero__title {
	font-size: clamp(2rem, 1.2rem + 2.8vw, 3.1rem); line-height: 1.1;
	letter-spacing: -.015em; margin: 0 0 16px; color: #fff; text-wrap: balance;
}
.txcr-hero__lede {
	font-size: clamp(1rem, .96rem + .2vw, 1.12rem); line-height: 1.65;
	color: #C6D4E8; max-width: 56ch; margin: 0 0 26px;
}
.txcr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.txcr-trust {
	display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 26px;
	font-size: .84rem; color: #9FB3D1;
}
.txcr-trust__item { display: inline-flex; align-items: center; gap: 8px; }
.txcr-trust__item::before {
	content: ""; width: 6px; height: 6px; border-radius: 50%;
	background: var(--txcr-red); flex: none;
}

/* ==================================================================
 * Facts
 * ================================================================== */

.txcr-fact--full {
	border-left: 3px solid var(--txcr-red); background: var(--txcr-surface-alt);
	padding: 16px 18px; border-radius: 0 var(--txcr-radius-sm) var(--txcr-radius-sm) 0;
	font-family: var(--txcr-font);
}
.txcr-fact__statement { margin: 0 0 8px; font-weight: 600; color: var(--txcr-ink); }
.txcr-fact__caveat { margin: 0 0 8px; font-size: .88rem; color: var(--txcr-mut); }
.txcr-fact__cite { margin: 0; font-size: .78rem; color: var(--txcr-mut); }
.txcr-fact__checked { color: #8A98AD; }

/* ==================================================================
 * Motion
 * ================================================================== */

@media (prefers-reduced-motion: reduce) {
	.txcr-cc *, .txcr-hero * { transition: none !important; animation: none !important; }
}

@media (max-width: 560px) {
	.txcr-cc__row { grid-template-columns: 1fr; }
	.txcr-cc__head { padding-inline: 18px; }
	.txcr-cc__body { padding-inline: 18px; }
}

/* Display face, matched to the site's headings. */
.txcr-cc__legend,
.txcr-cc__title,
.txcr-cc__result-title { font-family: Cormorant, Georgia, 'Times New Roman', serif; letter-spacing: 0; }
.txcr-cc__legend { font-size: 1.62rem; font-weight: 700; }
.txcr-cc--hero .txcr-cc__legend { font-size: 1.46rem; }
.txcr-cc__result-title { font-size: 1.5rem; }
