/**
 * Prompt Checker - front-end styles
 * Palette: blue / white / black
 */

.pchk {
	--pchk-accent: #1d4ed8;
	--pchk-accent-dark: #1435a1;
	--pchk-accent-soft: #eef3ff;
	--pchk-accent-line: #c7d7fe;
	--pchk-ink: #0b1220;
	--pchk-ink-soft: #46506a;
	--pchk-muted: #6b7488;
	--pchk-line: #e3e8f2;
	--pchk-surface: #ffffff;
	--pchk-canvas: #f6f8fd;
	--pchk-poor: #d92d20;
	--pchk-fair: #b54708;
	--pchk-good: var(--pchk-accent);
	--pchk-radius: 14px;
	--pchk-shadow: 0 1px 2px rgba(11, 18, 32, .06), 0 12px 28px -18px rgba(11, 18, 32, .35);

	box-sizing: border-box;
	max-width: 980px;
	margin: 0 auto;
	padding: 4px 0 8px;
	color: var(--pchk-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

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

.pchk p {
	margin: 0 0 10px;
}

.pchk h2,
.pchk h3,
.pchk h4 {
	margin: 0;
	color: var(--pchk-ink);
	line-height: 1.25;
	letter-spacing: -.01em;
}

.pchk button {
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
}

.pchk ul,
.pchk ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------------- Header */

.pchk-head {
	margin-bottom: 18px;
}

.pchk-eyebrow {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 10px;
	border: 1px solid var(--pchk-accent-line);
	border-radius: 999px;
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.pchk-title {
	margin: 0 0 6px;
	font-size: 30px;
	font-weight: 800;
}

.pchk-subtitle {
	max-width: 62ch;
	margin: 0;
	color: var(--pchk-ink-soft);
	font-size: 15px;
}

/* ----------------------------------------------------------------- Tabs */

.pchk-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 14px;
	padding: 5px;
	border: 1px solid var(--pchk-line);
	border-radius: 12px;
	background: var(--pchk-canvas);
}

.pchk-tab {
	flex: 1 1 auto;
	padding: 9px 14px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--pchk-ink-soft);
	font-size: 14px;
	font-weight: 600;
	transition: background .15s ease, color .15s ease;
}

.pchk-tab:hover {
	color: var(--pchk-ink);
}

.pchk-tab.is-active {
	background: var(--pchk-surface);
	box-shadow: 0 1px 2px rgba(11, 18, 32, .12);
	color: var(--pchk-accent);
}

.pchk-lock {
	margin-left: 4px;
	font-size: 11px;
	opacity: .65;
}

.pchk-panel[hidden] {
	display: none;
}

/* ---------------------------------------------------------------- Cards */

.pchk-card {
	margin-bottom: 16px;
	padding: 20px;
	border: 1px solid var(--pchk-line);
	border-radius: var(--pchk-radius);
	background: var(--pchk-surface);
	box-shadow: var(--pchk-shadow);
}

.pchk-field-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.pchk-label {
	color: var(--pchk-ink);
	font-size: 15px;
	font-weight: 700;
}

.pchk-label-sm {
	display: block;
	margin-bottom: 5px;
	color: var(--pchk-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.pchk-mini-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pchk-mini {
	padding: 5px 11px;
	border: 1px solid var(--pchk-line);
	border-radius: 8px;
	background: var(--pchk-surface);
	color: var(--pchk-ink-soft);
	font-size: 13px;
	font-weight: 600;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.pchk-mini:hover {
	border-color: var(--pchk-accent-line);
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
}

.pchk-mini-danger:hover {
	border-color: #f3c0bb;
	background: #fdf2f1;
	color: var(--pchk-poor);
}

/* ------------------------------------------------------------- Textarea */

.pchk-textarea {
	display: block;
	width: 100%;
	min-height: 190px;
	padding: 14px 15px;
	border: 1.5px solid var(--pchk-line);
	border-radius: 12px;
	background: var(--pchk-surface);
	color: var(--pchk-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.65;
	resize: vertical;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.pchk-textarea::placeholder {
	color: #9aa3b5;
}

.pchk-textarea:focus {
	border-color: var(--pchk-accent);
	box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
	outline: none;
}

.pchk-below {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 9px;
	min-height: 22px;
}

.pchk-counter {
	color: var(--pchk-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pchk-counter.is-near .pchk-count {
	color: var(--pchk-fair);
	font-weight: 700;
}

.pchk-counter.is-full .pchk-count {
	color: var(--pchk-poor);
	font-weight: 700;
}

.pchk-message {
	margin: 0;
	color: var(--pchk-muted);
	font-size: 13px;
}

.pchk-message.is-error {
	color: var(--pchk-poor);
	font-weight: 600;
}

.pchk-message.is-success {
	color: var(--pchk-accent);
	font-weight: 600;
}

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

.pchk-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.pchk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 1.5px solid transparent;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.pchk-btn:active {
	transform: translateY(1px);
}

.pchk-btn-primary {
	background: var(--pchk-accent);
	color: #fff;
}

.pchk-btn-primary:hover {
	background: var(--pchk-accent-dark);
	color: #fff;
}

.pchk-btn-ghost {
	border-color: var(--pchk-line);
	background: var(--pchk-surface);
	color: var(--pchk-ink);
}

.pchk-btn-ghost:hover {
	border-color: var(--pchk-accent-line);
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
}

.pchk-btn-dark {
	background: var(--pchk-ink);
	color: #fff;
}

.pchk-btn-dark:hover {
	background: #000;
	color: #fff;
}

.pchk-btn[disabled] {
	cursor: not-allowed;
	opacity: .6;
}

.pchk-spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pchk-spin .7s linear infinite;
}

.pchk-btn.is-loading .pchk-spinner {
	display: inline-block;
}

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

.pchk :focus-visible {
	outline: 3px solid rgba(29, 78, 216, .45);
	outline-offset: 2px;
}

/* -------------------------------------------------------------- Results */

.pchk-results:empty {
	display: none;
}

.pchk-score-card {
	display: grid;
	grid-template-columns: 168px 1fr;
	gap: 24px;
	align-items: center;
}

.pchk-gauge {
	position: relative;
	width: 168px;
	height: 168px;
}

.pchk-gauge svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.pchk-gauge-track {
	fill: none;
	stroke: var(--pchk-line);
	stroke-width: 12;
}

.pchk-gauge-value {
	fill: none;
	stroke: var(--pchk-accent);
	stroke-width: 12;
	stroke-linecap: round;
	transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1);
}

.pchk-gauge-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.pchk-gauge-number {
	font-size: 44px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.03em;
}

.pchk-gauge-out {
	margin-top: 4px;
	color: var(--pchk-muted);
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.pchk-score-main h3 {
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pchk-muted);
}

.pchk-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 10px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .01em;
}

.pchk-badge::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: currentColor;
}

.pchk-badge.is-poor {
	background: #fdf2f1;
	color: var(--pchk-poor);
}

.pchk-badge.is-fair {
	background: #fff6ed;
	color: var(--pchk-fair);
}

.pchk-badge.is-good {
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
}

.pchk-summary {
	margin: 0 0 14px;
	color: var(--pchk-ink-soft);
	font-size: 15px;
}

.pchk-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pchk-stat {
	padding: 7px 12px;
	border: 1px solid var(--pchk-line);
	border-radius: 9px;
	background: var(--pchk-canvas);
	font-size: 13px;
	color: var(--pchk-ink-soft);
}

.pchk-stat b {
	color: var(--pchk-ink);
	font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- Breakdown */

.pchk-section-title {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 14px;
	font-size: 17px;
	font-weight: 800;
}

.pchk-section-title::before {
	content: "";
	width: 4px;
	height: 18px;
	border-radius: 2px;
	background: var(--pchk-accent);
}

.pchk-bars {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px 26px;
}

.pchk-bar-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.pchk-bar-label {
	font-size: 14px;
	font-weight: 700;
}

.pchk-bar-score {
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pchk-bar-track {
	height: 8px;
	border-radius: 999px;
	background: var(--pchk-line);
	overflow: hidden;
}

.pchk-bar-fill {
	height: 100%;
	border-radius: 999px;
	background: var(--pchk-accent);
	width: 0;
	transition: width .8s cubic-bezier(.2, .8, .2, 1);
}

.pchk-bar.is-poor .pchk-bar-fill,
.pchk-bar.is-poor .pchk-bar-score {
	background: var(--pchk-poor);
	color: var(--pchk-poor);
}

.pchk-bar.is-poor .pchk-bar-score {
	background: none;
}

.pchk-bar.is-fair .pchk-bar-fill {
	background: var(--pchk-fair);
}

.pchk-bar.is-fair .pchk-bar-score {
	color: var(--pchk-fair);
}

.pchk-bar.is-good .pchk-bar-score {
	color: var(--pchk-accent);
}

.pchk-bar-note {
	margin: 6px 0 0;
	color: var(--pchk-muted);
	font-size: 13px;
}

/* --------------------------------------------------- Strengths / issues */

.pchk-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}

.pchk-columns > .pchk-card {
	margin-bottom: 0;
}

.pchk-list li {
	position: relative;
	margin-bottom: 12px;
	padding: 12px 14px 12px 16px;
	border: 1px solid var(--pchk-line);
	border-left: 3px solid var(--pchk-accent);
	border-radius: 10px;
	background: var(--pchk-canvas);
}

.pchk-list li:last-child {
	margin-bottom: 0;
}

.pchk-list-weak li {
	border-left-color: var(--pchk-fair);
}

.pchk-list-weak li.is-high {
	border-left-color: var(--pchk-poor);
}

.pchk-item-title {
	margin: 0 0 3px;
	font-size: 15px;
	font-weight: 700;
}

.pchk-item-text {
	margin: 0;
	color: var(--pchk-ink-soft);
	font-size: 14px;
}

.pchk-item-fix {
	display: block;
	margin-top: 7px;
	padding-top: 7px;
	border-top: 1px dashed var(--pchk-line);
	color: var(--pchk-ink-soft);
	font-size: 13px;
}

.pchk-item-fix b {
	color: var(--pchk-accent);
}

.pchk-tag {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
	vertical-align: middle;
}

.pchk-tag.is-high {
	background: #fdf2f1;
	color: var(--pchk-poor);
}

.pchk-tag.is-medium {
	background: #fff6ed;
	color: var(--pchk-fair);
}

.pchk-tag.is-low {
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
}

.pchk-issues li {
	display: flex;
	gap: 9px;
	padding: 8px 0;
	border-bottom: 1px solid var(--pchk-line);
	color: var(--pchk-ink-soft);
	font-size: 14px;
}

.pchk-issues li:last-child {
	border-bottom: 0;
}

.pchk-issue-type {
	flex: 0 0 auto;
	padding: 1px 8px;
	border-radius: 6px;
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	height: fit-content;
	margin-top: 3px;
}

/* ------------------------------------------------------ Enhanced prompt */

.pchk-enhanced {
	border: 0;
	background: var(--pchk-ink);
	color: #e8ecf6;
}

.pchk-enhanced .pchk-section-title {
	color: #fff;
}

.pchk-enhanced .pchk-section-title::before {
	background: #6f9bff;
}

.pchk-enhanced-note {
	margin: -6px 0 14px;
	color: #97a2bb;
	font-size: 13px;
}

.pchk-code {
	max-height: 460px;
	margin: 0 0 14px;
	padding: 16px;
	border: 1px solid #1e2a44;
	border-radius: 10px;
	background: #060b16;
	color: #dbe4f7;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 13.5px;
	line-height: 1.7;
	white-space: pre-wrap;
	word-break: break-word;
	overflow: auto;
	tab-size: 2;
}

.pchk-changes {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #1e2a44;
}

.pchk-changes h4 {
	margin-bottom: 8px;
	color: #fff;
	font-size: 13px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pchk-changes li {
	position: relative;
	padding-left: 20px;
	color: #b9c4dc;
	font-size: 13.5px;
	line-height: 1.6;
}

.pchk-changes li::before {
	content: "+";
	position: absolute;
	left: 4px;
	color: #6f9bff;
	font-weight: 800;
}

.pchk-save-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.pchk-save-note {
	margin: 0;
	color: var(--pchk-ink-soft);
	font-size: 13.5px;
}

.pchk-save-note a {
	color: var(--pchk-accent);
	font-weight: 700;
}

/* -------------------------------------------------------------- Locked */

.pchk-locked {
	text-align: center;
}

.pchk-locked-title {
	margin-bottom: 8px;
	font-size: 20px;
	font-weight: 800;
}

.pchk-locked-text {
	max-width: 56ch;
	margin: 0 auto 16px;
	color: var(--pchk-ink-soft);
	font-size: 15px;
}

.pchk-locked-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

/* ------------------------------------------------------------- History */

.pchk-filters {
	padding: 16px 18px;
}

.pchk-filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}

.pchk-filter-row-end {
	margin-top: 12px;
}

.pchk-filter {
	flex: 0 0 auto;
	min-width: 140px;
}

.pchk-filter-grow {
	flex: 1 1 220px;
	min-width: 180px;
}

.pchk-input {
	width: 100%;
	padding: 9px 12px;
	border: 1.5px solid var(--pchk-line);
	border-radius: 9px;
	background: var(--pchk-surface);
	color: var(--pchk-ink);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
}

.pchk-input:focus {
	border-color: var(--pchk-accent);
	box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
	outline: none;
}

.pchk-chip {
	padding: 7px 14px;
	border: 1.5px solid var(--pchk-line);
	border-radius: 999px;
	background: var(--pchk-surface);
	color: var(--pchk-ink-soft);
	font-size: 13px;
	font-weight: 700;
}

.pchk-chip:hover {
	border-color: var(--pchk-accent-line);
	color: var(--pchk-accent);
}

.pchk-chip[aria-pressed="true"] {
	border-color: var(--pchk-accent);
	background: var(--pchk-accent);
	color: #fff;
}

.pchk-history-count {
	margin: 0 0 12px;
	color: var(--pchk-muted);
	font-size: 13px;
	font-weight: 600;
}

.pchk-report {
	margin-bottom: 12px;
	border: 1px solid var(--pchk-line);
	border-radius: 12px;
	background: var(--pchk-surface);
	box-shadow: 0 1px 2px rgba(11, 18, 32, .05);
	overflow: hidden;
}

.pchk-report-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
}

.pchk-score-pill {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border: 2px solid var(--pchk-accent);
	border-radius: 12px;
	color: var(--pchk-accent);
	font-size: 19px;
	font-weight: 800;
	line-height: 1;
}

.pchk-score-pill small {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .8;
}

.pchk-score-pill.is-poor {
	border-color: var(--pchk-poor);
	color: var(--pchk-poor);
}

.pchk-score-pill.is-fair {
	border-color: var(--pchk-fair);
	color: var(--pchk-fair);
}

.pchk-report-main {
	flex: 1 1 auto;
	min-width: 0;
}

.pchk-report-title {
	margin: 0 0 3px;
	font-size: 15px;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.pchk-report-meta {
	margin: 0;
	color: var(--pchk-muted);
	font-size: 12.5px;
}

.pchk-report-tools {
	display: flex;
	flex: 0 0 auto;
	gap: 6px;
}

.pchk-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--pchk-line);
	border-radius: 9px;
	background: var(--pchk-surface);
	color: var(--pchk-muted);
	font-size: 15px;
	line-height: 1;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.pchk-icon-btn:hover {
	border-color: var(--pchk-accent-line);
	background: var(--pchk-accent-soft);
	color: var(--pchk-accent);
}

.pchk-icon-btn.is-on {
	border-color: var(--pchk-accent);
	background: var(--pchk-accent);
	color: #fff;
}

.pchk-icon-btn.is-danger:hover {
	border-color: #f3c0bb;
	background: #fdf2f1;
	color: var(--pchk-poor);
}

.pchk-report-body {
	padding: 0 16px 16px;
	border-top: 1px solid var(--pchk-line);
}

.pchk-report-body[hidden] {
	display: none;
}

.pchk-sub-title {
	margin: 16px 0 7px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--pchk-muted);
}

.pchk-quote {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--pchk-line);
	border-radius: 10px;
	background: var(--pchk-canvas);
	color: var(--pchk-ink-soft);
	font-size: 14px;
	white-space: pre-wrap;
	word-break: break-word;
}

.pchk-mini-code {
	margin: 0;
	padding: 14px;
	border-radius: 10px;
	background: var(--pchk-ink);
	color: #dbe4f7;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 13px;
	line-height: 1.65;
	white-space: pre-wrap;
	word-break: break-word;
	max-height: 340px;
	overflow: auto;
}

.pchk-empty {
	padding: 34px 20px;
	border: 1px dashed var(--pchk-line);
	border-radius: 12px;
	background: var(--pchk-canvas);
	color: var(--pchk-muted);
	font-size: 15px;
	text-align: center;
}

.pchk-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 6px;
}

.pchk-pager:empty {
	display: none;
}

.pchk-pager-info {
	color: var(--pchk-muted);
	font-size: 13px;
	font-weight: 600;
}

.pchk-skeleton {
	height: 82px;
	margin-bottom: 12px;
	border-radius: 12px;
	background: linear-gradient(90deg, #eef1f7 25%, #f7f9fd 37%, #eef1f7 63%);
	background-size: 400% 100%;
	animation: pchk-shimmer 1.3s ease infinite;
}

@keyframes pchk-shimmer {
	0% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0 50%;
	}
}

.pchk-credit {
	margin: 6px 0 0;
	color: var(--pchk-muted);
	font-size: 12.5px;
	text-align: center;
}

.pchk-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 99999;
	padding: 11px 20px;
	border-radius: 999px;
	background: var(--pchk-ink);
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 12px 30px -10px rgba(11, 18, 32, .6);
	transform: translate(-50%, 14px);
	opacity: 0;
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
}

