:root {
	--hm-bg: #f4f7fb;
	--hm-panel: #ffffff;
	--hm-ink: #112238;
	--hm-muted: #5c6b7f;
	--hm-line: #d7e0ea;
	--hm-brand: #0f6abf;
	--hm-brand-2: #14a0c7;
	--hm-green: #167c4a;
	--hm-amber: #9a6400;
	--hm-red: #a7212e;
	--hm-radius: 14px;
	--hm-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
	--hm-sans: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.humanizer-flag {
	border-radius: 4px;
	padding: 0 3px;
	cursor: help;
}

.hf-high {
	background: rgba(167, 33, 46, 0.14);
	border-bottom: 2px solid var(--hm-red);
}

.hf-medium {
	background: rgba(154, 100, 0, 0.16);
	border-bottom: 2px solid var(--hm-amber);
}

.hf-low {
	background: rgba(23, 55, 89, 0.12);
	border-bottom: 2px solid #304b6b;
}

.humanizer-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.humanizer-badge--fix { background: #d8f1e3; color: #0f5a33; }
.humanizer-badge--flag { background: #fceecf; color: #6d4600; }
.humanizer-badge--high { background: #f9d8dd; color: #7b1220; }
.humanizer-badge--medium { background: #fceecf; color: #6d4600; }
.humanizer-badge--low { background: #e4eaf1; color: #2b3f57; }

.humanizer-widget {
	font-family: var(--hm-sans);
	max-width: 1120px;
	margin: 0 auto 28px;
	background: #e8eef6;
	border: 1px solid #d2dfeb;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 14px 14px 28px rgba(133, 153, 175, 0.28), -10px -10px 20px rgba(255, 255, 255, 0.8);
	color: var(--hm-ink);
	position: relative;
}

.hm-type-modern {
	font-family: var(--hm-sans);
}

.hm-type-editorial {
	font-family: var(--hm-serif);
}

.hm-type-editorial .hm-header h3,
.hm-type-editorial .hm-section-head strong,
.hm-type-editorial .hm-output-header strong {
	font-family: var(--hm-serif);
	letter-spacing: 0.1px;
}

.hm-visual-ocean {
	--hm-brand: #0f6abf;
	--hm-brand-2: #14a0c7;
	--hm-line: #d7e0ea;
}

.hm-visual-ink {
	--hm-brand: #1f3a56;
	--hm-brand-2: #2d5f85;
	--hm-line: #d3dbe5;
}

.hm-visual-ink .hm-header {
	background: radial-gradient(circle at left top, rgba(45, 95, 133, 0.18), rgba(31, 58, 86, 0.08));
}

.hm-visual-forest {
	--hm-brand: #1b6a4b;
	--hm-brand-2: #2f8f67;
	--hm-line: #d1e3d8;
}

.hm-visual-forest .hm-header {
	background: radial-gradient(circle at left top, rgba(47, 143, 103, 0.2), rgba(27, 106, 75, 0.08));
}

.hm-visual-forest .hm-next-step {
	background: #edf8f1;
	color: #1f5c42;
}

.humanizer-widget::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, #0f6abf, #14a0c7, #14945d);
}

.humanizer-dark {
	background: linear-gradient(145deg, #1a2432, #101824);
	color: #e8eef7;
	border-color: #344760;
}

.humanizer-dark .hm-input,
.humanizer-dark .hm-controls,
.humanizer-dark .hm-output-header,
.humanizer-dark .hm-report-table td {
	background: rgba(7, 13, 20, 0.35);
	color: #e8eef7;
	border-color: #344760;
}

.hm-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 18px 22px;
	background: radial-gradient(circle at left top, rgba(20, 160, 199, 0.12), rgba(15, 106, 191, 0.05));
	border-bottom: 1px solid var(--hm-line);
}

.hm-header h3 {
	margin: 0;
	font-family: var(--hm-serif);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.1px;
}

.hm-header p {
	margin: 3px 0 0;
	font-size: 13px;
	color: var(--hm-muted);
}

.hm-workflow {
	margin: 0;
	padding: 10px 20px;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	list-style: none;
	border-bottom: 1px solid var(--hm-line);
	background: #f9fcff;
}

.hm-workflow li {
	font-size: 12px;
	font-weight: 700;
	color: #6c7c90;
	padding: 8px 10px;
	border: 1px solid #dce6f1;
	border-radius: 999px;
	text-align: center;
}

.hm-workflow li.is-active {
	color: #fff;
	background: linear-gradient(120deg, var(--hm-brand), var(--hm-brand-2));
	border-color: transparent;
}

.hm-workflow li.is-done {
	color: #0e5e37;
	background: #d8f1e3;
	border-color: #b9e2ca;
}

.hm-next-step {
	padding: 10px 20px;
	font-size: 13px;
	font-weight: 700;
	color: #174b82;
	background: #eef6ff;
	border-bottom: 1px solid var(--hm-line);
}

.hm-version {
	font-size: 12px;
	color: var(--hm-muted);
	font-weight: 600;
}

.hm-upload-zone {
	margin: 16px 20px 0;
	padding: 18px;
	border: 2px dashed #9fc4e4;
	border-radius: 12px;
	background: rgba(15, 106, 191, 0.04);
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
	animation: hmRise 0.45s ease both;
}

.hm-upload-zone:hover,
.hm-dragover {
	border-color: var(--hm-brand);
	background: rgba(15, 106, 191, 0.1);
}

.hm-upload-label {
	font-size: 14px;
	color: #28415f;
	font-weight: 600;
}

.hm-section-head {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 20px 8px;
	background: #ffffff;
}

.hm-section-head strong {
	font-size: 14px;
	letter-spacing: 0.2px;
}

.hm-section-head span {
	font-size: 12px;
	color: #5a7089;
}

.hm-input {
	display: block;
	width: 100%;
	min-height: 280px;
	border: 1px solid #ccdae8;
	border-radius: 12px;
	margin: 0 20px 12px;
	width: calc(100% - 40px) !important;
	max-width: none !important;
	box-sizing: border-box;
	padding: 18px 22px;
	font-size: 16px;
	line-height: 1.7;
	resize: vertical;
	outline: none;
	background: #edf2f8;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: inset 4px 4px 9px rgba(152, 170, 191, 0.2), inset -4px -4px 9px rgba(255, 255, 255, 0.75);
}

.hm-issue-badge {
	display: inline-block;
	margin: 0 0 8px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	color: #7b1220;
	background: #fde8ec;
	border: 1px solid #f3c3cc;
	border-radius: 999px;
}

.hm-input:focus {
	border-color: #73aede;
	box-shadow: 0 0 0 4px rgba(21, 123, 194, 0.12);
}

.hm-tuning {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 12px 20px;
	border-top: 1px solid var(--hm-line);
	background: #f8fbff;
}

.hm-tune-field label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #395371;
	margin-bottom: 6px;
}

.hm-profile,
.hm-aggr,
.hm-visual,
.hm-type,
.hm-confidence,
.hm-preset {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #c7d9ea;
	border-radius: 8px;
	background: #fff;
}

.hm-onboard {
	margin: 10px 20px 0;
	padding: 10px 12px;
	background: #eaf1f9;
	border: 1px solid #d1deea;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.hm-onboard strong {
	font-size: 12px;
}

.hm-onboard span {
	font-size: 12px;
	color: #446280;
}

.hm-strong-default {
	font-size: 13px;
	font-weight: 700;
	color: #0f5a33;
	background: #e7f6ed;
	border: 1px solid #c8e9d5;
	padding: 8px 10px;
	border-radius: 8px;
}

.hm-tune-checks {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.hm-tune-checks label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #2f4864;
}

.hm-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px;
	border-top: 1px solid var(--hm-line);
	background: #e7edf5;
	flex-wrap: wrap;
	animation: hmRise 0.45s ease both;
}

.hm-btn {
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 14px;
	padding: 9px 14px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	box-shadow: 6px 6px 12px rgba(148, 167, 189, 0.22), -4px -4px 10px rgba(255, 255, 255, 0.72);
}

.hm-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(18, 62, 108, 0.18);
}

.hm-btn:disabled {
	opacity: 0.62;
	cursor: not-allowed;
}

.hm-btn-analyse {
	background: linear-gradient(130deg, var(--hm-brand), var(--hm-brand-2));
	color: #fff;
}

.hm-btn-fix {
	background: linear-gradient(130deg, #14945d, #0f7448);
	color: #fff;
}

.hm-btn-clear,
.hm-output-actions .hm-btn {
	background: #ecf2f9;
	color: #25425f;
	border-color: #bfd3e7;
}

.hm-hidden {
	display: none !important;
}

.hm-export-format {
	min-width: 160px;
	padding: 9px 10px;
	border: 1px solid #c7d9ea;
	border-radius: 10px;
	background: #edf2f8;
	color: #264768;
}

.hm-word-count {
	margin-left: auto;
	font-size: 13px;
	color: var(--hm-muted);
	font-weight: 600;
}

.hm-score-panel,
.hm-results-panel,
.hm-output-panel,
.hm-diff-panel,
.hm-report-panel {
	border-top: 1px solid var(--hm-line);
}

.hm-score-panel,
.hm-results-panel,
.hm-output-content,
.hm-report-panel {
	padding: 16px 20px;
}

.hm-score-display {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 10px 14px;
	border-left: 6px solid var(--hm-brand);
	background: #fff;
	border-radius: 10px;
}

.hm-score-num {
	font-size: 34px;
	line-height: 1;
	font-weight: 800;
}

.hm-score-label {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.hm-results-panel h4 {
	margin: 10px 0 8px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #2b4f72;
}

.hm-flag-list,
.hm-fix-list {
	margin: 0;
	padding-left: 20px;
}

.hm-flag-item {
	background: #fff;
	padding: 8px 10px;
	margin-bottom: 8px;
	border-radius: 8px;
	border: 1px solid var(--hm-line);
	list-style: none;
}

.hm-error {
	color: #7b1220;
	background: #f9d8dd;
	padding: 10px;
	border-radius: 8px;
}

.hm-output-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	background: #f6faff;
	border-bottom: 1px solid var(--hm-line);
}

.hm-diff-title-wrap {
	display: grid;
	gap: 2px;
}

.hm-diff-meta {
	font-size: 11px;
	font-weight: 600;
	color: #5c6b7f;
}

.hm-export-warning {
	margin: 10px 20px 0;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff3cd;
	border: 1px solid #f0d98a;
	color: #6d4600;
	font-size: 12px;
	font-weight: 600;
}

.hm-output-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.hm-output-content {
	max-height: 460px;
	overflow: auto;
	line-height: 1.65;
	border: 1px solid #d7e4ef;
	border-radius: 10px;
	background: #edf2f8;
	box-shadow: inset 4px 4px 9px rgba(152, 170, 191, 0.2), inset -4px -4px 9px rgba(255, 255, 255, 0.75);
}

.hm-advanced {
	margin: 10px 20px 14px;
	border: 1px solid #cfdbe8;
	border-radius: 12px;
	background: #eaf1f8;
	padding: 8px 10px 12px;
}

.hm-advanced summary {
	cursor: pointer;
	font-weight: 700;
	color: #27486b;
	padding: 4px 2px;
}

.hm-advanced-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 8px;
}

.hm-output-content:focus {
	outline: 0;
	border-color: #73aede;
	box-shadow: 0 0 0 4px rgba(21, 123, 194, 0.12);
}

.hm-edit-note {
	margin: 10px 20px 0;
	font-size: 12px;
	font-weight: 600;
	color: #355474;
	background: #edf6ff;
	border: 1px solid #c7def4;
	border-radius: 8px;
	padding: 8px 10px;
}

.hm-edit-toolbar {
	margin: 10px 20px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hm-btn-edit {
	background: #ffffff;
	color: #1f4568;
	border: 1px solid #c6d9eb;
	padding: 7px 10px;
	font-size: 12px;
	border-radius: 8px;
}

.hm-track-panel {
	margin: 10px 20px 14px;
	padding: 10px;
	border: 1px solid #d9e5ef;
	border-radius: 10px;
	background: #fcfeff;
}

.hm-track-head {
	font-size: 12px;
	font-weight: 700;
	color: #2c4f72;
	margin-bottom: 8px;
}

.hm-track-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	font-size: 12px;
	line-height: 1.45;
}

.hm-quality-panel {
	padding: 14px 20px 18px;
	border-top: 1px solid var(--hm-line);
	background: #f7fbff;
}

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

.hm-quality-status {
	font-size: 12px;
	font-weight: 700;
	padding: 4px 9px;
	border-radius: 999px;
}

.hm-quality-head.is-pass .hm-quality-status {
	background: #d8f1e3;
	color: #0f5a33;
}

.hm-quality-head.is-warn .hm-quality-status {
	background: #fceecf;
	color: #6d4600;
}

.hm-quality-head.is-fail .hm-quality-status {
	background: #f9d8dd;
	color: #7b1220;
}

.hm-quality-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.hm-quality-item {
	border: 1px solid var(--hm-line);
	border-radius: 10px;
	padding: 10px 11px;
	background: #fff;
	display: grid;
	gap: 2px;
}

.hm-quality-item .hm-quality-key {
	font-size: 12px;
	color: #4f647c;
}

.hm-quality-item strong {
	font-size: 14px;
}

.hm-quality-item.is-pass {
	background: #f2fbf6;
	border-color: #c6e8d5;
}

.hm-quality-item.is-warn {
	background: #fff8ea;
	border-color: #f2dfb0;
}

.hm-quality-item.is-fail {
	background: #fff1f3;
	border-color: #f1c4cb;
}

.hm-quality-note {
	margin-top: 10px;
	font-size: 12px;
	font-weight: 600;
	color: #31506f;
}

.hm-diff-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border: 1px solid var(--hm-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.hm-diff-panel {
	padding: 0 20px 16px;
}

.hm-diff-col {
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 700;
	background: #f3f8fe;
	border-bottom: 1px solid var(--hm-line);
}

.hm-diff-head:nth-child(1),
.hm-diff-cell:nth-child(2n+1) {
	border-right: 1px solid var(--hm-line);
}

.hm-diff-cell {
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.5;
	border-bottom: 1px solid #eef2f7;
	white-space: pre-wrap;
}

.hm-diff-cell.is-changed {
	background: #fff7e6;
}

.hm-diff-cell.is-locked {
	outline: 2px solid #86b5e6;
	outline-offset: -2px;
	background: #edf6ff;
}

.hm-diff-cell.is-undecided {
	background: #fff6df;
}

.hm-diff-actions {
	margin-top: 8px;
	display: flex;
	gap: 6px;
}

.hm-diff-btn {
	font-size: 11px;
	padding: 4px 8px;
	border: 1px solid #c7d6e6;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
}

.hm-diff-btn.is-active {
	background: #e7f2ff;
	border-color: #86b5e6;
	color: #174b82;
}

.hm-diff-add {
	background: #dff7e8;
	color: #0f5a33;
	border-radius: 3px;
	padding: 0 2px;
}

.hm-diff-del {
	background: #fde1e6;
	color: #7b1220;
	border-radius: 3px;
	padding: 0 2px;
	text-decoration: line-through;
}

.hm-report-table {
	width: 100%;
	border-collapse: collapse;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--hm-line);
}

.hm-report-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--hm-line);
	background: #fff;
}

