/* -----------------------------------------------------------------
 * Two layers:
 *   1. Structure  — grid, flex, spacing. Normal specificity. Must hold.
 *   2. Appearance — colour, type, borders. Wrapped in :where(), which
 *      has zero specificity, so ANY theme or Elementor Theme Style
 *      rule overrides it without !important.
 *
 * Custom kit slots use hashed IDs, e.g. --e-global-color-7a3f21b.
 * Inspect <body> in devtools and swap the names below if needed.
 * ----------------------------------------------------------------- */

.acreg {
	--ac-accent:  var(--e-global-color-accent, #1f6f6b);
	--ac-ink:     var(--e-global-color-text, #1d2b30);
	--ac-heading: var(--e-global-color-primary, var(--ac-ink));
	--ac-muted:   color-mix(in srgb, var(--ac-ink) 62%, transparent);
	--ac-line:    color-mix(in srgb, var(--ac-ink) 14%, transparent);
	--ac-bg:      color-mix(in srgb, var(--ac-ink) 4%, #fff);
	--ac-card:    #fff;
	--ac-tint:    color-mix(in srgb, var(--ac-accent) 10%, #fff);
	--ac-quiet:   color-mix(in srgb, var(--ac-ink) 6%, #fff);

	--ac-body-family:  var(--e-global-typography-text-font-family, inherit);
	--ac-body-size:    var(--e-global-typography-text-font-size, 15px);
	--ac-body-weight:  var(--e-global-typography-text-font-weight, 400);
	--ac-body-leading: var(--e-global-typography-text-line-height, 1.6);

	--ac-display-family:    var(--e-global-typography-primary-font-family, var(--ac-body-family));
	--ac-display-weight:    var(--e-global-typography-primary-font-weight, 600);
	--ac-display-leading:   var(--e-global-typography-primary-line-height, 1.25);
	--ac-display-tracking:  var(--e-global-typography-primary-letter-spacing, normal);

	--ac-label-family:    var(--e-global-typography-accent-font-family, var(--ac-body-family));
	--ac-label-weight:    var(--e-global-typography-accent-font-weight, 600);
	--ac-label-tracking:  var(--e-global-typography-accent-letter-spacing, .06em);
	--ac-label-transform: var(--e-global-typography-accent-text-transform, uppercase);
}

:where(.acreg) {
	color: var(--ac-ink);
	font-family: var(--ac-body-family);
	font-size: var(--ac-body-size);
	font-weight: var(--ac-body-weight);
	line-height: var(--ac-body-leading);
}

/* ================= Structure ================= */

.acreg-form { max-width: 720px; }
.acreg-step { padding: 22px 0; }
.acreg-step + .acreg-step { border-top: 1px solid var(--ac-line); }
.acreg-field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 16px; }
.acreg-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.acreg-rows > .acreg-field { grid-column: 1 / -1; }
.acreg-rows > .acreg-field--half { grid-column: span 1; }
.acreg-field--photo { grid-column: 1 / -1; }
.acreg-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.acreg-chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.acreg-chip input { margin: 0; }
.acreg-consent { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 16px; }
.acreg-hp { position: absolute; left: -9999px; }


.acreg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 20px; }
.acreg-card { overflow: hidden; }
.acreg-card__link { display: flex; flex-direction: column; height: 100%; }
.acreg-card__photo { aspect-ratio: 1 / 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.acreg-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acreg-card__body { padding: 18px 18px 14px; flex: 1; }
.acreg-card__meta { margin: 0; }
.acreg-card__row { display: flex; gap: 8px; padding: 3px 0; }
.acreg-card__row dt { flex: 0 0 92px; }
.acreg-card__row dd { margin: 0; }
.acreg-card__foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 18px; }
.acreg-card__foot--flush { padding: 0; }
.acreg-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 34px; }
.acreg-empty { padding: 56px 24px; text-align: center; }

.acreg-profile { max-width: 760px; }
.acreg-profile__head { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 22px; }
.acreg-profile__photo { flex: 0 0 148px; aspect-ratio: 4 / 5; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.acreg-profile__intro { flex: 1; min-width: 220px; }
.acreg-profile__meta { margin: 0 0 22px; }
.acreg-profile__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; }

/* ================= Appearance — theme always wins ================= */

:where(.acreg-notice) { padding: 16px 18px; border-radius: 12px; margin-bottom: 22px; }
:where(.acreg-notice--success) { background: var(--ac-tint); color: var(--ac-accent); }
:where(.acreg-notice--info) { background: var(--ac-quiet); color: var(--ac-ink); }
:where(.acreg-notice p) { margin: 0; }

/* Notices carry a solid background and a left rule rather than a faint
   tint. These are not :where() — a message telling someone their code was
   wrong has to survive whatever the theme does to divs, and at zero
   specificity it did not. The plain background declarations come first so
   a browser without color-mix() still gets the colour. */
.acreg-notice { border-left: 4px solid transparent; }

.acreg-notice--error {
	background: #fdecec;
	background: color-mix(in srgb, #b32d2e 10%, #fff);
	border-left-color: #b32d2e;
	color: #8a2224;
	font-weight: 500;
}

.acreg-notice--success {
	background: #ecf7f0;
	border-left-color: #2e6b4f;
	color: #235340;
}

.acreg-notice--info {
	background: #eef4f8;
	border-left-color: #1f5f8b;
	color: #234b66;
}

/* A wrong code should be noticed, not scanned past. */
@media (prefers-reduced-motion: no-preference) {
	.acreg-gate .acreg-notice--error { animation: acreg-nudge .28s ease-out; }
}

@keyframes acreg-nudge {
	0%, 100% { transform: translateX(0); }
	25%      { transform: translateX(-4px); }
	75%      { transform: translateX(4px); }
}

.acreg-eyebrow { margin: 0 0 16px; }
:where(.acreg-eyebrow) {
	font-family: var(--ac-label-family);
	font-size: 12px;
	font-weight: var(--ac-label-weight);
	letter-spacing: var(--ac-label-tracking);
	text-transform: var(--ac-label-transform);
	color: var(--ac-muted);
	margin: 0 0 14px;
}
:where(.acreg-field label) {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ac-ink);
}
:where(.acreg-help) { font-size: 12.5px; color: var(--ac-muted); }
:where(.acreg-req) { color: #b32d2e; }
:where(.acreg-consent span) { font-size: 13.5px; color: var(--ac-muted); }
:where(.acreg-foot-note) { font-size: 12.5px; color: var(--ac-muted); margin: 12px 0 0; }

.acreg-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.acreg-field select,
.acreg-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--ac-line);
	border-radius: 9px;
}
:where(.acreg-field input, .acreg-field select, .acreg-field textarea) {
	font-family: inherit;
	font-size: var(--ac-body-size);
	color: var(--ac-ink);
	background: var(--ac-card);
}

/* Checkboxes and radios are controls, not fields. Themes and my own
   field rule both like to stretch them, so this puts them back. */
.acreg input[type="checkbox"],
.acreg input[type="radio"] {
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	float: none;
	position: static;
	flex: 0 0 auto;
	border-radius: 3px;
	background: none;
	accent-color: var(--ac-accent);
}
.acreg-field textarea { min-height: 118px; resize: vertical; }
.acreg input:focus, .acreg select:focus, .acreg textarea:focus {
	outline: none;
	border-color: var(--ac-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-accent) 22%, transparent);
}

