/**
 * Psychotools — style frontendu.
 *
 * WSZYSTKO zawężone do .psychotools-app (design system NeuroExpert).
 * Nie stylujemy globalnie Elementora, motywu ani nagłówków strony.
 * Prefiks klas: .pt-*
 */

.psychotools-app {
	/* Tokeny (z design systemu NeuroExpert) */
	--pt-primary: #1577af;
	--pt-primary-dk: #11618e;
	--pt-primary-bg: #eaf4fa;
	--pt-head: #0f172a;
	--pt-body: #475569;
	--pt-muted: #64748b;
	--pt-faint: #94a3b8;
	--pt-bg: #f8fafc;
	--pt-bg-soft: #f1f5f9;
	--pt-white: #ffffff;
	--pt-border: #e2e8f0;
	--pt-border-lt: #eef2f6;
	--pt-danger: #b91c1c;
	--pt-danger-bg: #fef2f2;

	--pt-cell-on: #334155;
	--pt-cell-off: #ffffff;
	--pt-cell-line: #dedede;

	--pt-font-head: 'Title', Merriweather, Georgia, serif;
	--pt-font-body: 'Para', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--pt-radius-sm: 10px;
	--pt-radius-md: 14px;
	--pt-radius-lg: 20px;

	--pt-shadow-soft: 0 8px 24px rgba( 15, 23, 42, 0.06 );
	--pt-shadow-card: 0 14px 36px rgba( 15, 23, 42, 0.08 );
	--pt-shadow-blue: 0 4px 16px rgba( 21, 119, 175, 0.18 );

	box-sizing: border-box;
	font-family: var(--pt-font-body);
	color: var(--pt-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

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

.psychotools-app .pt-container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
}

.psychotools-app .pt-card {
	background: var(--pt-white);
	border: 1px solid var(--pt-border);
	border-radius: var(--pt-radius-lg);
	box-shadow: var(--pt-shadow-soft);
	padding: clamp( 20px, 4vw, 36px );
}

/* ---- Typografia ---- */

.psychotools-app .pt-title {
	font-family: var(--pt-font-head);
	font-weight: 800;
	color: var(--pt-head);
	font-size: clamp( 1.5rem, 3vw, 2.1rem );
	line-height: 1.25;
	margin: 0 0 12px;
}

.psychotools-app .pt-lead {
	font-size: 1rem;
	color: var(--pt-muted);
	line-height: 1.75;
	margin: 0 0 18px;
}

.psychotools-app .pt-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pt-muted);
	background: rgba( 255, 255, 255, 0.7 );
	border: 1px solid var(--pt-border);
	border-radius: 9999px;
	padding: 4px 14px;
	margin-bottom: 16px;
}

/* ---- Baner rabatowy ---- */

.psychotools-app .pt-incentive {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	background: linear-gradient( 135deg, #eaf4fa 0%, #f3f9fd 100% );
	border: 1px solid rgba( 21, 119, 175, 0.22 );
	border-radius: var(--pt-radius-md);
	padding: 18px 22px;
	margin-bottom: 26px;
}

.psychotools-app .pt-incentive__icon {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--pt-primary);
	color: #fff;
	border-radius: 12px;
	font-family: var(--pt-font-head);
	font-weight: 800;
	font-size: 1.3rem;
	box-shadow: var(--pt-shadow-blue);
}

.psychotools-app .pt-incentive__heading {
	font-family: var(--pt-font-head);
	font-weight: 700;
	color: var(--pt-primary-dk);
	font-size: 1.05rem;
	margin-bottom: 4px;
}

.psychotools-app .pt-incentive__text {
	margin: 0;
	color: var(--pt-body);
	font-size: 0.95rem;
	line-height: 1.65;
}

/* ---- Ekran wyboru zestawu ---- */

.psychotools-app .pt-sets {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 190px, 1fr ) );
	gap: 16px;
	margin: 22px 0;
}

.psychotools-app .pt-set-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	background: var(--pt-white);
	border: 2px solid var(--pt-border);
	border-radius: var(--pt-radius-md);
	padding: 18px;
	cursor: pointer;
	text-align: left;
	font-family: var(--pt-font-body);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.psychotools-app .pt-set-card:hover {
	border-color: #cbd5e1;
	box-shadow: var(--pt-shadow-soft);
}