.pchk-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

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

@media (max-width: 760px) {
	.pchk-title {
		font-size: 24px;
	}

	.pchk-card {
		padding: 16px;
	}

	.pchk-score-card {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.pchk-score-main {
		text-align: center;
	}

	.pchk-stats {
		justify-content: center;
	}

	.pchk-gauge {
		width: 148px;
		height: 148px;
	}

	.pchk-report-head {
		flex-wrap: wrap;
	}

	.pchk-report-tools {
		width: 100%;
		justify-content: flex-end;
	}

	.pchk-filter,
	.pchk-filter-grow {
		flex: 1 1 100%;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pchk *,
	.pchk *::before,
	.pchk *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

/* -------------------------------------------------------------------------
 * Hero layout: compact card that sits inside a hero section.
 * ---------------------------------------------------------------------- */

.pchk-layout-hero {
	max-width: 720px;
}

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

.pchk-layout-hero .pchk-input-card {
	padding: 18px;
}

.pchk-layout-hero .pchk-field-head {
	justify-content: flex-end;
	margin-bottom: 8px;
}

.pchk-layout-hero .pchk-textarea {
	min-height: 132px;
}

.pchk-layout-hero .pchk-actions {
	gap: 10px;
}

.pchk-layout-hero .pchk-btn {
	flex: 0 0 auto;
}

@media (max-width: 560px) {
	.pchk-layout-hero .pchk-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.pchk-layout-hero .pchk-actions .pchk-btn {
		width: 100%;
		justify-content: center;
	}
}

/* -------------------------------------------------------------------------
 * Report overlay.
 * ---------------------------------------------------------------------- */

body.pchk-modal-open {
	overflow: hidden;
}

.pchk-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.pchk-modal[hidden] {
	display: none;
}

.pchk-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 15, 33, 0.62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	animation: pchk-fade 0.18s ease-out;
}

.pchk-modal-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 920px;
	max-height: min(88vh, 900px);
	background: var(--pchk-surface, #ffffff);
	border-radius: 18px;
	box-shadow: 0 28px 70px rgba(8, 15, 33, 0.34);
	overflow: hidden;
	outline: none;
	animation: pchk-rise 0.22s ease-out;
}

.pchk-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px 12px 18px;
	border-bottom: 1px solid var(--pchk-line, #e3e8f3);
	background: var(--pchk-surface, #ffffff);
	flex: 0 0 auto;
}

.pchk-modal-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.pchk-modal-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--pchk-ink, #0b1220);
}

.pchk-modal-close {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	line-height: 1;
	color: var(--pchk-ink-soft, #4a5670);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 9px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pchk-modal-close:hover {
	background: var(--pchk-accent-soft, #eef3ff);
	border-color: var(--pchk-line, #e3e8f3);
	color: var(--pchk-ink, #0b1220);
}

.pchk-modal-close:focus-visible {
	outline: 2px solid var(--pchk-accent, #1d4ed8);
	outline-offset: 2px;
}

.pchk-modal-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 18px;
	background: var(--pchk-canvas, #f5f8ff);
}

.pchk-modal-body > .pchk-panel > .pchk-results {
	margin-top: 0;
}

.pchk-modal-body .pchk-card {
	box-shadow: none;
	border: 1px solid var(--pchk-line, #e3e8f3);
}

@keyframes pchk-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes pchk-rise {
	from { opacity: 0; transform: translateY(14px) scale(0.985); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
	.pchk-modal {
		padding: 0;
	}

	.pchk-modal-dialog {
		max-width: none;
		max-height: 100%;
		height: 100%;
		border-radius: 0;
	}

	.pchk-modal-body {
		padding: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pchk-modal-backdrop,
	.pchk-modal-dialog {
		animation: none;
	}
}
