:root {
	--nt-hg2-bg: #030609;
	--nt-hg2-panel: #050810;
	--nt-hg2-panel-soft: #061018;
	--nt-hg2-field: #020711;
	--nt-hg2-green: #39ff14;
	--nt-hg2-green-soft: rgba(57, 255, 20, 0.14);
	--nt-hg2-blue: #7fd8ff;
	--nt-hg2-yellow: #ddcd68;
	--nt-hg2-text: #d9f4ff;
	--nt-hg2-muted: #a8bac6;
	--nt-hg2-border: rgba(57, 255, 20, 0.52);
	--nt-hg2-border-soft: rgba(57, 255, 20, 0.24);
	--nt-hg2-shadow: 0 0 28px rgba(57, 255, 20, 0.14);
	--nt-hg2-entropy-gradient: linear-gradient(90deg, #ef4444, #eab308, #39ff14);
}

#nt-hg2,
#nt-hg2 * {
	box-sizing: border-box;
}

#nt-hg2 {
	position: relative;
	left: 50%;
	width: min(1180px, calc(100vw - 48px));
	max-width: calc(100vw - 48px);
	margin: 24px 0;
	padding: 22px;
	transform: translateX(-50%);
	color: var(--nt-hg2-text);
	background: linear-gradient(180deg, rgba(4, 8, 14, 0.98), rgba(1, 4, 7, 0.98));
	border: 1px solid var(--nt-hg2-border-soft);
	border-radius: 8px;
	box-shadow: var(--nt-hg2-shadow);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
}

.nt-hg2-hero {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: 4px 0 18px;
	border-bottom: 1px solid rgba(57, 255, 20, 0.18);
}

.nt-hg2-hero-copy {
	min-width: 0;
}

.nt-hg2-kicker {
	margin: 0 0 6px;
	color: var(--nt-hg2-yellow);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nt-hg2-hero h1 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--nt-hg2-green);
	font-size: clamp(24px, 3.2vw, 34px);
	line-height: 1.05;
	text-shadow: 0 0 16px rgba(57, 255, 20, 0.22);
}

.nt-hg2-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(242, 222, 109, 0.72);
	border-radius: 50%;
	color: var(--nt-hg2-yellow);
	background: rgba(242, 222, 109, 0.1);
	font-size: 18px;
	line-height: 1;
}

.nt-hg2-subtitle,
.nt-hg2-section-head p,
.nt-hg2-helper,
.nt-hg2-status {
	color: var(--nt-hg2-muted);
	font-size: 14px;
	line-height: 1.5;
}

.nt-hg2-subtitle {
	max-width: 760px;
	margin: 10px 0 0;
}

.nt-hg2-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	padding-top: 18px;
}

.nt-hg2-badges span,
.nt-hg2-trust-strip span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 8px 16px;
	color: #c8ffc0;
	background: var(--nt-hg2-green-soft);
	border: 1px solid rgba(57, 255, 20, 0.35);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 800;
}

.nt-hg2-principles,
.nt-hg2-tool-card,
.nt-hg2-trust-strip {
	margin-top: 18px;
	padding: 18px;
	background: rgba(3, 8, 14, 0.92);
	border: 1px solid var(--nt-hg2-border);
	border-radius: 8px;
	box-shadow: 0 0 18px rgba(57, 255, 20, 0.1);
}

.nt-hg2-section-head {
	margin-bottom: 16px;
}

.nt-hg2-section-head h2 {
	margin: 0;
	color: var(--nt-hg2-yellow);
	font-size: clamp(17px, 1.8vw, 21px);
	line-height: 1.1;
}

.nt-hg2-section-head p {
	margin: 8px 0 0;
}

.nt-hg2-principle-grid,
.nt-hg2-stat-grid,
.nt-hg2-education-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.nt-hg2-principle,
.nt-hg2-stat,
.nt-hg2-entropy-item,
.nt-hg2-education details,
.nt-hg2-algorithm-group {
	min-width: 0;
	padding: 14px;
	background: rgba(0, 8, 12, 0.88);
	border: 1px solid var(--nt-hg2-border-soft);
	border-radius: 8px;
}

