/*
 * msa-connect frontend styles (Task 36 req 3; Task 36b req 1).
 *
 * POSTURE (changed in 0.2.0). The plugin ships its OWN design system rather
 * than inheriting the host theme's. Every selector still sits under the
 * .msa scope so nothing leaks into the theme, but the selectors are no
 * longer deliberately weak: components are single-class or two-class
 * (0,2,0 at most) and the base element reset rides in :where() at 0,1,0, so
 * a theme's bare "h2 {}" loses while nothing here needs !important. The
 * agency's Additional CSS still wins on ties, because
 * Frontend::print_additional_css() prints it at wp_head priority 999,
 * AFTER this sheet. The {theme}/msa-connect/ template override path is
 * unchanged for agencies that want to replace the markup outright.
 *
 * No frameworks, no external fonts, no CDN assets, no JavaScript (Rule 3).
 *
 * COLORS. The two brand settings (--msa-primary, --msa-accent) and every
 * shade PHP derives from them are inlined ahead of this file by
 * Frontend::enqueue_styles(). The fallbacks declared on .msa below are the
 * PLATFORM palette - never one agency's brand; read the block comment on
 * .msa before touching them - so the design renders correctly when no
 * option is set and survives a minifier that strips the inline block.
 * Contrast is computed per pair in
 * agent-docs/tasks/36b-design-notes/design-system.md section 1.4: AA on
 * every text pair (thinnest 4.62:1, the navy label on the gold hover step),
 * 3:1 on every meaningful non-text boundary, a 16px type floor and 44px
 * touch targets. Gold never carries body text and never IS text.
 */

.msa {
	/*
	 * ============================================================
	 * THESE ARE THE PLATFORM DEFAULTS. THEY ARE NOT ANY ONE
	 * AGENCY'S BRAND, AND NOTHING IN THIS FILE EVER MAY BE.
	 * ============================================================
	 *
	 * msa-connect ships to MANY agencies from one zip. Whatever is declared
	 * here is what EVERY agency inherits on the day it activates the plugin,
	 * before it has touched a setting, so these values must be the Medicare
	 * Sales Agents PLATFORM palette and nothing else. They are the V2 design
	 * system tokens from agent-docs/design/STYLEGUIDE.md section 2.1, which
	 * is the same source apps/marketing/app/globals.css reads:
	 *
	 *   --msa-primary  #1e2f6b  STYLEGUIDE 2.1 --primary     deep indigo-navy
	 *   --msa-accent   #dfa036  STYLEGUIDE 2.1 --action      honey gold
	 *   --msa-ink      #232833  STYLEGUIDE 2.1 --foreground  ink, near-black
	 *   --msa-text     #232833  STYLEGUIDE 2.1 --foreground  body copy
	 *
	 * PER-AGENCY BRANDING HAPPENS THROUGH THE SETTINGS SCREEN, NEVER HERE.
	 * An agency sets msa_connect_color_primary / _accent / _border / _heading
	 * / _text (and _theme_button_class for its own CTA skin);
	 * Frontend::enqueue_styles() then inlines that agency's values AHEAD of
	 * this file and they win. Editing this block to suit one client repaints
	 * every OTHER client's site, which is exactly how Medicare Plan Finder's
	 * #0679c2 / #e1b95a / #044a75 / #4d5467 came to be the shipped default
	 * between 2026-09-11 and this commit. Test_Platform_Defaults.php now
	 * fails if it happens again.
	 *
	 * Every derived fallback below is the EXACT value
	 * Colors::primary_tokens('#1e2f6b') / Colors::accent_tokens('#dfa036')
	 * compute, so the stylesheet and the PHP emission can never disagree
	 * about a shade.
	 */
	--msa-primary: #1e2f6b;
	--msa-accent: #dfa036;

	/* Derived from --msa-primary (PHP emits these as literal hex). */
	--msa-primary-dark: #16224d;
	--msa-primary-darker: #111a3b;
	--msa-primary-tint: #e9eaf0;
	--msa-on-primary: #ffffff;
	/*
	 * The 10 percent white tint, which on a band this deep computes to
	 * 10.45:1 against it, far above the 4.5 floor, so the derivation's guard
	 * does not fire and the muted label IS the tint. On a LIGHT brand blue
	 * the same tint falls under the floor; an agency that sets a pale
	 * primary gets full white instead, from Colors::primary_tokens() at
	 * runtime rather than from this line.
	 */
	--msa-on-primary-muted: #e9eaf0;
	--msa-on-primary-veil: rgba(0, 0, 0, 0.18);
	--msa-on-primary-fill: rgba(255, 255, 255, 0.22);

	/*
	 * Derived from --msa-accent. Note --msa-accent-active: it is LIGHTER
	 * than the base gold, not darker, and that is the guard working rather
	 * than a typo. The platform gold is deep enough that an 8 percent
	 * darkening (#cd9332) drops the navy label to 4.33:1, under the floor, so
	 * accent_tokens() falls back to an 8 percent LIGHTENING for the pressed
	 * state. Both states read, and this file must mirror what the PHP emits.
	 */
	--msa-accent-hover: #d49833;
	--msa-accent-active: #e2a846;
	--msa-accent-border: #bb862d;
	--msa-accent-ink: #1b3a5c;

	/*
	 * Neutrals. --msa-ink and --msa-text are both the platform --foreground;
	 * the platform sets headings and body copy in one ink and takes its
	 * hierarchy from size and weight, exactly as the marketing site does.
	 *
	 * Both are overridable per agency, and on SEPARATE options
	 * (msa_connect_color_heading for --msa-ink, msa_connect_color_text for
	 * --msa-text), because an agency may want brand-colored headings over
	 * ordinary body copy. That these two lines carry the same value is the
	 * PLATFORM's choice, not a coupling between the options. What must never
	 * happen is one agency's brand hue landing on either LINE: that is the
	 * default every OTHER agency inherits.
	 */
	--msa-ink: #232833;
	--msa-text: #232833;
	/*
	 * Darkened from the preview's #6b7385 after axe measured it. The preview
	 * checked its greys against a WHITE body; this plugin paints tinted
	 * grounds of its own - --msa-chip-bg and --msa-surface-alt - where
	 * #6b7385 computes 4.19:1 and 4.31:1, both under the 4.5 floor. #5f6774
	 * clears 4.5 on every ground this file ships (worst case 5.01:1 on the
	 * chip fill).
	 */
	--msa-muted: #5f6774;
	--msa-surface: #ffffff;
	--msa-surface-alt: #f7f9fc;
	--msa-chip-bg: #edf1f6;
	--msa-border: #dfe4ea;
	--msa-border-strong: #c9d2dc;
	--msa-input-border: #7a8798;

	/* Spacing (4px base). */
	--msa-space-1: 0.25rem;
	--msa-space-2: 0.5rem;
	--msa-space-3: 0.75rem;
	--msa-space-4: 1rem;
	--msa-space-5: 1.25rem;
	--msa-space-6: 1.5rem;
	--msa-space-8: 2rem;
	--msa-space-10: 2.5rem;
	--msa-space-12: 3rem;
	--msa-space-16: 4rem;

	/* Radius. */
	--msa-radius-sm: 0.375rem;
	--msa-radius-md: 0.5rem;
	--msa-radius-lg: 0.75rem;
	--msa-radius-pill: 999px;

	/* Type scale: no step below 1rem. */
	--msa-fs-1: 1rem;
	--msa-fs-2: 1.0625rem;
	--msa-fs-3: 1.125rem;
	--msa-fs-4: 1.25rem;
	--msa-fs-5: 1.5rem;
	--msa-fs-6: 1.75rem;
	--msa-fs-7: clamp(1.875rem, 1.4rem + 1.8vw, 2.25rem);
	--msa-fs-8: clamp(2rem, 1.35rem + 2.6vw, 2.75rem);
	/*
	 * The agent's name in the profile hero: 30px on a phone, 40px on a laptop
	 * (client QA round 8, approved from the mockup 2026-09-14). A step under
	 * --msa-fs-8, which the root archive's approved hero headline keeps,
	 * because a shorter profile band is the point of that round.
	 */
	--msa-fs-profile-name: clamp(1.875rem, 1.3rem + 1.6vw, 2.5rem);
	/*
	 * Chips are the ONE step below the 16px floor the rest of this file
	 * keeps. The client's review said the service tags "are too big and take
	 * up too much room", and the fix he asked for is smaller chips, not
	 * fewer. They are supplementary labels, never body copy and never a
	 * disclosure, and every service they name also appears in full on the
	 * profile, so the floor is relaxed here and nowhere else.
	 */
	--msa-fs-chip: 0.875rem;
	/*
	 * THE LABEL STEPS, the second and last relaxation of that floor (client
	 * QA round 8, approved from the mockup 2026-09-14). The profile's "At a
	 * glance" card names its title and groups in a small uppercase eyebrow and
	 * each fact in a small uppercase label, so the VALUE beside it reads
	 * first. They are only ever labels for values that stay at 16px - never
	 * the value, never body copy, never a disclosure - and they only ever sit
	 * on the card's own tinted ground, where --msa-muted is computable.
	 */
	--msa-fs-eyebrow: 0.78125rem;
	--msa-fs-label: 0.75rem;
	--msa-lh-tight: 1.2;
	--msa-lh-snug: 1.35;
	--msa-lh-base: 1.6;
	--msa-weight-semibold: 600;
	--msa-weight-bold: 700;
	--msa-weight-black: 900;

	/* Depth, motion, targets, measure. */
	--msa-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
	--msa-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.1);
	--msa-transition: 150ms ease;
	--msa-tap: 2.75rem;
	--msa-measure: 68ch;
	--msa-card-min: 19rem;
	--msa-avatar-featured: 10rem;
	--msa-avatar-card: 6rem;
	--msa-avatar-free: 3rem;
	/*
	 * The PROFILE portrait, redefined upward at 700px and again at 1024px
	 * near the bottom of this file. This is the narrow-viewport step: 96px,
	 * the approved mockup's phone portrait (client QA round 8, 2026-09-14),
	 * because the hero band is stacked there and a portrait sized for the
	 * desktop band would push the name below the fold on a phone.
	 */
	--msa-avatar-profile: 6rem;

	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	line-height: var(--msa-lh-base);
}

/*
 * Base element reset. :where() contributes NO specificity, so these land at
 * 0,1,0: they beat a theme's bare "h2 {}" or "p {}" (0,0,1) and lose to
 * every component rule below them on source order alone. Never raise these
 * to .msa-page h2 (0,1,1) - that outranks single-class component rules and
 * would silently repaint the card role line and reset card margins.
 */

.msa :where(h1, h2, h3) {
	color: var(--msa-ink);
	line-height: var(--msa-lh-tight);
	margin: 0 0 var(--msa-space-3);
}

