/*
 * GAS Risk Assessments front end styling. Everything is scoped under
 * .gasra so it never leaks into the surrounding Kadence theme, and never
 * inherits page styles it should not. Font is set explicitly to IBM Plex
 * Sans (self-hosted, see the @font-face rules below) per the design brief.
 */

/*
 * IBM Plex Sans, self-hosted (SIL Open Font License 1.1, see ../fonts/OFL.txt).
 * Latin and Latin Extended subsets, weights 400 to 700.
 */
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	src: url('../fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 500;
	src: url('../fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 500;
	src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 600;
	src: url('../fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 600;
	src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 700;
	src: url('../fonts/ibm-plex-sans-latin-ext-700-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 700;
	src: url('../fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}


.gasra-shell {
	/* Verified directly against the reference implementation's own
	   computed styles (grand-avenue-assessment-ui), not re-derived from
	   grandavenue.com's marketing site: navy #00539f is the one accent
	   color used throughout (eyebrows, links, icons), #009d57 is the
	   button green (matches the Request a Demo button in grandavenue.com's header), and the lilac #9facd5 is the disclaimer box's
	   left-border accent. */
	--gasra-color-text: #1d2433;
	--gasra-color-text-soft: #5c6370;
	--gasra-color-primary: #009d57;
	--gasra-color-primary-disabled: #8cd3b3;
	--gasra-color-secondary: #9facd5;
	--gasra-color-hover: #00bbcc;
	--gasra-color-border: #d8e1e9;
	--gasra-color-surface: #f6f7fa;
	--gasra-color-icon-bg: #00539f;
	--gasra-color-icon-surface: #e8f1f8;
	/* The one accent used for eyebrows, the per-question domain eyebrow,
	   links/back buttons, and the selected-answer border — the same navy
	   as --gasra-color-icon-bg, kept as its own token since it is used
	   for a different purpose (text/border, not an icon fill). */
	--gasra-color-accent: #00539f;
	--gasra-radius: 7px;
	--gasra-radius-btn: 4px;
	--gasra-radius-lg: 10px;
	--gasra-max-width: 1040px;
	--gasra-side-padding: clamp(20px, 4vw, 48px);

	box-sizing: border-box;
	max-width: var(--gasra-max-width);
	margin-inline: auto;
	font-family: "IBM Plex Sans", sans-serif;
	color: var(--gasra-color-text);
	background: #fff;
	border: 1px solid var(--gasra-color-border);
	border-radius: var(--gasra-radius-lg);
	box-shadow: 0 1px 3px rgba(29, 36, 51, 0.06);
	overflow: hidden;
}

.gasra-shell *,
.gasra-shell *::before,
.gasra-shell *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------------
 * Header: logo + assessment kicker, shared across every screen
 * ------------------------------------------------------------------- */

.gasra-header {
	display: flex;
	align-items: center;
	gap: 0.85em;
	padding: 1.1em var(--gasra-side-padding);
	border-bottom: 1px solid var(--gasra-color-border);
	flex-wrap: wrap;
}

.gasra-header-logo {
	display: block;
	height: 22px;
	width: auto;
}

.gasra-header-divider {
	width: 1px;
	height: 1.2em;
	background: var(--gasra-color-border);
	flex-shrink: 0;
}

.gasra-header-label {
	font-size: 0.9rem;
	color: var(--gasra-color-text-soft);
}

.gasra-screen {
	padding: clamp(1.25em, 4vw, 2em) var(--gasra-side-padding);
}

.gasra-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------
 * Eyebrow label: the small caps kicker above a screen's own heading
 * (intro, email gate, results) and, inline with its domain icon, above
 * each question's own text.
 * ------------------------------------------------------------------- */

.gasra-eyebrow {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gasra-color-accent);
	margin-bottom: 0.2em;
}

.gasra-eyebrow-center {
	text-align: center;
}

/* ---------------------------------------------------------------------
 * Motion: screen transitions, staggered card reveal, and the score ring's
 * animated fill. Every animation/transition here is neutralized under
 * prefers-reduced-motion at the bottom of this file; nothing here is
 * load-bearing for function, only for feel.
 * ------------------------------------------------------------------- */

@keyframes gasraFadeInUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Runs every time a screen's [hidden] attribute is removed: unlike a CSS
   transition, a CSS animation restarts on its own the moment an element
   goes from display:none to visible, so this needs no JS beyond the
   existing hidden-attribute toggling in showScreen(). */
.gasra-screen:not([hidden]) {
	animation: gasraFadeInUp 0.35s ease both;
}

/* A light stagger across the results screen's own cards so they read as a
   cascade rather than one flat block appearing at once. */
.gasra-screen-results.gasra-screen:not([hidden]) .gasra-card {
	animation: gasraFadeInUp 0.4s ease both;
}

.gasra-screen-results .gasra-card:nth-of-type(1) {
	animation-delay: 0.05s;
}

.gasra-screen-results .gasra-card:nth-of-type(2) {
	animation-delay: 0.12s;
}

.gasra-screen-results .gasra-card:nth-of-type(3) {
	animation-delay: 0.19s;
}

.gasra-screen-results .gasra-card:nth-of-type(4) {
	animation-delay: 0.26s;
}

.gasra-screen-results .gasra-card:nth-of-type(5) {
	animation-delay: 0.33s;
}

/* Boxed "card" look for the intro, each question, the email gate, and every
   section of the results screen, so the assessment reads as a set of
   distinct panels rather than bare page content. Declared after
   .gasra-screen so its padding shorthand wins over padding-block above. */
.gasra-card {
	background: #fff;
	border: 1px solid var(--gasra-color-border);
	border-radius: var(--gasra-radius);
	padding: 1.5em clamp(1.25em, 4vw, 2em);
	margin-bottom: 1.25em;
	box-shadow: 0 1px 3px rgba(29, 36, 51, 0.06);
}

.gasra-card > h3:first-child,
.gasra-cta-heading {
	font-size: 1.15rem;
	font-weight: 700;
	margin-top: 0;
}

/* GAS blue (#00539f), the same navy the Grand Avenue theme uses for its headings. */
.gasra-title {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gasra-color-accent, #00539f);
	margin: 0 0 0.5em;
}

.gasra-title-center {
	text-align: center;
}

.gasra-description {
	margin: 0 0 1.5em;
	max-width: 60ch;
	color: var(--gasra-color-text-soft);
}

.gasra-description-center {
	text-align: center;
	max-width: 46ch;
	margin-inline: auto;
}

/* ---------------------------------------------------------------------
 * Intro screen: head row (title + time pill), domain grid, disclaimer
 * ------------------------------------------------------------------- */

.gasra-intro-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5em;
	flex-wrap: wrap;
	margin-bottom: 1.5em;
}

.gasra-intro-head .gasra-title,
.gasra-intro-head .gasra-description {
	margin-bottom: 0;
}

.gasra-intro-head-text .gasra-title {
	margin-bottom: 0.4em;
}

.gasra-time-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	flex-shrink: 0;
	padding: 0.5em 0.9em;
	border: 1px solid var(--gasra-color-border);
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--gasra-color-text-soft);
}

.gasra-time-pill svg {
	width: 16px;
	height: 16px;
	color: var(--gasra-color-accent);
}

.gasra-domain-grid-heading {
	font-weight: 600;
	margin: 0 0 0.75em;
}

.gasra-domain-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin: 0 0 1.5em;
}

