@import url("https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&display=swap");
@font-face {
	font-family: "PolySans";
	src: local("PolySans"), url("polysans.otf") format("opentype");
	font-display: swap;
}
:root {
	--ink: #ccd3cd;
	--muted: #98a199;
	--line: #4a514a;
	--paper: #131413;
	--panel: #1b1e1b;
	--accent: #ccd3cd;
	--accent-dark: #131413;
	--danger: #f2aaa4;
	--mono: "Fira Mono", ui-monospace, monospace;
	--sans: "PolySans", "Arial Narrow", Arial, sans-serif;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 13px;
}
.topbar {
	height: 64px;
	background: var(--paper);
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 max(24px, calc((100vw - 1320px) / 2));
	letter-spacing: .04em;
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
}
.brand-mark {
	background: var(--ink);
	color: var(--paper);
	font-weight: bold;
	padding: 8px 7px;
}
.brand strong,
.brand span {
	display: block;
}
.brand strong {
	font-size: 14px;
}
.brand div span {
	font-size: 9px;
	color: #a8aeaf;
	margin-top: 4px;
}
.header-meta {
	font-size: 10px;
	color: #a8aeaf;
}
.status-dot,
.live-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	background: var(--accent);
	border-radius: 50%;
	margin-right: 7px;
}
.version {
	border-left: 1px solid #45494a;
	margin-left: 14px;
	padding-left: 14px;
}
.app-shell {
	max-width: 1320px;
	margin: 0 auto;
	padding: 48px 28px 36px;
}
.intro {
	display: flex;
	align-items: end;
	justify-content: space-between;
	margin-bottom: 34px;
}
.eyebrow {
	font-size: 10px;
	color: var(--muted);
	letter-spacing: .13em;
	margin: 0 0 11px;
	font-weight: bold;
}
.intro h1 {
	font-size: 34px;
	letter-spacing: -.08em;
	margin: 0 0 10px;
}
.lede {
	color: var(--muted);
	margin: 0;
}
.key-chip,
.key-box {
	font-size: 11px;
	background: var(--ink);
	color: var(--accent);
	padding: 10px 12px;
}
.mode-tabs {
	display: flex;
	border-bottom: 1px solid var(--line);
	gap: 4px;
}
.mode-tabs,
.field-label,
.eyebrow,
.key-chip,
.key-box,
code,
button,
input,
select,
textarea,
.char-count,
.search-size,
.mapping-meta,
.header-meta,
.shortcut,
.result-key,
.copy-status,
footer {
	font-family: var(--mono);
}
.tab {
	border: 0;
	background: none;
	padding: 14px 18px 13px;
	font: inherit;
	font-weight: bold;
	color: var(--muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
}
.tab span {
	font-size: 10px;
	margin-left: 10px;
	color: #adb1b0;
}
.tab.active {
	color: var(--ink);
	border-bottom-color: var(--ink);
}
.workspace {
	display: grid;
	grid-template-columns: 285px 1fr;
	gap: 22px;
	padding-top: 22px;
}
.panel {
	background: var(--panel);
	border: 1px solid var(--line);
}
.settings-panel {
	padding: 22px;
	align-self: start;
}
.panel-heading,
.io-head,
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: start;
}
.panel-heading {
	margin-bottom: 24px;
}
.panel h2 {
	font-size: 16px;
	margin: 0;
	letter-spacing: -.04em;
}
.gear {
	font-size: 20px;
	color: #9ca2a1;
}
.field-label {
	font-size: 10px;
	display: block;
	color: var(--muted);
	font-weight: bold;
	letter-spacing: .08em;
	margin: 0 0 7px;
}
.settings-panel select,
.settings-panel input {
	width: 100%;
	height: 38px;
	border: 1px solid var(--line);
	background: var(--paper);
	padding: 0 10px;
	font: inherit;
	color: var(--ink);
	outline: none;
}
.settings-panel select:focus,
.settings-panel input:focus,
textarea:focus {
	border-color: var(--ink);
	box-shadow: 0 0 0 2px var(--ink);
}
.settings-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 18px;
}
.segmented {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 1px solid var(--line);
	margin-bottom: 20px;
}
.direction {
	border: 0;
	background: var(--panel);
	padding: 10px 4px;
	font: 10px var(--mono);
	cursor: pointer;
	color: var(--muted);
}
.direction + button {
	border-left: 1px solid var(--line);
}
.direction.active {
	background: var(--ink);
	color: var(--paper);
}
.field-row {
	display: flex;
	justify-content: space-between;
}
.icon-button {
	border: 0;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
}
.custom-wrap {
	margin-top: 14px;
}
.field-note {
	font-size: 10px;
	color: var(--muted);
	margin-top: 6px;
}
.error-text {
	color: var(--danger);
	font-size: 10px;
	line-height: 1.4;
}
.key-box {
	margin: 4px -1px 0;
	padding: 13px;
}
.key-box .field-label {
	color: #91999b;
	margin-bottom: 8px;
}
.key-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}
.key-line code {
	font-size: 11px;
}
.copy-button,
.text-button {
	border: 0;
	background: none;
	font: 10px var(--mono);
	font-weight: bold;
	cursor: pointer;
	letter-spacing: .05em;
}
.copy-button {
	color: var(--muted);
}
.copy-button.primary {
	background: var(--ink);
	color: var(--accent);
	padding: 11px 15px;
}
.settings-hint {
	color: var(--muted);
	font-size: 10px;
	line-height: 1.5;
	margin-top: 14px;
}
.hidden {
	display: none !important;
}
.tool-panel {
	min-width: 0;
}
.io-panel {
	padding: 21px 22px;
}
.io-head {
	margin-bottom: 17px;
}
.io-head h2 {
	font-size: 15px;
	margin: 0;
}
.char-count,
.search-size,
.mapping-meta {
	font-size: 10px;
	color: var(--muted);
}
textarea {
	display: block;
	width: 100%;
	min-height: 154px;
	resize: vertical;
	border: 1px solid var(--line);
	padding: 15px;
	font: 13px / 1.7 var(--mono);
	outline: none;
	color: var(--ink);
	background: var(--paper);
}
.io-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12px;
	min-height: 25px;
}
.text-button {
	padding: 0;
	color: var(--muted);
}
.shortcut {
	font-size: 10px;
	color: var(--muted);
	display: none;
}
.swap-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 26px;
	height: 45px;
}
.swap-row span {
	height: 1px;
	flex: 1;
	background: var(--line);
}
.swap-button {
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 8px 13px;
	font: 10px var(--mono);
	font-weight: bold;
	color: var(--muted);
	cursor: pointer;
}
.output-box {
	min-height: 154px;
	border: 1px solid var(--line);
	padding: 15px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	line-height: 1.7;
}
.placeholder {
	color: #aeb4b3;
}
.brute-panel {
	padding: 22px;
	margin-top: 22px;
}
.muted {
	color: var(--muted);
	line-height: 1.6;
}
.brute-button {
	background: var(--accent);
	border: 1px solid var(--ink);
	color: var(--ink);
	font: bold 11px var(--mono);
	padding: 12px 15px;
	margin: 8px 0 19px;
	cursor: pointer;
}
.brute-button span {
	font-size: 16px;
	margin-left: 20px;
}
.results-head {
	grid-template-columns: 110px 150px 1fr;
	gap: 14px;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	padding: 10px 8px;
	font-size: 9px;
	color: var(--muted);
}
.results-head:not(.hidden) {
	display: grid;
}
.result-row {
	display: grid;
	grid-template-columns: 110px 150px 1fr;
	gap: 14px;
	padding: 13px 8px;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
	align-items: start;
}
.result-row:hover {
	background: #202c40;
}
.rank-score {
	font-weight: bold;
}
.score {
	color: var(--muted);
	font-weight: normal;
	margin-left: 7px;
}
.result-key {
	color: var(--muted);
	font-size: 11px;
}
.result-text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mapping-section {
	margin-top: 22px;
	padding: 22px;
}
.mapping-section .section-head {
	margin-bottom: 20px;
}
.mapping-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 7px;
}
.mapping-item {
	border: 1px solid var(--line);
	padding: 10px 9px;
	display: flex;
	justify-content: space-between;
	gap: 4px;
}
.mapping-item span {
	color: var(--muted);
}
.mapping-item code {
	font-weight: bold;
}
.docs {
	padding: 47px 0 25px;
}
.docs > .section-head {
	margin-bottom: 20px;
}
.doc-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
}
.doc-grid article {
	background: var(--paper);
	padding: 20px;
	min-height: 175px;
}
.doc-number {
	font-size: 11px;
	color: var(--muted);
}
.doc-grid h3 {
	font-size: 14px;
	margin: 17px 0 10px;
}
.doc-grid p {
	color: var(--muted);
	font: 12px / 1.6 var(--mono);
	margin: 0 0 14px;
}
.doc-grid code {
	font-size: 11px;
	background: #1f2937;
	padding: 6px 7px;
	display: inline-block;
}
footer {
	border-top: 1px solid var(--line);
	padding-top: 16px;
	display: flex;
	justify-content: space-between;
	color: var(--muted);
	font-size: 9px;
	letter-spacing: .08em;
}
footer strong {
	color: var(--danger);
}
.copy-status {
	position: fixed;
	right: 24px;
	bottom: 24px;
	background: var(--ink);
	color: var(--paper);
	padding: 11px 14px;
	font-size: 10px;
	opacity: 0;
	transform: translateY(8px);
	transition: .2s;
	pointer-events: none;
}
.copy-status.show {
	opacity: 1;
	transform: none;
}
.mapping-section,
.docs {
	display: none !important;
}
.swap-row.hidden,
.output-panel.hidden {
	display: none;
}
@media (max-width: 800px) {
	.app-shell {
		padding: 32px 16px;
	}
	.intro {
		display: block;
	}
	.intro h1 {
		font-size: 28px;
	}
	.key-chip {
		display: inline-block;
		margin-top: 20px;
	}
	.workspace {
		grid-template-columns: 1fr;
	}
	.settings-panel {
		order: 2;
	}
	.tool-panel {
		order: 1;
	}
	.mapping-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.doc-grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 500px) {
	.topbar {
		padding: 0 16px;
	}
	.header-meta {
		display: none;
	}
	.mapping-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.doc-grid {
		grid-template-columns: 1fr;
	}
	.results-head {
		grid-template-columns: 90px 125px 1fr;
	}
	.result-row {
		grid-template-columns: 90px 125px 1fr;
		font-size: 11px;
	}
	.intro h1 {
		letter-spacing: -.1em;
	}
	footer {
		display: block;
		line-height: 2.1;
	}
	footer span,
	footer strong {
		display: block;
	}
	.app-shell {
		padding: 22px 12px 24px;
	}
	.topbar {
		height: 56px;
	}
	.intro {
		margin-bottom: 22px;
	}
	.intro h1 {
		font-size: 25px;
	}
	.lede {
		font-size: 12px;
		line-height: 1.5;
	}
	.mode-tabs {
		overflow-x: auto;
	}
	.tab {
		flex: 1 0 auto;
		padding: 12px 10px;
	}
	.workspace {
		gap: 12px;
		padding-top: 12px;
	}
	.settings-panel,
	.io-panel,
	.brute-panel {
		padding: 16px;
	}
	.settings-panel {
		order: 2;
	}
	.tool-panel {
		order: 1;
	}
	textarea,
	.output-box {
		min-height: 130px;
	}
	.io-head {
		margin-bottom: 12px;
	}
	.io-head h2 {
		font-size: 14px;
	}
	.settings-grid {
		gap: 8px;
	}
	.key-chip {
		margin-top: 14px;
		max-width: 100%;
		overflow-wrap: anywhere;
	}
	.brute-button {
		width: 100%;
		min-height: 44px;
	}
}

