/*
 * A11yMate admin design system.
 * Everything is scoped under .a11ymate so it can never leak into other plugins' screens.
 * Brand tokens come from docs/PRODUCT.md.
 */
.a11ymate {
	--am-navy: #13304A;
	--am-navy-deep: #0B1E30;
	--am-paper: #F6F8F7;
	--am-blue: #1F5C8B;
	--am-blue-deep: #174A70;
	--am-green: #3DBE6E;
	--am-green-text: #157A43;
	--am-ok: #0B7A4B;
	--am-warn: #8A5A00;
	--am-bad: #C21F3A;
	--am-critical: #C21F3A;
	--am-serious: #C2410C;
	--am-moderate: #8A5A00;
	--am-minor: #475569;
	--am-critical-wash: #FDECEF;
	--am-serious-wash: #FFEFE6;
	--am-moderate-wash: #FFF4D9;
	--am-minor-wash: #EDF0F4;
	--am-ok-wash: #E4F5EC;
	--am-surface: #FFFFFF;
	--am-wash: #EEF2F1;
	--am-blue-wash: #E8F0F7;
	--am-line: #DCE3E3;
	--am-line-strong: #C3CDCD;
	--am-mute: #566070;
	--am-radius: 14px;
	--am-radius-sm: 8px;
	--am-ease: cubic-bezier(0.23, 1, 0.32, 1);
	--am-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
	--am-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--am-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

	font-family: var(--am-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--am-navy);
	-webkit-font-smoothing: antialiased;
}

#a11ymate-root.a11ymate {
	max-width: 1240px;
	margin: 20px 20px 40px 0;
}

.a11ymate *,
.a11ymate *::before,
.a11ymate *::after {
	box-sizing: border-box;
}

.a11ymate-wrap {
	margin: 0;
}

.a11ymate h1,
.a11ymate h2,
.a11ymate h3,
.a11ymate h4,
.a11ymate p,
.a11ymate ul,
.a11ymate ol {
	margin: 0;
	padding: 0;
	color: inherit;
}

.a11ymate ul,
.a11ymate ol {
	list-style: none;
}

.a11ymate p + p {
	margin-top: 0.6em;
}

.a11ymate a {
	color: var(--am-blue);
	text-underline-offset: 0.15em;
}

.a11ymate a:hover {
	color: var(--am-blue-deep);
}

.a11ymate code,
.a11ymate pre,
.a11ymate .am-mono {
	font-family: var(--am-mono);
	font-size: 12.5px;
}

.a11ymate .am-num {
	font-variant-numeric: tabular-nums;
}

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

.a11ymate .am-muted {
	color: var(--am-mute);
}

.a11ymate .am-boot {
	padding: 40px;
	text-align: center;
	color: var(--am-mute);
}

/* ---- Focus ------------------------------------------------------------------ */
.a11ymate :focus-visible {
	outline: 3px solid var(--am-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

.a11ymate .am-on-ink :focus-visible,
.a11ymate .am-hero :focus-visible,
.a11ymate .am-head :focus-visible {
	outline-color: var(--am-green);
}

/* ---- Shell ------------------------------------------------------------------ */
.am-head {
	background: var(--am-navy-deep);
	color: #fff;
	border-radius: 18px;
	padding: 18px 22px 0;
	position: relative;
	overflow: hidden;
}

.am-head::after {
	content: "";
	position: absolute;
	right: -80px;
	top: -120px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.07);
	box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.025), 0 0 0 80px rgba(255, 255, 255, 0.02);
	pointer-events: none;
}

.am-head__row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	position: relative;
	z-index: 1;
}

.am-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -0.01em;
}

.am-brand svg {
	width: 30px;
	height: 30px;
	flex: none;
}

.am-head__title {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.72);
	padding-left: 14px;
	margin-left: 4px;
	border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.am-head__actions {
	margin-left: auto;
	display: flex;
	gap: 8px;
	align-items: center;
}

.am-nav {
	display: flex;
	gap: 2px;
	margin: 16px -8px 0;
	overflow-x: auto;
	scrollbar-width: none;
	position: relative;
	z-index: 1;
}

.am-nav::-webkit-scrollbar {
	display: none;
}