.msa :where(p) {
	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	line-height: var(--msa-lh-base);
	margin: 0 0 var(--msa-space-4);
}

.msa :where(ul, ol) {
	margin: 0;
}

/*
 * SECTIONING ELEMENTS CARRY NO INHERITED PADDING (client QA round 5 item 3b).
 *
 * This one earns its own note because it is what actually caused the
 * complaint. The plugin wraps each tier of the ladder in a <section>, and the
 * client's theme ships "section, main { padding: 60px 0; }". At 0,0,2 that
 * beat .msa-tier's margin-only rule, so every tier gained 60px of padding top
 * AND bottom and the measured distance between the last featured card and the
 * first paid card was 152px (60 + 32 + 60), not the 32px this file appeared
 * to specify. The three tiers read as three detached blocks because a
 * stylesheet the plugin has never seen said so.
 *
 * The fix belongs here rather than on .msa-tier alone: ANY sectioning element
 * the plugin emits now starts from zero on a host that pads bare elements,
 * and each component sets what it wants. Padding only - margins are left
 * alone, because :where(p) and :where(h1, h2, h3) above already own those and
 * a blanket margin reset here would fight them.
 */

.msa :where(section, article, aside, header, footer, nav, figure) {
	padding: 0;
}

.msa img {
	max-width: 100%;
}

/*
 * NO BLANKET ".msa a { color }" RULE. It used to sit here at 0,1,1, which a
 * host theme's own "a" rule (0,0,1) lost to but which also caught the call to
 * action buttons, so a themed button could never keep the theme's own label
 * color. Every link the plugin owns now declares its color EXPLICITLY below,
 * in all five states, at two-class weight - and the buttons declare theirs
 * with the skin, or not at all when the theme owns them.
 */

.msa a:focus-visible,
.msa button:focus-visible,
.msa input:focus-visible,
.msa select:focus-visible {
	outline: 2px solid var(--msa-primary);
	outline-offset: 2px;
}

/* Page shell */

/*
 * NO PAGE GROUND, deliberately (client QA round 4 item 3). This box used to
 * paint --msa-page-bg, a light grey. Because it is a CENTERED 72rem column
 * inside a wider host container, that grey stopped at the column edges and
 * the host's own white showed either side of it: "Main area light gray
 * background makes no sense. Outside it is white on left/right. Looks
 * terrible." The fix is not a wider grey - the plugin does not own the
 * viewport and cannot know what the theme paints around it - it is to paint
 * no page ground at all and let the host's background run uniformly under
 * the listings. The token was removed with the declaration; nothing else
 * referenced it. Every TINTED surface the plugin owns (cards, card footers,
 * chips, the disclosure block) is unchanged, so the page still reads as
 * layered rather than flat.
 *
 * THE CONTRAST CONSEQUENCE, and the rule that falls out of it. While the
 * plugin painted its own page ground it could GUARANTEE the contrast of every
 * pixel it drew. It no longer can: the ground under this box now belongs to a
 * theme the plugin has never seen. Twenty Twenty-One's body is #d1e4dd, a pale
 * green, and axe immediately measured --msa-muted (#5f6774) at 4.30:1 there,
 * under the 4.5 floor, on a lede that had cleared it comfortably the hour
 * before.
 *
 * So --msa-muted is now reserved for text sitting on a ground THIS FILE paints
 * - cards, chips, card footers, the breadcrumb bar, the disclosure block -
 * where its ratio is still computable and still checked. The four elements
 * that sit directly on the host's ground use --msa-text (#232833) instead:
 *
 *   .msa-page-lede  .msa-padded-heading  .msa-placeholder  .msa-pagination .dots
 *
 * That buys 11.14:1 on Twenty Twenty-One's green and 14.76:1 on white
 * (7.50:1 and 5.71:1 when this was first written against the old #4d5467
 * body ink; the platform-default restore darkened --msa-text to the
 * platform --foreground and both margins widened). It is
 * still not a guarantee - no token can be, against an unknown ground, and a
 * theme with a dark body would need its own answer - but it is the widest
 * margin available without repainting the ground the client asked us to stop
 * painting. Anything added to this file that lands on the bare page ground
 * belongs in that list, not on --msa-muted.
 */

.msa-page {
	display: block;
	margin: 0 auto;
	max-width: 72rem;
	/*
	 * NO overflow clipping here, deliberately. The hero bleeds OUT of this box
	 * on purpose, so an overflow-x:clip added "defensively" does not contain
	 * an accident - it amputates the feature, cutting the first 16px of the
	 * headline and the search labels at 1280. Measured on the client's own
	 * site, the bleed lands exactly on the viewport edges and adds 0px of
	 * horizontal overflow at 1280 and at 375; the page's existing overflow is
	 * the host theme's own and predates the plugin.
	 */
	padding: var(--msa-space-6) var(--msa-space-4) var(--msa-space-12);
}

.msa-page-heading {
	font-size: var(--msa-fs-7);
	margin: 0 0 var(--msa-space-2);
}

/*
 * --msa-text, NOT --msa-muted. See the "text on the host's ground" rule under
 * .msa-page above: this lede is one of the four elements that sit directly on
 * whatever the theme paints, and axe caught this exact one at 4.30:1 on Twenty
 * Twenty-One's pale green the moment the page ground was removed.
 */

.msa-page-lede {
	color: var(--msa-text);
	font-size: var(--msa-fs-3);
	margin: 0 0 var(--msa-space-8);
	max-width: var(--msa-measure);
}

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

.msa-icon {
	fill: none;
	flex: 0 0 auto;
	height: 1em;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.75;
	width: 1em;
}

/*
 * THE MASTHEAD: breadcrumb bar and hero band as ONE unit (client QA round 5
 * item 2, closing the 24px white strip between them).
 *
 * The two bands are adjacent STRUCTURALLY, not by a selector trick. The
 * archive template emits them inside this single wrapper and emits the
 * wrapper only on the route where both exist, so no rule here has to ask
 * "is a hero next?" - which is the question that previously wanted :has()
 * and got a 24px gap instead. A template that renders breadcrumbs alone
 * (single.php, search.php) never creates a .msa-masthead, and .msa-breadcrumbs
 * keeps its own trailing space there.
 *
 * The wrapper owns the block spacing for both children; the children own
 * none. That is deliberate: it means the flush junction cannot be undone by
 * a later edit to either band's own margin, and no margin-collapse
 * arithmetic between parent and child decides where the bar sits. The
 * negative block-start moves from .msa-breadcrumbs to here unchanged - it
 * still cancels exactly one .msa-page top padding - and the block-end is the
 * hero's old value, so the distance from the hero to the first listing row
 * is unchanged.
 *
 * Inline margins are NOT touched: each band keeps its own
 * margin-inline: calc(50% - 50vw) bleed. The wrapper is a plain block of the
 * same width as .msa-page's content box, so 50% means the same number it
 * meant before and the measured overflow is unchanged.
 */

.msa-masthead {
	margin-block: calc(var(--msa-space-6) * -1) var(--msa-space-8);
}

.msa-masthead > .msa-breadcrumbs,
.msa-masthead > .msa-hero,
.msa-masthead > .msa-profile-hero {
	margin-block: 0;
}

/*
 * Breadcrumbs: a FULL-WIDTH BAR directly under the site header (client QA
 * round 4 item 4). White strip, edge to edge, one hairline along the bottom,
 * the trail itself left-aligned on the same measure the hero headline uses.
 *
 * The bleed is the hero's technique, character for character - the same
 * negative inline margin, the same padding-inline formula, the same inner
 * max-width - because that one is already measured at ZERO added horizontal
 * overflow at 1280 and 375 on the client's own site. Matching it means the
 * bar inherits that measurement instead of needing its own; a second,
 * differently-shaped bleed would have to be re-proven and could drift.
 *
 * The negative block-start margin cancels .msa-page's own top padding so the
 * bar sits flush under the header rather than floating below a 24px gap.
 * Breadcrumbs are the first child of #msa-main on all three surfaces that
 * render them (archive, single, search), which is what makes that safe. On
 * the archive the breadcrumbs are the first child of .msa-masthead instead,
 * and the wrapper carries the negative margin for them; see .msa-masthead
 * above.
 */

.msa-breadcrumbs {
	background: var(--msa-surface);
	border-bottom: 1px solid var(--msa-border);
	margin-block: calc(var(--msa-space-6) * -1) var(--msa-space-6);
	margin-inline: calc(50% - 50vw);
	padding-block: var(--msa-space-2);
	padding-inline: max(var(--msa-space-4), calc(50vw - 37rem));
}

.msa-breadcrumb-inner {
	margin: 0 auto;
	max-width: 76rem;
	min-width: 0;
}

.msa-breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	font-size: var(--msa-fs-1);
	gap: var(--msa-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.msa-breadcrumb-item {
	align-items: center;
	color: var(--msa-muted);
	display: flex;
	gap: var(--msa-space-2);
	margin: 0;
	min-width: 0;
}

.msa-breadcrumb-item a {
	color: var(--msa-primary);
	padding-block: var(--msa-space-2);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.msa-breadcrumb-item + .msa-breadcrumb-item::before {
	border-right: 2px solid var(--msa-border-strong);
	border-top: 2px solid var(--msa-border-strong);
	content: "";
	display: inline-block;
	height: 0.4em;
	transform: rotate(45deg);
	width: 0.4em;
}

/* Root hero band and its search row */

/*
 * FULL WIDTH and SQUARE EDGED, matching the host's own full-width bands
 * (client revision item 5). The negative inline margin pulls the band out to
 * the viewport edges from inside the centered page container, and the inline
 * padding puts the content back on the container's own measure, so the
 * headline still lines up with the cards below it.
 *
 * 50vw is measured against the viewport INCLUDING a classic scrollbar, so on
 * a browser that reserves scrollbar gutter this bleeds by half the scrollbar
 * width. That is the known cost of the technique and the reason the page
 * container clips it below; measured overflow at 1280 and 375 is recorded in
 * the task HANDOFF.
 */

.msa-hero {
	background: var(--msa-primary);
	border-radius: 0;
	margin-block: 0 var(--msa-space-8);
	margin-inline: calc(50% - 50vw);
	padding-block: var(--msa-space-12);
	padding-inline: max(var(--msa-space-4), calc(50vw - 37rem));
}

.msa-hero-inner {
	margin: 0 auto;
	max-width: 76rem;
	min-width: 0;
}

.msa-hero .msa-page-heading {
	color: var(--msa-on-primary);
	font-size: var(--msa-fs-8);
	margin: 0 0 var(--msa-space-3);
}

.msa-hero-lede {
	color: var(--msa-on-primary-muted);
	font-size: var(--msa-fs-3);
	margin: 0 0 var(--msa-space-6);
	max-width: var(--msa-measure);
}

/*
 * The hero row carries BOTH .msa-search-form (so an agency's existing
 * override still reaches it) and .msa-hero-search. Every rule below is
 * therefore written at 0,2,0 or higher: at single-class weight the
 * .msa-search-form block further down this file would win on source order
 * and repaint the row as a white card with dark-navy labels sitting on the
 * blue band.
 */

.msa-search-form.msa-hero-search {
	align-items: flex-end;
	background: none;
	border: 0;
	box-shadow: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-3);
	margin: 0;
	padding: 0;
}

.msa-hero-search .msa-hero-field {
	display: flex;
	flex: 1 1 14rem;
	flex-direction: column;
	gap: var(--msa-space-1);
	margin: 0;
	min-width: 0;
}

/*
 * State OR ZIP are two SEPARATE choices, not two filters that combine
 * (client revision item 10). The divider says so in one word, and the
 * precedence in Renderers::render_search_form matches what it promises:
 * a ZIP wins, a state applies when the ZIP box is empty.
 *
 * It is a real <span> with real text rather than a ::before, so a screen
 * reader reads "OR" between the two groups instead of silently running them
 * together.
 */

.msa-hero-search .msa-search-or {
	align-self: center;
	background: var(--msa-on-primary-veil);
	border-radius: var(--msa-radius-pill);
	color: var(--msa-on-primary);
	flex: 0 0 auto;
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-bold);
	letter-spacing: 0.12em;
	margin: 0 0 var(--msa-space-2);
	padding: var(--msa-space-2) var(--msa-space-3);
}