.hm-report-table tr:last-child td {
	border-bottom: 0;
}

.hm-privacy-note {
	border-top: 1px solid var(--hm-line);
	background: #f7fbff;
	padding: 11px 20px;
	font-size: 12px;
	color: #5a7089;
}

.hm-score-panel,
.hm-results-panel,
.hm-output-panel,
.hm-diff-panel,
.hm-report-panel {
	animation: hmFadeUp 0.35s ease both;
}

@keyframes hmFadeUp {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes hmRise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.humanizer-dashboard {
	max-width: 1100px;
}

.hm-dash-header p {
	color: #5f6e7f;
}

.hm-kpi-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.hm-kpi-card {
	flex: 1;
	min-width: 160px;
	background: #fff;
	border: 1px solid var(--hm-line);
	border-radius: 10px;
	padding: 14px;
	text-align: center;
}

.hm-kpi-value {
	display: block;
	font-size: 22px;
	font-weight: 800;
}

.hm-kpi-label {
	display: block;
	font-size: 12px;
	color: #5f6e7f;
}

.hm-card {
	background: #fff;
	border: 1px solid var(--hm-line);
	border-radius: 10px;
	padding: 16px;
}

.hm-dash-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 14px;
	margin-bottom: 16px;
}

.hm-card--wide {
	grid-column: 1 / -1;
}

