/*
 * Free tool pages (/tools/*, seed/tools.php) and their generators
 * (assets/js/pages-tools.js). Reference at 1440px: 56px Golos title,
 * ~900px generator card, 1200px section container, 768px guide column,
 * 662px FAQ column, blue CTA band.
 */

.gl-section:is(.gl-tool-hero, .gl-tool-how, .gl-tool-where, .gl-tool-guide, .gl-tool-faq, .gl-tool-more, .gl-tool-cta) > .gl-container {
	max-width: 1200px;
}

.gl-tool-hero {
	padding: 60px 24px 56px;
}

.gl-tool-how,
.gl-tool-where,
.gl-tool-more {
	padding: 48px 24px;
}

.gl-tool-guide {
	padding: 64px 24px;
}

.gl-tool-faq {
	padding: 64px 24px;
}

.gl-tool-cta {
	padding: 48px 24px 96px;
}

/* Section headings: Golos 32/500, the FAQ heading a little larger. */
.gl-section:is(.gl-tool-how, .gl-tool-where, .gl-tool-guide, .gl-tool-faq, .gl-tool-more) h2 {
	margin: 0 0 28px;
	color: #1a202c;
	font-size: 32px;
	font-weight: 500;
	line-height: 1.4;
}

.gl-tool-faq h2 {
	font-size: 36px !important;
}

/* ---------- hero + generator ---------- */

.gl-tool-title {
	margin: 0;
	text-align: center;
	font-size: clamp(2.125rem, 1.4rem + 2.4vw, 3.5rem);
	font-weight: 500;
	line-height: 1.5;
}

.gl-tool-lead {
	max-width: 640px;
	margin: 8px auto 0 !important;
	color: #4a5568;
	text-align: center;
}

.gl-tool-hero .wp-block-html,
.gl-tool-hero > .gl-container > .gl-tool-app,
.gl-tool-hero form,
.gl-tool-hero .gl-tool-app {
	max-width: 900px;
	margin-inline: auto;
}

.gl-tool-app {
	margin-top: 32px !important;
	padding: 24px;
	border: 1px solid #e8edf3;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(1, 112, 249, 0.08);
	text-align: left;
}

.gl-tool-app > * + * {
	margin-top: 16px;
}

.gl-tool-field label,
.gl-tool-chips legend {
	display: block;
	margin-bottom: 6px;
	color: #1a202c;
	font-size: 13px;
	font-weight: 600;
}

.gl-tool-field__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.gl-tool-count {
	color: #718096;
	font-size: 12px;
}

.gl-tool-field textarea,
.gl-tool-field input,
.gl-tool-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f7f9fc;
	color: #1a202c;
	font: inherit;
	font-size: 15px;
	line-height: 1.5;
}

.gl-tool-field textarea {
	resize: vertical;
	min-height: 64px;
}

.gl-tool-field select {
	appearance: none;
	padding-right: 36px;
	background: #f7f9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
}

.gl-tool-field :is(textarea, input, select):focus-visible {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid rgba(1, 112, 249, 0.25);
	background-color: #fff;
}

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

.gl-tool-grid > * {
	margin: 0 !important;
}

.gl-tool-chips {
	margin: 16px 0 0;
	padding: 0;
	border: 0;
}

.gl-tool-chips__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gl-tool-chip {
	position: relative;
	cursor: pointer;
}