.psychotools-app .pt-set-card:focus-visible {
	outline: none;
	border-color: var(--pt-primary);
	box-shadow: 0 0 0 4px rgba( 21, 119, 175, 0.15 );
}

.psychotools-app .pt-set-card--done {
	border-color: rgba( 4, 120, 87, 0.35 );
	background: #f6fdf9;
}

.psychotools-app .pt-set-card__badge {
	display: inline-block;
	background: var(--pt-bg-soft);
	color: var(--pt-muted);
	border-radius: 9999px;
	padding: 3px 10px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.psychotools-app .pt-set-card--done .pt-set-card__badge {
	background: #ecfdf5;
	color: #047857;
}

.psychotools-app .pt-set-card--done .pt-set-card__badge::before {
	content: '✓ ';
}

.psychotools-app .pt-set-card__title {
	font-family: var(--pt-font-head);
	font-weight: 800;
	color: var(--pt-head);
	font-size: 1.15rem;
}

.psychotools-app .pt-set-card__meta {
	color: var(--pt-muted);
	font-size: 13px;
}

.psychotools-app .pt-set-card__cta {
	margin-top: 6px;
	color: var(--pt-primary);
	font-weight: 700;
	font-size: 13.5px;
}

.psychotools-app .pt-intro__set {
	margin: -4px 0 12px;
}

/* ---- Ekran instrukcji ---- */

.psychotools-app .pt-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 20px 0;
}

.psychotools-app .pt-fact {
	flex: 1 1 120px;
	background: var(--pt-bg-soft);
	border: 1px solid var(--pt-border-lt);
	border-radius: var(--pt-radius-md);
	padding: 14px 16px;
	text-align: center;
}

.psychotools-app .pt-fact__value {
	display: block;
	font-family: var(--pt-font-head);
	font-weight: 800;
	font-size: 1.5rem;
	color: var(--pt-primary);
	line-height: 1.2;
}

.psychotools-app .pt-fact__label {
	display: block;
	font-size: 12px;
	color: var(--pt-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-top: 2px;
}

.psychotools-app .pt-instructions {
	background: var(--pt-primary-bg);
	border: 1px solid rgba( 21, 119, 175, 0.15 );
	border-radius: var(--pt-radius-md);
	padding: 16px 20px;
	color: var(--pt-primary-dk);
	font-size: 0.95rem;
	line-height: 1.7;
	margin: 4px 0 16px;
}

.psychotools-app .pt-instructions p {
	margin: 0;
}

.psychotools-app .pt-note {
	font-size: 13px;
	color: var(--pt-faint);
	font-style: italic;
	margin-bottom: 20px;
}

/* ---- Przyciski (BEZ transform:translateY — zgodnie z design systemem) ---- */

.psychotools-app .pt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--pt-font-body);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	padding: 14px 26px;
	border-radius: var(--pt-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
	text-decoration: none;
}

.psychotools-app .pt-button[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
	pointer-events: none;
}

.psychotools-app .pt-button--primary {
	background: var(--pt-primary);
	color: #fff;
	box-shadow: var(--pt-shadow-blue);
}

.psychotools-app .pt-button--primary:hover,
.psychotools-app .pt-button--primary:focus-visible {
	background: var(--pt-primary-dk);
	box-shadow: 0 6px 20px rgba( 21, 119, 175, 0.28 );
}

.psychotools-app .pt-button--secondary {
	background: var(--pt-white);
	color: var(--pt-head);
	border-color: var(--pt-border);
}

.psychotools-app .pt-button--secondary:hover,
.psychotools-app .pt-button--secondary:focus-visible {
	background: var(--pt-primary-bg);
	color: var(--pt-primary-dk);
}

.psychotools-app .pt-button--ghost {
	background: transparent;
	color: var(--pt-primary);
	border-color: var(--pt-border);
}

.psychotools-app .pt-button--ghost:hover,
.psychotools-app .pt-button--ghost:focus-visible {
	background: var(--pt-primary-bg);
	border-color: var(--pt-primary);
}

.psychotools-app .pt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

/* ---- Ekran zadania ---- */

.psychotools-app .pt-qhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.psychotools-app .pt-qhead__meta {
	display: flex;
	align-items: center;
	gap: 10px;
}

.psychotools-app .pt-qhead__count {
	font-size: 13px;
	font-weight: 600;
	color: var(--pt-muted);
}