.msa-search-form .msa-search-or {
	align-self: center;
	background: var(--msa-chip-bg);
	border-radius: var(--msa-radius-pill);
	color: var(--msa-muted);
	flex: 0 0 auto;
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-bold);
	letter-spacing: 0.12em;
	margin: 0 0 var(--msa-space-2);
	padding: var(--msa-space-2) var(--msa-space-3);
}

@media (max-width: 700px) {
	.msa-hero-search .msa-search-or,
	.msa-search-form .msa-search-or {
		align-self: flex-start;
		margin: 0;
	}
}

/*
 * These two carry a third token (0,3,1) because the hero row also matches
 * the .msa .msa-search-form control rules further down at 0,2,1; a tie
 * there would lose on source order and paint dark-navy labels onto the
 * blue band.
 */

.msa .msa-hero-search .msa-hero-field label {
	color: var(--msa-on-primary);
	display: block;
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-semibold);
	margin: 0;
}

.msa .msa-hero-search .msa-hero-field input,
.msa .msa-hero-search .msa-hero-field select {
	background: var(--msa-surface);
	border: 1px solid var(--msa-input-border);
	border-radius: var(--msa-radius-sm);
	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	max-width: none;
	min-height: var(--msa-tap);
	padding: 0 var(--msa-space-3);
	width: 100%;
}

.msa-hero-search .msa-hero-submit {
	flex: 0 0 auto;
	margin: 0;
}

/* Buttons */

.msa-button {
	background: var(--msa-primary);
	border: 1px solid var(--msa-primary);
	border-radius: var(--msa-radius-sm);
	color: var(--msa-on-primary);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--msa-space-2);
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-semibold);
	min-height: var(--msa-tap);
	padding: 0 var(--msa-space-5);
	text-decoration: none;
}

.msa a.msa-button {
	color: var(--msa-on-primary);
}

.msa-button:hover,
.msa-button:focus-visible {
	background: var(--msa-primary-darker);
	border-color: var(--msa-primary-darker);
}

.msa-button-accent {
	background: var(--msa-accent);
	border-color: var(--msa-accent-border);
	color: var(--msa-accent-ink);
	font-weight: var(--msa-weight-bold);
}

.msa a.msa-button-accent {
	color: var(--msa-accent-ink);
}

.msa-button-accent:hover,
.msa-button-accent:focus-visible {
	background: var(--msa-accent-hover);
	border-color: var(--msa-accent-border);
}

.msa-button-accent:active {
	background: var(--msa-accent-active);
}

.msa-button-secondary {
	background: transparent;
	border: 2px solid var(--msa-on-primary);
	color: var(--msa-on-primary);
}

.msa a.msa-button-secondary {
	color: var(--msa-on-primary);
}

.msa-button-secondary:hover,
.msa-button-secondary:focus-visible {
	background: var(--msa-on-primary-veil);
	border-color: var(--msa-on-primary);
}

.msa-button-ghost {
	background: transparent;
	border: 1px solid var(--msa-on-primary);
	color: var(--msa-on-primary);
	font-weight: var(--msa-weight-semibold);
	padding: 0 var(--msa-space-4);
}

.msa a.msa-button-ghost {
	color: var(--msa-on-primary);
}

.msa-button-ghost:hover,
.msa-button-ghost:focus-visible {
	background: var(--msa-on-primary-veil);
	border-color: var(--msa-on-primary);
}

/*
 * SUBMIT BUTTONS FIGHT THE HOST THEME DIRECTLY, so they are the one place
 * in this file that needs more than two class tokens.
 *
 * Twenty Twenty-One paints a bare <button> at
 *   button:not(:hover):not(:active):not(.has-background)   -> 0,3,1
 * and its hover/active at
 *   button:hover, button:active                            -> 0,1,1
 * Three pseudo-classes inside :not() count as class tokens, so the theme
 * outranks any single- or two-class component rule and repainted the gold
 * Search button in the hero and on the search page dark navy. Anchors were
 * never affected - only real <button> elements match those selectors, which
 * is why the card's <a class="msa-button-accent"> was already correct.
 *
 * The rules below mirror the theme's own shape one token higher (0,4,1
 * resting, 0,3,1 hover/active) so the plugin wins on weight. !important is
 * not an option: Rule 3 aside, it would break the documented promise that
 * an agency's Additional CSS wins on ties. Core themes share this pattern,
 * so this generalises beyond Twenty Twenty-One.
 */

.msa button.msa-button:not(:hover):not(:active) {
	background: var(--msa-primary);
	border-color: var(--msa-primary);
	color: var(--msa-on-primary);
}

.msa button.msa-button-accent:not(:hover):not(:active) {
	background: var(--msa-accent);
	border-color: var(--msa-accent-border);
	color: var(--msa-accent-ink);
}

.msa button.msa-button:hover,
.msa button.msa-button:active {
	background: var(--msa-primary-darker);
	border-color: var(--msa-primary-darker);
	color: var(--msa-on-primary);
}

.msa button.msa-button-accent:hover {
	background: var(--msa-accent-hover);
	border-color: var(--msa-accent-border);
	color: var(--msa-accent-ink);
}

.msa button.msa-button-accent:active {
	background: var(--msa-accent-active);
	border-color: var(--msa-accent-border);
	color: var(--msa-accent-ink);
}

/*
 * THE THEMED CALL TO ACTION (client revision item 7).
 *
 * When an agency names its theme's button class in settings, the plugin emits
 * NO skin class on that button at all - not .msa-button, not
 * .msa-button-accent - so this rule is the only thing the plugin declares on
 * the element. It declares exactly one property: the 44px touch-target floor,
 * which is an accessibility guarantee and not the theme's to waive.
 *
 * That is deliberate, and it is why there is no specificity contest to lose.
 * CSS cannot know whether a given theme class sets background, color, padding
 * or all three, so any rule the plugin wrote here would be wrong for some
 * theme: either too weak (the plugin's gold shows through) or too strong (the
 * agency does not get its own buttons, which is the entire point). Declaring
 * nothing is the only answer that is right for every theme.
 *
 * The blanket ".msa a { color }" rule was removed for the same reason: at
 * 0,1,1 it outranked a typical theme's own 0,1,0 button class and repainted
 * the label.
 */

.msa .msa-button-themed {
	min-height: var(--msa-tap);
}

.msa .msa-button-themed .msa-icon {
	margin-right: 0.35em;
	vertical-align: -0.15em;
}

/* Featured band */

.msa-featured-band {
	background: var(--msa-surface);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-lg);
	border-top: 3px solid var(--msa-accent);
	margin: var(--msa-space-8) 0;
	padding: var(--msa-space-6);
}

.msa-featured-band .msa-results-heading {
	margin: 0 0 var(--msa-space-5);
}

.msa-featured-band .msa-card {
	box-shadow: var(--msa-shadow-md);
}

.msa-featured-band .msa-grid {
	margin: 0;
}

/* Grid and cards */

/*
 * align-items: start IS THE FIX FOR THE VOIDS INSIDE CARDS (client QA round 5
 * item 3a).
 *
 * A grid row stretches every item to the height of the tallest one. Combined
 * with .msa-card-footer's margin-top:auto, which pins the footer strip to the
 * bottom of whatever height the card was given, a card with two service chips
 * sitting beside a card with six showed a measured 82px of empty white
 * between its chips and its footer, against 16px on its dense neighbour. The
 * client saw that as a hole in the card, and it is one: the card was not
 * asking for the height, the row was handing it over.
 *
 * Letting cards size to their own content removes the hole at its source.
 * Nothing else had to change - margin-top:auto simply resolves to 0 once
 * there is no free space to distribute, so the footer still sits flush at the
 * bottom of the card and the same rule keeps aligning it on the free tier,
 * where every card IS the same height.
 *
 * WHAT THIS COSTS, weighed on the client's own 40-agent roster: card bottoms
 * in a row are no longer flush, so the gold View profile buttons sit on a
 * ragged baseline. That was the choice - equal card heights with holes in
 * them, or unequal card heights without. On the real roster the holes were
 * large and frequent (roughly half the paid cards carry no service chips at
 * all) while the height differences are 70px on a 390px card and read as an
 * ordinary masonry rhythm. Voids look like a bug; ragged bottoms look like
 * content.
 */

.msa-grid {
	align-items: start;
	display: grid;
	gap: var(--msa-space-5);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--msa-card-min)), 1fr));
	list-style: none;
	margin: 0 0 var(--msa-space-8);
	padding: 0;
}

.msa-grid > li {
	display: flex;
	margin: 0;
	min-width: 0;
}

/*
 * THE THREE-TIER LADDER (client revision item 1). Density RISES as the tier
 * falls, so the ladder reads as a ladder at a glance and not only through
 * card styling: featured 2-up once there is real width, paid 3-up, free 4-up.
 *
 * Two-class weight throughout, because .msa-grid's own auto-fill default
 * above is 0,1,0 and a tie there would resolve on source order rather than on
 * intent. The tier class is what decides the column count; the preset class
 * no longer does.
 */