.nt-hg2-stat,
.nt-hg2-entropy-item {
	padding: 9px 10px;
}

.nt-hg2-principle {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #d7ffd1;
	font-size: 13px;
	font-weight: 800;
}

.nt-hg2-principle span {
	color: var(--nt-hg2-green);
}

.nt-hg2-stat-grid {
	margin-top: 16px;
}

.nt-hg2-stat span,
.nt-hg2-entropy-item span {
	display: block;
	margin-bottom: 3px;
	color: var(--nt-hg2-yellow);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nt-hg2-stat strong,
.nt-hg2-entropy-item strong {
	display: block;
	color: var(--nt-hg2-blue);
	font-size: 14px;
	line-height: 1.25;
}

.nt-hg2-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
	gap: 20px;
}

.nt-hg2-input-panel,
.nt-hg2-output-panel {
	min-width: 0;
}

.nt-hg2-field-group {
	margin-bottom: 14px;
}

.nt-hg2-label {
	display: block;
	margin-bottom: 6px;
	color: var(--nt-hg2-text);
	font-size: 13px;
	font-weight: 800;
}

.nt-hg2-helper {
	margin: 8px 0 0;
	font-size: 13px;
}

.nt-hg2-input,
.nt-hg2-output,
#nt-hg2-input,
#nt-hg2-profile {
	width: 100%;
	min-width: 0;
	padding: 13px 14px;
	color: var(--nt-hg2-text);
	background: var(--nt-hg2-field);
	border: 1px solid rgba(127, 216, 255, 0.24);
	border-radius: 6px;
	font: inherit;
	font-size: 14px;
}

#nt-hg2-input {
	min-height: 150px;
	resize: vertical;
}

.nt-hg2-input:focus,
.nt-hg2-output:focus,
#nt-hg2-input:focus,
#nt-hg2-profile:focus {
	outline: 2px solid rgba(127, 216, 255, 0.36);
	outline-offset: 2px;
	border-color: rgba(127, 216, 255, 0.72);
}

.nt-hg2-output-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: stretch;
}

.nt-hg2-controls,
.nt-hg2-card-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.nt-hg2-controls {
	justify-content: flex-start;
	margin: 14px 0 8px;
}

.nt-hg2-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	color: var(--nt-hg2-text);
	background: rgba(7, 18, 28, 0.95);
	border: 1px solid rgba(57, 255, 20, 0.38);
	border-radius: 6px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.1;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.nt-hg2-btn-primary,
.nt-hg2-btn:hover,
.nt-hg2-btn:focus-visible {
	color: #061208;
	background: var(--nt-hg2-green);
	border-color: var(--nt-hg2-green);
	box-shadow: 0 0 14px rgba(57, 255, 20, 0.36);
}

.nt-hg2-btn.flash {
	color: #061208 !important;
	background: var(--nt-hg2-blue) !important;
	border-color: var(--nt-hg2-blue) !important;
}

.nt-hg2-status {
	min-height: 20px;
	margin: 0 0 8px;
	font-size: 13px;
}

.nt-hg2-entropy {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid rgba(57, 255, 20, 0.18);
}

.nt-hg2-entropy-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 12px;
}

.nt-hg2-entropy-bar {
	width: 100%;
	height: 12px;
	overflow: hidden;
	background: rgba(127, 216, 255, 0.12);
	border-radius: 999px;
}

.nt-hg2-entropy-bar-fill {
	width: 0%;
	height: 100%;
	background: var(--nt-hg2-entropy-gradient);
	border-radius: inherit;
	transition: width 0.18s ease-out;
}

.nt-hg2-target-volume {
	margin-bottom: 18px;
}

#nt-hg2-target-volume {
	width: 100%;
	accent-color: var(--nt-hg2-green);
}