.psychotools-app .pt-qtitle {
	font-family: var(--pt-font-head);
	font-weight: 700;
	color: var(--pt-head);
	font-size: 1.1rem;
	margin: 0;
	width: 100%;
}

.psychotools-app .pt-badge {
	display: inline-block;
	background: var(--pt-primary-bg);
	color: var(--pt-primary);
	border: 1px solid rgba( 21, 119, 175, 0.18 );
	border-radius: 9999px;
	padding: 4px 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.psychotools-app .pt-progress {
	height: 8px;
	background: var(--pt-bg-soft);
	border-radius: 9999px;
	overflow: hidden;
	margin-bottom: 22px;
}

.psychotools-app .pt-progress__bar {
	height: 100%;
	background: var(--pt-primary);
	border-radius: 9999px;
	transition: width 0.3s ease;
}

.psychotools-app .pt-prompt {
	font-size: 0.98rem;
	color: var(--pt-body);
	margin: 0 0 16px;
}

.psychotools-app .pt-question__body {
	display: grid;
	grid-template-columns: minmax( 220px, 1fr ) 1.1fr;
	gap: clamp( 20px, 4vw, 36px );
	align-items: start;
}

/* ---- Stimulus: matrix ---- */

.psychotools-app .pt-stimulus {
	background: var(--pt-bg);
	border: 1px solid var(--pt-border-lt);
	border-radius: var(--pt-radius-md);
	padding: 16px;
}

.psychotools-app .pt-matrix {
	display: grid;
	gap: 24px;
}

.psychotools-app .pt-matrix__cell {
	aspect-ratio: 1 / 1;
	background: var(--pt-white);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
}

.psychotools-app .pt-matrix__cell--target,
.psychotools-app .pt-seq__cell--target {
	background: var(--pt-primary-bg);
	border: 1px dashed rgba( 21, 119, 175, 0.4 );
}

/* ---- Stimulus: sequence (jeden SVG z polami + strzałkami) ---- */

.psychotools-app .pt-stimulus--seq {
	display: flex;
	justify-content: center;
}

.psychotools-app .pt-seqsvg {
	display: block;
	max-width: 100%;
	height: auto;
	/* szerokość ustawiana inline (vbW * SCALE) — wspólna skala px/jednostkę
	   dla wszystkich układów sekwencji, żeby pola były zawsze równe */
}

.psychotools-app .pt-seqsvg__target {
	fill: var(--pt-primary-bg);
	stroke: var(--pt-primary);
	stroke-width: 1;
	stroke-dasharray: 3 2.5;
}

.psychotools-app .pt-seqsvg__qmark {
	fill: var(--pt-primary);
	font-family: var(--pt-font-head);
	font-weight: 800;
	font-size: 22px;
}

.psychotools-app .pt-seqsvg__arrow {
	fill: var(--pt-muted);
	stroke: none;
}

.psychotools-app .pt-seqsvg__dot {
	fill: var(--pt-muted);
	stroke: none;
}

/* ---- Stimulus: obraz ---- */

.psychotools-app .pt-stimulus--image {
	padding: 10px;
}

.psychotools-app .pt-stimulus__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.psychotools-app .pt-qmark {
	font-family: var(--pt-font-head);
	font-weight: 800;
	font-size: clamp( 1.4rem, 4vw, 2rem );
	color: var(--pt-primary);
}

/* ---- Siatki SVG ---- */

.psychotools-app .pt-grid {
	display: block;
	width: 100%;
	height: auto;
}

.psychotools-app .pt-cell--on {
	fill: var(--pt-cell-on);
}

.psychotools-app .pt-cell--off {
	fill: var(--pt-cell-off);
}

.psychotools-app .pt-cell {
	stroke: var(--pt-cell-line);
	/* szerokość obrysu ustawiana per-kontekst atrybutem (różne viewBoxy) */
}

/* ---- Odpowiedzi ---- */

.psychotools-app .pt-answers {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 12px;
}

/* 8 odpowiedzi → 4 kolumny (jak w oryginale) */
.psychotools-app .pt-answers--wide {
	grid-template-columns: repeat( 4, 1fr );
}

.psychotools-app .pt-answer {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: var(--pt-white);
	border: 2px solid var(--pt-border);
	border-radius: var(--pt-radius-md);
	padding: 14px 10px 12px;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	font-family: var(--pt-font-body);
}

.psychotools-app .pt-answer:hover {
	border-color: #cbd5e1;
	box-shadow: var(--pt-shadow-soft);
}

.psychotools-app .pt-answer:focus-visible {
	outline: none;
	border-color: var(--pt-primary);
	box-shadow: 0 0 0 4px rgba( 21, 119, 175, 0.15 );
}

.psychotools-app .pt-answer--selected {
	border-color: var(--pt-primary);
	background: var(--pt-primary-bg);
	box-shadow: var(--pt-shadow-blue);
}

.psychotools-app .pt-answer__badge {
	font-family: var(--pt-font-head);
	font-weight: 700;
	font-size: 13px;
	color: var(--pt-muted);
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--pt-bg-soft);
	border-radius: 9999px;
}

