/* Scoped to .mttrc- so the host theme keeps control of typography. */

.mttrc-app,
.mttrc-report {
	--mttrc-ok: #1d7a4c;
	--mttrc-warn: #b26b00;
	--mttrc-alert: #b3261e;
	--mttrc-skip: #6b6b6b;
	--mttrc-line: #ddd;
	--mttrc-bg: #f7f7f5;
	font-size: 1rem;
	line-height: 1.55;
}

.mttrc-field-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.mttrc-hint {
	color: #666;
	font-size: 0.9em;
	margin: 0 0 0.75rem;
}

#mttrc-refs {
	width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.85em;
	line-height: 1.5;
	padding: 0.75rem;
	border: 1px solid var(--mttrc-line);
	border-radius: 6px;
	box-sizing: border-box;
}

.mttrc-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.mttrc-btn {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border: 0;
	border-radius: 6px;
	background: #12263f;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.mttrc-btn:hover { opacity: 0.9; }
.mttrc-btn:disabled { opacity: 0.55; cursor: default; }
.mttrc-btn:focus-visible { outline: 3px solid #12263f; outline-offset: 2px; }

.mttrc-secondary {
	background: transparent;
	color: #12263f;
	border: 1px solid #12263f;
}

.mttrc-price-note { color: #666; font-size: 0.85em; }

.mttrc-error {
	margin-top: 0.75rem;
	padding: 0.6rem 0.8rem;
	border-left: 3px solid var(--mttrc-alert);
	background: #fdf3f2;
	color: #7f1d1a;
	border-radius: 0;
}

.mttrc-bar {
	height: 6px;
	background: var(--mttrc-line);
	border-radius: 3px;
	overflow: hidden;
	margin: 0.5rem 0;
}

.mttrc-bar-fill {
	height: 100%;
	width: 0;
	background: #12263f;
	transition: width 0.25s ease;
}

.mttrc-working-label { font-weight: 600; margin: 0; }

/* Summary */

.mttrc-summary-line { font-weight: 600; margin: 0 0 0.5rem; }

.mttrc-counts {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
}

.mttrc-counts li {
	margin: 0;
	font-size: 0.95em;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.mttrc-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	display: inline-block;
	flex: none;
}

.mttrc-dot.ok { background: var(--mttrc-ok); }
.mttrc-dot.warn { background: var(--mttrc-warn); }
.mttrc-dot.alert { background: var(--mttrc-alert); }
.mttrc-dot.skip { background: var(--mttrc-skip); }

.mttrc-gate {
	border: 1px solid var(--mttrc-line);
	border-radius: 8px;
	padding: 1rem;
	background: var(--mttrc-bg);
}

.mttrc-gate-lead { margin-top: 0; }

.mttrc-action {
	border-left: 3px solid var(--mttrc-warn);
	background: #fdf8ef;
	padding: 0.6rem 0.9rem;
	margin: 0 0 1.25rem;
	border-radius: 0;
}

.mttrc-action.mttrc-clean {
	border-left-color: var(--mttrc-ok);
	background: #f1f8f4;
}

/* Reference list */

.mttrc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mttrc-item {
	border-top: 1px solid var(--mttrc-line);
	padding: 0.9rem 0;
	break-inside: avoid;
}

.mttrc-item-head {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
}

.mttrc-num {
	font-weight: 700;
	min-width: 2.2em;
}

.mttrc-verdict {
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.45rem;
	border-radius: 3px;
	white-space: nowrap;
}

.mttrc-v-ok { background: #e6f4ec; color: #14562f; }
.mttrc-v-warn { background: #fdf1dd; color: #7a4a00; }
.mttrc-v-alert { background: #fbe6e4; color: #7f1d1a; }
.mttrc-v-skip { background: #eee; color: #4a4a4a; }

.mttrc-raw {
	margin: 0 0 0.35rem;
	font-size: 0.93em;
}

.mttrc-reason {
	margin: 0 0 0.35rem;
	font-size: 0.88em;
	color: #555;
}

.mttrc-alert .mttrc-reason { color: #7f1d1a; }

.mttrc-link {
	margin: 0 0 0.35rem;
	font-size: 0.82em;
	word-break: break-all;
}

.mttrc-label {
	display: block;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 0.2rem;
}

.mttrc-corrected {
	background: var(--mttrc-bg);
	border-radius: 6px;
	padding: 0.6rem 0.75rem;
	margin: 0.5rem 0;
}

.mttrc-corrected p { margin: 0; font-size: 0.9em; }

.mttrc-suggestions {
	margin-top: 0.75rem;
	padding-left: 0.9rem;
	border-left: 2px solid var(--mttrc-line);
}

.mttrc-suggest-note {
	font-size: 0.82em;
	color: #7a4a00;
	margin: 0 0 0.6rem;
}

.mttrc-suggestion { margin-bottom: 0.7rem; }
.mttrc-suggest-cite { margin: 0 0 0.2rem; font-size: 0.9em; }
.mttrc-suggest-abs { margin: 0 0 0.2rem; font-size: 0.84em; color: #555; }

.mttrc-clean-block {
	border: 1px solid var(--mttrc-line);
	border-radius: 8px;
	padding: 0.9rem;
	margin-bottom: 1.5rem;
	background: var(--mttrc-bg);
}

.mttrc-clean-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.mttrc-clean-head .mttrc-label { margin: 0; }

.mttrc-clean-actions { display: flex; gap: 0.4rem; }

.mttrc-clean-actions .mttrc-btn {
	padding: 0.35rem 0.7rem;
	font-size: 0.85rem;
}

.mttrc-clean-note {
	font-size: 0.83em;
	color: #555;
	margin: 0 0 0.5rem;
}

.mttrc-clean-text {
	width: 100%;
	box-sizing: border-box;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.82em;
	line-height: 1.6;
	padding: 0.7rem;
	border: 1px solid var(--mttrc-line);
	border-radius: 6px;
	background: #fff;
	resize: vertical;
	min-height: 200px;
}

.mttrc-alts summary {
	cursor: pointer;
	font-size: 0.85em;
	color: #555;
	margin: 0.3rem 0;
}

.mttrc-footer {
	margin-top: 1.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--mttrc-line);
	font-size: 0.8em;
	color: #666;
}

.mttrc-report-actions { margin-bottom: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.mttrc-locked, .mttrc-empty {
	border: 1px solid var(--mttrc-line);
	border-radius: 8px;
	padding: 1rem;
	background: var(--mttrc-bg);
}

@media print {
	.mttrc-report-actions,
	.mttrc-app,
	nav, header, footer, .site-header, .site-footer, aside { display: none !important; }

	.mttrc-report { font-size: 10.5pt; }
	.mttrc-item { page-break-inside: avoid; }
	.mttrc-link a { color: #000; }
	.mttrc-verdict { border: 1px solid #999; }
}

/* Make sure the paste box is never collapsed by the theme. */
.mttrc-app #mttrc-refs { min-height: 260px; }

.mttrc-nosuggest {
	font-size: 0.85em;
	color: #555;
	margin: 0.5rem 0 0;
	padding-left: 0.9rem;
	border-left: 2px solid var(--mttrc-line);
}

.mttrc-tidy {
	font-size: 0.85em;
	color: #555;
	margin: -0.75rem 0 1.25rem;
}

.mttrc-lookup {
	border: 1px solid var(--mttrc-line);
	border-radius: 8px;
	padding: 1.1rem;
	background: var(--mttrc-bg);
	max-width: 460px;
}

.mttrc-lookup-lead { margin-top: 0; font-weight: 600; }

.mttrc-lookup label {
	display: block;
	font-size: 0.85em;
	font-weight: 600;
	margin-bottom: 0.2rem;
}

.mttrc-lookup input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--mttrc-line);
	border-radius: 6px;
	background: #fff;
	font-size: 1rem;
}

.mttrc-permalink {
	border: 1px solid var(--mttrc-line);
	border-radius: 8px;
	padding: 0.8rem;
	margin-bottom: 1.25rem;
	background: var(--mttrc-bg);
}

.mttrc-permalink .mttrc-hint { margin: 0 0 0.4rem; }

.mttrc-permalink-text {
	width: 100%;
	box-sizing: border-box;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.78em;
	padding: 0.5rem;
	border: 1px solid var(--mttrc-line);
	border-radius: 6px;
	background: #fff;
	resize: none;
	margin-bottom: 0.4rem;
}

@media print {
	.mttrc-permalink, .mttrc-lookup { display: none !important; }
}

.mttrc-emailed {
	font-size: 0.85em;
	margin: 0 0 0.5rem;
	padding: 0.5rem 0.7rem;
	background: #fff;
	border-left: 3px solid var(--mttrc-ok);
	border-radius: 0 4px 4px 0;
}

.mttrc-error-link {
	display: inline-block;
	margin-top: 0.4rem;
	font-weight: 700;
	color: #7f1d1a;
}

.mttrc-cap { font-weight: 600; color: var(--ink); }

.mttrc-count {
	margin-top: 0.6rem;
	font-size: 0.9em;
	color: var(--mttrc-skip);
}

.mttrc-count.is-over {
	color: #7f1d1a;
	background: #fdf3f2;
	border-left: 3px solid var(--mttrc-alert);
	padding: 0.7rem 0.9rem;
	font-size: 0.95em;
	line-height: 1.55;
}

.mttrc-count.is-over strong { display: block; margin-bottom: 0.2rem; font-size: 1.05em; }

.mttrc-error strong { display: block; margin-bottom: 0.2rem; }