/*
 * THE INTER-SECTION RHYTHM (client QA round 5 item 3b). The three tiers must
 * read as three rungs of ONE ladder, not as three detached blocks.
 *
 * Both declarations are load-bearing and neither is decorative:
 *
 * padding: 0 defends the measurement. See the :where(section, ...) reset
 * higher up for the full account: the client's theme pads every bare <section>
 * by 60px and this file's margin-only rule lost to it, so the real distance
 * between the featured and paid rows was 152px rather than the 32px declared
 * here. The reset already handles it; this repeats it locally because the
 * tier section is the element where it went wrong and a future reader will
 * come here first.
 *
 * margin-bottom is then set relative to the grid's own row gap rather than
 * picked: --msa-space-10 (40px) is exactly twice the --msa-space-5 (20px)
 * between card rows inside a tier. A boundary at 1x would let the sections
 * merge into one undifferentiated grid; at 4x, which is roughly where the
 * theme's padding put it, each section floats alone. 2x is the smallest step
 * that still reads as a boundary.
 *
 * The grid's own trailing margin is zeroed INSIDE a tier so this is the only
 * number involved. It had been surviving only by accident: the theme's
 * "ul:last-child { margin-bottom: 0 }" happened to cancel it here, and on a
 * theme without that rule the same markup would have spaced its tiers 32px
 * further apart than this file says.
 */

.msa-tier {
	margin: 0 0 var(--msa-space-10);
	padding: 0;
}

.msa-tier > .msa-grid {
	margin-bottom: 0;
}

.msa .msa-grid-featured,
.msa .msa-grid-paid {
	grid-template-columns: minmax(0, 1fr);
}

.msa .msa-grid-free {
	gap: var(--msa-space-4);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
	.msa .msa-grid-paid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.msa .msa-grid-featured {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.msa .msa-grid-paid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.msa .msa-grid-free {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/*
 * .msa-paid-placement IS GONE (client ruling 2026-09-11). The standalone
 * paid-placement sentence above the ladder was deleted from the markup, so
 * its rule went with it rather than lingering as a style for an element
 * nothing emits. The per-listing "Sponsored" badge now carries that
 * disclosure; its styling is .msa-badge-featured below.
 */

.msa-card {
	background: var(--msa-surface);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-lg);
	box-shadow: var(--msa-shadow-sm);
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 0;
	transition: box-shadow var(--msa-transition), border-color var(--msa-transition);
	width: 100%;
}

.msa-card:hover {
	border-color: var(--msa-border-strong);
	box-shadow: var(--msa-shadow-md);
}

.msa-card-photo {
	display: block;
	padding: var(--msa-space-5) var(--msa-space-5) 0;
}

.msa-card-photo img {
	aspect-ratio: 1 / 1;
	background: var(--msa-primary-tint);
	border: 2px solid var(--msa-surface);
	border-radius: var(--msa-radius-pill);
	box-shadow: 0 0 0 1px var(--msa-border);
	display: block;
	height: var(--msa-avatar-card);
	object-fit: cover;
	width: var(--msa-avatar-card);
}

.msa-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	padding: var(--msa-space-4) var(--msa-space-5) var(--msa-space-5);
}

.msa-card-name {
	font-size: var(--msa-fs-4);
	font-weight: var(--msa-weight-bold);
	margin: 0;
}

.msa-card-name a {
	align-items: center;
	color: var(--msa-ink);
	display: inline-flex;
	min-height: var(--msa-tap);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.msa-card-role {
	color: var(--msa-primary);
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-semibold);
	margin: 0 0 var(--msa-space-2);
}

.msa-card-meta {
	align-items: center;
	color: var(--msa-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--msa-fs-1);
	gap: var(--msa-space-1) var(--msa-space-3);
	margin: 0 0 var(--msa-space-3);
	min-width: 0;
}

.msa-card-meta .msa-icon {
	color: var(--msa-primary);
}

.msa-card-location,
.msa-card-context {
	color: var(--msa-muted);
	font-size: var(--msa-fs-1);
	margin: 0;
	min-width: 0;
}

.msa-card-meta .msa-card-location {
	align-items: center;
	display: inline-flex;
	gap: var(--msa-space-2);
}

.msa-card-experience {
	align-items: center;
	color: var(--msa-muted);
	display: inline-flex;
	gap: var(--msa-space-2);
	white-space: nowrap;
}

.msa-card-experience .msa-icon {
	color: var(--msa-primary);
}

.msa-card-context {
	margin: 0 0 var(--msa-space-3);
}

.msa-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-2);
	margin: 0 0 var(--msa-space-3);
}

.msa-badge {
	background: var(--msa-surface-alt);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-pill);
	color: var(--msa-text);
	display: inline-block;
	font-size: var(--msa-fs-1);
	padding: var(--msa-space-1) var(--msa-space-3);
}

.msa-badge-featured {
	background: var(--msa-primary);
	border-color: var(--msa-primary);
	color: var(--msa-on-primary);
}

.msa-badge-verified {
	background: var(--msa-primary-tint);
	border-color: var(--msa-border-strong);
	color: var(--msa-ink);
}

/* Service chips */

.msa-card-services {
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-1) var(--msa-space-2);
	margin: 0 0 var(--msa-space-4);
}

/*
 * SMALLER CHIPS (client review 2026-09-11): the first pass shipped these at
 * body size with generous padding and three chips plus an overflow filled
 * several rows on a real card. Same component, tighter box.
 */

.msa-chip {
	background: var(--msa-chip-bg);
	border: 1px solid var(--msa-border);
	border-radius: 4px;
	color: var(--msa-text);
	display: inline-block;
	font-size: var(--msa-fs-chip);
	line-height: 1.5;
	margin: 0;
	padding: 1px var(--msa-space-2);
}

.msa-chip-more {
	background: transparent;
	border-style: dashed;
	color: var(--msa-muted);
}

/* Card footer strip */

.msa-card-contact {
	margin: var(--msa-space-3) 0 0;
}

.msa-card-footer {
	align-items: center;
	background: var(--msa-surface-alt);
	border-radius: 0 0 calc(var(--msa-radius-lg) - 1px) calc(var(--msa-radius-lg) - 1px);
	border-top: 1px solid var(--msa-border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-3);
	justify-content: space-between;
	margin: auto calc(var(--msa-space-5) * -1) calc(var(--msa-space-5) * -1);
	padding: var(--msa-space-3) var(--msa-space-4);
}

/*
 * TWO-CLASS, and the whole reason is that negative bottom margin (found while
 * verifying client QA round 5 item 3a on the live site).
 *
 * The footer is a <p>, and the client's theme ships
 * "p:last-child { margin-bottom: 0 }" at 0,1,1 - which outranks
 * .msa-card-footer at 0,1,0. The negative bottom margin that is supposed to
 * pull the tinted strip out to the card's bottom edge was therefore being
 * zeroed on their site, leaving a 21px band of white BELOW the footer inside
 * the card's rounded border: the card body's own bottom padding, uncancelled.
 * It was there before this round too; content-sizing the cards only moved it
 * up the card where it became obvious.
 *
 * 0,2,0 beats 0,1,1 and is the ceiling this file's posture allows, so the
 * plugin's own layout holds on a theme that resets bare paragraphs. The
 * declaration is repeated rather than moved so the base rule still reads
 * complete on its own.
 */

.msa-card .msa-card-footer {
	margin-bottom: calc(var(--msa-space-5) * -1);
}

.msa-card-actions {
	align-items: center;
	display: flex;
	gap: var(--msa-space-1);
}

.msa-icon-link {
	align-items: center;
	border-radius: var(--msa-radius-sm);
	color: var(--msa-primary);
	display: inline-flex;
	justify-content: center;
	min-height: var(--msa-tap);
	min-width: var(--msa-tap);
	text-decoration: none;
}

.msa-icon-link:hover,
.msa-icon-link:focus-visible {
	background: var(--msa-chip-bg);
}

.msa-icon-link .msa-icon {
	height: 1.25rem;
	width: 1.25rem;
}

/* Compact preset (thin-city padding): subordinate by design. */

.msa-card-compact {
	align-items: center;
	box-shadow: none;
	flex-direction: row;
	gap: var(--msa-space-3);
	padding: var(--msa-space-4);
}

.msa-card-compact .msa-card-photo {
	padding: 0;
}

.msa-card-compact .msa-card-photo img,
.msa-card-compact .msa-card-initials {
	font-size: 0.95rem;
	height: var(--msa-avatar-free);
	width: var(--msa-avatar-free);
}

.msa-card-compact .msa-card-body {
	padding: 0;
}

.msa-card-compact .msa-card-name {
	font-size: var(--msa-fs-3);
}

.msa-card-compact .msa-card-name a {
	min-height: var(--msa-tap);
}

/*
 * TIER DENSITIES. The card's STYLING is the approved mockup card - round
 * photo, blue role line, icon meta row, service chips, tinted footer strip -
 * and only its SCALE changes by tier. Featured also carries the deeper
 * shadow, which with the solid blue Featured badge and the larger type is
 * what marks it out. There is deliberately no gold tab: gold means action
 * here and nothing else.
 *
 * Each rule is two-class so it beats the base .msa-card-photo img sizing
 * (0,1,1) deterministically rather than on source order.
 */

.msa .msa-card-featured {
	box-shadow: var(--msa-shadow-md);
}

.msa .msa-card-featured .msa-card-photo img,
.msa .msa-card-featured .msa-card-initials {
	font-size: 2.5rem;
	height: var(--msa-avatar-featured);
	width: var(--msa-avatar-featured);
}

.msa .msa-card-featured .msa-card-name {
	font-size: var(--msa-fs-6);
}

.msa .msa-card-paid .msa-card-photo img,
.msa .msa-card-paid .msa-card-initials {
	font-size: 1.5rem;
	height: var(--msa-avatar-card);
	width: var(--msa-avatar-card);
}

.msa .msa-card-free .msa-card-photo {
	padding: var(--msa-space-4) var(--msa-space-4) 0;
}

.msa .msa-card-free .msa-card-photo img,
.msa .msa-card-free .msa-card-initials {
	font-size: 0.95rem;
	height: var(--msa-avatar-free);
	width: var(--msa-avatar-free);
}

.msa .msa-card-free .msa-card-body {
	padding: var(--msa-space-3) var(--msa-space-4) var(--msa-space-4);
}

.msa .msa-card-free .msa-card-name {
	font-size: var(--msa-fs-3);
}

.msa .msa-card-free .msa-card-badges {
	margin: auto 0 0;
	padding-top: var(--msa-space-2);
}

/* The initials fallback, on the same round plate as a real photo. */

.msa-card-initials {
	align-items: center;
	background: var(--msa-primary-tint);
	border: 2px solid var(--msa-surface);
	border-radius: var(--msa-radius-pill);
	box-shadow: 0 0 0 1px var(--msa-border);
	color: var(--msa-primary-dark);
	display: flex;
	font-weight: var(--msa-weight-bold);
	height: var(--msa-avatar-card);
	justify-content: center;
	line-height: 1;
	width: var(--msa-avatar-card);
}

/* Profile hero band */

