.rotbane-wrap,
.rotbane-widget-list {
	--rotbane-paper: #fffdf8;
	--rotbane-ink: #1c1915;
	--rotbane-muted: #5c5348;
	--rotbane-line: #e4d9cb;
	--rotbane-accent: #0f6e56;
	--rotbane-broken: #9f2d2d;
	--rotbane-ok: #0f6e56;
	--rotbane-redirect: #1d4e89;
	--rotbane-blocked: #6d28d9;
	--rotbane-warn: #92400e;
	--rotbane-soft: #f6f1e8;
	--rotbane-shadow: 0 12px 32px rgba(48, 32, 12, 0.06);
}

@media (prefers-color-scheme: dark) {
	body.rotbane-screen {
		--rotbane-paper: #241f1a;
		--rotbane-ink: #f6f1e8;
		--rotbane-muted: #cbbba8;
		--rotbane-line: #3d342c;
		--rotbane-soft: #1b1714;
		--rotbane-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
		background: #14110e;
		color: var(--rotbane-ink);
	}

	body.rotbane-screen #wpbody-content,
	body.rotbane-screen .rotbane-wrap {
		color: var(--rotbane-ink);
	}
}

.rotbane-wrap {
	max-width: 1180px;
	color: var(--rotbane-ink);
}

.rotbane-wrap h1,
.rotbane-panel h2 {
	font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.rotbane-lede,
.rotbane-muted,
.rotbane-wrap .description {
	color: var(--rotbane-muted);
	max-width: 68ch;
}

.rotbane-hero {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 18px;
	align-items: center;
	margin: 16px 0 20px;
}

.rotbane-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rotbane-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--rotbane-paper);
	border: 1px solid var(--rotbane-line);
	border-radius: 14px;
	padding: 14px 16px;
	text-decoration: none;
	color: var(--rotbane-ink);
	box-shadow: var(--rotbane-shadow);
	transition: transform 0.18s ease, border-color 0.18s ease;
}

.rotbane-stat:hover,
.rotbane-stat:focus-visible {
	transform: translateY(-2px);
	border-color: var(--rotbane-accent);
	color: var(--rotbane-ink);
}

.rotbane-stat.is-current {
	border-color: var(--rotbane-accent);
	box-shadow: inset 0 0 0 1px var(--rotbane-accent);
}

.rotbane-stat__count {
	font-size: 28px;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.rotbane-stat--broken .rotbane-stat__count { color: var(--rotbane-broken); }
.rotbane-stat--ok .rotbane-stat__count { color: var(--rotbane-ok); }
.rotbane-stat--redirect .rotbane-stat__count { color: var(--rotbane-redirect); }
.rotbane-stat--blocked .rotbane-stat__count { color: var(--rotbane-blocked); }
.rotbane-stat--missing_anchor .rotbane-stat__count { color: var(--rotbane-warn); }

.rotbane-donut-wrap {
	margin: 0;
	text-align: center;
}

.rotbane-donut {
	width: 150px;
	height: 150px;
}

.rotbane-donut__track,
.rotbane-donut__seg {
	fill: none;
	stroke-width: 4.5;
}

.rotbane-donut__track { stroke: var(--rotbane-line); }
.rotbane-donut__seg--broken { stroke: var(--rotbane-broken); }
.rotbane-donut__seg--redirect { stroke: var(--rotbane-redirect); }
.rotbane-donut__seg--blocked { stroke: var(--rotbane-blocked); }
.rotbane-donut__seg--missing_anchor { stroke: var(--rotbane-warn); }
.rotbane-donut__seg--ok { stroke: var(--rotbane-ok); }

.rotbane-donut text {
	fill: var(--rotbane-ink);
	font-size: 7px;
	font-family: Georgia, serif;
}

.rotbane-panel {
	background: var(--rotbane-paper);
	border: 1px solid var(--rotbane-line);
	border-radius: 16px;
	padding: 18px 20px;
	margin: 16px 0;
	box-shadow: var(--rotbane-shadow);
}

.rotbane-progress {
	height: 10px;
	background: var(--rotbane-line);
	border-radius: 999px;
	overflow: hidden;
	margin: 10px 0;
}

.rotbane-progress__bar {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--rotbane-accent), #1d4e89);
	border-radius: inherit;
	transition: width 0.35s ease;
}

.rotbane-filters,
.rotbane-scan-form,
.rotbane-actions,
.rotbane-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	align-items: end;
	margin: 12px 0;
}

.rotbane-filters label,
.rotbane-settings label,
.rotbane-edit-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.rotbane-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 12px;
	line-height: 1.5;
	border: 1px solid transparent;
	margin: 0 4px 4px 0;
}

.rotbane-badge--ok { background: #e5f5ef; color: #0c4a3e; }
.rotbane-badge--broken { background: #fdeceb; color: #7f1d1d; }
.rotbane-badge--redirect { background: #e7f0fa; color: #1d4e89; }
.rotbane-badge--missing_anchor { background: #ffedd5; color: #7c2d12; }
.rotbane-badge--server_error,
.rotbane-badge--timeout { background: #fff4d6; color: #7c4a03; }
.rotbane-hidden-form { display: none; }
.rotbane-badge--ssl_error { background: #fde8e8; color: #8a1c1c; }
.rotbane-badge--unpublished { background: #eef2f7; color: #334155; }
.rotbane-badge--blocked,
.rotbane-badge--mixed { background: #f3e8ff; color: #5b21b6; }
.rotbane-badge--video,
.rotbane-badge--not_broken,
.rotbane-badge--ignored,
.rotbane-badge--unchecked,
.rotbane-badge--pending { background: var(--rotbane-soft); color: var(--rotbane-ink); }

.rotbane-url,
.rotbane-final,
.rotbane-reason {
	display: block;
	max-width: 460px;
	overflow-wrap: anywhere;
}

.rotbane-reason,
.rotbane-final,
.rotbane-why {
	color: var(--rotbane-muted);
	font-size: 12px;
}

.rotbane-why-label {
	font-weight: 650;
	color: var(--rotbane-ink);
}

.rotbane-badge--repurposed { background: #f3e6c8; color: #6a4b16; }

.rotbane-empty {
	border: 1px dashed var(--rotbane-line);
	border-radius: 14px;
	padding: 22px;
	background: var(--rotbane-soft);
}

.rotbane-table-scroll {
	overflow-x: auto;
}

.rotbane-warning {
	background: #fff4d6;
	color: #7c4a03;
	border-radius: 10px;
	padding: 10px 12px;
}

.rotbane-checks {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 6px 14px;
	margin: 8px 0 14px;
	padding: 0;
	list-style: none;
}

.rotbane-checks--stacked {
	grid-template-columns: 1fr;
}

.rotbane-feature-list {
	margin: 0 0 12px 18px;
}

.rotbane-wrap a:focus-visible,
.rotbane-wrap button:focus-visible,
.rotbane-wrap input:focus-visible,
.rotbane-wrap select:focus-visible,
.rotbane-wrap textarea:focus-visible {
	outline: 3px solid #1d4e89;
	outline-offset: 2px;
}

.rotbane-inline-form {
	display: inline;
	margin-left: 8px;
}

.rotbane-row-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin-top: 4px;
}

.rotbane-row-buttons .button-link {
	padding: 2px 0;
}

@media (prefers-reduced-motion: reduce) {
	.rotbane-stat,
	.rotbane-progress__bar {
		transition: none;
	}
}

@media (max-width: 1100px) {
	.rotbane-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.rotbane-hero,
	.rotbane-stats {
		grid-template-columns: 1fr;
	}
}