.psychotools-app .pt-answer--selected .pt-answer__badge {
	background: var(--pt-primary);
	color: #fff;
}

.psychotools-app .pt-answer__fig {
	width: 100%;
	max-width: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.psychotools-app .pt-answer__img {
	width: 100%;
	height: auto;
	border-radius: 6px;
}

/* ---- Nawigacja ---- */

.psychotools-app .pt-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--pt-border-lt);
}

.psychotools-app .pt-nav__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.psychotools-app .pt-nav__hint {
	font-size: 13px;
	color: var(--pt-muted);
}

/* ---- Wynik ---- */

.psychotools-app .pt-result__top {
	display: flex;
	align-items: center;
	gap: clamp( 16px, 4vw, 32px );
	flex-wrap: wrap;
	margin: 8px 0 20px;
}

.psychotools-app .pt-ring-wrap {
	flex: 0 0 auto;
	width: 120px;
}

.psychotools-app .pt-ring {
	width: 120px;
	height: 120px;
}

.psychotools-app .pt-ring__bg {
	fill: none;
	stroke: var(--pt-bg-soft);
	stroke-width: 10;
}

.psychotools-app .pt-ring__fg {
	fill: none;
	stroke: var(--pt-primary);
	stroke-width: 10;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.6s ease;
}

.psychotools-app .pt-ring__text {
	font-family: var(--pt-font-head);
	font-weight: 800;
	font-size: 26px;
	fill: var(--pt-head);
}

.psychotools-app .pt-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	flex: 1 1 200px;
}

.psychotools-app .pt-stat__value {
	display: block;
	font-family: var(--pt-font-head);
	font-weight: 800;
	font-size: 1.4rem;
	color: var(--pt-head);
}

.psychotools-app .pt-stat__label {
	display: block;
	font-size: 12px;
	color: var(--pt-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.psychotools-app .pt-section-results {
	margin: 18px 0;
	border: 1px solid var(--pt-border-lt);
	border-radius: var(--pt-radius-md);
	overflow: hidden;
}

.psychotools-app .pt-section-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--pt-border-lt);
}

.psychotools-app .pt-section-row:last-child {
	border-bottom: none;
}

.psychotools-app .pt-section-row__name {
	font-weight: 600;
	color: var(--pt-body);
}

.psychotools-app .pt-section-row__score {
	font-weight: 700;
	color: var(--pt-primary);
}

/* ---- Hasło / rozwiązanie ---- */

.psychotools-app .pt-passwords {
	background: var(--pt-primary-bg);
	border: 1px solid rgba( 21, 119, 175, 0.15 );
	border-radius: var(--pt-radius-md);
	padding: 16px 20px;
	margin: 18px 0;
}

.psychotools-app .pt-passwords__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
	color: var(--pt-primary-dk);
	margin-bottom: 6px;
}

.psychotools-app .pt-passwords__hint {
	font-size: 12.5px;
	color: var(--pt-muted);
	margin: 0 0 12px;
	line-height: 1.6;
}

.psychotools-app .pt-word {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 6px;
}

.psychotools-app .pt-word__set {
	font-size: 12px;
	color: var(--pt-muted);
	font-weight: 600;
}