/*
 * The BASE band is a contained card, because [msa_profile] can drop this hero
 * into any post on any theme and the plugin does not own the viewport there.
 * The full-bleed treatment below is scoped to .msa-page, the plugin's own
 * centred page column, which is the only container whose geometry it knows.
 */

.msa-profile-hero {
	background: var(--msa-primary);
	border-radius: var(--msa-radius-lg);
	color: var(--msa-on-primary);
	margin-block: 0 var(--msa-space-8);
	padding: var(--msa-space-8) var(--msa-space-6);
}

/*
 * FULL BLEED AND SQUARE EDGED on the plugin's own profile page, the directory
 * hero's treatment character for character (client QA round 7 item 1). It used
 * to be a rounded card inset a rem either side of the page column while the
 * archive's band ran edge to edge on the same site, which is the difference
 * the client saw.
 *
 * Every value here is copied from .msa-hero above rather than re-derived: the
 * same negative inline margin, the same padding-inline formula, the same
 * 76rem inner measure. That is deliberate. The bleed is already measured at
 * ZERO added horizontal overflow at 1280 and 375 on the client's own site, and
 * a second, differently-shaped bleed would have to be re-proven and could
 * drift. The scrollbar caveat recorded on .msa-hero applies here unchanged.
 *
 * It sets NO margin-block. That belongs to the base rule above and, inside a
 * masthead, to .msa-masthead > .msa-profile-hero - which is also two tokens,
 * so a margin-block declared here would tie with it and win on source order,
 * putting the 32px gap back underneath the band that the masthead exists to
 * remove.
 */

.msa-page .msa-profile-hero {
	border-radius: 0;
	margin-inline: calc(50% - 50vw);
	/*
	 * 32px, down from round 7's 48px (client QA round 8, approved from the
	 * mockup 2026-09-14). With the smaller portrait this is what brings the
	 * About heading well inside an 800px-tall laptop viewport. 24px on a
	 * phone, in the breakpoint block.
	 */
	padding-block: var(--msa-space-8);
	padding-inline: max(var(--msa-space-4), calc(50vw - 37rem));
}

/*
 * THREE COLUMNS, not two (client QA round 7 item 2): portrait, then the
 * name block, then "Back to directory" pinned to the band's right edge by
 * the auto inline-start margin. The band used to be a two-column grid whose
 * right half was empty, with the back link stacked under the Call and Email
 * buttons inside the middle column.
 *
 * Flex rather than grid on purpose. A three-column grid track list has to
 * name a column for the portrait, and a profile with no photo then either
 * indents by a phantom track or needs its own placement rules. Here the
 * portrait simply is not a flex item when it is not rendered, and the other
 * two close up.
 *
 * Wrapping is what happens below the breakpoint: the heading block's 20rem
 * flex-basis cannot share a line with the portrait on a narrow viewport, so
 * the three items stack in DOM order - portrait, name block, back link -
 * rather than overlapping.
 */

.msa-profile-hero-inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-4);
	margin: 0 auto;
	max-width: 76rem;
	min-width: 0;
}

.msa-profile-photo {
	display: block;
	flex: 0 0 auto;
	min-width: 0;
}

.msa-profile-photo img {
	aspect-ratio: 1 / 1;
	background: var(--msa-on-primary-fill);
	border: 3px solid rgba(255, 255, 255, 0.85);
	border-radius: var(--msa-radius-pill);
	display: block;
	height: var(--msa-avatar-profile);
	object-fit: cover;
	width: var(--msa-avatar-profile);
}

.msa-profile-heading {
	flex: 1 1 20rem;
	min-width: 0;
}

.msa-profile-name {
	font-size: var(--msa-fs-profile-name);
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0 0 var(--msa-space-2);
}

.msa-page .msa-profile-name {
	color: var(--msa-on-primary);
}

.msa-profile-role,
.msa-profile-location {
	align-items: center;
	color: var(--msa-on-primary-muted);
	display: flex;
	font-size: var(--msa-fs-2);
	gap: var(--msa-space-2);
	line-height: var(--msa-lh-snug);
	margin: 0 0 var(--msa-space-1);
}

.msa-profile-location {
	font-size: var(--msa-fs-1);
}

.msa-page .msa-profile-role,
.msa-page .msa-profile-location {
	color: var(--msa-on-primary-muted);
}

.msa-profile-badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-2);
	margin: var(--msa-space-3) 0 0;
}

/*
 * A DARK veil, not a translucent white one. The rule is written for the
 * WORST brand color an agency can set, not for the shipped default: on a
 * light brand blue such as Medicare Plan Finder's #0679c2, white at 16
 * percent composites to #2e8ecc and drops the white label to 3.59:1, and
 * axe caught exactly that on the profile surface. The same rule the hover
 * states follow applies here: on a colored ground, veils darken.
 * --msa-on-primary-veil over the platform primary gives 14.26:1 and over
 * that same light blue still clears the floor, because it stays computable
 * over any brand color an agency picks, which a derived hex could not.
 */

.msa-profile-badges .msa-badge {
	background: var(--msa-on-primary-veil);
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--msa-on-primary);
}

.msa-profile-contact {
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-3);
	margin: var(--msa-space-4) 0 0;
}

/*
 * The auto inline-start margin is what puts this on the band's RIGHT edge; it
 * is vertically centred with the rest of the row by the inner wrapper's
 * align-items. Centred rather than top-pinned because the band's height is
 * set by a 160px portrait on a rich record and by the name block on a thin
 * one, and a top-pinned button reads as a stray element beside the taller of
 * those two. The auto margin is cancelled below the breakpoint, where the
 * items have stacked and "right edge" would mean the far side of an
 * otherwise left-aligned column.
 */

.msa-profile-back {
	flex: 0 0 auto;
	margin: 0 0 0 auto;
}

/* Profile body: the main column and the "At a glance" card */

/*
 * CLIENT-APPROVED FROM A MOCKUP (Task 36b client QA round 8, 2026-09-14).
 * The approved mockup is committed at
 * agent-docs/tasks/36b-design-notes/profile-mockup-approved-2026-09-14.html
 * and the ruling is the DECISIONS entry "Task 36b client QA round 8: profile
 * body redesign approved from mockup". It SUPERSEDES round 7's single
 * bordered card of bands (.msa-profile-sections, removed): the main column
 * sits on the page ground with no card of its own, and ONLY the sidebar is a
 * card. Do not restore the round-7 card without a new client ruling.
 *
 * The mockup was drawn in Medicare Plan Finder's literal hexes for
 * readability. None of them are used here: every colour below is a token,
 * because this sheet ships the PLATFORM palette to every agency
 * (Test_Platform_Defaults). The mockup's icon-circle fill is
 * --msa-primary-tint.
 *
 * ONE COLUMN BY DEFAULT, in source order: main column, then card. Two columns
 * only on the plugin's own page from 1000px; the breakpoint block near the end
 * of this file explains why that is scoped to .msa-page rather than written as
 * a container query.
 *
 * Almost every rule here is two classes, deliberately. MPF2024, the first
 * host this shipped to, styles the bare elements underneath at weights a
 * single-class rule does not always clear: h1-h3 at weight 700 with a 20px
 * bottom margin and h2 at 30px, p/ul/ol at a 40px line-height, ul li at a 10px
 * bottom margin, "ul li:last-child" at 0,1,2, and a reset that gives spans and
 * anchors "font: inherit". A property this file does not restate is a
 * property the theme decides, so the list and label rules restate
 * line-height, list-style, weight and margin explicitly.
 */

.msa-profile-layout {
	align-items: start;
	display: grid;
	gap: var(--msa-space-8);
	grid-template-columns: minmax(0, 1fr);
}

.msa-profile-col {
	min-width: 0;
}

/* Main column: About, then the video. */

.msa-profile-col-main > * + * {
	margin-top: var(--msa-space-8);
}

.msa-profile-col-main .msa-profile-section-title {
	color: var(--msa-ink);
	font-size: var(--msa-fs-5);
	font-weight: var(--msa-weight-bold);
	line-height: var(--msa-lh-tight);
	margin: 0 0 var(--msa-space-3);
}

/*
 * The mockup's reading setting: 18px on a 1.65 line-height, capped at a 68ch
 * measure. The paragraphs restate size and line-height as "inherit" because
 * the base reset hands every <p> the 17px body size at 0,1,0, which
 * inheritance from the wrapper would never override.
 *
 * --msa-text, not --msa-muted: this copy sits on the HOST's ground, where the
 * plugin cannot compute a ratio (see the rule under .msa-page).
 */

.msa-profile-about .msa-text {
	color: var(--msa-text);
	font-size: var(--msa-fs-3);
	line-height: 1.65;
	max-width: var(--msa-measure);
}

.msa-profile-about .msa-text p {
	color: var(--msa-text);
	font-size: inherit;
	line-height: inherit;
	margin: 0;
}

.msa-profile-about .msa-text p + p {
	margin-top: var(--msa-space-4);
}

/*
 * 16:9 at the column's full width, rounded. The darkest primary shade is the
 * ground behind the frame, so it has a shape before the player paints.
 * border: 0 because a UA iframe carries a 2px inset border and a host
 * theme's reset is not guaranteed to remove it.
 */

.msa-profile-video .msa-video {
	aspect-ratio: 16 / 9;
	background: var(--msa-primary-darker);
	border: 0;
	border-radius: var(--msa-radius-lg);
	display: block;
	height: auto;
	max-width: 100%;
	width: 100%;
}

/*
 * THE "AT A GLANCE" CARD, the only card in the profile body: tinted ground,
 * hairline border, 12px radius, 22px padding.
 *
 * Its small uppercase labels are where --msa-muted appears on this route, and
 * that is safe for the standing reason: the card paints its own
 * --msa-surface-alt ground, where --msa-muted computes 5.41:1. Everything on
 * the host's ground (About, "Also on this site") stays on --msa-text.
 */

.msa .msa-profile-glance {
	background: var(--msa-surface-alt);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-lg);
	color: var(--msa-text);
	margin: 0;
	padding: 1.375rem;
}

.msa .msa-profile-glance-title,
.msa .msa-profile-group-label {
	color: var(--msa-muted);
	font-size: var(--msa-fs-eyebrow);
	font-weight: var(--msa-weight-black);
	letter-spacing: 0.09em;
	line-height: var(--msa-lh-snug);
	margin: 0 0 var(--msa-space-3);
	text-transform: uppercase;
}

.msa-profile-glance .msa-profile-glance-title {
	margin-bottom: var(--msa-space-4);
}

/*
 * The fact rows. ONE list, but it flows into as many 15rem columns as the
 * card is wide: a single column in the 340px sidebar and on a phone, two or
 * more when the card spans a tablet-width page or a thin record's full-width
 * layout. That is what stops a full-width card reading as a narrow list with
 * a void to its right.
 */