/* Duotone utility treatment and clearer task guidance. */
.key-chip,
.key-box {
	background: var(--ink);
	color: var(--paper);
}
.copy-button.primary,
.direction.active,
.tab.active {
	color: var(--paper);
}
.required-label {
	color: var(--ink);
	font-size: 9px;
}
.brute-guide {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 14px;
	align-items: start;
	border: 1px solid var(--line);
	border-left: 3px solid var(--ink);
	padding: 13px 14px;
	margin: 16px 0 13px;
	font-size: 11px;
	line-height: 1.55;
}
.brute-guide strong {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.brute-guide span {
	color: var(--muted);
}
.brute-button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
@media (max-width: 500px) {
	.brute-guide {
		grid-template-columns: 1fr;
		gap: 6px;
	}
}

/* Neo-industrial finish: strict contrast, hard edges, and instrument-panel rules. */
body {
	background-color: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	letter-spacing: .01em;
}
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: 0.12;
	background-image: repeating-linear-gradient(
			0deg,
			transparent 0,
			transparent 31px,
			var(--line) 32px
		),
		repeating-linear-gradient(
			90deg,
			transparent 0,
			transparent 79px,
			var(--line) 80px
		);
	mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.topbar {
	background: var(--paper);
	color: var(--ink);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 3px 0 var(--paper), 0 4px 0 var(--line);
}
.brand-mark {
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
}
.brand div span,
.header-meta {
	color: var(--muted);
}
.status-dot {
	background: var(--ink);
}
.app-shell {
	position: relative;
	z-index: 1;
}
.panel {
	background: var(--panel);
	border-color: var(--line);
	border-radius: 0;
	box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
}
.key-chip,
.key-box {
	background: var(--ink);
	color: var(--paper);
	border-radius: 0;
}
.key-box .field-label {
	color: #4f5a50;
}
.key-box .copy-button {
	color: var(--paper);
}
.key-box .copy-button:hover {
	color: #4f5a50;
}

/* Final spacing pass */
.app-shell {
	padding-top: 56px;
}
.intro {
	margin-bottom: 42px;
}
.intro h1 {
	font-family: var(--sans);
	font-size: clamp(42px, 6vw, 72px);
	font-weight: 600;
	letter-spacing: .005em;
	line-height: 1.06;
	margin: 0 0 22px;
}
.lede {
	line-height: 1.6;
}
.mode-tabs {
	margin-bottom: 26px;
}
.workspace {
	gap: 28px;
	padding-top: 0;
}
.settings-panel {
	padding: 28px;
}
.panel-heading {
	margin-bottom: 28px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--line);
}
.panel h2 {
	line-height: 1.3;
}
.field-label {
	line-height: 1.35;
	margin-bottom: 9px;
}
.settings-panel select,
.settings-panel input {
	height: 44px;
}
.custom-wrap {
	margin-top: 18px;
}
.settings-grid {
	gap: 16px;
	margin-top: 24px;
}
.settings-grid + .field-label {
	margin-top: 24px;
}
.segmented {
	margin-top: 2px;
	margin-bottom: 26px;
}
.direction {
	min-height: 42px;
}
.key-box {
	margin-top: 8px;
	padding: 16px;
}
.settings-hint {
	min-height: 18px;
	margin-top: 16px;
	line-height: 1.6;
}
.io-panel,
.brute-panel {
	padding: 28px;
}
.io-head {
	margin-bottom: 20px;
}
.io-head h2 {
	line-height: 1.35;
}
textarea,
.output-box {
	min-height: 180px;
}
.swap-row {
	height: 54px;
}
.brute-panel {
	margin-top: 28px;
}
.brute-guide {
	margin: 20px 0 16px;
	padding: 15px 16px;
}
.brute-button {
	min-height: 44px;
	margin: 10px 0 22px;
}
.results-head {
	padding-top: 12px;
	padding-bottom: 12px;
}
.result-row {
	padding-top: 16px;
	padding-bottom: 16px;
}

