/**
 * Agent Ready dashboard styles — native WP admin look.
 *
 * @package Ajaco
 */

.ajaco-dash {
	--ajaco-track: #e4e4e7;
	--ajaco-line: #dcdcde;
	--ajaco-ink2: #50575e;
	--ajaco-ink3: #8c8f94;
	max-width: 1080px;
	position: relative;
	padding-bottom: 80px;
}

/* ---------- header ---------- */

.ajaco-head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 8px 0 16px;
}

.ajaco-head h2 {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	padding: 0;
}

.ajaco-origin {
	color: var(--ajaco-ink2);
	font-size: 13px;
}

.ajaco-grow {
	flex: 1;
}

.ajaco-meta {
	color: var(--ajaco-ink3);
	font-size: 12px;
	margin: 4px 0;
}

.ajaco-error {
	margin: 0 0 16px;
}

.ajaco-spin {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 6px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ajaco-rot 0.7s linear infinite;
	vertical-align: -2px;
}

.button:not(.button-primary) .ajaco-spin {
	border-color: rgba(0, 0, 0, 0.15);
	border-top-color: #50575e;
}

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

@media (prefers-reduced-motion: reduce) {
	.ajaco-spin {
		animation-duration: 2s;
	}
}

/* ---------- cards ---------- */

.ajaco-card {
	background: #fff;
	border: 1px solid var(--ajaco-line);
	border-radius: 8px;
	padding: 18px 20px;
	box-sizing: border-box;
}

.ajaco-empty {
	max-width: 560px;
	margin: 60px auto;
	text-align: center;
	padding: 40px 32px;
}

.ajaco-empty h3 {
	font-size: 18px;
	margin: 0 0 8px;
}

.ajaco-empty p {
	color: var(--ajaco-ink2);
	margin: 0 0 20px;
}

.ajaco-hero-row {
	display: grid;
	grid-template-columns: 250px minmax(260px, 1fr) minmax(260px, 1fr);
	gap: 16px;
	margin-bottom: 8px;
}

@media (max-width: 1100px) {
	.ajaco-hero-row {
		grid-template-columns: 250px 1fr;
	}

	.ajaco-hero-row .ajaco-next {
		grid-column: 1 / -1;
	}
}

@media (max-width: 720px) {
	.ajaco-hero-row {
		grid-template-columns: 1fr;
	}
}

/* ---------- score ring ---------- */

.ajaco-score-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.ajaco-score-card .ajaco-next-target {
	align-self: flex-start;
}

.ajaco-ring-wrap {
	position: relative;
	width: 150px;
	height: 150px;
	margin: 4px 0 6px;
}

.ajaco-ring-fill {
	transition: stroke-dasharray 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
	.ajaco-ring-fill {
		transition: none;
	}
}

.ajaco-ring-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.ajaco-score-num {
	font-size: 40px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #1d2327;
	font-variant-numeric: tabular-nums;
}

.ajaco-score-none {
	color: var(--ajaco-ink3);
}

.ajaco-score-grade {
	margin-top: 4px;
	font-size: 15px;
	font-weight: 700;
}

.ajaco-grade-label {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ajaco-bonus-chip,
.ajaco-layer-bonus {
	font-size: 10.5px;
	font-weight: 700;
	color: #2271b1;
	background: #eef3fa;
	border-radius: 99px;
	padding: 1px 7px;
}

.ajaco-level-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ajaco-level-chip {
	color: #fff;
	font-weight: 700;
	font-size: 11.5px;
	border-radius: 99px;
	padding: 2px 10px;
	white-space: nowrap;
}

.ajaco-lvl-name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ajaco-ink2);
}

.ajaco-trend-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 12px;
	color: var(--ajaco-ink3);
}

.ajaco-trend {
	font-size: 12px;
	font-weight: 600;
}

.ajaco-trend-up {
	color: #00a32a;
}

.ajaco-trend-down {
	color: #d63638;
}

.ajaco-trend-flat {
	color: var(--ajaco-ink3);
	font-weight: 400;
}

.ajaco-spark {
	display: block;
	color: #2271b1;
}

/* ---------- layer bars ---------- */

.ajaco-layer {
	padding: 7px 0;
}

.ajaco-layer + .ajaco-layer {
	border-top: 1px solid var(--ajaco-line);
}

.ajaco-layer-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 5px;
}

.ajaco-layer-name {
	font-size: 12.5px;
	font-weight: 600;
}