.msa .msa-detail-list {
	display: grid;
	gap: 0.875rem var(--msa-space-6);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	line-height: var(--msa-lh-snug);
	list-style: none;
	margin: 0;
	padding: 0;
}

.msa .msa-detail-row {
	align-items: center;
	column-gap: var(--msa-space-3);
	display: grid;
	grid-template-columns: 2.125rem minmax(0, 1fr);
	margin: 0;
	min-width: 0;
	padding: 0;
}

.msa .msa-detail-icon {
	align-items: center;
	background: var(--msa-primary-tint);
	border-radius: var(--msa-radius-pill);
	color: var(--msa-primary);
	display: flex;
	height: 2.125rem;
	justify-content: center;
	width: 2.125rem;
}

.msa-detail-icon .msa-icon {
	height: 1.0625rem;
	width: 1.0625rem;
}

.msa .msa-detail-body {
	display: block;
	min-width: 0;
}

.msa .msa-detail-label {
	color: var(--msa-muted);
	display: block;
	font-size: var(--msa-fs-label);
	font-weight: var(--msa-weight-bold);
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

/*
 * The VALUE keeps the 16px floor; only its label is small. overflow-wrap:
 * anywhere so a long email address breaks inside the 340px card instead of
 * pushing the card wider than its track.
 */

.msa .msa-detail-value {
	color: var(--msa-text);
	display: block;
	font-size: var(--msa-fs-1);
	line-height: var(--msa-lh-snug);
	margin-top: 1px;
	min-width: 0;
	overflow-wrap: anywhere;
}

.msa-detail-value a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/*
 * The card's groups: Services offered, Specialties, Licensed in, Connect.
 * Each is ruled off from what precedes it by a hairline, with two exceptions
 * that follow: no rule directly under the card title (a record with no fact
 * rows), and none between Services offered and Specialties, which read as one
 * group.
 */

.msa .msa-profile-group {
	border-top: 1px solid var(--msa-border);
	margin: var(--msa-space-5) 0 0;
	padding: var(--msa-space-4) 0 0;
}

.msa-profile-glance-title + .msa-profile-group {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}

.msa-profile-services + .msa-profile-specialties {
	border-top: 0;
	margin-top: var(--msa-space-4);
	padding-top: 0;
}

.msa-profile-glance .msa-profile-group-text {
	color: var(--msa-text);
	font-size: var(--msa-fs-1);
	line-height: var(--msa-lh-snug);
	margin: 0;
	overflow-wrap: anywhere;
}

/*
 * COMPACT WRAPPING CHIPS, not a two-column grid. Round 7 set Services offered
 * as a rigid grid of equal cells; the approved card lets each chip take its
 * own width and wrap, with the chip step (14px) as the one type size below the
 * 16px floor. White fill on the tinted card, so a chip reads as a tag rather
 * than as a hole in the ground.
 */

.msa .msa-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4375rem;
	line-height: 1.3;
	list-style: none;
	margin: 0;
	padding: 0;
}

.msa-chip-list li {
	margin: 0;
	min-width: 0;
}

.msa-profile-glance .msa-chip {
	background: var(--msa-surface);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-sm);
	color: var(--msa-text);
	display: inline-block;
	font-size: var(--msa-fs-chip);
	line-height: 1.3;
	padding: 0.3125rem 0.625rem;
}

/*
 * Social links. The ANCHOR is the 44px tap target; the pill inside it is the
 * visual, sized like a chip. Rows of pills therefore sit 44px apart with no
 * row gap, which reads as a normal chip row and never shrinks a target.
 */

.msa .msa-social-list {
	column-gap: 0.4375rem;
	display: flex;
	flex-wrap: wrap;
	line-height: 1.3;
	list-style: none;
	margin: 0;
	padding: 0;
	row-gap: 0;
}

.msa-social-list li {
	margin: 0;
}

.msa-social-link {
	align-items: center;
	display: inline-flex;
	min-height: var(--msa-tap);
	text-decoration: none;
}

.msa-social-link .msa-social-pill {
	align-items: center;
	background: var(--msa-surface);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-pill);
	display: inline-flex;
	font-size: var(--msa-fs-chip);
	gap: 0.375rem;
	padding: 0.3125rem 0.75rem;
}

.msa-social-link:hover .msa-social-pill,
.msa-social-link:focus-visible .msa-social-pill {
	background: var(--msa-primary-tint);
	border-color: var(--msa-border-strong);
}

.msa-social-pill .msa-icon {
	color: var(--msa-primary);
	height: 1rem;
	width: 1rem;
}

/*
 * "Also on this site": BELOW both columns at full width, with a hairline
 * above and its links wrapping inline. Each link keeps the 44px row height, so
 * the rows need no gap of their own.
 */

.msa-profile-body > .msa-profile-also {
	border-top: 1px solid var(--msa-border);
	margin: var(--msa-space-10) 0 0;
	padding: var(--msa-space-6) 0 0;
}

.msa-profile-also .msa-profile-also-title {
	color: var(--msa-ink);
	font-size: var(--msa-fs-4);
	font-weight: var(--msa-weight-bold);
	line-height: var(--msa-lh-tight);
	margin: 0 0 var(--msa-space-2);
}

.msa-profile-also .msa-profile-also-scope {
	color: var(--msa-text);
	font-size: var(--msa-fs-1);
	margin: 0;
}

.msa .msa-profile-also-list {
	column-gap: 1.75rem;
	display: flex;
	flex-wrap: wrap;
	line-height: var(--msa-lh-snug);
	list-style: none;
	margin: 0;
	padding: 0;
	row-gap: 0;
}

.msa-profile-also-list li {
	margin: 0;
}

.msa-profile-also li a {
	align-items: center;
	display: inline-flex;
	min-height: var(--msa-tap);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Search form and results */

.msa-search-form {
	align-items: flex-end;
	background: var(--msa-surface);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-lg);
	box-shadow: var(--msa-shadow-sm);
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-4);
	margin: 0 0 var(--msa-space-8);
	padding: var(--msa-space-6);
}

.msa-search-form p {
	display: flex;
	flex: 1 1 14rem;
	flex-direction: column;
	gap: var(--msa-space-1);
	margin: 0;
	min-width: 0;
}

/*
 * Form controls carry a .msa ancestor token for the same reason the submit
 * buttons do: the theme's own input/label rules sit at 0,1,1 (an attribute
 * selector plus the element), which ties a two-token component rule and
 * wins on source order. Twenty Twenty-One's 3px form border was overriding
 * the field styling here until these were raised to 0,2,1.
 */

.msa .msa-search-form label {
	color: var(--msa-ink);
	display: block;
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-semibold);
	margin: 0;
}

.msa .msa-search-form input,
.msa .msa-search-form select {
	background: var(--msa-surface);
	border: 1px solid var(--msa-input-border);
	border-radius: var(--msa-radius-sm);
	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	min-height: var(--msa-tap);
	padding: 0 var(--msa-space-3);
	width: 100%;
}

/*
 * THE STATE SELECT DRAWS ITS OWN ARROW (client QA round 4 item 1).
 *
 * The native arrow was not rendering on the client's site. It cannot be
 * relied on in either direction: a UA paints it, a theme's own form reset
 * can suppress it, and nothing in CSS can query which happened. So the
 * plugin stops asking - appearance:none removes whatever the platform would
 * have drawn, in every browser, and the chevron below is drawn by this file.
 * A select with no affordance at all is a worse failure than a doubled one,
 * and this rule makes both impossible.
 *
 * The chevron is an inline SVG data URI, not a pseudo-element: a <select> is
 * a replaced element and does not render ::before/::after reliably, and the
 * alternative - wrapping every select in a positioning div - would change
 * markup on two forms to solve a painting problem. No network request, no
 * icon font, no CDN (Rule 3).
 *
 * Its stroke is the fixed neutral #5f6774 (--msa-muted's literal). A data URI
 * cannot read a custom property, and a UI affordance is the right place for a
 * neutral rather than the agency's brand hue anyway. 4.99:1 on white.
 *
 * padding-inline-end is 2.5rem against a 12px arrow inset 12px from the edge,
 * so the longest option ("District of Columbia") clears the chevron by 8px
 * and can never run under it.
 *
 * WEIGHT. Two selectors, deliberately, each matching the weight of the rule
 * it has to beat and winning on source order: 0,2,1 for the search page's
 * control rule above, 0,3,1 for the hero's. A single 0,2,1 selector would
 * lose the background longhands to the hero rule's 0,3,1 `background`
 * shorthand and the hero select would come out arrowless - which is the
 * exact defect this fixes.
 */

.msa .msa-search-form select,
.msa .msa-hero-search .msa-hero-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%235f6774' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
	background-position: right var(--msa-space-3) center;
	background-repeat: no-repeat;
	background-size: 0.75rem 0.75rem;
	padding-inline-end: var(--msa-space-10);
}

.msa-search-form .msa-search-submit {
	flex: 0 0 auto;
	justify-content: flex-end;
}

.msa-results-heading {
	font-size: var(--msa-fs-6);
	margin: var(--msa-space-8) 0 var(--msa-space-5);
}

.msa-band-heading {
	border-top: 1px solid var(--msa-border);
	color: var(--msa-ink);
	font-size: var(--msa-fs-5);
	margin: var(--msa-space-6) 0 var(--msa-space-4);
	padding-top: var(--msa-space-4);
}

/* Notices and the pre-first-sync placeholder */

.msa-notice {
	background: var(--msa-surface);
	border: 1px solid var(--msa-border);
	border-left: 4px solid var(--msa-primary);
	border-radius: var(--msa-radius-md);
	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	margin: 0 0 var(--msa-space-6);
	padding: var(--msa-space-4) var(--msa-space-5);
}

/* --msa-text: sits on the host's ground (see the .msa-page note). */

.msa-placeholder {
	border: 1px dashed var(--msa-border-strong);
	border-radius: var(--msa-radius-md);
	color: var(--msa-text);
	padding: var(--msa-space-4);
}

/* Padded section (req 4b/4d): visually subordinate to the own-agent block. */

.msa-padded {
	border-top: 1px solid var(--msa-border);
	margin-top: var(--msa-space-12);
	padding-top: var(--msa-space-6);
}

/* --msa-text: sits on the host's ground (see the .msa-page note). */

.msa-padded-heading {
	color: var(--msa-text);
	font-size: var(--msa-fs-5);
	margin: 0 0 var(--msa-space-5);
}

/*
 * Pagination (client QA round 4 item 5): the controls now wear the plugin's
 * BUTTON shape and typography rather than reading as plain bordered boxes -
 * same radius, same 44px floor, same semibold 16px label as .msa-button.
 *
 * Inactive pages and Previous/Next take the OUTLINE treatment (white ground,
 * blue label, blue border); the current page takes the SOLID fill. Gold is
 * deliberately absent: the accent is reserved for primary actions ("View
 * profile", "Call"), and spraying it across ten page numbers would spend that
 * signal on navigation chrome.
 *
 * The 44px floor here must never regress (sprint-05d review caught it once).
 */

