/* Book Title Generator — Novella Publishers */
:root {
	--tg-navy: #010082;
	--tg-navy-dark: #00005a;
	--tg-orange: #f15a25;
	--tg-orange-dark: #d8481a;
	--tg-ink: #1d1d2c;
	--tg-muted: #5b5b6e;
	--tg-line: #e3e3ee;
	--tg-soft: #f5f5fb;
	--tg-success: #12805c;
	--tg-error: #c62828;
}

.tg-hero,
.tg-tool-wrap,
.tg-section { font-family: 'Poppins', sans-serif; }

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

/* ---------- Hero ---------- */
.tg-hero {
	background: radial-gradient(circle at 15% 20%, rgba(241, 90, 37, .25), transparent 40%),
		linear-gradient(135deg, var(--tg-navy-dark) 0%, var(--tg-navy) 100%);
	color: #fff;
	padding: 150px 0 140px;
	text-align: center;
}
.tg-hero-copy { max-width: 760px; margin: 0 auto; }
.tg-eyebrow {
	display: inline-block;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin-bottom: 18px;
}
.tg-hero h1 {
	font-size: 52px;
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 18px;
	color: #fff;
}
.tg-hero h1 span { color: var(--tg-orange); }
.tg-hero p {
	font-size: 18px;
	line-height: 1.65;
	color: rgba(255, 255, 255, .85);
	margin: 0;
}

/* ---------- Card ---------- */
.tg-tool-wrap { margin-top: -90px; position: relative; z-index: 2; padding-bottom: 40px; }
.tg-card {
	max-width: 880px;
	margin: 0 auto;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 60px rgba(1, 0, 130, .14);
	padding: 40px 48px 44px;
	color: var(--tg-ink);
}

/* ---------- Progress ---------- */
.tg-progress {
	display: flex;
	justify-content: space-between;
	list-style: none;
	margin: 0 0 34px;
	padding: 0;
	counter-reset: none;
	position: relative;
}
.tg-progress::before {
	content: "";
	position: absolute;
	top: 18px; left: 12%; right: 12%;
	height: 2px;
	background: var(--tg-line);
}
.tg-progress li {
	position: relative;
	flex: 1;
	text-align: center;
	color: var(--tg-muted);
	font-size: 13px;
	font-weight: 500;
}
.tg-progress li span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	margin: 0 auto 8px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--tg-line);
	font-weight: 600;
	font-size: 15px;
	position: relative;
	transition: all .25s ease;
}
.tg-progress li em { font-style: normal; }
.tg-progress li.is-active span { border-color: var(--tg-orange); background: var(--tg-orange); color: #fff; }
.tg-progress li.is-active { color: var(--tg-ink); }
.tg-progress li.is-done span { border-color: var(--tg-navy); background: var(--tg-navy); color: #fff; }

/* ---------- Steps ---------- */
.tg-step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.tg-step.is-active { display: block; animation: tgFade .3s ease; }
@keyframes tgFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tg-step-title {
	font-size: 28px;
	font-weight: 600;
	color: var(--tg-navy);
	margin: 0 0 6px;
	padding: 0;
	float: none;
	width: auto;
	line-height: 1.3;
	outline: none;
}
.tg-step-help { color: var(--tg-muted); font-size: 15px; margin: 0 0 22px; line-height: 1.6; }

/* Chips */
.tg-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.tg-chip { position: relative; margin: 0; cursor: pointer; }
.tg-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg-chip span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1.5px solid var(--tg-line);
	border-radius: 999px;
	font-size: 15px;
	font-weight: 500;
	color: var(--tg-ink);
	background: #fff;
	transition: all .18s ease;
	user-select: none;
}
.tg-chip:hover span { border-color: var(--tg-navy); color: var(--tg-navy); }
.tg-chip input:focus-visible + span { outline: 3px solid rgba(241, 90, 37, .45); outline-offset: 2px; }
.tg-chip input:checked + span {
	background: var(--tg-navy);
	border-color: var(--tg-navy);
	color: #fff;
}
.tg-chip input:checked + span::before {
	content: "";
	width: 12px; height: 7px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translateY(-2px);
}

/* Inputs */
.tg-card textarea,
.tg-input {
	width: 100%;
	border: 1.5px solid var(--tg-line);
	border-radius: 14px;
	padding: 14px 16px;
	font: inherit;
	font-size: 15px;
	line-height: 1.6;
	color: var(--tg-ink);
	background: var(--tg-soft);
	transition: border-color .2s, background .2s;
}
.tg-card textarea { resize: vertical; min-height: 170px; }
.tg-card textarea:focus,
.tg-input:focus { outline: none; border-color: var(--tg-navy); background: #fff; }
.tg-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.tg-counter { text-align: right; font-size: 13px; color: var(--tg-muted); margin-top: 8px; }
.tg-counter.is-ok { color: var(--tg-success); }
.tg-counter.is-over { color: var(--tg-error); font-weight: 600; }
.tg-consent { font-size: 12.5px; color: var(--tg-muted); margin: 12px 0 0; line-height: 1.6; }
.tg-consent a { color: var(--tg-navy); text-decoration: underline; }

.tg-error { color: var(--tg-error); font-size: 14px; font-weight: 500; min-height: 20px; margin: 14px 0 0; }

/* Buttons */
.tg-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }
.tg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	border-radius: 16px 0;
	padding: 13px 30px;
	font-family: 'Poppins', sans-serif;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
}
.tg-btn:focus-visible { outline: 3px solid rgba(241, 90, 37, .45); outline-offset: 2px; }
.tg-btn-primary { background: var(--tg-orange); color: #fff; }
.tg-btn-primary:hover { background: var(--tg-orange-dark); transform: translateY(-1px); }
.tg-btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }
.tg-btn-ghost { background: transparent; color: var(--tg-navy); border: 1.5px solid var(--tg-line); }
.tg-btn-ghost:hover { border-color: var(--tg-navy); }