.psychotools-app .pt-word__letters {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.psychotools-app .pt-word__letter {
	width: 32px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid rgba( 21, 119, 175, 0.25 );
	border-radius: 8px;
	font-family: var(--pt-font-head);
	font-weight: 800;
	color: var(--pt-primary-dk);
	font-size: 1.05rem;
}

.psychotools-app .pt-word__letter--empty {
	color: var(--pt-faint);
	background: var(--pt-bg-soft);
	border-style: dashed;
}

/* ---- Alerty ---- */

.psychotools-app .pt-alert {
	background: var(--pt-primary-bg);
	border: 1px solid rgba( 21, 119, 175, 0.18 );
	border-radius: var(--pt-radius-md);
	padding: 16px 20px;
	color: var(--pt-primary-dk);
	font-size: 0.95rem;
}

.psychotools-app .pt-alert--error {
	background: var(--pt-danger-bg);
	border-color: rgba( 185, 28, 28, 0.2 );
	color: var(--pt-danger);
}

.psychotools-app .pt-alert--success {
	background: #ecfdf5;
	border-color: rgba( 4, 120, 87, 0.25 );
	color: #047857;
	font-weight: 600;
	margin-bottom: 18px;
}

/* ---- Ładowanie / spinner ---- */

.psychotools-app .pt-boot,
.psychotools-app .pt-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 40px 20px;
	color: var(--pt-muted);
}

.psychotools-app .pt-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid var(--pt-border);
	border-top-color: var(--pt-primary);
	border-radius: 50%;
	animation: pt-spin 0.8s linear infinite;
}

@keyframes pt-spin {
	to { transform: rotate( 360deg ); }
}

/* ---- Dostępność ---- */

.psychotools-app .pt-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;
}

/* ---- Responsywność ---- */

@media ( max-width: 760px ) {
	.psychotools-app .pt-question__body {
		grid-template-columns: 1fr;
	}
	.psychotools-app .pt-stimulus {
		max-width: 340px;
		margin: 0 auto;
	}
	.psychotools-app .pt-answers,
	.psychotools-app .pt-answers--wide {
		grid-template-columns: repeat( 2, 1fr );
	}
	.psychotools-app .pt-nav {
		flex-direction: column-reverse;
		align-items: stretch;
	}
	.psychotools-app .pt-nav__right {
		flex-direction: column;
	}
	.psychotools-app .pt-button {
		width: 100%;
	}
}