.gasra-domain-card {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.9em 1em;
	border: 1px solid var(--gasra-color-border);
	border-radius: var(--gasra-radius);
	background: #fbfcfd;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.gasra-domain-card-label {
	font-weight: 600;
}

.gasra-domain-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	/* Pastel bg + colored stroke by default; a custom per-domain color
	   (set inline by gasra_render_domain_icon()) overrides both together. */
	background: var(--gasra-color-icon-surface);
	color: var(--gasra-color-icon-bg);
}

.gasra-domain-icon svg {
	width: 20px;
	height: 20px;
	color: inherit;
}

/* Uploaded icon: drawn as a mask so the icon color tints it (single-color artwork on a transparent background). */
.gasra-domain-icon .gasra-icon-mask {
	display: block;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}


/* Light tint + colored left border, not a solid-tinted box: matches the
   reference implementation's own callout treatment (verified via its
   computed styles — a near-white background with a 3px lilac left
   border, not the flat light-blue fill this used to have). */
.gasra-disclaimer {
	font-size: 0.9rem;
	color: var(--gasra-color-text-soft);
	padding: 0.9em 1.1em;
	border-radius: 0 5px 5px 0;
	border-left: 3px solid var(--gasra-color-secondary);
	background: #f5f8fb;
	margin: 0 0 1.5em;
}