.nt-hg2-table-wrap {
	overflow-x: auto;
	border: 1px solid rgba(57, 255, 20, 0.18);
	border-radius: 8px;
}

.nt-hg2-ttc-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	background: rgba(0, 6, 10, 0.72);
	font-size: 13px;
}

.nt-hg2-ttc-table th,
.nt-hg2-ttc-table td {
	padding: 13px 15px;
	text-align: left;
	border-bottom: 1px solid rgba(57, 255, 20, 0.14);
}

.nt-hg2-ttc-table th {
	color: var(--nt-hg2-yellow);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nt-hg2-ttc-table td {
	color: var(--nt-hg2-text);
}

.nt-hg2-ttc-table tr:last-child td {
	border-bottom: 0;
}

#nt-hg2-advanced-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

#nt-hg2-advanced-panel.nt-advanced-open {
	max-height: 2200px;
}

.nt-hg2-algorithm-group {
	margin-bottom: 12px;
}

.nt-hg2-group-title {
	margin: 0 0 10px;
	color: var(--nt-hg2-yellow);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.nt-hg2-algorithm-meta {
	margin: -4px 0 8px;
	color: var(--nt-hg2-muted);
	font-size: 13px;
}

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

.nt-hg2-advanced-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 12px;
	color: var(--nt-hg2-text);
	background: rgba(2, 8, 14, 0.86);
	border: 1px solid rgba(57, 255, 20, 0.16);
	border-radius: 6px;
	font-size: 13px;
}

.nt-hg2-advanced-option input[type="checkbox"] {
	accent-color: var(--nt-hg2-green);
}

.nt-hg2-education-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nt-hg2-education details {
	min-height: 122px;
}

.nt-hg2-education summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--nt-hg2-yellow);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	cursor: pointer;
}

.nt-hg2-education summary::-webkit-details-marker {
	display: none;
}

.nt-hg2-education summary::after {
	content: "▾";
	color: var(--nt-hg2-blue);
	font-size: 11px;
}

.nt-hg2-education details[open] summary::after {
	content: "▴";
}

.nt-hg2-education details p {
	margin: 12px 0 0;
	color: #c4dfeb;
	font-size: 14px;
	line-height: 1.42;
}

.nt-hg2-trust-strip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 18px;
}

.nt-hg2-trust-strip span {
	min-height: auto;
	padding: 0;
	color: var(--nt-hg2-yellow);
	background: transparent;
	border: 0;
	border-radius: 0;
}

.nt-hg2-trust-strip span + span::before {
	content: "•";
	margin-right: 16px;
	color: var(--nt-hg2-blue);
}

@media (max-width: 980px) {
	.nt-hg2-hero,
	.nt-hg2-workspace {
		grid-template-columns: 1fr;
	}

	.nt-hg2-hero {
		display: grid;
	}

	.nt-hg2-badges {
		justify-content: flex-start;
		padding-top: 0;
	}

	.nt-hg2-principle-grid,
	.nt-hg2-stat-grid,
	.nt-hg2-entropy-grid,
	.nt-hg2-education-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nt-hg2-charset-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	#nt-hg2 {
		width: min(100%, calc(100vw - 24px));
		max-width: calc(100vw - 24px);
		margin: 16px 0;
		padding: 14px;
	}

	.nt-hg2-principles,
	.nt-hg2-tool-card,
	.nt-hg2-trust-strip {
		padding: 14px;
	}

	.nt-hg2-principle-grid,
	.nt-hg2-stat-grid,
	.nt-hg2-entropy-grid,
	.nt-hg2-education-grid,
	.nt-hg2-charset-grid {
		grid-template-columns: 1fr;
	}

	.nt-hg2-output-row {
		grid-template-columns: 1fr;
	}

	.nt-hg2-card-header {
		display: grid;
	}
}

@media (prefers-reduced-motion: reduce) {
	#nt-hg2 *,
	#nt-hg2 *::before,
	#nt-hg2 *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