.gl-tool-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.gl-tool-chip span {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #f7f9fc;
	color: #4a5568;
	font-size: 13px;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.gl-tool-chip:hover span {
	border-color: #9cc3ff;
}

.gl-tool-chip input:checked + span {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.gl-tool-chip input:focus-visible + span {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.gl-tool-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #4a5568;
	font-size: 14px;
	cursor: pointer;
}

.gl-tool-check input {
	width: 16px;
	height: 16px;
	accent-color: var(--wp--preset--color--primary);
}

.gl-tool-submit {
	display: block;
	width: 100%;
	padding: 12px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--button);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.gl-tool-submit:hover {
	background: #0359d1;
}

.gl-tool-submit:focus-visible,
.gl-tool-ghost:focus-visible,
.gl-tool-copy:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.gl-tool-note {
	margin: 12px 0 0;
	color: #718096;
	font-size: 12px;
	line-height: 1.6;
	text-align: center;
}

.gl-tool-note strong {
	color: #1a202c;
}

.gl-tool-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px !important;
}

.gl-tool-ghost {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	color: #2d3748;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.gl-tool-ghost:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* ---------- results ---------- */

.gl-tool-out:empty {
	display: none;
}

.gl-tool-out {
	margin-top: 20px !important;
}

.gl-tool-out > * + * {
	margin-top: 12px;
}

.gl-tool-out__bar {
	display: flex;
	justify-content: center;
}

.gl-tool-results {
	display: grid;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.gl-tool-out .gl-tool-results {
	margin-top: 0;
}

.gl-tool-results.is-compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gl-tool-result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid #e8edf3;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(26, 32, 44, 0.04);
}

.gl-tool-result.is-empty {
	opacity: 0.55;
}

.gl-tool-result__body {
	min-width: 0;
}

.gl-tool-result__meta {
	display: block;
	margin-bottom: 4px;
	color: #718096;
	font-size: 11px;
}

.gl-tool-result__meta .is-over {
	color: #c53030;
	font-weight: 600;
}

.gl-tool-result__text {
	margin: 0;
	color: #1a202c;
	font-size: 15px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.gl-tool-copy {
	flex: none;
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: #fff;
	color: #2d3748;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.gl-tool-copy:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.gl-tool-copy.is-done {
	border-color: #38a169;
	color: #2f855a;
}

.gl-tool-tags {
	padding: 14px 16px;
	border: 1px solid #e8edf3;
	border-radius: 10px;
	background: #fff;
}

.gl-tool-tags__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.gl-tool-tags__title {
	margin: 0;
	color: #1a202c;
	font-size: 14px;
	font-weight: 600;
}

.gl-tool-tags__hint {
	margin: 4px 0 0;
	color: #718096;
	font-size: 12px;
}

.gl-tool-tags__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
}

.gl-tool-tags__list span {
	padding: 3px 10px;
	border-radius: 999px;
	background: #eef4ff;
	color: #0b5ed7;
	font-size: 13px;
}

.gl-tool-hint,
.gl-tool-error,
.gl-tool-flag {
	margin: 0;
	font-size: 13px;
}

.gl-tool-hint {
	color: #718096;
}

.gl-tool-error {
	color: #c53030;
}

.gl-tool-flag {
	padding: 8px 12px;
	border-radius: 8px;
	background: #fff7ed;
	color: #9a3412;
}

.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- steps, info cards, more tools ---------- */

.gl-tool-steps,
.gl-tool-infos,
.gl-tool-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.gl-tool-steps > *,
.gl-tool-infos > *,
.gl-tool-cards > * {
	margin: 0 !important;
}

.gl-tool-step,
.gl-tool-info,
.gl-tool-card {
	padding: 24px;
	border: 1px solid #edf2f7;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(26, 32, 44, 0.04);
}

.gl-tool-step > *,
.gl-tool-info > *,
.gl-tool-card > * {
	margin: 0;
}

.gl-tool-step > * + *,
.gl-tool-info > * + *,
.gl-tool-card > * + * {
	margin-top: 10px;
}

.gl-tool-step__num {
	color: var(--wp--preset--color--primary);
	font-size: 12px;
	font-weight: 700;
}

.gl-tool-step__title {
	font-size: 20px !important;
	font-weight: 600 !important;
}

.gl-tool-step p:not(.gl-tool-step__num),
.gl-tool-info p,
.gl-tool-card p {
	color: #686e77;
	font-size: 14px;
	line-height: 1.7;
}

.gl-tool-where__intro {
	max-width: 760px;
	margin: -12px 0 28px !important;
	color: #686e77;
	font-size: 15px;
}

.gl-tool-info__title {
	font-size: 16px !important;
	font-weight: 600 !important;
}

.gl-tool-card {
	position: relative;
	display: flex;
	flex-direction: column;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.gl-tool-card:hover,
.gl-tool-card:focus-within {
	border-color: #b9d6ff;
	box-shadow: 0 8px 24px rgba(1, 112, 249, 0.1);
}

.gl-tool-card__name {
	font-size: 16px !important;
	font-weight: 600 !important;
}

.gl-tool-card__name a {
	color: #1a202c;
	text-decoration: none;
}

/* The whole card is the link target; the name link stretches over it. */
.gl-tool-card__name a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.gl-tool-card__name a:focus-visible {
	outline: none;
}

.gl-tool-card__name a:focus-visible::after {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.gl-tool-card .gl-tool-card__link {
	margin-top: auto;
	padding-top: 16px;
	color: var(--wp--preset--color--primary);
	font-size: 13px;
	font-weight: 600;
	text-align: right;
}

/* ---------- long-form guide ---------- */

.gl-tool-guide > .gl-container {
	max-width: 768px !important;
}

.gl-tool-guide .gl-container > * + * {
	margin-top: 14px;
}

.gl-tool-guide h3 {
	margin-top: 36px !important;
	color: #1a202c;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.5;
}

.gl-tool-guide p,
.gl-tool-guide li {
	color: #2d3748;
	font-size: 15px;
	line-height: 1.7;
}

.gl-tool-guide ul,
.gl-tool-guide ol {
	padding-left: 1.3em;
}

.gl-tool-guide li + li {
	margin-top: 6px;
}

/* ---------- FAQ ---------- */

.gl-tool-faq > .gl-container {
	max-width: 662px !important;
}

.gl-tool-faq .geelark-faq {
	max-width: none;
	margin-top: 0 !important;
}

.gl-tool-faq .geelark-faq summary {
	font-size: 15px;
}

.gl-tool-faq .geelark-faq p {
	color: #686e77;
	font-size: 14px;
	line-height: 1.7;
}

/* ---------- CTA band ---------- */

.gl-tool-cta__box {
	padding: 56px 32px;
	border-radius: 20px;
	background: linear-gradient(110deg, #1e74ff, #3f95ff);
	color: #fff;
	text-align: center;
}

.gl-tool-cta__box > * {
	max-width: 640px;
	margin: 0 auto;
}

.gl-tool-cta__box > * + * {
	margin-top: 12px;
}

.gl-tool-cta__title {
	color: #fff !important;
	font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.25rem);
	font-weight: 500;
}

.gl-tool-cta__box p {
	color: rgba(255, 255, 255, 0.92);
}

.gl-tool-cta__buttons {
	justify-content: center;
	margin-top: 28px !important;
}

.gl-tool-cta__buttons .wp-block-button__link {
	padding: 8px 22px;
	border-radius: 8px;
	background: #fff;
	color: #1a202c;
	font-size: 14px;
	font-weight: 600;
}

.gl-tool-cta__buttons .wp-block-button__link:hover,
.gl-tool-cta__buttons .wp-block-button__link:focus-visible {
	background: #eef4ff;
	color: var(--wp--preset--color--primary);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
	.gl-tool-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.gl-tool-steps,
	.gl-tool-infos {
		grid-template-columns: minmax(0, 1fr);
	}

	.gl-tool-hero {
		padding: 32px 16px 40px;
	}

	.gl-tool-how,
	.gl-tool-where,
	.gl-tool-more,
	.gl-tool-guide,
	.gl-tool-faq,
	.gl-tool-cta {
		padding: 40px 16px;
	}

	.gl-section:is(.gl-tool-how, .gl-tool-where, .gl-tool-guide, .gl-tool-faq, .gl-tool-more) h2 {
		font-size: 26px;
	}

	.gl-tool-faq h2 {
		font-size: 28px !important;
	}

	.gl-tool-app {
		padding: 16px;
	}
}

@media (max-width: 600px) {
	.gl-tool-grid,
	.gl-tool-results.is-compact,
	.gl-tool-cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.gl-tool-result {
		align-items: flex-start;
	}

	.gl-tool-cta__box {
		padding: 40px 20px;
	}
}