@media ( max-width: 480px ) {
	.psychotools-app .pt-answers {
		grid-template-columns: repeat( 2, 1fr );
		gap: 8px;
	}
	.psychotools-app .pt-answer__fig {
		max-width: 72px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.psychotools-app * {
		transition: none !important;
		animation: none !important;
	}
}

/* ---- Kody rabatowe za ukończone zestawy ---- */

/* Komórka siatki zestawów: kafelek + kod pod nim. */
.psychotools-app .pt-set-cell {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.psychotools-app .pt-set-cell .pt-set-card {
	flex: 1;
}

/* Komórka siatki bywa wąska (minmax 190px), więc kod nie zmieści się obok
   plakietki i podpowiedzi — układamy go w osobnym wierszu, inaczej łamałby
   się litera po literze. */
.psychotools-app .pt-set-cell .pt-code {
	flex-wrap: wrap;
	row-gap: 4px;
}

.psychotools-app .pt-set-cell .pt-code__text {
	flex-basis: 100%;
	order: 3;
	font-size: 13px;
}

/* Pojedynczy kod rabatowy. */
.psychotools-app .pt-code {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 9px 12px;
	border: 1px dashed rgba( 4, 120, 87, 0.45 );
	border-radius: var( --pt-radius-sm );
	background: #ecfdf5;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.psychotools-app .pt-code:hover {
	border-color: #047857;
}

.psychotools-app .pt-code.is-copied {
	border-style: solid;
	background: #d1fae5;
}

.psychotools-app .pt-code--used {
	border-color: var( --pt-border );
	background: var( --pt-bg-soft );
	cursor: default;
}

.psychotools-app .pt-code__badge {
	flex: none;
	padding: 2px 8px;
	border-radius: 999px;
	background: #047857;
	color: var( --pt-white );
	font-family: var( --pt-font-body );
	font-size: 12px;
	font-weight: 700;
}

.psychotools-app .pt-code--used .pt-code__badge {
	background: var( --pt-faint );
}

.psychotools-app .pt-code__text {
	flex: 1 1 auto;
	min-width: 0;
	color: var( --pt-head );
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	overflow-wrap: break-word;
}

.psychotools-app .pt-code--used .pt-code__text {
	color: var( --pt-muted );
	text-decoration: line-through;
}

.psychotools-app .pt-code__hint {
	flex: none;
	color: var( --pt-muted );
	font-family: var( --pt-font-body );
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.psychotools-app .pt-code.is-copied .pt-code__hint::after {
	content: ' ✓';
}

/* Zbiorcze podsumowanie nad listą zestawów. */
.psychotools-app .pt-reward {
	margin: 0 0 4px;
	padding: 16px 18px;
	border: 1px solid rgba( 4, 120, 87, 0.25 );
	border-radius: var( --pt-radius-md );
	background: #ecfdf5;
}

.psychotools-app .pt-reward--used {
	border-color: var( --pt-border );
	background: var( --pt-bg-soft );
}

.psychotools-app .pt-reward__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.psychotools-app .pt-reward__badge {
	flex: none;
	padding: 4px 10px;
	border-radius: 999px;
	background: #047857;
	color: var( --pt-white );
	font-family: var( --pt-font-body );
	font-size: 14px;
	font-weight: 700;
}

.psychotools-app .pt-reward--used .pt-reward__badge {
	background: var( --pt-faint );
}

.psychotools-app .pt-reward__title {
	color: var( --pt-head );
	font-family: var( --pt-font-head );
	font-size: 17px;
	font-weight: 700;
}

.psychotools-app .pt-reward__note {
	margin: 0;
	color: #047857;
	font-family: var( --pt-font-body );
	font-size: 15px;
	line-height: 1.5;
}

.psychotools-app .pt-reward--used .pt-reward__note {
	color: var( --pt-body );
}

.psychotools-app .pt-reward__meta {
	margin: 6px 0 0;
	color: var( --pt-muted );
	font-family: var( --pt-font-body );
	font-size: 13px;
	line-height: 1.5;
}

/* Kody zdobyte na ekranie wyniku. */
.psychotools-app .pt-earned {
	margin: 0 0 18px;
	padding: 16px 18px;
	border: 1px solid rgba( 4, 120, 87, 0.25 );
	border-radius: var( --pt-radius-md );
	background: #ecfdf5;
}

.psychotools-app .pt-earned__label {
	margin: 0 0 10px;
	color: var( --pt-head );
	font-family: var( --pt-font-head );
	font-size: 16px;
	font-weight: 700;
}

.psychotools-app .pt-earned__codes {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.psychotools-app .pt-earned__codes .pt-code {
	background: var( --pt-white );
}

.psychotools-app .pt-earned__codes .pt-code.is-copied {
	background: #d1fae5;
}

.psychotools-app .pt-earned__hint {
	margin: 10px 0 0;
	color: var( --pt-body );
	font-family: var( --pt-font-body );
	font-size: 14px;
	line-height: 1.5;
}

@media ( max-width: 480px ) {
	.psychotools-app .pt-code {
		flex-wrap: wrap;
	}

	.psychotools-app .pt-code__text {
		flex-basis: 100%;
		order: 3;
	}
}

/* ---- Zapowiedź narzędzia dla niezalogowanych ---- */

/* Nagłówek, tag i opis stoją tu POZA kartą (inaczej niż na ekranie wyboru
   zestawów), więc potrzebują własnych odstępów. */
.psychotools-app--login .pt-incentive {
	margin-bottom: 26px;
}

.psychotools-app--login .pt-eyebrow {
	margin-bottom: 12px;
}

.psychotools-app--login .pt-lead {
	max-width: 70ch;
	margin-bottom: 22px;
}

/* Kafelki .pt-fact są współdzielone z ekranem instrukcji — tu tylko odstęp. */
.psychotools-app--login .pt-facts {
	margin: 0 0 26px;
}

.psychotools-app--login .pt-login__title {
	margin: 0 0 10px;
	color: var( --pt-head );
	font-family: var( --pt-font-head );
	font-size: clamp( 1.15rem, 2vw, 1.4rem );
	font-weight: 800;
	line-height: 1.3;
}

.psychotools-app--login .pt-login__lead {
	max-width: 70ch;
	margin: 0 0 20px;
	color: var( --pt-body );
	font-family: var( --pt-font-body );
	font-size: 15px;
	line-height: 1.7;
}

.psychotools-app--login .pt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

@media ( max-width: 560px ) {
	.psychotools-app--login .pt-actions .pt-button {
		flex: 1 1 100%;
		text-align: center;
	}
}
