/* Agent Recognition USA. Components that ABR does not have, and the places where ARU looks different.
   Loaded last, so it can adjust shared rules. Spacing stays on the 4/8 scale from variables.css. */

/* Headings: heavier and tighter than ABR's light institutional look */
:root { --fw-h1: 800; --fw-h2: 800; --track-h: -.028em; }
h1, h2 { font-weight: 800; letter-spacing: -.028em; }
h1 { font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.375rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem); line-height: 1.12; }
.eyebrow { font: 700 var(--fs-xs)/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.on-dark .eyebrow { color: var(--gold); }
.btn { border-radius: 999px; font-weight: 700; }
.btn--sm { min-height: 40px; padding-inline: 18px; }
.btn--gold { color: var(--navy-900); }
.btn--gold:hover { background: #E7A27A; }

/* Header: a slim bar with the call to action always visible on desktop */
.site-header { border-bottom: 1px solid var(--line-dark); }
.logo__name { font-weight: 800; letter-spacing: -.02em; }
.logo__sub { color: var(--gold); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; font-size: .6875rem; }
.nav__cta .btn { width: 100%; }
@media (min-width: 1100px) { .nav__cta .btn { width: auto; } }

/* Background lines used by every dark hero */
.hero__rosette, .page-hero__rosette, .ahero__lines { animation: none; }
.page-hero__rosette { opacity: .16; }

/* Portraits */
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; align-self: center; border-radius: 50%; background: var(--ivory); }
.portrait--empty { display: grid; place-items: center; background: var(--navy-700); color: var(--gold-300); font: 800 1.5rem/1 var(--font-heading); letter-spacing: .02em; }

/* Home hero ------------------------------------------------------------------------------------------ */
.ahero { position: relative; overflow: hidden; padding-block: var(--s-8) var(--s-9); background: var(--navy); }
.ahero__lines { position: absolute; width: 1100px; max-width: none; height: 1100px; right: -420px; top: -360px; opacity: .2; pointer-events: none; }
.ahero__grid { position: relative; display: grid; gap: var(--s-8); align-items: center; }
.ahero .eyebrow { margin-bottom: var(--s-4); }
.ahero h1 { max-width: 640px; }
.ahero__lead { margin-top: var(--s-5); max-width: 560px; font-size: var(--fs-lg); color: var(--slate-300); }
.ahero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.ahero__ticks { display: grid; gap: var(--s-2); margin-top: var(--s-6); color: var(--slate-300); font-size: var(--fs-sm); }
.ahero__ticks li { display: flex; align-items: center; gap: 10px; }
.ahero__ticks [data-icon] { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--navy-700); color: var(--gold); }
.ahero__ticks svg { width: 13px; height: 13px; }
.ahero__art { position: relative; width: 100%; max-width: 520px; margin-inline: auto; padding-top: 40px; }
.ahero__seal { position: absolute; top: 0; right: -8px; width: 112px; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .4)); z-index: 2; }

/* Strip of review sources under the hero */
.sources-strip { background: var(--white); border-bottom: 1px solid var(--line); }
.sources-strip__in { display: grid; gap: var(--s-4); padding-block: var(--s-6); }
.sources-strip p { font: 700 var(--fs-md)/1.4 var(--font-heading); letter-spacing: -.01em; }
.sources-strip ul { display: grid; gap: var(--s-3); }
.sources-strip li { display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); }
.sources-strip b { font: 800 1.125rem/1.2 var(--font-heading); }
.sources-strip span { font-size: var(--fs-sm); color: var(--slate); }

/* Three steps in cards */
.flow { display: grid; gap: var(--s-4); margin-top: var(--s-7); counter-reset: flow; }
.flow li { position: relative; padding: var(--s-6) var(--s-5) var(--s-5); background: var(--ivory); border-radius: var(--r-lg); }
.flow__n { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--s-4); border-radius: 50%; background: var(--navy); color: var(--gold); font: 800 1.125rem/1 var(--font-heading); }
.flow h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.016em; }
.flow p { margin-top: var(--s-2); color: var(--slate); }