.gasra-intro-actions {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1.5em;
	flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------- */

.gasra-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.7rem 1.4rem;
	font-size: 1rem;
	font-family: inherit;
	font-weight: 600;
	border: none;
	border-radius: var(--gasra-radius-btn);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.gasra-btn:not(:disabled):hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(29, 36, 51, 0.15);
}

.gasra-btn:not(:disabled):active {
	transform: translateY(0) scale(0.98);
	box-shadow: none;
}

.gasra-btn::after {
	content: '\2192';
	line-height: 1;
}

.gasra-btn-secondary.gasra-back::after {
	content: none;
}

.gasra-btn-secondary.gasra-back::before {
	content: '\2190';
	line-height: 1;
	margin-inline-end: 0.5em;
}

/* Green is reserved for the primary CTAs: Start, Next question, Submit,
   Request a demo — the buttons that move the visitor forward. */
.gasra-btn-primary {
	background: var(--gasra-color-primary);
	color: #fff;
}

.gasra-btn-primary:not(:disabled):hover,
.gasra-btn-primary:not(:disabled):focus-visible {
	background: #00834a;
	color: #fff;
}

/* Disabled "Next question"/"Continue to results" before an answer is
   picked: a visibly lighter fill (not a dimmed/translucent one), so it
   still reads as a real button rather than a greyed-out placeholder. */
.gasra-btn-primary:disabled {
	background: var(--gasra-color-primary-disabled);
	color: #fff;
	cursor: not-allowed;
}

/* White, bordered, blue text: used for Back, Retake assessment and
   Print/save report — secondary actions that should never compete with
   the green primary buttons on the same screen. */
.gasra-btn-secondary {
	background: #fff;
	border: 1px solid var(--gasra-color-border);
	color: var(--gasra-color-accent);
}

.gasra-btn-secondary:not(:disabled):hover,
.gasra-btn-secondary:not(:disabled):focus-visible {
	background: var(--gasra-color-icon-surface);
	border-color: var(--gasra-color-accent);
	color: var(--gasra-color-accent);
}

.gasra-btn-secondary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------------
 * Progress bar
 * ------------------------------------------------------------------- */

.gasra-progress-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1em;
	margin: 0 0 0.6em;
}

.gasra-progress-label,
.gasra-progress-pct {
	font-size: 0.85rem;
	color: var(--gasra-color-text-soft);
	margin: 0;
}

.gasra-progress-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--gasra-color-border);
	overflow: hidden;
	margin-bottom: 1.5em;
}

.gasra-progress-fill {
	height: 100%;
	background: var(--gasra-color-primary);
	transition: width 0.2s ease;
}

/* ---------------------------------------------------------------------
 * Question / answers
 * ------------------------------------------------------------------- */

.gasra-question-eyebrow-row {
	display: flex;
	align-items: center;
	gap: 0.65em;
	margin-bottom: 0.9em;
}

.gasra-question-eyebrow-row .gasra-domain-icon {
	width: 32px;
	height: 32px;
}

.gasra-question-eyebrow-row .gasra-domain-icon svg,
.gasra-question-eyebrow-row .gasra-domain-icon .gasra-icon-mask {
	width: 16px;
	height: 16px;
}

.gasra-question-eyebrow-row .gasra-eyebrow {
	margin-bottom: 0;
}

.gasra-question-fieldset {
	border: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.gasra-question-text {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	padding: 0;
	margin-bottom: 0.3em;
}

.gasra-question-sub {
	color: var(--gasra-color-text-soft);
	margin: 0 0 1.25em;
}

.gasra-option {
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	padding: 0.85em 1em;
	margin-bottom: 0.6em;
	border: 1px solid var(--gasra-color-border);
	border-radius: var(--gasra-radius);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.gasra-option:hover {
	border-color: var(--gasra-color-accent);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(29, 36, 51, 0.08);
}

.gasra-option:has(.gasra-radio:checked) {
	border-color: var(--gasra-color-accent);
	background: #eff4fe;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.gasra-radio {
	margin-top: 0.2em;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	accent-color: var(--gasra-color-accent);
	transition: transform 0.15s ease;
}

.gasra-radio:checked {
	transform: scale(1.1);
}

.gasra-nav {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
 * Email gate
 * ------------------------------------------------------------------- */

.gasra-email-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 440px;
	margin: 0 auto 1.75em;
}

.gasra-email-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--gasra-color-icon-surface);
	color: var(--gasra-color-icon-bg);
	margin-bottom: 1em;
}