@media (max-width: 800px) {
	.app-shell {
		padding-top: 38px;
	}
	.intro {
		margin-bottom: 30px;
	}
	.workspace {
		gap: 18px;
	}
	.settings-panel,
	.io-panel,
	.brute-panel {
		padding: 22px;
	}
	.settings-panel {
		order: 1;
	}
	.tool-panel {
		order: 2;
	}
}
@media (max-width: 500px) {
	.app-shell {
		padding: 26px 14px 30px;
	}
	.intro {
		margin-bottom: 24px;
	}
	.intro h1 {
		font-size: 36px;
		line-height: 1.06;
		letter-spacing: .005em;
		margin-bottom: 17px;
	}
	.lede {
		font-size: 12px;
		line-height: 1.55;
	}
	.intro .key-chip {
		margin-top: 18px;
	}
	.mode-tabs {
		margin-bottom: 18px;
	}
	.workspace {
		gap: 14px;
	}
	.settings-panel,
	.io-panel,
	.brute-panel {
		padding: 18px;
	}
	.panel-heading {
		margin-bottom: 22px;
		padding-bottom: 14px;
	}
	.settings-grid {
		gap: 10px;
		margin-top: 20px;
	}
	.segmented {
		margin-bottom: 20px;
	}
	.key-box {
		padding: 14px;
	}
	.io-head {
		margin-bottom: 15px;
	}
	textarea,
	.output-box {
		min-height: 145px;
	}
	.swap-row {
		height: 46px;
	}
	.brute-panel {
		margin-top: 14px;
	}
	.brute-guide {
		margin: 15px 0 13px;
		padding: 12px;
	}
	.brute-button {
		margin-bottom: 18px;
	}
}
.mode-tabs {
	gap: 7px;
	border-bottom-color: var(--line);
	padding-bottom: 8px;
}
.tab {
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--line);
	border-bottom-width: 3px;
	min-height: 42px;
}
.tab span {
	color: var(--muted);
}
.tab:hover {
	background: var(--panel);
	color: var(--ink);
	border-color: var(--ink);
}
.tab.active {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}
.tab.active span {
	color: var(--paper);
}
.settings-panel select,
.settings-panel input,
textarea,
.output-box {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--line);
	border-radius: 0;
}
.settings-panel select option {
	background: var(--paper);
	color: var(--ink);
}
.settings-panel select:focus,
.settings-panel input:focus,
textarea:focus {
	border-color: var(--ink);
	box-shadow: 3px 3px 0 rgba(204, 211, 205, 0.2);
}
.segmented {
	border-color: var(--line);
	border-radius: 0;
}
.direction {
	background: var(--paper);
	color: var(--muted);
}
.direction:hover {
	color: var(--ink);
	background: var(--panel);
}
.direction.active {
	background: var(--ink);
	color: var(--paper);
}
.text-button,
.icon-button,
.copy-button {
	color: var(--ink);
}
.text-button:hover,
.icon-button:hover,
.copy-button:hover {
	color: var(--muted);
}
.copy-button.primary,
.brute-button {
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	border-radius: 0;
}
.copy-button.primary:hover,
.brute-button:hover:not(:disabled) {
	background: var(--paper);
	color: var(--ink);
}
.brute-button:disabled {
	background: var(--line);
	color: var(--muted);
	border-color: var(--line);
}
.swap-button {
	background: var(--panel);
	color: var(--ink);
	border-color: var(--line);
	border-radius: 0;
}
.swap-button:hover {
	background: var(--ink);
	color: var(--paper);
}
.brute-guide {
	border-color: var(--line);
	border-left-color: var(--ink);
	background: var(--paper);
}
.result-row:hover {
	background: #252a25;
}
.mapping-item,
.doc-grid {
	border-color: var(--line);
}
footer {
	color: var(--muted);
	border-color: var(--line);
}