.a11ymate .am-nav a {
	flex: none;
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
	padding: 10px 12px 12px;
	position: relative;
	border-radius: 6px 6px 0 0;
	transition: color 140ms ease;
}

.a11ymate .am-nav a:hover {
	color: #fff;
}

.a11ymate .am-nav a[aria-current="page"] {
	color: #fff;
}

.a11ymate .am-nav a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--am-green);
}

.am-main {
	margin-top: 22px;
	display: grid;
	gap: 18px;
}

.am-main > * {
	min-width: 0;
}

/* ---- Buttons ------------------------------------------------------------------ */
.a11ymate .am-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 16px;
	font: inherit;
	font-weight: 650;
	font-size: 13.5px;
	line-height: 1;
	border-radius: 10px;
	border: 1px solid transparent;
	background: var(--am-blue);
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: transform 140ms var(--am-ease), background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.a11ymate .am-btn:hover {
	background: var(--am-blue-deep);
	color: #fff;
}

.a11ymate .am-btn:active {
	transform: scale(0.97);
}

.a11ymate .am-btn svg {
	width: 16px;
	height: 16px;
	flex: none;
}

.a11ymate .am-btn--green {
	background: var(--am-green);
	color: var(--am-navy);
}

.a11ymate .am-btn--green:hover {
	background: #62CF8A;
	color: var(--am-navy);
}

.a11ymate .am-btn--ghost {
	background: transparent;
	color: var(--am-navy);
	border-color: var(--am-line-strong);
}

.a11ymate .am-btn--ghost:hover {
	background: var(--am-wash);
	color: var(--am-navy);
	border-color: var(--am-navy);
}

.a11ymate .am-head .am-btn--ghost {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.35);
}

.a11ymate .am-head .am-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border-color: #fff;
}

.a11ymate .am-btn--danger {
	background: var(--am-bad);
}

.a11ymate .am-btn--danger:hover {
	background: #9d1830;
}

.a11ymate .am-btn--sm {
	min-height: 30px;
	padding: 0 11px;
	font-size: 12.5px;
	border-radius: 8px;
}