.gasra-email-icon svg {
	width: 26px;
	height: 26px;
}

.gasra-email-form {
	max-width: 440px;
	margin-inline: auto;
}

.gasra-field {
	display: block;
	font-weight: 600;
	margin-bottom: 1em;
}

.gasra-field input {
	display: block;
	width: 100%;
	font-size: 1rem;
	font-family: inherit;
	font-weight: normal;
	padding: 0.6em 0.8em;
	margin-top: 0.4em;
	border: 1px solid var(--gasra-color-border);
	border-radius: var(--gasra-radius);
}

.gasra-checkbox-field {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	margin-bottom: 1em;
}

.gasra-email-form .gasra-submit {
	width: 100%;
	justify-content: center;
}

.gasra-text-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	width: 100%;
	margin-top: 1em;
	background: none;
	border: none;
	padding: 0;
	font-size: 0.9rem;
	font-weight: 600;
	font-family: inherit;
	color: var(--gasra-color-accent);
	cursor: pointer;
}

.gasra-text-link::before {
	content: '\2190';
	line-height: 1;
}

.gasra-text-link:hover,
.gasra-text-link:focus-visible {
	text-decoration: underline;
}

.gasra-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.gasra-error {
	color: #a30000;
	font-weight: 600;
	margin-bottom: 1em;
}

/* ---------------------------------------------------------------------
 * Results
 * ------------------------------------------------------------------- */

.gasra-results-prepared-for {
	font-size: 0.85rem;
	color: var(--gasra-color-text-soft);
	margin: -0.75em 0 1.5em;
}

.gasra-results-overall {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	margin-bottom: 0.5em;
}

/* Lower than it was before the overall-score card started sharing a row
   with "Results by area" (see .gasra-results-summary-row): it's narrower
   now, so the ring and this text block need to comfortably fit side by
   side at a smaller combined width than when this card spanned the full
   results width alone. Always stays side by side (no flex-wrap) per the
   reference design. */
.gasra-results-overall-text {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	min-width: 140px;
}

.gasra-results-overall-label {
	font-size: 1.05rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0.2em 0 0;
}

/* Registering --gasra-ring-pct as an animatable <number> (default 0) is
   what lets the transition below actually tween the conic-gradient's stop
   position instead of snapping straight to the final value; browsers
   without @property support just skip the transition and render the
   final ring correctly with no animation, which is a fine fallback. */
@property --gasra-ring-pct {
	syntax: '<number>';
	inherits: true;
	initial-value: 0;
}

/* Radial score gauge: a conic-gradient ring colored to the result's tier,
   with an inner white disc so it reads as a gauge rather than a solid pie.
   --gasra-ring-color is set by JS as soon as the tier is known; --gasra-
   ring-pct is set one frame later (see renderResults() in frontend.js) so
   this transition has a real 0 to visible "fill in" to animate. */