.msa-pagination {
	margin: var(--msa-space-8) 0;
}

.msa-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--msa-space-2);
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.msa-pagination li {
	margin: 0;
}

.msa-pagination a,
.msa-pagination span {
	align-items: center;
	background: var(--msa-surface);
	border: 1px solid var(--msa-primary);
	border-radius: var(--msa-radius-sm);
	color: var(--msa-primary-dark);
	display: inline-flex;
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-semibold);
	justify-content: center;
	line-height: var(--msa-lh-tight);
	min-height: var(--msa-tap);
	min-width: var(--msa-tap);
	padding: 0 var(--msa-space-4);
	text-decoration: none;
}

.msa-pagination a:hover,
.msa-pagination a:focus-visible {
	background: var(--msa-primary-tint);
	border-color: var(--msa-primary-dark);
}

.msa-pagination .current {
	background: var(--msa-primary);
	border-color: var(--msa-primary);
	color: var(--msa-on-primary);
	font-weight: var(--msa-weight-bold);
}

/*
 * The ellipsis is not a control: no border, no button shape, and no 44px
 * target, because giving it one would put a 44px dead zone between two live
 * ones. It keeps the type size so the row stays on one baseline.
 */

.msa-pagination .dots {
	background: none;
	border-color: transparent;
	/* --msa-text: the only pagination item with no fill of its own, so it
	   lands on the host's ground (see the .msa-page note). */
	color: var(--msa-text);
	font-weight: var(--msa-weight-semibold);
	min-width: auto;
	padding: 0 var(--msa-space-1);
}

/*
 * DISCLOSURES (req 7; restyled for client QA round 4 item 6). Always present,
 * never hidden, never below the 16px floor. The bottom padding clears the
 * fixed back-to-top pill at 375px.
 *
 * The client's note was that these read as weak - "Ours looks dumb and is
 * WEAK compared to what MPF has in their footer" - and the two things that
 * are NOT available as answers are the ones that would normally be reached
 * for: the CMS disclaimer's text is centralized platform copy delivered
 * through the API and must not drift, and the agency fine print is the
 * client's to change. No heading was invented over them either; a label
 * above a disclosure is itself disclosure-adjacent copy and not a session's
 * to draft.
 *
 * So the whole answer is typographic, and it is three moves:
 *   1. SEPARATION. Four rem of air above the block and a 3px top rule in the
 *      strong border tone, so the page ends on a deliberate closing band
 *      instead of the listings trailing off into small grey text.
 *   2. HIERARCHY. The mandated CMS disclaimer is the block's primary voice:
 *      17px in --msa-text (13.99:1 on this ground, up from 7.16:1 before the
 *      platform-default restore darkened --msa-text). The agency's own fine
 *      print is secondary at the 16px floor in --msa-muted (5.41:1). Two
 *      distinct registers, both legible, neither shrunk. The gap between the
 *      two widened with that restore, which SUITS the hierarchy here: the
 *      mandated line should out-shout the optional one.
 *   3. MEASURE. Both are capped at --msa-measure so a 1280px page does not
 *      set legal text 1100px wide, which is the single biggest reason a
 *      block like this reads as an afterthought.
 */

.msa-disclosures {
	background: var(--msa-surface-alt);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-lg);
	border-top: 3px solid var(--msa-border-strong);
	color: var(--msa-muted);
	margin-top: var(--msa-space-16);
	padding: var(--msa-space-8) var(--msa-space-8) calc(var(--msa-tap) + var(--msa-space-8));
}

.msa-disclaimer {
	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	margin: 0;
	max-width: var(--msa-measure);
}

.msa-fine-print {
	border-top: 1px solid var(--msa-border);
	color: var(--msa-muted);
	font-size: var(--msa-fs-1);
	margin: var(--msa-space-5) 0 0;
	max-width: var(--msa-measure);
	padding-top: var(--msa-space-5);
}

/*
 * When the agency has asserted that their site carries its own non-affiliation
 * disclaimer, the platform block is omitted and the fine print becomes the
 * panel's only child. Its divider then has nothing to divide, so it goes.
 */

.msa-fine-print:first-child {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}

.msa .msa-disclaimer p {
	color: var(--msa-text);
	font-size: var(--msa-fs-2);
	margin: 0 0 var(--msa-space-3);
}

.msa .msa-fine-print p {
	color: var(--msa-muted);
	font-size: var(--msa-fs-1);
	margin: 0 0 var(--msa-space-3);
}

.msa .msa-disclaimer p:last-child,
.msa .msa-fine-print p:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.msa-disclosures {
		padding: var(--msa-space-5) var(--msa-space-5) calc(var(--msa-tap) + var(--msa-space-6));
	}
}

/* Back to top: no JavaScript anywhere in this plugin, so the pill is a
   plain in-page anchor and is always visible. */

.msa-back-to-top {
	align-items: center;
	background: var(--msa-primary-dark);
	border-radius: var(--msa-radius-pill);
	box-shadow: var(--msa-shadow-md);
	color: var(--msa-on-primary);
	display: inline-flex;
	font-size: var(--msa-fs-1);
	font-weight: var(--msa-weight-semibold);
	gap: var(--msa-space-2);
	inset-block-end: var(--msa-space-4);
	inset-inline-end: var(--msa-space-4);
	min-height: var(--msa-tap);
	padding-inline: var(--msa-space-5);
	position: fixed;
	text-decoration: none;
	z-index: 20;
}

.msa a.msa-back-to-top {
	color: var(--msa-on-primary);
}

.msa-back-to-top:hover,
.msa-back-to-top:focus-visible {
	background: var(--msa-primary-darker);
}

/*
 * CALLS TO ACTION (Task 55, D5): one button at the top of #msa-main and one in
 * a band at the bottom, on the three plugin templates only. Nothing here
 * renders until the site enters its lead path.
 *
 * THE TOP BAR takes the slot the breadcrumb bar used to open the page with. It
 * cancels .msa-page's top padding exactly as the breadcrumbs do, so it sits
 * directly under the theme's header (with the theme's menus hidden it reads as
 * the header's button), and the masthead or breadcrumb bar after it drops the
 * negative block-start margin that assumed it was the first child of <main>.
 * Without that second rule the breadcrumb strip would slide up over the bar.
 *
 * The bar paints no ground of its own: it sits on the host's ground, and the
 * button carries its own fill. Right-aligned on wide screens; under 700px the
 * button runs full width, where a right-aligned button reads as a stray.
 *
 * THE BOTTOM BAND is a tinted panel in the disclosure block's own tokens,
 * centred, after the disclosures.
 *
 * Email (a paying agent who synced no phone) reuses the hero's secondary skin,
 * which is white on transparent because the hero is a dark band. On these
 * grounds that label would vanish, so inside a bar it is painted as a solid
 * primary button: a ground this file paints, under the on-primary label whose
 * contrast the plugin already computes.
 */

.msa-cta-bar {
	display: flex;
}

.msa-cta-bar-top {
	justify-content: flex-end;
	margin-block: calc(var(--msa-space-6) * -1) 0;
	padding-block: var(--msa-space-3);
}

.msa-cta-bar-top + .msa-masthead,
.msa-cta-bar-top + .msa-breadcrumbs {
	margin-block-start: 0;
}

.msa-cta-bar-bottom {
	background: var(--msa-surface-alt);
	border: 1px solid var(--msa-border);
	border-radius: var(--msa-radius-lg);
	justify-content: center;
	margin-top: var(--msa-space-8);
	padding: var(--msa-space-6) var(--msa-space-4);
}

.msa-cta-bar > a {
	min-height: var(--msa-tap);
	text-align: center;
}

.msa .msa-cta-bar .msa-button-secondary {
	background: var(--msa-primary);
	border-color: var(--msa-primary);
}

.msa .msa-cta-bar .msa-button-secondary:hover,
.msa .msa-cta-bar .msa-button-secondary:focus-visible {
	background: var(--msa-primary-darker);
	border-color: var(--msa-primary-darker);
}

/*
 * EMAIL IN A BAR, FOCUSED (T55-CR-c1-Y6). Twenty Twenty-One paints a focused
 * link at
 *   .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) -> 0,4,1
 * with a near-white fill and a transparent outline. The accent skin survives
 * that (its ink is dark), but the Email skin's white label vanished on it. So
 * the bar's Email button outranks the theme one token higher (0,5,1, the
 * SUBMIT BUTTONS pattern), on :focus as well as :focus-visible because the
 * theme keys on :focus, and the keyboard state carries the plugin's own ring,
 * which the theme's transparent outline would otherwise erase.
 */

.msa .msa-cta-bar > a.msa-button.msa-button-secondary:focus {
	background: var(--msa-primary-darker);
	border-color: var(--msa-primary-darker);
}

.msa .msa-cta-bar > a.msa-button.msa-button-secondary:focus-visible {
	outline: 2px solid var(--msa-primary);
	outline-offset: 2px;
}

/*
 * THE BACK-TO-TOP PILL is fixed at the bottom inline end. The disclosures
 * reserve a tap height under their text for it, and the band is now the last
 * block, so it keeps the same clearance (T55-CR-c1-Y7): its button scrolls
 * clear of the pill when keyboard focus reaches it at the viewport's bottom
 * edge, and on a phone, where the button runs full width under the pill, a
 * margin after the band keeps the pill off it at the end of the page.
 */

.msa-cta-bar-bottom > a {
	scroll-margin-block-end: calc(var(--msa-tap) + var(--msa-space-4) * 2);
}

@media (max-width: 700px) {
	.msa-cta-bar > a {
		flex: 1 1 auto;
	}

	/* The band's button is as wide as the top bar's (T55-CR-c1-Y8): no inline
	   padding and no inline border, so on a phone the band reads as a
	   full-width strip and "Call {name}: {number}" wraps no sooner than it
	   does in the top bar. */
	.msa-cta-bar-bottom {
		border-inline-width: 0;
		border-radius: 0;
		padding: var(--msa-space-4) 0;
	}

	.msa-back-to-top + .msa-cta-bar-bottom {
		margin-block-end: calc(var(--msa-tap) + var(--msa-space-4) * 2);
	}
}