/* Kit preview: a list next to the sample post and certificate */
.kit-show { display: grid; gap: var(--s-8); align-items: center; }
.kit-list { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.kit-list li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-3); color: var(--slate); font-size: var(--fs-sm); }
.kit-list b { display: block; color: var(--navy); font: 700 var(--fs-md)/1.4 var(--font-heading); letter-spacing: -.01em; }
.kit-list .li-i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--gold-100); color: var(--gold-ink); }
.kit-list .li-i svg { width: 22px; height: 22px; }
.kit-show__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-6); }
.kit-show__art { position: relative; padding: 0 0 18% 0; max-width: 560px; width: 100%; margin-inline: auto; }
.kit-show__post { width: 74%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.kit-show__cert { position: absolute; right: 0; bottom: 0; width: 62%; height: auto; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); rotate: 3deg; }

/* Sample profile card ------------------------------------------------------------------------------- */
.sample-card { position: relative; padding: var(--s-5); background: var(--white); color: var(--navy); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.band-ivory .sample-card, .section:not(.on-dark) .sample-card { box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.sample-card__tag { display: inline-block; margin-bottom: var(--s-4); padding: 4px 10px; border-radius: 999px; background: var(--gold-100); color: var(--gold-ink); font: 700 var(--fs-xs)/1.4 var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.sample-card__head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.sample-card__photo { width: 72px; box-shadow: 0 0 0 3px var(--gold); }
.sample-card h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.016em; }
.sample-card__head p { font-size: var(--fs-sm); color: var(--slate); line-height: 1.4; }
.sample-card__place { margin-top: 2px; }
.sample-card__score { grid-column: 1 / -1; display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--navy); color: var(--white); }
.sample-card__score b { font: 800 1.75rem/1 var(--font-heading); letter-spacing: -.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.sample-card__score span { font-size: var(--fs-sm); color: var(--slate-300); }
.sample-card .src-list { margin-top: var(--s-4); }
.sample-card__btn { width: 100%; margin-top: var(--s-4); }

/* Review sources, one row per site with its date */
.src-list { display: grid; gap: var(--s-2); }
.src { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.src__name { font: 800 var(--fs-md)/1.3 var(--font-heading); letter-spacing: -.01em; color: var(--navy); }
.src__name a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.src__rating { display: flex; align-items: center; gap: 6px; justify-self: end; }
.src__rating b { font: 800 var(--fs-md)/1 var(--font-heading); color: var(--navy); font-variant-numeric: tabular-nums; }
.src__count { font-size: var(--fs-sm); color: var(--slate); }
.src__date { justify-self: end; font-size: var(--fs-xs); color: var(--slate); white-space: nowrap; }
.src::before { content: ""; grid-row: 1 / span 2; display: none; }

/* Agent cards in grids ------------------------------------------------------------------------------ */
.agrid { display: grid; gap: var(--s-4); }
.sec-head + .agrid { margin-top: var(--s-7); }
.acard { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-4); align-content: start; padding: var(--s-5); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); transition: box-shadow var(--t-med), translate var(--t-med) var(--ease), border-color var(--t-med); }
.acard:hover { box-shadow: var(--shadow-md); translate: 0 -3px; border-color: var(--gold); }
.acard:focus-within { box-shadow: var(--focus); }
.acard__photo { width: 64px; }
.acard h3 { font-size: 1.125rem; font-weight: 800; letter-spacing: -.016em; }
.acard__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.acard__link:focus-visible { box-shadow: none; }
.acard__firm { font: 600 var(--fs-sm)/1.35 var(--font-body); color: var(--gold-ink); margin-top: 2px; }
.acard__place, .acard__src { font-size: var(--fs-sm); color: var(--slate); }
.acard__rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--slate); }
.acard__rating b { color: var(--navy); }
.acard__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.acard__score { display: grid; justify-items: end; line-height: 1.2; }
.acard__score b { font: 800 1.375rem/1.1 var(--font-heading); letter-spacing: -.016em; font-variant-numeric: tabular-nums; }
.acard__score span { font-size: var(--fs-xs); color: var(--slate); }
.empty-box { margin-top: var(--s-6); padding: var(--s-6); border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--slate); text-align: center; }