:where(.acreg-chip) {
	font-size: 13px;
	padding: 7px 12px;
	border: 1px solid var(--ac-line);
	border-radius: 999px;
	color: var(--ac-muted);
}


.acreg-submit {
	display: inline-block;
	padding: 12px 26px;
	font-family: var(--ac-body-family);
	font-size: var(--ac-body-size);
	font-weight: 600;
	color: #fff;
	background: var(--ac-accent);
	border: none;
	border-radius: 9px;
	cursor: pointer;
	text-decoration: none;
}
:where(.acreg-clear) { font-size: 14px; color: var(--ac-muted); text-decoration: underline; }
.acreg-count {
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ac-line);
}
:where(.acreg-count) {
	font-family: var(--ac-label-family);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ac-muted);
}

:where(.acreg-card) {
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: 14px;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.acreg-card:hover {
	transform: translateY(-3px);
	border-color: color-mix(in srgb, var(--ac-accent) 40%, var(--ac-line));
	box-shadow: 0 10px 28px color-mix(in srgb, var(--ac-ink) 12%, transparent);
}
:where(.acreg-card__link) { text-decoration: none; color: inherit; }
.acreg-card__link:focus-visible { outline: 3px solid var(--ac-accent); outline-offset: 2px; }
:where(.acreg-card__photo, .acreg-profile__photo) { background: var(--ac-quiet); border-radius: 0; }
:where(.acreg-profile__photo) { border-radius: 12px; }
.acreg-card__initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--ac-tint);
}
:where(.acreg-card__initial) {
	font-family: var(--ac-display-family);
	font-size: 44px;
	line-height: 1;
	color: color-mix(in srgb, var(--ac-accent) 55%, transparent);
}