.hm-score-low { background: #d8f1e3; color: #0f5a33; }
.hm-score-med { background: #fceecf; color: #6d4600; }
.hm-score-high { background: #f9d8dd; color: #7b1220; }

.hm-pattern-freq {
	list-style: none;
	padding: 0;
	margin: 0;
}

.hm-pattern-freq li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.hm-pf-label {
	width: 140px;
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hm-pf-bar-wrap {
	flex: 1;
	height: 10px;
	background: #e7eef6;
	border-radius: 999px;
	overflow: hidden;
}

.hm-pf-bar {
	height: 100%;
	background: linear-gradient(120deg, var(--hm-brand), var(--hm-brand-2));
}

.hm-privacy-card {
	background: #edf6ff;
	border: 1px solid #b9d6f3;
	border-radius: 10px;
	padding: 12px 14px;
}

.humanizer-settings .humanizer-desc {
	font-size: 12px;
	color: #344a62;
}

.humanizer-settings .humanizer-desc em {
	color: #1d4f83;
}

#humanizer-test-area {
	max-width: 900px;
	border: 1px solid var(--hm-line);
	border-radius: 10px;
	background: #fff;
	padding: 16px;
}

.humanizer-preview {
	background: #f7fbff;
	border: 1px solid var(--hm-line);
	border-radius: 8px;
	padding: 12px;
	max-height: 300px;
	overflow: auto;
}

.hm-pattern-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 12px;
}

.hm-pattern-card {
	background: #fff;
	border: 1px solid var(--hm-line);
	border-radius: 10px;
	padding: 12px;
}

.hm-mode-fix .hm-pc-header {
	border-left: 4px solid #14945d;
	padding-left: 8px;
}

.hm-mode-flag .hm-pc-header {
	border-left: 4px solid #c17a00;
	padding-left: 8px;
}

.hm-pc-header {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.hm-pc-suggestion {
	font-size: 12px;
	color: #1d4f83;
}

@media (max-width: 780px) {
	.hm-workflow {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hm-dash-grid {
		grid-template-columns: 1fr;
	}

	.hm-tuning {
		grid-template-columns: 1fr;
	}

	.hm-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.hm-output-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.hm-diff-grid {
		grid-template-columns: 1fr;
	}

	.hm-quality-grid {
		grid-template-columns: 1fr;
	}

	.hm-diff-head:nth-child(1),
	.hm-diff-cell:nth-child(2n+1) {
		border-right: 0;
	}

	.hm-word-count {
		margin-left: 0;
	}

	.hm-controls .hm-btn,
	.hm-output-actions .hm-btn {
		width: 100%;
		min-height: 44px;
	}

	.hm-controls {
		display: grid;
		grid-template-columns: 1fr;
	}

	.hm-output-actions {
		width: 100%;
	}

	.hm-next-step {
		font-size: 12px;
	}

	.hm-input {
		margin: 0 12px 10px;
		width: calc(100% - 24px);
		min-height: 220px;
		font-size: 15px;
	}

	.hm-diff-panel {
		padding: 0 12px 14px;
	}

	.hm-section-head {
		padding: 12px 12px 8px;
	}

	.hm-edit-note {
		margin: 10px 12px 0;
	}

	.hm-edit-toolbar {
		margin: 10px 12px 0;
	}

	.hm-track-panel {
		margin: 10px 12px 14px;
	}

	.hm-track-grid {
		grid-template-columns: 1fr;
	}

	.hm-onboard {
		margin: 10px 12px 0;
	}

	.hm-advanced {
		margin: 10px 12px 14px;
	}

	.hm-advanced-grid {
		grid-template-columns: 1fr;
	}
}

