/* WFF Tools — shared design system for all tool pages.
   Matches the identifier's visual language (same tokens) and is scoped
   under .wfft so the Newspaper theme cannot leak styles in. */

.wfft {
	--wfft-ink: #17171d;
	--wfft-muted: #626271;
	--wfft-line: #dedee7;
	--wfft-field-line: #8e8fa0;
	--wfft-soft: #f5f6fb;
	--wfft-card: #ffffff;
	--wfft-brand: #2231d1;
	--wfft-brand-dark: #17249d;
	--wfft-good: #157347;
	--wfft-radius: 20px;
	color: var(--wfft-ink);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	margin: 0 auto 48px;
	max-width: 1200px;
}

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

/* ---------- Hero ---------- */

.wfft-hero {
	background: radial-gradient(120% 160% at 85% 0%, #232a63 0%, #0b0c16 55%, #090a12 100%);
	border-radius: var(--wfft-radius);
	color: #fff;
	margin: 18px 0 26px;
	overflow: hidden;
	padding: clamp(28px, 5vw, 56px);
	position: relative;
}

.wfft-hero::after {
	color: rgba(255, 255, 255, .05);
	content: "Aa";
	font-size: clamp(160px, 26vw, 340px);
	font-weight: 800;
	letter-spacing: -.06em;
	line-height: 1;
	pointer-events: none;
	position: absolute;
	right: -20px;
	top: -30px;
}

.wfft-eyebrow {
	color: #97a4ff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .18em;
	margin: 0 0 12px;
	text-transform: uppercase;
}

.wfft-hero h1 {
	color: #fff;
	font-size: clamp(30px, 4.5vw, 54px);
	letter-spacing: -.045em;
	line-height: 1.03;
	margin: 0 0 14px;
	max-width: 900px;
	position: relative;
	z-index: 1;
}

.wfft-lede {
	color: #c9cdE4;
	font-size: clamp(15px, 1.6vw, 18px);
	margin: 0;
	max-width: 760px;
	position: relative;
	z-index: 1;
}

/* ---------- Layout ---------- */

.wfft-grid {
	align-items: start;
	display: grid;
	gap: 22px;
	grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
	margin-bottom: 30px;
}

.wfft-grid.is-even {
	grid-template-columns: 1fr 1fr;
}

.wfft-panel {
	background: var(--wfft-card);
	border: 1px solid var(--wfft-line);
	border-radius: var(--wfft-radius);
	box-shadow: 0 16px 50px rgba(24, 24, 37, .055);
	padding: 22px;
}

.wfft-panel h2 {
	font-size: 20px;
	letter-spacing: -.02em;
	margin: 0 0 16px;
}

/* ---------- Controls ---------- */

.wfft label,
.wfft legend {
	color: #32323c;
	display: block;
	float: none !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .01em;
	margin: 14px 0 0;
	max-width: none !important;
	width: auto !important;
}

.wfft label:first-child {
	margin-top: 0;
}

.wfft input[type="text"],
.wfft input[type="search"],
.wfft input[type="number"],
.wfft select,
.wfft textarea {
	background: #fff;
	border: 1px solid var(--wfft-field-line);
	border-radius: 10px;
	color: var(--wfft-ink);
	font: inherit;
	font-size: 15px;
	margin-top: 6px;
	padding: 10px 12px;
	width: 100%;
}

.wfft textarea {
	min-height: 90px;
	resize: vertical;
}

.wfft input:focus-visible,
.wfft select:focus-visible,
.wfft textarea:focus-visible,
.wfft button:focus-visible {
	outline: 2px solid var(--wfft-brand);
	outline-offset: 1px;
}

.wfft input[type="range"] {
	accent-color: var(--wfft-brand);
	margin-top: 8px;
	width: 100%;
}

.wfft input[type="color"] {
	background: none;
	border: 1px solid var(--wfft-field-line);
	border-radius: 8px;
	height: 44px;
	margin-top: 6px;
	padding: 2px;
	width: 56px;
}

.wfft-control-row {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.wfft-inline {
	align-items: end;
	display: flex;
	gap: 8px;
}

.wfft-inline > :first-child {
	flex: 1;
}

.wfft-hint {
	color: var(--wfft-muted);
	display: block;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	margin-top: 5px;
}

/* ---------- Buttons ---------- */

.wfft-button {
	background: var(--wfft-brand);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	margin-top: 14px;
	min-height: 44px;
	padding: 11px 22px;
	transition: background .15s ease;
}

.wfft-button:hover {
	background: var(--wfft-brand-dark);
	color: #fff;
}

.wfft-button[disabled] {
	background: #eceef6;
	box-shadow: inset 0 0 0 1px #c9cad5;
	color: #4b4b58;
	cursor: not-allowed;
}

.wfft-button-secondary {
	background: #fff;
	border: 1.5px solid var(--wfft-brand);
	color: var(--wfft-brand);
}

.wfft-button-secondary:hover {
	background: #f1f2ff;
	color: var(--wfft-brand-dark);
}

.wfft-button-quiet {
	background: transparent;
	border: 0;
	color: var(--wfft-brand);
	text-decoration: underline;
}

.wfft-button-quiet:hover {
	background: transparent;
	color: var(--wfft-brand-dark);
}

/* ---------- Preview & results ---------- */

.wfft-preview {
	align-items: center;
	background:
		linear-gradient(45deg, #f0f0f5 25%, transparent 25%, transparent 75%, #f0f0f5 75%),
		linear-gradient(45deg, #f0f0f5 25%, #fff 25%, #fff 75%, #f0f0f5 75%);
	background-position: 0 0, 9px 9px;
	background-size: 18px 18px;
	border: 1px solid var(--wfft-line);
	border-radius: 14px;
	display: flex;
	justify-content: center;
	min-height: 180px;
	overflow: auto;
	padding: 18px;
}

.wfft-preview.is-solid {
	background: #fff;
}

.wfft-preview canvas {
	height: auto;
	max-width: 100%;
}

.wfft-stat-row {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	margin-top: 16px;
}

.wfft-stat {
	background: var(--wfft-soft);
	border: 1px solid var(--wfft-line);
	border-radius: 14px;
	padding: 14px 16px;
}

.wfft-stat strong {
	display: block;
	font-size: 24px;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
}

.wfft-stat span {
	color: var(--wfft-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.wfft-code {
	background: #101223;
	border-radius: 12px;
	color: #d8dcff;
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13.5px;
	line-height: 1.7;
	margin-top: 14px;
	overflow-x: auto;
	padding: 14px 16px;
	white-space: pre;
}

.wfft-copy-btn-row {
	display: flex;
	gap: 10px;
}

/* ---------- Font generator specifics ---------- */

.wfft-font-list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 10px 0 0;
	max-height: 430px;
	overflow-y: auto;
	padding: 0 4px 0 0;
}

.wfft-font-list li {
	margin: 0;
}

.wfft-font-option {
	align-items: center;
	background: #fff;
	border: 1px solid var(--wfft-line);
	border-radius: 12px;
	cursor: pointer;
	display: flex;
	font: inherit;
	gap: 10px;
	justify-content: space-between;
	padding: 10px 14px;
	text-align: left;
	transition: border-color .12s ease, background .12s ease;
	width: 100%;
}

.wfft-font-option:hover {
	border-color: var(--wfft-brand);
}

.wfft-font-option.is-active {
	background: #f1f2ff;
	border-color: var(--wfft-brand);
	box-shadow: inset 0 0 0 1px var(--wfft-brand);
}

.wfft-font-option small {
	color: var(--wfft-muted);
	font-size: 11.5px;
	white-space: nowrap;
}

.wfft-badge {
	background: #e8f5ee;
	border-radius: 999px;
	color: var(--wfft-good);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	white-space: nowrap;
}

.wfft-badge.is-neutral {
	background: var(--wfft-soft);
	color: var(--wfft-muted);
}

/* ---------- Unicode generator ---------- */

.wfft-style-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}

.wfft-style-card {
	align-items: center;
	background: var(--wfft-card);
	border: 1px solid var(--wfft-line);
	border-radius: 14px;
	display: flex;
	gap: 14px;
	justify-content: space-between;
	padding: 14px 18px;
}

.wfft-style-card .wfft-style-text {
	font-size: 19px;
	overflow-wrap: anywhere;
}

.wfft-style-card small {
	color: var(--wfft-muted);
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .05em;
	margin-bottom: 3px;
	text-transform: uppercase;
}

/* ---------- Hub cards ---------- */

.wfft-hub-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	margin: 8px 0 30px;
}

.wfft-hub-card {
	background: var(--wfft-card);
	border: 1px solid var(--wfft-line);
	border-radius: var(--wfft-radius);
	color: inherit;
	display: block;
	padding: 22px;
	text-decoration: none;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.wfft-hub-card:hover {
	border-color: var(--wfft-brand);
	box-shadow: 0 16px 40px rgba(24, 24, 37, .09);
	color: inherit;
	transform: translateY(-2px);
}

.wfft-hub-card .wfft-hub-icon {
	align-items: center;
	background: #f1f2ff;
	border-radius: 12px;
	color: var(--wfft-brand);
	display: flex;
	font-size: 22px;
	font-weight: 800;
	height: 44px;
	justify-content: center;
	margin-bottom: 14px;
	width: 44px;
}

.wfft-hub-card h2,
.wfft-hub-card h3 {
	font-size: 18px;
	letter-spacing: -.02em;
	margin: 0 0 6px;
}

.wfft-hub-card p {
	color: var(--wfft-muted);
	font-size: 14px;
	margin: 0;
}

/* ---------- Copy & FAQ ---------- */

.wfft-copy-grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	margin: 34px 0 0;
}

.wfft-copy-grid h2 {
	font-size: 19px;
	letter-spacing: -.02em;
	margin: 0 0 8px;
}

.wfft-copy-grid p,
.wfft-copy-grid li {
	color: #3c3c49;
	font-size: 15px;
}

.wfft-copy-grid ul,
.wfft-copy-grid ol {
	margin: 8px 0 0;
	padding-left: 20px;
}

.wfft-faq {
	margin-top: 38px;
}

.wfft-faq h2 {
	font-size: 22px;
	letter-spacing: -.02em;
	margin-bottom: 14px;
}

.wfft-faq details {
	background: var(--wfft-card);
	border: 1px solid var(--wfft-line);
	border-radius: 14px;
	margin-bottom: 10px;
	padding: 0;
}

.wfft-faq summary {
	cursor: pointer;
	font-size: 15.5px;
	font-weight: 700;
	list-style: none;
	padding: 15px 44px 15px 18px;
	position: relative;
}

.wfft-faq summary::-webkit-details-marker {
	display: none;
}

.wfft-faq summary::after {
	color: var(--wfft-brand);
	content: "+";
	font-size: 21px;
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-52%);
}

.wfft-faq details[open] summary::after {
	content: "–";
}

.wfft-faq details p {
	color: #3c3c49;
	font-size: 14.5px;
	margin: 0;
	padding: 0 18px 16px;
}

/* ---------- Status ---------- */

.wfft-status {
	color: var(--wfft-muted);
	font-size: 13.5px;
	margin: 10px 0 0;
	min-height: 1.4em;
}

.wfft-status.is-good {
	color: var(--wfft-good);
}

.wfft-status.is-error,
.wfft-hint.is-error {
	color: #b42318;
	font-weight: 600;
}

.wfft-hint.is-good {
	color: var(--wfft-good);
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
	.wfft-grid,
	.wfft-grid.is-even {
		grid-template-columns: 1fr;
	}

	.wfft-panel {
		border-radius: 15px;
		padding: 16px;
	}

	.wfft-font-list {
		max-height: 280px;
	}
}

/* ---------- Tables (type scale, unit converter) ---------- */

.wfft-table {
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
	margin-top: 6px;
	min-width: 100%;
	width: 100%;
}

.wfft-table th,
.wfft-table td {
	border-bottom: 1px solid var(--wfft-line);
	padding: 9px 12px;
	text-align: left;
	vertical-align: middle;
}

.wfft-table thead th {
	color: var(--wfft-muted);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.wfft-table tbody th {
	font-weight: 700;
	white-space: nowrap;
}

.wfft-table td {
	color: #3c3c49;
	font-size: 14px;
}

.wfft-ts-sample {
	color: var(--wfft-ink) !important;
	line-height: 1.2;
	max-width: 340px;
	overflow: hidden;
	white-space: nowrap;
}

/* ---------- Related tools ---------- */

.wfft-related {
	margin-top: 42px;
}

.wfft-related h2 {
	font-size: 22px;
	letter-spacing: -.02em;
	margin-bottom: 6px;
}

/* Checkbox rows keep their inline label text on one line. */
.wfft input[type="checkbox"] {
	accent-color: var(--wfft-brand);
	height: 17px;
	width: 17px;
}

/* ---------- Per-franchise generator pages ---------- */

.wff-fg-multi h2 {
	margin-bottom: 6px;
}

.wff-fg-multi-list {
	display: grid;
	gap: 14px;
	margin-top: 16px;
}

.wff-fg-row {
	background: var(--wfft-soft);
	border: 1px solid var(--wfft-line);
	border-radius: 14px;
	padding: 14px 16px;
}

.wff-fg-row-head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.wff-fg-row-head strong {
	font-size: 16px;
}

.wff-fg-badge {
	background: #fdf0e4;
	border-radius: 999px;
	color: #8a4b06;
	font-size: 11.5px;
	font-weight: 700;
	padding: 3px 9px;
}

.wff-fg-badge.is-free {
	background: #e6f5ec;
	color: #146c43;
}

.wff-fg-match {
	color: var(--wfft-muted);
	font-size: 12.5px;
}

.wff-fg-canvas-wrap {
	background: #fff;
	border: 1px solid var(--wfft-line);
	border-radius: 10px;
	overflow-x: auto;
	padding: 12px;
}

.wff-fg-canvas-wrap canvas {
	display: block;
	height: auto;
	max-width: 100%;
}

.wff-fg-row-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wff-fg-row-actions .wfft-button {
	margin-top: 10px;
}

.wff-fg-crosslink {
	color: var(--wfft-muted);
	font-size: 15px;
	margin: 20px 0 0;
}

.wff-fg-index {
	columns: 240px 3;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.wff-fg-index li {
	margin: 0 0 7px;
}

/* ---------- Unicode generator extras ---------- */

.wfft-style-meta {
	color: var(--wfft-muted);
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0;
	margin-top: 5px;
	text-transform: none;
}

.wfft-style-meta.is-over {
	color: #b42318;
}

.wfft-style-actions {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: 6px;
}

.wfft-star {
	background: transparent;
	border: 1px solid var(--wfft-line);
	border-radius: 10px;
	color: var(--wfft-muted);
	cursor: pointer;
	font-size: 17px;
	line-height: 1;
	min-height: 44px;
	min-width: 44px;
}

.wfft-star:hover {
	border-color: var(--wfft-brand);
	color: var(--wfft-brand);
}

.wfft-star.is-on {
	background: #fff8e6;
	border-color: #e0a800;
	color: #9a6b00;
}

.wfft-style-text {
	white-space: pre-wrap;
}

/* Font rows lead with the pop-culture source, family name beneath. */
.wfft-font-label {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.wfft-font-label strong {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
}

.wfft-font-label small {
	color: var(--wfft-muted);
	font-size: 11.5px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wfft-badge.is-paid {
	background: #fdf0e4;
	color: #8a4b06;
}