.acreg-card__name {
	font-size: 19px;
	line-height: 1.25;
	margin: 0 0 3px;
}
:where(.acreg-card__name) {
	font-family: var(--ac-display-family);
	font-weight: var(--ac-display-weight);
	letter-spacing: var(--ac-display-tracking);
	color: var(--ac-heading);
}
.acreg-card__link:hover .acreg-card__name { color: var(--ac-accent); }
.acreg-card__role {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .03em;
	color: var(--ac-accent);
	margin: 0 0 10px;
}
.acreg-card__desc { font-size: 14px; margin: 0 0 14px; }
:where(.acreg-card__desc) { color: var(--ac-muted); line-height: 1.55; }
:where(.acreg-card__meta, .acreg-profile__meta) { font-size: 13.5px; }
:where(.acreg-card__row dt) { color: var(--ac-muted); font-weight: 400; }
:where(.acreg-card__row dd) { font-weight: 500; }
:where(.acreg-profile__meta .acreg-card__row) { border-bottom: 1px solid var(--ac-line); padding: 9px 0; }

:where(.acreg-profile__bio) {
	font-family: var(--ac-display-family);
	font-size: 17px;
	line-height: 1.7;
	color: var(--ac-ink);
	margin: 0 0 26px;
	max-width: 62ch;
}

/* The website link sits beside a solid button, so it reads as the
   secondary action rather than a second button competing with it. */
.acreg-profile__actions .acreg-clear {
	padding: 12px 4px;
	text-decoration: none;
	border-bottom: 1px solid var(--ac-line);
}
.acreg-profile__actions .acreg-clear:hover { border-bottom-color: var(--ac-accent); color: var(--ac-accent); }

/* The diploma is context, the ReAttach labels are signal. */
.acreg-badge {
	font-family: var(--ac-label-family);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .03em;
	padding: 5px 10px;
	border-radius: 999px;
	white-space: nowrap;
}
.acreg-badge--base { color: var(--ac-muted); background: var(--ac-quiet); }
.acreg-badge--accent {
	color: var(--ac-accent);
	background: var(--ac-tint);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac-accent) 25%, transparent);
}

:where(.acreg-empty) { background: var(--ac-bg); border: 1px dashed var(--ac-line); border-radius: 14px; }
.acreg-empty h3 { font-size: 20px; margin: 0 0 8px; }
:where(.acreg-empty h3) { font-family: var(--ac-display-family); color: var(--ac-heading); }
:where(.acreg-empty p) { color: var(--ac-muted); margin: 0; }

:where(.acreg-disclaimer) {
	font-size: 12px;
	line-height: 1.6;
	color: var(--ac-muted);
	padding-top: 18px;
	border-top: 1px solid var(--ac-line);
	margin: 0;
}

:where(.acreg-pagination .page-numbers) {
	padding: 9px 14px;
	font-size: 14px;
	border-radius: 8px;
	text-decoration: none;
	color: var(--ac-ink);
	border: 1px solid var(--ac-line);
}
.acreg-pagination .page-numbers:hover { border-color: var(--ac-accent); }
:where(.acreg-pagination .page-numbers.current) {
	background: var(--ac-accent);
	border-color: var(--ac-accent);
	color: #fff;
}