.gasra-score-ring {
	--gasra-ring-pct: 0;
	--gasra-ring-color: var(--gasra-color-border);
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: conic-gradient(var(--gasra-ring-color) calc(var(--gasra-ring-pct) * 1%), var(--gasra-color-border) 0);
	transition: --gasra-ring-pct 0.8s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.gasra-score-ring-inner {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gasra-results-pct {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
}

.gasra-results-tier-description {
	margin: 0;
	max-width: 60ch;
}

.gasra-results-raw-score {
	margin: 0;
	font-size: 0.85rem;
	opacity: 0.7;
}

.gasra-card-subhead {
	margin: -0.5em 0 1em;
	opacity: 0.75;
}

/* Tier badge base styling; its background/text color are set inline by JS
   from TIER_COLORS in frontend.js, GAS's own published palette (the same
   colors power the score ring, each domain's result bar, and the risk
   scale legend below, so the whole results screen reads as one system). */
.gasra-tier-badge {
	display: inline-block;
	width: fit-content;
	padding: 0.35em 0.9em;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	background: var(--gasra-color-border);
	color: var(--gasra-color-text);
}

.gasra-results-domains {
	display: grid;
	grid-template-columns: 1fr;
}

.gasra-domain-row {
	margin-bottom: 0.9em;
}

.gasra-domain-row-head {
	display: flex;
	flex-wrap: wrap;
	row-gap: 4px;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	margin-bottom: 0.3em;
}

.gasra-domain-row-value {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

/* Smaller than the main results-screen tier badge (.gasra-tier-badge),
   since this one sits inline next to each domain's own percentage rather
   than standing alone as the headline result. */
.gasra-domain-tier {
	padding: 0.15em 0.6em;
	font-size: 0.72rem;
}

.gasra-domain-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--gasra-color-border);
	overflow: hidden;
}

.gasra-domain-bar-fill {
	height: 100%;
	/* Default/fallback only: JS sets the actual color per row from
	   TIER_COLORS, classifying that domain's own percentage against the
	   assessment's risk bands, same scale as the tier badge and legend.
	   The percentage is also always shown as text next to the bar, so the
	   bar's color is never the only way to read the value. */
	background: #5c6370;
	transition: width 0.3s ease;
}

.gasra-top-risks-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 1.5em 0 2em;
}

.gasra-risk-card {
	border: 1px solid var(--gasra-color-border);
	border-left: 4px solid var(--gasra-color-border);
	border-radius: var(--gasra-radius);
	padding: 1em 1.2em;
	background: var(--gasra-color-surface);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gasra-risk-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(29, 36, 51, 0.08);
}

/* Left-border color keyed to this card's domain's own already-computed
   tier (same tier shown on its "Results by area" row above), using the
   same ring/bar tone as the rest of the results screen. */
