.uth-page,
.uth-tool,
.uth-tool-shortcode,
.uth-rc-screen,
.uth-rc,
.uth-serp,
.uth-serp-screen {
	--uth-primary: #2563eb;
	--uth-primary-hover: #1d4ed8;
	--uth-heading: #0f172a;
	--uth-text: #334155;
	--uth-muted: #64748b;
	--uth-border: #e2e8f0;
	--uth-background: #ffffff;
	--uth-section-background: #eff6ff;
	--uth-success: #15803d;
	--uth-danger: #b91c1c;
	--uth-radius-small: 8px;
	--uth-radius-medium: 14px;
	--uth-radius-large: 22px;
	--uth-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
	color: var(--uth-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/*
 * Full-bleed hero backgrounds use `width: 100vw`, which includes the vertical
 * scrollbar width on classic-scrollbar browsers and would push the page
 * horizontally. `overflow-x: clip` removes the overflow without creating a
 * scroll container, so `position: sticky` (theme header/sidebars) keeps working
 * and the backgrounds still stretch corner to corner.
 */
html,
body {
	overflow-x: clip;
}

.uth-page,
.uth-page *,
.uth-page *::before,
.uth-page *::after,
.uth-tool,
.uth-tool *,
.uth-tool *::before,
.uth-tool *::after,
.uth-tool-shortcode,
.uth-tool-shortcode *,
.uth-tool-shortcode *::before,
.uth-tool-shortcode *::after {
	box-sizing: border-box;
}

.uth-page {
	position: relative;
	width: min(100% - 40px, 1140px);
	margin: 0 auto;
	padding: 0 0 64px;
	overflow: visible;
	isolation: isolate;
}

.uth-page::before {
	position: absolute;
	inset: 0 auto auto 50%;
	z-index: -1;
	width: 100vw;
	height: 520px;
	content: "";
	background:
		linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
		linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
		linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.2));
	background-size: 42px 42px, 42px 42px, 100% 100%;
	transform: translateX(-50%);
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.82) 56%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.82) 56%, transparent 100%);
}

.uth-tool-hero {
	position: relative;
	width: 100%;
	margin: 0 0 40px;
	padding: 34px 0 44px;
	background: transparent;
	border: 0;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	isolation: isolate;
}

.uth-tool-hero::before {
	position: absolute;
	inset: 0 auto auto 50%;
	z-index: -1;
	width: 100vw;
	height: 100%;
	content: "";
	background:
		linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
		linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
		linear-gradient(120deg, rgba(255, 255, 255, 0.65), rgba(239, 246, 255, 0.72));
	background-size: 38px 38px, 38px 38px, 100% 100%;
	transform: translateX(-50%);
	pointer-events: none;
}

.uth-tool-hero::after {
	content: none;
}

.uth-tool-header {
	max-width: 760px;
	margin: 0 auto 34px;
	text-align: center;
}

.uth-tool-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 18px;
	color: #ffffff;
	background: linear-gradient(135deg, var(--uth-primary), #0f766e);
	border: 1px solid rgba(37, 99, 235, 0.16);
	border-radius: 18px;
	box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24);
	font-weight: 800;
}