.ajaco-layer-pts {
	font-size: 11.5px;
	color: var(--ajaco-ink3);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ajaco-bar {
	height: 6px;
	background: var(--ajaco-track);
	border-radius: 99px;
	overflow: hidden;
}

.ajaco-bar-fill {
	height: 100%;
	border-radius: 99px;
	transition: width 0.6s ease;
}

/* ---------- share & verify ---------- */

.ajaco-share-row {
	display: grid;
	grid-template-columns: minmax(260px, 2fr) minmax(300px, 3fr);
	gap: 16px;
	margin-top: 16px;
}

@media (max-width: 720px) {
	.ajaco-share-row {
		grid-template-columns: 1fr;
	}
}

.ajaco-badge-img {
	display: block;
	margin: 6px 0 8px;
	border-radius: 12px;
}

.ajaco-ext-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 0;
	border-top: 1px solid var(--ajaco-line);
}

.ajaco-ext-name {
	flex: none;
	width: 90px;
	font-size: 13px;
	font-weight: 600;
}

.ajaco-ext-result {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.ajaco-ext-score {
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.ajaco-ext-score small {
	font-size: 11px;
	font-weight: 500;
	color: var(--ajaco-ink3);
}

.ajaco-ext-grade {
	font-size: 14px;
	font-weight: 700;
}

.ajaco-share-ext .ajaco-actions {
	margin-top: 10px;
}

/* ---------- filters ---------- */

.ajaco-filters {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 24px 0 -8px;
}

.ajaco-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--ajaco-line);
	border-radius: 99px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 500;
	color: var(--ajaco-ink2);
	cursor: pointer;
}

.ajaco-filter:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.ajaco-filter:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.ajaco-filter.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.ajaco-filter-n {
	font-size: 10.5px;
	font-weight: 700;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 99px;
	padding: 0 6px;
	font-variant-numeric: tabular-nums;
}

.ajaco-filter.is-active .ajaco-filter-n {
	background: rgba(255, 255, 255, 0.25);
}

.ajaco-filter-empty {
	margin-top: 24px;
	text-align: center;
}

/* ---------- points chips ---------- */

.ajaco-pts {
	flex: none;
	font-size: 11px;
	font-weight: 700;
	border-radius: 99px;
	padding: 1px 8px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ajaco-pts-gain {
	color: #d63638;
	background: #fcf0f1;
}

.ajaco-pts-bonus {
	color: #2271b1;
	background: #eef3fa;
}

.ajaco-pts-muted {
	color: var(--ajaco-ink3);
	background: #f0f0f1;
}

/* ---------- next level ---------- */

.ajaco-next-target {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ajaco-ink3);
	margin: 0 0 2px;
}

.ajaco-next h3 {
	margin: 0 0 6px;
	font-size: 15px;
}

.ajaco-req {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-top: 1px solid var(--ajaco-line);
}

.ajaco-req-name {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	font-weight: 500;
}

.ajaco-req-name small {
	display: block;
	font-weight: 400;
	color: var(--ajaco-ink3);
	font-size: 11.5px;
}

/* ---------- hosting diagnosis ---------- */

.ajaco-hosting {
	border-left: 4px solid #dba617;
	margin: 16px 0 8px;
}

.ajaco-hosting h3 {
	margin: 0 0 4px;
	font-size: 14px;
}

.ajaco-hosting-list {
	margin: 8px 0 12px 18px;
	font-size: 12.5px;
	color: var(--ajaco-ink2);
}

.ajaco-hosting-list li {
	margin-bottom: 4px;
}

/* ---------- categories & checks ---------- */

.ajaco-cat {
	margin-top: 24px;
}

.ajaco-cat-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 8px;
}

.ajaco-cat-head h3 {
	font-size: 14.5px;
	margin: 0;
}

.ajaco-cat-score {
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ajaco-opt {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ajaco-ink3);
	border: 1px solid var(--ajaco-line);
	border-radius: 4px;
	padding: 1px 5px;
	margin-left: 8px;
	vertical-align: 2px;
}

.ajaco-commerce-note {
	margin: 0 0 8px;
}

.ajaco-check {
	background: #fff;
	border: 1px solid var(--ajaco-line);
	border-radius: 8px;
	margin-bottom: 8px;
	overflow: hidden;
	transition: box-shadow 0.5s ease;
}

.ajaco-check-fail {
	border-color: #e8a9aa;
}

.ajaco-flash-pass {
	box-shadow: 0 0 0 2px #00a32a;
}

.ajaco-flash-fail {
	box-shadow: 0 0 0 2px #d63638;
}

.ajaco-check-row {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 11px 15px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
}

.ajaco-check-row:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.ajaco-sicon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	flex: none;
	position: relative;
}