/*
 * ============================================================================
 * EXPLICIT LINK COLORS (client revision item 8). Every anchor the plugin
 * emits declares its own color here, in all five states, and nothing relies
 * on inheriting one.
 *
 * WHY THIS SECTION EXISTS. The plugin used to set link colors either not at
 * all or with a blanket ".msa a" rule at 0,1,1. Both lose to a host theme
 * that colors links through anything more specific than a bare element
 * selector, and the symptom is silent: nothing errors, the agent names and
 * the phone and email icons simply come out in the theme's link color.
 *
 * WEIGHT. Two classes plus the element (0,2,1), or three with a state
 * pseudo-class. That clears any realistic theme rule, and it clears an
 * agency override written against the bare plugin class - which means an
 * agency recoloring these must now prefix its selector with .msa. That is a
 * deliberate trade and it is written up in the install guide's appearance
 * section. No !important anywhere: an agency that matches this weight still
 * wins on source order, because print_additional_css() prints at wp_head 999.
 *
 * NOT LISTED HERE ON PURPOSE: .msa-button-themed. When the agency has named
 * its theme's button class, the theme owns that label's color and the plugin
 * must not set one. See the themed-CTA block above.
 * ============================================================================
 */

.msa .msa-breadcrumb-item a,
.msa .msa-breadcrumb-item a:link,
.msa .msa-breadcrumb-item a:visited,
.msa .msa-detail-row a,
.msa .msa-detail-row a:link,
.msa .msa-detail-row a:visited,
.msa .msa-text a,
.msa .msa-text a:link,
.msa .msa-text a:visited,
.msa .msa-profile-also a,
.msa .msa-profile-also a:link,
.msa .msa-profile-also a:visited,
.msa .msa-pagination a,
.msa .msa-pagination a:link,
.msa .msa-pagination a:visited,
.msa .msa-notice a,
.msa .msa-notice a:link,
.msa .msa-notice a:visited,
.msa .msa-disclaimer a,
.msa .msa-disclaimer a:link,
.msa .msa-disclaimer a:visited,
.msa .msa-fine-print a,
.msa .msa-fine-print a:link,
.msa .msa-fine-print a:visited {
	/*
	 * The DERIVED DARK shade, not --msa-primary. Link text lands on the page
	 * background, the card footer band and the disclosure band as often as on
	 * white, and the brand blue computes 4.26:1 / 4.40:1 there - axe caught
	 * exactly that on the breadcrumbs and the disclosure links. The dark shade
	 * is the same hue from the agency's own color and clears 4.5 on every
	 * ground (6.74:1 at worst). Icon links keep the brighter shade: they carry
	 * no text, so 1.4.3 does not apply to them.
	 */
	color: var(--msa-primary-dark);
}

.msa .msa-breadcrumb-item a:hover,
.msa .msa-breadcrumb-item a:focus,
.msa .msa-breadcrumb-item a:active,
.msa .msa-detail-row a:hover,
.msa .msa-detail-row a:focus,
.msa .msa-detail-row a:active,
.msa .msa-text a:hover,
.msa .msa-text a:focus,
.msa .msa-text a:active,
.msa .msa-profile-also a:hover,
.msa .msa-profile-also a:focus,
.msa .msa-profile-also a:active,
.msa .msa-pagination a:hover,
.msa .msa-pagination a:focus,
.msa .msa-pagination a:active,
.msa .msa-notice a:hover,
.msa .msa-notice a:focus,
.msa .msa-notice a:active,
.msa .msa-disclaimer a:hover,
.msa .msa-disclaimer a:focus,
.msa .msa-disclaimer a:active,
.msa .msa-fine-print a:hover,
.msa .msa-fine-print a:focus,
.msa .msa-fine-print a:active {
	color: var(--msa-primary-darker);
}

/* The agent name: heading ink, not link blue, on every tier. */

.msa .msa-card-name a,
.msa .msa-card-name a:link,
.msa .msa-card-name a:visited {
	color: var(--msa-ink);
}

.msa .msa-card-name a:hover,
.msa .msa-card-name a:focus,
.msa .msa-card-name a:active {
	color: var(--msa-primary-dark);
}

/* The card footer's phone and email icon links. */

.msa .msa-icon-link,
.msa .msa-icon-link:link,
.msa .msa-icon-link:visited {
	color: var(--msa-primary);
}

.msa .msa-icon-link:hover,
.msa .msa-icon-link:focus,
.msa .msa-icon-link:active {
	color: var(--msa-primary-dark);
}

/* The profile's social pills. */

.msa .msa-social-link,
.msa .msa-social-link:link,
.msa .msa-social-link:visited,
.msa .msa-social-link:hover,
.msa .msa-social-link:focus,
.msa .msa-social-link:active {
	color: var(--msa-text);
}

/* The back-to-top pill sits on the dark primary shade in every state. */

.msa .msa-back-to-top,
.msa .msa-back-to-top:link,
.msa .msa-back-to-top:visited,
.msa .msa-back-to-top:hover,
.msa .msa-back-to-top:focus,
.msa .msa-back-to-top:active {
	color: var(--msa-on-primary);
}

/*
 * The plugin's OWN button skins, in all five states. These only ever apply
 * when no theme button class is configured; when one is, the element carries
 * neither of these classes.
 */

.msa .msa-button,
.msa .msa-button:link,
.msa .msa-button:visited,
.msa .msa-button:hover,
.msa .msa-button:focus,
.msa .msa-button:active {
	color: var(--msa-on-primary);
}

.msa .msa-button-accent,
.msa .msa-button-accent:link,
.msa .msa-button-accent:visited,
.msa .msa-button-accent:hover,
.msa .msa-button-accent:focus,
.msa .msa-button-accent:active {
	color: var(--msa-accent-ink);
}

.msa .msa-button-secondary,
.msa .msa-button-secondary:link,
.msa .msa-button-secondary:visited,
.msa .msa-button-secondary:hover,
.msa .msa-button-secondary:focus,
.msa .msa-button-secondary:active,
.msa .msa-button-ghost,
.msa .msa-button-ghost:link,
.msa .msa-button-ghost:visited,
.msa .msa-button-ghost:hover,
.msa .msa-button-ghost:focus,
.msa .msa-button-ghost:active {
	color: var(--msa-on-primary);
}

/* Breakpoints. Base is one column: the plugin renders inside an unknown
   theme container, so nothing here relies on the viewport for width. */

@media (max-width: 699px) {
	/*
	 * Stacked, so "right edge" has no meaning: the back link left-aligns with
	 * everything else instead of drifting to the far side of the column.
	 */
	.msa-profile-back {
		margin-inline-start: 0;
	}

	/*
	 * The mockup's phone hero: 24px above and below the stacked band. Two
	 * tokens, because the full-bleed rule that sets the desktop value is
	 * itself .msa-page .msa-profile-hero and a single-class rule here would
	 * lose to it at any viewport width.
	 */
	.msa-page .msa-profile-hero {
		padding-block: var(--msa-space-6);
	}

	/*
	 * FULL-WIDTH STACKED CALLS TO ACTION on a phone (client QA round 8, the
	 * mockup's phone frame). Layout only - direction, stretch, centring, and
	 * the margins the flex gap now owns - never a colour or a skin, so a
	 * themed button keeps its own look exactly as the themed-CTA block
	 * promises. Stretch rather than width: 100%, so a theme button with
	 * padding under content-box sizing cannot overflow the band.
	 */
	.msa-profile-heading .msa-profile-contact {
		align-items: stretch;
		flex-direction: column;
	}

	.msa-profile-contact > a {
		justify-content: center;
		margin: 0;
		text-align: center;
	}

	.msa-profile-about .msa-text {
		font-size: var(--msa-fs-2);
	}
}

/*
 * THE PORTRAIT SCALES WITH THE BAND. Round 7 set it at 144 / 200 / 240px.
 * Client QA round 8 (approved from the mockup 2026-09-14) shortened the hero
 * to 96px on a phone, 128px beside the name block from 700px and 160px from
 * 1024px, which together with the tighter band padding is what lifts About
 * above the fold on a laptop.
 *
 * The token is redefined rather than the img overridden, so
 * --msa-avatar-profile stays the one name for this measurement. The img keeps
 * both dimension attributes at its intrinsic 320px square and the CSS scales
 * it, so the box is reserved before the bytes arrive at every step and
 * nothing shifts on load. The sizes hint in Renderers::profile_hero_html()
 * mirrors these three steps.
 */

@media (min-width: 700px) {
	.msa {
		--msa-avatar-profile: 8rem;
	}

	.msa-profile-hero-inner {
		gap: var(--msa-space-4) var(--msa-space-8);
	}

	.msa-profile-photo img {
		border-width: 4px;
	}
}

/*
 * TWO COLUMNS: the main column plus the 340px "At a glance" card, 44px apart
 * and top aligned, so a long About simply lengthens the left column while the
 * card keeps its own height (client QA round 8).
 *
 * SCOPED TO .msa-page, the plugin's own centred page column, exactly as the
 * full-bleed hero is. The [msa_profile] shortcode can put this body in any
 * post on any theme, and a viewport query says nothing about how wide that
 * post's column is. Embedded, the body stays one column, which is right for
 * the narrow content columns shortcodes usually land in.
 *
 * NOT A CONTAINER QUERY, and that was weighed. container-type: inline-size
 * applies inline-size containment, so the container's width can no longer
 * come from its content. On a host that places the shortcode in a
 * shrink-to-fit box (a flex item with no basis, a float, an auto grid track)
 * the whole profile would collapse to zero width, a failure the plugin could
 * not see and an agency could not diagnose. The plugin knows the geometry of
 * its own page and nothing else, so that is the only place it goes two-column.
 *
 * A LONE COLUMN SPANS BOTH TRACKS. A thin record (no About, no video) emits
 * no main column, so the card takes the full width instead of sitting in the
 * right-hand track beside an empty one, and its fact rows flow into columns
 * on their own (see .msa-detail-list). A main column with no card spans the
 * same way.
 */

@media (min-width: 1000px) {
	.msa-page .msa-profile-layout {
		column-gap: 2.75rem;
		grid-template-columns: minmax(0, 1fr) 21.25rem;
	}

	.msa-profile-col:only-child {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.msa {
		--msa-avatar-profile: 10rem;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.msa-card {
		transition: box-shadow var(--msa-transition), border-color var(--msa-transition), transform var(--msa-transition);
	}

	.msa-card:hover {
		transform: translateY(-1px);
	}
}

@media print {
	.msa-back-to-top,
	.msa-pagination,
	.msa-breadcrumbs {
		display: none;
	}

	.msa-page {
		background: var(--msa-surface);
	}

	.msa-hero,
	.msa-profile-hero {
		background: var(--msa-surface);
		box-shadow: none;
		color: var(--msa-ink);
	}

	.msa-hero .msa-page-heading,
	.msa-hero-lede,
	.msa-page .msa-profile-name,
	.msa-page .msa-profile-role,
	.msa-page .msa-profile-location {
		color: var(--msa-ink);
	}

	.msa-hero-search,
	.msa-profile-back {
		display: none;
	}

	.msa-card,
	.msa-featured-band {
		box-shadow: none;
	}

	.msa-disclosures {
		display: block;
		padding-bottom: var(--msa-space-5);
	}
}