.uth-tool-title {
	margin: 0;
	color: var(--uth-heading);
	font-size: clamp(2rem, 4vw, 3.5rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: 0;
}

.uth-tool-description {
	max-width: 680px;
	margin: 16px auto 0;
	color: var(--uth-muted);
	font-size: 1.0625rem;
	line-height: 1.7;
}

.uth-tool-panel {
	width: 100%;
	margin: 0 auto;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.uth-form-row {
	margin: 0 0 18px;
}

.uth-field-label {
	display: block;
	margin: 0 0 8px;
	color: var(--uth-heading);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.uth-input,
.uth-textarea,
.uth-select {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 13px 15px;
	color: var(--uth-heading);
	background: var(--uth-background);
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	font: inherit;
	line-height: 1.5;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.uth-textarea {
	min-height: 180px;
	resize: none;
}

.uth-input:focus,
.uth-textarea:focus,
.uth-select:focus {
	border-color: var(--uth-primary);
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), inset 0 1px 2px rgba(15, 23, 42, 0.04);
	outline: none;
}

.uth-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 11px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.uth-button:focus-visible {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
	outline: none;
}

.uth-button-primary {
	color: #ffffff;
	background: linear-gradient(135deg, var(--uth-primary), #0f766e);
	border-color: var(--uth-primary);
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.uth-button-primary:hover,
.uth-button-primary:focus-visible {
	color: #ffffff;
	background: linear-gradient(135deg, var(--uth-primary-hover), #0f766e);
	border-color: var(--uth-primary-hover);
	transform: translateY(-1px);
}

.uth-button-secondary {
	color: var(--uth-heading);
	background: #ffffff;
	border-color: #cbd5e1;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.uth-button-secondary:hover,
.uth-button-secondary:focus-visible {
	color: var(--uth-primary-hover);
	border-color: rgba(37, 99, 235, 0.36);
	background: #f8fafc;
	transform: translateY(-1px);
}

.uth-button:disabled,
.uth-button-disabled {
	color: var(--uth-muted);
	background: #f1f5f9;
	border-color: var(--uth-border);
	box-shadow: none;
	cursor: not-allowed;
	opacity: 0.76;
}

.uth-button-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: center;
}

.uth-result-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
	width: 100%;
}

.uth-result-card,
.uth-content-card,
.uth-related-tool-card {
	min-width: 0;
	padding: 20px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.uth-result-card {
	position: relative;
	text-align: center;
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.uth-result-card::before {
	position: absolute;
	inset: 0 0 auto;
	height: 3px;
	content: "";
	background: linear-gradient(90deg, var(--uth-primary), #0f766e);
	opacity: 0.85;
}

.uth-result-card:hover {
	border-color: rgba(37, 99, 235, 0.24);
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
	transform: translateY(-1px);
}

.uth-result-value {
	display: block;
	color: var(--uth-heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.15;
}

.uth-result-label {
	display: block;
	margin-top: 6px;
	color: var(--uth-muted);
	font-size: 0.875rem;
	line-height: 1.4;
}

.uth-tool-notice {
	width: min(100%, 950px);
	margin: 0 auto;
	padding: 14px 16px;
	color: var(--uth-text);
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-left: 4px solid var(--uth-primary);
	border-radius: var(--uth-radius-small);
}

.uth-tool-notice-success {
	border-left-color: var(--uth-success);
}

.uth-tool-notice-warning,
.uth-tool-notice-danger {
	border-left-color: var(--uth-danger);
}

.uth-tool-content {
	width: min(100%, 1140px);
	margin: 0 auto;
	padding: clamp(16px, 3vw, 28px) 0 0;
	color: var(--uth-text);
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: 1rem;
	line-height: 1.75;
}

.uth-tool-content > * {
	max-width: 100%;
}

.uth-tool-content h2,
.uth-tool-content h3,
.uth-tool-content h4 {
	margin-top: 1.8em;
	margin-bottom: 0.65em;
	color: var(--uth-heading);
	line-height: 1.25;
	letter-spacing: 0;
}

.uth-tool-content h2:first-child,
.uth-tool-content h3:first-child,
.uth-tool-content h4:first-child {
	margin-top: 0;
}

.uth-tool-content p,
.uth-tool-content ul,
.uth-tool-content ol {
	margin-top: 0;
	margin-bottom: 1.15em;
}

.uth-tool-content a {
	color: var(--uth-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.uth-tool-content a:hover {
	color: var(--uth-primary-hover);
}

.uth-tool-content .wp-block-heading,
.uth-tool-content h2 {
	padding-bottom: 0.35em;
	border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.uth-tool-content img,
.uth-tool-content iframe,
.uth-tool-content video {
	max-width: 100%;
	height: auto;
}

.uth-tool-content .wp-block-table {
	overflow-x: auto;
}

.uth-content-card {
	margin: 24px 0;
}

.uth-faq {
	width: 100%;
	margin: 44px 0 0;
}

.uth-faq > h2 {
	margin: 0 0 24px;
	color: var(--uth-heading);
	font-weight: 700;
	line-height: 1.25;
}

.uth-faq-list {
	display: grid;
	gap: 14px;
}

.uth-faq-item {
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: var(--uth-radius-medium);
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.uth-faq-item.is-open {
	border-color: rgba(37, 99, 235, 0.36);
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.uth-faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 18px 20px;
	color: var(--uth-heading);
	font: inherit;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.uth-faq-question:hover,
.uth-faq-question:focus-visible {
	background: var(--uth-section-background);
	outline: none;
}

.uth-faq-question-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	color: var(--uth-primary);
	background: var(--uth-section-background);
	border-radius: 50%;
	transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

.uth-faq-item.is-open .uth-faq-question-icon {
	background: var(--uth-primary);
	color: #ffffff;
	transform: rotate(180deg);
}

.uth-faq-answer {
	padding: 10px 20px 22px;
	color: var(--uth-text);
	font-size: 1rem;
	line-height: 1.75;
}

.uth-faq-answer-inner > *:first-child {
	margin-top: 0;
}

.uth-faq-answer-inner > *:last-child {
	margin-bottom: 0;
}

.uth-related-tools {
	width: 100%;
	margin: 44px 0 0;
}

.uth-related-tools > h2 {
	margin: 0 0 24px;
	color: var(--uth-heading);
	font-weight: 700;
	line-height: 1.25;
}

.uth-related-tools .uth-tool-card-title {
	margin: 0;
}

.uth-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 1024px) {
	.uth-page {
		width: min(100% - 32px, 1140px);
		padding-top: 0;
	}

	.uth-result-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.uth-page {
		width: min(100% - 24px, 1140px);
		padding: 0 0 48px;
	}

	.uth-tool-hero {
		margin-bottom: 32px;
		border-radius: var(--uth-radius-medium);
	}

	.uth-tool-title {
		font-size: 2rem;
	}

	.uth-tool-description {
		font-size: 1rem;
	}

	.uth-result-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.uth-page {
		width: min(100% - 20px, 1140px);
		padding-top: 0;
	}

	.uth-tool-hero {
		padding: 24px 0 32px;
	}

	.uth-tool-icon {
		width: 48px;
		height: 48px;
	}

	.uth-button,
	.uth-button-group {
		width: 100%;
	}

	.uth-result-grid {
		grid-template-columns: 1fr;
	}

	.uth-result-card,
	.uth-content-card,
	.uth-related-tool-card {
		padding: 16px;
	}
}

/* ---- Copy icon button (shared across full-screen tools) ---- */

/* Ensure tool sections with the hidden attribute are truly hidden even when a
   more specific rule sets display (e.g. grid/flex). */
.uth-tool [hidden],
.uth-screen [hidden],
.uth-crp-editor [hidden],
.uth-pph-editor [hidden],
.uth-pph-result [hidden],
.uth-pph-settings [hidden] {
	display: none !important;
}

.uth-copy-icon {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--ct-editor-border, #1e293b);
	border-radius: 8px;
	background: rgba(15, 23, 42, 0.82);
	color: #cbd5e1;
	cursor: pointer;
	transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.uth-copy-icon svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.uth-copy-icon:hover,
.uth-copy-icon:focus-visible {
	color: #ffffff;
	border-color: var(--ct-editor-accent, #38bdf8);
	background: rgba(15, 23, 42, 0.95);
	outline: none;
}

.uth-copy-icon.is-copied {
	color: #4ade80;
	border-color: rgba(74, 222, 128, 0.55);
	animation: uth-copied-pop 0.3s ease;
}

@keyframes uth-copied-pop {
	0% { transform: scale(1); }
	50% { transform: scale(1.16); }
	100% { transform: scale(1); }
}

.uth-copy-icon--inline {
	position: static;
	flex: none;
}

.uth-copy-icon--light {
	background: #ffffff;
	color: #475569;
	border-color: var(--uth-border, #e2e6ea);
}

.uth-copy-icon--light:hover,
.uth-copy-icon--light:focus-visible {
	color: var(--uth-primary, #2563eb);
	border-color: var(--uth-primary, #2563eb);
	background: var(--uth-accent-soft, #eff6ff);
}

.uth-copy-icon--light.is-copied {
	color: #15803d;
	border-color: rgba(22, 128, 61, 0.45);
	background: #ecfdf3;
}