@media (max-width: 800px) {
	.workspace {
		display: flex;
		flex-direction: column;
	}
	.settings-panel {
		order: 1;
	}
	.tool-panel {
		order: 2;
	}
}
@media (max-width: 500px) {
	.topbar {
		padding: 0 12px;
	}
	.app-shell {
		padding: 20px 12px 28px;
	}
	.intro h1 {
		font-size: 29px;
		letter-spacing: -.06em;
	}
	.intro .key-chip {
		display: block;
		width: fit-content;
		max-width: 100%;
		margin-top: 15px;
	}
	.mode-tabs {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		overflow: visible;
	}
	.tab {
		width: 100%;
		padding: 10px 5px;
		font-size: 10px;
	}
	.tab span {
		display: block;
		margin: 3px 0 0;
		font-size: 8px;
	}
	.workspace {
		gap: 14px;
	}
	.settings-panel,
	.io-panel,
	.brute-panel {
		padding: 15px;
	}
	.panel {
		box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
	}
	.panel-heading {
		margin-bottom: 18px;
	}
	.settings-grid {
		margin-top: 15px;
	}
	textarea,
	.output-box {
		min-height: 135px;
	}
	.results-head,
	.result-row {
		grid-template-columns: 76px 112px minmax(0, 1fr);
		gap: 8px;
	}
	.result-text {
		min-width: 0;
	}
	.brute-guide {
		padding: 11px;
	}
}
.key-box .copy-button {
	color: var(--paper);
}
.key-box .copy-button:hover {
	color: #4f5a50;
}