.a11ymate .am-btn[disabled],
.a11ymate .am-btn[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.a11ymate .am-iconbtn {
	appearance: none;
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: 1px solid var(--am-line-strong);
	background: var(--am-surface);
	color: var(--am-navy);
	cursor: pointer;
	transition: transform 140ms var(--am-ease), background-color 140ms ease;
}

.a11ymate .am-iconbtn:hover {
	background: var(--am-wash);
}

.a11ymate .am-iconbtn:active {
	transform: scale(0.95);
}

.a11ymate .am-iconbtn svg {
	width: 16px;
	height: 16px;
}

.a11ymate .am-link {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: var(--am-blue);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* ---- Cards ---------------------------------------------------------------------- */
.am-card {
	background: var(--am-surface);
	border: 1px solid var(--am-line);
	border-radius: var(--am-radius);
	padding: 22px;
	min-width: 0;
}

.am-card--flush {
	padding: 0;
	overflow: hidden;
}

.am-card__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.am-card__head h2,
.am-card__head h3 {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.am-card__head .am-muted {
	font-size: 13px;
}

.am-card__head .am-spacer {
	margin-left: auto;
}

.am-grid {
	display: grid;
	gap: 18px;
}

.am-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-grid--32 {
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

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

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

@media (max-width: 1000px) {
	.am-grid--2,
	.am-grid--32,
	.am-grid--3,
	.am-grid--4 {
		grid-template-columns: minmax(0, 1fr);
	}

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

.am-stack {
	display: grid;
	gap: 12px;
}

.am-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* ---- Hero (dashboard score) ----------------------------------------------------- */
.am-hero {
	background: var(--am-navy-deep);
	color: #fff;
	border-radius: 18px;
	padding: 28px 30px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 34px;
	align-items: center;
	position: relative;
	overflow: hidden;
}

.am-ring {
	position: relative;
	width: 188px;
	height: 188px;
	flex: none;
}

.am-ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.am-ring__track {
	stroke: rgba(255, 255, 255, 0.12);
}

.am-ring__arc {
	stroke: var(--am-green);
	stroke-linecap: round;
	transition: stroke-dashoffset 900ms var(--am-ease);
}

.am-ring__num {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	text-align: center;
}

.am-ring__num b {
	font-size: 58px;
	line-height: 1;
	font-weight: 750;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
}

.am-ring__num span {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	margin-top: 4px;
}

.am-hero h2 {
	font-size: 26px;
	line-height: 1.2;
	font-weight: 750;
	letter-spacing: -0.02em;
	max-width: 24ch;
}

.am-hero p {
	color: rgba(255, 255, 255, 0.76);
	max-width: 60ch;
	margin-top: 8px;
}

.am-hero__stats {
	display: grid;
	grid-template-columns: repeat(5, auto);
	gap: 8px 28px;
	justify-content: start;
	margin-top: 22px;
}

.am-stat b {
	display: block;
	font-size: 28px;
	line-height: 1;
	font-weight: 750;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.am-stat span {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.72);
	margin-top: 6px;
}

.am-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: none;
	background: currentColor;
}

.am-hero .am-dot--critical,
.am-on-ink .am-dot--critical {
	color: #FF7A8C;
}

.am-hero .am-dot--serious {
	color: #FF9A62;
}

.am-hero .am-dot--moderate {
	color: #F2C25B;
}

.am-hero .am-dot--minor {
	color: #AEB8C6;
}

.am-hero .am-dot--review {
	color: var(--am-green);
}

.am-hero__foot {
	margin-top: 22px;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.am-hero__foot .am-muted-ink {
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.62);
}


.am-hero:has(.am-next) {
	grid-template-columns: auto minmax(0, 1fr) minmax(250px, 310px);
}

.am-next {
	align-self: stretch;
	display: grid;
	align-content: center;
	gap: 8px;
	padding: 20px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.06);
}

.am-next__label {
	font-size: 12px;
	font-weight: 700;
	color: var(--am-green);
}

.am-next h3 {
	font-size: 16px;
	font-weight: 750;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.am-hero .am-next p {
	font-size: 13px;
	margin: 0;
	color: rgba(255, 255, 255, 0.74);
}

.am-next__meta {
	display: flex;
	gap: 10px;
	align-items: baseline;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.7);
}

.am-next__meta b {
	color: var(--am-green);
	font-size: 15px;
}

.am-next .am-btn {
	justify-self: start;
	margin-top: 4px;
}

.a11ymate .am-hero .am-btn--ghost {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

.a11ymate .am-hero .am-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-color: #fff;
}

@media (max-width: 1100px) {
	.am-hero:has(.am-next) {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.am-next {
		grid-column: 1 / -1;
	}
}

@media (max-width: 800px) {
	.am-hero,
	.am-hero:has(.am-next) {
		grid-template-columns: minmax(0, 1fr);
		padding: 22px;
		gap: 22px;
		justify-items: start;
	}

	.am-hero__stats {
		grid-template-columns: repeat(3, auto);
	}
}

@media (max-width: 560px) {
	.am-hero__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px 24px;
	}
}

/* ---- Pills and badges --------------------------------------------------------- */
.am-sev {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 5px 9px 5px 8px;
	border-radius: 999px;
	text-transform: capitalize;
	white-space: nowrap;
}

.am-sev::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.am-sev--critical {
	color: var(--am-critical);
	background: var(--am-critical-wash);
}

.am-sev--serious {
	color: var(--am-serious);
	background: var(--am-serious-wash);
}

.am-sev--moderate {
	color: var(--am-moderate);
	background: var(--am-moderate-wash);
}

.am-sev--minor {
	color: var(--am-minor);
	background: var(--am-minor-wash);
}

.am-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	font-weight: 650;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--am-wash);
	color: var(--am-navy);
	border: 1px solid var(--am-line);
	white-space: nowrap;
}

.am-badge--ok {
	background: var(--am-ok-wash);
	color: var(--am-ok);
	border-color: transparent;
}

.am-badge--bad {
	background: var(--am-critical-wash);
	color: var(--am-bad);
	border-color: transparent;
}

.am-badge--review {
	background: var(--am-blue-wash);
	color: var(--am-blue-deep);
	border-color: transparent;
}

.am-badge--warn {
	background: var(--am-moderate-wash);
	color: var(--am-warn);
	border-color: transparent;
}

/* ---- Forms --------------------------------------------------------------------- */
.a11ymate label.am-label,
.a11ymate .am-label {
	display: block;
	font-weight: 650;
	font-size: 13px;
	margin-bottom: 6px;
}

.a11ymate .am-hint {
	font-size: 12.5px;
	color: var(--am-mute);
	margin-top: 5px;
}

.a11ymate .am-input,
.a11ymate .am-select,
.a11ymate .am-textarea {
	appearance: none;
	width: 100%;
	min-height: 38px;
	padding: 8px 12px;
	font: inherit;
	font-size: 14px;
	color: var(--am-navy);
	background: var(--am-surface);
	border: 1px solid #8a8f98;
	border-radius: 9px;
	box-shadow: none;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.a11ymate .am-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2313304A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 14px;
	padding-right: 32px;
}

.a11ymate .am-textarea {
	min-height: 84px;
	resize: vertical;
	line-height: 1.45;
}

.a11ymate .am-input:hover,
.a11ymate .am-select:hover,
.a11ymate .am-textarea:hover {
	border-color: var(--am-navy);
}

.a11ymate .am-input:focus,
.a11ymate .am-select:focus,
.a11ymate .am-textarea:focus {
	border-color: var(--am-blue);
	box-shadow: 0 0 0 3px rgba(31, 92, 139, 0.25);
	outline: none;
}

.a11ymate .am-input:focus-visible,
.a11ymate .am-select:focus-visible,
.a11ymate .am-textarea:focus-visible {
	outline: 2px solid var(--am-blue);
	outline-offset: 1px;
}

.a11ymate .am-input--color {
	padding: 3px;
	width: 56px;
	min-height: 38px;
	cursor: pointer;
}

.am-field {
	margin-bottom: 16px;
}

.am-field:last-child {
	margin-bottom: 0;
}

.a11ymate fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.a11ymate legend {
	padding: 0;
	font-weight: 650;
	font-size: 13px;
	margin-bottom: 8px;
}

/* Switch */
.am-switch {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.am-switch__btn {
	appearance: none;
	flex: none;
	position: relative;
	width: 44px;
	height: 26px;
	margin-top: 1px;
	border-radius: 999px;
	border: 0;
	background: #7f8794;
	cursor: pointer;
	transition: background-color 180ms ease;
}

.am-switch__btn::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	transition: transform 200ms var(--am-ease);
}

.am-switch__btn[aria-checked="true"] {
	background: var(--am-blue);
}

.am-switch__btn[aria-checked="true"]::after {
	transform: translateX(18px);
}

.am-switch__btn:active::after {
	width: 24px;
}

.am-switch__btn[aria-checked="true"]:active::after {
	transform: translateX(14px);
}

.am-switch__text b {
	display: block;
	font-size: 14px;
}

.am-switch__text span {
	color: var(--am-mute);
	font-size: 13px;
}

/* Segmented control */
.am-seg {
	display: inline-flex;
	padding: 3px;
	gap: 2px;
	background: var(--am-wash);
	border: 1px solid var(--am-line);
	border-radius: 11px;
	flex-wrap: wrap;
}

.a11ymate .am-seg button {
	appearance: none;
	border: 0;
	background: transparent;
	font: inherit;
	font-weight: 650;
	font-size: 13px;
	color: var(--am-mute);
	padding: 6px 12px;
	min-height: 30px;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease, transform 140ms var(--am-ease);
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.a11ymate .am-seg button:hover {
	color: var(--am-navy);
}

.a11ymate .am-seg button:active {
	transform: scale(0.97);
}

.a11ymate .am-seg button[aria-pressed="true"],
.a11ymate .am-seg button[aria-selected="true"],
.a11ymate .am-seg button[aria-checked="true"] {
	background: var(--am-surface);
	color: var(--am-navy);
	box-shadow: 0 1px 2px rgba(11, 30, 48, 0.14), 0 0 0 1px var(--am-line);
}

.am-seg .am-count {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--am-mute);
	background: rgba(11, 30, 48, 0.07);
	border-radius: 999px;
	padding: 2px 7px;
}

/* Checkbox rows */
.am-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 6px 0;
}