/* Plaques with the agent photo */
.plaque__top { position: relative; display: flex; align-items: flex-end; justify-content: space-between; height: 112px; padding: 0 var(--s-5); background: var(--navy); }
.plaque__photo { width: 96px; translate: 0 32px; box-shadow: 0 0 0 4px var(--white); }
.plaque__seal { position: static; width: 88px; margin-bottom: -28px; }
.plaque__body { padding-top: calc(var(--s-5) + 32px); }
.plaque__firm { font: 600 var(--fs-sm)/1.35 var(--font-body); color: var(--gold-ink); }

/* Agent profile ----------------------------------------------------------------------------------- */
.sample-bar { background: var(--gold-100); color: var(--navy); font-size: var(--fs-sm); }
.sample-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s-3); padding-block: var(--s-3); }
.sample-bar a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.agent-hero { display: grid; gap: var(--s-5); align-items: center; }
.agent-hero__photo { width: 120px; box-shadow: 0 0 0 4px var(--gold); }
.agent-hero__copy h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.agent-hero__firm { margin-top: var(--s-2); font: 600 var(--fs-lg)/1.4 var(--font-heading); color: var(--gold-300); }
.agent-hero__tagline { margin-top: var(--s-3); max-width: 560px; color: var(--slate-300); font-size: var(--fs-lg); }
.agent-hero .profile-hero__meta { margin-top: var(--s-1); }
.agent-hero .profile-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.agent-hero__score { display: flex; align-items: center; gap: var(--s-4); }
.agent-hero__score .profile-hero__seal { display: block; width: 104px; }
.agent-hero__num b { display: block; font: 800 3rem/1 var(--font-heading); letter-spacing: -.03em; color: var(--white); font-variant-numeric: tabular-nums; }
.agent-hero__num span { font-size: var(--fs-sm); color: var(--slate-300); }
.panel__meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--slate); }
.panel__meta b { color: var(--navy); }
.side-facts { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.side-facts dt { font-size: var(--fs-xs); color: var(--slate); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.side-facts dd { margin-top: 2px; color: var(--navy); }
.btn svg + * { margin-left: 0; }

/* Landing: review links grouped, seal under the copy */
.lp-links { display: grid; gap: var(--s-3); margin: var(--s-2) 0 0; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--ivory); }
.lp-links legend { padding-inline: 4px; font: 700 var(--fs-sm)/1.4 var(--font-heading); color: var(--navy); }
.lp-hero__seal { display: none; width: 132px; margin-top: var(--s-7); filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .4)); }

/* Report: review sources under the score */
.rep-sources { margin-top: var(--s-5); }
.rep-sources h3 { font-size: 1.125rem; font-weight: 800; }

/* Directory filters without the industry column */
.filters--agents { grid-template-columns: 1fr; }

@media (min-width: 560px) {
  .sources-strip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sources-strip li { flex-direction: column; gap: 2px; }
  .src { grid-template-columns: minmax(0, 1fr) auto auto; }
  .src__count { grid-row: 1; grid-column: 2; justify-self: end; }
  .src__rating { grid-column: 3; }
  .src__date { grid-column: 1 / -1; justify-self: start; }
  .agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters--agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters--agents .filters__q { grid-column: 1 / -1; }
}

@media (min-width: 768px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-hero { grid-template-columns: 140px minmax(0, 1fr); }
  .agent-hero__photo { width: 140px; }
  .agent-hero__score { grid-column: 1 / -1; }
  .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--s-8); }
  .filters--agents { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .filters--agents .filters__q { grid-column: auto; }
}

@media (min-width: 1100px) {
  .ahero { padding-block: var(--s-10) var(--s-11); }
  .ahero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s-10); }
  .kit-show { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-10); }
  .sources-strip__in { grid-template-columns: minmax(0, .9fr) minmax(0, 2fr); align-items: center; gap: var(--s-8); }
  .agrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-hero { grid-template-columns: 160px minmax(0, 1fr) auto; gap: var(--s-7); }
  .agent-hero__photo { width: 160px; }
  .agent-hero__score { grid-column: auto; flex-direction: column; align-items: center; text-align: center; }
  .agent-hero__score .profile-hero__seal { width: 132px; }
  .lp-hero__seal { display: block; }
}