@media (max-width: 600px) {
	.acreg-grid { grid-template-columns: 1fr; }
		.acreg-submit { width: 100%; }
	.acreg-profile__photo { flex: 0 0 110px; }
}

@media (prefers-reduced-motion: reduce) {
	.acreg-card { transition: none; }
	.acreg-card:hover { transform: none; }
}

/* ---- Single profile template ---- */
.acreg-single { padding: 48px 20px 64px; }
.acreg-single__main { max-width: 800px; margin: 0 auto; }
.acreg-single__header { margin-bottom: 26px; }
:where(.acreg-single__title) {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: clamp(28px, 4vw, 38px);
	line-height: 1.15;
	margin: 0 0 6px;
}
:where(.acreg-single__back a) {
	font-size: 14px;
	text-decoration: none;
	color: var(--e-global-color-accent, #1f6f6b);
}

/* ---- Photo upload ---- */
.acreg-photo-current { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
:where(.acreg-photo-thumb) { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.acreg-photo-remove { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
:where(.acreg-photo-remove span) { font-size: 13px; color: var(--ac-muted); }
:where(.acreg-field input[type="file"]) {
	padding: 10px;
	font-size: 13.5px;
	border: 1px dashed var(--ac-line);
	border-radius: 9px;
	background: var(--ac-quiet);
}

/* ---- Collapsible chip groups ---- */
.acreg-chips.is-collapsed .acreg-chip--extra { display: none; }
.acreg-chip-toggle {
	margin-top: 9px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
}
:where(.acreg-chip-toggle) {
	font-family: inherit;
	font-size: 13px;
	color: var(--ac-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---- Word counter ---- */
.acreg-counter { display: block; margin-top: 5px; }
:where(.acreg-counter) { font-size: 12.5px; color: var(--ac-muted); font-variant-numeric: tabular-nums; }
:where(.acreg-counter.is-short) { color: var(--ac-muted); }
:where(.acreg-counter.is-over) { color: #b32d2e; }

@media (max-width: 600px) {
	.acreg-rows { grid-template-columns: minmax(0, 1fr); }
	.acreg-rows > .acreg-field--half { grid-column: 1 / -1; }
}

/* ---- Directory search ---- */
.acreg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.acreg-search { margin-bottom: 26px; }
.acreg-search__bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; }
:where(.acreg-search__bar) {
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: 999px;
}
.acreg-search__bar:focus-within { border-color: var(--ac-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-accent) 18%, transparent); }
:where(.acreg-search__icon) { font-size: 17px; color: var(--ac-muted); line-height: 1; }
.acreg-search__bar input { flex: 1; min-width: 0; }
:where(.acreg-search__bar input) {
	border: none;
	background: none;
	padding: 8px 0;
	font-size: var(--ac-body-size);
	font-family: inherit;
	color: var(--ac-ink);
}
.acreg-search__bar input:focus { outline: none; box-shadow: none; }
.acreg-search__bar .acreg-submit { border-radius: 999px; padding: 10px 22px; flex: 0 0 auto; }

.acreg-search__refine {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	margin-top: 14px;
}
.acreg-search__refine.is-collapsed { display: none; }
.acreg-search__field { display: flex; flex-direction: column; gap: 5px; }
:where(.acreg-search__field label) {
	font-family: var(--ac-label-family);
	font-size: 11.5px;
	font-weight: var(--ac-label-weight);
	letter-spacing: var(--ac-label-tracking);
	text-transform: var(--ac-label-transform);
	color: var(--ac-muted);
}
.acreg-search__field select { width: 100%; }
:where(.acreg-search__field select) {
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
	color: var(--ac-ink);
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: 9px;
}

.acreg-search__slot { display: inline-flex; flex: 0 0 auto; }
.acreg-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 18px;
	cursor: pointer;
}
.acreg-filter-btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--ac-ink);
	background: none;
	border: 1px solid var(--ac-line);
	border-radius: 999px;
}
.acreg-filter-btn:hover { border-color: var(--ac-accent); color: var(--ac-accent); }
.acreg-filter-btn[aria-expanded="true"] { border-color: var(--ac-accent); color: var(--ac-accent); }
:where(.acreg-filter-btn__count) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	font-size: 11.5px;
	border-radius: 999px;
	background: var(--ac-accent);
	color: #fff;
}

.acreg-search__active { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 14px; }
.acreg-tag { display: inline-flex; align-items: center; gap: 7px; }
.acreg-tag {
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ac-tint);
	color: var(--ac-accent);
	text-decoration: none;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac-accent) 22%, transparent);
}
.acreg-tag:hover { background: color-mix(in srgb, var(--ac-accent) 18%, #fff); }
.acreg-tag__x { font-size: 15px; line-height: 1; opacity: .7; }

@media (max-width: 600px) {
	.acreg-search__bar { flex-wrap: wrap; border-radius: 14px; padding: 12px; }
	.acreg-search__bar input { flex: 1 1 100%; }
	.acreg-search__bar .acreg-submit { width: 100%; }
	.acreg-search__refine { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
	.acreg-search__slot { flex: 1 1 auto; }
	.acreg-filter-btn { width: 100%; justify-content: center; }
}

/* ---- Captcha ---- */
.acreg-captcha { margin: 0 0 18px; }
.acreg-captcha:empty { display: none; }

/* ---- Sidebar layout ---- */
.acreg-directory--sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 268px;
	gap: 34px;
	align-items: start;
}
.acreg-directory--sidebar > .acreg-side { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
.acreg-directory--sidebar > .acreg-main { grid-column: 1; grid-row: 1; min-width: 0; }

:where(.acreg-side) {
	padding: 20px;
	background: var(--ac-bg);
	border: 1px solid var(--ac-line);
	border-radius: 14px;
}
.acreg-side .acreg-search { margin-bottom: 0; }

/* In a narrow column the bar becomes a stacked field. */
.acreg-search--sidebar .acreg-search__bar {
	flex-wrap: wrap;
	padding: 0;
	gap: 8px;
	background: none;
	border: none;
	border-radius: 0;
}
.acreg-search--sidebar .acreg-search__bar:focus-within { box-shadow: none; }
.acreg-search--sidebar .acreg-search__icon { display: none; }
.acreg-search--sidebar .acreg-search__bar input {
	flex: 1 1 100%;
	padding: 10px 12px;
	border: 1px solid var(--ac-line);
	border-radius: 9px;
	background: var(--ac-card);
}
.acreg-search--sidebar .acreg-search__bar .acreg-submit { flex: 1 1 100%; border-radius: 9px; }

.acreg-search--sidebar .acreg-search__refine {
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--ac-line);
}
.acreg-search--sidebar .acreg-search__active { margin-top: 16px; }
.acreg-side__apply { width: 100%; }

@media (max-width: 900px) {
	.acreg-directory--sidebar { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.acreg-directory--sidebar > .acreg-side { grid-column: 1; grid-row: 1; position: static; }
	.acreg-directory--sidebar > .acreg-main { grid-column: 1; grid-row: 2; }
	.acreg-search--sidebar .acreg-search__bar { flex-wrap: nowrap; }
	.acreg-search--sidebar .acreg-search__bar input { flex: 1 1 auto; }
	.acreg-search--sidebar .acreg-search__bar .acreg-submit { flex: 0 0 auto; width: auto; }
	.acreg-search--sidebar .acreg-search__slot { display: block; margin-top: 10px; }
	.acreg-search--sidebar .acreg-filter-btn { width: 100%; justify-content: center; }
}

/* ---- Register page: spacing and rhythm ---- */
.acreg-directory { margin-block: 8px; }
.acreg-directory--sidebar > .acreg-main > .acreg-count { margin-top: 4px; }

/* A card should feel like one object, so the whole thing lifts together
   and the photo reacts with it rather than sitting inert. */
.acreg-card__photo .acreg-card__img { transition: transform .35s ease; }
.acreg-card:hover .acreg-card__img { transform: scale(1.04); }

/* Badge row separated from the body text so credentials read as a
   distinct stripe rather than more prose. */
.acreg-card__foot {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--ac-line);
	margin-inline: 18px;
	padding-bottom: 16px;
}
.acreg-card__foot--flush {
	margin-inline: 0;
	padding-top: 0;
	padding-bottom: 0;
	border-top: none;
}

/* Sidebar heading, so the filter column announces itself. */
.acreg-side__title {
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ac-line);
}
:where(.acreg-side__title) {
	font-family: var(--ac-label-family);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ac-muted);
}

