/*!
 * @Rank – Sitemap Generator & Validator: the tool's own rules.
 *
 * The palette, header, cards, buttons, notices and toast all come from
 * assets/css/atrank-core.css. Only what is specific to this tool is here, and
 * every rule is anchored on .atrank-sitemap.
 *
 * Two rules here are function rather than decoration:
 *   · the line number sits at the front of every entry, because the answer
 *     somebody needs from a validator is "line 47", and an XML parser's answer
 *     to a stray ampersand is a parse error at line 1;
 *   · an entry whose only remarks are notes — priority and changefreq being
 *     ignored — is styled quietly rather than as a fault, because it IS valid;
 *     it just does nothing.
 */

.atrank-sitemap .atrank-sitemap-panes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	align-items: start;
}
@media (min-width: 940px) {
	.atrank-sitemap .atrank-sitemap-panes {
		grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
	}
}
.atrank-sitemap .atrank-sitemap-col {
	display: grid;
	gap: 10px;
	min-width: 0;
	align-content: start;
}

.atrank-sitemap .atrank-cardhead {
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
}
.atrank-sitemap .atrank-cardhead h2 {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
}

.atrank-sitemap .atrank-sitemap-input {
	display: block;
	width: 100%;
	min-width: 0;
	min-height: min(200px, max(130px, 20vh));
	max-height: 40vh;
	resize: vertical;
	padding: 9px 11px;
	border: 1px solid var(--line2);
	border-radius: var(--r);
	background: var(--inset);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
}
.atrank-sitemap .atrank-sitemap-field {
	display: block;
	margin-top: 10px;
}
.atrank-sitemap .atrank-sitemap-label {
	display: block;
	margin-bottom: 3px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--dim);
}
.atrank-sitemap .atrank-sitemap-base {
	display: block;
	width: 100%;
	min-width: 0;
	padding: 6px 9px;
	border: 1px solid var(--line2);
	border-radius: var(--r);
	background: var(--panel);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12.5px;
}
.atrank-sitemap .atrank-sitemap-input:focus,
.atrank-sitemap .atrank-sitemap-base:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: var(--ring);
}

.atrank-sitemap .atrank-sitemap-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}
.atrank-sitemap .atrank-sitemap-preset {
	padding: 3px 9px;
	border: 1px solid var(--line2);
	border-radius: 20px;
	background: var(--panel);
	color: var(--muted);
	font: inherit;
	font-size: 11.5px;
	cursor: pointer;
	transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.atrank-sitemap .atrank-sitemap-preset:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.atrank-sitemap .atrank-sitemap-preset:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

/* ── The XML ──────────────────────────────────────────────────────────── */
.atrank-sitemap .atrank-sitemap-out {
	margin: 0;
	padding: 9px 11px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--inset);
	color: var(--txt);
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.55;
	white-space: pre;
	overflow-x: auto;
	min-height: 2.4em;
	max-height: 34vh;
	overflow-y: auto;
}

/* ── Each URL ─────────────────────────────────────────────────────────── */
.atrank-sitemap .atrank-sitemap-entries {
	display: grid;
	gap: 4px;
	max-height: 46vh;
	overflow-y: auto;
}
.atrank-sitemap .atrank-sitemap-entry {
	padding: 5px 9px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--panel2);
	min-width: 0;
}
.atrank-sitemap .atrank-sitemap-entry.is-err {
	border-color: var(--err);
	background: var(--err-soft);
}
/* Valid, and doing nothing. Not a fault, so not styled as one. */
.atrank-sitemap .atrank-sitemap-entry.is-note {
	border-style: dashed;
}

.atrank-sitemap .atrank-sitemap-entryhead {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 9px;
	min-width: 0;
}
/* The answer somebody actually needs from a validator. */
.atrank-sitemap .atrank-sitemap-line {
	flex: 0 0 auto;
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--dim);
	font-variant-numeric: tabular-nums;
}
.atrank-sitemap .atrank-sitemap-loc {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--txt);
	overflow-wrap: anywhere;
	min-width: 0;
}
.atrank-sitemap .atrank-sitemap-meta {
	margin-top: 2px;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--dim);
}
.atrank-sitemap .atrank-sitemap-problem {
	margin-top: 3px;
	font-size: 11.5px;
	line-height: 1.45;
	color: var(--muted);
	overflow-wrap: anywhere;
}
.atrank-sitemap .atrank-sitemap-problem.is-err {
	color: var(--err);
	font-weight: 600;
}
.atrank-sitemap .atrank-sitemap-problem.is-warn {
	color: var(--warn);
}
