/* AI Plagiarism — оформление в духе темы Kadence: без внешних зависимостей,
   только системные шрифты и цвета, чтобы не тянуть лишний вес на страницу. */

.plag-container {

	margin: 0 auto;
	font-size: 15px;
	line-height: 1.6;
	color: #1d2327;
}

.plag-container h3 {
	margin: 0 0 8px;
	font-size: 22px;
	line-height: 1.3;
}

.plag-lead {
	margin: 0 0 20px;
	color: #50575e;
	font-size: 14px;
}

/* ── Блок токенов ───────────────────────────────────────────── */
.plag-tokens {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
}

.plag-tok {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 132px;
	padding: 12px 16px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.plag-tok.is-used {
	border-color: #f0c33c;
	background: #fdf9ef;
}

.plag-tok.is-left {
	border-color: #7ad1a0;
	background: #f2fbf5;
}

.plag-tok-num {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.plag-tok-label {
	font-size: 12px;
	color: #787c82;
}

/* ── Вкладки ─────────────────────────────────────────────────── */
.plag-tabs {
	display: flex;
	gap: 4px;
	margin: 0 0 16px;
	border-bottom: 1px solid #dcdcde;
}

.plag-tab {
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	padding: 9px 16px;
	font: inherit;
	font-weight: 500;
	color: #50575e;
	cursor: pointer;
	border-radius: 4px 4px 0 0;
	transition: color .15s, border-color .15s, background .15s;
}

.plag-tab:hover {
	color: #1d2327;
	background: #f6f7f7;
}

.plag-tab.is-active {
	color: #2271b1;
	border-bottom-color: #2271b1;
	font-weight: 600;
}

.plag-tab:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

/* ── Поля ────────────────────────────────────────────────────── */
.plag-label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
	font-size: 14px;
}

.plag-textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 190px;
	padding: 12px 14px;
	font: inherit;
	font-size: 14px;
	line-height: 1.6;
	color: #1d2327;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	resize: vertical;
}

.plag-textarea:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.plag-file {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font: inherit;
	font-size: 14px;
	background: #fff;
	border: 1px dashed #8c8f94;
	border-radius: 6px;
}

.plag-counter {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0 0;
	font-size: 13px;
	color: #50575e;
}

.plag-counter.is-over {
	color: #b32d2e;
	font-weight: 600;
}

.plag-note {
	font-size: 13px;
	color: #787c82;
	margin: 8px 0 0;
}

/* ── Кнопки ──────────────────────────────────────────────────── */
.plag-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 0;
}

.plag-btn {
	appearance: none;
	display: inline-block;
	padding: 10px 22px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	background: #2271b1;
	border: 1px solid #2271b1;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, border-color .15s, opacity .15s;
}

.plag-btn:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.plag-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.plag-btn-ghost {
	color: #2271b1;
	background: #fff;
	border-color: #2271b1;
}

.plag-btn-ghost:hover {
	color: #135e96;
	background: #f0f6fc;
	border-color: #135e96;
}

.plag-btn-small {
	padding: 7px 16px;
	font-size: 13px;
}

.plag-price {
	font-size: 13px;
	color: #50575e;
}

.plag-price b {
	color: #1d2327;
	font-weight: 600;
}

/* ── Статус ──────────────────────────────────────────────────── */
.plag-status {
	margin: 18px 0 0;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	color: #1d2327;
}

.plag-status.is-error {
	background: #fcf0f1;
	border-color: #f0b8bc;
	color: #8c1d40;
}

.plag-status.is-info {
	background: #f6f7f7;
	border-color: #dcdcde;
	color: #50575e;
}

/* ── Результат ───────────────────────────────────────────────── */
.plag-result {
	margin: 22px 0 0;
}

.plag-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0 0 18px;
}

.plag-card {
	flex: 1 1 160px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 14px 18px;
	background: #fff;
}

.plag-card b {
	display: block;
	font-size: 26px;
	line-height: 1.2;
	letter-spacing: -.01em;
}

.plag-card span {
	font-size: 13px;
	color: #50575e;
}

.plag-card.is-total b {
	color: #8c1d40;
}

.plag-card.is-unique b {
	color: #00754a;
}

.plag-partial {
	margin: 0 0 16px;
	padding: 10px 14px;
	font-size: 13px;
	background: #fcf9e8;
	border: 1px solid #f0c33c;
	border-radius: 6px;
}

.plag-table-wrap {
	overflow-x: auto;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}

.plag-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.plag-table th,
.plag-table td {
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #f0f0f1;
}

.plag-table thead th {
	background: #f6f7f7;
	font-weight: 600;
	font-size: 13px;
	color: #3c434a;
	white-space: nowrap;
}

.plag-table tbody tr:last-child td {
	border-bottom: 0;
}

.plag-table tbody tr:hover {
	background: #fbfbfc;
}

.plag-table .num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.plag-table a {
	color: #2271b1;
	text-decoration: none;
	word-break: break-all;
}

.plag-table a:hover {
	text-decoration: underline;
}

.plag-domain {
	font-weight: 600;
	white-space: nowrap;
}

.plag-frags {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: #3c434a;
}

.plag-frags li {
	margin: 0 0 6px;
	padding: 6px 10px;
	background: #f6f7f7;
	border-left: 3px solid #2271b1;
	border-radius: 0 4px 4px 0;
}

.plag-frags li:last-child {
	margin-bottom: 0;
}

.plag-empty {
	margin: 0 0 18px;
	padding: 18px;
	text-align: center;
	color: #00754a;
	background: #f0f9f4;
	border: 1px solid #b8e0cb;
	border-radius: 8px;
	font-weight: 500;
}

.plag-downloads {
	display: flex;
	gap: 10px;
	margin: 16px 0 0;
}

.plag-foot {
	margin: 16px 0 0;
	font-size: 12px;
	color: #787c82;
}

/* ── История ─────────────────────────────────────────────────── */
.plag-history {
	margin: 34px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid #dcdcde;
}

.plag-history h4 {
	margin: 0 0 12px;
	font-size: 16px;
}

.plag-history-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
}

.plag-hist-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 14px;
	border: 1px solid #f0f0f1;
	border-radius: 6px;
	background: #fff;
}

/* Левая часть: заголовок + метрики + ссылка на отчёт в столбик. */
.plag-hist-main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	min-width: 0;
}

.plag-hist-item .t {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.plag-hist-metrics {
	flex: 1 0 100%;
	color: #50575e;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.plag-hist-report {
	font-size: 13px;
	white-space: nowrap;
}

.plag-hist-item .d {
	color: #787c82;
	font-size: 13px;
	white-space: nowrap;
}

.plag-hist-empty {
	color: #787c82;
	font-size: 14px;
	margin: 0;
}

/* ── Мобильные ───────────────────────────────────────────────── */
@media (max-width: 640px) {
	.plag-container h3 { font-size: 19px; }
	.plag-actions { gap: 8px; }
	.plag-btn { flex: 1 1 auto; text-align: center; }
	.plag-summary { gap: 10px; }
	.plag-card { flex: 1 1 100%; }
	.plag-table th, .plag-table td { padding: 8px 10px; }
	.plag-hist-item { flex-direction: column; align-items: flex-start; gap: 2px; }
	.plag-tokens { gap: 8px; }
	.plag-tok { flex: 1 1 100%; min-width: 0; }
}