@media (max-width: 900px) {
	.acreg-directory--sidebar { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.acreg-card__photo .acreg-card__img,
	.acreg-card:hover .acreg-card__img { transition: none; transform: none; }
}

/* ---- Application page ---- */
.acreg-page { padding: 52px 20px 72px; }
.acreg-page__main { max-width: 780px; margin: 0 auto; }
.acreg-page__head { margin-bottom: 30px; }

.acreg-page__eyebrow { margin: 0 0 10px; }
:where(.acreg-page__eyebrow) {
	font-family: var(--e-global-typography-accent-font-family, inherit);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--e-global-color-text, #1d2b30) 60%, transparent);
}

.acreg-page__title { margin: 0 0 14px; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; }
:where(.acreg-page__title) {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-primary, inherit);
}

.acreg-page__intro { margin: 0; max-width: 60ch; }
:where(.acreg-page__intro) {
	font-size: 16px;
	line-height: 1.65;
	color: color-mix(in srgb, var(--e-global-color-text, #1d2b30) 78%, transparent);
}

/* Three steps, side by side, so a simple sequence does not read as an essay. */
.acreg-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0 0 34px;
	padding: 0;
	counter-reset: none;
}
.acreg-steps__item { display: flex; flex-direction: column; gap: 5px; }
.acreg-steps__item strong { font-size: 15px; }
.acreg-steps__item span:last-child { font-size: 13.5px; line-height: 1.55; }
:where(.acreg-steps__item span:last-child) { color: color-mix(in srgb, var(--e-global-color-text, #1d2b30) 62%, transparent); }

.acreg-steps__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-bottom: 4px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	background: color-mix(in srgb, var(--e-global-color-accent, #1f6f6b) 12%, #fff);
	color: var(--e-global-color-accent, #1f6f6b);
}

/* The form sits in its own panel: read above, act below. */
.acreg-card-panel {
	padding: 34px;
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--e-global-color-text, #1d2b30) 12%, transparent);
	border-radius: 16px;
	box-shadow: 0 2px 26px color-mix(in srgb, var(--e-global-color-text, #1d2b30) 6%, transparent);
}
.acreg-card-panel .acreg-form { max-width: none; }
.acreg-card-panel .acreg-step:first-child { padding-top: 0; }

@media (max-width: 600px) {
	.acreg-page { padding: 32px 16px 48px; }
	.acreg-card-panel { padding: 20px; border-radius: 12px; }
	.acreg-steps { gap: 16px; margin-bottom: 26px; }
}

/* ---- Form detail ---- */
.acreg-step--foot {
	margin-top: 6px;
	padding-top: 24px;
}
.acreg-consent {
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--ac-quiet);
}
.acreg-consent input { margin-top: 3px; flex: 0 0 auto; }

.acreg-form .acreg-submit { min-width: 220px; }

/* A file input is the ugliest control in HTML, so it gets a target
   that looks deliberate rather than left over. */
.acreg-field input[type="file"] {
	width: 100%;
	padding: 14px;
	border: 1px dashed var(--ac-line);
	border-radius: 10px;
	background: var(--ac-quiet);
	cursor: pointer;
}
.acreg-field input[type="file"]:hover { border-color: var(--ac-accent); }

.acreg-chip { user-select: none; }
.acreg-chip:hover { border-color: color-mix(in srgb, var(--ac-accent) 40%, var(--ac-line)); }

@media (max-width: 600px) {
	.acreg-form .acreg-submit { min-width: 0; width: 100%; }
}

/* ---- Chip and button hardening ----
   Scoped one level deeper so theme form rules cannot flatten them.
   The salmon full-width bar was the theme styling <button>. */
.acreg .acreg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	align-items: flex-start;
	margin: 0;
	padding: 0;
}
.acreg .acreg-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: auto;
	max-width: 100%;
	margin: 0;
	float: none;
	padding: 7px 12px;
	font-size: 13px;
	line-height: 1.25;
	text-align: left;
	border: 1px solid var(--ac-line);
	border-radius: 999px;
	background: var(--ac-card);
	cursor: pointer;
}
.acreg .acreg-chip > span { display: inline; margin: 0; }

.acreg .acreg-chip-toggle {
	display: inline-block;
	width: auto;
	margin: 10px 0 0;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-size: 13px;
	line-height: 1.4;
	color: var(--ac-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.acreg .acreg-chip-toggle:hover { background: none; color: var(--ac-ink); }

.acreg .acreg-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: auto;
	padding: 10px 18px;
	background: none;
	border: 1px solid var(--ac-line);
	border-radius: 999px;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-size: 14px;
	color: var(--ac-ink);
	cursor: pointer;
}

.acreg .acreg-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
.acreg .acreg-consent input { margin-top: 3px; }

/* The file input keeps its own look; the field rule no longer touches it. */
.acreg .acreg-field input[type="file"] {
	width: 100%;
	padding: 14px;
	border: 1px dashed var(--ac-line);
	border-radius: 10px;
	background: var(--ac-quiet);
	cursor: pointer;
}

.acreg .acreg-chip:has(input:checked) {
	background: var(--ac-tint);
	border-color: color-mix(in srgb, var(--ac-accent) 55%, transparent);
	color: var(--ac-accent);
	font-weight: 600;
}
.acreg .acreg-chip:hover { border-color: color-mix(in srgb, var(--ac-accent) 40%, var(--ac-line)); }

/* ---- Access gate ---- */
.acreg-gate { display: flex; justify-content: center; }
.acreg-gate__panel {
	width: 100%;
	max-width: 460px;
	padding: 34px;
	text-align: center;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: 16px;
}
.acreg-gate__panel h2 { margin: 0 0 10px; font-size: 21px; }
:where(.acreg-gate__panel h2) { font-family: var(--ac-display-family); color: var(--ac-heading); }
.acreg-gate__panel p { margin: 0 0 18px; }
:where(.acreg-gate__panel p) { font-size: 14.5px; line-height: 1.6; color: var(--ac-muted); }

.acreg-gate__form { display: flex; flex-direction: column; gap: 10px; }
.acreg .acreg-gate__form input {
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	letter-spacing: .08em;
	text-align: center;
	border: 1px solid var(--ac-line);
	border-radius: 9px;
	background: var(--ac-card);
	color: var(--ac-ink);
}
.acreg .acreg-gate__form input:focus {
	outline: none;
	border-color: var(--ac-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-accent) 22%, transparent);
}
.acreg-gate__form .acreg-submit { width: 100%; }
.acreg-gate__help { margin: 16px 0 0 !important; }
:where(.acreg-gate__help) { font-size: 12.5px; }

@media (max-width: 600px) {
	.acreg-gate__panel { padding: 22px; }
}

/* ---- One-time code screen ---- */
.acreg-gate__resend { margin-top: 12px; }
.acreg .acreg-linkbtn {
	display: inline-block;
	width: auto;
	padding: 0;
	background: none;
	border: none;
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
	color: var(--ac-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.acreg .acreg-linkbtn:hover { color: var(--ac-accent); background: none; }
.acreg #acreg_otp_code {
	font-size: 24px;
	letter-spacing: .4em;
	text-indent: .4em;
	font-variant-numeric: tabular-nums;
}
.acreg .acreg-field input[readonly] {
	background: var(--ac-quiet);
	color: var(--ac-muted);
	cursor: default;
}