.ajaco-sicon::after {
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.ajaco-sicon-pass {
	background: #00a32a;
}

.ajaco-sicon-pass::after {
	content: "✓";
}

.ajaco-sicon-fail {
	background: #d63638;
}

.ajaco-sicon-fail::after {
	content: "✕";
}

.ajaco-sicon-neutral {
	background: #8c8f94;
}

.ajaco-sicon-neutral::after {
	content: "–";
}

.ajaco-check-name {
	font-size: 13.5px;
	font-weight: 600;
	flex: none;
}

.ajaco-check-msg {
	font-size: 12px;
	color: var(--ajaco-ink3);
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ajaco-chevron {
	margin-left: auto;
	flex: none;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--ajaco-ink3);
	border-bottom: 2px solid var(--ajaco-ink3);
	transform: rotate(45deg);
}

.ajaco-check-row[aria-expanded="true"] .ajaco-chevron {
	transform: rotate(-135deg);
}

.ajaco-check-body {
	border-top: 1px solid var(--ajaco-line);
	padding: 13px 15px 15px 44px;
}

.ajaco-check-body dl {
	margin: 0 0 12px;
}

.ajaco-kv {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 4px 12px;
	font-size: 12.5px;
	margin-bottom: 6px;
}

.ajaco-kv dt {
	color: var(--ajaco-ink3);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding-top: 1px;
}

.ajaco-kv dd {
	margin: 0;
	color: var(--ajaco-ink2);
}

.ajaco-kv-fail {
	color: #d63638 !important;
	font-weight: 500;
}

.ajaco-kv-pass {
	color: #00a32a !important;
}

.ajaco-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.ajaco-ev-btn {
	font-size: 12px;
	cursor: pointer;
}

/* ---------- evidence ---------- */

.ajaco-evidence {
	background: #f6f7f7;
	border: 1px solid var(--ajaco-line);
	border-radius: 6px;
	padding: 10px 12px;
	margin-top: 12px;
}

.ajaco-ev-step {
	display: flex;
	gap: 10px;
	padding: 4px 0;
	font-size: 12px;
	align-items: baseline;
}

.ajaco-ev-act {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 4px;
	padding: 1px 6px;
	flex: none;
	width: 58px;
	text-align: center;
}

.ajaco-ev-fetch {
	background: #eef1fd;
	color: #2f48c4;
}

.ajaco-ev-parse {
	background: #fcf9e8;
	color: #996800;
}

.ajaco-ev-conclude {
	background: #edfaef;
	color: #007a1f;
}

.ajaco-ev-label {
	flex: 1;
	min-width: 0;
	font-family: Consolas, Monaco, monospace;
	font-size: 11.5px;
}

.ajaco-finding {
	display: block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 11.5px;
	color: var(--ajaco-ink3);
}

.ajaco-finding-negative {
	color: #d63638;
}

.ajaco-finding-positive {
	color: #007a1f;
}

.ajaco-http {
	font-size: 10.5px;
	font-weight: 700;
	border-radius: 4px;
	padding: 1px 6px;
	flex: none;
	font-variant-numeric: tabular-nums;
}

.ajaco-http-ok {
	background: #edfaef;
	color: #007a1f;
}

.ajaco-http-redir {
	background: #fcf9e8;
	color: #996800;
}

.ajaco-http-err {
	background: #fcf0f1;
	color: #d63638;
}

/* ---------- FAB + sheet ---------- */

.ajaco-fab {
	position: fixed;
	right: 32px;
	bottom: 32px;
	z-index: 900;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 99px;
	padding: 12px 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.ajaco-fab:focus-visible {
	outline: 2px solid #1d2327;
	outline-offset: 2px;
}

.ajaco-fab-count {
	background: #fff;
	color: #2271b1;
	border-radius: 99px;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 8px;
	font-variant-numeric: tabular-nums;
}

.ajaco-sheet-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 950;
}

.ajaco-sheet {
	position: fixed;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: min(640px, 94vw);
	background: #fff;
	border-radius: 12px 12px 0 0;
	padding: 18px 22px 22px;
	z-index: 960;
	box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
}

.ajaco-sheet-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.ajaco-sheet-head .button-link {
	cursor: pointer;
	font-size: 16px;
	text-decoration: none;
}

.ajaco-sheet-list {
	margin: 0 0 14px;
	padding-left: 18px;
	font-size: 13px;
	color: var(--ajaco-ink2);
	max-height: 200px;
	overflow-y: auto;
}

.ajaco-sheet-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 3px;
}

.ajaco-sheet-name {
	flex: 1;
	min-width: 0;
}

.ajaco-sheet-head .ajaco-meta {
	margin: 0 auto 0 12px;
}

.ajaco-sheet-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}