/* ---------- Loading ---------- */
.tg-loading { text-align: center; padding: 60px 0; }
.tg-spinner {
	width: 56px; height: 56px;
	margin: 0 auto 22px;
	border-radius: 50%;
	border: 4px solid var(--tg-line);
	border-top-color: var(--tg-orange);
	animation: tgSpin .9s linear infinite;
}
@keyframes tgSpin { to { transform: rotate(360deg); } }
.tg-loading-title { font-size: 22px; font-weight: 600; color: var(--tg-navy); margin: 0 0 6px; }
.tg-loading-sub { color: var(--tg-muted); margin: 0; }

/* ---------- Results ---------- */
.tg-results-title { font-size: 30px; font-weight: 700; color: var(--tg-navy); margin: 0 0 6px; outline: none; }
.tg-results-sub { color: var(--tg-muted); margin: 0 0 26px; }
.tg-title-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}
.tg-title-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px;
	border: 1.5px solid var(--tg-line);
	border-radius: 16px;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
}
.tg-title-card:hover { border-color: var(--tg-navy); box-shadow: 0 8px 22px rgba(1, 0, 130, .08); }
.tg-title-num {
	flex: 0 0 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--tg-soft);
	color: var(--tg-navy);
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tg-title-body { flex: 1; min-width: 0; }
.tg-title-text { font-size: 18px; font-weight: 600; color: var(--tg-ink); margin: 3px 0 2px; line-height: 1.35; overflow-wrap: anywhere; }
.tg-title-subtitle { font-size: 14px; color: var(--tg-navy); font-style: italic; margin: 0 0 4px; }
.tg-title-why { font-size: 13px; color: var(--tg-muted); margin: 6px 0 0; line-height: 1.5; }
.tg-copy {
	flex: 0 0 auto;
	border: 1.5px solid var(--tg-line);
	background: #fff;
	color: var(--tg-navy);
	font-size: 12.5px;
	font-weight: 600;
	border-radius: 999px;
	padding: 6px 14px;
	cursor: pointer;
	transition: all .2s;
}
.tg-copy:hover { border-color: var(--tg-navy); }
.tg-copy.is-copied,
.tg-btn.is-copied { background: var(--tg-success); border-color: var(--tg-success); color: #fff; }
.tg-results-actions { display: flex; justify-content: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.tg-results-cta {
	margin-top: 34px;
	padding: 26px 28px;
	border-radius: 18px;
	background: var(--tg-soft);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.tg-results-cta h3 { font-size: 20px; font-weight: 600; color: var(--tg-navy); margin: 0 0 4px; }
.tg-results-cta p { margin: 0; color: var(--tg-muted); font-size: 14px; line-height: 1.6; }
.tg-results-cta .btn-wrap { gap: 10px; margin: 0; padding: 0; list-style: none; flex-shrink: 0; }

/* ---------- Content sections ---------- */
.tg-section { padding: 80px 0; }
.tg-section-alt { background: var(--tg-soft); }
.tg-section .main-heading { margin-bottom: 44px; }
.tg-steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tg-how {
	background: #fff;
	border: 1.5px solid var(--tg-line);
	border-radius: 20px;
	padding: 28px 24px;
}
.tg-how-num { display: block; font-size: 34px; font-weight: 700; color: var(--tg-orange); line-height: 1; margin-bottom: 14px; }
.tg-how h3, .tg-tip h3 { font-size: 19px; font-weight: 600; color: var(--tg-navy); margin: 0 0 8px; }
.tg-how p, .tg-tip p { font-size: 15px; color: var(--tg-muted); line-height: 1.65; margin: 0; }

.tg-tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tg-tip {
	background: #fff;
	border-radius: 20px;
	padding: 28px 26px;
	border-top: 4px solid var(--tg-navy);
}
.tg-tip:nth-child(even) { border-top-color: var(--tg-orange); }

.tg-faq { max-width: 860px; margin: 0 auto; }
.tg-faq details {
	border: 1.5px solid var(--tg-line);
	border-radius: 16px;
	margin-bottom: 14px;
	background: #fff;
	overflow: hidden;
}
.tg-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 20px 56px 20px 24px;
	font-size: 17px;
	font-weight: 600;
	color: var(--tg-ink);
	position: relative;
}
.tg-faq summary::-webkit-details-marker { display: none; }
.tg-faq summary::after {
	content: "+";
	position: absolute;
	right: 24px; top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	font-weight: 400;
	color: var(--tg-orange);
}
.tg-faq details[open] summary::after { content: "\2212"; }
.tg-faq details p { padding: 0 24px 20px; margin: 0; color: var(--tg-muted); line-height: 1.7; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.tg-steps-grid { grid-template-columns: repeat(2, 1fr); }
	.tg-tips-grid { grid-template-columns: repeat(2, 1fr); }
	.tg-results-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
	.tg-hero { padding: 120px 0 120px; }
	.tg-hero h1 { font-size: 36px; }
	.tg-hero p { font-size: 16px; }
	.tg-card { padding: 28px 20px 30px; border-radius: 20px; }
	.tg-step-title { font-size: 22px; }
	.tg-progress li em { display: none; }
	.tg-chips { gap: 9px; }
	.tg-chip span { padding: 9px 15px; font-size: 14px; }
	.tg-title-list { grid-template-columns: 1fr; }
	.tg-results-title { font-size: 24px; }
	.tg-steps-grid, .tg-tips-grid { grid-template-columns: 1fr; }
	.tg-section { padding: 56px 0; }
	.tg-nav .tg-btn { padding: 12px 20px; }
	.tg-results-cta .btn-wrap { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
	.tg-step.is-active, .tg-spinner { animation: none; }
	.tg-btn, .tg-chip span { transition: none; }
}