.am-check input {
	appearance: auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--am-blue);
	flex: none;
}

.am-check span b {
	display: block;
}

.am-check label {
	display: grid;
	gap: 1px;
	cursor: pointer;
}

/* ---- Progress ------------------------------------------------------------------- */
.am-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--am-wash);
	border: 1px solid var(--am-line);
	overflow: hidden;
}

.am-bar > i {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--am-blue);
	transition: width 360ms var(--am-ease);
}

.am-bar--lg {
	height: 14px;
}

.am-bar--ok > i {
	background: var(--am-ok);
}

/* Category rows */
.am-cat {
	display: grid;
	grid-template-columns: 112px 1fr 34px;
	align-items: center;
	gap: 12px;
	padding: 7px 0;
	font-size: 13.5px;
}

.am-cat a,
.am-cat span.am-cat__name {
	color: var(--am-navy);
	font-weight: 600;
	text-decoration: none;
}

.a11ymate .am-cat a:hover {
	color: var(--am-blue);
	text-decoration: underline;
}

.am-cat b {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.am-cat .am-bar > i {
	background: var(--am-ok);
}

.am-cat[data-tone="warn"] .am-bar > i {
	background: #B8860B;
}

.am-cat[data-tone="bad"] .am-bar > i {
	background: var(--am-bad);
}

/* ---- Lists ----------------------------------------------------------------------- */
.am-list > li {
	border-top: 1px solid var(--am-line);
}

.am-list > li:first-child {
	border-top: 0;
}

.am-fix {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 14px;
	align-items: center;
	padding: 14px 0;
}

.am-fix__rank {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--am-wash);
	border: 1px solid var(--am-line);
	font-weight: 750;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}

