.tlg-tool {
	--tlg-accent: #0f9f8f;
	--tlg-ink: #171717;
	--tlg-muted: #60646c;
	--tlg-border: #dfe5e2;
	--tlg-soft: #f7faf8;
	--tlg-warm: #fff6df;
	--tlg-rose: #fff0f3;
	color: var(--tlg-ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.5;
	max-width: 1120px;
	margin: 0 auto;
}

.tlg-tool *,
.tlg-tool *::before,
.tlg-tool *::after {
	box-sizing: border-box;
}

.tlg-tool .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.tlg-panel {
	background: linear-gradient(180deg, #ffffff 0%, var(--tlg-soft) 100%);
	border: 1px solid var(--tlg-border);
	border-radius: 8px;
	box-shadow: 0 20px 55px rgba(21, 39, 36, 0.08);
	padding: clamp(18px, 3vw, 34px);
}

.tlg-header {
	display: grid;
	gap: 8px;
	margin-bottom: 22px;
}

.tlg-kicker {
	color: var(--tlg-accent);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0;
	margin: 0;
	text-transform: uppercase;
}

.tlg-header h2 {
	color: var(--tlg-ink);
	font-size: clamp(1.7rem, 2.4vw, 2.45rem);
	line-height: 1.12;
	margin: 0;
}

.tlg-header p:last-child {
	color: var(--tlg-muted);
	font-size: 1rem;
	max-width: 760px;
	margin: 0;
}

.tlg-compose {
	display: grid;
	gap: 10px;
}

.tlg-label {
	font-weight: 800;
}

.tlg-compose textarea,
.tlg-search input {
	background: #ffffff;
	border: 1px solid var(--tlg-border);
	border-radius: 8px;
	color: var(--tlg-ink);
	font: inherit;
	outline: none;
	width: 100%;
}

.tlg-compose textarea {
	min-height: 126px;
	padding: 16px;
	resize: vertical;
}

.tlg-compose textarea:focus,
.tlg-search input:focus {
	border-color: var(--tlg-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--tlg-accent) 18%, transparent);
}

.tlg-quick-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tlg-quick-list button,
.tlg-segments button,
.tlg-copy,
.tlg-favorite {
	align-items: center;
	appearance: none;
	border: 1px solid var(--tlg-border);
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 800;
	justify-content: center;
	min-height: 40px;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tlg-quick-list button {
	background: var(--tlg-warm);
	color: #473808;
	padding: 8px 12px;
}

.tlg-toolbar {
	align-items: center;
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(210px, 1fr) auto auto;
	margin: 22px 0 16px;
}

.tlg-search input {
	min-height: 44px;
	padding: 10px 12px;
}

.tlg-segments {
	background: #ffffff;
	border: 1px solid var(--tlg-border);
	border-radius: 8px;
	display: inline-flex;
	padding: 3px;
}

.tlg-segments button {
	background: transparent;
	border-color: transparent;
	color: var(--tlg-muted);
	min-height: 36px;
	padding: 7px 12px;
}

.tlg-segments button.is-active {
	background: var(--tlg-accent);
	color: #ffffff;
}

.tlg-count {
	align-items: center;
	background: var(--tlg-rose);
	border: 1px solid #ffd7df;
	border-radius: 999px;
	color: #80263a;
	display: inline-flex;
	font-size: 0.88rem;
	font-weight: 800;
	height: 34px;
	justify-content: center;
	min-width: 38px;
	padding: 0 10px;
}

.tlg-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tlg-result {
	background: #ffffff;
	border: 1px solid var(--tlg-border);
	border-radius: 8px;
	display: grid;
	gap: 12px;
	min-width: 0;
	padding: 16px;
}

.tlg-result-top {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.tlg-result h3 {
	font-size: 0.98rem;
	line-height: 1.25;
	margin: 0;
	overflow-wrap: anywhere;
}

.tlg-favorite {
	background: #ffffff;
	color: #8a6a00;
	flex: 0 0 38px;
	height: 38px;
	padding: 0;
	width: 38px;
}

.tlg-favorite.is-active {
	background: #fff2b8;
	border-color: #f2ce45;
}

.tlg-preview {
	background: #f9fbfa;
	border: 1px dashed #cfd8d4;
	border-radius: 8px;
	font-size: clamp(1rem, 1.8vw, 1.32rem);
	margin: 0;
	min-height: 58px;
	overflow-wrap: anywhere;
	padding: 14px;
	white-space: pre-wrap;
}

.tlg-copy {
	background: var(--tlg-accent);
	border-color: var(--tlg-accent);
	color: #ffffff;
	min-height: 42px;
	padding: 9px 14px;
	width: 100%;
}

.tlg-copy.is-copied {
	background: #1d7b36;
	border-color: #1d7b36;
}

.tlg-quick-list button:hover,
.tlg-copy:hover,
.tlg-favorite:hover,
.tlg-segments button:hover {
	transform: translateY(-1px);
}

.tlg-empty {
	background: #ffffff;
	border: 1px dashed var(--tlg-border);
	border-radius: 8px;
	color: var(--tlg-muted);
	grid-column: 1 / -1;
	margin: 0;
	padding: 18px;
	text-align: center;
}

.tlg-content {
	margin-top: 26px;
}

.tlg-content h2 {
	font-size: clamp(1.35rem, 2vw, 1.9rem);
	line-height: 1.2;
	margin: 0 0 12px;
}

.tlg-content p {
	color: var(--tlg-muted);
	margin: 0 0 14px;
}

.tlg-faq {
	display: grid;
	gap: 10px;
	margin-top: 18px;
}

.tlg-faq details {
	background: #ffffff;
	border: 1px solid var(--tlg-border);
	border-radius: 8px;
	padding: 14px 16px;
}

.tlg-faq summary {
	color: var(--tlg-ink);
	cursor: pointer;
	font-weight: 800;
}

.tlg-faq details p {
	margin: 10px 0 0;
}

@media (max-width: 760px) {
	.tlg-toolbar {
		grid-template-columns: 1fr;
	}

	.tlg-segments {
		width: 100%;
	}

	.tlg-segments button {
		flex: 1;
	}

	.tlg-count {
		justify-self: start;
	}

	.tlg-grid {
		grid-template-columns: 1fr;
	}
}