.gasra-risk-card[data-tier='low'] { border-left-color: #1f9d6f; }
.gasra-risk-card[data-tier='moderate'] { border-left-color: #b9830c; }
.gasra-risk-card[data-tier='high'] { border-left-color: #dc2626; }
.gasra-risk-card[data-tier='critical'] { border-left-color: #991b1b; }

.gasra-risk-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75em;
	margin-bottom: 0.4em;
}

.gasra-risk-domain {
	font-size: 1.05rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

.gasra-risk-answer {
	margin: 0 0 0.5em;
}

.gasra-risk-guidance {
	margin: 0 0 0.3em;
	color: var(--gasra-color-text-soft);
}

.gasra-risk-guidance a {
	color: var(--gasra-color-accent);
}

.gasra-risk-source {
	font-size: 0.85rem;
	opacity: 0.75;
}

/* Text block + button sit side by side (button vertically centered to the
   right), not stacked — matches the reference's CTA card layout. Wraps to
   stacked on narrow screens via gasra-results-cta-card's own flex-wrap. */
.gasra-cta-text {
	flex: 1 1 auto;
}

.gasra-cta-heading {
	margin: 0 0 0.35em;
}

.gasra-cta-body {
	font-size: 0.9rem;
	color: var(--gasra-color-text-soft);
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Results summary row: the overall score card and "Results by area" sit
 * side by side on wider screens, stacking on narrow ones. "Results by
 * area" gets more width since it has its own internal two-column grid of
 * domain rows (see .gasra-results-domains) that needs the room.
 * ------------------------------------------------------------------- */

.gasra-results-summary-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25em;
	align-items: stretch;
	margin-bottom: 1.25em;
}

.gasra-results-summary-row .gasra-results-summary {
	flex: 1 1 280px;
	margin-bottom: 0;
}

.gasra-results-summary-row .gasra-results-domains-card {
	flex: 2 1 380px;
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------
 * Results footer: the CTA card and the "How to read this score" legend
 * sit side by side on wider screens (the CTA gets more width), stacking
 * on narrow ones.
 * ------------------------------------------------------------------- */

.gasra-results-footer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25em;
	align-items: stretch;
}

.gasra-results-footer-row .gasra-results-cta-card {
	flex: 1 1 calc(70% - 0.625em);
	min-width: 320px;
	margin-bottom: 0;
	display: flex;
	align-items: center;
	gap: 1.5em;
}

.gasra-results-footer-row .gasra-results-cta-card .gasra-cta-text {
	flex: 1 1 0%;
	min-width: 0;
}

.gasra-results-footer-row .gasra-results-cta-card .gasra-demo-cta {
	flex-shrink: 0;
}

.gasra-results-footer-row .gasra-risk-scale-card {
	flex: 1 1 calc(30% - 0.625em);
	min-width: 260px;
	margin-bottom: 0;
	padding-left: 1.25em;
	padding-right: 1.25em;
}

/* ---------------------------------------------------------------------
 * Risk scale legend and results actions
 * ------------------------------------------------------------------- */

/* Chips always sit side by side in a single row, each sharing the row
   equally — this card is narrow (30% of the footer row), so the chips
   shrink to fit rather than wrapping to stacked. */
.gasra-risk-scale {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
}

.gasra-risk-scale-item {
	flex: 1 1 0;
	min-width: 0;
	padding: 0.4em 0.15em;
	border: 2px solid transparent;
	border-radius: var(--gasra-radius);
	background: var(--gasra-color-surface);
}

/* Soft tints matching the score ring/badge/domain bar palette (the same
   badgeBg values TIER_COLORS uses in frontend.js), so the legend visually
   keys to the rest of the results screen even before a band is
   highlighted as the visitor's own result. */
.gasra-risk-scale-item[data-tier='low'] {
	background: #e3f5ec;
}

.gasra-risk-scale-item[data-tier='moderate'] {
	background: #faf0d6;
}

.gasra-risk-scale-item[data-tier='high'] {
	background: #fee2e2;
}

.gasra-risk-scale-item[data-tier='critical'] {
	background: #fecaca;
}

.gasra-risk-scale-item.is-current {
	border-color: var(--gasra-color-text);
	box-shadow: 0 0 0 2px rgba(29, 36, 51, 0.08);
	animation: gasraPulseOnce 1.2s ease-out;
}

@keyframes gasraPulseOnce {
	0% {
		box-shadow: 0 0 0 0 rgba(29, 36, 51, 0.25);
	}

	70% {
		box-shadow: 0 0 0 10px rgba(29, 36, 51, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(29, 36, 51, 0);
	}
}

.gasra-risk-scale-item[data-tier='low'].is-current {
	border-color: #1f9d6f;
}

.gasra-risk-scale-item[data-tier='moderate'].is-current {
	border-color: #b9830c;
}

.gasra-risk-scale-item[data-tier='high'].is-current {
	border-color: #dc2626;
}

.gasra-risk-scale-item[data-tier='critical'].is-current {
	border-color: #991b1b;
}

.gasra-risk-scale-tier {
	display: block;
	font-size: 0.56rem;
	font-weight: 700;
	margin-bottom: 0.15em;
	white-space: nowrap;
}

.gasra-risk-scale-range {
	display: block;
	font-size: 0.68rem;
	opacity: 0.75;
	white-space: nowrap;
}

.gasra-results-disclaimer {
	font-size: 0.9rem;
	color: var(--gasra-color-text-soft);
	padding-top: 1.5em;
	margin: 1.25em 0 0;
	border-top: 1px solid var(--gasra-color-border);
}

.gasra-results-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 1.25em;
}

.gasra-results-actions svg {
	width: 18px;
	height: 18px;
}

/* No trailing arrow on these two — they carry their own leading icon
   instead (set via the svg markup in frontend-app.php), same override
   pattern as the Back button above. */
.gasra-results-actions .gasra-btn::after {
	content: none;
}

/* ---------------------------------------------------------------------
 * Focus and keyboard access. Never suppressed without a replacement.
 * ------------------------------------------------------------------- */

.gasra a:focus-visible,
.gasra button:focus-visible,
.gasra input:focus-visible,
.gasra [tabindex]:focus-visible {
	/* Not the hover cyan: that only reaches 2.34:1 against a light page
	   background, short of the 3:1 WCAG needs for a focus indicator.
	   This darker neutral reaches 6.05:1. Covers the results heading
	   too, which JS moves focus to on a tabindex="-1" element. */
	outline: 3px solid #5c6370;
	outline-offset: 2px;
}

.gasra-option:focus-within {
	border-color: var(--gasra-color-accent);
}

/* ---------------------------------------------------------------------
 * Mobile first: the base rules above already stack full width; from
 * tablet width up, question navigation and results widen slightly.
 * ------------------------------------------------------------------- */

@media (min-width: 480px) {
	/* auto-fit rather than a fixed column count: an assessment can have
	   any number of domains, not just three, so this settles into 2-3
	   even columns at this width and more at the wider breakpoint below,
	   however many domains a given assessment actually has. */
	.gasra-domain-grid {
		grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	}
}

@media (min-width: 600px) {
	.gasra-title {
		font-size: 1.85rem;
	}

	.gasra-domain-grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}

	.gasra-score-ring {
		width: 128px;
		height: 128px;
	}

	.gasra-score-ring-inner {
		width: 100px;
		height: 100px;
	}

	.gasra-results-pct {
		font-size: 1.85rem;
	}
}

/* ---------------------------------------------------------------------
 * Respect prefers-reduced-motion: every animation/transition added above
 * (screen fades, card stagger, ring fill, bar fill, hover lifts, the
 * legend pulse) is purely decorative, never load-bearing for function or
 * for reading content, so this can safely flatten all of it to instant.
 * ------------------------------------------------------------------- */

/* Mobile: the summary/footer rows' side-by-side cards and the score
   ring + text block are all tuned for tablet/desktop widths (fixed
   min-widths, no flex-wrap, so they stay side by side exactly as
   designed there) — none of which leaves room on a phone, so this
   switches each to a single stacked column instead of overflowing. */
@media (max-width: 640px) {
	.gasra-results-summary-row,
	.gasra-results-footer-row {
		flex-direction: column;
	}

	.gasra-results-summary-row .gasra-results-summary,
	.gasra-results-summary-row .gasra-results-domains-card,
	.gasra-results-footer-row .gasra-results-cta-card,
	.gasra-results-footer-row .gasra-risk-scale-card {
		flex-basis: auto;
		min-width: 0;
	}

	.gasra-results-overall {
		flex-wrap: wrap;
	}

	/* The CTA card's text + button are sized for the desktop side-by-side
	   layout (text's flex-basis:0% lets the button claim its own width
	   first, text filling the rest) — once this card stacks to a single
	   mobile column, that same 0% basis makes text invisible to the
	   wrap-line-fitting calculation, collapsing it to near zero width
	   instead of dropping to its own line. Resetting to auto here lets it
	   wrap properly: button on top, full-width text below. */
	.gasra-results-footer-row .gasra-results-cta-card {
		flex-wrap: wrap;
	}

	.gasra-results-footer-row .gasra-results-cta-card .gasra-cta-text {
		flex: 1 1 auto;
	}

	/* Stacked to a full-width column above, this card still isn't quite
	   wide enough at phone widths for "Medium Risk" (the longest label)
	   to stay on one line at the desktop-tuned padding/gap, so both are
	   trimmed further here specifically. */
	.gasra-results-footer-row .gasra-risk-scale-card {
		padding-left: 0.75em;
		padding-right: 0.75em;
	}

	.gasra-risk-scale {
		gap: 4px;
	}

	.gasra-risk-scale-item {
		padding: 0.4em 0.15em;
	}
}

/* Very narrow phones (e.g. a first-generation iPhone SE): even the mobile
   tightening above isn't quite enough room for "Medium Risk" on one line
   at a legible size, so this lets the label wrap to two lines there
   instead of clipping — still fully inside the chip either way. */
@media (max-width: 360px) {
	.gasra-risk-scale-tier,
	.gasra-risk-scale-range {
		white-space: normal;
	}

	/* The CTA button's own natural width (icon + label + padding) no
	   longer fits this narrow a column even on its own wrapped line, so
	   it goes full width here instead of overflowing. */
	.gasra-results-footer-row .gasra-results-cta-card .gasra-demo-cta {
		width: 100%;
		box-sizing: border-box;
		justify-content: center;
		padding-left: 0.9rem;
		padding-right: 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gasra-shell,
	.gasra-shell *,
	.gasra-shell *::before,
	.gasra-shell *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------------------
 * Print / "save as PDF": only the results screen is ever visible when
 * this fires (every other .gasra-screen carries the hidden attribute at
 * that point), so this only needs to trim the results screen's own
 * interactive chrome.
 * ------------------------------------------------------------------- */

@media print {
	.gasra-results-actions,
	.gasra-results-cta-card {
		display: none !important;
	}

	.gasra-card {
		box-shadow: none;
		break-inside: avoid;
	}
}