.am-fix h3 {
	font-size: 14.5px;
	font-weight: 700;
	margin-bottom: 2px;
}

.am-fix p {
	color: var(--am-mute);
	font-size: 13px;
	max-width: 70ch;
}

.am-exportcard {
	display: grid;
	grid-template-rows: auto auto 1fr auto;
	gap: 10px;
	align-content: start;
}

.am-exportcard > .am-btn {
	align-self: end;
}

.am-fix__meta {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
}

.am-gain {
	font-weight: 750;
	color: var(--am-ok);
	font-size: 13px;
	white-space: nowrap;
}

@media (max-width: 700px) {
	.am-fix {
		grid-template-columns: auto 1fr;
	}

	.am-fix > :last-child {
		grid-column: 2;
	}
}

/* ---- Chart -------------------------------------------------------------------------- */
.am-chart {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible;
}

.am-chart text {
	font-family: var(--am-font);
	font-size: 11px;
	fill: var(--am-mute);
}

.am-chart .am-chart__line {
	fill: none;
	stroke: var(--am-blue);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.am-chart .am-chart__area {
	fill: url(#am-area);
}

.am-chart .am-chart__grid {
	stroke: var(--am-line);
	stroke-width: 1;
}

.am-chart circle {
	fill: var(--am-surface);
	stroke: var(--am-blue);
	stroke-width: 2.5;
}

/* ---- States -------------------------------------------------------------------------- */
.am-empty {
	text-align: center;
	padding: 44px 24px;
	display: grid;
	justify-items: center;
	gap: 10px;
}

.am-empty__art {
	width: 72px;
	height: 72px;
	border-radius: 20px;
	background: var(--am-blue-wash);
	display: grid;
	place-items: center;
	color: var(--am-blue);
	margin-bottom: 4px;
}

.am-empty__robot {
	width: 84px;
	height: auto;
	margin-bottom: 4px;
}

.am-empty__art svg {
	width: 34px;
	height: 34px;
}

.am-empty h2,
.am-empty h3 {
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -0.015em;
}

.am-empty p {
	max-width: 52ch;
	color: var(--am-mute);
}

.am-error {
	border: 1px solid #f0c4cc;
	background: var(--am-critical-wash);
	color: #7c1124;
	border-radius: 12px;
	padding: 14px 16px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.am-error svg {
	width: 20px;
	height: 20px;
	flex: none;
	margin-top: 1px;
	color: var(--am-bad);
}

.am-note {
	border: 1px solid var(--am-line);
	background: var(--am-wash);
	border-radius: 12px;
	padding: 12px 14px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 13.5px;
}

.am-note svg {
	width: 18px;
	height: 18px;
	flex: none;
	margin-top: 2px;
	color: var(--am-blue);
}

.am-note--warn {
	background: var(--am-moderate-wash);
	border-color: #ecd9a3;
}

.am-note--warn svg {
	color: var(--am-warn);
}

.am-skel {
	background: linear-gradient(90deg, var(--am-wash) 0%, #ebeae2 50%, var(--am-wash) 100%);
	background-size: 200% 100%;
	animation: am-shimmer 1.4s ease-in-out infinite;
	border-radius: 8px;
	min-height: 16px;
}

@keyframes am-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

.am-spin {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-right-color: transparent;
	animation: am-rotate 700ms linear infinite;
	display: inline-block;
}

@keyframes am-rotate {
	to {
		transform: rotate(360deg);
	}
}

/* ---- Toast ----------------------------------------------------------------------------- */
.am-toasts {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100200;
	display: grid;
	gap: 10px;
	pointer-events: none;
}

.am-toast {
	pointer-events: auto;
	background: var(--am-navy-deep);
	color: #fff;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 13.5px;
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(11, 30, 48, 0.28);
	display: flex;
	gap: 10px;
	align-items: center;
	max-width: 380px;
	animation: am-toast-in 260ms var(--am-ease) both;
}

.am-toast svg {
	width: 18px;
	height: 18px;
	color: var(--am-green);
	flex: none;
}

.am-toast--error svg {
	color: #FF7A8C;
}

@keyframes am-toast-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.97);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ---- Drawer ----------------------------------------------------------------------------- */
.am-scrim {
	position: fixed;
	inset: 0;
	background: rgba(11, 30, 48, 0.5);
	z-index: 100100;
	animation: am-fade 200ms ease both;
}

.am-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(680px, 100vw);
	background: var(--am-paper);
	z-index: 100110;
	display: flex;
	flex-direction: column;
	box-shadow: -20px 0 60px rgba(11, 30, 48, 0.25);
	animation: am-drawer-in 260ms var(--am-ease-drawer) both;
	font-family: var(--am-font);
	color: var(--am-navy);
}

.am-drawer.is-closing {
	animation: am-drawer-out 180ms ease-in both;
}

.am-scrim.is-closing {
	animation: am-fade-out 180ms ease both;
}

@keyframes am-drawer-in {
	from {
		transform: translateX(40px);
		opacity: 0;
	}

	to {
		transform: none;
		opacity: 1;
	}
}

@keyframes am-drawer-out {
	to {
		transform: translateX(30px);
		opacity: 0;
	}
}

@keyframes am-fade {
	from {
		opacity: 0;
	}
}

@keyframes am-fade-out {
	to {
		opacity: 0;
	}
}

.am-drawer__head {
	padding: 20px 64px 16px 24px;
	border-bottom: 1px solid var(--am-line);
	background: var(--am-surface);
	display: grid;
	gap: 10px;
}

.am-drawer__head h2 {
	font-size: 20px;
	line-height: 1.25;
	font-weight: 750;
	letter-spacing: -0.02em;
	padding-right: 36px;
}

.am-drawer__close {
	position: absolute;
	top: 16px;
	right: 18px;
}

.am-drawer__body {
	padding: 22px 24px 40px;
	overflow: auto;
	display: grid;
	gap: 22px;
	align-content: start;
	flex: 1;
}

.am-drawer__body h3 {
	font-size: 13px;
	font-weight: 750;
	margin-bottom: 8px;
	letter-spacing: 0.01em;
}

.am-drawer__body p {
	max-width: 62ch;
}

.am-code {
	position: relative;
	background: var(--am-navy-deep);
	color: #e8ecf3;
	border-radius: 12px;
	padding: 14px 16px;
	overflow: auto;
}

.am-code pre {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: var(--am-mono);
	font-size: 12.5px;
	line-height: 1.6;
}

.am-code--inline {
	padding: 10px 12px;
}

.am-code .am-copy {
	position: absolute;
	top: 8px;
	right: 8px;
}

.am-code .am-copy.am-iconbtn {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.am-code .am-copy.am-iconbtn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.am-code--has-copy pre {
	padding-right: 36px;
}

.am-kv {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 16px;
	font-size: 13px;
}

.am-kv dt {
	color: var(--am-mute);
}

.am-kv dd {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

/* ---- Issues table ----------------------------------------------------------------------- */
.am-filters {
	display: grid;
	gap: 12px;
}

.am-filters__row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.am-filters .am-input[type="search"] {
	max-width: 320px;
}

.am-filters .am-select {
	width: auto;
	min-width: 150px;
	max-width: 240px;
}

.am-issue {
	display: grid;
	grid-template-columns: 4px minmax(0, 1fr) auto auto;
	gap: 16px;
	align-items: center;
	width: 100%;
	text-align: left;
	padding: 14px 20px 14px 0;
	background: transparent;
	border: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	transition: background-color 120ms ease;
}

.am-issue:hover {
	background: var(--am-wash);
}

.am-issue:active {
	background: #ecebe3;
}

.am-issue__bar {
	align-self: stretch;
	border-radius: 0 4px 4px 0;
	background: var(--am-minor);
}

.am-issue[data-sev="critical"] .am-issue__bar {
	background: var(--am-critical);
}

.am-issue[data-sev="serious"] .am-issue__bar {
	background: var(--am-serious);
}

.am-issue[data-sev="moderate"] .am-issue__bar {
	background: #C98A00;
}

.am-issue__title {
	font-weight: 700;
	font-size: 14.5px;
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.am-issue__sel {
	display: block;
	font-family: var(--am-mono);
	font-size: 12px;
	color: var(--am-mute);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 3px;
	max-width: 100%;
}

.am-issue__pages {
	display: block;
	text-align: right;
	font-size: 12.5px;
	color: var(--am-mute);
	min-width: 84px;
}

.am-issue__pages b {
	display: block;
	font-size: 20px;
	line-height: 1.1;
	color: var(--am-navy);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}

.am-issue__main {
	display: block;
	min-width: 0;
}

@media (max-width: 700px) {
	.am-issue {
		grid-template-columns: 4px minmax(0, 1fr) auto;
	}

	.am-issue > :nth-child(3) {
		display: none;
	}
}

.am-pager {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 20px;
	border-top: 1px solid var(--am-line);
	font-size: 13px;
	color: var(--am-mute);
	gap: 12px;
	flex-wrap: wrap;
}

.am-pagelist {
	display: grid;
	gap: 0;
	border: 1px solid var(--am-line);
	border-radius: 12px;
	background: var(--am-surface);
	overflow: hidden;
}

.am-pagelist li {
	padding: 10px 14px;
	border-top: 1px solid var(--am-line);
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: center;
	font-size: 13px;
}

.am-pagelist li:first-child {
	border-top: 0;
}

.am-pagelist a {
	overflow-wrap: anywhere;
}

/* ---- Scan --------------------------------------------------------------------------------- */
.am-scan-live {
	display: grid;
	gap: 20px;
}

.am-scan-big {
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}

.am-scan-big b {
	font-size: 54px;
	line-height: 1;
	font-weight: 750;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
}

.am-scan-now {
	font-family: var(--am-mono);
	font-size: 12.5px;
	color: var(--am-mute);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.am-pagelog {
	max-height: 280px;
	overflow: auto;
	border: 1px solid var(--am-line);
	border-radius: 12px;
}

.am-pagelog li {
	display: grid;
	grid-template-columns: 18px 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 8px 12px;
	border-top: 1px solid var(--am-line);
	font-size: 12.5px;
}

.am-pagelog li:first-child {
	border-top: 0;
}

.am-pagelog svg {
	width: 16px;
	height: 16px;
	color: var(--am-ok);
}

/* ---- Fix cards ----------------------------------------------------------------------------------- */
.am-fixcard {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	align-items: start;
	padding: 18px 20px;
}

.am-fixcard h3 {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 3px;
}

.am-fixcard p {
	color: var(--am-mute);
	max-width: 70ch;
}

/* ---- Tiles ------------------------------------------------------------------------------------------------ */
.am-tile {
	display: grid;
	gap: 8px;
	align-content: start;
}

.am-tile h3 {
	font-size: 13px;
	font-weight: 700;
	color: var(--am-mute);
	display: flex;
	gap: 8px;
	align-items: center;
}

.am-tile h3 svg {
	width: 16px;
	height: 16px;
}

.am-tile b {
	font-size: 28px;
	line-height: 1.05;
	font-weight: 750;
	letter-spacing: -0.03em;
}

.am-tile small {
	color: var(--am-mute);
	font-size: 12.5px;
}

/* ---- Quick start ---------------------------------------------------------------------------------------------- */
.am-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	counter-reset: step;
	text-align: left;
	width: 100%;
	max-width: 880px;
	margin-top: 14px;
}

.am-steps li {
	counter-increment: step;
	border: 1px solid var(--am-line);
	border-radius: 14px;
	padding: 16px;
	background: var(--am-surface);
}

.am-steps li::before {
	content: counter(step);
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--am-navy-deep);
	color: var(--am-green);
	font-weight: 750;
	font-size: 13px;
	margin-bottom: 10px;
}

.am-steps b {
	display: block;
	margin-bottom: 3px;
}

.am-steps span {
	color: var(--am-mute);
	font-size: 13px;
}

@media (max-width: 800px) {
	.am-steps {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- Sticky save bar ----------------------------------------------------------------------------------------------- */
.am-savebar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: flex-end;
	padding: 14px 20px;
	background: rgba(246, 248, 247, 0.92);
	backdrop-filter: blur(8px);
	border: 1px solid var(--am-line);
	border-radius: 14px;
}

.am-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.am-table th,
.am-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--am-line);
	vertical-align: top;
}

.am-table th {
	font-weight: 700;
	color: var(--am-mute);
	font-size: 12px;
}

/* ---- Reduced motion ------------------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.a11ymate *,
	.a11ymate *::before,
	.a11ymate *::after,
	.am-scrim,
	.am-drawer,
	.am-toast {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.am-skel {
		animation: none;
	}
}

/* ---- Touch ---------------------------------------------------------------------------------------------------------------- */
@media (hover: none) {
	.a11ymate .am-btn:hover {
		background: var(--am-blue);
	}
}

@media (max-width: 782px) {
	#a11ymate-root.a11ymate {
		margin-right: 10px;
	}

	.am-head__title {
		display: none;
	}

	.am-card {
		padding: 18px;
	}
}

/* ---- Dialog ------------------------------------------------------------------------------------------------------ */
.am-dialog {
	position: fixed;
	z-index: 100300;
	top: 50%;
	left: 50%;
	width: min(480px, calc(100vw - 32px));
	transform: translate(-50%, -50%);
	background: var(--am-surface);
	color: var(--am-navy);
	border-radius: 18px;
	padding: 26px;
	box-shadow: 0 30px 80px rgba(11, 30, 48, 0.35);
	font-family: var(--am-font, system-ui);
	animation: am-dialog-in 220ms var(--am-ease) both;
}

.am-dialog h2 {
	font-size: 19px;
	font-weight: 750;
	letter-spacing: -0.02em;
	margin: 0 0 8px;
	outline: none;
}

.am-dialog p {
	margin: 0;
	color: var(--am-mute);
	font-size: 14px;
	line-height: 1.55;
}

@keyframes am-dialog-in {
	from {
		opacity: 0;
		transform: translate(-50%, -48%) scale(0.97);
	}

	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

/* ---- Colour samples (also used by the issue drawer) ---- */
.am-swatch {
	display: inline-grid;
	place-items: center;
	min-width: 56px;
	height: 44px;
	border-radius: 10px;
	border: 1px solid rgba(11, 30, 48, 0.18);
	font-weight: 750;
	font-size: 18px;
	flex: none;
}

.am-swatch[data-sample]::before {
	content: attr(data-sample);
}

.am-pair {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 18px;
	padding: 18px 20px;
	align-items: start;
}

.am-pair__sug {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}

.am-sug {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--am-line-strong);
	border-radius: 12px;
	background: var(--am-surface);
	padding: 8px 10px;
	font-size: 12.5px;
}

.am-sug .am-swatch {
	min-width: 44px;
	height: 34px;
	font-size: 14px;
	border-radius: 8px;
}

.am-sug b {
	display: block;
	font-size: 12.5px;
}

.am-sug code {
	font-size: 12px;
}