/* A panel heading with a rating next to it wraps on narrow screens instead of running past the card */
.panel__head:has(.panel__meta) { flex-wrap: wrap; row-gap: var(--s-2); }
.panel__meta { flex-wrap: wrap; }
.lp-links__note { margin-top: -4px; font-size: var(--fs-xs); color: var(--slate); }

/* Client reviews on the profile ------------------------------------------------------------------- */
.crev-sum { display: grid; gap: var(--s-5); padding: var(--s-5); border-radius: var(--r-md); background: var(--ivory); }
.crev-sum__avg { display: grid; justify-items: start; gap: 6px; }
.crev-sum__avg b { font: 800 3rem/1 var(--font-heading); letter-spacing: -.03em; color: var(--navy); font-variant-numeric: tabular-nums; }
.crev-sum__avg span { font-size: var(--fs-sm); color: var(--slate); }
.crev-sum__dist { display: grid; gap: 6px; }
.crev-sum__dist li { display: grid; grid-template-columns: 52px 1fr 28px; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--slate); }
.crev-sum__dist li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.crev-sum__bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.crev-sum__bar i { display: block; height: 100%; border-radius: 4px; background: var(--gold); }
.crev-list { display: grid; margin-top: var(--s-5); }
.crev { padding-block: var(--s-5); border-top: 1px solid var(--line); }
.crev:first-child { border-top: 0; padding-top: 0; }
.crev__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.crev__date { font-size: var(--fs-xs); color: var(--slate); }
.crev__body { margin-top: var(--s-3); color: #2F403B; }
.crev__who { display: flex; flex-wrap: wrap; gap: 2px var(--s-3); margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--slate); }
.crev__who b { color: var(--navy); }
.crev__reply { margin-top: var(--s-4); padding: var(--s-4); border-left: 3px solid var(--gold); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--ivory); font-size: var(--fs-sm); color: #2F403B; }
.crev__reply-h { margin-bottom: 4px; font-weight: 700; color: var(--navy); }
.crev-empty { padding: var(--s-5); border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--slate); }

/* Rating form */
.rate-panel { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
#client-reviews { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.rate-sample { margin-bottom: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--gold-100); color: var(--navy); font-size: var(--fs-sm); }
.rate-form { display: grid; gap: var(--s-4); }
.rate-form .btn { justify-self: start; }
.rate-form__row { display: grid; gap: var(--s-4); }
.rate-stars { margin: 0; padding: 0; border: 0; }
.rate-stars legend { margin-bottom: var(--s-2); font: 700 var(--fs-sm)/1.4 var(--font-heading); color: var(--navy); }
/* Five stars written from 5 down to 1, shown left to right, so a hovered or chosen star lights every star before it */
.rate-stars__row { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-stars__row label { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border-radius: var(--r-sm); }
.rate-stars__row svg { width: 34px; height: 34px; fill: var(--line); transition: fill var(--t-fast), transform var(--t-fast); }
.rate-stars__row label:hover svg, .rate-stars__row label:hover ~ label svg,
.rate-stars__row input:checked + label svg, .rate-stars__row input:checked + label ~ label svg { fill: var(--gold); }
.rate-stars__row:hover input:checked + label svg, .rate-stars__row:hover input:checked + label ~ label svg { fill: var(--line); }
.rate-stars__row:hover label:hover svg, .rate-stars__row:hover label:hover ~ label svg { fill: var(--gold); }
.rate-stars__row label:active svg { transform: scale(.9); }
.rate-stars__row input:focus-visible + label { box-shadow: var(--focus); }
.rate-stars__label { margin-top: 4px; font-size: var(--fs-sm); color: var(--slate); }
.rate-stars__label.is-error { color: var(--danger); font-weight: 600; }
.rate-done { display: grid; justify-items: start; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-md); background: var(--success-bg); }
.rate-done h3 { font-size: 1.25rem; font-weight: 800; }

@media (min-width: 560px) {
  .crev-sum { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-7); }
  .rate-form__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
